react-semaphor 0.1.472 → 0.1.473

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 (67) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +102 -94
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.js +4 -4
  6. package/dist/chunks/{analyze-result-contract-B3agc2XU.js → analyze-result-contract-C8s8EUL5.js} +1 -1
  7. package/dist/chunks/{common-types-g_1fKJLK.js → common-types-BLPy5_E0.js} +1 -1
  8. package/dist/chunks/{dashboard-briefing-launcher-Lw4gjW_M.js → dashboard-briefing-launcher-B0f28WrK.js} +9 -9
  9. package/dist/chunks/{dashboard-briefing-launcher-8vxGyexK.cjs → dashboard-briefing-launcher-BjCkA5vw.cjs} +1 -1
  10. package/dist/chunks/{dashboard-controls-BKR8g3M9.cjs → dashboard-controls-BRclCQEX.cjs} +1 -1
  11. package/dist/chunks/{dashboard-controls-CRgDlxdt.js → dashboard-controls-CMJqSLgo.js} +9 -9
  12. package/dist/chunks/{dashboard-filter-value-compatibility-ilbH2A31.js → dashboard-filter-value-compatibility-9W8Ckcle.js} +168 -158
  13. package/dist/chunks/dashboard-filter-value-compatibility-Co1dn9Bc.cjs +1 -0
  14. package/dist/chunks/{dashboard-input-contract-Vr_3ApfF.js → dashboard-input-contract-BrGdGFz0.js} +6 -6
  15. package/dist/chunks/{dashboard-json-BhhVg9mI.js → dashboard-json-1ohpjO_q.js} +7 -7
  16. package/dist/chunks/{dashboard-json-CUgAzrYq.cjs → dashboard-json-DmtGHdDq.cjs} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-DlQtYQOO.js → edit-dashboard-visual-D9oKtOo6.js} +12 -12
  18. package/dist/chunks/{edit-dashboard-visual-BxmanBVo.cjs → edit-dashboard-visual-DNqJHdHE.cjs} +1 -1
  19. package/dist/chunks/{editor-action-buttons-CRWacpxi.js → editor-action-buttons-C_B8Wzkf.js} +6 -6
  20. package/dist/chunks/{editor-action-buttons-DKcD0UQy.cjs → editor-action-buttons-DwI3FcSw.cjs} +1 -1
  21. package/dist/chunks/{index-xdqe-Zvd.cjs → index-B6zSYUN4.cjs} +167 -167
  22. package/dist/chunks/{index-0fmECZL2.js → index-DalKzjEZ.js} +31914 -31864
  23. package/dist/chunks/{index-oVXvCLH-.js → index-DsvIlrI-.js} +9 -9
  24. package/dist/chunks/matrix-result-contract-Bhg60NtS.cjs +1 -0
  25. package/dist/chunks/matrix-result-contract-BpzhImar.js +421 -0
  26. package/dist/chunks/{pivot-header-presentation-7XrwJYDm.js → pivot-header-presentation-Be3FyR0N.js} +2 -2
  27. package/dist/chunks/{pivot-result-identity-5v4hRVbc.js → pivot-result-identity-CIZXsI53.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-O_roVguV.js → pivot-result-lifecycle-PxmbJWkm.js} +19 -19
  29. package/dist/chunks/{raw-temporal-contract-BEMf3avg.js → raw-temporal-contract-U8J9RlEH.js} +1 -1
  30. package/dist/chunks/{report-preferences-dialog-Dxt9XMpd.js → report-preferences-dialog-C9mJffNQ.js} +6 -6
  31. package/dist/chunks/{report-preferences-dialog-8KYKazoG.cjs → report-preferences-dialog-DGMd-eTT.cjs} +1 -1
  32. package/dist/chunks/{report-runtime-context-DnNbpkGo.js → report-runtime-context-DNbgCsko.js} +7 -7
  33. package/dist/chunks/{saved-temporal-bucket-format-CygnBDO2.js → saved-temporal-bucket-format-CHsXUPJI.js} +8 -8
  34. package/dist/chunks/source-entity-resolution-BDC-Qngk.cjs +1 -0
  35. package/dist/chunks/source-entity-resolution-ugN3sZUk.js +781 -0
  36. package/dist/chunks/{switch-CQN9Hzho.cjs → switch-B4eH4guz.cjs} +13 -13
  37. package/dist/chunks/{switch-n2yUNY8i.js → switch-D20CIzj6.js} +1460 -1455
  38. package/dist/chunks/{temporal-bucket-CUKJktCl.js → temporal-bucket-CtP7hKLa.js} +12 -12
  39. package/dist/chunks/{temporal-bucket-authoring-CZoJV2L6.js → temporal-bucket-authoring-DJ9kK2wD.js} +3 -3
  40. package/dist/chunks/{temporal-bucket-contract-Cno9TlYr.js → temporal-bucket-contract-CZl5D7FZ.js} +1 -1
  41. package/dist/chunks/{token-types-W3EHNW-D.js → token-types-DfDtCqlw.js} +1 -1
  42. package/dist/chunks/{update-policy-kRNJwwUV.js → update-policy-BybMiM61.js} +1 -1
  43. package/dist/chunks/{validators-B5t1s8oh.js → validators-D-T-2HOR.js} +50 -50
  44. package/dist/dashboard/index.cjs +1 -1
  45. package/dist/dashboard/index.js +2 -2
  46. package/dist/dashboard-authoring/index.cjs +3 -3
  47. package/dist/dashboard-authoring/index.js +355 -341
  48. package/dist/data-app-builder/index.cjs +1 -1
  49. package/dist/data-app-builder/index.js +2 -2
  50. package/dist/data-app-codegen/index.js +2 -2
  51. package/dist/data-app-codegen-node/index.js +3 -3
  52. package/dist/data-app-sdk/index.js +3 -3
  53. package/dist/data-app-sdk-adapters/index.js +2 -2
  54. package/dist/data-app-sdk-validation/index.js +9 -9
  55. package/dist/format-utils/index.js +10 -10
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.js +14 -14
  58. package/dist/report-runtime-context/index.js +2 -2
  59. package/dist/surfboard/index.cjs +1 -1
  60. package/dist/surfboard/index.js +3 -3
  61. package/dist/types/analytics-protocol.d.ts +141 -0
  62. package/dist/types/index.js +4 -4
  63. package/dist/types/main.d.ts +7 -0
  64. package/package.json +1 -1
  65. package/dist/chunks/dashboard-filter-value-compatibility-Dmh-NaPK.cjs +0 -1
  66. package/dist/chunks/matrix-result-contract-DoU9diAh.js +0 -822
  67. package/dist/chunks/matrix-result-contract-SrzyG_KQ.cjs +0 -1
@@ -1,9 +1,10 @@
1
1
  var K = Object.defineProperty;
2
2
  var Q = (e, n, t) => n in e ? K(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var H = (e, n, t) => Q(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { ai as I, ak as Y, h as z, af as G, ah as S, B as $, E as R } from "./validators-B5t1s8oh.js";
5
- import "./analyze-result-contract-B3agc2XU.js";
3
+ var j = (e, n, t) => Q(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { ai as y, ak as Y, j as P, C as $, F as C } from "./validators-D-T-2HOR.js";
5
+ import "./analyze-result-contract-C8s8EUL5.js";
6
6
  import "../value-format-preferences/index.js";
7
+ import { l as G } from "./source-entity-resolution-ugN3sZUk.js";
7
8
  function c(e) {
8
9
  return typeof e == "string" && e.trim().length > 0 ? e.trim() : null;
9
10
  }
@@ -19,7 +20,7 @@ function X(e) {
19
20
  s && t ? `${s}.${t}.${n}` : null
20
21
  ]) : [];
21
22
  }
22
- function L(e) {
23
+ function H(e) {
23
24
  const n = c(e.table) || c(e.tableName);
24
25
  return J([
25
26
  c(e.name),
@@ -44,25 +45,25 @@ function Z(e, n) {
44
45
  const a = c(e.connectionId), o = c(n.connectionId);
45
46
  return !!(a && o && a !== o);
46
47
  }
47
- function x(e, n = !1) {
48
+ function R(e, n = !1) {
48
49
  return c(e.table) || c(e.tableName) || (e.type !== "dataset" || n ? c(e.name) : null);
49
50
  }
50
- function w(e) {
51
+ function x(e) {
51
52
  return c(e.catalog) || c(e.database) || c(e.databaseName);
52
53
  }
53
- function B(e) {
54
+ function w(e) {
54
55
  return c(e.schema) || c(e.schemaName);
55
56
  }
56
57
  function T(e) {
57
58
  return e.length === 1 ? e[0] : void 0;
58
59
  }
59
- function ee(e, n) {
60
- const t = x(n, !0), s = w(n), i = B(n);
60
+ function S(e, n) {
61
+ const t = R(n, !0), s = x(n), i = w(n);
61
62
  if (!(!t || !s && !i))
62
63
  return T(
63
64
  e.filter((d) => {
64
65
  const a = d;
65
- return !(x(a) !== t || s && w(a) !== s || i && B(a) !== i);
66
+ return !(R(a) !== t || s && x(a) !== s || i && w(a) !== i);
66
67
  })
67
68
  );
68
69
  }
@@ -97,33 +98,33 @@ function E(e, n) {
97
98
  ), s.length === 1)
98
99
  return s[0];
99
100
  }
100
- if (!!(x(n, !0) && (w(n) || B(n))))
101
- return ee(t, n);
101
+ if (!!(R(n, !0) && (x(n) || w(n))))
102
+ return S(t, n);
102
103
  if (s.length > 1)
103
104
  return;
104
- const d = L(n);
105
+ const d = H(n);
105
106
  if (d.length === 0)
106
107
  return;
107
- const a = t.filter((o) => L(
108
+ const a = t.filter((o) => H(
108
109
  o
109
110
  ).some(
110
111
  (r) => d.includes(r)
111
112
  ));
112
113
  return T(a);
113
114
  }
114
- function C(e, n) {
115
+ function A(e, n) {
115
116
  const t = E(e, n);
116
117
  return t ? { ...n, ...t } : n;
117
118
  }
118
- function De(e, n) {
119
+ function Ne(e, n) {
119
120
  const t = n || [];
120
121
  return t.length === 0 ? e : {
121
122
  ...e,
122
- baseEntity: C(t, e.baseEntity),
123
+ baseEntity: A(t, e.baseEntity),
123
124
  joins: e.joins.map((s) => ({
124
125
  ...s,
125
- source: C(t, s.source),
126
- target: C(t, s.target)
126
+ source: A(t, s.source),
127
+ target: A(t, s.target)
127
128
  }))
128
129
  };
129
130
  }
@@ -138,35 +139,44 @@ function Ae(e, n) {
138
139
  !E(n, i) && !E(s, i) && s.push(i);
139
140
  }), s;
140
141
  }
141
- function y(e) {
142
+ function I(e) {
142
143
  return !!e && typeof e == "object" && !Array.isArray(e);
143
144
  }
144
145
  function k(e) {
145
- return y(e) && typeof e.name == "string";
146
+ return I(e) && typeof e.name == "string";
146
147
  }
147
- function v(e) {
148
- return !y(e) || e.kind !== "semantic" && e.kind !== "physical" || (e.kind === "semantic" ? [e.datasetId, e.datasetName, e.connectionId] : [e.databaseName, e.schemaName]).some(
148
+ function B(e) {
149
+ return !I(e) || e.kind !== "semantic" && e.kind !== "physical" || (e.kind === "semantic" ? [e.datasetId, e.datasetName, e.connectionId] : [e.databaseName, e.schemaName]).some(
149
150
  (t) => t !== void 0 && typeof t != "string"
150
- ) ? !1 : z(
151
+ ) ? !1 : P(
151
152
  e
152
153
  );
153
154
  }
154
155
  function M(e, n) {
155
156
  var r, g;
156
- const t = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities.filter(k) : void 0, s = E(t, e), i = s ? { ...e, ...s } : e, d = i.type === "dataset" && "domainId" in i && typeof i.domainId == "string" && !!i.domainId.trim();
157
+ const t = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities.filter(k) : void 0, s = E(t, e), i = s ? { ...e, ...s } : e, d = "domainId" in i && typeof i.domainId == "string" && !!i.domainId.trim();
157
158
  if ((n == null ? void 0 : n.mode) === "semanticDomain" && !d)
158
159
  return;
159
- if ((n == null ? void 0 : n.mode) !== "database" && i.type === "dataset" && "domainId" in i && i.domainId) {
160
- const f = i, u = {
161
- kind: "semantic",
162
- domainId: f.domainId,
163
- datasetId: G(f),
164
- datasetName: f.name,
165
- connectionId: f.connectionId || (n == null ? void 0 : n.connectionId),
166
- label: f.label
167
- };
168
- return v(u) ? S(u) : void 0;
160
+ if ((n == null ? void 0 : n.mode) !== "database" && i.type === "dataset") {
161
+ const u = G(
162
+ {
163
+ entities: [i],
164
+ semanticDomainId: n == null ? void 0 : n.semanticDomainId,
165
+ connectionId: n == null ? void 0 : n.connectionId,
166
+ fieldEntityType: "dataset"
167
+ },
168
+ { includePhysicalDatasets: !0 }
169
+ );
170
+ if (u.kind === "resolved") {
171
+ const f = "label" in i && typeof i.label == "string" ? i.label : void 0;
172
+ return {
173
+ ...u.source,
174
+ ...f ? { label: f } : {}
175
+ };
176
+ }
169
177
  }
178
+ if ((n == null ? void 0 : n.mode) === "semanticDomain")
179
+ return;
170
180
  const a = i.connectionId || (n == null ? void 0 : n.connectionId), o = i.type === "dataset" && "table" in i && i.table ? i.table : i.name;
171
181
  if (!a || !o)
172
182
  return;
@@ -179,9 +189,9 @@ function M(e, n) {
179
189
  schemaName: i.schema || ((g = n == null ? void 0 : n.dbSelection) == null ? void 0 : g.schema),
180
190
  dialect: i.dialect
181
191
  };
182
- return v(l) ? l : void 0;
192
+ return B(l) ? l : void 0;
183
193
  }
184
- function ne(e, n) {
194
+ function ee(e, n) {
185
195
  var o, l;
186
196
  const t = M(e, n);
187
197
  if (!t) return;
@@ -193,15 +203,15 @@ function ne(e, n) {
193
203
  } : void 0;
194
204
  return { source: t, ...a ? { executionTable: a } : {} };
195
205
  }
196
- function te(e) {
197
- const n = y(e.dataSource) ? e.dataSource : void 0;
206
+ function ne(e) {
207
+ const n = I(e.dataSource) ? e.dataSource : void 0;
198
208
  if (typeof e.sql == "string" && e.sql.trim()) {
199
209
  const a = [], o = Array.isArray(n == null ? void 0 : n.selectedEntities) ? n.selectedEntities : [];
200
210
  for (const l of o) {
201
211
  if (!k(l)) continue;
202
- const r = ne(l, n);
212
+ const r = ee(l, n);
203
213
  r && !a.some(
204
- (g) => I(
214
+ (g) => y(
205
215
  g.source,
206
216
  r.source
207
217
  )
@@ -213,15 +223,15 @@ function te(e) {
213
223
  pinnedCatalogSources: a
214
224
  };
215
225
  }
216
- if (!y(e.config))
226
+ if (!I(e.config))
217
227
  return { cardId: e.id, kind: "unconfigured" };
218
- const t = [], s = y(e.config.matrixIntent) ? e.config.matrixIntent : void 0, i = e.type === "matrixTable" ? (s == null ? void 0 : s.kind) === "matrix" ? s.source : e.config.source : void 0;
219
- v(i) && t.push(i);
220
- const d = y(e.config.joinPlan) ? e.config.joinPlan : void 0;
228
+ const t = [], s = I(e.config.matrixIntent) ? e.config.matrixIntent : void 0, i = e.type === "matrixTable" ? (s == null ? void 0 : s.kind) === "matrix" ? s.source : e.config.source : void 0;
229
+ B(i) && t.push(i);
230
+ const d = I(e.config.joinPlan) ? e.config.joinPlan : void 0;
221
231
  if (d) {
222
232
  const a = Array.isArray(d.joins) ? d.joins : [], o = [d.baseEntity];
223
233
  for (const r of a)
224
- y(r) && o.push(r.source, r.target);
234
+ I(r) && o.push(r.source, r.target);
225
235
  let l = !1;
226
236
  for (const r of o) {
227
237
  if (!k(r)) {
@@ -241,7 +251,7 @@ function te(e) {
241
251
  }
242
252
  if (!t.length && !d && e.type !== "matrixTable") {
243
253
  const a = e.config.queryBaseSource;
244
- v(a) && t.push(a);
254
+ B(a) && t.push(a);
245
255
  }
246
256
  return {
247
257
  cardId: e.id,
@@ -249,15 +259,15 @@ function te(e) {
249
259
  executableSources: Y(t)
250
260
  };
251
261
  }
252
- function ie(e, n) {
262
+ function te(e, n) {
253
263
  return (e.kind === "config" ? e.executableSources : e.kind === "sql" ? e.pinnedCatalogSources.map((s) => s.source) : []).some(
254
- (s) => I(s, n)
264
+ (s) => y(s, n)
255
265
  );
256
266
  }
257
267
  function Ce(e, n) {
258
268
  if (e.kind === "config")
259
269
  return e.executableSources.find(
260
- (t) => I(t, n)
270
+ (t) => y(t, n)
261
271
  );
262
272
  }
263
273
  function Re(e, n) {
@@ -267,10 +277,10 @@ function Re(e, n) {
267
277
  function U(e, n) {
268
278
  if (e.kind === "sql")
269
279
  return e.pinnedCatalogSources.find(
270
- (t) => I(t.source, n)
280
+ (t) => y(t.source, n)
271
281
  );
272
282
  }
273
- function j(e) {
283
+ function L(e) {
274
284
  const n = /* @__PURE__ */ new Set();
275
285
  for (const t of [e.name, e.sourceField]) {
276
286
  if (!t) continue;
@@ -283,20 +293,20 @@ function j(e) {
283
293
  return n;
284
294
  }
285
295
  function V(e, n) {
286
- const t = R(e), s = R(n);
296
+ const t = C(e), s = C(n);
287
297
  return t === "unknown" || s === "unknown" ? !1 : (t === "date" || t === "datetime") && (s === "date" || s === "datetime") ? !0 : t === s;
288
298
  }
289
- function se(e, n) {
290
- return I(e.field.source, n.field.source) && $(e.field.name) === $(n.field.name) && $(e.field.sourceField || e.field.name) === $(n.field.sourceField || n.field.name);
299
+ function ie(e, n) {
300
+ return y(e.field.source, n.field.source) && $(e.field.name) === $(n.field.name) && $(e.field.sourceField || e.field.name) === $(n.field.sourceField || n.field.name);
291
301
  }
292
- function re(e, n) {
302
+ function se(e, n) {
293
303
  if (e.kind !== "field") return !1;
294
- const t = j(n), s = j(e.field);
304
+ const t = L(n), s = L(e.field);
295
305
  return V(n.dataType, e.field.dataType) && [...s].some((i) => t.has(i));
296
306
  }
297
307
  function xe(e) {
298
308
  const n = e.candidates.filter(
299
- (t) => re(
309
+ (t) => se(
300
310
  t,
301
311
  e.logicalValueField
302
312
  )
@@ -310,16 +320,16 @@ function we(e) {
310
320
  e.logicalValueField.dataType,
311
321
  t.field.dataType
312
322
  ) || n.some(
313
- (s) => se(s, t)
323
+ (s) => ie(s, t)
314
324
  ) || n.push(t);
315
325
  return n.length === 1 ? { status: "matched", target: n[0] } : n.length > 1 ? { status: "ambiguous" } : { status: "notApplicable" };
316
326
  }
317
- const oe = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, ae = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, de = /\bwhere\b/i;
318
- function ce(e) {
319
- return e != null && e.trim() ? oe.test(e) || ae.test(e) : !1;
327
+ const re = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, oe = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, ae = /\bwhere\b/i;
328
+ function de(e) {
329
+ return e != null && e.trim() ? re.test(e) || oe.test(e) : !1;
320
330
  }
321
331
  function Be(e) {
322
- return !(e != null && e.trim()) || ce(e) ? null : de.test(e) ? {
332
+ return !(e != null && e.trim()) || de(e) ? null : ae.test(e) ? {
323
333
  helper: "{{ filters | and }}",
324
334
  description: "For queries with an existing WHERE clause."
325
335
  } : {
@@ -327,7 +337,7 @@ function Be(e) {
327
337
  description: "For queries without a WHERE clause."
328
338
  };
329
339
  }
330
- function le(e) {
340
+ function ce(e) {
331
341
  return (e.field.sourceField || e.field.name).trim() || void 0;
332
342
  }
333
343
  function Me(e) {
@@ -336,7 +346,7 @@ function Me(e) {
336
346
  const n = U(
337
347
  e.inventory,
338
348
  e.target.field.source
339
- ), t = le(e.target);
349
+ ), t = ce(e.target);
340
350
  if (!n || !t) return { status: "ineligible" };
341
351
  if (n.executionTable) {
342
352
  const a = [
@@ -360,7 +370,7 @@ function Me(e) {
360
370
  ), d = [];
361
371
  for (const a of i)
362
372
  d.some(
363
- (o) => I(o, a.field.source)
373
+ (o) => y(o, a.field.source)
364
374
  ) || d.push(a.field.source);
365
375
  return d.length > 1 ? { status: "ineligible" } : {
366
376
  status: "eligible",
@@ -368,14 +378,14 @@ function Me(e) {
368
378
  executionIdentifier: t
369
379
  };
370
380
  }
371
- class fe extends Error {
381
+ class le extends Error {
372
382
  constructor(t) {
373
383
  super(t.map((s) => s.message).join(" "));
374
- H(this, "issues");
384
+ j(this, "issues");
375
385
  this.name = "DashboardFilterMappingContractError", this.issues = t;
376
386
  }
377
387
  }
378
- const ue = {
388
+ const fe = {
379
389
  string: !0,
380
390
  number: !0,
381
391
  boolean: !0,
@@ -391,7 +401,7 @@ function m(e) {
391
401
  function F(e) {
392
402
  return Array.isArray(e) && e.every((n) => typeof n == "string");
393
403
  }
394
- function me(e) {
404
+ function ue(e) {
395
405
  if (!m(e)) return !1;
396
406
  switch (e.kind) {
397
407
  case "allSheets":
@@ -408,13 +418,13 @@ function me(e) {
408
418
  return !1;
409
419
  }
410
420
  }
411
- function he(e) {
421
+ function me(e) {
412
422
  return e === "shared" || e === "perSheet" || e === "perCard" || e === "perDocumentSection";
413
423
  }
414
- function ge(e) {
424
+ function he(e) {
415
425
  return m(e) ? h(e.id) && h(e.column) && h(e.dataType) : !1;
416
426
  }
417
- function be(e, n, t, s) {
427
+ function ge(e, n, t, s) {
418
428
  var o;
419
429
  if (!m(n)) {
420
430
  s.push({
@@ -430,7 +440,7 @@ function be(e, n, t, s) {
430
440
  ["valueField", n.valueField],
431
441
  ["searchField", n.searchField]
432
442
  ];
433
- if (!m(i) || i.kind !== "semantic" && i.kind !== "physical" || !z(i) || !m(n.labelField) || !m(n.valueField) || n.searchField !== void 0 && !m(n.searchField) || n.disambiguationFields !== void 0 && (!Array.isArray(n.disambiguationFields) || !n.disambiguationFields.every(m))) {
443
+ if (!m(i) || i.kind !== "semantic" && i.kind !== "physical" || !P(i) || !m(n.labelField) || !m(n.valueField) || n.searchField !== void 0 && !m(n.searchField) || n.disambiguationFields !== void 0 && (!Array.isArray(n.disambiguationFields) || !n.disambiguationFields.every(m))) {
434
444
  s.push({
435
445
  code: "invalid_option_source",
436
446
  path: t,
@@ -440,7 +450,7 @@ function be(e, n, t, s) {
440
450
  return;
441
451
  }
442
452
  for (const [l, r] of d)
443
- r !== void 0 && m(r) && (!h(r.name) || r.source !== void 0 && !I(
453
+ r !== void 0 && m(r) && (!h(r.name) || r.source !== void 0 && !y(
444
454
  r.source,
445
455
  i
446
456
  )) && s.push({
@@ -450,7 +460,7 @@ function be(e, n, t, s) {
450
460
  inputId: e
451
461
  });
452
462
  for (const [l, r] of ((o = n.disambiguationFields) == null ? void 0 : o.entries()) || [])
453
- (!m(r) || !h(r.name) || r.source !== void 0 && !I(
463
+ (!m(r) || !h(r.name) || r.source !== void 0 && !y(
454
464
  r.source,
455
465
  i
456
466
  )) && s.push({
@@ -469,7 +479,7 @@ function be(e, n, t, s) {
469
479
  inputId: e
470
480
  });
471
481
  }
472
- function pe(e, n, t, s, i, d) {
482
+ function be(e, n, t, s, i, d) {
473
483
  var r;
474
484
  if (h(n.bindingId) || i.push({
475
485
  code: "invalid_binding_id",
@@ -489,7 +499,7 @@ function pe(e, n, t, s, i, d) {
489
499
  return;
490
500
  }
491
501
  const a = n.target.field;
492
- if (!h(a == null ? void 0 : a.name) || !a.source || a.source.kind !== "semantic" && a.source.kind !== "physical" || !z(a.source)) {
502
+ if (!h(a == null ? void 0 : a.name) || !a.source || a.source.kind !== "semantic" && a.source.kind !== "physical" || !P(a.source)) {
493
503
  i.push({
494
504
  code: "invalid_target_field",
495
505
  path: `${t}.target.field`,
@@ -501,7 +511,7 @@ function pe(e, n, t, s, i, d) {
501
511
  return;
502
512
  }
503
513
  if (Object.prototype.hasOwnProperty.call(
504
- ue,
514
+ fe,
505
515
  a.dataType
506
516
  ) || i.push({
507
517
  code: "unknown_target_data_type",
@@ -530,8 +540,8 @@ function pe(e, n, t, s, i, d) {
530
540
  });
531
541
  return;
532
542
  }
533
- const l = te(o);
534
- (l.kind === "unconfigured" || !ie(l, a.source)) && i.push({
543
+ const l = ne(o);
544
+ (l.kind === "unconfigured" || !te(l, a.source)) && i.push({
535
545
  code: "unavailable_card_source",
536
546
  path: `${t}.target.field.source`,
537
547
  message: `${t}.target field source is not declared by card '${o.id}'.`,
@@ -540,7 +550,7 @@ function pe(e, n, t, s, i, d) {
540
550
  bindingId: n.bindingId
541
551
  });
542
552
  }
543
- function Ie(e, n, t, s, i, d) {
553
+ function pe(e, n, t, s, i, d) {
544
554
  if (n === void 0) return;
545
555
  if (!m(n) || n.kind !== "cardMappings" || !Array.isArray(n.cards)) {
546
556
  i.push({
@@ -583,7 +593,7 @@ function Ie(e, n, t, s, i, d) {
583
593
  });
584
594
  return;
585
595
  }
586
- o.kind === "bound" ? pe(
596
+ o.kind === "bound" ? be(
587
597
  e,
588
598
  o,
589
599
  r,
@@ -615,12 +625,12 @@ function ye({
615
625
  path: "dashboard.inputs",
616
626
  message: "dashboard.inputs must be an array when present."
617
627
  }), { ok: !1, inputs: o, issues: i }) : ((Array.isArray(e) ? e : []).forEach((r, g) => {
618
- const f = `dashboard.inputs[${g}]`;
619
- if (!m(r) || r.kind !== "filter" && r.kind !== "control" || !h(r.id) || !h(r.label) || !h(r.variableName) || !me(r.scope) || !he(r.runtimeScope)) {
628
+ const u = `dashboard.inputs[${g}]`;
629
+ if (!m(r) || r.kind !== "filter" && r.kind !== "control" || !h(r.id) || !h(r.label) || !h(r.variableName) || !ue(r.scope) || !me(r.runtimeScope)) {
620
630
  i.push({
621
631
  code: "invalid_input",
622
- path: f,
623
- message: `${f} must be a complete filter or control Dashboard Input envelope.`,
632
+ path: u,
633
+ message: `${u} must be a complete filter or control Dashboard Input envelope.`,
624
634
  inputId: m(r) && typeof r.id == "string" ? r.id : void 0
625
635
  });
626
636
  return;
@@ -628,74 +638,74 @@ function ye({
628
638
  if (r.kind === "control" && !m(r.control)) {
629
639
  i.push({
630
640
  code: "invalid_input",
631
- path: `${f}.control`,
632
- message: `${f}.control must be a control definition.`,
641
+ path: `${u}.control`,
642
+ message: `${u}.control must be a control definition.`,
633
643
  inputId: r.id
634
644
  });
635
645
  return;
636
646
  }
637
- const u = r;
638
- if (u.kind === "control") {
639
- o.push(u);
647
+ const f = r;
648
+ if (f.kind === "control") {
649
+ o.push(f);
640
650
  return;
641
651
  }
642
- const N = u.filter, p = u.filterReference, _ = N !== void 0, P = !!p;
643
- if (_ && P) {
652
+ const v = f.filter, p = f.filterReference, _ = v !== void 0, z = !!p;
653
+ if (_ && z) {
644
654
  i.push({
645
655
  code: "both_filter_definitions",
646
- path: f,
647
- message: `${f} must contain either filter or filterReference, not both.`,
648
- inputId: u.id
656
+ path: u,
657
+ message: `${u} must contain either filter or filterReference, not both.`,
658
+ inputId: f.id
649
659
  });
650
660
  return;
651
661
  }
652
- if (!_ && !P) {
662
+ if (!_ && !z) {
653
663
  i.push({
654
664
  code: "missing_filter_definition",
655
- path: f,
656
- message: `${f} must contain filter or filterReference.`,
657
- inputId: u.id
665
+ path: u,
666
+ message: `${u} must contain filter or filterReference.`,
667
+ inputId: f.id
658
668
  });
659
669
  return;
660
670
  }
661
- if (_ && !ge(N)) {
671
+ if (_ && !he(v)) {
662
672
  i.push({
663
673
  code: "invalid_input",
664
- path: `${f}.filter`,
665
- message: `${f}.filter must be a complete dashboard filter definition.`,
666
- inputId: u.id
674
+ path: `${u}.filter`,
675
+ message: `${u}.filter must be a complete dashboard filter definition.`,
676
+ inputId: f.id
667
677
  });
668
678
  return;
669
679
  }
670
680
  let b, D;
671
681
  if (_)
672
- b = N, D = "embedded";
682
+ b = v, D = "embedded";
673
683
  else {
674
684
  if ((p == null ? void 0 : p.kind) !== "dashboardFilter") {
675
685
  i.push({
676
686
  code: "invalid_filter_reference",
677
- path: `${f}.filterReference.kind`,
678
- message: `${f}.filterReference.kind must be 'dashboardFilter'.`,
679
- inputId: u.id
687
+ path: `${u}.filterReference.kind`,
688
+ message: `${u}.filterReference.kind must be 'dashboardFilter'.`,
689
+ inputId: f.id
680
690
  });
681
691
  return;
682
692
  }
683
- const A = typeof (p == null ? void 0 : p.filterId) == "string" ? p.filterId : void 0;
684
- if (b = A ? d.get(A) : void 0, D = "dashboardFilter", !b) {
693
+ const N = typeof (p == null ? void 0 : p.filterId) == "string" ? p.filterId : void 0;
694
+ if (b = N ? d.get(N) : void 0, D = "dashboardFilter", !b) {
685
695
  i.push({
686
696
  code: "orphaned_filter_reference",
687
- path: `${f}.filterReference.filterId`,
688
- message: `${f}.filterReference cannot resolve dashboard filter '${A || ""}'.`,
689
- inputId: u.id
697
+ path: `${u}.filterReference.filterId`,
698
+ message: `${u}.filterReference cannot resolve dashboard filter '${N || ""}'.`,
699
+ inputId: f.id
690
700
  });
691
701
  return;
692
702
  }
693
703
  if (b.kind === "global-date") {
694
704
  i.push({
695
705
  code: "global_date_reference",
696
- path: `${f}.filterReference`,
697
- message: `${f}.filterReference cannot reference the Global Date filter.`,
698
- inputId: u.id
706
+ path: `${u}.filterReference`,
707
+ message: `${u}.filterReference cannot reference the Global Date filter.`,
708
+ inputId: f.id
699
709
  });
700
710
  return;
701
711
  }
@@ -703,71 +713,71 @@ function ye({
703
713
  if (q) {
704
714
  i.push({
705
715
  code: "duplicate_filter_reference",
706
- path: `${f}.filterReference.filterId`,
707
- message: `${f}.filterReference duplicates dashboard filter '${b.id}' already owned by Dashboard Input '${q}'.`,
708
- inputId: u.id
716
+ path: `${u}.filterReference.filterId`,
717
+ message: `${u}.filterReference duplicates dashboard filter '${b.id}' already owned by Dashboard Input '${q}'.`,
718
+ inputId: f.id
709
719
  });
710
720
  return;
711
721
  }
712
- l.set(b.id, u.id);
722
+ l.set(b.id, f.id);
713
723
  }
714
724
  if (!b) return;
715
- if (u.optionSource !== void 0 && be(
716
- u.id,
717
- u.optionSource,
718
- `${f}.optionSource`,
725
+ if (f.optionSource !== void 0 && ge(
726
+ f.id,
727
+ f.optionSource,
728
+ `${u}.optionSource`,
719
729
  i
720
- ), u.application && b.kind === "global-date") {
730
+ ), f.application && b.kind === "global-date") {
721
731
  i.push({
722
732
  code: "global_date_reference",
723
- path: `${f}.application`,
724
- message: `${f}.application cannot map the Global Date filter.`,
725
- inputId: u.id
733
+ path: `${u}.application`,
734
+ message: `${u}.application cannot map the Global Date filter.`,
735
+ inputId: f.id
726
736
  });
727
737
  return;
728
738
  }
729
- u.application && u.scope.kind !== "allSheets" && u.scope.kind !== "sheets" && i.push({
739
+ f.application && f.scope.kind !== "allSheets" && f.scope.kind !== "sheets" && i.push({
730
740
  code: "unsupported_mapped_scope",
731
- path: `${f}.scope`,
732
- message: `${f}.scope must be allSheets or sheets when cardMappings are present.`,
733
- inputId: u.id
734
- }), Ie(
735
- u.id,
736
- u.application,
737
- `${f}.application`,
741
+ path: `${u}.scope`,
742
+ message: `${u}.scope must be allSheets or sheets when cardMappings are present.`,
743
+ inputId: f.id
744
+ }), pe(
745
+ f.id,
746
+ f.application,
747
+ `${u}.application`,
738
748
  a,
739
749
  i,
740
750
  s
741
751
  );
742
752
  const {
743
- filter: Fe,
744
- filterReference: Te,
753
+ filter: _e,
754
+ filterReference: Fe,
745
755
  // A reference-backed authored input must shadow the generated
746
756
  // dashboard-filter compatibility input. Older writers may have copied
747
757
  // the compatibility marker onto the reference; never preserve it.
748
758
  compatibility: O,
749
759
  ...W
750
- } = u;
760
+ } = f;
751
761
  o.push({
752
762
  ...W,
753
763
  filter: b,
754
764
  ..._ && O ? { compatibility: O } : {},
755
- ...u.optionSource ? {
756
- optionSource: u.optionSource
765
+ ...f.optionSource ? {
766
+ optionSource: f.optionSource
757
767
  } : {},
758
768
  definitionOrigin: D
759
769
  });
760
770
  }), i.length ? { ok: !1, inputs: o, issues: i } : { ok: !0, inputs: o });
761
771
  }
762
- function ze(e) {
772
+ function Pe(e) {
763
773
  const n = ye(e);
764
- if (!n.ok) throw new fe(n.issues);
774
+ if (!n.ok) throw new le(n.issues);
765
775
  return n.inputs;
766
776
  }
767
- function Pe(e = () => globalThis.crypto.randomUUID()) {
777
+ function ze(e = () => globalThis.crypto.randomUUID()) {
768
778
  return e();
769
779
  }
770
- const $e = {
780
+ const Ie = {
771
781
  date: /* @__PURE__ */ new Set([
772
782
  "between",
773
783
  "not between",
@@ -806,31 +816,31 @@ const $e = {
806
816
  ]),
807
817
  boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
808
818
  };
809
- function _e(e) {
810
- const n = R(e);
819
+ function $e(e) {
820
+ const n = C(e);
811
821
  return n === "number" || n === "boolean" ? n : n === "date" || n === "datetime" ? "date" : "string";
812
822
  }
813
823
  function Oe(e, n) {
814
- return typeof n != "string" ? !1 : $e[_e(e)].has(n);
824
+ return typeof n != "string" ? !1 : Ie[$e(e)].has(n);
815
825
  }
816
826
  export {
817
- fe as D,
827
+ le as D,
818
828
  Re as a,
819
- te as b,
829
+ ne as b,
820
830
  U as c,
821
- ie as d,
822
- re as e,
831
+ te as d,
832
+ se as e,
823
833
  Ce as f,
824
834
  we as g,
825
- ce as h,
835
+ de as h,
826
836
  Be as i,
827
837
  Me as j,
828
- ze as k,
829
- Pe as l,
830
- _e as m,
838
+ Pe as k,
839
+ ze as l,
840
+ $e as m,
831
841
  ye as n,
832
842
  Oe as o,
833
- De as p,
843
+ Ne as p,
834
844
  Ae as q,
835
845
  xe as r
836
846
  };