react-semaphor 0.1.555 → 0.1.557

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 (114) hide show
  1. package/DATA_APP_SDK.md +6 -29
  2. package/dist/analytics-protocol/index.js +20 -21
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/assistant-protocol/index.js +5 -5
  5. package/dist/brand-studio/index.js +426 -444
  6. package/dist/briefings/index.js +56 -57
  7. package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
  8. package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-WMTpYirZ.js} +79 -81
  9. package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-PjQpxbG7.js} +3 -3
  10. package/dist/chunks/{braces-o9UiRQes.js → braces-BOErQVyi.js} +1 -1
  11. package/dist/chunks/comparison-window-caption-Dc7BaCMz.js +1218 -0
  12. package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-CxYI-gFa.js} +31 -33
  14. package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-4D8Vy4pL.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-C4EmOfxs.js} +149 -151
  16. package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-DBWykmvL.js} +171 -173
  17. package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-DiX-p0F7.js} +21 -22
  18. package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-DP5hquBR.js} +32 -32
  19. package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-n1jLV_7V.js} +5842 -5955
  20. package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BB9iakLA.js} +915 -986
  21. package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CUBpotVN.js} +5 -5
  22. package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-Cc5tqkoW.js} +2908 -3112
  23. package/dist/chunks/{index-B2k6KtUN.js → index-CgjhzkKM.js} +72 -80
  24. package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
  25. package/dist/chunks/{layout-grid-Bgzth8vd.js → layout-grid-CcNklCwL.js} +1 -1
  26. package/dist/chunks/{list-filter-DsaTbM3J.js → list-filter-Ds_4UTpD.js} +1 -1
  27. package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-4GTUDheD.js} +22 -22
  28. package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-fS_4O7zA.js} +3 -3
  29. package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-Dj7HaAHC.js} +1 -1
  30. package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-CpgLZ7E5.js} +52 -52
  31. package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-C8LY7GG5.js} +4 -4
  32. package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
  33. package/dist/chunks/{palette-D10o_yYX.js → palette-DMkIhagj.js} +1 -1
  34. package/dist/chunks/{matrix-formatter-K2OVPJQI.js → pivot-result-contract-expectations-DMk-mKhG.js} +451 -402
  35. package/dist/chunks/pivot-result-identity-CrQ54Xbj.js +77 -0
  36. package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DdEpgPRB.js} +25 -26
  37. package/dist/chunks/report-preferences-dialog-CFg5VFLk.js +2109 -0
  38. package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-CohdtiMg.js} +2 -2
  39. package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Djl3kCFL.js} +1396 -1550
  40. package/dist/chunks/{save-CfJpQQ68.js → save-D1EpMcwT.js} +1 -1
  41. package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-umlQFevH.js} +9 -9
  42. package/dist/chunks/selection-reducer-_d6aKJnj.js +46 -0
  43. package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-4cOp6sla.js} +54479 -63899
  44. package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-DAtRuvR7.js} +7 -7
  45. package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-DXW1HpKf.js} +1 -1
  46. package/dist/chunks/{switch-B-UTI6v-.js → switch-9CJt5EF_.js} +1431 -1342
  47. package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-CTCTA_bd.js} +1 -1
  48. package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-DF1gdVQR.js} +3 -3
  49. package/dist/chunks/temporal-input-presentation-DoSniQj1.js +2939 -0
  50. package/dist/chunks/{token-types-DYECHYGH.js → token-types-DFyLflLY.js} +1 -1
  51. package/dist/chunks/{upload-BFX7apKV.js → upload-LSNKpt0w.js} +1 -1
  52. package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-esyMT9vU.js} +125 -127
  53. package/dist/chunks/{validators-ClKLGDGZ.js → validators-hmfNNQz8.js} +305 -307
  54. package/dist/chunks/zoned-wall-clock-E35Frf9v.js +191 -0
  55. package/dist/dashboard/index.js +2 -2
  56. package/dist/dashboard-authoring/index.js +168 -169
  57. package/dist/data-app-sdk/index.js +789 -4154
  58. package/dist/data-app-sdk-adapters/index.js +3 -3
  59. package/dist/data-app-sdk-validation/index.js +6 -6
  60. package/dist/format-utils/index.js +234 -253
  61. package/dist/index.js +233 -235
  62. package/dist/layouts/index.js +1 -1
  63. package/dist/pdf-export-policy/index.js +9 -11
  64. package/dist/report-runtime-context/index.js +2 -2
  65. package/dist/style.css +1 -1
  66. package/dist/surfboard/index.js +2 -2
  67. package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
  68. package/dist/types/brand-studio/index.d.ts +1 -1
  69. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  70. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
  71. package/dist/types/data-app-sdk/contracts.d.ts +0 -146
  72. package/dist/types/data-app-sdk/index.d.ts +0 -2
  73. package/dist/types/index.js +27 -28
  74. package/dist/types/lib/api/exports-api.d.ts +1 -1
  75. package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
  76. package/dist/types/lib/charts/types.d.ts +2 -2
  77. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
  78. package/dist/types/lib/document/document-edits.d.ts +1 -1
  79. package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
  80. package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
  81. package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
  82. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
  83. package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
  84. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
  85. package/dist/types/lib/types/common-types.d.ts +0 -7
  86. package/dist/types/lib/types/explorer-types.d.ts +1 -14
  87. package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
  88. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
  89. package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +1 -7
  90. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
  91. package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
  92. package/dist/types/shared/format-utils/index.d.ts +0 -2
  93. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
  94. package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
  95. package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
  97. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
  98. package/package.json +2 -4
  99. package/src/data-app-sdk/README.md +7 -31
  100. package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
  101. package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
  102. package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
  103. package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
  104. package/dist/chunks/raw-temporal-contract-WuXA8jBP.js +0 -64
  105. package/dist/chunks/report-preferences-dialog-D_KyuEFx.js +0 -2261
  106. package/dist/chunks/selection-reducer-yw_JgICP.js +0 -111
  107. package/dist/chunks/temporal-bucket-C4rqmwaQ.js +0 -2071
  108. package/dist/chunks/x-4f5U2XwU.js +0 -100
  109. package/dist/chunks/zoned-wall-clock-MulfA26h.js +0 -129
  110. package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
  111. package/dist/types/data-app-sdk/devtools/index.d.ts +0 -49
  112. package/dist/types/data-app-sdk/devtools.d.ts +0 -1
  113. package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
  114. package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
@@ -1,41 +1,45 @@
1
- import { aJ as ge, t as U, ac as ye, T as we } from "./validators-ClKLGDGZ.js";
2
- import "./matrix-operation-contract--lMaLlpV.js";
3
- import { j as be } from "./analytics-base-schemas-BKs3flFS.js";
1
+ var we = Object.defineProperty;
2
+ var be = (e, t, n) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var U = (e, t, n) => be(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { aI as Me, t as B, ab as pe, S as xe } from "./validators-hmfNNQz8.js";
5
+ import "./matrix-operation-contract-CpgLZ7E5.js";
6
+ import { j as De } from "./analytics-base-schemas-BUFUoO6G.js";
4
7
  import "zod";
5
- import { W as Me, X as se, S as Z, U as F, Y as oe, Z as ue, Q as xe, k as De, i as I, F as pe, f as Oe, p as Te, r as ve, u as Pe, j as Se, m as ke } from "./temporal-bucket-C4rqmwaQ.js";
6
- function d(e) {
8
+ import { ao as Oe, ap as oe, ak as $, al as C, aq as ue, ar as ce, as as Te, l as ve, i as q, a1 as Pe, a3 as le, p as Se, r as ke, H as We, k as Ce, n as Fe } from "./temporal-input-presentation-DoSniQj1.js";
9
+ import { r as Ne } from "./metric-comparison-C8LY7GG5.js";
10
+ function m(e) {
7
11
  const t = Object.prototype.toString.call(e);
8
12
  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);
9
13
  }
10
- function x(e, t) {
14
+ function p(e, t) {
11
15
  return e instanceof Date ? new e.constructor(t) : new Date(t);
12
16
  }
13
- let We = {};
17
+ let Ye = {};
14
18
  function P() {
15
- return We;
19
+ return Ye;
16
20
  }
17
21
  function W(e, t) {
18
- var o, f, l, u;
19
- const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((f = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, a = d(e), i = a.getDay(), s = (i < r ? 7 : 0) + i - r;
22
+ var o, l, f, u;
23
+ const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((l = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : l.weekStartsOn) ?? n.weekStartsOn ?? ((u = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : u.weekStartsOn) ?? 0, a = m(e), i = a.getDay(), s = (i < r ? 7 : 0) + i - r;
20
24
  return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
21
25
  }
22
26
  function Y(e) {
23
27
  return W(e, { weekStartsOn: 1 });
24
28
  }
25
- function ce(e) {
26
- const t = d(e), n = t.getFullYear(), r = x(e, 0);
29
+ function fe(e) {
30
+ const t = m(e), n = t.getFullYear(), r = p(e, 0);
27
31
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
28
- const a = Y(r), i = x(e, 0);
32
+ const a = Y(r), i = p(e, 0);
29
33
  i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
30
34
  const s = Y(i);
31
35
  return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= s.getTime() ? n : n - 1;
32
36
  }
33
37
  function V(e) {
34
- const t = d(e);
38
+ const t = m(e);
35
39
  return t.setHours(0, 0, 0, 0), t;
36
40
  }
37
41
  function E(e) {
38
- const t = d(e), n = new Date(
42
+ const t = m(e), n = new Date(
39
43
  Date.UTC(
40
44
  t.getFullYear(),
41
45
  t.getMonth(),
@@ -48,78 +52,78 @@ function E(e) {
48
52
  );
49
53
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
50
54
  }
51
- function Fe(e, t) {
55
+ function Ee(e, t) {
52
56
  const n = V(e), r = V(t), a = +n - E(n), i = +r - E(r);
53
- return Math.round((a - i) / Me);
57
+ return Math.round((a - i) / Oe);
54
58
  }
55
- function Ne(e) {
56
- const t = ce(e), n = x(e, 0);
59
+ function Le(e) {
60
+ const t = fe(e), n = p(e, 0);
57
61
  return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), Y(n);
58
62
  }
59
- function N(e, t) {
60
- const n = d(e), r = d(t), a = n.getTime() - r.getTime();
63
+ function F(e, t) {
64
+ const n = m(e), r = m(t), a = n.getTime() - r.getTime();
61
65
  return a < 0 ? -1 : a > 0 ? 1 : a;
62
66
  }
63
- function Ce(e) {
64
- return x(e, Date.now());
67
+ function _e(e) {
68
+ return p(e, Date.now());
65
69
  }
66
- function Ye(e) {
70
+ function ze(e) {
67
71
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
68
72
  }
69
- function Ee(e) {
70
- if (!Ye(e) && typeof e != "number")
73
+ function Xe(e) {
74
+ if (!ze(e) && typeof e != "number")
71
75
  return !1;
72
- const t = d(e);
76
+ const t = m(e);
73
77
  return !isNaN(Number(t));
74
78
  }
75
- function Le(e, t) {
76
- const n = d(e), r = d(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
79
+ function Ie(e, t) {
80
+ const n = m(e), r = m(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
77
81
  return a * 12 + i;
78
82
  }
79
- function ze(e) {
83
+ function qe(e) {
80
84
  return (t) => {
81
85
  const r = (e ? Math[e] : Math.trunc)(t);
82
86
  return r === 0 ? 0 : r;
83
87
  };
84
88
  }
85
- function Xe(e, t) {
86
- return +d(e) - +d(t);
89
+ function He(e, t) {
90
+ return +m(e) - +m(t);
87
91
  }
88
- function _e(e) {
89
- const t = d(e);
92
+ function Re(e) {
93
+ const t = m(e);
90
94
  return t.setHours(23, 59, 59, 999), t;
91
95
  }
92
- function qe(e) {
93
- const t = d(e), n = t.getMonth();
96
+ function Ae(e) {
97
+ const t = m(e), n = t.getMonth();
94
98
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
95
99
  }
96
- function Ie(e) {
97
- const t = d(e);
98
- return +_e(t) == +qe(t);
100
+ function je(e) {
101
+ const t = m(e);
102
+ return +Re(t) == +Ae(t);
99
103
  }
100
- function Re(e, t) {
101
- const n = d(e), r = d(t), a = N(n, r), i = Math.abs(
102
- Le(n, r)
104
+ function Ue(e, t) {
105
+ const n = m(e), r = m(t), a = F(n, r), i = Math.abs(
106
+ Ie(n, r)
103
107
  );
104
108
  let s;
105
109
  if (i < 1)
106
110
  s = 0;
107
111
  else {
108
112
  n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
109
- let o = N(n, r) === -a;
110
- Ie(d(e)) && i === 1 && N(e, r) === 1 && (o = !1), s = a * (i - Number(o));
113
+ let o = F(n, r) === -a;
114
+ je(m(e)) && i === 1 && F(e, r) === 1 && (o = !1), s = a * (i - Number(o));
111
115
  }
112
116
  return s === 0 ? 0 : s;
113
117
  }
114
- function Ae(e, t, n) {
115
- const r = Xe(e, t) / 1e3;
116
- return ze(n == null ? void 0 : n.roundingMethod)(r);
118
+ function Be(e, t, n) {
119
+ const r = He(e, t) / 1e3;
120
+ return qe(n == null ? void 0 : n.roundingMethod)(r);
117
121
  }
118
- function He(e) {
119
- const t = d(e), n = x(e, 0);
122
+ function $e(e) {
123
+ const t = m(e), n = p(e, 0);
120
124
  return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
121
125
  }
122
- const je = {
126
+ const Ve = {
123
127
  lessThanXSeconds: {
124
128
  one: "less than a second",
125
129
  other: "less than {{count}} seconds"
@@ -181,53 +185,53 @@ const je = {
181
185
  one: "almost 1 year",
182
186
  other: "almost {{count}} years"
183
187
  }
184
- }, Ue = (e, t, n) => {
188
+ }, Ze = (e, t, n) => {
185
189
  let r;
186
- const a = je[e];
190
+ const a = Ve[e];
187
191
  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;
188
192
  };
189
- function X(e) {
193
+ function z(e) {
190
194
  return (t = {}) => {
191
195
  const n = t.width ? String(t.width) : e.defaultWidth;
192
196
  return e.formats[n] || e.formats[e.defaultWidth];
193
197
  };
194
198
  }
195
- const Ze = {
199
+ const Ge = {
196
200
  full: "EEEE, MMMM do, y",
197
201
  long: "MMMM do, y",
198
202
  medium: "MMM d, y",
199
203
  short: "MM/dd/yyyy"
200
- }, Ve = {
204
+ }, Qe = {
201
205
  full: "h:mm:ss a zzzz",
202
206
  long: "h:mm:ss a z",
203
207
  medium: "h:mm:ss a",
204
208
  short: "h:mm a"
205
- }, Be = {
209
+ }, Je = {
206
210
  full: "{{date}} 'at' {{time}}",
207
211
  long: "{{date}} 'at' {{time}}",
208
212
  medium: "{{date}}, {{time}}",
209
213
  short: "{{date}}, {{time}}"
210
- }, $e = {
211
- date: X({
212
- formats: Ze,
214
+ }, Ke = {
215
+ date: z({
216
+ formats: Ge,
213
217
  defaultWidth: "full"
214
218
  }),
215
- time: X({
216
- formats: Ve,
219
+ time: z({
220
+ formats: Qe,
217
221
  defaultWidth: "full"
218
222
  }),
219
- dateTime: X({
220
- formats: Be,
223
+ dateTime: z({
224
+ formats: Je,
221
225
  defaultWidth: "full"
222
226
  })
223
- }, Ge = {
227
+ }, et = {
224
228
  lastWeek: "'last' eeee 'at' p",
225
229
  yesterday: "'yesterday at' p",
226
230
  today: "'today at' p",
227
231
  tomorrow: "'tomorrow at' p",
228
232
  nextWeek: "eeee 'at' p",
229
233
  other: "P"
230
- }, Qe = (e, t, n, r) => Ge[e];
234
+ }, tt = (e, t, n, r) => et[e];
231
235
  function S(e) {
232
236
  return (t, n) => {
233
237
  const r = n != null && n.context ? String(n.context) : "standalone";
@@ -243,15 +247,15 @@ function S(e) {
243
247
  return a[i];
244
248
  };
245
249
  }
246
- const Je = {
250
+ const nt = {
247
251
  narrow: ["B", "A"],
248
252
  abbreviated: ["BC", "AD"],
249
253
  wide: ["Before Christ", "Anno Domini"]
250
- }, Ke = {
254
+ }, rt = {
251
255
  narrow: ["1", "2", "3", "4"],
252
256
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
253
257
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
254
- }, et = {
258
+ }, at = {
255
259
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
256
260
  abbreviated: [
257
261
  "Jan",
@@ -281,7 +285,7 @@ const Je = {
281
285
  "November",
282
286
  "December"
283
287
  ]
284
- }, tt = {
288
+ }, it = {
285
289
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
286
290
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
287
291
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -294,7 +298,7 @@ const Je = {
294
298
  "Friday",
295
299
  "Saturday"
296
300
  ]
297
- }, nt = {
301
+ }, st = {
298
302
  narrow: {
299
303
  am: "a",
300
304
  pm: "p",
@@ -325,7 +329,7 @@ const Je = {
325
329
  evening: "evening",
326
330
  night: "night"
327
331
  }
328
- }, rt = {
332
+ }, ot = {
329
333
  narrow: {
330
334
  am: "a",
331
335
  pm: "p",
@@ -356,7 +360,7 @@ const Je = {
356
360
  evening: "in the evening",
357
361
  night: "at night"
358
362
  }
359
- }, at = (e, t) => {
363
+ }, ut = (e, t) => {
360
364
  const n = Number(e), r = n % 100;
361
365
  if (r > 20 || r < 10)
362
366
  switch (r % 10) {
@@ -368,29 +372,29 @@ const Je = {
368
372
  return n + "rd";
369
373
  }
370
374
  return n + "th";
371
- }, it = {
372
- ordinalNumber: at,
375
+ }, ct = {
376
+ ordinalNumber: ut,
373
377
  era: S({
374
- values: Je,
378
+ values: nt,
375
379
  defaultWidth: "wide"
376
380
  }),
377
381
  quarter: S({
378
- values: Ke,
382
+ values: rt,
379
383
  defaultWidth: "wide",
380
384
  argumentCallback: (e) => e - 1
381
385
  }),
382
386
  month: S({
383
- values: et,
387
+ values: at,
384
388
  defaultWidth: "wide"
385
389
  }),
386
390
  day: S({
387
- values: tt,
391
+ values: it,
388
392
  defaultWidth: "wide"
389
393
  }),
390
394
  dayPeriod: S({
391
- values: nt,
395
+ values: st,
392
396
  defaultWidth: "wide",
393
- formattingValues: rt,
397
+ formattingValues: ot,
394
398
  defaultFormattingWidth: "wide"
395
399
  })
396
400
  };
@@ -399,30 +403,30 @@ function k(e) {
399
403
  const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
400
404
  if (!i)
401
405
  return null;
402
- const s = i[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(o) ? ot(o, (g) => g.test(s)) : (
406
+ const s = i[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(o) ? ft(o, (g) => g.test(s)) : (
403
407
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
404
- st(o, (g) => g.test(s))
408
+ lt(o, (g) => g.test(s))
405
409
  );
406
- let l;
407
- l = e.valueCallback ? e.valueCallback(f) : f, l = n.valueCallback ? (
410
+ let f;
411
+ f = e.valueCallback ? e.valueCallback(l) : l, f = n.valueCallback ? (
408
412
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
409
- n.valueCallback(l)
410
- ) : l;
413
+ n.valueCallback(f)
414
+ ) : f;
411
415
  const u = t.slice(s.length);
412
- return { value: l, rest: u };
416
+ return { value: f, rest: u };
413
417
  };
414
418
  }
415
- function st(e, t) {
419
+ function lt(e, t) {
416
420
  for (const n in e)
417
421
  if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
418
422
  return n;
419
423
  }
420
- function ot(e, t) {
424
+ function ft(e, t) {
421
425
  for (let n = 0; n < e.length; n++)
422
426
  if (t(e[n]))
423
427
  return n;
424
428
  }
425
- function ut(e) {
429
+ function dt(e) {
426
430
  return (t, n = {}) => {
427
431
  const r = t.match(e.matchPattern);
428
432
  if (!r) return null;
@@ -434,23 +438,23 @@ function ut(e) {
434
438
  return { value: s, rest: o };
435
439
  };
436
440
  }
437
- const ct = /^(\d+)(th|st|nd|rd)?/i, ft = /\d+/i, lt = {
441
+ const mt = /^(\d+)(th|st|nd|rd)?/i, ht = /\d+/i, gt = {
438
442
  narrow: /^(b|a)/i,
439
443
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
440
444
  wide: /^(before christ|before common era|anno domini|common era)/i
441
- }, mt = {
445
+ }, yt = {
442
446
  any: [/^b/i, /^(a|c)/i]
443
- }, dt = {
447
+ }, wt = {
444
448
  narrow: /^[1234]/i,
445
449
  abbreviated: /^q[1234]/i,
446
450
  wide: /^[1234](th|st|nd|rd)? quarter/i
447
- }, ht = {
451
+ }, bt = {
448
452
  any: [/1/i, /2/i, /3/i, /4/i]
449
- }, gt = {
453
+ }, Mt = {
450
454
  narrow: /^[jfmasond]/i,
451
455
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
452
456
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
453
- }, yt = {
457
+ }, pt = {
454
458
  narrow: [
455
459
  /^j/i,
456
460
  /^f/i,
@@ -479,18 +483,18 @@ const ct = /^(\d+)(th|st|nd|rd)?/i, ft = /\d+/i, lt = {
479
483
  /^n/i,
480
484
  /^d/i
481
485
  ]
482
- }, wt = {
486
+ }, xt = {
483
487
  narrow: /^[smtwf]/i,
484
488
  short: /^(su|mo|tu|we|th|fr|sa)/i,
485
489
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
486
490
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
487
- }, bt = {
491
+ }, Dt = {
488
492
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
489
493
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
490
- }, Mt = {
494
+ }, Ot = {
491
495
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
492
496
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
493
- }, xt = {
497
+ }, Tt = {
494
498
  any: {
495
499
  am: /^a/i,
496
500
  pm: /^p/i,
@@ -501,82 +505,82 @@ const ct = /^(\d+)(th|st|nd|rd)?/i, ft = /\d+/i, lt = {
501
505
  evening: /evening/i,
502
506
  night: /night/i
503
507
  }
504
- }, Dt = {
505
- ordinalNumber: ut({
506
- matchPattern: ct,
507
- parsePattern: ft,
508
+ }, vt = {
509
+ ordinalNumber: dt({
510
+ matchPattern: mt,
511
+ parsePattern: ht,
508
512
  valueCallback: (e) => parseInt(e, 10)
509
513
  }),
510
514
  era: k({
511
- matchPatterns: lt,
515
+ matchPatterns: gt,
512
516
  defaultMatchWidth: "wide",
513
- parsePatterns: mt,
517
+ parsePatterns: yt,
514
518
  defaultParseWidth: "any"
515
519
  }),
516
520
  quarter: k({
517
- matchPatterns: dt,
521
+ matchPatterns: wt,
518
522
  defaultMatchWidth: "wide",
519
- parsePatterns: ht,
523
+ parsePatterns: bt,
520
524
  defaultParseWidth: "any",
521
525
  valueCallback: (e) => e + 1
522
526
  }),
523
527
  month: k({
524
- matchPatterns: gt,
528
+ matchPatterns: Mt,
525
529
  defaultMatchWidth: "wide",
526
- parsePatterns: yt,
530
+ parsePatterns: pt,
527
531
  defaultParseWidth: "any"
528
532
  }),
529
533
  day: k({
530
- matchPatterns: wt,
534
+ matchPatterns: xt,
531
535
  defaultMatchWidth: "wide",
532
- parsePatterns: bt,
536
+ parsePatterns: Dt,
533
537
  defaultParseWidth: "any"
534
538
  }),
535
539
  dayPeriod: k({
536
- matchPatterns: Mt,
540
+ matchPatterns: Ot,
537
541
  defaultMatchWidth: "any",
538
- parsePatterns: xt,
542
+ parsePatterns: Tt,
539
543
  defaultParseWidth: "any"
540
544
  })
541
- }, fe = {
545
+ }, de = {
542
546
  code: "en-US",
543
- formatDistance: Ue,
544
- formatLong: $e,
545
- formatRelative: Qe,
546
- localize: it,
547
- match: Dt,
547
+ formatDistance: Ze,
548
+ formatLong: Ke,
549
+ formatRelative: tt,
550
+ localize: ct,
551
+ match: vt,
548
552
  options: {
549
553
  weekStartsOn: 0,
550
554
  firstWeekContainsDate: 1
551
555
  }
552
556
  };
553
- function pt(e) {
554
- const t = d(e);
555
- return Fe(t, He(t)) + 1;
557
+ function Pt(e) {
558
+ const t = m(e);
559
+ return Ee(t, $e(t)) + 1;
556
560
  }
557
- function Ot(e) {
558
- const t = d(e), n = +Y(t) - +Ne(t);
559
- return Math.round(n / se) + 1;
561
+ function St(e) {
562
+ const t = m(e), n = +Y(t) - +Le(t);
563
+ return Math.round(n / oe) + 1;
560
564
  }
561
- function le(e, t) {
565
+ function me(e, t) {
562
566
  var u, g, c, h;
563
- const n = d(e), r = n.getFullYear(), a = P(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((h = (c = a.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = x(e, 0);
567
+ const n = m(e), r = n.getFullYear(), a = P(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((g = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((h = (c = a.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = p(e, 0);
564
568
  s.setFullYear(r + 1, 0, i), s.setHours(0, 0, 0, 0);
565
- const o = W(s, t), f = x(e, 0);
566
- f.setFullYear(r, 0, i), f.setHours(0, 0, 0, 0);
567
- const l = W(f, t);
568
- return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= l.getTime() ? r : r - 1;
569
- }
570
- function Tt(e, t) {
571
- var o, f, l, u;
572
- const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (l = n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, a = le(e, t), i = x(e, 0);
569
+ const o = W(s, t), l = p(e, 0);
570
+ l.setFullYear(r, 0, i), l.setHours(0, 0, 0, 0);
571
+ const f = W(l, t);
572
+ return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= f.getTime() ? r : r - 1;
573
+ }
574
+ function kt(e, t) {
575
+ var o, l, f, u;
576
+ const n = P(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : l.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((u = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, a = me(e, t), i = p(e, 0);
573
577
  return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
574
578
  }
575
- function vt(e, t) {
576
- const n = d(e), r = +W(n, t) - +Tt(n, t);
577
- return Math.round(r / se) + 1;
579
+ function Wt(e, t) {
580
+ const n = m(e), r = +W(n, t) - +kt(n, t);
581
+ return Math.round(r / oe) + 1;
578
582
  }
579
- function m(e, t) {
583
+ function d(e, t) {
580
584
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
581
585
  return n + r;
582
586
  }
@@ -584,16 +588,16 @@ const M = {
584
588
  // Year
585
589
  y(e, t) {
586
590
  const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
587
- return m(t === "yy" ? r % 100 : r, t.length);
591
+ return d(t === "yy" ? r % 100 : r, t.length);
588
592
  },
589
593
  // Month
590
594
  M(e, t) {
591
595
  const n = e.getMonth();
592
- return t === "M" ? String(n + 1) : m(n + 1, 2);
596
+ return t === "M" ? String(n + 1) : d(n + 1, 2);
593
597
  },
594
598
  // Day of the month
595
599
  d(e, t) {
596
- return m(e.getDate(), t.length);
600
+ return d(e.getDate(), t.length);
597
601
  },
598
602
  // AM or PM
599
603
  a(e, t) {
@@ -613,26 +617,26 @@ const M = {
613
617
  },
614
618
  // Hour [1-12]
615
619
  h(e, t) {
616
- return m(e.getHours() % 12 || 12, t.length);
620
+ return d(e.getHours() % 12 || 12, t.length);
617
621
  },
618
622
  // Hour [0-23]
619
623
  H(e, t) {
620
- return m(e.getHours(), t.length);
624
+ return d(e.getHours(), t.length);
621
625
  },
622
626
  // Minute
623
627
  m(e, t) {
624
- return m(e.getMinutes(), t.length);
628
+ return d(e.getMinutes(), t.length);
625
629
  },
626
630
  // Second
627
631
  s(e, t) {
628
- return m(e.getSeconds(), t.length);
632
+ return d(e.getSeconds(), t.length);
629
633
  },
630
634
  // Fraction of second
631
635
  S(e, t) {
632
636
  const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
633
637
  r * Math.pow(10, n - 3)
634
638
  );
635
- return m(a, t.length);
639
+ return d(a, t.length);
636
640
  }
637
641
  }, T = {
638
642
  midnight: "midnight",
@@ -641,7 +645,7 @@ const M = {
641
645
  afternoon: "afternoon",
642
646
  evening: "evening",
643
647
  night: "night"
644
- }, B = {
648
+ }, Z = {
645
649
  // Era
646
650
  G: function(e, t, n) {
647
651
  const r = e.getFullYear() > 0 ? 1 : 0;
@@ -667,17 +671,17 @@ const M = {
667
671
  },
668
672
  // Local week-numbering year
669
673
  Y: function(e, t, n, r) {
670
- const a = le(e, r), i = a > 0 ? a : 1 - a;
674
+ const a = me(e, r), i = a > 0 ? a : 1 - a;
671
675
  if (t === "YY") {
672
676
  const s = i % 100;
673
- return m(s, 2);
677
+ return d(s, 2);
674
678
  }
675
- return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : m(i, t.length);
679
+ return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : d(i, t.length);
676
680
  },
677
681
  // ISO week-numbering year
678
682
  R: function(e, t) {
679
- const n = ce(e);
680
- return m(n, t.length);
683
+ const n = fe(e);
684
+ return d(n, t.length);
681
685
  },
682
686
  // Extended year. This is a single number designating the year of this calendar system.
683
687
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -690,7 +694,7 @@ const M = {
690
694
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
691
695
  u: function(e, t) {
692
696
  const n = e.getFullYear();
693
- return m(n, t.length);
697
+ return d(n, t.length);
694
698
  },
695
699
  // Quarter
696
700
  Q: function(e, t, n) {
@@ -699,7 +703,7 @@ const M = {
699
703
  case "Q":
700
704
  return String(r);
701
705
  case "QQ":
702
- return m(r, 2);
706
+ return d(r, 2);
703
707
  case "Qo":
704
708
  return n.ordinalNumber(r, { unit: "quarter" });
705
709
  case "QQQ":
@@ -727,7 +731,7 @@ const M = {
727
731
  case "q":
728
732
  return String(r);
729
733
  case "qq":
730
- return m(r, 2);
734
+ return d(r, 2);
731
735
  case "qo":
732
736
  return n.ordinalNumber(r, { unit: "quarter" });
733
737
  case "qqq":
@@ -779,7 +783,7 @@ const M = {
779
783
  case "L":
780
784
  return String(r + 1);
781
785
  case "LL":
782
- return m(r + 1, 2);
786
+ return d(r + 1, 2);
783
787
  case "Lo":
784
788
  return n.ordinalNumber(r + 1, { unit: "month" });
785
789
  case "LLL":
@@ -799,13 +803,13 @@ const M = {
799
803
  },
800
804
  // Local week of year
801
805
  w: function(e, t, n, r) {
802
- const a = vt(e, r);
803
- return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : m(a, t.length);
806
+ const a = Wt(e, r);
807
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : d(a, t.length);
804
808
  },
805
809
  // ISO week of year
806
810
  I: function(e, t, n) {
807
- const r = Ot(e);
808
- return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : m(r, t.length);
811
+ const r = St(e);
812
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : d(r, t.length);
809
813
  },
810
814
  // Day of the month
811
815
  d: function(e, t, n) {
@@ -813,8 +817,8 @@ const M = {
813
817
  },
814
818
  // Day of year
815
819
  D: function(e, t, n) {
816
- const r = pt(e);
817
- return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : m(r, t.length);
820
+ const r = Pt(e);
821
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : d(r, t.length);
818
822
  },
819
823
  // Day of week
820
824
  E: function(e, t, n) {
@@ -852,7 +856,7 @@ const M = {
852
856
  case "e":
853
857
  return String(i);
854
858
  case "ee":
855
- return m(i, 2);
859
+ return d(i, 2);
856
860
  case "eo":
857
861
  return n.ordinalNumber(i, { unit: "day" });
858
862
  case "eee":
@@ -885,7 +889,7 @@ const M = {
885
889
  case "c":
886
890
  return String(i);
887
891
  case "cc":
888
- return m(i, t.length);
892
+ return d(i, t.length);
889
893
  case "co":
890
894
  return n.ordinalNumber(i, { unit: "day" });
891
895
  case "ccc":
@@ -918,7 +922,7 @@ const M = {
918
922
  case "i":
919
923
  return String(a);
920
924
  case "ii":
921
- return m(a, t.length);
925
+ return d(a, t.length);
922
926
  case "io":
923
927
  return n.ordinalNumber(a, { unit: "day" });
924
928
  case "iii":
@@ -1041,12 +1045,12 @@ const M = {
1041
1045
  // Hour [0-11]
1042
1046
  K: function(e, t, n) {
1043
1047
  const r = e.getHours() % 12;
1044
- return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1048
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1045
1049
  },
1046
1050
  // Hour [1-24]
1047
1051
  k: function(e, t, n) {
1048
1052
  let r = e.getHours();
1049
- return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1053
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1050
1054
  },
1051
1055
  // Minute
1052
1056
  m: function(e, t, n) {
@@ -1067,14 +1071,14 @@ const M = {
1067
1071
  return "Z";
1068
1072
  switch (t) {
1069
1073
  case "X":
1070
- return G(r);
1074
+ return Q(r);
1071
1075
  case "XXXX":
1072
1076
  case "XX":
1073
- return p(r);
1077
+ return D(r);
1074
1078
  case "XXXXX":
1075
1079
  case "XXX":
1076
1080
  default:
1077
- return p(r, ":");
1081
+ return D(r, ":");
1078
1082
  }
1079
1083
  },
1080
1084
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1082,14 +1086,14 @@ const M = {
1082
1086
  const r = e.getTimezoneOffset();
1083
1087
  switch (t) {
1084
1088
  case "x":
1085
- return G(r);
1089
+ return Q(r);
1086
1090
  case "xxxx":
1087
1091
  case "xx":
1088
- return p(r);
1092
+ return D(r);
1089
1093
  case "xxxxx":
1090
1094
  case "xxx":
1091
1095
  default:
1092
- return p(r, ":");
1096
+ return D(r, ":");
1093
1097
  }
1094
1098
  },
1095
1099
  // Timezone (GMT)
@@ -1099,10 +1103,10 @@ const M = {
1099
1103
  case "O":
1100
1104
  case "OO":
1101
1105
  case "OOO":
1102
- return "GMT" + $(r, ":");
1106
+ return "GMT" + G(r, ":");
1103
1107
  case "OOOO":
1104
1108
  default:
1105
- return "GMT" + p(r, ":");
1109
+ return "GMT" + D(r, ":");
1106
1110
  }
1107
1111
  },
1108
1112
  // Timezone (specific non-location)
@@ -1112,35 +1116,35 @@ const M = {
1112
1116
  case "z":
1113
1117
  case "zz":
1114
1118
  case "zzz":
1115
- return "GMT" + $(r, ":");
1119
+ return "GMT" + G(r, ":");
1116
1120
  case "zzzz":
1117
1121
  default:
1118
- return "GMT" + p(r, ":");
1122
+ return "GMT" + D(r, ":");
1119
1123
  }
1120
1124
  },
1121
1125
  // Seconds timestamp
1122
1126
  t: function(e, t, n) {
1123
1127
  const r = Math.trunc(e.getTime() / 1e3);
1124
- return m(r, t.length);
1128
+ return d(r, t.length);
1125
1129
  },
1126
1130
  // Milliseconds timestamp
1127
1131
  T: function(e, t, n) {
1128
1132
  const r = e.getTime();
1129
- return m(r, t.length);
1133
+ return d(r, t.length);
1130
1134
  }
1131
1135
  };
1132
- function $(e, t = "") {
1136
+ function G(e, t = "") {
1133
1137
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
1134
- return i === 0 ? n + String(a) : n + String(a) + t + m(i, 2);
1138
+ return i === 0 ? n + String(a) : n + String(a) + t + d(i, 2);
1135
1139
  }
1136
- function G(e, t) {
1137
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + m(Math.abs(e) / 60, 2) : p(e, t);
1140
+ function Q(e, t) {
1141
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + d(Math.abs(e) / 60, 2) : D(e, t);
1138
1142
  }
1139
- function p(e, t = "") {
1140
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = m(Math.trunc(r / 60), 2), i = m(r % 60, 2);
1143
+ function D(e, t = "") {
1144
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = d(Math.trunc(r / 60), 2), i = d(r % 60, 2);
1141
1145
  return n + a + t + i;
1142
1146
  }
1143
- const Q = (e, t) => {
1147
+ const J = (e, t) => {
1144
1148
  switch (e) {
1145
1149
  case "P":
1146
1150
  return t.date({ width: "short" });
@@ -1152,7 +1156,7 @@ const Q = (e, t) => {
1152
1156
  default:
1153
1157
  return t.date({ width: "full" });
1154
1158
  }
1155
- }, me = (e, t) => {
1159
+ }, he = (e, t) => {
1156
1160
  switch (e) {
1157
1161
  case "p":
1158
1162
  return t.time({ width: "short" });
@@ -1164,10 +1168,10 @@ const Q = (e, t) => {
1164
1168
  default:
1165
1169
  return t.time({ width: "full" });
1166
1170
  }
1167
- }, Pt = (e, t) => {
1171
+ }, Ct = (e, t) => {
1168
1172
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1169
1173
  if (!a)
1170
- return Q(e, t);
1174
+ return J(e, t);
1171
1175
  let i;
1172
1176
  switch (r) {
1173
1177
  case "P":
@@ -1184,81 +1188,81 @@ const Q = (e, t) => {
1184
1188
  i = t.dateTime({ width: "full" });
1185
1189
  break;
1186
1190
  }
1187
- return i.replace("{{date}}", Q(r, t)).replace("{{time}}", me(a, t));
1188
- }, St = {
1189
- p: me,
1190
- P: Pt
1191
- }, kt = /^D+$/, Wt = /^Y+$/, Ft = ["D", "DD", "YY", "YYYY"];
1192
- function Nt(e) {
1193
- return kt.test(e);
1194
- }
1195
- function Ct(e) {
1196
- return Wt.test(e);
1197
- }
1198
- function Yt(e, t, n) {
1199
- const r = Et(e, t, n);
1200
- if (console.warn(r), Ft.includes(e)) throw new RangeError(r);
1201
- }
1202
- function Et(e, t, n) {
1191
+ return i.replace("{{date}}", J(r, t)).replace("{{time}}", he(a, t));
1192
+ }, Ft = {
1193
+ p: he,
1194
+ P: Ct
1195
+ }, Nt = /^D+$/, Yt = /^Y+$/, Et = ["D", "DD", "YY", "YYYY"];
1196
+ function Lt(e) {
1197
+ return Nt.test(e);
1198
+ }
1199
+ function _t(e) {
1200
+ return Yt.test(e);
1201
+ }
1202
+ function zt(e, t, n) {
1203
+ const r = Xt(e, t, n);
1204
+ if (console.warn(r), Et.includes(e)) throw new RangeError(r);
1205
+ }
1206
+ function Xt(e, t, n) {
1203
1207
  const r = e[0] === "Y" ? "years" : "days of the month";
1204
1208
  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`;
1205
1209
  }
1206
- const Lt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xt = /^'([^]*?)'?$/, _t = /''/g, qt = /[a-zA-Z]/;
1207
- function R(e, t, n) {
1208
- var u, g, c, h, y, O, H, j;
1209
- const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? fe, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (c = r.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (y = n == null ? void 0 : n.locale) == null ? void 0 : y.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((j = (H = r.locale) == null ? void 0 : H.options) == null ? void 0 : j.weekStartsOn) ?? 0, o = d(e);
1210
- if (!Ee(o))
1210
+ const It = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, qt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ht = /^'([^]*?)'?$/, Rt = /''/g, At = /[a-zA-Z]/;
1211
+ function H(e, t, n) {
1212
+ var u, g, c, h, y, O, A, j;
1213
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? de, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((h = (c = r.locale) == null ? void 0 : c.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, s = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (y = n == null ? void 0 : n.locale) == null ? void 0 : y.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((j = (A = r.locale) == null ? void 0 : A.options) == null ? void 0 : j.weekStartsOn) ?? 0, o = m(e);
1214
+ if (!Xe(o))
1211
1215
  throw new RangeError("Invalid time value");
1212
- let f = t.match(zt).map((b) => {
1216
+ let l = t.match(qt).map((b) => {
1213
1217
  const w = b[0];
1214
1218
  if (w === "p" || w === "P") {
1215
- const z = St[w];
1216
- return z(b, a.formatLong);
1219
+ const _ = Ft[w];
1220
+ return _(b, a.formatLong);
1217
1221
  }
1218
1222
  return b;
1219
- }).join("").match(Lt).map((b) => {
1223
+ }).join("").match(It).map((b) => {
1220
1224
  if (b === "''")
1221
1225
  return { isToken: !1, value: "'" };
1222
1226
  const w = b[0];
1223
1227
  if (w === "'")
1224
- return { isToken: !1, value: It(b) };
1225
- if (B[w])
1228
+ return { isToken: !1, value: jt(b) };
1229
+ if (Z[w])
1226
1230
  return { isToken: !0, value: b };
1227
- if (w.match(qt))
1231
+ if (w.match(At))
1228
1232
  throw new RangeError(
1229
1233
  "Format string contains an unescaped latin alphabet character `" + w + "`"
1230
1234
  );
1231
1235
  return { isToken: !1, value: b };
1232
1236
  });
1233
- a.localize.preprocessor && (f = a.localize.preprocessor(o, f));
1234
- const l = {
1237
+ a.localize.preprocessor && (l = a.localize.preprocessor(o, l));
1238
+ const f = {
1235
1239
  firstWeekContainsDate: i,
1236
1240
  weekStartsOn: s,
1237
1241
  locale: a
1238
1242
  };
1239
- return f.map((b) => {
1243
+ return l.map((b) => {
1240
1244
  if (!b.isToken) return b.value;
1241
1245
  const w = b.value;
1242
- (!(n != null && n.useAdditionalWeekYearTokens) && Ct(w) || !(n != null && n.useAdditionalDayOfYearTokens) && Nt(w)) && Yt(w, t, String(e));
1243
- const z = B[w[0]];
1244
- return z(o, w, a.localize, l);
1246
+ (!(n != null && n.useAdditionalWeekYearTokens) && _t(w) || !(n != null && n.useAdditionalDayOfYearTokens) && Lt(w)) && zt(w, t, String(e));
1247
+ const _ = Z[w[0]];
1248
+ return _(o, w, a.localize, f);
1245
1249
  }).join("");
1246
1250
  }
1247
- function It(e) {
1248
- const t = e.match(Xt);
1249
- return t ? t[1].replace(_t, "'") : e;
1251
+ function jt(e) {
1252
+ const t = e.match(Ht);
1253
+ return t ? t[1].replace(Rt, "'") : e;
1250
1254
  }
1251
- function Rt(e, t, n) {
1252
- const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? fe, i = 2520, s = N(e, t);
1255
+ function Ut(e, t, n) {
1256
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? de, i = 2520, s = F(e, t);
1253
1257
  if (isNaN(s))
1254
1258
  throw new RangeError("Invalid time value");
1255
1259
  const o = Object.assign({}, n, {
1256
1260
  addSuffix: n == null ? void 0 : n.addSuffix,
1257
1261
  comparison: s
1258
1262
  });
1259
- let f, l;
1260
- s > 0 ? (f = d(t), l = d(e)) : (f = d(e), l = d(t));
1261
- const u = Ae(l, f), g = (E(l) - E(f)) / 1e3, c = Math.round((u - g) / 60);
1263
+ let l, f;
1264
+ s > 0 ? (l = m(t), f = m(e)) : (l = m(e), f = m(t));
1265
+ const u = Be(f, l), g = (E(f) - E(l)) / 1e3, c = Math.round((u - g) / 60);
1262
1266
  let h;
1263
1267
  if (c < 2)
1264
1268
  return n != null && n.includeSeconds ? u < 5 ? a.formatDistance("lessThanXSeconds", 5, o) : u < 10 ? a.formatDistance("lessThanXSeconds", 10, o) : u < 20 ? a.formatDistance("lessThanXSeconds", 20, o) : u < 40 ? a.formatDistance("halfAMinute", 0, o) : u < 60 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", 1, o) : c === 0 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", c, o);
@@ -1266,61 +1270,61 @@ function Rt(e, t, n) {
1266
1270
  return a.formatDistance("xMinutes", c, o);
1267
1271
  if (c < 90)
1268
1272
  return a.formatDistance("aboutXHours", 1, o);
1269
- if (c < Z) {
1273
+ if (c < $) {
1270
1274
  const y = Math.round(c / 60);
1271
1275
  return a.formatDistance("aboutXHours", y, o);
1272
1276
  } else {
1273
1277
  if (c < i)
1274
1278
  return a.formatDistance("xDays", 1, o);
1275
- if (c < F) {
1276
- const y = Math.round(c / Z);
1279
+ if (c < C) {
1280
+ const y = Math.round(c / $);
1277
1281
  return a.formatDistance("xDays", y, o);
1278
- } else if (c < F * 2)
1279
- return h = Math.round(c / F), a.formatDistance("aboutXMonths", h, o);
1282
+ } else if (c < C * 2)
1283
+ return h = Math.round(c / C), a.formatDistance("aboutXMonths", h, o);
1280
1284
  }
1281
- if (h = Re(l, f), h < 12) {
1282
- const y = Math.round(c / F);
1285
+ if (h = Ue(f, l), h < 12) {
1286
+ const y = Math.round(c / C);
1283
1287
  return a.formatDistance("xMonths", y, o);
1284
1288
  } else {
1285
1289
  const y = h % 12, O = Math.trunc(h / 12);
1286
1290
  return y < 3 ? a.formatDistance("aboutXYears", O, o) : y < 9 ? a.formatDistance("overXYears", O, o) : a.formatDistance("almostXYears", O + 1, o);
1287
1291
  }
1288
1292
  }
1289
- function At(e, t) {
1290
- return Rt(e, Ce(e), t);
1293
+ function Bt(e, t) {
1294
+ return Ut(e, _e(e), t);
1291
1295
  }
1292
- function Ht() {
1296
+ function $t() {
1293
1297
  return Object.assign({}, P());
1294
1298
  }
1295
- function J(e, t, n) {
1296
- const r = Ht(), a = Zt(e, n.timeZone, n.locale ?? r.locale);
1297
- return "formatToParts" in a ? jt(a, t) : Ut(a, t);
1299
+ function K(e, t, n) {
1300
+ const r = $t(), a = Gt(e, n.timeZone, n.locale ?? r.locale);
1301
+ return "formatToParts" in a ? Vt(a, t) : Zt(a, t);
1298
1302
  }
1299
- function jt(e, t) {
1303
+ function Vt(e, t) {
1300
1304
  const n = e.formatToParts(t);
1301
1305
  for (let r = n.length - 1; r >= 0; --r)
1302
1306
  if (n[r].type === "timeZoneName")
1303
1307
  return n[r].value;
1304
1308
  }
1305
- function Ut(e, t) {
1309
+ function Zt(e, t) {
1306
1310
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1307
1311
  return r ? r[0].substr(1) : "";
1308
1312
  }
1309
- function Zt(e, t, n) {
1313
+ function Gt(e, t, n) {
1310
1314
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1311
1315
  timeZone: t,
1312
1316
  timeZoneName: e
1313
1317
  });
1314
1318
  }
1315
- const Vt = 60 * 1e3, Bt = {
1319
+ const Qt = 60 * 1e3, Jt = {
1316
1320
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1317
1321
  X: function(e, t, n) {
1318
- const r = _(n.timeZone, e);
1322
+ const r = X(n.timeZone, e);
1319
1323
  if (r === 0)
1320
1324
  return "Z";
1321
1325
  switch (t) {
1322
1326
  case "X":
1323
- return K(r);
1327
+ return ee(r);
1324
1328
  case "XXXX":
1325
1329
  case "XX":
1326
1330
  return v(r);
@@ -1332,10 +1336,10 @@ const Vt = 60 * 1e3, Bt = {
1332
1336
  },
1333
1337
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1334
1338
  x: function(e, t, n) {
1335
- const r = _(n.timeZone, e);
1339
+ const r = X(n.timeZone, e);
1336
1340
  switch (t) {
1337
1341
  case "x":
1338
- return K(r);
1342
+ return ee(r);
1339
1343
  case "xxxx":
1340
1344
  case "xx":
1341
1345
  return v(r);
@@ -1347,12 +1351,12 @@ const Vt = 60 * 1e3, Bt = {
1347
1351
  },
1348
1352
  // Timezone (GMT)
1349
1353
  O: function(e, t, n) {
1350
- const r = _(n.timeZone, e);
1354
+ const r = X(n.timeZone, e);
1351
1355
  switch (t) {
1352
1356
  case "O":
1353
1357
  case "OO":
1354
1358
  case "OOO":
1355
- return "GMT" + $t(r, ":");
1359
+ return "GMT" + Kt(r, ":");
1356
1360
  case "OOOO":
1357
1361
  default:
1358
1362
  return "GMT" + v(r, ":");
@@ -1364,15 +1368,15 @@ const Vt = 60 * 1e3, Bt = {
1364
1368
  case "z":
1365
1369
  case "zz":
1366
1370
  case "zzz":
1367
- return J("short", e, n);
1371
+ return K("short", e, n);
1368
1372
  case "zzzz":
1369
1373
  default:
1370
- return J("long", e, n);
1374
+ return K("long", e, n);
1371
1375
  }
1372
1376
  }
1373
1377
  };
1374
- function _(e, t) {
1375
- const n = e ? oe(e, t, !0) / Vt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1378
+ function X(e, t) {
1379
+ const n = e ? ue(e, t, !0) / Qt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1376
1380
  if (Number.isNaN(n))
1377
1381
  throw new RangeError("Invalid time zone specified: " + e);
1378
1382
  return n;
@@ -1388,44 +1392,44 @@ function v(e, t = "") {
1388
1392
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = L(Math.floor(r / 60), 2), i = L(Math.floor(r % 60), 2);
1389
1393
  return n + a + t + i;
1390
1394
  }
1391
- function K(e, t) {
1395
+ function ee(e, t) {
1392
1396
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + L(Math.abs(e) / 60, 2) : v(e, t);
1393
1397
  }
1394
- function $t(e, t = "") {
1398
+ function Kt(e, t = "") {
1395
1399
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
1396
1400
  return i === 0 ? n + String(a) : n + String(a) + t + L(i, 2);
1397
1401
  }
1398
- const Gt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1399
- function Qt(e, t, n = {}) {
1402
+ const en = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1403
+ function tn(e, t, n = {}) {
1400
1404
  t = String(t);
1401
- const r = t.match(Gt);
1405
+ const r = t.match(en);
1402
1406
  if (r) {
1403
- const a = ue(n.originalDate || e, n);
1407
+ const a = ce(n.originalDate || e, n);
1404
1408
  t = r.reduce(function(i, s) {
1405
1409
  if (s[0] === "'")
1406
1410
  return i;
1407
- const o = i.indexOf(s), f = i[o - 1] === "'", l = i.replace(s, "'" + Bt[s[0]](a, s, n) + "'");
1408
- return f ? l.substring(0, o - 1) + l.substring(o + 1) : l;
1411
+ const o = i.indexOf(s), l = i[o - 1] === "'", f = i.replace(s, "'" + Jt[s[0]](a, s, n) + "'");
1412
+ return l ? f.substring(0, o - 1) + f.substring(o + 1) : f;
1409
1413
  }, t);
1410
1414
  }
1411
- return R(e, t, n);
1415
+ return H(e, t, n);
1412
1416
  }
1413
- function Jt(e, t, n) {
1414
- e = ue(e, n);
1415
- const r = oe(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
1417
+ function nn(e, t, n) {
1418
+ e = ce(e, n);
1419
+ const r = ue(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
1416
1420
  return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
1417
1421
  }
1418
- function de(e, t, n, r) {
1422
+ function ge(e, t, n, r) {
1419
1423
  return r = {
1420
1424
  ...r,
1421
1425
  timeZone: t,
1422
1426
  originalDate: e
1423
- }, Qt(Jt(e, t, { timeZone: r.timeZone }), n, r);
1427
+ }, tn(nn(e, t, { timeZone: r.timeZone }), n, r);
1424
1428
  }
1425
- function bn(e, t) {
1429
+ function vn(e, t) {
1426
1430
  return e && e !== "auto" ? e : t;
1427
1431
  }
1428
- function Mn(e, t = /* @__PURE__ */ new Date()) {
1432
+ function Pn(e, t = /* @__PURE__ */ new Date()) {
1429
1433
  try {
1430
1434
  const n = {
1431
1435
  timeZone: e,
@@ -1436,7 +1440,7 @@ function Mn(e, t = /* @__PURE__ */ new Date()) {
1436
1440
  return e;
1437
1441
  }
1438
1442
  }
1439
- function xn(e) {
1443
+ function Sn(e) {
1440
1444
  try {
1441
1445
  const t = {
1442
1446
  timeZone: e,
@@ -1449,7 +1453,7 @@ function xn(e) {
1449
1453
  return e;
1450
1454
  }
1451
1455
  }
1452
- function A(e, t = "auto") {
1456
+ function R(e, t = "auto") {
1453
1457
  if (!e)
1454
1458
  return /* @__PURE__ */ new Date(NaN);
1455
1459
  const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
@@ -1461,73 +1465,73 @@ function A(e, t = "auto") {
1461
1465
  return new Date(i);
1462
1466
  }
1463
1467
  return new Date(e);
1464
- } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : xe(e, t);
1468
+ } 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);
1465
1469
  }
1466
- const Kt = "MM/dd/yyyy", en = (e, t, n, r = "auto") => {
1470
+ const rn = "MM/dd/yyyy", an = (e, t, n, r = "auto") => {
1467
1471
  if (!e)
1468
1472
  return "";
1469
1473
  try {
1470
- const a = A(e, r);
1474
+ const a = R(e, r);
1471
1475
  if (isNaN(a.getTime()))
1472
1476
  return e;
1473
- const s = (t && t.trim() ? t : Kt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1474
- return n && n !== "auto" ? de(a, n, s) : R(a, s);
1477
+ const s = (t && t.trim() ? t : rn).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1478
+ return n && n !== "auto" ? ge(a, n, s) : H(a, s);
1475
1479
  } catch (a) {
1476
1480
  return console.error("Date formatting error:", a), e;
1477
1481
  }
1478
1482
  };
1479
- function Dn(e, t, n = "auto") {
1483
+ function kn(e, t, n = "auto") {
1480
1484
  if (e)
1481
1485
  try {
1482
- const r = A(e, n);
1486
+ const r = R(e, n);
1483
1487
  if (isNaN(r.getTime())) return;
1484
- const a = "yyyy M d H m s", i = t && t !== "auto" ? de(r, t, a) : R(r, a), [s, o, f, l, u, g] = i.split(" ").map(Number);
1485
- return { year: s, month: o, day: f, hour: l, minute: u, second: g };
1488
+ const a = "yyyy M d H m s", i = t && t !== "auto" ? ge(r, t, a) : H(r, a), [s, o, l, f, u, g] = i.split(" ").map(Number);
1489
+ return { year: s, month: o, day: l, hour: f, minute: u, second: g };
1486
1490
  } catch {
1487
1491
  return;
1488
1492
  }
1489
1493
  }
1490
- const tn = (e, t = "auto") => {
1494
+ const sn = (e, t = "auto") => {
1491
1495
  if (!e)
1492
1496
  return "";
1493
1497
  try {
1494
- const n = A(e, t);
1495
- return isNaN(n.getTime()) ? e : At(n, { addSuffix: !0 });
1498
+ const n = R(e, t);
1499
+ return isNaN(n.getTime()) ? e : Bt(n, { addSuffix: !0 });
1496
1500
  } catch (n) {
1497
1501
  return console.error("Relative time formatting error:", n), e;
1498
1502
  }
1499
1503
  };
1500
- function nn(e, t, n, r) {
1504
+ function on(e, t, n, r) {
1501
1505
  const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n, s = (r == null ? void 0 : r.isSqlCard) ?? !1;
1502
1506
  if (t != null && t.useRelativeTime)
1503
- return tn(
1507
+ return sn(
1504
1508
  a,
1505
1509
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1506
1510
  );
1507
1511
  const o = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
1508
- return en(
1512
+ return an(
1509
1513
  a,
1510
1514
  o,
1511
1515
  t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : s ? i : n,
1512
1516
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1513
1517
  );
1514
1518
  }
1515
- function he(e, t, n) {
1519
+ function ye(e, t, n) {
1516
1520
  var s, o;
1517
1521
  if (e == null)
1518
1522
  return e === null ? ((s = n.absence) == null ? void 0 : s.nullText) ?? "" : ((o = n.absence) == null ? void 0 : o.emptyText) ?? "";
1519
- const r = ge(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
1523
+ const r = Me(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
1520
1524
  if (!n.useFormattedValues || !t)
1521
1525
  return String(a);
1522
1526
  switch (t.type) {
1523
1527
  case "number":
1524
- return i !== void 0 ? De(
1528
+ return i !== void 0 ? ve(
1525
1529
  i,
1526
1530
  t.numberFormat,
1527
1531
  n.locale
1528
1532
  ) : String(a);
1529
1533
  case "date":
1530
- return nn(
1534
+ return on(
1531
1535
  a,
1532
1536
  t.dateFormat,
1533
1537
  n.timezone,
@@ -1546,17 +1550,17 @@ function he(e, t, n) {
1546
1550
  return String(a);
1547
1551
  }
1548
1552
  }
1549
- function pn(e, t) {
1553
+ function Wn(e, t) {
1550
1554
  return t.visibleColumns.map((n) => {
1551
1555
  const r = e[n], a = t.columnSettings[n];
1552
- return he(r, a, {
1556
+ return ye(r, a, {
1553
1557
  useFormattedValues: t.useFormattedValues,
1554
1558
  timezone: t.timezone,
1555
1559
  locale: t.locale
1556
1560
  });
1557
1561
  });
1558
1562
  }
1559
- const rn = "en-US", ee = [
1563
+ const un = "en-US", te = [
1560
1564
  "compact",
1561
1565
  "maximumFractionDigits",
1562
1566
  "minimumFractionDigits",
@@ -1564,38 +1568,38 @@ const rn = "en-US", ee = [
1564
1568
  "type",
1565
1569
  "useGrouping"
1566
1570
  ];
1567
- function an(e) {
1571
+ function cn(e) {
1568
1572
  if (e.type !== "currency" || Object.prototype.hasOwnProperty.call(e, "currency") || Object.prototype.hasOwnProperty.call(e, "locale"))
1569
1573
  return !1;
1570
1574
  const t = Object.keys(e).sort();
1571
- return t.length === ee.length && ee.every(
1575
+ return t.length === te.length && te.every(
1572
1576
  (n, r) => t[r] === n
1573
1577
  ) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
1574
1578
  }
1575
- function te(e) {
1579
+ function ne(e) {
1576
1580
  if (typeof e != "string")
1577
1581
  return;
1578
1582
  const t = e.trim();
1579
1583
  if (!(!t || t.toLowerCase() === "none"))
1580
1584
  return t;
1581
1585
  }
1582
- function C(e) {
1586
+ function N(e) {
1583
1587
  if (!(typeof e != "number" || !Number.isFinite(e)))
1584
1588
  return Math.max(0, Math.min(10, Math.trunc(e)));
1585
1589
  }
1586
- function sn(e) {
1590
+ function ln(e) {
1587
1591
  return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
1588
1592
  }
1589
- function on(e, t, n) {
1590
- const r = C(t.minimumFractionDigits), a = C(t.maximumFractionDigits);
1593
+ function fn(e, t, n) {
1594
+ const r = N(t.minimumFractionDigits), a = N(t.maximumFractionDigits);
1591
1595
  if (typeof r == "number" || typeof a == "number") {
1592
- const o = r ?? 0, f = a ?? Math.max(o, 2);
1596
+ const o = r ?? 0, l = a ?? Math.max(o, 2);
1593
1597
  return {
1594
- minimumFractionDigits: Math.min(o, f),
1595
- maximumFractionDigits: Math.max(o, f)
1598
+ minimumFractionDigits: Math.min(o, l),
1599
+ maximumFractionDigits: Math.max(o, l)
1596
1600
  };
1597
1601
  }
1598
- const i = C(t.decimals);
1602
+ const i = N(t.decimals);
1599
1603
  if (typeof i == "number")
1600
1604
  return {
1601
1605
  minimumFractionDigits: i,
@@ -1603,18 +1607,18 @@ function on(e, t, n) {
1603
1607
  };
1604
1608
  if (n != null && n.preserveOmittedProperties)
1605
1609
  return {};
1606
- const s = sn(e);
1610
+ const s = ln(e);
1607
1611
  return {
1608
1612
  minimumFractionDigits: s,
1609
1613
  maximumFractionDigits: s
1610
1614
  };
1611
1615
  }
1612
- function un(e, t) {
1616
+ function dn(e, t) {
1613
1617
  if (!(typeof t != "string" || e === "percent" && t === "%"))
1614
1618
  return t;
1615
1619
  }
1616
- function ne(e) {
1617
- const t = te(e.locale), n = te(e.currency), r = un(e.type, e.suffix);
1620
+ function re(e) {
1621
+ const t = ne(e.locale), n = ne(e.currency), r = dn(e.type, e.suffix);
1618
1622
  return {
1619
1623
  ...e,
1620
1624
  ...t !== e.locale ? { locale: t } : {},
@@ -1622,11 +1626,11 @@ function ne(e) {
1622
1626
  ...r !== e.suffix ? { suffix: r } : {}
1623
1627
  };
1624
1628
  }
1625
- function D(e, t, n) {
1629
+ function x(e, t, n) {
1626
1630
  const r = { ...t, type: e };
1627
- if ((n == null ? void 0 : n.numericInput) === "canonical" && I(r))
1628
- return ne(r);
1629
- const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, s = {
1631
+ if ((n == null ? void 0 : n.numericInput) === "canonical" && q(r))
1632
+ return re(r);
1633
+ const a = fn(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, s = {
1630
1634
  type: e,
1631
1635
  locale: t.locale,
1632
1636
  minimumFractionDigits: a.minimumFractionDigits,
@@ -1638,12 +1642,12 @@ function D(e, t, n) {
1638
1642
  compact: !!t.compact,
1639
1643
  scale: typeof t.scale == "number" ? t.scale : void 0
1640
1644
  };
1641
- return e === "currency" && t.currency && (s.currency = t.currency), e === "percent" && (s.percentValueMode = t.percentValueMode || "fraction"), ne(s);
1645
+ return e === "currency" && t.currency && (s.currency = t.currency), e === "percent" && (s.percentValueMode = t.percentValueMode || "fraction"), re(s);
1642
1646
  }
1643
- function re(e) {
1647
+ function ae(e) {
1644
1648
  return {
1645
1649
  type: "date",
1646
- locale: e.locale || rn,
1650
+ locale: e.locale || un,
1647
1651
  pattern: e.pattern,
1648
1652
  relative: !!e.relative,
1649
1653
  timezone: e.timezone,
@@ -1652,68 +1656,68 @@ function re(e) {
1652
1656
  suffix: e.suffix
1653
1657
  };
1654
1658
  }
1655
- function q(e) {
1659
+ function I(e) {
1656
1660
  return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
1657
1661
  }
1658
- function ae(e) {
1659
- const t = C(e.maxUnits);
1662
+ function ie(e) {
1663
+ const t = N(e.maxUnits);
1660
1664
  return {
1661
1665
  type: "duration",
1662
- inputUnit: q(e.inputUnit) ? e.inputUnit : "second",
1666
+ inputUnit: I(e.inputUnit) ? e.inputUnit : "second",
1663
1667
  outputStyle: e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact",
1664
- largestUnit: q(e.largestUnit) ? e.largestUnit : void 0,
1665
- smallestUnit: q(e.smallestUnit) ? e.smallestUnit : "second",
1668
+ largestUnit: I(e.largestUnit) ? e.largestUnit : void 0,
1669
+ smallestUnit: I(e.smallestUnit) ? e.smallestUnit : "second",
1666
1670
  maxUnits: t,
1667
1671
  prefix: e.prefix,
1668
1672
  suffix: e.suffix,
1669
1673
  negativeStyle: e.negativeStyle || "minus"
1670
1674
  };
1671
1675
  }
1672
- function ie(e) {
1676
+ function se(e) {
1673
1677
  return {
1674
1678
  type: "string",
1675
1679
  prefix: e.prefix,
1676
1680
  suffix: e.suffix
1677
1681
  };
1678
1682
  }
1679
- function cn(e, t) {
1683
+ function mn(e, t) {
1680
1684
  if (!e)
1681
1685
  return;
1682
1686
  if (typeof e == "string") {
1683
1687
  const r = e.trim().toLowerCase();
1684
- return r === "currency" ? D(
1688
+ return r === "currency" ? x(
1685
1689
  "currency",
1686
1690
  { type: "currency" },
1687
1691
  t
1688
- ) : r === "percentage" || r === "percent" ? D(
1692
+ ) : r === "percentage" || r === "percent" ? x(
1689
1693
  "percent",
1690
1694
  {
1691
1695
  type: "percentage",
1692
1696
  percentValueMode: "fraction"
1693
1697
  },
1694
1698
  t
1695
- ) : r === "scientific" ? D(
1699
+ ) : r === "scientific" ? x(
1696
1700
  "scientific",
1697
1701
  { type: "scientific" },
1698
1702
  t
1699
- ) : r === "date" ? re({}) : r === "duration" ? ae({}) : r === "string" ? ie({}) : r === "number" ? D(
1703
+ ) : r === "date" ? ae({}) : r === "duration" ? ie({}) : r === "string" ? se({}) : r === "number" ? x(
1700
1704
  "number",
1701
1705
  { type: "number" },
1702
1706
  t
1703
1707
  ) : void 0;
1704
1708
  }
1705
1709
  if ("type" in e && e.type === "temporal_bucket") {
1706
- const r = be.safeParse(e);
1710
+ const r = De.safeParse(e);
1707
1711
  return r.success ? r.data : void 0;
1708
1712
  }
1709
1713
  const n = e;
1710
1714
  if ((t == null ? void 0 : t.numericInput) === "canonical") {
1711
1715
  const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
1712
- if (I(r))
1713
- return D(r.type, r, t);
1716
+ if (q(r))
1717
+ return x(r.type, r, t);
1714
1718
  }
1715
1719
  if (n.type === "percentage")
1716
- return D(
1720
+ return x(
1717
1721
  "percent",
1718
1722
  {
1719
1723
  ...n,
@@ -1722,21 +1726,21 @@ function cn(e, t) {
1722
1726
  t
1723
1727
  );
1724
1728
  if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific") {
1725
- const r = D(
1729
+ const r = x(
1726
1730
  n.type,
1727
1731
  n,
1728
1732
  t
1729
1733
  );
1730
- return an(n) ? { ...r, currency: "USD" } : r;
1734
+ return cn(n) ? { ...r, currency: "USD" } : r;
1731
1735
  }
1732
1736
  if (n.type === "date")
1733
- return re(n);
1734
- if (n.type === "duration")
1735
1737
  return ae(n);
1736
- if (n.type === "string")
1738
+ if (n.type === "duration")
1737
1739
  return ie(n);
1740
+ if (n.type === "string")
1741
+ return se(n);
1738
1742
  }
1739
- function fn(e, t) {
1743
+ function hn(e, t) {
1740
1744
  var a;
1741
1745
  const n = e[e.length - 1];
1742
1746
  if (!n) return "";
@@ -1744,62 +1748,62 @@ function fn(e, t) {
1744
1748
  const r = n.member.value;
1745
1749
  return r === null ? "(Blank)" : ((a = t == null ? void 0 : t.get(n.levelId)) == null ? void 0 : a(r)) ?? (typeof r == "object" ? r.value : String(r));
1746
1750
  }
1747
- function ln(e, t, n) {
1748
- return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(we).join(t)) ?? `${t} Total` : t;
1751
+ function gn(e, t, n) {
1752
+ return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(xe).join(t)) ?? `${t} Total` : t;
1749
1753
  }
1750
- function On(e, t, n, r) {
1754
+ function Cn(e, t, n, r) {
1751
1755
  var s;
1752
1756
  const a = e[e.length - 1], i = t === "grand_total" ? n.grand.label : a ? (s = n.levels[a.levelId]) == null ? void 0 : s.label : void 0;
1753
- return ln(t, fn(e, r), i);
1757
+ return gn(t, hn(e, r), i);
1754
1758
  }
1755
- function Tn(e, t, n) {
1759
+ function Fn(e, t, n) {
1756
1760
  return e.kind === "value" ? (t == null ? void 0 : t(e.value)) ?? "" : e.kind === "null" ? n.nullText : n.emptyText;
1757
1761
  }
1758
- function vn(e) {
1762
+ function Nn(e) {
1759
1763
  const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
1760
1764
  return Array.from({ length: i }, (s, o) => {
1761
- const f = t.slice(0, o + 1), l = r === "grand_total" ? o === 0 : r === "subtotal" && o === t.length - 1, u = n && n.length > o && U(n.slice(0, o + 1)) === U(f);
1765
+ const l = t.slice(0, o + 1), f = r === "grand_total" ? o === 0 : r === "subtotal" && o === t.length - 1, u = n && n.length > o && B(n.slice(0, o + 1)) === B(l);
1762
1766
  return {
1763
- path: f,
1764
- total: l,
1765
- visible: l || t.length > o && (a || !u || o === t.length - 1)
1767
+ path: l,
1768
+ total: f,
1769
+ visible: f || t.length > o && (a || !u || o === t.length - 1)
1766
1770
  };
1767
1771
  });
1768
1772
  }
1769
- function mn(e, t) {
1770
- return cn(e ?? t, {
1773
+ function yn(e, t) {
1774
+ return mn(e ?? t, {
1771
1775
  preserveOmittedProperties: !0,
1772
1776
  numericInput: "canonical"
1773
1777
  });
1774
1778
  }
1775
- function Pn(e, t, n) {
1779
+ function Yn(e, t, n) {
1776
1780
  const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = (s, o) => {
1777
- const f = (o === "levels" ? t.levelFormats : t.measureFormats)[s.id], l = s.semanticFormat, u = mn(f, l);
1781
+ const l = (o === "levels" ? t.levelFormats : t.measureFormats)[s.id], f = s.semanticFormat, u = yn(l, f);
1778
1782
  o === "measures" && r.set(s.id, {
1779
- isNumeric: ye(s.column.dataType) === "number",
1783
+ isNumeric: pe(s.column.dataType) === "number",
1780
1784
  // Use normalized affixes: a redundant percent suffix is already removed.
1781
1785
  hasTextAffixes: !!u && !!("prefix" in u && u.prefix || "suffix" in u && u.suffix)
1782
1786
  });
1783
- const g = (c) => he(c, void 0, {
1787
+ const g = (c) => ye(c, void 0, {
1784
1788
  useFormattedValues: !0,
1785
1789
  timezone: n.calendar.tz,
1786
1790
  locale: n.valueFormat.locale,
1787
1791
  absence: t.absence
1788
1792
  });
1789
1793
  if (s.column.temporalBucket) {
1790
- const c = s.column.temporalBucket, h = pe({
1794
+ const c = s.column.temporalBucket, h = Pe({
1791
1795
  metadata: c,
1792
- cardFormat: (f == null ? void 0 : f.type) === "temporal_bucket" ? f : void 0,
1793
- semanticFormat: (l == null ? void 0 : l.type) === "temporal_bucket" ? { granularity: c.granularity, format: l } : void 0,
1796
+ cardFormat: (l == null ? void 0 : l.type) === "temporal_bucket" ? l : void 0,
1797
+ semanticFormat: (f == null ? void 0 : f.type) === "temporal_bucket" ? { granularity: c.granularity, format: f } : void 0,
1794
1798
  locale: n.valueFormat.locale,
1795
1799
  styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
1796
1800
  });
1797
- return (y) => typeof y == "string" ? Oe({ value: y, metadata: c, format: h.format }) : g(y);
1801
+ return (y) => typeof y == "string" ? le({ value: y, metadata: c, format: h.format }) : g(y);
1798
1802
  }
1799
1803
  if (s.column.rawTemporal) {
1800
- const c = Te({
1804
+ const c = Se({
1801
1805
  metadata: s.column.rawTemporal,
1802
- format: ve({
1806
+ format: ke({
1803
1807
  format: (u == null ? void 0 : u.type) === "date" ? {
1804
1808
  type: "raw_temporal",
1805
1809
  timezone: u.timezone,
@@ -1820,11 +1824,11 @@ function Pn(e, t, n) {
1820
1824
  return y.ok ? y.text : g(h);
1821
1825
  };
1822
1826
  }
1823
- if (I(u)) {
1824
- const c = Pe(u, n.valueFormat);
1825
- return o === "measures" && a.set(s.id, c), (h) => typeof h == "number" || typeof h == "object" && h !== null ? Se(h, c) : g(h);
1827
+ if (q(u)) {
1828
+ const c = We(u, n.valueFormat);
1829
+ return o === "measures" && a.set(s.id, c), (h) => typeof h == "number" || typeof h == "object" && h !== null ? Ce(h, c) : g(h);
1826
1830
  }
1827
- return (u == null ? void 0 : u.type) === "duration" && o === "measures" && a.set(s.id, u), (u == null ? void 0 : u.type) === "duration" ? (c) => typeof c == "number" || typeof c == "string" || typeof c == "object" && c !== null ? ke(
1831
+ return (u == null ? void 0 : u.type) === "duration" && o === "measures" && a.set(s.id, u), (u == null ? void 0 : u.type) === "duration" ? (c) => typeof c == "number" || typeof c == "string" || typeof c == "object" && c !== null ? Fe(
1828
1832
  typeof c == "object" ? c.value : c,
1829
1833
  u
1830
1834
  ) : g(c) : (u == null ? void 0 : u.type) === "string" ? (c) => c === null ? g(c) : `${u.prefix ?? ""}${g(c)}${u.suffix ?? ""}` : g;
@@ -1841,37 +1845,82 @@ function Pn(e, t, n) {
1841
1845
  absence: t.absence
1842
1846
  };
1843
1847
  }
1848
+ class wn extends Error {
1849
+ constructor(n, r) {
1850
+ super(`${n}: ${r}`);
1851
+ U(this, "deliveryBlocking", !0);
1852
+ this.code = n, this.name = "PivotHeaderPresentationError";
1853
+ }
1854
+ }
1855
+ function En(e) {
1856
+ var a;
1857
+ const t = e.mode ?? "formatted", n = e.members.map((i) => {
1858
+ var o;
1859
+ if (t === "canonical" || !i.temporalBucket)
1860
+ return i.value === null ? "" : String(i.value);
1861
+ const s = (o = e.resolveTemporalFormat) == null ? void 0 : o.call(e, i.fieldId);
1862
+ if (!s)
1863
+ throw new wn(
1864
+ "missing_resolved_temporal_format",
1865
+ `Missing resolved temporal presentation for pivot field "${i.fieldId}"`
1866
+ );
1867
+ return le({
1868
+ value: i.value,
1869
+ metadata: i.temporalBucket,
1870
+ format: s
1871
+ });
1872
+ }), r = ((a = e.metricLabel) == null ? void 0 : a.trim()) || void 0;
1873
+ return {
1874
+ memberLabels: n,
1875
+ ...r ? { metricLabel: r } : {},
1876
+ flattenedLabel: [
1877
+ ...n,
1878
+ ...r ? [r] : []
1879
+ ].join(" / ")
1880
+ };
1881
+ }
1882
+ function Ln(e) {
1883
+ const t = /* @__PURE__ */ new Map();
1884
+ return e.forEach((n) => {
1885
+ n.id && t.set(n.id, (t.get(n.id) ?? 0) + 1);
1886
+ }), e.flatMap(
1887
+ (n) => n.id && (t.get(n.id) ?? 0) > 1 ? [Ne(n)] : []
1888
+ );
1889
+ }
1844
1890
  export {
1845
- ae as A,
1846
- D as B,
1847
- te as C,
1848
- rn as D,
1849
- mn as E,
1850
- ln as F,
1851
- en as a,
1852
- tn as b,
1853
- xn as c,
1854
- Dn as d,
1855
- he as e,
1856
- cn as f,
1857
- Mn as g,
1858
- pn as h,
1859
- Pn as i,
1860
- On as j,
1861
- vn as k,
1862
- Tn as l,
1863
- fn as m,
1864
- de as n,
1865
- R as o,
1866
- A as p,
1867
- Rt as q,
1868
- bn as r,
1869
- P as s,
1870
- fe as t,
1871
- N as u,
1872
- d as v,
1873
- ze as w,
1874
- E as x,
1875
- Ce as y,
1876
- re as z
1891
+ _e as A,
1892
+ ae as B,
1893
+ ie as C,
1894
+ x as D,
1895
+ un as E,
1896
+ ne as F,
1897
+ yn as G,
1898
+ gn as H,
1899
+ wn as P,
1900
+ an as a,
1901
+ sn as b,
1902
+ Sn as c,
1903
+ kn as d,
1904
+ ye as e,
1905
+ mn as f,
1906
+ Pn as g,
1907
+ Wn as h,
1908
+ Yn as i,
1909
+ En as j,
1910
+ Ln as k,
1911
+ Cn as l,
1912
+ hn as m,
1913
+ Nn as n,
1914
+ Fn as o,
1915
+ R as p,
1916
+ ge as q,
1917
+ vn as r,
1918
+ H as s,
1919
+ Ut as t,
1920
+ P as u,
1921
+ de as v,
1922
+ F as w,
1923
+ m as x,
1924
+ qe as y,
1925
+ E as z
1877
1926
  };