react-semaphor 0.1.586 → 0.1.588

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 (98) hide show
  1. package/dist/analytics-protocol/index.js +341 -338
  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 +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-DhP8wVtM.js → add-to-dashboard-C86FsM8D.js} +1 -1
  7. package/dist/chunks/{aggregate-measure-field-DsFXETpI.js → aggregate-measure-field-BrkXsSJp.js} +2 -2
  8. package/dist/chunks/{analytics-base-schemas-BaIQrEzX.js → analytics-base-schemas-8wz9vqn_.js} +173 -165
  9. package/dist/chunks/{assistant-chat-BU5gchFy.js → assistant-chat-BeM6joPc.js} +19 -18
  10. package/dist/chunks/{bookmark-impact-ZPSGncK6.js → bookmark-impact-B7pbMx2e.js} +2 -2
  11. package/dist/chunks/{bookmark-state-CL4WEpgB.js → bookmark-state-Bn7k3ttp.js} +5 -5
  12. package/dist/chunks/{card-filter-builder-HELJWA4D.js → card-filter-builder-DmodrhyI.js} +81 -81
  13. package/dist/chunks/{comparison-window-caption-CoART8BC.js → comparison-window-caption-fqijZdVd.js} +451 -395
  14. package/dist/chunks/{context-BTLBjQNh.js → context-CVXTFljo.js} +1 -1
  15. package/dist/chunks/{dashboard-BXP-ZxSY.js → dashboard-Tu5wT0Cw.js} +1 -1
  16. package/dist/chunks/{dashboard-briefing-launcher-BGj42whr.js → dashboard-briefing-launcher-D8jMxIJo.js} +249 -265
  17. package/dist/chunks/{dashboard-controls-zvbRp6D2.js → dashboard-controls-uzeAIEkM.js} +65 -65
  18. package/dist/chunks/{dashboard-json-CykexgqL.js → dashboard-json-i5rpFNCg.js} +5 -5
  19. package/dist/chunks/dates-BunbHJH0.js +115 -0
  20. package/dist/chunks/{edit-dashboard-visual-C82JNxbt.js → edit-dashboard-visual-BpEK_Sls.js} +2882 -2843
  21. package/dist/chunks/{filter-line-Cu2u1K36.js → filter-line-Dza3ee4w.js} +5 -5
  22. package/dist/chunks/{filter-reach-copy-ZERaFKsN.js → filter-reach-copy-D5AmDHda.js} +939 -937
  23. package/dist/chunks/{filter-value-text-xefXzZlf.js → filter-value-text-DQw4v3nC.js} +6 -6
  24. package/dist/chunks/{index-otMIColV.js → index-dGxJTaP1.js} +39 -39
  25. package/dist/chunks/{layout-grid-9nSS2SL-.js → layout-grid-XCYphks2.js} +1 -1
  26. package/dist/chunks/{list-filter-CfMPI6v4.js → list-filter-DGV3fqqv.js} +1 -1
  27. package/dist/chunks/{matrix-analytical-definition-DOVSFFuf.js → matrix-analytical-definition-SN0JUJVk.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-BKDyxJho.js → matrix-member-presentation-DVBJR0MA.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-BM5TveR3.js → matrix-operation-contract-JSmproo9.js} +15 -15
  30. package/dist/chunks/{metric-comparison-ZmurmEIs.js → metric-comparison-xE_J6hkg.js} +2 -2
  31. package/dist/chunks/{paintbrush-LzAje2ff.js → paintbrush-DEEZXhDj.js} +1 -1
  32. package/dist/chunks/{palette-DicJG0TC.js → palette-Bgy0H-Nt.js} +1 -1
  33. package/dist/chunks/{pivot-header-presentation-CdeTU96P.js → pivot-header-presentation-D-DfPAjb.js} +1 -1
  34. package/dist/chunks/{pivot-result-contract-expectations-Bx_BCu-7.js → pivot-result-contract-expectations-DbBahmgc.js} +545 -536
  35. package/dist/chunks/{pivot-result-identity-Bvs6Uq3v.js → pivot-result-identity-CUsMt_4r.js} +1 -1
  36. package/dist/chunks/{raw-temporal-value-DH-feMc2.js → raw-temporal-value-BnGCWJAL.js} +1 -1
  37. package/dist/chunks/{report-preferences-dialog-B-CoyS1x.js → report-preferences-dialog-CTM0xfd0.js} +14 -14
  38. package/dist/chunks/{report-runtime-context-NlOXwyRB.js → report-runtime-context-CrOgmuxO.js} +2 -2
  39. package/dist/chunks/{resolve-dashboard-input-context-BTTdKXH0.js → resolve-dashboard-input-context-DFBIngUZ.js} +5621 -5476
  40. package/dist/chunks/{save-0wu1Z1U7.js → save-xnRCvMeA.js} +1 -1
  41. package/dist/chunks/{saved-dashboard-context-B-rosN4W.js → saved-dashboard-context-DKMTP9ib.js} +17 -17
  42. package/dist/chunks/selection-filter-compiler-DkIjp1yH.js +131 -0
  43. package/dist/chunks/{semaphor-ready-indicator-Cy1n_04D.js → semaphor-ready-indicator-zU9reNmX.js} +47183 -46779
  44. package/dist/chunks/{shelf-drop-preview-context-Bmz54WYm.js → shelf-drop-preview-context-R9sf4oDX.js} +6 -6
  45. package/dist/chunks/{stored-dashboard-rDJ8sw6J.js → stored-dashboard-CksluF2S.js} +1539 -1404
  46. package/dist/chunks/{style-sheet-parts-_dGSFzDi.js → style-sheet-parts-D7NbsFL0.js} +3 -3
  47. package/dist/chunks/{table-export-sheet-Dmtqi5NV.js → table-export-sheet-ClSgERQC.js} +1 -1
  48. package/dist/chunks/{token-types-DEe_FP4l.js → token-types-DTocOcwt.js} +1 -1
  49. package/dist/chunks/{upload-CtyOkU_B.js → upload-BXGgYS4g.js} +1 -1
  50. package/dist/chunks/{validators-CJ8Jh0E8.js → validators-CrYXNnNE.js} +51 -49
  51. package/dist/chunks/{variable-draft-DvngkRMl.js → variable-draft-rbtGPvmX.js} +16 -14
  52. package/dist/chunks/visual-choice-DDfHfHvY.js +172 -0
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +1501 -1460
  55. package/dist/format-utils/index.js +162 -158
  56. package/dist/index.js +21 -21
  57. package/dist/report-runtime-context/index.js +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/index.js +5 -5
  61. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +39 -2
  62. package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +65 -0
  63. package/dist/types/lib/dashboard-view-state/grain-pick.d.ts +38 -0
  64. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  65. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +6 -2
  66. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  67. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +2 -2
  68. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -1
  69. package/dist/types/lib/query-context/build-card-query-context.d.ts +15 -1
  70. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +3 -0
  71. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +14 -1
  72. package/dist/types/lib/stores/dashboard-store.d.ts +7 -1
  73. package/dist/types/lib/types/explorer-types.d.ts +24 -4
  74. package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
  75. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +32 -0
  76. package/dist/types/shared/analytics-protocol/contracts.d.ts +30 -0
  77. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +13 -0
  78. package/dist/types/shared/dashboard-authoring/automatic-grain.d.ts +77 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +10 -3
  80. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  81. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +5 -2
  82. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +5 -2
  83. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +13 -8
  85. package/dist/types/shared/dashboard-authoring/control-value-resolution.d.ts +24 -0
  86. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  87. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +12 -12
  88. package/dist/types/shared/dashboard-authoring/kpi-trend-rule.d.ts +51 -0
  89. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +1 -0
  90. package/dist/types/shared/format-utils/index.d.ts +1 -0
  91. package/dist/types/shared/format-utils/partial-period.d.ts +40 -0
  92. package/dist/types/shared/format-utils/temporal-bucket.d.ts +11 -0
  93. package/dist/types/shared/usage-events/details.d.ts +2 -2
  94. package/dist/usage-events/index.js +1 -1
  95. package/package.json +1 -1
  96. package/dist/chunks/dates-CaqZtq01.js +0 -92
  97. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +0 -92
  98. package/dist/chunks/visual-choice-BBPizkRo.js +0 -206
@@ -1,15 +1,15 @@
1
1
  var Yn = Object.defineProperty;
2
2
  var zn = (e, t, n) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var $ = (e, t, n) => zn(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { z as p } from "zod";
5
- import { E as Wt, l as jt } from "./export-file-format-C-tJsxsf.js";
6
- import { a$ as Ht, b0 as An, aU as Rn, m as rt, a5 as Un, M as Ln, b1 as Wn, b2 as jn, R as Hn, I as X, S as qn } from "./validators-CJ8Jh0E8.js";
7
- import "./matrix-operation-contract-BM5TveR3.js";
8
- import { k as Zn, i as he } from "./analytics-base-schemas-BaIQrEzX.js";
9
- import { b as Xn } from "./report-runtime-context-NlOXwyRB.js";
10
- import { canonicalizeSupportedLocale as Q, canonicalizeSupportedCurrencyCode as Re, DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Vn } from "../value-format-preferences/index.js";
11
- import { p as Bn, a as Kn, c as Gn, s as qt, h as Qn, i as at, b as Jn } from "./raw-temporal-value-DH-feMc2.js";
12
- import { a as er } from "./metric-comparison-ZmurmEIs.js";
4
+ import { z as w } from "zod";
5
+ import { E as jt, l as Ht } from "./export-file-format-C-tJsxsf.js";
6
+ import { a$ as qt, b0 as An, aU as Rn, m as it, a5 as Un, M as Ln, b1 as Wn, b2 as jn, R as Hn, I as X, S as qn } from "./validators-CrYXNnNE.js";
7
+ import "./matrix-operation-contract-JSmproo9.js";
8
+ import { k as Zn, i as ge } from "./analytics-base-schemas-8wz9vqn_.js";
9
+ import { b as Xn } from "./report-runtime-context-CrOgmuxO.js";
10
+ import { canonicalizeSupportedLocale as Q, canonicalizeSupportedCurrencyCode as Le, DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Bn } from "../value-format-preferences/index.js";
11
+ import { p as Vn, a as Kn, c as Gn, i as ot, s as ye, h as Qn, b as Jn } from "./raw-temporal-value-BnGCWJAL.js";
12
+ import { a as er } from "./metric-comparison-xE_J6hkg.js";
13
13
  function J(e) {
14
14
  if (!e || typeof e != "object") return !1;
15
15
  const t = e.type;
@@ -24,7 +24,7 @@ const Zt = [
24
24
  "minute",
25
25
  "second",
26
26
  "millisecond"
27
- ], Ue = {
27
+ ], We = {
28
28
  day: 864e5,
29
29
  hour: 36e5,
30
30
  minute: 6e4,
@@ -49,21 +49,21 @@ function rr(e) {
49
49
  function Xt(e, t) {
50
50
  return rr(e) ? e : t;
51
51
  }
52
- function it(e, t) {
52
+ function st(e, t) {
53
53
  return Zt.indexOf(Xt(e, t));
54
54
  }
55
55
  function ar(e, t) {
56
- const n = it(e, "day"), r = it(t, "second"), a = Math.min(n, r), i = Math.max(n, r);
56
+ const n = st(e, "day"), r = st(t, "second"), a = Math.min(n, r), i = Math.max(n, r);
57
57
  return Zt.slice(a, i + 1);
58
58
  }
59
59
  function ir(e, t) {
60
- return e * Ue[Xt(t, "second")];
60
+ return e * We[Xt(t, "second")];
61
61
  }
62
62
  function or(e, t) {
63
- const n = ar(t.largestUnit, t.smallestUnit), r = n[n.length - 1], a = Ue[r];
63
+ const n = ar(t.largestUnit, t.smallestUnit), r = n[n.length - 1], a = We[r];
64
64
  let i = Math.round(e / a) * a;
65
65
  return n.map((o) => {
66
- const s = Ue[o], c = Math.floor(i / s);
66
+ const s = We[o], c = Math.floor(i / s);
67
67
  return i -= c * s, { unit: o, value: c };
68
68
  });
69
69
  }
@@ -91,7 +91,7 @@ function lr(e, t, n) {
91
91
  const r = `${n.prefix || ""}${e}${n.suffix || ""}`;
92
92
  return t ? n.negativeInParentheses ? `(${r})` : `-${r}` : r;
93
93
  }
94
- function Vt(e, t = {}) {
94
+ function Bt(e, t = {}) {
95
95
  if (e == null)
96
96
  return "";
97
97
  const n = typeof e == "number" ? e : typeof e == "string" && e.trim() ? Number(e) : NaN;
@@ -100,8 +100,8 @@ function Vt(e, t = {}) {
100
100
  const r = t.inputUnit || "second", a = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", i = n < 0, o = Math.abs(ir(n, r)), s = or(o, t), c = a === "digital" ? ur(s) : a === "long" ? cr(s, t.maxUnits) : sr(s, t.maxUnits);
101
101
  return lr(c, i, t);
102
102
  }
103
- function Bt(e, t) {
104
- return Vt(
103
+ function Vt(e, t) {
104
+ return Bt(
105
105
  e !== null && typeof e == "object" ? e.value : e,
106
106
  {
107
107
  inputUnit: t.inputUnit,
@@ -115,26 +115,26 @@ function Bt(e, t) {
115
115
  }
116
116
  );
117
117
  }
118
- let ot;
119
- function st(e, t) {
118
+ let ct;
119
+ function ut(e, t) {
120
120
  const n = e.format;
121
121
  return n(t);
122
122
  }
123
123
  function mr(e, t) {
124
- if (ot ?? (ot = st(
124
+ if (ct ?? (ct = ut(
125
125
  new Intl.NumberFormat("en-US", { useGrouping: !1, maximumFractionDigits: 6 }),
126
126
  "9007199254740993.000009"
127
- ) === "9007199254740993.000009"), !ot)
127
+ ) === "9007199254740993.000009"), !ct)
128
128
  throw new RangeError("This runtime cannot format exact decimal strings.");
129
129
  const n = Number(e);
130
130
  if (!Number.isFinite(n) || n === 0 && e !== "0")
131
131
  throw new RangeError("Exact value is outside the Intl formatting range; use raw text.");
132
- return st(t, e);
132
+ return ut(t, e);
133
133
  }
134
134
  function ee(e) {
135
135
  return typeof e == "number" ? e < 0 : e.value.startsWith("-");
136
136
  }
137
- function V(e) {
137
+ function B(e) {
138
138
  return typeof e == "number" ? Math.abs(e) : ee(e) ? { ...e, value: e.value.slice(1) } : e;
139
139
  }
140
140
  function fr(e) {
@@ -144,65 +144,65 @@ function Kt(e, t) {
144
144
  return typeof e == "number" ? e * t : {
145
145
  kind: "exact_number",
146
146
  type: "decimal",
147
- value: Ht(e.value, t)
147
+ value: qt(e.value, t)
148
148
  };
149
149
  }
150
- function ge(e, t) {
150
+ function pe(e, t) {
151
151
  return t === 0 ? e : typeof e == "number" ? e / 10 ** t : {
152
152
  kind: "exact_number",
153
153
  type: "decimal",
154
- value: Ht(e.value, `1e-${t}`)
154
+ value: qt(e.value, `1e-${t}`)
155
155
  };
156
156
  }
157
157
  function A(e, t) {
158
158
  return typeof e == "number" ? t.format(e) : mr(e.value, t);
159
159
  }
160
- function ct(e) {
160
+ function lt(e) {
161
161
  if (!e) return !1;
162
162
  const t = e.toLowerCase().replace("_", "-");
163
163
  return t === "en-in" || t.startsWith("en-in-");
164
164
  }
165
- function ut(e, t) {
166
- const n = V(e), r = (a) => typeof n == "number" ? n >= a : An(n.value, String(a)) >= 0;
167
- return r(1e12) ? { power: 12, suffix: "T" } : r(1e9) ? { power: 9, suffix: "B" } : ct(t) && r(1e7) ? { power: 7, suffix: "Cr" } : r(1e6) ? { power: 6, suffix: "M" } : ct(t) && r(1e5) ? { power: 5, suffix: "L" } : r(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
165
+ function mt(e, t) {
166
+ const n = B(e), r = (a) => typeof n == "number" ? n >= a : An(n.value, String(a)) >= 0;
167
+ return r(1e12) ? { power: 12, suffix: "T" } : r(1e9) ? { power: 9, suffix: "B" } : lt(t) && r(1e7) ? { power: 7, suffix: "Cr" } : r(1e6) ? { power: 6, suffix: "M" } : lt(t) && r(1e5) ? { power: 5, suffix: "L" } : r(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
168
168
  }
169
- function Le(e, t) {
169
+ function je(e, t) {
170
170
  try {
171
171
  const n = W(t);
172
- return ut(e, n);
172
+ return mt(e, n);
173
173
  } catch {
174
- return ut(e, "en-US");
174
+ return mt(e, "en-US");
175
175
  }
176
176
  }
177
- const Gt = 500, re = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
177
+ const Gt = 500, ae = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map();
178
178
  function _(e, t = {}) {
179
179
  const n = `${e}|${JSON.stringify(t)}`;
180
- let r = re.get(n);
181
- return r || (r = new Intl.NumberFormat(e, t), re.size >= Gt && re.clear(), re.set(n, r)), r;
180
+ let r = ae.get(n);
181
+ return r || (r = new Intl.NumberFormat(e, t), ae.size >= Gt && ae.clear(), ae.set(n, r)), r;
182
182
  }
183
183
  function dr(e) {
184
- let t = ae.get(e);
184
+ let t = ie.get(e);
185
185
  if (t === void 0) {
186
186
  try {
187
187
  _(e), t = !0;
188
188
  } catch {
189
189
  t = !1;
190
190
  }
191
- ae.size >= Gt && ae.clear(), ae.set(e, t);
191
+ ie.size >= Gt && ie.clear(), ie.set(e, t);
192
192
  }
193
193
  return t;
194
194
  }
195
195
  function W(e) {
196
196
  return e && dr(e) ? e : "en-US";
197
197
  }
198
- function Ze(e, t) {
198
+ function Be(e, t) {
199
199
  if (e == null || Number.isNaN(e))
200
200
  return "";
201
201
  const n = W(t == null ? void 0 : t.locale);
202
202
  let r = e;
203
203
  if (t != null && t.multiplyBy && (r = Kt(r, t.multiplyBy)), t != null && t.useSuffix) {
204
- const { power: i, suffix: o } = Le(r, n);
205
- r = ge(r, i);
204
+ const { power: i, suffix: o } = je(r, n);
205
+ r = pe(r, i);
206
206
  const s = A(r, _(n, {
207
207
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
208
208
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
@@ -224,10 +224,10 @@ function Ze(e, t) {
224
224
  function Qt(e, t) {
225
225
  if (e == null || Number.isNaN(e))
226
226
  return "";
227
- const n = W(t == null ? void 0 : t.locale), r = (t == null ? void 0 : t.currency) || "USD", a = ee(e), i = !!(t != null && t.negativeInParentheses && a), o = i ? V(e) : e;
227
+ const n = W(t == null ? void 0 : t.locale), r = (t == null ? void 0 : t.currency) || "USD", a = ee(e), i = !!(t != null && t.negativeInParentheses && a), o = i ? B(e) : e;
228
228
  try {
229
229
  if (t != null && t.useSuffix) {
230
- const { power: c, suffix: u } = Le(o, n), l = ge(o, c), m = `${A(l, _(n, {
230
+ const { power: c, suffix: u } = je(o, n), l = pe(o, c), m = `${A(l, _(n, {
231
231
  style: "currency",
232
232
  currency: r,
233
233
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
@@ -245,8 +245,8 @@ function Qt(e, t) {
245
245
  }));
246
246
  return i ? `(${s})` : s;
247
247
  } catch {
248
- const s = V(e), c = t != null && t.useSuffix ? Le(s, n) : { power: 0, suffix: "" }, u = Ze(
249
- ge(s, c.power),
248
+ const s = B(e), c = t != null && t.useSuffix ? je(s, n) : { power: 0, suffix: "" }, u = Be(
249
+ pe(s, c.power),
250
250
  {
251
251
  locale: n,
252
252
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
@@ -260,7 +260,7 @@ function Qt(e, t) {
260
260
  function Jt(e, t) {
261
261
  if (e == null || Number.isNaN(e))
262
262
  return "";
263
- const n = W(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? ge(e, 2) : e;
263
+ const n = W(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? pe(e, 2) : e;
264
264
  return A(a, _(n, {
265
265
  style: "percent",
266
266
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
@@ -279,7 +279,7 @@ function en(e, t) {
279
279
  }));
280
280
  }
281
281
  function hr(e, t) {
282
- const n = t ?? "auto", r = n === "never" ? V(e) : e, a = !ee(r) && (n === "always" || n === "exceptZero" && !fr(r));
282
+ const n = t ?? "auto", r = n === "never" ? B(e) : e, a = !ee(r) && (n === "always" || n === "exceptZero" && !fr(r));
283
283
  return { value: r, plus: a };
284
284
  }
285
285
  function _s(e) {
@@ -287,10 +287,10 @@ function _s(e) {
287
287
  const { signDisplay: t, ...n } = e;
288
288
  return n;
289
289
  }
290
- function Xe(e, t) {
290
+ function Ve(e, t) {
291
291
  if (e == null || Number.isNaN(e))
292
292
  return "";
293
- const n = t.scale === void 0 ? e : Kt(e, t.scale), r = hr(n, t.signDisplay), a = r.value, i = r.plus ? "+" : "", o = t.negativeStyle === "parentheses" && ee(a), s = o ? V(a) : a, c = {
293
+ const n = t.scale === void 0 ? e : Kt(e, t.scale), r = hr(n, t.signDisplay), a = r.value, i = r.plus ? "+" : "", o = t.negativeStyle === "parentheses" && ee(a), s = o ? B(a) : a, c = {
294
294
  style: t.type === "number" ? "decimal" : t.type,
295
295
  locale: t.locale,
296
296
  currency: t.currency,
@@ -312,20 +312,20 @@ function Xe(e, t) {
312
312
  u = en(s, c);
313
313
  break;
314
314
  default:
315
- u = Ze(s, c);
315
+ u = Be(s, c);
316
316
  break;
317
317
  }
318
318
  const l = `${t.prefix ?? ""}${i}${u}${t.suffix ?? ""}`;
319
319
  return o ? `(${l})` : l;
320
320
  }
321
321
  function Ns(e, t) {
322
- return t.type === "duration" ? e == null ? "" : Bt(e, t) : Xe(e, t);
322
+ return t.type === "duration" ? e == null ? "" : Vt(e, t) : Ve(e, t);
323
323
  }
324
324
  function gr(e, t, n = "en-US") {
325
325
  if (e == null || typeof e == "number" && isNaN(e))
326
326
  return "";
327
327
  if ((t == null ? void 0 : t.style) === "duration")
328
- return Bt(e, {
328
+ return Vt(e, {
329
329
  ...t.duration,
330
330
  prefix: t.prefix,
331
331
  suffix: t.suffix,
@@ -335,7 +335,7 @@ function gr(e, t, n = "en-US") {
335
335
  return i === "currency" && _(r, {
336
336
  style: "currency",
337
337
  currency: (t == null ? void 0 : t.currency) || "USD"
338
- }), Xe(e, {
338
+ }), Ve(e, {
339
339
  type: i,
340
340
  locale: r,
341
341
  currency: i === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
@@ -371,43 +371,43 @@ function $s(e, t, n) {
371
371
  case "scientific":
372
372
  return en(e, r);
373
373
  default:
374
- return Ze(e, r);
374
+ return Be(e, r);
375
375
  }
376
376
  }
377
- function w(e) {
377
+ function p(e) {
378
378
  const t = Object.prototype.toString.call(e);
379
379
  return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
380
380
  }
381
381
  function N(e, t) {
382
382
  return e instanceof Date ? new e.constructor(t) : new Date(t);
383
383
  }
384
- const tn = 6048e5, yr = 864e5, nn = 6e4, rn = 36e5, Es = 525600, ie = 43200, lt = 1440;
385
- let wr = {};
384
+ const tn = 6048e5, yr = 864e5, nn = 6e4, rn = 36e5, Es = 525600, oe = 43200, ft = 1440;
385
+ let pr = {};
386
386
  function j() {
387
- return wr;
387
+ return pr;
388
388
  }
389
- function B(e, t) {
389
+ function V(e, t) {
390
390
  var s, c, u, l;
391
- const n = j(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = w(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
391
+ const n = j(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = p(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
392
392
  return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
393
393
  }
394
- function ye(e) {
395
- return B(e, { weekStartsOn: 1 });
394
+ function we(e) {
395
+ return V(e, { weekStartsOn: 1 });
396
396
  }
397
397
  function an(e) {
398
- const t = w(e), n = t.getFullYear(), r = N(e, 0);
398
+ const t = p(e), n = t.getFullYear(), r = N(e, 0);
399
399
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
400
- const a = ye(r), i = N(e, 0);
400
+ const a = we(r), i = N(e, 0);
401
401
  i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
402
- const o = ye(i);
402
+ const o = we(i);
403
403
  return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
404
404
  }
405
- function mt(e) {
406
- const t = w(e);
405
+ function dt(e) {
406
+ const t = p(e);
407
407
  return t.setHours(0, 0, 0, 0), t;
408
408
  }
409
- function we(e) {
410
- const t = w(e), n = new Date(
409
+ function Te(e) {
410
+ const t = p(e), n = new Date(
411
411
  Date.UTC(
412
412
  t.getFullYear(),
413
413
  t.getMonth(),
@@ -420,32 +420,32 @@ function we(e) {
420
420
  );
421
421
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
422
422
  }
423
- function pr(e, t) {
424
- const n = mt(e), r = mt(t), a = +n - we(n), i = +r - we(r);
423
+ function wr(e, t) {
424
+ const n = dt(e), r = dt(t), a = +n - Te(n), i = +r - Te(r);
425
425
  return Math.round((a - i) / yr);
426
426
  }
427
427
  function Tr(e) {
428
428
  const t = an(e), n = N(e, 0);
429
- return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), ye(n);
429
+ return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), we(n);
430
430
  }
431
- function ue(e, t) {
432
- const n = w(e), r = w(t), a = n.getTime() - r.getTime();
431
+ function le(e, t) {
432
+ const n = p(e), r = p(t), a = n.getTime() - r.getTime();
433
433
  return a < 0 ? -1 : a > 0 ? 1 : a;
434
434
  }
435
- function xr(e) {
435
+ function Dr(e) {
436
436
  return N(e, Date.now());
437
437
  }
438
- function Dr(e) {
438
+ function br(e) {
439
439
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
440
440
  }
441
- function br(e) {
442
- if (!Dr(e) && typeof e != "number")
441
+ function xr(e) {
442
+ if (!br(e) && typeof e != "number")
443
443
  return !1;
444
- const t = w(e);
444
+ const t = p(e);
445
445
  return !isNaN(Number(t));
446
446
  }
447
447
  function vr(e, t) {
448
- const n = w(e), r = w(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
448
+ const n = p(e), r = p(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
449
449
  return a * 12 + i;
450
450
  }
451
451
  function Sr(e) {
@@ -455,22 +455,22 @@ function Sr(e) {
455
455
  };
456
456
  }
457
457
  function Mr(e, t) {
458
- return +w(e) - +w(t);
458
+ return +p(e) - +p(t);
459
459
  }
460
460
  function kr(e) {
461
- const t = w(e);
461
+ const t = p(e);
462
462
  return t.setHours(23, 59, 59, 999), t;
463
463
  }
464
464
  function _r(e) {
465
- const t = w(e), n = t.getMonth();
465
+ const t = p(e), n = t.getMonth();
466
466
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
467
467
  }
468
468
  function Nr(e) {
469
- const t = w(e);
469
+ const t = p(e);
470
470
  return +kr(t) == +_r(t);
471
471
  }
472
472
  function $r(e, t) {
473
- const n = w(e), r = w(t), a = ue(n, r), i = Math.abs(
473
+ const n = p(e), r = p(t), a = le(n, r), i = Math.abs(
474
474
  vr(n, r)
475
475
  );
476
476
  let o;
@@ -478,8 +478,8 @@ function $r(e, t) {
478
478
  o = 0;
479
479
  else {
480
480
  n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
481
- let s = ue(n, r) === -a;
482
- Nr(w(e)) && i === 1 && ue(e, r) === 1 && (s = !1), o = a * (i - Number(s));
481
+ let s = le(n, r) === -a;
482
+ Nr(p(e)) && i === 1 && le(e, r) === 1 && (s = !1), o = a * (i - Number(s));
483
483
  }
484
484
  return o === 0 ? 0 : o;
485
485
  }
@@ -488,7 +488,7 @@ function Er(e, t, n) {
488
488
  return Sr(n == null ? void 0 : n.roundingMethod)(r);
489
489
  }
490
490
  function Ir(e) {
491
- const t = w(e), n = N(e, 0);
491
+ const t = p(e), n = N(e, 0);
492
492
  return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
493
493
  }
494
494
  const Or = {
@@ -558,7 +558,7 @@ const Or = {
558
558
  const a = Or[e];
559
559
  return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
560
560
  };
561
- function _e(e) {
561
+ function $e(e) {
562
562
  return (t = {}) => {
563
563
  const n = t.width ? String(t.width) : e.defaultWidth;
564
564
  return e.formats[n] || e.formats[e.defaultWidth];
@@ -580,15 +580,15 @@ const Cr = {
580
580
  medium: "{{date}}, {{time}}",
581
581
  short: "{{date}}, {{time}}"
582
582
  }, zr = {
583
- date: _e({
583
+ date: $e({
584
584
  formats: Cr,
585
585
  defaultWidth: "full"
586
586
  }),
587
- time: _e({
587
+ time: $e({
588
588
  formats: Pr,
589
589
  defaultWidth: "full"
590
590
  }),
591
- dateTime: _e({
591
+ dateTime: $e({
592
592
  formats: Yr,
593
593
  defaultWidth: "full"
594
594
  })
@@ -771,9 +771,9 @@ function q(e) {
771
771
  const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
772
772
  if (!i)
773
773
  return null;
774
- const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Br(s, (f) => f.test(o)) : (
774
+ const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Vr(s, (f) => f.test(o)) : (
775
775
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
776
- Vr(s, (f) => f.test(o))
776
+ Br(s, (f) => f.test(o))
777
777
  );
778
778
  let u;
779
779
  u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
@@ -784,12 +784,12 @@ function q(e) {
784
784
  return { value: u, rest: l };
785
785
  };
786
786
  }
787
- function Vr(e, t) {
787
+ function Br(e, t) {
788
788
  for (const n in e)
789
789
  if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
790
790
  return n;
791
791
  }
792
- function Br(e, t) {
792
+ function Vr(e, t) {
793
793
  for (let n = 0; n < e.length; n++)
794
794
  if (t(e[n]))
795
795
  return n;
@@ -923,29 +923,29 @@ const Gr = /^(\d+)(th|st|nd|rd)?/i, Qr = /\d+/i, Jr = {
923
923
  }
924
924
  };
925
925
  function la(e) {
926
- const t = w(e);
927
- return pr(t, Ir(t)) + 1;
926
+ const t = p(e);
927
+ return wr(t, Ir(t)) + 1;
928
928
  }
929
929
  function ma(e) {
930
- const t = w(e), n = +ye(t) - +Tr(t);
930
+ const t = p(e), n = +we(t) - +Tr(t);
931
931
  return Math.round(n / tn) + 1;
932
932
  }
933
933
  function sn(e, t) {
934
934
  var l, f, m, h;
935
- const n = w(e), r = n.getFullYear(), a = j(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (l = t == null ? void 0 : t.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((h = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = N(e, 0);
935
+ const n = p(e), r = n.getFullYear(), a = j(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (l = t == null ? void 0 : t.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((h = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = N(e, 0);
936
936
  o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
937
- const s = B(o, t), c = N(e, 0);
937
+ const s = V(o, t), c = N(e, 0);
938
938
  c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
939
- const u = B(c, t);
939
+ const u = V(c, t);
940
940
  return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
941
941
  }
942
942
  function fa(e, t) {
943
943
  var s, c, u, l;
944
944
  const n = j(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = sn(e, t), i = N(e, 0);
945
- return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), B(i, t);
945
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), V(i, t);
946
946
  }
947
947
  function da(e, t) {
948
- const n = w(e), r = +B(n, t) - +fa(n, t);
948
+ const n = p(e), r = +V(n, t) - +fa(n, t);
949
949
  return Math.round(r / tn) + 1;
950
950
  }
951
951
  function y(e, t) {
@@ -1013,7 +1013,7 @@ const k = {
1013
1013
  afternoon: "afternoon",
1014
1014
  evening: "evening",
1015
1015
  night: "night"
1016
- }, ft = {
1016
+ }, ht = {
1017
1017
  // Era
1018
1018
  G: function(e, t, n) {
1019
1019
  const r = e.getFullYear() > 0 ? 1 : 0;
@@ -1439,7 +1439,7 @@ const k = {
1439
1439
  return "Z";
1440
1440
  switch (t) {
1441
1441
  case "X":
1442
- return ht(r);
1442
+ return yt(r);
1443
1443
  case "XXXX":
1444
1444
  case "XX":
1445
1445
  return I(r);
@@ -1454,7 +1454,7 @@ const k = {
1454
1454
  const r = e.getTimezoneOffset();
1455
1455
  switch (t) {
1456
1456
  case "x":
1457
- return ht(r);
1457
+ return yt(r);
1458
1458
  case "xxxx":
1459
1459
  case "xx":
1460
1460
  return I(r);
@@ -1471,7 +1471,7 @@ const k = {
1471
1471
  case "O":
1472
1472
  case "OO":
1473
1473
  case "OOO":
1474
- return "GMT" + dt(r, ":");
1474
+ return "GMT" + gt(r, ":");
1475
1475
  case "OOOO":
1476
1476
  default:
1477
1477
  return "GMT" + I(r, ":");
@@ -1484,7 +1484,7 @@ const k = {
1484
1484
  case "z":
1485
1485
  case "zz":
1486
1486
  case "zzz":
1487
- return "GMT" + dt(r, ":");
1487
+ return "GMT" + gt(r, ":");
1488
1488
  case "zzzz":
1489
1489
  default:
1490
1490
  return "GMT" + I(r, ":");
@@ -1501,18 +1501,18 @@ const k = {
1501
1501
  return y(r, t.length);
1502
1502
  }
1503
1503
  };
1504
- function dt(e, t = "") {
1504
+ function gt(e, t = "") {
1505
1505
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
1506
1506
  return i === 0 ? n + String(a) : n + String(a) + t + y(i, 2);
1507
1507
  }
1508
- function ht(e, t) {
1508
+ function yt(e, t) {
1509
1509
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + y(Math.abs(e) / 60, 2) : I(e, t);
1510
1510
  }
1511
1511
  function I(e, t = "") {
1512
1512
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = y(Math.trunc(r / 60), 2), i = y(r % 60, 2);
1513
1513
  return n + a + t + i;
1514
1514
  }
1515
- const gt = (e, t) => {
1515
+ const pt = (e, t) => {
1516
1516
  switch (e) {
1517
1517
  case "P":
1518
1518
  return t.date({ width: "short" });
@@ -1539,7 +1539,7 @@ const gt = (e, t) => {
1539
1539
  }, ha = (e, t) => {
1540
1540
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1541
1541
  if (!a)
1542
- return gt(e, t);
1542
+ return pt(e, t);
1543
1543
  let i;
1544
1544
  switch (r) {
1545
1545
  case "P":
@@ -1556,49 +1556,49 @@ const gt = (e, t) => {
1556
1556
  i = t.dateTime({ width: "full" });
1557
1557
  break;
1558
1558
  }
1559
- return i.replace("{{date}}", gt(r, t)).replace("{{time}}", cn(a, t));
1559
+ return i.replace("{{date}}", pt(r, t)).replace("{{time}}", cn(a, t));
1560
1560
  }, ga = {
1561
1561
  p: cn,
1562
1562
  P: ha
1563
- }, ya = /^D+$/, wa = /^Y+$/, pa = ["D", "DD", "YY", "YYYY"];
1563
+ }, ya = /^D+$/, pa = /^Y+$/, wa = ["D", "DD", "YY", "YYYY"];
1564
1564
  function Ta(e) {
1565
1565
  return ya.test(e);
1566
1566
  }
1567
- function xa(e) {
1568
- return wa.test(e);
1569
- }
1570
- function Da(e, t, n) {
1571
- const r = ba(e, t, n);
1572
- if (console.warn(r), pa.includes(e)) throw new RangeError(r);
1567
+ function Da(e) {
1568
+ return pa.test(e);
1573
1569
  }
1574
1570
  function ba(e, t, n) {
1571
+ const r = xa(e, t, n);
1572
+ if (console.warn(r), wa.includes(e)) throw new RangeError(r);
1573
+ }
1574
+ function xa(e, t, n) {
1575
1575
  const r = e[0] === "Y" ? "years" : "days of the month";
1576
1576
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1577
1577
  }
1578
1578
  const va = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Sa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ma = /^'([^]*?)'?$/, ka = /''/g, _a = /[a-zA-Z]/;
1579
- function Ve(e, t, n) {
1580
- var l, f, m, h, d, S, tt, nt;
1581
- const r = j(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? on, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((S = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : S.weekStartsOn) ?? r.weekStartsOn ?? ((nt = (tt = r.locale) == null ? void 0 : tt.options) == null ? void 0 : nt.weekStartsOn) ?? 0, s = w(e);
1582
- if (!br(s))
1579
+ function Ke(e, t, n) {
1580
+ var l, f, m, h, d, S, rt, at;
1581
+ const r = j(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? on, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((S = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : S.weekStartsOn) ?? r.weekStartsOn ?? ((at = (rt = r.locale) == null ? void 0 : rt.options) == null ? void 0 : at.weekStartsOn) ?? 0, s = p(e);
1582
+ if (!xr(s))
1583
1583
  throw new RangeError("Invalid time value");
1584
1584
  let c = t.match(Sa).map((v) => {
1585
- const b = v[0];
1586
- if (b === "p" || b === "P") {
1587
- const ke = ga[b];
1588
- return ke(v, a.formatLong);
1585
+ const x = v[0];
1586
+ if (x === "p" || x === "P") {
1587
+ const Ne = ga[x];
1588
+ return Ne(v, a.formatLong);
1589
1589
  }
1590
1590
  return v;
1591
1591
  }).join("").match(va).map((v) => {
1592
1592
  if (v === "''")
1593
1593
  return { isToken: !1, value: "'" };
1594
- const b = v[0];
1595
- if (b === "'")
1594
+ const x = v[0];
1595
+ if (x === "'")
1596
1596
  return { isToken: !1, value: Na(v) };
1597
- if (ft[b])
1597
+ if (ht[x])
1598
1598
  return { isToken: !0, value: v };
1599
- if (b.match(_a))
1599
+ if (x.match(_a))
1600
1600
  throw new RangeError(
1601
- "Format string contains an unescaped latin alphabet character `" + b + "`"
1601
+ "Format string contains an unescaped latin alphabet character `" + x + "`"
1602
1602
  );
1603
1603
  return { isToken: !1, value: v };
1604
1604
  });
@@ -1610,10 +1610,10 @@ function Ve(e, t, n) {
1610
1610
  };
1611
1611
  return c.map((v) => {
1612
1612
  if (!v.isToken) return v.value;
1613
- const b = v.value;
1614
- (!(n != null && n.useAdditionalWeekYearTokens) && xa(b) || !(n != null && n.useAdditionalDayOfYearTokens) && Ta(b)) && Da(b, t, String(e));
1615
- const ke = ft[b[0]];
1616
- return ke(s, b, a.localize, u);
1613
+ const x = v.value;
1614
+ (!(n != null && n.useAdditionalWeekYearTokens) && Da(x) || !(n != null && n.useAdditionalDayOfYearTokens) && Ta(x)) && ba(x, t, String(e));
1615
+ const Ne = ht[x[0]];
1616
+ return Ne(s, x, a.localize, u);
1617
1617
  }).join("");
1618
1618
  }
1619
1619
  function Na(e) {
@@ -1621,7 +1621,7 @@ function Na(e) {
1621
1621
  return t ? t[1].replace(ka, "'") : e;
1622
1622
  }
1623
1623
  function $a(e, t, n) {
1624
- const r = j(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? on, i = 2520, o = ue(e, t);
1624
+ const r = j(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? on, i = 2520, o = le(e, t);
1625
1625
  if (isNaN(o))
1626
1626
  throw new RangeError("Invalid time value");
1627
1627
  const s = Object.assign({}, n, {
@@ -1629,8 +1629,8 @@ function $a(e, t, n) {
1629
1629
  comparison: o
1630
1630
  });
1631
1631
  let c, u;
1632
- o > 0 ? (c = w(t), u = w(e)) : (c = w(e), u = w(t));
1633
- const l = Er(u, c), f = (we(u) - we(c)) / 1e3, m = Math.round((l - f) / 60);
1632
+ o > 0 ? (c = p(t), u = p(e)) : (c = p(e), u = p(t));
1633
+ const l = Er(u, c), f = (Te(u) - Te(c)) / 1e3, m = Math.round((l - f) / 60);
1634
1634
  let h;
1635
1635
  if (m < 2)
1636
1636
  return n != null && n.includeSeconds ? l < 5 ? a.formatDistance("lessThanXSeconds", 5, s) : l < 10 ? a.formatDistance("lessThanXSeconds", 10, s) : l < 20 ? a.formatDistance("lessThanXSeconds", 20, s) : l < 40 ? a.formatDistance("halfAMinute", 0, s) : l < 60 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", 1, s) : m === 0 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", m, s);
@@ -1638,20 +1638,20 @@ function $a(e, t, n) {
1638
1638
  return a.formatDistance("xMinutes", m, s);
1639
1639
  if (m < 90)
1640
1640
  return a.formatDistance("aboutXHours", 1, s);
1641
- if (m < lt) {
1641
+ if (m < ft) {
1642
1642
  const d = Math.round(m / 60);
1643
1643
  return a.formatDistance("aboutXHours", d, s);
1644
1644
  } else {
1645
1645
  if (m < i)
1646
1646
  return a.formatDistance("xDays", 1, s);
1647
- if (m < ie) {
1648
- const d = Math.round(m / lt);
1647
+ if (m < oe) {
1648
+ const d = Math.round(m / ft);
1649
1649
  return a.formatDistance("xDays", d, s);
1650
- } else if (m < ie * 2)
1651
- return h = Math.round(m / ie), a.formatDistance("aboutXMonths", h, s);
1650
+ } else if (m < oe * 2)
1651
+ return h = Math.round(m / oe), a.formatDistance("aboutXMonths", h, s);
1652
1652
  }
1653
1653
  if (h = $r(u, c), h < 12) {
1654
- const d = Math.round(m / ie);
1654
+ const d = Math.round(m / oe);
1655
1655
  return a.formatDistance("xMonths", d, s);
1656
1656
  } else {
1657
1657
  const d = h % 12, S = Math.trunc(h / 12);
@@ -1659,7 +1659,7 @@ function $a(e, t, n) {
1659
1659
  }
1660
1660
  }
1661
1661
  function Ea(e, t) {
1662
- return $a(e, xr(e), t);
1662
+ return $a(e, Dr(e), t);
1663
1663
  }
1664
1664
  function Ia() {
1665
1665
  return Object.assign({}, j());
@@ -1695,21 +1695,21 @@ function Is(e, t) {
1695
1695
  }
1696
1696
  return new Date(i + o + s);
1697
1697
  }
1698
- const oe = {
1698
+ const se = {
1699
1699
  dateTimeDelimiter: /[T ]/,
1700
1700
  timeZoneDelimiter: /[Z ]/i,
1701
1701
  timezone: /([Z+-].*)$/
1702
1702
  }, Oa = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Fa = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Ca = /^([+-])(\d{2})(?::?(\d{2}))?$/;
1703
1703
  function Pa(e) {
1704
- const t = {}, n = e.split(oe.dateTimeDelimiter);
1704
+ const t = {}, n = e.split(se.dateTimeDelimiter);
1705
1705
  let r;
1706
1706
  if (n.length > 2)
1707
1707
  return t;
1708
- if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], oe.timeZoneDelimiter.test(t.date) && (t.date = e.split(oe.timeZoneDelimiter)[0], r = e.substr(
1708
+ if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], se.timeZoneDelimiter.test(t.date) && (t.date = e.split(se.timeZoneDelimiter)[0], r = e.substr(
1709
1709
  t.date.length,
1710
1710
  e.length
1711
1711
  ))), r) {
1712
- const a = oe.timezone.exec(r);
1712
+ const a = se.timezone.exec(r);
1713
1713
  a ? (t.time = r.replace(a[1], ""), t.timezone = a[1]) : t.time = r;
1714
1714
  }
1715
1715
  return t;
@@ -1743,10 +1743,10 @@ function Z(e) {
1743
1743
  function Aa(e) {
1744
1744
  const t = e.match(Fa);
1745
1745
  if (!t) return NaN;
1746
- const n = Ne(t[1]), r = Ne(t[2]), a = Ne(t[3]);
1746
+ const n = Ee(t[1]), r = Ee(t[2]), a = Ee(t[3]);
1747
1747
  return qa(n, r, a) ? n * rn + r * nn + a * 1e3 : NaN;
1748
1748
  }
1749
- function Ne(e) {
1749
+ function Ee(e) {
1750
1750
  return e && parseFloat(e.replace(",", ".")) || 0;
1751
1751
  }
1752
1752
  function Ra(e) {
@@ -1781,9 +1781,9 @@ function qa(e, t, n) {
1781
1781
  function Za(e, t) {
1782
1782
  return t >= 0 && t <= 59;
1783
1783
  }
1784
- function yt(e, t, n) {
1785
- const r = Ia(), a = Ba(e, n.timeZone, n.locale ?? r.locale);
1786
- return "formatToParts" in a ? Xa(a, t) : Va(a, t);
1784
+ function wt(e, t, n) {
1785
+ const r = Ia(), a = Va(e, n.timeZone, n.locale ?? r.locale);
1786
+ return "formatToParts" in a ? Xa(a, t) : Ba(a, t);
1787
1787
  }
1788
1788
  function Xa(e, t) {
1789
1789
  const n = e.formatToParts(t);
@@ -1791,11 +1791,11 @@ function Xa(e, t) {
1791
1791
  if (n[r].type === "timeZoneName")
1792
1792
  return n[r].value;
1793
1793
  }
1794
- function Va(e, t) {
1794
+ function Ba(e, t) {
1795
1795
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1796
1796
  return r ? r[0].substr(1) : "";
1797
1797
  }
1798
- function Ba(e, t, n) {
1798
+ function Va(e, t, n) {
1799
1799
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1800
1800
  timeZone: t,
1801
1801
  timeZoneName: e
@@ -1838,7 +1838,7 @@ function Ja(e, t) {
1838
1838
  parseInt(r[6], 10)
1839
1839
  ];
1840
1840
  }
1841
- const $e = {}, wt = new Intl.DateTimeFormat("en-US", {
1841
+ const Ie = {}, Tt = new Intl.DateTimeFormat("en-US", {
1842
1842
  hourCycle: "h23",
1843
1843
  timeZone: "America/New_York",
1844
1844
  year: "numeric",
@@ -1847,9 +1847,9 @@ const $e = {}, wt = new Intl.DateTimeFormat("en-US", {
1847
1847
  hour: "2-digit",
1848
1848
  minute: "2-digit",
1849
1849
  second: "2-digit"
1850
- }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), ei = wt === "06/25/2014, 00:00:00" || wt === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1850
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), ei = Tt === "06/25/2014, 00:00:00" || Tt === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
1851
1851
  function ti(e) {
1852
- return $e[e] || ($e[e] = ei ? new Intl.DateTimeFormat("en-US", {
1852
+ return Ie[e] || (Ie[e] = ei ? new Intl.DateTimeFormat("en-US", {
1853
1853
  hourCycle: "h23",
1854
1854
  timeZone: e,
1855
1855
  year: "numeric",
@@ -1867,57 +1867,57 @@ function ti(e) {
1867
1867
  hour: "2-digit",
1868
1868
  minute: "2-digit",
1869
1869
  second: "2-digit"
1870
- })), $e[e];
1870
+ })), Ie[e];
1871
1871
  }
1872
- function Be(e, t, n, r, a, i, o) {
1872
+ function Ge(e, t, n, r, a, i, o) {
1873
1873
  const s = /* @__PURE__ */ new Date(0);
1874
1874
  return s.setUTCFullYear(e, t, n), s.setUTCHours(r, a, i, o), s;
1875
1875
  }
1876
- const pt = 36e5, ni = 6e4, Ee = {
1876
+ const Dt = 36e5, ni = 6e4, Oe = {
1877
1877
  timezoneZ: /^(Z)$/,
1878
1878
  timezoneHH: /^([+-]\d{2})$/,
1879
1879
  timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
1880
1880
  };
1881
- function ve(e, t, n) {
1881
+ function ke(e, t, n) {
1882
1882
  if (!e)
1883
1883
  return 0;
1884
- let r = Ee.timezoneZ.exec(e);
1884
+ let r = Oe.timezoneZ.exec(e);
1885
1885
  if (r)
1886
1886
  return 0;
1887
1887
  let a, i;
1888
- if (r = Ee.timezoneHH.exec(e), r)
1889
- return a = parseInt(r[1], 10), Tt(a) ? -(a * pt) : NaN;
1890
- if (r = Ee.timezoneHHMM.exec(e), r) {
1888
+ if (r = Oe.timezoneHH.exec(e), r)
1889
+ return a = parseInt(r[1], 10), bt(a) ? -(a * Dt) : NaN;
1890
+ if (r = Oe.timezoneHHMM.exec(e), r) {
1891
1891
  a = parseInt(r[2], 10);
1892
1892
  const o = parseInt(r[3], 10);
1893
- return Tt(a, o) ? (i = Math.abs(a) * pt + o * ni, r[1] === "+" ? -i : i) : NaN;
1893
+ return bt(a, o) ? (i = Math.abs(a) * Dt + o * ni, r[1] === "+" ? -i : i) : NaN;
1894
1894
  }
1895
1895
  if (ii(e)) {
1896
1896
  t = new Date(t || Date.now());
1897
- const o = n ? t : ri(t), s = We(o, e);
1897
+ const o = n ? t : ri(t), s = He(o, e);
1898
1898
  return -(n ? s : ai(t, s, e));
1899
1899
  }
1900
1900
  return NaN;
1901
1901
  }
1902
1902
  function ri(e) {
1903
- return Be(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
1903
+ return Ge(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
1904
1904
  }
1905
- function We(e, t) {
1906
- const n = Ka(e, t), r = Be(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1905
+ function He(e, t) {
1906
+ const n = Ka(e, t), r = Ge(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
1907
1907
  let a = e.getTime();
1908
1908
  const i = a % 1e3;
1909
1909
  return a -= i >= 0 ? i : 1e3 + i, r - a;
1910
1910
  }
1911
1911
  function ai(e, t, n) {
1912
1912
  let a = e.getTime() - t;
1913
- const i = We(new Date(a), n);
1913
+ const i = He(new Date(a), n);
1914
1914
  if (t === i)
1915
1915
  return t;
1916
1916
  a -= i - t;
1917
- const o = We(new Date(a), n);
1917
+ const o = He(new Date(a), n);
1918
1918
  return i === o ? i : Math.max(i, o);
1919
1919
  }
1920
- function Tt(e, t) {
1920
+ function bt(e, t) {
1921
1921
  return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
1922
1922
  }
1923
1923
  const xt = {};
@@ -1933,12 +1933,12 @@ function ii(e) {
1933
1933
  const oi = 60 * 1e3, si = {
1934
1934
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1935
1935
  X: function(e, t, n) {
1936
- const r = Ie(n.timeZone, e);
1936
+ const r = Fe(n.timeZone, e);
1937
1937
  if (r === 0)
1938
1938
  return "Z";
1939
1939
  switch (t) {
1940
1940
  case "X":
1941
- return Dt(r);
1941
+ return vt(r);
1942
1942
  case "XXXX":
1943
1943
  case "XX":
1944
1944
  return C(r);
@@ -1950,10 +1950,10 @@ const oi = 60 * 1e3, si = {
1950
1950
  },
1951
1951
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1952
1952
  x: function(e, t, n) {
1953
- const r = Ie(n.timeZone, e);
1953
+ const r = Fe(n.timeZone, e);
1954
1954
  switch (t) {
1955
1955
  case "x":
1956
- return Dt(r);
1956
+ return vt(r);
1957
1957
  case "xxxx":
1958
1958
  case "xx":
1959
1959
  return C(r);
@@ -1965,7 +1965,7 @@ const oi = 60 * 1e3, si = {
1965
1965
  },
1966
1966
  // Timezone (GMT)
1967
1967
  O: function(e, t, n) {
1968
- const r = Ie(n.timeZone, e);
1968
+ const r = Fe(n.timeZone, e);
1969
1969
  switch (t) {
1970
1970
  case "O":
1971
1971
  case "OO":
@@ -1982,20 +1982,20 @@ const oi = 60 * 1e3, si = {
1982
1982
  case "z":
1983
1983
  case "zz":
1984
1984
  case "zzz":
1985
- return yt("short", e, n);
1985
+ return wt("short", e, n);
1986
1986
  case "zzzz":
1987
1987
  default:
1988
- return yt("long", e, n);
1988
+ return wt("long", e, n);
1989
1989
  }
1990
1990
  }
1991
1991
  };
1992
- function Ie(e, t) {
1993
- const n = e ? ve(e, t, !0) / oi : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1992
+ function Fe(e, t) {
1993
+ const n = e ? ke(e, t, !0) / oi : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1994
1994
  if (Number.isNaN(n))
1995
1995
  throw new RangeError("Invalid time zone specified: " + e);
1996
1996
  return n;
1997
1997
  }
1998
- function pe(e, t) {
1998
+ function De(e, t) {
1999
1999
  const n = e < 0 ? "-" : "";
2000
2000
  let r = Math.abs(e).toString();
2001
2001
  for (; r.length < t; )
@@ -2003,21 +2003,21 @@ function pe(e, t) {
2003
2003
  return n + r;
2004
2004
  }
2005
2005
  function C(e, t = "") {
2006
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = pe(Math.floor(r / 60), 2), i = pe(Math.floor(r % 60), 2);
2006
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = De(Math.floor(r / 60), 2), i = De(Math.floor(r % 60), 2);
2007
2007
  return n + a + t + i;
2008
2008
  }
2009
- function Dt(e, t) {
2010
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + pe(Math.abs(e) / 60, 2) : C(e, t);
2009
+ function vt(e, t) {
2010
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + De(Math.abs(e) / 60, 2) : C(e, t);
2011
2011
  }
2012
2012
  function ci(e, t = "") {
2013
2013
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
2014
- return i === 0 ? n + String(a) : n + String(a) + t + pe(i, 2);
2014
+ return i === 0 ? n + String(a) : n + String(a) + t + De(i, 2);
2015
2015
  }
2016
- function bt(e) {
2016
+ function St(e) {
2017
2017
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
2018
2018
  return t.setUTCFullYear(e.getFullYear()), +e - +t;
2019
2019
  }
2020
- const ln = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Oe = 36e5, vt = 6e4, ui = 2, D = {
2020
+ const ln = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Ce = 36e5, Mt = 6e4, ui = 2, b = {
2021
2021
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
2022
2022
  datePattern: /^([0-9W+-]+)(.*)/,
2023
2023
  // year tokens
@@ -2051,7 +2051,7 @@ const ln = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
2051
2051
  // time zone tokens (to identify the presence of a tz)
2052
2052
  timeZone: ln
2053
2053
  };
2054
- function Te(e, t = {}) {
2054
+ function be(e, t = {}) {
2055
2055
  if (arguments.length < 1)
2056
2056
  throw new TypeError("1 argument required, but only " + arguments.length + " present");
2057
2057
  if (e === null)
@@ -2074,27 +2074,27 @@ function Te(e, t = {}) {
2074
2074
  if (r.time && (c = di(r.time), c === null || isNaN(c)))
2075
2075
  return /* @__PURE__ */ new Date(NaN);
2076
2076
  if (r.timeZone || t.timeZone) {
2077
- if (u = ve(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
2077
+ if (u = ke(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
2078
2078
  return /* @__PURE__ */ new Date(NaN);
2079
2079
  } else
2080
- u = bt(new Date(s + c)), u = bt(new Date(s + c + u));
2080
+ u = St(new Date(s + c)), u = St(new Date(s + c + u));
2081
2081
  return new Date(s + c + u);
2082
2082
  } else
2083
2083
  return /* @__PURE__ */ new Date(NaN);
2084
2084
  }
2085
2085
  function li(e) {
2086
2086
  const t = {};
2087
- let n = D.dateTimePattern.exec(e), r;
2088
- if (n ? (t.date = n[1], r = n[3]) : (n = D.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
2089
- const a = D.timeZone.exec(r);
2087
+ let n = b.dateTimePattern.exec(e), r;
2088
+ if (n ? (t.date = n[1], r = n[3]) : (n = b.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
2089
+ const a = b.timeZone.exec(r);
2090
2090
  a ? (t.time = r.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = r;
2091
2091
  }
2092
2092
  return t;
2093
2093
  }
2094
2094
  function mi(e, t) {
2095
2095
  if (e) {
2096
- const n = D.YYY[t], r = D.YYYYY[t];
2097
- let a = D.YYYY.exec(e) || r.exec(e);
2096
+ const n = b.YYY[t], r = b.YYYYY[t];
2097
+ let a = b.YYYY.exec(e) || r.exec(e);
2098
2098
  if (a) {
2099
2099
  const i = a[1];
2100
2100
  return {
@@ -2102,7 +2102,7 @@ function mi(e, t) {
2102
2102
  restDateString: e.slice(i.length)
2103
2103
  };
2104
2104
  }
2105
- if (a = D.YY.exec(e) || n.exec(e), a) {
2105
+ if (a = b.YY.exec(e) || n.exec(e), a) {
2106
2106
  const i = a[1];
2107
2107
  return {
2108
2108
  year: parseInt(i, 10) * 100,
@@ -2120,42 +2120,42 @@ function fi(e, t) {
2120
2120
  let n, r, a;
2121
2121
  if (!e || !e.length)
2122
2122
  return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
2123
- let i = D.MM.exec(e);
2123
+ let i = b.MM.exec(e);
2124
2124
  if (i)
2125
- return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, Mt(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
2126
- if (i = D.DDD.exec(e), i) {
2125
+ return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, _t(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
2126
+ if (i = b.DDD.exec(e), i) {
2127
2127
  n = /* @__PURE__ */ new Date(0);
2128
2128
  const o = parseInt(i[1], 10);
2129
2129
  return yi(t, o) ? (n.setUTCFullYear(t, 0, o), n) : /* @__PURE__ */ new Date(NaN);
2130
2130
  }
2131
- if (i = D.MMDD.exec(e), i) {
2131
+ if (i = b.MMDD.exec(e), i) {
2132
2132
  n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
2133
2133
  const o = parseInt(i[2], 10);
2134
- return Mt(t, r, o) ? (n.setUTCFullYear(t, r, o), n) : /* @__PURE__ */ new Date(NaN);
2134
+ return _t(t, r, o) ? (n.setUTCFullYear(t, r, o), n) : /* @__PURE__ */ new Date(NaN);
2135
2135
  }
2136
- if (i = D.Www.exec(e), i)
2137
- return a = parseInt(i[1], 10) - 1, kt(a) ? St(t, a) : /* @__PURE__ */ new Date(NaN);
2138
- if (i = D.WwwD.exec(e), i) {
2136
+ if (i = b.Www.exec(e), i)
2137
+ return a = parseInt(i[1], 10) - 1, Nt(a) ? kt(t, a) : /* @__PURE__ */ new Date(NaN);
2138
+ if (i = b.WwwD.exec(e), i) {
2139
2139
  a = parseInt(i[1], 10) - 1;
2140
2140
  const o = parseInt(i[2], 10) - 1;
2141
- return kt(a, o) ? St(t, a, o) : /* @__PURE__ */ new Date(NaN);
2141
+ return Nt(a, o) ? kt(t, a, o) : /* @__PURE__ */ new Date(NaN);
2142
2142
  }
2143
2143
  return null;
2144
2144
  }
2145
2145
  function di(e) {
2146
- let t, n, r = D.HH.exec(e);
2146
+ let t, n, r = b.HH.exec(e);
2147
2147
  if (r)
2148
- return t = parseFloat(r[1].replace(",", ".")), Fe(t) ? t % 24 * Oe : NaN;
2149
- if (r = D.HHMM.exec(e), r)
2150
- return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Fe(t, n) ? t % 24 * Oe + n * vt : NaN;
2151
- if (r = D.HHMMSS.exec(e), r) {
2148
+ return t = parseFloat(r[1].replace(",", ".")), Pe(t) ? t % 24 * Ce : NaN;
2149
+ if (r = b.HHMM.exec(e), r)
2150
+ return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Pe(t, n) ? t % 24 * Ce + n * Mt : NaN;
2151
+ if (r = b.HHMMSS.exec(e), r) {
2152
2152
  t = parseInt(r[1], 10), n = parseInt(r[2], 10);
2153
2153
  const a = parseFloat(r[3].replace(",", "."));
2154
- return Fe(t, n, a) ? t % 24 * Oe + n * vt + a * 1e3 : NaN;
2154
+ return Pe(t, n, a) ? t % 24 * Ce + n * Mt + a * 1e3 : NaN;
2155
2155
  }
2156
2156
  return null;
2157
2157
  }
2158
- function St(e, t, n) {
2158
+ function kt(e, t, n) {
2159
2159
  t = t || 0, n = n || 0;
2160
2160
  const r = /* @__PURE__ */ new Date(0);
2161
2161
  r.setUTCFullYear(e, 0, 4);
@@ -2166,7 +2166,7 @@ const hi = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], gi = [31, 29, 31, 3
2166
2166
  function mn(e) {
2167
2167
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
2168
2168
  }
2169
- function Mt(e, t, n) {
2169
+ function _t(e, t, n) {
2170
2170
  if (t < 0 || t > 11)
2171
2171
  return !1;
2172
2172
  if (n != null) {
@@ -2184,18 +2184,18 @@ function yi(e, t) {
2184
2184
  const n = mn(e);
2185
2185
  return !(n && t > 366 || !n && t > 365);
2186
2186
  }
2187
- function kt(e, t) {
2187
+ function Nt(e, t) {
2188
2188
  return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
2189
2189
  }
2190
- function Fe(e, t, n) {
2190
+ function Pe(e, t, n) {
2191
2191
  return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
2192
2192
  }
2193
- const wi = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
2194
- function pi(e, t, n = {}) {
2193
+ const pi = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
2194
+ function wi(e, t, n = {}) {
2195
2195
  t = String(t);
2196
- const r = t.match(wi);
2196
+ const r = t.match(pi);
2197
2197
  if (r) {
2198
- const a = Te(n.originalDate || e, n);
2198
+ const a = be(n.originalDate || e, n);
2199
2199
  t = r.reduce(function(i, o) {
2200
2200
  if (o[0] === "'")
2201
2201
  return i;
@@ -2203,11 +2203,11 @@ function pi(e, t, n = {}) {
2203
2203
  return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
2204
2204
  }, t);
2205
2205
  }
2206
- return Ve(e, t, n);
2206
+ return Ke(e, t, n);
2207
2207
  }
2208
2208
  function Ti(e, t, n) {
2209
- e = Te(e, n);
2210
- const r = ve(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
2209
+ e = be(e, n);
2210
+ const r = ke(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
2211
2211
  return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
2212
2212
  }
2213
2213
  function fn(e, t, n, r) {
@@ -2215,13 +2215,13 @@ function fn(e, t, n, r) {
2215
2215
  ...r,
2216
2216
  timeZone: t,
2217
2217
  originalDate: e
2218
- }, pi(Ti(e, t, { timeZone: r.timeZone }), n, r);
2218
+ }, wi(Ti(e, t, { timeZone: r.timeZone }), n, r);
2219
2219
  }
2220
2220
  function te(e, t, n) {
2221
2221
  if (typeof e == "string" && !e.match(ln))
2222
- return Te(e, { ...n, timeZone: t });
2223
- e = Te(e, n);
2224
- const r = Be(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = ve(t, new Date(r));
2222
+ return be(e, { ...n, timeZone: t });
2223
+ e = be(e, n);
2224
+ const r = Ge(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = ke(t, new Date(r));
2225
2225
  return new Date(r + a);
2226
2226
  }
2227
2227
  function Os(e, t) {
@@ -2251,7 +2251,7 @@ function Cs(e) {
2251
2251
  return e;
2252
2252
  }
2253
2253
  }
2254
- function Ke(e, t = "auto") {
2254
+ function Qe(e, t = "auto") {
2255
2255
  if (!e)
2256
2256
  return /* @__PURE__ */ new Date(NaN);
2257
2257
  const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
@@ -2265,15 +2265,15 @@ function Ke(e, t = "auto") {
2265
2265
  return new Date(e);
2266
2266
  } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : te(e, t);
2267
2267
  }
2268
- const xi = "MM/dd/yyyy", Di = (e, t, n, r = "auto") => {
2268
+ const Di = "MM/dd/yyyy", bi = (e, t, n, r = "auto") => {
2269
2269
  if (!e)
2270
2270
  return "";
2271
2271
  try {
2272
- const a = Ke(e, r);
2272
+ const a = Qe(e, r);
2273
2273
  if (isNaN(a.getTime()))
2274
2274
  return e;
2275
- const o = (t && t.trim() ? t : xi).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
2276
- return n && n !== "auto" ? fn(a, n, o) : Ve(a, o);
2275
+ const o = (t && t.trim() ? t : Di).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
2276
+ return n && n !== "auto" ? fn(a, n, o) : Ke(a, o);
2277
2277
  } catch (a) {
2278
2278
  return console.error("Date formatting error:", a), e;
2279
2279
  }
@@ -2281,19 +2281,19 @@ const xi = "MM/dd/yyyy", Di = (e, t, n, r = "auto") => {
2281
2281
  function Ps(e, t, n = "auto") {
2282
2282
  if (e)
2283
2283
  try {
2284
- const r = Ke(e, n);
2284
+ const r = Qe(e, n);
2285
2285
  if (isNaN(r.getTime())) return;
2286
- const a = "yyyy M d H m s", i = t && t !== "auto" ? fn(r, t, a) : Ve(r, a), [o, s, c, u, l, f] = i.split(" ").map(Number);
2286
+ const a = "yyyy M d H m s", i = t && t !== "auto" ? fn(r, t, a) : Ke(r, a), [o, s, c, u, l, f] = i.split(" ").map(Number);
2287
2287
  return { year: o, month: s, day: c, hour: u, minute: l, second: f };
2288
2288
  } catch {
2289
2289
  return;
2290
2290
  }
2291
2291
  }
2292
- const bi = (e, t = "auto") => {
2292
+ const xi = (e, t = "auto") => {
2293
2293
  if (!e)
2294
2294
  return "";
2295
2295
  try {
2296
- const n = Ke(e, t);
2296
+ const n = Qe(e, t);
2297
2297
  return isNaN(n.getTime()) ? e : Ea(n, { addSuffix: !0 });
2298
2298
  } catch (n) {
2299
2299
  return console.error("Relative time formatting error:", n), e;
@@ -2302,12 +2302,12 @@ const bi = (e, t = "auto") => {
2302
2302
  function vi(e, t, n, r) {
2303
2303
  const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n, o = (r == null ? void 0 : r.isSqlCard) ?? !1;
2304
2304
  if (t != null && t.useRelativeTime)
2305
- return bi(
2305
+ return xi(
2306
2306
  a,
2307
2307
  (t == null ? void 0 : t.sourceTimezone) || "auto"
2308
2308
  );
2309
2309
  const s = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
2310
- return Di(
2310
+ return bi(
2311
2311
  a,
2312
2312
  s,
2313
2313
  t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : o ? i : n,
@@ -2365,7 +2365,7 @@ function Us(e) {
2365
2365
  function Ls(e) {
2366
2366
  return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= hn ? "direct" : e.loadedRowCount <= Si ? "background" : "blocked";
2367
2367
  }
2368
- const Mi = 5 * 1024 * 1024, Ws = 64 * 1024 * 1024, xe = p.number().int().positive().max(Number.MAX_SAFE_INTEGER), le = p.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER), De = le.refine((e) => e > 0), ki = (e) => !!e && e !== "." && e !== ".." && !e.includes("/") && !e.includes("\\");
2368
+ const Mi = 5 * 1024 * 1024, Ws = 64 * 1024 * 1024, xe = w.number().int().positive().max(Number.MAX_SAFE_INTEGER), me = w.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER), ve = me.refine((e) => e > 0), ki = (e) => !!e && e !== "." && e !== ".." && !e.includes("/") && !e.includes("\\");
2369
2369
  function P(e, t) {
2370
2370
  const n = t.split("/");
2371
2371
  if (n.length !== 5 || n[0] !== "exports" || n[1] !== e || n[2] !== "attempts" || !n.every(ki))
@@ -2376,23 +2376,23 @@ function js(e, t, n) {
2376
2376
  const r = `exports/${e}/attempts/${t}/${n}`;
2377
2377
  return P(e, r), r;
2378
2378
  }
2379
- const Hs = p.object({
2380
- acquisition: p.literal("continuation"),
2381
- jobId: p.string().min(1),
2382
- sequence: De,
2379
+ const Hs = w.object({
2380
+ acquisition: w.literal("continuation"),
2381
+ jobId: w.string().min(1),
2382
+ sequence: ve,
2383
2383
  deadlineAt: xe
2384
2384
  }), _i = [
2385
2385
  "application/json",
2386
- ...Wt.map((e) => jt(e).partContentType)
2387
- ], Ni = p.object({
2388
- key: p.string(),
2389
- content: p.string(),
2390
- contentType: p.enum(_i),
2391
- encoding: p.literal("gzip-base64").optional()
2386
+ ...jt.map((e) => Ht(e).partContentType)
2387
+ ], Ni = w.object({
2388
+ key: w.string(),
2389
+ content: w.string(),
2390
+ contentType: w.enum(_i),
2391
+ encoding: w.literal("gzip-base64").optional()
2392
2392
  // Transport-only compression: JSON (layout, sheet layout) and Excel rows. CSV travels as it always has.
2393
- }).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType === jt("xlsx").partContentType, "Unsupported Matrix artifact encoding."), $i = p.discriminatedUnion("kind", [
2394
- p.object({ kind: p.literal("work"), sequence: De, checkpointKey: p.string(), objects: p.array(Ni).min(2).max(4), deadlineAt: xe }),
2395
- p.object({ kind: p.literal("committed"), sequence: De, done: p.boolean(), deadlineAt: xe })
2393
+ }).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType === Ht("xlsx").partContentType, "Unsupported Matrix artifact encoding."), $i = w.discriminatedUnion("kind", [
2394
+ w.object({ kind: w.literal("work"), sequence: ve, checkpointKey: w.string(), objects: w.array(Ni).min(2).max(4), deadlineAt: xe }),
2395
+ w.object({ kind: w.literal("committed"), sequence: ve, done: w.boolean(), deadlineAt: xe })
2396
2396
  ]);
2397
2397
  function Ei(e) {
2398
2398
  const t = JSON.stringify(e);
@@ -2411,18 +2411,18 @@ function qs(e, t) {
2411
2411
  }
2412
2412
  return n;
2413
2413
  }
2414
- const Ii = p.object({
2415
- acquisition: p.literal("continuation"),
2414
+ const Ii = w.object({
2415
+ acquisition: w.literal("continuation"),
2416
2416
  deadlineAt: xe,
2417
- chunks: p.array(p.object({ chunkNumber: De, dataKey: p.string() })).min(1),
2418
- totalRows: le,
2419
- totalBytes: le,
2420
- fileKey: p.string().min(1).optional(),
2421
- fileSize: le.optional(),
2417
+ chunks: w.array(w.object({ chunkNumber: ve, dataKey: w.string() })).min(1),
2418
+ totalRows: me,
2419
+ totalBytes: me,
2420
+ fileKey: w.string().min(1).optional(),
2421
+ fileSize: me.optional(),
2422
2422
  /** The file the job writes; absent means CSV (manifests from before Excel). */
2423
- format: p.enum(Wt).optional(),
2423
+ format: w.enum(jt).optional(),
2424
2424
  /** Excel only: the sheet layout the layout batch stored, which compaction wraps the rows in. */
2425
- sheetKey: p.string().min(1).optional()
2425
+ sheetKey: w.string().min(1).optional()
2426
2426
  }).refine((e) => e.fileKey === void 0 == (e.fileSize === void 0), "Incomplete published Matrix artifact.").refine((e) => e.format === "xlsx" == (e.sheetKey !== void 0), "An Excel Matrix manifest names its sheet layout, and only it does.");
2427
2427
  function Zs(e, t, n) {
2428
2428
  const r = Ii.parse(e);
@@ -2433,14 +2433,14 @@ function Zs(e, t, n) {
2433
2433
  }), r.fileKey !== void 0 && P(t, r.fileKey), r.sheetKey !== void 0 && P(t, r.sheetKey), r;
2434
2434
  }
2435
2435
  const Oi = "en-US";
2436
- function _t(e) {
2436
+ function $t(e) {
2437
2437
  if (typeof e != "string")
2438
2438
  return;
2439
2439
  const t = e.trim();
2440
2440
  if (!(!t || t.toLowerCase() === "none"))
2441
2441
  return t;
2442
2442
  }
2443
- function me(e) {
2443
+ function fe(e) {
2444
2444
  if (!(typeof e != "number" || !Number.isFinite(e)))
2445
2445
  return Math.max(0, Math.min(10, Math.trunc(e)));
2446
2446
  }
@@ -2448,7 +2448,7 @@ function Fi(e) {
2448
2448
  return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
2449
2449
  }
2450
2450
  function Ci(e, t, n) {
2451
- const r = me(t.minimumFractionDigits), a = me(t.maximumFractionDigits);
2451
+ const r = fe(t.minimumFractionDigits), a = fe(t.maximumFractionDigits);
2452
2452
  if (typeof r == "number" || typeof a == "number") {
2453
2453
  const s = r ?? 0, c = a ?? Math.max(s, 2);
2454
2454
  return {
@@ -2456,7 +2456,7 @@ function Ci(e, t, n) {
2456
2456
  maximumFractionDigits: Math.max(s, c)
2457
2457
  };
2458
2458
  }
2459
- const i = me(t.decimals);
2459
+ const i = fe(t.decimals);
2460
2460
  if (typeof i == "number")
2461
2461
  return {
2462
2462
  minimumFractionDigits: i,
@@ -2474,8 +2474,8 @@ function Pi(e, t) {
2474
2474
  if (!(typeof t != "string" || e === "percent" && t === "%"))
2475
2475
  return t;
2476
2476
  }
2477
- function Nt(e) {
2478
- const t = _t(e.locale), n = _t(e.currency), r = Pi(e.type, e.suffix);
2477
+ function Et(e) {
2478
+ const t = $t(e.locale), n = $t(e.currency), r = Pi(e.type, e.suffix);
2479
2479
  return {
2480
2480
  ...e,
2481
2481
  ...t !== e.locale ? { locale: t } : {},
@@ -2486,7 +2486,7 @@ function Nt(e) {
2486
2486
  function E(e, t, n) {
2487
2487
  const r = { ...t, type: e };
2488
2488
  if ((n == null ? void 0 : n.numericInput) === "canonical" && J(r))
2489
- return Nt(r);
2489
+ return Et(r);
2490
2490
  const a = Ci(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, o = {
2491
2491
  type: e,
2492
2492
  locale: t.locale,
@@ -2500,9 +2500,9 @@ function E(e, t, n) {
2500
2500
  scale: typeof t.scale == "number" ? t.scale : void 0,
2501
2501
  ...t.signDisplay ? { signDisplay: t.signDisplay } : {}
2502
2502
  };
2503
- return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), Nt(o);
2503
+ return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), Et(o);
2504
2504
  }
2505
- function $t(e) {
2505
+ function It(e) {
2506
2506
  return {
2507
2507
  type: "date",
2508
2508
  locale: e.locale || Oi,
@@ -2517,24 +2517,24 @@ function $t(e) {
2517
2517
  suffix: e.suffix
2518
2518
  };
2519
2519
  }
2520
- function Ce(e) {
2520
+ function Ye(e) {
2521
2521
  return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
2522
2522
  }
2523
- function Et(e) {
2524
- const t = me(e.maxUnits);
2523
+ function Ot(e) {
2524
+ const t = fe(e.maxUnits);
2525
2525
  return {
2526
2526
  type: "duration",
2527
- inputUnit: Ce(e.inputUnit) ? e.inputUnit : "second",
2527
+ inputUnit: Ye(e.inputUnit) ? e.inputUnit : "second",
2528
2528
  outputStyle: e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact",
2529
- largestUnit: Ce(e.largestUnit) ? e.largestUnit : void 0,
2530
- smallestUnit: Ce(e.smallestUnit) ? e.smallestUnit : "second",
2529
+ largestUnit: Ye(e.largestUnit) ? e.largestUnit : void 0,
2530
+ smallestUnit: Ye(e.smallestUnit) ? e.smallestUnit : "second",
2531
2531
  maxUnits: t,
2532
2532
  prefix: e.prefix,
2533
2533
  suffix: e.suffix,
2534
2534
  negativeStyle: e.negativeStyle || "minus"
2535
2535
  };
2536
2536
  }
2537
- function It(e) {
2537
+ function Ft(e) {
2538
2538
  return {
2539
2539
  type: "string",
2540
2540
  prefix: e.prefix,
@@ -2561,7 +2561,7 @@ function Yi(e, t) {
2561
2561
  "scientific",
2562
2562
  { type: "scientific" },
2563
2563
  t
2564
- ) : r === "date" ? $t({}) : r === "duration" ? Et({}) : r === "string" ? It({}) : r === "number" ? E(
2564
+ ) : r === "date" ? It({}) : r === "duration" ? Ot({}) : r === "string" ? Ft({}) : r === "number" ? E(
2565
2565
  "number",
2566
2566
  { type: "number" },
2567
2567
  t
@@ -2589,11 +2589,11 @@ function Yi(e, t) {
2589
2589
  if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific")
2590
2590
  return E(n.type, n, t);
2591
2591
  if (n.type === "date")
2592
- return $t(n);
2592
+ return It(n);
2593
2593
  if (n.type === "duration")
2594
- return Et(n);
2594
+ return Ot(n);
2595
2595
  if (n.type === "string")
2596
- return It(n);
2596
+ return Ft(n);
2597
2597
  }
2598
2598
  const zi = Object.freeze({ source: "automatic" });
2599
2599
  function Ai(e, t) {
@@ -2609,7 +2609,7 @@ function Ai(e, t) {
2609
2609
  return;
2610
2610
  }
2611
2611
  }
2612
- function Ot(e, t) {
2612
+ function Ct(e, t) {
2613
2613
  const n = e.config;
2614
2614
  if (n)
2615
2615
  return [
@@ -2620,8 +2620,8 @@ function Ot(e, t) {
2620
2620
  ].find((r) => r.id === t);
2621
2621
  }
2622
2622
  function Ri(e, t) {
2623
- if (t.kind === "field") return Ot(e, t.fieldId);
2624
- if (t.kind === "pivot") return Ot(e, t.metricId);
2623
+ if (t.kind === "field") return Ct(e, t.fieldId);
2624
+ if (t.kind === "pivot") return Ct(e, t.metricId);
2625
2625
  }
2626
2626
  function Ui(e, t, n) {
2627
2627
  var r, a, i, o, s, c, u, l, f;
@@ -2645,13 +2645,13 @@ function Li(e) {
2645
2645
  const t = e.semanticTemporalPresentation;
2646
2646
  return t && t.granularity === e.granularity ? t.format : void 0;
2647
2647
  }
2648
- function Ge(e) {
2648
+ function Je(e) {
2649
2649
  return e.surface ? { format: e.surface, source: "surface" } : e.override ? { format: e.override, source: "override" } : e.model ? { format: e.model, source: "model" } : e.snapshot ? { format: e.snapshot, source: "snapshot" } : zi;
2650
2650
  }
2651
2651
  function Wi(e) {
2652
2652
  var o;
2653
2653
  const { card: t, column: n, surface: r } = e, a = Ri(t, n), i = n.kind === "field" ? n.fieldId : n.kind === "pivot" ? n.metricId : void 0;
2654
- return Ge({
2654
+ return Je({
2655
2655
  surface: r ? Ai(t, r) : void 0,
2656
2656
  override: Ui(t, n, a),
2657
2657
  model: (i !== void 0 ? (o = e.modelFormats) == null ? void 0 : o[i] : void 0) ?? e.catalogFormat,
@@ -2664,12 +2664,12 @@ function ji(e, t) {
2664
2664
  ) : r;
2665
2665
  return JSON.stringify(n(e)) === JSON.stringify(n(t));
2666
2666
  }
2667
- const Hi = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns"], Ft = /* @__PURE__ */ new WeakMap();
2667
+ const Hi = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns"], Pt = /* @__PURE__ */ new WeakMap();
2668
2668
  function Xs(e, t) {
2669
2669
  const n = t == null ? void 0 : t.modelFormats;
2670
2670
  if (!e || !n || Object.keys(n).length === 0) return e;
2671
- let r = Ft.get(e);
2672
- if (r || Ft.set(e, r = /* @__PURE__ */ new WeakMap()), r.has(n)) return r.get(n);
2671
+ let r = Pt.get(e);
2672
+ if (r || Pt.set(e, r = /* @__PURE__ */ new WeakMap()), r.has(n)) return r.get(n);
2673
2673
  const a = qi(e, n);
2674
2674
  return r.set(n, a), a;
2675
2675
  }
@@ -2729,7 +2729,7 @@ function Xi(e) {
2729
2729
  });
2730
2730
  const r = e.locale === void 0 ? void 0 : Q(e.locale);
2731
2731
  e.locale !== void 0 && !r && t.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
2732
- const a = e.currency === void 0 ? void 0 : Re(e.currency);
2732
+ const a = e.currency === void 0 ? void 0 : Le(e.currency);
2733
2733
  e.currency !== void 0 && !a && t.push({
2734
2734
  path: "currency",
2735
2735
  message: "Expected a supported ISO 4217 currency code."
@@ -2783,7 +2783,7 @@ function Xi(e) {
2783
2783
  }
2784
2784
  };
2785
2785
  }
2786
- function Vi(e) {
2786
+ function Bi(e) {
2787
2787
  const t = Xi(e);
2788
2788
  if (!t.ok)
2789
2789
  return t;
@@ -2802,7 +2802,7 @@ function Vi(e) {
2802
2802
  message: "Resolved currency formats require an explicit currency."
2803
2803
  }), n.length > 0 ? { ok: !1, issues: n } : t;
2804
2804
  }
2805
- function Vs(e) {
2805
+ function Bs(e) {
2806
2806
  var r;
2807
2807
  const t = /* @__PURE__ */ new Set();
2808
2808
  if (e.snapshot.resolvedFormats.forEach((a, i) => {
@@ -2839,7 +2839,7 @@ function Vs(e) {
2839
2839
  `resolvedFormats is missing visible export column "${n}"`
2840
2840
  );
2841
2841
  }
2842
- function Bi(e, t) {
2842
+ function Vi(e, t) {
2843
2843
  const n = new Intl.NumberFormat(e, {
2844
2844
  style: "currency",
2845
2845
  currency: t
@@ -2864,14 +2864,14 @@ function Ki(e) {
2864
2864
  };
2865
2865
  }
2866
2866
  function Gi(e, t, n) {
2867
- const r = Q(e.locale) ?? t.locale, a = e.type === "number" || e.type === "currency" ? Re(n) : void 0;
2867
+ const r = Q(e.locale) ?? t.locale, a = e.type === "number" || e.type === "currency" ? Le(n) : void 0;
2868
2868
  if (!(e.type === "currency" || a !== void 0))
2869
2869
  return {
2870
2870
  ...e,
2871
2871
  locale: r,
2872
2872
  ...Ki(e)
2873
2873
  };
2874
- const o = a ?? Re(e.currency) ?? t.defaultCurrency, s = Bi(
2874
+ const o = a ?? Le(e.currency) ?? t.defaultCurrency, s = Vi(
2875
2875
  r,
2876
2876
  o
2877
2877
  ), c = s.minimumFractionDigits ?? 0, u = s.maximumFractionDigits ?? c, l = e.minimumFractionDigits ?? Math.min(
@@ -2900,7 +2900,7 @@ const Qi = [
2900
2900
  "HH",
2901
2901
  "mm",
2902
2902
  "ss"
2903
- ], Ji = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), se = [
2903
+ ], Ji = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), ce = [
2904
2904
  "day",
2905
2905
  "week",
2906
2906
  "month",
@@ -2913,10 +2913,10 @@ const Qi = [
2913
2913
  quarter_long: ["quarter"],
2914
2914
  fiscal_quarter_short: ["quarter"],
2915
2915
  fiscal_year: ["year"],
2916
- short: se,
2917
- long: se,
2918
- numeric: se,
2919
- iso: se
2916
+ short: ce,
2917
+ long: ce,
2918
+ numeric: ce,
2919
+ iso: ce
2920
2920
  };
2921
2921
  function eo(e) {
2922
2922
  return typeof e == "string" && Object.prototype.hasOwnProperty.call(gn, e);
@@ -2975,10 +2975,10 @@ function no(e) {
2975
2975
  (t) => t.kind === "token" ? [t.value] : []
2976
2976
  );
2977
2977
  }
2978
- function Ct(e, t) {
2978
+ function Yt(e, t) {
2979
2979
  return e.filter((n) => t.includes(n)).length === 1;
2980
2980
  }
2981
- function ce(e, t) {
2981
+ function ue(e, t) {
2982
2982
  return e.some((n) => t.includes(n));
2983
2983
  }
2984
2984
  function ro(e) {
@@ -2986,14 +2986,14 @@ function ro(e) {
2986
2986
  }
2987
2987
  function ao(e, t) {
2988
2988
  if (ro(e)) return !1;
2989
- const n = ["YYYY", "YY"], r = ["MMMM", "MMM", "MM"], a = ["HH", "mm", "ss"], i = Ct(e, n), o = Ct(e, r), s = e.includes("DD"), c = ce(e, a);
2989
+ const n = ["YYYY", "YY"], r = ["MMMM", "MMM", "MM"], a = ["HH", "mm", "ss"], i = Yt(e, n), o = Yt(e, r), s = e.includes("DD"), c = ue(e, a);
2990
2990
  switch (t) {
2991
2991
  case "second":
2992
- return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!ce(e, [...n, ...r, "DD"]) || i && o && s);
2992
+ return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!ue(e, [...n, ...r, "DD"]) || i && o && s);
2993
2993
  case "minute":
2994
- return e.includes("HH") && e.includes("mm") && (!ce(e, [...n, ...r, "DD"]) || i && o && s);
2994
+ return e.includes("HH") && e.includes("mm") && (!ue(e, [...n, ...r, "DD"]) || i && o && s);
2995
2995
  case "hour":
2996
- return e.includes("HH") && (!ce(e, [...n, ...r, "DD"]) || i && o && s);
2996
+ return e.includes("HH") && (!ue(e, [...n, ...r, "DD"]) || i && o && s);
2997
2997
  case "day":
2998
2998
  case "week":
2999
2999
  return i && o && s && !c;
@@ -3026,7 +3026,7 @@ function yn(e, t) {
3026
3026
  message: `Pattern ${e.presentation.pattern} is not compatible with ${t} granularity.`
3027
3027
  } : n;
3028
3028
  }
3029
- function Bs(e, t) {
3029
+ function Vs(e, t) {
3030
3030
  if (!(!e || !t))
3031
3031
  return yn(e, t).ok ? e : void 0;
3032
3032
  }
@@ -3083,7 +3083,7 @@ const oo = [
3083
3083
  "s",
3084
3084
  "a",
3085
3085
  ...oo
3086
- ]), uo = /* @__PURE__ */ new Set(["zzz", "XXX"]), Pe = /* @__PURE__ */ new Set(["short", "medium", "long"]);
3086
+ ]), uo = /* @__PURE__ */ new Set(["zzz", "XXX"]), ze = /* @__PURE__ */ new Set(["short", "medium", "long"]);
3087
3087
  function M(e, t) {
3088
3088
  return Object.keys(e).length === t.length && t.every((r) => r in e);
3089
3089
  }
@@ -3093,7 +3093,7 @@ function g(e) {
3093
3093
  e
3094
3094
  );
3095
3095
  }
3096
- function wn(e) {
3096
+ function pn(e) {
3097
3097
  if (!e || e.trim() !== e || e.length > 256)
3098
3098
  return g(
3099
3099
  "date_fns patterns must be non-empty, trimmed, and at most 256 characters."
@@ -3156,16 +3156,16 @@ function wn(e) {
3156
3156
  }
3157
3157
  return t.some((a) => a.kind === "token") ? t : g("date_fns patterns must contain at least one token.");
3158
3158
  }
3159
- function pn(e, t) {
3159
+ function wn(e, t) {
3160
3160
  if (e === "semaphor_tokens") {
3161
3161
  const n = ne(t);
3162
3162
  n.ok || g(n.message);
3163
3163
  return;
3164
3164
  }
3165
- wn(t);
3165
+ pn(t);
3166
3166
  }
3167
3167
  function lo(e) {
3168
- return !T(e) || !M(e, ["dateStyle", "dateTime"]) ? g("Automatic raw temporal styles are incomplete.") : Pe.has(e.dateStyle) ? !T(e.dateTime) || !M(e.dateTime, ["dateStyle", "timeStyle"]) || !Pe.has(e.dateTime.dateStyle) || !Pe.has(e.dateTime.timeStyle) ? g(
3168
+ return !T(e) || !M(e, ["dateStyle", "dateTime"]) ? g("Automatic raw temporal styles are incomplete.") : ze.has(e.dateStyle) ? !T(e.dateTime) || !M(e.dateTime, ["dateStyle", "timeStyle"]) || !ze.has(e.dateTime.dateStyle) || !ze.has(e.dateTime.timeStyle) ? g(
3169
3169
  "Automatic dateTime styles are incomplete or invalid."
3170
3170
  ) : {
3171
3171
  dateStyle: e.dateStyle,
@@ -3175,14 +3175,14 @@ function lo(e) {
3175
3175
  }
3176
3176
  } : g("Automatic dateStyle is invalid.");
3177
3177
  }
3178
- function Qe(e) {
3178
+ function et(e) {
3179
3179
  const t = ["type", "locale", "calendarTimezone", "presentation"], n = [...t, "sourceTimezone"];
3180
3180
  if (!T(e) || !M(e, t) && !M(e, n) || e.type !== "raw_temporal")
3181
3181
  return g("Resolved raw temporal format has an invalid shape.");
3182
3182
  const r = Q(e.locale);
3183
- return r ? typeof e.calendarTimezone != "string" || !he(e.calendarTimezone) ? g(
3183
+ return r ? typeof e.calendarTimezone != "string" || !ge(e.calendarTimezone) ? g(
3184
3184
  "Raw temporal calendarTimezone must be a valid IANA timezone."
3185
- ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !he(e.sourceTimezone)) ? g(
3185
+ ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !ge(e.sourceTimezone)) ? g(
3186
3186
  "Raw temporal sourceTimezone must be a valid IANA timezone."
3187
3187
  ) : T(e.presentation) ? e.presentation.mode === "auto" ? M(e.presentation, ["mode", "styles"]) ? {
3188
3188
  type: "raw_temporal",
@@ -3203,7 +3203,7 @@ function Qe(e) {
3203
3203
  presentation: { mode: "preset", preset: e.presentation.preset }
3204
3204
  } : e.presentation.mode !== "pattern" || !M(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? g(
3205
3205
  "Pattern raw temporal presentation has an invalid shape."
3206
- ) : (pn(e.presentation.dialect, e.presentation.pattern), {
3206
+ ) : (wn(e.presentation.dialect, e.presentation.pattern), {
3207
3207
  type: "raw_temporal",
3208
3208
  locale: r,
3209
3209
  calendarTimezone: e.calendarTimezone,
@@ -3243,11 +3243,11 @@ function Tn(e) {
3243
3243
  return g(
3244
3244
  "Authored raw temporal pattern has an invalid shape."
3245
3245
  );
3246
- pn(f.dialect, f.pattern);
3246
+ wn(f.dialect, f.pattern);
3247
3247
  }
3248
3248
  }
3249
3249
  const t = (s = e.format) == null ? void 0 : s.timezone, n = (c = e.format) == null ? void 0 : c.sourceTimezone, r = t && t !== "auto" ? t : e.calendar.tz, a = n && n !== "auto" ? n === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : n : void 0;
3250
- if (t !== void 0 && t !== "auto" && !he(r) || a !== void 0 && !he(a))
3250
+ if (t !== void 0 && t !== "auto" && !ge(r) || a !== void 0 && !ge(a))
3251
3251
  return g("Authored raw temporal timezone is invalid.");
3252
3252
  const i = ((u = e.format) == null ? void 0 : u.presentation) ?? { mode: "auto" }, o = {
3253
3253
  type: "raw_temporal",
@@ -3262,7 +3262,7 @@ function Tn(e) {
3262
3262
  }
3263
3263
  }
3264
3264
  };
3265
- return Qe(o);
3265
+ return et(o);
3266
3266
  }
3267
3267
  function Ks(e) {
3268
3268
  const t = /* @__PURE__ */ new Set();
@@ -3344,18 +3344,18 @@ function Qs(e) {
3344
3344
  `Declared SQL temporal column "${r}" has inconsistent semantics across export chunks. Normalize it to one kind.`
3345
3345
  );
3346
3346
  }
3347
- function je(e) {
3347
+ function qe(e) {
3348
3348
  const t = /* @__PURE__ */ new Date(0);
3349
3349
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
3350
3350
  }
3351
- function Je(e, t) {
3351
+ function tt(e, t) {
3352
3352
  const n = e.fraction ? `.${e.fraction.padEnd(3, "0").slice(0, 3)}` : "";
3353
3353
  return te(
3354
3354
  `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}T${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${n}`,
3355
3355
  t
3356
3356
  );
3357
3357
  }
3358
- function xn(e, t) {
3358
+ function Dn(e, t) {
3359
3359
  const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
3360
3360
  let a, i, o, s;
3361
3361
  return {
@@ -3502,33 +3502,33 @@ function fo(e, t, n, r, a) {
3502
3502
  }
3503
3503
  }
3504
3504
  function ho(e, t, n, r) {
3505
- const a = je(t);
3505
+ const a = qe(t);
3506
3506
  return e.map(
3507
3507
  (i) => i.kind === "literal" ? i.value : fo(i.value, t, a, n, r)
3508
3508
  ).join("");
3509
3509
  }
3510
- function Dn(e, t, n) {
3511
- const r = t === "date_fns" ? wn(n) : (() => {
3510
+ function bn(e, t, n) {
3511
+ const r = t === "date_fns" ? pn(n) : (() => {
3512
3512
  const i = ne(n);
3513
3513
  return i.ok ? i.segments : g(i.message);
3514
3514
  })(), a = r.filter((i) => i.kind === "token").map((i) => i.value);
3515
3515
  return e === "date" && a.some((i) => co.has(i)) ? g("Date patterns cannot contain time tokens.") : e !== "instant" && a.some((i) => uo.has(i)) ? g("Timezone pattern tokens require an instant value.") : r;
3516
3516
  }
3517
3517
  function go(e) {
3518
- Dn(
3518
+ bn(
3519
3519
  e.valueKind ?? "instant",
3520
3520
  e.dialect,
3521
3521
  e.pattern
3522
3522
  );
3523
3523
  }
3524
3524
  function yo(e, t, n, r) {
3525
- const a = Dn(
3525
+ const a = bn(
3526
3526
  e.valueKind,
3527
3527
  n,
3528
3528
  r
3529
- ), i = xn(t.locale, t.calendarTimezone);
3529
+ ), i = Dn(t.locale, t.calendarTimezone);
3530
3530
  return (o) => {
3531
- const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? Je(o.fields, t.sourceTimezone) : void 0, c = e.valueKind === "instant" ? {
3531
+ const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? tt(o.fields, t.sourceTimezone) : void 0, c = e.valueKind === "instant" ? {
3532
3532
  ...i.instantFields(o.instant),
3533
3533
  fraction: o.fields.fraction
3534
3534
  } : s ? {
@@ -3538,10 +3538,10 @@ function yo(e, t, n, r) {
3538
3538
  return ho(a, c, i, o.instant ?? s);
3539
3539
  };
3540
3540
  }
3541
- function bn(e, t) {
3542
- const n = xn(t.locale, t.calendarTimezone);
3541
+ function xn(e, t) {
3542
+ const n = Dn(t.locale, t.calendarTimezone);
3543
3543
  return (r) => {
3544
- const a = e.valueKind === "instant" ? n.instantFields(r.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? n.instantFields(Je(r.fields, t.sourceTimezone)) : r.fields;
3544
+ const a = e.valueKind === "instant" ? n.instantFields(r.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? n.instantFields(tt(r.fields, t.sourceTimezone)) : r.fields;
3545
3545
  return {
3546
3546
  year: a.year,
3547
3547
  month: a.month,
@@ -3552,12 +3552,12 @@ function bn(e, t) {
3552
3552
  };
3553
3553
  };
3554
3554
  }
3555
- const wo = /* @__PURE__ */ new Set(["short", "long", "numeric", "iso"]);
3555
+ const po = /* @__PURE__ */ new Set(["short", "long", "numeric", "iso"]);
3556
3556
  function vn(e) {
3557
- return typeof e == "string" && wo.has(e);
3557
+ return typeof e == "string" && po.has(e);
3558
3558
  }
3559
- function po(e, t, n) {
3560
- const r = bn(e, t), a = e.valueKind !== "date", i = (s, c = 2) => String(s).padStart(c, "0");
3559
+ function wo(e, t, n) {
3560
+ const r = xn(e, t), a = e.valueKind !== "date", i = (s, c = 2) => String(s).padStart(c, "0");
3561
3561
  if (n === "iso")
3562
3562
  return (s) => {
3563
3563
  const c = r(s), u = `${i(c.year, 4)}-${i(c.month)}-${i(c.day)}`;
@@ -3584,7 +3584,7 @@ function To(e, t) {
3584
3584
  timeZone: "UTC",
3585
3585
  dateStyle: n.dateStyle
3586
3586
  });
3587
- return (s) => o.format(je(s.fields));
3587
+ return (s) => o.format(qe(s.fields));
3588
3588
  }
3589
3589
  const r = e.valueKind === "instant", a = !r && n.dateTime.timeStyle === "long" ? "medium" : n.dateTime.timeStyle, i = new Intl.DateTimeFormat(t.locale, {
3590
3590
  calendar: "gregory",
@@ -3592,9 +3592,9 @@ function To(e, t) {
3592
3592
  dateStyle: n.dateTime.dateStyle,
3593
3593
  timeStyle: a
3594
3594
  });
3595
- return (o) => r ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(Je(o.fields, t.sourceTimezone)) : i.format(je(o.fields));
3595
+ return (o) => r ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(tt(o.fields, t.sourceTimezone)) : i.format(qe(o.fields));
3596
3596
  }
3597
- function Pt(e, t, n) {
3597
+ function zt(e, t, n) {
3598
3598
  return {
3599
3599
  ok: !1,
3600
3600
  text: e,
@@ -3605,17 +3605,17 @@ function Pt(e, t, n) {
3605
3605
  };
3606
3606
  }
3607
3607
  function Sn(e) {
3608
- const t = Bn(e.metadata), n = Qe(e.format), r = n.presentation.mode === "auto" ? To(t, n) : n.presentation.mode === "preset" ? po(t, n, n.presentation.preset) : yo(
3608
+ const t = Vn(e.metadata), n = et(e.format), r = n.presentation.mode === "auto" ? To(t, n) : n.presentation.mode === "preset" ? wo(t, n, n.presentation.preset) : yo(
3609
3609
  t,
3610
3610
  n,
3611
3611
  n.presentation.dialect,
3612
3612
  n.presentation.pattern
3613
- ), a = bn(t, n);
3613
+ ), a = xn(t, n);
3614
3614
  return (i) => {
3615
3615
  if (i === null)
3616
3616
  return { ok: !0, text: "", status: "empty" };
3617
3617
  const o = Kn(i, t.valueKind);
3618
- return o.status === "invalid_shape" ? Pt(i, t, "invalid_raw_temporal_value") : o.status === "out_of_range" ? Pt(i, t, "out_of_range_raw_temporal_value") : {
3618
+ return o.status === "invalid_shape" ? zt(i, t, "invalid_raw_temporal_value") : o.status === "out_of_range" ? zt(i, t, "out_of_range_raw_temporal_value") : {
3619
3619
  ok: !0,
3620
3620
  text: r(o),
3621
3621
  status: "formatted",
@@ -3623,21 +3623,21 @@ function Sn(e) {
3623
3623
  };
3624
3624
  };
3625
3625
  }
3626
- function xo(e) {
3626
+ function Do(e) {
3627
3627
  return Sn({
3628
3628
  metadata: e.metadata,
3629
3629
  format: e.format
3630
3630
  })(e.value);
3631
3631
  }
3632
- function Do(e) {
3632
+ function bo(e) {
3633
3633
  const t = Tn({ format: e.authored, preferences: e.preferences, calendar: e.calendar });
3634
3634
  return { format: t, formatValue: Sn({ metadata: e.metadata, format: t }) };
3635
3635
  }
3636
- const bo = {
3636
+ const xo = {
3637
3637
  dateStyle: "short",
3638
3638
  dateTime: { dateStyle: "short", timeStyle: "short" }
3639
3639
  };
3640
- class fe extends Error {
3640
+ class de extends Error {
3641
3641
  constructor(n, r) {
3642
3642
  super(r);
3643
3643
  $(this, "code");
@@ -3671,7 +3671,7 @@ const vo = [
3671
3671
  "November",
3672
3672
  "December"
3673
3673
  ];
3674
- function Ye(e) {
3674
+ function Ae(e) {
3675
3675
  return {
3676
3676
  ok: !1,
3677
3677
  error: { code: "invalid_temporal_bucket_value", message: e }
@@ -3687,7 +3687,7 @@ function _o(e, t, n) {
3687
3687
  const r = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4], a = t < 3 ? e - 1 : e;
3688
3688
  return (a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + r[t - 1] + n) % 7;
3689
3689
  }
3690
- function Se(e) {
3690
+ function _e(e) {
3691
3691
  var t;
3692
3692
  return (t = e.calendar.fiscalCalendar) == null ? void 0 : t.yearStartMonth;
3693
3693
  }
@@ -3695,7 +3695,7 @@ function No(e, t) {
3695
3695
  return (e - t + 12) % 12 % 3 === 0;
3696
3696
  }
3697
3697
  function $o(e, t) {
3698
- const { granularity: n } = t, r = Se(t) ?? 1;
3698
+ const { granularity: n } = t, r = _e(t) ?? 1;
3699
3699
  switch (n) {
3700
3700
  case "second":
3701
3701
  return !0;
@@ -3715,11 +3715,11 @@ function $o(e, t) {
3715
3715
  return e.day === 1 && e.month === r;
3716
3716
  }
3717
3717
  }
3718
- function Me(e, t) {
3718
+ function re(e, t) {
3719
3719
  if (e === null) return { ok: !0, value: null };
3720
3720
  const n = t.granularity === "second" || t.granularity === "minute" || t.granularity === "hour", r = n ? /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/.exec(e) : /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
3721
3721
  if (!r)
3722
- return Ye(
3722
+ return Ae(
3723
3723
  `Expected ${n ? "YYYY-MM-DDTHH:mm:ss" : "YYYY-MM-DD"} for ${t.granularity} granularity.`
3724
3724
  );
3725
3725
  const a = {
@@ -3730,39 +3730,47 @@ function Me(e, t) {
3730
3730
  minute: n ? Number(r[5]) : 0,
3731
3731
  second: n ? Number(r[6]) : 0
3732
3732
  };
3733
- return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day > ko(a.year, a.month) || a.hour > 23 || a.minute > 59 || a.second > 59 ? Ye(`Invalid canonical ${t.granularity} bucket value ${e}.`) : $o(a, t) ? { ok: !0, value: a } : Ye(
3733
+ return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day > ko(a.year, a.month) || a.hour > 23 || a.minute > 59 || a.second > 59 ? Ae(`Invalid canonical ${t.granularity} bucket value ${e}.`) : $o(a, t) ? { ok: !0, value: a } : Ae(
3734
3734
  `Canonical value ${e} is not aligned to ${t.granularity} granularity and its governed Calendar.`
3735
3735
  );
3736
3736
  }
3737
- const Yt = (e) => `${x(e.year, 4)}-${x(e.month)}-${x(e.day)}`;
3737
+ const Se = (e) => `${D(e.year, 4)}-${D(e.month)}-${D(e.day)}`;
3738
3738
  function Js(e, t, n) {
3739
- const r = Me(e, t);
3739
+ const r = re(e, t);
3740
3740
  if (!r.ok || !r.value) return;
3741
- const a = qt({ ...r.value, millisecond: 0 }, n.amount, n.unit), { granularity: i } = t;
3741
+ const a = ye({ ...r.value, millisecond: 0 }, n.amount, n.unit), { granularity: i } = t;
3742
3742
  if (i === "second" || i === "minute" || i === "hour") {
3743
3743
  const o = {
3744
3744
  ...a,
3745
3745
  second: i === "second" ? a.second : 0,
3746
3746
  minute: i === "hour" ? 0 : a.minute
3747
3747
  };
3748
- return `${Yt(o)}T${x(o.hour)}:${x(o.minute)}:${x(o.second)}`;
3748
+ return `${Se(o)}T${D(o.hour)}:${D(o.minute)}:${D(o.second)}`;
3749
3749
  }
3750
- return Yt(Qn(a, i, t.calendar));
3750
+ return Se(Qn(a, i, t.calendar));
3751
3751
  }
3752
3752
  function ec(e, t) {
3753
- const n = Me(e, t);
3753
+ const n = re(e, t);
3754
3754
  if (!n.ok || !n.value) return;
3755
3755
  const r = { ...n.value, millisecond: 0 }, a = t.calendar.tz;
3756
3756
  return {
3757
- startInclusive: at(r, a).toISOString(),
3758
- endExclusive: at(qt(r, 1, t.granularity), a).toISOString(),
3757
+ startInclusive: ot(r, a).toISOString(),
3758
+ endExclusive: ot(ye(r, 1, t.granularity), a).toISOString(),
3759
3759
  timezone: a
3760
3760
  };
3761
3761
  }
3762
- function tc(e) {
3762
+ function tc(e, t) {
3763
+ const { granularity: n } = t;
3764
+ if (n === "second" || n === "minute" || n === "hour") return;
3765
+ const r = re(e, t);
3766
+ if (!r.ok || !r.value) return;
3767
+ const a = { ...r.value, hour: 0, minute: 0, second: 0, millisecond: 0 }, i = ye(ye(a, 1, n), -1, "day");
3768
+ return { first: Se(a), last: Se(i) };
3769
+ }
3770
+ function nc(e) {
3763
3771
  const { granularity: t, calendar: n } = e, r = (o, s) => new Intl.DateTimeFormat("en-US", { ...o, timeZone: "UTC" }).format(s), a = [`by ${t} in the ${n.tz} calendar`];
3764
3772
  t === "week" && a.push(`weeks starting on ${r({ weekday: "long" }, new Date(Date.UTC(2023, 0, 1 + n.weekStart)))}`);
3765
- const i = Se(e);
3773
+ const i = _e(e);
3766
3774
  return i && (t === "quarter" || t === "year") && a.push(`the fiscal year starting in ${r({ month: "long" }, new Date(Date.UTC(2e3, i - 1, 1)))}`), `${a.join(", ")}; each value is a bucket's start`;
3767
3775
  }
3768
3776
  function Mn(e) {
@@ -3859,7 +3867,7 @@ function Eo(e, t) {
3859
3867
  function kn(e, t) {
3860
3868
  return yn(e, t.granularity).ok ? e.presentation.mode === "preset" ? Eo(e.presentation.preset, t) : !(e.presentation.mode === "pattern" && t.calendar.fiscalCalendar && (t.granularity === "quarter" || t.granularity === "year")) : !1;
3861
3869
  }
3862
- function zt(e, t) {
3870
+ function At(e, t) {
3863
3871
  if (!(!e || e.presentation.mode === "auto"))
3864
3872
  return kn(e, t) ? { type: "temporal_bucket", presentation: e.presentation } : void 0;
3865
3873
  }
@@ -3867,27 +3875,27 @@ function _n(e) {
3867
3875
  var a;
3868
3876
  const t = Q(e.locale);
3869
3877
  if (!t)
3870
- throw new fe(
3878
+ throw new de(
3871
3879
  "invalid_temporal_bucket_format",
3872
3880
  "Temporal bucket locale must be a supported base BCP 47 locale."
3873
3881
  );
3874
- const n = zt(e.cardFormat, e.metadata);
3882
+ const n = At(e.cardFormat, e.metadata);
3875
3883
  if (n)
3876
3884
  return { format: { ...n, locale: t }, source: "card" };
3877
- const r = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ? zt(e.semanticFormat.format, e.metadata) : void 0;
3885
+ const r = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ? At(e.semanticFormat.format, e.metadata) : void 0;
3878
3886
  return r ? { format: { ...r, locale: t }, source: "semantic" } : {
3879
3887
  format: {
3880
3888
  type: "temporal_bucket",
3881
3889
  locale: t,
3882
3890
  presentation: {
3883
3891
  mode: "auto",
3884
- styles: e.styles ?? bo
3892
+ styles: e.styles ?? xo
3885
3893
  }
3886
3894
  },
3887
3895
  source: "automatic"
3888
3896
  };
3889
3897
  }
3890
- function x(e, t = 2) {
3898
+ function D(e, t = 2) {
3891
3899
  return String(e).padStart(t, "0");
3892
3900
  }
3893
3901
  function K(e, t, n) {
@@ -3905,38 +3913,38 @@ function Io(e, t, n) {
3905
3913
  if (r.kind === "literal") return r.value;
3906
3914
  switch (r.value) {
3907
3915
  case "YYYY":
3908
- return x(e.year, 4);
3916
+ return D(e.year, 4);
3909
3917
  case "YY":
3910
- return x(e.year % 100);
3918
+ return D(e.year % 100);
3911
3919
  case "MMMM":
3912
3920
  return K(e.month, n, "long");
3913
3921
  case "MMM":
3914
3922
  return K(e.month, n, "short");
3915
3923
  case "MM":
3916
- return x(e.month);
3924
+ return D(e.month);
3917
3925
  case "DD":
3918
- return x(e.day);
3926
+ return D(e.day);
3919
3927
  case "HH":
3920
- return x(e.hour);
3928
+ return D(e.hour);
3921
3929
  case "mm":
3922
- return x(e.minute);
3930
+ return D(e.minute);
3923
3931
  case "ss":
3924
- return x(e.second);
3932
+ return D(e.second);
3925
3933
  }
3926
3934
  }).join("");
3927
3935
  }
3928
- const At = /* @__PURE__ */ new Map();
3936
+ const Rt = /* @__PURE__ */ new Map();
3929
3937
  function Y(e, t) {
3930
- const n = `${e}:${JSON.stringify(t)}`, r = At.get(n);
3938
+ const n = `${e}:${JSON.stringify(t)}`, r = Rt.get(n);
3931
3939
  if (r) return r;
3932
3940
  const a = new Intl.DateTimeFormat(e, t);
3933
- return At.set(n, a), a;
3941
+ return Rt.set(n, a), a;
3934
3942
  }
3935
3943
  function G(e) {
3936
3944
  const t = /* @__PURE__ */ new Date(0);
3937
3945
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
3938
3946
  }
3939
- function Rt(e, t, n) {
3947
+ function Ut(e, t, n) {
3940
3948
  return Y(t, {
3941
3949
  calendar: "gregory",
3942
3950
  dateStyle: n,
@@ -3981,7 +3989,7 @@ function Fo(e, t, n) {
3981
3989
  function Nn(e, t) {
3982
3990
  return Math.floor((e.month - t + 12) % 12 / 3) + 1;
3983
3991
  }
3984
- function Ut(e, t) {
3992
+ function Lt(e, t) {
3985
3993
  return t === 1 || e.month < t ? e.year : e.year + 1;
3986
3994
  }
3987
3995
  function $n(e) {
@@ -3990,8 +3998,8 @@ function $n(e) {
3990
3998
  function En(e) {
3991
3999
  return e === "short" || e === "long" || e === "numeric" || e === "iso";
3992
4000
  }
3993
- function ze(e, t, n) {
3994
- return t === "iso" ? `${x(e.year, 4)}-${x(e.month)}-${x(e.day)}` : Y(n, {
4001
+ function Re(e, t, n) {
4002
+ return t === "iso" ? `${D(e.year, 4)}-${D(e.month)}-${D(e.day)}` : Y(n, {
3995
4003
  calendar: "gregory",
3996
4004
  month: t === "numeric" ? "numeric" : t === "long" ? "long" : "short",
3997
4005
  day: "numeric",
@@ -4003,21 +4011,21 @@ function Co(e, t, n, r) {
4003
4011
  const a = Nn(e, 1);
4004
4012
  switch (r) {
4005
4013
  case "week":
4006
- return t === "numeric" || t === "iso" ? ze(e, t, n) : `Week of ${ze(e, t, n)}`;
4014
+ return t === "numeric" || t === "iso" ? Re(e, t, n) : `Week of ${Re(e, t, n)}`;
4007
4015
  case "month":
4008
- return t === "iso" ? `${x(e.year, 4)}-${x(e.month)}` : t === "numeric" ? `${x(e.month)}/${x(e.year, 4)}` : `${K(e.month, n, t === "long" ? "long" : "short")} ${e.year}`;
4016
+ return t === "iso" ? `${D(e.year, 4)}-${D(e.month)}` : t === "numeric" ? `${D(e.month)}/${D(e.year, 4)}` : `${K(e.month, n, t === "long" ? "long" : "short")} ${e.year}`;
4009
4017
  case "quarter":
4010
- return t === "iso" ? `${x(e.year, 4)}-Q${a}` : t === "long" ? `${$n(a)} Quarter ${e.year}` : `Q${a} ${e.year}`;
4018
+ return t === "iso" ? `${D(e.year, 4)}-Q${a}` : t === "long" ? `${$n(a)} Quarter ${e.year}` : `Q${a} ${e.year}`;
4011
4019
  case "year":
4012
4020
  return String(e.year);
4013
4021
  default:
4014
- return ze(e, t, n);
4022
+ return Re(e, t, n);
4015
4023
  }
4016
4024
  }
4017
- function He(e, t, n, r) {
4025
+ function Ze(e, t, n, r) {
4018
4026
  if (En(t))
4019
4027
  return Co(e, t, n, r.granularity);
4020
- const a = Se(r) ?? 1, i = Nn(e, a);
4028
+ const a = _e(r) ?? 1, i = Nn(e, a);
4021
4029
  switch (t) {
4022
4030
  case "week_of_short":
4023
4031
  return `Week of ${K(e.month, n, "short")} ${e.day}, ${e.year}`;
@@ -4028,39 +4036,39 @@ function He(e, t, n, r) {
4028
4036
  case "quarter_long":
4029
4037
  return `${$n(i)} Quarter ${e.year}`;
4030
4038
  case "fiscal_quarter_short":
4031
- return `Q${i} FY${Ut(e, a)}`;
4039
+ return `Q${i} FY${Lt(e, a)}`;
4032
4040
  case "fiscal_year":
4033
- return `FY${Ut(e, a)}`;
4041
+ return `FY${Lt(e, a)}`;
4034
4042
  }
4035
4043
  }
4036
4044
  function Po(e, t, n, r) {
4037
- const a = Se(t);
4045
+ const a = _e(t);
4038
4046
  switch (t.granularity) {
4039
4047
  case "second":
4040
4048
  case "minute":
4041
4049
  case "hour":
4042
4050
  return Oo(e, n, r.dateTime);
4043
4051
  case "day":
4044
- return Rt(e, n, r.dateStyle);
4052
+ return Ut(e, n, r.dateStyle);
4045
4053
  case "week":
4046
- return `Week of ${Rt(e, n, r.dateStyle)}`;
4054
+ return `Week of ${Ut(e, n, r.dateStyle)}`;
4047
4055
  case "month":
4048
4056
  return Fo(e, n, r.dateStyle);
4049
4057
  case "quarter":
4050
- return He(
4058
+ return Ze(
4051
4059
  e,
4052
4060
  a ? "fiscal_quarter_short" : "quarter_short",
4053
4061
  n,
4054
4062
  t
4055
4063
  );
4056
4064
  case "year":
4057
- return a ? He(e, "fiscal_year", n, t) : String(e.year);
4065
+ return a ? Ze(e, "fiscal_year", n, t) : String(e.year);
4058
4066
  }
4059
4067
  }
4060
- function nc(e, t) {
4068
+ function rc(e, t) {
4061
4069
  if (t.granularity !== "second" && t.granularity !== "minute" && t.granularity !== "hour" && t.granularity !== "day" && t.granularity !== "month")
4062
4070
  return;
4063
- const n = Me(e, t);
4071
+ const n = re(e, t);
4064
4072
  if (!n.ok || n.value === null) return;
4065
4073
  const { year: r, month: a, day: i, hour: o, minute: s, second: c } = n.value;
4066
4074
  return { year: r, month: a, day: i, hour: o, minute: s, second: c };
@@ -4068,13 +4076,13 @@ function nc(e, t) {
4068
4076
  function In(e) {
4069
4077
  const t = Mn(e.format);
4070
4078
  if (!t.ok || !kn(t.value, e.metadata))
4071
- throw new fe(
4079
+ throw new de(
4072
4080
  "invalid_temporal_bucket_format",
4073
4081
  "Resolved temporal bucket format is invalid or inapplicable to its metadata."
4074
4082
  );
4075
- const n = Me(e.value, e.metadata);
4083
+ const n = re(e.value, e.metadata);
4076
4084
  if (!n.ok)
4077
- throw new fe(
4085
+ throw new de(
4078
4086
  n.error.code,
4079
4087
  n.error.message
4080
4088
  );
@@ -4088,7 +4096,7 @@ function In(e) {
4088
4096
  r.styles
4089
4097
  );
4090
4098
  if (r.mode === "preset")
4091
- return He(
4099
+ return Ze(
4092
4100
  n.value,
4093
4101
  r.preset,
4094
4102
  a,
@@ -4096,7 +4104,7 @@ function In(e) {
4096
4104
  );
4097
4105
  const i = ne(r.pattern);
4098
4106
  if (!i.ok)
4099
- throw new fe(
4107
+ throw new de(
4100
4108
  "invalid_temporal_bucket_format",
4101
4109
  i.message
4102
4110
  );
@@ -4113,18 +4121,18 @@ function Yo(e, t) {
4113
4121
  function zo(e, t, n) {
4114
4122
  return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(Ln).join(t)) ?? `${t} Total` : t;
4115
4123
  }
4116
- function rc(e, t, n, r) {
4124
+ function ac(e, t, n, r) {
4117
4125
  var o;
4118
4126
  const a = e[e.length - 1], i = t === "grand_total" ? n.grand.label : a ? (o = n.levels[a.levelId]) == null ? void 0 : o.label : void 0;
4119
4127
  return zo(t, Yo(e, r), i);
4120
4128
  }
4121
- function ac(e, t, n) {
4129
+ function ic(e, t, n) {
4122
4130
  return e.kind === "value" ? (t == null ? void 0 : t(e.value)) ?? "" : e.kind === "null" ? n.nullText : n.emptyText;
4123
4131
  }
4124
- function ic(e) {
4132
+ function oc(e) {
4125
4133
  const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
4126
4134
  return Array.from({ length: i }, (o, s) => {
4127
- const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, l = n && n.length > s && rt(n.slice(0, s + 1)) === rt(c);
4135
+ const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, l = n && n.length > s && it(n.slice(0, s + 1)) === it(c);
4128
4136
  return {
4129
4137
  path: c,
4130
4138
  total: u,
@@ -4136,12 +4144,12 @@ function Ao(e) {
4136
4144
  return (e == null ? void 0 : e.type) === "date" ? { type: "raw_temporal", timezone: e.timezone, sourceTimezone: e.sourceTimezone, presentation: io(e) } : void 0;
4137
4145
  }
4138
4146
  function Ro(e, t) {
4139
- return Yi(Ge({ override: e, model: t }).format, {
4147
+ return Yi(Je({ override: e, model: t }).format, {
4140
4148
  preserveOmittedProperties: !0,
4141
4149
  numericInput: "canonical"
4142
4150
  });
4143
4151
  }
4144
- function oc(e, t, n) {
4152
+ function sc(e, t, n) {
4145
4153
  const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = (o, s) => {
4146
4154
  const c = (s === "levels" ? t.levelFormats : t.measureFormats)[o.id], u = o.semanticFormat, l = Ro(c, u);
4147
4155
  s === "measures" && r.set(o.id, {
@@ -4166,7 +4174,7 @@ function oc(e, t, n) {
4166
4174
  return (d) => typeof d == "string" ? In({ value: d, metadata: m, format: h.format }) : f(d);
4167
4175
  }
4168
4176
  if (o.column.rawTemporal) {
4169
- const m = Ge({ override: c, model: u }).format, { formatValue: h } = Do({
4177
+ const m = Je({ override: c, model: u }).format, { formatValue: h } = bo({
4170
4178
  authored: Ao(m),
4171
4179
  metadata: o.column.rawTemporal,
4172
4180
  preferences: n.valueFormat,
@@ -4180,9 +4188,9 @@ function oc(e, t, n) {
4180
4188
  }
4181
4189
  if (J(l)) {
4182
4190
  const m = Gi(l, n.valueFormat);
4183
- return s === "measures" && a.set(o.id, m), (h) => typeof h == "number" || typeof h == "object" && h !== null ? Xe(h, m) : f(h);
4191
+ return s === "measures" && a.set(o.id, m), (h) => typeof h == "number" || typeof h == "object" && h !== null ? Ve(h, m) : f(h);
4184
4192
  }
4185
- return (l == null ? void 0 : l.type) === "duration" && s === "measures" && a.set(o.id, l), (l == null ? void 0 : l.type) === "duration" ? (m) => typeof m == "number" || typeof m == "string" || typeof m == "object" && m !== null ? Vt(
4193
+ return (l == null ? void 0 : l.type) === "duration" && s === "measures" && a.set(o.id, l), (l == null ? void 0 : l.type) === "duration" ? (m) => typeof m == "number" || typeof m == "string" || typeof m == "object" && m !== null ? Bt(
4186
4194
  typeof m == "object" ? m.value : m,
4187
4195
  l
4188
4196
  ) : f(m) : (l == null ? void 0 : l.type) === "string" ? (m) => m === null ? f(m) : `${l.prefix ?? ""}${f(m)}${l.suffix ?? ""}` : f;
@@ -4199,13 +4207,13 @@ function oc(e, t, n) {
4199
4207
  absence: t.absence
4200
4208
  };
4201
4209
  }
4202
- function sc(e, t) {
4210
+ function cc(e, t) {
4203
4211
  return t.levelLabels[e.id] ?? e.field.label ?? e.field.name;
4204
4212
  }
4205
- function cc(e, t) {
4213
+ function uc(e, t) {
4206
4214
  return t.measureLabels[e.id] ?? (e.kind === "aggregate" ? e.field.label ?? e.field.name : e.definition.label);
4207
4215
  }
4208
- function uc(e) {
4216
+ function lc(e) {
4209
4217
  return qn.parse(Uo(e));
4210
4218
  }
4211
4219
  function Uo(e) {
@@ -4241,7 +4249,7 @@ function Lo(e, t) {
4241
4249
  for (const r of t ?? []) n.set(X(r), r);
4242
4250
  return [...n.values()];
4243
4251
  }
4244
- function lc(e) {
4252
+ function mc(e) {
4245
4253
  const { spec: t, presentation: n, defaults: r, session: a } = Hn.parse(e), i = new Map(
4246
4254
  Lo(t.sorts, a == null ? void 0 : a.sorts).map((s) => [X(s), s])
4247
4255
  );
@@ -4277,7 +4285,7 @@ function lc(e) {
4277
4285
  }
4278
4286
  };
4279
4287
  }
4280
- class Lt extends Error {
4288
+ class Wt extends Error {
4281
4289
  constructor(n) {
4282
4290
  super(
4283
4291
  `invalid_presentation_execution_snapshot: ${n} Resave this report before running it again.`
@@ -4287,7 +4295,7 @@ class Lt extends Error {
4287
4295
  this.name = "PresentationExecutionSnapshotError";
4288
4296
  }
4289
4297
  }
4290
- class mc extends Error {
4298
+ class fc extends Error {
4291
4299
  constructor(n) {
4292
4300
  super(
4293
4301
  `missing_resolved_raw_temporal_format: Column "${n}" has no captured presentation. Resave this report before running it again.`
@@ -4335,7 +4343,7 @@ function z(e, t, n, r) {
4335
4343
  throw new Error(`${r}.${n} is required`);
4336
4344
  return a;
4337
4345
  }
4338
- function Ae(e, t) {
4346
+ function Ue(e, t) {
4339
4347
  if (!T(e))
4340
4348
  throw new Error(`${t} must be an object`);
4341
4349
  const n = z(e, "metric", "metricId", t);
@@ -4409,7 +4417,7 @@ function Xo(e, t) {
4409
4417
  ...a !== void 0 ? { negativeStyle: a } : {}
4410
4418
  };
4411
4419
  }
4412
- function Vo(e, t) {
4420
+ function Bo(e, t) {
4413
4421
  if (!T(e))
4414
4422
  throw new Error(`${t} must be an object`);
4415
4423
  if (e.kind === "field") {
@@ -4437,7 +4445,7 @@ function Vo(e, t) {
4437
4445
  if (r) return { kind: "matrix_axis", axisInstanceId: r };
4438
4446
  throw new Error(`${t} is not a valid temporal bucket presentation target`);
4439
4447
  }
4440
- function Bo(e, t) {
4448
+ function Vo(e, t) {
4441
4449
  if (!T(e))
4442
4450
  throw new Error(`${t} must be an object`);
4443
4451
  const n = z(e, "column", "columnKey", t);
@@ -4452,7 +4460,7 @@ function Ko(e) {
4452
4460
  e.attachmentIndex ?? null
4453
4461
  ];
4454
4462
  }
4455
- function be(e) {
4463
+ function Me(e) {
4456
4464
  switch (e.kind) {
4457
4465
  case "metric":
4458
4466
  return [e.kind, e.metricId];
@@ -4470,7 +4478,7 @@ function U(e, t) {
4470
4478
  return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === t.attachmentIndex;
4471
4479
  }
4472
4480
  function L(e, t) {
4473
- const n = be(e), r = be(t);
4481
+ const n = Me(e), r = Me(t);
4474
4482
  return n.length === r.length && n.every((a, i) => a === r[i]);
4475
4483
  }
4476
4484
  function Go(e) {
@@ -4496,7 +4504,7 @@ function Go(e) {
4496
4504
  );
4497
4505
  o = {
4498
4506
  scope: i,
4499
- target: Vo(n.target, `${a}.target`),
4507
+ target: Bo(n.target, `${a}.target`),
4500
4508
  format: l.value
4501
4509
  };
4502
4510
  break;
@@ -4504,28 +4512,28 @@ function Go(e) {
4504
4512
  case "raw_temporal":
4505
4513
  o = {
4506
4514
  scope: i,
4507
- target: Bo(n.target, `${a}.target`),
4508
- format: Qe(n.format)
4515
+ target: Vo(n.target, `${a}.target`),
4516
+ format: et(n.format)
4509
4517
  };
4510
4518
  break;
4511
4519
  case "number":
4512
4520
  case "currency":
4513
4521
  case "percent":
4514
4522
  case "scientific": {
4515
- const l = Vi(n.format);
4523
+ const l = Bi(n.format);
4516
4524
  if (!l.ok)
4517
4525
  throw new Error(
4518
4526
  `${a}.format is invalid: ${((u = l.issues[0]) == null ? void 0 : u.message) ?? "invalid value"}`
4519
4527
  );
4520
4528
  o = {
4521
4529
  scope: i,
4522
- target: Ae(n.target, `${a}.target`),
4530
+ target: Ue(n.target, `${a}.target`),
4523
4531
  format: l.value
4524
4532
  };
4525
4533
  break;
4526
4534
  }
4527
4535
  case "date": {
4528
- const l = Ae(n.target, `${a}.target`);
4536
+ const l = Ue(n.target, `${a}.target`);
4529
4537
  if (l.kind !== "column")
4530
4538
  throw new Error(`${a}.target must identify a column for a date format`);
4531
4539
  o = {
@@ -4538,7 +4546,7 @@ function Go(e) {
4538
4546
  case "duration":
4539
4547
  o = {
4540
4548
  scope: i,
4541
- target: Ae(n.target, `${a}.target`),
4549
+ target: Ue(n.target, `${a}.target`),
4542
4550
  format: Xo(
4543
4551
  n.format,
4544
4552
  `${a}.format`
@@ -4550,7 +4558,7 @@ function Go(e) {
4550
4558
  }
4551
4559
  const s = JSON.stringify([
4552
4560
  ...Ko(o.scope),
4553
- ...be(o.target)
4561
+ ...Me(o.target)
4554
4562
  ]);
4555
4563
  if (t.has(s))
4556
4564
  throw new Error(
@@ -4582,7 +4590,7 @@ function Qo(e) {
4582
4590
  resolvedFormats: Go(e.resolvedFormats)
4583
4591
  };
4584
4592
  } catch (t) {
4585
- throw t instanceof Lt ? t : new Lt(
4593
+ throw t instanceof Wt ? t : new Wt(
4586
4594
  t instanceof Error ? t.message : "Snapshot is invalid."
4587
4595
  );
4588
4596
  }
@@ -4594,7 +4602,7 @@ function Jo(e) {
4594
4602
  resolvedFormats: [...e.resolvedFormats]
4595
4603
  });
4596
4604
  }
4597
- function fc(e, t) {
4605
+ function dc(e, t) {
4598
4606
  const n = t.filter(
4599
4607
  (r, a) => !e.resolvedFormats.some(
4600
4608
  (i) => U(i.scope, r.scope) && L(i.target, r.target)
@@ -4608,7 +4616,7 @@ function fc(e, t) {
4608
4616
  resolvedFormats: [...e.resolvedFormats, ...n]
4609
4617
  });
4610
4618
  }
4611
- function dc(e) {
4619
+ function hc(e) {
4612
4620
  const t = es(e);
4613
4621
  return J(t) ? t : void 0;
4614
4622
  }
@@ -4618,19 +4626,19 @@ function es(e) {
4618
4626
  );
4619
4627
  return t == null ? void 0 : t.format;
4620
4628
  }
4621
- function hc(e) {
4629
+ function gc(e) {
4622
4630
  const t = e.snapshot.resolvedFormats.find(
4623
4631
  (n) => n.format.type === "date" && U(n.scope, e.scope) && L(n.target, e.target)
4624
4632
  );
4625
4633
  return t == null ? void 0 : t.format;
4626
4634
  }
4627
- function gc(e) {
4635
+ function yc(e) {
4628
4636
  const t = e.snapshot.resolvedFormats.find(
4629
4637
  (n) => n.format.type === "raw_temporal" && U(n.scope, e.scope) && L(n.target, e.target)
4630
4638
  );
4631
4639
  return t == null ? void 0 : t.format;
4632
4640
  }
4633
- function yc(e) {
4641
+ function pc(e) {
4634
4642
  const t = e.snapshot.resolvedFormats.find(
4635
4643
  (n) => n.format.type === "temporal_bucket" && U(n.scope, e.scope) && L(n.target, e.target)
4636
4644
  );
@@ -4649,7 +4657,7 @@ function wc(e) {
4649
4657
  `resolvedFormats.${o}.scope must match the executing dashboard/card`
4650
4658
  );
4651
4659
  if (i.target.kind === "field" && i.format.type === "temporal_bucket") {
4652
- const s = JSON.stringify(be(i.target));
4660
+ const s = JSON.stringify(Me(i.target));
4653
4661
  if (n.has(s))
4654
4662
  throw new Error(
4655
4663
  `resolvedFormats.${o} duplicates export field "${i.target.fieldId}"`
@@ -4677,8 +4685,8 @@ function wc(e) {
4677
4685
  `resolvedFormats is missing visible export column "${r}"`
4678
4686
  );
4679
4687
  }
4680
- const ts = /* @__PURE__ */ new Set(["short", "medium", "long"]), ns = /^(\d{4})-(\d{2})-(\d{2})$/, rs = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, as = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, et = " – ";
4681
- function pc(e) {
4688
+ const ts = /* @__PURE__ */ new Set(["short", "medium", "long"]), ns = /^(\d{4})-(\d{2})-(\d{2})$/, rs = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, as = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, nt = " – ";
4689
+ function Tc(e) {
4682
4690
  if (!T(e)) return;
4683
4691
  const t = Object.keys(e);
4684
4692
  if (e.mode === "period_label" && t.length === 1)
@@ -4699,7 +4707,7 @@ function is(e) {
4699
4707
  return t instanceof Error ? t.message : "The pattern is invalid.";
4700
4708
  }
4701
4709
  }
4702
- function Tc(e) {
4710
+ function Dc(e) {
4703
4711
  const { value: t, part: n, presentation: r, preferences: a, calendar: i } = e;
4704
4712
  if ((r == null ? void 0 : r.mode) === "period_label" && t.periodLabel && n === "range")
4705
4713
  return { ok: !0, text: t.periodLabel };
@@ -4710,7 +4718,7 @@ function Tc(e) {
4710
4718
  if (l.some((d) => d === null))
4711
4719
  return {
4712
4720
  ok: !1,
4713
- text: u.map(({ raw: d }) => d).join(et),
4721
+ text: u.map(({ raw: d }) => d).join(nt),
4714
4722
  diagnostic: {
4715
4723
  code: "invalid_temporal_input_value",
4716
4724
  message: "A date input bound is not a date or an instant."
@@ -4731,7 +4739,7 @@ function os(e, t, n, r) {
4731
4739
  if ((t == null ? void 0 : t.mode) === "pattern")
4732
4740
  return Cn(
4733
4741
  e.map(
4734
- (c) => Fn(qe(c), "date", t.pattern, n, r)
4742
+ (c) => Fn(Xe(c), "date", t.pattern, n, r)
4735
4743
  )
4736
4744
  );
4737
4745
  const o = (t == null ? void 0 : t.mode) === "style" ? t.dateStyle : n.dateStyle;
@@ -4739,7 +4747,7 @@ function os(e, t, n, r) {
4739
4747
  const c = fs(a, i, r);
4740
4748
  if (c)
4741
4749
  return In({
4742
- value: qe(a),
4750
+ value: Xe(a),
4743
4751
  metadata: {
4744
4752
  kind: "temporal_bucket",
4745
4753
  granularity: c,
@@ -4761,7 +4769,7 @@ function os(e, t, n, r) {
4761
4769
  timeZone: "UTC",
4762
4770
  dateStyle: o
4763
4771
  });
4764
- return hs(a, i) ? s.format(de(a)) : On(s, de(a), de(i));
4772
+ return hs(a, i) ? s.format(he(a)) : On(s, he(a), he(i));
4765
4773
  }
4766
4774
  function ss(e, t, n, r) {
4767
4775
  if ((t == null ? void 0 : t.mode) === "pattern")
@@ -4786,7 +4794,7 @@ function ss(e, t, n, r) {
4786
4794
  }
4787
4795
  function On(e, t, n) {
4788
4796
  const r = e;
4789
- return typeof r.formatRange == "function" ? r.formatRange(t, n) : `${e.format(t)}${et}${e.format(n)}`;
4797
+ return typeof r.formatRange == "function" ? r.formatRange(t, n) : `${e.format(t)}${nt}${e.format(n)}`;
4790
4798
  }
4791
4799
  function Fn(e, t, n, r, a) {
4792
4800
  const i = Tn({
@@ -4797,11 +4805,11 @@ function Fn(e, t, n, r, a) {
4797
4805
  // Temporal formatting reads no currency.
4798
4806
  preferences: {
4799
4807
  ...r,
4800
- defaultCurrency: Vn.defaultCurrency
4808
+ defaultCurrency: Bn.defaultCurrency
4801
4809
  },
4802
4810
  calendar: { tz: a.tz }
4803
4811
  }), o = t === "date" && cs(n) ? "instant" : t;
4804
- return xo({
4812
+ return Do({
4805
4813
  value: o === t ? e : te(`${e}T00:00:00`, a.tz).toISOString(),
4806
4814
  metadata: { kind: "raw_temporal", valueKind: o },
4807
4815
  format: i
@@ -4811,7 +4819,7 @@ function cs(e) {
4811
4819
  return /HH|mm|ss/.test(e);
4812
4820
  }
4813
4821
  function Cn(e) {
4814
- return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(et);
4822
+ return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(nt);
4815
4823
  }
4816
4824
  function us(e, t) {
4817
4825
  const n = ns.exec(e);
@@ -4827,7 +4835,7 @@ function us(e, t) {
4827
4835
  return r && !Number.isNaN(r.getTime()) ? { kind: "instant", instant: r } : null;
4828
4836
  }
4829
4837
  function ls(e, t) {
4830
- return e.kind === "instant" ? e.instant : te(`${qe(e.date)}T00:00:00`, t);
4838
+ return e.kind === "instant" ? e.instant : te(`${Xe(e.date)}T00:00:00`, t);
4831
4839
  }
4832
4840
  function ms(e, t, n) {
4833
4841
  if (e.kind === "date") return e.date;
@@ -4839,15 +4847,15 @@ function ms(e, t, n) {
4839
4847
  function fs(e, t, n) {
4840
4848
  return n.fiscalCalendar || e.day !== 1 || e.year !== t.year || t.day !== Pn(t.year, t.month) ? null : e.month === t.month ? "month" : e.month % 3 === 1 && t.month === e.month + 2 ? "quarter" : e.month === 1 && t.month === 12 ? "year" : null;
4841
4849
  }
4842
- function qe(e) {
4850
+ function Xe(e) {
4843
4851
  return `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
4844
4852
  }
4845
- function de(e) {
4853
+ function he(e) {
4846
4854
  const t = /* @__PURE__ */ new Date(0);
4847
4855
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(0, 0, 0, 0), t;
4848
4856
  }
4849
4857
  function ds(e, t) {
4850
- const n = de(e);
4858
+ const n = he(e);
4851
4859
  return n.setUTCDate(n.getUTCDate() + t), {
4852
4860
  year: n.getUTCFullYear(),
4853
4861
  month: n.getUTCMonth() + 1,
@@ -4863,7 +4871,7 @@ function Pn(e, t) {
4863
4871
  function gs(e) {
4864
4872
  return e.year >= 1 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Pn(e.year, e.month);
4865
4873
  }
4866
- function xc(e) {
4874
+ function bc(e) {
4867
4875
  const t = /* @__PURE__ */ new Map();
4868
4876
  return e.forEach((n) => {
4869
4877
  n.id && t.set(n.id, (t.get(n.id) ?? 0) + 1);
@@ -4892,113 +4900,114 @@ export {
4892
4900
  qs as Q,
4893
4901
  Ii as R,
4894
4902
  Zs as S,
4895
- oc as T,
4903
+ sc as T,
4896
4904
  Xi as U,
4897
- Vi as V,
4898
- Vs as W,
4899
- Bi as X,
4905
+ Bi as V,
4906
+ Bs as W,
4907
+ Vi as X,
4900
4908
  Gi as Y,
4901
- Lt as Z,
4902
- mc as _,
4909
+ Wt as Z,
4910
+ fc as _,
4903
4911
  es as a,
4904
- xr as a$,
4912
+ nn as a$,
4905
4913
  Go as a0,
4906
4914
  Qo as a1,
4907
4915
  Jo as a2,
4908
- fc as a3,
4909
- dc as a4,
4910
- hc as a5,
4911
- gc as a6,
4912
- yc as a7,
4916
+ dc as a3,
4917
+ hc as a4,
4918
+ gc as a5,
4919
+ yc as a6,
4920
+ pc as a7,
4913
4921
  wc as a8,
4914
4922
  Qi as a9,
4915
- is as aA,
4916
- Tc as aB,
4917
- xc as aC,
4918
- lc as aD,
4919
- _s as aE,
4920
- Yo as aF,
4921
- rc as aG,
4922
- ic as aH,
4923
- ac as aI,
4924
- sc as aJ,
4925
- fn as aK,
4926
- Is as aL,
4927
- cc as aM,
4923
+ Tc as aA,
4924
+ is as aB,
4925
+ Dc as aC,
4926
+ bc as aD,
4927
+ mc as aE,
4928
+ _s as aF,
4929
+ Yo as aG,
4930
+ ac as aH,
4931
+ oc as aI,
4932
+ ic as aJ,
4933
+ cc as aK,
4934
+ fn as aL,
4935
+ Is as aM,
4928
4936
  uc as aN,
4929
- Uo as aO,
4930
- Lo as aP,
4931
- Ve as aQ,
4932
- j as aR,
4933
- on as aS,
4934
- ue as aT,
4935
- w as aU,
4936
- Sr as aV,
4937
- we as aW,
4938
- lt as aX,
4939
- ie as aY,
4940
- Es as aZ,
4941
- nn as a_,
4937
+ lc as aO,
4938
+ Uo as aP,
4939
+ Lo as aQ,
4940
+ Ke as aR,
4941
+ j as aS,
4942
+ on as aT,
4943
+ le as aU,
4944
+ p as aV,
4945
+ Sr as aW,
4946
+ Te as aX,
4947
+ ft as aY,
4948
+ oe as aZ,
4949
+ Es as a_,
4942
4950
  eo as aa,
4943
4951
  ne as ab,
4944
4952
  yn as ac,
4945
- Bs as ad,
4946
- bo as ae,
4947
- fe as af,
4948
- Me as ag,
4953
+ Vs as ad,
4954
+ xo as ae,
4955
+ de as af,
4956
+ re as ag,
4949
4957
  Js as ah,
4950
4958
  ec as ai,
4951
4959
  tc as aj,
4952
- Mn as ak,
4953
- _n as al,
4954
- nc as am,
4955
- io as an,
4956
- R as ao,
4957
- Qe as ap,
4958
- Tn as aq,
4959
- Ks as ar,
4960
- Gs as as,
4961
- mo as at,
4962
- Qs as au,
4963
- go as av,
4964
- Sn as aw,
4965
- xo as ax,
4960
+ nc as ak,
4961
+ Mn as al,
4962
+ _n as am,
4963
+ rc as an,
4964
+ io as ao,
4965
+ R as ap,
4966
+ et as aq,
4967
+ Tn as ar,
4968
+ Ks as as,
4969
+ Gs as at,
4970
+ mo as au,
4971
+ Qs as av,
4972
+ go as aw,
4973
+ Sn as ax,
4966
4974
  Do as ay,
4967
- pc as az,
4975
+ bo as az,
4968
4976
  Ns as b,
4969
- $a as b0,
4970
- Oi as b1,
4971
- hr as b2,
4972
- Ro as b3,
4973
- Et as b4,
4974
- E as b5,
4975
- $t as b6,
4976
- _t as b7,
4977
- Ao as b8,
4978
- zo as b9,
4979
- te as ba,
4977
+ Dr as b0,
4978
+ $a as b1,
4979
+ Oi as b2,
4980
+ hr as b3,
4981
+ Ro as b4,
4982
+ Ot as b5,
4983
+ E as b6,
4984
+ It as b7,
4985
+ $t as b8,
4986
+ Ao as b9,
4987
+ zo as ba,
4988
+ te as bb,
4980
4989
  Yi as c,
4981
4990
  ks as d,
4982
- Ze as e,
4991
+ Be as e,
4983
4992
  In as f,
4984
4993
  Qt as g,
4985
4994
  Jt as h,
4986
4995
  J as i,
4987
4996
  en as j,
4988
- Xe as k,
4997
+ Ve as k,
4989
4998
  gr as l,
4990
4999
  $s as m,
4991
- Vt as n,
4992
- Bt as o,
4993
- Ge as p,
4994
- Di as q,
5000
+ Bt as n,
5001
+ Vt as o,
5002
+ Je as p,
5003
+ bi as q,
4995
5004
  Wi as r,
4996
- bi as s,
5005
+ xi as s,
4997
5006
  Ps as t,
4998
5007
  Os as u,
4999
5008
  Fs as v,
5000
5009
  Xs as w,
5001
5010
  Cs as x,
5002
- Ke as y,
5011
+ Qe as y,
5003
5012
  dn as z
5004
5013
  };