react-semaphor 0.1.537 → 0.1.538

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 (173) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-Qgpv6_G8.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-BAqUIFp5.js +7966 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-DTDDFQsS.js} +1 -1
  24. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bb2QUqOa.js} +764 -740
  25. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-FpONU8QV.js} +683 -686
  26. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  27. package/dist/chunks/dashboard-json-DazPhBU_.js +69 -0
  28. package/dist/chunks/document-dashboard-inputs-D96rlU7S.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-CIhZodVH.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-Bgw32tb3.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-BCGs4-AE.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-BrTkjcod.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-CHHoWhil.js} +65586 -62749
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-EsayECEC.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-BqA92GkX.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-text-filter.d.ts +7 -0
  101. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  102. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  103. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  104. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  105. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  106. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  107. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  108. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  109. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  110. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  111. package/dist/types/lib/types/token-types.d.ts +11 -0
  112. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  113. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  114. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  115. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  116. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  117. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  118. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  119. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  120. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  121. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  122. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  123. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  124. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  125. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  126. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  127. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  128. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  129. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  130. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  131. package/dist/types/shared/assistant-protocol/parts.d.ts +131 -0
  132. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  133. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  134. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  135. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  136. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  137. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  138. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  139. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  140. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  141. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  142. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  143. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  144. package/dist/types/shared/format-utils/index.d.ts +3 -0
  145. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  146. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  147. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  148. package/dist/types/shared/layouts/index.d.ts +1 -0
  149. package/package.json +12 -2
  150. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  151. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  152. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  153. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  154. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  155. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  156. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  157. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  158. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  159. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  160. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  161. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  162. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  163. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  164. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  165. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  166. package/dist/chunks/save-kO6cIaob.js +0 -34
  167. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  168. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  169. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  170. package/dist/chunks/x-CXDkqdur.js +0 -149
  171. package/dist/types/lib/class-utils.d.ts +0 -2
  172. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  173. package/dist/types/lib/utils.d.ts +0 -51
@@ -1,43 +1,41 @@
1
- import { bi as ae, E as z, B as se, ac as oe } from "./validators-DMSH81OM.js";
2
- import "./matrix-operation-contract-BKupLHXL.js";
1
+ import { aD as he, w as j, l as ge, a4 as ye } from "./validators-Ej1DdCXa.js";
2
+ import "./matrix-operation-contract-B8PBF1Gd.js";
3
+ import { j as we } from "./analytics-base-schemas-BFAoRlkU.js";
3
4
  import "zod";
4
- import { f as ie } from "./semantic-format-DiqYeKwU.js";
5
- import { t as Q, j as V, h as ue, f as ce, r as fe, i as le } from "./raw-temporal-iMXRK-Qz.js";
6
- import { g as de, l as me, e as he, i as ge } from "./numeric-presentation-CWu3gunq.js";
7
- import { b as we, c as G, d as I, e as W } from "./constants-DNWVy8Y3.js";
8
- import { c as ye, f as be } from "./temporal-bucket-DlFuhCnT.js";
5
+ import { C as ae, D as ie, B as be, h as Me, i as I, z as De, q as xe, n as pe, g as Oe, k as Te } from "./raw-temporal-D61lr48Y.js";
6
+ import { l as ve, n as se, h as H, j as C, c as Pe, f as Se } from "./temporal-bucket-D8JF7zKz.js";
9
7
  function h(e) {
10
8
  const t = Object.prototype.toString.call(e);
11
9
  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);
12
10
  }
13
- function T(e, t) {
11
+ function D(e, t) {
14
12
  return e instanceof Date ? new e.constructor(t) : new Date(t);
15
13
  }
16
- let Me = {};
17
- function v() {
18
- return Me;
14
+ let ke = {};
15
+ function P() {
16
+ return ke;
19
17
  }
20
- function S(e, t) {
21
- var o, f, u, d;
22
- const n = v(), 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 ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, a = h(e), s = a.getDay(), i = (s < r ? 7 : 0) + s - r;
23
- return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
18
+ function W(e, t) {
19
+ var s, c, u, m;
20
+ const n = P(), 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 ?? ((m = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : m.weekStartsOn) ?? 0, a = h(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
21
+ return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
24
22
  }
25
23
  function N(e) {
26
- return S(e, { weekStartsOn: 1 });
24
+ return W(e, { weekStartsOn: 1 });
27
25
  }
28
- function U(e) {
29
- const t = h(e), n = t.getFullYear(), r = T(e, 0);
26
+ function oe(e) {
27
+ const t = h(e), n = t.getFullYear(), r = D(e, 0);
30
28
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
31
- const a = N(r), s = T(e, 0);
32
- s.setFullYear(n, 0, 4), s.setHours(0, 0, 0, 0);
33
- const i = N(s);
34
- return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= i.getTime() ? n : n - 1;
29
+ const a = N(r), i = D(e, 0);
30
+ i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
31
+ const o = N(i);
32
+ return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
35
33
  }
36
- function R(e) {
34
+ function U(e) {
37
35
  const t = h(e);
38
36
  return t.setHours(0, 0, 0, 0), t;
39
37
  }
40
- function C(e) {
38
+ function E(e) {
41
39
  const t = h(e), n = new Date(
42
40
  Date.UTC(
43
41
  t.getFullYear(),
@@ -51,78 +49,78 @@ function C(e) {
51
49
  );
52
50
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
53
51
  }
54
- function Te(e, t) {
55
- const n = R(e), r = R(t), a = +n - C(n), s = +r - C(r);
56
- return Math.round((a - s) / we);
52
+ function We(e, t) {
53
+ const n = U(e), r = U(t), a = +n - E(n), i = +r - E(r);
54
+ return Math.round((a - i) / ve);
57
55
  }
58
- function De(e) {
59
- const t = U(e), n = T(e, 0);
56
+ function Ce(e) {
57
+ const t = oe(e), n = D(e, 0);
60
58
  return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), N(n);
61
59
  }
62
60
  function Y(e, t) {
63
61
  const n = h(e), r = h(t), a = n.getTime() - r.getTime();
64
62
  return a < 0 ? -1 : a > 0 ? 1 : a;
65
63
  }
66
- function Oe(e) {
67
- return T(e, Date.now());
64
+ function Ye(e) {
65
+ return D(e, Date.now());
68
66
  }
69
- function xe(e) {
67
+ function Fe(e) {
70
68
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
71
69
  }
72
- function Pe(e) {
73
- if (!xe(e) && typeof e != "number")
70
+ function Ne(e) {
71
+ if (!Fe(e) && typeof e != "number")
74
72
  return !1;
75
73
  const t = h(e);
76
74
  return !isNaN(Number(t));
77
75
  }
78
- function ve(e, t) {
79
- const n = h(e), r = h(t), a = n.getFullYear() - r.getFullYear(), s = n.getMonth() - r.getMonth();
80
- return a * 12 + s;
76
+ function Ee(e, t) {
77
+ const n = h(e), r = h(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
78
+ return a * 12 + i;
81
79
  }
82
- function ke(e) {
80
+ function ze(e) {
83
81
  return (t) => {
84
82
  const r = (e ? Math[e] : Math.trunc)(t);
85
83
  return r === 0 ? 0 : r;
86
84
  };
87
85
  }
88
- function pe(e, t) {
86
+ function Le(e, t) {
89
87
  return +h(e) - +h(t);
90
88
  }
91
- function Se(e) {
89
+ function Xe(e) {
92
90
  const t = h(e);
93
91
  return t.setHours(23, 59, 59, 999), t;
94
92
  }
95
- function We(e) {
93
+ function _e(e) {
96
94
  const t = h(e), n = t.getMonth();
97
95
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
98
96
  }
99
- function Ye(e) {
97
+ function qe(e) {
100
98
  const t = h(e);
101
- return +Se(t) == +We(t);
99
+ return +Xe(t) == +_e(t);
102
100
  }
103
- function Ne(e, t) {
104
- const n = h(e), r = h(t), a = Y(n, r), s = Math.abs(
105
- ve(n, r)
101
+ function Ie(e, t) {
102
+ const n = h(e), r = h(t), a = Y(n, r), i = Math.abs(
103
+ Ee(n, r)
106
104
  );
107
- let i;
108
- if (s < 1)
109
- i = 0;
105
+ let o;
106
+ if (i < 1)
107
+ o = 0;
110
108
  else {
111
- n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * s);
112
- let o = Y(n, r) === -a;
113
- Ye(h(e)) && s === 1 && Y(e, r) === 1 && (o = !1), i = a * (s - Number(o));
109
+ n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
110
+ let s = Y(n, r) === -a;
111
+ qe(h(e)) && i === 1 && Y(e, r) === 1 && (s = !1), o = a * (i - Number(s));
114
112
  }
115
- return i === 0 ? 0 : i;
113
+ return o === 0 ? 0 : o;
116
114
  }
117
- function Ce(e, t, n) {
118
- const r = pe(e, t) / 1e3;
119
- return ke(n == null ? void 0 : n.roundingMethod)(r);
115
+ function Re(e, t, n) {
116
+ const r = Le(e, t) / 1e3;
117
+ return ze(n == null ? void 0 : n.roundingMethod)(r);
120
118
  }
121
- function Ee(e) {
122
- const t = h(e), n = T(e, 0);
119
+ function Ae(e) {
120
+ const t = h(e), n = D(e, 0);
123
121
  return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
124
122
  }
125
- const Xe = {
123
+ const je = {
126
124
  lessThanXSeconds: {
127
125
  one: "less than a second",
128
126
  other: "less than {{count}} seconds"
@@ -184,77 +182,77 @@ const Xe = {
184
182
  one: "almost 1 year",
185
183
  other: "almost {{count}} years"
186
184
  }
187
- }, Le = (e, t, n) => {
185
+ }, He = (e, t, n) => {
188
186
  let r;
189
- const a = Xe[e];
187
+ const a = je[e];
190
188
  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;
191
189
  };
192
- function L(e) {
190
+ function X(e) {
193
191
  return (t = {}) => {
194
192
  const n = t.width ? String(t.width) : e.defaultWidth;
195
193
  return e.formats[n] || e.formats[e.defaultWidth];
196
194
  };
197
195
  }
198
- const _e = {
196
+ const Ue = {
199
197
  full: "EEEE, MMMM do, y",
200
198
  long: "MMMM do, y",
201
199
  medium: "MMM d, y",
202
200
  short: "MM/dd/yyyy"
203
- }, Fe = {
201
+ }, Be = {
204
202
  full: "h:mm:ss a zzzz",
205
203
  long: "h:mm:ss a z",
206
204
  medium: "h:mm:ss a",
207
205
  short: "h:mm a"
208
- }, qe = {
206
+ }, Ve = {
209
207
  full: "{{date}} 'at' {{time}}",
210
208
  long: "{{date}} 'at' {{time}}",
211
209
  medium: "{{date}}, {{time}}",
212
210
  short: "{{date}}, {{time}}"
213
- }, ze = {
214
- date: L({
215
- formats: _e,
211
+ }, Ze = {
212
+ date: X({
213
+ formats: Ue,
216
214
  defaultWidth: "full"
217
215
  }),
218
- time: L({
219
- formats: Fe,
216
+ time: X({
217
+ formats: Be,
220
218
  defaultWidth: "full"
221
219
  }),
222
- dateTime: L({
223
- formats: qe,
220
+ dateTime: X({
221
+ formats: Ve,
224
222
  defaultWidth: "full"
225
223
  })
226
- }, Ie = {
224
+ }, $e = {
227
225
  lastWeek: "'last' eeee 'at' p",
228
226
  yesterday: "'yesterday at' p",
229
227
  today: "'today at' p",
230
228
  tomorrow: "'tomorrow at' p",
231
229
  nextWeek: "eeee 'at' p",
232
230
  other: "P"
233
- }, Re = (e, t, n, r) => Ie[e];
234
- function k(e) {
231
+ }, Ge = (e, t, n, r) => $e[e];
232
+ function S(e) {
235
233
  return (t, n) => {
236
234
  const r = n != null && n.context ? String(n.context) : "standalone";
237
235
  let a;
238
236
  if (r === "formatting" && e.formattingValues) {
239
- const i = e.defaultFormattingWidth || e.defaultWidth, o = n != null && n.width ? String(n.width) : i;
240
- a = e.formattingValues[o] || e.formattingValues[i];
237
+ const o = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : o;
238
+ a = e.formattingValues[s] || e.formattingValues[o];
241
239
  } else {
242
- const i = e.defaultWidth, o = n != null && n.width ? String(n.width) : e.defaultWidth;
243
- a = e.values[o] || e.values[i];
240
+ const o = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
241
+ a = e.values[s] || e.values[o];
244
242
  }
245
- const s = e.argumentCallback ? e.argumentCallback(t) : t;
246
- return a[s];
243
+ const i = e.argumentCallback ? e.argumentCallback(t) : t;
244
+ return a[i];
247
245
  };
248
246
  }
249
- const Ae = {
247
+ const Qe = {
250
248
  narrow: ["B", "A"],
251
249
  abbreviated: ["BC", "AD"],
252
250
  wide: ["Before Christ", "Anno Domini"]
253
- }, He = {
251
+ }, Je = {
254
252
  narrow: ["1", "2", "3", "4"],
255
253
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
256
254
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
257
- }, je = {
255
+ }, Ke = {
258
256
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
259
257
  abbreviated: [
260
258
  "Jan",
@@ -284,7 +282,7 @@ const Ae = {
284
282
  "November",
285
283
  "December"
286
284
  ]
287
- }, Ze = {
285
+ }, et = {
288
286
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
289
287
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
290
288
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -297,7 +295,7 @@ const Ae = {
297
295
  "Friday",
298
296
  "Saturday"
299
297
  ]
300
- }, $e = {
298
+ }, tt = {
301
299
  narrow: {
302
300
  am: "a",
303
301
  pm: "p",
@@ -328,7 +326,7 @@ const Ae = {
328
326
  evening: "evening",
329
327
  night: "night"
330
328
  }
331
- }, Be = {
329
+ }, nt = {
332
330
  narrow: {
333
331
  am: "a",
334
332
  pm: "p",
@@ -359,7 +357,7 @@ const Ae = {
359
357
  evening: "in the evening",
360
358
  night: "at night"
361
359
  }
362
- }, Qe = (e, t) => {
360
+ }, rt = (e, t) => {
363
361
  const n = Number(e), r = n % 100;
364
362
  if (r > 20 || r < 10)
365
363
  switch (r % 10) {
@@ -371,89 +369,89 @@ const Ae = {
371
369
  return n + "rd";
372
370
  }
373
371
  return n + "th";
374
- }, Ve = {
375
- ordinalNumber: Qe,
376
- era: k({
377
- values: Ae,
372
+ }, at = {
373
+ ordinalNumber: rt,
374
+ era: S({
375
+ values: Qe,
378
376
  defaultWidth: "wide"
379
377
  }),
380
- quarter: k({
381
- values: He,
378
+ quarter: S({
379
+ values: Je,
382
380
  defaultWidth: "wide",
383
381
  argumentCallback: (e) => e - 1
384
382
  }),
385
- month: k({
386
- values: je,
383
+ month: S({
384
+ values: Ke,
387
385
  defaultWidth: "wide"
388
386
  }),
389
- day: k({
390
- values: Ze,
387
+ day: S({
388
+ values: et,
391
389
  defaultWidth: "wide"
392
390
  }),
393
- dayPeriod: k({
394
- values: $e,
391
+ dayPeriod: S({
392
+ values: tt,
395
393
  defaultWidth: "wide",
396
- formattingValues: Be,
394
+ formattingValues: nt,
397
395
  defaultFormattingWidth: "wide"
398
396
  })
399
397
  };
400
- function p(e) {
398
+ function k(e) {
401
399
  return (t, n = {}) => {
402
- const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(a);
403
- if (!s)
400
+ const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
401
+ if (!i)
404
402
  return null;
405
- const i = s[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(o) ? Ue(o, (c) => c.test(i)) : (
403
+ const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? st(s, (f) => f.test(o)) : (
406
404
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
407
- Ge(o, (c) => c.test(i))
405
+ it(s, (f) => f.test(o))
408
406
  );
409
407
  let u;
410
- u = e.valueCallback ? e.valueCallback(f) : f, u = n.valueCallback ? (
408
+ u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
411
409
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
412
410
  n.valueCallback(u)
413
411
  ) : u;
414
- const d = t.slice(i.length);
415
- return { value: u, rest: d };
412
+ const m = t.slice(o.length);
413
+ return { value: u, rest: m };
416
414
  };
417
415
  }
418
- function Ge(e, t) {
416
+ function it(e, t) {
419
417
  for (const n in e)
420
418
  if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
421
419
  return n;
422
420
  }
423
- function Ue(e, t) {
421
+ function st(e, t) {
424
422
  for (let n = 0; n < e.length; n++)
425
423
  if (t(e[n]))
426
424
  return n;
427
425
  }
428
- function Je(e) {
426
+ function ot(e) {
429
427
  return (t, n = {}) => {
430
428
  const r = t.match(e.matchPattern);
431
429
  if (!r) return null;
432
- const a = r[0], s = t.match(e.parsePattern);
433
- if (!s) return null;
434
- let i = e.valueCallback ? e.valueCallback(s[0]) : s[0];
435
- i = n.valueCallback ? n.valueCallback(i) : i;
436
- const o = t.slice(a.length);
437
- return { value: i, rest: o };
430
+ const a = r[0], i = t.match(e.parsePattern);
431
+ if (!i) return null;
432
+ let o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
433
+ o = n.valueCallback ? n.valueCallback(o) : o;
434
+ const s = t.slice(a.length);
435
+ return { value: o, rest: s };
438
436
  };
439
437
  }
440
- const Ke = /^(\d+)(th|st|nd|rd)?/i, et = /\d+/i, tt = {
438
+ const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
441
439
  narrow: /^(b|a)/i,
442
440
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
443
441
  wide: /^(before christ|before common era|anno domini|common era)/i
444
- }, nt = {
442
+ }, lt = {
445
443
  any: [/^b/i, /^(a|c)/i]
446
- }, rt = {
444
+ }, mt = {
447
445
  narrow: /^[1234]/i,
448
446
  abbreviated: /^q[1234]/i,
449
447
  wide: /^[1234](th|st|nd|rd)? quarter/i
450
- }, at = {
448
+ }, dt = {
451
449
  any: [/1/i, /2/i, /3/i, /4/i]
452
- }, st = {
450
+ }, ht = {
453
451
  narrow: /^[jfmasond]/i,
454
452
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
455
453
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
456
- }, ot = {
454
+ }, gt = {
457
455
  narrow: [
458
456
  /^j/i,
459
457
  /^f/i,
@@ -482,18 +480,18 @@ const Ke = /^(\d+)(th|st|nd|rd)?/i, et = /\d+/i, tt = {
482
480
  /^n/i,
483
481
  /^d/i
484
482
  ]
485
- }, it = {
483
+ }, yt = {
486
484
  narrow: /^[smtwf]/i,
487
485
  short: /^(su|mo|tu|we|th|fr|sa)/i,
488
486
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
489
487
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
490
- }, ut = {
488
+ }, wt = {
491
489
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
492
490
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
493
- }, ct = {
491
+ }, bt = {
494
492
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
495
493
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
496
- }, ft = {
494
+ }, Mt = {
497
495
  any: {
498
496
  am: /^a/i,
499
497
  pm: /^p/i,
@@ -504,82 +502,82 @@ const Ke = /^(\d+)(th|st|nd|rd)?/i, et = /\d+/i, tt = {
504
502
  evening: /evening/i,
505
503
  night: /night/i
506
504
  }
507
- }, lt = {
508
- ordinalNumber: Je({
509
- matchPattern: Ke,
510
- parsePattern: et,
505
+ }, Dt = {
506
+ ordinalNumber: ot({
507
+ matchPattern: ut,
508
+ parsePattern: ct,
511
509
  valueCallback: (e) => parseInt(e, 10)
512
510
  }),
513
- era: p({
514
- matchPatterns: tt,
511
+ era: k({
512
+ matchPatterns: ft,
515
513
  defaultMatchWidth: "wide",
516
- parsePatterns: nt,
514
+ parsePatterns: lt,
517
515
  defaultParseWidth: "any"
518
516
  }),
519
- quarter: p({
520
- matchPatterns: rt,
517
+ quarter: k({
518
+ matchPatterns: mt,
521
519
  defaultMatchWidth: "wide",
522
- parsePatterns: at,
520
+ parsePatterns: dt,
523
521
  defaultParseWidth: "any",
524
522
  valueCallback: (e) => e + 1
525
523
  }),
526
- month: p({
527
- matchPatterns: st,
524
+ month: k({
525
+ matchPatterns: ht,
528
526
  defaultMatchWidth: "wide",
529
- parsePatterns: ot,
527
+ parsePatterns: gt,
530
528
  defaultParseWidth: "any"
531
529
  }),
532
- day: p({
533
- matchPatterns: it,
530
+ day: k({
531
+ matchPatterns: yt,
534
532
  defaultMatchWidth: "wide",
535
- parsePatterns: ut,
533
+ parsePatterns: wt,
536
534
  defaultParseWidth: "any"
537
535
  }),
538
- dayPeriod: p({
539
- matchPatterns: ct,
536
+ dayPeriod: k({
537
+ matchPatterns: bt,
540
538
  defaultMatchWidth: "any",
541
- parsePatterns: ft,
539
+ parsePatterns: Mt,
542
540
  defaultParseWidth: "any"
543
541
  })
544
- }, J = {
542
+ }, ue = {
545
543
  code: "en-US",
546
- formatDistance: Le,
547
- formatLong: ze,
548
- formatRelative: Re,
549
- localize: Ve,
550
- match: lt,
544
+ formatDistance: He,
545
+ formatLong: Ze,
546
+ formatRelative: Ge,
547
+ localize: at,
548
+ match: Dt,
551
549
  options: {
552
550
  weekStartsOn: 0,
553
551
  firstWeekContainsDate: 1
554
552
  }
555
553
  };
556
- function dt(e) {
554
+ function xt(e) {
557
555
  const t = h(e);
558
- return Te(t, Ee(t)) + 1;
559
- }
560
- function mt(e) {
561
- const t = h(e), n = +N(t) - +De(t);
562
- return Math.round(n / G) + 1;
563
- }
564
- function K(e, t) {
565
- var d, c, l, g;
566
- const n = h(e), r = n.getFullYear(), a = v(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : c.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (l = a.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = T(e, 0);
567
- i.setFullYear(r + 1, 0, s), i.setHours(0, 0, 0, 0);
568
- const o = S(i, t), f = T(e, 0);
569
- f.setFullYear(r, 0, s), f.setHours(0, 0, 0, 0);
570
- const u = S(f, t);
571
- return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
572
- }
573
- function ht(e, t) {
574
- var o, f, u, d;
575
- const n = v(), 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 ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, a = K(e, t), s = T(e, 0);
576
- return s.setFullYear(a, 0, r), s.setHours(0, 0, 0, 0), S(s, t);
577
- }
578
- function gt(e, t) {
579
- const n = h(e), r = +S(n, t) - +ht(n, t);
580
- return Math.round(r / G) + 1;
581
- }
582
- function m(e, t) {
556
+ return We(t, Ae(t)) + 1;
557
+ }
558
+ function pt(e) {
559
+ const t = h(e), n = +N(t) - +Ce(t);
560
+ return Math.round(n / se) + 1;
561
+ }
562
+ function ce(e, t) {
563
+ var m, f, l, g;
564
+ const n = h(e), r = n.getFullYear(), a = P(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (m = t == null ? void 0 : t.locale) == null ? void 0 : m.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (l = a.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = D(e, 0);
565
+ o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
566
+ const s = W(o, t), c = D(e, 0);
567
+ c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
568
+ const u = W(c, t);
569
+ return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
570
+ }
571
+ function Ot(e, t) {
572
+ var s, c, u, m;
573
+ const n = P(), 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 ?? ((m = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, a = ce(e, t), i = D(e, 0);
574
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
575
+ }
576
+ function Tt(e, t) {
577
+ const n = h(e), r = +W(n, t) - +Ot(n, t);
578
+ return Math.round(r / se) + 1;
579
+ }
580
+ function d(e, t) {
583
581
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
584
582
  return n + r;
585
583
  }
@@ -587,16 +585,16 @@ const M = {
587
585
  // Year
588
586
  y(e, t) {
589
587
  const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
590
- return m(t === "yy" ? r % 100 : r, t.length);
588
+ return d(t === "yy" ? r % 100 : r, t.length);
591
589
  },
592
590
  // Month
593
591
  M(e, t) {
594
592
  const n = e.getMonth();
595
- return t === "M" ? String(n + 1) : m(n + 1, 2);
593
+ return t === "M" ? String(n + 1) : d(n + 1, 2);
596
594
  },
597
595
  // Day of the month
598
596
  d(e, t) {
599
- return m(e.getDate(), t.length);
597
+ return d(e.getDate(), t.length);
600
598
  },
601
599
  // AM or PM
602
600
  a(e, t) {
@@ -616,35 +614,35 @@ const M = {
616
614
  },
617
615
  // Hour [1-12]
618
616
  h(e, t) {
619
- return m(e.getHours() % 12 || 12, t.length);
617
+ return d(e.getHours() % 12 || 12, t.length);
620
618
  },
621
619
  // Hour [0-23]
622
620
  H(e, t) {
623
- return m(e.getHours(), t.length);
621
+ return d(e.getHours(), t.length);
624
622
  },
625
623
  // Minute
626
624
  m(e, t) {
627
- return m(e.getMinutes(), t.length);
625
+ return d(e.getMinutes(), t.length);
628
626
  },
629
627
  // Second
630
628
  s(e, t) {
631
- return m(e.getSeconds(), t.length);
629
+ return d(e.getSeconds(), t.length);
632
630
  },
633
631
  // Fraction of second
634
632
  S(e, t) {
635
633
  const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
636
634
  r * Math.pow(10, n - 3)
637
635
  );
638
- return m(a, t.length);
636
+ return d(a, t.length);
639
637
  }
640
- }, x = {
638
+ }, T = {
641
639
  midnight: "midnight",
642
640
  noon: "noon",
643
641
  morning: "morning",
644
642
  afternoon: "afternoon",
645
643
  evening: "evening",
646
644
  night: "night"
647
- }, A = {
645
+ }, B = {
648
646
  // Era
649
647
  G: function(e, t, n) {
650
648
  const r = e.getFullYear() > 0 ? 1 : 0;
@@ -670,17 +668,17 @@ const M = {
670
668
  },
671
669
  // Local week-numbering year
672
670
  Y: function(e, t, n, r) {
673
- const a = K(e, r), s = a > 0 ? a : 1 - a;
671
+ const a = ce(e, r), i = a > 0 ? a : 1 - a;
674
672
  if (t === "YY") {
675
- const i = s % 100;
676
- return m(i, 2);
673
+ const o = i % 100;
674
+ return d(o, 2);
677
675
  }
678
- return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : m(s, t.length);
676
+ return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : d(i, t.length);
679
677
  },
680
678
  // ISO week-numbering year
681
679
  R: function(e, t) {
682
- const n = U(e);
683
- return m(n, t.length);
680
+ const n = oe(e);
681
+ return d(n, t.length);
684
682
  },
685
683
  // Extended year. This is a single number designating the year of this calendar system.
686
684
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -693,7 +691,7 @@ const M = {
693
691
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
694
692
  u: function(e, t) {
695
693
  const n = e.getFullYear();
696
- return m(n, t.length);
694
+ return d(n, t.length);
697
695
  },
698
696
  // Quarter
699
697
  Q: function(e, t, n) {
@@ -702,7 +700,7 @@ const M = {
702
700
  case "Q":
703
701
  return String(r);
704
702
  case "QQ":
705
- return m(r, 2);
703
+ return d(r, 2);
706
704
  case "Qo":
707
705
  return n.ordinalNumber(r, { unit: "quarter" });
708
706
  case "QQQ":
@@ -730,7 +728,7 @@ const M = {
730
728
  case "q":
731
729
  return String(r);
732
730
  case "qq":
733
- return m(r, 2);
731
+ return d(r, 2);
734
732
  case "qo":
735
733
  return n.ordinalNumber(r, { unit: "quarter" });
736
734
  case "qqq":
@@ -782,7 +780,7 @@ const M = {
782
780
  case "L":
783
781
  return String(r + 1);
784
782
  case "LL":
785
- return m(r + 1, 2);
783
+ return d(r + 1, 2);
786
784
  case "Lo":
787
785
  return n.ordinalNumber(r + 1, { unit: "month" });
788
786
  case "LLL":
@@ -802,13 +800,13 @@ const M = {
802
800
  },
803
801
  // Local week of year
804
802
  w: function(e, t, n, r) {
805
- const a = gt(e, r);
806
- return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : m(a, t.length);
803
+ const a = Tt(e, r);
804
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : d(a, t.length);
807
805
  },
808
806
  // ISO week of year
809
807
  I: function(e, t, n) {
810
- const r = mt(e);
811
- return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : m(r, t.length);
808
+ const r = pt(e);
809
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : d(r, t.length);
812
810
  },
813
811
  // Day of the month
814
812
  d: function(e, t, n) {
@@ -816,8 +814,8 @@ const M = {
816
814
  },
817
815
  // Day of year
818
816
  D: function(e, t, n) {
819
- const r = dt(e);
820
- return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : m(r, t.length);
817
+ const r = xt(e);
818
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : d(r, t.length);
821
819
  },
822
820
  // Day of week
823
821
  E: function(e, t, n) {
@@ -850,14 +848,14 @@ const M = {
850
848
  },
851
849
  // Local day of week
852
850
  e: function(e, t, n, r) {
853
- const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
851
+ const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
854
852
  switch (t) {
855
853
  case "e":
856
- return String(s);
854
+ return String(i);
857
855
  case "ee":
858
- return m(s, 2);
856
+ return d(i, 2);
859
857
  case "eo":
860
- return n.ordinalNumber(s, { unit: "day" });
858
+ return n.ordinalNumber(i, { unit: "day" });
861
859
  case "eee":
862
860
  return n.day(a, {
863
861
  width: "abbreviated",
@@ -883,14 +881,14 @@ const M = {
883
881
  },
884
882
  // Stand-alone local day of week
885
883
  c: function(e, t, n, r) {
886
- const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
884
+ const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
887
885
  switch (t) {
888
886
  case "c":
889
- return String(s);
887
+ return String(i);
890
888
  case "cc":
891
- return m(s, t.length);
889
+ return d(i, t.length);
892
890
  case "co":
893
- return n.ordinalNumber(s, { unit: "day" });
891
+ return n.ordinalNumber(i, { unit: "day" });
894
892
  case "ccc":
895
893
  return n.day(a, {
896
894
  width: "abbreviated",
@@ -921,7 +919,7 @@ const M = {
921
919
  case "i":
922
920
  return String(a);
923
921
  case "ii":
924
- return m(a, t.length);
922
+ return d(a, t.length);
925
923
  case "io":
926
924
  return n.ordinalNumber(a, { unit: "day" });
927
925
  case "iii":
@@ -979,7 +977,7 @@ const M = {
979
977
  b: function(e, t, n) {
980
978
  const r = e.getHours();
981
979
  let a;
982
- switch (r === 12 ? a = x.noon : r === 0 ? a = x.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
980
+ switch (r === 12 ? a = T.noon : r === 0 ? a = T.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
983
981
  case "b":
984
982
  case "bb":
985
983
  return n.dayPeriod(a, {
@@ -1008,7 +1006,7 @@ const M = {
1008
1006
  B: function(e, t, n) {
1009
1007
  const r = e.getHours();
1010
1008
  let a;
1011
- switch (r >= 17 ? a = x.evening : r >= 12 ? a = x.afternoon : r >= 4 ? a = x.morning : a = x.night, t) {
1009
+ switch (r >= 17 ? a = T.evening : r >= 12 ? a = T.afternoon : r >= 4 ? a = T.morning : a = T.night, t) {
1012
1010
  case "B":
1013
1011
  case "BB":
1014
1012
  case "BBB":
@@ -1044,12 +1042,12 @@ const M = {
1044
1042
  // Hour [0-11]
1045
1043
  K: function(e, t, n) {
1046
1044
  const r = e.getHours() % 12;
1047
- return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1045
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1048
1046
  },
1049
1047
  // Hour [1-24]
1050
1048
  k: function(e, t, n) {
1051
1049
  let r = e.getHours();
1052
- return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
1050
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, t.length);
1053
1051
  },
1054
1052
  // Minute
1055
1053
  m: function(e, t, n) {
@@ -1070,14 +1068,14 @@ const M = {
1070
1068
  return "Z";
1071
1069
  switch (t) {
1072
1070
  case "X":
1073
- return j(r);
1071
+ return Z(r);
1074
1072
  case "XXXX":
1075
1073
  case "XX":
1076
- return D(r);
1074
+ return p(r);
1077
1075
  case "XXXXX":
1078
1076
  case "XXX":
1079
1077
  default:
1080
- return D(r, ":");
1078
+ return p(r, ":");
1081
1079
  }
1082
1080
  },
1083
1081
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1085,14 +1083,14 @@ const M = {
1085
1083
  const r = e.getTimezoneOffset();
1086
1084
  switch (t) {
1087
1085
  case "x":
1088
- return j(r);
1086
+ return Z(r);
1089
1087
  case "xxxx":
1090
1088
  case "xx":
1091
- return D(r);
1089
+ return p(r);
1092
1090
  case "xxxxx":
1093
1091
  case "xxx":
1094
1092
  default:
1095
- return D(r, ":");
1093
+ return p(r, ":");
1096
1094
  }
1097
1095
  },
1098
1096
  // Timezone (GMT)
@@ -1102,10 +1100,10 @@ const M = {
1102
1100
  case "O":
1103
1101
  case "OO":
1104
1102
  case "OOO":
1105
- return "GMT" + H(r, ":");
1103
+ return "GMT" + V(r, ":");
1106
1104
  case "OOOO":
1107
1105
  default:
1108
- return "GMT" + D(r, ":");
1106
+ return "GMT" + p(r, ":");
1109
1107
  }
1110
1108
  },
1111
1109
  // Timezone (specific non-location)
@@ -1115,35 +1113,35 @@ const M = {
1115
1113
  case "z":
1116
1114
  case "zz":
1117
1115
  case "zzz":
1118
- return "GMT" + H(r, ":");
1116
+ return "GMT" + V(r, ":");
1119
1117
  case "zzzz":
1120
1118
  default:
1121
- return "GMT" + D(r, ":");
1119
+ return "GMT" + p(r, ":");
1122
1120
  }
1123
1121
  },
1124
1122
  // Seconds timestamp
1125
1123
  t: function(e, t, n) {
1126
1124
  const r = Math.trunc(e.getTime() / 1e3);
1127
- return m(r, t.length);
1125
+ return d(r, t.length);
1128
1126
  },
1129
1127
  // Milliseconds timestamp
1130
1128
  T: function(e, t, n) {
1131
1129
  const r = e.getTime();
1132
- return m(r, t.length);
1130
+ return d(r, t.length);
1133
1131
  }
1134
1132
  };
1135
- function H(e, t = "") {
1136
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), s = r % 60;
1137
- return s === 0 ? n + String(a) : n + String(a) + t + m(s, 2);
1133
+ function V(e, t = "") {
1134
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
1135
+ return i === 0 ? n + String(a) : n + String(a) + t + d(i, 2);
1138
1136
  }
1139
- function j(e, t) {
1140
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + m(Math.abs(e) / 60, 2) : D(e, t);
1137
+ function Z(e, t) {
1138
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + d(Math.abs(e) / 60, 2) : p(e, t);
1141
1139
  }
1142
- function D(e, t = "") {
1143
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = m(Math.trunc(r / 60), 2), s = m(r % 60, 2);
1144
- return n + a + t + s;
1140
+ function p(e, t = "") {
1141
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = d(Math.trunc(r / 60), 2), i = d(r % 60, 2);
1142
+ return n + a + t + i;
1145
1143
  }
1146
- const Z = (e, t) => {
1144
+ const $ = (e, t) => {
1147
1145
  switch (e) {
1148
1146
  case "P":
1149
1147
  return t.date({ width: "short" });
@@ -1155,7 +1153,7 @@ const Z = (e, t) => {
1155
1153
  default:
1156
1154
  return t.date({ width: "full" });
1157
1155
  }
1158
- }, ee = (e, t) => {
1156
+ }, fe = (e, t) => {
1159
1157
  switch (e) {
1160
1158
  case "p":
1161
1159
  return t.time({ width: "short" });
@@ -1167,155 +1165,155 @@ const Z = (e, t) => {
1167
1165
  default:
1168
1166
  return t.time({ width: "full" });
1169
1167
  }
1170
- }, wt = (e, t) => {
1168
+ }, vt = (e, t) => {
1171
1169
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1172
1170
  if (!a)
1173
- return Z(e, t);
1174
- let s;
1171
+ return $(e, t);
1172
+ let i;
1175
1173
  switch (r) {
1176
1174
  case "P":
1177
- s = t.dateTime({ width: "short" });
1175
+ i = t.dateTime({ width: "short" });
1178
1176
  break;
1179
1177
  case "PP":
1180
- s = t.dateTime({ width: "medium" });
1178
+ i = t.dateTime({ width: "medium" });
1181
1179
  break;
1182
1180
  case "PPP":
1183
- s = t.dateTime({ width: "long" });
1181
+ i = t.dateTime({ width: "long" });
1184
1182
  break;
1185
1183
  case "PPPP":
1186
1184
  default:
1187
- s = t.dateTime({ width: "full" });
1185
+ i = t.dateTime({ width: "full" });
1188
1186
  break;
1189
1187
  }
1190
- return s.replace("{{date}}", Z(r, t)).replace("{{time}}", ee(a, t));
1191
- }, yt = {
1192
- p: ee,
1193
- P: wt
1194
- }, bt = /^D+$/, Mt = /^Y+$/, Tt = ["D", "DD", "YY", "YYYY"];
1195
- function Dt(e) {
1196
- return bt.test(e);
1188
+ return i.replace("{{date}}", $(r, t)).replace("{{time}}", fe(a, t));
1189
+ }, Pt = {
1190
+ p: fe,
1191
+ P: vt
1192
+ }, St = /^D+$/, kt = /^Y+$/, Wt = ["D", "DD", "YY", "YYYY"];
1193
+ function Ct(e) {
1194
+ return St.test(e);
1197
1195
  }
1198
- function Ot(e) {
1199
- return Mt.test(e);
1196
+ function Yt(e) {
1197
+ return kt.test(e);
1200
1198
  }
1201
- function xt(e, t, n) {
1202
- const r = Pt(e, t, n);
1203
- if (console.warn(r), Tt.includes(e)) throw new RangeError(r);
1199
+ function Ft(e, t, n) {
1200
+ const r = Nt(e, t, n);
1201
+ if (console.warn(r), Wt.includes(e)) throw new RangeError(r);
1204
1202
  }
1205
- function Pt(e, t, n) {
1203
+ function Nt(e, t, n) {
1206
1204
  const r = e[0] === "Y" ? "years" : "days of the month";
1207
1205
  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`;
1208
1206
  }
1209
- const vt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, kt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, pt = /^'([^]*?)'?$/, St = /''/g, Wt = /[a-zA-Z]/;
1210
- function te(e, t, n) {
1211
- var d, c, l, g, b, O, F, q;
1212
- const r = v(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? J, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((c = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : c.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((q = (F = r.locale) == null ? void 0 : F.options) == null ? void 0 : q.weekStartsOn) ?? 0, o = h(e);
1213
- if (!Pe(o))
1207
+ const Et = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Lt = /^'([^]*?)'?$/, Xt = /''/g, _t = /[a-zA-Z]/;
1208
+ function le(e, t, n) {
1209
+ var m, f, l, g, b, O, R, A;
1210
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ue, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((A = (R = r.locale) == null ? void 0 : R.options) == null ? void 0 : A.weekStartsOn) ?? 0, s = h(e);
1211
+ if (!Ne(s))
1214
1212
  throw new RangeError("Invalid time value");
1215
- let f = t.match(kt).map((y) => {
1216
- const w = y[0];
1217
- if (w === "p" || w === "P") {
1218
- const X = yt[w];
1219
- return X(y, a.formatLong);
1213
+ let c = t.match(zt).map((w) => {
1214
+ const y = w[0];
1215
+ if (y === "p" || y === "P") {
1216
+ const L = Pt[y];
1217
+ return L(w, a.formatLong);
1220
1218
  }
1221
- return y;
1222
- }).join("").match(vt).map((y) => {
1223
- if (y === "''")
1219
+ return w;
1220
+ }).join("").match(Et).map((w) => {
1221
+ if (w === "''")
1224
1222
  return { isToken: !1, value: "'" };
1225
- const w = y[0];
1226
- if (w === "'")
1227
- return { isToken: !1, value: Yt(y) };
1228
- if (A[w])
1229
- return { isToken: !0, value: y };
1230
- if (w.match(Wt))
1223
+ const y = w[0];
1224
+ if (y === "'")
1225
+ return { isToken: !1, value: qt(w) };
1226
+ if (B[y])
1227
+ return { isToken: !0, value: w };
1228
+ if (y.match(_t))
1231
1229
  throw new RangeError(
1232
- "Format string contains an unescaped latin alphabet character `" + w + "`"
1230
+ "Format string contains an unescaped latin alphabet character `" + y + "`"
1233
1231
  );
1234
- return { isToken: !1, value: y };
1232
+ return { isToken: !1, value: w };
1235
1233
  });
1236
- a.localize.preprocessor && (f = a.localize.preprocessor(o, f));
1234
+ a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1237
1235
  const u = {
1238
- firstWeekContainsDate: s,
1239
- weekStartsOn: i,
1236
+ firstWeekContainsDate: i,
1237
+ weekStartsOn: o,
1240
1238
  locale: a
1241
1239
  };
1242
- return f.map((y) => {
1243
- if (!y.isToken) return y.value;
1244
- const w = y.value;
1245
- (!(n != null && n.useAdditionalWeekYearTokens) && Ot(w) || !(n != null && n.useAdditionalDayOfYearTokens) && Dt(w)) && xt(w, t, String(e));
1246
- const X = A[w[0]];
1247
- return X(o, w, a.localize, u);
1240
+ return c.map((w) => {
1241
+ if (!w.isToken) return w.value;
1242
+ const y = w.value;
1243
+ (!(n != null && n.useAdditionalWeekYearTokens) && Yt(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Ct(y)) && Ft(y, t, String(e));
1244
+ const L = B[y[0]];
1245
+ return L(s, y, a.localize, u);
1248
1246
  }).join("");
1249
1247
  }
1250
- function Yt(e) {
1251
- const t = e.match(pt);
1252
- return t ? t[1].replace(St, "'") : e;
1248
+ function qt(e) {
1249
+ const t = e.match(Lt);
1250
+ return t ? t[1].replace(Xt, "'") : e;
1253
1251
  }
1254
- function Nt(e, t, n) {
1255
- const r = v(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? J, s = 2520, i = Y(e, t);
1256
- if (isNaN(i))
1252
+ function It(e, t, n) {
1253
+ const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? ue, i = 2520, o = Y(e, t);
1254
+ if (isNaN(o))
1257
1255
  throw new RangeError("Invalid time value");
1258
- const o = Object.assign({}, n, {
1256
+ const s = Object.assign({}, n, {
1259
1257
  addSuffix: n == null ? void 0 : n.addSuffix,
1260
- comparison: i
1258
+ comparison: o
1261
1259
  });
1262
- let f, u;
1263
- i > 0 ? (f = h(t), u = h(e)) : (f = h(e), u = h(t));
1264
- const d = Ce(u, f), c = (C(u) - C(f)) / 1e3, l = Math.round((d - c) / 60);
1260
+ let c, u;
1261
+ o > 0 ? (c = h(t), u = h(e)) : (c = h(e), u = h(t));
1262
+ const m = Re(u, c), f = (E(u) - E(c)) / 1e3, l = Math.round((m - f) / 60);
1265
1263
  let g;
1266
1264
  if (l < 2)
1267
- return n != null && n.includeSeconds ? d < 5 ? a.formatDistance("lessThanXSeconds", 5, o) : d < 10 ? a.formatDistance("lessThanXSeconds", 10, o) : d < 20 ? a.formatDistance("lessThanXSeconds", 20, o) : d < 40 ? a.formatDistance("halfAMinute", 0, o) : d < 60 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", 1, o) : l === 0 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", l, o);
1265
+ return n != null && n.includeSeconds ? m < 5 ? a.formatDistance("lessThanXSeconds", 5, s) : m < 10 ? a.formatDistance("lessThanXSeconds", 10, s) : m < 20 ? a.formatDistance("lessThanXSeconds", 20, s) : m < 40 ? a.formatDistance("halfAMinute", 0, s) : m < 60 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", 1, s) : l === 0 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", l, s);
1268
1266
  if (l < 45)
1269
- return a.formatDistance("xMinutes", l, o);
1267
+ return a.formatDistance("xMinutes", l, s);
1270
1268
  if (l < 90)
1271
- return a.formatDistance("aboutXHours", 1, o);
1272
- if (l < I) {
1269
+ return a.formatDistance("aboutXHours", 1, s);
1270
+ if (l < H) {
1273
1271
  const b = Math.round(l / 60);
1274
- return a.formatDistance("aboutXHours", b, o);
1272
+ return a.formatDistance("aboutXHours", b, s);
1275
1273
  } else {
1276
- if (l < s)
1277
- return a.formatDistance("xDays", 1, o);
1278
- if (l < W) {
1279
- const b = Math.round(l / I);
1280
- return a.formatDistance("xDays", b, o);
1281
- } else if (l < W * 2)
1282
- return g = Math.round(l / W), a.formatDistance("aboutXMonths", g, o);
1274
+ if (l < i)
1275
+ return a.formatDistance("xDays", 1, s);
1276
+ if (l < C) {
1277
+ const b = Math.round(l / H);
1278
+ return a.formatDistance("xDays", b, s);
1279
+ } else if (l < C * 2)
1280
+ return g = Math.round(l / C), a.formatDistance("aboutXMonths", g, s);
1283
1281
  }
1284
- if (g = Ne(u, f), g < 12) {
1285
- const b = Math.round(l / W);
1286
- return a.formatDistance("xMonths", b, o);
1282
+ if (g = Ie(u, c), g < 12) {
1283
+ const b = Math.round(l / C);
1284
+ return a.formatDistance("xMonths", b, s);
1287
1285
  } else {
1288
1286
  const b = g % 12, O = Math.trunc(g / 12);
1289
- return b < 3 ? a.formatDistance("aboutXYears", O, o) : b < 9 ? a.formatDistance("overXYears", O, o) : a.formatDistance("almostXYears", O + 1, o);
1287
+ return b < 3 ? a.formatDistance("aboutXYears", O, s) : b < 9 ? a.formatDistance("overXYears", O, s) : a.formatDistance("almostXYears", O + 1, s);
1290
1288
  }
1291
1289
  }
1292
- function Ct(e, t) {
1293
- return Nt(e, Oe(e), t);
1290
+ function Rt(e, t) {
1291
+ return It(e, Ye(e), t);
1294
1292
  }
1295
- function Et() {
1296
- return Object.assign({}, v());
1293
+ function At() {
1294
+ return Object.assign({}, P());
1297
1295
  }
1298
- function $(e, t, n) {
1299
- const r = Et(), a = _t(e, n.timeZone, n.locale ?? r.locale);
1300
- return "formatToParts" in a ? Xt(a, t) : Lt(a, t);
1296
+ function G(e, t, n) {
1297
+ const r = At(), a = Ut(e, n.timeZone, n.locale ?? r.locale);
1298
+ return "formatToParts" in a ? jt(a, t) : Ht(a, t);
1301
1299
  }
1302
- function Xt(e, t) {
1300
+ function jt(e, t) {
1303
1301
  const n = e.formatToParts(t);
1304
1302
  for (let r = n.length - 1; r >= 0; --r)
1305
1303
  if (n[r].type === "timeZoneName")
1306
1304
  return n[r].value;
1307
1305
  }
1308
- function Lt(e, t) {
1306
+ function Ht(e, t) {
1309
1307
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
1310
1308
  return r ? r[0].substr(1) : "";
1311
1309
  }
1312
- function _t(e, t, n) {
1310
+ function Ut(e, t, n) {
1313
1311
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
1314
1312
  timeZone: t,
1315
1313
  timeZoneName: e
1316
1314
  });
1317
1315
  }
1318
- const Ft = 60 * 1e3, qt = {
1316
+ const Bt = 60 * 1e3, Vt = {
1319
1317
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1320
1318
  X: function(e, t, n) {
1321
1319
  const r = _(n.timeZone, e);
@@ -1323,14 +1321,14 @@ const Ft = 60 * 1e3, qt = {
1323
1321
  return "Z";
1324
1322
  switch (t) {
1325
1323
  case "X":
1326
- return B(r);
1324
+ return Q(r);
1327
1325
  case "XXXX":
1328
1326
  case "XX":
1329
- return P(r);
1327
+ return v(r);
1330
1328
  case "XXXXX":
1331
1329
  case "XXX":
1332
1330
  default:
1333
- return P(r, ":");
1331
+ return v(r, ":");
1334
1332
  }
1335
1333
  },
1336
1334
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
@@ -1338,14 +1336,14 @@ const Ft = 60 * 1e3, qt = {
1338
1336
  const r = _(n.timeZone, e);
1339
1337
  switch (t) {
1340
1338
  case "x":
1341
- return B(r);
1339
+ return Q(r);
1342
1340
  case "xxxx":
1343
1341
  case "xx":
1344
- return P(r);
1342
+ return v(r);
1345
1343
  case "xxxxx":
1346
1344
  case "xxx":
1347
1345
  default:
1348
- return P(r, ":");
1346
+ return v(r, ":");
1349
1347
  }
1350
1348
  },
1351
1349
  // Timezone (GMT)
@@ -1355,10 +1353,10 @@ const Ft = 60 * 1e3, qt = {
1355
1353
  case "O":
1356
1354
  case "OO":
1357
1355
  case "OOO":
1358
- return "GMT" + zt(r, ":");
1356
+ return "GMT" + Zt(r, ":");
1359
1357
  case "OOOO":
1360
1358
  default:
1361
- return "GMT" + P(r, ":");
1359
+ return "GMT" + v(r, ":");
1362
1360
  }
1363
1361
  },
1364
1362
  // Timezone (specific non-location)
@@ -1367,79 +1365,79 @@ const Ft = 60 * 1e3, qt = {
1367
1365
  case "z":
1368
1366
  case "zz":
1369
1367
  case "zzz":
1370
- return $("short", e, n);
1368
+ return G("short", e, n);
1371
1369
  case "zzzz":
1372
1370
  default:
1373
- return $("long", e, n);
1371
+ return G("long", e, n);
1374
1372
  }
1375
1373
  }
1376
1374
  };
1377
1375
  function _(e, t) {
1378
- const n = e ? Q(e, t, !0) / Ft : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1376
+ const n = e ? ae(e, t, !0) / Bt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
1379
1377
  if (Number.isNaN(n))
1380
1378
  throw new RangeError("Invalid time zone specified: " + e);
1381
1379
  return n;
1382
1380
  }
1383
- function E(e, t) {
1381
+ function z(e, t) {
1384
1382
  const n = e < 0 ? "-" : "";
1385
1383
  let r = Math.abs(e).toString();
1386
1384
  for (; r.length < t; )
1387
1385
  r = "0" + r;
1388
1386
  return n + r;
1389
1387
  }
1390
- function P(e, t = "") {
1391
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = E(Math.floor(r / 60), 2), s = E(Math.floor(r % 60), 2);
1392
- return n + a + t + s;
1388
+ function v(e, t = "") {
1389
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = z(Math.floor(r / 60), 2), i = z(Math.floor(r % 60), 2);
1390
+ return n + a + t + i;
1393
1391
  }
1394
- function B(e, t) {
1395
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + E(Math.abs(e) / 60, 2) : P(e, t);
1392
+ function Q(e, t) {
1393
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + z(Math.abs(e) / 60, 2) : v(e, t);
1396
1394
  }
1397
- function zt(e, t = "") {
1398
- const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), s = r % 60;
1399
- return s === 0 ? n + String(a) : n + String(a) + t + E(s, 2);
1395
+ function Zt(e, t = "") {
1396
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
1397
+ return i === 0 ? n + String(a) : n + String(a) + t + z(i, 2);
1400
1398
  }
1401
- const It = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1402
- function Rt(e, t, n = {}) {
1399
+ const $t = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
1400
+ function Gt(e, t, n = {}) {
1403
1401
  t = String(t);
1404
- const r = t.match(It);
1402
+ const r = t.match($t);
1405
1403
  if (r) {
1406
- const a = V(n.originalDate || e, n);
1407
- t = r.reduce(function(s, i) {
1408
- if (i[0] === "'")
1409
- return s;
1410
- const o = s.indexOf(i), f = s[o - 1] === "'", u = s.replace(i, "'" + qt[i[0]](a, i, n) + "'");
1411
- return f ? u.substring(0, o - 1) + u.substring(o + 1) : u;
1404
+ const a = ie(n.originalDate || e, n);
1405
+ t = r.reduce(function(i, o) {
1406
+ if (o[0] === "'")
1407
+ return i;
1408
+ const s = i.indexOf(o), c = i[s - 1] === "'", u = i.replace(o, "'" + Vt[o[0]](a, o, n) + "'");
1409
+ return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
1412
1410
  }, t);
1413
1411
  }
1414
- return te(e, t, n);
1412
+ return le(e, t, n);
1415
1413
  }
1416
- function At(e, t, n) {
1417
- e = V(e, n);
1418
- const r = Q(t, e, !0), a = new Date(e.getTime() - r), s = /* @__PURE__ */ new Date(0);
1419
- return s.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), s.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), s;
1414
+ function Qt(e, t, n) {
1415
+ e = ie(e, n);
1416
+ const r = ae(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
1417
+ return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
1420
1418
  }
1421
- function Ht(e, t, n, r) {
1419
+ function Jt(e, t, n, r) {
1422
1420
  return r = {
1423
1421
  ...r,
1424
1422
  timeZone: t,
1425
1423
  originalDate: e
1426
- }, Rt(At(e, t, { timeZone: r.timeZone }), n, r);
1424
+ }, Gt(Qt(e, t, { timeZone: r.timeZone }), n, r);
1427
1425
  }
1428
- function sn(e, t) {
1426
+ function Mn(e, t) {
1429
1427
  return e && e !== "auto" ? e : t;
1430
1428
  }
1431
- function on(e, t = /* @__PURE__ */ new Date()) {
1429
+ function Dn(e, t = /* @__PURE__ */ new Date()) {
1432
1430
  try {
1433
1431
  const n = {
1434
1432
  timeZone: e,
1435
1433
  timeZoneName: "short"
1436
- }, a = new Intl.DateTimeFormat("en-US", n).formatToParts(t).find((s) => s.type === "timeZoneName");
1434
+ }, a = new Intl.DateTimeFormat("en-US", n).formatToParts(t).find((i) => i.type === "timeZoneName");
1437
1435
  return (a == null ? void 0 : a.value) || e;
1438
1436
  } catch {
1439
1437
  return e;
1440
1438
  }
1441
1439
  }
1442
- function un(e) {
1440
+ function xn(e) {
1443
1441
  try {
1444
1442
  const t = {
1445
1443
  timeZone: e,
@@ -1452,7 +1450,7 @@ function un(e) {
1452
1450
  return e;
1453
1451
  }
1454
1452
  }
1455
- function ne(e, t = "auto") {
1453
+ function me(e, t = "auto") {
1456
1454
  if (!e)
1457
1455
  return /* @__PURE__ */ new Date(NaN);
1458
1456
  const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
@@ -1460,65 +1458,65 @@ function ne(e, t = "auto") {
1460
1458
  return n || r || a ? new Date(e) : /* @__PURE__ */ new Date(e + "Z");
1461
1459
  if (t === "local") {
1462
1460
  if (n || r) {
1463
- const s = e.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
1464
- return new Date(s);
1461
+ const i = e.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
1462
+ return new Date(i);
1465
1463
  }
1466
1464
  return new Date(e);
1467
- } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : ue(e, t);
1465
+ } else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : be(e, t);
1468
1466
  }
1469
- const jt = "MM/dd/yyyy", Zt = (e, t, n, r = "auto") => {
1467
+ const Kt = "MM/dd/yyyy", en = (e, t, n, r = "auto") => {
1470
1468
  if (!e)
1471
1469
  return "";
1472
1470
  try {
1473
- const a = ne(e, r);
1471
+ const a = me(e, r);
1474
1472
  if (isNaN(a.getTime()))
1475
1473
  return e;
1476
- const i = (t && t.trim() ? t : jt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1477
- return n && n !== "auto" ? Ht(a, n, i) : te(a, i);
1474
+ const o = (t && t.trim() ? t : Kt).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
1475
+ return n && n !== "auto" ? Jt(a, n, o) : le(a, o);
1478
1476
  } catch (a) {
1479
1477
  return console.error("Date formatting error:", a), e;
1480
1478
  }
1481
- }, $t = (e, t = "auto") => {
1479
+ }, tn = (e, t = "auto") => {
1482
1480
  if (!e)
1483
1481
  return "";
1484
1482
  try {
1485
- const n = ne(e, t);
1486
- return isNaN(n.getTime()) ? e : Ct(n, { addSuffix: !0 });
1483
+ const n = me(e, t);
1484
+ return isNaN(n.getTime()) ? e : Rt(n, { addSuffix: !0 });
1487
1485
  } catch (n) {
1488
1486
  return console.error("Relative time formatting error:", n), e;
1489
1487
  }
1490
1488
  };
1491
- function Bt(e, t, n, r) {
1492
- const a = e instanceof Date ? e.toISOString() : String(e), s = (r == null ? void 0 : r.browserTimezone) || n, i = (r == null ? void 0 : r.isSqlCard) ?? !1;
1489
+ function nn(e, t, n, r) {
1490
+ 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;
1493
1491
  if (t != null && t.useRelativeTime)
1494
- return $t(
1492
+ return tn(
1495
1493
  a,
1496
1494
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1497
1495
  );
1498
- const o = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
1499
- return Zt(
1496
+ const s = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
1497
+ return en(
1500
1498
  a,
1501
- o,
1502
- t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : i ? s : n,
1499
+ s,
1500
+ t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : o ? i : n,
1503
1501
  (t == null ? void 0 : t.sourceTimezone) || "auto"
1504
1502
  );
1505
1503
  }
1506
- function re(e, t, n) {
1507
- var i, o;
1504
+ function de(e, t, n) {
1505
+ var o, s;
1508
1506
  if (e == null)
1509
- return e === null ? ((i = n.absence) == null ? void 0 : i.nullText) ?? "" : ((o = n.absence) == null ? void 0 : o.emptyText) ?? "";
1510
- const r = ae(e) ? e : void 0, a = r ? r.value : e, s = r ?? (typeof e == "number" ? e : void 0);
1507
+ return e === null ? ((o = n.absence) == null ? void 0 : o.nullText) ?? "" : ((s = n.absence) == null ? void 0 : s.emptyText) ?? "";
1508
+ const r = he(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
1511
1509
  if (!n.useFormattedValues || !t)
1512
1510
  return String(a);
1513
1511
  switch (t.type) {
1514
1512
  case "number":
1515
- return s !== void 0 ? de(
1516
- s,
1513
+ return i !== void 0 ? Me(
1514
+ i,
1517
1515
  t.numberFormat,
1518
1516
  n.locale
1519
1517
  ) : String(a);
1520
1518
  case "date":
1521
- return Bt(
1519
+ return nn(
1522
1520
  a,
1523
1521
  t.dateFormat,
1524
1522
  n.timezone,
@@ -1528,7 +1526,7 @@ function re(e, t, n) {
1528
1526
  }
1529
1527
  );
1530
1528
  case "progress":
1531
- return s !== void 0 ? `${a}%` : String(a);
1529
+ return i !== void 0 ? `${a}%` : String(a);
1532
1530
  case "badge":
1533
1531
  case "link":
1534
1532
  case "text":
@@ -1537,17 +1535,197 @@ function re(e, t, n) {
1537
1535
  return String(a);
1538
1536
  }
1539
1537
  }
1540
- function cn(e, t) {
1538
+ function pn(e, t) {
1541
1539
  return t.visibleColumns.map((n) => {
1542
1540
  const r = e[n], a = t.columnSettings[n];
1543
- return re(r, a, {
1541
+ return de(r, a, {
1544
1542
  useFormattedValues: t.useFormattedValues,
1545
1543
  timezone: t.timezone,
1546
1544
  locale: t.locale
1547
1545
  });
1548
1546
  });
1549
1547
  }
1550
- function Qt(e, t) {
1548
+ const rn = "en-US", J = [
1549
+ "compact",
1550
+ "maximumFractionDigits",
1551
+ "minimumFractionDigits",
1552
+ "negativeStyle",
1553
+ "type",
1554
+ "useGrouping"
1555
+ ];
1556
+ function an(e) {
1557
+ if (e.type !== "currency" || Object.prototype.hasOwnProperty.call(e, "currency") || Object.prototype.hasOwnProperty.call(e, "locale"))
1558
+ return !1;
1559
+ const t = Object.keys(e).sort();
1560
+ return t.length === J.length && J.every(
1561
+ (n, r) => t[r] === n
1562
+ ) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
1563
+ }
1564
+ function K(e) {
1565
+ if (typeof e != "string")
1566
+ return;
1567
+ const t = e.trim();
1568
+ if (!(!t || t.toLowerCase() === "none"))
1569
+ return t;
1570
+ }
1571
+ function F(e) {
1572
+ if (!(typeof e != "number" || !Number.isFinite(e)))
1573
+ return Math.max(0, Math.min(10, Math.trunc(e)));
1574
+ }
1575
+ function sn(e) {
1576
+ return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
1577
+ }
1578
+ function on(e, t, n) {
1579
+ const r = F(t.minimumFractionDigits), a = F(t.maximumFractionDigits);
1580
+ if (typeof r == "number" || typeof a == "number") {
1581
+ const s = r ?? 0, c = a ?? Math.max(s, 2);
1582
+ return {
1583
+ minimumFractionDigits: Math.min(s, c),
1584
+ maximumFractionDigits: Math.max(s, c)
1585
+ };
1586
+ }
1587
+ const i = F(t.decimals);
1588
+ if (typeof i == "number")
1589
+ return {
1590
+ minimumFractionDigits: i,
1591
+ maximumFractionDigits: i
1592
+ };
1593
+ if (n != null && n.preserveOmittedProperties)
1594
+ return {};
1595
+ const o = sn(e);
1596
+ return {
1597
+ minimumFractionDigits: o,
1598
+ maximumFractionDigits: o
1599
+ };
1600
+ }
1601
+ function un(e, t) {
1602
+ if (!(typeof t != "string" || e === "percent" && t === "%"))
1603
+ return t;
1604
+ }
1605
+ function ee(e) {
1606
+ const t = K(e.locale), n = K(e.currency), r = un(e.type, e.suffix);
1607
+ return {
1608
+ ...e,
1609
+ ...t !== e.locale ? { locale: t } : {},
1610
+ ...n !== e.currency ? { currency: n } : {},
1611
+ ...r !== e.suffix ? { suffix: r } : {}
1612
+ };
1613
+ }
1614
+ function x(e, t, n) {
1615
+ const r = { ...t, type: e };
1616
+ if ((n == null ? void 0 : n.numericInput) === "canonical" && I(r))
1617
+ return ee(r);
1618
+ const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, o = {
1619
+ type: e,
1620
+ locale: t.locale,
1621
+ minimumFractionDigits: a.minimumFractionDigits,
1622
+ maximumFractionDigits: a.maximumFractionDigits,
1623
+ useGrouping: typeof t.useGrouping == "boolean" ? t.useGrouping : typeof t.thousandsSeparator == "boolean" ? t.thousandsSeparator : !0,
1624
+ prefix: i,
1625
+ suffix: t.suffix,
1626
+ negativeStyle: t.negativeStyle || "minus",
1627
+ compact: !!t.compact,
1628
+ scale: typeof t.scale == "number" ? t.scale : void 0
1629
+ };
1630
+ return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), ee(o);
1631
+ }
1632
+ function te(e) {
1633
+ return {
1634
+ type: "date",
1635
+ locale: e.locale || rn,
1636
+ pattern: e.pattern,
1637
+ relative: !!e.relative,
1638
+ timezone: e.timezone,
1639
+ sourceTimezone: e.sourceTimezone,
1640
+ prefix: e.prefix,
1641
+ suffix: e.suffix
1642
+ };
1643
+ }
1644
+ function q(e) {
1645
+ return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
1646
+ }
1647
+ function ne(e) {
1648
+ const t = F(e.maxUnits);
1649
+ return {
1650
+ type: "duration",
1651
+ inputUnit: q(e.inputUnit) ? e.inputUnit : "second",
1652
+ outputStyle: e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact",
1653
+ largestUnit: q(e.largestUnit) ? e.largestUnit : void 0,
1654
+ smallestUnit: q(e.smallestUnit) ? e.smallestUnit : "second",
1655
+ maxUnits: t,
1656
+ prefix: e.prefix,
1657
+ suffix: e.suffix,
1658
+ negativeStyle: e.negativeStyle || "minus"
1659
+ };
1660
+ }
1661
+ function re(e) {
1662
+ return {
1663
+ type: "string",
1664
+ prefix: e.prefix,
1665
+ suffix: e.suffix
1666
+ };
1667
+ }
1668
+ function cn(e, t) {
1669
+ if (!e)
1670
+ return;
1671
+ if (typeof e == "string") {
1672
+ const r = e.trim().toLowerCase();
1673
+ return r === "currency" ? x(
1674
+ "currency",
1675
+ { type: "currency" },
1676
+ t
1677
+ ) : r === "percentage" || r === "percent" ? x(
1678
+ "percent",
1679
+ {
1680
+ type: "percentage",
1681
+ percentValueMode: "fraction"
1682
+ },
1683
+ t
1684
+ ) : r === "scientific" ? x(
1685
+ "scientific",
1686
+ { type: "scientific" },
1687
+ t
1688
+ ) : r === "date" ? te({}) : r === "duration" ? ne({}) : r === "string" ? re({}) : r === "number" ? x(
1689
+ "number",
1690
+ { type: "number" },
1691
+ t
1692
+ ) : void 0;
1693
+ }
1694
+ if ("type" in e && e.type === "temporal_bucket") {
1695
+ const r = we.safeParse(e);
1696
+ return r.success ? r.data : void 0;
1697
+ }
1698
+ const n = e;
1699
+ if ((t == null ? void 0 : t.numericInput) === "canonical") {
1700
+ const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
1701
+ if (I(r))
1702
+ return x(r.type, r, t);
1703
+ }
1704
+ if (n.type === "percentage")
1705
+ return x(
1706
+ "percent",
1707
+ {
1708
+ ...n,
1709
+ percentValueMode: n.percentValueMode || "fraction"
1710
+ },
1711
+ t
1712
+ );
1713
+ if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific") {
1714
+ const r = x(
1715
+ n.type,
1716
+ n,
1717
+ t
1718
+ );
1719
+ return an(n) ? { ...r, currency: "USD" } : r;
1720
+ }
1721
+ if (n.type === "date")
1722
+ return te(n);
1723
+ if (n.type === "duration")
1724
+ return ne(n);
1725
+ if (n.type === "string")
1726
+ return re(n);
1727
+ }
1728
+ function fn(e, t) {
1551
1729
  var a;
1552
1730
  const n = e[e.length - 1];
1553
1731
  if (!n) return "";
@@ -1555,62 +1733,62 @@ function Qt(e, t) {
1555
1733
  const r = n.member.value;
1556
1734
  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));
1557
1735
  }
1558
- function Vt(e, t, n) {
1559
- return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(oe).join(t)) ?? `${t} Total` : t;
1736
+ function ln(e, t, n) {
1737
+ return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(ye).join(t)) ?? `${t} Total` : t;
1560
1738
  }
1561
- function fn(e, t, n, r) {
1562
- var i;
1563
- const a = e[e.length - 1], s = t === "grand_total" ? n.grand.label : a ? (i = n.levels[a.levelId]) == null ? void 0 : i.label : void 0;
1564
- return Vt(t, Qt(e, r), s);
1739
+ function On(e, t, n, r) {
1740
+ var o;
1741
+ 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;
1742
+ return ln(t, fn(e, r), i);
1565
1743
  }
1566
- function ln(e, t, n) {
1744
+ function Tn(e, t, n) {
1567
1745
  return e.kind === "value" ? (t == null ? void 0 : t(e.value)) ?? "" : e.kind === "null" ? n.nullText : n.emptyText;
1568
1746
  }
1569
- function dn(e) {
1570
- const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: s } = e;
1571
- return Array.from({ length: s }, (i, o) => {
1572
- const f = t.slice(0, o + 1), u = r === "grand_total" ? o === 0 : r === "subtotal" && o === t.length - 1, d = n && n.length > o && z(n.slice(0, o + 1)) === z(f);
1747
+ function vn(e) {
1748
+ const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
1749
+ return Array.from({ length: i }, (o, s) => {
1750
+ const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, m = n && n.length > s && j(n.slice(0, s + 1)) === j(c);
1573
1751
  return {
1574
- path: f,
1752
+ path: c,
1575
1753
  total: u,
1576
- visible: u || t.length > o && (a || !d || o === t.length - 1)
1754
+ visible: u || t.length > s && (a || !m || s === t.length - 1)
1577
1755
  };
1578
1756
  });
1579
1757
  }
1580
- function Gt(e, t) {
1581
- return ie(e ?? t, {
1758
+ function mn(e, t) {
1759
+ return cn(e ?? t, {
1582
1760
  preserveOmittedProperties: !0,
1583
1761
  numericInput: "canonical"
1584
1762
  });
1585
1763
  }
1586
- function mn(e, t, n) {
1587
- const r = /* @__PURE__ */ new Map(), a = (s, i) => {
1588
- const o = (i === "levels" ? t.levelFormats : t.measureFormats)[s.id], f = s.semanticFormat, u = Gt(o, f);
1589
- i === "measures" && r.set(s.id, {
1590
- isNumeric: se(s.column.dataType) === "number",
1764
+ function Pn(e, t, n) {
1765
+ const r = /* @__PURE__ */ new Map(), a = (i, o) => {
1766
+ const s = (o === "levels" ? t.levelFormats : t.measureFormats)[i.id], c = i.semanticFormat, u = mn(s, c);
1767
+ o === "measures" && r.set(i.id, {
1768
+ isNumeric: ge(i.column.dataType) === "number",
1591
1769
  // Use normalized affixes: a redundant percent suffix is already removed.
1592
1770
  hasTextAffixes: !!u && !!("prefix" in u && u.prefix || "suffix" in u && u.suffix)
1593
1771
  });
1594
- const d = (c) => re(c, void 0, {
1772
+ const m = (f) => de(f, void 0, {
1595
1773
  useFormattedValues: !0,
1596
1774
  timezone: n.calendar.tz,
1597
1775
  locale: n.valueFormat.locale,
1598
1776
  absence: t.absence
1599
1777
  });
1600
- if (s.column.temporalBucket) {
1601
- const c = s.column.temporalBucket, l = ye({
1602
- metadata: c,
1603
- cardFormat: (o == null ? void 0 : o.type) === "temporal_bucket" ? o : void 0,
1604
- semanticFormat: (f == null ? void 0 : f.type) === "temporal_bucket" ? { granularity: c.granularity, format: f } : void 0,
1778
+ if (i.column.temporalBucket) {
1779
+ const f = i.column.temporalBucket, l = Pe({
1780
+ metadata: f,
1781
+ cardFormat: (s == null ? void 0 : s.type) === "temporal_bucket" ? s : void 0,
1782
+ semanticFormat: (c == null ? void 0 : c.type) === "temporal_bucket" ? { granularity: f.granularity, format: c } : void 0,
1605
1783
  locale: n.valueFormat.locale,
1606
1784
  styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
1607
1785
  });
1608
- return (g) => typeof g == "string" ? be({ value: g, metadata: c, format: l.format }) : d(g);
1786
+ return (g) => typeof g == "string" ? Se({ value: g, metadata: f, format: l.format }) : m(g);
1609
1787
  }
1610
- if (s.column.rawTemporal) {
1611
- const c = ce({
1612
- metadata: s.column.rawTemporal,
1613
- format: fe({
1788
+ if (i.column.rawTemporal) {
1789
+ const f = De({
1790
+ metadata: i.column.rawTemporal,
1791
+ format: xe({
1614
1792
  format: (u == null ? void 0 : u.type) === "date" ? {
1615
1793
  type: "raw_temporal",
1616
1794
  timezone: u.timezone,
@@ -1626,48 +1804,61 @@ function mn(e, t, n) {
1626
1804
  })
1627
1805
  });
1628
1806
  return (l) => {
1629
- if (typeof l != "string") return d(l);
1630
- const g = c(l);
1631
- return g.ok ? g.text : d(l);
1807
+ if (typeof l != "string") return m(l);
1808
+ const g = f(l);
1809
+ return g.ok ? g.text : m(l);
1632
1810
  };
1633
1811
  }
1634
- if (le(u)) {
1635
- const c = me(u, n.valueFormat);
1636
- return (l) => typeof l == "number" || typeof l == "object" && l !== null ? he(l, c) : d(l);
1812
+ if (I(u)) {
1813
+ const f = pe(u, n.valueFormat);
1814
+ return (l) => typeof l == "number" || typeof l == "object" && l !== null ? Oe(l, f) : m(l);
1637
1815
  }
1638
- return (u == null ? void 0 : u.type) === "duration" ? (c) => typeof c == "number" || typeof c == "string" || typeof c == "object" && c !== null ? ge(
1639
- typeof c == "object" ? c.value : c,
1816
+ return (u == null ? void 0 : u.type) === "duration" ? (f) => typeof f == "number" || typeof f == "string" || typeof f == "object" && f !== null ? Te(
1817
+ typeof f == "object" ? f.value : f,
1640
1818
  u
1641
- ) : d(c) : (u == null ? void 0 : u.type) === "string" ? (c) => c === null ? d(c) : `${u.prefix ?? ""}${d(c)}${u.suffix ?? ""}` : d;
1819
+ ) : m(f) : (u == null ? void 0 : u.type) === "string" ? (f) => f === null ? m(f) : `${u.prefix ?? ""}${m(f)}${u.suffix ?? ""}` : m;
1642
1820
  };
1643
1821
  return {
1644
1822
  levels: new Map(
1645
- e.levels.map((s) => [s.id, a(s, "levels")])
1823
+ e.levels.map((i) => [i.id, a(i, "levels")])
1646
1824
  ),
1647
1825
  measures: new Map(
1648
- e.measures.map((s) => [s.id, a(s, "measures")])
1826
+ e.measures.map((i) => [i.id, a(i, "measures")])
1649
1827
  ),
1650
1828
  measureSemantics: r,
1651
1829
  absence: t.absence
1652
1830
  };
1653
1831
  }
1654
1832
  export {
1655
- $t as a,
1656
- un as b,
1657
- re as c,
1658
- cn as d,
1659
- mn as e,
1660
- Zt as f,
1661
- on as g,
1662
- fn as h,
1663
- dn as i,
1664
- ln as j,
1665
- te as k,
1666
- Ct as l,
1667
- Qt as m,
1668
- Gt as n,
1669
- Ht as o,
1670
- ne as p,
1671
- Vt as q,
1672
- sn as r
1833
+ x as A,
1834
+ K as B,
1835
+ mn as C,
1836
+ rn as D,
1837
+ ln as E,
1838
+ en as a,
1839
+ tn as b,
1840
+ xn as c,
1841
+ de as d,
1842
+ pn as e,
1843
+ cn as f,
1844
+ Dn as g,
1845
+ Pn as h,
1846
+ On as i,
1847
+ vn as j,
1848
+ Tn as k,
1849
+ Jt as l,
1850
+ fn as m,
1851
+ le as n,
1852
+ P as o,
1853
+ me as p,
1854
+ ue as q,
1855
+ Mn as r,
1856
+ Y as s,
1857
+ h as t,
1858
+ ze as u,
1859
+ E as v,
1860
+ Ye as w,
1861
+ Rt as x,
1862
+ te as y,
1863
+ ne as z
1673
1864
  };