react-semaphor 0.1.540 → 0.1.542
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.
- package/dist/analytics-protocol/index.js +75 -75
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +50 -45
- package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
- package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
- package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
- package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
- package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
- package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
- package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
- package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
- package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
- package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
- package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
- package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
- package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
- package/dist/chunks/index-CV5rHq5D.js +2673 -0
- package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
- package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
- package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
- package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
- package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
- package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
- package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
- package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
- package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
- package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
- package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
- package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
- package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
- package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
- package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
- package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
- package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
- package/dist/chunks/table-settings-CLZocegs.js +501 -0
- package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
- package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
- package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +399 -380
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +9 -9
- package/dist/format-utils/index.js +346 -238
- package/dist/index.js +174 -175
- package/dist/pdf-export-policy/index.js +20 -10
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
- package/dist/types/briefings/attachments.d.ts +17 -1
- package/dist/types/briefings/index.d.ts +6 -3
- package/dist/types/index.js +48 -48
- package/dist/types/lib/api/exports-api.d.ts +11 -65
- package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
- package/dist/types/lib/types/common-types.d.ts +7 -0
- package/dist/types/lib/types/explorer-types.d.ts +8 -2
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
- package/dist/types/shared/assistant-context/index.d.ts +1 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
- package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
- package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
- package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
- package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
- package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
- package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
- package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
- package/dist/types/shared/format-utils/index.d.ts +3 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
- package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
- package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
- package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
- package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
- package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
- package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
- package/package.json +2 -1
- package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
- package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
- package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
- package/dist/chunks/common-types-CUf03Htv.js +0 -288
- package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
- package/dist/chunks/index-CqMiAkay.js +0 -3164
- package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
- package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
- package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
- package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
- package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./matrix-operation-contract-
|
|
3
|
-
import { j as
|
|
1
|
+
import { aC as ge, w as U, l as ye, a2 as we } from "./validators-DMHTpf7a.js";
|
|
2
|
+
import "./matrix-operation-contract-8OIO4gob.js";
|
|
3
|
+
import { j as be } from "./analytics-base-schemas-BFAoRlkU.js";
|
|
4
4
|
import "zod";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
function h(e) {
|
|
5
|
+
import { W as Me, X as se, S as Z, U as C, 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-D7NBrrtL.js";
|
|
6
|
+
function d(e) {
|
|
8
7
|
const t = Object.prototype.toString.call(e);
|
|
9
8
|
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);
|
|
10
9
|
}
|
|
11
|
-
function
|
|
10
|
+
function x(e, t) {
|
|
12
11
|
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
13
12
|
}
|
|
14
|
-
let
|
|
13
|
+
let We = {};
|
|
15
14
|
function P() {
|
|
16
|
-
return
|
|
15
|
+
return We;
|
|
17
16
|
}
|
|
18
17
|
function W(e, t) {
|
|
19
|
-
var
|
|
20
|
-
const n = P(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((
|
|
21
|
-
return a.setDate(a.getDate() -
|
|
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;
|
|
20
|
+
return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
|
|
22
21
|
}
|
|
23
|
-
function
|
|
22
|
+
function Y(e) {
|
|
24
23
|
return W(e, { weekStartsOn: 1 });
|
|
25
24
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
25
|
+
function ce(e) {
|
|
26
|
+
const t = d(e), n = t.getFullYear(), r = x(e, 0);
|
|
28
27
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
29
|
-
const a =
|
|
28
|
+
const a = Y(r), i = x(e, 0);
|
|
30
29
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
31
|
-
const
|
|
32
|
-
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >=
|
|
30
|
+
const s = Y(i);
|
|
31
|
+
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= s.getTime() ? n : n - 1;
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
const t =
|
|
33
|
+
function V(e) {
|
|
34
|
+
const t = d(e);
|
|
36
35
|
return t.setHours(0, 0, 0, 0), t;
|
|
37
36
|
}
|
|
38
37
|
function E(e) {
|
|
39
|
-
const t =
|
|
38
|
+
const t = d(e), n = new Date(
|
|
40
39
|
Date.UTC(
|
|
41
40
|
t.getFullYear(),
|
|
42
41
|
t.getMonth(),
|
|
@@ -49,32 +48,32 @@ function E(e) {
|
|
|
49
48
|
);
|
|
50
49
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
51
50
|
}
|
|
52
|
-
function
|
|
53
|
-
const n =
|
|
54
|
-
return Math.round((a - i) /
|
|
51
|
+
function Ce(e, t) {
|
|
52
|
+
const n = V(e), r = V(t), a = +n - E(n), i = +r - E(r);
|
|
53
|
+
return Math.round((a - i) / Me);
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
const t =
|
|
58
|
-
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0),
|
|
55
|
+
function Fe(e) {
|
|
56
|
+
const t = ce(e), n = x(e, 0);
|
|
57
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), Y(n);
|
|
59
58
|
}
|
|
60
|
-
function
|
|
61
|
-
const n =
|
|
59
|
+
function F(e, t) {
|
|
60
|
+
const n = d(e), r = d(t), a = n.getTime() - r.getTime();
|
|
62
61
|
return a < 0 ? -1 : a > 0 ? 1 : a;
|
|
63
62
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
63
|
+
function Ne(e) {
|
|
64
|
+
return x(e, Date.now());
|
|
66
65
|
}
|
|
67
|
-
function
|
|
66
|
+
function Ye(e) {
|
|
68
67
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
69
68
|
}
|
|
70
|
-
function
|
|
71
|
-
if (!
|
|
69
|
+
function Ee(e) {
|
|
70
|
+
if (!Ye(e) && typeof e != "number")
|
|
72
71
|
return !1;
|
|
73
|
-
const t =
|
|
72
|
+
const t = d(e);
|
|
74
73
|
return !isNaN(Number(t));
|
|
75
74
|
}
|
|
76
|
-
function
|
|
77
|
-
const n =
|
|
75
|
+
function Le(e, t) {
|
|
76
|
+
const n = d(e), r = d(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
|
|
78
77
|
return a * 12 + i;
|
|
79
78
|
}
|
|
80
79
|
function ze(e) {
|
|
@@ -83,41 +82,41 @@ function ze(e) {
|
|
|
83
82
|
return r === 0 ? 0 : r;
|
|
84
83
|
};
|
|
85
84
|
}
|
|
86
|
-
function
|
|
87
|
-
return +
|
|
85
|
+
function Xe(e, t) {
|
|
86
|
+
return +d(e) - +d(t);
|
|
88
87
|
}
|
|
89
|
-
function
|
|
90
|
-
const t =
|
|
88
|
+
function _e(e) {
|
|
89
|
+
const t = d(e);
|
|
91
90
|
return t.setHours(23, 59, 59, 999), t;
|
|
92
91
|
}
|
|
93
|
-
function
|
|
94
|
-
const t =
|
|
92
|
+
function qe(e) {
|
|
93
|
+
const t = d(e), n = t.getMonth();
|
|
95
94
|
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
96
95
|
}
|
|
97
|
-
function
|
|
98
|
-
const t =
|
|
99
|
-
return +
|
|
96
|
+
function Ie(e) {
|
|
97
|
+
const t = d(e);
|
|
98
|
+
return +_e(t) == +qe(t);
|
|
100
99
|
}
|
|
101
|
-
function
|
|
102
|
-
const n =
|
|
103
|
-
|
|
100
|
+
function Re(e, t) {
|
|
101
|
+
const n = d(e), r = d(t), a = F(n, r), i = Math.abs(
|
|
102
|
+
Le(n, r)
|
|
104
103
|
);
|
|
105
|
-
let
|
|
104
|
+
let s;
|
|
106
105
|
if (i < 1)
|
|
107
|
-
|
|
106
|
+
s = 0;
|
|
108
107
|
else {
|
|
109
108
|
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
|
|
110
|
-
let
|
|
111
|
-
|
|
109
|
+
let o = F(n, r) === -a;
|
|
110
|
+
Ie(d(e)) && i === 1 && F(e, r) === 1 && (o = !1), s = a * (i - Number(o));
|
|
112
111
|
}
|
|
113
|
-
return
|
|
112
|
+
return s === 0 ? 0 : s;
|
|
114
113
|
}
|
|
115
|
-
function
|
|
116
|
-
const r =
|
|
114
|
+
function Ae(e, t, n) {
|
|
115
|
+
const r = Xe(e, t) / 1e3;
|
|
117
116
|
return ze(n == null ? void 0 : n.roundingMethod)(r);
|
|
118
117
|
}
|
|
119
|
-
function
|
|
120
|
-
const t =
|
|
118
|
+
function He(e) {
|
|
119
|
+
const t = d(e), n = x(e, 0);
|
|
121
120
|
return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
122
121
|
}
|
|
123
122
|
const je = {
|
|
@@ -182,7 +181,7 @@ const je = {
|
|
|
182
181
|
one: "almost 1 year",
|
|
183
182
|
other: "almost {{count}} years"
|
|
184
183
|
}
|
|
185
|
-
},
|
|
184
|
+
}, Ue = (e, t, n) => {
|
|
186
185
|
let r;
|
|
187
186
|
const a = je[e];
|
|
188
187
|
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;
|
|
@@ -193,66 +192,66 @@ function X(e) {
|
|
|
193
192
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
|
-
const
|
|
195
|
+
const Ze = {
|
|
197
196
|
full: "EEEE, MMMM do, y",
|
|
198
197
|
long: "MMMM do, y",
|
|
199
198
|
medium: "MMM d, y",
|
|
200
199
|
short: "MM/dd/yyyy"
|
|
201
|
-
},
|
|
200
|
+
}, Ve = {
|
|
202
201
|
full: "h:mm:ss a zzzz",
|
|
203
202
|
long: "h:mm:ss a z",
|
|
204
203
|
medium: "h:mm:ss a",
|
|
205
204
|
short: "h:mm a"
|
|
206
|
-
},
|
|
205
|
+
}, Be = {
|
|
207
206
|
full: "{{date}} 'at' {{time}}",
|
|
208
207
|
long: "{{date}} 'at' {{time}}",
|
|
209
208
|
medium: "{{date}}, {{time}}",
|
|
210
209
|
short: "{{date}}, {{time}}"
|
|
211
|
-
},
|
|
210
|
+
}, $e = {
|
|
212
211
|
date: X({
|
|
213
|
-
formats:
|
|
212
|
+
formats: Ze,
|
|
214
213
|
defaultWidth: "full"
|
|
215
214
|
}),
|
|
216
215
|
time: X({
|
|
217
|
-
formats:
|
|
216
|
+
formats: Ve,
|
|
218
217
|
defaultWidth: "full"
|
|
219
218
|
}),
|
|
220
219
|
dateTime: X({
|
|
221
|
-
formats:
|
|
220
|
+
formats: Be,
|
|
222
221
|
defaultWidth: "full"
|
|
223
222
|
})
|
|
224
|
-
},
|
|
223
|
+
}, Ge = {
|
|
225
224
|
lastWeek: "'last' eeee 'at' p",
|
|
226
225
|
yesterday: "'yesterday at' p",
|
|
227
226
|
today: "'today at' p",
|
|
228
227
|
tomorrow: "'tomorrow at' p",
|
|
229
228
|
nextWeek: "eeee 'at' p",
|
|
230
229
|
other: "P"
|
|
231
|
-
},
|
|
230
|
+
}, Qe = (e, t, n, r) => Ge[e];
|
|
232
231
|
function S(e) {
|
|
233
232
|
return (t, n) => {
|
|
234
233
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
235
234
|
let a;
|
|
236
235
|
if (r === "formatting" && e.formattingValues) {
|
|
237
|
-
const
|
|
238
|
-
a = e.formattingValues[
|
|
236
|
+
const s = e.defaultFormattingWidth || e.defaultWidth, o = n != null && n.width ? String(n.width) : s;
|
|
237
|
+
a = e.formattingValues[o] || e.formattingValues[s];
|
|
239
238
|
} else {
|
|
240
|
-
const
|
|
241
|
-
a = e.values[
|
|
239
|
+
const s = e.defaultWidth, o = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
240
|
+
a = e.values[o] || e.values[s];
|
|
242
241
|
}
|
|
243
242
|
const i = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
244
243
|
return a[i];
|
|
245
244
|
};
|
|
246
245
|
}
|
|
247
|
-
const
|
|
246
|
+
const Je = {
|
|
248
247
|
narrow: ["B", "A"],
|
|
249
248
|
abbreviated: ["BC", "AD"],
|
|
250
249
|
wide: ["Before Christ", "Anno Domini"]
|
|
251
|
-
},
|
|
250
|
+
}, Ke = {
|
|
252
251
|
narrow: ["1", "2", "3", "4"],
|
|
253
252
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
254
253
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
255
|
-
},
|
|
254
|
+
}, et = {
|
|
256
255
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
257
256
|
abbreviated: [
|
|
258
257
|
"Jan",
|
|
@@ -282,7 +281,7 @@ const Qe = {
|
|
|
282
281
|
"November",
|
|
283
282
|
"December"
|
|
284
283
|
]
|
|
285
|
-
},
|
|
284
|
+
}, tt = {
|
|
286
285
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
287
286
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
288
287
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -295,7 +294,7 @@ const Qe = {
|
|
|
295
294
|
"Friday",
|
|
296
295
|
"Saturday"
|
|
297
296
|
]
|
|
298
|
-
},
|
|
297
|
+
}, nt = {
|
|
299
298
|
narrow: {
|
|
300
299
|
am: "a",
|
|
301
300
|
pm: "p",
|
|
@@ -326,7 +325,7 @@ const Qe = {
|
|
|
326
325
|
evening: "evening",
|
|
327
326
|
night: "night"
|
|
328
327
|
}
|
|
329
|
-
},
|
|
328
|
+
}, rt = {
|
|
330
329
|
narrow: {
|
|
331
330
|
am: "a",
|
|
332
331
|
pm: "p",
|
|
@@ -357,7 +356,7 @@ const Qe = {
|
|
|
357
356
|
evening: "in the evening",
|
|
358
357
|
night: "at night"
|
|
359
358
|
}
|
|
360
|
-
},
|
|
359
|
+
}, at = (e, t) => {
|
|
361
360
|
const n = Number(e), r = n % 100;
|
|
362
361
|
if (r > 20 || r < 10)
|
|
363
362
|
switch (r % 10) {
|
|
@@ -369,29 +368,29 @@ const Qe = {
|
|
|
369
368
|
return n + "rd";
|
|
370
369
|
}
|
|
371
370
|
return n + "th";
|
|
372
|
-
},
|
|
373
|
-
ordinalNumber:
|
|
371
|
+
}, it = {
|
|
372
|
+
ordinalNumber: at,
|
|
374
373
|
era: S({
|
|
375
|
-
values:
|
|
374
|
+
values: Je,
|
|
376
375
|
defaultWidth: "wide"
|
|
377
376
|
}),
|
|
378
377
|
quarter: S({
|
|
379
|
-
values:
|
|
378
|
+
values: Ke,
|
|
380
379
|
defaultWidth: "wide",
|
|
381
380
|
argumentCallback: (e) => e - 1
|
|
382
381
|
}),
|
|
383
382
|
month: S({
|
|
384
|
-
values:
|
|
383
|
+
values: et,
|
|
385
384
|
defaultWidth: "wide"
|
|
386
385
|
}),
|
|
387
386
|
day: S({
|
|
388
|
-
values:
|
|
387
|
+
values: tt,
|
|
389
388
|
defaultWidth: "wide"
|
|
390
389
|
}),
|
|
391
390
|
dayPeriod: S({
|
|
392
|
-
values:
|
|
391
|
+
values: nt,
|
|
393
392
|
defaultWidth: "wide",
|
|
394
|
-
formattingValues:
|
|
393
|
+
formattingValues: rt,
|
|
395
394
|
defaultFormattingWidth: "wide"
|
|
396
395
|
})
|
|
397
396
|
};
|
|
@@ -400,58 +399,58 @@ function k(e) {
|
|
|
400
399
|
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
|
|
401
400
|
if (!i)
|
|
402
401
|
return null;
|
|
403
|
-
const
|
|
402
|
+
const s = i[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(o) ? ot(o, (g) => g.test(s)) : (
|
|
404
403
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
405
|
-
|
|
404
|
+
st(o, (g) => g.test(s))
|
|
406
405
|
);
|
|
407
|
-
let
|
|
408
|
-
|
|
406
|
+
let l;
|
|
407
|
+
l = e.valueCallback ? e.valueCallback(f) : f, l = n.valueCallback ? (
|
|
409
408
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
410
|
-
n.valueCallback(
|
|
411
|
-
) :
|
|
412
|
-
const
|
|
413
|
-
return { value:
|
|
409
|
+
n.valueCallback(l)
|
|
410
|
+
) : l;
|
|
411
|
+
const u = t.slice(s.length);
|
|
412
|
+
return { value: l, rest: u };
|
|
414
413
|
};
|
|
415
414
|
}
|
|
416
|
-
function
|
|
415
|
+
function st(e, t) {
|
|
417
416
|
for (const n in e)
|
|
418
417
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
419
418
|
return n;
|
|
420
419
|
}
|
|
421
|
-
function
|
|
420
|
+
function ot(e, t) {
|
|
422
421
|
for (let n = 0; n < e.length; n++)
|
|
423
422
|
if (t(e[n]))
|
|
424
423
|
return n;
|
|
425
424
|
}
|
|
426
|
-
function
|
|
425
|
+
function ut(e) {
|
|
427
426
|
return (t, n = {}) => {
|
|
428
427
|
const r = t.match(e.matchPattern);
|
|
429
428
|
if (!r) return null;
|
|
430
429
|
const a = r[0], i = t.match(e.parsePattern);
|
|
431
430
|
if (!i) return null;
|
|
432
|
-
let
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
return { value:
|
|
431
|
+
let s = e.valueCallback ? e.valueCallback(i[0]) : i[0];
|
|
432
|
+
s = n.valueCallback ? n.valueCallback(s) : s;
|
|
433
|
+
const o = t.slice(a.length);
|
|
434
|
+
return { value: s, rest: o };
|
|
436
435
|
};
|
|
437
436
|
}
|
|
438
|
-
const
|
|
437
|
+
const ct = /^(\d+)(th|st|nd|rd)?/i, ft = /\d+/i, lt = {
|
|
439
438
|
narrow: /^(b|a)/i,
|
|
440
439
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
441
440
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
442
|
-
}, lt = {
|
|
443
|
-
any: [/^b/i, /^(a|c)/i]
|
|
444
441
|
}, mt = {
|
|
442
|
+
any: [/^b/i, /^(a|c)/i]
|
|
443
|
+
}, dt = {
|
|
445
444
|
narrow: /^[1234]/i,
|
|
446
445
|
abbreviated: /^q[1234]/i,
|
|
447
446
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
448
|
-
}, dt = {
|
|
449
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
450
447
|
}, ht = {
|
|
448
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
449
|
+
}, gt = {
|
|
451
450
|
narrow: /^[jfmasond]/i,
|
|
452
451
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
453
452
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
454
|
-
},
|
|
453
|
+
}, yt = {
|
|
455
454
|
narrow: [
|
|
456
455
|
/^j/i,
|
|
457
456
|
/^f/i,
|
|
@@ -480,18 +479,18 @@ const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
|
|
|
480
479
|
/^n/i,
|
|
481
480
|
/^d/i
|
|
482
481
|
]
|
|
483
|
-
},
|
|
482
|
+
}, wt = {
|
|
484
483
|
narrow: /^[smtwf]/i,
|
|
485
484
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
486
485
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
487
486
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
488
|
-
},
|
|
487
|
+
}, bt = {
|
|
489
488
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
490
489
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
491
|
-
},
|
|
490
|
+
}, Mt = {
|
|
492
491
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
493
492
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
494
|
-
},
|
|
493
|
+
}, xt = {
|
|
495
494
|
any: {
|
|
496
495
|
am: /^a/i,
|
|
497
496
|
pm: /^p/i,
|
|
@@ -503,81 +502,81 @@ const ut = /^(\d+)(th|st|nd|rd)?/i, ct = /\d+/i, ft = {
|
|
|
503
502
|
night: /night/i
|
|
504
503
|
}
|
|
505
504
|
}, Dt = {
|
|
506
|
-
ordinalNumber:
|
|
507
|
-
matchPattern:
|
|
508
|
-
parsePattern:
|
|
505
|
+
ordinalNumber: ut({
|
|
506
|
+
matchPattern: ct,
|
|
507
|
+
parsePattern: ft,
|
|
509
508
|
valueCallback: (e) => parseInt(e, 10)
|
|
510
509
|
}),
|
|
511
510
|
era: k({
|
|
512
|
-
matchPatterns:
|
|
511
|
+
matchPatterns: lt,
|
|
513
512
|
defaultMatchWidth: "wide",
|
|
514
|
-
parsePatterns:
|
|
513
|
+
parsePatterns: mt,
|
|
515
514
|
defaultParseWidth: "any"
|
|
516
515
|
}),
|
|
517
516
|
quarter: k({
|
|
518
|
-
matchPatterns:
|
|
517
|
+
matchPatterns: dt,
|
|
519
518
|
defaultMatchWidth: "wide",
|
|
520
|
-
parsePatterns:
|
|
519
|
+
parsePatterns: ht,
|
|
521
520
|
defaultParseWidth: "any",
|
|
522
521
|
valueCallback: (e) => e + 1
|
|
523
522
|
}),
|
|
524
523
|
month: k({
|
|
525
|
-
matchPatterns:
|
|
524
|
+
matchPatterns: gt,
|
|
526
525
|
defaultMatchWidth: "wide",
|
|
527
|
-
parsePatterns:
|
|
526
|
+
parsePatterns: yt,
|
|
528
527
|
defaultParseWidth: "any"
|
|
529
528
|
}),
|
|
530
529
|
day: k({
|
|
531
|
-
matchPatterns:
|
|
530
|
+
matchPatterns: wt,
|
|
532
531
|
defaultMatchWidth: "wide",
|
|
533
|
-
parsePatterns:
|
|
532
|
+
parsePatterns: bt,
|
|
534
533
|
defaultParseWidth: "any"
|
|
535
534
|
}),
|
|
536
535
|
dayPeriod: k({
|
|
537
|
-
matchPatterns:
|
|
536
|
+
matchPatterns: Mt,
|
|
538
537
|
defaultMatchWidth: "any",
|
|
539
|
-
parsePatterns:
|
|
538
|
+
parsePatterns: xt,
|
|
540
539
|
defaultParseWidth: "any"
|
|
541
540
|
})
|
|
542
|
-
},
|
|
541
|
+
}, fe = {
|
|
543
542
|
code: "en-US",
|
|
544
|
-
formatDistance:
|
|
545
|
-
formatLong:
|
|
546
|
-
formatRelative:
|
|
547
|
-
localize:
|
|
543
|
+
formatDistance: Ue,
|
|
544
|
+
formatLong: $e,
|
|
545
|
+
formatRelative: Qe,
|
|
546
|
+
localize: it,
|
|
548
547
|
match: Dt,
|
|
549
548
|
options: {
|
|
550
549
|
weekStartsOn: 0,
|
|
551
550
|
firstWeekContainsDate: 1
|
|
552
551
|
}
|
|
553
552
|
};
|
|
554
|
-
function xt(e) {
|
|
555
|
-
const t = h(e);
|
|
556
|
-
return We(t, Ae(t)) + 1;
|
|
557
|
-
}
|
|
558
553
|
function pt(e) {
|
|
559
|
-
const t =
|
|
554
|
+
const t = d(e);
|
|
555
|
+
return Ce(t, He(t)) + 1;
|
|
556
|
+
}
|
|
557
|
+
function Ot(e) {
|
|
558
|
+
const t = d(e), n = +Y(t) - +Fe(t);
|
|
560
559
|
return Math.round(n / se) + 1;
|
|
561
560
|
}
|
|
562
|
-
function
|
|
563
|
-
var
|
|
564
|
-
const n =
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
return n.getTime() >=
|
|
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);
|
|
561
|
+
function le(e, t) {
|
|
562
|
+
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);
|
|
564
|
+
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;
|
|
575
569
|
}
|
|
576
570
|
function Tt(e, t) {
|
|
577
|
-
|
|
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);
|
|
573
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
|
|
574
|
+
}
|
|
575
|
+
function vt(e, t) {
|
|
576
|
+
const n = d(e), r = +W(n, t) - +Tt(n, t);
|
|
578
577
|
return Math.round(r / se) + 1;
|
|
579
578
|
}
|
|
580
|
-
function
|
|
579
|
+
function m(e, t) {
|
|
581
580
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
582
581
|
return n + r;
|
|
583
582
|
}
|
|
@@ -585,16 +584,16 @@ const M = {
|
|
|
585
584
|
// Year
|
|
586
585
|
y(e, t) {
|
|
587
586
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
588
|
-
return
|
|
587
|
+
return m(t === "yy" ? r % 100 : r, t.length);
|
|
589
588
|
},
|
|
590
589
|
// Month
|
|
591
590
|
M(e, t) {
|
|
592
591
|
const n = e.getMonth();
|
|
593
|
-
return t === "M" ? String(n + 1) :
|
|
592
|
+
return t === "M" ? String(n + 1) : m(n + 1, 2);
|
|
594
593
|
},
|
|
595
594
|
// Day of the month
|
|
596
595
|
d(e, t) {
|
|
597
|
-
return
|
|
596
|
+
return m(e.getDate(), t.length);
|
|
598
597
|
},
|
|
599
598
|
// AM or PM
|
|
600
599
|
a(e, t) {
|
|
@@ -614,26 +613,26 @@ const M = {
|
|
|
614
613
|
},
|
|
615
614
|
// Hour [1-12]
|
|
616
615
|
h(e, t) {
|
|
617
|
-
return
|
|
616
|
+
return m(e.getHours() % 12 || 12, t.length);
|
|
618
617
|
},
|
|
619
618
|
// Hour [0-23]
|
|
620
619
|
H(e, t) {
|
|
621
|
-
return
|
|
620
|
+
return m(e.getHours(), t.length);
|
|
622
621
|
},
|
|
623
622
|
// Minute
|
|
624
623
|
m(e, t) {
|
|
625
|
-
return
|
|
624
|
+
return m(e.getMinutes(), t.length);
|
|
626
625
|
},
|
|
627
626
|
// Second
|
|
628
627
|
s(e, t) {
|
|
629
|
-
return
|
|
628
|
+
return m(e.getSeconds(), t.length);
|
|
630
629
|
},
|
|
631
630
|
// Fraction of second
|
|
632
631
|
S(e, t) {
|
|
633
632
|
const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
|
|
634
633
|
r * Math.pow(10, n - 3)
|
|
635
634
|
);
|
|
636
|
-
return
|
|
635
|
+
return m(a, t.length);
|
|
637
636
|
}
|
|
638
637
|
}, T = {
|
|
639
638
|
midnight: "midnight",
|
|
@@ -668,17 +667,17 @@ const M = {
|
|
|
668
667
|
},
|
|
669
668
|
// Local week-numbering year
|
|
670
669
|
Y: function(e, t, n, r) {
|
|
671
|
-
const a =
|
|
670
|
+
const a = le(e, r), i = a > 0 ? a : 1 - a;
|
|
672
671
|
if (t === "YY") {
|
|
673
|
-
const
|
|
674
|
-
return
|
|
672
|
+
const s = i % 100;
|
|
673
|
+
return m(s, 2);
|
|
675
674
|
}
|
|
676
|
-
return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) :
|
|
675
|
+
return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : m(i, t.length);
|
|
677
676
|
},
|
|
678
677
|
// ISO week-numbering year
|
|
679
678
|
R: function(e, t) {
|
|
680
|
-
const n =
|
|
681
|
-
return
|
|
679
|
+
const n = ce(e);
|
|
680
|
+
return m(n, t.length);
|
|
682
681
|
},
|
|
683
682
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
684
683
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -691,7 +690,7 @@ const M = {
|
|
|
691
690
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
692
691
|
u: function(e, t) {
|
|
693
692
|
const n = e.getFullYear();
|
|
694
|
-
return
|
|
693
|
+
return m(n, t.length);
|
|
695
694
|
},
|
|
696
695
|
// Quarter
|
|
697
696
|
Q: function(e, t, n) {
|
|
@@ -700,7 +699,7 @@ const M = {
|
|
|
700
699
|
case "Q":
|
|
701
700
|
return String(r);
|
|
702
701
|
case "QQ":
|
|
703
|
-
return
|
|
702
|
+
return m(r, 2);
|
|
704
703
|
case "Qo":
|
|
705
704
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
706
705
|
case "QQQ":
|
|
@@ -728,7 +727,7 @@ const M = {
|
|
|
728
727
|
case "q":
|
|
729
728
|
return String(r);
|
|
730
729
|
case "qq":
|
|
731
|
-
return
|
|
730
|
+
return m(r, 2);
|
|
732
731
|
case "qo":
|
|
733
732
|
return n.ordinalNumber(r, { unit: "quarter" });
|
|
734
733
|
case "qqq":
|
|
@@ -780,7 +779,7 @@ const M = {
|
|
|
780
779
|
case "L":
|
|
781
780
|
return String(r + 1);
|
|
782
781
|
case "LL":
|
|
783
|
-
return
|
|
782
|
+
return m(r + 1, 2);
|
|
784
783
|
case "Lo":
|
|
785
784
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
786
785
|
case "LLL":
|
|
@@ -800,13 +799,13 @@ const M = {
|
|
|
800
799
|
},
|
|
801
800
|
// Local week of year
|
|
802
801
|
w: function(e, t, n, r) {
|
|
803
|
-
const a =
|
|
804
|
-
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) :
|
|
802
|
+
const a = vt(e, r);
|
|
803
|
+
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : m(a, t.length);
|
|
805
804
|
},
|
|
806
805
|
// ISO week of year
|
|
807
806
|
I: function(e, t, n) {
|
|
808
|
-
const r =
|
|
809
|
-
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) :
|
|
807
|
+
const r = Ot(e);
|
|
808
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : m(r, t.length);
|
|
810
809
|
},
|
|
811
810
|
// Day of the month
|
|
812
811
|
d: function(e, t, n) {
|
|
@@ -814,8 +813,8 @@ const M = {
|
|
|
814
813
|
},
|
|
815
814
|
// Day of year
|
|
816
815
|
D: function(e, t, n) {
|
|
817
|
-
const r =
|
|
818
|
-
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
816
|
+
const r = pt(e);
|
|
817
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : m(r, t.length);
|
|
819
818
|
},
|
|
820
819
|
// Day of week
|
|
821
820
|
E: function(e, t, n) {
|
|
@@ -853,7 +852,7 @@ const M = {
|
|
|
853
852
|
case "e":
|
|
854
853
|
return String(i);
|
|
855
854
|
case "ee":
|
|
856
|
-
return
|
|
855
|
+
return m(i, 2);
|
|
857
856
|
case "eo":
|
|
858
857
|
return n.ordinalNumber(i, { unit: "day" });
|
|
859
858
|
case "eee":
|
|
@@ -886,7 +885,7 @@ const M = {
|
|
|
886
885
|
case "c":
|
|
887
886
|
return String(i);
|
|
888
887
|
case "cc":
|
|
889
|
-
return
|
|
888
|
+
return m(i, t.length);
|
|
890
889
|
case "co":
|
|
891
890
|
return n.ordinalNumber(i, { unit: "day" });
|
|
892
891
|
case "ccc":
|
|
@@ -919,7 +918,7 @@ const M = {
|
|
|
919
918
|
case "i":
|
|
920
919
|
return String(a);
|
|
921
920
|
case "ii":
|
|
922
|
-
return
|
|
921
|
+
return m(a, t.length);
|
|
923
922
|
case "io":
|
|
924
923
|
return n.ordinalNumber(a, { unit: "day" });
|
|
925
924
|
case "iii":
|
|
@@ -1042,12 +1041,12 @@ const M = {
|
|
|
1042
1041
|
// Hour [0-11]
|
|
1043
1042
|
K: function(e, t, n) {
|
|
1044
1043
|
const r = e.getHours() % 12;
|
|
1045
|
-
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1044
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
|
|
1046
1045
|
},
|
|
1047
1046
|
// Hour [1-24]
|
|
1048
1047
|
k: function(e, t, n) {
|
|
1049
1048
|
let r = e.getHours();
|
|
1050
|
-
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) :
|
|
1049
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : m(r, t.length);
|
|
1051
1050
|
},
|
|
1052
1051
|
// Minute
|
|
1053
1052
|
m: function(e, t, n) {
|
|
@@ -1068,7 +1067,7 @@ const M = {
|
|
|
1068
1067
|
return "Z";
|
|
1069
1068
|
switch (t) {
|
|
1070
1069
|
case "X":
|
|
1071
|
-
return
|
|
1070
|
+
return G(r);
|
|
1072
1071
|
case "XXXX":
|
|
1073
1072
|
case "XX":
|
|
1074
1073
|
return p(r);
|
|
@@ -1083,7 +1082,7 @@ const M = {
|
|
|
1083
1082
|
const r = e.getTimezoneOffset();
|
|
1084
1083
|
switch (t) {
|
|
1085
1084
|
case "x":
|
|
1086
|
-
return
|
|
1085
|
+
return G(r);
|
|
1087
1086
|
case "xxxx":
|
|
1088
1087
|
case "xx":
|
|
1089
1088
|
return p(r);
|
|
@@ -1100,7 +1099,7 @@ const M = {
|
|
|
1100
1099
|
case "O":
|
|
1101
1100
|
case "OO":
|
|
1102
1101
|
case "OOO":
|
|
1103
|
-
return "GMT" +
|
|
1102
|
+
return "GMT" + $(r, ":");
|
|
1104
1103
|
case "OOOO":
|
|
1105
1104
|
default:
|
|
1106
1105
|
return "GMT" + p(r, ":");
|
|
@@ -1113,7 +1112,7 @@ const M = {
|
|
|
1113
1112
|
case "z":
|
|
1114
1113
|
case "zz":
|
|
1115
1114
|
case "zzz":
|
|
1116
|
-
return "GMT" +
|
|
1115
|
+
return "GMT" + $(r, ":");
|
|
1117
1116
|
case "zzzz":
|
|
1118
1117
|
default:
|
|
1119
1118
|
return "GMT" + p(r, ":");
|
|
@@ -1122,26 +1121,26 @@ const M = {
|
|
|
1122
1121
|
// Seconds timestamp
|
|
1123
1122
|
t: function(e, t, n) {
|
|
1124
1123
|
const r = Math.trunc(e.getTime() / 1e3);
|
|
1125
|
-
return
|
|
1124
|
+
return m(r, t.length);
|
|
1126
1125
|
},
|
|
1127
1126
|
// Milliseconds timestamp
|
|
1128
1127
|
T: function(e, t, n) {
|
|
1129
1128
|
const r = e.getTime();
|
|
1130
|
-
return
|
|
1129
|
+
return m(r, t.length);
|
|
1131
1130
|
}
|
|
1132
1131
|
};
|
|
1133
|
-
function
|
|
1132
|
+
function $(e, t = "") {
|
|
1134
1133
|
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 +
|
|
1134
|
+
return i === 0 ? n + String(a) : n + String(a) + t + m(i, 2);
|
|
1136
1135
|
}
|
|
1137
|
-
function
|
|
1138
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1136
|
+
function G(e, t) {
|
|
1137
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + m(Math.abs(e) / 60, 2) : p(e, t);
|
|
1139
1138
|
}
|
|
1140
1139
|
function p(e, t = "") {
|
|
1141
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a =
|
|
1140
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = m(Math.trunc(r / 60), 2), i = m(r % 60, 2);
|
|
1142
1141
|
return n + a + t + i;
|
|
1143
1142
|
}
|
|
1144
|
-
const
|
|
1143
|
+
const Q = (e, t) => {
|
|
1145
1144
|
switch (e) {
|
|
1146
1145
|
case "P":
|
|
1147
1146
|
return t.date({ width: "short" });
|
|
@@ -1153,7 +1152,7 @@ const $ = (e, t) => {
|
|
|
1153
1152
|
default:
|
|
1154
1153
|
return t.date({ width: "full" });
|
|
1155
1154
|
}
|
|
1156
|
-
},
|
|
1155
|
+
}, me = (e, t) => {
|
|
1157
1156
|
switch (e) {
|
|
1158
1157
|
case "p":
|
|
1159
1158
|
return t.time({ width: "short" });
|
|
@@ -1165,10 +1164,10 @@ const $ = (e, t) => {
|
|
|
1165
1164
|
default:
|
|
1166
1165
|
return t.time({ width: "full" });
|
|
1167
1166
|
}
|
|
1168
|
-
},
|
|
1167
|
+
}, Pt = (e, t) => {
|
|
1169
1168
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1170
1169
|
if (!a)
|
|
1171
|
-
return
|
|
1170
|
+
return Q(e, t);
|
|
1172
1171
|
let i;
|
|
1173
1172
|
switch (r) {
|
|
1174
1173
|
case "P":
|
|
@@ -1185,117 +1184,117 @@ const $ = (e, t) => {
|
|
|
1185
1184
|
i = t.dateTime({ width: "full" });
|
|
1186
1185
|
break;
|
|
1187
1186
|
}
|
|
1188
|
-
return i.replace("{{date}}",
|
|
1189
|
-
},
|
|
1190
|
-
p:
|
|
1191
|
-
P:
|
|
1192
|
-
},
|
|
1193
|
-
function
|
|
1194
|
-
return St.test(e);
|
|
1195
|
-
}
|
|
1196
|
-
function Yt(e) {
|
|
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+$/, Ct = ["D", "DD", "YY", "YYYY"];
|
|
1192
|
+
function Ft(e) {
|
|
1197
1193
|
return kt.test(e);
|
|
1198
1194
|
}
|
|
1199
|
-
function
|
|
1200
|
-
|
|
1201
|
-
|
|
1195
|
+
function Nt(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), Ct.includes(e)) throw new RangeError(r);
|
|
1202
1201
|
}
|
|
1203
|
-
function
|
|
1202
|
+
function Et(e, t, n) {
|
|
1204
1203
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1205
1204
|
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`;
|
|
1206
1205
|
}
|
|
1207
|
-
const
|
|
1208
|
-
function
|
|
1209
|
-
var
|
|
1210
|
-
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
1211
|
-
if (!
|
|
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))
|
|
1212
1211
|
throw new RangeError("Invalid time value");
|
|
1213
|
-
let
|
|
1214
|
-
const
|
|
1215
|
-
if (
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1212
|
+
let f = t.match(zt).map((b) => {
|
|
1213
|
+
const w = b[0];
|
|
1214
|
+
if (w === "p" || w === "P") {
|
|
1215
|
+
const z = St[w];
|
|
1216
|
+
return z(b, a.formatLong);
|
|
1218
1217
|
}
|
|
1219
|
-
return
|
|
1220
|
-
}).join("").match(
|
|
1221
|
-
if (
|
|
1218
|
+
return b;
|
|
1219
|
+
}).join("").match(Lt).map((b) => {
|
|
1220
|
+
if (b === "''")
|
|
1222
1221
|
return { isToken: !1, value: "'" };
|
|
1223
|
-
const
|
|
1224
|
-
if (
|
|
1225
|
-
return { isToken: !1, value:
|
|
1226
|
-
if (B[
|
|
1227
|
-
return { isToken: !0, value:
|
|
1228
|
-
if (
|
|
1222
|
+
const w = b[0];
|
|
1223
|
+
if (w === "'")
|
|
1224
|
+
return { isToken: !1, value: It(b) };
|
|
1225
|
+
if (B[w])
|
|
1226
|
+
return { isToken: !0, value: b };
|
|
1227
|
+
if (w.match(qt))
|
|
1229
1228
|
throw new RangeError(
|
|
1230
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1229
|
+
"Format string contains an unescaped latin alphabet character `" + w + "`"
|
|
1231
1230
|
);
|
|
1232
|
-
return { isToken: !1, value:
|
|
1231
|
+
return { isToken: !1, value: b };
|
|
1233
1232
|
});
|
|
1234
|
-
a.localize.preprocessor && (
|
|
1235
|
-
const
|
|
1233
|
+
a.localize.preprocessor && (f = a.localize.preprocessor(o, f));
|
|
1234
|
+
const l = {
|
|
1236
1235
|
firstWeekContainsDate: i,
|
|
1237
|
-
weekStartsOn:
|
|
1236
|
+
weekStartsOn: s,
|
|
1238
1237
|
locale: a
|
|
1239
1238
|
};
|
|
1240
|
-
return
|
|
1241
|
-
if (!
|
|
1242
|
-
const
|
|
1243
|
-
(!(n != null && n.useAdditionalWeekYearTokens) &&
|
|
1244
|
-
const
|
|
1245
|
-
return
|
|
1239
|
+
return f.map((b) => {
|
|
1240
|
+
if (!b.isToken) return b.value;
|
|
1241
|
+
const w = b.value;
|
|
1242
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Nt(w) || !(n != null && n.useAdditionalDayOfYearTokens) && Ft(w)) && Yt(w, t, String(e));
|
|
1243
|
+
const z = B[w[0]];
|
|
1244
|
+
return z(o, w, a.localize, l);
|
|
1246
1245
|
}).join("");
|
|
1247
1246
|
}
|
|
1248
|
-
function
|
|
1249
|
-
const t = e.match(
|
|
1250
|
-
return t ? t[1].replace(
|
|
1247
|
+
function It(e) {
|
|
1248
|
+
const t = e.match(Xt);
|
|
1249
|
+
return t ? t[1].replace(_t, "'") : e;
|
|
1251
1250
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ??
|
|
1254
|
-
if (isNaN(
|
|
1251
|
+
function Rt(e, t, n) {
|
|
1252
|
+
const r = P(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? fe, i = 2520, s = F(e, t);
|
|
1253
|
+
if (isNaN(s))
|
|
1255
1254
|
throw new RangeError("Invalid time value");
|
|
1256
|
-
const
|
|
1255
|
+
const o = Object.assign({}, n, {
|
|
1257
1256
|
addSuffix: n == null ? void 0 : n.addSuffix,
|
|
1258
|
-
comparison:
|
|
1257
|
+
comparison: s
|
|
1259
1258
|
});
|
|
1260
|
-
let
|
|
1261
|
-
|
|
1262
|
-
const
|
|
1263
|
-
let
|
|
1264
|
-
if (
|
|
1265
|
-
return n != null && n.includeSeconds ?
|
|
1266
|
-
if (
|
|
1267
|
-
return a.formatDistance("xMinutes",
|
|
1268
|
-
if (
|
|
1269
|
-
return a.formatDistance("aboutXHours", 1,
|
|
1270
|
-
if (
|
|
1271
|
-
const
|
|
1272
|
-
return a.formatDistance("aboutXHours",
|
|
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);
|
|
1262
|
+
let h;
|
|
1263
|
+
if (c < 2)
|
|
1264
|
+
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);
|
|
1265
|
+
if (c < 45)
|
|
1266
|
+
return a.formatDistance("xMinutes", c, o);
|
|
1267
|
+
if (c < 90)
|
|
1268
|
+
return a.formatDistance("aboutXHours", 1, o);
|
|
1269
|
+
if (c < Z) {
|
|
1270
|
+
const y = Math.round(c / 60);
|
|
1271
|
+
return a.formatDistance("aboutXHours", y, o);
|
|
1273
1272
|
} else {
|
|
1274
|
-
if (
|
|
1275
|
-
return a.formatDistance("xDays", 1,
|
|
1276
|
-
if (
|
|
1277
|
-
const
|
|
1278
|
-
return a.formatDistance("xDays",
|
|
1279
|
-
} else if (
|
|
1280
|
-
return
|
|
1273
|
+
if (c < i)
|
|
1274
|
+
return a.formatDistance("xDays", 1, o);
|
|
1275
|
+
if (c < C) {
|
|
1276
|
+
const y = Math.round(c / Z);
|
|
1277
|
+
return a.formatDistance("xDays", y, o);
|
|
1278
|
+
} else if (c < C * 2)
|
|
1279
|
+
return h = Math.round(c / C), a.formatDistance("aboutXMonths", h, o);
|
|
1281
1280
|
}
|
|
1282
|
-
if (
|
|
1283
|
-
const
|
|
1284
|
-
return a.formatDistance("xMonths",
|
|
1281
|
+
if (h = Re(l, f), h < 12) {
|
|
1282
|
+
const y = Math.round(c / C);
|
|
1283
|
+
return a.formatDistance("xMonths", y, o);
|
|
1285
1284
|
} else {
|
|
1286
|
-
const
|
|
1287
|
-
return
|
|
1285
|
+
const y = h % 12, O = Math.trunc(h / 12);
|
|
1286
|
+
return y < 3 ? a.formatDistance("aboutXYears", O, o) : y < 9 ? a.formatDistance("overXYears", O, o) : a.formatDistance("almostXYears", O + 1, o);
|
|
1288
1287
|
}
|
|
1289
1288
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1289
|
+
function At(e, t) {
|
|
1290
|
+
return Rt(e, Ne(e), t);
|
|
1292
1291
|
}
|
|
1293
|
-
function
|
|
1292
|
+
function Ht() {
|
|
1294
1293
|
return Object.assign({}, P());
|
|
1295
1294
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const r =
|
|
1298
|
-
return "formatToParts" in a ? jt(a, t) :
|
|
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
1298
|
}
|
|
1300
1299
|
function jt(e, t) {
|
|
1301
1300
|
const n = e.formatToParts(t);
|
|
@@ -1303,17 +1302,17 @@ function jt(e, t) {
|
|
|
1303
1302
|
if (n[r].type === "timeZoneName")
|
|
1304
1303
|
return n[r].value;
|
|
1305
1304
|
}
|
|
1306
|
-
function
|
|
1305
|
+
function Ut(e, t) {
|
|
1307
1306
|
const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1308
1307
|
return r ? r[0].substr(1) : "";
|
|
1309
1308
|
}
|
|
1310
|
-
function
|
|
1309
|
+
function Zt(e, t, n) {
|
|
1311
1310
|
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1312
1311
|
timeZone: t,
|
|
1313
1312
|
timeZoneName: e
|
|
1314
1313
|
});
|
|
1315
1314
|
}
|
|
1316
|
-
const
|
|
1315
|
+
const Vt = 60 * 1e3, Bt = {
|
|
1317
1316
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1318
1317
|
X: function(e, t, n) {
|
|
1319
1318
|
const r = _(n.timeZone, e);
|
|
@@ -1321,7 +1320,7 @@ const Bt = 60 * 1e3, Vt = {
|
|
|
1321
1320
|
return "Z";
|
|
1322
1321
|
switch (t) {
|
|
1323
1322
|
case "X":
|
|
1324
|
-
return
|
|
1323
|
+
return K(r);
|
|
1325
1324
|
case "XXXX":
|
|
1326
1325
|
case "XX":
|
|
1327
1326
|
return v(r);
|
|
@@ -1336,7 +1335,7 @@ const Bt = 60 * 1e3, Vt = {
|
|
|
1336
1335
|
const r = _(n.timeZone, e);
|
|
1337
1336
|
switch (t) {
|
|
1338
1337
|
case "x":
|
|
1339
|
-
return
|
|
1338
|
+
return K(r);
|
|
1340
1339
|
case "xxxx":
|
|
1341
1340
|
case "xx":
|
|
1342
1341
|
return v(r);
|
|
@@ -1353,7 +1352,7 @@ const Bt = 60 * 1e3, Vt = {
|
|
|
1353
1352
|
case "O":
|
|
1354
1353
|
case "OO":
|
|
1355
1354
|
case "OOO":
|
|
1356
|
-
return "GMT" +
|
|
1355
|
+
return "GMT" + $t(r, ":");
|
|
1357
1356
|
case "OOOO":
|
|
1358
1357
|
default:
|
|
1359
1358
|
return "GMT" + v(r, ":");
|
|
@@ -1365,20 +1364,20 @@ const Bt = 60 * 1e3, Vt = {
|
|
|
1365
1364
|
case "z":
|
|
1366
1365
|
case "zz":
|
|
1367
1366
|
case "zzz":
|
|
1368
|
-
return
|
|
1367
|
+
return J("short", e, n);
|
|
1369
1368
|
case "zzzz":
|
|
1370
1369
|
default:
|
|
1371
|
-
return
|
|
1370
|
+
return J("long", e, n);
|
|
1372
1371
|
}
|
|
1373
1372
|
}
|
|
1374
1373
|
};
|
|
1375
1374
|
function _(e, t) {
|
|
1376
|
-
const n = e ?
|
|
1375
|
+
const n = e ? oe(e, t, !0) / Vt : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
1377
1376
|
if (Number.isNaN(n))
|
|
1378
1377
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
1379
1378
|
return n;
|
|
1380
1379
|
}
|
|
1381
|
-
function
|
|
1380
|
+
function L(e, t) {
|
|
1382
1381
|
const n = e < 0 ? "-" : "";
|
|
1383
1382
|
let r = Math.abs(e).toString();
|
|
1384
1383
|
for (; r.length < t; )
|
|
@@ -1386,47 +1385,47 @@ function z(e, t) {
|
|
|
1386
1385
|
return n + r;
|
|
1387
1386
|
}
|
|
1388
1387
|
function v(e, t = "") {
|
|
1389
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a =
|
|
1388
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = L(Math.floor(r / 60), 2), i = L(Math.floor(r % 60), 2);
|
|
1390
1389
|
return n + a + t + i;
|
|
1391
1390
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1391
|
+
function K(e, t) {
|
|
1392
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + L(Math.abs(e) / 60, 2) : v(e, t);
|
|
1394
1393
|
}
|
|
1395
|
-
function
|
|
1394
|
+
function $t(e, t = "") {
|
|
1396
1395
|
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 +
|
|
1396
|
+
return i === 0 ? n + String(a) : n + String(a) + t + L(i, 2);
|
|
1398
1397
|
}
|
|
1399
|
-
const
|
|
1400
|
-
function
|
|
1398
|
+
const Gt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1399
|
+
function Qt(e, t, n = {}) {
|
|
1401
1400
|
t = String(t);
|
|
1402
|
-
const r = t.match(
|
|
1401
|
+
const r = t.match(Gt);
|
|
1403
1402
|
if (r) {
|
|
1404
|
-
const a =
|
|
1405
|
-
t = r.reduce(function(i,
|
|
1406
|
-
if (
|
|
1403
|
+
const a = ue(n.originalDate || e, n);
|
|
1404
|
+
t = r.reduce(function(i, s) {
|
|
1405
|
+
if (s[0] === "'")
|
|
1407
1406
|
return i;
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
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;
|
|
1410
1409
|
}, t);
|
|
1411
1410
|
}
|
|
1412
|
-
return
|
|
1411
|
+
return R(e, t, n);
|
|
1413
1412
|
}
|
|
1414
|
-
function
|
|
1415
|
-
e =
|
|
1416
|
-
const r =
|
|
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
1416
|
return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
|
|
1418
1417
|
}
|
|
1419
|
-
function
|
|
1418
|
+
function de(e, t, n, r) {
|
|
1420
1419
|
return r = {
|
|
1421
1420
|
...r,
|
|
1422
1421
|
timeZone: t,
|
|
1423
1422
|
originalDate: e
|
|
1424
|
-
},
|
|
1423
|
+
}, Qt(Jt(e, t, { timeZone: r.timeZone }), n, r);
|
|
1425
1424
|
}
|
|
1426
|
-
function
|
|
1425
|
+
function bn(e, t) {
|
|
1427
1426
|
return e && e !== "auto" ? e : t;
|
|
1428
1427
|
}
|
|
1429
|
-
function
|
|
1428
|
+
function Mn(e, t = /* @__PURE__ */ new Date()) {
|
|
1430
1429
|
try {
|
|
1431
1430
|
const n = {
|
|
1432
1431
|
timeZone: e,
|
|
@@ -1450,7 +1449,7 @@ function xn(e) {
|
|
|
1450
1449
|
return e;
|
|
1451
1450
|
}
|
|
1452
1451
|
}
|
|
1453
|
-
function
|
|
1452
|
+
function A(e, t = "auto") {
|
|
1454
1453
|
if (!e)
|
|
1455
1454
|
return /* @__PURE__ */ new Date(NaN);
|
|
1456
1455
|
const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
|
|
@@ -1462,55 +1461,67 @@ function me(e, t = "auto") {
|
|
|
1462
1461
|
return new Date(i);
|
|
1463
1462
|
}
|
|
1464
1463
|
return new Date(e);
|
|
1465
|
-
} else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? 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);
|
|
1466
1465
|
}
|
|
1467
1466
|
const Kt = "MM/dd/yyyy", en = (e, t, n, r = "auto") => {
|
|
1468
1467
|
if (!e)
|
|
1469
1468
|
return "";
|
|
1470
1469
|
try {
|
|
1471
|
-
const a =
|
|
1470
|
+
const a = A(e, r);
|
|
1472
1471
|
if (isNaN(a.getTime()))
|
|
1473
1472
|
return e;
|
|
1474
|
-
const
|
|
1475
|
-
return n && n !== "auto" ?
|
|
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);
|
|
1476
1475
|
} catch (a) {
|
|
1477
1476
|
return console.error("Date formatting error:", a), e;
|
|
1478
1477
|
}
|
|
1479
|
-
}
|
|
1478
|
+
};
|
|
1479
|
+
function Dn(e, t, n = "auto") {
|
|
1480
|
+
if (e)
|
|
1481
|
+
try {
|
|
1482
|
+
const r = A(e, n);
|
|
1483
|
+
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 };
|
|
1486
|
+
} catch {
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
const tn = (e, t = "auto") => {
|
|
1480
1491
|
if (!e)
|
|
1481
1492
|
return "";
|
|
1482
1493
|
try {
|
|
1483
|
-
const n =
|
|
1484
|
-
return isNaN(n.getTime()) ? e :
|
|
1494
|
+
const n = A(e, t);
|
|
1495
|
+
return isNaN(n.getTime()) ? e : At(n, { addSuffix: !0 });
|
|
1485
1496
|
} catch (n) {
|
|
1486
1497
|
return console.error("Relative time formatting error:", n), e;
|
|
1487
1498
|
}
|
|
1488
1499
|
};
|
|
1489
1500
|
function nn(e, t, n, r) {
|
|
1490
|
-
const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n,
|
|
1501
|
+
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;
|
|
1491
1502
|
if (t != null && t.useRelativeTime)
|
|
1492
1503
|
return tn(
|
|
1493
1504
|
a,
|
|
1494
1505
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
1495
1506
|
);
|
|
1496
|
-
const
|
|
1507
|
+
const o = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
|
|
1497
1508
|
return en(
|
|
1498
1509
|
a,
|
|
1499
|
-
|
|
1500
|
-
t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone :
|
|
1510
|
+
o,
|
|
1511
|
+
t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : s ? i : n,
|
|
1501
1512
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
1502
1513
|
);
|
|
1503
1514
|
}
|
|
1504
|
-
function
|
|
1505
|
-
var
|
|
1515
|
+
function he(e, t, n) {
|
|
1516
|
+
var s, o;
|
|
1506
1517
|
if (e == null)
|
|
1507
|
-
return e === null ? ((
|
|
1508
|
-
const r =
|
|
1518
|
+
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);
|
|
1509
1520
|
if (!n.useFormattedValues || !t)
|
|
1510
1521
|
return String(a);
|
|
1511
1522
|
switch (t.type) {
|
|
1512
1523
|
case "number":
|
|
1513
|
-
return i !== void 0 ?
|
|
1524
|
+
return i !== void 0 ? De(
|
|
1514
1525
|
i,
|
|
1515
1526
|
t.numberFormat,
|
|
1516
1527
|
n.locale
|
|
@@ -1538,14 +1549,14 @@ function de(e, t, n) {
|
|
|
1538
1549
|
function pn(e, t) {
|
|
1539
1550
|
return t.visibleColumns.map((n) => {
|
|
1540
1551
|
const r = e[n], a = t.columnSettings[n];
|
|
1541
|
-
return
|
|
1552
|
+
return he(r, a, {
|
|
1542
1553
|
useFormattedValues: t.useFormattedValues,
|
|
1543
1554
|
timezone: t.timezone,
|
|
1544
1555
|
locale: t.locale
|
|
1545
1556
|
});
|
|
1546
1557
|
});
|
|
1547
1558
|
}
|
|
1548
|
-
const rn = "en-US",
|
|
1559
|
+
const rn = "en-US", ee = [
|
|
1549
1560
|
"compact",
|
|
1550
1561
|
"maximumFractionDigits",
|
|
1551
1562
|
"minimumFractionDigits",
|
|
@@ -1557,18 +1568,18 @@ function an(e) {
|
|
|
1557
1568
|
if (e.type !== "currency" || Object.prototype.hasOwnProperty.call(e, "currency") || Object.prototype.hasOwnProperty.call(e, "locale"))
|
|
1558
1569
|
return !1;
|
|
1559
1570
|
const t = Object.keys(e).sort();
|
|
1560
|
-
return t.length ===
|
|
1571
|
+
return t.length === ee.length && ee.every(
|
|
1561
1572
|
(n, r) => t[r] === n
|
|
1562
1573
|
) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
|
|
1563
1574
|
}
|
|
1564
|
-
function
|
|
1575
|
+
function te(e) {
|
|
1565
1576
|
if (typeof e != "string")
|
|
1566
1577
|
return;
|
|
1567
1578
|
const t = e.trim();
|
|
1568
1579
|
if (!(!t || t.toLowerCase() === "none"))
|
|
1569
1580
|
return t;
|
|
1570
1581
|
}
|
|
1571
|
-
function
|
|
1582
|
+
function N(e) {
|
|
1572
1583
|
if (!(typeof e != "number" || !Number.isFinite(e)))
|
|
1573
1584
|
return Math.max(0, Math.min(10, Math.trunc(e)));
|
|
1574
1585
|
}
|
|
@@ -1576,15 +1587,15 @@ function sn(e) {
|
|
|
1576
1587
|
return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
|
|
1577
1588
|
}
|
|
1578
1589
|
function on(e, t, n) {
|
|
1579
|
-
const r =
|
|
1590
|
+
const r = N(t.minimumFractionDigits), a = N(t.maximumFractionDigits);
|
|
1580
1591
|
if (typeof r == "number" || typeof a == "number") {
|
|
1581
|
-
const
|
|
1592
|
+
const o = r ?? 0, f = a ?? Math.max(o, 2);
|
|
1582
1593
|
return {
|
|
1583
|
-
minimumFractionDigits: Math.min(
|
|
1584
|
-
maximumFractionDigits: Math.max(
|
|
1594
|
+
minimumFractionDigits: Math.min(o, f),
|
|
1595
|
+
maximumFractionDigits: Math.max(o, f)
|
|
1585
1596
|
};
|
|
1586
1597
|
}
|
|
1587
|
-
const i =
|
|
1598
|
+
const i = N(t.decimals);
|
|
1588
1599
|
if (typeof i == "number")
|
|
1589
1600
|
return {
|
|
1590
1601
|
minimumFractionDigits: i,
|
|
@@ -1592,18 +1603,18 @@ function on(e, t, n) {
|
|
|
1592
1603
|
};
|
|
1593
1604
|
if (n != null && n.preserveOmittedProperties)
|
|
1594
1605
|
return {};
|
|
1595
|
-
const
|
|
1606
|
+
const s = sn(e);
|
|
1596
1607
|
return {
|
|
1597
|
-
minimumFractionDigits:
|
|
1598
|
-
maximumFractionDigits:
|
|
1608
|
+
minimumFractionDigits: s,
|
|
1609
|
+
maximumFractionDigits: s
|
|
1599
1610
|
};
|
|
1600
1611
|
}
|
|
1601
1612
|
function un(e, t) {
|
|
1602
1613
|
if (!(typeof t != "string" || e === "percent" && t === "%"))
|
|
1603
1614
|
return t;
|
|
1604
1615
|
}
|
|
1605
|
-
function
|
|
1606
|
-
const t =
|
|
1616
|
+
function ne(e) {
|
|
1617
|
+
const t = te(e.locale), n = te(e.currency), r = un(e.type, e.suffix);
|
|
1607
1618
|
return {
|
|
1608
1619
|
...e,
|
|
1609
1620
|
...t !== e.locale ? { locale: t } : {},
|
|
@@ -1611,11 +1622,11 @@ function ee(e) {
|
|
|
1611
1622
|
...r !== e.suffix ? { suffix: r } : {}
|
|
1612
1623
|
};
|
|
1613
1624
|
}
|
|
1614
|
-
function
|
|
1625
|
+
function D(e, t, n) {
|
|
1615
1626
|
const r = { ...t, type: e };
|
|
1616
1627
|
if ((n == null ? void 0 : n.numericInput) === "canonical" && I(r))
|
|
1617
|
-
return
|
|
1618
|
-
const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0,
|
|
1628
|
+
return ne(r);
|
|
1629
|
+
const a = on(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, s = {
|
|
1619
1630
|
type: e,
|
|
1620
1631
|
locale: t.locale,
|
|
1621
1632
|
minimumFractionDigits: a.minimumFractionDigits,
|
|
@@ -1627,9 +1638,9 @@ function x(e, t, n) {
|
|
|
1627
1638
|
compact: !!t.compact,
|
|
1628
1639
|
scale: typeof t.scale == "number" ? t.scale : void 0
|
|
1629
1640
|
};
|
|
1630
|
-
return e === "currency" && t.currency && (
|
|
1641
|
+
return e === "currency" && t.currency && (s.currency = t.currency), e === "percent" && (s.percentValueMode = t.percentValueMode || "fraction"), ne(s);
|
|
1631
1642
|
}
|
|
1632
|
-
function
|
|
1643
|
+
function re(e) {
|
|
1633
1644
|
return {
|
|
1634
1645
|
type: "date",
|
|
1635
1646
|
locale: e.locale || rn,
|
|
@@ -1644,8 +1655,8 @@ function te(e) {
|
|
|
1644
1655
|
function q(e) {
|
|
1645
1656
|
return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
|
|
1646
1657
|
}
|
|
1647
|
-
function
|
|
1648
|
-
const t =
|
|
1658
|
+
function ae(e) {
|
|
1659
|
+
const t = N(e.maxUnits);
|
|
1649
1660
|
return {
|
|
1650
1661
|
type: "duration",
|
|
1651
1662
|
inputUnit: q(e.inputUnit) ? e.inputUnit : "second",
|
|
@@ -1658,7 +1669,7 @@ function ne(e) {
|
|
|
1658
1669
|
negativeStyle: e.negativeStyle || "minus"
|
|
1659
1670
|
};
|
|
1660
1671
|
}
|
|
1661
|
-
function
|
|
1672
|
+
function ie(e) {
|
|
1662
1673
|
return {
|
|
1663
1674
|
type: "string",
|
|
1664
1675
|
prefix: e.prefix,
|
|
@@ -1670,39 +1681,39 @@ function cn(e, t) {
|
|
|
1670
1681
|
return;
|
|
1671
1682
|
if (typeof e == "string") {
|
|
1672
1683
|
const r = e.trim().toLowerCase();
|
|
1673
|
-
return r === "currency" ?
|
|
1684
|
+
return r === "currency" ? D(
|
|
1674
1685
|
"currency",
|
|
1675
1686
|
{ type: "currency" },
|
|
1676
1687
|
t
|
|
1677
|
-
) : r === "percentage" || r === "percent" ?
|
|
1688
|
+
) : r === "percentage" || r === "percent" ? D(
|
|
1678
1689
|
"percent",
|
|
1679
1690
|
{
|
|
1680
1691
|
type: "percentage",
|
|
1681
1692
|
percentValueMode: "fraction"
|
|
1682
1693
|
},
|
|
1683
1694
|
t
|
|
1684
|
-
) : r === "scientific" ?
|
|
1695
|
+
) : r === "scientific" ? D(
|
|
1685
1696
|
"scientific",
|
|
1686
1697
|
{ type: "scientific" },
|
|
1687
1698
|
t
|
|
1688
|
-
) : r === "date" ?
|
|
1699
|
+
) : r === "date" ? re({}) : r === "duration" ? ae({}) : r === "string" ? ie({}) : r === "number" ? D(
|
|
1689
1700
|
"number",
|
|
1690
1701
|
{ type: "number" },
|
|
1691
1702
|
t
|
|
1692
1703
|
) : void 0;
|
|
1693
1704
|
}
|
|
1694
1705
|
if ("type" in e && e.type === "temporal_bucket") {
|
|
1695
|
-
const r =
|
|
1706
|
+
const r = be.safeParse(e);
|
|
1696
1707
|
return r.success ? r.data : void 0;
|
|
1697
1708
|
}
|
|
1698
1709
|
const n = e;
|
|
1699
1710
|
if ((t == null ? void 0 : t.numericInput) === "canonical") {
|
|
1700
1711
|
const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
|
|
1701
1712
|
if (I(r))
|
|
1702
|
-
return
|
|
1713
|
+
return D(r.type, r, t);
|
|
1703
1714
|
}
|
|
1704
1715
|
if (n.type === "percentage")
|
|
1705
|
-
return
|
|
1716
|
+
return D(
|
|
1706
1717
|
"percent",
|
|
1707
1718
|
{
|
|
1708
1719
|
...n,
|
|
@@ -1711,7 +1722,7 @@ function cn(e, t) {
|
|
|
1711
1722
|
t
|
|
1712
1723
|
);
|
|
1713
1724
|
if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific") {
|
|
1714
|
-
const r =
|
|
1725
|
+
const r = D(
|
|
1715
1726
|
n.type,
|
|
1716
1727
|
n,
|
|
1717
1728
|
t
|
|
@@ -1719,11 +1730,11 @@ function cn(e, t) {
|
|
|
1719
1730
|
return an(n) ? { ...r, currency: "USD" } : r;
|
|
1720
1731
|
}
|
|
1721
1732
|
if (n.type === "date")
|
|
1722
|
-
return
|
|
1733
|
+
return re(n);
|
|
1723
1734
|
if (n.type === "duration")
|
|
1724
|
-
return
|
|
1735
|
+
return ae(n);
|
|
1725
1736
|
if (n.type === "string")
|
|
1726
|
-
return
|
|
1737
|
+
return ie(n);
|
|
1727
1738
|
}
|
|
1728
1739
|
function fn(e, t) {
|
|
1729
1740
|
var a;
|
|
@@ -1734,11 +1745,11 @@ function fn(e, t) {
|
|
|
1734
1745
|
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));
|
|
1735
1746
|
}
|
|
1736
1747
|
function ln(e, t, n) {
|
|
1737
|
-
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(
|
|
1748
|
+
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(we).join(t)) ?? `${t} Total` : t;
|
|
1738
1749
|
}
|
|
1739
1750
|
function On(e, t, n, r) {
|
|
1740
|
-
var
|
|
1741
|
-
const a = e[e.length - 1], i = t === "grand_total" ? n.grand.label : a ? (
|
|
1751
|
+
var s;
|
|
1752
|
+
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;
|
|
1742
1753
|
return ln(t, fn(e, r), i);
|
|
1743
1754
|
}
|
|
1744
1755
|
function Tn(e, t, n) {
|
|
@@ -1746,12 +1757,12 @@ function Tn(e, t, n) {
|
|
|
1746
1757
|
}
|
|
1747
1758
|
function vn(e) {
|
|
1748
1759
|
const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
|
|
1749
|
-
return Array.from({ length: i }, (
|
|
1750
|
-
const
|
|
1760
|
+
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);
|
|
1751
1762
|
return {
|
|
1752
|
-
path:
|
|
1753
|
-
total:
|
|
1754
|
-
visible:
|
|
1763
|
+
path: f,
|
|
1764
|
+
total: l,
|
|
1765
|
+
visible: l || t.length > o && (a || !u || o === t.length - 1)
|
|
1755
1766
|
};
|
|
1756
1767
|
});
|
|
1757
1768
|
}
|
|
@@ -1762,33 +1773,33 @@ function mn(e, t) {
|
|
|
1762
1773
|
});
|
|
1763
1774
|
}
|
|
1764
1775
|
function Pn(e, t, n) {
|
|
1765
|
-
const r = /* @__PURE__ */ new Map(), a = (i, o) => {
|
|
1766
|
-
const
|
|
1767
|
-
o === "measures" && r.set(
|
|
1768
|
-
isNumeric:
|
|
1776
|
+
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);
|
|
1778
|
+
o === "measures" && r.set(s.id, {
|
|
1779
|
+
isNumeric: ye(s.column.dataType) === "number",
|
|
1769
1780
|
// Use normalized affixes: a redundant percent suffix is already removed.
|
|
1770
1781
|
hasTextAffixes: !!u && !!("prefix" in u && u.prefix || "suffix" in u && u.suffix)
|
|
1771
1782
|
});
|
|
1772
|
-
const
|
|
1783
|
+
const g = (c) => he(c, void 0, {
|
|
1773
1784
|
useFormattedValues: !0,
|
|
1774
1785
|
timezone: n.calendar.tz,
|
|
1775
1786
|
locale: n.valueFormat.locale,
|
|
1776
1787
|
absence: t.absence
|
|
1777
1788
|
});
|
|
1778
|
-
if (
|
|
1779
|
-
const
|
|
1780
|
-
metadata:
|
|
1781
|
-
cardFormat: (
|
|
1782
|
-
semanticFormat: (
|
|
1789
|
+
if (s.column.temporalBucket) {
|
|
1790
|
+
const c = s.column.temporalBucket, h = pe({
|
|
1791
|
+
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,
|
|
1783
1794
|
locale: n.valueFormat.locale,
|
|
1784
1795
|
styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
|
|
1785
1796
|
});
|
|
1786
|
-
return (
|
|
1797
|
+
return (y) => typeof y == "string" ? Oe({ value: y, metadata: c, format: h.format }) : g(y);
|
|
1787
1798
|
}
|
|
1788
|
-
if (
|
|
1789
|
-
const
|
|
1790
|
-
metadata:
|
|
1791
|
-
format:
|
|
1799
|
+
if (s.column.rawTemporal) {
|
|
1800
|
+
const c = Te({
|
|
1801
|
+
metadata: s.column.rawTemporal,
|
|
1802
|
+
format: ve({
|
|
1792
1803
|
format: (u == null ? void 0 : u.type) === "date" ? {
|
|
1793
1804
|
type: "raw_temporal",
|
|
1794
1805
|
timezone: u.timezone,
|
|
@@ -1803,62 +1814,64 @@ function Pn(e, t, n) {
|
|
|
1803
1814
|
calendar: n.calendar
|
|
1804
1815
|
})
|
|
1805
1816
|
});
|
|
1806
|
-
return (
|
|
1807
|
-
if (typeof
|
|
1808
|
-
const
|
|
1809
|
-
return
|
|
1817
|
+
return (h) => {
|
|
1818
|
+
if (typeof h != "string") return g(h);
|
|
1819
|
+
const y = c(h);
|
|
1820
|
+
return y.ok ? y.text : g(h);
|
|
1810
1821
|
};
|
|
1811
1822
|
}
|
|
1812
1823
|
if (I(u)) {
|
|
1813
|
-
const
|
|
1814
|
-
return (
|
|
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);
|
|
1815
1826
|
}
|
|
1816
|
-
return (u == null ? void 0 : u.type) === "duration" ? (
|
|
1817
|
-
typeof
|
|
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(
|
|
1828
|
+
typeof c == "object" ? c.value : c,
|
|
1818
1829
|
u
|
|
1819
|
-
) :
|
|
1830
|
+
) : g(c) : (u == null ? void 0 : u.type) === "string" ? (c) => c === null ? g(c) : `${u.prefix ?? ""}${g(c)}${u.suffix ?? ""}` : g;
|
|
1820
1831
|
};
|
|
1821
1832
|
return {
|
|
1822
1833
|
levels: new Map(
|
|
1823
|
-
e.levels.map((
|
|
1834
|
+
e.levels.map((s) => [s.id, i(s, "levels")])
|
|
1824
1835
|
),
|
|
1825
1836
|
measures: new Map(
|
|
1826
|
-
e.measures.map((
|
|
1837
|
+
e.measures.map((s) => [s.id, i(s, "measures")])
|
|
1827
1838
|
),
|
|
1828
1839
|
measureSemantics: r,
|
|
1840
|
+
measureFormats: a,
|
|
1829
1841
|
absence: t.absence
|
|
1830
1842
|
};
|
|
1831
1843
|
}
|
|
1832
1844
|
export {
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1845
|
+
d as A,
|
|
1846
|
+
ze as B,
|
|
1847
|
+
E as C,
|
|
1836
1848
|
rn as D,
|
|
1837
|
-
|
|
1849
|
+
Ne as E,
|
|
1850
|
+
ln as F,
|
|
1838
1851
|
en as a,
|
|
1839
1852
|
tn as b,
|
|
1840
1853
|
xn as c,
|
|
1841
|
-
|
|
1842
|
-
|
|
1854
|
+
Dn as d,
|
|
1855
|
+
he as e,
|
|
1843
1856
|
cn as f,
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1857
|
+
Mn as g,
|
|
1858
|
+
pn as h,
|
|
1859
|
+
Pn as i,
|
|
1860
|
+
On as j,
|
|
1861
|
+
vn as k,
|
|
1862
|
+
Tn as l,
|
|
1850
1863
|
fn as m,
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
+
de as n,
|
|
1865
|
+
R as o,
|
|
1866
|
+
A as p,
|
|
1867
|
+
re as q,
|
|
1868
|
+
bn as r,
|
|
1869
|
+
ae as s,
|
|
1870
|
+
D as t,
|
|
1871
|
+
te as u,
|
|
1872
|
+
mn as v,
|
|
1873
|
+
At as w,
|
|
1874
|
+
P as x,
|
|
1875
|
+
fe as y,
|
|
1876
|
+
F as z
|
|
1864
1877
|
};
|