react-semaphor 0.1.555 → 0.1.556

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 (97) hide show
  1. package/dist/analytics-protocol/index.js +10 -10
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +438 -455
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
  7. package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-C7Acww1T.js} +15 -15
  8. package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-7iZErWnR.js} +3 -3
  9. package/dist/chunks/comparison-window-caption-BseG5aOZ.js +1221 -0
  10. package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
  11. package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-ChuKjx27.js} +31 -33
  12. package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-BU6rE5kV.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-qrYd2zkN.js} +15 -15
  14. package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-BsapXI2H.js} +14 -14
  15. package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-CJqPqYnI.js} +5 -5
  16. package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-BNSprf5_.js} +12 -12
  17. package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-CjAdV-WG.js} +4603 -4687
  18. package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BTrqtFkh.js} +917 -987
  19. package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CJTJDCym.js} +4 -4
  20. package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-CTVf3dG3.js} +2904 -3102
  21. package/dist/chunks/{index-B2k6KtUN.js → index-B_vIRa-q.js} +12 -19
  22. package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
  23. package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-Cg0ioFGQ.js} +21 -21
  24. package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-yYibXSw1.js} +3 -3
  25. package/dist/chunks/{matrix-formatter-K2OVPJQI.js → matrix-formatter-C2kjsCDf.js} +44 -44
  26. package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-DEEauKXC.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-C1G6AJNh.js} +33 -33
  28. package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-BfcmwxM1.js} +4 -4
  29. package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
  30. package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +56 -0
  31. package/dist/chunks/pivot-result-identity-CWi5WrrY.js +77 -0
  32. package/dist/chunks/{raw-temporal-contract-WuXA8jBP.js → raw-temporal-contract-CjHaUIsE.js} +1 -1
  33. package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DWzLIHc3.js} +8 -8
  34. package/dist/chunks/{report-preferences-dialog-D_KyuEFx.js → report-preferences-dialog-D_wrbIQt.js} +17 -17
  35. package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-BgM-iNWB.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Df8V5QHW.js} +1415 -1567
  37. package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-VvXI6r03.js} +9 -9
  38. package/dist/chunks/{selection-reducer-yw_JgICP.js → selection-reducer-By4CSmEF.js} +1 -1
  39. package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-fejZmdq9.js} +49593 -56071
  40. package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-BuTCXe-S.js} +7 -7
  41. package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-B46EZIzX.js} +1 -1
  42. package/dist/chunks/{switch-B-UTI6v-.js → switch-Bq92UGId.js} +3 -3
  43. package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-noKl8-en.js} +1 -1
  44. package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-PpINOzw8.js} +3 -3
  45. package/dist/chunks/{temporal-bucket-C4rqmwaQ.js → temporal-bucket-DzyadxVY.js} +53 -53
  46. package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +879 -0
  47. package/dist/chunks/{token-types-DYECHYGH.js → token-types--0bgRCaO.js} +1 -1
  48. package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-Cz-ve64t.js} +7 -7
  49. package/dist/chunks/{validators-ClKLGDGZ.js → validators-CZo_H4E6.js} +305 -307
  50. package/dist/dashboard/index.js +2 -2
  51. package/dist/dashboard-authoring/index.js +60 -60
  52. package/dist/data-app-sdk/index.js +6 -6
  53. package/dist/data-app-sdk-adapters/index.js +3 -3
  54. package/dist/data-app-sdk-validation/index.js +6 -6
  55. package/dist/format-utils/index.js +207 -223
  56. package/dist/index.js +96 -97
  57. package/dist/layouts/index.js +1 -1
  58. package/dist/pdf-export-policy/index.js +9 -11
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
  63. package/dist/types/brand-studio/index.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  65. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
  66. package/dist/types/index.js +27 -28
  67. package/dist/types/lib/api/exports-api.d.ts +1 -1
  68. package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
  69. package/dist/types/lib/charts/types.d.ts +2 -2
  70. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
  71. package/dist/types/lib/document/document-edits.d.ts +1 -1
  72. package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
  73. package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
  74. package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
  75. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
  76. package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
  77. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
  78. package/dist/types/lib/types/common-types.d.ts +0 -7
  79. package/dist/types/lib/types/explorer-types.d.ts +1 -14
  80. package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
  81. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
  82. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
  83. package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
  84. package/dist/types/shared/format-utils/index.d.ts +0 -2
  85. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
  86. package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
  87. package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
  89. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
  90. package/package.json +2 -2
  91. package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
  92. package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
  93. package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
  94. package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
  95. package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
  96. package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
  97. package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
@@ -1,29 +1,29 @@
1
- import { al as li, am as ci, an as ui, ao as mt, ap as di, aq as K, ar as pt, as as fi, at as mi, au as we, av as pi, aw as ht, ax as hi, ay as yi, az as gi, aA as bi, aB as vi, aC as Fi, aD as yt, aE as Ci, aF as Ii, aG as xi, aH as ve, aI as Si, aJ as Mi, aK as Di, b as Ti, aL as wi, v as Pi, z as Oi, aM as Ai, aN as Ni } from "./resolve-dashboard-input-context-CIm9A8_j.js";
2
- import { ac as gt, f as _i, e as Ei, a9 as bt, an as Ri, v as Vi } from "./validators-ClKLGDGZ.js";
3
- import "./matrix-operation-contract--lMaLlpV.js";
4
- import { r as ki, C as Bi } from "./metric-comparison-CYIt2F5X.js";
5
- import "./analytics-base-schemas-BKs3flFS.js";
1
+ import { al as oi, am as si, an as li, ao as dt, ap as ci, aq as K, ar as ft, as as ui, at as di, au as Se, av as fi, aw as mt, ax as mi, ay as pi, az as hi, aA as gi, aB as yi, aC as bi, aD as pt, aE as vi, aF as Fi, aG as Ci, aH as ge, aI as Ii, aJ as xi, aK as Si, b as Mi, aL as Di, v as Ti, z as wi, aM as Pi, aN as Oi } from "./resolve-dashboard-input-context-Df8V5QHW.js";
2
+ import { ab as ht, f as Ai, e as _i, a8 as gt, am as Ni, v as Ei } from "./validators-CZo_H4E6.js";
3
+ import "./matrix-operation-contract-C1G6AJNh.js";
4
+ import { r as Ri, C as Vi } from "./metric-comparison-BfcmwxM1.js";
5
+ import "./analytics-base-schemas-BUFUoO6G.js";
6
6
  import "zod";
7
- import { q as Ki } from "./pivot-result-lifecycle-BygCpOhk.js";
8
- import { f as G } from "./matrix-formatter-K2OVPJQI.js";
9
- import { b as vt, m as Li, h as qi, d as xe, e as $i, i as k, u as _, R as zi, v as ji, r as Ui, z as Hi } from "./temporal-bucket-C4rqmwaQ.js";
7
+ import { q as ki } from "./temporal-input-presentation-CJWS4d0L.js";
8
+ import { f as W } from "./matrix-formatter-C2kjsCDf.js";
9
+ import { a as yt, l as Bi, g as Ki, b as Fe, d as Li, i as R, t as _, R as qi, v as $i, r as zi, y as ji } from "./temporal-bucket-DzyadxVY.js";
10
10
  import "../value-format-preferences/index.js";
11
- import { L as Gi, w as pe } from "./table-settings-DOT_Bv1m.js";
12
- import { dp as Ft, dw as Ct, dx as Wi, dy as Qi, cS as Pe, dz as Yi, cT as Ge, dA as N, as as Ji, dB as It, dC as Oe, dD as Xi, dE as Zi, dF as We, dG as en, dH as Qe, dI as tn, dJ as nn, Q as xt, dK as St, dL as Mt, v as Dt, dM as Ye, Y as q, dN as Ae, d1 as Je, d3 as Ne, c_ as Xe, dO as Ze, ds as rn, bb as _e, dP as an, dQ as on, dR as sn, cX as H, be as et, dS as ln, a2 as Tt, a3 as wt, d as cn, dT as $, bg as un, dU as dn, bh as fn, aA as Pt, dV as mn, dW as pn, dX as hn, dY as yn, b as Ot, dr as gn, cW as bn, dZ as vn, d8 as Se, d_ as Fn, d$ as Fe, c8 as At, e0 as tt, e1 as Cn, bI as In, cb as it, ca as xn, e2 as Sn } from "./global-date-filter-utils-7OboTgrM.js";
13
- import { r as Mn } from "./pivot-result-identity-BHJGZwIc.js";
14
- import { g as Dn } from "./_commonjsHelpers-DimLPMtv.js";
15
- import { e as Tn, d as wn } from "./raw-temporal-presentation-CivONfcO.js";
16
- import "./index-CtoK1Lgu.js";
11
+ import { L as Ui, w as de } from "./table-settings-PpINOzw8.js";
12
+ import { dp as bt, dw as vt, dx as Hi, dy as Gi, cS as Me, dz as Wi, cT as Qi, dA as A, as as Yi, dB as Ft, dC as De, dD as Ji, dE as Xi, dF as He, dG as Zi, dH as Ge, dI as en, dJ as tn, Q as Ct, dK as It, dL as xt, v as St, dM as We, Y as $, dN as Te, d1 as Qe, d3 as we, c_ as Ye, dO as Je, ds as nn, bb as Pe, dP as rn, dQ as an, dR as on, cX as G, be as Xe, dS as sn, a2 as Mt, a3 as Dt, d as ln, dT as z, bg as cn, dU as un, bh as dn, aA as Tt, dV as fn, dW as mn, dX as pn, dY as hn, b as wt, dr as gn, cW as yn, dZ as bn, d8 as Ce, d_ as vn, d$ as ye, c8 as Pt, e0 as Ze, e1 as Fn, bI as Cn, cb as et, ca as In, e2 as xn } from "./global-date-filter-utils-CTVf3dG3.js";
13
+ import { r as Sn } from "./pivot-result-identity-CWi5WrrY.js";
14
+ import { g as Mn } from "./_commonjsHelpers-DimLPMtv.js";
15
+ import { e as Dn, d as Tn } from "./raw-temporal-presentation-DWzLIHc3.js";
16
+ import "./index-dIV-Gdsb.js";
17
17
  import "./index-CuHybtft.js";
18
- import { i as Pn } from "./source-entity-resolution-CGymm5td.js";
19
- import { R as On } from "./matrix-analytical-definition-DPVGg1mU.js";
20
- import { r as Nt } from "./applied-constraints-DU-wndZ7.js";
21
- const Ga = 15, An = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, Nn = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, _n = /\bwhere\b/i;
22
- function En(e) {
23
- return e != null && e.trim() ? An.test(e) || Nn.test(e) : !1;
24
- }
25
- function Wa(e) {
26
- return !(e != null && e.trim()) || En(e) ? null : _n.test(e) ? {
18
+ import { i as wn } from "./source-entity-resolution-B46EZIzX.js";
19
+ import { R as Pn } from "./matrix-analytical-definition-Cg0ioFGQ.js";
20
+ import { r as Ot } from "./applied-constraints-DU-wndZ7.js";
21
+ const Ha = 15, On = /\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i, An = /\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i, _n = /\bwhere\b/i;
22
+ function Nn(e) {
23
+ return e != null && e.trim() ? On.test(e) || An.test(e) : !1;
24
+ }
25
+ function Ga(e) {
26
+ return !(e != null && e.trim()) || Nn(e) ? null : _n.test(e) ? {
27
27
  helper: "{{ filters | and }}",
28
28
  description: "For queries with an existing WHERE clause."
29
29
  } : {
@@ -31,60 +31,60 @@ function Wa(e) {
31
31
  description: "For queries without a WHERE clause."
32
32
  };
33
33
  }
34
- const nt = [10, 20, 50, 100, 500, 1e3], Rn = 50;
35
- function Vn(e) {
36
- return e && e > 0 ? e : Rn;
34
+ const tt = [10, 20, 50, 100, 500, 1e3], En = 50;
35
+ function Rn(e) {
36
+ return e && e > 0 ? e : En;
37
37
  }
38
- function Qa(e) {
39
- const t = Vn(e), i = [...nt];
40
- return nt.includes(
38
+ function Wa(e) {
39
+ const t = Rn(e), i = [...tt];
40
+ return tt.includes(
41
41
  t
42
42
  ) || (i.push(t), i.sort((n, r) => n - r)), i;
43
43
  }
44
- function Ya(e) {
44
+ function Qa(e) {
45
45
  var t, i;
46
- return !!((e.type === "table" || e.type === "detailTable") && e.sql && !Ft(e.config) && !((i = (t = e.preferences) == null ? void 0 : t.tablePrefs) != null && i.forceClientPagination));
46
+ return !!((e.type === "table" || e.type === "detailTable") && e.sql && !bt(e.config) && !((i = (t = e.preferences) == null ? void 0 : t.tablePrefs) != null && i.forceClientPagination));
47
47
  }
48
- function kn(e, t) {
48
+ function Vn(e, t) {
49
49
  var n, r, a, o;
50
50
  if (t === "table-print")
51
51
  return "disabled";
52
52
  if ((r = (n = e.preferences) == null ? void 0 : n.tablePrefs) != null && r.forceClientPagination)
53
53
  return "client";
54
- const i = Ft(e.config);
55
- return e.sql && !i ? (o = (a = e.preferences) == null ? void 0 : a.tablePrefs) != null && o.enableDevModePagination ? "server" : "client" : i && li(e) ? "server" : "client";
54
+ const i = bt(e.config);
55
+ return e.sql && !i ? (o = (a = e.preferences) == null ? void 0 : a.tablePrefs) != null && o.enableDevModePagination ? "server" : "client" : i && oi(e) ? "server" : "client";
56
56
  }
57
- const _t = Object.freeze({}), Ja = {
57
+ const At = Object.freeze({}), Ya = {
58
58
  access: "session-only",
59
59
  printMode: !1,
60
60
  baseline: null,
61
61
  applied: null,
62
62
  appliedBookmark: null,
63
- tableSettings: _t,
63
+ tableSettings: At,
64
64
  notices: [],
65
65
  isFavorite: !1,
66
66
  fetchedAt: 0
67
67
  };
68
- function Xa(e) {
68
+ function Ja(e) {
69
69
  return !e.viewer.printMode && e.viewer.access !== "session-only" && !!e.viewer.baseline && !!e.viewerStateClient && !e.isDashboardEditing;
70
70
  }
71
- function Bn(e) {
72
- return e.isDashboardEditing ? _t : e.viewer.tableSettings;
71
+ function kn(e) {
72
+ return e.isDashboardEditing ? At : e.viewer.tableSettings;
73
73
  }
74
- function Kn(e, t) {
75
- return Bn(e)[t];
74
+ function Bn(e, t) {
75
+ return kn(e)[t];
76
76
  }
77
- function Za(e, t, i) {
78
- if (!(i.isEditorPreview || e.isDashboardEditing) && Gi(e.dashboard, t))
79
- return { settings: Kn(e, t) };
77
+ function Xa(e, t, i) {
78
+ if (!(i.isEditorPreview || e.isDashboardEditing) && Ui(e.dashboard, t))
79
+ return { settings: Bn(e, t) };
80
80
  }
81
- function Ln(e) {
81
+ function Kn(e) {
82
82
  var t;
83
- return ci({
83
+ return si({
84
84
  card: e.card,
85
- paginationMode: kn(e.card) === "server" ? "server" : "client",
85
+ paginationMode: Vn(e.card) === "server" ? "server" : "client",
86
86
  result: {
87
- keys: e.keys ?? ui(e.records),
87
+ keys: e.keys ?? li(e.records),
88
88
  rows: e.records,
89
89
  columns: e.resultColumns,
90
90
  columnKeyMap: e.columnKeyMap,
@@ -94,11 +94,7 @@ function Ln(e) {
94
94
  projection: "export"
95
95
  });
96
96
  }
97
- const eo = (e) => {
98
- e = e.replace("#", "");
99
- const t = Number.parseInt(e.substr(0, 2), 16), i = Number.parseInt(e.substr(2, 2), 16), n = Number.parseInt(e.substr(4, 2), 16);
100
- return (0.299 * t + 0.587 * i + 0.114 * n) / 255 > 0.5 ? "#000000" : "#ffffff";
101
- }, qn = () => ({
97
+ const Ln = () => ({
102
98
  urlTemplate: "{value}",
103
99
  // Default: use cell value as-is
104
100
  labelType: "value",
@@ -107,7 +103,7 @@ const eo = (e) => {
107
103
  labelColumn: "",
108
104
  openInNewTab: !0
109
105
  // Default: open in new tab (current behavior)
110
- }), Ee = () => ({
106
+ }), Oe = () => ({
111
107
  type: "none",
112
108
  inheritMetricFormat: !0,
113
109
  textAlign: "left",
@@ -142,13 +138,13 @@ const eo = (e) => {
142
138
  sourceTimezone: "auto"
143
139
  // Default to auto (use explicit timezone if present, otherwise assume UTC)
144
140
  },
145
- linkFormat: qn(),
141
+ linkFormat: Ln(),
146
142
  colorRanges: []
147
143
  });
148
- function to(e, t, i, n) {
144
+ function Za(e, t, i, n) {
149
145
  return t && t !== "auto" ? t : i;
150
146
  }
151
- const io = (e) => !e || e === "auto" ? "local time" : {
147
+ const eo = (e) => !e || e === "auto" ? "local time" : {
152
148
  "America/New_York": "Eastern Time",
153
149
  "America/Chicago": "Central Time",
154
150
  "America/Denver": "Mountain Time",
@@ -159,11 +155,11 @@ const io = (e) => !e || e === "auto" ? "local time" : {
159
155
  "Asia/Shanghai": "China Time",
160
156
  UTC: "UTC"
161
157
  }[e] || e;
162
- function $n(e) {
163
- const t = G(e == null ? void 0 : e.format);
164
- return !!(t && vt(t));
158
+ function qn(e) {
159
+ const t = W(e == null ? void 0 : e.format);
160
+ return !!(t && yt(t));
165
161
  }
166
- function Me(e, t) {
162
+ function $n(e, t) {
167
163
  var o, s;
168
164
  if (!(e != null && e.config) || e.type === "matrixTable" || (o = e.sql) != null && o.trim() || (s = e.python) != null && s.trim())
169
165
  return;
@@ -201,16 +197,16 @@ function Me(e, t) {
201
197
  t.metricAlias,
202
198
  ...t.columnIds || []
203
199
  ].filter((f) => f !== void 0), c = n.map((f) => {
204
- var d, h;
200
+ var d, g;
205
201
  return {
206
202
  ...f,
207
203
  bindings: [
208
- Mn(
204
+ Sn(
209
205
  t.columnKeyMap,
210
206
  f.field.id,
211
207
  f.role
212
208
  ),
213
- f.role === "metric" && f.field.alias ? (h = (d = t.columnKeyMap) == null ? void 0 : d.byMetricAlias) == null ? void 0 : h[f.field.alias] : void 0
209
+ f.role === "metric" && f.field.alias ? (g = (d = t.columnKeyMap) == null ? void 0 : d.byMetricAlias) == null ? void 0 : g[f.field.alias] : void 0
214
210
  ]
215
211
  };
216
212
  }), u = c.filter(
@@ -243,46 +239,15 @@ function Me(e, t) {
243
239
  )
244
240
  );
245
241
  }
246
- function zn(e, t, i) {
247
- return Me(e, {
248
- fieldId: t.id,
249
- fieldRole: "groupby"
250
- }) ?? Me(
251
- e,
252
- i ? {
253
- columnIds: [t.alias, t.name, t.id].filter(
254
- (n) => !!n
255
- ),
256
- columnKeyMap: i,
257
- fieldRole: "groupby"
258
- } : { fieldId: t.id, fieldRole: "groupby" }
259
- );
260
- }
261
- function no(e, t, i) {
262
- return e.map((n) => {
263
- const r = zn(
264
- t,
265
- n,
266
- i
267
- );
268
- if (!r) return n;
269
- const { format: a, ...o } = n;
270
- return {
271
- ...o,
272
- ...r.label ? { label: r.label } : {},
273
- ...r.format !== void 0 ? { format: r.format } : {}
274
- };
275
- });
276
- }
277
- function Et(e, t) {
242
+ function _t(e, t) {
278
243
  const i = typeof e.decimalPlaces == "number", n = typeof e.minimumFractionDigits == "number" ? e.minimumFractionDigits : i ? e.decimalPlaces : t.min, r = typeof e.maximumFractionDigits == "number" ? e.maximumFractionDigits : i ? e.decimalPlaces : t.max;
279
244
  return {
280
245
  minimumFractionDigits: n,
281
246
  maximumFractionDigits: Math.max(n, r)
282
247
  };
283
248
  }
284
- function de(e, t) {
285
- const i = Et(e, t), n = typeof e.suffix == "string" && e.suffix.length > 0;
249
+ function le(e, t) {
250
+ const i = _t(e, t), n = typeof e.suffix == "string" && e.suffix.length > 0;
286
251
  return {
287
252
  style: "decimal",
288
253
  locale: e.locale,
@@ -299,42 +264,42 @@ function de(e, t) {
299
264
  percentValueMode: e.percentValueMode
300
265
  };
301
266
  }
302
- function Rt(e, t = "auto", i = {}) {
303
- switch (t === "auto" && (t = Wn(e, i)), t) {
267
+ function Nt(e, t = "auto", i = {}) {
268
+ switch (t === "auto" && (t = Gn(e, i)), t) {
304
269
  case "number":
305
- return Vt(e, i);
270
+ return Et(e, i);
306
271
  case "currency":
307
- return kt(e, i);
272
+ return Rt(e, i);
308
273
  case "percent":
309
- return jn(e, i);
274
+ return zn(e, i);
310
275
  case "date":
311
- return Un(e, i);
276
+ return jn(e, i);
312
277
  case "scientific":
313
- return Hn(e, i);
278
+ return Un(e, i);
314
279
  case "duration":
315
- return Gn(e, i);
280
+ return Hn(e, i);
316
281
  default:
317
282
  return String(e);
318
283
  }
319
284
  }
320
- function Vt(e, t = {}) {
321
- return e < 0 && !!t.prefix && !t.negativeInParentheses ? `-${xe(
285
+ function Et(e, t = {}) {
286
+ return e < 0 && !!t.prefix && !t.negativeInParentheses ? `-${Fe(
322
287
  Math.abs(e),
323
- de(t, {
288
+ le(t, {
324
289
  min: 0,
325
290
  max: 0
326
291
  })
327
- )}` : xe(
292
+ )}` : Fe(
328
293
  e,
329
- de(t, {
294
+ le(t, {
330
295
  min: 0,
331
296
  max: 0
332
297
  })
333
298
  );
334
299
  }
335
- function kt(e, t = {}) {
336
- return $i(e, {
337
- ...de(t, {
300
+ function Rt(e, t = {}) {
301
+ return Li(e, {
302
+ ...le(t, {
338
303
  min: 2,
339
304
  max: 2
340
305
  }),
@@ -342,9 +307,9 @@ function kt(e, t = {}) {
342
307
  currency: t.currency || "USD"
343
308
  });
344
309
  }
345
- function jn(e, t = {}) {
346
- const i = Et(t, { min: 1, max: 1 }), r = typeof t.multiplyBy == "number" && Number.isFinite(t.multiplyBy) ? t.multiplyBy : t.percentValueMode === "whole" ? 1 : 100, a = e * r;
347
- return xe(a, {
310
+ function zn(e, t = {}) {
311
+ const i = _t(t, { min: 1, max: 1 }), r = typeof t.multiplyBy == "number" && Number.isFinite(t.multiplyBy) ? t.multiplyBy : t.percentValueMode === "whole" ? 1 : 100, a = e * r;
312
+ return Fe(a, {
348
313
  locale: t.locale,
349
314
  minimumFractionDigits: i.minimumFractionDigits,
350
315
  maximumFractionDigits: i.maximumFractionDigits,
@@ -355,7 +320,7 @@ function jn(e, t = {}) {
355
320
  useSuffix: !1
356
321
  });
357
322
  }
358
- function Un(e, t = {}) {
323
+ function jn(e, t = {}) {
359
324
  const { locale: i = "en-US" } = t;
360
325
  try {
361
326
  const n = new Date(e);
@@ -366,14 +331,14 @@ function Un(e, t = {}) {
366
331
  return String(e);
367
332
  }
368
333
  }
369
- function Hn(e, t = {}) {
370
- return qi(
334
+ function Un(e, t = {}) {
335
+ return Ki(
371
336
  e,
372
- de(t, { min: 2, max: 2 })
337
+ le(t, { min: 2, max: 2 })
373
338
  );
374
339
  }
375
- function Gn(e, t = {}) {
376
- return Li(e, {
340
+ function Hn(e, t = {}) {
341
+ return Bi(e, {
377
342
  inputUnit: t.durationInputUnit,
378
343
  outputStyle: t.durationDisplayStyle,
379
344
  largestUnit: t.durationLargestUnit,
@@ -384,13 +349,13 @@ function Gn(e, t = {}) {
384
349
  negativeInParentheses: t.negativeInParentheses
385
350
  });
386
351
  }
387
- function Wn(e, t) {
352
+ function Gn(e, t) {
388
353
  return t.currency ? "currency" : typeof e == "string" && !isNaN(Date.parse(e)) ? "date" : "number";
389
354
  }
390
- function ro(e, t = {}) {
391
- return (i) => Rt(i, e, t);
355
+ function to(e, t = {}) {
356
+ return (i) => Nt(i, e, t);
392
357
  }
393
- function Qn({
358
+ function Wn({
394
359
  number: e,
395
360
  decimalPlaces: t = 0,
396
361
  useSuffix: i = !1,
@@ -399,7 +364,7 @@ function Qn({
399
364
  locale: a = "en-US"
400
365
  }) {
401
366
  if (r) {
402
- const o = kt(e, {
367
+ const o = Rt(e, {
403
368
  currency: r,
404
369
  decimalPlaces: t,
405
370
  locale: a,
@@ -407,14 +372,14 @@ function Qn({
407
372
  });
408
373
  return i && n ? `${o}${n}` : o;
409
374
  }
410
- return Vt(e, {
375
+ return Et(e, {
411
376
  decimalPlaces: t,
412
377
  useSuffix: i && !n,
413
378
  suffix: n,
414
379
  locale: a
415
380
  });
416
381
  }
417
- var Yn = function e(t, i) {
382
+ var Qn = function e(t, i) {
418
383
  if (t === i) return !0;
419
384
  if (t && i && typeof t == "object" && typeof i == "object") {
420
385
  if (t.constructor !== i.constructor) return !1;
@@ -440,8 +405,8 @@ var Yn = function e(t, i) {
440
405
  }
441
406
  return t !== t && i !== i;
442
407
  };
443
- const fe = /* @__PURE__ */ Dn(Yn);
444
- function Jn(e) {
408
+ const ce = /* @__PURE__ */ Mn(Qn);
409
+ function Yn(e) {
445
410
  if (typeof e == "number")
446
411
  return Number.isFinite(e);
447
412
  if (typeof e != "string")
@@ -449,7 +414,7 @@ function Jn(e) {
449
414
  const t = e.trim().replace(/,/g, "");
450
415
  return t !== "" && Number.isFinite(Number(t));
451
416
  }
452
- function Xn(e) {
417
+ function Jn(e) {
453
418
  if (!(e != null && e.length))
454
419
  return [];
455
420
  const t = /* @__PURE__ */ new Set();
@@ -457,33 +422,33 @@ function Xn(e) {
457
422
  Object.keys(i).forEach((n) => t.add(n));
458
423
  }), [...t];
459
424
  }
460
- function Zn(e) {
461
- return Xn(e).filter(
462
- (i) => e == null ? void 0 : e.some((n) => Jn(n[i]))
425
+ function Xn(e) {
426
+ return Jn(e).filter(
427
+ (i) => e == null ? void 0 : e.some((n) => Yn(n[i]))
463
428
  );
464
429
  }
465
- function Re(e, t) {
430
+ function Ae(e, t) {
466
431
  var i;
467
432
  if (t.id)
468
433
  return (i = e.sql) != null && i.trim() ? { kind: "column", columnKey: t.id } : { kind: "metric", metricId: t.id };
469
434
  }
470
- function Bt(e) {
435
+ function Vt(e) {
471
436
  const t = e.context.preferences;
472
437
  if (!t)
473
438
  return e.authoredFormat;
474
- const i = Re(e.card, e.metric);
439
+ const i = Ae(e.card, e.metric);
475
440
  return _(
476
441
  e.authoredFormat,
477
442
  t,
478
443
  i ? e.context.resolveBoundCurrency(i) : void 0
479
444
  );
480
445
  }
481
- function er(e) {
446
+ function Zn(e) {
482
447
  var a, o, s;
483
- const t = (s = (o = (a = e.card.preferences) == null ? void 0 : a.tablePrefs) == null ? void 0 : o.columnSettingsMap) == null ? void 0 : s[e.columnKey], i = (t == null ? void 0 : t.type) === "number" ? di(
448
+ const t = (s = (o = (a = e.card.preferences) == null ? void 0 : a.tablePrefs) == null ? void 0 : o.columnSettingsMap) == null ? void 0 : s[e.columnKey], i = (t == null ? void 0 : t.type) === "number" ? ci(
484
449
  { dataType: "number", format: void 0 },
485
450
  t
486
- ) : void 0, n = i == null ? void 0 : i.authoredFormat, r = k(n) ? Bt({
451
+ ) : void 0, n = i == null ? void 0 : i.authoredFormat, r = R(n) ? Vt({
487
452
  card: e.card,
488
453
  metric: {
489
454
  id: e.columnKey
@@ -501,10 +466,10 @@ function er(e) {
501
466
  format: r
502
467
  };
503
468
  }
504
- function ao(e) {
469
+ function io(e) {
505
470
  var r, a;
506
471
  const t = new Set(
507
- Zn(e.records)
472
+ Xn(e.records)
508
473
  ), i = new Set(
509
474
  e.renderedMetricKeys || e.resultKeys
510
475
  ), n = ((a = (r = e.card.preferences) == null ? void 0 : r.tablePrefs) == null ? void 0 : a.columnSettingsMap) || {};
@@ -515,29 +480,29 @@ function ao(e) {
515
480
  }
516
481
  );
517
482
  }
518
- function oo(e) {
483
+ function no(e) {
519
484
  var a, o;
520
485
  const { card: t, context: i } = e;
521
- if (!(i != null && i.preferences) || !Ct(t.type))
486
+ if (!(i != null && i.preferences) || !vt(t.type))
522
487
  return t;
523
488
  const n = i.preferences, r = (a = t.sql) != null && a.trim() ? e.resultMetricKeys.map(
524
- (s) => er({
489
+ (s) => Zn({
525
490
  card: t,
526
491
  columnKey: s,
527
492
  context: i
528
493
  })
529
494
  ) : (((o = t.config) == null ? void 0 : o.metricColumns) || []).map((s) => {
530
- const l = mt(t, s), c = l.authoredFormat;
531
- if (!k(c))
495
+ const l = dt(t, s), c = l.authoredFormat;
496
+ if (!R(c))
532
497
  return s;
533
- const u = Re(t, s), f = u ? i.resolveBoundCurrency(u) : void 0;
498
+ const u = Ae(t, s), f = u ? i.resolveBoundCurrency(u) : void 0;
534
499
  return l.source === "inferred" && !f ? s : {
535
500
  ...s,
536
501
  format: l.source === "inferred" ? _(
537
502
  c,
538
503
  n,
539
504
  f
540
- ) : Bt({
505
+ ) : Vt({
541
506
  card: t,
542
507
  metric: s,
543
508
  context: i,
@@ -553,16 +518,16 @@ function oo(e) {
553
518
  }
554
519
  };
555
520
  }
556
- function he(e) {
521
+ function fe(e) {
557
522
  var l;
558
523
  const { card: t, context: i, formatOptions: n } = e, r = i == null ? void 0 : i.preferences;
559
- if (!t || !r || !Ct(t.type))
524
+ if (!t || !r || !vt(t.type))
560
525
  return n;
561
526
  if (!n) {
562
527
  const c = e.metrics.filter(
563
528
  (f) => !!f
564
529
  ), u = c.some(
565
- (f) => k(f.format)
530
+ (f) => R(f.format)
566
531
  );
567
532
  return c.length < 2 || !u ? n : K(
568
533
  _({ type: "number" }, r),
@@ -573,7 +538,7 @@ function he(e) {
573
538
  const c = e.metrics.filter(
574
539
  (f) => !!f
575
540
  ), u = c.filter(
576
- (f) => k(f.format)
541
+ (f) => R(f.format)
577
542
  );
578
543
  if (u.length === 0)
579
544
  return n;
@@ -583,15 +548,15 @@ function he(e) {
583
548
  { preserveOmittedProperties: !0 }
584
549
  );
585
550
  }
586
- const a = pt(n, {
551
+ const a = ft(n, {
587
552
  preserveOmittedProperties: !0
588
553
  });
589
- if (!k(a))
554
+ if (!R(a))
590
555
  return n;
591
556
  const o = e.metrics.flatMap((c) => {
592
557
  if (!c)
593
558
  return [];
594
- const u = Re(t, c);
559
+ const u = Ae(t, c);
595
560
  return [
596
561
  _(
597
562
  a,
@@ -606,7 +571,7 @@ function he(e) {
606
571
  { preserveOmittedProperties: !0 }
607
572
  );
608
573
  const [s] = o;
609
- if (o.some((c) => !fe(c, s))) {
574
+ if (o.some((c) => !ce(c, s))) {
610
575
  const c = _(
611
576
  {
612
577
  ...a,
@@ -623,84 +588,84 @@ function he(e) {
623
588
  preserveOmittedProperties: !0
624
589
  });
625
590
  }
626
- const tr = /* @__PURE__ */ new Set([
591
+ const er = /* @__PURE__ */ new Set([
627
592
  "horizontalBar",
628
593
  "tornado",
629
594
  "pyramid",
630
595
  "range"
631
- ]), ir = /* @__PURE__ */ new Set([
596
+ ]), tr = /* @__PURE__ */ new Set([
632
597
  "tornado",
633
598
  "pyramid",
634
599
  "range"
635
- ]), nr = /* @__PURE__ */ new Set([
600
+ ]), ir = /* @__PURE__ */ new Set([
636
601
  "tornado",
637
602
  "pyramid",
638
603
  "range"
639
604
  ]);
640
- function rr(e) {
605
+ function nr(e) {
641
606
  const { chartType: t, resultKeys: i, config: n } = e, r = 1 + (n != null && n.enableGrouping && (n.groupKey || i[1]) ? 1 : 0), a = i.slice(r), o = (n == null ? void 0 : n.xMetricKey) ?? a[0], s = (n == null ? void 0 : n.yMetricKey) ?? a[1] ?? a[0], l = t === "bubble" ? (n == null ? void 0 : n.radiusMetricKey) ?? a[2] ?? a[1] ?? a[0] : void 0, c = new Set(i);
642
607
  return [o, s, l].filter((u) => !!u).filter((u) => c.has(u));
643
608
  }
644
- function so(e) {
609
+ function ro(e) {
645
610
  const { chartType: t, resultKeys: i, preferences: n } = e;
646
611
  return t === "scatter" || t === "bubble" ? [
647
612
  ...new Set(
648
- rr({
613
+ nr({
649
614
  chartType: t,
650
615
  resultKeys: i,
651
616
  config: n == null ? void 0 : n.bubbleScatterConfig
652
617
  })
653
618
  )
654
- ] : nr.has(t || "") ? i.slice(2) : i.length === 1 ? [i[0]] : i.slice(1);
619
+ ] : ir.has(t || "") ? i.slice(2) : i.length === 1 ? [i[0]] : i.slice(1);
655
620
  }
656
- function ae(e, t) {
621
+ function te(e, t) {
657
622
  var i;
658
- return ((i = t == null ? void 0 : t.chartOptions) == null ? void 0 : i.indexAxis) === "y" || tr.has(e || "") ? "x" : "y";
623
+ return ((i = t == null ? void 0 : t.chartOptions) == null ? void 0 : i.indexAxis) === "y" || er.has(e || "") ? "x" : "y";
659
624
  }
660
- function lo(e, t) {
661
- return ae(e, t) === "x";
625
+ function ao(e, t) {
626
+ return te(e, t) === "x";
662
627
  }
663
- function ar(e, t) {
664
- return ae(e, t) === "y" ? t == null ? void 0 : t.yAxisConfig : (t == null ? void 0 : t.xAxisConfig) || (ir.has(e || "") ? t == null ? void 0 : t.yAxisConfig : void 0);
628
+ function rr(e, t) {
629
+ return te(e, t) === "y" ? t == null ? void 0 : t.yAxisConfig : (t == null ? void 0 : t.xAxisConfig) || (tr.has(e || "") ? t == null ? void 0 : t.yAxisConfig : void 0);
665
630
  }
666
- function ie(e) {
631
+ function X(e) {
667
632
  return e ? Object.entries(e).some(([t, i]) => i == null || i === "" ? !1 : t === "type" ? i !== "auto" : !0) : !1;
668
633
  }
669
- function Kt(e) {
634
+ function kt(e) {
670
635
  if (e)
671
636
  return e.alias || e.label || e.name;
672
637
  }
673
- function De(e, t) {
638
+ function Ie(e, t) {
674
639
  var n;
675
640
  return (((n = e == null ? void 0 : e.config) == null ? void 0 : n.metricColumns) || []).find((r) => {
676
- const a = Kt(r);
641
+ const a = kt(r);
677
642
  return t.metricId && r.id === t.metricId || t.metricAlias && a === t.metricAlias || t.metricAlias && r.alias === t.metricAlias || t.columnId && a === t.columnId || t.columnId && r.alias === t.columnId || t.columnId && r.label === t.columnId || t.columnId && r.name === t.columnId;
678
643
  });
679
644
  }
680
- function oe(e, t) {
645
+ function ie(e, t) {
681
646
  var n, r;
682
- const i = Me(e, t);
683
- if (!(i && ((r = (n = e == null ? void 0 : e.config) == null ? void 0 : n.groupByColumns) != null && r.includes(i)) && !$n(i)))
647
+ const i = $n(e, t);
648
+ if (!(i && ((r = (n = e == null ? void 0 : e.config) == null ? void 0 : n.groupByColumns) != null && r.includes(i)) && !qn(i)))
684
649
  return i;
685
650
  }
686
- function or(e) {
687
- return !!e && !(e != null && e.format) && gt(e == null ? void 0 : e.dataType) === "number";
651
+ function ar(e) {
652
+ return !!e && !(e != null && e.format) && ht(e == null ? void 0 : e.dataType) === "number";
688
653
  }
689
- const sr = {
654
+ const or = {
690
655
  style: "decimal",
691
656
  showDataBar: !1,
692
657
  dataBarColor: "#3b82f6"
693
658
  };
694
- function Lt(e) {
659
+ function Bt(e) {
695
660
  if (!e)
696
661
  return;
697
- const t = Ee();
662
+ const t = Oe();
698
663
  return {
699
664
  ...t,
700
665
  ...e,
701
666
  inheritMetricFormat: e.numberFormat ? e.inheritMetricFormat : e.inheritMetricFormat ?? t.inheritMetricFormat,
702
667
  numberFormat: {
703
- ...sr,
668
+ ...or,
704
669
  ...e.numberFormat
705
670
  },
706
671
  dateFormat: {
@@ -713,21 +678,21 @@ function Lt(e) {
713
678
  }
714
679
  };
715
680
  }
716
- function co(e) {
681
+ function oo(e) {
717
682
  return Object.fromEntries(
718
683
  Object.entries(e || {}).map(([t, i]) => [
719
684
  t,
720
- Lt(i)
685
+ Bt(i)
721
686
  ])
722
687
  );
723
688
  }
724
- function le(e) {
689
+ function ae(e) {
725
690
  return !!(e && typeof e == "object" && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype);
726
691
  }
727
- function qt(e, t, i) {
728
- if (!le(i))
692
+ function Kt(e, t, i) {
693
+ if (!ae(i))
729
694
  return i;
730
- const n = le(e) ? e : {}, r = le(t) ? t : {}, a = {};
695
+ const n = ae(e) ? e : {}, r = ae(t) ? t : {}, a = {};
731
696
  for (const o of Object.keys(i)) {
732
697
  const s = i[o];
733
698
  if (s === void 0)
@@ -736,23 +701,23 @@ function qt(e, t, i) {
736
701
  n,
737
702
  o
738
703
  ), c = r[o];
739
- if (l && fe(s, c)) {
704
+ if (l && ce(s, c)) {
740
705
  a[o] = n[o];
741
706
  continue;
742
707
  }
743
- if (!l && fe(s, c))
708
+ if (!l && ce(s, c))
744
709
  continue;
745
- const u = qt(
710
+ const u = Kt(
746
711
  n[o],
747
712
  c,
748
713
  s
749
714
  );
750
- le(u) && Object.keys(u).length === 0 && !l || (a[o] = u);
715
+ ae(u) && Object.keys(u).length === 0 && !l || (a[o] = u);
751
716
  }
752
717
  return a;
753
718
  }
754
- function lr(e) {
755
- let t = qt(
719
+ function sr(e) {
720
+ let t = Kt(
756
721
  e.persisted,
757
722
  e.baseline,
758
723
  e.next
@@ -760,11 +725,11 @@ function lr(e) {
760
725
  if (e.enforceDeclaredSqlTemporalFormat && e.next.type === "date" && !e.next.dateFormat.useRelativeTime && e.next.dateFormat.useCustomFormat) {
761
726
  const i = e.next.dateFormat.customFormat;
762
727
  if (!(i != null && i.trim()))
763
- throw new zi(
728
+ throw new qi(
764
729
  "invalid_raw_temporal_format",
765
730
  "Custom table date formatting requires a non-empty pattern."
766
731
  );
767
- ji({
732
+ $i({
768
733
  dialect: "date_fns",
769
734
  pattern: i,
770
735
  valueKind: e.rawTemporalValueKind
@@ -777,7 +742,7 @@ function lr(e) {
777
742
  }
778
743
  };
779
744
  }
780
- return e.next.type === "number" && !fe(e.next.numberFormat, e.baseline.numberFormat) && t.numberFormat ? {
745
+ return e.next.type === "number" && !ce(e.next.numberFormat, e.baseline.numberFormat) && t.numberFormat ? {
781
746
  ...t,
782
747
  type: "number",
783
748
  inheritMetricFormat: e.next.inheritMetricFormat ?? !1
@@ -790,10 +755,10 @@ function lr(e) {
790
755
  type: "date"
791
756
  } : t;
792
757
  }
793
- function uo(e) {
794
- return e.reset ? cr(e.persisted, e.columnId) : {
758
+ function so(e) {
759
+ return e.reset ? lr(e.persisted, e.columnId) : {
795
760
  ...e.persisted,
796
- [e.columnId]: lr({
761
+ [e.columnId]: sr({
797
762
  persisted: e.persisted[e.columnId],
798
763
  baseline: e.baseline,
799
764
  next: e.next,
@@ -803,14 +768,14 @@ function uo(e) {
803
768
  })
804
769
  };
805
770
  }
806
- function cr(e, t) {
771
+ function lr(e, t) {
807
772
  if (!(t in e))
808
773
  return e;
809
774
  const i = { ...e };
810
775
  return delete i[t], i;
811
776
  }
812
- function ur(e, t) {
813
- const i = e || Ee(), n = !t;
777
+ function cr(e, t) {
778
+ const i = e || Oe(), n = !t;
814
779
  return {
815
780
  ...i,
816
781
  type: "number",
@@ -828,25 +793,25 @@ function ur(e, t) {
828
793
  }
829
794
  };
830
795
  }
831
- function Ce(e) {
796
+ function be(e) {
832
797
  if (e)
833
798
  return e.trim().toLowerCase();
834
799
  }
835
- const $t = /\s*(?:\((?:previous|last year|start|target|comparison)\)|δ)\s*$/i;
836
- function dr(e) {
800
+ const Lt = /\s*(?:\((?:previous|last year|start|target|comparison)\)|δ)\s*$/i;
801
+ function ur(e) {
837
802
  const t = e == null ? void 0 : e.trim();
838
- return t ? t.replace($t, "").trim() || t : void 0;
803
+ return t ? t.replace(Lt, "").trim() || t : void 0;
839
804
  }
840
- function fr(e) {
805
+ function dr(e) {
841
806
  const t = e == null ? void 0 : e.trim();
842
- return t ? $t.test(t) : !1;
807
+ return t ? Lt.test(t) : !1;
843
808
  }
844
- function mr(e, t) {
809
+ function fr(e, t) {
845
810
  return t.metricAlias ? e.find(
846
- (i) => ki(i) === t.metricAlias
811
+ (i) => Ri(i) === t.metricAlias
847
812
  ) : t.metricId ? e.find((i) => i.id === t.metricId) : void 0;
848
813
  }
849
- function pr(e) {
814
+ function mr(e) {
850
815
  var b;
851
816
  const {
852
817
  card: t,
@@ -857,26 +822,26 @@ function pr(e) {
857
822
  metricKey: o
858
823
  } = e, s = ((b = t == null ? void 0 : t.config) == null ? void 0 : b.metricColumns) || [];
859
824
  if (n || i)
860
- return mr(s, {
825
+ return fr(s, {
861
826
  metricAlias: n,
862
827
  metricId: i
863
828
  });
864
829
  const l = [o, a], c = l.some(
865
- (m) => fr(m)
830
+ (m) => dr(m)
866
831
  ), u = l.filter(
867
832
  (m) => !!m
868
833
  );
869
834
  for (const m of u) {
870
- const y = De(t, {
835
+ const y = Ie(t, {
871
836
  columnId: m,
872
837
  metricAlias: m
873
838
  });
874
839
  if (y)
875
840
  return y;
876
841
  }
877
- const f = u.map((m) => Ce(m)).filter((m) => !!m), d = u.map((m) => dr(m)).filter((m) => !!m);
842
+ const f = u.map((m) => be(m)).filter((m) => !!m), d = u.map((m) => ur(m)).filter((m) => !!m);
878
843
  for (const m of d) {
879
- const y = De(t, {
844
+ const y = Ie(t, {
880
845
  columnId: m,
881
846
  metricAlias: m
882
847
  });
@@ -887,9 +852,9 @@ function pr(e) {
887
852
  return s[0];
888
853
  if (!c && typeof r == "number" && r >= 0 && r < s.length)
889
854
  return s[r];
890
- const h = d.map((m) => Ce(m)).filter((m) => !!m), v = [
855
+ const g = d.map((m) => be(m)).filter((m) => !!m), v = [
891
856
  ...f,
892
- ...h
857
+ ...g
893
858
  ];
894
859
  if (v.length !== 0)
895
860
  return s.find((m) => {
@@ -897,59 +862,59 @@ function pr(e) {
897
862
  m.alias,
898
863
  m.label,
899
864
  m.name,
900
- Kt(m)
901
- ].map((C) => Ce(C)).filter((C) => !!C);
865
+ kt(m)
866
+ ].map((C) => be(C)).filter((C) => !!C);
902
867
  return v.some(
903
868
  (C) => y.includes(C)
904
869
  );
905
870
  });
906
871
  }
907
- function hr(e) {
908
- const t = G(e == null ? void 0 : e.format);
872
+ function pr(e) {
873
+ const t = W(e == null ? void 0 : e.format);
909
874
  return K(t);
910
875
  }
911
- function rt(e, t) {
876
+ function it(e, t) {
912
877
  if (t)
913
- return De(e, {
878
+ return Ie(e, {
914
879
  columnId: t,
915
880
  metricAlias: t
916
881
  });
917
882
  }
918
- function at(e) {
919
- const t = pt(e);
883
+ function nt(e) {
884
+ const t = ft(e);
920
885
  if (t)
921
886
  return JSON.stringify(t);
922
887
  }
923
- function yr(e, t) {
924
- const i = at(e), n = at(t);
888
+ function hr(e, t) {
889
+ const i = nt(e), n = nt(t);
925
890
  return !!(i && n && i === n);
926
891
  }
927
892
  function gr(e) {
928
893
  if (e.length === 0)
929
894
  return;
930
895
  const t = e.map(
931
- (o) => hr(o)
896
+ (o) => pr(o)
932
897
  );
933
898
  if (!t.every(
934
- (o) => ie(o)
899
+ (o) => X(o)
935
900
  ))
936
901
  return;
937
902
  const n = t, [r] = n;
938
903
  return n.every(
939
- (o) => yr(r, o)
904
+ (o) => hr(r, o)
940
905
  ) ? r : void 0;
941
906
  }
942
- function br(e) {
907
+ function yr(e) {
943
908
  const t = e.formatMode || e.legacyMode;
944
- return t === "override" ? "override" : t === "inherit" ? "inherit" : e.legacyMode && e.legacyMode !== "auto" && e.legacyMode !== "inherit" && e.legacyMode !== "override" || ie(e.formatOptions) ? "override" : "inherit";
909
+ return t === "override" ? "override" : t === "inherit" ? "inherit" : e.legacyMode && e.legacyMode !== "auto" && e.legacyMode !== "inherit" && e.legacyMode !== "override" || X(e.formatOptions) ? "override" : "inherit";
945
910
  }
946
- function ye(e) {
947
- const t = br({
911
+ function me(e) {
912
+ const t = yr({
948
913
  formatMode: e.formatMode,
949
914
  legacyMode: e.legacyMode,
950
915
  formatOptions: e.overrideFormatOptions
951
916
  });
952
- if (t === "override" && ie(e.overrideFormatOptions))
917
+ if (t === "override" && X(e.overrideFormatOptions))
953
918
  return {
954
919
  formatOptions: e.overrideFormatOptions || void 0,
955
920
  source: "override"
@@ -963,13 +928,13 @@ function ye(e) {
963
928
  const i = gr(
964
929
  e.metrics || []
965
930
  );
966
- if (ie(i))
931
+ if (X(i))
967
932
  return {
968
933
  formatOptions: i,
969
934
  source: "metric"
970
935
  };
971
- const n = Mr(e.preferences);
972
- return ie(n) ? {
936
+ const n = Sr(e.preferences);
937
+ return X(n) ? {
973
938
  formatOptions: n,
974
939
  source: "legacy"
975
940
  } : {
@@ -977,38 +942,38 @@ function ye(e) {
977
942
  source: "auto"
978
943
  };
979
944
  }
980
- function zt(e) {
945
+ function qt(e) {
981
946
  var l, c, u;
982
947
  const { card: t, chartType: i, axis: n, preferences: r } = e, a = ((l = t == null ? void 0 : t.config) == null ? void 0 : l.metricColumns) || [], o = (r == null ? void 0 : r.datasetOptions) || [];
983
948
  if (!a.length)
984
949
  return [];
985
950
  if (i === "combo")
986
951
  return n === "x" ? [] : a.filter((f, d) => {
987
- const h = o.find((b) => b.idx === d);
988
- return ((h == null ? void 0 : h.yAxisId) === "y2" ? "y2" : "y") === n;
952
+ const g = o.find((b) => b.idx === d);
953
+ return ((g == null ? void 0 : g.yAxisId) === "y2" ? "y2" : "y") === n;
989
954
  });
990
955
  if (i === "bubble" || i === "scatter") {
991
956
  if (n === "y2")
992
957
  return [];
993
- const f = rt(
958
+ const f = it(
994
959
  t,
995
960
  (c = r == null ? void 0 : r.bubbleScatterConfig) == null ? void 0 : c.xMetricKey
996
- ) || a[0], d = rt(
961
+ ) || a[0], d = it(
997
962
  t,
998
963
  (u = r == null ? void 0 : r.bubbleScatterConfig) == null ? void 0 : u.yMetricKey
999
964
  ) || a[1] || a[0];
1000
965
  return n === "x" ? f ? [f] : [] : d ? [d] : [];
1001
966
  }
1002
- const s = ae(i, r);
967
+ const s = te(i, r);
1003
968
  return i === "radar" ? n === "y" ? a : [] : n !== s ? [] : a;
1004
969
  }
1005
- function Ve(e) {
1006
- const { card: t, chartType: i, axis: n, preferences: r, axisConfig: a } = e, o = zt({
970
+ function _e(e) {
971
+ const { card: t, chartType: i, axis: n, preferences: r, axisConfig: a } = e, o = qt({
1007
972
  card: t,
1008
973
  chartType: i,
1009
974
  axis: n,
1010
975
  preferences: r
1011
- }), s = ye({
976
+ }), s = me({
1012
977
  formatMode: a == null ? void 0 : a.formatMode,
1013
978
  overrideFormatOptions: a == null ? void 0 : a.formatOptions,
1014
979
  metrics: o,
@@ -1016,7 +981,7 @@ function Ve(e) {
1016
981
  });
1017
982
  return {
1018
983
  ...s,
1019
- formatOptions: he({
984
+ formatOptions: fe({
1020
985
  card: t,
1021
986
  metrics: o,
1022
987
  formatOptions: s.formatOptions,
@@ -1024,7 +989,7 @@ function Ve(e) {
1024
989
  })
1025
990
  };
1026
991
  }
1027
- function jt(e, t) {
992
+ function $t(e, t) {
1028
993
  if (!e && (!t || t === "auto" || t === "none"))
1029
994
  return;
1030
995
  const i = {
@@ -1032,8 +997,8 @@ function jt(e, t) {
1032
997
  };
1033
998
  return t && t !== "auto" && t !== "none" && !i.type && (i.type = t), i;
1034
999
  }
1035
- function vr(e) {
1036
- const { preferences: t, metric: i } = e, n = t == null ? void 0 : t.tooltipConfig, r = ye({
1000
+ function br(e) {
1001
+ const { preferences: t, metric: i } = e, n = t == null ? void 0 : t.tooltipConfig, r = me({
1037
1002
  formatMode: n == null ? void 0 : n.formatMode,
1038
1003
  legacyMode: n == null ? void 0 : n.mode,
1039
1004
  overrideFormatOptions: n == null ? void 0 : n.formatOptions,
@@ -1042,7 +1007,7 @@ function vr(e) {
1042
1007
  });
1043
1008
  return {
1044
1009
  ...r,
1045
- formatOptions: he({
1010
+ formatOptions: fe({
1046
1011
  card: e.card,
1047
1012
  metrics: e.metric ? [e.metric] : [],
1048
1013
  formatOptions: r.formatOptions,
@@ -1050,14 +1015,14 @@ function vr(e) {
1050
1015
  })
1051
1016
  };
1052
1017
  }
1053
- function ke(e, t, i) {
1054
- return t === ae(i, e) ? ar(i, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
1018
+ function Ne(e, t, i) {
1019
+ return t === te(i, e) ? rr(i, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
1055
1020
  }
1056
- function Be(e) {
1021
+ function Ee(e) {
1057
1022
  const { chartType: t, preferences: i } = e;
1058
- return t === "bubble" || t === "scatter" ? "y" : ae(t, i);
1023
+ return t === "bubble" || t === "scatter" ? "y" : te(t, i);
1059
1024
  }
1060
- function Ut(e) {
1025
+ function zt(e) {
1061
1026
  switch (e) {
1062
1027
  case "pie":
1063
1028
  case "doughnut":
@@ -1070,8 +1035,8 @@ function Ut(e) {
1070
1035
  return !0;
1071
1036
  }
1072
1037
  }
1073
- function fo(e) {
1074
- const { card: t, chartType: i, preferences: n, metric: r } = e, a = vr({
1038
+ function lo(e) {
1039
+ const { card: t, chartType: i, preferences: n, metric: r } = e, a = br({
1075
1040
  card: t,
1076
1041
  preferences: n,
1077
1042
  metric: r,
@@ -1079,29 +1044,29 @@ function fo(e) {
1079
1044
  });
1080
1045
  if (a.source === "override")
1081
1046
  return a;
1082
- const o = e.axis || Be({ chartType: i, preferences: n }), s = Ve({
1047
+ const o = e.axis || Ee({ chartType: i, preferences: n }), s = _e({
1083
1048
  card: t,
1084
1049
  chartType: i,
1085
1050
  axis: o,
1086
1051
  preferences: n,
1087
- axisConfig: ke(n, o, i),
1052
+ axisConfig: Ne(n, o, i),
1088
1053
  numericPresentation: e.numericPresentation
1089
1054
  });
1090
1055
  return s.source === "override" ? s : a;
1091
1056
  }
1092
- function mo(e) {
1093
- const { card: t, chartType: i, preferences: n, dataLabelsConfig: r } = e, a = i || (t == null ? void 0 : t.type), o = Be({
1057
+ function co(e) {
1058
+ const { card: t, chartType: i, preferences: n, dataLabelsConfig: r } = e, a = i || (t == null ? void 0 : t.type), o = Ee({
1094
1059
  chartType: a,
1095
1060
  preferences: n
1096
- }), s = zt({
1061
+ }), s = qt({
1097
1062
  card: t,
1098
1063
  chartType: a,
1099
1064
  axis: o,
1100
1065
  preferences: n
1101
- }), l = ye({
1066
+ }), l = me({
1102
1067
  formatMode: r == null ? void 0 : r.formatMode,
1103
1068
  legacyMode: r == null ? void 0 : r.format,
1104
- overrideFormatOptions: jt(
1069
+ overrideFormatOptions: $t(
1105
1070
  r == null ? void 0 : r.formatOptions,
1106
1071
  r == null ? void 0 : r.format
1107
1072
  ),
@@ -1109,21 +1074,21 @@ function mo(e) {
1109
1074
  preferences: n
1110
1075
  }), c = {
1111
1076
  ...l,
1112
- formatOptions: he({
1077
+ formatOptions: fe({
1113
1078
  card: t,
1114
1079
  metrics: s,
1115
1080
  formatOptions: l.formatOptions,
1116
1081
  context: e.numericPresentation
1117
1082
  })
1118
1083
  };
1119
- if (c.source === "override" || !Ut(a))
1084
+ if (c.source === "override" || !zt(a))
1120
1085
  return c;
1121
- const u = Ve({
1086
+ const u = _e({
1122
1087
  card: t,
1123
1088
  chartType: a,
1124
1089
  axis: o,
1125
1090
  preferences: n,
1126
- axisConfig: ke(
1091
+ axisConfig: Ne(
1127
1092
  n,
1128
1093
  o,
1129
1094
  a
@@ -1132,11 +1097,11 @@ function mo(e) {
1132
1097
  });
1133
1098
  return u.source === "override" ? u : c;
1134
1099
  }
1135
- function Fr(e) {
1136
- const { preferences: t, dataLabelsConfig: i, metric: n } = e, r = ye({
1100
+ function vr(e) {
1101
+ const { preferences: t, dataLabelsConfig: i, metric: n } = e, r = me({
1137
1102
  formatMode: i == null ? void 0 : i.formatMode,
1138
1103
  legacyMode: i == null ? void 0 : i.format,
1139
- overrideFormatOptions: jt(
1104
+ overrideFormatOptions: $t(
1140
1105
  i == null ? void 0 : i.formatOptions,
1141
1106
  i == null ? void 0 : i.format
1142
1107
  ),
@@ -1145,7 +1110,7 @@ function Fr(e) {
1145
1110
  });
1146
1111
  return {
1147
1112
  ...r,
1148
- formatOptions: he({
1113
+ formatOptions: fe({
1149
1114
  card: e.card,
1150
1115
  metrics: e.metric ? [e.metric] : [],
1151
1116
  formatOptions: r.formatOptions,
@@ -1153,16 +1118,16 @@ function Fr(e) {
1153
1118
  })
1154
1119
  };
1155
1120
  }
1156
- function po(e) {
1121
+ function uo(e) {
1157
1122
  var o, s;
1158
- const t = pr({
1123
+ const t = mr({
1159
1124
  card: e.card,
1160
1125
  metricId: e.metricId,
1161
1126
  metricAlias: e.metricAlias,
1162
1127
  datasetIndex: e.datasetIndex,
1163
1128
  datasetLabel: e.datasetLabel,
1164
1129
  metricKey: e.metricKey
1165
- }), i = Fr({
1130
+ }), i = vr({
1166
1131
  card: e.card,
1167
1132
  preferences: e.preferences,
1168
1133
  dataLabelsConfig: e.dataLabelsConfig,
@@ -1172,9 +1137,9 @@ function po(e) {
1172
1137
  if (i.source === "override")
1173
1138
  return i;
1174
1139
  const n = (o = e.card) == null ? void 0 : o.type;
1175
- if (!Ut(n))
1140
+ if (!zt(n))
1176
1141
  return i;
1177
- let r = Be({
1142
+ let r = Ee({
1178
1143
  chartType: n,
1179
1144
  preferences: e.preferences
1180
1145
  });
@@ -1184,12 +1149,12 @@ function po(e) {
1184
1149
  );
1185
1150
  r = (c == null ? void 0 : c.yAxisId) === "y2" ? "y2" : "y";
1186
1151
  }
1187
- const a = Ve({
1152
+ const a = _e({
1188
1153
  card: e.card,
1189
1154
  chartType: n,
1190
1155
  axis: r,
1191
1156
  preferences: e.preferences,
1192
- axisConfig: ke(
1157
+ axisConfig: Ne(
1193
1158
  e.preferences,
1194
1159
  r,
1195
1160
  n
@@ -1198,15 +1163,15 @@ function po(e) {
1198
1163
  });
1199
1164
  return a.source === "override" ? a : i;
1200
1165
  }
1201
- function ho(e) {
1166
+ function fo(e) {
1202
1167
  return (e == null ? void 0 : e.rawValue) === !0;
1203
1168
  }
1204
- function Cr(e) {
1169
+ function Fr(e) {
1205
1170
  const t = e == null ? void 0 : e.numberFormat;
1206
1171
  if (!t)
1207
1172
  return;
1208
1173
  if (t.style === "duration")
1209
- return K(we(t), {
1174
+ return K(Se(t), {
1210
1175
  preserveOmittedProperties: !0
1211
1176
  });
1212
1177
  const i = t.style === "currency" ? "currency" : t.style === "percent" ? "percent" : t.style === "scientific" ? "scientific" : "number", n = t.minimumFractionDigits, r = t.maximumFractionDigits;
@@ -1226,14 +1191,14 @@ function Cr(e) {
1226
1191
  suffix: t.suffix
1227
1192
  };
1228
1193
  }
1229
- function Ir(e, t, i = !1) {
1230
- const n = i ? { preserveOmittedProperties: !0 } : void 0, r = G(e == null ? void 0 : e.format, n), a = ht(
1194
+ function Cr(e, t, i = !1) {
1195
+ const n = i ? { preserveOmittedProperties: !0 } : void 0, r = W(e == null ? void 0 : e.format, n), a = mt(
1231
1196
  r,
1232
1197
  n
1233
1198
  );
1234
1199
  if (!a)
1235
1200
  return;
1236
- const o = t || Ee(), s = i ? {
1201
+ const o = t || Oe(), s = i ? {
1237
1202
  showDataBar: o.numberFormat.showDataBar,
1238
1203
  showHeatmap: o.numberFormat.showHeatmap,
1239
1204
  dataBarColor: o.numberFormat.dataBarColor,
@@ -1256,8 +1221,8 @@ function Ir(e, t, i = !1) {
1256
1221
  }
1257
1222
  };
1258
1223
  }
1259
- function Ht(e) {
1260
- var g, I, R, O;
1224
+ function jt(e) {
1225
+ var T, V, N, O;
1261
1226
  const {
1262
1227
  card: t,
1263
1228
  columnId: i,
@@ -1271,56 +1236,56 @@ function Ht(e) {
1271
1236
  columnKeyMap: u,
1272
1237
  valueFormatPreferences: f,
1273
1238
  boundCurrency: d,
1274
- preserveOmittedProperties: h
1275
- } = e, v = n ?? ((R = (I = (g = t == null ? void 0 : t.preferences) == null ? void 0 : g.tablePrefs) == null ? void 0 : I.columnSettingsMap) == null ? void 0 : R[i]), b = !((O = t == null ? void 0 : t.sql) != null && O.trim()) || fi(v), m = b ? f : null, y = b ? d : void 0, C = mi(
1239
+ preserveOmittedProperties: g
1240
+ } = e, v = n ?? ((N = (V = (T = t == null ? void 0 : t.preferences) == null ? void 0 : T.tablePrefs) == null ? void 0 : V.columnSettingsMap) == null ? void 0 : N[i]), b = !((O = t == null ? void 0 : t.sql) != null && O.trim()) || ui(v), m = b ? f : null, y = b ? d : void 0, C = di(
1276
1241
  v == null ? void 0 : v.numberFormat
1277
- ), D = r ?? Lt(v);
1278
- if (D && D.inheritMetricFormat !== !0)
1279
- return ot(
1280
- D,
1242
+ ), S = r ?? Bt(v);
1243
+ if (S && S.inheritMetricFormat !== !0)
1244
+ return rt(
1245
+ S,
1281
1246
  m,
1282
1247
  y,
1283
1248
  {
1284
1249
  preserveHistoricalPersistedPrecision: C
1285
1250
  }
1286
1251
  );
1287
- const w = oe(t, {
1252
+ const w = ie(t, {
1288
1253
  columnId: i,
1289
1254
  metricId: o,
1290
1255
  metricAlias: s,
1291
1256
  columnKeyMap: u,
1292
1257
  fieldId: l,
1293
1258
  fieldRole: c
1294
- }), S = Ir(
1259
+ }), h = Cr(
1295
1260
  w,
1296
- D || a,
1297
- h ?? !!f
1298
- ), E = !S && m && or(w) ? ur(
1299
- D || a,
1261
+ S || a,
1262
+ g ?? !!f
1263
+ ), F = !h && m && ar(w) ? cr(
1264
+ S || a,
1300
1265
  y
1301
1266
  ) : void 0;
1302
- return ot(
1303
- S || E || D || a,
1267
+ return rt(
1268
+ h || F || S || a,
1304
1269
  m,
1305
1270
  y,
1306
1271
  {
1307
- preserveHistoricalPersistedPrecision: !!(D && C && !S && !E)
1272
+ preserveHistoricalPersistedPrecision: !!(S && C && !h && !F)
1308
1273
  }
1309
1274
  );
1310
1275
  }
1311
- function ot(e, t, i, n) {
1276
+ function rt(e, t, i, n) {
1312
1277
  if (!e || e.type !== "number" || !t)
1313
1278
  return e;
1314
- const r = e.numberFormat, a = r ? n != null && n.preserveHistoricalPersistedPrecision ? pi(r) : we(r, {
1279
+ const r = e.numberFormat, a = r ? n != null && n.preserveHistoricalPersistedPrecision ? fi(r) : Se(r, {
1315
1280
  preserveOmittedProperties: !0
1316
1281
  }) : { type: "number" };
1317
- if (!a || !k(a))
1282
+ if (!a || !R(a))
1318
1283
  return e;
1319
1284
  const o = _(
1320
1285
  a,
1321
1286
  t,
1322
1287
  i
1323
- ), s = ht(o, {
1288
+ ), s = mt(o, {
1324
1289
  preserveOmittedProperties: !0
1325
1290
  });
1326
1291
  return s ? {
@@ -1336,30 +1301,30 @@ function ot(e, t, i, n) {
1336
1301
  }
1337
1302
  } : e;
1338
1303
  }
1339
- function me(e) {
1304
+ function ue(e) {
1340
1305
  if (!e.valueFormatPreferences)
1341
1306
  return;
1342
- const t = Ht(e);
1307
+ const t = jt(e);
1343
1308
  if (!t || t.type !== "number")
1344
1309
  return;
1345
- const i = we(t.numberFormat, {
1310
+ const i = Se(t.numberFormat, {
1346
1311
  preserveOmittedProperties: !0
1347
1312
  });
1348
- if (!(!i || !vt(i)))
1313
+ if (!(!i || !yt(i)))
1349
1314
  return i;
1350
1315
  }
1351
- function xr(e) {
1316
+ function Ir(e) {
1352
1317
  var n, r;
1353
1318
  if (!e.presentation.preferences)
1354
1319
  return;
1355
- const t = oe(e.card, {
1320
+ const t = ie(e.card, {
1356
1321
  columnId: e.columnId,
1357
1322
  metricId: e.metricId,
1358
1323
  metricAlias: e.metricAlias,
1359
1324
  columnKeyMap: e.columnKeyMap
1360
1325
  });
1361
1326
  if (e.comparisonValueKind === "percent_change" || e.comparisonValueKind === "ratio") {
1362
- const a = me({
1327
+ const a = ue({
1363
1328
  card: e.card,
1364
1329
  columnId: e.columnId,
1365
1330
  persistedSettings: e.persistedSettings,
@@ -1369,7 +1334,7 @@ function xr(e) {
1369
1334
  columnKeyMap: e.columnKeyMap,
1370
1335
  metricAlias: e.metricAlias ?? (t == null ? void 0 : t.alias),
1371
1336
  valueFormatPreferences: e.presentation.preferences
1372
- }), o = gi(e.comparisonPrecision) ?? (k(a) ? a.maximumFractionDigits : void 0) ?? (e.comparisonValueKind === "percent_change" ? 1 : 2);
1337
+ }), o = hi(e.comparisonPrecision) ?? (R(a) ? a.maximumFractionDigits : void 0) ?? (e.comparisonValueKind === "percent_change" ? 1 : 2);
1373
1338
  return e.comparisonValueKind === "percent_change" ? {
1374
1339
  type: "percent",
1375
1340
  locale: e.presentation.preferences.locale,
@@ -1384,12 +1349,12 @@ function xr(e) {
1384
1349
  suffix: "×"
1385
1350
  };
1386
1351
  }
1387
- const i = bi({
1352
+ const i = gi({
1388
1353
  card: e.card,
1389
1354
  columnKey: e.columnId,
1390
1355
  metricId: e.metricId ?? (t && !((r = (n = e.card.config) == null ? void 0 : n.groupByColumns) != null && r.includes(t)) ? t.id : void 0)
1391
1356
  });
1392
- return me({
1357
+ return ue({
1393
1358
  card: e.card,
1394
1359
  columnId: e.columnId,
1395
1360
  persistedSettings: e.persistedSettings,
@@ -1402,10 +1367,10 @@ function xr(e) {
1402
1367
  boundCurrency: i ? e.presentation.resolveBoundCurrency(i) : void 0
1403
1368
  });
1404
1369
  }
1405
- function Sr(e) {
1406
- var s, l, c, u, f, d, h;
1370
+ function xr(e) {
1371
+ var s, l, c, u, f, d, g;
1407
1372
  if (e.card.type === "matrixTable" && e.target.kind === "matrix_measure") {
1408
- const v = e.target, b = vi(e.card, e.matrixCatalog).find(
1373
+ const v = e.target, b = yi(e.card, e.matrixCatalog).find(
1409
1374
  (y) => y.measureId === v.measureId
1410
1375
  ), m = b == null ? void 0 : b.canonical;
1411
1376
  return m && (m.type === "number" || m.type === "currency") ? _(
@@ -1422,44 +1387,44 @@ function Sr(e) {
1422
1387
  )) ?? -1 : 0;
1423
1388
  if (b < 0)
1424
1389
  return;
1425
- const m = Fi(e.card, {
1390
+ const m = bi(e.card, {
1426
1391
  metricIndex: b,
1427
1392
  resultColumnKey: e.target.kind === "column" ? e.target.columnKey : void 0
1428
1393
  }), y = m.authoredFormat;
1429
- return m.currencyBindable && y && k(y) ? _(
1394
+ return m.currencyBindable && y && R(y) ? _(
1430
1395
  y,
1431
1396
  e.valueFormatPreferences,
1432
1397
  e.boundCurrency
1433
1398
  ) : void 0;
1434
1399
  }
1435
- if (!((c = e.card.sql) != null && c.trim()) && !Wi(e.card.type) && e.target.kind === "metric") {
1400
+ if (!((c = e.card.sql) != null && c.trim()) && !Hi(e.card.type) && e.target.kind === "metric") {
1436
1401
  const v = e.target.metricId, b = (f = (u = e.card.config) == null ? void 0 : u.metricColumns) == null ? void 0 : f.find(
1437
1402
  (C) => C.id === v
1438
1403
  );
1439
1404
  if (!b)
1440
1405
  return;
1441
- const m = mt(
1406
+ const m = dt(
1442
1407
  e.card,
1443
1408
  b
1444
1409
  ), y = m.authoredFormat;
1445
- return m.currencyBindable && y && k(y) ? _(
1410
+ return m.currencyBindable && y && R(y) ? _(
1446
1411
  y,
1447
1412
  e.valueFormatPreferences,
1448
1413
  e.boundCurrency
1449
1414
  ) : void 0;
1450
1415
  }
1451
- const i = ((h = (d = e.card.preferences) == null ? void 0 : d.tablePrefs) == null ? void 0 : h.columnSettingsMap) || {}, n = e.target.kind === "metric" ? e.target.metricId : void 0, r = e.target.kind === "column" ? [e.target.columnKey] : [
1416
+ const i = ((g = (d = e.card.preferences) == null ? void 0 : d.tablePrefs) == null ? void 0 : g.columnSettingsMap) || {}, n = e.target.kind === "metric" ? e.target.metricId : void 0, r = e.target.kind === "column" ? [e.target.columnKey] : [
1452
1417
  ...e.resultColumnKeys || [],
1453
1418
  ...Object.keys(i),
1454
1419
  e.target.metricId
1455
1420
  ], a = e.target.kind === "column" ? e.target.columnKey : r.find(
1456
1421
  (v) => {
1457
1422
  var b;
1458
- return ((b = oe(e.card, {
1423
+ return ((b = ie(e.card, {
1459
1424
  columnId: v
1460
1425
  })) == null ? void 0 : b.id) === n;
1461
1426
  }
1462
- ) || n, o = me({
1427
+ ) || n, o = ue({
1463
1428
  card: e.card,
1464
1429
  columnId: a,
1465
1430
  metricId: n,
@@ -1467,14 +1432,14 @@ function Sr(e) {
1467
1432
  valueFormatPreferences: e.valueFormatPreferences,
1468
1433
  boundCurrency: e.boundCurrency
1469
1434
  });
1470
- return k(o) ? o : void 0;
1435
+ return R(o) ? o : void 0;
1471
1436
  }
1472
- function yo(e) {
1437
+ function mo(e) {
1473
1438
  var i, n, r, a, o, s;
1474
1439
  const t = e.persistedSettings ?? ((a = (r = (n = (i = e.card) == null ? void 0 : i.preferences) == null ? void 0 : n.tablePrefs) == null ? void 0 : r.columnSettingsMap) == null ? void 0 : a[e.columnId]);
1475
1440
  if (!t && !e.resolvedSettings || (t == null ? void 0 : t.inheritMetricFormat) === !0 || ((o = e.resolvedSettings) == null ? void 0 : o.inheritMetricFormat) === !0) {
1476
- const l = G(
1477
- (s = oe(e.card, {
1441
+ const l = W(
1442
+ (s = ie(e.card, {
1478
1443
  columnId: e.columnId,
1479
1444
  metricId: e.metricId,
1480
1445
  metricAlias: e.metricAlias,
@@ -1487,33 +1452,33 @@ function yo(e) {
1487
1452
  preserveOmittedProperties: !0
1488
1453
  });
1489
1454
  }
1490
- return Cr(
1491
- Ht({
1455
+ return Fr(
1456
+ jt({
1492
1457
  ...e,
1493
1458
  persistedSettings: t
1494
1459
  })
1495
1460
  );
1496
1461
  }
1497
- function Mr(e) {
1498
- var v, b, m, y, C, D, w;
1499
- const t = (v = e == null ? void 0 : e.formatNumber) == null ? void 0 : v.enabled, i = typeof t == "string" ? t.trim().toLowerCase() !== "false" : t !== !1, n = hi(e == null ? void 0 : e.numberAxisFormat) || (i ? yi(e == null ? void 0 : e.formatNumber) : void 0), r = K(n);
1462
+ function Sr(e) {
1463
+ var v, b, m, y, C, S, w;
1464
+ const t = (v = e == null ? void 0 : e.formatNumber) == null ? void 0 : v.enabled, i = typeof t == "string" ? t.trim().toLowerCase() !== "false" : t !== !1, n = mi(e == null ? void 0 : e.numberAxisFormat) || (i ? pi(e == null ? void 0 : e.formatNumber) : void 0), r = K(n);
1500
1465
  if (!r || !r.type || r.type === "auto")
1501
1466
  return r;
1502
- const a = (b = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : b.decimalPlaces, o = i ? (m = e == null ? void 0 : e.formatNumber) == null ? void 0 : m.decimalPlaces : void 0, s = typeof a == "number" ? a : typeof o == "number" ? o : void 0, l = (y = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : y.minimumFractionDigits, c = (C = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : C.maximumFractionDigits, u = i ? (D = e == null ? void 0 : e.formatNumber) == null ? void 0 : D.minimumFractionDigits : void 0, f = i ? (w = e == null ? void 0 : e.formatNumber) == null ? void 0 : w.maximumFractionDigits : void 0, d = typeof s == "number" ? s : typeof l == "number" ? l : typeof u == "number" ? u : 0, h = typeof s == "number" ? s : typeof c == "number" ? c : typeof f == "number" ? f : 0;
1467
+ const a = (b = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : b.decimalPlaces, o = i ? (m = e == null ? void 0 : e.formatNumber) == null ? void 0 : m.decimalPlaces : void 0, s = typeof a == "number" ? a : typeof o == "number" ? o : void 0, l = (y = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : y.minimumFractionDigits, c = (C = e == null ? void 0 : e.numberAxisFormat) == null ? void 0 : C.maximumFractionDigits, u = i ? (S = e == null ? void 0 : e.formatNumber) == null ? void 0 : S.minimumFractionDigits : void 0, f = i ? (w = e == null ? void 0 : e.formatNumber) == null ? void 0 : w.maximumFractionDigits : void 0, d = typeof s == "number" ? s : typeof l == "number" ? l : typeof u == "number" ? u : 0, g = typeof s == "number" ? s : typeof c == "number" ? c : typeof f == "number" ? f : 0;
1503
1468
  return {
1504
1469
  ...r,
1505
- decimalPlaces: d === h ? h : r.decimalPlaces,
1470
+ decimalPlaces: d === g ? g : r.decimalPlaces,
1506
1471
  minimumFractionDigits: d,
1507
1472
  maximumFractionDigits: Math.max(
1508
1473
  d,
1509
- h
1474
+ g
1510
1475
  )
1511
1476
  };
1512
1477
  }
1513
- function go(e) {
1478
+ function po(e) {
1514
1479
  var r, a, o, s, l;
1515
1480
  const { value: t, formatOptions: i, preferences: n } = e;
1516
- return i != null && i.type && i.type !== "auto" ? Rt(t, i.type, i) : Qn({
1481
+ return i != null && i.type && i.type !== "auto" ? Nt(t, i.type, i) : Wn({
1517
1482
  number: t,
1518
1483
  decimalPlaces: ((r = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : r.decimalPlaces) ?? 0,
1519
1484
  useSuffix: !!((a = n == null ? void 0 : n.numberAxisFormat) != null && a.suffix),
@@ -1522,18 +1487,18 @@ function go(e) {
1522
1487
  currency: ((l = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : l.currency) || ""
1523
1488
  });
1524
1489
  }
1525
- function Dr(e) {
1526
- return Qi({
1490
+ function Mr(e) {
1491
+ return Gi({
1527
1492
  ...e,
1528
- activation: Pe({
1493
+ activation: Me({
1529
1494
  card: e.card,
1530
1495
  cardConfig: e.cardConfig
1531
1496
  })
1532
1497
  });
1533
1498
  }
1534
- function bo(e) {
1535
- return Yi({
1536
- activation: Pe({
1499
+ function ho(e) {
1500
+ return Wi({
1501
+ activation: Me({
1537
1502
  card: e.card,
1538
1503
  cardConfig: e.cardConfig
1539
1504
  }),
@@ -1541,9 +1506,9 @@ function bo(e) {
1541
1506
  expectedResultOwner: e.expectedResultOwner
1542
1507
  });
1543
1508
  }
1544
- function Tr(e) {
1509
+ function Dr(e) {
1545
1510
  var n, r;
1546
- const t = yt(e.card, e.effectiveCardConfig), i = Ln({
1511
+ const t = pt(e.card, e.effectiveCardConfig), i = Kn({
1547
1512
  card: t,
1548
1513
  records: e.rows,
1549
1514
  keys: e.rows.length === 0 ? e.resultKeys : void 0,
@@ -1566,35 +1531,35 @@ function Tr(e) {
1566
1531
  }
1567
1532
  };
1568
1533
  }
1569
- function wr(e) {
1534
+ function Tr(e) {
1570
1535
  var i;
1571
1536
  const t = (i = e.preferences) == null ? void 0 : i.comparisonPresentation;
1572
1537
  return {
1573
- ...Bi,
1538
+ ...Vi,
1574
1539
  ...t,
1575
1540
  ...t != null && t.conditionalLabels ? { conditionalLabels: { ...t.conditionalLabels } } : {},
1576
1541
  ...t != null && t.colors ? { colors: { ...t.colors } } : {}
1577
1542
  };
1578
1543
  }
1579
- function Pr(e) {
1580
- var D, w, F, S, E;
1581
- const t = yt(e.card, e.effectiveCardConfig), { cardId: i, ...n } = e.requestPayloadBase, r = e.formatOptions.visibleColumns ?? [], a = [
1544
+ function wr(e) {
1545
+ var S, w;
1546
+ const t = pt(e.card, e.effectiveCardConfig), { cardId: i, ...n } = e.requestPayloadBase, r = e.formatOptions.visibleColumns ?? [], a = [
1582
1547
  ...r,
1583
1548
  ...Object.keys(e.formatOptions.columnSettings ?? {})
1584
- ], o = Ci(
1549
+ ], o = vi(
1585
1550
  e.card,
1586
1551
  r,
1587
1552
  e.effectiveCardConfig
1588
- ), s = Ii(
1553
+ ), s = Fi(
1589
1554
  e.card,
1590
1555
  e.effectiveCardConfig,
1591
1556
  o
1592
- ), l = xi(
1557
+ ), l = Ci(
1593
1558
  t,
1594
1559
  a
1595
1560
  ), c = new Set(
1596
- l.eligibleTargets.map(ve)
1597
- ), u = (p) => c.has(ve(p)) ? Mi({
1561
+ l.eligibleTargets.map(ge)
1562
+ ), u = (p) => c.has(ge(p)) ? xi({
1598
1563
  bindings: n.controlBindings,
1599
1564
  controls: [
1600
1565
  ...n.controlDefinitions ?? [],
@@ -1604,23 +1569,18 @@ function Pr(e) {
1604
1569
  target: p,
1605
1570
  knownTargets: l.knownTargets,
1606
1571
  eligibleTargets: l.eligibleTargets
1607
- }).currency : void 0, f = Si({
1572
+ }).currency : void 0, f = Ii({
1608
1573
  card: e.card,
1609
1574
  comparisonMetadata: e.comparisonMetadata,
1610
- columnKeyMap: ((D = e.canonicalPivotResult) == null ? void 0 : D.columnKeyMap) ?? e.columnKeyMap
1611
- }), d = Pe({
1575
+ columnKeyMap: e.columnKeyMap
1576
+ }), d = Me({
1612
1577
  card: e.card,
1613
1578
  cardConfig: e.effectiveCardConfig
1614
- });
1615
- if (e.card.type === "pivotTable" && d && !e.canonicalPivotResult)
1616
- throw new Error(
1617
- "Canonical pivot export requires a parsed pivot result lifecycle."
1618
- );
1619
- const h = Dr({
1579
+ }), g = Mr({
1620
1580
  card: e.card,
1621
1581
  cardConfig: e.effectiveCardConfig,
1622
- columns: ((w = e.canonicalPivotResult) == null ? void 0 : w.columns) ?? e.resultColumns,
1623
- columnKeyMap: ((F = e.canonicalPivotResult) == null ? void 0 : F.columnKeyMap) ?? e.columnKeyMap,
1582
+ columns: e.resultColumns,
1583
+ columnKeyMap: e.columnKeyMap,
1624
1584
  resultRowCount: e.totalRows,
1625
1585
  valueFormatPreferences: e.reportContext.valueFormat
1626
1586
  }), v = (d == null ? void 0 : d.fields) ?? [], b = new Map(
@@ -1632,13 +1592,13 @@ function Pr(e) {
1632
1592
  if (e.card.type === "detailTable" && n.resultOwner === "config") {
1633
1593
  const p = e.resultColumns || [];
1634
1594
  if (p.filter(
1635
- (I) => I.rawTemporal
1595
+ (F) => F.rawTemporal
1636
1596
  ).length > 0) {
1637
1597
  if (!e.columnKeyMap)
1638
1598
  throw new Error(
1639
1599
  "Canonical raw temporal export requires an authoritative columnKeyMap."
1640
1600
  );
1641
- const I = Tn({
1601
+ const F = Dn({
1642
1602
  cardType: e.card.type,
1643
1603
  resultOwner: n.resultOwner,
1644
1604
  effectiveCardConfig: e.effectiveCardConfig,
@@ -1650,21 +1610,21 @@ function Pr(e) {
1650
1610
  preferences: e.reportContext.valueFormat,
1651
1611
  calendar: e.reportContext.calendar
1652
1612
  });
1653
- if (I.kind === "invalid") throw I.error;
1654
- if (I.kind === "loaded_empty" || I.kind === "loaded_valid")
1655
- for (const [R, O] of I.presentation.byColumnKey)
1656
- m.set(R, O.format);
1613
+ if (F.kind === "invalid") throw F.error;
1614
+ if (F.kind === "loaded_empty" || F.kind === "loaded_valid")
1615
+ for (const [D, T] of F.presentation.byColumnKey)
1616
+ m.set(D, T.format);
1657
1617
  }
1658
1618
  } else if (n.resultOwner === "freeform" && n.sql.trim() && !n.python.trim())
1659
- for (const [p, g] of Object.entries(
1660
- ((E = (S = e.card.preferences) == null ? void 0 : S.tablePrefs) == null ? void 0 : E.columnSettingsMap) || {}
1619
+ for (const [p, h] of Object.entries(
1620
+ ((w = (S = e.card.preferences) == null ? void 0 : S.tablePrefs) == null ? void 0 : w.columnSettingsMap) || {}
1661
1621
  )) {
1662
- if (g.type !== "date") continue;
1663
- const I = wn(g.dateFormat);
1664
- I && m.set(
1622
+ if (h.type !== "date") continue;
1623
+ const F = Tn(h.dateFormat);
1624
+ F && m.set(
1665
1625
  p,
1666
- Ui({
1667
- format: I,
1626
+ zi({
1627
+ format: F,
1668
1628
  preferences: e.reportContext.valueFormat,
1669
1629
  calendar: e.reportContext.calendar
1670
1630
  })
@@ -1673,66 +1633,66 @@ function Pr(e) {
1673
1633
  const y = [
1674
1634
  ...new Set(a)
1675
1635
  ].flatMap((p) => {
1676
- var P, J, X, Z, ee, te;
1677
- if (h.byColumnKey.has(p) || m.has(p))
1636
+ var q, E, re, P, Y, J;
1637
+ if (g.byColumnKey.has(p) || m.has(p))
1678
1638
  return [];
1679
- const g = f.columnPresentationOwners.get(p), I = (P = t.sql) != null && P.trim() ? void 0 : oe(t, {
1639
+ const h = f.columnPresentationOwners.get(p), F = (q = t.sql) != null && q.trim() ? void 0 : ie(t, {
1680
1640
  columnId: p,
1681
1641
  columnKeyMap: e.columnKeyMap,
1682
- metricId: g == null ? void 0 : g.metricId,
1683
- metricAlias: g == null ? void 0 : g.metricAlias
1684
- }), R = I ? { kind: "metric", metricId: I.id } : { kind: "column", columnKey: p }, O = c.has(
1685
- ve(R)
1686
- ), Q = u(R), V = (Z = (X = (J = t.preferences) == null ? void 0 : J.tablePrefs) == null ? void 0 : X.columnSettingsMap) == null ? void 0 : Z[p], U = {
1642
+ metricId: h == null ? void 0 : h.metricId,
1643
+ metricAlias: h == null ? void 0 : h.metricAlias
1644
+ }), D = F ? { kind: "metric", metricId: F.id } : { kind: "column", columnKey: p }, T = c.has(
1645
+ ge(D)
1646
+ ), V = u(D), N = (P = (re = (E = t.preferences) == null ? void 0 : E.tablePrefs) == null ? void 0 : re.columnSettingsMap) == null ? void 0 : P[p], O = {
1687
1647
  dashboardId: e.dashboardId,
1688
1648
  cardId: t.id
1689
- }, B = { kind: "column", columnKey: p }, T = I && (!V || V.inheritMetricFormat === !0) ? G(I.format, {
1649
+ }, H = { kind: "column", columnKey: p }, M = F && (!N || N.inheritMetricFormat === !0) ? W(F.format, {
1690
1650
  preserveOmittedProperties: !0
1691
1651
  }) : void 0;
1692
- if ((T == null ? void 0 : T.type) === "date")
1652
+ if ((M == null ? void 0 : M.type) === "date")
1693
1653
  return [
1694
1654
  {
1695
- scope: U,
1696
- target: B,
1655
+ scope: O,
1656
+ target: H,
1697
1657
  format: {
1698
1658
  type: "date",
1699
- locale: T.locale ?? e.reportContext.valueFormat.locale,
1700
- ...T.pattern ? { pattern: T.pattern } : {},
1701
- ...T.timezone ? { timezone: T.timezone } : {},
1702
- ...T.sourceTimezone ? { sourceTimezone: T.sourceTimezone } : {}
1659
+ locale: M.locale ?? e.reportContext.valueFormat.locale,
1660
+ ...M.pattern ? { pattern: M.pattern } : {},
1661
+ ...M.timezone ? { timezone: M.timezone } : {},
1662
+ ...M.sourceTimezone ? { sourceTimezone: M.sourceTimezone } : {}
1703
1663
  }
1704
1664
  }
1705
1665
  ];
1706
- const A = (g ? xr({
1666
+ const k = (h ? Ir({
1707
1667
  card: t,
1708
1668
  columnId: p,
1709
1669
  columnKeyMap: e.columnKeyMap,
1710
- persistedSettings: V,
1711
- metricId: g.metricId,
1712
- metricAlias: g.metricAlias,
1713
- comparisonValueKind: g.kind,
1714
- comparisonPrecision: (te = (ee = t.preferences) == null ? void 0 : ee.comparisonPresentation) == null ? void 0 : te.precision,
1670
+ persistedSettings: N,
1671
+ metricId: h.metricId,
1672
+ metricAlias: h.metricAlias,
1673
+ comparisonValueKind: h.kind,
1674
+ comparisonPrecision: (J = (Y = t.preferences) == null ? void 0 : Y.comparisonPresentation) == null ? void 0 : J.precision,
1715
1675
  presentation: {
1716
1676
  preferences: e.reportContext.valueFormat,
1717
1677
  resolveBoundCurrency: u
1718
1678
  }
1719
- }) : void 0) ?? (O ? Sr({
1679
+ }) : void 0) ?? (T ? xr({
1720
1680
  card: t,
1721
- target: R,
1681
+ target: D,
1722
1682
  resultColumnKeys: a,
1723
1683
  valueFormatPreferences: e.reportContext.valueFormat,
1724
- boundCurrency: Q
1725
- }) : void 0) ?? me({
1684
+ boundCurrency: V
1685
+ }) : void 0) ?? ue({
1726
1686
  card: t,
1727
1687
  columnId: p,
1728
1688
  columnKeyMap: e.columnKeyMap,
1729
- metricId: g == null ? void 0 : g.metricId,
1730
- persistedSettings: V,
1689
+ metricId: h == null ? void 0 : h.metricId,
1690
+ persistedSettings: N,
1731
1691
  valueFormatPreferences: e.reportContext.valueFormat
1732
- }), Y = (A == null ? void 0 : A.type) === "duration" ? A : A ? _(
1733
- A,
1692
+ }), B = (k == null ? void 0 : k.type) === "duration" ? k : k ? _(
1693
+ k,
1734
1694
  e.reportContext.valueFormat,
1735
- Q
1695
+ V
1736
1696
  ) : _(
1737
1697
  {
1738
1698
  type: "number",
@@ -1742,15 +1702,15 @@ function Pr(e) {
1742
1702
  e.reportContext.valueFormat
1743
1703
  );
1744
1704
  return [
1745
- Y.type === "duration" ? { scope: U, target: B, format: Y } : { scope: U, target: B, format: Y }
1705
+ B.type === "duration" ? { scope: O, target: H, format: B } : { scope: O, target: H, format: B }
1746
1706
  ];
1747
1707
  });
1748
1708
  y.push(
1749
- ...[...h.byColumnKey.values()].map((p) => {
1750
- const g = b.get(
1709
+ ...[...g.byColumnKey.values()].map((p) => {
1710
+ const h = b.get(
1751
1711
  `${p.role ?? "groupby"}:${p.fieldId}`
1752
1712
  );
1753
- if (!g)
1713
+ if (!h)
1754
1714
  throw new Error(
1755
1715
  `Unable to resolve temporal export field "${p.fieldId}".`
1756
1716
  );
@@ -1760,8 +1720,8 @@ function Pr(e) {
1760
1720
  cardId: e.card.id
1761
1721
  },
1762
1722
  target: { kind: "column", columnKey: p.columnKey },
1763
- format: Ge(
1764
- g,
1723
+ format: Qi(
1724
+ h,
1765
1725
  {
1766
1726
  dateStyle: e.reportContext.valueFormat.dateStyle,
1767
1727
  dateTime: { ...e.reportContext.valueFormat.dateTime }
@@ -1771,37 +1731,13 @@ function Pr(e) {
1771
1731
  };
1772
1732
  })
1773
1733
  ), y.push(
1774
- ...((d == null ? void 0 : d.fields) || []).flatMap(
1775
- (p) => p.role === "pivotby" ? [
1776
- {
1777
- scope: {
1778
- dashboardId: e.dashboardId,
1779
- cardId: e.card.id
1780
- },
1781
- target: {
1782
- kind: "field",
1783
- fieldId: p.id,
1784
- role: p.role
1785
- },
1786
- format: Ge(
1787
- p,
1788
- {
1789
- dateStyle: e.reportContext.valueFormat.dateStyle,
1790
- dateTime: { ...e.reportContext.valueFormat.dateTime }
1791
- },
1792
- e.reportContext.valueFormat.locale
1793
- )
1794
- }
1795
- ] : []
1796
- )
1797
- ), y.push(
1798
- ...[...m].map(([p, g]) => ({
1734
+ ...[...m].map(([p, h]) => ({
1799
1735
  scope: { dashboardId: e.dashboardId, cardId: e.card.id },
1800
1736
  target: { kind: "column", columnKey: p },
1801
- format: g
1737
+ format: h
1802
1738
  }))
1803
1739
  );
1804
- const C = Ki({
1740
+ const C = ki({
1805
1741
  reportContext: e.reportContext,
1806
1742
  resolvedFormats: y
1807
1743
  });
@@ -1809,17 +1745,17 @@ function Pr(e) {
1809
1745
  formatOptions: {
1810
1746
  ...e.formatOptions,
1811
1747
  ...o ? { tableTotalsLabelColumnKey: o } : {},
1812
- comparisonPresentation: wr(e.card),
1748
+ comparisonPresentation: Tr(e.card),
1813
1749
  presentationExecutionSnapshot: C
1814
1750
  },
1815
1751
  ...s ? { tableTotalsRequest: s } : {}
1816
1752
  };
1817
1753
  }
1818
- function Or(e) {
1819
- const t = Ti(
1754
+ function Pr(e) {
1755
+ const t = Mi(
1820
1756
  e.card,
1821
1757
  e.requestPayloadBase
1822
- ), { cardId: i, ...n } = t.requestPayloadBase, r = Pr(e);
1758
+ ), { cardId: i, ...n } = t.requestPayloadBase, r = wr(e);
1823
1759
  return {
1824
1760
  type: "card",
1825
1761
  dashboardId: e.dashboardId,
@@ -1833,13 +1769,13 @@ function Or(e) {
1833
1769
  formatOptions: r.formatOptions
1834
1770
  };
1835
1771
  }
1836
- function vo(e) {
1772
+ function go(e) {
1837
1773
  const { card: t, result: i } = e;
1838
1774
  if (t.type !== "table" && t.type !== "detailTable")
1839
1775
  return { status: "refused", reason: "not_a_table" };
1840
- if (Di({ card: t, comparisonMetadata: i.comparisonMetadata }))
1776
+ if (Si({ card: t, comparisonMetadata: i.comparisonMetadata }))
1841
1777
  return { status: "refused", reason: "comparison_metadata_missing" };
1842
- const n = Tr({
1778
+ const n = Dr({
1843
1779
  card: t,
1844
1780
  effectiveCardConfig: e.effectiveCardConfig,
1845
1781
  rows: e.rows,
@@ -1850,7 +1786,7 @@ function vo(e) {
1850
1786
  });
1851
1787
  return n ? {
1852
1788
  status: "ready",
1853
- request: Or({
1789
+ request: Pr({
1854
1790
  card: t,
1855
1791
  dashboardId: e.dashboardId,
1856
1792
  title: e.title,
@@ -1866,9 +1802,9 @@ function vo(e) {
1866
1802
  })
1867
1803
  } : { status: "refused", reason: "columns_unresolved" };
1868
1804
  }
1869
- function Ar(e, t, i) {
1870
- if (_i(
1871
- Ei(t),
1805
+ function Or(e, t, i) {
1806
+ if (Ai(
1807
+ _i(t),
1872
1808
  e.aggregateOrigin
1873
1809
  ))
1874
1810
  return { aggregate: void 0, aggregateOrigin: void 0 };
@@ -1878,7 +1814,7 @@ function Ar(e, t, i) {
1878
1814
  aggregateOrigin: e.aggregate ? e.aggregateOrigin : n ? t.aggregateOrigin : void 0
1879
1815
  };
1880
1816
  }
1881
- function Nr(e, t, i) {
1817
+ function Ar(e, t, i) {
1882
1818
  var n, r, a, o, s, l;
1883
1819
  if (i === "domain")
1884
1820
  return {
@@ -1891,7 +1827,7 @@ function Nr(e, t, i) {
1891
1827
  windowTransform: ((s = e.parameters) == null ? void 0 : s.windowTransform) ?? ((l = t.parameters) == null ? void 0 : l.windowTransform)
1892
1828
  };
1893
1829
  }
1894
- function Fo(e, t, i) {
1830
+ function yo(e, t, i) {
1895
1831
  const n = e;
1896
1832
  return {
1897
1833
  id: e.id,
@@ -1903,13 +1839,13 @@ function Fo(e, t, i) {
1903
1839
  dateFormat: e.dateFormat,
1904
1840
  customFormat: e.customFormat,
1905
1841
  semanticTemporalPresentation: t.semanticTemporalPresentation || e.semanticTemporalPresentation,
1906
- ...Ar(e, t, i),
1842
+ ...Or(e, t, i),
1907
1843
  ...e.role === "metric" ? {
1908
1844
  aliasTemplate: n.aliasTemplate,
1909
1845
  valueAliases: n.valueAliases,
1910
1846
  comparison: n.comparison,
1911
1847
  comparisonPolarity: n.comparisonPolarity,
1912
- parameters: Nr(
1848
+ parameters: Ar(
1913
1849
  n,
1914
1850
  t,
1915
1851
  "domain"
@@ -1944,73 +1880,73 @@ function _r(e) {
1944
1880
  return t;
1945
1881
  }
1946
1882
  }
1947
- const Er = "table";
1948
- function Co({ preferences: e, ...t }) {
1883
+ const Nr = "table";
1884
+ function bo({ preferences: e, ...t }) {
1949
1885
  return {
1950
1886
  ...t,
1951
- type: Er,
1887
+ type: Nr,
1952
1888
  preferences: e ?? { onClickFilter: [{ columnIndex: 0, expression: "" }] },
1953
1889
  sql: "",
1954
1890
  data: []
1955
1891
  };
1956
1892
  }
1957
- function Rr(e, t) {
1893
+ function Er(e, t) {
1958
1894
  const i = e.sheets ?? [], n = i.findIndex((o) => o.id === t.sheetId), r = i[n];
1959
1895
  if (!r)
1960
- throw new N("sheet_not_found", `No sheet ${t.sheetId} on this dashboard.`);
1961
- if (Ji(r))
1962
- throw new N(
1896
+ throw new A("sheet_not_found", `No sheet ${t.sheetId} on this dashboard.`);
1897
+ if (Yi(r))
1898
+ throw new A(
1963
1899
  "sheet_not_a_grid",
1964
1900
  "This sheet is a document: it has no grid to arrange.",
1965
1901
  "Arrange a grid sheet; Document sheets are laid out in the editor."
1966
1902
  );
1967
- const a = It(r, { kind: "arrange", keepOrder: t.keepOrder === !0 });
1903
+ const a = Ft(r, { kind: "arrange", keepOrder: t.keepOrder === !0 });
1968
1904
  return {
1969
1905
  dashboard: { ...e, sheets: i.map((o, s) => s === n ? a : o) },
1970
- clauses: [Oe.arranged(r.title || "the dashboard", t.keepOrder === !0, !(r.frames ?? []).length)]
1906
+ clauses: [De.arranged(r.title || "the dashboard", t.keepOrder === !0, !(r.frames ?? []).length)]
1971
1907
  };
1972
1908
  }
1973
- function Vr(e) {
1909
+ function Rr(e) {
1974
1910
  return !!(e && Object.prototype.hasOwnProperty.call(e, "calculatedFields"));
1975
1911
  }
1976
- function z(...e) {
1977
- return Xi(e.flatMap((t) => t || []));
1912
+ function j(...e) {
1913
+ return Ji(e.flatMap((t) => t || []));
1978
1914
  }
1979
- function W(e, t) {
1915
+ function Q(e, t) {
1980
1916
  return {
1981
1917
  ...e,
1982
1918
  fieldScope: t
1983
1919
  };
1984
1920
  }
1985
- function Ke(e) {
1986
- return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => t.fieldScope === "sheet").map((t) => W(t, "sheet"));
1921
+ function Re(e) {
1922
+ return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => t.fieldScope === "sheet").map((t) => Q(t, "sheet"));
1987
1923
  }
1988
- function Gt(e) {
1989
- return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => !t.fieldScope).map((t) => W(t, "sheet"));
1924
+ function Ut(e) {
1925
+ return ((e == null ? void 0 : e.calculatedFields) || []).filter((t) => !t.fieldScope).map((t) => Q(t, "sheet"));
1990
1926
  }
1991
- function kr(e) {
1927
+ function Vr(e) {
1992
1928
  return e ? [
1993
1929
  ...(e.calculatedFields || []).filter(
1994
1930
  (t) => t.fieldScope === "dashboard"
1995
1931
  ),
1996
1932
  ...(e.frames || []).flatMap((t) => t.calculatedFields || [])
1997
- ].map((t) => W(t, "dashboard")) : [];
1933
+ ].map((t) => Q(t, "dashboard")) : [];
1998
1934
  }
1999
- function Br(e) {
1935
+ function kr(e) {
2000
1936
  if (e !== void 0)
2001
- return z(
2002
- e.map((t) => W(t, "dashboard"))
1937
+ return j(
1938
+ e.map((t) => Q(t, "dashboard"))
2003
1939
  );
2004
1940
  }
2005
- function Io(e) {
1941
+ function vo(e) {
2006
1942
  var n;
2007
1943
  const t = [], i = (e.sheets || []).map((r) => {
2008
1944
  var a;
2009
- return t.push(...kr(r)), {
1945
+ return t.push(...Vr(r)), {
2010
1946
  ...r,
2011
- calculatedFields: z(
2012
- Ke(r),
2013
- Gt(r)
1947
+ calculatedFields: j(
1948
+ Re(r),
1949
+ Ut(r)
2014
1950
  ),
2015
1951
  frames: (a = r.frames) == null ? void 0 : a.map(
2016
1952
  (o) => o.calculatedFields === void 0 ? o : { ...o, calculatedFields: void 0 }
@@ -2019,10 +1955,10 @@ function Io(e) {
2019
1955
  });
2020
1956
  return {
2021
1957
  ...e,
2022
- calculatedFields: Br(
2023
- z(
1958
+ calculatedFields: kr(
1959
+ j(
2024
1960
  (n = e.calculatedFields) == null ? void 0 : n.map(
2025
- (r) => W(r, "dashboard")
1961
+ (r) => Q(r, "dashboard")
2026
1962
  ),
2027
1963
  t
2028
1964
  )
@@ -2030,42 +1966,42 @@ function Io(e) {
2030
1966
  sheets: i
2031
1967
  };
2032
1968
  }
2033
- function st(e, t) {
1969
+ function at(e, t) {
2034
1970
  var r;
2035
1971
  if (!((r = e == null ? void 0 : e.frames) != null && r.length))
2036
1972
  return [];
2037
1973
  const i = t ? e.frames.find((a) => a.id === t) : void 0, n = e.frames.filter(
2038
1974
  (a) => !t || a.id !== t
2039
1975
  );
2040
- return z(
1976
+ return j(
2041
1977
  i == null ? void 0 : i.calculatedFields,
2042
1978
  ...n.map((a) => a.calculatedFields)
2043
1979
  );
2044
1980
  }
2045
- function xo(e, t) {
2046
- return e ? Ke(e) : [];
1981
+ function Fo(e, t) {
1982
+ return e ? Re(e) : [];
2047
1983
  }
2048
- function So(e, t) {
1984
+ function Co(e, t) {
2049
1985
  if (!e)
2050
1986
  return [];
2051
- const i = Ke(e), n = Gt(e), r = z(
1987
+ const i = Re(e), n = Ut(e), r = j(
2052
1988
  i,
2053
1989
  n
2054
1990
  );
2055
- return Vr(e) ? r.length === 0 ? [] : n.length === 0 ? r : z(
1991
+ return Rr(e) ? r.length === 0 ? [] : n.length === 0 ? r : j(
2056
1992
  r,
2057
- st(e, t)
2058
- ) : st(e, t);
1993
+ at(e, t)
1994
+ ) : at(e, t);
2059
1995
  }
2060
- function Kr(e) {
1996
+ function Br(e) {
2061
1997
  if (e !== void 0)
2062
- return z(
2063
- e.map((t) => W(t, "sheet"))
1998
+ return j(
1999
+ e.map((t) => Q(t, "sheet"))
2064
2000
  );
2065
2001
  }
2066
- function Mo(e) {
2002
+ function Io(e) {
2067
2003
  const { field: t, sheetFields: i = [], dashboardFields: n = [] } = e, r = (s) => s.find(
2068
- (l) => Zi(l, t, {
2004
+ (l) => Xi(l, t, {
2069
2005
  allowComparableFallback: !0
2070
2006
  })
2071
2007
  );
@@ -2079,48 +2015,48 @@ function Mo(e) {
2079
2015
  const o = r(n);
2080
2016
  return o ? { scope: "dashboard", matchedField: o } : { scope: "card" };
2081
2017
  }
2082
- function Lr(e, t) {
2083
- var C, D, w;
2084
- const i = (e.sheets ?? []).findIndex((F) => F.id === t.sheetId), n = (C = e.sheets) == null ? void 0 : C[i];
2018
+ function Kr(e, t) {
2019
+ var C, S, w;
2020
+ const i = (e.sheets ?? []).findIndex((p) => p.id === t.sheetId), n = (C = e.sheets) == null ? void 0 : C[i];
2085
2021
  if (!(n != null && n.frames))
2086
- throw new N("sheet_not_found", `No sheet ${t.sheetId} with frames on this dashboard.`);
2087
- const { frame: r } = t, a = n.frames.findIndex((F) => F.id === r.id);
2022
+ throw new A("sheet_not_found", `No sheet ${t.sheetId} with frames on this dashboard.`);
2023
+ const { frame: r } = t, a = n.frames.findIndex((p) => p.id === r.id);
2088
2024
  if (a === -1)
2089
- throw new N("frame_not_found", `No frame ${r.id} on sheet ${t.sheetId}.`);
2090
- const o = n.frames[a], s = We(n), l = (F) => F.calculatedFields === void 0 ? F : { ...F, calculatedFields: void 0 }, c = t.rewrittenFrames, u = c && c.length > 0 ? (() => {
2091
- const F = c.map((S) => S.id === r.id ? r : S);
2092
- return F.some((S) => S.id === r.id) ? F : [r, ...F];
2093
- })() : [r], f = new Map(u.map((F) => [F.id, F])), d = It(n, { kind: "frame_updated", frame: r, resizeForNewKind: t.resizeLayouts });
2094
- let h = /* @__PURE__ */ new Set();
2095
- const v = en.produce(e, (F) => {
2096
- const S = F.sheets[i];
2097
- d.layouts !== n.layouts && (S.layouts = Qe(d.layouts)), d.customizedBreakpoints !== n.customizedBreakpoints && (S.customizedBreakpoints = d.customizedBreakpoints), t.sheetCalculatedFields !== void 0 && (S.calculatedFields = Kr(t.sheetCalculatedFields)), S.frames = S.frames.map((p) => {
2098
- const g = f.get(p.id);
2099
- return g ? Qe(l(g)) : p.calculatedFields === void 0 ? p : { ...p, calculatedFields: void 0 };
2025
+ throw new A("frame_not_found", `No frame ${r.id} on sheet ${t.sheetId}.`);
2026
+ const o = n.frames[a], s = He(n), l = (p) => p.calculatedFields === void 0 ? p : { ...p, calculatedFields: void 0 }, c = t.rewrittenFrames, u = c && c.length > 0 ? (() => {
2027
+ const p = c.map((h) => h.id === r.id ? r : h);
2028
+ return p.some((h) => h.id === r.id) ? p : [r, ...p];
2029
+ })() : [r], f = new Map(u.map((p) => [p.id, p])), d = Ft(n, { kind: "frame_updated", frame: r, resizeForNewKind: t.resizeLayouts });
2030
+ let g = /* @__PURE__ */ new Set();
2031
+ const v = Zi.produce(e, (p) => {
2032
+ const h = p.sheets[i];
2033
+ d.layouts !== n.layouts && (h.layouts = Ge(d.layouts)), d.customizedBreakpoints !== n.customizedBreakpoints && (h.customizedBreakpoints = d.customizedBreakpoints), t.sheetCalculatedFields !== void 0 && (h.calculatedFields = Br(t.sheetCalculatedFields)), h.frames = h.frames.map((D) => {
2034
+ const T = f.get(D.id);
2035
+ return T ? Ge(l(T)) : D.calculatedFields === void 0 ? D : { ...D, calculatedFields: void 0 };
2100
2036
  });
2101
- const E = We(S);
2102
- h = new Set([...s].filter((p) => !E.has(p))), tn(F, h), t.dashboardCalculatedFields && (F.calculatedFields = t.dashboardCalculatedFields);
2103
- }), b = v.sheets[i].frames.find((F) => F.id === r.id), m = [
2104
- ...h.size ? [{ kind: "cards_removed", cardIds: [...h] }] : [],
2037
+ const F = He(h);
2038
+ g = new Set([...s].filter((D) => !F.has(D))), en(p, g), t.dashboardCalculatedFields && (p.calculatedFields = t.dashboardCalculatedFields);
2039
+ }), b = v.sheets[i].frames.find((p) => p.id === r.id), m = [
2040
+ ...g.size ? [{ kind: "cards_removed", cardIds: [...g] }] : [],
2105
2041
  { kind: "frame_committed", sheetId: t.sheetId, before: o, after: b }
2106
- ], y = ((D = r.cards) == null ? void 0 : D.find((F) => F.id === r.activeCardId)) ?? ((w = r.cards) == null ? void 0 : w[0]);
2107
- return { dashboard: v, runtimeEffects: m, clauses: [Oe.committed(y == null ? void 0 : y.title)] };
2042
+ ], y = ((S = r.cards) == null ? void 0 : S.find((p) => p.id === r.activeCardId)) ?? ((w = r.cards) == null ? void 0 : w[0]);
2043
+ return { dashboard: v, runtimeEffects: m, clauses: [De.committed(y == null ? void 0 : y.title)] };
2108
2044
  }
2109
- function qr(e, t, i) {
2045
+ function Lr(e, t, i) {
2110
2046
  var a;
2111
2047
  if (!e || !t || t.customFilterPreferences) return;
2112
2048
  const n = t.defaultDateFilter;
2113
- return (t.dateSelectionMode === "day" ? an(n) : t.dateSelectionMode === "months" && (on(n) || sn(n) && n.unit === "month" && (n.mode === "previous" || n.mode === "this" && !n.toDate && !n.boundary))) && ((a = H(t, i)) == null ? void 0 : a.valueType) === "date" ? !0 : void 0;
2049
+ return (t.dateSelectionMode === "day" ? rn(n) : t.dateSelectionMode === "months" && (an(n) || on(n) && n.unit === "month" && (n.mode === "previous" || n.mode === "this" && !n.toDate && !n.boundary))) && ((a = G(t, i)) == null ? void 0 : a.valueType) === "date" ? !0 : void 0;
2114
2050
  }
2115
- function Do(e) {
2116
- const t = e.createId ?? Dt, i = t(), n = wi({
2051
+ function xo(e) {
2052
+ const t = e.createId ?? St, i = t(), n = Di({
2117
2053
  field: e.field,
2118
2054
  dataSource: e.dataSource,
2119
2055
  connectionId: e.connectionId,
2120
2056
  connectionType: e.connectionType,
2121
2057
  filterId: t()
2122
2058
  });
2123
- return $r({
2059
+ return qr({
2124
2060
  filter: e.label ? { ...n, title: e.label } : n,
2125
2061
  label: e.label || e.field.label || e.field.name,
2126
2062
  scope: e.scope,
@@ -2128,11 +2064,11 @@ function Do(e) {
2128
2064
  createId: () => i
2129
2065
  });
2130
2066
  }
2131
- function $r(e) {
2132
- const t = e.createId ?? Dt, i = e.label || e.filter.title || e.filter.column || e.filter.id, n = nn(i, [
2067
+ function qr(e) {
2068
+ const t = e.createId ?? St, i = e.label || e.filter.title || e.filter.column || e.filter.id, n = tn(i, [
2133
2069
  ...e.existingInputs
2134
2070
  ]), r = {
2135
- ...xt(e.filter),
2071
+ ...Ct(e.filter),
2136
2072
  variableName: n
2137
2073
  };
2138
2074
  return {
@@ -2143,22 +2079,22 @@ function $r(e) {
2143
2079
  requiredAtExecution: !1,
2144
2080
  scope: e.scope,
2145
2081
  runtimeScope: "shared",
2146
- presentation: Mt(r),
2082
+ presentation: xt(r),
2147
2083
  filter: r,
2148
- exports: St(r)
2084
+ exports: It(r)
2149
2085
  };
2150
2086
  }
2151
- function zr(e, t, i, n = { calendar: null }) {
2152
- var J, X, Z, ee, te, $e, ze, je;
2153
- const r = q(e), a = r.findFilterInput(t), o = (M, x) => ({
2087
+ function $r(e, t, i, n = { calendar: null }) {
2088
+ var Y, J, Be, Ke, Le, qe, $e, ze;
2089
+ const r = $(e), a = r.findFilterInput(t), o = (x, I) => ({
2154
2090
  ok: !1,
2155
2091
  issues: [
2156
2092
  {
2157
2093
  code: "invalidSettings",
2158
- message: M,
2094
+ message: x,
2159
2095
  ref: t,
2160
2096
  ...a ? { inputId: a.input.id } : {},
2161
- ...x ? { contractIssue: x } : {}
2097
+ ...I ? { contractIssue: I } : {}
2162
2098
  }
2163
2099
  ]
2164
2100
  });
@@ -2176,139 +2112,139 @@ function zr(e, t, i, n = { calendar: null }) {
2176
2112
  if (a.origin !== "embeddedInput")
2177
2113
  return o("This filter can not be edited here.");
2178
2114
  const s = a.input, l = s.filter;
2179
- if (((J = i.mapping) == null ? void 0 : J.kind) === "save") {
2115
+ if (((Y = i.mapping) == null ? void 0 : Y.kind) === "save") {
2180
2116
  if (!i.mapping.draft.acceptance.ok)
2181
2117
  return { ok: !1, issues: i.mapping.draft.acceptance.issues };
2182
2118
  if (i.mapping.draft.inputId !== s.id)
2183
2119
  return o("The card mapping was prepared for another filter.");
2184
2120
  }
2185
- const c = i.definition ? xt(i.definition) : l;
2186
- if (c.kind === "global-date" && i.scope && !jr(i.scope))
2121
+ const c = i.definition ? Ct(i.definition) : l;
2122
+ if (c.kind === "global-date" && i.scope && !zr(i.scope))
2187
2123
  return o("The Global Date filter applies to regular tabs only.");
2188
- const u = (X = n.calendar) == null ? void 0 : X.tz, f = i.definition !== void 0, d = i.forceSelection !== void 0 || f ? qr(
2124
+ const u = (J = n.calendar) == null ? void 0 : J.tz, f = i.definition !== void 0, d = i.forceSelection !== void 0 || f ? Lr(
2189
2125
  i.forceSelection ?? s.forceSelection,
2190
2126
  c,
2191
2127
  u
2192
- ) : s.forceSelection ? !0 : void 0, h = (Array.isArray(e.inputs) ? e.inputs : []).filter((M) => M.id !== s.id), v = i.variableName !== void 0 ? rn(i.variableName, [
2193
- ...h,
2194
- ...r.inputs.filter((M) => M.input.id !== s.id).map((M) => M.input)
2195
- ]) : s.variableName, b = f && (l.title || l.column) !== (c.title || c.column), m = i.label ?? (b ? c.title || c.column || c.id : void 0), y = f && l.hide !== c.hide, C = f && l.toolbarWidth !== c.toolbarWidth, D = (M) => {
2196
- var Ue, He;
2197
- const x = { ...M };
2198
- if (m !== void 0 && (x.label = m), i.variableName !== void 0 && (x.variableName = v), i.scope && (x.scope = i.scope), y || C) {
2199
- const be = Mt(c);
2200
- x.presentation = { ...M.presentation }, y && (x.presentation.placement = be.placement), C && (be.widthPx === void 0 ? delete x.presentation.widthPx : x.presentation.widthPx = be.widthPx);
2128
+ ) : s.forceSelection ? !0 : void 0, g = (Array.isArray(e.inputs) ? e.inputs : []).filter((x) => x.id !== s.id), v = i.variableName !== void 0 ? nn(i.variableName, [
2129
+ ...g,
2130
+ ...r.inputs.filter((x) => x.input.id !== s.id).map((x) => x.input)
2131
+ ]) : s.variableName, b = f && (l.title || l.column) !== (c.title || c.column), m = i.label ?? (b ? c.title || c.column || c.id : void 0), y = f && l.hide !== c.hide, C = f && l.toolbarWidth !== c.toolbarWidth, S = (x) => {
2132
+ var je, Ue;
2133
+ const I = { ...x };
2134
+ if (m !== void 0 && (I.label = m), i.variableName !== void 0 && (I.variableName = v), i.scope && (I.scope = i.scope), y || C) {
2135
+ const he = xt(c);
2136
+ I.presentation = { ...x.presentation }, y && (I.presentation.placement = he.placement), C && (he.widthPx === void 0 ? delete I.presentation.widthPx : I.presentation.widthPx = he.widthPx);
2201
2137
  }
2202
- return (i.forceSelection !== void 0 || f) && (d ? x.forceSelection = d : delete x.forceSelection), i.requiredAtExecution !== void 0 && (i.requiredAtExecution ? x.requiredAtExecution = !0 : delete x.requiredAtExecution), Ie(x, "optionSource", i.optionSource), Ie(x, "optionDependencies", i.optionDependencies), Ie(x, "optionPopulation", i.optionPopulation), ((Ue = i.mapping) == null ? void 0 : Ue.kind) === "save" && i.mapping.draft.acceptance.ok ? x.application = i.mapping.draft.acceptance.application : ((He = i.mapping) == null ? void 0 : He.kind) === "remove" && delete x.application, x;
2203
- }, w = i.label !== void 0 && i.label !== s.label && i.label !== c.title ? i.label : void 0, F = f || i.variableName !== void 0 || w !== void 0, S = (M) => ({
2204
- ...M,
2138
+ return (i.forceSelection !== void 0 || f) && (d ? I.forceSelection = d : delete I.forceSelection), i.requiredAtExecution !== void 0 && (i.requiredAtExecution ? I.requiredAtExecution = !0 : delete I.requiredAtExecution), ve(I, "optionSource", i.optionSource), ve(I, "optionDependencies", i.optionDependencies), ve(I, "optionPopulation", i.optionPopulation), ((je = i.mapping) == null ? void 0 : je.kind) === "save" && i.mapping.draft.acceptance.ok ? I.application = i.mapping.draft.acceptance.application : ((Ue = i.mapping) == null ? void 0 : Ue.kind) === "remove" && delete I.application, I;
2139
+ }, w = i.label !== void 0 && i.label !== s.label && i.label !== c.title ? i.label : void 0, p = f || i.variableName !== void 0 || w !== void 0, h = (x) => ({
2140
+ ...x,
2205
2141
  ...i.variableName !== void 0 ? { variableName: v } : {},
2206
2142
  ...w !== void 0 ? { title: w } : {}
2207
- }), E = Array.isArray(e.inputs) ? [...e.inputs] : [], p = E.findIndex((M) => M.id === s.id), g = E[p];
2208
- if (p < 0 || (g == null ? void 0 : g.kind) !== "filter" || !g.filter)
2143
+ }), F = Array.isArray(e.inputs) ? [...e.inputs] : [], D = F.findIndex((x) => x.id === s.id), T = F[D];
2144
+ if (D < 0 || (T == null ? void 0 : T.kind) !== "filter" || !T.filter)
2209
2145
  return o("This filter can not be edited here.");
2210
- const I = D(
2211
- F ? {
2212
- ...g,
2213
- filter: S(c)
2214
- } : g
2146
+ const V = S(
2147
+ p ? {
2148
+ ...T,
2149
+ filter: h(c)
2150
+ } : T
2215
2151
  );
2216
- f && (I.exports = St(c)), E[p] = I;
2217
- const R = _e({
2218
- inputs: [I],
2152
+ f && (V.exports = It(c)), F[D] = V;
2153
+ const N = Pe({
2154
+ inputs: [V],
2219
2155
  dashboardFilters: []
2220
2156
  });
2221
- if (!R.ok)
2157
+ if (!N.ok)
2222
2158
  return o(
2223
- ((Z = R.issues[0]) == null ? void 0 : Z.message) ?? "These settings could not be saved.",
2224
- R.issues[0]
2159
+ ((Be = N.issues[0]) == null ? void 0 : Be.message) ?? "These settings could not be saved.",
2160
+ N.issues[0]
2225
2161
  );
2226
- let O = { ...e, inputs: E };
2227
- const Q = q(O), V = Q.findFilterInput({ filterId: c.id });
2228
- if (!V)
2162
+ let O = { ...e, inputs: F };
2163
+ const H = $(O), M = H.findFilterInput({ filterId: c.id });
2164
+ if (!M)
2229
2165
  return o(
2230
- ((ee = Q.issues[0]) == null ? void 0 : ee.message) ?? "These settings could not be saved."
2166
+ ((Ke = H.issues[0]) == null ? void 0 : Ke.message) ?? "These settings could not be saved."
2231
2167
  );
2232
- const U = i.variableName !== void 0 || i.scope !== void 0 ? Ur(O, V.input) : void 0;
2233
- if (U)
2168
+ const k = i.variableName !== void 0 || i.scope !== void 0 ? jr(O, M.input) : void 0;
2169
+ if (k)
2234
2170
  return o(
2235
- `Another filter on the same cards is already named "${U}". Choose another name.`
2171
+ `Another filter on the same cards is already named "${k}". Choose another name.`
2236
2172
  );
2237
- const B = [], T = {
2238
- id: V.input.id,
2239
- runtimeScope: V.input.runtimeScope
2173
+ const B = [], q = {
2174
+ id: M.input.id,
2175
+ runtimeScope: M.input.runtimeScope
2240
2176
  };
2241
- let A = {
2177
+ let E = {
2242
2178
  defaultInputValues: O.defaultInputValues,
2243
2179
  dashboardInputValues: {}
2244
2180
  };
2245
- const Y = ((te = i.values) == null ? void 0 : te.target) ?? {}, P = Wr(
2181
+ const re = ((Le = i.values) == null ? void 0 : Le.target) ?? {}, P = Gr(
2246
2182
  l,
2247
2183
  c,
2248
2184
  {
2249
- defaultValueChanged: ($e = i.values) == null ? void 0 : $e.defaultChanged,
2250
- selectionIdentityChanged: (ze = i.values) == null ? void 0 : ze.selectionIdentityChanged,
2251
- ...((je = i.values) == null ? void 0 : je.defaultComparisonSelection) !== void 0 ? {
2185
+ defaultValueChanged: (qe = i.values) == null ? void 0 : qe.defaultChanged,
2186
+ selectionIdentityChanged: ($e = i.values) == null ? void 0 : $e.selectionIdentityChanged,
2187
+ ...((ze = i.values) == null ? void 0 : ze.defaultComparisonSelection) !== void 0 ? {
2252
2188
  defaultComparisonChanged: !0,
2253
2189
  defaultComparisonSelection: i.values.defaultComparisonSelection ?? void 0
2254
2190
  } : {}
2255
2191
  },
2256
- Y,
2192
+ re,
2257
2193
  n.calendar ?? void 0
2258
2194
  );
2259
2195
  if (P.defaultValueChanged || P.selectionIdentityChanged || P.defaultComparisonChanged) {
2260
- const M = Wt({
2261
- state: { ...A, dashboardInputValues: {} },
2262
- input: T,
2196
+ const x = Ht({
2197
+ state: { ...E, dashboardInputValues: {} },
2198
+ input: q,
2263
2199
  settings: P
2264
2200
  });
2265
- A = { ...A, defaultInputValues: M.defaultInputValues }, P.selectionIdentityChanged && B.push({
2201
+ E = { ...E, defaultInputValues: x.defaultInputValues }, P.selectionIdentityChanged && B.push({
2266
2202
  kind: "clear",
2267
- inputId: T.id,
2203
+ inputId: q.id,
2268
2204
  target: P.target
2269
2205
  }), P.defaultValueChanged && B.push({
2270
2206
  kind: "resetToDefault",
2271
- inputId: T.id,
2207
+ inputId: q.id,
2272
2208
  target: P.target,
2273
2209
  ...P.defaultFilterValue ? { filterValue: P.defaultFilterValue } : {}
2274
2210
  }), P.defaultComparisonChanged && B.push({
2275
2211
  kind: "setDefaultComparison",
2276
- inputId: T.id,
2212
+ inputId: q.id,
2277
2213
  target: P.target
2278
2214
  });
2279
2215
  }
2280
- if (i.scope && V.input.runtimeScope !== "shared") {
2281
- const M = Hr(
2216
+ if (i.scope && M.input.runtimeScope !== "shared") {
2217
+ const x = Ur(
2282
2218
  O,
2283
2219
  s,
2284
- V.input,
2285
- A.defaultInputValues
2220
+ M.input,
2221
+ E.defaultInputValues
2286
2222
  );
2287
- A = {
2288
- ...A,
2289
- defaultInputValues: M.defaultInputValues
2223
+ E = {
2224
+ ...E,
2225
+ defaultInputValues: x.defaultInputValues
2290
2226
  }, B.push(
2291
- ...M.dropped.map((x) => ({
2227
+ ...x.dropped.map((I) => ({
2292
2228
  kind: "dropTargetSlot",
2293
- inputId: T.id,
2294
- target: x
2229
+ inputId: q.id,
2230
+ target: I
2295
2231
  }))
2296
2232
  );
2297
2233
  }
2298
- return O = Gr(O, A), {
2234
+ return O = Hr(O, E), {
2299
2235
  ok: !0,
2300
2236
  dashboard: O,
2301
- inputId: V.input.id,
2237
+ inputId: M.input.id,
2302
2238
  valueEffects: B
2303
2239
  };
2304
2240
  }
2305
- function To(e) {
2306
- let t = Ye({
2241
+ function So(e) {
2242
+ let t = We({
2307
2243
  dashboard: e.before,
2308
2244
  runtimeValues: e.dashboardInputValues,
2309
2245
  calendar: e.calendar
2310
2246
  });
2311
- const i = q(e.after), n = (r) => {
2247
+ const i = $(e.after), n = (r) => {
2312
2248
  var a;
2313
2249
  return (a = i.findFilterInput({ inputId: r })) == null ? void 0 : a.input;
2314
2250
  };
@@ -2319,7 +2255,7 @@ function To(e) {
2319
2255
  case "setDefaultComparison": {
2320
2256
  const a = n(r.inputId);
2321
2257
  if (!a) break;
2322
- t = Wt({
2258
+ t = Ht({
2323
2259
  state: { dashboardInputValues: t },
2324
2260
  input: a,
2325
2261
  settings: {
@@ -2335,7 +2271,7 @@ function To(e) {
2335
2271
  case "dropTargetSlot": {
2336
2272
  const a = n(r.inputId);
2337
2273
  if (!a) break;
2338
- t = Ae(
2274
+ t = Te(
2339
2275
  t,
2340
2276
  a,
2341
2277
  r.target
@@ -2343,22 +2279,22 @@ function To(e) {
2343
2279
  break;
2344
2280
  }
2345
2281
  }
2346
- return Ye({
2282
+ return We({
2347
2283
  dashboard: e.after,
2348
2284
  runtimeValues: t,
2349
2285
  calendar: e.calendar
2350
2286
  });
2351
2287
  }
2352
- function jr(e) {
2288
+ function zr(e) {
2353
2289
  var t;
2354
2290
  return e.kind !== "documentSections" && (e.kind !== "allSheets" || ((t = e.sheetKinds) == null ? void 0 : t.length) === 1 && e.sheetKinds[0] === "dashboard");
2355
2291
  }
2356
- function Ie(e, t, i) {
2292
+ function ve(e, t, i) {
2357
2293
  i !== void 0 && (i === null ? delete e[t] : e[t] = i);
2358
2294
  }
2359
- function Ur(e, t) {
2295
+ function jr(e, t) {
2360
2296
  const i = [
2361
- ...q(e).inputs.map((r) => r.input),
2297
+ ...$(e).inputs.map((r) => r.input),
2362
2298
  ...(Array.isArray(e.inputs) ? e.inputs : []).filter(
2363
2299
  (r) => r.kind === "control"
2364
2300
  )
@@ -2366,21 +2302,21 @@ function Ur(e, t) {
2366
2302
  (r) => r.id !== t.id && r.variableName === t.variableName
2367
2303
  );
2368
2304
  if (!i.length) return;
2369
- const n = et(e, t);
2305
+ const n = Xe(e, t);
2370
2306
  return i.some(
2371
- (r) => [...et(e, r)].some(
2307
+ (r) => [...Xe(e, r)].some(
2372
2308
  (a) => n.has(a)
2373
2309
  )
2374
2310
  ) ? t.variableName : void 0;
2375
2311
  }
2376
- function Hr(e, t, i, n) {
2312
+ function Ur(e, t, i, n) {
2377
2313
  var u, f;
2378
- const r = [], a = Tt(e), o = (d) => lt(t, d, a), s = (d) => lt(i, d, a), l = [];
2314
+ const r = [], a = Mt(e), o = (d) => ot(t, d, a), s = (d) => ot(i, d, a), l = [];
2379
2315
  if (i.runtimeScope === "perSheet")
2380
2316
  for (const d of a.values())
2381
2317
  l.push({ sheetId: d.sheetId, sheetKind: d.sheetKind });
2382
2318
  else if (i.runtimeScope === "perCard")
2383
- for (const d of pe(e))
2319
+ for (const d of de(e))
2384
2320
  l.push({
2385
2321
  sheetId: d.sheetId,
2386
2322
  cardId: d.cardId,
@@ -2388,65 +2324,65 @@ function Hr(e, t, i, n) {
2388
2324
  });
2389
2325
  else if (i.runtimeScope === "perDocumentSection")
2390
2326
  for (const d of e.sheets ?? [])
2391
- for (const h of ((f = d.document) == null ? void 0 : f.sections) ?? [])
2327
+ for (const g of ((f = d.document) == null ? void 0 : f.sections) ?? [])
2392
2328
  l.push({
2393
2329
  sheetId: d.id,
2394
- sectionId: h.id,
2330
+ sectionId: g.id,
2395
2331
  sheetKind: "document"
2396
2332
  });
2397
2333
  let c = n;
2398
2334
  for (const d of l) {
2399
2335
  if (s(d)) continue;
2400
- const h = !!(c && Ne(c, i, d));
2401
- if (h && (c = Ae(c, i, d)), h || o(d)) {
2336
+ const g = !!(c && we(c, i, d));
2337
+ if (g && (c = Te(c, i, d)), g || o(d)) {
2402
2338
  const { sheetKind: v, ...b } = d;
2403
2339
  r.push(b);
2404
2340
  }
2405
2341
  }
2406
2342
  return { defaultInputValues: c, dropped: r };
2407
2343
  }
2408
- function lt(e, t, i) {
2344
+ function ot(e, t, i) {
2409
2345
  if (e.runtimeScope === "perSheet" && t.sheetId && !t.cardId && !t.sectionId) {
2410
2346
  const n = i.get(t.sheetId);
2411
- return n ? wt(e, n) : !1;
2347
+ return n ? Dt(e, n) : !1;
2412
2348
  }
2413
- return cn(e, t);
2349
+ return ln(e, t);
2414
2350
  }
2415
- function Gr(e, t) {
2351
+ function Hr(e, t) {
2416
2352
  const i = { ...e };
2417
2353
  return t.defaultInputValues && Object.keys(t.defaultInputValues).length ? i.defaultInputValues = t.defaultInputValues : e.defaultInputValues !== void 0 && delete i.defaultInputValues, i;
2418
2354
  }
2419
- function Wr(e, t, i, n, r) {
2420
- const a = !!(i != null && i.defaultValueChanged || i != null && i.selectionIdentityChanged) || ln(e, t);
2355
+ function Gr(e, t, i, n, r) {
2356
+ const a = !!(i != null && i.defaultValueChanged || i != null && i.selectionIdentityChanged) || sn(e, t);
2421
2357
  return {
2422
2358
  ...i,
2423
2359
  target: (i == null ? void 0 : i.target) ?? n,
2424
2360
  defaultValueChanged: a,
2425
- defaultFilterValue: a ? H(t, r) : void 0
2361
+ defaultFilterValue: a ? G(t, r) : void 0
2426
2362
  };
2427
2363
  }
2428
- function Wt(e) {
2364
+ function Ht(e) {
2429
2365
  const { settings: t } = e;
2430
2366
  if (!t) return e.state;
2431
2367
  const i = e.input;
2432
2368
  let n = e.state.dashboardInputValues, r = e.state.defaultInputValues;
2433
- if (t.selectionIdentityChanged && (n = Je(
2369
+ if (t.selectionIdentityChanged && (n = Qe(
2434
2370
  n,
2435
2371
  i,
2436
2372
  t.target,
2437
2373
  { status: "cleared" }
2438
2374
  )), t.defaultValueChanged) {
2439
- const a = Ne(
2375
+ const a = we(
2440
2376
  r,
2441
2377
  i,
2442
2378
  t.target
2443
2379
  );
2444
- let o = Ae(
2380
+ let o = Te(
2445
2381
  r || {},
2446
2382
  i,
2447
2383
  t.target
2448
2384
  );
2449
- t.defaultFilterValue ? o = Xe(
2385
+ t.defaultFilterValue ? o = Ye(
2450
2386
  o,
2451
2387
  i,
2452
2388
  t.target,
@@ -2458,12 +2394,12 @@ function Wt(e) {
2458
2394
  },
2459
2395
  ...a != null && a.comparisonSelection ? { comparisonSelection: a.comparisonSelection } : {}
2460
2396
  }
2461
- ) : a != null && a.comparisonSelection && (o = Xe(
2397
+ ) : a != null && a.comparisonSelection && (o = Ye(
2462
2398
  o,
2463
2399
  i,
2464
2400
  t.target,
2465
2401
  { comparisonSelection: a.comparisonSelection }
2466
- )), r = Object.keys(o).length ? o : void 0, n = Je(
2402
+ )), r = Object.keys(o).length ? o : void 0, n = Qe(
2467
2403
  n,
2468
2404
  i,
2469
2405
  t.target,
@@ -2476,12 +2412,12 @@ function Wt(e) {
2476
2412
  } : { status: "cleared" }
2477
2413
  );
2478
2414
  }
2479
- return t.defaultComparisonChanged && (r = Ze(
2415
+ return t.defaultComparisonChanged && (r = Je(
2480
2416
  r || {},
2481
2417
  i,
2482
2418
  t.target,
2483
2419
  t.defaultComparisonSelection
2484
- ), Object.keys(r).length || (r = void 0), n = Ze(
2420
+ ), Object.keys(r).length || (r = void 0), n = Je(
2485
2421
  n,
2486
2422
  i,
2487
2423
  t.target,
@@ -2492,57 +2428,57 @@ function Wt(e) {
2492
2428
  defaultInputValues: r
2493
2429
  };
2494
2430
  }
2495
- const j = (e) => Array.isArray(e.inputs) ? e.inputs : [];
2496
- function ge(e, t) {
2497
- const i = j(e).find((n) => n.id === t);
2431
+ const U = (e) => Array.isArray(e.inputs) ? e.inputs : [];
2432
+ function pe(e, t) {
2433
+ const i = U(e).find((n) => n.id === t);
2498
2434
  if (!i || i.kind !== "filter")
2499
- throw new N("filter_not_found", `No filter ${t} on this dashboard.`, "Read the outline again and use its filter ids.");
2435
+ throw new A("filter_not_found", `No filter ${t} on this dashboard.`, "Read the outline again and use its filter ids.");
2500
2436
  return i;
2501
2437
  }
2502
- function Qt(e, t) {
2438
+ function Gt(e, t) {
2503
2439
  var i;
2504
- return (i = pe(e).find((n) => n.cardId === t)) == null ? void 0 : i.card.title;
2440
+ return (i = de(e).find((n) => n.cardId === t)) == null ? void 0 : i.card.title;
2505
2441
  }
2506
- function Qr(e, t, i) {
2507
- const n = q(e), r = n.findFilterInput({ inputId: t });
2442
+ function Wr(e, t, i) {
2443
+ const n = $(e), r = n.findFilterInput({ inputId: t });
2508
2444
  return r ? n.reachedCards({ inputId: t }).filter(
2509
2445
  (a) => ["bound", "automatic", "sql", "relationshipApplied"].includes(
2510
- Pi(r.input, a.card, i).reach
2446
+ Ti(r.input, a.card, i).reach
2511
2447
  )
2512
2448
  ).length : 0;
2513
2449
  }
2514
- function Yr(e, t) {
2515
- const i = q(e), n = i.findFilterInput({ inputId: t });
2516
- return n ? i.reachedCards({ inputId: t }).filter((r) => Oi(n.input, r.card) === "relationship").length : 0;
2450
+ function Qr(e, t) {
2451
+ const i = $(e), n = i.findFilterInput({ inputId: t });
2452
+ return n ? i.reachedCards({ inputId: t }).filter((r) => wi(n.input, r.card) === "relationship").length : 0;
2517
2453
  }
2518
- function Yt(e, t) {
2454
+ function Wt(e, t) {
2519
2455
  if (t.scope.kind === "allSheets") return "every sheet";
2520
2456
  if (t.scope.kind !== "sheets") return "its cards";
2521
- const i = [...Tt(e).values()].filter((n) => wt(t, n));
2522
- return Pt(i.map((n) => {
2457
+ const i = [...Mt(e).values()].filter((n) => Dt(t, n));
2458
+ return Tt(i.map((n) => {
2523
2459
  var r, a;
2524
2460
  return ((a = (r = e.sheets) == null ? void 0 : r.find((o) => o.id === n.sheetId)) == null ? void 0 : a.title) ?? n.sheetId;
2525
2461
  }));
2526
2462
  }
2527
- const Jt = (e) => {
2463
+ const Qt = (e) => {
2528
2464
  var t;
2529
2465
  return ((t = e.filter) == null ? void 0 : t.type) === "single" ? "single select" : "multi select";
2530
2466
  };
2531
- function Xt(e) {
2467
+ function Yt(e) {
2532
2468
  var t, i, n;
2533
2469
  if ((i = (t = e.filter) == null ? void 0 : t.defaultValues) != null && i.length) return `default ${e.filter.defaultValues.join(", ")}`;
2534
2470
  if ((n = e.filter) != null && n.defaultDateFilter) return "a default period";
2535
2471
  }
2536
- function se(e) {
2537
- return Oe.plain("filter", e);
2472
+ function ne(e) {
2473
+ return De.plain("filter", e);
2538
2474
  }
2539
- function Jr(e, t) {
2540
- const { input: i } = t, n = j(e);
2475
+ function Yr(e, t) {
2476
+ const { input: i } = t, n = U(e);
2541
2477
  if (n.some((l) => l.id === i.id))
2542
- throw new N("filter_id_taken", `A filter with id ${i.id} is already on this dashboard.`);
2543
- if (q(e).findFilterInput({ filterId: i.filter.id }))
2544
- throw new N("filter_id_taken", `A filter definition with id ${i.filter.id} is already on this dashboard.`);
2545
- const r = { ...e, inputs: [...n, i] }, a = Qr(r, i.id), o = Yr(r, i.id), s = [Jt(i), Xt(i)].filter(Boolean).join(", ");
2478
+ throw new A("filter_id_taken", `A filter with id ${i.id} is already on this dashboard.`);
2479
+ if ($(e).findFilterInput({ filterId: i.filter.id }))
2480
+ throw new A("filter_id_taken", `A filter definition with id ${i.filter.id} is already on this dashboard.`);
2481
+ const r = { ...e, inputs: [...n, i] }, a = Wr(r, i.id), o = Qr(r, i.id), s = [Qt(i), Yt(i)].filter(Boolean).join(", ");
2546
2482
  return {
2547
2483
  dashboard: r,
2548
2484
  created: [
@@ -2554,99 +2490,99 @@ function Jr(e, t) {
2554
2490
  }
2555
2491
  ],
2556
2492
  clauses: [
2557
- se(
2558
- `adds the filter ${$(i.label)} (${s}) to ${Yt(r, i)}; it filters ${a} card${a === 1 ? "" : "s"}${o ? ` and may filter ${o} more through the domain's relationships` : ""}`
2493
+ ne(
2494
+ `adds the filter ${z(i.label)} (${s}) to ${Wt(r, i)}; it filters ${a} card${a === 1 ? "" : "s"}${o ? ` and may filter ${o} more through the domain's relationships` : ""}`
2559
2495
  )
2560
2496
  ]
2561
2497
  };
2562
2498
  }
2563
- function Xr(e, t, i) {
2564
- const n = zr(e, { inputId: t.filterId }, t.settings, {
2499
+ function Jr(e, t, i) {
2500
+ const n = $r(e, { inputId: t.filterId }, t.settings, {
2565
2501
  calendar: i.calendar
2566
2502
  });
2567
2503
  if (!n.ok) {
2568
2504
  const [o] = n.issues;
2569
- throw new N(
2505
+ throw new A(
2570
2506
  (o == null ? void 0 : o.code) === "inputNotFound" ? "filter_not_found" : "filter_invalid",
2571
2507
  (o == null ? void 0 : o.message) ?? "These filter settings could not be saved.",
2572
2508
  (o == null ? void 0 : o.code) === "inputNotFound" ? "Read the outline again and use its filter ids." : "Change the filter settings and propose again.",
2573
2509
  { issues: n.issues }
2574
2510
  );
2575
2511
  }
2576
- const r = j(e).find((o) => o.id === n.inputId), a = j(n.dashboard).find((o) => o.id === n.inputId);
2512
+ const r = U(e).find((o) => o.id === n.inputId), a = U(n.dashboard).find((o) => o.id === n.inputId);
2577
2513
  return {
2578
2514
  dashboard: n.dashboard,
2579
2515
  runtimeEffects: [{ kind: "filter_value", effects: n.valueEffects }],
2580
- clauses: [se(`changes the filter ${$((r == null ? void 0 : r.label) ?? a.label)}: ${Zr(n.dashboard, r, a)}`)]
2516
+ clauses: [ne(`changes the filter ${z((r == null ? void 0 : r.label) ?? a.label)}: ${Xr(n.dashboard, r, a)}`)]
2581
2517
  };
2582
2518
  }
2583
- function Zr(e, t, i) {
2519
+ function Xr(e, t, i) {
2584
2520
  var o, s, l, c, u, f;
2585
2521
  if (!t) return "updates its settings";
2586
2522
  const n = [];
2587
- t.label !== i.label && n.push(`renames it ${$(i.label)}`), (((o = t.filter) == null ? void 0 : o.type) ?? "multiple") !== (((s = i.filter) == null ? void 0 : s.type) ?? "multiple") && n.push(`makes it ${Jt(i)}`);
2523
+ t.label !== i.label && n.push(`renames it ${z(i.label)}`), (((o = t.filter) == null ? void 0 : o.type) ?? "multiple") !== (((s = i.filter) == null ? void 0 : s.type) ?? "multiple") && n.push(`makes it ${Qt(i)}`);
2588
2524
  const r = JSON.stringify([((l = t.filter) == null ? void 0 : l.defaultValues) ?? null, ((c = t.filter) == null ? void 0 : c.defaultDateFilter) ?? null]), a = JSON.stringify([((u = i.filter) == null ? void 0 : u.defaultValues) ?? null, ((f = i.filter) == null ? void 0 : f.defaultDateFilter) ?? null]);
2589
2525
  if (r !== a) {
2590
- const d = Xt(i);
2526
+ const d = Yt(i);
2591
2527
  n.push(d ? `sets its ${d.replace(/^default /, "default to ").replace(/^a default period$/, "default period")}` : "removes its default");
2592
2528
  }
2593
- return JSON.stringify(t.scope) !== JSON.stringify(i.scope) && n.push(`applies it to ${Yt(e, i)}`), n.length ? Pt(n) : "keeps its settings";
2529
+ return JSON.stringify(t.scope) !== JSON.stringify(i.scope) && n.push(`applies it to ${Wt(e, i)}`), n.length ? Tt(n) : "keeps its settings";
2594
2530
  }
2595
- function ea(e, t) {
2596
- const i = ge(e, t);
2531
+ function Zr(e, t) {
2532
+ const i = pe(e, t);
2597
2533
  return {
2598
2534
  dashboard: {
2599
2535
  ...e,
2600
- inputs: j(e).filter((r) => r.id !== t),
2601
- defaultInputValues: dn(e.defaultInputValues, t)
2536
+ inputs: U(e).filter((r) => r.id !== t),
2537
+ defaultInputValues: un(e.defaultInputValues, t)
2602
2538
  },
2603
2539
  runtimeEffects: [{ kind: "input_removed", inputId: t }],
2604
- clauses: [se(`removes the filter ${$(i.label)}`)]
2540
+ clauses: [ne(`removes the filter ${z(i.label)}`)]
2605
2541
  };
2606
2542
  }
2607
- function ta(e, t, i) {
2543
+ function ea(e, t, i) {
2608
2544
  var o;
2609
- if (!pe(e).some((s) => s.cardId === i))
2610
- throw new N("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
2611
- const n = fn(t.scope, i);
2545
+ if (!de(e).some((s) => s.cardId === i))
2546
+ throw new A("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
2547
+ const n = dn(t.scope, i);
2612
2548
  if (!n)
2613
- throw new N(
2549
+ throw new A(
2614
2550
  "filter_invalid",
2615
2551
  "This filter applies to Document sections, so it can't leave out one card.",
2616
2552
  "Change it in the editor."
2617
2553
  );
2618
- const r = { ...t, scope: n }, a = _e({ inputs: [r], dashboardFilters: [] });
2554
+ const r = { ...t, scope: n }, a = Pe({ inputs: [r], dashboardFilters: [] });
2619
2555
  if (!a.ok)
2620
- throw new N("filter_invalid", ((o = a.issues[0]) == null ? void 0 : o.message) ?? "This filter could not be saved.", "Change it in the editor.");
2556
+ throw new A("filter_invalid", ((o = a.issues[0]) == null ? void 0 : o.message) ?? "This filter could not be saved.", "Change it in the editor.");
2621
2557
  return {
2622
2558
  ...e,
2623
- inputs: j(e).map((s) => s.id === t.id ? r : s)
2559
+ inputs: U(e).map((s) => s.id === t.id ? r : s)
2624
2560
  };
2625
2561
  }
2626
- function Zt(e, t, i, n, r) {
2562
+ function Jt(e, t, i, n, r) {
2627
2563
  var u, f;
2628
- const a = ge(e, t);
2629
- if (!pe(e).some((d) => d.cardId === i))
2630
- throw new N("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
2564
+ const a = pe(e, t);
2565
+ if (!de(e).some((d) => d.cardId === i))
2566
+ throw new A("card_not_found", `No card ${i} on this dashboard.`, "Read the outline again and use its card ids.");
2631
2567
  const o = [...((u = a.application) == null ? void 0 : u.cards) ?? []], s = o.findIndex((d) => d.cardId === i);
2632
2568
  s >= 0 ? o[s] = n : o.push(n);
2633
2569
  const l = {
2634
2570
  ...a,
2635
2571
  ...r ? { scope: r } : {},
2636
2572
  application: { ...a.application ?? { kind: "cardMappings" }, cards: o }
2637
- }, c = _e({ inputs: [l], dashboardFilters: [] });
2573
+ }, c = Pe({ inputs: [l], dashboardFilters: [] });
2638
2574
  if (!c.ok)
2639
- throw new N(
2575
+ throw new A(
2640
2576
  "filter_invalid",
2641
2577
  ((f = c.issues[0]) == null ? void 0 : f.message) ?? "This filter mapping could not be saved.",
2642
2578
  "Change the mapping and propose again."
2643
2579
  );
2644
2580
  return {
2645
2581
  ...e,
2646
- inputs: j(e).map((d) => d.id === t ? l : d)
2582
+ inputs: U(e).map((d) => d.id === t ? l : d)
2647
2583
  };
2648
2584
  }
2649
- function ia(e) {
2585
+ function ta(e) {
2650
2586
  switch (e.kind) {
2651
2587
  case "field":
2652
2588
  return `by ${e.field.name}`;
@@ -2656,34 +2592,34 @@ function ia(e) {
2656
2592
  return String(e.kind);
2657
2593
  }
2658
2594
  }
2659
- function na(e, t) {
2660
- const i = ge(e, t.filterId), n = { ...t.binding, kind: "bound", cardId: t.cardId }, r = un(i.scope, t.cardId), a = r !== i.scope;
2595
+ function ia(e, t) {
2596
+ const i = pe(e, t.filterId), n = { ...t.binding, kind: "bound", cardId: t.cardId }, r = cn(i.scope, t.cardId), a = r !== i.scope;
2661
2597
  return {
2662
- dashboard: Zt(e, t.filterId, t.cardId, n, a ? r : void 0),
2598
+ dashboard: Jt(e, t.filterId, t.cardId, n, a ? r : void 0),
2663
2599
  clauses: [
2664
- se(
2665
- `makes ${$(i.label)} filter ${$(Qt(e, t.cardId))} ${ia(n.target)}${a ? ", which it used to leave out" : ""}`
2600
+ ne(
2601
+ `makes ${z(i.label)} filter ${z(Gt(e, t.cardId))} ${ta(n.target)}${a ? ", which it used to leave out" : ""}`
2666
2602
  )
2667
2603
  ]
2668
2604
  };
2669
2605
  }
2670
- function ra(e, t) {
2606
+ function na(e, t) {
2671
2607
  var r;
2672
- const i = ge(e, t.filterId);
2608
+ const i = pe(e, t.filterId);
2673
2609
  return {
2674
- dashboard: ((r = i.filter) == null ? void 0 : r.kind) === "global-date" ? ta(e, i, t.cardId) : Zt(e, t.filterId, t.cardId, { kind: "excluded", cardId: t.cardId }),
2675
- clauses: [se(`stops ${$(i.label)} from filtering ${$(Qt(e, t.cardId))}`)]
2610
+ dashboard: ((r = i.filter) == null ? void 0 : r.kind) === "global-date" ? ea(e, i, t.cardId) : Jt(e, t.filterId, t.cardId, { kind: "excluded", cardId: t.cardId }),
2611
+ clauses: [ne(`stops ${z(i.label)} from filtering ${z(Gt(e, t.cardId))}`)]
2676
2612
  };
2677
2613
  }
2678
- function wo(e, t, i) {
2614
+ function Mo(e, t, i) {
2679
2615
  let n = e;
2680
2616
  const r = [], a = [], o = [];
2681
2617
  for (const [s, l] of t.entries()) {
2682
2618
  let c;
2683
2619
  try {
2684
- c = aa(n, l, i);
2620
+ c = ra(n, l, i);
2685
2621
  } catch (u) {
2686
- if (!(u instanceof N)) throw u;
2622
+ if (!(u instanceof A)) throw u;
2687
2623
  return {
2688
2624
  ok: !1,
2689
2625
  failedAt: {
@@ -2698,33 +2634,33 @@ function wo(e, t, i) {
2698
2634
  }
2699
2635
  n = c.dashboard, r.push(...c.created ?? []), a.push(...c.runtimeEffects ?? []), o.push({ index: s, changeIndex: l.changeIndex, clauses: c.clauses });
2700
2636
  }
2701
- return { ok: !0, dashboard: n, created: r, descriptions: oa(o), runtimeEffects: a };
2637
+ return { ok: !0, dashboard: n, created: r, descriptions: aa(o), runtimeEffects: a };
2702
2638
  }
2703
- function aa(e, t, i) {
2639
+ function ra(e, t, i) {
2704
2640
  switch (t.op) {
2705
2641
  case "card.add":
2706
- return hn(e, t);
2642
+ return pn(e, t);
2707
2643
  case "card.remove":
2708
- return pn(e, t.cardId);
2644
+ return mn(e, t.cardId);
2709
2645
  case "card.update":
2710
- return mn(e, t.cardId, t.update);
2646
+ return fn(e, t.cardId, t.update);
2711
2647
  case "layout.arrange":
2712
- return Rr(e, t);
2648
+ return Er(e, t);
2713
2649
  case "frame.commit":
2714
- return Lr(e, t.commit);
2650
+ return Kr(e, t.commit);
2715
2651
  case "filter.add":
2716
- return Jr(e, t);
2652
+ return Yr(e, t);
2717
2653
  case "filter.update":
2718
- return Xr(e, t, i);
2654
+ return Jr(e, t, i);
2719
2655
  case "filter.remove":
2720
- return ea(e, t.filterId);
2656
+ return Zr(e, t.filterId);
2721
2657
  case "filter.bind":
2722
- return na(e, t);
2658
+ return ia(e, t);
2723
2659
  case "filter.exclude":
2724
- return ra(e, t);
2660
+ return na(e, t);
2725
2661
  }
2726
2662
  }
2727
- function oa(e) {
2663
+ function aa(e) {
2728
2664
  const t = [];
2729
2665
  for (const i of e) {
2730
2666
  const n = i.changeIndex === void 0 ? void 0 : t.find((r) => r.changeIndex === i.changeIndex);
@@ -2741,21 +2677,21 @@ function oa(e) {
2741
2677
  }
2742
2678
  return t.map(({ clauses: i, ...n }) => ({
2743
2679
  ...n,
2744
- sentence: yn(sa(i))
2680
+ sentence: hn(oa(i))
2745
2681
  }));
2746
2682
  }
2747
- function sa(e) {
2683
+ function oa(e) {
2748
2684
  let t = !1;
2749
2685
  return e.filter((i) => i.kind !== "detached" ? !0 : t ? !1 : (t = !0, !0));
2750
2686
  }
2751
- function ct(e) {
2687
+ function st(e) {
2752
2688
  return Object.fromEntries(
2753
2689
  Object.entries(e).filter(
2754
2690
  (t) => typeof t[1] == "string" && t[1].length > 0
2755
2691
  )
2756
2692
  );
2757
2693
  }
2758
- function re(e) {
2694
+ function ee(e) {
2759
2695
  return e.kind === "semantic" ? [
2760
2696
  e.kind,
2761
2697
  e.domainId,
@@ -2770,18 +2706,18 @@ function re(e) {
2770
2706
  e.tableName
2771
2707
  ].join(":");
2772
2708
  }
2773
- function la(e, t) {
2709
+ function sa(e, t) {
2774
2710
  if (e.kind === "semantic")
2775
2711
  return {
2776
2712
  status: "ready",
2777
- request: ct({
2713
+ request: st({
2778
2714
  connection_id: e.connectionId,
2779
2715
  domain_id: e.domainId,
2780
- dataset_id: Ri(e),
2716
+ dataset_id: Ni(e),
2781
2717
  dataset_name: e.datasetName
2782
2718
  })
2783
2719
  };
2784
- const i = Pn({
2720
+ const i = wn({
2785
2721
  source: e,
2786
2722
  capabilities: t
2787
2723
  });
@@ -2793,7 +2729,7 @@ function la(e, t) {
2793
2729
  message: `Source is missing required field-metadata coordinates: ${i.missing.join(", ")}.`
2794
2730
  } : {
2795
2731
  status: "ready",
2796
- request: ct({
2732
+ request: st({
2797
2733
  connection_id: e.connectionId,
2798
2734
  datamodel_id: "",
2799
2735
  database_name: i.coordinates.databaseName,
@@ -2802,14 +2738,14 @@ function la(e, t) {
2802
2738
  })
2803
2739
  };
2804
2740
  }
2805
- function Po(e, t = /* @__PURE__ */ new Map()) {
2741
+ function Do(e, t = /* @__PURE__ */ new Map()) {
2806
2742
  const i = /* @__PURE__ */ new Map();
2807
2743
  for (const { card: n } of e) {
2808
- const r = Ot(n), a = r.kind === "config" ? r.executableSources : r.kind === "sql" ? r.pinnedCatalogSources.map((o) => o.source) : [];
2744
+ const r = wt(n), a = r.kind === "config" ? r.executableSources : r.kind === "sql" ? r.pinnedCatalogSources.map((o) => o.source) : [];
2809
2745
  for (const o of a) {
2810
- const s = re(o);
2746
+ const s = ee(o);
2811
2747
  if (!i.has(s)) {
2812
- const l = la(
2748
+ const l = sa(
2813
2749
  o,
2814
2750
  o.connectionId ? t.get(o.connectionId) : void 0
2815
2751
  );
@@ -2823,7 +2759,7 @@ function Po(e, t = /* @__PURE__ */ new Map()) {
2823
2759
  }
2824
2760
  return Array.from(i.values());
2825
2761
  }
2826
- function ca(e, t) {
2762
+ function la(e, t) {
2827
2763
  if (e.kind !== "semantic" || !e.connectionId) return;
2828
2764
  const i = (t.qualifiedEntityName || "").split(".").map((r) => r.trim()).filter(Boolean), n = i.at(-1);
2829
2765
  if (n)
@@ -2835,48 +2771,48 @@ function ca(e, t) {
2835
2771
  ...i.length > 2 ? { databaseName: i.at(-3) } : {}
2836
2772
  };
2837
2773
  }
2838
- function ce(e, t) {
2774
+ function oe(e, t) {
2839
2775
  let i = e.get(t);
2840
2776
  return i || (i = { fields: /* @__PURE__ */ new Map(), fieldConflicts: /* @__PURE__ */ new Set() }, e.set(t, i)), i;
2841
2777
  }
2842
- function ei(e, t) {
2778
+ function Xt(e, t) {
2843
2779
  e.sourceLabel === void 0 ? e.sourceLabel = t : e.sourceLabel !== t && (e.sourceLabelConflict = !0);
2844
2780
  }
2845
- function Te(e, t, i) {
2781
+ function xe(e, t, i) {
2846
2782
  for (const n of t) {
2847
2783
  const r = n == null ? void 0 : n.trim();
2848
2784
  if (!r) continue;
2849
- const a = bt(r), o = e.fields.get(a);
2785
+ const a = gt(r), o = e.fields.get(a);
2850
2786
  o === void 0 ? e.fields.set(a, i) : o !== i && e.fieldConflicts.add(a);
2851
2787
  }
2852
2788
  }
2853
- function ti(e, t) {
2854
- t.sourceLabel && ei(e, t.sourceLabel), t.sourceLabelConflict && (e.sourceLabelConflict = !0);
2789
+ function Zt(e, t) {
2790
+ t.sourceLabel && Xt(e, t.sourceLabel), t.sourceLabelConflict && (e.sourceLabelConflict = !0);
2855
2791
  for (const [i, n] of t.fields)
2856
- Te(e, [i], n);
2792
+ xe(e, [i], n);
2857
2793
  for (const i of t.fieldConflicts ?? [])
2858
2794
  e.fieldConflicts.add(i);
2859
2795
  }
2860
- function ii(e) {
2796
+ function ei(e) {
2861
2797
  return e.kind === "semantic" && (e.label || e.datasetName || "").trim() || void 0;
2862
2798
  }
2863
- function Oo(e, t) {
2799
+ function To(e, t) {
2864
2800
  var n, r;
2865
2801
  const i = /* @__PURE__ */ new Map();
2866
2802
  for (const [a, o] of e) {
2867
2803
  if (o.status !== "ready") continue;
2868
- const s = t == null ? void 0 : t.get(a), l = s ? ii(s) : void 0;
2804
+ const s = t == null ? void 0 : t.get(a), l = s ? ei(s) : void 0;
2869
2805
  for (const c of o.columns) {
2870
- const u = (n = c.column_name) == null ? void 0 : n.trim(), f = (r = c.label) == null ? void 0 : r.trim(), d = s ? ca(s, c) : void 0;
2871
- d && l && ei(
2872
- ce(i, re(d)),
2806
+ const u = (n = c.column_name) == null ? void 0 : n.trim(), f = (r = c.label) == null ? void 0 : r.trim(), d = s ? la(s, c) : void 0;
2807
+ d && l && Xt(
2808
+ oe(i, ee(d)),
2873
2809
  l
2874
- ), !(!u || !f || f === u) && (Te(
2875
- ce(i, a),
2810
+ ), !(!u || !f || f === u) && (xe(
2811
+ oe(i, a),
2876
2812
  [u, c.sourceField],
2877
2813
  f
2878
- ), d && Te(
2879
- ce(i, re(d)),
2814
+ ), d && xe(
2815
+ oe(i, ee(d)),
2880
2816
  [c.sourceField, u],
2881
2817
  f
2882
2818
  ));
@@ -2884,56 +2820,56 @@ function Oo(e, t) {
2884
2820
  }
2885
2821
  return i;
2886
2822
  }
2887
- function Ao(...e) {
2823
+ function wo(...e) {
2888
2824
  const t = /* @__PURE__ */ new Map();
2889
2825
  for (const i of e)
2890
2826
  for (const [n, r] of i ?? [])
2891
- ti(ce(t, n), r);
2827
+ Zt(oe(t, n), r);
2892
2828
  return t;
2893
2829
  }
2894
- function Le(e) {
2830
+ function Ve(e) {
2895
2831
  return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
2896
2832
  }
2897
- function ua(e) {
2833
+ function ca(e) {
2898
2834
  return e.split(":").slice(2).filter(Boolean).join(".");
2899
2835
  }
2900
- function ni(e, t) {
2901
- const i = re(t), n = e.get(i);
2836
+ function ti(e, t) {
2837
+ const i = ee(t), n = e.get(i);
2902
2838
  if (t.kind !== "physical") return n;
2903
- const r = `physical:${t.connectionId}:`, a = Le(t), o = {
2839
+ const r = `physical:${t.connectionId}:`, a = Ve(t), o = {
2904
2840
  fields: /* @__PURE__ */ new Map(),
2905
2841
  fieldConflicts: /* @__PURE__ */ new Set()
2906
2842
  };
2907
2843
  let s = !1;
2908
2844
  for (const [l, c] of e)
2909
- l.startsWith(r) && (l !== i && !On(a, ua(l)) || (ti(o, c), s = !0));
2845
+ l.startsWith(r) && (l !== i && !Pn(a, ca(l)) || (Zt(o, c), s = !0));
2910
2846
  return s ? o : void 0;
2911
2847
  }
2912
- function da(e, t) {
2848
+ function ua(e, t) {
2913
2849
  var r;
2914
2850
  if (!e) return;
2915
- const i = bt(t.name), n = ni(e, t.source);
2851
+ const i = gt(t.name), n = ti(e, t.source);
2916
2852
  return n && !((r = n.fieldConflicts) != null && r.has(i)) ? n.fields.get(i) : void 0;
2917
2853
  }
2918
- function fa(e, t) {
2854
+ function da(e, t) {
2919
2855
  if (t.kind === "semantic")
2920
- return ii(t) || t.datasetId || "Dataset";
2921
- const i = e ? ni(e, t) : void 0;
2922
- return i != null && i.sourceLabel && !i.sourceLabelConflict ? i.sourceLabel : Le(t);
2856
+ return ei(t) || t.datasetId || "Dataset";
2857
+ const i = e ? ti(e, t) : void 0;
2858
+ return i != null && i.sourceLabel && !i.sourceLabelConflict ? i.sourceLabel : Ve(t);
2923
2859
  }
2924
- function No(e, t) {
2925
- const i = da(e, t);
2860
+ function Po(e, t) {
2861
+ const i = ua(e, t);
2926
2862
  return {
2927
2863
  name: t.name,
2928
2864
  ...i ? { label: i } : {},
2929
- entityName: fa(e, t.source),
2930
- ...t.source.kind === "physical" ? { qualifiedEntityName: Le(t.source) } : {},
2865
+ entityName: da(e, t.source),
2866
+ ...t.source.kind === "physical" ? { qualifiedEntityName: Ve(t.source) } : {},
2931
2867
  dataType: t.dataType
2932
2868
  };
2933
2869
  }
2934
- function ma(e, t) {
2870
+ function fa(e, t) {
2935
2871
  var r, a;
2936
- const i = (r = t.column_name) == null ? void 0 : r.trim(), n = gt(t.data_type);
2872
+ const i = (r = t.column_name) == null ? void 0 : r.trim(), n = ht(t.data_type);
2937
2873
  if (!(!i || n === "unknown"))
2938
2874
  return {
2939
2875
  kind: "field",
@@ -2945,23 +2881,23 @@ function ma(e, t) {
2945
2881
  }
2946
2882
  };
2947
2883
  }
2948
- function _o(e) {
2884
+ function Oo(e) {
2949
2885
  const t = {};
2950
2886
  for (const { card: i } of e.cards) {
2951
- const n = Ot(i), r = n.kind === "config" ? n.executableSources : n.kind === "sql" ? n.pinnedCatalogSources.map((s) => s.source) : [];
2887
+ const n = wt(i), r = n.kind === "config" ? n.executableSources : n.kind === "sql" ? n.pinnedCatalogSources.map((s) => s.source) : [];
2952
2888
  if (!r.length) continue;
2953
2889
  const a = [];
2954
2890
  let o;
2955
2891
  for (const s of r) {
2956
2892
  const l = e.metadataBySourceKey.get(
2957
- re(s)
2893
+ ee(s)
2958
2894
  );
2959
2895
  if (!l || l.status === "unavailable") {
2960
2896
  o = (l == null ? void 0 : l.status) === "unavailable" ? l.message : "Field metadata is not available yet.";
2961
2897
  break;
2962
2898
  }
2963
2899
  for (const c of l.columns) {
2964
- const u = ma(s, c);
2900
+ const u = fa(s, c);
2965
2901
  u && a.push(u);
2966
2902
  }
2967
2903
  }
@@ -2969,20 +2905,20 @@ function _o(e) {
2969
2905
  }
2970
2906
  return t;
2971
2907
  }
2972
- function Eo(e) {
2973
- const { dashboard: t, target: i, calendar: n } = e, r = ai(i), a = ri(t, i, n);
2908
+ function Ao(e) {
2909
+ const { dashboard: t, target: i, calendar: n } = e, r = ni(i), a = ii(t, i, n);
2974
2910
  return {
2975
2911
  value: a,
2976
- mode: Ai(
2977
- Ni(a == null ? void 0 : a.operation) ? a.operation : r.operation
2912
+ mode: Pi(
2913
+ Oi(a == null ? void 0 : a.operation) ? a.operation : r.operation
2978
2914
  )
2979
2915
  };
2980
2916
  }
2981
- function ri(e, t, i) {
2917
+ function ii(e, t, i) {
2982
2918
  var n;
2983
2919
  switch (t.kind) {
2984
2920
  case "dashboardInput": {
2985
- const r = bn({
2921
+ const r = yn({
2986
2922
  dashboard: e,
2987
2923
  input: t.input,
2988
2924
  target: t.scope,
@@ -2997,22 +2933,22 @@ function ri(e, t, i) {
2997
2933
  return r ? gn({
2998
2934
  filterDefinitions: [t.filter],
2999
2935
  filterValues: [r]
3000
- })[0] : H(t.filter, i);
2936
+ })[0] : G(t.filter, i);
3001
2937
  }
3002
2938
  case "definition":
3003
- return H(t.filter, i);
2939
+ return G(t.filter, i);
3004
2940
  }
3005
2941
  }
3006
- function ai(e) {
2942
+ function ni(e) {
3007
2943
  return e.kind === "dashboardInput" ? e.input.filter : e.filter;
3008
2944
  }
3009
- function Ro(e) {
2945
+ function _o(e) {
3010
2946
  var a;
3011
2947
  const { dashboard: t, filter: i, input: n, scope: r } = e;
3012
- return n && (t.inputs || []).some((o) => o.id === n.id) ? { kind: "dashboardInput", input: n, scope: r } : ((a = q(t).findFilterInput({ filterId: i.id })) == null ? void 0 : a.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: i } : { kind: "definition", filter: i };
2948
+ return n && (t.inputs || []).some((o) => o.id === n.id) ? { kind: "dashboardInput", input: n, scope: r } : ((a = $(t).findFilterInput({ filterId: i.id })) == null ? void 0 : a.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: i } : { kind: "definition", filter: i };
3013
2949
  }
3014
- function Vo(e) {
3015
- const { dashboard: t, target: i, calendar: n } = e, r = ai(i), a = vn(r), o = pa(t, i);
2950
+ function No(e) {
2951
+ const { dashboard: t, target: i, calendar: n } = e, r = ni(i), a = bn(r), o = ma(t, i);
3016
2952
  if (!o) return a;
3017
2953
  if (o === "cleared")
3018
2954
  return {
@@ -3020,13 +2956,13 @@ function Vo(e) {
3020
2956
  defaultValues: void 0,
3021
2957
  defaultDateFilter: void 0
3022
2958
  };
3023
- const s = ri(t, i, n);
3024
- if (!s || ha(s, H(r, n)))
2959
+ const s = ii(t, i, n);
2960
+ if (!s || pa(s, G(r, n)))
3025
2961
  return a;
3026
2962
  if (s.valueType === "date") {
3027
- const l = Vi(
2963
+ const l = Ei(
3028
2964
  "relativeMeta" in s ? s.relativeMeta : void 0
3029
- ) ?? ya(r, s, n);
2965
+ ) ?? ha(r, s, n);
3030
2966
  return l ? {
3031
2967
  operation: s.operation,
3032
2968
  defaultValues: r.defaultValues,
@@ -3039,10 +2975,10 @@ function Vo(e) {
3039
2975
  defaultDateFilter: r.defaultDateFilter
3040
2976
  };
3041
2977
  }
3042
- function pa(e, t) {
2978
+ function ma(e, t) {
3043
2979
  var i;
3044
2980
  if (t.kind === "dashboardInput") {
3045
- const n = Ne(
2981
+ const n = we(
3046
2982
  e.defaultInputValues,
3047
2983
  t.input,
3048
2984
  t.scope
@@ -3054,19 +2990,19 @@ function pa(e, t) {
3054
2990
  (n) => n.filterId === t.filter.id
3055
2991
  ) ? "set" : void 0;
3056
2992
  }
3057
- function ha(e, t) {
3058
- return !!(t && e.operation === t.operation && Se(ut(e), ut(t)) && Se(
2993
+ function pa(e, t) {
2994
+ return !!(t && e.operation === t.operation && Ce(lt(e), lt(t)) && Ce(
3059
2995
  "relativeMeta" in e ? e.relativeMeta : void 0,
3060
2996
  "relativeMeta" in t ? t.relativeMeta : void 0
3061
2997
  ));
3062
2998
  }
3063
- function ut(e) {
2999
+ function lt(e) {
3064
3000
  return e.values.map(
3065
3001
  (t) => t instanceof Date ? t.getTime() : t
3066
3002
  );
3067
3003
  }
3068
- function ya(e, t, i) {
3069
- const n = Fn(i == null ? void 0 : i.tz), r = Fe(t.values[0], n);
3004
+ function ha(e, t, i) {
3005
+ const n = vn(i == null ? void 0 : i.tz), r = ye(t.values[0], n);
3070
3006
  if (!r) return;
3071
3007
  const [a, o, s] = new Intl.DateTimeFormat("en-CA", {
3072
3008
  timeZone: n,
@@ -3083,19 +3019,19 @@ function ya(e, t, i) {
3083
3019
  ], c = t.values.map(
3084
3020
  (u) => {
3085
3021
  var f;
3086
- return (f = Fe(u, n)) == null ? void 0 : f.getTime();
3022
+ return (f = ye(u, n)) == null ? void 0 : f.getTime();
3087
3023
  }
3088
3024
  );
3089
3025
  return l.find((u) => {
3090
- const f = H(
3026
+ const f = G(
3091
3027
  { ...e, defaultDateFilter: u },
3092
3028
  i
3093
3029
  );
3094
- return (f == null ? void 0 : f.operation) === t.operation && Se(
3030
+ return (f == null ? void 0 : f.operation) === t.operation && Ce(
3095
3031
  f.values.map(
3096
3032
  (d) => {
3097
- var h;
3098
- return (h = Fe(d, n)) == null ? void 0 : h.getTime();
3033
+ var g;
3034
+ return (g = ye(d, n)) == null ? void 0 : g.getTime();
3099
3035
  }
3100
3036
  ),
3101
3037
  c
@@ -3103,10 +3039,10 @@ function ya(e, t, i) {
3103
3039
  });
3104
3040
  }
3105
3041
  function ga(e) {
3106
- const t = G(e.format);
3042
+ const t = W(e.format);
3107
3043
  if ((t == null ? void 0 : t.type) === "temporal_bucket") {
3108
3044
  if (!e.granularity) return {};
3109
- const i = Hi(
3045
+ const i = ji(
3110
3046
  t,
3111
3047
  e.granularity
3112
3048
  );
@@ -3123,34 +3059,34 @@ function ga(e) {
3123
3059
  ...t ? { format: t } : {}
3124
3060
  };
3125
3061
  }
3126
- function ba(e, t) {
3062
+ function ya(e, t) {
3127
3063
  var r, a;
3128
3064
  const i = ((r = e.nativeDataType) == null ? void 0 : r.trim()) || ((a = e.native_data_type) == null ? void 0 : a.trim());
3129
3065
  return i || ((e.dataTypeProvenance || t) === "physical" ? e.data_type : void 0);
3130
3066
  }
3131
- function oi(e) {
3067
+ function ri(e) {
3132
3068
  const t = (e.label ?? "").trim();
3133
3069
  return t ? e.derivedLabel === void 0 ? !0 : t !== e.derivedLabel.trim() : !1;
3134
3070
  }
3135
- function qe(e) {
3136
- return oi(e) ? e.label.trim() : e.name || (e.label ?? "").trim();
3071
+ function ke(e) {
3072
+ return ri(e) ? e.label.trim() : e.name || (e.label ?? "").trim();
3137
3073
  }
3138
- function dt(e) {
3139
- return qe(e).toLowerCase().trim();
3074
+ function ct(e) {
3075
+ return ke(e).toLowerCase().trim();
3140
3076
  }
3141
- function va(e, t) {
3142
- return dt(e).localeCompare(dt(t), void 0, {
3077
+ function ba(e, t) {
3078
+ return ct(e).localeCompare(ct(t), void 0, {
3143
3079
  numeric: !0,
3144
3080
  sensitivity: "base"
3145
3081
  });
3146
3082
  }
3147
- function ne(e) {
3083
+ function Z(e) {
3148
3084
  return String(e ?? "").toLowerCase().replace(/[\s_\-.]+/g, "");
3149
3085
  }
3150
- function ko(e, t) {
3151
- const i = ne(t);
3086
+ function Eo(e, t) {
3087
+ const i = Z(t);
3152
3088
  return i ? [
3153
- qe(e),
3089
+ ke(e),
3154
3090
  e.label,
3155
3091
  e.name,
3156
3092
  e.description,
@@ -3159,21 +3095,21 @@ function ko(e, t) {
3159
3095
  e.entityName && e.name ? `${e.entityName}.${e.name}` : "",
3160
3096
  e.dataType
3161
3097
  ].some(
3162
- (r) => !!r && ne(r).includes(i)
3098
+ (r) => !!r && Z(r).includes(i)
3163
3099
  ) : !0;
3164
3100
  }
3165
- function ft(e, t) {
3166
- const i = ne(t);
3101
+ function ut(e, t) {
3102
+ const i = Z(t);
3167
3103
  if (!i) return 0;
3168
- const n = ne(qe(e));
3169
- return n.startsWith(i) ? 0 : n.includes(i) ? 1 : [e.label, e.name].filter(Boolean).map(ne).some((a) => a.includes(i)) ? 2 : 3;
3104
+ const n = Z(ke(e));
3105
+ return n.startsWith(i) ? 0 : n.includes(i) ? 1 : [e.label, e.name].filter(Boolean).map(Z).some((a) => a.includes(i)) ? 2 : 3;
3170
3106
  }
3171
- function Bo(e, t, i) {
3172
- return ft(e, i) - ft(t, i) || va(e, t);
3107
+ function Ro(e, t, i) {
3108
+ return ut(e, i) - ut(t, i) || ba(e, t);
3173
3109
  }
3174
- function Fa(e, t) {
3110
+ function va(e, t) {
3175
3111
  var a;
3176
- const i = e.type === "dataset" ? (a = t.find((o) => o.entityName)) == null ? void 0 : a.entityName : void 0, n = i || e.name, r = tt(
3112
+ const i = e.type === "dataset" ? (a = t.find((o) => o.entityName)) == null ? void 0 : a.entityName : void 0, n = i || e.name, r = Ze(
3177
3113
  e.type === "dataset" && i ? { ...e, name: i } : e
3178
3114
  );
3179
3115
  return {
@@ -3184,13 +3120,13 @@ function Fa(e, t) {
3184
3120
  description: e.description,
3185
3121
  qualifiedEntityName: r,
3186
3122
  columns: t.map((o) => {
3187
- var h;
3188
- const s = e.type === "dataset" ? o.entityName || n : e.name, l = o.qualifiedEntityName || (e.type === "dataset" && s ? tt({ ...e, name: s }) : r), c = ba(
3123
+ var g;
3124
+ const s = e.type === "dataset" ? o.entityName || n : e.name, l = o.qualifiedEntityName || (e.type === "dataset" && s ? Ze({ ...e, name: s }) : r), c = ya(
3189
3125
  o,
3190
3126
  e.type === "dataset" ? "semantic" : "physical"
3191
- ), u = (h = o.label) != null && h.trim() ? o.label : void 0, f = u ? void 0 : Cn(o.column_name);
3127
+ ), u = (g = o.label) != null && g.trim() ? o.label : void 0, f = u ? void 0 : Fn(o.column_name);
3192
3128
  return {
3193
- id: In(s, o.column_name),
3129
+ id: Cn(s, o.column_name),
3194
3130
  name: o.column_name,
3195
3131
  qualifiedFieldName: o.qualifiedFieldName || o.column_name,
3196
3132
  dataType: o.data_type,
@@ -3220,17 +3156,17 @@ function Fa(e, t) {
3220
3156
  })
3221
3157
  };
3222
3158
  }
3223
- function Ca(e) {
3159
+ function Fa(e) {
3224
3160
  return e.map((t) => ({
3225
3161
  ...t,
3226
- id: At({ ...t }),
3162
+ id: Pt({ ...t }),
3227
3163
  fieldScope: "domain"
3228
3164
  }));
3229
3165
  }
3230
- function Ia(e) {
3166
+ function Ca(e) {
3231
3167
  return e.flatMap(
3232
3168
  (t) => t.columns.map((i) => {
3233
- const n = oi(i) ? i.label : void 0, r = n ? void 0 : i.derivedLabel ?? Sn(i.name), a = n ?? r ?? i.name;
3169
+ const n = ri(i) ? i.label : void 0, r = n ? void 0 : i.derivedLabel ?? xn(i.name), a = n ?? r ?? i.name;
3234
3170
  return {
3235
3171
  ...i,
3236
3172
  id: i.id || `${t.entityId}-${i.name}`,
@@ -3248,33 +3184,33 @@ function Ia(e) {
3248
3184
  })
3249
3185
  );
3250
3186
  }
3251
- function Ko(e) {
3252
- const t = e.map((n) => Fa(n.target, n.columns || [])).filter((n) => {
3187
+ function Vo(e) {
3188
+ const t = e.map((n) => va(n.target, n.columns || [])).filter((n) => {
3253
3189
  var r;
3254
3190
  return ((r = n == null ? void 0 : n.columns) == null ? void 0 : r.length) > 0;
3255
- }), i = Ca(e.flatMap((n) => n.calculatedFields || []));
3191
+ }), i = Fa(e.flatMap((n) => n.calculatedFields || []));
3256
3192
  if (i.length > 0) {
3257
3193
  const n = /* @__PURE__ */ new Map();
3258
3194
  i.forEach((r) => {
3259
- const a = At(r);
3195
+ const a = Pt(r);
3260
3196
  n.has(a) || n.set(a, r);
3261
3197
  }), t.unshift({
3262
- entityId: xn,
3198
+ entityId: In,
3263
3199
  entityType: "dataset",
3264
- entityName: it,
3200
+ entityName: et,
3265
3201
  label: "Calculated Fields",
3266
3202
  description: "Domain-level calculated metrics and dimensions",
3267
- qualifiedEntityName: it,
3203
+ qualifiedEntityName: et,
3268
3204
  columns: Array.from(n.values())
3269
3205
  });
3270
3206
  }
3271
- return { columnGroups: t, columns: Ia(t) };
3207
+ return { columnGroups: t, columns: Ca(t) };
3272
3208
  }
3273
- function Lo(e, t) {
3209
+ function ko(e, t) {
3274
3210
  const i = e.answers.relationshipIds;
3275
3211
  return !i || !t ? !i && !t : i.length === t.length && i.every((n, r) => t[r] === n);
3276
3212
  }
3277
- const xa = /* @__PURE__ */ new Set([
3213
+ const Ia = /* @__PURE__ */ new Set([
3278
3214
  "dataset_not_reachable",
3279
3215
  "field_not_resolvable",
3280
3216
  "missing_metadata",
@@ -3286,15 +3222,15 @@ const xa = /* @__PURE__ */ new Set([
3286
3222
  function L(e) {
3287
3223
  return !!e && typeof e == "object" && !Array.isArray(e);
3288
3224
  }
3289
- function Sa(e) {
3225
+ function xa(e) {
3290
3226
  if (L(e))
3291
3227
  switch (e.status) {
3292
3228
  case "applied": {
3293
- const t = Nt(e.route);
3229
+ const t = Ot(e.route);
3294
3230
  return t ? { status: "applied", route: t } : void 0;
3295
3231
  }
3296
3232
  case "skipped":
3297
- return typeof e.reason == "string" && xa.has(e.reason) ? { status: "skipped", reason: e.reason } : void 0;
3233
+ return typeof e.reason == "string" && Ia.has(e.reason) ? { status: "skipped", reason: e.reason } : void 0;
3298
3234
  case "needsPath":
3299
3235
  return { status: "needsPath" };
3300
3236
  case "blocked":
@@ -3307,22 +3243,22 @@ function Sa(e) {
3307
3243
  return;
3308
3244
  }
3309
3245
  }
3310
- function si(e) {
3246
+ function ai(e) {
3311
3247
  if (e !== void 0)
3312
3248
  return Array.isArray(e) && e.length > 0 && e.every((t) => typeof t == "string" && t.length > 0) ? e : null;
3313
3249
  }
3314
- function Ma(e) {
3250
+ function Sa(e) {
3315
3251
  if (!L(e)) return;
3316
- const t = Nt(e.route), i = e.target;
3317
- if (!(!t || !L(i) || i.kind !== "relationship" || !L(i.field) || typeof i.field.name != "string" || !L(i.field.source) || i.field.source.kind !== "semantic" || !si(i.relationshipIds)))
3252
+ const t = Ot(e.route), i = e.target;
3253
+ if (!(!t || !L(i) || i.kind !== "relationship" || !L(i.field) || typeof i.field.name != "string" || !L(i.field.source) || i.field.source.kind !== "semantic" || !ai(i.relationshipIds)))
3318
3254
  return { route: t, target: i };
3319
3255
  }
3320
- function qo(e) {
3256
+ function Bo(e) {
3321
3257
  if (!L(e) || !Array.isArray(e.previews)) return { previews: [] };
3322
3258
  const t = [];
3323
3259
  for (const n of e.previews) {
3324
3260
  if (!L(n) || typeof n.cardId != "string" || !n.cardId || !L(n.answers)) continue;
3325
- const r = si(n.answers.relationshipIds), a = Sa(n.outcome), o = Array.isArray(n.paths) ? n.paths.map(Ma) : [];
3261
+ const r = ai(n.answers.relationshipIds), a = xa(n.outcome), o = Array.isArray(n.paths) ? n.paths.map(Sa) : [];
3326
3262
  r === null || !a || !o.every(Boolean) || a.status === "needsPath" && o.length < 2 || t.push({
3327
3263
  cardId: n.cardId,
3328
3264
  answers: r ? { relationshipIds: r } : {},
@@ -3333,22 +3269,22 @@ function qo(e) {
3333
3269
  const i = L(e.manageRelationships) && typeof e.manageRelationships.href == "string" ? { href: e.manageRelationships.href } : void 0;
3334
3270
  return { previews: t, ...i ? { manageRelationships: i } : {} };
3335
3271
  }
3336
- const ue = (e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || "";
3337
- function Da(e) {
3272
+ const se = (e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || "";
3273
+ function Ma(e) {
3338
3274
  return !e || /s$/i.test(e) ? e : /[^aeiou]y$/i.test(e) ? `${e.slice(0, -1)}ies` : `${e}s`;
3339
3275
  }
3340
- function $o(e) {
3276
+ function Ko(e) {
3341
3277
  if (e.direction === "to_many") {
3342
- const i = ue(e.matchingDataset ?? e.datasets[e.datasets.length - 1]);
3343
- return `${e.base ? Da(ue(e.base)) : "Rows"} with at least one matching ${i}`;
3278
+ const i = se(e.matchingDataset ?? e.datasets[e.datasets.length - 1]);
3279
+ return `${e.base ? Ma(se(e.base)) : "Rows"} with at least one matching ${i}`;
3344
3280
  }
3345
- return `through ${(e.datasets.length > 1 ? e.datasets.slice(0, -1) : e.datasets).map(ue).join(", ")}`;
3281
+ return `through ${(e.datasets.length > 1 ? e.datasets.slice(0, -1) : e.datasets).map(se).join(", ")}`;
3346
3282
  }
3347
- const zo = "The relationship this card used changed; choose it again";
3348
- function jo(e, t) {
3283
+ const Lo = "The relationship this card used changed; choose it again";
3284
+ function qo(e, t) {
3349
3285
  switch (e) {
3350
3286
  case "relationship_missing":
3351
- return t ? `Not related to ${ue(t)}` : "Not related to this card";
3287
+ return t ? `Not related to ${se(t)}` : "Not related to this card";
3352
3288
  case "relationship_ambiguous":
3353
3289
  return "Connects through more than one path";
3354
3290
  case "relationship_unsupported":
@@ -3363,120 +3299,114 @@ function jo(e, t) {
3363
3299
  }
3364
3300
  }
3365
3301
  export {
3366
- bo as $,
3367
- qe as A,
3368
- Sr as B,
3369
- br as C,
3370
- Ga as D,
3371
- Mo as E,
3372
- xo as F,
3373
- z as G,
3374
- fe as H,
3375
- Ja as I,
3376
- Br as J,
3377
- Kr as K,
3378
- Io as L,
3379
- To as M,
3380
- Er as N,
3381
- Kn as O,
3382
- kn as P,
3383
- Bn as Q,
3384
- zo as R,
3385
- Ht as S,
3386
- zn as T,
3387
- $n as U,
3388
- Ee as V,
3389
- no as W,
3390
- to as X,
3391
- co as Y,
3392
- Lt as Z,
3393
- xr as _,
3394
- wo as a,
3395
- lo as a0,
3396
- ar as a1,
3397
- Ve as a2,
3398
- ro as a3,
3399
- mo as a4,
3400
- ho as a5,
3401
- po as a6,
3402
- Rt as a7,
3403
- pr as a8,
3404
- Mr as a9,
3405
- cr as aA,
3406
- eo as aB,
3407
- qr as aC,
3408
- ko as aD,
3409
- oi as aE,
3410
- No as aF,
3411
- fa as aG,
3412
- re as aH,
3413
- Le as aI,
3414
- Po as aJ,
3415
- _o as aK,
3416
- Oo as aL,
3417
- la as aM,
3418
- ba as aN,
3419
- Vo as aO,
3302
+ mr as $,
3303
+ ke as A,
3304
+ xr as B,
3305
+ yr as C,
3306
+ Ha as D,
3307
+ Io as E,
3308
+ Fo as F,
3309
+ j as G,
3310
+ ce as H,
3311
+ Ya as I,
3312
+ kr as J,
3313
+ Br as K,
3314
+ vo as L,
3315
+ So as M,
3316
+ Nr as N,
3317
+ Bn as O,
3318
+ Vn as P,
3319
+ kn as Q,
3320
+ Lo as R,
3321
+ ho as S,
3322
+ ao as T,
3323
+ rr as U,
3324
+ _e as V,
3325
+ to as W,
3326
+ co as X,
3327
+ fo as Y,
3328
+ uo as Z,
3329
+ Nt as _,
3330
+ Mo as a,
3331
+ Sr as a0,
3332
+ te as a1,
3333
+ lo as a2,
3334
+ mo as a3,
3335
+ Wn as a4,
3336
+ nr as a5,
3337
+ br as a6,
3338
+ vr as a7,
3339
+ po as a8,
3340
+ Ie as a9,
3341
+ da as aA,
3342
+ ee as aB,
3343
+ Ve as aC,
3344
+ Do as aD,
3345
+ Oo as aE,
3346
+ To as aF,
3347
+ sa as aG,
3348
+ ya as aH,
3349
+ No as aI,
3350
+ _o as aJ,
3351
+ wo as aK,
3352
+ ua as aL,
3353
+ Co as aM,
3354
+ Rr as aN,
3355
+ fr as aO,
3420
3356
  Ro as aP,
3421
- Ao as aQ,
3422
- da as aR,
3423
- So as aS,
3424
- Vr as aT,
3425
- mr as aU,
3426
- Bo as aV,
3427
- ft as aW,
3428
- ga as aX,
3429
- ne as aY,
3430
- Xa as aZ,
3431
- ae as aa,
3432
- fo as ab,
3433
- yo as ac,
3434
- Qn as ad,
3435
- rr as ae,
3436
- vr as af,
3437
- Fr as ag,
3438
- go as ah,
3439
- De as ai,
3440
- hr as aj,
3441
- so as ak,
3442
- ao as al,
3443
- oo as am,
3444
- Zn as an,
3445
- Xn as ao,
3446
- Dr as ap,
3447
- Me as aq,
3448
- Za as ar,
3449
- Vn as as,
3357
+ ut as aQ,
3358
+ ga as aR,
3359
+ Z as aS,
3360
+ Ja as aT,
3361
+ pr as aa,
3362
+ ro as ab,
3363
+ io as ac,
3364
+ no as ad,
3365
+ Xn as ae,
3366
+ Jn as af,
3367
+ oo as ag,
3368
+ jt as ah,
3369
+ $n as ai,
3370
+ Xa as aj,
3371
+ Mr as ak,
3372
+ Rn as al,
3373
+ Wa as am,
3374
+ Ln as an,
3375
+ Oe as ao,
3376
+ Za as ap,
3377
+ eo as aq,
3378
+ ue as ar,
3379
+ ie as as,
3450
3380
  Qa as at,
3451
- qn as au,
3452
- io as av,
3453
- me as aw,
3454
- oe as ax,
3455
- Ya as ay,
3456
- uo as az,
3457
- Do as b,
3458
- Co as c,
3459
- ma as d,
3460
- $r as e,
3461
- zr as f,
3462
- Wa as g,
3463
- En as h,
3464
- Tr as i,
3465
- Pr as j,
3466
- Or as k,
3467
- vo as l,
3468
- Ar as m,
3469
- Nr as n,
3470
- Fo as o,
3381
+ so as au,
3382
+ lr as av,
3383
+ Lr as aw,
3384
+ Eo as ax,
3385
+ ri as ay,
3386
+ Po as az,
3387
+ xo as b,
3388
+ bo as c,
3389
+ fa as d,
3390
+ qr as e,
3391
+ $r as f,
3392
+ Ga as g,
3393
+ Nn as h,
3394
+ Dr as i,
3395
+ wr as j,
3396
+ Pr as k,
3397
+ go as l,
3398
+ Or as m,
3399
+ Ar as n,
3400
+ yo as o,
3471
3401
  _r as p,
3472
- Fa as q,
3473
- Eo as r,
3474
- Ca as s,
3475
- Ia as t,
3476
- Ko as u,
3477
- Lo as v,
3478
- qo as w,
3479
- Da as x,
3480
- $o as y,
3481
- jo as z
3402
+ va as q,
3403
+ Ao as r,
3404
+ Fa as s,
3405
+ Ca as t,
3406
+ Vo as u,
3407
+ ko as v,
3408
+ Bo as w,
3409
+ Ma as x,
3410
+ Ko as y,
3411
+ qo as z
3482
3412
  };