react-semaphor 0.1.591 → 0.1.592

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 (45) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +2 -2
  3. package/dist/chunks/{assistant-chat-Cazikwyh.js → assistant-chat-BusR-5uT.js} +7 -7
  4. package/dist/chunks/bookmark-impact-DozXJZDS.js +76 -0
  5. package/dist/chunks/{bookmark-state-Bt_eQEqt.js → bookmark-state-Be2W3s6t.js} +174 -166
  6. package/dist/chunks/{card-filter-builder-DFR-6Jpm.js → card-filter-builder-DBTJ74yy.js} +73 -73
  7. package/dist/chunks/{comparison-window-caption-CFaw-kIV.js → comparison-window-caption-h8w3ySL6.js} +88 -89
  8. package/dist/chunks/{dashboard-DCh9hKnJ.js → dashboard-CmzJzmph.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-ob8G1b58.js → dashboard-briefing-launcher-BOQGpYr2.js} +84 -84
  10. package/dist/chunks/{dashboard-controls-Nszg0k1A.js → dashboard-controls-BxI3e2_o.js} +9 -9
  11. package/dist/chunks/{dashboard-json-BpwnG23b.js → dashboard-json-BMqXV2Rx.js} +1 -1
  12. package/dist/chunks/{dates-BOLBSBpn.js → dates-DBsscxL_.js} +6 -6
  13. package/dist/chunks/{edit-dashboard-visual-BvM7br5P.js → edit-dashboard-visual-Dvc_Pkfg.js} +374 -374
  14. package/dist/chunks/{filter-reach-copy-By3r7O3G.js → filter-reach-copy-hEzlpBu7.js} +221 -221
  15. package/dist/chunks/{filter-value-text-CFiIZWJP.js → filter-value-text-CHBm4IU7.js} +10 -10
  16. package/dist/chunks/{index-CsQYlwhU.js → index-BoYJqc3F.js} +22 -22
  17. package/dist/chunks/{pivot-result-contract-expectations-BkMRCjzf.js → pivot-result-contract-expectations-CaS0y823.js} +588 -552
  18. package/dist/chunks/{report-preferences-dialog-ChXt8wCt.js → report-preferences-dialog-Cu_f-8Kw.js} +9 -9
  19. package/dist/chunks/{resolve-dashboard-input-context-BlyFX8He.js → resolve-dashboard-input-context-CkMk1RW6.js} +7557 -6453
  20. package/dist/chunks/{saved-dashboard-context-BPSdH2jW.js → saved-dashboard-context-RgBS_PIj.js} +16 -16
  21. package/dist/chunks/{semaphor-ready-indicator-BZUMCHRU.js → semaphor-ready-indicator-DXpTZJ7R.js} +21334 -21330
  22. package/dist/chunks/{shelf-drop-preview-context-yJheoeTC.js → shelf-drop-preview-context-qdlJKaH7.js} +2 -2
  23. package/dist/chunks/stored-dashboard-Baw6Bp2A.js +4029 -0
  24. package/dist/chunks/{table-export-sheet-h7wm5TwP.js → table-export-sheet-Cd6z7SsG.js} +1 -1
  25. package/dist/chunks/{variable-draft-OpYyaVCW.js → variable-draft-BxtN6YcG.js} +2 -2
  26. package/dist/dashboard/index.js +2 -2
  27. package/dist/dashboard-authoring/index.js +1097 -1105
  28. package/dist/format-utils/index.js +215 -216
  29. package/dist/index.js +56 -56
  30. package/dist/surfboard/index.js +2 -2
  31. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
  32. package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
  33. package/dist/types/index.js +30 -29
  34. package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
  35. package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
  36. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  37. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
  38. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
  39. package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
  40. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
  41. package/package.json +1 -1
  42. package/dist/chunks/bookmark-impact-rWjQgk8h.js +0 -75
  43. package/dist/chunks/pivot-header-presentation-gUxhdIdr.js +0 -42
  44. package/dist/chunks/stored-dashboard-CxQl9g0l.js +0 -4994
  45. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
@@ -1,11 +1,11 @@
1
- import { a7 as G, f as Pe, r as Le, k as qe } from "./validators-BlEWWX9O.js";
1
+ import { a7 as Y, f as Pe, r as Le, k as qe } from "./validators-BlEWWX9O.js";
2
2
  import { z as l } from "zod";
3
3
  import { Q as B, F as Be, r as je } from "./matrix-operation-contract-CAanJeCj.js";
4
4
  import { D as Ue, C as ze, a as j, r as We, e as Qe } from "./metric-comparison-BeKnUD08.js";
5
5
  import "./analytics-base-schemas-8wz9vqn_.js";
6
6
  import { a as N } from "./applied-constraints-DU-wndZ7.js";
7
7
  import { r as Ge } from "./pivot-result-identity-BKUjYO1u.js";
8
- const ne = 8, re = 6, V = Object.freeze([]);
8
+ const re = 8, se = 6, V = Object.freeze([]);
9
9
  function Ye(e) {
10
10
  switch (e.type) {
11
11
  case "table":
@@ -105,9 +105,9 @@ function rn(e) {
105
105
  if (!Array.isArray(n))
106
106
  t.push({ path: "cards", message: "must be an array of KPI cards." });
107
107
  else {
108
- (n.length < 1 || n.length > ne) && t.push({
108
+ (n.length < 1 || n.length > re) && t.push({
109
109
  path: "cards",
110
- message: `must hold 1 to ${ne} KPI cards.`
110
+ message: `must hold 1 to ${re} KPI cards.`
111
111
  });
112
112
  const s = /* @__PURE__ */ new Set();
113
113
  n.forEach((a, i) => {
@@ -128,13 +128,13 @@ function rn(e) {
128
128
  return $(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
129
129
  path: "kpi.layout",
130
130
  message: "must be 'tiles' or 'lines'."
131
- }) : r.layout === "tiles" && Array.isArray(n) && n.length > re && t.push({
131
+ }) : r.layout === "tiles" && Array.isArray(n) && n.length > se && t.push({
132
132
  path: "kpi.layout",
133
- message: `must be 'lines' for more than ${re} KPI cards.`
133
+ message: `must be 'lines' for more than ${se} KPI cards.`
134
134
  }), r.columns !== void 0 && r.columns !== 1 && r.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
135
135
  }
136
136
  const Ie = "dashboardInput";
137
- function se(e) {
137
+ function ae(e) {
138
138
  return e === "label" || e === "value" || e === "start" || e === "end" || e === "range";
139
139
  }
140
140
  function Xe(e) {
@@ -144,9 +144,9 @@ function v(e) {
144
144
  if (!e || typeof e != "object" || Array.isArray(e)) return;
145
145
  const t = e;
146
146
  if (t.source === "input" || t.source === Ie)
147
- return typeof t.inputId == "string" && se(t.export) ? { source: "input", inputId: t.inputId, export: t.export } : void 0;
147
+ return typeof t.inputId == "string" && ae(t.export) ? { source: "input", inputId: t.inputId, export: t.export } : void 0;
148
148
  if (t.source === "dashboardInputAlias")
149
- return typeof t.variableName != "string" || t.export !== void 0 && !se(t.export) ? void 0 : {
149
+ return typeof t.variableName != "string" || t.export !== void 0 && !ae(t.export) ? void 0 : {
150
150
  source: "dashboardInputAlias",
151
151
  variableName: t.variableName,
152
152
  ...t.export ? { export: t.export } : {}
@@ -178,7 +178,7 @@ function et(e, t) {
178
178
  function x(e) {
179
179
  return !!e && typeof e == "object" && !Array.isArray(e);
180
180
  }
181
- function ae(e) {
181
+ function ie(e) {
182
182
  return !!e && typeof e == "object" && e.source === Ie;
183
183
  }
184
184
  function an(e) {
@@ -200,13 +200,13 @@ function U(e) {
200
200
  i !== t[a] && (n ?? (n = { ...t }), n[a] = i);
201
201
  }, s = et(
202
202
  t,
203
- (a) => ae(a) ? v(a) ?? a : a
203
+ (a) => ie(a) ? v(a) ?? a : a
204
204
  );
205
205
  if (s !== t && (s.ref !== t.ref && r("ref", s.ref), s.test !== t.test && r("test", s.test)), t.inputAliases && typeof t.inputAliases == "object") {
206
206
  const a = t.inputAliases;
207
207
  let i = !1;
208
208
  const o = Object.fromEntries(
209
- Object.entries(a).map(([c, u]) => ae(u) ? (i = !0, [c, v(u) ?? u]) : [c, u])
209
+ Object.entries(a).map(([c, u]) => ie(u) ? (i = !0, [c, v(u) ?? u]) : [c, u])
210
210
  );
211
211
  i && r("inputAliases", o);
212
212
  }
@@ -250,9 +250,9 @@ function be(e, t) {
250
250
  n.push({ ref: i, place: r, where: { kind: "section", sectionId: a.id } });
251
251
  return n;
252
252
  }
253
- const ie = /* @__PURE__ */ new WeakMap();
253
+ const oe = /* @__PURE__ */ new WeakMap();
254
254
  function Se(e) {
255
- const t = ie.get(e);
255
+ const t = oe.get(e);
256
256
  if (t) return t;
257
257
  const n = [];
258
258
  for (const r of e.sheets ?? []) {
@@ -266,7 +266,7 @@ function Se(e) {
266
266
  for (const o of tt(i))
267
267
  n.push({ ref: o, place: s, where: { kind: "card", cardId: i.id } });
268
268
  }
269
- return ie.set(e, n), n;
269
+ return oe.set(e, n), n;
270
270
  }
271
271
  function Ce(e, t) {
272
272
  return e.kind === t.kind && e.sheetId === t.sheetId;
@@ -314,9 +314,9 @@ function C(e, t) {
314
314
  const n = e.scope;
315
315
  switch (n.kind) {
316
316
  case "allSheets":
317
- return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !at(n.exceptSheetIds, t) && !ue(n.exceptCardIds, t);
317
+ return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !at(n.exceptSheetIds, t) && !de(n.exceptCardIds, t);
318
318
  case "sheets":
319
- return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !ue(n.exceptCardIds, t);
319
+ return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !de(n.exceptCardIds, t);
320
320
  case "cards":
321
321
  return !!t.cardId && n.cardIds.includes(t.cardId);
322
322
  case "documentSections":
@@ -347,9 +347,9 @@ function dn(e, t) {
347
347
  return !1;
348
348
  }
349
349
  }
350
- const oe = /* @__PURE__ */ new WeakMap();
350
+ const ce = /* @__PURE__ */ new WeakMap();
351
351
  function rt(e) {
352
- const t = oe.get(e);
352
+ const t = ce.get(e);
353
353
  if (t) return t;
354
354
  const n = /* @__PURE__ */ new Map();
355
355
  for (const a of _(e)) {
@@ -370,7 +370,7 @@ function rt(e) {
370
370
  cardIds: n.get(a.id) ?? /* @__PURE__ */ new Set(),
371
371
  variableIds: r.get(a.id) ?? /* @__PURE__ */ new Set()
372
372
  });
373
- return oe.set(e, s), s;
373
+ return ce.set(e, s), s;
374
374
  }
375
375
  function ln(e, t) {
376
376
  var s, a;
@@ -408,10 +408,10 @@ function mn(e, t) {
408
408
  var a, i, o;
409
409
  const n = (c) => {
410
410
  var u, d;
411
- return ce(c, t.removedSheetIds, t.renamedSheetIds, !1, (u = t.copiedTab) == null ? void 0 : u.sheetIds, (d = t.copiedTab) == null ? void 0 : d.mode);
411
+ return ue(c, t.removedSheetIds, t.renamedSheetIds, !1, (u = t.copiedTab) == null ? void 0 : u.sheetIds, (d = t.copiedTab) == null ? void 0 : d.mode);
412
412
  }, r = (c) => {
413
413
  var u, d;
414
- return ce(
414
+ return ue(
415
415
  c,
416
416
  t.removedCardIds,
417
417
  t.renamedCardIds,
@@ -461,7 +461,7 @@ function mn(e, t) {
461
461
  }
462
462
  return st(e, s) ? e : s;
463
463
  }
464
- function ce(e, t, n, r, s, a) {
464
+ function ue(e, t, n, r, s, a) {
465
465
  let i = e;
466
466
  return t != null && t.size && (i = i.filter((o) => !t.has(o))), r && (i = i.filter((o) => n == null ? void 0 : n.has(o))), n != null && n.size && (i = i.map((o) => n.get(o) ?? o)), s != null && s.size && (i = a === "extend" ? [.../* @__PURE__ */ new Set([...i, ...i.flatMap((o) => s.has(o) ? [s.get(o)] : [])])] : i.map((o) => s.get(o) ?? o)), i;
467
467
  }
@@ -471,7 +471,7 @@ function st(e, t) {
471
471
  function at(e, t) {
472
472
  return !!t.sheetId && !!(e != null && e.includes(t.sheetId));
473
473
  }
474
- function ue(e, t) {
474
+ function de(e, t) {
475
475
  return !!t.cardId && !!(e != null && e.includes(t.cardId));
476
476
  }
477
477
  function it(e, t) {
@@ -507,7 +507,7 @@ function In(e, t) {
507
507
  function bn(e, t, n) {
508
508
  var o;
509
509
  if (t.kind !== "allSheets" && t.kind !== "sheets") return t;
510
- const r = ot(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && de(e) ? [...n].filter((c) => {
510
+ const r = ot(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && le(e) ? [...n].filter((c) => {
511
511
  var u;
512
512
  return !((u = e.exceptSheetIds) != null && u.includes(c));
513
513
  }) : [], a = [...n].filter((c) => !s.includes(c));
@@ -520,7 +520,7 @@ function bn(e, t, n) {
520
520
  const i = e.kind === "allSheets" ? ((o = e.exceptSheetIds) == null ? void 0 : o.filter((c) => n.has(c))) ?? [] : [];
521
521
  return {
522
522
  kind: "allSheets",
523
- ...e.kind === "allSheets" && de(e) ? {
523
+ ...e.kind === "allSheets" && le(e) ? {
524
524
  ...e.sheetKinds ? { sheetKinds: e.sheetKinds } : {},
525
525
  ...i.length ? { exceptSheetIds: i } : {}
526
526
  } : s.length ? {
@@ -530,7 +530,7 @@ function bn(e, t, n) {
530
530
  ...r.length ? { exceptCardIds: [...r] } : {}
531
531
  };
532
532
  }
533
- function de(e) {
533
+ function le(e) {
534
534
  var t;
535
535
  return e.kind === "allSheets" && (!((t = e.sheetKinds) != null && t.length) || e.sheetKinds.includes("document"));
536
536
  }
@@ -567,7 +567,7 @@ function gn(e) {
567
567
  function kn(e) {
568
568
  return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || Ue;
569
569
  }
570
- function Y(e, t) {
570
+ function J(e, t) {
571
571
  const n = Object.entries(e || {}).filter(
572
572
  ([a, i]) => i.output.outputId === a
573
573
  );
@@ -581,7 +581,7 @@ function Y(e, t) {
581
581
  return s.length === 1 ? s[0][1] : void 0;
582
582
  }
583
583
  function wn(e, t) {
584
- const n = Y(e, t);
584
+ const n = J(e, t);
585
585
  return {
586
586
  comparisonKind: (n == null ? void 0 : n.type) ?? ut(t),
587
587
  metadata: n
@@ -612,7 +612,7 @@ function vn(e) {
612
612
  };
613
613
  }
614
614
  const dt = "SEMAPHOR_CALCULATED_FIELD";
615
- function J(e, t, n) {
615
+ function H(e, t, n) {
616
616
  if (n && (t === "groupby" || t === "pivotby"))
617
617
  return n;
618
618
  if (t === "metric" && e.name === "*" && !e.expression)
@@ -633,7 +633,7 @@ function J(e, t, n) {
633
633
  return r && r !== e.name ? `${r}_${e.name}` : e.name;
634
634
  }
635
635
  function Ae(e) {
636
- return J(e, "detail");
636
+ return H(e, "detail");
637
637
  }
638
638
  function lt(e) {
639
639
  const t = e.label;
@@ -648,7 +648,7 @@ function Tn(e) {
648
648
  ], n = ve(e.detailColumns ?? []), r = new Map((e.detailColumns ?? []).map((o, c) => [o, c])), s = new Map(
649
649
  t.map(({ field: o, role: c }) => [
650
650
  o,
651
- c === "detail" ? n[r.get(o)] : J(o, c)
651
+ c === "detail" ? n[r.get(o)] : H(o, c)
652
652
  ])
653
653
  ), a = new Set(s.values()), i = /* @__PURE__ */ new Map();
654
654
  for (const { field: o } of t)
@@ -698,7 +698,7 @@ function Kn(e, t, n) {
698
698
  ...e === "percentChange" && (n == null ? void 0 : n.percent) === void 0 ? { percent: !0 } : {}
699
699
  };
700
700
  }
701
- function H(e) {
701
+ function X(e) {
702
702
  var r, s, a, i;
703
703
  if (e.get.kind !== "aggregate" || (r = e.query.sql) != null && r.trim()) return;
704
704
  const t = (i = (a = (s = e.query.config) == null ? void 0 : s.metricColumns) == null ? void 0 : a[0]) == null ? void 0 : i.comparison;
@@ -706,7 +706,7 @@ function H(e) {
706
706
  const n = t.spec;
707
707
  return n.kind === "previous_period" || n.kind === "previous_year" ? n : void 0;
708
708
  }
709
- function le(e, t) {
709
+ function fe(e, t) {
710
710
  if (t === "preview" && e.get.kind !== "aggregate")
711
711
  return M + 1;
712
712
  switch (e.get.kind) {
@@ -718,13 +718,13 @@ function le(e, t) {
718
718
  return 1;
719
719
  }
720
720
  }
721
- const fe = {
721
+ const me = {
722
722
  answer: /* @__PURE__ */ new WeakMap(),
723
723
  preview: /* @__PURE__ */ new WeakMap()
724
724
  };
725
725
  function ht(e, t = "answer") {
726
726
  var a;
727
- const n = fe[t].get(e);
727
+ const n = me[t].get(e);
728
728
  if (n) return n;
729
729
  const { query: r } = e, s = {
730
730
  id: e.id,
@@ -738,9 +738,9 @@ function ht(e, t = "answer") {
738
738
  ...r.connectionId ? { connectionId: r.connectionId } : {},
739
739
  ...r.dataSource ? { dataSource: r.dataSource } : {},
740
740
  ...r.calculatedFields ? { calculatedFields: r.calculatedFields } : {},
741
- ...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit: le(e, t) } } : { config: { ...r.config, rowLimit: le(e, t) } }
741
+ ...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit: fe(e, t) } } : { config: { ...r.config, rowLimit: fe(e, t) } }
742
742
  };
743
- return fe[t].set(e, s), s;
743
+ return me[t].set(e, s), s;
744
744
  }
745
745
  function Dn(e) {
746
746
  return e.type === Te && typeof e.dataVariableId == "string" && e.dataVariableId.length > 0;
@@ -754,7 +754,7 @@ function Nn(e, t, n) {
754
754
  return n in t ? t[n] : void 0;
755
755
  }
756
756
  function z(e) {
757
- const t = G(e);
757
+ const t = Y(e);
758
758
  return t === "string" || t === "unknown" ? "text" : t;
759
759
  }
760
760
  function yt(e) {
@@ -767,7 +767,7 @@ function It(e, t, n, r) {
767
767
  s == null ? void 0 : s.outputKey,
768
768
  s == null ? void 0 : s.rawKey,
769
769
  t === "metric" ? ((o = (i = r == null ? void 0 : r.byMetricAlias) == null ? void 0 : i[j(e)]) == null ? void 0 : o.outputKey) ?? j(e) : void 0,
770
- J(e, t === "metric" ? "metric" : "groupby"),
770
+ H(e, t === "metric" ? "metric" : "groupby"),
771
771
  e.label,
772
772
  e.name
773
773
  ].find((c) => !!c && n.has(c));
@@ -775,7 +775,7 @@ function It(e, t, n, r) {
775
775
  function On(e, t) {
776
776
  var r;
777
777
  if (e.get.kind === "aggregate")
778
- return H(e) ? [S, ...Ee] : [S];
778
+ return X(e) ? [S, ...Ee] : [S];
779
779
  if (e.get.kind === "list") return [S];
780
780
  if ((r = e.query.sql) != null && r.trim()) return [...t ?? []];
781
781
  const n = e.query.config;
@@ -791,10 +791,10 @@ function xn(e, t) {
791
791
  const n = e.query.config, r = (u, d) => {
792
792
  if (!u) return;
793
793
  const f = d === "metric" ? B(u) : u.dataType;
794
- return G(f) === "unknown" ? void 0 : z(f);
794
+ return Y(f) === "unknown" ? void 0 : z(f);
795
795
  };
796
796
  if (e.get.kind === "aggregate")
797
- return mt(t) && H(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
797
+ return mt(t) && X(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
798
798
  const s = (o = n == null ? void 0 : n.groupByColumns) == null ? void 0 : o.find((u) => u.name === t);
799
799
  return s ? r(s, "groupby") : r((c = n == null ? void 0 : n.metricColumns) == null ? void 0 : c.find((u) => u.name === t), "metric");
800
800
  }
@@ -810,15 +810,15 @@ function St(e, t, n) {
810
810
  ), i = (m, k) => a.has(m) ? z(a.get(m)) : k !== void 0 ? z(k) : yt(r[m]);
811
811
  if ((I = e.query.sql) != null && I.trim())
812
812
  return [...s].map((m) => ({ part: m, key: m, type: i(m, void 0) }));
813
- const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k, te) => {
814
- if (c.some(($e) => $e.part === te)) return;
813
+ const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k, ne) => {
814
+ if (c.some(($e) => $e.part === ne)) return;
815
815
  const K = It(m, k, s, n.columnKeyMap) ?? (d ? u : void 0);
816
816
  if (!K) return;
817
817
  const Ve = k === "metric" ? i(K, B(m)) : i(K, m.dataType);
818
- c.push({ part: te, key: K, type: Ve });
818
+ c.push({ part: ne, key: K, type: Ve });
819
819
  }, y = o.metricColumns ?? [];
820
820
  if (e.get.kind === "aggregate") {
821
- const m = y[0] ? (g = Y(n.comparisonMetadata, y[0])) == null ? void 0 : g.output.currentColumnKey : void 0;
821
+ const m = y[0] ? (g = J(n.comparisonMetadata, y[0])) == null ? void 0 : g.output.currentColumnKey : void 0;
822
822
  return m && s.has(m) ? c.push({ part: S, key: m, type: i(m, B(y[0])) }) : y[0] && f(y[0], "metric", S), c;
823
823
  }
824
824
  const h = o.groupByColumns ?? [];
@@ -872,7 +872,7 @@ function Rn(e, t, n = "answer") {
872
872
  );
873
873
  if (e.get.kind === "aggregate" && ((d = c[S]) == null ? void 0 : d.value) == null)
874
874
  return { status: "none", why: "noRows", filterReach: s, ...a };
875
- const u = H(e) ? Ct(e, o, t) : void 0;
875
+ const u = X(e) ? Ct(e, o, t) : void 0;
876
876
  return {
877
877
  status: "answered",
878
878
  parts: u && "parts" in u ? { ...c, ...u.parts } : c,
@@ -883,7 +883,7 @@ function Rn(e, t, n = "answer") {
883
883
  }
884
884
  function Ct(e, t, n) {
885
885
  var o, c;
886
- const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ? Y(n.comparisonMetadata, r) : void 0, a = s == null ? void 0 : s.output;
886
+ const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ? J(n.comparisonMetadata, r) : void 0, a = s == null ? void 0 : s.output;
887
887
  if (!a || a.availability.status !== "available" || !a.comparisonColumnKey)
888
888
  return { unavailable: (a == null ? void 0 : a.availability.status) === "unavailable" ? a.availability.reason : "temporal_binding_missing" };
889
889
  const i = (u) => {
@@ -898,9 +898,9 @@ function Ct(e, t, n) {
898
898
  }
899
899
  };
900
900
  }
901
- const me = /* @__PURE__ */ new WeakMap();
902
- function X(e) {
903
- const t = me.get(e);
901
+ const pe = /* @__PURE__ */ new WeakMap();
902
+ function Z(e) {
903
+ const t = pe.get(e);
904
904
  if (t) return t;
905
905
  const n = new Map(
906
906
  (e.sheets ?? []).map(
@@ -926,16 +926,16 @@ function X(e) {
926
926
  })
927
927
  )
928
928
  ], s = { targets: r, byId: new Map(r.map((a) => [a.id, a])) };
929
- return me.set(e, s), s;
929
+ return pe.set(e, s), s;
930
930
  }
931
931
  function gt(e) {
932
- return X(e).targets;
932
+ return Z(e).targets;
933
933
  }
934
934
  function _n(e, t) {
935
- return X(e).byId.get(t);
935
+ return Z(e).byId.get(t);
936
936
  }
937
937
  function kt(e, t) {
938
- return X(e).byId.has(t);
938
+ return Z(e).byId.has(t);
939
939
  }
940
940
  function wt(e, t) {
941
941
  return t.kind === "card" ? [
@@ -1084,7 +1084,7 @@ function E(e, t) {
1084
1084
  }
1085
1085
  );
1086
1086
  }
1087
- t.includeMetricFilterDatasets && "parameters" in e && ((u = e.parameters) != null && u.filters) && Z(e.parameters.filters, t);
1087
+ t.includeMetricFilterDatasets && "parameters" in e && ((u = e.parameters) != null && u.filters) && ee(e.parameters.filters, t);
1088
1088
  const s = (d = e.calculatedFormula) == null ? void 0 : d.inputFields, a = !!(s && s.length > 0);
1089
1089
  a && s.forEach((y) => E(y, t));
1090
1090
  let i = !1, o = !1;
@@ -1118,13 +1118,13 @@ function E(e, t) {
1118
1118
  }
1119
1119
  o && (t.complete = !1), r && !a && !i && (t.complete = !1);
1120
1120
  }
1121
- function Z(e, t) {
1121
+ function ee(e, t) {
1122
1122
  if (e && !t.visitedGroups.has(e.id)) {
1123
1123
  t.visitedGroups.add(e.id);
1124
1124
  for (const n of e.conditions || [])
1125
1125
  E(n.field, t);
1126
1126
  for (const n of e.groups || [])
1127
- Z(n, t);
1127
+ ee(n, t);
1128
1128
  }
1129
1129
  }
1130
1130
  function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
@@ -1136,7 +1136,7 @@ function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
1136
1136
  includeMetricFilterDatasets: e
1137
1137
  };
1138
1138
  }
1139
- function ee(e, t) {
1139
+ function te(e, t) {
1140
1140
  var r;
1141
1141
  const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
1142
1142
  return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
@@ -1148,7 +1148,7 @@ function Un(e) {
1148
1148
  function Ne(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
1149
1149
  const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
1150
1150
  E(e, i), i.found.forEach((o) => {
1151
- const c = ee(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1151
+ const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1152
1152
  c && t.add(c);
1153
1153
  });
1154
1154
  }
@@ -1160,7 +1160,7 @@ function zn(e, t) {
1160
1160
  function Wn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
1161
1161
  const s = F(!0, n, r);
1162
1162
  E(e, s), s.found.forEach((a) => {
1163
- const i = ee(a, "qualifiedOnly");
1163
+ const i = te(a, "qualifiedOnly");
1164
1164
  i && t.add(i);
1165
1165
  });
1166
1166
  }
@@ -1171,8 +1171,8 @@ function Qn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set())
1171
1171
  }
1172
1172
  function Gn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
1173
1173
  const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
1174
- Z(e, i), i.found.forEach((o) => {
1175
- const c = ee(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1174
+ ee(e, i), i.found.forEach((o) => {
1175
+ const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1176
1176
  c && t.add(c);
1177
1177
  });
1178
1178
  }
@@ -1223,7 +1223,7 @@ const Jn = {
1223
1223
  boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
1224
1224
  };
1225
1225
  function Mt(e) {
1226
- const t = G(e);
1226
+ const t = Y(e);
1227
1227
  return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
1228
1228
  }
1229
1229
  function Xn(e, t) {
@@ -1349,9 +1349,9 @@ function Pt(e) {
1349
1349
  function O(e) {
1350
1350
  return typeof e == "string" && Pt(e) !== void 0;
1351
1351
  }
1352
- const pe = l.array(l.string()).max(2e3), Lt = l.object({
1353
- order: pe.optional(),
1354
- hidden: pe.optional(),
1352
+ const he = l.array(l.string()).max(2e3), Lt = l.object({
1353
+ order: he.optional(),
1354
+ hidden: he.optional(),
1355
1355
  labels: l.record(l.string(), l.string().max(Q.columnLabelMaxChars)).optional(),
1356
1356
  sort: l.array(
1357
1357
  l.object({
@@ -1364,15 +1364,22 @@ const pe = l.array(l.string()).max(2e3), Lt = l.object({
1364
1364
  l.number().int().min(1).max(Q.columnWidthMaxPx)
1365
1365
  ).optional()
1366
1366
  }).strict();
1367
- function he(e) {
1367
+ function G(e) {
1368
1368
  const t = /* @__PURE__ */ new Set(), n = [];
1369
1369
  for (const r of e)
1370
1370
  !O(r) || t.has(r) || (t.add(r), n.push(r));
1371
1371
  return n;
1372
1372
  }
1373
+ function er(e) {
1374
+ if (!Array.isArray(e)) return;
1375
+ const t = G(
1376
+ e.filter((n) => typeof n == "string")
1377
+ );
1378
+ return t.length ? t : void 0;
1379
+ }
1373
1380
  function xe(e) {
1374
1381
  if (!e) return;
1375
- const t = e.order ? he(e.order) : void 0, n = e.hidden ? he(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
1382
+ const t = e.order ? G(e.order) : void 0, n = e.hidden ? G(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
1376
1383
  ([c, u]) => {
1377
1384
  const d = typeof u == "string" ? u.trim() : "";
1378
1385
  return O(c) && d ? [
@@ -1390,7 +1397,7 @@ function xe(e) {
1390
1397
  direction: u
1391
1398
  }))), i.length && (o.widths = Object.fromEntries(i)), Object.keys(o).length ? o : void 0;
1392
1399
  }
1393
- function er(e) {
1400
+ function tr(e) {
1394
1401
  var t, n;
1395
1402
  return !!((t = e == null ? void 0 : e.order) != null && t.length) || !!((n = e == null ? void 0 : e.hidden) != null && n.length) || Object.keys((e == null ? void 0 : e.labels) ?? {}).length > 0 || Object.keys((e == null ? void 0 : e.widths) ?? {}).length > 0;
1396
1403
  }
@@ -1409,7 +1416,7 @@ function Re(e, t) {
1409
1416
  value: xe(n.data) ?? {}
1410
1417
  } : { ok: !1, error: "Table settings are invalid." };
1411
1418
  }
1412
- function tr(e, t, n) {
1419
+ function nr(e, t, n) {
1413
1420
  if (!e || typeof e != "object" || Array.isArray(e)) return {};
1414
1421
  const r = {};
1415
1422
  for (const [s, a] of Object.entries(
@@ -1432,17 +1439,17 @@ function Bt(e) {
1432
1439
  var t, n;
1433
1440
  return _e(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
1434
1441
  }
1435
- function nr(e) {
1442
+ function rr(e) {
1436
1443
  return new Set(
1437
1444
  T(e).filter(({ card: t }) => _e(t)).map(({ card: t }) => t.id)
1438
1445
  );
1439
1446
  }
1440
- function rr(e) {
1447
+ function sr(e) {
1441
1448
  return new Set(
1442
1449
  T(e).filter(({ card: t }) => Bt(t)).map(({ card: t }) => t.id)
1443
1450
  );
1444
1451
  }
1445
- const L = 1, sr = ["PRIVATE", "TEAM", "DASHBOARD"], jt = l.object({
1452
+ const L = 1, ar = ["PRIVATE", "TEAM", "DASHBOARD"], jt = l.object({
1446
1453
  filterId: l.string().min(1),
1447
1454
  name: l.string(),
1448
1455
  operation: l.string(),
@@ -1539,97 +1546,98 @@ function Gt(e, t) {
1539
1546
  unknownKeys: r
1540
1547
  };
1541
1548
  }
1542
- function ar(e, t) {
1549
+ function ir(e, t) {
1543
1550
  const n = Gt(e, t);
1544
1551
  return n.ok ? n.issues.some((r) => r.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : n.issues.length || n.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: n.value } : n;
1545
1552
  }
1546
1553
  export {
1547
1554
  re as $,
1548
- _ as A,
1555
+ qn as A,
1549
1556
  L as B,
1550
1557
  Hn as C,
1551
- C as D,
1558
+ _ as D,
1552
1559
  Jn as E,
1553
- fn as F,
1554
- _n as G,
1555
- Tn as H,
1556
- Ye as I,
1557
- Tt as J,
1558
- ot as K,
1559
- gt as L,
1560
- yn as M,
1561
- de as N,
1562
- rt as O,
1563
- dn as P,
1564
- ge as Q,
1565
- bn as R,
1566
- On as S,
1567
- Cn as T,
1568
- J as U,
1560
+ C as F,
1561
+ fn as G,
1562
+ _n as H,
1563
+ Tn as I,
1564
+ Ye as J,
1565
+ Tt as K,
1566
+ ot as L,
1567
+ gt as M,
1568
+ yn as N,
1569
+ le as O,
1570
+ rt as P,
1571
+ dn as Q,
1572
+ ge as R,
1573
+ bn as S,
1574
+ On as T,
1575
+ Cn as U,
1569
1576
  Q as V,
1570
- Ae as W,
1571
- lt as X,
1572
- ve as Y,
1573
- En as Z,
1574
- ne as _,
1577
+ H as W,
1578
+ Ae as X,
1579
+ lt as Y,
1580
+ ve as Z,
1581
+ En as _,
1575
1582
  jn as a,
1576
- Je as a0,
1577
- nn as a1,
1578
- He as a2,
1579
- rn as a3,
1580
- ln as a4,
1581
- mn as a5,
1582
- pn as a6,
1583
- hn as a7,
1584
- In as a8,
1585
- Sn as a9,
1586
- Rt as aA,
1587
- Ft as aB,
1588
- $n as aC,
1589
- an as aD,
1590
- et as aE,
1591
- v as aF,
1592
- Y as aG,
1593
- wn as aH,
1594
- vn as aI,
1595
- An as aJ,
1596
- T as aK,
1597
- ut as aL,
1598
- kn as aM,
1599
- se as aN,
1600
- gn as aO,
1601
- Vn as aP,
1602
- Xe as aQ,
1603
- Pn as aR,
1604
- Ln as aS,
1605
- Bn as aT,
1606
- sn as aU,
1607
- Te as aa,
1608
- M as ab,
1609
- ft as ac,
1610
- S as ad,
1611
- Ee as ae,
1612
- mt as af,
1613
- pt as ag,
1614
- Kn as ah,
1615
- H as ai,
1616
- ht as aj,
1617
- Dn as ak,
1618
- Nn as al,
1619
- xn as am,
1620
- Mn as an,
1621
- Rn as ao,
1622
- on as ap,
1623
- nt as aq,
1624
- cn as ar,
1625
- un as as,
1626
- ke as at,
1627
- kt as au,
1628
- wt as av,
1629
- At as aw,
1630
- Fn as ax,
1631
- Mt as ay,
1632
- Xn as az,
1583
+ se as a0,
1584
+ Je as a1,
1585
+ nn as a2,
1586
+ He as a3,
1587
+ rn as a4,
1588
+ ln as a5,
1589
+ mn as a6,
1590
+ pn as a7,
1591
+ hn as a8,
1592
+ In as a9,
1593
+ Xn as aA,
1594
+ Rt as aB,
1595
+ Ft as aC,
1596
+ $n as aD,
1597
+ an as aE,
1598
+ et as aF,
1599
+ v as aG,
1600
+ T as aH,
1601
+ ut as aI,
1602
+ kn as aJ,
1603
+ J as aK,
1604
+ ae as aL,
1605
+ wn as aM,
1606
+ gn as aN,
1607
+ Vn as aO,
1608
+ vn as aP,
1609
+ An as aQ,
1610
+ Xe as aR,
1611
+ Pn as aS,
1612
+ Ln as aT,
1613
+ Bn as aU,
1614
+ sn as aV,
1615
+ Sn as aa,
1616
+ Te as ab,
1617
+ M as ac,
1618
+ ft as ad,
1619
+ S as ae,
1620
+ Ee as af,
1621
+ mt as ag,
1622
+ pt as ah,
1623
+ Kn as ai,
1624
+ X as aj,
1625
+ ht as ak,
1626
+ Dn as al,
1627
+ Nn as am,
1628
+ xn as an,
1629
+ Mn as ao,
1630
+ Rn as ap,
1631
+ on as aq,
1632
+ nt as ar,
1633
+ cn as as,
1634
+ un as at,
1635
+ ke as au,
1636
+ kt as av,
1637
+ wt as aw,
1638
+ At as ax,
1639
+ Fn as ay,
1640
+ Mt as az,
1633
1641
  zn as b,
1634
1642
  Ne as c,
1635
1643
  De as d,
@@ -1640,19 +1648,19 @@ export {
1640
1648
  Gt as i,
1641
1649
  Oe as j,
1642
1650
  Pt as k,
1643
- er as l,
1651
+ xe as l,
1644
1652
  Zn as m,
1645
- xe as n,
1646
- Me as o,
1647
- ar as p,
1648
- Re as q,
1653
+ er as n,
1654
+ tr as o,
1655
+ ir as p,
1656
+ Me as q,
1649
1657
  Un as r,
1650
- tr as s,
1658
+ Re as s,
1651
1659
  $t as t,
1652
- _e as u,
1653
- Bt as v,
1654
- nr as w,
1660
+ nr as u,
1661
+ _e as v,
1662
+ Bt as w,
1655
1663
  rr as x,
1656
1664
  sr as y,
1657
- qn as z
1665
+ ar as z
1658
1666
  };