react-semaphor 0.1.565 → 0.1.566

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 (34) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +50 -46
  3. package/dist/chunks/{assistant-chat-DNfb5fbF.js → assistant-chat-DNKAYSQL.js} +5 -5
  4. package/dist/chunks/{bookmark-impact-CHr7b1J2.js → bookmark-impact-BeUbq0jc.js} +1 -1
  5. package/dist/chunks/{card-filter-builder-CcEcfaYz.js → card-filter-builder-SXaRWbKr.js} +46 -46
  6. package/dist/chunks/{dashboard-CtIfxycc.js → dashboard-Cni7nGhg.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-D3mc6peE.js → dashboard-briefing-launcher-CXeXRTem.js} +202 -202
  8. package/dist/chunks/{dashboard-controls-BFv0zdws.js → dashboard-controls-CsqKybrf.js} +56 -56
  9. package/dist/chunks/{dashboard-json-CXn_3OYb.js → dashboard-json-WWmw3Piu.js} +1 -1
  10. package/dist/chunks/{dates-DcRxw17S.js → dates-DJRUS-he.js} +4 -4
  11. package/dist/chunks/{edit-dashboard-visual-Y6HatqBd.js → edit-dashboard-visual-BrIEaBhc.js} +213 -197
  12. package/dist/chunks/{filter-reach-copy-DbggA5B7.js → filter-reach-copy-D5LqgrUf.js} +852 -858
  13. package/dist/chunks/{index-DDa_rklN.js → index-Bq9UbCGk.js} +648 -574
  14. package/dist/chunks/{report-preferences-dialog-Db-b04B4.js → report-preferences-dialog-CeHioJwL.js} +7 -7
  15. package/dist/chunks/{resolve-dashboard-input-context-C18J-YZC.js → resolve-dashboard-input-context-CwS-2r-b.js} +3497 -3472
  16. package/dist/chunks/{saved-dashboard-context-DhC_EVus.js → saved-dashboard-context-c-MZZTx2.js} +2 -2
  17. package/dist/chunks/{semaphor-ready-indicator-T6TsiBMT.js → semaphor-ready-indicator-B2NpYRE-.js} +27601 -27648
  18. package/dist/chunks/{shelf-drop-preview-context-CNWL_b0S.js → shelf-drop-preview-context-DM7yypwC.js} +2 -2
  19. package/dist/chunks/{stored-dashboard-IdmtrNkA.js → stored-dashboard-DTWc2pzt.js} +204 -204
  20. package/dist/chunks/{variable-draft-3xseULxR.js → variable-draft-DFizFCJu.js} +2 -2
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/dashboard-authoring/index.js +1669 -1642
  23. package/dist/index.js +11 -11
  24. package/dist/style.css +1 -1
  25. package/dist/surfboard/index.js +1 -1
  26. package/dist/types/briefings/delivery-outcome.d.ts +37 -0
  27. package/dist/types/briefings/index.d.ts +2 -0
  28. package/dist/types/briefings/run-outcomes.d.ts +6 -0
  29. package/dist/types/components/briefings/briefing-author/run-model.d.ts +9 -0
  30. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +15 -3
  31. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  32. package/dist/types/shared/dashboard-authoring/dashboard-filter-sql-subscription.d.ts +24 -0
  33. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +20 -4
  34. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { gM as io, cp as so, bU as ao, aQ as lo, b9 as co, f as uo, bM as fo, M as oe, gN as po, gO as Ne, dX as Et, d_ as mo, bD as go, gP as yo, at as bo, fB as Bt, fD as Co, gQ as _t, O as ho, fF as Io, cQ as ve, s as _, fw as Fe, n as Le, gR as vo, cK as Rt, cM as Kt, cv as Fo, cP as So, cN as mt, cO as Do, b as To, cx as Mo, cJ as Vo, cH as ko, a2 as K, ga as xo, gS as Se, gT as qt, gU as Po, gV as je, go as De, gW as wo, gX as ze, gY as Oo, gZ as Ao, g_ as Eo, g$ as Bo, h0 as _o, l as Ge, h1 as Ro, k as ee, r as Ko, h as qo, h2 as $, gD as He, h3 as me, h4 as Nt, h5 as No, h6 as Lo, h7 as jo, g1 as zo, h8 as Go, h9 as Ho, e as Uo, ha as $o, hb as Lt, $ as jt, hc as Qo, hd as Wo, he as Yo, hf as zt, j as Ue, cg as Jo, a3 as Xo, o as Gt, cf as Zo, gl as er, q as tr, t as gt, C as nr, hg as or, hh as rr, ch as ir, hi as sr } from "./resolve-dashboard-input-context-C18J-YZC.js";
1
+ import { gP as io, cs as so, bU as ao, aQ as lo, b9 as co, f as uo, bM as fo, M as oe, gQ as po, gR as Ne, d_ as Et, e1 as mo, bD as go, gS as yo, at as bo, fE as Bt, fG as Co, gT as _t, O as ho, fI as Io, cT as ve, s as _, fz as Fe, n as Le, gU as vo, cN as Rt, cP as Kt, cy as Fo, cS as So, cQ as mt, cR as To, b as Do, cA as Mo, cM as Vo, cK as ko, a2 as K, gd as Po, gV as Se, gW as qt, gX as xo, gY as je, gr as Te, gZ as wo, g_ as ze, g$ as Oo, h0 as Ao, h1 as Eo, h2 as Bo, h3 as _o, l as Ge, h4 as Ro, k as ee, r as Ko, h as qo, h5 as $, gG as He, h6 as me, h7 as Nt, h8 as No, h9 as Lo, ha as jo, g4 as zo, hb as Go, hc as Ho, e as Uo, hd as $o, he as Lt, $ as jt, hf as Qo, hg as Wo, hh as Yo, hi as zt, j as Ue, cj as Jo, a3 as Zo, o as Gt, ci as Xo, go as er, q as tr, t as gt, C as nr, hj as or, hk as rr, ck as ir, hl as sr } from "./resolve-dashboard-input-context-CwS-2r-b.js";
2
2
  import { av as ar, H as re, a1 as lr, R as cr, I as Oe, S as ur, am as yt, q as Ht, aa as dr, v as fr } from "./validators-wtjw0aw6.js";
3
3
  import { v as Ut } from "./matrix-operation-contract-Eb6elidS.js";
4
4
  import { S as $e } from "./analytics-base-schemas-BaIQrEzX.js";
@@ -7,14 +7,14 @@ import "./index-CuHybtft.js";
7
7
  import { canonicalizeSupportedCurrencyCode as $t } from "../value-format-preferences/index.js";
8
8
  import "./_commonjsHelpers-DimLPMtv.js";
9
9
  import { b as ge, r as mr, aW as gr, i as yr, aD as br, aA as bt } from "./temporal-input-presentation--2r9BLr0.js";
10
- import { aA as Qt, aB as Wt, aC as ke, _ as Cr, aD as Yt, aE as Jt, az as Xt, aF as Zt, n as hr, u as en, t as j, aG as tn, k as nn, C as Ae, aH as H, y as ie, i as on, l as Ir, s as vr, B as Qe, aI as Fr, ag as Sr, D as rn, A as Dr, ay as Ct, M as sn, N as an, H as ln } from "./bookmark-state-ByODVqee.js";
10
+ import { aA as Qt, aB as Wt, aC as ke, _ as Cr, aD as Yt, aE as Jt, az as Zt, aF as Xt, n as hr, u as en, t as j, aG as tn, k as nn, C as Ae, aH as H, y as ie, i as on, l as Ir, s as vr, B as Qe, aI as Fr, ag as Sr, D as rn, A as Tr, ay as Ct, M as sn, N as an, H as ln } from "./bookmark-state-ByODVqee.js";
11
11
  import "./index-RNaTnE3m.js";
12
12
  import "./context-R31TSL5V.js";
13
- import { i as We, b as cn, r as Tr } from "./matrix-card-BSUeSXpD.js";
13
+ import { i as We, b as cn, r as Dr } from "./matrix-card-BSUeSXpD.js";
14
14
  import { D as Mr } from "./report-runtime-context-DnA_PiKo.js";
15
15
  import { r as Q, C as Vr } from "./metric-comparison-ChXUFaZu.js";
16
- import { p as kr, d as xr } from "./pivot-result-contract-expectations-Ddh1rNz5.js";
17
- import { isPdfTableCardType as Pr, PDF_CAPACITY as wr } from "../pdf-export-policy/index.js";
16
+ import { p as kr, d as Pr } from "./pivot-result-contract-expectations-Ddh1rNz5.js";
17
+ import { isPdfTableCardType as xr, PDF_CAPACITY as wr } from "../pdf-export-policy/index.js";
18
18
  import { c as Or } from "./selection-filter-compiler-CUDRnUxc.js";
19
19
  import { a as Ar, f as Er, b as Br } from "./matrix-analytical-definition-C9xB_T84.js";
20
20
  import { r as _r } from "./pivot-result-identity-BlbLrqaC.js";
@@ -116,7 +116,7 @@ function Hr(e, t, n, o) {
116
116
  return t ^ n ^ o;
117
117
  }
118
118
  }
119
- function xe(e, t) {
119
+ function Pe(e, t) {
120
120
  return e << t | e >>> 32 - t;
121
121
  }
122
122
  function Ur(e) {
@@ -141,11 +141,11 @@ function Ur(e) {
141
141
  for (let m = 0; m < 16; ++m)
142
142
  a[m] = i[s][m];
143
143
  for (let m = 16; m < 80; ++m)
144
- a[m] = xe(a[m - 3] ^ a[m - 8] ^ a[m - 14] ^ a[m - 16], 1);
144
+ a[m] = Pe(a[m - 3] ^ a[m - 8] ^ a[m - 14] ^ a[m - 16], 1);
145
145
  let c = n[0], l = n[1], u = n[2], d = n[3], f = n[4];
146
146
  for (let m = 0; m < 80; ++m) {
147
- const g = Math.floor(m / 20), p = xe(c, 5) + Hr(g, l, u, d) + f + t[g] + a[m] >>> 0;
148
- f = d, d = u, u = xe(l, 30) >>> 0, l = c, c = p;
147
+ const g = Math.floor(m / 20), p = Pe(c, 5) + Hr(g, l, u, d) + f + t[g] + a[m] >>> 0;
148
+ f = d, d = u, u = Pe(l, 30) >>> 0, l = c, c = p;
149
149
  }
150
150
  n[0] = n[0] + c >>> 0, n[1] = n[1] + l >>> 0, n[2] = n[2] + u >>> 0, n[3] = n[3] + d >>> 0, n[4] = n[4] + f >>> 0;
151
151
  }
@@ -288,21 +288,21 @@ function Ya(e, t) {
288
288
  c.cardId = ((a = t.cardIds) == null ? void 0 : a[c.cardId]) ?? c.cardId;
289
289
  return n;
290
290
  }
291
- const Xr = "9677efdd-86ec-4afb-b9bb-5ead8b5442af";
292
- function Zr(e) {
291
+ const Zr = "9677efdd-86ec-4afb-b9bb-5ead8b5442af";
292
+ function Xr(e) {
293
293
  let t = 0;
294
- return () => $r(`${e}#${t++}`, Xr);
294
+ return () => $r(`${e}#${t++}`, Zr);
295
295
  }
296
296
  const ei = [
297
297
  { code: "matrix_definition_incomplete", label: "Matrix definition" }
298
298
  ], ti = [
299
299
  { code: "connection_type_unresolved", label: "Connection type" }
300
- ], Z = (e) => !Array.isArray(e) || e.length === 0;
300
+ ], X = (e) => !Array.isArray(e) || e.length === 0;
301
301
  function ni(e) {
302
302
  var i;
303
303
  const t = e.config ?? {};
304
- if ((i = e.sql) != null && i.trim() || !Z(t.pivotByColumns)) return "matrixTable";
305
- const n = !Z(t.groupByColumns), o = !Z(t.metricColumns), r = e.type === "pivotTable" && (n || o) && Z(t.rowAggregates) && Z(t.columnAggregates);
304
+ if ((i = e.sql) != null && i.trim() || !X(t.pivotByColumns)) return "matrixTable";
305
+ const n = !X(t.groupByColumns), o = !X(t.metricColumns), r = e.type === "pivotTable" && (n || o) && X(t.rowAggregates) && X(t.columnAggregates);
306
306
  return n && !o || r ? "table" : "matrixTable";
307
307
  }
308
308
  function oi(e) {
@@ -318,7 +318,7 @@ function fn(e) {
318
318
  var s, a;
319
319
  const t = e;
320
320
  if (!ao(t)) return { status: "not_legacy", card: e };
321
- const n = oi(t), o = ni(t) === "table" ? lo(n, "table") : co(n, "matrixTable", { createId: Zr(t.id) });
321
+ const n = oi(t), o = ni(t) === "table" ? lo(n, "table") : co(n, "matrixTable", { createId: Xr(t.id) });
322
322
  if (o.status !== "changed") throw new Error(`Card ${t.id} could not leave ${t.type}.`);
323
323
  const r = o.card.type === "matrixTable" && uo(o.card).status !== "ready", i = !!n.dataSource && !((a = (s = n.dataSource) == null ? void 0 : s.connectionType) != null && a.trim());
324
324
  return {
@@ -373,7 +373,7 @@ function si(e, t, n) {
373
373
  )
374
374
  };
375
375
  }
376
- function Xa(e) {
376
+ function Za(e) {
377
377
  switch (e) {
378
378
  case "previous_period":
379
379
  return "Previous";
@@ -393,7 +393,7 @@ function pn(e, t, n) {
393
393
  function ai(e, t) {
394
394
  return `${e} Δ`;
395
395
  }
396
- function Za(e, t) {
396
+ function Xa(e, t) {
397
397
  return Yt(e, t);
398
398
  }
399
399
  function li(e, t) {
@@ -434,7 +434,7 @@ function ui(e, t, n, o) {
434
434
  const r = [...e], [i] = r.splice(t, 1), s = o === "before" ? n > t ? n - 1 : n : n > t ? n : n + 1;
435
435
  return r.splice(s, 0, i), r;
436
436
  }
437
- function Pe(e, t, n) {
437
+ function xe(e, t, n) {
438
438
  if (!(e != null && e.length)) return null;
439
439
  const o = e.findIndex(
440
440
  (i) => n(i).includes(t.draggingColumnId)
@@ -455,7 +455,7 @@ function tl(e, t, n) {
455
455
  return e.type === "detailTable" ? we(
456
456
  o,
457
457
  "detailColumns",
458
- Pe(
458
+ xe(
459
459
  o == null ? void 0 : o.detailColumns,
460
460
  t,
461
461
  (r) => pe(r, "detail", n)
@@ -463,7 +463,7 @@ function tl(e, t, n) {
463
463
  ) : we(
464
464
  o,
465
465
  "groupByColumns",
466
- Pe(
466
+ xe(
467
467
  o == null ? void 0 : o.groupByColumns,
468
468
  t,
469
469
  (r) => pe(r, "groupby", n)
@@ -471,7 +471,7 @@ function tl(e, t, n) {
471
471
  ) ?? we(
472
472
  o,
473
473
  "metricColumns",
474
- Pe(
474
+ xe(
475
475
  o == null ? void 0 : o.metricColumns,
476
476
  t,
477
477
  (r) => pe(r, "metric", n)
@@ -788,12 +788,12 @@ function hi(e, t) {
788
788
  field: t ? r : Et(Ce(e.field), e.field.format, "raw")
789
789
  };
790
790
  }
791
- function Te(e, t = !1) {
791
+ function De(e, t = !1) {
792
792
  if (e)
793
793
  return {
794
794
  ...e,
795
795
  conditions: e.conditions.map((n) => hi(n, t)),
796
- groups: e.groups.map((n) => Te(n, t))
796
+ groups: e.groups.map((n) => De(n, t))
797
797
  };
798
798
  }
799
799
  function te(e) {
@@ -806,7 +806,7 @@ function te(e) {
806
806
  )
807
807
  }), (o = t.parameters) != null && o.filters && (t.parameters = {
808
808
  ...t.parameters,
809
- filters: Te(t.parameters.filters)
809
+ filters: De(t.parameters.filters)
810
810
  }), t;
811
811
  }
812
812
  function Ii(e, t) {
@@ -840,7 +840,7 @@ function vi(e, t = {}) {
840
840
  te
841
841
  ),
842
842
  detailColumns: Ci(n.detailColumns, (a = o.dataSource) == null ? void 0 : a.connectionType),
843
- filters: Te(n.filters)
843
+ filters: De(n.filters)
844
844
  };
845
845
  }
846
846
  function he(e) {
@@ -856,7 +856,7 @@ function Si(e) {
856
856
  const t = (n = e == null ? void 0 : e.numberFormat) == null ? void 0 : n.style;
857
857
  return t === void 0 || t === "decimal" || t === "currency";
858
858
  }
859
- function Di(e, t) {
859
+ function Ti(e, t) {
860
860
  const n = t == null ? void 0 : t.type;
861
861
  if (n && n !== "none" && n !== "number")
862
862
  return { currencyBindable: !1 };
@@ -870,7 +870,7 @@ function Di(e, t) {
870
870
  currencyBindable: he(a)
871
871
  };
872
872
  }
873
- function Ti(e, t) {
873
+ function Di(e, t) {
874
874
  const n = ge(t.format, {
875
875
  preserveOmittedProperties: !0
876
876
  }), o = re(t.dataType) === "number" ? { type: "number" } : void 0, r = n || o;
@@ -945,7 +945,7 @@ function Mi(e) {
945
945
  }
946
946
  function vn(e) {
947
947
  return new Set(
948
- Xt(e).flatMap(
948
+ Zt(e).flatMap(
949
949
  (t) => (t.controlBindings || []).filter(ve).map((n) => n.controlId)
950
950
  )
951
951
  );
@@ -1005,10 +1005,10 @@ function ki(e, t = [], n) {
1005
1005
  ), m = e.type === "matrixTable" ? [] : e.type === "kpi" ? c.filter((h) => h.currencyBindable).flatMap(
1006
1006
  (h) => h.target ? [h.target] : []
1007
1007
  ) : (o || !r ? [] : s).filter(
1008
- (h) => (Io(e.type) ? Di(
1008
+ (h) => (Io(e.type) ? Ti(
1009
1009
  h,
1010
1010
  Vi(a, h)
1011
- ) : Ti(e, h)).currencyBindable
1011
+ ) : Di(e, h)).currencyBindable
1012
1012
  ).map(
1013
1013
  (h) => ({
1014
1014
  kind: "metric",
@@ -1063,7 +1063,7 @@ function il(e) {
1063
1063
  function U(e) {
1064
1064
  return e.kind === "metric" ? `metric:${e.metricId}` : e.kind === "column" ? `column:${e.columnKey}` : `matrix_measure:${e.measureId}`;
1065
1065
  }
1066
- function xi(e) {
1066
+ function Pi(e) {
1067
1067
  if (!e || typeof e != "object" || Array.isArray(e))
1068
1068
  return;
1069
1069
  const t = e;
@@ -1074,7 +1074,7 @@ function xi(e) {
1074
1074
  if (t.kind === "matrix_measure" && typeof t.measureId == "string" && t.measureId.trim())
1075
1075
  return { kind: "matrix_measure", measureId: t.measureId };
1076
1076
  }
1077
- function Dt(e) {
1077
+ function Tt(e) {
1078
1078
  const t = $t(e);
1079
1079
  return typeof e == "string" && e === t ? t : void 0;
1080
1080
  }
@@ -1082,12 +1082,12 @@ function Fn(e) {
1082
1082
  if (e.type !== "enum" || e.source.kind !== "manual")
1083
1083
  return { diagnostic: "invalid_control_type" };
1084
1084
  const t = e.source.options.map(
1085
- (n) => Dt(n.value)
1085
+ (n) => Tt(n.value)
1086
1086
  );
1087
1087
  if (t.length === 0 || t.some((n) => !n))
1088
1088
  return { diagnostic: "invalid_currency_option" };
1089
1089
  if (e.requiredAtExecution) {
1090
- const n = e.initialValueStrategy === "saved_default" ? Dt(e.defaultValue) : void 0;
1090
+ const n = e.initialValueStrategy === "saved_default" ? Tt(e.defaultValue) : void 0;
1091
1091
  if (!n || !t.includes(n))
1092
1092
  return { diagnostic: "invalid_control_default" };
1093
1093
  }
@@ -1145,7 +1145,7 @@ function ll(e) {
1145
1145
  )
1146
1146
  });
1147
1147
  }
1148
- function Dn(e) {
1148
+ function Tn(e) {
1149
1149
  return {
1150
1150
  knownKeys: new Set(
1151
1151
  e.knownTargets.map(U)
@@ -1158,13 +1158,13 @@ function Dn(e) {
1158
1158
  )
1159
1159
  };
1160
1160
  }
1161
- function Tn(e, t) {
1161
+ function Dn(e, t) {
1162
1162
  if (!e || typeof e != "object" || e.target !== "presentation_currency")
1163
1163
  return {};
1164
1164
  const n = e, o = typeof n.controlId == "string" && n.controlId.trim() ? n.controlId : void 0;
1165
1165
  if (!o)
1166
1166
  return { diagnostic: { code: "invalid_binding_shape" } };
1167
- const r = xi(
1167
+ const r = Pi(
1168
1168
  n.presentationTarget
1169
1169
  );
1170
1170
  if (!r)
@@ -1198,17 +1198,17 @@ function Tn(e, t) {
1198
1198
  };
1199
1199
  }
1200
1200
  function cl(e) {
1201
- const t = Dn(e);
1201
+ const t = Tn(e);
1202
1202
  return (e.bindings || []).flatMap((n) => {
1203
- const o = Tn(n, t);
1203
+ const o = Dn(n, t);
1204
1204
  return "diagnostic" in o ? [o.diagnostic] : [];
1205
1205
  });
1206
1206
  }
1207
- function Pi(e) {
1207
+ function xi(e) {
1208
1208
  var r;
1209
- const t = [], n = U(e.target), o = Dn(e);
1209
+ const t = [], n = U(e.target), o = Tn(e);
1210
1210
  for (const i of e.bindings || []) {
1211
- const s = Tn(i, o);
1211
+ const s = Dn(i, o);
1212
1212
  if ("diagnostic" in s) {
1213
1213
  t.push(s.diagnostic);
1214
1214
  continue;
@@ -1228,7 +1228,7 @@ function Pi(e) {
1228
1228
  function wi(e, t, n, o) {
1229
1229
  const r = { ...e, config: { ...e.config, matrix: t } }, i = ki(r, [], o), s = In(r, o), a = { ...t.presentation.measureFormats };
1230
1230
  for (const c of s) {
1231
- const l = { kind: "matrix_measure", measureId: c.measureId }, { currency: u } = Pi({
1231
+ const l = { kind: "matrix_measure", measureId: c.measureId }, { currency: u } = xi({
1232
1232
  ...n,
1233
1233
  ...i,
1234
1234
  bindings: e.controlBindings,
@@ -1329,7 +1329,7 @@ function Ei(e, t) {
1329
1329
  )
1330
1330
  };
1331
1331
  }
1332
- function Tt(e = [], t) {
1332
+ function Dt(e = [], t) {
1333
1333
  return [...e].map((n) => Ai(n, t)).sort(
1334
1334
  (n, o) => n.id.localeCompare(o.id) || n.scope.localeCompare(o.scope) || n.type.localeCompare(o.type)
1335
1335
  );
@@ -1343,8 +1343,8 @@ function Bi(e = [], t) {
1343
1343
  }
1344
1344
  function _i(e, t) {
1345
1345
  return e ? _({
1346
- controlDefinitions: Tt(e.controlDefinitions, t),
1347
- cardControlDefinitions: Tt(
1346
+ controlDefinitions: Dt(e.controlDefinitions, t),
1347
+ cardControlDefinitions: Dt(
1348
1348
  e.cardControlDefinitions,
1349
1349
  t
1350
1350
  ),
@@ -1356,7 +1356,7 @@ function qi(e) {
1356
1356
  const { id: t, label: n, field: o, ...r } = e;
1357
1357
  return {
1358
1358
  ...r,
1359
- field: Xe(
1359
+ field: Ze(
1360
1360
  o
1361
1361
  )
1362
1362
  };
@@ -1371,7 +1371,7 @@ function Me(e) {
1371
1371
  groups: o.map((i) => Me(i))
1372
1372
  };
1373
1373
  }
1374
- function Xe(e) {
1374
+ function Ze(e) {
1375
1375
  var o, r;
1376
1376
  const { label: t, ...n } = e;
1377
1377
  return {
@@ -1380,7 +1380,7 @@ function Xe(e) {
1380
1380
  calculatedFormula: {
1381
1381
  ...e.calculatedFormula,
1382
1382
  inputFields: e.calculatedFormula.inputFields.map(
1383
- Xe
1383
+ Ze
1384
1384
  )
1385
1385
  }
1386
1386
  } : {},
@@ -1395,7 +1395,7 @@ function Xe(e) {
1395
1395
  };
1396
1396
  }
1397
1397
  function Ni(e) {
1398
- const t = (n) => n == null ? void 0 : n.map(Xe);
1398
+ const t = (n) => n == null ? void 0 : n.map(Ze);
1399
1399
  return {
1400
1400
  ...e,
1401
1401
  groupByColumns: t(e.groupByColumns),
@@ -1532,7 +1532,7 @@ function Mn(e) {
1532
1532
  deltaColumnKeys: i,
1533
1533
  percentChangeColumnKeys: s,
1534
1534
  ratioColumnKeys: a
1535
- } = Zt(e.comparisonMetadata), c = /* @__PURE__ */ new Set();
1535
+ } = Xt(e.comparisonMetadata), c = /* @__PURE__ */ new Set();
1536
1536
  t.showComparison && (n === "difference" || n === "both") && i.forEach((f) => c.add(f)), t.showComparison && (n === "percent_change" || n === "both") && s.forEach((f) => c.add(f)), t.showComparison && n === "ratio" && a.forEach((f) => c.add(f));
1537
1537
  const l = new Set(o);
1538
1538
  t.showComparison || r.forEach((f) => l.add(f)), [i, s, a].forEach(
@@ -1612,7 +1612,7 @@ function dl(e) {
1612
1612
  (o) => !Yt(e.comparisonMetadata, o)
1613
1613
  );
1614
1614
  }
1615
- function Ze(e) {
1615
+ function Xe(e) {
1616
1616
  const t = e.config ?? {};
1617
1617
  return e.type === "detailTable" ? [{ role: "detail", fields: t.detailColumns ?? [] }] : [
1618
1618
  { role: "groupby", fields: t.groupByColumns ?? [] },
@@ -1635,7 +1635,7 @@ function Vt(e) {
1635
1635
  }
1636
1636
  function $i(e, t) {
1637
1637
  var d, f;
1638
- const n = [...t.keys], o = new Set(n), r = t.columnKeyMap, i = Ze(e).flatMap(
1638
+ const n = [...t.keys], o = new Set(n), r = t.columnKeyMap, i = Xe(e).flatMap(
1639
1639
  ({ role: m, fields: g }) => g.flatMap((p) => {
1640
1640
  const y = et(p, m);
1641
1641
  return y ? [
@@ -1746,7 +1746,7 @@ function Yi(e, t, n, o) {
1746
1746
  let r = [...t.keys], i = /* @__PURE__ */ new Map();
1747
1747
  const s = t.comparisonMetadata;
1748
1748
  if (n === "screen") {
1749
- const f = Zt(s);
1749
+ const f = Xt(s);
1750
1750
  r = r.filter((g) => !f.internalKeys.has(g));
1751
1751
  const m = e.type === "table" ? (c = e.preferences) == null ? void 0 : c.comparisonPresentation : void 0;
1752
1752
  tn(m) || (r = r.filter((g) => !f.comparisonColumnKeys.has(g)));
@@ -1795,16 +1795,16 @@ function Ji(e, t, n) {
1795
1795
  }
1796
1796
  return o;
1797
1797
  }
1798
- function Xi(e) {
1799
- const t = Ze(e);
1798
+ function Zi(e) {
1799
+ const t = Xe(e);
1800
1800
  return [
1801
1801
  ...t.filter((n) => n.role === "metric"),
1802
1802
  ...t.filter((n) => n.role !== "metric")
1803
1803
  ];
1804
1804
  }
1805
- function Zi(e, t, n) {
1805
+ function Xi(e, t, n) {
1806
1806
  if (!t.length) return [];
1807
- const o = Xi(e), r = [], i = /* @__PURE__ */ new Set();
1807
+ const o = Zi(e), r = [], i = /* @__PURE__ */ new Set();
1808
1808
  for (const s of t) {
1809
1809
  const a = Er(o, s);
1810
1810
  if (!a) continue;
@@ -1885,7 +1885,7 @@ function os(e, t, n, o) {
1885
1885
  function pl(e) {
1886
1886
  if (oe(e) !== "config") return;
1887
1887
  const t = /* @__PURE__ */ new Set();
1888
- for (const { role: n, fields: o } of Ze(e))
1888
+ for (const { role: n, fields: o } of Xe(e))
1889
1889
  for (const r of o) {
1890
1890
  const i = et(r, n);
1891
1891
  i && t.add(j(i));
@@ -1918,7 +1918,7 @@ function gl(e) {
1918
1918
  return S;
1919
1919
  }, y = f.filter((C) => !g(C)), I = _e(y, p).flatMap(
1920
1920
  (C) => C.columnId ? [C.columnId] : []
1921
- ), v = new Set(I), M = r ? Zi(
1921
+ ), v = new Set(I), M = r ? Xi(
1922
1922
  t,
1923
1923
  ((dt = t.config) == null ? void 0 : dt.sortByColumns) ?? [],
1924
1924
  l.entries
@@ -1937,7 +1937,7 @@ function gl(e) {
1937
1937
  );
1938
1938
  A = C.length || !s.sort.length ? C : void 0;
1939
1939
  }
1940
- const D = hr(
1940
+ const T = hr(
1941
1941
  s ? {
1942
1942
  order: (ft = s.order) == null ? void 0 : ft.filter(
1943
1943
  (C) => v.has(C)
@@ -1952,14 +1952,14 @@ function gl(e) {
1952
1952
  ),
1953
1953
  sort: A
1954
1954
  } : void 0
1955
- ), F = D == null ? void 0 : D.order, k = F ? os(y, p, F, n.columns) : y, O = F ? [...k, ...f.filter(g)] : f, P = _e(k, p).flatMap(
1955
+ ), F = T == null ? void 0 : T.order, k = F ? os(y, p, F, n.columns) : y, O = F ? [...k, ...f.filter(g)] : f, x = _e(k, p).flatMap(
1956
1956
  (C) => C.columnId ? [C.columnId] : []
1957
- ), T = new Set((D == null ? void 0 : D.hidden) ?? []);
1958
- P.length && P.every((C) => T.has(C)) && T.delete(P[0]);
1959
- const x = o === "screen" ? Ji(t, n, f) : /* @__PURE__ */ new Map(), E = (C, S) => {
1957
+ ), D = new Set((T == null ? void 0 : T.hidden) ?? []);
1958
+ x.length && x.every((C) => D.has(C)) && D.delete(x[0]);
1959
+ const P = o === "screen" ? Ji(t, n, f) : /* @__PURE__ */ new Map(), E = (C, S) => {
1960
1960
  const V = u(S == null ? void 0 : S.columnId);
1961
1961
  if ((S == null ? void 0 : S.part) === "base" && V) return V;
1962
- const N = x.get(C);
1962
+ const N = P.get(C);
1963
1963
  if (N)
1964
1964
  return ai(
1965
1965
  ((S == null ? void 0 : S.part) === "comparison" ? V : void 0) ?? (N.metric.label || N.metric.name),
@@ -1967,7 +1967,7 @@ function gl(e) {
1967
1967
  );
1968
1968
  const J = m.get(C);
1969
1969
  if (J) return J;
1970
- const X = gi({
1970
+ const Z = gi({
1971
1971
  columnId: C,
1972
1972
  card: t,
1973
1973
  columnKeyMap: c,
@@ -1976,7 +1976,7 @@ function gl(e) {
1976
1976
  // as dates (its temporal activation covers group columns only).
1977
1977
  metricLabelOverride: (S == null ? void 0 : S.part) === "pivot-member" ? V : void 0
1978
1978
  });
1979
- return X || (gn(C, t, c) ?? C);
1979
+ return Z || (gn(C, t, c) ?? C);
1980
1980
  }, R = O.map((C) => {
1981
1981
  var V;
1982
1982
  const S = p(C);
@@ -1984,32 +1984,32 @@ function gl(e) {
1984
1984
  outputKey: C,
1985
1985
  ...S ? { columnId: S.columnId } : {},
1986
1986
  part: (S == null ? void 0 : S.part) ?? ((V = l.owners.get(C)) == null ? void 0 : V.part) ?? "base",
1987
- visible: !g(C) && !(S && T.has(S.columnId)),
1987
+ visible: !g(C) && !(S && D.has(S.columnId)),
1988
1988
  label: E(C, S)
1989
1989
  };
1990
1990
  }), z = Object.fromEntries(
1991
1991
  R.map((C) => [C.outputKey, C.label])
1992
- ), Y = a === "page-only" ? [] : a === "query" ? M : (D == null ? void 0 : D.sort) ?? [], Ve = new Map(
1992
+ ), Y = a === "page-only" ? [] : a === "query" ? M : (T == null ? void 0 : T.sort) ?? [], Ve = new Map(
1993
1993
  Y.map((C) => [C.columnId, C.direction])
1994
1994
  ), ro = Y.flatMap((C) => {
1995
1995
  var V;
1996
1996
  const S = (V = l.entries.get(C.columnId)) == null ? void 0 : V.baseKey;
1997
1997
  return S && y.includes(S) ? [{ outputKey: S, desc: C.direction === "desc" }] : [];
1998
- }), ct = !i && !!(D != null && D.order || D != null && D.hidden || D != null && D.labels);
1998
+ }), ct = !i && !!(T != null && T.order || T != null && T.hidden || T != null && T.labels);
1999
1999
  let ce;
2000
2000
  if (i)
2001
2001
  ce = { available: !1, reason: i };
2002
- else if (!P.length)
2002
+ else if (!x.length)
2003
2003
  ce = { available: !1, reason: "no-addressable-columns" };
2004
2004
  else {
2005
- const C = new Set(F ?? []), S = P.filter(
2006
- (V) => !T.has(V)
2005
+ const C = new Set(F ?? []), S = x.filter(
2006
+ (V) => !D.has(V)
2007
2007
  ).length;
2008
2008
  ce = {
2009
2009
  available: !0,
2010
2010
  canReset: ct,
2011
- items: P.map((V) => {
2012
- const N = l.entries.get(V), J = T.has(V), X = Ve.get(V);
2011
+ items: x.map((V) => {
2012
+ const N = l.entries.get(V), J = D.has(V), Z = Ve.get(V);
2013
2013
  return {
2014
2014
  columnId: V,
2015
2015
  label: u(V) ?? N.authorLabel,
@@ -2017,7 +2017,7 @@ function gl(e) {
2017
2017
  hidden: J,
2018
2018
  isNew: F !== void 0 && !C.has(V),
2019
2019
  canHide: !J && S > 1,
2020
- ...X ? { sort: X } : {}
2020
+ ...Z ? { sort: Z } : {}
2021
2021
  };
2022
2022
  })
2023
2023
  };
@@ -2029,7 +2029,7 @@ function gl(e) {
2029
2029
  sortMode: a,
2030
2030
  clientSort: ro,
2031
2031
  panel: ce,
2032
- ...D ? { settings: D } : {},
2032
+ ...T ? { settings: T } : {},
2033
2033
  dropped: w,
2034
2034
  isCustomized: ct,
2035
2035
  canSort: i !== "card-type" && a !== "page-only",
@@ -2127,15 +2127,15 @@ function nt(e) {
2127
2127
  var t;
2128
2128
  return e.type === "table" && !((t = e.sql) != null && t.trim()) && !!e.config;
2129
2129
  }
2130
- function xn(e) {
2130
+ function Pn(e) {
2131
2131
  var t, n, o, r;
2132
2132
  return ((r = (o = (n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.tableStyle) == null ? void 0 : o.totals) == null ? void 0 : r.enabled) === !0;
2133
2133
  }
2134
- function Pn(e) {
2135
- return nt(e) ? xn(e) : !1;
2134
+ function xn(e) {
2135
+ return nt(e) ? Pn(e) : !1;
2136
2136
  }
2137
2137
  function ss(e, t, n) {
2138
- if (!Pn(e))
2138
+ if (!xn(e))
2139
2139
  return;
2140
2140
  const o = tt(e, n).filter((r) => r.role !== "metric").map((r) => new Set(ae(r)));
2141
2141
  return t.find(
@@ -2148,7 +2148,7 @@ function hl({
2148
2148
  visibleColumnIds: n,
2149
2149
  totalsByColumnId: o
2150
2150
  }) {
2151
- if (!Pn(e) || !o || Object.keys(o).length === 0)
2151
+ if (!xn(e) || !o || Object.keys(o).length === 0)
2152
2152
  return;
2153
2153
  const r = ss(
2154
2154
  e,
@@ -2184,10 +2184,10 @@ function Il(e) {
2184
2184
  } : e;
2185
2185
  }
2186
2186
  function as(e, t, n) {
2187
- if (!nt(e) || !xn(e))
2187
+ if (!nt(e) || !Pn(e))
2188
2188
  return;
2189
2189
  const o = tt(e, t), r = new Set(
2190
- xr(
2190
+ Pr(
2191
2191
  o.filter((c) => c.role === "metric")
2192
2192
  )
2193
2193
  ), i = o.filter((c) => c.role !== "metric"), s = n && i.find(
@@ -2275,10 +2275,10 @@ function Sl({
2275
2275
  pageSize: (e == null ? void 0 : e.pageSize) ?? t
2276
2276
  };
2277
2277
  }
2278
- function Dl(e, t, n) {
2278
+ function Tl(e, t, n) {
2279
2279
  return (e == null ? void 0 : e.queryInputIdentity) === n && e.page === t.page && e.pageSize === t.pageSize;
2280
2280
  }
2281
- function Tl(e, t) {
2281
+ function Dl(e, t) {
2282
2282
  return !e || !t || e.page === t.page && e.pageSize === t.pageSize ? e : {
2283
2283
  ...e,
2284
2284
  page: t.page,
@@ -2296,7 +2296,7 @@ function ms(e) {
2296
2296
  isTablePrintMode: ((s = e.display) == null ? void 0 : s.isTablePrintMode) ?? !1,
2297
2297
  isDocumentSectionRuntime: !!e.documentSection,
2298
2298
  documentTableDataPolicy: (a = e.documentSection) == null ? void 0 : a.documentTableDataPolicy
2299
- }), { page: o } = e, r = e.tableTotalsRequest ?? (e.documentSection ? void 0 : as(t, e.finalConfig)), i = !!((c = e.display) != null && c.deliveryStrict && e.display.isTablePrintMode && !e.documentSection && Pr(t.type));
2299
+ }), { page: o } = e, r = e.tableTotalsRequest ?? (e.documentSection ? void 0 : as(t, e.finalConfig)), i = !!((c = e.display) != null && c.deliveryStrict && e.display.isTablePrintMode && !e.documentSection && xr(t.type));
2300
2300
  return {
2301
2301
  ...r ? { tableTotalsRequest: r } : {},
2302
2302
  ...i ? { sourceRowProbe: { limit: wr.maxTableRows } } : {},
@@ -2397,45 +2397,45 @@ function Cs(e) {
2397
2397
  const h = `${p.target}:${y}`;
2398
2398
  s.has(h) && I("Multiple controls cannot replace the same Matrix target."), s.add(h);
2399
2399
  const w = (F) => {
2400
- const k = (l().byId.get(F.id) ?? []).filter((P) => !F.source || Oe(F.source, P.field.source ?? e.spec.source));
2400
+ const k = (l().byId.get(F.id) ?? []).filter((x) => !F.source || Oe(F.source, x.field.source ?? e.spec.source));
2401
2401
  if (k.length !== 1) return I(k.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
2402
2402
  const O = ur.safeParse(k[0].field);
2403
2403
  return O.success ? O.data : I(O.error.message);
2404
- }, A = p.target === "config_metric_selector" || p.target === "config_field_selector" ? p.mapping[b] : void 0, D = A && typeof A == "object" && "kind" in A && A.kind === "matrix_instance" ? A.id : void 0;
2404
+ }, A = p.target === "config_metric_selector" || p.target === "config_field_selector" ? p.mapping[b] : void 0, T = A && typeof A == "object" && "kind" in A && A.kind === "matrix_instance" ? A.id : void 0;
2405
2405
  if (v) {
2406
2406
  a.set(y, p.controlId);
2407
- const F = D === void 0 ? void 0 : m.data.measures.find(
2408
- (T) => T.id === D && T.kind === "aggregate"
2407
+ const F = T === void 0 ? void 0 : m.data.measures.find(
2408
+ (D) => D.id === T && D.kind === "aggregate"
2409
2409
  );
2410
- D !== void 0 && !F && I("The selected Matrix aggregate measure is no longer available.");
2411
- const k = p.target === "config_metric_selector" && !F ? So({ binding: p, selectedValue: b }) : void 0, O = ((F == null ? void 0 : F.kind) === "aggregate" ? F.aggregate : k == null ? void 0 : k.aggregate) ?? (p.target === "config_aggregation" ? mt({ binding: p, selectedValue: b }) : void 0), P = O === void 0 ? void 0 : cr.safeParse(O);
2412
- P && !P.success && I("This aggregation is not supported by Matrix."), t = {
2410
+ T !== void 0 && !F && I("The selected Matrix aggregate measure is no longer available.");
2411
+ const k = p.target === "config_metric_selector" && !F ? So({ binding: p, selectedValue: b }) : void 0, O = ((F == null ? void 0 : F.kind) === "aggregate" ? F.aggregate : k == null ? void 0 : k.aggregate) ?? (p.target === "config_aggregation" ? mt({ binding: p, selectedValue: b }) : void 0), x = O === void 0 ? void 0 : cr.safeParse(O);
2412
+ x && !x.success && I("This aggregation is not supported by Matrix."), t = {
2413
2413
  ...t,
2414
2414
  measures: t.measures.map(
2415
- (T) => T.id !== y || T.kind !== "aggregate" ? T : {
2416
- ...T,
2415
+ (D) => D.id !== y || D.kind !== "aggregate" ? D : {
2416
+ ...D,
2417
2417
  ...k ? { field: w(k) } : {},
2418
2418
  ...(F == null ? void 0 : F.kind) === "aggregate" ? { field: F.field } : {},
2419
- aggregate: P != null && P.success ? P.data : T.aggregate
2419
+ aggregate: x != null && x.success ? x.data : D.aggregate
2420
2420
  }
2421
2421
  )
2422
2422
  };
2423
2423
  } else {
2424
- const F = D === void 0 ? void 0 : [...m.data.rows, ...m.data.columns].find(
2425
- (T) => T.id === D
2424
+ const F = T === void 0 ? void 0 : [...m.data.rows, ...m.data.columns].find(
2425
+ (D) => D.id === T
2426
2426
  );
2427
- D !== void 0 && !F && I("The selected Matrix level is no longer available.");
2428
- const k = p.target === "config_field_selector" && !F ? Do({ binding: p, selectedValue: b }) : void 0, O = p.target === "config_grain" ? mt({ binding: p, selectedValue: b }) : F ? F.grain : k == null ? void 0 : k.granularity;
2427
+ T !== void 0 && !F && I("The selected Matrix level is no longer available.");
2428
+ const k = p.target === "config_field_selector" && !F ? To({ binding: p, selectedValue: b }) : void 0, O = p.target === "config_grain" ? mt({ binding: p, selectedValue: b }) : F ? F.grain : k == null ? void 0 : k.granularity;
2429
2429
  O !== void 0 && !bs.has(O) && I("This time grain is not supported by Matrix.");
2430
- const P = (T) => T.map((x) => {
2431
- if (x.id !== y) return x;
2432
- const E = (F == null ? void 0 : F.field) ?? (k ? w(k) : x.field), R = d(E, p.controlId), z = O ?? (k && yt(R) ? x.grain : void 0);
2433
- return z && !yt(R) && I("A time grain requires a temporal Matrix level."), { ...x, field: E, grain: z };
2430
+ const x = (D) => D.map((P) => {
2431
+ if (P.id !== y) return P;
2432
+ const E = (F == null ? void 0 : F.field) ?? (k ? w(k) : P.field), R = d(E, p.controlId), z = O ?? (k && yt(R) ? P.grain : void 0);
2433
+ return z && !yt(R) && I("A time grain requires a temporal Matrix level."), { ...P, field: E, grain: z };
2434
2434
  });
2435
2435
  t = {
2436
2436
  ...t,
2437
- rows: P(t.rows),
2438
- columns: P(t.columns)
2437
+ rows: x(t.rows),
2438
+ columns: x(t.columns)
2439
2439
  };
2440
2440
  }
2441
2441
  }
@@ -2443,7 +2443,7 @@ function Cs(e) {
2443
2443
  const b = t.measures.find((v) => v.id === p);
2444
2444
  if (!b || b.kind !== "aggregate") continue;
2445
2445
  const I = d(b.field, y);
2446
- To(I).some((v) => v.value === b.aggregate) || u(`Aggregation '${b.aggregate}' is not eligible for this Matrix field datatype.`, y);
2446
+ Do(I).some((v) => v.value === b.aggregate) || u(`Aggregation '${b.aggregate}' is not eligible for this Matrix field datatype.`, y);
2447
2447
  }
2448
2448
  try {
2449
2449
  return Mo(m.data, t);
@@ -2497,7 +2497,7 @@ function Ss(e, t) {
2497
2497
  sortPolicy: "retargetDimensionSort"
2498
2498
  }) : e.config ?? {};
2499
2499
  }
2500
- function Ds(e, t) {
2500
+ function Ts(e, t) {
2501
2501
  const n = (e == null ? void 0 : e.steps) ?? [];
2502
2502
  if (n.length !== 0)
2503
2503
  return {
@@ -2533,7 +2533,7 @@ function ot(e) {
2533
2533
  function rt(e) {
2534
2534
  return e === "not in" ? "exclude" : "include";
2535
2535
  }
2536
- function Ts(e) {
2536
+ function Ds(e) {
2537
2537
  return e === "exclude" ? "not in" : "in";
2538
2538
  }
2539
2539
  function Vl(e) {
@@ -2558,30 +2558,30 @@ function Vs(e, t) {
2558
2558
  if (t.size !== 1 || !ot(e.operation))
2559
2559
  return e;
2560
2560
  const [n] = t;
2561
- return rt(e.operation) === n ? e : { ...e, operation: Ts(n) };
2561
+ return rt(e.operation) === n ? e : { ...e, operation: Ds(n) };
2562
2562
  }
2563
2563
  function ks(e, t) {
2564
2564
  var r;
2565
2565
  const n = (i) => Object.values(i ?? {}).map((s) => s[t.id]);
2566
2566
  return (t.runtimeScope === "shared" ? [(r = e == null ? void 0 : e.shared) == null ? void 0 : r[t.id]] : t.runtimeScope === "perSheet" ? n(e == null ? void 0 : e.bySheetId) : t.runtimeScope === "perCard" ? n(e == null ? void 0 : e.byCardId) : t.runtimeScope === "perDocumentSection" ? n(e == null ? void 0 : e.byDocumentSectionId) : []).flatMap(
2567
- (i) => (i == null ? void 0 : i.status) === "set" && i.value.kind === "filter" ? xs(i.value.filterValue) : []
2567
+ (i) => (i == null ? void 0 : i.status) === "set" && i.value.kind === "filter" ? Ps(i.value.filterValue) : []
2568
2568
  );
2569
2569
  }
2570
- function xs(e) {
2570
+ function Ps(e) {
2571
2571
  return ot(e.operation) ? [rt(e.operation)] : [];
2572
2572
  }
2573
2573
  function kl(e) {
2574
- const t = Qt(e), o = K(t).issues.length ? t : xa(t);
2574
+ const t = Qt(e), o = K(t).issues.length ? t : Pa(t);
2575
2575
  return ri(Ms(o)).dashboard;
2576
2576
  }
2577
2577
  function it(e, t) {
2578
2578
  const n = {};
2579
- for (const o of Xt(e)) {
2579
+ for (const o of Zt(e)) {
2580
2580
  if (!o.inlineFilters || o.inlineFilters.length === 0)
2581
2581
  continue;
2582
2582
  const r = [];
2583
2583
  for (const i of o.inlineFilters) {
2584
- const s = xo(i, t);
2584
+ const s = Po(i, t);
2585
2585
  s && r.push(s);
2586
2586
  }
2587
2587
  r.length > 0 && (n[o.id] = r);
@@ -2628,7 +2628,7 @@ function st(e, t, n) {
2628
2628
  n
2629
2629
  );
2630
2630
  }
2631
- function xl(e, t, n) {
2631
+ function Pl(e, t, n) {
2632
2632
  return An(e, t, n);
2633
2633
  }
2634
2634
  function An(e, t, n) {
@@ -2688,7 +2688,7 @@ function En(e, t) {
2688
2688
  inlineFilterValues: r
2689
2689
  };
2690
2690
  }
2691
- function Ps(e, t) {
2691
+ function xs(e, t) {
2692
2692
  if (!t.size) return [...e];
2693
2693
  const n = e.filter((r) => !t.has(r.filterId)), o = [...t.values()].filter(
2694
2694
  (r) => r !== null
@@ -2703,7 +2703,7 @@ function Bn(e, t, n) {
2703
2703
  { hasExplicitRuntimeOverrides: t !== void 0 }
2704
2704
  );
2705
2705
  return {
2706
- ...Po({
2706
+ ...xo({
2707
2707
  dashboardValues: o.dashboardControlValues,
2708
2708
  cardValuesMap: o.cardControlValuesMap
2709
2709
  }),
@@ -2716,7 +2716,7 @@ function ws(e, t) {
2716
2716
  Object.entries(e).map(([o, r]) => [o, [...r]])
2717
2717
  );
2718
2718
  for (const [o, r] of t)
2719
- n[o] = Ps(n[o] ?? [], r);
2719
+ n[o] = xs(n[o] ?? [], r);
2720
2720
  return n;
2721
2721
  }
2722
2722
  function Os(e, t, n) {
@@ -2735,11 +2735,11 @@ function Os(e, t, n) {
2735
2735
  const d = c == null ? void 0 : c.get(u.filterId);
2736
2736
  return d ? je(d, u) : !1;
2737
2737
  });
2738
- De(l, i[s] ?? []) || (r = !0), i[s] = l;
2738
+ Te(l, i[s] ?? []) || (r = !0), i[s] = l;
2739
2739
  }
2740
2740
  return r ? i : void 0;
2741
2741
  }
2742
- function Pl(e) {
2742
+ function xl(e) {
2743
2743
  const { dashboard: t, capture: n, calendar: o } = e, r = oo(t, n.filterValues, {
2744
2744
  calendar: o
2745
2745
  }), i = n.dashboardInputExecutionSnapshot, s = n.controlValues, a = {
@@ -2954,7 +2954,7 @@ function _s(e, t, n) {
2954
2954
  });
2955
2955
  }
2956
2956
  }
2957
- const at = (e, t) => De(e ?? null, t ?? null);
2957
+ const at = (e, t) => Te(e ?? null, t ?? null);
2958
2958
  function qn(e) {
2959
2959
  return {
2960
2960
  adHocFilterValues: e.adHocFilterValues,
@@ -3056,7 +3056,7 @@ function Rs(e) {
3056
3056
  function Ln(e) {
3057
3057
  return e ? { inlineFilterValuesMap: e } : {};
3058
3058
  }
3059
- function xt(e, t, n) {
3059
+ function Pt(e, t, n) {
3060
3060
  const { dashboard: o, baseline: r } = e;
3061
3061
  return {
3062
3062
  // A reload in place keeps ad-hoc values, as today (P4a-02 f), unless the
@@ -3107,11 +3107,11 @@ function El(e) {
3107
3107
  case "refetch": {
3108
3108
  const { live: i } = o, s = i.applied, a = {
3109
3109
  sheetChanged: !!i.previousBaseline && i.previousBaseline.hostSelectedSheetId !== n.hostSelectedSheetId,
3110
- controlsChanged: !!i.previousBaseline && !De(
3110
+ controlsChanged: !!i.previousBaseline && !Te(
3111
3111
  i.previousBaseline.controlOverrides ?? null,
3112
3112
  n.controlOverrides ?? null
3113
3113
  )
3114
- }, c = xt(
3114
+ }, c = Pt(
3115
3115
  e,
3116
3116
  {
3117
3117
  adHocFilterValues: i.adHocFilterValues,
@@ -3122,7 +3122,7 @@ function El(e) {
3122
3122
  tableSettings: i.tableSettings
3123
3123
  },
3124
3124
  a
3125
- ), l = s ? xt(e, s.restore, a) : de(
3125
+ ), l = s ? Pt(e, s.restore, a) : de(
3126
3126
  n,
3127
3127
  B(t, r, void 0)
3128
3128
  );
@@ -3235,19 +3235,19 @@ function _l(e, t, n) {
3235
3235
  restore: o
3236
3236
  };
3237
3237
  }
3238
- const Pt = (e) => JSON.stringify([e.scope, e.target, e.inputId]);
3238
+ const xt = (e) => JSON.stringify([e.scope, e.target, e.inputId]);
3239
3239
  function fe(e) {
3240
3240
  return !e || e.status === "cleared" && !e.comparisonSelection;
3241
3241
  }
3242
3242
  function jn(e, t) {
3243
3243
  const n = new Map(
3244
- ne(e).map((i) => [Pt(i), i])
3244
+ ne(e).map((i) => [xt(i), i])
3245
3245
  ), o = new Map(
3246
- ne(t).map((i) => [Pt(i), i])
3246
+ ne(t).map((i) => [xt(i), i])
3247
3247
  ), r = {};
3248
3248
  for (const [i, s] of o) {
3249
3249
  const a = n.get(i);
3250
- a && De(a.slot, s.slot) || fe(s.slot) && fe(a == null ? void 0 : a.slot) || Ie(
3250
+ a && Te(a.slot, s.slot) || fe(s.slot) && fe(a == null ? void 0 : a.slot) || Ie(
3251
3251
  r,
3252
3252
  s,
3253
3253
  fe(s.slot) ? { status: "cleared" } : s.slot
@@ -3670,7 +3670,7 @@ function jl(e, t) {
3670
3670
  });
3671
3671
  }
3672
3672
  function Js(e, t, n) {
3673
- const o = Tr(e);
3673
+ const o = Dr(e);
3674
3674
  if (!o) throw new Error("Matrix card definition is required.");
3675
3675
  const r = n && Cs({
3676
3676
  ...n,
@@ -3701,7 +3701,7 @@ function Js(e, t, n) {
3701
3701
  };
3702
3702
  return { config: i, fields: l, resolveField: s };
3703
3703
  }
3704
- function Xs(e) {
3704
+ function Zs(e) {
3705
3705
  const t = e.filter(Boolean);
3706
3706
  if (t.length !== 0)
3707
3707
  return t.length === 1 ? t[0] : {
@@ -3712,7 +3712,7 @@ function Xs(e) {
3712
3712
  groups: t
3713
3713
  };
3714
3714
  }
3715
- function Zs(e) {
3715
+ function Xs(e) {
3716
3716
  if (!e) return;
3717
3717
  const t = (n) => ({
3718
3718
  logicalOperator: n.logicalOperator,
@@ -3771,12 +3771,12 @@ function zl(e, t = {}) {
3771
3771
  return Qn(Wn(e, t));
3772
3772
  }
3773
3773
  function Qn(e) {
3774
- return Xs([e.authored, e.drill, e.selections]);
3774
+ return Zs([e.authored, e.drill, e.selections]);
3775
3775
  }
3776
3776
  function Wn(e, t = {}) {
3777
3777
  return {
3778
3778
  authored: t.includeAuthoredFilters === !1 ? void 0 : Uo(e),
3779
- drill: Ds(t.drill, e.id),
3779
+ drill: Ts(t.drill, e.id),
3780
3780
  selections: Or(t.selections ?? [])
3781
3781
  };
3782
3782
  }
@@ -3863,7 +3863,7 @@ function ra({
3863
3863
  dashboardInputContext: d,
3864
3864
  includeAuthoredFilters: f
3865
3865
  }) {
3866
- var D;
3866
+ var T;
3867
3867
  const m = vn(t);
3868
3868
  for (const F of e.controlBindings || [])
3869
3869
  ve(F) && m.add(F.controlId);
@@ -3876,7 +3876,7 @@ function ra({
3876
3876
  (F) => F.status === "apply"
3877
3877
  ),
3878
3878
  drill: o == null ? void 0 : o.drill
3879
- }), b = Qn(y), I = f === !1 ? Te(b, !0) : b, v = ta(
3879
+ }), b = Qn(y), I = f === !1 ? De(b, !0) : b, v = ta(
3880
3880
  e,
3881
3881
  o == null ? void 0 : o.drill,
3882
3882
  I
@@ -3888,7 +3888,7 @@ function ra({
3888
3888
  sql: e.sql,
3889
3889
  normalizedPython: Le(e.python || "")
3890
3890
  })
3891
- }) || M, w = Zs(I) || "", A = p ? Yn(
3891
+ }) || M, w = Xs(I) || "", A = p ? Yn(
3892
3892
  e,
3893
3893
  {
3894
3894
  controlValues: p.controlValues,
@@ -3927,7 +3927,7 @@ function ra({
3927
3927
  ...A,
3928
3928
  resolvedFilters: I,
3929
3929
  resolvedFilterParts: y,
3930
- drillSteps: ((D = o == null ? void 0 : o.drill) == null ? void 0 : D.steps) ?? Qo,
3930
+ drillSteps: ((T = o == null ? void 0 : o.drill) == null ? void 0 : T.steps) ?? Qo,
3931
3931
  finalConfig: M,
3932
3932
  queryRelevantConfig: h,
3933
3933
  finalFiltersKey: w
@@ -3941,7 +3941,7 @@ function Jn(e, t) {
3941
3941
  (n) => ia(n.filterId, t)
3942
3942
  );
3943
3943
  }
3944
- function Xn(e, t, n) {
3944
+ function Zn(e, t, n) {
3945
3945
  var o;
3946
3946
  if (t)
3947
3947
  return {
@@ -3952,7 +3952,7 @@ function Xn(e, t, n) {
3952
3952
  }
3953
3953
  function sa(e) {
3954
3954
  if (e.resolution.status === "resolved")
3955
- return Xn(
3955
+ return Zn(
3956
3956
  e.card,
3957
3957
  e.resolution.resolvedOwner.selection,
3958
3958
  e.resolution.resolvedOwner.owner
@@ -4106,7 +4106,7 @@ function da({
4106
4106
  )), g = d.resolvedPrimaryDateField && !((p = e.sql) != null && p.trim()) ? d.dateComparisonPlan.inputs.length ? sa({
4107
4107
  card: e,
4108
4108
  resolution: d.dateComparisonPlan.resolution
4109
- }) : m ? Xn(
4109
+ }) : m ? Zn(
4110
4110
  e,
4111
4111
  n.globalDateComparisonSelection
4112
4112
  ) : void 0 : void 0;
@@ -4118,7 +4118,7 @@ function da({
4118
4118
  mappingDispositions: l.mappingDispositions
4119
4119
  };
4120
4120
  }
4121
- function Zn(e, t, n) {
4121
+ function Xn(e, t, n) {
4122
4122
  const o = da({
4123
4123
  resolvedFields: t.resolvedDateFields,
4124
4124
  ...n,
@@ -4139,7 +4139,7 @@ function Zn(e, t, n) {
4139
4139
  }, compiledFilters: o };
4140
4140
  }
4141
4141
  function fa(e, t, n) {
4142
- const o = Yo(e), r = Zn(e, t, {
4142
+ const o = Yo(e), r = Xn(e, t, {
4143
4143
  resolvedPrimaryDateField: n.resolvedPrimaryDateField,
4144
4144
  timezone: n.calendarContext.tz,
4145
4145
  allowMinutePrecision: n.allowGlobalDateMinutePrecision
@@ -4334,11 +4334,11 @@ function ha({
4334
4334
  message: "Matrix field metadata is required.",
4335
4335
  context: v
4336
4336
  };
4337
- const A = Is(h.config.spec, v), D = r.filter(
4338
- (x) => x.field.source && A.some(
4339
- (E) => Oe(E, x.field.source)
4337
+ const A = Is(h.config.spec, v), T = r.filter(
4338
+ (P) => P.field.source && A.some(
4339
+ (E) => Oe(E, P.field.source)
4340
4340
  )
4341
- ), F = Js(b, D, v), { params: k } = w, O = k.dashboardInputContext;
4341
+ ), F = Js(b, T, v), { params: k } = w, O = k.dashboardInputContext;
4342
4342
  F.config = {
4343
4343
  ...F.config,
4344
4344
  presentation: wi(
@@ -4357,20 +4357,20 @@ function ha({
4357
4357
  ...(M = k.cardControlValuesMap) == null ? void 0 : M[b.id]
4358
4358
  }
4359
4359
  },
4360
- D
4360
+ T
4361
4361
  )
4362
4362
  };
4363
- const P = {
4363
+ const x = {
4364
4364
  ...b,
4365
4365
  config: { matrix: F.config }
4366
- }, T = qe(P, I, n, !1);
4366
+ }, D = qe(x, I, n, !1);
4367
4367
  return {
4368
4368
  status: "ready",
4369
4369
  value: {
4370
4370
  assembled: {
4371
- card: P,
4372
- context: { ...T.context, resolvedDateFields: F.fields },
4373
- inputContext: T.inputContext
4371
+ card: x,
4372
+ context: { ...D.context, resolvedDateFields: F.fields },
4373
+ inputContext: D.inputContext
4374
4374
  },
4375
4375
  matrix: F
4376
4376
  }
@@ -4403,34 +4403,34 @@ function ha({
4403
4403
  let v = f.allowGlobalDateMinutePrecision;
4404
4404
  if (I) {
4405
4405
  const w = (p = m.dashboardInputContext) == null ? void 0 : p.inputs.find(
4406
- (T) => T.kind === "filter" && T.filter.id === g.id
4407
- ), D = Xo(s, g).filter(
4408
- ({ card: T, sheet: x }) => !w || Dr(w, {
4409
- cardId: T.id,
4410
- sheetId: x.id,
4411
- sheetKind: Gt(x) ? "document" : "dashboard"
4406
+ (D) => D.kind === "filter" && D.filter.id === g.id
4407
+ ), T = Zo(s, g).filter(
4408
+ ({ card: D, sheet: P }) => !w || Tr(w, {
4409
+ cardId: D.id,
4410
+ sheetId: P.id,
4411
+ sheetKind: Gt(P) ? "document" : "dashboard"
4412
4412
  })
4413
- ).map(({ card: T, sheet: x }) => ({
4414
- card: T,
4415
- value: T.id === a ? l : c(T, { kind: "sheet", sheetId: x.id })
4413
+ ).map(({ card: D, sheet: P }) => ({
4414
+ card: D,
4415
+ value: D.id === a ? l : c(D, { kind: "sheet", sheetId: P.id })
4416
4416
  })), F = new Map(
4417
- D.map(({ card: T, value: x }) => [
4418
- T.id,
4419
- x.status === "ready" ? x.value.assembled.card : null
4417
+ T.map(({ card: D, value: P }) => [
4418
+ D.id,
4419
+ P.status === "ready" ? P.value.assembled.card : null
4420
4420
  ])
4421
4421
  ), k = new Map(
4422
- D.map(({ card: T, value: x }) => {
4422
+ T.map(({ card: D, value: P }) => {
4423
4423
  var E;
4424
4424
  return [
4425
- T.id,
4426
- x.status === "ready" ? (E = x.value.matrix) == null ? void 0 : E.fields : void 0
4425
+ D.id,
4426
+ P.status === "ready" ? (E = P.value.matrix) == null ? void 0 : E.fields : void 0
4427
4427
  ];
4428
4428
  })
4429
- ), O = D.flatMap(
4430
- ({ card: T, value: x }) => {
4431
- const E = T.id, R = x.status === "ready" ? x.value.assembled.context : x.context;
4429
+ ), O = T.flatMap(
4430
+ ({ card: D, value: P }) => {
4431
+ const E = D.id, R = P.status === "ready" ? P.value.assembled.context : P.context;
4432
4432
  if (!R) return [E];
4433
- const z = x.status === "ready" ? x.value.assembled.card : T;
4433
+ const z = P.status === "ready" ? P.value.assembled.card : D;
4434
4434
  try {
4435
4435
  const Y = Ke(
4436
4436
  z,
@@ -4441,7 +4441,7 @@ function ha({
4441
4441
  return F.set(E, null), [E];
4442
4442
  }
4443
4443
  }
4444
- ), P = He(
4444
+ ), x = He(
4445
4445
  s,
4446
4446
  o,
4447
4447
  g,
@@ -4449,16 +4449,16 @@ function ha({
4449
4449
  k,
4450
4450
  O
4451
4451
  );
4452
- if ((y = P.unresolvedCardIds) != null && y.length)
4452
+ if ((y = x.unresolvedCardIds) != null && y.length)
4453
4453
  return {
4454
4454
  status: "blocked",
4455
4455
  cardId: a,
4456
4456
  mappingDispositions: [],
4457
4457
  reason: "coverage",
4458
4458
  missingRequiredLabels: [],
4459
- message: `Date precision requires field metadata and valid inputs for: ${P.unresolvedCardIds.join(", ")}.`
4459
+ message: `Date precision requires field metadata and valid inputs for: ${x.unresolvedCardIds.join(", ")}.`
4460
4460
  };
4461
- v = P.allEligibleTargetsAreDateTime;
4461
+ v = x.allEligibleTargetsAreDateTime;
4462
4462
  }
4463
4463
  const M = no(u, f, v);
4464
4464
  if (M.status === "blocked")
@@ -4581,7 +4581,7 @@ function to({ card: e, context: t }, n) {
4581
4581
  });
4582
4582
  }
4583
4583
  function no(e, t, n) {
4584
- const { card: o } = e, r = to(e, t), i = Zn(o, e.context, {
4584
+ const { card: o } = e, r = to(e, t), i = Xn(o, e.context, {
4585
4585
  resolvedPrimaryDateField: r,
4586
4586
  timezone: t.calendarContext.tz,
4587
4587
  allowMinutePrecision: n
@@ -4606,9 +4606,9 @@ function $l({
4606
4606
  semanticExecutionPayload: c,
4607
4607
  timezone: l
4608
4608
  }) {
4609
- const u = e ? [...Zo(e)] : void 0, d = r ?? null, f = (I) => {
4609
+ const u = e ? [...Xo(e)] : void 0, d = r ?? null, f = (I) => {
4610
4610
  var v;
4611
- return e ? Da({
4611
+ return e ? Ta({
4612
4612
  dashboard: e,
4613
4613
  runtimeValues: { dashboardInputValues: t },
4614
4614
  adHocFilterValues: n,
@@ -4767,7 +4767,7 @@ function oo(e, t, n) {
4767
4767
  }
4768
4768
  return { slots: r, adHocFilterValues: i, droppedFilterIds: s };
4769
4769
  }
4770
- function Da(e) {
4770
+ function Ta(e) {
4771
4771
  const { dashboard: t, sheetId: n } = e, o = [];
4772
4772
  if (n)
4773
4773
  for (const { input: r } of ir(t, n, e.sheetKind)) {
@@ -4818,7 +4818,7 @@ function At(e) {
4818
4818
  )
4819
4819
  ];
4820
4820
  }
4821
- function Ta(e, t) {
4821
+ function Da(e, t) {
4822
4822
  var n, o;
4823
4823
  return {
4824
4824
  sheetId: e.id,
@@ -4837,7 +4837,7 @@ function Ma(e, t, n, o) {
4837
4837
  // Authoring: carried drill context never applies to a dashboard being edited.
4838
4838
  transientContexts: void 0,
4839
4839
  dashboard: n,
4840
- ...Ta(o, t),
4840
+ ...Da(o, t),
4841
4841
  card: t,
4842
4842
  runtimeValues: {},
4843
4843
  // Aliases only: no input value is read.
@@ -4891,7 +4891,7 @@ function ka(e) {
4891
4891
  );
4892
4892
  return t && t.some((o, r) => o !== e.sheets[r]) ? { ...e, sheets: t } : e;
4893
4893
  }
4894
- function xa(e) {
4894
+ function Pa(e) {
4895
4895
  const t = K(e);
4896
4896
  return t.issues.length === 0 && !t.needsUpgrade ? e : t.issues.length ? t.toStoredDashboard() : K(
4897
4897
  ka(e)
@@ -4900,7 +4900,7 @@ function xa(e) {
4900
4900
  export {
4901
4901
  rt as $,
4902
4902
  oo as A,
4903
- Da as B,
4903
+ Ta as B,
4904
4904
  Wl as C,
4905
4905
  ia as D,
4906
4906
  Jn as E,
@@ -4910,10 +4910,10 @@ export {
4910
4910
  Cs as I,
4911
4911
  Mt as J,
4912
4912
  gl as K,
4913
- Xr as L,
4913
+ Zr as L,
4914
4914
  fl as M,
4915
- Ti as N,
4916
- Di as O,
4915
+ Di as N,
4916
+ Ti as O,
4917
4917
  Fi as P,
4918
4918
  il as Q,
4919
4919
  In as R,
@@ -4924,7 +4924,7 @@ export {
4924
4924
  ki as W,
4925
4925
  U as X,
4926
4926
  ul as Y,
4927
- Pi as Z,
4927
+ xi as Z,
4928
4928
  dl as _,
4929
4929
  qs as a,
4930
4930
  bl as a$,
@@ -4935,15 +4935,15 @@ export {
4935
4935
  Mi as a4,
4936
4936
  ol as a5,
4937
4937
  nt as a6,
4938
- Pn as a7,
4938
+ xn as a7,
4939
4939
  Ul as a8,
4940
4940
  ba as a9,
4941
4941
  Gl as aA,
4942
4942
  Ll as aB,
4943
4943
  se as aC,
4944
4944
  pn as aD,
4945
- Za as aE,
4946
- Xa as aF,
4945
+ Xa as aE,
4946
+ Za as aF,
4947
4947
  nl as aG,
4948
4948
  ha as aH,
4949
4949
  di as aI,
@@ -4953,7 +4953,7 @@ export {
4953
4953
  al as aM,
4954
4954
  Nl as aN,
4955
4955
  Vl as aO,
4956
- Ts as aP,
4956
+ Ds as aP,
4957
4957
  ql as aQ,
4958
4958
  Hn as aR,
4959
4959
  Ke as aS,
@@ -4966,7 +4966,7 @@ export {
4966
4966
  vl as aZ,
4967
4967
  tt as a_,
4968
4968
  At as aa,
4969
- Ta as ab,
4969
+ Da as ab,
4970
4970
  Ma as ac,
4971
4971
  Va as ad,
4972
4972
  _l as ae,
@@ -4984,19 +4984,19 @@ export {
4984
4984
  fs as aq,
4985
4985
  Ca as ar,
4986
4986
  Sl as as,
4987
- Dl as at,
4987
+ Tl as at,
4988
4988
  ms as au,
4989
4989
  Re as av,
4990
4990
  us as aw,
4991
4991
  gs as ax,
4992
- Tl as ay,
4993
- xn as az,
4992
+ Dl as ay,
4993
+ Pn as az,
4994
4994
  pl as b,
4995
4995
  Cl as b0,
4996
4996
  Fl as b1,
4997
4997
  cs as b2,
4998
4998
  ne as b3,
4999
- xl as b4,
4999
+ Pl as b4,
5000
5000
  Kl as b5,
5001
5001
  Rl as b6,
5002
5002
  Ui as c,
@@ -5014,13 +5014,13 @@ export {
5014
5014
  st as o,
5015
5015
  kl as p,
5016
5016
  Sa as q,
5017
- Pl as r,
5017
+ xl as r,
5018
5018
  hs as s,
5019
5019
  Is as t,
5020
- Zr as u,
5020
+ Xr as u,
5021
5021
  ni as v,
5022
5022
  fn as w,
5023
5023
  Ja as x,
5024
5024
  ri as y,
5025
- xa as z
5025
+ Pa as z
5026
5026
  };