react-semaphor 0.1.477 → 0.1.478

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 (109) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +9 -9
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{analyze-result-contract-OgPk-zGu.cjs → analyze-result-contract-BX_nQmPN.cjs} +1 -1
  8. package/dist/chunks/{analyze-result-contract-C8s8EUL5.js → analyze-result-contract-DsiAzCYn.js} +1 -1
  9. package/dist/chunks/{saved-temporal-bucket-format-CHsXUPJI.js → card-config-utils-CyDKaPNT.js} +190 -190
  10. package/dist/chunks/card-config-utils-D3Xuu0ub.cjs +1 -0
  11. package/dist/chunks/{common-types-C1IM7gao.cjs → common-types-BCSbPclk.cjs} +1 -1
  12. package/dist/chunks/{common-types-BLPy5_E0.js → common-types-D3r4PILe.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-CXHq6ime.cjs → dashboard-briefing-launcher-7qAW16mO.cjs} +2 -2
  14. package/dist/chunks/{dashboard-briefing-launcher-C9d8CPxv.js → dashboard-briefing-launcher-DAhtLQPc.js} +134 -134
  15. package/dist/chunks/{dashboard-controls-BqDm4ARp.js → dashboard-controls-C_CBmEwW.js} +13 -12
  16. package/dist/chunks/{dashboard-controls-d7Yd2fJb.cjs → dashboard-controls-CoVqAeKG.cjs} +10 -10
  17. package/dist/chunks/{dashboard-input-contract-JFJZgenC.cjs → dashboard-date-comparison-definition-C93wv8Ua.cjs} +1 -1
  18. package/dist/chunks/{dashboard-input-contract-BrGdGFz0.js → dashboard-date-comparison-definition-KohOqBqR.js} +19 -19
  19. package/dist/chunks/dashboard-filter-value-compatibility-BAatYtUS.js +1215 -0
  20. package/dist/chunks/dashboard-filter-value-compatibility-Bco2gN96.cjs +1 -0
  21. package/dist/chunks/{dashboard-json-CL_vgcWq.js → dashboard-json-0w58H39L.js} +7 -7
  22. package/dist/chunks/dashboard-json-B3XSl7b_.cjs +1 -0
  23. package/dist/chunks/{edit-dashboard-visual-Dklel3MC.cjs → edit-dashboard-visual-BsLRKeuO.cjs} +6 -6
  24. package/dist/chunks/{edit-dashboard-visual-C0Zvyo-X.js → edit-dashboard-visual-BsWEU8xf.js} +277 -277
  25. package/dist/chunks/{editor-action-buttons-BOyUtX9j.js → editor-action-buttons-B3CB5c__.js} +39 -39
  26. package/dist/chunks/{editor-action-buttons-AcaZsiDy.cjs → editor-action-buttons-DMLDvrJD.cjs} +1 -1
  27. package/dist/chunks/{index-Cd8qGOXl.cjs → index--0Il-Bpd.cjs} +238 -238
  28. package/dist/chunks/{format-types-CFHQoIuk.js → index-BS0_dp0l.js} +168 -168
  29. package/dist/chunks/{index-D9S3j7_z.js → index-BvRREsU9.js} +9 -9
  30. package/dist/chunks/index-ByQgqT9d.cjs +1 -0
  31. package/dist/chunks/{index-v2MZLyus.cjs → index-CXeIDdjd.cjs} +1 -1
  32. package/dist/chunks/{index-DrdF7QR7.js → index-DgGcVyUs.js} +30518 -31308
  33. package/dist/chunks/matrix-result-contract-CFPnlcLm.cjs +1 -0
  34. package/dist/chunks/{matrix-result-contract-BpzhImar.js → matrix-result-contract-DFfUvb1r.js} +3 -3
  35. package/dist/chunks/{temporal-bucket-CtP7hKLa.js → metric-comparison-CTexJ8V1.js} +705 -705
  36. package/dist/chunks/metric-comparison-x0lipytf.cjs +1 -0
  37. package/dist/chunks/pivot-header-presentation-8Ra1RfHg.cjs +4 -0
  38. package/dist/chunks/{pivot-header-presentation-CaERAWpl.js → pivot-header-presentation-tpb_J900.js} +118 -118
  39. package/dist/chunks/{pivot-result-identity-CIZXsI53.js → pivot-result-identity-BIeP9v8I.js} +1 -1
  40. package/dist/chunks/{pivot-result-identity-DRUlTWUq.cjs → pivot-result-identity-BVnhG2rR.cjs} +1 -1
  41. package/dist/chunks/pivot-result-lifecycle-D_bRCqaB.cjs +1 -0
  42. package/dist/chunks/{pivot-result-lifecycle-B9FTybxN.js → pivot-result-lifecycle-mjJ1rBvV.js} +7 -7
  43. package/dist/chunks/{raw-temporal-contract-U8J9RlEH.js → raw-temporal-contract-BuQIB31z.js} +1 -1
  44. package/dist/chunks/{raw-temporal-contract-D8YuxTAg.cjs → raw-temporal-contract-vnNwLy9R.cjs} +1 -1
  45. package/dist/chunks/{report-preferences-dialog-BjygtSP3.js → report-preferences-dialog-Bytgubvz.js} +25 -25
  46. package/dist/chunks/report-preferences-dialog-I0Pbn_Yb.cjs +1 -0
  47. package/dist/chunks/{report-runtime-context-DNbgCsko.js → report-runtime-context-B_pAmqxl.js} +1 -1
  48. package/dist/chunks/{report-runtime-context-RFiWq4wK.cjs → report-runtime-context-BfW4qiMJ.cjs} +1 -1
  49. package/dist/chunks/{source-entity-resolution-BDC-Qngk.cjs → source-entity-resolution-DCAAS-y8.cjs} +1 -1
  50. package/dist/chunks/{source-entity-resolution-ugN3sZUk.js → source-entity-resolution-WUstJID6.js} +1 -1
  51. package/dist/chunks/{switch-C8NihGV4.js → switch-BsGTOjuD.js} +12342 -11110
  52. package/dist/chunks/switch-Cpj3DrCZ.cjs +138 -0
  53. package/dist/chunks/{temporal-bucket-authoring-DJ9kK2wD.js → temporal-bucket-authoring-CyTCHy1K.js} +3 -3
  54. package/dist/chunks/temporal-bucket-authoring-DueSgLJU.cjs +1 -0
  55. package/dist/chunks/{temporal-bucket-contract-CZl5D7FZ.js → temporal-bucket-contract-BeOx0uYe.js} +1 -1
  56. package/dist/chunks/{temporal-bucket-contract-BD862TAa.cjs → temporal-bucket-contract-Cp-usD9Z.cjs} +1 -1
  57. package/dist/chunks/{token-types-CoHsSJ4E.cjs → token-types-D9eN35rf.cjs} +1 -1
  58. package/dist/chunks/{token-types-DfDtCqlw.js → token-types-Dvomvqw0.js} +1 -1
  59. package/dist/chunks/{update-policy-BGNXFgBU.cjs → update-policy-Buw2LmvX.cjs} +1 -1
  60. package/dist/chunks/{update-policy-BybMiM61.js → update-policy-MWg0aH3d.js} +1 -1
  61. package/dist/chunks/{validators-D-T-2HOR.js → validators-D3AarM2T.js} +662 -663
  62. package/dist/chunks/validators-DqIM0B3C.cjs +1 -0
  63. package/dist/dashboard/index.cjs +1 -1
  64. package/dist/dashboard/index.js +2 -2
  65. package/dist/dashboard-authoring/index.cjs +3 -3
  66. package/dist/dashboard-authoring/index.js +81 -79
  67. package/dist/data-app-builder/index.cjs +1 -1
  68. package/dist/data-app-builder/index.js +2 -2
  69. package/dist/data-app-codegen/index.cjs +1 -1
  70. package/dist/data-app-codegen/index.js +2 -2
  71. package/dist/data-app-codegen-node/index.cjs +1 -1
  72. package/dist/data-app-codegen-node/index.js +3 -3
  73. package/dist/data-app-sdk/index.cjs +1 -1
  74. package/dist/data-app-sdk/index.js +3 -3
  75. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  76. package/dist/data-app-sdk-adapters/index.js +2 -2
  77. package/dist/data-app-sdk-validation/index.cjs +1 -1
  78. package/dist/data-app-sdk-validation/index.js +3 -3
  79. package/dist/format-utils/index.cjs +3 -3
  80. package/dist/format-utils/index.js +9 -9
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.js +177 -176
  83. package/dist/report-runtime-context/index.cjs +1 -1
  84. package/dist/report-runtime-context/index.js +2 -2
  85. package/dist/surfboard/index.cjs +1 -1
  86. package/dist/surfboard/index.js +3 -3
  87. package/dist/types/briefings.d.ts +11 -0
  88. package/dist/types/dashboard-authoring.d.ts +17 -0
  89. package/dist/types/dashboard.d.ts +11 -0
  90. package/dist/types/index.cjs +1 -1
  91. package/dist/types/index.js +4 -4
  92. package/dist/types/main.d.ts +12 -0
  93. package/dist/types/shared.d.ts +11 -0
  94. package/dist/types/surfboard.d.ts +11 -0
  95. package/dist/types/types.d.ts +11 -0
  96. package/package.json +1 -1
  97. package/dist/chunks/dashboard-filter-value-compatibility-BCVF9IHg.js +0 -1026
  98. package/dist/chunks/dashboard-filter-value-compatibility-DLkdeypb.cjs +0 -1
  99. package/dist/chunks/dashboard-json-BYQjTmqD.cjs +0 -1
  100. package/dist/chunks/format-types-PSZZ7hG8.cjs +0 -1
  101. package/dist/chunks/matrix-result-contract-Bhg60NtS.cjs +0 -1
  102. package/dist/chunks/pivot-header-presentation-CePk1R6g.cjs +0 -4
  103. package/dist/chunks/pivot-result-lifecycle-CcGt_29N.cjs +0 -1
  104. package/dist/chunks/report-preferences-dialog-DW40ECz1.cjs +0 -1
  105. package/dist/chunks/saved-temporal-bucket-format-DNMtD77o.cjs +0 -1
  106. package/dist/chunks/switch-B1mZx2k9.cjs +0 -138
  107. package/dist/chunks/temporal-bucket-9Wz9Ds6H.cjs +0 -1
  108. package/dist/chunks/temporal-bucket-authoring-DSpzgXHc.cjs +0 -1
  109. package/dist/chunks/validators-DcshgK7w.cjs +0 -1
@@ -1,4 +1,125 @@
1
1
  import { z as a } from "zod";
2
+ function he(e) {
3
+ return typeof e == "string" ? e.trim().toLowerCase() : "";
4
+ }
5
+ function Ri(e) {
6
+ return String(
7
+ e.column_name || e.name || e.qualifiedFieldName || ""
8
+ );
9
+ }
10
+ function Mi(e) {
11
+ return Array.from(
12
+ new Set(
13
+ [e.column_name, e.name, e.qualifiedFieldName, e.alias].filter(
14
+ (i) => typeof i == "string" && i.trim().length > 0
15
+ ).map((i) => i.trim())
16
+ )
17
+ );
18
+ }
19
+ function ye(e) {
20
+ const i = Ci(e);
21
+ return i ? Ei(i) ? "number" : i.includes("timestamp") || i.includes("datetime") || i.startsWith("time") ? "datetime" : i.includes("date") ? "date" : i.includes("bool") ? "boolean" : "string" : "unknown";
22
+ }
23
+ const Ti = /* @__PURE__ */ new Set([
24
+ "int",
25
+ "uint",
26
+ "integer",
27
+ "bigint",
28
+ "smallint",
29
+ "tinyint",
30
+ "numeric",
31
+ "decimal",
32
+ "double",
33
+ "float",
34
+ "number",
35
+ "real",
36
+ "money",
37
+ "currency",
38
+ "percent"
39
+ ]), ji = [
40
+ "int",
41
+ "uint",
42
+ "decimal",
43
+ "float"
44
+ ];
45
+ function Ei(e) {
46
+ const i = e.split(/[\s(]/, 1)[0] || "";
47
+ return Ti.has(i) ? !0 : ji.some((t) => {
48
+ if (!i.startsWith(t)) return !1;
49
+ const n = i.slice(t.length);
50
+ return n.length > 0 && Array.from(n).every((s) => s >= "0" && s <= "9");
51
+ });
52
+ }
53
+ function Ci(e) {
54
+ let i = he(e), t = "";
55
+ for (; i && i !== t; )
56
+ t = i, i = Re(i, "nullable"), i = Re(i, "lowcardinality");
57
+ return i;
58
+ }
59
+ function Re(e, i) {
60
+ const t = `${i}(`;
61
+ return !e.startsWith(t) || !e.endsWith(")") ? e : e.slice(t.length, -1).trim();
62
+ }
63
+ function Fi(e) {
64
+ const i = ye(e);
65
+ return i === "date" || i === "datetime";
66
+ }
67
+ function Ue(e) {
68
+ return Fi(e.dataType || e.data_type);
69
+ }
70
+ function Ge(e) {
71
+ const i = ze(e);
72
+ return i === "id" || i === "row_id";
73
+ }
74
+ function Me(e) {
75
+ const i = ze(e);
76
+ return Ge(e) || i.endsWith("_id") || i.endsWith("_key") || i.endsWith("_number");
77
+ }
78
+ function ze(e) {
79
+ return he(
80
+ Ri(e) || e.name || e.alias
81
+ ).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
82
+ }
83
+ function Ye(e, i = {}) {
84
+ const t = he(e.role);
85
+ return t === "metric" || t === "measure" ? !i.excludeIdentifiers || !Me(e) : t === "groupby" || t === "dimension" || t === "date" || t === "id" ? !1 : ye(
86
+ e.dataType || e.data_type
87
+ ) === "number" && (!i.excludeIdentifiers || !Me(e));
88
+ }
89
+ function Tn(e) {
90
+ return !Ye(e) && !Ue(e);
91
+ }
92
+ function jn(e) {
93
+ const i = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
94
+ for (const s of e) {
95
+ if (Ge(s))
96
+ continue;
97
+ const r = Mi(s);
98
+ if (r.length !== 0) {
99
+ if (Ue(s)) {
100
+ r.forEach((l) => t.add(l));
101
+ continue;
102
+ }
103
+ if (Ye(s, { excludeIdentifiers: !0 })) {
104
+ r.forEach((l) => i.add(l));
105
+ continue;
106
+ }
107
+ r.forEach((l) => n.add(l));
108
+ }
109
+ }
110
+ return {
111
+ validMeasureCandidates: Array.from(i).sort(),
112
+ validDateCandidates: Array.from(t).sort(),
113
+ validDimensionCandidates: Array.from(n).sort()
114
+ };
115
+ }
116
+ function Di(e) {
117
+ try {
118
+ return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
119
+ } catch {
120
+ return !1;
121
+ }
122
+ }
2
123
  const B = [
3
124
  "second",
4
125
  "minute",
@@ -9,39 +130,161 @@ const B = [
9
130
  "quarter",
10
131
  "year"
11
132
  ];
12
- function Ri(e) {
133
+ function Ni(e) {
13
134
  return typeof e == "string" && B.includes(e);
14
135
  }
15
- const [, , ...he] = B;
16
- function Mi(e) {
17
- return Ri(e) && he.includes(e);
136
+ const [, , ...be] = B;
137
+ function qi(e) {
138
+ return Ni(e) && be.includes(e);
18
139
  }
19
- const Ti = [
140
+ const Oi = [
20
141
  "week_of_short",
21
142
  "week_of_long",
22
143
  "quarter_short",
23
144
  "quarter_long",
24
145
  "fiscal_quarter_short",
25
146
  "fiscal_year"
26
- ], Tn = {
147
+ ], En = {
27
148
  invalidMetadata: "invalid_raw_temporal_metadata"
28
149
  };
29
- function ji(e) {
150
+ function Pi(e) {
30
151
  return e === "second" || e === "minute" || e === "hour" ? "datetime" : "date";
31
152
  }
32
- const jn = {
153
+ const Cn = {
33
154
  missingMetadata: "missing_temporal_bucket_metadata",
34
155
  invalidMetadata: "invalid_temporal_bucket_metadata",
35
156
  invalidValue: "invalid_temporal_bucket_value"
36
- }, En = "__auto_count__";
37
- function Ei(e) {
38
- try {
39
- return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
40
- } catch {
41
- return !1;
157
+ }, Fn = "__auto_count__", Bi = [
158
+ "YYYY",
159
+ "MMMM",
160
+ "MMM",
161
+ "YY",
162
+ "MM",
163
+ "DD",
164
+ "HH",
165
+ "mm",
166
+ "ss"
167
+ ], Ki = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), Qe = {
168
+ week_of_short: "week",
169
+ week_of_long: "week",
170
+ quarter_short: "quarter",
171
+ quarter_long: "quarter",
172
+ fiscal_quarter_short: "quarter",
173
+ fiscal_year: "year"
174
+ };
175
+ function Dn(e) {
176
+ return typeof e == "string" && Object.prototype.hasOwnProperty.call(Qe, e);
177
+ }
178
+ function Vi(e, i) {
179
+ return Bi.find(
180
+ (t) => e.startsWith(t, i)
181
+ );
182
+ }
183
+ function Li(e) {
184
+ var s;
185
+ if (!e || e.trim() !== e)
186
+ return {
187
+ ok: !1,
188
+ code: "invalid_temporal_bucket_pattern",
189
+ message: "Temporal bucket patterns must be non-empty and trimmed."
190
+ };
191
+ const i = [];
192
+ let t = 0, n = !1;
193
+ for (; t < e.length; ) {
194
+ const r = Vi(e, t);
195
+ if (r) {
196
+ if (n)
197
+ return {
198
+ ok: !1,
199
+ code: "invalid_temporal_bucket_pattern",
200
+ message: "Adjacent temporal bucket tokens require a separator."
201
+ };
202
+ i.push({ kind: "token", value: r }), t += r.length, n = !0;
203
+ continue;
204
+ }
205
+ const l = e[t];
206
+ if (!Ki.has(l))
207
+ return {
208
+ ok: !1,
209
+ code: "invalid_temporal_bucket_pattern",
210
+ message: `Unsupported temporal bucket pattern character "${l}".`
211
+ };
212
+ if (i.length === 0)
213
+ return {
214
+ ok: !1,
215
+ code: "invalid_temporal_bucket_pattern",
216
+ message: "Temporal bucket patterns cannot begin with a separator."
217
+ };
218
+ const d = i[i.length - 1];
219
+ d.kind === "literal" ? d.value += l : i.push({ kind: "literal", value: l }), t += 1, n = !1;
220
+ }
221
+ return ((s = i[i.length - 1]) == null ? void 0 : s.kind) !== "token" ? {
222
+ ok: !1,
223
+ code: "invalid_temporal_bucket_pattern",
224
+ message: "Temporal bucket patterns cannot end with a separator."
225
+ } : { ok: !0, segments: i };
226
+ }
227
+ function Hi(e) {
228
+ return e.flatMap(
229
+ (i) => i.kind === "token" ? [i.value] : []
230
+ );
231
+ }
232
+ function Te(e, i) {
233
+ return e.filter((t) => i.includes(t)).length === 1;
234
+ }
235
+ function H(e, i) {
236
+ return e.some((t) => i.includes(t));
237
+ }
238
+ function Ui(e) {
239
+ return new Set(e).size !== e.length;
240
+ }
241
+ function Gi(e, i) {
242
+ if (Ui(e)) return !1;
243
+ const t = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], s = ["HH", "mm", "ss"], r = Te(e, t), l = Te(e, n), d = e.includes("DD"), u = H(e, s);
244
+ switch (i) {
245
+ case "second":
246
+ return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!H(e, [...t, ...n, "DD"]) || r && l && d);
247
+ case "minute":
248
+ return e.includes("HH") && e.includes("mm") && (!H(e, [...t, ...n, "DD"]) || r && l && d);
249
+ case "hour":
250
+ return e.includes("HH") && (!H(e, [...t, ...n, "DD"]) || r && l && d);
251
+ case "day":
252
+ case "week":
253
+ return r && l && d && !u;
254
+ case "month":
255
+ return r && l && !d && !u;
256
+ case "quarter":
257
+ return !1;
258
+ case "year":
259
+ return r && !l && !d && !u;
42
260
  }
43
261
  }
44
- const Ci = {
262
+ function se(e, i) {
263
+ if (e.presentation.mode === "auto")
264
+ return { ok: !0 };
265
+ if (e.presentation.mode === "preset") {
266
+ const n = Qe[e.presentation.preset];
267
+ return n === i ? { ok: !0 } : {
268
+ ok: !1,
269
+ code: "incompatible_temporal_bucket_preset",
270
+ message: `Preset ${e.presentation.preset} requires ${n} granularity.`
271
+ };
272
+ }
273
+ const t = Li(e.presentation.pattern);
274
+ return t.ok ? Gi(
275
+ Hi(t.segments),
276
+ i
277
+ ) ? { ok: !0, segments: t.segments } : {
278
+ ok: !1,
279
+ code: "incompatible_temporal_bucket_pattern",
280
+ message: `Pattern ${e.presentation.pattern} is not compatible with ${i} granularity.`
281
+ } : t;
282
+ }
283
+ function Nn(e, i) {
284
+ if (!(!e || !i))
285
+ return se(e, i).ok ? e : void 0;
286
+ }
287
+ const zi = {
45
288
  answerSummary: "string",
46
289
  responseDetail: "responseDetail",
47
290
  mode: "string",
@@ -81,14 +324,14 @@ const Ci = {
81
324
  periodRows: "recordArray",
82
325
  sql: "unknown",
83
326
  omitted: "stringArray"
84
- }, Fi = "SUM";
327
+ }, Yi = "SUM";
85
328
  function $(e) {
86
329
  return typeof e == "string" && e.trim().length > 0;
87
330
  }
88
331
  function F(e) {
89
332
  return $(e) ? e.trim().toLowerCase() : "";
90
333
  }
91
- function Cn(e) {
334
+ function qn(e) {
92
335
  const i = $(e.id) ? e.id.trim() : void 0;
93
336
  if (!i) return;
94
337
  const t = F(i), n = $(e.table) ? e.table.trim() : void 0;
@@ -100,7 +343,7 @@ function A(e) {
100
343
  if (i)
101
344
  return F(i) === F(e.datasetName) ? void 0 : i;
102
345
  }
103
- function Ue(e) {
346
+ function Ze(e) {
104
347
  if (e.kind !== "semantic") return e;
105
348
  const i = A(e), { datasetId: t, ...n } = e;
106
349
  return {
@@ -108,10 +351,10 @@ function Ue(e) {
108
351
  ...i ? { datasetId: i } : {}
109
352
  };
110
353
  }
111
- function Fn(e) {
354
+ function On(e) {
112
355
  return e ? e.kind === "semantic" ? !!($(e.domainId) && ($(e.datasetId) || $(e.datasetName))) : e.kind === "physical" ? $(e.connectionId) && $(e.tableName) : $(e.connectionId) : !1;
113
356
  }
114
- function se(e) {
357
+ function oe(e) {
115
358
  if (!e)
116
359
  return "";
117
360
  if (e.kind === "semantic") {
@@ -135,7 +378,7 @@ function se(e) {
135
378
  e.label || ""
136
379
  ].join(":");
137
380
  }
138
- function ye(e, i) {
381
+ function _e(e, i) {
139
382
  if (!e || !i)
140
383
  return e === i;
141
384
  if (e.kind !== i.kind)
@@ -146,10 +389,10 @@ function ye(e, i) {
146
389
  const t = A(e), n = A(i);
147
390
  return t && n ? t === n : e.datasetName === i.datasetName;
148
391
  }
149
- return se(e) === se(i);
392
+ return oe(e) === oe(i);
150
393
  }
151
- function Ge(e, i) {
152
- return e.kind !== "semantic" || i.kind !== "semantic" ? e : Ue({
394
+ function Xe(e, i) {
395
+ return e.kind !== "semantic" || i.kind !== "semantic" ? e : Ze({
153
396
  ...e,
154
397
  datasetName: e.datasetName || i.datasetName,
155
398
  datasetId: A(e) || A(i),
@@ -157,65 +400,65 @@ function Ge(e, i) {
157
400
  connectionId: e.connectionId || i.connectionId
158
401
  });
159
402
  }
160
- function Dn(e) {
403
+ function Pn(e) {
161
404
  const i = [];
162
405
  for (const t of e) {
163
- const n = Ue(
406
+ const n = Ze(
164
407
  t
165
408
  ), s = i.findIndex(
166
- (r) => ye(r, n)
409
+ (r) => _e(r, n)
167
410
  );
168
411
  if (s === -1) {
169
412
  i.push(n);
170
413
  continue;
171
414
  }
172
- i[s] = Ge(
415
+ i[s] = Xe(
173
416
  i[s],
174
417
  n
175
418
  );
176
419
  }
177
420
  return i;
178
421
  }
179
- function Di(e, i) {
180
- return e.name === i.name && ye(e.source, i.source);
422
+ function Qi(e, i) {
423
+ return e.name === i.name && _e(e.source, i.source);
181
424
  }
182
- function Ni(e) {
425
+ function Zi(e) {
183
426
  return [
184
- e.source ? se(e.source) : "unknown",
185
- be(e),
427
+ e.source ? oe(e.source) : "unknown",
428
+ ve(e),
186
429
  e.name
187
430
  ].filter(Boolean).join(":");
188
431
  }
189
- function be(e) {
190
- return qi(
191
- e.aggregate || Fi
432
+ function ve(e) {
433
+ return Xi(
434
+ e.aggregate || Yi
192
435
  );
193
436
  }
194
- function qi(e) {
437
+ function Xi(e) {
195
438
  return e.trim().toUpperCase();
196
439
  }
197
- function Nn(e, i) {
440
+ function Bn(e, i) {
198
441
  return {
199
442
  ...e,
200
443
  label: e.label || i.label,
201
444
  role: e.role || i.role,
202
445
  dataType: e.dataType || i.dataType,
203
- source: e.source && i.source ? Ge(e.source, i.source) : e.source || i.source
446
+ source: e.source && i.source ? Xe(e.source, i.source) : e.source || i.source
204
447
  };
205
448
  }
206
- const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codegen-summary-validator/v2", Oi = /* @__PURE__ */ new Set([
449
+ const re = "semaphor-data-app-codegen-summary/v1", Kn = "semaphor-data-app-codegen-summary-validator/v2", Wi = /* @__PURE__ */ new Set([
207
450
  "metric",
208
451
  "records",
209
452
  "matrix",
210
453
  "analysis",
211
454
  "sql_fallback"
212
- ]), Pi = /* @__PURE__ */ new Set([
455
+ ]), Ji = /* @__PURE__ */ new Set([
213
456
  "semaphor.metric",
214
457
  "semaphor.records",
215
458
  "semaphor.matrix",
216
459
  "semaphor.analysis",
217
460
  "semaphor.sql"
218
- ]), Bi = /* @__PURE__ */ new Set([
461
+ ]), et = /* @__PURE__ */ new Set([
219
462
  "SUM",
220
463
  "COUNT",
221
464
  "AVG",
@@ -223,13 +466,13 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
223
466
  "MAX",
224
467
  "MEDIAN",
225
468
  "DISTINCT"
226
- ]), Ki = /* @__PURE__ */ new Set([
469
+ ]), it = /* @__PURE__ */ new Set([
227
470
  "absolute_delta",
228
471
  "largest_negative",
229
472
  "largest_positive",
230
473
  "positive_and_negative",
231
474
  "all"
232
- ]), ze = /* @__PURE__ */ new Set([
475
+ ]), We = /* @__PURE__ */ new Set([
233
476
  "source",
234
477
  "id",
235
478
  "label",
@@ -244,8 +487,8 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
244
487
  "relationshipHint",
245
488
  "limit",
246
489
  "derivedFields"
247
- ]), Vi = /* @__PURE__ */ new Set([
248
- ...ze,
490
+ ]), tt = /* @__PURE__ */ new Set([
491
+ ...We,
249
492
  "analysis",
250
493
  "timeWindow",
251
494
  "filters",
@@ -254,7 +497,7 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
254
497
  "calendarContext",
255
498
  "chartTitle",
256
499
  "chartType"
257
- ]), Li = /* @__PURE__ */ new Set([
500
+ ]), at = /* @__PURE__ */ new Set([
258
501
  "source",
259
502
  "id",
260
503
  "label",
@@ -269,7 +512,7 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
269
512
  "pagination",
270
513
  "totals",
271
514
  "derivedFields"
272
- ]), Hi = /* @__PURE__ */ new Set([
515
+ ]), nt = /* @__PURE__ */ new Set([
273
516
  "source",
274
517
  "id",
275
518
  "label",
@@ -283,7 +526,7 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
283
526
  "expansion",
284
527
  "layout",
285
528
  "displayLimits"
286
- ]), Ui = /* @__PURE__ */ new Set([
529
+ ]), st = /* @__PURE__ */ new Set([
287
530
  "source",
288
531
  "id",
289
532
  "label",
@@ -294,7 +537,7 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
294
537
  "limit",
295
538
  "pagination",
296
539
  "rationale"
297
- ]), Gi = /* @__PURE__ */ new Set([
540
+ ]), ot = /* @__PURE__ */ new Set([
298
541
  "kpi",
299
542
  "line_chart",
300
543
  "bar_chart",
@@ -307,7 +550,7 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
307
550
  "narrative",
308
551
  "text_block",
309
552
  "custom"
310
- ]), zi = /* @__PURE__ */ new Set([
553
+ ]), rt = /* @__PURE__ */ new Set([
311
554
  "missing_measure",
312
555
  "missing_dimension",
313
556
  "missing_date",
@@ -324,47 +567,47 @@ const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codeg
324
567
  "requires_sql_escape_hatch",
325
568
  "unsupported_sdk_capability"
326
569
  ]);
327
- function On(e) {
328
- return Ye(e).ok;
570
+ function Vn(e) {
571
+ return Je(e).ok;
329
572
  }
330
- function Ye(e) {
573
+ function Je(e) {
331
574
  const i = [];
332
575
  if (!e || typeof e != "object")
333
576
  return { ok: !1, issues: ["Summary must be an object."] };
334
577
  const t = e;
335
- return t.schemaVersion !== oe && i.push(
336
- `schemaVersion must be ${oe}.`
578
+ return t.schemaVersion !== re && i.push(
579
+ `schemaVersion must be ${re}.`
337
580
  ), (typeof t.title != "string" || !t.title.trim()) && i.push("title is required."), Array.isArray(t.sources) || i.push("sources must be an array."), Array.isArray(t.inputs) || i.push("inputs must be an array."), Array.isArray(t.views) || i.push("views must be an array."), Array.isArray(t.filterContracts) || i.push("filterContracts must be an array."), (!t.implementationChecklist || typeof t.implementationChecklist != "object") && i.push("implementationChecklist must be an object."), t.implementationChecklist && typeof t.implementationChecklist == "object" && i.push(
338
- ...Qi(t.implementationChecklist)
581
+ ...dt(t.implementationChecklist)
339
582
  ), Array.isArray(t.sources) && t.sources.forEach((n, s) => {
340
583
  i.push(...K(n, `sources.${s}`));
341
584
  }), Array.isArray(t.inputs) && t.inputs.forEach((n, s) => {
342
- i.push(...Zi(n, `inputs.${s}`));
585
+ i.push(...ut(n, `inputs.${s}`));
343
586
  }), Array.isArray(t.views) && t.views.forEach((n, s) => {
344
- i.push(...Xi(n, `views.${s}`));
587
+ i.push(...ct(n, `views.${s}`));
345
588
  }), Array.isArray(t.filterContracts) && t.filterContracts.forEach((n, s) => {
346
589
  i.push(
347
- ...rt(n, `filterContracts.${s}`)
590
+ ...$t(n, `filterContracts.${s}`)
348
591
  );
349
592
  }), t.unsupportedInsights !== void 0 && (Array.isArray(t.unsupportedInsights) ? t.unsupportedInsights.forEach((n, s) => {
350
593
  i.push(
351
- ...At(
594
+ ...Kt(
352
595
  n,
353
596
  `unsupportedInsights.${s}`
354
597
  )
355
598
  );
356
- }) : i.push("unsupportedInsights must be an array.")), i.push(...Yi(t)), { ok: i.length === 0, issues: i };
599
+ }) : i.push("unsupportedInsights must be an array.")), i.push(...lt(t)), { ok: i.length === 0, issues: i };
357
600
  }
358
- function Yi(e) {
601
+ function lt(e) {
359
602
  const i = Array.isArray(e.unsupportedInsights) && e.unsupportedInsights.some(
360
603
  (l) => {
361
604
  var d;
362
- return Re.has((d = c(l)) == null ? void 0 : d.reason);
605
+ return je.has((d = c(l)) == null ? void 0 : d.reason);
363
606
  }
364
607
  ), t = Array.isArray(e.views) && e.views.some((l) => {
365
608
  var u;
366
609
  const d = c((u = c(l)) == null ? void 0 : u.computation);
367
- return (d == null ? void 0 : d.kind) === "unsupported" && Re.has(d.reason);
610
+ return (d == null ? void 0 : d.kind) === "unsupported" && je.has(d.reason);
368
611
  });
369
612
  if (!i && !t)
370
613
  return [];
@@ -377,7 +620,7 @@ function Yi(e) {
377
620
  "nextRequiredTool.name must be semaphor_propose_semantic_model_change when semantic model repair gaps are present."
378
621
  ), n;
379
622
  }
380
- const Re = /* @__PURE__ */ new Set([
623
+ const je = /* @__PURE__ */ new Set([
381
624
  "missing_relationship",
382
625
  "raw_identifier_filter_options"
383
626
  ]);
@@ -385,7 +628,7 @@ function K(e, i) {
385
628
  const t = c(e);
386
629
  return t ? t.kind === "semantic" ? typeof t.domainId == "string" && t.domainId.trim() && typeof t.datasetName == "string" && t.datasetName.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : typeof t.sourceKey == "string" && t.sourceKey.trim() ? [] : t.kind === "physical" && typeof t.tableName == "string" && t.tableName.trim() && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : t.kind === "sql" && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : [`${i} must be an object.`];
387
630
  }
388
- function Qi(e) {
631
+ function dt(e) {
389
632
  const i = c(e);
390
633
  if (!i)
391
634
  return ["implementationChecklist must be an object."];
@@ -410,12 +653,12 @@ function Qi(e) {
410
653
  "implementationChecklist.browserSmokeChecks must be an array of strings."
411
654
  ), t;
412
655
  }
413
- function Zi(e, i) {
656
+ function ut(e, i) {
414
657
  const t = c(e);
415
658
  if (!t)
416
659
  return [`${i} must be an object.`];
417
660
  const n = [];
418
- return (typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.fieldRef && n.push(...h(t.fieldRef, `${i}.fieldRef`)), n.push(...Ze(t.optionQuery, `${i}.optionQuery`)), S(t.appliesToViewIds) || n.push(`${i}.appliesToViewIds must be an array of strings.`), t.bindings !== void 0 && !Array.isArray(t.bindings) && n.push(`${i}.bindings must be an array.`), Array.isArray(t.bindings) && t.bindings.forEach((s, r) => {
661
+ return (typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.fieldRef && n.push(...h(t.fieldRef, `${i}.fieldRef`)), n.push(...ii(t.optionQuery, `${i}.optionQuery`)), S(t.appliesToViewIds) || n.push(`${i}.appliesToViewIds must be an array of strings.`), t.bindings !== void 0 && !Array.isArray(t.bindings) && n.push(`${i}.bindings must be an array.`), Array.isArray(t.bindings) && t.bindings.forEach((s, r) => {
419
662
  const l = c(s);
420
663
  if (!l) {
421
664
  n.push(`${i}.bindings.${r} must be an object.`);
@@ -431,14 +674,14 @@ function Zi(e, i) {
431
674
  );
432
675
  }), n;
433
676
  }
434
- function Xi(e, i) {
677
+ function ct(e, i) {
435
678
  const t = c(e);
436
679
  if (!t)
437
680
  return [`${i} must be an object.`];
438
681
  const n = [];
439
- if ((typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.visualSpec !== void 0 && n.push(...vt(t.visualSpec, `${i}.visualSpec`)), t.computation !== void 0 && n.push(
440
- ...xt(t.computation, `${i}.computation`)
441
- ), _t(t))
682
+ if ((typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.visualSpec !== void 0 && n.push(...Ft(t.visualSpec, `${i}.visualSpec`)), t.computation !== void 0 && n.push(
683
+ ...Bt(t.computation, `${i}.computation`)
684
+ ), Ct(t))
442
685
  return n.push(...J(t, `${i}`)), t.fields !== void 0 && (Array.isArray(t.fields) ? t.fields.forEach((u, p) => {
443
686
  n.push(
444
687
  ...h(u, `${i}.fields.${p}`)
@@ -450,18 +693,18 @@ function Xi(e, i) {
450
693
  return n.push(`${i}.fields must be an array.`), (t.sdkSpec !== void 0 || t.sdkBuilder !== void 0) && n.push(`${i}.fields must be an array for executable views.`), n.push(...J(t, `${i}`)), n;
451
694
  t.fields.forEach((u, p) => {
452
695
  n.push(...h(u, `${i}.fields.${p}`));
453
- }), D(t.queryKind) || n.push(`${i}.queryKind must be a supported codegen query kind.`), t.sdkBuilder !== void 0 && !Je(t.sdkBuilder) && n.push(`${i}.sdkBuilder must be a supported SDK builder.`), t.metricBindingKeys !== void 0 && (Array.isArray(t.metricBindingKeys) ? t.metricBindingKeys.some(
696
+ }), D(t.queryKind) || n.push(`${i}.queryKind must be a supported codegen query kind.`), t.sdkBuilder !== void 0 && !ni(t.sdkBuilder) && n.push(`${i}.sdkBuilder must be a supported SDK builder.`), t.metricBindingKeys !== void 0 && (Array.isArray(t.metricBindingKeys) ? t.metricBindingKeys.some(
454
697
  (u) => typeof u != "string" || u.trim().length === 0
455
698
  ) && n.push(`${i}.metricBindingKeys must be an array of strings.`) : n.push(`${i}.metricBindingKeys must be an array of strings.`));
456
699
  const s = c(t.sdkSpec), r = (s == null ? void 0 : s.builder) === "semaphor.metric";
457
700
  r && (!Array.isArray(t.metricBindingKeys) || t.metricBindingKeys.length === 0) && n.push(`${i}.metricBindingKeys is required for metric views.`);
458
- const l = Wi(t);
701
+ const l = pt(t);
459
702
  r && Array.isArray(t.metricBindingKeys) && l && JSON.stringify(t.metricBindingKeys) !== JSON.stringify(l) && n.push(
460
703
  `${i}.metricBindingKeys must match the generated metric field binding keys in order.`
461
704
  );
462
705
  const d = c(t.computation);
463
706
  return (d == null ? void 0 : d.kind) === "server_query" && D(t.queryKind) && D(d.queryKind) && d.queryKind !== t.queryKind && n.push(`${i}.computation.queryKind must match queryKind.`), n.push(
464
- ...lt({
707
+ ...St({
465
708
  value: t.sdkSpec,
466
709
  path: `${i}.sdkSpec`,
467
710
  queryKind: typeof t.queryKind == "string" ? t.queryKind : void 0,
@@ -470,7 +713,7 @@ function Xi(e, i) {
470
713
  ...J(t, `${i}`)
471
714
  ), n;
472
715
  }
473
- function Wi(e) {
716
+ function pt(e) {
474
717
  const i = c(e.sdkSpec);
475
718
  if ((i == null ? void 0 : i.builder) !== "semaphor.metric")
476
719
  return;
@@ -480,28 +723,28 @@ function Wi(e) {
480
723
  const s = [
481
724
  t.primaryMeasure,
482
725
  ...Array.isArray(t.measures) ? t.measures : []
483
- ].map(Ji).filter(
726
+ ].map(mt).filter(
484
727
  (r) => !!r
485
728
  );
486
729
  return Array.from(
487
730
  new Map(s.map((r) => [r.identity, r.bindingKey])).values()
488
731
  );
489
732
  }
490
- function Ji(e) {
733
+ function mt(e) {
491
734
  const i = c(e);
492
735
  if (!i || typeof i.name != "string" || !i.name.trim())
493
736
  return;
494
- const t = et(i);
737
+ const t = ft(i);
495
738
  return t ? {
496
739
  identity: JSON.stringify({
497
740
  source: t,
498
741
  name: i.name,
499
- aggregate: Qe(i)
742
+ aggregate: ei(i)
500
743
  }),
501
- bindingKey: it(i)
744
+ bindingKey: gt(i)
502
745
  } : void 0;
503
746
  }
504
- function et(e) {
747
+ function ft(e) {
505
748
  if (typeof e.sourceKey == "string" && e.sourceKey.trim())
506
749
  return { sourceKey: e.sourceKey };
507
750
  const i = c(e.source);
@@ -514,11 +757,11 @@ function et(e) {
514
757
  name: i.name
515
758
  };
516
759
  }
517
- function it(e) {
518
- return typeof e.sourceKey == "string" && e.sourceKey.trim() ? [e.sourceKey, Qe(e), e.name].filter(Boolean).join(":") : Ni(e);
760
+ function gt(e) {
761
+ return typeof e.sourceKey == "string" && e.sourceKey.trim() ? [e.sourceKey, ei(e), e.name].filter(Boolean).join(":") : Zi(e);
519
762
  }
520
- function Qe(e) {
521
- return be(e);
763
+ function ei(e) {
764
+ return ve(e);
522
765
  }
523
766
  function J(e, i) {
524
767
  var p;
@@ -533,7 +776,7 @@ function J(e, i) {
533
776
  ), !l || l.mode !== "server" ? d.push(
534
777
  `${i}.sdkSpec.spec.totals.mode must be server when tableBehavior.totals.mode is server.`
535
778
  ) : d.push(
536
- ...tt({
779
+ ...ht({
537
780
  left: u.measures,
538
781
  right: l.measures,
539
782
  leftPath: `${i}.visualSpec.tableBehavior.totals.measures`,
@@ -549,7 +792,7 @@ function J(e, i) {
549
792
  `${i}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`
550
793
  ), d);
551
794
  }
552
- function tt({
795
+ function ht({
553
796
  left: e,
554
797
  right: i,
555
798
  leftPath: t,
@@ -559,20 +802,20 @@ function tt({
559
802
  return [`${n} must match ${t}.`];
560
803
  const s = [];
561
804
  return e.length !== i.length ? (s.push(`${n} must match ${t}.`), s) : (e.forEach((r, l) => {
562
- at(c(r), c(i[l])) || s.push(`${n}.${l} must match ${t}.${l}.`);
805
+ yt(c(r), c(i[l])) || s.push(`${n}.${l} must match ${t}.${l}.`);
563
806
  }), s);
564
807
  }
565
- function at(e, i) {
566
- return !e || !i ? !1 : e.name === i.name && (e.role || "measure") === (i.role || "measure") && Me(e) === Me(i) && nt(e, i);
808
+ function yt(e, i) {
809
+ return !e || !i ? !1 : e.name === i.name && (e.role || "measure") === (i.role || "measure") && Ee(e) === Ee(i) && bt(e, i);
567
810
  }
568
- function Me(e) {
811
+ function Ee(e) {
569
812
  return typeof e.aggregate == "string" ? e.aggregate.toUpperCase() : "SUM";
570
813
  }
571
- function nt(e, i) {
814
+ function bt(e, i) {
572
815
  const t = c(e.source), n = c(i.source);
573
- if (st(t, n))
816
+ if (_t(t, n))
574
817
  return !1;
575
- const s = Te(e), r = Te(i);
818
+ const s = Ce(e), r = Ce(i);
576
819
  if (s.size > 0 || r.size > 0) {
577
820
  for (const l of s)
578
821
  if (r.has(l))
@@ -581,17 +824,17 @@ function nt(e, i) {
581
824
  }
582
825
  return !t || !n || t.kind !== n.kind ? !1 : t.kind === "semantic" ? t.domainId === n.domainId && t.datasetName === n.datasetName && (t.datasetId === void 0 || n.datasetId === void 0 || t.datasetId === n.datasetId) : t.kind === "physical" ? t.connectionId === n.connectionId && t.tableName === n.tableName : t.kind === "sql" ? t.connectionId === n.connectionId : !1;
583
826
  }
584
- function st(e, i) {
827
+ function _t(e, i) {
585
828
  if (!e || !i || e.kind !== "semantic" || i.kind !== "semantic")
586
829
  return !1;
587
830
  const t = typeof e.datasetId == "string" ? e.datasetId.trim() : "", n = typeof i.datasetId == "string" ? i.datasetId.trim() : "";
588
831
  return !!(t && n && t !== n);
589
832
  }
590
- function Te(e) {
833
+ function Ce(e) {
591
834
  const i = typeof e.sourceKey == "string" ? e.sourceKey.trim() : "";
592
- return i ? /* @__PURE__ */ new Set([i]) : ot(c(e.source));
835
+ return i ? /* @__PURE__ */ new Set([i]) : vt(c(e.source));
593
836
  }
594
- function ot(e) {
837
+ function vt(e) {
595
838
  const i = /* @__PURE__ */ new Set();
596
839
  if (!e)
597
840
  return i;
@@ -614,7 +857,7 @@ function ot(e) {
614
857
  }
615
858
  return i;
616
859
  }
617
- function rt(e, i) {
860
+ function $t(e, i) {
618
861
  const t = c(e);
619
862
  if (!t)
620
863
  return [`${i} must be an object.`];
@@ -622,7 +865,7 @@ function rt(e, i) {
622
865
  if (t.fieldRef && n.push(
623
866
  ...h(t.fieldRef, `${i}.fieldRef`)
624
867
  ), (typeof t.inputId != "string" || !t.inputId.trim()) && n.push(`${i}.inputId is required.`), n.push(
625
- ...Ze(t.optionQuery, `${i}.optionQuery`)
868
+ ...ii(t.optionQuery, `${i}.optionQuery`)
626
869
  ), S(t.appliesToViewIds) || n.push(`${i}.appliesToViewIds must be an array of strings.`), S(t.notAppliedToViewIds) || n.push(`${i}.notAppliedToViewIds must be an array of strings.`), !Array.isArray(t.bindings))
627
870
  n.push(`${i}.bindings must be an array.`);
628
871
  else {
@@ -649,7 +892,7 @@ function rt(e, i) {
649
892
  }
650
893
  return n;
651
894
  }
652
- function Ze(e, i) {
895
+ function ii(e, i) {
653
896
  if (e === void 0)
654
897
  return [];
655
898
  const t = c(e);
@@ -675,15 +918,15 @@ function Ze(e, i) {
675
918
  }
676
919
  return c(t.valueFieldRef) || n.push(`${i}.valueFieldRef is required.`), c(t.labelFieldRef) || n.push(`${i}.labelFieldRef is required.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && n.push(`${i}.limit must be a positive integer.`), n;
677
920
  }
678
- function lt(e) {
921
+ function St(e) {
679
922
  var s;
680
923
  const i = c(e.value);
681
924
  if (!i)
682
925
  return [`${e.path} is required for executable views.`];
683
926
  const t = [];
684
- if (!Je(i.builder))
927
+ if (!ni(i.builder))
685
928
  return t.push(`${e.path}.builder must be a supported SDK builder.`), t;
686
- e.sdkBuilder && i.builder !== e.sdkBuilder && t.push(`${e.path}.builder must match sdkBuilder.`), e.queryKind && D(e.queryKind) && i.builder !== bt(e.queryKind) && t.push(`${e.path}.builder must match queryKind.`);
929
+ e.sdkBuilder && i.builder !== e.sdkBuilder && t.push(`${e.path}.builder must match sdkBuilder.`), e.queryKind && D(e.queryKind) && i.builder !== Et(e.queryKind) && t.push(`${e.path}.builder must match queryKind.`);
687
930
  const n = c(i.spec);
688
931
  if (!n)
689
932
  return t.push(`${e.path}.spec must be an object.`), t;
@@ -692,10 +935,10 @@ function lt(e) {
692
935
  t.push(
693
936
  ...C(
694
937
  n,
695
- ze,
938
+ We,
696
939
  `${e.path}.spec`
697
940
  ),
698
- ...H(n, e.path),
941
+ ...U(n, e.path),
699
942
  ...ee(n.measures, `${e.path}.spec.measures`),
700
943
  ...w(
701
944
  n.primaryMeasure,
@@ -710,17 +953,17 @@ function lt(e) {
710
953
  `${e.path}.spec.dimensions`
711
954
  ),
712
955
  ...te(n.orderBy, `${e.path}.spec.orderBy`),
713
- ...U(n.filters, `${e.path}.spec.filters`)
956
+ ...G(n.filters, `${e.path}.spec.filters`)
714
957
  );
715
958
  break;
716
959
  case "semaphor.analysis":
717
960
  t.push(
718
961
  ...C(
719
962
  n,
720
- Vi,
963
+ tt,
721
964
  `${e.path}.spec`
722
965
  ),
723
- ...H(n, e.path),
966
+ ...U(n, e.path),
724
967
  ...ee(n.measures, `${e.path}.spec.measures`),
725
968
  ...w(
726
969
  n.primaryMeasure,
@@ -735,26 +978,26 @@ function lt(e) {
735
978
  `${e.path}.spec.dimensions`
736
979
  ),
737
980
  ...te(n.orderBy, `${e.path}.spec.orderBy`),
738
- ...U(n.filters, `${e.path}.spec.filters`),
739
- ...ut(n, `${e.path}.spec`)
981
+ ...G(n.filters, `${e.path}.spec.filters`),
982
+ ...kt(n, `${e.path}.spec`)
740
983
  );
741
984
  break;
742
985
  case "semaphor.records":
743
986
  t.push(
744
987
  ...C(
745
988
  n,
746
- Li,
989
+ at,
747
990
  `${e.path}.spec`
748
991
  ),
749
- ...H(n, e.path),
992
+ ...U(n, e.path),
750
993
  ...ee(n.fields, `${e.path}.spec.fields`),
751
994
  ...w(
752
995
  n.dateField,
753
996
  `${e.path}.spec.dateField`
754
997
  ),
755
998
  ...te(n.orderBy, `${e.path}.spec.orderBy`),
756
- ...U(n.filters, `${e.path}.spec.filters`),
757
- ...ct(
999
+ ...G(n.filters, `${e.path}.spec.filters`),
1000
+ ...It(
758
1001
  n.totals,
759
1002
  `${e.path}.spec.totals`
760
1003
  )
@@ -764,19 +1007,19 @@ function lt(e) {
764
1007
  t.push(
765
1008
  ...C(
766
1009
  n,
767
- Hi,
1010
+ nt,
768
1011
  `${e.path}.spec`
769
1012
  ),
770
- ...pt(n, e.path),
771
- ...mt(n.rows, `${e.path}.spec.rows`),
772
- ...ft(
1013
+ ...xt(n, e.path),
1014
+ ...At(n.rows, `${e.path}.spec.rows`),
1015
+ ...Rt(
773
1016
  n.columns,
774
1017
  `${e.path}.spec.columns`
775
1018
  ),
776
- ...gt(n.values, `${e.path}.spec.values`),
777
- ...ht(n.sort, `${e.path}.spec.sort`),
778
- ...U(n.filters, `${e.path}.spec.filters`),
779
- ...dt(
1019
+ ...Mt(n.values, `${e.path}.spec.values`),
1020
+ ...Tt(n.sort, `${e.path}.spec.sort`),
1021
+ ...G(n.filters, `${e.path}.spec.filters`),
1022
+ ...wt(
780
1023
  n.displayLimits,
781
1024
  `${e.path}.spec.displayLimits`
782
1025
  )
@@ -786,10 +1029,10 @@ function lt(e) {
786
1029
  t.push(
787
1030
  ...C(
788
1031
  n,
789
- Ui,
1032
+ st,
790
1033
  `${e.path}.spec`
791
1034
  ),
792
- ...H(n, e.path)
1035
+ ...U(n, e.path)
793
1036
  ), ((s = c(n.source)) == null ? void 0 : s.kind) !== "sql" && t.push(`${e.path}.spec.source.kind must be sql.`), (typeof n.sql != "string" || !n.sql.trim()) && t.push(`${e.path}.spec.sql is required.`), t.push(
794
1037
  ...ie(
795
1038
  n.fields,
@@ -800,7 +1043,7 @@ function lt(e) {
800
1043
  }
801
1044
  return t;
802
1045
  }
803
- function dt(e, i) {
1046
+ function wt(e, i) {
804
1047
  if (e === void 0)
805
1048
  return [];
806
1049
  const t = c(e);
@@ -808,11 +1051,11 @@ function dt(e, i) {
808
1051
  return [`${i} must be an object.`];
809
1052
  const n = [];
810
1053
  n.push(
811
- ...je(
1054
+ ...Fe(
812
1055
  t.rows,
813
1056
  `${i}.rows`
814
1057
  ),
815
- ...je(
1058
+ ...Fe(
816
1059
  t.columns,
817
1060
  `${i}.columns`
818
1061
  )
@@ -821,7 +1064,7 @@ function dt(e, i) {
821
1064
  s === "rows" || s === "columns" || n.push(`${i}.${s} is not supported.`);
822
1065
  return n;
823
1066
  }
824
- function je(e, i) {
1067
+ function Fe(e, i) {
825
1068
  if (e === void 0)
826
1069
  return [];
827
1070
  const t = c(e);
@@ -835,9 +1078,9 @@ function je(e, i) {
835
1078
  );
836
1079
  return n;
837
1080
  }
838
- function ut(e, i) {
1081
+ function kt(e, i) {
839
1082
  const t = [];
840
- if (e.driverMode !== void 0 && !Ki.has(e.driverMode) && t.push(`${i}.driverMode must be a supported analysis driver mode.`), e.includePopulation !== void 0 && typeof e.includePopulation != "boolean" && t.push(`${i}.includePopulation must be a boolean.`), e.calendarContext !== void 0) {
1083
+ if (e.driverMode !== void 0 && !it.has(e.driverMode) && t.push(`${i}.driverMode must be a supported analysis driver mode.`), e.includePopulation !== void 0 && typeof e.includePopulation != "boolean" && t.push(`${i}.includePopulation must be a boolean.`), e.calendarContext !== void 0) {
841
1084
  const n = c(e.calendarContext);
842
1085
  if (!n)
843
1086
  t.push(`${i}.calendarContext must be an object.`);
@@ -854,7 +1097,7 @@ function ut(e, i) {
854
1097
  }
855
1098
  return t;
856
1099
  }
857
- function ct(e, i) {
1100
+ function It(e, i) {
858
1101
  if (e === void 0)
859
1102
  return [];
860
1103
  const t = c(e);
@@ -864,7 +1107,7 @@ function ct(e, i) {
864
1107
  return t.mode !== "server" && n.push(`${i}.mode must be server.`), !Array.isArray(t.measures) || t.measures.length === 0 ? n.push(`${i}.measures must include at least one measure.`) : t.measures.forEach((s, r) => {
865
1108
  var l;
866
1109
  n.push(
867
- ...ei(
1110
+ ...si(
868
1111
  s,
869
1112
  `${i}.measures.${r}`
870
1113
  )
@@ -877,10 +1120,10 @@ function C(e, i, t) {
877
1120
  i.has(s) || n.push(`${t}.${s} is not supported for this SDK builder.`);
878
1121
  }), n;
879
1122
  }
880
- function H(e, i) {
1123
+ function U(e, i) {
881
1124
  return c(e.source) ? K(e.source, `${i}.spec.source`) : [`${i}.spec.source must be an object.`];
882
1125
  }
883
- function pt(e, i) {
1126
+ function xt(e, i) {
884
1127
  const t = c(e.source);
885
1128
  if (!t)
886
1129
  return [`${i}.spec.source must be an object.`];
@@ -888,7 +1131,7 @@ function pt(e, i) {
888
1131
  return t.kind !== "semantic" && t.kind !== "physical" && n.push(`${i}.spec.source.kind must be semantic or physical.`), n;
889
1132
  }
890
1133
  function ee(e, i) {
891
- const t = _e(e, i);
1134
+ const t = $e(e, i);
892
1135
  return Array.isArray(e) && e.forEach((n, s) => {
893
1136
  t.push(...h(n, `${i}.${s}`));
894
1137
  }), t;
@@ -909,11 +1152,11 @@ function te(e, i) {
909
1152
  const t = c(e);
910
1153
  return t ? [
911
1154
  ...h(t.field, `${i}.field`),
912
- ...Xe(t.direction, `${i}.direction`)
1155
+ ...ti(t.direction, `${i}.direction`)
913
1156
  ] : [`${i} must be an object.`];
914
1157
  }
915
- function mt(e, i) {
916
- const t = _e(e, i);
1158
+ function At(e, i) {
1159
+ const t = $e(e, i);
917
1160
  return Array.isArray(e) && e.forEach((n, s) => {
918
1161
  const r = c(n);
919
1162
  if (!r) {
@@ -925,7 +1168,7 @@ function mt(e, i) {
925
1168
  );
926
1169
  }), t;
927
1170
  }
928
- function ft(e, i) {
1171
+ function Rt(e, i) {
929
1172
  if (e === void 0)
930
1173
  return [];
931
1174
  const t = [];
@@ -940,8 +1183,8 @@ function ft(e, i) {
940
1183
  );
941
1184
  }), t) : [`${i} must be an array.`];
942
1185
  }
943
- function gt(e, i) {
944
- const t = _e(e, i);
1186
+ function Mt(e, i) {
1187
+ const t = $e(e, i);
945
1188
  return Array.isArray(e) && e.forEach((n, s) => {
946
1189
  const r = c(n);
947
1190
  if (!r) {
@@ -953,7 +1196,7 @@ function gt(e, i) {
953
1196
  );
954
1197
  }), t;
955
1198
  }
956
- function ht(e, i) {
1199
+ function Tt(e, i) {
957
1200
  if (e === void 0)
958
1201
  return [];
959
1202
  if (!Array.isArray(e))
@@ -966,15 +1209,15 @@ function ht(e, i) {
966
1209
  return;
967
1210
  }
968
1211
  r.axis !== "row" && r.axis !== "column" && t.push(`${i}.${s}.axis must be row or column.`), t.push(
969
- ...Xe(
1212
+ ...ti(
970
1213
  r.direction,
971
1214
  `${i}.${s}.direction`
972
1215
  ),
973
- ...yt(r.by, `${i}.${s}.by`)
1216
+ ...jt(r.by, `${i}.${s}.by`)
974
1217
  );
975
1218
  }), t;
976
1219
  }
977
- function yt(e, i) {
1220
+ function jt(e, i) {
978
1221
  const t = c(e);
979
1222
  if (!t)
980
1223
  return [`${i} must be an object.`];
@@ -989,10 +1232,10 @@ function yt(e, i) {
989
1232
  return [`${i}.kind must be member, field, or value.`];
990
1233
  }
991
1234
  }
992
- function Xe(e, i) {
1235
+ function ti(e, i) {
993
1236
  return e === "asc" || e === "desc" ? [] : [`${i} must be asc or desc.`];
994
1237
  }
995
- function U(e, i) {
1238
+ function G(e, i) {
996
1239
  if (e === void 0)
997
1240
  return [];
998
1241
  if (!Array.isArray(e))
@@ -1009,10 +1252,10 @@ function U(e, i) {
1009
1252
  );
1010
1253
  }), t;
1011
1254
  }
1012
- function _e(e, i) {
1255
+ function $e(e, i) {
1013
1256
  return !Array.isArray(e) || e.length === 0 ? [`${i} must be a non-empty array.`] : [];
1014
1257
  }
1015
- function bt(e) {
1258
+ function Et(e) {
1016
1259
  switch (e) {
1017
1260
  case "metric":
1018
1261
  return "semaphor.metric";
@@ -1026,56 +1269,56 @@ function bt(e) {
1026
1269
  return "semaphor.sql";
1027
1270
  }
1028
1271
  }
1029
- function _t(e) {
1272
+ function Ct(e) {
1030
1273
  const i = c(e.computation), t = c(e.visualSpec);
1031
1274
  return (i == null ? void 0 : i.kind) === "presentation_only" || (i == null ? void 0 : i.kind) === "derived" || (i == null ? void 0 : i.kind) === "unsupported" || e.visual === "text_block" || (t == null ? void 0 : t.visualType) === "text_block";
1032
1275
  }
1033
- function vt(e, i) {
1276
+ function Ft(e, i) {
1034
1277
  const t = c(e);
1035
1278
  if (!t)
1036
1279
  return [`${i} must be an object.`];
1037
1280
  const n = [];
1038
- return Gi.has(t.visualType) || n.push(`${i}.visualType must be a supported visual type.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && n.push(`${i}.limit must be a positive integer.`), t.tableBehavior !== void 0 && n.push(
1039
- ...$t(
1281
+ return ot.has(t.visualType) || n.push(`${i}.visualType must be a supported visual type.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && n.push(`${i}.limit must be a positive integer.`), t.tableBehavior !== void 0 && n.push(
1282
+ ...Dt(
1040
1283
  t.tableBehavior,
1041
1284
  `${i}.tableBehavior`
1042
1285
  )
1043
1286
  ), n;
1044
1287
  }
1045
- function $t(e, i) {
1288
+ function Dt(e, i) {
1046
1289
  const t = c(e);
1047
1290
  if (!t)
1048
1291
  return [`${i} must be an object.`];
1049
1292
  const n = [];
1050
1293
  return t.tableMode !== "bounded" && t.tableMode !== "server_paginated" && t.tableMode !== "server_windowed" && n.push(`${i}.tableMode must be a supported table mode.`), n.push(
1051
- ...St(t.height, `${i}.height`),
1052
- ...wt(t.pagination, `${i}.pagination`),
1053
- ...kt(t.sorting, `${i}.sorting`),
1054
- ...It(t.totals, `${i}.totals`)
1294
+ ...Nt(t.height, `${i}.height`),
1295
+ ...qt(t.pagination, `${i}.pagination`),
1296
+ ...Ot(t.sorting, `${i}.sorting`),
1297
+ ...Pt(t.totals, `${i}.totals`)
1055
1298
  ), typeof t.serverSideRequired != "boolean" && n.push(`${i}.serverSideRequired must be a boolean.`), n;
1056
1299
  }
1057
- function St(e, i) {
1300
+ function Nt(e, i) {
1058
1301
  const t = c(e);
1059
1302
  if (!t)
1060
1303
  return [`${i} must be an object.`];
1061
1304
  const n = [];
1062
1305
  return (typeof t.maxPx != "number" || !Number.isInteger(t.maxPx) || t.maxPx <= 0) && n.push(`${i}.maxPx must be a positive integer.`), t.scroll !== "vertical" && t.scroll !== "both" && n.push(`${i}.scroll must be vertical or both.`), typeof t.stickyHeader != "boolean" && n.push(`${i}.stickyHeader must be a boolean.`), n;
1063
1306
  }
1064
- function wt(e, i) {
1307
+ function qt(e, i) {
1065
1308
  const t = c(e);
1066
1309
  if (!t)
1067
1310
  return [`${i} must be an object.`];
1068
1311
  const n = [];
1069
1312
  return t.mode !== "none" && t.mode !== "server" && t.mode !== "client_for_bounded_rows" && n.push(`${i}.mode must be a supported pagination mode.`), t.pageSize !== void 0 && (typeof t.pageSize != "number" || !Number.isInteger(t.pageSize) || t.pageSize <= 0) && n.push(`${i}.pageSize must be a positive integer.`), t.readsFrom !== void 0 && t.readsFrom !== "result.pagination" && n.push(`${i}.readsFrom must be result.pagination.`), n;
1070
1313
  }
1071
- function kt(e, i) {
1314
+ function Ot(e, i) {
1072
1315
  const t = c(e);
1073
1316
  if (!t)
1074
1317
  return [`${i} must be an object.`];
1075
1318
  const n = [];
1076
1319
  return t.mode !== "server" && t.mode !== "client_for_bounded_rows" && n.push(`${i}.mode must be a supported sorting mode.`), t.defaultField !== void 0 && (typeof t.defaultField != "string" || !t.defaultField.trim()) && n.push(`${i}.defaultField must be a non-empty string.`), t.defaultDirection !== void 0 && t.defaultDirection !== "asc" && t.defaultDirection !== "desc" && n.push(`${i}.defaultDirection must be asc or desc.`), t.resetPageOnChange !== void 0 && typeof t.resetPageOnChange != "boolean" && n.push(`${i}.resetPageOnChange must be a boolean.`), n;
1077
1320
  }
1078
- function It(e, i) {
1321
+ function Pt(e, i) {
1079
1322
  const t = c(e);
1080
1323
  if (!t)
1081
1324
  return [`${i} must be an object.`];
@@ -1085,7 +1328,7 @@ function It(e, i) {
1085
1328
  ) : t.measures.forEach((s, r) => {
1086
1329
  var l;
1087
1330
  n.push(
1088
- ...ei(
1331
+ ...si(
1089
1332
  s,
1090
1333
  `${i}.measures.${r}`
1091
1334
  )
@@ -1094,7 +1337,7 @@ function It(e, i) {
1094
1337
  `${i}.label must be Displayed rows or Current page when mode is local.`
1095
1338
  ), t.measures !== void 0 && n.push(`${i}.measures is not allowed when mode is local.`)), n);
1096
1339
  }
1097
- function xt(e, i) {
1340
+ function Bt(e, i) {
1098
1341
  const t = c(e);
1099
1342
  if (!t)
1100
1343
  return [`${i} must be an object.`];
@@ -1120,36 +1363,36 @@ function xt(e, i) {
1120
1363
  }
1121
1364
  return n;
1122
1365
  }
1123
- function At(e, i) {
1366
+ function Kt(e, i) {
1124
1367
  const t = c(e);
1125
1368
  if (!t)
1126
1369
  return [`${i} must be an object.`];
1127
1370
  const n = [];
1128
1371
  for (const r of ["title", "requestedQuestion", "suggestedModelingFix"])
1129
1372
  (typeof t[r] != "string" || !t[r].trim()) && n.push(`${i}.${r} is required.`);
1130
- return zi.has(t.reason) || n.push(
1373
+ return rt.has(t.reason) || n.push(
1131
1374
  `${i}.reason must be a supported unsupported insight reason.`
1132
1375
  ), (t.relationshipCandidate !== void 0 || t.nextRepairAction !== void 0) && t.reason !== "missing_relationship" && n.push(
1133
1376
  `${i} relationship repair metadata is only valid for missing_relationship unsupported insights.`
1134
1377
  ), t.diagnostic !== void 0 && n.push(
1135
- ...Rt(
1378
+ ...Vt(
1136
1379
  t.diagnostic,
1137
1380
  `${i}.diagnostic`,
1138
1381
  t.reason
1139
1382
  )
1140
1383
  ), t.relationshipCandidate !== void 0 && n.push(
1141
- ...Tt(
1384
+ ...Ht(
1142
1385
  t.relationshipCandidate,
1143
1386
  `${i}.relationshipCandidate`
1144
1387
  )
1145
1388
  ), t.nextRepairAction !== void 0 && n.push(
1146
- ...Mt(
1389
+ ...Lt(
1147
1390
  t.nextRepairAction,
1148
1391
  `${i}.nextRepairAction`
1149
1392
  )
1150
1393
  ), n;
1151
1394
  }
1152
- function Rt(e, i, t) {
1395
+ function Vt(e, i, t) {
1153
1396
  const n = c(e);
1154
1397
  if (!n)
1155
1398
  return [`${i} must be an object.`];
@@ -1171,12 +1414,12 @@ function Rt(e, i, t) {
1171
1414
  for (const d of ["inputId", "inputLabel"])
1172
1415
  (typeof n[d] != "string" || !n[d].trim()) && s.push(`${i}.${d} must be a non-empty string.`);
1173
1416
  s.push(
1174
- ...re(
1417
+ ...le(
1175
1418
  n.optionSource,
1176
1419
  `${i}.optionSource`
1177
1420
  )
1178
1421
  ), s.push(
1179
- ...We(
1422
+ ...ai(
1180
1423
  n.optionField,
1181
1424
  `${i}.optionField`
1182
1425
  )
@@ -1191,7 +1434,7 @@ function Rt(e, i, t) {
1191
1434
  );
1192
1435
  }), s;
1193
1436
  }
1194
- function Mt(e, i) {
1437
+ function Lt(e, i) {
1195
1438
  const t = c(e);
1196
1439
  if (!t)
1197
1440
  return [`${i} must be an object.`];
@@ -1202,7 +1445,7 @@ function Mt(e, i) {
1202
1445
  );
1203
1446
  }), t.tool !== "semaphor_propose_semantic_model_change" && n.push(`${i}.tool must be semaphor_propose_semantic_model_change.`), t.reason !== "missing_relationship" && n.push(`${i}.reason must be missing_relationship.`), n;
1204
1447
  }
1205
- function Tt(e, i) {
1448
+ function Ht(e, i) {
1206
1449
  const t = c(e);
1207
1450
  if (!t)
1208
1451
  return [`${i} must be an object.`];
@@ -1217,9 +1460,9 @@ function Tt(e, i) {
1217
1460
  `${i}.${r} is not supported; relationship candidates support only source, sourceFields, target, and targetFields.`
1218
1461
  );
1219
1462
  }), n.push(
1220
- ...re(t.source, `${i}.source`)
1463
+ ...le(t.source, `${i}.source`)
1221
1464
  ), n.push(
1222
- ...re(t.target, `${i}.target`)
1465
+ ...le(t.target, `${i}.target`)
1223
1466
  );
1224
1467
  for (const r of ["sourceFields", "targetFields"]) {
1225
1468
  const l = t[r];
@@ -1229,13 +1472,13 @@ function Tt(e, i) {
1229
1472
  }
1230
1473
  l.forEach((d, u) => {
1231
1474
  n.push(
1232
- ...We(d, `${i}.${r}.${u}`)
1475
+ ...ai(d, `${i}.${r}.${u}`)
1233
1476
  );
1234
1477
  });
1235
1478
  }
1236
1479
  return n;
1237
1480
  }
1238
- function We(e, i) {
1481
+ function ai(e, i) {
1239
1482
  const t = c(e);
1240
1483
  if (!t)
1241
1484
  return [`${i} must be an object.`];
@@ -1252,7 +1495,7 @@ function We(e, i) {
1252
1495
  `${i}.dataType must be string, number, boolean, date, datetime, or unknown.`
1253
1496
  ), n;
1254
1497
  }
1255
- function re(e, i) {
1498
+ function le(e, i) {
1256
1499
  const t = c(e);
1257
1500
  if (!t)
1258
1501
  return [`${i} must be an object.`];
@@ -1271,10 +1514,10 @@ function re(e, i) {
1271
1514
  }), t.kind !== "semantic" && n.push(`${i} must use semantic source identity.`), (typeof t.domainId != "string" || !t.domainId.trim() || typeof t.datasetName != "string" || !t.datasetName.trim()) && n.push(`${i} must include semantic domainId and datasetName.`), n;
1272
1515
  }
1273
1516
  function D(e) {
1274
- return Oi.has(e);
1517
+ return Wi.has(e);
1275
1518
  }
1276
- function Je(e) {
1277
- return Pi.has(e);
1519
+ function ni(e) {
1520
+ return Ji.has(e);
1278
1521
  }
1279
1522
  function w(e, i) {
1280
1523
  return e === void 0 ? [] : h(e, i);
@@ -1284,9 +1527,9 @@ function h(e, i) {
1284
1527
  if (!t)
1285
1528
  return [`${i} must be an object.`];
1286
1529
  const n = [];
1287
- return (typeof t.name != "string" || !t.name.trim()) && n.push(`${i}.name is required.`), !t.source && typeof t.sourceKey != "string" && n.push(`${i} must include source or sourceKey.`), t.aggregate !== void 0 && !Bi.has(t.aggregate) && n.push(`${i}.aggregate must be a supported aggregate function.`), n;
1530
+ return (typeof t.name != "string" || !t.name.trim()) && n.push(`${i}.name is required.`), !t.source && typeof t.sourceKey != "string" && n.push(`${i} must include source or sourceKey.`), t.aggregate !== void 0 && !et.has(t.aggregate) && n.push(`${i}.aggregate must be a supported aggregate function.`), n;
1288
1531
  }
1289
- function ei(e, i) {
1532
+ function si(e, i) {
1290
1533
  const t = c(e), n = h(e, i);
1291
1534
  if (!t || typeof t.sourceKey == "string" && t.sourceKey.trim())
1292
1535
  return n;
@@ -1324,7 +1567,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
1324
1567
  "duckdb",
1325
1568
  "sqlite",
1326
1569
  "unknown"
1327
- ]), jt = a.enum(B), ii = a.enum(he), X = a.enum([
1570
+ ]), Ut = a.enum(B), oi = a.enum(be), X = a.enum([
1328
1571
  "dimension",
1329
1572
  "measure",
1330
1573
  "date",
@@ -1343,21 +1586,21 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
1343
1586
  "minute",
1344
1587
  "hour",
1345
1588
  "day"
1346
- ]), Et = a.enum(Ti), Ct = a.discriminatedUnion("mode", [
1589
+ ]), Gt = a.enum(Oi), zt = a.discriminatedUnion("mode", [
1347
1590
  a.object({ mode: a.literal("auto") }).strict(),
1348
1591
  a.object({
1349
1592
  mode: a.literal("preset"),
1350
- preset: Et
1593
+ preset: Gt
1351
1594
  }).strict(),
1352
1595
  a.object({
1353
1596
  mode: a.literal("pattern"),
1354
1597
  pattern: a.string().min(1)
1355
1598
  }).strict()
1356
- ]), le = a.object({
1599
+ ]), de = a.object({
1357
1600
  type: a.literal("temporal_bucket"),
1358
- presentation: Ct
1359
- }).strict(), Ft = a.object({
1360
- tz: a.string().min(1).refine(Ei, {
1601
+ presentation: zt
1602
+ }).strict(), Yt = a.object({
1603
+ tz: a.string().min(1).refine(Di, {
1361
1604
  message: "tz must be a valid IANA timezone"
1362
1605
  }),
1363
1606
  weekStart: a.number().int().min(0).max(6),
@@ -1365,14 +1608,14 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
1365
1608
  kind: a.literal("month_aligned"),
1366
1609
  yearStartMonth: a.number().int().min(1).max(12)
1367
1610
  }).strict().optional()
1368
- }).strict(), de = a.object({
1611
+ }).strict(), ue = a.object({
1369
1612
  kind: a.literal("temporal_bucket"),
1370
- granularity: jt,
1371
- calendar: Ft
1372
- }).strict(), Dt = a.object({
1613
+ granularity: Ut,
1614
+ calendar: Yt
1615
+ }).strict(), Qt = a.object({
1373
1616
  kind: a.literal("raw_temporal"),
1374
1617
  valueKind: a.enum(["date", "wall_datetime", "instant"])
1375
- }).strict(), ti = a.union([
1618
+ }).strict(), ri = a.union([
1376
1619
  a.object({
1377
1620
  type: a.enum([
1378
1621
  "number",
@@ -1425,7 +1668,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
1425
1668
  prefix: a.string().optional(),
1426
1669
  suffix: a.string().optional()
1427
1670
  }).passthrough()
1428
- ]), Nt = a.union([
1671
+ ]), Zt = a.union([
1429
1672
  a.object({ kind: a.literal("defaultAggregate") }).passthrough(),
1430
1673
  a.object({ kind: a.literal("blank") }).passthrough(),
1431
1674
  a.object({
@@ -1453,14 +1696,14 @@ function V(e, i) {
1453
1696
  });
1454
1697
  });
1455
1698
  }
1456
- const ai = a.object({
1699
+ const li = a.object({
1457
1700
  kind: a.literal("semantic"),
1458
1701
  domainId: a.string(),
1459
1702
  datasetName: a.string(),
1460
1703
  datasetId: a.string().optional(),
1461
1704
  label: a.string().optional(),
1462
1705
  connectionId: a.string().optional()
1463
- }).passthrough(), qt = a.object({
1706
+ }).passthrough(), Xt = a.object({
1464
1707
  kind: a.literal("physical"),
1465
1708
  connectionId: a.string(),
1466
1709
  connectionType: a.string().optional(),
@@ -1469,15 +1712,15 @@ const ai = a.object({
1469
1712
  schemaName: a.string().optional(),
1470
1713
  label: a.string().optional(),
1471
1714
  dialect: Z.optional()
1472
- }).passthrough(), Ot = a.object({
1715
+ }).passthrough(), Wt = a.object({
1473
1716
  kind: a.literal("sql"),
1474
1717
  connectionId: a.string(),
1475
1718
  dialect: Z.optional(),
1476
1719
  label: a.string().optional()
1477
1720
  }).passthrough(), N = a.union([
1478
- ai,
1479
- qt,
1480
- Ot
1721
+ li,
1722
+ Xt,
1723
+ Wt
1481
1724
  ]), T = a.object({
1482
1725
  name: a.string(),
1483
1726
  label: a.string().optional(),
@@ -1485,11 +1728,11 @@ const ai = a.object({
1485
1728
  dataType: W.optional(),
1486
1729
  source: N.optional(),
1487
1730
  aggregate: _.optional()
1488
- }).passthrough(), Pt = a.object({
1731
+ }).passthrough(), Jt = a.object({
1489
1732
  kind: a.literal("field"),
1490
1733
  field: T,
1491
1734
  aggregate: _.optional()
1492
- }).passthrough(), ni = a.object({
1735
+ }).passthrough(), di = a.object({
1493
1736
  kind: a.literal("derived_field"),
1494
1737
  name: a.string(),
1495
1738
  label: a.string(),
@@ -1499,7 +1742,7 @@ const ai = a.object({
1499
1742
  computeStage: a.enum(["row", "aggregate"]),
1500
1743
  expression: a.string(),
1501
1744
  expressionLanguage: a.literal("semaphor_sql_template").optional(),
1502
- inputs: a.record(Pt),
1745
+ inputs: a.record(Jt),
1503
1746
  defaultAggregate: _.optional(),
1504
1747
  aggregationBehavior: a.enum([
1505
1748
  "additive",
@@ -1515,13 +1758,13 @@ const ai = a.object({
1515
1758
  "aggregate_then_join",
1516
1759
  "weighted"
1517
1760
  ]).optional(),
1518
- format: ti.optional(),
1761
+ format: ri.optional(),
1519
1762
  tags: a.array(a.string()).optional()
1520
- }).passthrough(), ve = T.and(
1763
+ }).passthrough(), Se = T.and(
1521
1764
  a.object({
1522
- derivedField: ni.optional()
1765
+ derivedField: di.optional()
1523
1766
  }).passthrough()
1524
- ), Bt = ai, Kt = a.object({
1767
+ ), ea = li, ia = a.object({
1525
1768
  kind: a.literal("physical"),
1526
1769
  connectionId: a.string().optional(),
1527
1770
  connectionType: a.string().optional(),
@@ -1530,22 +1773,22 @@ const ai = a.object({
1530
1773
  schemaName: a.string().optional(),
1531
1774
  label: a.string().optional(),
1532
1775
  dialect: Z.optional()
1533
- }).passthrough(), Vt = a.object({
1776
+ }).passthrough(), ta = a.object({
1534
1777
  kind: a.literal("sql"),
1535
1778
  connectionId: a.string().optional(),
1536
1779
  dialect: Z.optional(),
1537
1780
  label: a.string().optional()
1538
- }).passthrough(), Lt = a.union([
1539
- Bt,
1540
- Kt,
1541
- Vt
1542
- ]), Ht = a.object({
1781
+ }).passthrough(), aa = a.union([
1782
+ ea,
1783
+ ia,
1784
+ ta
1785
+ ]), na = a.object({
1543
1786
  key: a.string().optional(),
1544
1787
  name: a.string(),
1545
1788
  label: a.string().optional(),
1546
1789
  role: X.optional(),
1547
1790
  dataType: W.optional(),
1548
- source: Lt.optional(),
1791
+ source: aa.optional(),
1549
1792
  aggregate: _.optional(),
1550
1793
  derivedField: a.never().optional()
1551
1794
  }).passthrough(), O = a.object({
@@ -1556,9 +1799,9 @@ const ai = a.object({
1556
1799
  dataType: W.optional(),
1557
1800
  aggregate: _.optional(),
1558
1801
  source: N.optional(),
1559
- derivedField: ni.optional(),
1560
- temporalBucket: de.optional(),
1561
- rawTemporal: Dt.optional(),
1802
+ derivedField: di.optional(),
1803
+ temporalBucket: ue.optional(),
1804
+ rawTemporal: Qt.optional(),
1562
1805
  pivotIdentity: a.object({
1563
1806
  metricId: a.string().min(1),
1564
1807
  metricAlias: a.string().min(1),
@@ -1566,7 +1809,7 @@ const ai = a.object({
1566
1809
  a.object({
1567
1810
  fieldId: a.string().min(1),
1568
1811
  value: a.string().nullable(),
1569
- temporalBucket: de.optional()
1812
+ temporalBucket: ue.optional()
1570
1813
  }).strict()
1571
1814
  )
1572
1815
  }).strict().optional()
@@ -1576,7 +1819,7 @@ const ai = a.object({
1576
1819
  path: ["rawTemporal"],
1577
1820
  message: "A result column cannot carry both temporalBucket and rawTemporal metadata."
1578
1821
  }), e.temporalBucket) {
1579
- const t = ji(
1822
+ const t = Pi(
1580
1823
  e.temporalBucket.granularity
1581
1824
  );
1582
1825
  e.dataType !== t && i.addIssue({
@@ -1593,13 +1836,13 @@ const ai = a.object({
1593
1836
  message: `${e.rawTemporal.valueKind} raw temporal values require dataType ${t}.`
1594
1837
  });
1595
1838
  }
1596
- }), Pn = a.object({
1839
+ }), Ln = a.object({
1597
1840
  records: M,
1598
1841
  columns: a.array(O).optional()
1599
- }).passthrough(), Bn = a.object({
1842
+ }).passthrough(), Hn = a.object({
1600
1843
  records: M,
1601
1844
  columns: a.array(O)
1602
- }).passthrough(), si = a.object({
1845
+ }).passthrough(), ui = a.object({
1603
1846
  code: a.string(),
1604
1847
  message: a.string().optional(),
1605
1848
  invalidField: a.string().optional(),
@@ -1608,18 +1851,18 @@ const ai = a.object({
1608
1851
  validDateCandidates: a.array(a.string()).optional(),
1609
1852
  validDimensionCandidates: a.array(a.string()).optional(),
1610
1853
  recommendedNextStep: a.string()
1611
- }).passthrough(), ue = a.object({
1854
+ }).passthrough(), ce = a.object({
1612
1855
  code: a.string(),
1613
1856
  message: a.string(),
1614
1857
  path: a.string().optional(),
1615
1858
  fieldRole: a.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
1616
- repairHint: si.optional()
1617
- }).passthrough(), oi = a.object({
1859
+ repairHint: ui.optional()
1860
+ }).passthrough(), ci = a.object({
1618
1861
  ok: a.boolean(),
1619
- errors: a.array(ue),
1620
- warnings: a.array(ue),
1621
- repairHints: a.array(si)
1622
- }).passthrough(), Ut = a.object({
1862
+ errors: a.array(ce),
1863
+ warnings: a.array(ce),
1864
+ repairHints: a.array(ui)
1865
+ }).passthrough(), sa = a.object({
1623
1866
  page: a.number(),
1624
1867
  pageSize: a.number(),
1625
1868
  pageCount: a.number(),
@@ -1633,8 +1876,8 @@ const ai = a.object({
1633
1876
  rowCount: a.number().optional(),
1634
1877
  rowLimitExceeded: a.boolean().optional(),
1635
1878
  limit: a.number().optional(),
1636
- pagination: Ut.optional()
1637
- }, Gt = a.object({
1879
+ pagination: sa.optional()
1880
+ }, oa = a.object({
1638
1881
  ...L,
1639
1882
  kind: a.literal("metric"),
1640
1883
  primaryValue: Y,
@@ -1647,7 +1890,7 @@ const ai = a.object({
1647
1890
  deltaPercent: a.union([a.number(), a.null()]).optional()
1648
1891
  }).passthrough().optional(),
1649
1892
  records: M.optional()
1650
- }).passthrough(), zt = a.object({
1893
+ }).passthrough(), ra = a.object({
1651
1894
  ...L,
1652
1895
  kind: a.literal("records"),
1653
1896
  columns: a.array(O),
@@ -1658,7 +1901,7 @@ const ai = a.object({
1658
1901
  row: a.record(a.string(), a.unknown()),
1659
1902
  columns: a.array(O).optional()
1660
1903
  }).passthrough().optional()
1661
- }).passthrough(), Yt = a.object({
1904
+ }).passthrough(), la = a.object({
1662
1905
  ...L,
1663
1906
  kind: a.literal("inputOptions"),
1664
1907
  options: a.array(
@@ -1672,7 +1915,7 @@ const ai = a.object({
1672
1915
  ["value"]
1673
1916
  )
1674
1917
  )
1675
- }).passthrough(), Qt = a.object({
1918
+ }).passthrough(), da = a.object({
1676
1919
  ...L,
1677
1920
  kind: a.literal("sql"),
1678
1921
  columns: a.array(O),
@@ -1682,11 +1925,11 @@ const ai = a.object({
1682
1925
  explicitLimit: a.number().optional(),
1683
1926
  hasPythonCode: a.boolean().optional()
1684
1927
  }).passthrough().optional()
1685
- }).passthrough(), Zt = a.object({
1928
+ }).passthrough(), ua = a.object({
1686
1929
  enabled: a.boolean().optional(),
1687
1930
  position: a.enum(["before", "after"]).optional(),
1688
1931
  label: a.string().optional()
1689
- }).passthrough(), Ee = a.object({
1932
+ }).passthrough(), De = a.object({
1690
1933
  id: a.enum(["rows", "columns"]),
1691
1934
  levels: a.array(
1692
1935
  a.object({
@@ -1694,9 +1937,9 @@ const ai = a.object({
1694
1937
  fieldKey: a.string(),
1695
1938
  label: a.string(),
1696
1939
  field: T,
1697
- grain: ii.optional(),
1698
- temporalBucket: de.optional(),
1699
- subtotal: Zt.optional()
1940
+ grain: oi.optional(),
1941
+ temporalBucket: ue.optional(),
1942
+ subtotal: ua.optional()
1700
1943
  }).passthrough()
1701
1944
  ),
1702
1945
  nodeIds: a.array(a.string())
@@ -1708,7 +1951,7 @@ const ai = a.object({
1708
1951
  label: a.string().optional()
1709
1952
  },
1710
1953
  ["value"]
1711
- ), Xt = a.union([
1954
+ ), ca = a.union([
1712
1955
  a.object({ kind: a.literal("member") }).passthrough(),
1713
1956
  a.object({
1714
1957
  kind: a.literal("field"),
@@ -1721,12 +1964,12 @@ const ai = a.object({
1721
1964
  rowPath: a.array(R).optional(),
1722
1965
  columnPath: a.array(R).optional()
1723
1966
  }).passthrough()
1724
- ]), Wt = a.enum([
1967
+ ]), pa = a.enum([
1725
1968
  "present",
1726
1969
  "presentNull",
1727
1970
  "missing",
1728
1971
  "densified"
1729
- ]), Jt = a.enum([
1972
+ ]), ma = a.enum([
1730
1973
  "value",
1731
1974
  "rowSubtotal",
1732
1975
  "columnSubtotal",
@@ -1734,13 +1977,13 @@ const ai = a.object({
1734
1977
  "rowGrandTotal",
1735
1978
  "columnGrandTotal",
1736
1979
  "matrixGrandTotal"
1737
- ]), ea = a.object({
1980
+ ]), fa = a.object({
1738
1981
  instanceId: a.string(),
1739
1982
  fieldKey: a.string(),
1740
1983
  field: T,
1741
1984
  role: a.enum(["row", "column", "measure", "sort", "filter"]),
1742
1985
  label: a.string().optional()
1743
- }).passthrough(), ia = a.union([
1986
+ }).passthrough(), ga = a.union([
1744
1987
  a.object({
1745
1988
  kind: a.literal("additive"),
1746
1989
  aggregate: _.optional()
@@ -1748,7 +1991,7 @@ const ai = a.object({
1748
1991
  a.object({
1749
1992
  kind: a.literal("semiAdditive"),
1750
1993
  aggregate: _.optional(),
1751
- grain: ii.optional()
1994
+ grain: oi.optional()
1752
1995
  }).passthrough(),
1753
1996
  a.object({
1754
1997
  kind: a.literal("nonAdditive"),
@@ -1763,16 +2006,16 @@ const ai = a.object({
1763
2006
  kind: a.literal("custom"),
1764
2007
  expressionId: a.string().optional()
1765
2008
  }).passthrough()
1766
- ]), ta = a.object({
2009
+ ]), ha = a.object({
1767
2010
  instanceId: a.string(),
1768
2011
  fieldKey: a.string(),
1769
2012
  label: a.string(),
1770
2013
  field: T,
1771
2014
  aggregate: _.optional(),
1772
- format: ti.optional(),
1773
- totalBehavior: Nt.optional(),
1774
- semantics: ia
1775
- }).passthrough(), aa = a.object({
2015
+ format: ri.optional(),
2016
+ totalBehavior: Zt.optional(),
2017
+ semantics: ga
2018
+ }).passthrough(), ya = a.object({
1776
2019
  id: a.string(),
1777
2020
  measureId: a.string(),
1778
2021
  aggregate: _.optional(),
@@ -1793,11 +2036,11 @@ const ai = a.object({
1793
2036
  rowNodeId: a.string().optional(),
1794
2037
  columnNodeId: a.string().optional()
1795
2038
  }).passthrough().optional()
1796
- }).passthrough(), na = a.object({
2039
+ }).passthrough(), ba = a.object({
1797
2040
  kind: a.string(),
1798
2041
  label: a.string().optional(),
1799
2042
  payload: a.record(a.string(), a.unknown()).optional()
1800
- }).passthrough(), sa = V(
2043
+ }).passthrough(), _a = V(
1801
2044
  {
1802
2045
  id: a.string(),
1803
2046
  axis: a.enum(["row", "column"]),
@@ -1812,10 +2055,10 @@ const ai = a.object({
1812
2055
  isGrandTotal: a.boolean().optional(),
1813
2056
  subtotalFunction: _.optional(),
1814
2057
  childCount: a.number().optional(),
1815
- actions: a.array(na).optional()
2058
+ actions: a.array(ba).optional()
1816
2059
  },
1817
2060
  ["value"]
1818
- ), oa = a.object({
2061
+ ), va = a.object({
1819
2062
  rowHeaderLevels: a.array(
1820
2063
  a.object({
1821
2064
  id: a.string(),
@@ -1855,14 +2098,14 @@ const ai = a.object({
1855
2098
  role: a.enum(["value", "columnSubtotal", "columnGrandTotal"])
1856
2099
  }).passthrough()
1857
2100
  )
1858
- }).passthrough(), ra = V(
2101
+ }).passthrough(), $a = V(
1859
2102
  {
1860
2103
  rowId: a.string(),
1861
2104
  columnId: a.string().optional(),
1862
2105
  measureId: a.string(),
1863
2106
  value: a.unknown(),
1864
- presence: Wt,
1865
- role: Jt,
2107
+ presence: pa,
2108
+ role: ma,
1866
2109
  calculationId: a.string().optional()
1867
2110
  },
1868
2111
  ["value"]
@@ -1872,7 +2115,7 @@ const ai = a.object({
1872
2115
  path: ["formattedValue"],
1873
2116
  message: "Matrix result cells carry typed values; formattedValue is not supported."
1874
2117
  });
1875
- }), la = a.object({
2118
+ }), Sa = a.object({
1876
2119
  rows: a.boolean().optional(),
1877
2120
  columns: a.boolean().optional(),
1878
2121
  grandTotal: a.union([
@@ -1882,7 +2125,7 @@ const ai = a.object({
1882
2125
  columns: a.boolean().optional()
1883
2126
  }).passthrough()
1884
2127
  ]).optional()
1885
- }).passthrough(), da = V(
2128
+ }).passthrough(), wa = V(
1886
2129
  {
1887
2130
  id: a.string(),
1888
2131
  axis: a.enum(["row", "column"]),
@@ -1890,27 +2133,27 @@ const ai = a.object({
1890
2133
  direction: a.enum(["asc", "desc"]),
1891
2134
  nulls: a.enum(["warehouseDefault", "first", "last"]).optional(),
1892
2135
  scope: a.enum(["global", "withinParent"]).optional(),
1893
- by: Xt
2136
+ by: ca
1894
2137
  },
1895
2138
  ["by"]
1896
- ), ua = a.object({
2139
+ ), ka = a.object({
1897
2140
  rowOffset: a.number().optional(),
1898
2141
  rowLimit: a.number().optional(),
1899
2142
  columnOffset: a.number().optional(),
1900
2143
  columnLimit: a.number().optional(),
1901
2144
  hasMoreRows: a.boolean().optional(),
1902
2145
  hasMoreColumns: a.boolean().optional()
1903
- }).passthrough(), ca = a.object({
2146
+ }).passthrough(), Ia = a.object({
1904
2147
  axis: a.enum(["row", "column"]),
1905
2148
  path: a.array(R),
1906
2149
  depth: a.number().optional()
1907
- }).passthrough(), pa = a.object({
2150
+ }).passthrough(), xa = a.object({
1908
2151
  rowLazyLoading: a.boolean().optional(),
1909
2152
  columnLazyLoading: a.boolean().optional(),
1910
2153
  expandableRowNodeIds: a.array(a.string()).optional(),
1911
2154
  expandableColumnNodeIds: a.array(a.string()).optional(),
1912
- nextRequests: a.array(ca).optional()
1913
- }).passthrough(), ma = a.object({
2155
+ nextRequests: a.array(Ia).optional()
2156
+ }).passthrough(), Aa = a.object({
1914
2157
  domains: a.record(
1915
2158
  a.object({
1916
2159
  min: a.number().optional(),
@@ -1918,35 +2161,35 @@ const ai = a.object({
1918
2161
  }).passthrough()
1919
2162
  ).optional(),
1920
2163
  rules: a.array(a.record(a.string(), a.unknown())).optional()
1921
- }).passthrough(), fa = a.object({
2164
+ }).passthrough(), Ra = a.object({
1922
2165
  ...L,
1923
2166
  kind: a.literal("matrix"),
1924
2167
  schemaVersion: a.literal(2),
1925
2168
  shape: a.enum(["hierarchical", "pivot"]),
1926
2169
  capabilities: a.array(a.string()),
1927
2170
  executionMetadata: a.record(a.string(), a.unknown()),
1928
- fieldsById: a.record(a.string(), ea),
1929
- measuresById: a.record(a.string(), ta),
1930
- calculationsById: a.record(a.string(), aa).optional(),
2171
+ fieldsById: a.record(a.string(), fa),
2172
+ measuresById: a.record(a.string(), ha),
2173
+ calculationsById: a.record(a.string(), ya).optional(),
1931
2174
  axes: a.object({
1932
- rows: Ee,
1933
- columns: Ee
2175
+ rows: De,
2176
+ columns: De
1934
2177
  }).passthrough(),
1935
- nodesById: a.record(a.string(), sa),
1936
- layout: oa,
1937
- cells: a.array(ra),
1938
- totals: la,
1939
- sort: a.array(da),
1940
- formattingContext: ma,
1941
- pageInfo: ua.optional(),
1942
- expansion: pa.optional()
1943
- }).passthrough(), ga = a.union([
1944
- Gt,
1945
- zt,
1946
- Yt,
1947
- Qt,
1948
- fa
1949
- ]), ha = a.object({
2178
+ nodesById: a.record(a.string(), _a),
2179
+ layout: va,
2180
+ cells: a.array($a),
2181
+ totals: Sa,
2182
+ sort: a.array(wa),
2183
+ formattingContext: Aa,
2184
+ pageInfo: ka.optional(),
2185
+ expansion: xa.optional()
2186
+ }).passthrough(), Ma = a.union([
2187
+ oa,
2188
+ ra,
2189
+ la,
2190
+ da,
2191
+ Ra
2192
+ ]), Ta = a.object({
1950
2193
  status: a.enum([
1951
2194
  "not_required",
1952
2195
  "resolved",
@@ -1970,7 +2213,7 @@ const ai = a.object({
1970
2213
  status: a.enum(["none", "warning", "error", "unknown"]),
1971
2214
  message: a.string().optional()
1972
2215
  }).passthrough().optional()
1973
- }).passthrough(), Ce = a.enum([
2216
+ }).passthrough(), Ne = a.enum([
1974
2217
  "ambiguous_fields",
1975
2218
  "empty_result",
1976
2219
  "missing_grounded_fields",
@@ -1980,7 +2223,7 @@ const ai = a.object({
1980
2223
  "presentation_incomplete",
1981
2224
  "query_validation_failed",
1982
2225
  "unsafe_join"
1983
- ]), ri = a.object({
2226
+ ]), pi = a.object({
1984
2227
  version: a.literal(1),
1985
2228
  status: a.enum(["answered", "partial", "blocked"]),
1986
2229
  summary: a.string(),
@@ -1990,14 +2233,14 @@ const ai = a.object({
1990
2233
  queryId: a.string().optional(),
1991
2234
  summary: a.string(),
1992
2235
  evidenceIds: a.array(a.string()).optional(),
1993
- fieldsUsed: a.array(ve).optional()
2236
+ fieldsUsed: a.array(Se).optional()
1994
2237
  }).passthrough()
1995
2238
  ),
1996
2239
  blocked: a.array(
1997
2240
  a.object({
1998
2241
  slotId: a.string().optional(),
1999
2242
  queryId: a.string().optional(),
2000
- reasonCode: Ce,
2243
+ reasonCode: Ne,
2001
2244
  message: a.string(),
2002
2245
  missingFields: a.array(a.string()).optional(),
2003
2246
  availableFields: a.array(a.string()).optional(),
@@ -2010,19 +2253,19 @@ const ai = a.object({
2010
2253
  ),
2011
2254
  semanticModelRecommendations: a.array(
2012
2255
  a.object({
2013
- reasonCode: Ce,
2256
+ reasonCode: Ne,
2014
2257
  message: a.string(),
2015
2258
  recommendedNextStep: a.string().optional()
2016
2259
  }).passthrough()
2017
2260
  ).optional()
2018
- }).passthrough(), li = a.object({
2261
+ }).passthrough(), mi = a.object({
2019
2262
  scope: a.literal("filtered_query"),
2020
2263
  measures: a.record(Y)
2021
- }).passthrough(), di = a.object({
2264
+ }).passthrough(), fi = a.object({
2022
2265
  answeredObligations: a.array(a.string()),
2023
2266
  missingObligations: a.array(a.string()),
2024
- warnings: a.array(ue).optional()
2025
- }).passthrough(), ya = a.object({
2267
+ warnings: a.array(ce).optional()
2268
+ }).passthrough(), ja = a.object({
2026
2269
  intentId: a.string().optional(),
2027
2270
  queryId: a.string().optional(),
2028
2271
  status: a.enum(["answered", "partial", "failed"]),
@@ -2037,35 +2280,35 @@ const ai = a.object({
2037
2280
  ]).optional(),
2038
2281
  intent: a.unknown().optional(),
2039
2282
  compiledQuery: a.unknown().optional(),
2040
- fieldsUsed: a.array(ve).optional(),
2041
- result: ga.optional(),
2042
- validation: oi,
2043
- coverage: di.optional(),
2283
+ fieldsUsed: a.array(Se).optional(),
2284
+ result: Ma.optional(),
2285
+ validation: ci,
2286
+ coverage: fi.optional(),
2044
2287
  missingFields: a.array(a.string()).optional(),
2045
2288
  warnings: a.array(a.string()).optional(),
2046
- relationshipDiagnostics: ha.optional(),
2047
- diagnosticFeedback: ri.optional(),
2048
- population: li.optional(),
2289
+ relationshipDiagnostics: Ta.optional(),
2290
+ diagnosticFeedback: pi.optional(),
2291
+ population: mi.optional(),
2049
2292
  metadata: a.record(a.string(), a.unknown()).optional()
2050
2293
  }).passthrough();
2051
- function ba(e) {
2294
+ function Ea(e) {
2052
2295
  switch (e) {
2053
2296
  case "boolean":
2054
2297
  return a.boolean().optional();
2055
2298
  case "compactExecutionFieldArray":
2056
- return a.array(Ht).optional();
2299
+ return a.array(na).optional();
2057
2300
  case "coverage":
2058
- return di.optional();
2301
+ return fi.optional();
2059
2302
  case "diagnosticFeedback":
2060
- return ri.optional();
2303
+ return pi.optional();
2061
2304
  case "executionFieldArray":
2062
- return a.array(ve).optional();
2305
+ return a.array(Se).optional();
2063
2306
  case "executionResult":
2064
- return ya.optional();
2307
+ return ja.optional();
2065
2308
  case "number":
2066
2309
  return a.number().finite().optional();
2067
2310
  case "population":
2068
- return li.optional();
2311
+ return mi.optional();
2069
2312
  case "record":
2070
2313
  return b.optional();
2071
2314
  case "recordArray":
@@ -2081,14 +2324,14 @@ function ba(e) {
2081
2324
  case "unknownArray":
2082
2325
  return a.array(a.unknown()).optional();
2083
2326
  case "validationResult":
2084
- return oi.optional();
2327
+ return ci.optional();
2085
2328
  }
2086
2329
  }
2087
- const _a = Object.fromEntries(
2088
- Object.entries(Ci).map(
2089
- ([e, i]) => [e, ba(i)]
2330
+ const Ca = Object.fromEntries(
2331
+ Object.entries(zi).map(
2332
+ ([e, i]) => [e, Ea(i)]
2090
2333
  )
2091
- ), Kn = a.object(_a).strict(), $e = a.object({
2334
+ ), Un = a.object(Ca).strict(), we = a.object({
2092
2335
  sourceKey: a.string().optional(),
2093
2336
  kind: a.enum(["semantic", "physical", "sql"]).optional(),
2094
2337
  domainId: a.string().optional(),
@@ -2104,11 +2347,11 @@ const _a = Object.fromEntries(
2104
2347
  dataType: a.enum(["string", "number", "boolean", "date", "datetime", "unknown"]).optional(),
2105
2348
  aggregate: _.optional(),
2106
2349
  sourceKey: a.string().optional(),
2107
- source: $e.optional()
2108
- }).passthrough(), ui = a.object({
2350
+ source: we.optional()
2351
+ }).passthrough(), gi = a.object({
2109
2352
  id: a.string().optional(),
2110
2353
  builder: a.literal("semaphor.inputOptions"),
2111
- source: $e.optional(),
2354
+ source: we.optional(),
2112
2355
  sourceKey: a.string().optional(),
2113
2356
  valueFieldRef: k,
2114
2357
  labelFieldRef: k,
@@ -2117,24 +2360,24 @@ const _a = Object.fromEntries(
2117
2360
  dependencies: a.unknown().optional(),
2118
2361
  limit: a.number().int().positive().optional(),
2119
2362
  spec: b.optional()
2120
- }).passthrough(), ci = a.object({
2363
+ }).passthrough(), hi = a.object({
2121
2364
  appliesToViewIds: a.array(a.string()).optional(),
2122
2365
  viewId: a.string().optional(),
2123
2366
  fieldRef: k,
2124
2367
  relationshipHint: a.unknown().optional(),
2125
2368
  relationshipsUsed: a.array(b).optional()
2126
- }).passthrough(), va = a.object({
2369
+ }).passthrough(), Fa = a.object({
2127
2370
  id: a.string(),
2128
2371
  label: a.string().optional(),
2129
2372
  type: a.string().optional(),
2130
2373
  serverSide: a.boolean().optional(),
2131
2374
  fieldRef: k.optional(),
2132
- optionQuery: ui.optional(),
2133
- bindings: a.array(ci).optional(),
2375
+ optionQuery: gi.optional(),
2376
+ bindings: a.array(hi).optional(),
2134
2377
  appliesToViewIds: a.array(a.string()),
2135
2378
  relationshipHint: a.unknown().optional(),
2136
2379
  relationshipsUsed: a.array(b).optional()
2137
- }).passthrough(), $a = a.object({
2380
+ }).passthrough(), Da = a.object({
2138
2381
  builder: a.enum([
2139
2382
  "semaphor.metric",
2140
2383
  "semaphor.records",
@@ -2144,7 +2387,7 @@ const _a = Object.fromEntries(
2144
2387
  ]),
2145
2388
  spec: b,
2146
2389
  fallbackReason: b.optional()
2147
- }).passthrough(), Sa = a.object({
2390
+ }).passthrough(), Na = a.object({
2148
2391
  id: a.string(),
2149
2392
  title: a.string().optional(),
2150
2393
  purpose: a.string().optional(),
@@ -2162,31 +2405,31 @@ const _a = Object.fromEntries(
2162
2405
  "semaphor.analysis",
2163
2406
  "semaphor.sql"
2164
2407
  ]).optional(),
2165
- sdkSpec: $a.optional(),
2408
+ sdkSpec: Da.optional(),
2166
2409
  fields: a.array(k).optional(),
2167
2410
  computation: b.optional(),
2168
2411
  uxExpectations: a.array(a.string()).optional(),
2169
2412
  validation: b.optional()
2170
- }).passthrough(), wa = a.object({
2413
+ }).passthrough(), qa = a.object({
2171
2414
  inputId: a.string(),
2172
2415
  label: a.string().optional(),
2173
2416
  type: a.string().optional(),
2174
2417
  serverSide: a.boolean().optional(),
2175
2418
  fieldRef: k.optional(),
2176
- optionQuery: ui.optional(),
2177
- bindings: a.array(ci),
2419
+ optionQuery: gi.optional(),
2420
+ bindings: a.array(hi),
2178
2421
  appliesToViewIds: a.array(a.string()),
2179
2422
  notAppliedToViewIds: a.array(a.string())
2180
- }).passthrough(), Vn = a.object({
2181
- schemaVersion: a.literal(oe),
2423
+ }).passthrough(), Gn = a.object({
2424
+ schemaVersion: a.literal(re),
2182
2425
  title: a.string(),
2183
2426
  purpose: a.string().optional(),
2184
2427
  userGoal: a.string().optional(),
2185
2428
  nextStep: a.string().optional(),
2186
- sources: a.array($e),
2187
- inputs: a.array(va),
2188
- views: a.array(Sa),
2189
- filterContracts: a.array(wa),
2429
+ sources: a.array(we),
2430
+ inputs: a.array(Fa),
2431
+ views: a.array(Na),
2432
+ filterContracts: a.array(qa),
2190
2433
  implementationChecklist: a.object({
2191
2434
  schemaVersion: a.string().optional(),
2192
2435
  requiredDevtools: a.object({
@@ -2216,257 +2459,13 @@ const _a = Object.fromEntries(
2216
2459
  assumptions: a.array(a.string()).optional(),
2217
2460
  validation: b.optional()
2218
2461
  }).passthrough().superRefine((e, i) => {
2219
- const t = Ye(e);
2462
+ const t = Je(e);
2220
2463
  for (const n of t.issues)
2221
2464
  i.addIssue({
2222
2465
  code: a.ZodIssueCode.custom,
2223
2466
  message: n
2224
2467
  });
2225
2468
  });
2226
- function Se(e) {
2227
- return typeof e == "string" ? e.trim().toLowerCase() : "";
2228
- }
2229
- function ka(e) {
2230
- return String(
2231
- e.column_name || e.name || e.qualifiedFieldName || ""
2232
- );
2233
- }
2234
- function Ia(e) {
2235
- return Array.from(
2236
- new Set(
2237
- [e.column_name, e.name, e.qualifiedFieldName, e.alias].filter(
2238
- (i) => typeof i == "string" && i.trim().length > 0
2239
- ).map((i) => i.trim())
2240
- )
2241
- );
2242
- }
2243
- function we(e) {
2244
- const i = Ma(e);
2245
- return i ? Ra(i) ? "number" : i.includes("timestamp") || i.includes("datetime") || i.startsWith("time") ? "datetime" : i.includes("date") ? "date" : i.includes("bool") ? "boolean" : "string" : "unknown";
2246
- }
2247
- const xa = /* @__PURE__ */ new Set([
2248
- "int",
2249
- "uint",
2250
- "integer",
2251
- "bigint",
2252
- "smallint",
2253
- "tinyint",
2254
- "numeric",
2255
- "decimal",
2256
- "double",
2257
- "float",
2258
- "number",
2259
- "real",
2260
- "money",
2261
- "currency",
2262
- "percent"
2263
- ]), Aa = [
2264
- "int",
2265
- "uint",
2266
- "decimal",
2267
- "float"
2268
- ];
2269
- function Ra(e) {
2270
- const i = e.split(/[\s(]/, 1)[0] || "";
2271
- return xa.has(i) ? !0 : Aa.some((t) => {
2272
- if (!i.startsWith(t)) return !1;
2273
- const n = i.slice(t.length);
2274
- return n.length > 0 && Array.from(n).every((s) => s >= "0" && s <= "9");
2275
- });
2276
- }
2277
- function Ma(e) {
2278
- let i = Se(e), t = "";
2279
- for (; i && i !== t; )
2280
- t = i, i = Fe(i, "nullable"), i = Fe(i, "lowcardinality");
2281
- return i;
2282
- }
2283
- function Fe(e, i) {
2284
- const t = `${i}(`;
2285
- return !e.startsWith(t) || !e.endsWith(")") ? e : e.slice(t.length, -1).trim();
2286
- }
2287
- function Ta(e) {
2288
- const i = we(e);
2289
- return i === "date" || i === "datetime";
2290
- }
2291
- function pi(e) {
2292
- return Ta(e.dataType || e.data_type);
2293
- }
2294
- function mi(e) {
2295
- const i = fi(e);
2296
- return i === "id" || i === "row_id";
2297
- }
2298
- function De(e) {
2299
- const i = fi(e);
2300
- return mi(e) || i.endsWith("_id") || i.endsWith("_key") || i.endsWith("_number");
2301
- }
2302
- function fi(e) {
2303
- return Se(
2304
- ka(e) || e.name || e.alias
2305
- ).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
2306
- }
2307
- function gi(e, i = {}) {
2308
- const t = Se(e.role);
2309
- return t === "metric" || t === "measure" ? !i.excludeIdentifiers || !De(e) : t === "groupby" || t === "dimension" || t === "date" || t === "id" ? !1 : we(
2310
- e.dataType || e.data_type
2311
- ) === "number" && (!i.excludeIdentifiers || !De(e));
2312
- }
2313
- function Ln(e) {
2314
- return !gi(e) && !pi(e);
2315
- }
2316
- function Hn(e) {
2317
- const i = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
2318
- for (const s of e) {
2319
- if (mi(s))
2320
- continue;
2321
- const r = Ia(s);
2322
- if (r.length !== 0) {
2323
- if (pi(s)) {
2324
- r.forEach((l) => t.add(l));
2325
- continue;
2326
- }
2327
- if (gi(s, { excludeIdentifiers: !0 })) {
2328
- r.forEach((l) => i.add(l));
2329
- continue;
2330
- }
2331
- r.forEach((l) => n.add(l));
2332
- }
2333
- }
2334
- return {
2335
- validMeasureCandidates: Array.from(i).sort(),
2336
- validDateCandidates: Array.from(t).sort(),
2337
- validDimensionCandidates: Array.from(n).sort()
2338
- };
2339
- }
2340
- const ja = [
2341
- "YYYY",
2342
- "MMMM",
2343
- "MMM",
2344
- "YY",
2345
- "MM",
2346
- "DD",
2347
- "HH",
2348
- "mm",
2349
- "ss"
2350
- ], Ea = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), hi = {
2351
- week_of_short: "week",
2352
- week_of_long: "week",
2353
- quarter_short: "quarter",
2354
- quarter_long: "quarter",
2355
- fiscal_quarter_short: "quarter",
2356
- fiscal_year: "year"
2357
- };
2358
- function Un(e) {
2359
- return typeof e == "string" && Object.prototype.hasOwnProperty.call(hi, e);
2360
- }
2361
- function Ca(e, i) {
2362
- return ja.find(
2363
- (t) => e.startsWith(t, i)
2364
- );
2365
- }
2366
- function Fa(e) {
2367
- var s;
2368
- if (!e || e.trim() !== e)
2369
- return {
2370
- ok: !1,
2371
- code: "invalid_temporal_bucket_pattern",
2372
- message: "Temporal bucket patterns must be non-empty and trimmed."
2373
- };
2374
- const i = [];
2375
- let t = 0, n = !1;
2376
- for (; t < e.length; ) {
2377
- const r = Ca(e, t);
2378
- if (r) {
2379
- if (n)
2380
- return {
2381
- ok: !1,
2382
- code: "invalid_temporal_bucket_pattern",
2383
- message: "Adjacent temporal bucket tokens require a separator."
2384
- };
2385
- i.push({ kind: "token", value: r }), t += r.length, n = !0;
2386
- continue;
2387
- }
2388
- const l = e[t];
2389
- if (!Ea.has(l))
2390
- return {
2391
- ok: !1,
2392
- code: "invalid_temporal_bucket_pattern",
2393
- message: `Unsupported temporal bucket pattern character "${l}".`
2394
- };
2395
- if (i.length === 0)
2396
- return {
2397
- ok: !1,
2398
- code: "invalid_temporal_bucket_pattern",
2399
- message: "Temporal bucket patterns cannot begin with a separator."
2400
- };
2401
- const d = i[i.length - 1];
2402
- d.kind === "literal" ? d.value += l : i.push({ kind: "literal", value: l }), t += 1, n = !1;
2403
- }
2404
- return ((s = i[i.length - 1]) == null ? void 0 : s.kind) !== "token" ? {
2405
- ok: !1,
2406
- code: "invalid_temporal_bucket_pattern",
2407
- message: "Temporal bucket patterns cannot end with a separator."
2408
- } : { ok: !0, segments: i };
2409
- }
2410
- function Da(e) {
2411
- return e.flatMap(
2412
- (i) => i.kind === "token" ? [i.value] : []
2413
- );
2414
- }
2415
- function Ne(e, i) {
2416
- return e.filter((t) => i.includes(t)).length === 1;
2417
- }
2418
- function G(e, i) {
2419
- return e.some((t) => i.includes(t));
2420
- }
2421
- function Na(e) {
2422
- return new Set(e).size !== e.length;
2423
- }
2424
- function qa(e, i) {
2425
- if (Na(e)) return !1;
2426
- const t = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], s = ["HH", "mm", "ss"], r = Ne(e, t), l = Ne(e, n), d = e.includes("DD"), u = G(e, s);
2427
- switch (i) {
2428
- case "second":
2429
- return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
2430
- case "minute":
2431
- return e.includes("HH") && e.includes("mm") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
2432
- case "hour":
2433
- return e.includes("HH") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
2434
- case "day":
2435
- case "week":
2436
- return r && l && d && !u;
2437
- case "month":
2438
- return r && l && !d && !u;
2439
- case "quarter":
2440
- return !1;
2441
- case "year":
2442
- return r && !l && !d && !u;
2443
- }
2444
- }
2445
- function ce(e, i) {
2446
- if (e.presentation.mode === "auto")
2447
- return { ok: !0 };
2448
- if (e.presentation.mode === "preset") {
2449
- const n = hi[e.presentation.preset];
2450
- return n === i ? { ok: !0 } : {
2451
- ok: !1,
2452
- code: "incompatible_temporal_bucket_preset",
2453
- message: `Preset ${e.presentation.preset} requires ${n} granularity.`
2454
- };
2455
- }
2456
- const t = Fa(e.presentation.pattern);
2457
- return t.ok ? qa(
2458
- Da(t.segments),
2459
- i
2460
- ) ? { ok: !0, segments: t.segments } : {
2461
- ok: !1,
2462
- code: "incompatible_temporal_bucket_pattern",
2463
- message: `Pattern ${e.presentation.pattern} is not compatible with ${i} granularity.`
2464
- } : t;
2465
- }
2466
- function Gn(e, i) {
2467
- if (!(!e || !i))
2468
- return ce(e, i).ok ? e : void 0;
2469
- }
2470
2469
  function o(e, i, t) {
2471
2470
  return t ? { code: e, message: i, path: t } : { code: e, message: i };
2472
2471
  }
@@ -2481,7 +2480,7 @@ function Oa(e) {
2481
2480
  return !0;
2482
2481
  }
2483
2482
  function yi(e, i) {
2484
- return Di(e, i);
2483
+ return Qi(e, i);
2485
2484
  }
2486
2485
  function bi(e, i) {
2487
2486
  return yi(e, i) && P(e) === P(i);
@@ -2546,7 +2545,7 @@ function Ua(e, i) {
2546
2545
  return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
2547
2546
  }
2548
2547
  function P(e) {
2549
- return be(e);
2548
+ return ve(e);
2550
2549
  }
2551
2550
  const Ga = /^(\d{4})-(\d{2})-(\d{2})$/, _i = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
2552
2551
  function pe(e) {
@@ -2865,7 +2864,7 @@ function Wa(e, i) {
2865
2864
  path: `disambiguationFields.${l}`
2866
2865
  })) : []
2867
2866
  ].forEach(({ field: r, path: l }) => {
2868
- r != null && r.source && !ye(r.source, e.source) && i.push(
2867
+ r != null && r.source && !_e(r.source, e.source) && i.push(
2869
2868
  o(
2870
2869
  "input_options_field_source_mismatch",
2871
2870
  "Input option fields must belong to the declared option source.",
@@ -3047,7 +3046,7 @@ function $i(e, i, t) {
3047
3046
  "Value format type must be number, currency, percent, percentage, scientific, date, datetime, duration, string, or temporal_bucket.",
3048
3047
  `${i}.type`
3049
3048
  )
3050
- ), n.type === "temporal_bucket" && !le.safeParse(e).success && t.push(
3049
+ ), n.type === "temporal_bucket" && !de.safeParse(e).success && t.push(
3051
3050
  o(
3052
3051
  "invalid_temporal_bucket_format",
3053
3052
  "Temporal bucket format must contain a valid auto, preset, or pattern presentation.",
@@ -3214,10 +3213,10 @@ function cn(e, i, t) {
3214
3213
  ), Si(e.format, `${i}.format`, t);
3215
3214
  }
3216
3215
  function pn(e, i, t) {
3217
- e !== void 0 && (Mi(e) || t.push(
3216
+ e !== void 0 && (qi(e) || t.push(
3218
3217
  o(
3219
3218
  "invalid_time_grain",
3220
- `Matrix time grain must be one of: ${he.join(", ")}.`,
3219
+ `Matrix time grain must be one of: ${be.join(", ")}.`,
3221
3220
  i
3222
3221
  )
3223
3222
  ));
@@ -3348,7 +3347,7 @@ function Ve(e, i, t, n) {
3348
3347
  ), g(u.field, `${d}.field`, t, {
3349
3348
  required: !0
3350
3349
  }), pn(u.grain, `${d}.grain`, t);
3351
- const p = we(
3350
+ const p = ye(
3352
3351
  (j = u.field) == null ? void 0 : j.dataType
3353
3352
  ), y = ((E = u.field) == null ? void 0 : E.role) === "date" || p === "date" || p === "datetime", x = p === "string" || p === "number" || p === "boolean";
3354
3353
  y && !u.grain && t.push(
@@ -3363,13 +3362,13 @@ function Ve(e, i, t, n) {
3363
3362
  "Matrix grain is valid only for temporal axis fields.",
3364
3363
  `${d}.grain`
3365
3364
  )
3366
- ), u.format !== void 0 && (!u.grain || !le.safeParse(u.format).success ? t.push(
3365
+ ), u.format !== void 0 && (!u.grain || !de.safeParse(u.format).success ? t.push(
3367
3366
  o(
3368
3367
  "invalid_matrix_temporal_format",
3369
3368
  "Matrix temporal presentation requires a valid structured format and explicit grain.",
3370
3369
  `${d}.format`
3371
3370
  )
3372
- ) : ce(
3371
+ ) : se(
3373
3372
  u.format,
3374
3373
  u.grain
3375
3374
  ).ok || t.push(
@@ -3382,13 +3381,13 @@ function Ve(e, i, t, n) {
3382
3381
  const v = u.semanticTemporalPresentation;
3383
3382
  if (v !== void 0) {
3384
3383
  const Ae = v == null ? void 0 : v.format;
3385
- !u.grain || (v == null ? void 0 : v.granularity) !== u.grain || !le.safeParse(Ae).success ? t.push(
3384
+ !u.grain || (v == null ? void 0 : v.granularity) !== u.grain || !de.safeParse(Ae).success ? t.push(
3386
3385
  o(
3387
3386
  "invalid_matrix_temporal_format",
3388
3387
  "Matrix semantic temporal presentation must match the selected grain.",
3389
3388
  `${d}.semanticTemporalPresentation`
3390
3389
  )
3391
- ) : ce(
3390
+ ) : se(
3392
3391
  Ae,
3393
3392
  u.grain
3394
3393
  ).ok || t.push(
@@ -5030,83 +5029,83 @@ function Zn(e) {
5030
5029
  return { ok: i.length === 0, errors: i, warnings: t };
5031
5030
  }
5032
5031
  export {
5033
- Pn as $,
5032
+ Ln as $,
5034
5033
  Qn as A,
5035
5034
  Zn as B,
5036
- Se as C,
5037
- ka as D,
5038
- Ia as E,
5039
- we as F,
5040
- Ta as G,
5041
- pi as H,
5042
- mi as I,
5043
- De as J,
5044
- gi as K,
5045
- Ln as L,
5046
- Hn as M,
5047
- jt as N,
5048
- le as O,
5049
- Dt as P,
5050
- ai as Q,
5051
- Tn as R,
5052
- oe as S,
5053
- jn as T,
5054
- qt as U,
5055
- Ot as V,
5035
+ he as C,
5036
+ Ri as D,
5037
+ Mi as E,
5038
+ ye as F,
5039
+ Fi as G,
5040
+ Ue as H,
5041
+ Ge as I,
5042
+ Me as J,
5043
+ Ye as K,
5044
+ Tn as L,
5045
+ jn as M,
5046
+ Ut as N,
5047
+ de as O,
5048
+ Qt as P,
5049
+ li as Q,
5050
+ En as R,
5051
+ re as S,
5052
+ Cn as T,
5053
+ Xt as U,
5054
+ Wt as V,
5056
5055
  N as W,
5057
5056
  T as X,
5058
- ni as Y,
5059
- ve as Z,
5057
+ di as Y,
5058
+ Se as Z,
5060
5059
  O as _,
5061
- qn as a,
5062
- Bn as a0,
5063
- ue as a1,
5064
- oi as a2,
5065
- Gt as a3,
5066
- zt as a4,
5067
- Yt as a5,
5068
- Qt as a6,
5069
- ga as a7,
5070
- ha as a8,
5071
- ri as a9,
5072
- li as aa,
5073
- di as ab,
5074
- ya as ac,
5075
- _a as ad,
5076
- Vn as ae,
5077
- Cn as af,
5060
+ Kn as a,
5061
+ Hn as a0,
5062
+ ce as a1,
5063
+ ci as a2,
5064
+ oa as a3,
5065
+ ra as a4,
5066
+ la as a5,
5067
+ da as a6,
5068
+ Ma as a7,
5069
+ Ta as a8,
5070
+ pi as a9,
5071
+ mi as aa,
5072
+ fi as ab,
5073
+ ja as ac,
5074
+ Ca as ad,
5075
+ Gn as ae,
5076
+ qn as af,
5078
5077
  A as ag,
5079
- Ue as ah,
5080
- ye as ai,
5081
- Ge as aj,
5082
- Dn as ak,
5083
- Ni as al,
5084
- ce as am,
5085
- Un as an,
5086
- Fa as ao,
5087
- ja as ap,
5088
- Gn as aq,
5089
- Ei as b,
5090
- be as c,
5091
- fa as d,
5092
- ji as e,
5093
- Ci as f,
5094
- Kn as g,
5078
+ Ze as ah,
5079
+ _e as ai,
5080
+ Xe as aj,
5081
+ Pn as ak,
5082
+ Zi as al,
5083
+ se as am,
5084
+ Dn as an,
5085
+ Li as ao,
5086
+ Bi as ap,
5087
+ Nn as aq,
5088
+ Di as b,
5089
+ ve as c,
5090
+ Ra as d,
5091
+ Pi as e,
5092
+ zi as f,
5093
+ Un as g,
5095
5094
  zn as h,
5096
- On as i,
5097
- Fn as j,
5098
- se as k,
5095
+ Vn as i,
5096
+ On as j,
5097
+ oe as k,
5099
5098
  B as l,
5100
- Ri as m,
5101
- he as n,
5102
- Mi as o,
5103
- Nn as p,
5104
- Ti as q,
5105
- En as r,
5106
- Di as s,
5107
- de as t,
5099
+ Ni as m,
5100
+ be as n,
5101
+ qi as o,
5102
+ Bn as p,
5103
+ Oi as q,
5104
+ Fn as r,
5105
+ Qi as s,
5106
+ ue as t,
5108
5107
  pe as u,
5109
- Ye as v,
5108
+ Je as v,
5110
5109
  kn as w,
5111
5110
  Yn as x,
5112
5111
  xi as y,