react-semaphor 0.1.601 → 0.1.603
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 +415 -375
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +8 -8
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
- package/dist/chunks/{assistant-chat-BE0XXzZP.js → assistant-chat-B6hNQI1t.js} +146 -146
- package/dist/chunks/{bookmark-impact-DXDAN5AY.js → bookmark-impact-Ba2PLcGp.js} +3 -3
- package/dist/chunks/{bookmark-state-BMyB3Tb6.js → bookmark-state-n7AaNzR_.js} +517 -516
- package/dist/chunks/{card-filter-builder-CE0-YVN5.js → card-filter-builder-Y22HizVx.js} +474 -474
- package/dist/chunks/{comparison-window-caption-Dxj2CHOa.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
- package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
- package/dist/chunks/{dashboard-mJKPFRbb.js → dashboard-BghI99oY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CntwKyiZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +725 -716
- package/dist/chunks/{dashboard-controls-XO089DMg.js → dashboard-controls-CtFXlyjV.js} +53 -53
- package/dist/chunks/{dashboard-json-CQRiydUv.js → dashboard-json-DfGBUtCd.js} +5 -5
- package/dist/chunks/dates-BnrXF4bb.js +185 -0
- package/dist/chunks/{edit-dashboard-visual-f-Dm-BLR.js → edit-dashboard-visual-oxt3x1wb.js} +8081 -8268
- package/dist/chunks/{filter-line-CKNMyNTQ.js → filter-line-Cy5YYqRL.js} +27 -27
- package/dist/chunks/{filter-reach-copy-B8GGyVuR.js → filter-reach-copy-CE_ZX147.js} +1786 -2214
- package/dist/chunks/{filter-value-text-CRtKecI5.js → filter-value-text-fWvSDwkl.js} +11 -11
- package/dist/chunks/{index-DoPApnxg.js → index-D5rxbtS4.js} +24 -24
- package/dist/chunks/{layout-grid-CiSCZdIr.js → layout-grid-9LndRoLa.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-myf3D3Qx.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
- package/dist/chunks/{matrix-operation-contract-C1SuOHLZ.js → matrix-operation-contract-DPBj69D8.js} +518 -514
- package/dist/chunks/{metric-comparison-Cm0G893W.js → metric-comparison-B0FR-Q8I.js} +184 -125
- package/dist/chunks/{paintbrush-DQIwqlck.js → paintbrush-58FQYY-y.js} +1 -1
- package/dist/chunks/{palette-Cun747Rg.js → palette-Be62Tkoa.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-C1Dyx8du.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
- package/dist/chunks/{pivot-result-identity-CBS-ssEp.js → pivot-result-identity-CAP4--iq.js} +1 -1
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
- package/dist/chunks/{report-preferences-dialog-SDZEcG2x.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
- package/dist/chunks/{report-runtime-context-BbedQdtc.js → report-runtime-context-c77_KF9v.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-DRBS0eRa.js → resolve-dashboard-input-context-Rtl1ffmE.js} +8808 -7291
- package/dist/chunks/{save-Dj5bjm7P.js → save-C5A0JnEV.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DWVlJcsa.js → saved-dashboard-context-tcyTU8jm.js} +199 -213
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
- package/dist/chunks/{semaphor-ready-indicator-OFOoAY-A.js → semaphor-ready-indicator-FBvunj6S.js} +37894 -35726
- package/dist/chunks/{shelf-drop-preview-context-2swWypXu.js → shelf-drop-preview-context-QKStrcK9.js} +54 -54
- package/dist/chunks/{stored-dashboard-NtOuEX6a.js → stored-dashboard-CHozcAY9.js} +770 -743
- package/dist/chunks/{style-sheet-parts-Qv4UcLAo.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
- package/dist/chunks/{table-export-sheet-Do7ZB0_F.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
- package/dist/chunks/{token-types-Dy_aXO-U.js → token-types-XbM6QByy.js} +1 -1
- package/dist/chunks/{upload-Bq-puSVy.js → upload-H15d7uHK.js} +1 -1
- package/dist/chunks/{validators-C7DFk3QK.js → validators-Baf3VIf5.js} +5 -5
- package/dist/chunks/{variable-draft-Cy03qnEi.js → variable-draft-C2y8Jp6Z.js} +27 -28
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +3392 -2761
- package/dist/format-utils/index.js +205 -204
- package/dist/index.js +73 -75
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/dashboard/dashboard-web-component.d.ts +7 -0
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
- package/dist/types/lib/document/document-edits.d.ts +0 -4
- package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +30 -1
- package/dist/types/lib/types/common-types.d.ts +0 -2
- package/dist/types/lib/types/explorer-types.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
- package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
- package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
- package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
- package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +165 -360
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +23 -2
- package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
- package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +158 -0
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +17 -6
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
- package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
- package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
- package/dist/types/shared/temporal/index.d.ts +2 -0
- package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
- package/dist/types/shared/temporal/temporal.d.ts +27 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunks/dates-B-Urp5OD.js +0 -164
- package/dist/chunks/matrix-member-presentation-g0c_NpDW.js +0 -258
- package/dist/chunks/raw-temporal-value-DN_l-Tss.js +0 -454
- package/dist/chunks/selection-filter-compiler-DmAr7yqC.js +0 -131
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Vn = Object.defineProperty;
|
|
2
|
+
var Bn = (e, t, n) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var _ = (e, t, n) => Bn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { z as p } from "zod";
|
|
5
|
-
import { E as
|
|
6
|
-
import { b2 as
|
|
7
|
-
import "./matrix-operation-contract-
|
|
8
|
-
import { k as
|
|
9
|
-
import { b as
|
|
10
|
-
import { canonicalizeSupportedLocale as
|
|
11
|
-
import { p as
|
|
12
|
-
import { r as
|
|
13
|
-
function
|
|
5
|
+
import { E as en, l as tn } from "./export-file-format-C-tJsxsf.js";
|
|
6
|
+
import { b2 as nn, b3 as Gn, aX as Qn, a6 as Jn, m as ht, N as er, b4 as tr, b5 as nr, S as rr, J as B, T as ar } from "./validators-Baf3VIf5.js";
|
|
7
|
+
import "./matrix-operation-contract-DPBj69D8.js";
|
|
8
|
+
import { k as ir, i as ve } from "./analytics-base-schemas-DsUh5Q3C.js";
|
|
9
|
+
import { b as or } from "./report-runtime-context-c77_KF9v.js";
|
|
10
|
+
import { canonicalizeSupportedLocale as te, canonicalizeSupportedCurrencyCode as Ze, DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as sr } from "../value-format-preferences/index.js";
|
|
11
|
+
import { p as cr, a as ur, c as lr, i as gt, s as be, Y as mr, J as fr, o as dr } from "./raw-temporal-value-Dg_MTFF7.js";
|
|
12
|
+
import { b as hr, r as gr } from "./metric-comparison-B0FR-Q8I.js";
|
|
13
|
+
function ne(e) {
|
|
14
14
|
if (!e || typeof e != "object") return !1;
|
|
15
15
|
const t = e.type;
|
|
16
16
|
return t === "number" || t === "currency" || t === "percent" || t === "scientific";
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function Ks(e) {
|
|
19
|
+
return ne(e) || !!e && typeof e == "object" && e.type === "duration";
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const rn = [
|
|
22
22
|
"day",
|
|
23
23
|
"hour",
|
|
24
24
|
"minute",
|
|
25
25
|
"second",
|
|
26
26
|
"millisecond"
|
|
27
|
-
],
|
|
27
|
+
], Xe = {
|
|
28
28
|
day: 864e5,
|
|
29
29
|
hour: 36e5,
|
|
30
30
|
minute: 6e4,
|
|
31
31
|
second: 1e3,
|
|
32
32
|
millisecond: 1
|
|
33
|
-
},
|
|
33
|
+
}, yr = {
|
|
34
34
|
day: "d",
|
|
35
35
|
hour: "hr",
|
|
36
36
|
minute: "min",
|
|
37
37
|
second: "s",
|
|
38
38
|
millisecond: "ms"
|
|
39
|
-
},
|
|
39
|
+
}, wr = {
|
|
40
40
|
day: ["day", "days"],
|
|
41
41
|
hour: ["hour", "hours"],
|
|
42
42
|
minute: ["minute", "minutes"],
|
|
43
43
|
second: ["second", "seconds"],
|
|
44
44
|
millisecond: ["millisecond", "milliseconds"]
|
|
45
45
|
};
|
|
46
|
-
function
|
|
46
|
+
function pr(e) {
|
|
47
47
|
return e === "day" || e === "hour" || e === "minute" || e === "second" || e === "millisecond";
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
49
|
+
function an(e, t) {
|
|
50
|
+
return pr(e) ? e : t;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function yt(e, t) {
|
|
53
|
+
return rn.indexOf(an(e, t));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const n =
|
|
57
|
-
return
|
|
55
|
+
function Tr(e, t) {
|
|
56
|
+
const n = yt(e, "day"), r = yt(t, "second"), a = Math.min(n, r), i = Math.max(n, r);
|
|
57
|
+
return rn.slice(a, i + 1);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return e *
|
|
59
|
+
function vr(e, t) {
|
|
60
|
+
return e * Xe[an(t, "second")];
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const n =
|
|
62
|
+
function br(e, t) {
|
|
63
|
+
const n = Tr(t.largestUnit, t.smallestUnit), r = n[n.length - 1], a = Xe[r];
|
|
64
64
|
let i = Math.round(e / a) * a;
|
|
65
65
|
return n.map((o) => {
|
|
66
|
-
const s =
|
|
66
|
+
const s = Xe[o], c = Math.floor(i / s);
|
|
67
67
|
return i -= c * s, { unit: o, value: c };
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function xr(e, t) {
|
|
71
71
|
const n = e.filter((i) => i.value !== 0), r = n.length > 0 ? n : [e[e.length - 1]], a = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : r.length;
|
|
72
|
-
return r.slice(0, a).map((i) => `${i.value}${
|
|
72
|
+
return r.slice(0, a).map((i) => `${i.value}${yr[i.unit]}`).join(" ");
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Dr(e, t) {
|
|
75
75
|
const n = e.filter((i) => i.value !== 0), r = n.length > 0 ? n : [e[e.length - 1]], a = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : r.length;
|
|
76
76
|
return r.slice(0, a).map((i) => {
|
|
77
|
-
const [o, s] =
|
|
77
|
+
const [o, s] = wr[i.unit];
|
|
78
78
|
return `${i.value} ${i.value === 1 ? o : s}`;
|
|
79
79
|
}).join(" ");
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Sr(e) {
|
|
82
82
|
const t = e.some(
|
|
83
83
|
(c) => c.unit === "day" && c.value !== 0
|
|
84
84
|
), n = e.some((c) => c.unit === "millisecond"), r = e.findIndex((c) => c.value !== 0), a = Math.max(0, e.length - 2), i = t ? 0 : r === -1 ? a : Math.min(r, a), o = r === -1 ? e.slice(a) : e.slice(i);
|
|
@@ -87,21 +87,21 @@ function pr(e) {
|
|
|
87
87
|
const s = o.map((c, u) => c.unit === "millisecond" ? String(c.value).padStart(3, "0") : u === 0 ? String(c.value) : String(c.value).padStart(2, "0")).join(":");
|
|
88
88
|
return n ? s.replace(/:(\d{3})$/, ".$1") : s;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Mr(e, t, n) {
|
|
91
91
|
const r = `${n.prefix || ""}${e}${n.suffix || ""}`;
|
|
92
92
|
return t ? n.negativeInParentheses ? `(${r})` : `-${r}` : r;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function on(e, t = {}) {
|
|
95
95
|
if (e == null)
|
|
96
96
|
return "";
|
|
97
97
|
const n = typeof e == "number" ? e : typeof e == "string" && e.trim() ? Number(e) : NaN;
|
|
98
98
|
if (!Number.isFinite(n))
|
|
99
99
|
return "";
|
|
100
|
-
const r = t.inputUnit || "second", a = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", i = n < 0, o = Math.abs(
|
|
101
|
-
return
|
|
100
|
+
const r = t.inputUnit || "second", a = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", i = n < 0, o = Math.abs(vr(n, r)), s = br(o, t), c = a === "digital" ? Sr(s) : a === "long" ? Dr(s, t.maxUnits) : xr(s, t.maxUnits);
|
|
101
|
+
return Mr(c, i, t);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function sn(e, t) {
|
|
104
|
+
return on(
|
|
105
105
|
e !== null && typeof e == "object" ? e.value : e,
|
|
106
106
|
{
|
|
107
107
|
inputUnit: t.inputUnit,
|
|
@@ -115,119 +115,119 @@ function nn(e, t) {
|
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
let
|
|
119
|
-
function
|
|
118
|
+
let wt;
|
|
119
|
+
function pt(e, t) {
|
|
120
120
|
const n = e.format;
|
|
121
121
|
return n(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
123
|
+
function kr(e, t) {
|
|
124
|
+
if (wt ?? (wt = pt(
|
|
125
125
|
new Intl.NumberFormat("en-US", { useGrouping: !1, maximumFractionDigits: 6 }),
|
|
126
126
|
"9007199254740993.000009"
|
|
127
|
-
) === "9007199254740993.000009"), !
|
|
127
|
+
) === "9007199254740993.000009"), !wt)
|
|
128
128
|
throw new RangeError("This runtime cannot format exact decimal strings.");
|
|
129
129
|
const n = Number(e);
|
|
130
130
|
if (!Number.isFinite(n) || n === 0 && e !== "0")
|
|
131
131
|
throw new RangeError("Exact value is outside the Intl formatting range; use raw text.");
|
|
132
|
-
return
|
|
132
|
+
return pt(t, e);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function re(e) {
|
|
135
135
|
return typeof e == "number" ? e < 0 : e.value.startsWith("-");
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return typeof e == "number" ? Math.abs(e) :
|
|
137
|
+
function G(e) {
|
|
138
|
+
return typeof e == "number" ? Math.abs(e) : re(e) ? { ...e, value: e.value.slice(1) } : e;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function _r(e) {
|
|
141
141
|
return typeof e == "number" ? e === 0 : /^-?0*(\.0*)?$/.test(e.value);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function cn(e, t) {
|
|
144
144
|
return typeof e == "number" ? e * t : {
|
|
145
145
|
kind: "exact_number",
|
|
146
146
|
type: "decimal",
|
|
147
|
-
value:
|
|
147
|
+
value: nn(e.value, t)
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function xe(e, t) {
|
|
151
151
|
return t === 0 ? e : typeof e == "number" ? e / 10 ** t : {
|
|
152
152
|
kind: "exact_number",
|
|
153
153
|
type: "decimal",
|
|
154
|
-
value:
|
|
154
|
+
value: nn(e.value, `1e-${t}`)
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return typeof e == "number" ? t.format(e) :
|
|
157
|
+
function U(e, t) {
|
|
158
|
+
return typeof e == "number" ? t.format(e) : kr(e.value, t);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Tt(e) {
|
|
161
161
|
if (!e) return !1;
|
|
162
162
|
const t = e.toLowerCase().replace("_", "-");
|
|
163
163
|
return t === "en-in" || t.startsWith("en-in-");
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const n =
|
|
167
|
-
return r(1e12) ? { power: 12, suffix: "T" } : r(1e9) ? { power: 9, suffix: "B" } :
|
|
165
|
+
function vt(e, t) {
|
|
166
|
+
const n = G(e), r = (a) => typeof n == "number" ? n >= a : Gn(n.value, String(a)) >= 0;
|
|
167
|
+
return r(1e12) ? { power: 12, suffix: "T" } : r(1e9) ? { power: 9, suffix: "B" } : Tt(t) && r(1e7) ? { power: 7, suffix: "Cr" } : r(1e6) ? { power: 6, suffix: "M" } : Tt(t) && r(1e5) ? { power: 5, suffix: "L" } : r(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Ke(e, t) {
|
|
170
170
|
try {
|
|
171
|
-
const n =
|
|
172
|
-
return
|
|
171
|
+
const n = j(t);
|
|
172
|
+
return vt(e, n);
|
|
173
173
|
} catch {
|
|
174
|
-
return
|
|
174
|
+
return vt(e, "en-US");
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const un = 500, se = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
|
|
178
178
|
function N(e, t = {}) {
|
|
179
179
|
const n = `${e}|${JSON.stringify(t)}`;
|
|
180
|
-
let r =
|
|
181
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
180
|
+
let r = se.get(n);
|
|
181
|
+
return r || (r = new Intl.NumberFormat(e, t), se.size >= un && se.clear(), se.set(n, r)), r;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
let t =
|
|
183
|
+
function $r(e) {
|
|
184
|
+
let t = ce.get(e);
|
|
185
185
|
if (t === void 0) {
|
|
186
186
|
try {
|
|
187
187
|
N(e), t = !0;
|
|
188
188
|
} catch {
|
|
189
189
|
t = !1;
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
ce.size >= un && ce.clear(), ce.set(e, t);
|
|
192
192
|
}
|
|
193
193
|
return t;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return e &&
|
|
195
|
+
function j(e) {
|
|
196
|
+
return e && $r(e) ? e : "en-US";
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function nt(e, t) {
|
|
199
199
|
if (e == null || Number.isNaN(e))
|
|
200
200
|
return "";
|
|
201
|
-
const n =
|
|
201
|
+
const n = j(t == null ? void 0 : t.locale);
|
|
202
202
|
let r = e;
|
|
203
|
-
if (t != null && t.multiplyBy && (r =
|
|
204
|
-
const { power: i, suffix: o } =
|
|
205
|
-
r =
|
|
206
|
-
const s =
|
|
203
|
+
if (t != null && t.multiplyBy && (r = cn(r, t.multiplyBy)), t != null && t.useSuffix) {
|
|
204
|
+
const { power: i, suffix: o } = Ke(r, n);
|
|
205
|
+
r = xe(r, i);
|
|
206
|
+
const s = U(r, N(n, {
|
|
207
207
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
208
208
|
maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
|
|
209
209
|
useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
|
|
210
210
|
}));
|
|
211
211
|
return `${(t == null ? void 0 : t.prefix) ?? ""}${s}${o}${(t == null ? void 0 : t.suffix) ?? ""}`;
|
|
212
212
|
}
|
|
213
|
-
const a =
|
|
213
|
+
const a = U(r, N(n, {
|
|
214
214
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
215
215
|
maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
|
|
216
216
|
useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
|
|
217
217
|
}));
|
|
218
|
-
if (t != null && t.negativeInParentheses &&
|
|
218
|
+
if (t != null && t.negativeInParentheses && re(r)) {
|
|
219
219
|
const i = a.replace("-", "");
|
|
220
220
|
return `(${(t == null ? void 0 : t.prefix) ?? ""}${i}${(t == null ? void 0 : t.suffix) ?? ""})`;
|
|
221
221
|
}
|
|
222
222
|
return `${(t == null ? void 0 : t.prefix) ?? ""}${a}${(t == null ? void 0 : t.suffix) ?? ""}`;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function ln(e, t) {
|
|
225
225
|
if (e == null || Number.isNaN(e))
|
|
226
226
|
return "";
|
|
227
|
-
const n =
|
|
227
|
+
const n = j(t == null ? void 0 : t.locale), r = (t == null ? void 0 : t.currency) || "USD", a = re(e), i = !!(t != null && t.negativeInParentheses && a), o = i ? G(e) : e;
|
|
228
228
|
try {
|
|
229
229
|
if (t != null && t.useSuffix) {
|
|
230
|
-
const { power: c, suffix: u } =
|
|
230
|
+
const { power: c, suffix: u } = Ke(o, n), l = xe(o, c), m = `${U(l, N(n, {
|
|
231
231
|
style: "currency",
|
|
232
232
|
currency: r,
|
|
233
233
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
@@ -236,7 +236,7 @@ function on(e, t) {
|
|
|
236
236
|
}))}${u}`;
|
|
237
237
|
return i ? `(${m})` : m;
|
|
238
238
|
}
|
|
239
|
-
const s =
|
|
239
|
+
const s = U(o, N(n, {
|
|
240
240
|
style: "currency",
|
|
241
241
|
currency: r,
|
|
242
242
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
@@ -245,8 +245,8 @@ function on(e, t) {
|
|
|
245
245
|
}));
|
|
246
246
|
return i ? `(${s})` : s;
|
|
247
247
|
} catch {
|
|
248
|
-
const s =
|
|
249
|
-
|
|
248
|
+
const s = G(e), c = t != null && t.useSuffix ? Ke(s, n) : { power: 0, suffix: "" }, u = nt(
|
|
249
|
+
xe(s, c.power),
|
|
250
250
|
{
|
|
251
251
|
locale: n,
|
|
252
252
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
@@ -257,40 +257,40 @@ function on(e, t) {
|
|
|
257
257
|
return a ? t != null && t.negativeInParentheses ? `(${l})` : `-${l}` : l;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function mn(e, t) {
|
|
261
261
|
if (e == null || Number.isNaN(e))
|
|
262
262
|
return "";
|
|
263
|
-
const n =
|
|
264
|
-
return
|
|
263
|
+
const n = j(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? xe(e, 2) : e;
|
|
264
|
+
return U(a, N(n, {
|
|
265
265
|
style: "percent",
|
|
266
266
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
267
267
|
maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
|
|
268
268
|
useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
|
|
269
269
|
}));
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function fn(e, t) {
|
|
272
272
|
if (e == null || Number.isNaN(e))
|
|
273
273
|
return "";
|
|
274
|
-
const n =
|
|
275
|
-
return
|
|
274
|
+
const n = j(t == null ? void 0 : t.locale);
|
|
275
|
+
return U(e, N(n, {
|
|
276
276
|
notation: "scientific",
|
|
277
277
|
minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
|
|
278
278
|
maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2
|
|
279
279
|
}));
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
const n = t ?? "auto", r = n === "never" ?
|
|
281
|
+
function Nr(e, t) {
|
|
282
|
+
const n = t ?? "auto", r = n === "never" ? G(e) : e, a = !re(r) && (n === "always" || n === "exceptZero" && !_r(r));
|
|
283
283
|
return { value: r, plus: a };
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Vs(e) {
|
|
286
286
|
if (!e || !("signDisplay" in e)) return e;
|
|
287
287
|
const { signDisplay: t, ...n } = e;
|
|
288
288
|
return n;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function rt(e, t) {
|
|
291
291
|
if (e == null || Number.isNaN(e))
|
|
292
292
|
return "";
|
|
293
|
-
const n = t.scale === void 0 ? e :
|
|
293
|
+
const n = t.scale === void 0 ? e : cn(e, t.scale), r = Nr(n, t.signDisplay), a = r.value, i = r.plus ? "+" : "", o = t.negativeStyle === "parentheses" && re(a), s = o ? G(a) : a, c = {
|
|
294
294
|
style: t.type === "number" ? "decimal" : t.type,
|
|
295
295
|
locale: t.locale,
|
|
296
296
|
currency: t.currency,
|
|
@@ -303,39 +303,39 @@ function et(e, t) {
|
|
|
303
303
|
let u;
|
|
304
304
|
switch (t.type) {
|
|
305
305
|
case "currency":
|
|
306
|
-
u =
|
|
306
|
+
u = ln(s, c);
|
|
307
307
|
break;
|
|
308
308
|
case "percent":
|
|
309
|
-
u =
|
|
309
|
+
u = mn(s, c);
|
|
310
310
|
break;
|
|
311
311
|
case "scientific":
|
|
312
|
-
u =
|
|
312
|
+
u = fn(s, c);
|
|
313
313
|
break;
|
|
314
314
|
default:
|
|
315
|
-
u =
|
|
315
|
+
u = nt(s, c);
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
const l = `${t.prefix ?? ""}${i}${u}${t.suffix ?? ""}`;
|
|
319
319
|
return o ? `(${l})` : l;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
return t.type === "duration" ? e == null ? "" :
|
|
321
|
+
function Bs(e, t) {
|
|
322
|
+
return t.type === "duration" ? e == null ? "" : sn(e, t) : rt(e, t);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Er(e, t, n = "en-US") {
|
|
325
325
|
if (e == null || typeof e == "number" && isNaN(e))
|
|
326
326
|
return "";
|
|
327
327
|
if ((t == null ? void 0 : t.style) === "duration")
|
|
328
|
-
return
|
|
328
|
+
return sn(e, {
|
|
329
329
|
...t.duration,
|
|
330
330
|
prefix: t.prefix,
|
|
331
331
|
suffix: t.suffix,
|
|
332
332
|
negativeStyle: t.negativeStyle
|
|
333
333
|
});
|
|
334
|
-
const r =
|
|
334
|
+
const r = j((t == null ? void 0 : t.locale) || n), a = (t == null ? void 0 : t.style) || "decimal", i = a === "decimal" ? "number" : a;
|
|
335
335
|
return i === "currency" && N(r, {
|
|
336
336
|
style: "currency",
|
|
337
337
|
currency: (t == null ? void 0 : t.currency) || "USD"
|
|
338
|
-
}),
|
|
338
|
+
}), rt(e, {
|
|
339
339
|
type: i,
|
|
340
340
|
locale: r,
|
|
341
341
|
currency: i === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
|
|
@@ -350,7 +350,7 @@ function Sr(e, t, n = "en-US") {
|
|
|
350
350
|
suffix: t == null ? void 0 : t.suffix
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Gs(e, t, n) {
|
|
354
354
|
const r = {
|
|
355
355
|
style: t === "currency" ? "currency" : t === "percent" ? "percent" : "decimal",
|
|
356
356
|
locale: n == null ? void 0 : n.locale,
|
|
@@ -365,13 +365,13 @@ function Ws(e, t, n) {
|
|
|
365
365
|
};
|
|
366
366
|
switch (t) {
|
|
367
367
|
case "currency":
|
|
368
|
-
return
|
|
368
|
+
return ln(e, r);
|
|
369
369
|
case "percent":
|
|
370
|
-
return
|
|
370
|
+
return mn(e, r);
|
|
371
371
|
case "scientific":
|
|
372
|
-
return
|
|
372
|
+
return fn(e, r);
|
|
373
373
|
default:
|
|
374
|
-
return
|
|
374
|
+
return nt(e, r);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
function w(e) {
|
|
@@ -381,32 +381,32 @@ function w(e) {
|
|
|
381
381
|
function E(e, t) {
|
|
382
382
|
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
385
|
-
let
|
|
386
|
-
function
|
|
387
|
-
return
|
|
384
|
+
const dn = 6048e5, Or = 864e5, hn = 6e4, gn = 36e5, Qs = 525600, ue = 43200, bt = 1440;
|
|
385
|
+
let Ir = {};
|
|
386
|
+
function q() {
|
|
387
|
+
return Ir;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Q(e, t) {
|
|
390
390
|
var s, c, u, l;
|
|
391
|
-
const n =
|
|
391
|
+
const n = q(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = w(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
|
|
392
392
|
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function De(e) {
|
|
395
|
+
return Q(e, { weekStartsOn: 1 });
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function yn(e) {
|
|
398
398
|
const t = w(e), n = t.getFullYear(), r = E(e, 0);
|
|
399
399
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
400
|
-
const a =
|
|
400
|
+
const a = De(r), i = E(e, 0);
|
|
401
401
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
402
|
-
const o =
|
|
402
|
+
const o = De(i);
|
|
403
403
|
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function xt(e) {
|
|
406
406
|
const t = w(e);
|
|
407
407
|
return t.setHours(0, 0, 0, 0), t;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Se(e) {
|
|
410
410
|
const t = w(e), n = new Date(
|
|
411
411
|
Date.UTC(
|
|
412
412
|
t.getFullYear(),
|
|
@@ -420,78 +420,78 @@ function De(e) {
|
|
|
420
420
|
);
|
|
421
421
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const n =
|
|
425
|
-
return Math.round((a - i) /
|
|
423
|
+
function Cr(e, t) {
|
|
424
|
+
const n = xt(e), r = xt(t), a = +n - Se(n), i = +r - Se(r);
|
|
425
|
+
return Math.round((a - i) / Or);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const t =
|
|
429
|
-
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0),
|
|
427
|
+
function Fr(e) {
|
|
428
|
+
const t = yn(e), n = E(e, 0);
|
|
429
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), De(n);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function ge(e, t) {
|
|
432
432
|
const n = w(e), r = w(t), a = n.getTime() - r.getTime();
|
|
433
433
|
return a < 0 ? -1 : a > 0 ? 1 : a;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Pr(e) {
|
|
436
436
|
return E(e, Date.now());
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function Yr(e) {
|
|
439
439
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
if (!
|
|
441
|
+
function Ar(e) {
|
|
442
|
+
if (!Yr(e) && typeof e != "number")
|
|
443
443
|
return !1;
|
|
444
444
|
const t = w(e);
|
|
445
445
|
return !isNaN(Number(t));
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function zr(e, t) {
|
|
448
448
|
const n = w(e), r = w(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
|
|
449
449
|
return a * 12 + i;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Rr(e) {
|
|
452
452
|
return (t) => {
|
|
453
453
|
const r = (e ? Math[e] : Math.trunc)(t);
|
|
454
454
|
return r === 0 ? 0 : r;
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ur(e, t) {
|
|
458
458
|
return +w(e) - +w(t);
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Lr(e) {
|
|
461
461
|
const t = w(e);
|
|
462
462
|
return t.setHours(23, 59, 59, 999), t;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Wr(e) {
|
|
465
465
|
const t = w(e), n = t.getMonth();
|
|
466
466
|
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Hr(e) {
|
|
469
469
|
const t = w(e);
|
|
470
|
-
return +
|
|
470
|
+
return +Lr(t) == +Wr(t);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
const n = w(e), r = w(t), a =
|
|
474
|
-
|
|
472
|
+
function jr(e, t) {
|
|
473
|
+
const n = w(e), r = w(t), a = ge(n, r), i = Math.abs(
|
|
474
|
+
zr(n, r)
|
|
475
475
|
);
|
|
476
476
|
let o;
|
|
477
477
|
if (i < 1)
|
|
478
478
|
o = 0;
|
|
479
479
|
else {
|
|
480
480
|
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
|
|
481
|
-
let s =
|
|
482
|
-
|
|
481
|
+
let s = ge(n, r) === -a;
|
|
482
|
+
Hr(w(e)) && i === 1 && ge(e, r) === 1 && (s = !1), o = a * (i - Number(s));
|
|
483
483
|
}
|
|
484
484
|
return o === 0 ? 0 : o;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const r =
|
|
488
|
-
return
|
|
486
|
+
function qr(e, t, n) {
|
|
487
|
+
const r = Ur(e, t) / 1e3;
|
|
488
|
+
return Rr(n == null ? void 0 : n.roundingMethod)(r);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Zr(e) {
|
|
491
491
|
const t = w(e), n = E(e, 0);
|
|
492
492
|
return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
493
493
|
}
|
|
494
|
-
const
|
|
494
|
+
const Xr = {
|
|
495
495
|
lessThanXSeconds: {
|
|
496
496
|
one: "less than a second",
|
|
497
497
|
other: "less than {{count}} seconds"
|
|
@@ -553,54 +553,54 @@ const Lr = {
|
|
|
553
553
|
one: "almost 1 year",
|
|
554
554
|
other: "almost {{count}} years"
|
|
555
555
|
}
|
|
556
|
-
},
|
|
556
|
+
}, Kr = (e, t, n) => {
|
|
557
557
|
let r;
|
|
558
|
-
const a =
|
|
558
|
+
const a = Xr[e];
|
|
559
559
|
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function Fe(e) {
|
|
562
562
|
return (t = {}) => {
|
|
563
563
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
564
564
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Vr = {
|
|
568
568
|
full: "EEEE, MMMM do, y",
|
|
569
569
|
long: "MMMM do, y",
|
|
570
570
|
medium: "MMM d, y",
|
|
571
571
|
short: "MM/dd/yyyy"
|
|
572
|
-
},
|
|
572
|
+
}, Br = {
|
|
573
573
|
full: "h:mm:ss a zzzz",
|
|
574
574
|
long: "h:mm:ss a z",
|
|
575
575
|
medium: "h:mm:ss a",
|
|
576
576
|
short: "h:mm a"
|
|
577
|
-
},
|
|
577
|
+
}, Gr = {
|
|
578
578
|
full: "{{date}} 'at' {{time}}",
|
|
579
579
|
long: "{{date}} 'at' {{time}}",
|
|
580
580
|
medium: "{{date}}, {{time}}",
|
|
581
581
|
short: "{{date}}, {{time}}"
|
|
582
|
-
},
|
|
583
|
-
date:
|
|
584
|
-
formats:
|
|
582
|
+
}, Qr = {
|
|
583
|
+
date: Fe({
|
|
584
|
+
formats: Vr,
|
|
585
585
|
defaultWidth: "full"
|
|
586
586
|
}),
|
|
587
|
-
time:
|
|
588
|
-
formats:
|
|
587
|
+
time: Fe({
|
|
588
|
+
formats: Br,
|
|
589
589
|
defaultWidth: "full"
|
|
590
590
|
}),
|
|
591
|
-
dateTime:
|
|
592
|
-
formats:
|
|
591
|
+
dateTime: Fe({
|
|
592
|
+
formats: Gr,
|
|
593
593
|
defaultWidth: "full"
|
|
594
594
|
})
|
|
595
|
-
},
|
|
595
|
+
}, Jr = {
|
|
596
596
|
lastWeek: "'last' eeee 'at' p",
|
|
597
597
|
yesterday: "'yesterday at' p",
|
|
598
598
|
today: "'today at' p",
|
|
599
599
|
tomorrow: "'tomorrow at' p",
|
|
600
600
|
nextWeek: "eeee 'at' p",
|
|
601
601
|
other: "P"
|
|
602
|
-
},
|
|
603
|
-
function
|
|
602
|
+
}, ea = (e, t, n, r) => Jr[e];
|
|
603
|
+
function Z(e) {
|
|
604
604
|
return (t, n) => {
|
|
605
605
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
606
606
|
let a;
|
|
@@ -615,15 +615,15 @@ function q(e) {
|
|
|
615
615
|
return a[i];
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const ta = {
|
|
619
619
|
narrow: ["B", "A"],
|
|
620
620
|
abbreviated: ["BC", "AD"],
|
|
621
621
|
wide: ["Before Christ", "Anno Domini"]
|
|
622
|
-
},
|
|
622
|
+
}, na = {
|
|
623
623
|
narrow: ["1", "2", "3", "4"],
|
|
624
624
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
625
625
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
626
|
-
},
|
|
626
|
+
}, ra = {
|
|
627
627
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
628
628
|
abbreviated: [
|
|
629
629
|
"Jan",
|
|
@@ -653,7 +653,7 @@ const Br = {
|
|
|
653
653
|
"November",
|
|
654
654
|
"December"
|
|
655
655
|
]
|
|
656
|
-
},
|
|
656
|
+
}, aa = {
|
|
657
657
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
658
658
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
659
659
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -666,7 +666,7 @@ const Br = {
|
|
|
666
666
|
"Friday",
|
|
667
667
|
"Saturday"
|
|
668
668
|
]
|
|
669
|
-
},
|
|
669
|
+
}, ia = {
|
|
670
670
|
narrow: {
|
|
671
671
|
am: "a",
|
|
672
672
|
pm: "p",
|
|
@@ -697,7 +697,7 @@ const Br = {
|
|
|
697
697
|
evening: "evening",
|
|
698
698
|
night: "night"
|
|
699
699
|
}
|
|
700
|
-
},
|
|
700
|
+
}, oa = {
|
|
701
701
|
narrow: {
|
|
702
702
|
am: "a",
|
|
703
703
|
pm: "p",
|
|
@@ -728,7 +728,7 @@ const Br = {
|
|
|
728
728
|
evening: "in the evening",
|
|
729
729
|
night: "at night"
|
|
730
730
|
}
|
|
731
|
-
},
|
|
731
|
+
}, sa = (e, t) => {
|
|
732
732
|
const n = Number(e), r = n % 100;
|
|
733
733
|
if (r > 20 || r < 10)
|
|
734
734
|
switch (r % 10) {
|
|
@@ -740,40 +740,40 @@ const Br = {
|
|
|
740
740
|
return n + "rd";
|
|
741
741
|
}
|
|
742
742
|
return n + "th";
|
|
743
|
-
},
|
|
744
|
-
ordinalNumber:
|
|
745
|
-
era:
|
|
746
|
-
values:
|
|
743
|
+
}, ca = {
|
|
744
|
+
ordinalNumber: sa,
|
|
745
|
+
era: Z({
|
|
746
|
+
values: ta,
|
|
747
747
|
defaultWidth: "wide"
|
|
748
748
|
}),
|
|
749
|
-
quarter:
|
|
750
|
-
values:
|
|
749
|
+
quarter: Z({
|
|
750
|
+
values: na,
|
|
751
751
|
defaultWidth: "wide",
|
|
752
752
|
argumentCallback: (e) => e - 1
|
|
753
753
|
}),
|
|
754
|
-
month:
|
|
755
|
-
values:
|
|
754
|
+
month: Z({
|
|
755
|
+
values: ra,
|
|
756
756
|
defaultWidth: "wide"
|
|
757
757
|
}),
|
|
758
|
-
day:
|
|
759
|
-
values:
|
|
758
|
+
day: Z({
|
|
759
|
+
values: aa,
|
|
760
760
|
defaultWidth: "wide"
|
|
761
761
|
}),
|
|
762
|
-
dayPeriod:
|
|
763
|
-
values:
|
|
762
|
+
dayPeriod: Z({
|
|
763
|
+
values: ia,
|
|
764
764
|
defaultWidth: "wide",
|
|
765
|
-
formattingValues:
|
|
765
|
+
formattingValues: oa,
|
|
766
766
|
defaultFormattingWidth: "wide"
|
|
767
767
|
})
|
|
768
768
|
};
|
|
769
|
-
function
|
|
769
|
+
function X(e) {
|
|
770
770
|
return (t, n = {}) => {
|
|
771
771
|
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
|
|
772
772
|
if (!i)
|
|
773
773
|
return null;
|
|
774
|
-
const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
774
|
+
const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? la(s, (f) => f.test(o)) : (
|
|
775
775
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
776
|
-
|
|
776
|
+
ua(s, (f) => f.test(o))
|
|
777
777
|
);
|
|
778
778
|
let u;
|
|
779
779
|
u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
|
|
@@ -784,17 +784,17 @@ function Z(e) {
|
|
|
784
784
|
return { value: u, rest: l };
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function ua(e, t) {
|
|
788
788
|
for (const n in e)
|
|
789
789
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
790
790
|
return n;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function la(e, t) {
|
|
793
793
|
for (let n = 0; n < e.length; n++)
|
|
794
794
|
if (t(e[n]))
|
|
795
795
|
return n;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function ma(e) {
|
|
798
798
|
return (t, n = {}) => {
|
|
799
799
|
const r = t.match(e.matchPattern);
|
|
800
800
|
if (!r) return null;
|
|
@@ -806,23 +806,23 @@ function ia(e) {
|
|
|
806
806
|
return { value: o, rest: s };
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
|
-
const
|
|
809
|
+
const fa = /^(\d+)(th|st|nd|rd)?/i, da = /\d+/i, ha = {
|
|
810
810
|
narrow: /^(b|a)/i,
|
|
811
811
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
812
812
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
813
|
-
},
|
|
813
|
+
}, ga = {
|
|
814
814
|
any: [/^b/i, /^(a|c)/i]
|
|
815
|
-
},
|
|
815
|
+
}, ya = {
|
|
816
816
|
narrow: /^[1234]/i,
|
|
817
817
|
abbreviated: /^q[1234]/i,
|
|
818
818
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
819
|
-
},
|
|
819
|
+
}, wa = {
|
|
820
820
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
821
|
-
},
|
|
821
|
+
}, pa = {
|
|
822
822
|
narrow: /^[jfmasond]/i,
|
|
823
823
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
824
824
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
825
|
-
},
|
|
825
|
+
}, Ta = {
|
|
826
826
|
narrow: [
|
|
827
827
|
/^j/i,
|
|
828
828
|
/^f/i,
|
|
@@ -851,18 +851,18 @@ const oa = /^(\d+)(th|st|nd|rd)?/i, sa = /\d+/i, ca = {
|
|
|
851
851
|
/^n/i,
|
|
852
852
|
/^d/i
|
|
853
853
|
]
|
|
854
|
-
},
|
|
854
|
+
}, va = {
|
|
855
855
|
narrow: /^[smtwf]/i,
|
|
856
856
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
857
857
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
858
858
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
859
|
-
},
|
|
859
|
+
}, ba = {
|
|
860
860
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
861
861
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
862
|
-
},
|
|
862
|
+
}, xa = {
|
|
863
863
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
864
864
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
865
|
-
},
|
|
865
|
+
}, Da = {
|
|
866
866
|
any: {
|
|
867
867
|
am: /^a/i,
|
|
868
868
|
pm: /^p/i,
|
|
@@ -873,86 +873,86 @@ const oa = /^(\d+)(th|st|nd|rd)?/i, sa = /\d+/i, ca = {
|
|
|
873
873
|
evening: /evening/i,
|
|
874
874
|
night: /night/i
|
|
875
875
|
}
|
|
876
|
-
},
|
|
877
|
-
ordinalNumber:
|
|
878
|
-
matchPattern:
|
|
879
|
-
parsePattern:
|
|
876
|
+
}, Sa = {
|
|
877
|
+
ordinalNumber: ma({
|
|
878
|
+
matchPattern: fa,
|
|
879
|
+
parsePattern: da,
|
|
880
880
|
valueCallback: (e) => parseInt(e, 10)
|
|
881
881
|
}),
|
|
882
|
-
era:
|
|
883
|
-
matchPatterns:
|
|
882
|
+
era: X({
|
|
883
|
+
matchPatterns: ha,
|
|
884
884
|
defaultMatchWidth: "wide",
|
|
885
|
-
parsePatterns:
|
|
885
|
+
parsePatterns: ga,
|
|
886
886
|
defaultParseWidth: "any"
|
|
887
887
|
}),
|
|
888
|
-
quarter:
|
|
889
|
-
matchPatterns:
|
|
888
|
+
quarter: X({
|
|
889
|
+
matchPatterns: ya,
|
|
890
890
|
defaultMatchWidth: "wide",
|
|
891
|
-
parsePatterns:
|
|
891
|
+
parsePatterns: wa,
|
|
892
892
|
defaultParseWidth: "any",
|
|
893
893
|
valueCallback: (e) => e + 1
|
|
894
894
|
}),
|
|
895
|
-
month:
|
|
896
|
-
matchPatterns:
|
|
895
|
+
month: X({
|
|
896
|
+
matchPatterns: pa,
|
|
897
897
|
defaultMatchWidth: "wide",
|
|
898
|
-
parsePatterns:
|
|
898
|
+
parsePatterns: Ta,
|
|
899
899
|
defaultParseWidth: "any"
|
|
900
900
|
}),
|
|
901
|
-
day:
|
|
902
|
-
matchPatterns:
|
|
901
|
+
day: X({
|
|
902
|
+
matchPatterns: va,
|
|
903
903
|
defaultMatchWidth: "wide",
|
|
904
|
-
parsePatterns:
|
|
904
|
+
parsePatterns: ba,
|
|
905
905
|
defaultParseWidth: "any"
|
|
906
906
|
}),
|
|
907
|
-
dayPeriod:
|
|
908
|
-
matchPatterns:
|
|
907
|
+
dayPeriod: X({
|
|
908
|
+
matchPatterns: xa,
|
|
909
909
|
defaultMatchWidth: "any",
|
|
910
|
-
parsePatterns:
|
|
910
|
+
parsePatterns: Da,
|
|
911
911
|
defaultParseWidth: "any"
|
|
912
912
|
})
|
|
913
|
-
},
|
|
913
|
+
}, wn = {
|
|
914
914
|
code: "en-US",
|
|
915
|
-
formatDistance:
|
|
916
|
-
formatLong:
|
|
917
|
-
formatRelative:
|
|
918
|
-
localize:
|
|
919
|
-
match:
|
|
915
|
+
formatDistance: Kr,
|
|
916
|
+
formatLong: Qr,
|
|
917
|
+
formatRelative: ea,
|
|
918
|
+
localize: ca,
|
|
919
|
+
match: Sa,
|
|
920
920
|
options: {
|
|
921
921
|
weekStartsOn: 0,
|
|
922
922
|
firstWeekContainsDate: 1
|
|
923
923
|
}
|
|
924
924
|
};
|
|
925
|
-
function
|
|
925
|
+
function Ma(e) {
|
|
926
926
|
const t = w(e);
|
|
927
|
-
return
|
|
927
|
+
return Cr(t, Zr(t)) + 1;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
const t = w(e), n = +
|
|
931
|
-
return Math.round(n /
|
|
929
|
+
function ka(e) {
|
|
930
|
+
const t = w(e), n = +De(t) - +Fr(t);
|
|
931
|
+
return Math.round(n / dn) + 1;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function pn(e, t) {
|
|
934
934
|
var l, f, m, d;
|
|
935
|
-
const n = w(e), r = n.getFullYear(), a =
|
|
935
|
+
const n = w(e), r = n.getFullYear(), a = q(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (l = t == null ? void 0 : t.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((d = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = E(e, 0);
|
|
936
936
|
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
937
|
-
const s =
|
|
937
|
+
const s = Q(o, t), c = E(e, 0);
|
|
938
938
|
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
939
|
-
const u =
|
|
939
|
+
const u = Q(c, t);
|
|
940
940
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function _a(e, t) {
|
|
943
943
|
var s, c, u, l;
|
|
944
|
-
const n =
|
|
945
|
-
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0),
|
|
944
|
+
const n = q(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = pn(e, t), i = E(e, 0);
|
|
945
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), Q(i, t);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const n = w(e), r = +
|
|
949
|
-
return Math.round(r /
|
|
947
|
+
function $a(e, t) {
|
|
948
|
+
const n = w(e), r = +Q(n, t) - +_a(n, t);
|
|
949
|
+
return Math.round(r / dn) + 1;
|
|
950
950
|
}
|
|
951
951
|
function y(e, t) {
|
|
952
952
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
953
953
|
return n + r;
|
|
954
954
|
}
|
|
955
|
-
const
|
|
955
|
+
const $ = {
|
|
956
956
|
// Year
|
|
957
957
|
y(e, t) {
|
|
958
958
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -1006,14 +1006,14 @@ const _ = {
|
|
|
1006
1006
|
);
|
|
1007
1007
|
return y(a, t.length);
|
|
1008
1008
|
}
|
|
1009
|
-
},
|
|
1009
|
+
}, F = {
|
|
1010
1010
|
midnight: "midnight",
|
|
1011
1011
|
noon: "noon",
|
|
1012
1012
|
morning: "morning",
|
|
1013
1013
|
afternoon: "afternoon",
|
|
1014
1014
|
evening: "evening",
|
|
1015
1015
|
night: "night"
|
|
1016
|
-
},
|
|
1016
|
+
}, Dt = {
|
|
1017
1017
|
// Era
|
|
1018
1018
|
G: function(e, t, n) {
|
|
1019
1019
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1035,11 +1035,11 @@ const _ = {
|
|
|
1035
1035
|
const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
1036
1036
|
return n.ordinalNumber(a, { unit: "year" });
|
|
1037
1037
|
}
|
|
1038
|
-
return
|
|
1038
|
+
return $.y(e, t);
|
|
1039
1039
|
},
|
|
1040
1040
|
// Local week-numbering year
|
|
1041
1041
|
Y: function(e, t, n, r) {
|
|
1042
|
-
const a =
|
|
1042
|
+
const a = pn(e, r), i = a > 0 ? a : 1 - a;
|
|
1043
1043
|
if (t === "YY") {
|
|
1044
1044
|
const o = i % 100;
|
|
1045
1045
|
return y(o, 2);
|
|
@@ -1048,7 +1048,7 @@ const _ = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
// ISO week-numbering year
|
|
1050
1050
|
R: function(e, t) {
|
|
1051
|
-
const n =
|
|
1051
|
+
const n = yn(e);
|
|
1052
1052
|
return y(n, t.length);
|
|
1053
1053
|
},
|
|
1054
1054
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1126,7 +1126,7 @@ const _ = {
|
|
|
1126
1126
|
switch (t) {
|
|
1127
1127
|
case "M":
|
|
1128
1128
|
case "MM":
|
|
1129
|
-
return
|
|
1129
|
+
return $.M(e, t);
|
|
1130
1130
|
case "Mo":
|
|
1131
1131
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
1132
1132
|
case "MMM":
|
|
@@ -1171,21 +1171,21 @@ const _ = {
|
|
|
1171
1171
|
},
|
|
1172
1172
|
// Local week of year
|
|
1173
1173
|
w: function(e, t, n, r) {
|
|
1174
|
-
const a =
|
|
1174
|
+
const a = $a(e, r);
|
|
1175
1175
|
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : y(a, t.length);
|
|
1176
1176
|
},
|
|
1177
1177
|
// ISO week of year
|
|
1178
1178
|
I: function(e, t, n) {
|
|
1179
|
-
const r =
|
|
1179
|
+
const r = ka(e);
|
|
1180
1180
|
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : y(r, t.length);
|
|
1181
1181
|
},
|
|
1182
1182
|
// Day of the month
|
|
1183
1183
|
d: function(e, t, n) {
|
|
1184
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
1184
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : $.d(e, t);
|
|
1185
1185
|
},
|
|
1186
1186
|
// Day of year
|
|
1187
1187
|
D: function(e, t, n) {
|
|
1188
|
-
const r =
|
|
1188
|
+
const r = Ma(e);
|
|
1189
1189
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : y(r, t.length);
|
|
1190
1190
|
},
|
|
1191
1191
|
// Day of week
|
|
@@ -1348,7 +1348,7 @@ const _ = {
|
|
|
1348
1348
|
b: function(e, t, n) {
|
|
1349
1349
|
const r = e.getHours();
|
|
1350
1350
|
let a;
|
|
1351
|
-
switch (r === 12 ? a =
|
|
1351
|
+
switch (r === 12 ? a = F.noon : r === 0 ? a = F.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
|
|
1352
1352
|
case "b":
|
|
1353
1353
|
case "bb":
|
|
1354
1354
|
return n.dayPeriod(a, {
|
|
@@ -1377,7 +1377,7 @@ const _ = {
|
|
|
1377
1377
|
B: function(e, t, n) {
|
|
1378
1378
|
const r = e.getHours();
|
|
1379
1379
|
let a;
|
|
1380
|
-
switch (r >= 17 ? a =
|
|
1380
|
+
switch (r >= 17 ? a = F.evening : r >= 12 ? a = F.afternoon : r >= 4 ? a = F.morning : a = F.night, t) {
|
|
1381
1381
|
case "B":
|
|
1382
1382
|
case "BB":
|
|
1383
1383
|
case "BBB":
|
|
@@ -1404,11 +1404,11 @@ const _ = {
|
|
|
1404
1404
|
let r = e.getHours() % 12;
|
|
1405
1405
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1406
1406
|
}
|
|
1407
|
-
return
|
|
1407
|
+
return $.h(e, t);
|
|
1408
1408
|
},
|
|
1409
1409
|
// Hour [0-23]
|
|
1410
1410
|
H: function(e, t, n) {
|
|
1411
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
1411
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : $.H(e, t);
|
|
1412
1412
|
},
|
|
1413
1413
|
// Hour [0-11]
|
|
1414
1414
|
K: function(e, t, n) {
|
|
@@ -1422,15 +1422,15 @@ const _ = {
|
|
|
1422
1422
|
},
|
|
1423
1423
|
// Minute
|
|
1424
1424
|
m: function(e, t, n) {
|
|
1425
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
1425
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : $.m(e, t);
|
|
1426
1426
|
},
|
|
1427
1427
|
// Second
|
|
1428
1428
|
s: function(e, t, n) {
|
|
1429
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
1429
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : $.s(e, t);
|
|
1430
1430
|
},
|
|
1431
1431
|
// Fraction of second
|
|
1432
1432
|
S: function(e, t) {
|
|
1433
|
-
return
|
|
1433
|
+
return $.S(e, t);
|
|
1434
1434
|
},
|
|
1435
1435
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1436
1436
|
X: function(e, t, n) {
|
|
@@ -1439,14 +1439,14 @@ const _ = {
|
|
|
1439
1439
|
return "Z";
|
|
1440
1440
|
switch (t) {
|
|
1441
1441
|
case "X":
|
|
1442
|
-
return
|
|
1442
|
+
return Mt(r);
|
|
1443
1443
|
case "XXXX":
|
|
1444
1444
|
case "XX":
|
|
1445
|
-
return
|
|
1445
|
+
return I(r);
|
|
1446
1446
|
case "XXXXX":
|
|
1447
1447
|
case "XXX":
|
|
1448
1448
|
default:
|
|
1449
|
-
return
|
|
1449
|
+
return I(r, ":");
|
|
1450
1450
|
}
|
|
1451
1451
|
},
|
|
1452
1452
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1454,14 +1454,14 @@ const _ = {
|
|
|
1454
1454
|
const r = e.getTimezoneOffset();
|
|
1455
1455
|
switch (t) {
|
|
1456
1456
|
case "x":
|
|
1457
|
-
return
|
|
1457
|
+
return Mt(r);
|
|
1458
1458
|
case "xxxx":
|
|
1459
1459
|
case "xx":
|
|
1460
|
-
return
|
|
1460
|
+
return I(r);
|
|
1461
1461
|
case "xxxxx":
|
|
1462
1462
|
case "xxx":
|
|
1463
1463
|
default:
|
|
1464
|
-
return
|
|
1464
|
+
return I(r, ":");
|
|
1465
1465
|
}
|
|
1466
1466
|
},
|
|
1467
1467
|
// Timezone (GMT)
|
|
@@ -1471,10 +1471,10 @@ const _ = {
|
|
|
1471
1471
|
case "O":
|
|
1472
1472
|
case "OO":
|
|
1473
1473
|
case "OOO":
|
|
1474
|
-
return "GMT" +
|
|
1474
|
+
return "GMT" + St(r, ":");
|
|
1475
1475
|
case "OOOO":
|
|
1476
1476
|
default:
|
|
1477
|
-
return "GMT" +
|
|
1477
|
+
return "GMT" + I(r, ":");
|
|
1478
1478
|
}
|
|
1479
1479
|
},
|
|
1480
1480
|
// Timezone (specific non-location)
|
|
@@ -1484,10 +1484,10 @@ const _ = {
|
|
|
1484
1484
|
case "z":
|
|
1485
1485
|
case "zz":
|
|
1486
1486
|
case "zzz":
|
|
1487
|
-
return "GMT" +
|
|
1487
|
+
return "GMT" + St(r, ":");
|
|
1488
1488
|
case "zzzz":
|
|
1489
1489
|
default:
|
|
1490
|
-
return "GMT" +
|
|
1490
|
+
return "GMT" + I(r, ":");
|
|
1491
1491
|
}
|
|
1492
1492
|
},
|
|
1493
1493
|
// Seconds timestamp
|
|
@@ -1501,18 +1501,18 @@ const _ = {
|
|
|
1501
1501
|
return y(r, t.length);
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
|
-
function
|
|
1504
|
+
function St(e, t = "") {
|
|
1505
1505
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
|
|
1506
1506
|
return i === 0 ? n + String(a) : n + String(a) + t + y(i, 2);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + y(Math.abs(e) / 60, 2) :
|
|
1508
|
+
function Mt(e, t) {
|
|
1509
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + y(Math.abs(e) / 60, 2) : I(e, t);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function I(e, t = "") {
|
|
1512
1512
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = y(Math.trunc(r / 60), 2), i = y(r % 60, 2);
|
|
1513
1513
|
return n + a + t + i;
|
|
1514
1514
|
}
|
|
1515
|
-
const
|
|
1515
|
+
const kt = (e, t) => {
|
|
1516
1516
|
switch (e) {
|
|
1517
1517
|
case "P":
|
|
1518
1518
|
return t.date({ width: "short" });
|
|
@@ -1524,7 +1524,7 @@ const bt = (e, t) => {
|
|
|
1524
1524
|
default:
|
|
1525
1525
|
return t.date({ width: "full" });
|
|
1526
1526
|
}
|
|
1527
|
-
},
|
|
1527
|
+
}, Tn = (e, t) => {
|
|
1528
1528
|
switch (e) {
|
|
1529
1529
|
case "p":
|
|
1530
1530
|
return t.time({ width: "short" });
|
|
@@ -1536,10 +1536,10 @@ const bt = (e, t) => {
|
|
|
1536
1536
|
default:
|
|
1537
1537
|
return t.time({ width: "full" });
|
|
1538
1538
|
}
|
|
1539
|
-
},
|
|
1539
|
+
}, Na = (e, t) => {
|
|
1540
1540
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1541
1541
|
if (!a)
|
|
1542
|
-
return
|
|
1542
|
+
return kt(e, t);
|
|
1543
1543
|
let i;
|
|
1544
1544
|
switch (r) {
|
|
1545
1545
|
case "P":
|
|
@@ -1556,51 +1556,51 @@ const bt = (e, t) => {
|
|
|
1556
1556
|
i = t.dateTime({ width: "full" });
|
|
1557
1557
|
break;
|
|
1558
1558
|
}
|
|
1559
|
-
return i.replace("{{date}}",
|
|
1560
|
-
},
|
|
1561
|
-
p:
|
|
1562
|
-
P:
|
|
1563
|
-
},
|
|
1564
|
-
function
|
|
1565
|
-
return
|
|
1566
|
-
}
|
|
1567
|
-
function
|
|
1568
|
-
return
|
|
1569
|
-
}
|
|
1570
|
-
function
|
|
1571
|
-
const r =
|
|
1572
|
-
if (console.warn(r),
|
|
1573
|
-
}
|
|
1574
|
-
function
|
|
1559
|
+
return i.replace("{{date}}", kt(r, t)).replace("{{time}}", Tn(a, t));
|
|
1560
|
+
}, Ea = {
|
|
1561
|
+
p: Tn,
|
|
1562
|
+
P: Na
|
|
1563
|
+
}, Oa = /^D+$/, Ia = /^Y+$/, Ca = ["D", "DD", "YY", "YYYY"];
|
|
1564
|
+
function Fa(e) {
|
|
1565
|
+
return Oa.test(e);
|
|
1566
|
+
}
|
|
1567
|
+
function Pa(e) {
|
|
1568
|
+
return Ia.test(e);
|
|
1569
|
+
}
|
|
1570
|
+
function Ya(e, t, n) {
|
|
1571
|
+
const r = Aa(e, t, n);
|
|
1572
|
+
if (console.warn(r), Ca.includes(e)) throw new RangeError(r);
|
|
1573
|
+
}
|
|
1574
|
+
function Aa(e, t, n) {
|
|
1575
1575
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1576
1576
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1577
1577
|
}
|
|
1578
|
-
const
|
|
1579
|
-
function
|
|
1580
|
-
var l, f, m, d, h, S,
|
|
1581
|
-
const r =
|
|
1582
|
-
if (
|
|
1578
|
+
const za = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ra = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ua = /^'([^]*?)'?$/, La = /''/g, Wa = /[a-zA-Z]/;
|
|
1579
|
+
function at(e, t, n) {
|
|
1580
|
+
var l, f, m, d, h, S, ft, dt;
|
|
1581
|
+
const r = q(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? wn, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((d = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((S = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.options) == null ? void 0 : S.weekStartsOn) ?? r.weekStartsOn ?? ((dt = (ft = r.locale) == null ? void 0 : ft.options) == null ? void 0 : dt.weekStartsOn) ?? 0, s = w(e);
|
|
1582
|
+
if (!Ar(s))
|
|
1583
1583
|
throw new RangeError("Invalid time value");
|
|
1584
|
-
let c = t.match(
|
|
1585
|
-
const
|
|
1586
|
-
if (
|
|
1587
|
-
const
|
|
1588
|
-
return
|
|
1584
|
+
let c = t.match(Ra).map((D) => {
|
|
1585
|
+
const x = D[0];
|
|
1586
|
+
if (x === "p" || x === "P") {
|
|
1587
|
+
const Ce = Ea[x];
|
|
1588
|
+
return Ce(D, a.formatLong);
|
|
1589
1589
|
}
|
|
1590
|
-
return
|
|
1591
|
-
}).join("").match(
|
|
1592
|
-
if (
|
|
1590
|
+
return D;
|
|
1591
|
+
}).join("").match(za).map((D) => {
|
|
1592
|
+
if (D === "''")
|
|
1593
1593
|
return { isToken: !1, value: "'" };
|
|
1594
|
-
const
|
|
1595
|
-
if (
|
|
1596
|
-
return { isToken: !1, value:
|
|
1597
|
-
if (
|
|
1598
|
-
return { isToken: !0, value:
|
|
1599
|
-
if (
|
|
1594
|
+
const x = D[0];
|
|
1595
|
+
if (x === "'")
|
|
1596
|
+
return { isToken: !1, value: Ha(D) };
|
|
1597
|
+
if (Dt[x])
|
|
1598
|
+
return { isToken: !0, value: D };
|
|
1599
|
+
if (x.match(Wa))
|
|
1600
1600
|
throw new RangeError(
|
|
1601
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1601
|
+
"Format string contains an unescaped latin alphabet character `" + x + "`"
|
|
1602
1602
|
);
|
|
1603
|
-
return { isToken: !1, value:
|
|
1603
|
+
return { isToken: !1, value: D };
|
|
1604
1604
|
});
|
|
1605
1605
|
a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
|
|
1606
1606
|
const u = {
|
|
@@ -1608,20 +1608,20 @@ function tt(e, t, n) {
|
|
|
1608
1608
|
weekStartsOn: o,
|
|
1609
1609
|
locale: a
|
|
1610
1610
|
};
|
|
1611
|
-
return c.map((
|
|
1612
|
-
if (!
|
|
1613
|
-
const
|
|
1614
|
-
(!(n != null && n.useAdditionalWeekYearTokens) &&
|
|
1615
|
-
const
|
|
1616
|
-
return
|
|
1611
|
+
return c.map((D) => {
|
|
1612
|
+
if (!D.isToken) return D.value;
|
|
1613
|
+
const x = D.value;
|
|
1614
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Pa(x) || !(n != null && n.useAdditionalDayOfYearTokens) && Fa(x)) && Ya(x, t, String(e));
|
|
1615
|
+
const Ce = Dt[x[0]];
|
|
1616
|
+
return Ce(s, x, a.localize, u);
|
|
1617
1617
|
}).join("");
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1620
|
-
const t = e.match(
|
|
1621
|
-
return t ? t[1].replace(
|
|
1619
|
+
function Ha(e) {
|
|
1620
|
+
const t = e.match(Ua);
|
|
1621
|
+
return t ? t[1].replace(La, "'") : e;
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1624
|
-
const r =
|
|
1623
|
+
function ja(e, t, n) {
|
|
1624
|
+
const r = q(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? wn, i = 2520, o = ge(e, t);
|
|
1625
1625
|
if (isNaN(o))
|
|
1626
1626
|
throw new RangeError("Invalid time value");
|
|
1627
1627
|
const s = Object.assign({}, n, {
|
|
@@ -1630,7 +1630,7 @@ function za(e, t, n) {
|
|
|
1630
1630
|
});
|
|
1631
1631
|
let c, u;
|
|
1632
1632
|
o > 0 ? (c = w(t), u = w(e)) : (c = w(e), u = w(t));
|
|
1633
|
-
const l =
|
|
1633
|
+
const l = qr(u, c), f = (Se(u) - Se(c)) / 1e3, m = Math.round((l - f) / 60);
|
|
1634
1634
|
let d;
|
|
1635
1635
|
if (m < 2)
|
|
1636
1636
|
return n != null && n.includeSeconds ? l < 5 ? a.formatDistance("lessThanXSeconds", 5, s) : l < 10 ? a.formatDistance("lessThanXSeconds", 10, s) : l < 20 ? a.formatDistance("lessThanXSeconds", 20, s) : l < 40 ? a.formatDistance("halfAMinute", 0, s) : l < 60 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", 1, s) : m === 0 ? a.formatDistance("lessThanXMinutes", 1, s) : a.formatDistance("xMinutes", m, s);
|
|
@@ -1638,47 +1638,47 @@ function za(e, t, n) {
|
|
|
1638
1638
|
return a.formatDistance("xMinutes", m, s);
|
|
1639
1639
|
if (m < 90)
|
|
1640
1640
|
return a.formatDistance("aboutXHours", 1, s);
|
|
1641
|
-
if (m <
|
|
1641
|
+
if (m < bt) {
|
|
1642
1642
|
const h = Math.round(m / 60);
|
|
1643
1643
|
return a.formatDistance("aboutXHours", h, s);
|
|
1644
1644
|
} else {
|
|
1645
1645
|
if (m < i)
|
|
1646
1646
|
return a.formatDistance("xDays", 1, s);
|
|
1647
|
-
if (m <
|
|
1648
|
-
const h = Math.round(m /
|
|
1647
|
+
if (m < ue) {
|
|
1648
|
+
const h = Math.round(m / bt);
|
|
1649
1649
|
return a.formatDistance("xDays", h, s);
|
|
1650
|
-
} else if (m <
|
|
1651
|
-
return d = Math.round(m /
|
|
1650
|
+
} else if (m < ue * 2)
|
|
1651
|
+
return d = Math.round(m / ue), a.formatDistance("aboutXMonths", d, s);
|
|
1652
1652
|
}
|
|
1653
|
-
if (d =
|
|
1654
|
-
const h = Math.round(m /
|
|
1653
|
+
if (d = jr(u, c), d < 12) {
|
|
1654
|
+
const h = Math.round(m / ue);
|
|
1655
1655
|
return a.formatDistance("xMonths", h, s);
|
|
1656
1656
|
} else {
|
|
1657
1657
|
const h = d % 12, S = Math.trunc(d / 12);
|
|
1658
1658
|
return h < 3 ? a.formatDistance("aboutXYears", S, s) : h < 9 ? a.formatDistance("overXYears", S, s) : a.formatDistance("almostXYears", S + 1, s);
|
|
1659
1659
|
}
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return
|
|
1661
|
+
function qa(e, t) {
|
|
1662
|
+
return ja(e, Pr(e), t);
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return Object.assign({},
|
|
1664
|
+
function Za() {
|
|
1665
|
+
return Object.assign({}, q());
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1668
|
-
const r =
|
|
1667
|
+
function Js(e, t) {
|
|
1668
|
+
const r = Ba(e);
|
|
1669
1669
|
let a;
|
|
1670
1670
|
if (r.date) {
|
|
1671
|
-
const c =
|
|
1672
|
-
a =
|
|
1671
|
+
const c = Ga(r.date, 2);
|
|
1672
|
+
a = Qa(c.restDateString, c.year);
|
|
1673
1673
|
}
|
|
1674
1674
|
if (!a || isNaN(a.getTime()))
|
|
1675
1675
|
return /* @__PURE__ */ new Date(NaN);
|
|
1676
1676
|
const i = a.getTime();
|
|
1677
1677
|
let o = 0, s;
|
|
1678
|
-
if (r.time && (o =
|
|
1678
|
+
if (r.time && (o = Ja(r.time), isNaN(o)))
|
|
1679
1679
|
return /* @__PURE__ */ new Date(NaN);
|
|
1680
1680
|
if (r.timezone) {
|
|
1681
|
-
if (s =
|
|
1681
|
+
if (s = ei(r.timezone), isNaN(s))
|
|
1682
1682
|
return /* @__PURE__ */ new Date(NaN);
|
|
1683
1683
|
} else {
|
|
1684
1684
|
const c = new Date(i + o), u = /* @__PURE__ */ new Date(0);
|
|
@@ -1695,26 +1695,26 @@ function js(e, t) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
return new Date(i + o + s);
|
|
1697
1697
|
}
|
|
1698
|
-
const
|
|
1698
|
+
const le = {
|
|
1699
1699
|
dateTimeDelimiter: /[T ]/,
|
|
1700
1700
|
timeZoneDelimiter: /[Z ]/i,
|
|
1701
1701
|
timezone: /([Z+-].*)$/
|
|
1702
|
-
},
|
|
1703
|
-
function
|
|
1704
|
-
const t = {}, n = e.split(
|
|
1702
|
+
}, Xa = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Ka = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Va = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1703
|
+
function Ba(e) {
|
|
1704
|
+
const t = {}, n = e.split(le.dateTimeDelimiter);
|
|
1705
1705
|
let r;
|
|
1706
1706
|
if (n.length > 2)
|
|
1707
1707
|
return t;
|
|
1708
|
-
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1],
|
|
1708
|
+
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], le.timeZoneDelimiter.test(t.date) && (t.date = e.split(le.timeZoneDelimiter)[0], r = e.substr(
|
|
1709
1709
|
t.date.length,
|
|
1710
1710
|
e.length
|
|
1711
1711
|
))), r) {
|
|
1712
|
-
const a =
|
|
1712
|
+
const a = le.timezone.exec(r);
|
|
1713
1713
|
a ? (t.time = r.replace(a[1], ""), t.timezone = a[1]) : t.time = r;
|
|
1714
1714
|
}
|
|
1715
1715
|
return t;
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function Ga(e, t) {
|
|
1718
1718
|
const n = new RegExp(
|
|
1719
1719
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
|
|
1720
1720
|
), r = e.match(n);
|
|
@@ -1725,87 +1725,87 @@ function qa(e, t) {
|
|
|
1725
1725
|
restDateString: e.slice((r[1] || r[2]).length)
|
|
1726
1726
|
};
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Qa(e, t) {
|
|
1729
1729
|
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
1730
|
-
const n = e.match(
|
|
1730
|
+
const n = e.match(Xa);
|
|
1731
1731
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1732
|
-
const r = !!n[4], a =
|
|
1732
|
+
const r = !!n[4], a = K(n[1]), i = K(n[2]) - 1, o = K(n[3]), s = K(n[4]), c = K(n[5]) - 1;
|
|
1733
1733
|
if (r)
|
|
1734
|
-
return
|
|
1734
|
+
return ii(t, s, c) ? ti(t, s, c) : /* @__PURE__ */ new Date(NaN);
|
|
1735
1735
|
{
|
|
1736
1736
|
const u = /* @__PURE__ */ new Date(0);
|
|
1737
|
-
return !
|
|
1737
|
+
return !ri(t, i, o) || !ai(t, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(t, i, Math.max(a, o)), u);
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function K(e) {
|
|
1741
1741
|
return e ? parseInt(e) : 1;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const t = e.match(
|
|
1743
|
+
function Ja(e) {
|
|
1744
|
+
const t = e.match(Ka);
|
|
1745
1745
|
if (!t) return NaN;
|
|
1746
|
-
const n =
|
|
1747
|
-
return
|
|
1746
|
+
const n = Pe(t[1]), r = Pe(t[2]), a = Pe(t[3]);
|
|
1747
|
+
return oi(n, r, a) ? n * gn + r * hn + a * 1e3 : NaN;
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1749
|
+
function Pe(e) {
|
|
1750
1750
|
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function ei(e) {
|
|
1753
1753
|
if (e === "Z") return 0;
|
|
1754
|
-
const t = e.match(
|
|
1754
|
+
const t = e.match(Va);
|
|
1755
1755
|
if (!t) return 0;
|
|
1756
1756
|
const n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), a = t[3] && parseInt(t[3]) || 0;
|
|
1757
|
-
return
|
|
1757
|
+
return si(r, a) ? n * (r * gn + a * hn) : NaN;
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function ti(e, t, n) {
|
|
1760
1760
|
const r = /* @__PURE__ */ new Date(0);
|
|
1761
1761
|
r.setUTCFullYear(e, 0, 4);
|
|
1762
1762
|
const a = r.getUTCDay() || 7, i = (t - 1) * 7 + n + 1 - a;
|
|
1763
1763
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1764
1764
|
}
|
|
1765
|
-
const
|
|
1766
|
-
function
|
|
1765
|
+
const ni = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1766
|
+
function vn(e) {
|
|
1767
1767
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1770
|
-
return t >= 0 && t <= 11 && n >= 1 && n <= (
|
|
1769
|
+
function ri(e, t, n) {
|
|
1770
|
+
return t >= 0 && t <= 11 && n >= 1 && n <= (ni[t] || (vn(e) ? 29 : 28));
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
return t >= 1 && t <= (
|
|
1772
|
+
function ai(e, t) {
|
|
1773
|
+
return t >= 1 && t <= (vn(e) ? 366 : 365);
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function ii(e, t, n) {
|
|
1776
1776
|
return t >= 1 && t <= 53 && n >= 0 && n <= 6;
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function oi(e, t, n) {
|
|
1779
1779
|
return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function si(e, t) {
|
|
1782
1782
|
return t >= 0 && t <= 59;
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1785
|
-
const r =
|
|
1786
|
-
return "formatToParts" in a ?
|
|
1784
|
+
function _t(e, t, n) {
|
|
1785
|
+
const r = Za(), a = li(e, n.timeZone, n.locale ?? r.locale);
|
|
1786
|
+
return "formatToParts" in a ? ci(a, t) : ui(a, t);
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function ci(e, t) {
|
|
1789
1789
|
const n = e.formatToParts(t);
|
|
1790
1790
|
for (let r = n.length - 1; r >= 0; --r)
|
|
1791
1791
|
if (n[r].type === "timeZoneName")
|
|
1792
1792
|
return n[r].value;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function ui(e, t) {
|
|
1795
1795
|
const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1796
1796
|
return r ? r[0].substr(1) : "";
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function li(e, t, n) {
|
|
1799
1799
|
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1800
1800
|
timeZone: t,
|
|
1801
1801
|
timeZoneName: e
|
|
1802
1802
|
});
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1805
|
-
const n =
|
|
1806
|
-
return "formatToParts" in n ?
|
|
1804
|
+
function mi(e, t) {
|
|
1805
|
+
const n = yi(t);
|
|
1806
|
+
return "formatToParts" in n ? di(n, e) : hi(n, e);
|
|
1807
1807
|
}
|
|
1808
|
-
const
|
|
1808
|
+
const fi = {
|
|
1809
1809
|
year: 0,
|
|
1810
1810
|
month: 1,
|
|
1811
1811
|
day: 2,
|
|
@@ -1813,11 +1813,11 @@ const oi = {
|
|
|
1813
1813
|
minute: 4,
|
|
1814
1814
|
second: 5
|
|
1815
1815
|
};
|
|
1816
|
-
function
|
|
1816
|
+
function di(e, t) {
|
|
1817
1817
|
try {
|
|
1818
1818
|
const n = e.formatToParts(t), r = [];
|
|
1819
1819
|
for (let a = 0; a < n.length; a++) {
|
|
1820
|
-
const i =
|
|
1820
|
+
const i = fi[n[a].type];
|
|
1821
1821
|
i !== void 0 && (r[i] = parseInt(n[a].value, 10));
|
|
1822
1822
|
}
|
|
1823
1823
|
return r;
|
|
@@ -1827,7 +1827,7 @@ function si(e, t) {
|
|
|
1827
1827
|
throw n;
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function hi(e, t) {
|
|
1831
1831
|
const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
|
|
1832
1832
|
return [
|
|
1833
1833
|
parseInt(r[3], 10),
|
|
@@ -1838,7 +1838,7 @@ function ci(e, t) {
|
|
|
1838
1838
|
parseInt(r[6], 10)
|
|
1839
1839
|
];
|
|
1840
1840
|
}
|
|
1841
|
-
const
|
|
1841
|
+
const Ye = {}, $t = new Intl.DateTimeFormat("en-US", {
|
|
1842
1842
|
hourCycle: "h23",
|
|
1843
1843
|
timeZone: "America/New_York",
|
|
1844
1844
|
year: "numeric",
|
|
@@ -1847,9 +1847,9 @@ const Fe = {}, Mt = new Intl.DateTimeFormat("en-US", {
|
|
|
1847
1847
|
hour: "2-digit",
|
|
1848
1848
|
minute: "2-digit",
|
|
1849
1849
|
second: "2-digit"
|
|
1850
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1850
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), gi = $t === "06/25/2014, 00:00:00" || $t === "06/25/2014 00:00:00";
|
|
1851
|
+
function yi(e) {
|
|
1852
|
+
return Ye[e] || (Ye[e] = gi ? new Intl.DateTimeFormat("en-US", {
|
|
1853
1853
|
hourCycle: "h23",
|
|
1854
1854
|
timeZone: e,
|
|
1855
1855
|
year: "numeric",
|
|
@@ -1867,113 +1867,113 @@ function li(e) {
|
|
|
1867
1867
|
hour: "2-digit",
|
|
1868
1868
|
minute: "2-digit",
|
|
1869
1869
|
second: "2-digit"
|
|
1870
|
-
})),
|
|
1870
|
+
})), Ye[e];
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function it(e, t, n, r, a, i, o) {
|
|
1873
1873
|
const s = /* @__PURE__ */ new Date(0);
|
|
1874
1874
|
return s.setUTCFullYear(e, t, n), s.setUTCHours(r, a, i, o), s;
|
|
1875
1875
|
}
|
|
1876
|
-
const
|
|
1876
|
+
const Nt = 36e5, wi = 6e4, Ae = {
|
|
1877
1877
|
timezoneZ: /^(Z)$/,
|
|
1878
1878
|
timezoneHH: /^([+-]\d{2})$/,
|
|
1879
1879
|
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
1880
1880
|
};
|
|
1881
|
-
function
|
|
1881
|
+
function Oe(e, t, n) {
|
|
1882
1882
|
if (!e)
|
|
1883
1883
|
return 0;
|
|
1884
|
-
let r =
|
|
1884
|
+
let r = Ae.timezoneZ.exec(e);
|
|
1885
1885
|
if (r)
|
|
1886
1886
|
return 0;
|
|
1887
1887
|
let a, i;
|
|
1888
|
-
if (r =
|
|
1889
|
-
return a = parseInt(r[1], 10),
|
|
1890
|
-
if (r =
|
|
1888
|
+
if (r = Ae.timezoneHH.exec(e), r)
|
|
1889
|
+
return a = parseInt(r[1], 10), Et(a) ? -(a * Nt) : NaN;
|
|
1890
|
+
if (r = Ae.timezoneHHMM.exec(e), r) {
|
|
1891
1891
|
a = parseInt(r[2], 10);
|
|
1892
1892
|
const o = parseInt(r[3], 10);
|
|
1893
|
-
return
|
|
1893
|
+
return Et(a, o) ? (i = Math.abs(a) * Nt + o * wi, r[1] === "+" ? -i : i) : NaN;
|
|
1894
1894
|
}
|
|
1895
|
-
if (
|
|
1895
|
+
if (vi(e)) {
|
|
1896
1896
|
t = new Date(t || Date.now());
|
|
1897
|
-
const o = n ? t :
|
|
1898
|
-
return -(n ? s :
|
|
1897
|
+
const o = n ? t : pi(t), s = Ve(o, e);
|
|
1898
|
+
return -(n ? s : Ti(t, s, e));
|
|
1899
1899
|
}
|
|
1900
1900
|
return NaN;
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1903
|
-
return
|
|
1902
|
+
function pi(e) {
|
|
1903
|
+
return it(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1906
|
-
const n =
|
|
1905
|
+
function Ve(e, t) {
|
|
1906
|
+
const n = mi(e, t), r = it(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
|
|
1907
1907
|
let a = e.getTime();
|
|
1908
1908
|
const i = a % 1e3;
|
|
1909
1909
|
return a -= i >= 0 ? i : 1e3 + i, r - a;
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function Ti(e, t, n) {
|
|
1912
1912
|
let a = e.getTime() - t;
|
|
1913
|
-
const i =
|
|
1913
|
+
const i = Ve(new Date(a), n);
|
|
1914
1914
|
if (t === i)
|
|
1915
1915
|
return t;
|
|
1916
1916
|
a -= i - t;
|
|
1917
|
-
const o =
|
|
1917
|
+
const o = Ve(new Date(a), n);
|
|
1918
1918
|
return i === o ? i : Math.max(i, o);
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1920
|
+
function Et(e, t) {
|
|
1921
1921
|
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
1922
1922
|
}
|
|
1923
|
-
const
|
|
1924
|
-
function
|
|
1925
|
-
if (
|
|
1923
|
+
const Ot = {};
|
|
1924
|
+
function vi(e) {
|
|
1925
|
+
if (Ot[e])
|
|
1926
1926
|
return !0;
|
|
1927
1927
|
try {
|
|
1928
|
-
return new Intl.DateTimeFormat(void 0, { timeZone: e }),
|
|
1928
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: e }), Ot[e] = !0, !0;
|
|
1929
1929
|
} catch {
|
|
1930
1930
|
return !1;
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
const
|
|
1933
|
+
const bi = 60 * 1e3, xi = {
|
|
1934
1934
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1935
1935
|
X: function(e, t, n) {
|
|
1936
|
-
const r =
|
|
1936
|
+
const r = ze(n.timeZone, e);
|
|
1937
1937
|
if (r === 0)
|
|
1938
1938
|
return "Z";
|
|
1939
1939
|
switch (t) {
|
|
1940
1940
|
case "X":
|
|
1941
|
-
return
|
|
1941
|
+
return It(r);
|
|
1942
1942
|
case "XXXX":
|
|
1943
1943
|
case "XX":
|
|
1944
|
-
return
|
|
1944
|
+
return Y(r);
|
|
1945
1945
|
case "XXXXX":
|
|
1946
1946
|
case "XXX":
|
|
1947
1947
|
default:
|
|
1948
|
-
return
|
|
1948
|
+
return Y(r, ":");
|
|
1949
1949
|
}
|
|
1950
1950
|
},
|
|
1951
1951
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1952
1952
|
x: function(e, t, n) {
|
|
1953
|
-
const r =
|
|
1953
|
+
const r = ze(n.timeZone, e);
|
|
1954
1954
|
switch (t) {
|
|
1955
1955
|
case "x":
|
|
1956
|
-
return
|
|
1956
|
+
return It(r);
|
|
1957
1957
|
case "xxxx":
|
|
1958
1958
|
case "xx":
|
|
1959
|
-
return
|
|
1959
|
+
return Y(r);
|
|
1960
1960
|
case "xxxxx":
|
|
1961
1961
|
case "xxx":
|
|
1962
1962
|
default:
|
|
1963
|
-
return
|
|
1963
|
+
return Y(r, ":");
|
|
1964
1964
|
}
|
|
1965
1965
|
},
|
|
1966
1966
|
// Timezone (GMT)
|
|
1967
1967
|
O: function(e, t, n) {
|
|
1968
|
-
const r =
|
|
1968
|
+
const r = ze(n.timeZone, e);
|
|
1969
1969
|
switch (t) {
|
|
1970
1970
|
case "O":
|
|
1971
1971
|
case "OO":
|
|
1972
1972
|
case "OOO":
|
|
1973
|
-
return "GMT" +
|
|
1973
|
+
return "GMT" + Di(r, ":");
|
|
1974
1974
|
case "OOOO":
|
|
1975
1975
|
default:
|
|
1976
|
-
return "GMT" +
|
|
1976
|
+
return "GMT" + Y(r, ":");
|
|
1977
1977
|
}
|
|
1978
1978
|
},
|
|
1979
1979
|
// Timezone (specific non-location)
|
|
@@ -1982,42 +1982,42 @@ const gi = 60 * 1e3, yi = {
|
|
|
1982
1982
|
case "z":
|
|
1983
1983
|
case "zz":
|
|
1984
1984
|
case "zzz":
|
|
1985
|
-
return
|
|
1985
|
+
return _t("short", e, n);
|
|
1986
1986
|
case "zzzz":
|
|
1987
1987
|
default:
|
|
1988
|
-
return
|
|
1988
|
+
return _t("long", e, n);
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
};
|
|
1992
|
-
function
|
|
1993
|
-
const n = e ?
|
|
1992
|
+
function ze(e, t) {
|
|
1993
|
+
const n = e ? Oe(e, t, !0) / bi : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
1994
1994
|
if (Number.isNaN(n))
|
|
1995
1995
|
throw new RangeError("Invalid time zone specified: " + e);
|
|
1996
1996
|
return n;
|
|
1997
1997
|
}
|
|
1998
|
-
function
|
|
1998
|
+
function Me(e, t) {
|
|
1999
1999
|
const n = e < 0 ? "-" : "";
|
|
2000
2000
|
let r = Math.abs(e).toString();
|
|
2001
2001
|
for (; r.length < t; )
|
|
2002
2002
|
r = "0" + r;
|
|
2003
2003
|
return n + r;
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2006
|
-
const n = e > 0 ? "-" : "+", r = Math.abs(e), a =
|
|
2005
|
+
function Y(e, t = "") {
|
|
2006
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Me(Math.floor(r / 60), 2), i = Me(Math.floor(r % 60), 2);
|
|
2007
2007
|
return n + a + t + i;
|
|
2008
2008
|
}
|
|
2009
|
-
function
|
|
2010
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
2009
|
+
function It(e, t) {
|
|
2010
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + Me(Math.abs(e) / 60, 2) : Y(e, t);
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function Di(e, t = "") {
|
|
2013
2013
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
|
|
2014
|
-
return i === 0 ? n + String(a) : n + String(a) + t +
|
|
2014
|
+
return i === 0 ? n + String(a) : n + String(a) + t + Me(i, 2);
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Ct(e) {
|
|
2017
2017
|
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
2018
2018
|
return t.setUTCFullYear(e.getFullYear()), +e - +t;
|
|
2019
2019
|
}
|
|
2020
|
-
const
|
|
2020
|
+
const bn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Re = 36e5, Ft = 6e4, Si = 2, b = {
|
|
2021
2021
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
2022
2022
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
2023
2023
|
// year tokens
|
|
@@ -2049,14 +2049,14 @@ const wn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
|
|
|
2049
2049
|
HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
2050
2050
|
HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
2051
2051
|
// time zone tokens (to identify the presence of a tz)
|
|
2052
|
-
timeZone:
|
|
2052
|
+
timeZone: bn
|
|
2053
2053
|
};
|
|
2054
|
-
function
|
|
2054
|
+
function ke(e, t = {}) {
|
|
2055
2055
|
if (arguments.length < 1)
|
|
2056
2056
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
2057
2057
|
if (e === null)
|
|
2058
2058
|
return /* @__PURE__ */ new Date(NaN);
|
|
2059
|
-
const n = t.additionalDigits == null ?
|
|
2059
|
+
const n = t.additionalDigits == null ? Si : Number(t.additionalDigits);
|
|
2060
2060
|
if (n !== 2 && n !== 1 && n !== 0)
|
|
2061
2061
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
2062
2062
|
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
|
|
@@ -2065,36 +2065,36 @@ function Se(e, t = {}) {
|
|
|
2065
2065
|
return new Date(e);
|
|
2066
2066
|
if (Object.prototype.toString.call(e) !== "[object String]")
|
|
2067
2067
|
return /* @__PURE__ */ new Date(NaN);
|
|
2068
|
-
const r =
|
|
2068
|
+
const r = Mi(e), { year: a, restDateString: i } = ki(r.date, n), o = _i(i, a);
|
|
2069
2069
|
if (o === null || isNaN(o.getTime()))
|
|
2070
2070
|
return /* @__PURE__ */ new Date(NaN);
|
|
2071
2071
|
if (o) {
|
|
2072
2072
|
const s = o.getTime();
|
|
2073
2073
|
let c = 0, u;
|
|
2074
|
-
if (r.time && (c =
|
|
2074
|
+
if (r.time && (c = $i(r.time), c === null || isNaN(c)))
|
|
2075
2075
|
return /* @__PURE__ */ new Date(NaN);
|
|
2076
2076
|
if (r.timeZone || t.timeZone) {
|
|
2077
|
-
if (u =
|
|
2077
|
+
if (u = Oe(r.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
|
|
2078
2078
|
return /* @__PURE__ */ new Date(NaN);
|
|
2079
2079
|
} else
|
|
2080
|
-
u =
|
|
2080
|
+
u = Ct(new Date(s + c)), u = Ct(new Date(s + c + u));
|
|
2081
2081
|
return new Date(s + c + u);
|
|
2082
2082
|
} else
|
|
2083
2083
|
return /* @__PURE__ */ new Date(NaN);
|
|
2084
2084
|
}
|
|
2085
|
-
function
|
|
2085
|
+
function Mi(e) {
|
|
2086
2086
|
const t = {};
|
|
2087
|
-
let n =
|
|
2088
|
-
if (n ? (t.date = n[1], r = n[3]) : (n =
|
|
2089
|
-
const a =
|
|
2087
|
+
let n = b.dateTimePattern.exec(e), r;
|
|
2088
|
+
if (n ? (t.date = n[1], r = n[3]) : (n = b.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
|
|
2089
|
+
const a = b.timeZone.exec(r);
|
|
2090
2090
|
a ? (t.time = r.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = r;
|
|
2091
2091
|
}
|
|
2092
2092
|
return t;
|
|
2093
2093
|
}
|
|
2094
|
-
function
|
|
2094
|
+
function ki(e, t) {
|
|
2095
2095
|
if (e) {
|
|
2096
|
-
const n =
|
|
2097
|
-
let a =
|
|
2096
|
+
const n = b.YYY[t], r = b.YYYYY[t];
|
|
2097
|
+
let a = b.YYYY.exec(e) || r.exec(e);
|
|
2098
2098
|
if (a) {
|
|
2099
2099
|
const i = a[1];
|
|
2100
2100
|
return {
|
|
@@ -2102,7 +2102,7 @@ function vi(e, t) {
|
|
|
2102
2102
|
restDateString: e.slice(i.length)
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
|
-
if (a =
|
|
2105
|
+
if (a = b.YY.exec(e) || n.exec(e), a) {
|
|
2106
2106
|
const i = a[1];
|
|
2107
2107
|
return {
|
|
2108
2108
|
year: parseInt(i, 10) * 100,
|
|
@@ -2114,120 +2114,120 @@ function vi(e, t) {
|
|
|
2114
2114
|
year: null
|
|
2115
2115
|
};
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2117
|
+
function _i(e, t) {
|
|
2118
2118
|
if (t === null)
|
|
2119
2119
|
return null;
|
|
2120
2120
|
let n, r, a;
|
|
2121
2121
|
if (!e || !e.length)
|
|
2122
2122
|
return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
|
|
2123
|
-
let i =
|
|
2123
|
+
let i = b.MM.exec(e);
|
|
2124
2124
|
if (i)
|
|
2125
|
-
return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1,
|
|
2126
|
-
if (i =
|
|
2125
|
+
return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, Yt(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
|
|
2126
|
+
if (i = b.DDD.exec(e), i) {
|
|
2127
2127
|
n = /* @__PURE__ */ new Date(0);
|
|
2128
2128
|
const o = parseInt(i[1], 10);
|
|
2129
|
-
return
|
|
2129
|
+
return Oi(t, o) ? (n.setUTCFullYear(t, 0, o), n) : /* @__PURE__ */ new Date(NaN);
|
|
2130
2130
|
}
|
|
2131
|
-
if (i =
|
|
2131
|
+
if (i = b.MMDD.exec(e), i) {
|
|
2132
2132
|
n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
|
|
2133
2133
|
const o = parseInt(i[2], 10);
|
|
2134
|
-
return
|
|
2134
|
+
return Yt(t, r, o) ? (n.setUTCFullYear(t, r, o), n) : /* @__PURE__ */ new Date(NaN);
|
|
2135
2135
|
}
|
|
2136
|
-
if (i =
|
|
2137
|
-
return a = parseInt(i[1], 10) - 1,
|
|
2138
|
-
if (i =
|
|
2136
|
+
if (i = b.Www.exec(e), i)
|
|
2137
|
+
return a = parseInt(i[1], 10) - 1, At(a) ? Pt(t, a) : /* @__PURE__ */ new Date(NaN);
|
|
2138
|
+
if (i = b.WwwD.exec(e), i) {
|
|
2139
2139
|
a = parseInt(i[1], 10) - 1;
|
|
2140
2140
|
const o = parseInt(i[2], 10) - 1;
|
|
2141
|
-
return
|
|
2141
|
+
return At(a, o) ? Pt(t, a, o) : /* @__PURE__ */ new Date(NaN);
|
|
2142
2142
|
}
|
|
2143
2143
|
return null;
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2146
|
-
let t, n, r =
|
|
2145
|
+
function $i(e) {
|
|
2146
|
+
let t, n, r = b.HH.exec(e);
|
|
2147
2147
|
if (r)
|
|
2148
|
-
return t = parseFloat(r[1].replace(",", ".")),
|
|
2149
|
-
if (r =
|
|
2150
|
-
return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")),
|
|
2151
|
-
if (r =
|
|
2148
|
+
return t = parseFloat(r[1].replace(",", ".")), Ue(t) ? t % 24 * Re : NaN;
|
|
2149
|
+
if (r = b.HHMM.exec(e), r)
|
|
2150
|
+
return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), Ue(t, n) ? t % 24 * Re + n * Ft : NaN;
|
|
2151
|
+
if (r = b.HHMMSS.exec(e), r) {
|
|
2152
2152
|
t = parseInt(r[1], 10), n = parseInt(r[2], 10);
|
|
2153
2153
|
const a = parseFloat(r[3].replace(",", "."));
|
|
2154
|
-
return
|
|
2154
|
+
return Ue(t, n, a) ? t % 24 * Re + n * Ft + a * 1e3 : NaN;
|
|
2155
2155
|
}
|
|
2156
2156
|
return null;
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function Pt(e, t, n) {
|
|
2159
2159
|
t = t || 0, n = n || 0;
|
|
2160
2160
|
const r = /* @__PURE__ */ new Date(0);
|
|
2161
2161
|
r.setUTCFullYear(e, 0, 4);
|
|
2162
2162
|
const a = r.getUTCDay() || 7, i = t * 7 + n + 1 - a;
|
|
2163
2163
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
2164
2164
|
}
|
|
2165
|
-
const
|
|
2166
|
-
function
|
|
2165
|
+
const Ni = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ei = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2166
|
+
function xn(e) {
|
|
2167
2167
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2169
|
+
function Yt(e, t, n) {
|
|
2170
2170
|
if (t < 0 || t > 11)
|
|
2171
2171
|
return !1;
|
|
2172
2172
|
if (n != null) {
|
|
2173
2173
|
if (n < 1)
|
|
2174
2174
|
return !1;
|
|
2175
|
-
const r =
|
|
2176
|
-
if (r && n >
|
|
2175
|
+
const r = xn(e);
|
|
2176
|
+
if (r && n > Ei[t] || !r && n > Ni[t])
|
|
2177
2177
|
return !1;
|
|
2178
2178
|
}
|
|
2179
2179
|
return !0;
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function Oi(e, t) {
|
|
2182
2182
|
if (t < 1)
|
|
2183
2183
|
return !1;
|
|
2184
|
-
const n =
|
|
2184
|
+
const n = xn(e);
|
|
2185
2185
|
return !(n && t > 366 || !n && t > 365);
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function At(e, t) {
|
|
2188
2188
|
return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2190
|
+
function Ue(e, t, n) {
|
|
2191
2191
|
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
|
|
2192
2192
|
}
|
|
2193
|
-
const
|
|
2194
|
-
function
|
|
2193
|
+
const Ii = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
2194
|
+
function Ci(e, t, n = {}) {
|
|
2195
2195
|
t = String(t);
|
|
2196
|
-
const r = t.match(
|
|
2196
|
+
const r = t.match(Ii);
|
|
2197
2197
|
if (r) {
|
|
2198
|
-
const a =
|
|
2198
|
+
const a = ke(n.originalDate || e, n);
|
|
2199
2199
|
t = r.reduce(function(i, o) {
|
|
2200
2200
|
if (o[0] === "'")
|
|
2201
2201
|
return i;
|
|
2202
|
-
const s = i.indexOf(o), c = i[s - 1] === "'", u = i.replace(o, "'" +
|
|
2202
|
+
const s = i.indexOf(o), c = i[s - 1] === "'", u = i.replace(o, "'" + xi[o[0]](a, o, n) + "'");
|
|
2203
2203
|
return c ? u.substring(0, s - 1) + u.substring(s + 1) : u;
|
|
2204
2204
|
}, t);
|
|
2205
2205
|
}
|
|
2206
|
-
return
|
|
2206
|
+
return at(e, t, n);
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2209
|
-
e =
|
|
2210
|
-
const r =
|
|
2208
|
+
function Fi(e, t, n) {
|
|
2209
|
+
e = ke(e, n);
|
|
2210
|
+
const r = Oe(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
|
|
2211
2211
|
return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function Dn(e, t, n, r) {
|
|
2214
2214
|
return r = {
|
|
2215
2215
|
...r,
|
|
2216
2216
|
timeZone: t,
|
|
2217
2217
|
originalDate: e
|
|
2218
|
-
},
|
|
2218
|
+
}, Ci(Fi(e, t, { timeZone: r.timeZone }), n, r);
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2221
|
-
if (typeof e == "string" && !e.match(
|
|
2222
|
-
return
|
|
2223
|
-
e =
|
|
2224
|
-
const r =
|
|
2220
|
+
function ae(e, t, n) {
|
|
2221
|
+
if (typeof e == "string" && !e.match(bn))
|
|
2222
|
+
return ke(e, { ...n, timeZone: t });
|
|
2223
|
+
e = ke(e, n);
|
|
2224
|
+
const r = it(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = Oe(t, new Date(r));
|
|
2225
2225
|
return new Date(r + a);
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function ec(e, t) {
|
|
2228
2228
|
return e && e !== "auto" ? e : t;
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2230
|
+
function tc(e, t = /* @__PURE__ */ new Date()) {
|
|
2231
2231
|
try {
|
|
2232
2232
|
const n = {
|
|
2233
2233
|
timeZone: e,
|
|
@@ -2238,7 +2238,7 @@ function Zs(e, t = /* @__PURE__ */ new Date()) {
|
|
|
2238
2238
|
return e;
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
|
-
function
|
|
2241
|
+
function nc(e) {
|
|
2242
2242
|
try {
|
|
2243
2243
|
const t = {
|
|
2244
2244
|
timeZone: e,
|
|
@@ -2251,7 +2251,7 @@ function Xs(e) {
|
|
|
2251
2251
|
return e;
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2254
|
+
function ot(e, t = "auto") {
|
|
2255
2255
|
if (!e)
|
|
2256
2256
|
return /* @__PURE__ */ new Date(NaN);
|
|
2257
2257
|
const n = e.endsWith("Z"), r = /[+-]\d{2}:?\d{2}$/.test(e), a = /\([A-Z]{3,4}\)$/.test(e);
|
|
@@ -2263,73 +2263,73 @@ function rt(e, t = "auto") {
|
|
|
2263
2263
|
return new Date(i);
|
|
2264
2264
|
}
|
|
2265
2265
|
return new Date(e);
|
|
2266
|
-
} else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) :
|
|
2266
|
+
} else return t === "UTC" ? n ? new Date(e) : r ? new Date(e) : /* @__PURE__ */ new Date(e + "Z") : n || r || a ? new Date(e) : ae(e, t);
|
|
2267
2267
|
}
|
|
2268
|
-
const
|
|
2268
|
+
const Pi = "MM/dd/yyyy", Yi = (e, t, n, r = "auto") => {
|
|
2269
2269
|
if (!e)
|
|
2270
2270
|
return "";
|
|
2271
2271
|
try {
|
|
2272
|
-
const a =
|
|
2272
|
+
const a = ot(e, r);
|
|
2273
2273
|
if (isNaN(a.getTime()))
|
|
2274
2274
|
return e;
|
|
2275
|
-
const o = (t && t.trim() ? t :
|
|
2276
|
-
return n && n !== "auto" ?
|
|
2275
|
+
const o = (t && t.trim() ? t : Pi).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
|
|
2276
|
+
return n && n !== "auto" ? Dn(a, n, o) : at(a, o);
|
|
2277
2277
|
} catch (a) {
|
|
2278
2278
|
return console.error("Date formatting error:", a), e;
|
|
2279
2279
|
}
|
|
2280
2280
|
};
|
|
2281
|
-
function
|
|
2281
|
+
function rc(e, t, n = "auto") {
|
|
2282
2282
|
if (e)
|
|
2283
2283
|
try {
|
|
2284
|
-
const r =
|
|
2284
|
+
const r = ot(e, n);
|
|
2285
2285
|
if (isNaN(r.getTime())) return;
|
|
2286
|
-
const a = "yyyy M d H m s", i = t && t !== "auto" ?
|
|
2286
|
+
const a = "yyyy M d H m s", i = t && t !== "auto" ? Dn(r, t, a) : at(r, a), [o, s, c, u, l, f] = i.split(" ").map(Number);
|
|
2287
2287
|
return { year: o, month: s, day: c, hour: u, minute: l, second: f };
|
|
2288
2288
|
} catch {
|
|
2289
2289
|
return;
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
|
-
const
|
|
2292
|
+
const Ai = (e, t = "auto") => {
|
|
2293
2293
|
if (!e)
|
|
2294
2294
|
return "";
|
|
2295
2295
|
try {
|
|
2296
|
-
const n =
|
|
2297
|
-
return isNaN(n.getTime()) ? e :
|
|
2296
|
+
const n = ot(e, t);
|
|
2297
|
+
return isNaN(n.getTime()) ? e : qa(n, { addSuffix: !0 });
|
|
2298
2298
|
} catch (n) {
|
|
2299
2299
|
return console.error("Relative time formatting error:", n), e;
|
|
2300
2300
|
}
|
|
2301
2301
|
};
|
|
2302
|
-
function
|
|
2302
|
+
function zi(e, t, n, r) {
|
|
2303
2303
|
const a = e instanceof Date ? e.toISOString() : String(e), i = (r == null ? void 0 : r.browserTimezone) || n, o = (r == null ? void 0 : r.isSqlCard) ?? !1;
|
|
2304
2304
|
if (t != null && t.useRelativeTime)
|
|
2305
|
-
return
|
|
2305
|
+
return Ai(
|
|
2306
2306
|
a,
|
|
2307
2307
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
2308
2308
|
);
|
|
2309
2309
|
const s = t != null && t.useCustomFormat && (t != null && t.customFormat) ? t.customFormat : (t == null ? void 0 : t.format) || "MM/dd/yyyy";
|
|
2310
|
-
return
|
|
2310
|
+
return Yi(
|
|
2311
2311
|
a,
|
|
2312
2312
|
s,
|
|
2313
2313
|
t != null && t.timezone && (t == null ? void 0 : t.timezone) !== "auto" ? t.timezone : o ? i : n,
|
|
2314
2314
|
(t == null ? void 0 : t.sourceTimezone) || "auto"
|
|
2315
2315
|
);
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function Sn(e, t, n) {
|
|
2318
2318
|
var o, s;
|
|
2319
2319
|
if (e == null)
|
|
2320
2320
|
return e === null ? ((o = n.absence) == null ? void 0 : o.nullText) ?? "" : ((s = n.absence) == null ? void 0 : s.emptyText) ?? "";
|
|
2321
|
-
const r =
|
|
2321
|
+
const r = Qn(e) ? e : void 0, a = r ? r.value : e, i = r ?? (typeof e == "number" ? e : void 0);
|
|
2322
2322
|
if (!n.useFormattedValues || !t)
|
|
2323
2323
|
return String(a);
|
|
2324
2324
|
switch (t.type) {
|
|
2325
2325
|
case "number":
|
|
2326
|
-
return i !== void 0 ?
|
|
2326
|
+
return i !== void 0 ? Er(
|
|
2327
2327
|
i,
|
|
2328
2328
|
t.numberFormat,
|
|
2329
2329
|
n.locale
|
|
2330
2330
|
) : String(a);
|
|
2331
2331
|
case "date":
|
|
2332
|
-
return
|
|
2332
|
+
return zi(
|
|
2333
2333
|
a,
|
|
2334
2334
|
t.dateFormat,
|
|
2335
2335
|
n.timezone,
|
|
@@ -2348,107 +2348,107 @@ function vn(e, t, n) {
|
|
|
2348
2348
|
return String(a);
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
2351
|
-
function
|
|
2351
|
+
function ac(e, t) {
|
|
2352
2352
|
return t.visibleColumns.map((n) => {
|
|
2353
2353
|
const r = e[n], a = t.columnSettings[n];
|
|
2354
|
-
return
|
|
2354
|
+
return Sn(r, a, {
|
|
2355
2355
|
useFormattedValues: t.useFormattedValues,
|
|
2356
2356
|
timezone: t.timezone,
|
|
2357
2357
|
locale: t.locale
|
|
2358
2358
|
});
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
|
-
const
|
|
2362
|
-
function
|
|
2363
|
-
return e >
|
|
2361
|
+
const Mn = 1e4, Ri = 1e6, ic = 5e6, oc = 1024 ** 3, sc = 1024 ** 3;
|
|
2362
|
+
function cc(e) {
|
|
2363
|
+
return e > Mn;
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2366
|
-
return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <=
|
|
2365
|
+
function uc(e) {
|
|
2366
|
+
return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= Mn ? "direct" : e.loadedRowCount <= Ri ? "background" : "blocked";
|
|
2367
2367
|
}
|
|
2368
|
-
const
|
|
2369
|
-
function
|
|
2368
|
+
const Ui = 5 * 1024 * 1024, lc = 64 * 1024 * 1024, _e = p.number().int().positive().max(Number.MAX_SAFE_INTEGER), ye = p.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER), $e = ye.refine((e) => e > 0), Li = (e) => !!e && e !== "." && e !== ".." && !e.includes("/") && !e.includes("\\");
|
|
2369
|
+
function A(e, t) {
|
|
2370
2370
|
const n = t.split("/");
|
|
2371
|
-
if (n.length !== 5 || n[0] !== "exports" || n[1] !== e || n[2] !== "attempts" || !n.every(
|
|
2371
|
+
if (n.length !== 5 || n[0] !== "exports" || n[1] !== e || n[2] !== "attempts" || !n.every(Li))
|
|
2372
2372
|
throw new Error("Invalid Matrix export artifact namespace.");
|
|
2373
2373
|
return { attemptId: n[3], filename: n[4] };
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2375
|
+
function mc(e, t, n) {
|
|
2376
2376
|
const r = `exports/${e}/attempts/${t}/${n}`;
|
|
2377
|
-
return
|
|
2377
|
+
return A(e, r), r;
|
|
2378
2378
|
}
|
|
2379
|
-
const
|
|
2379
|
+
const fc = p.object({
|
|
2380
2380
|
acquisition: p.literal("continuation"),
|
|
2381
2381
|
jobId: p.string().min(1),
|
|
2382
|
-
sequence:
|
|
2383
|
-
deadlineAt:
|
|
2384
|
-
}),
|
|
2382
|
+
sequence: $e,
|
|
2383
|
+
deadlineAt: _e
|
|
2384
|
+
}), Wi = [
|
|
2385
2385
|
"application/json",
|
|
2386
|
-
...
|
|
2387
|
-
],
|
|
2386
|
+
...en.map((e) => tn(e).partContentType)
|
|
2387
|
+
], Hi = p.object({
|
|
2388
2388
|
key: p.string(),
|
|
2389
2389
|
content: p.string(),
|
|
2390
|
-
contentType: p.enum(
|
|
2390
|
+
contentType: p.enum(Wi),
|
|
2391
2391
|
encoding: p.literal("gzip-base64").optional()
|
|
2392
2392
|
// Transport-only compression: JSON (layout, sheet layout) and Excel rows. CSV travels as it always has.
|
|
2393
|
-
}).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType ===
|
|
2394
|
-
p.object({ kind: p.literal("work"), sequence:
|
|
2395
|
-
p.object({ kind: p.literal("committed"), sequence:
|
|
2393
|
+
}).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType === tn("xlsx").partContentType, "Unsupported Matrix artifact encoding."), ji = p.discriminatedUnion("kind", [
|
|
2394
|
+
p.object({ kind: p.literal("work"), sequence: $e, checkpointKey: p.string(), objects: p.array(Hi).min(2).max(4), deadlineAt: _e }),
|
|
2395
|
+
p.object({ kind: p.literal("committed"), sequence: $e, done: p.boolean(), deadlineAt: _e })
|
|
2396
2396
|
]);
|
|
2397
|
-
function
|
|
2397
|
+
function qi(e) {
|
|
2398
2398
|
const t = JSON.stringify(e);
|
|
2399
|
-
if (t === void 0 || new TextEncoder().encode(t).byteLength >
|
|
2399
|
+
if (t === void 0 || new TextEncoder().encode(t).byteLength > Ui)
|
|
2400
2400
|
throw new RangeError("Matrix export batch exceeds its transport byte limit.");
|
|
2401
2401
|
}
|
|
2402
|
-
function
|
|
2403
|
-
const n =
|
|
2404
|
-
if (
|
|
2402
|
+
function dc(e, t) {
|
|
2403
|
+
const n = ji.parse(e);
|
|
2404
|
+
if (qi(e), n.deadlineAt !== t.deadlineAt) throw new Error("Matrix deadline does not match the job.");
|
|
2405
2405
|
if (n.sequence !== t.sequence + (n.kind === "committed" ? 1 : 0))
|
|
2406
2406
|
throw new Error("Invalid Matrix batch sequence.");
|
|
2407
2407
|
if (n.kind === "work") {
|
|
2408
|
-
|
|
2408
|
+
A(t.jobId, n.checkpointKey);
|
|
2409
2409
|
for (const r of n.objects)
|
|
2410
|
-
|
|
2410
|
+
A(t.jobId, r.key);
|
|
2411
2411
|
}
|
|
2412
2412
|
return n;
|
|
2413
2413
|
}
|
|
2414
|
-
const
|
|
2414
|
+
const Zi = p.object({
|
|
2415
2415
|
acquisition: p.literal("continuation"),
|
|
2416
|
-
deadlineAt:
|
|
2417
|
-
chunks: p.array(p.object({ chunkNumber:
|
|
2418
|
-
totalRows:
|
|
2419
|
-
totalBytes:
|
|
2416
|
+
deadlineAt: _e,
|
|
2417
|
+
chunks: p.array(p.object({ chunkNumber: $e, dataKey: p.string() })).min(1),
|
|
2418
|
+
totalRows: ye,
|
|
2419
|
+
totalBytes: ye,
|
|
2420
2420
|
fileKey: p.string().min(1).optional(),
|
|
2421
|
-
fileSize:
|
|
2421
|
+
fileSize: ye.optional(),
|
|
2422
2422
|
/** The file the job writes; absent means CSV (manifests from before Excel). */
|
|
2423
|
-
format: p.enum(
|
|
2423
|
+
format: p.enum(en).optional(),
|
|
2424
2424
|
/** Excel only: the sheet layout the layout batch stored, which compaction wraps the rows in. */
|
|
2425
2425
|
sheetKey: p.string().min(1).optional()
|
|
2426
2426
|
}).refine((e) => e.fileKey === void 0 == (e.fileSize === void 0), "Incomplete published Matrix artifact.").refine((e) => e.format === "xlsx" == (e.sheetKey !== void 0), "An Excel Matrix manifest names its sheet layout, and only it does.");
|
|
2427
|
-
function
|
|
2428
|
-
const r =
|
|
2427
|
+
function hc(e, t, n) {
|
|
2428
|
+
const r = Zi.parse(e);
|
|
2429
2429
|
if (r.deadlineAt !== n) throw new Error("Matrix deadline does not match the job.");
|
|
2430
2430
|
return r.chunks.forEach((a, i) => {
|
|
2431
2431
|
if (a.chunkNumber !== i + 1) throw new Error("Invalid committed Matrix chunk order.");
|
|
2432
|
-
|
|
2433
|
-
}), r.fileKey !== void 0 &&
|
|
2432
|
+
A(t, a.dataKey);
|
|
2433
|
+
}), r.fileKey !== void 0 && A(t, r.fileKey), r.sheetKey !== void 0 && A(t, r.sheetKey), r;
|
|
2434
2434
|
}
|
|
2435
|
-
const
|
|
2436
|
-
function
|
|
2435
|
+
const Xi = "en-US";
|
|
2436
|
+
function zt(e) {
|
|
2437
2437
|
if (typeof e != "string")
|
|
2438
2438
|
return;
|
|
2439
2439
|
const t = e.trim();
|
|
2440
2440
|
if (!(!t || t.toLowerCase() === "none"))
|
|
2441
2441
|
return t;
|
|
2442
2442
|
}
|
|
2443
|
-
function
|
|
2443
|
+
function we(e) {
|
|
2444
2444
|
if (!(typeof e != "number" || !Number.isFinite(e)))
|
|
2445
2445
|
return Math.max(0, Math.min(10, Math.trunc(e)));
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function Ki(e) {
|
|
2448
2448
|
return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2451
|
-
const r =
|
|
2450
|
+
function Vi(e, t, n) {
|
|
2451
|
+
const r = we(t.minimumFractionDigits), a = we(t.maximumFractionDigits);
|
|
2452
2452
|
if (typeof r == "number" || typeof a == "number") {
|
|
2453
2453
|
const s = r ?? 0, c = a ?? Math.max(s, 2);
|
|
2454
2454
|
return {
|
|
@@ -2456,7 +2456,7 @@ function Hi(e, t, n) {
|
|
|
2456
2456
|
maximumFractionDigits: Math.max(s, c)
|
|
2457
2457
|
};
|
|
2458
2458
|
}
|
|
2459
|
-
const i =
|
|
2459
|
+
const i = we(t.decimals);
|
|
2460
2460
|
if (typeof i == "number")
|
|
2461
2461
|
return {
|
|
2462
2462
|
minimumFractionDigits: i,
|
|
@@ -2464,18 +2464,18 @@ function Hi(e, t, n) {
|
|
|
2464
2464
|
};
|
|
2465
2465
|
if (n != null && n.preserveOmittedProperties)
|
|
2466
2466
|
return {};
|
|
2467
|
-
const o =
|
|
2467
|
+
const o = Ki(e);
|
|
2468
2468
|
return {
|
|
2469
2469
|
minimumFractionDigits: o,
|
|
2470
2470
|
maximumFractionDigits: o
|
|
2471
2471
|
};
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2473
|
+
function Bi(e, t) {
|
|
2474
2474
|
if (!(typeof t != "string" || e === "percent" && t === "%"))
|
|
2475
2475
|
return t;
|
|
2476
2476
|
}
|
|
2477
|
-
function
|
|
2478
|
-
const t =
|
|
2477
|
+
function Rt(e) {
|
|
2478
|
+
const t = zt(e.locale), n = zt(e.currency), r = Bi(e.type, e.suffix);
|
|
2479
2479
|
return {
|
|
2480
2480
|
...e,
|
|
2481
2481
|
...t !== e.locale ? { locale: t } : {},
|
|
@@ -2485,9 +2485,9 @@ function Yt(e) {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
function O(e, t, n) {
|
|
2487
2487
|
const r = { ...t, type: e };
|
|
2488
|
-
if ((n == null ? void 0 : n.numericInput) === "canonical" &&
|
|
2489
|
-
return
|
|
2490
|
-
const a =
|
|
2488
|
+
if ((n == null ? void 0 : n.numericInput) === "canonical" && ne(r))
|
|
2489
|
+
return Rt(r);
|
|
2490
|
+
const a = Vi(e, t, n), i = typeof t.prefix == "string" ? t.prefix : void 0, o = {
|
|
2491
2491
|
type: e,
|
|
2492
2492
|
locale: t.locale,
|
|
2493
2493
|
minimumFractionDigits: a.minimumFractionDigits,
|
|
@@ -2500,12 +2500,12 @@ function O(e, t, n) {
|
|
|
2500
2500
|
scale: typeof t.scale == "number" ? t.scale : void 0,
|
|
2501
2501
|
...t.signDisplay ? { signDisplay: t.signDisplay } : {}
|
|
2502
2502
|
};
|
|
2503
|
-
return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"),
|
|
2503
|
+
return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), Rt(o);
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function Ut(e) {
|
|
2506
2506
|
return {
|
|
2507
2507
|
type: "date",
|
|
2508
|
-
locale: e.locale ||
|
|
2508
|
+
locale: e.locale || Xi,
|
|
2509
2509
|
pattern: e.pattern,
|
|
2510
2510
|
// A stored pattern's token set and a preset carry to every reader (column formats ledger P5-45).
|
|
2511
2511
|
...e.dialect ? { dialect: e.dialect } : {},
|
|
@@ -2517,31 +2517,31 @@ function At(e) {
|
|
|
2517
2517
|
suffix: e.suffix
|
|
2518
2518
|
};
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function Le(e) {
|
|
2521
2521
|
return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
|
|
2522
2522
|
}
|
|
2523
|
-
function
|
|
2524
|
-
const t =
|
|
2523
|
+
function Lt(e) {
|
|
2524
|
+
const t = we(e.maxUnits);
|
|
2525
2525
|
return {
|
|
2526
2526
|
type: "duration",
|
|
2527
|
-
inputUnit:
|
|
2527
|
+
inputUnit: Le(e.inputUnit) ? e.inputUnit : "second",
|
|
2528
2528
|
outputStyle: e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact",
|
|
2529
|
-
largestUnit:
|
|
2530
|
-
smallestUnit:
|
|
2529
|
+
largestUnit: Le(e.largestUnit) ? e.largestUnit : void 0,
|
|
2530
|
+
smallestUnit: Le(e.smallestUnit) ? e.smallestUnit : "second",
|
|
2531
2531
|
maxUnits: t,
|
|
2532
2532
|
prefix: e.prefix,
|
|
2533
2533
|
suffix: e.suffix,
|
|
2534
2534
|
negativeStyle: e.negativeStyle || "minus"
|
|
2535
2535
|
};
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function Wt(e) {
|
|
2538
2538
|
return {
|
|
2539
2539
|
type: "string",
|
|
2540
2540
|
prefix: e.prefix,
|
|
2541
2541
|
suffix: e.suffix
|
|
2542
2542
|
};
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function Gi(e, t) {
|
|
2545
2545
|
if (!e)
|
|
2546
2546
|
return;
|
|
2547
2547
|
if (typeof e == "string") {
|
|
@@ -2561,20 +2561,20 @@ function qi(e, t) {
|
|
|
2561
2561
|
"scientific",
|
|
2562
2562
|
{ type: "scientific" },
|
|
2563
2563
|
t
|
|
2564
|
-
) : r === "date" ?
|
|
2564
|
+
) : r === "date" ? Ut({}) : r === "duration" ? Lt({}) : r === "string" ? Wt({}) : r === "number" ? O(
|
|
2565
2565
|
"number",
|
|
2566
2566
|
{ type: "number" },
|
|
2567
2567
|
t
|
|
2568
2568
|
) : void 0;
|
|
2569
2569
|
}
|
|
2570
2570
|
if ("type" in e && e.type === "temporal_bucket") {
|
|
2571
|
-
const r =
|
|
2571
|
+
const r = ir.safeParse(e);
|
|
2572
2572
|
return r.success ? r.data : void 0;
|
|
2573
2573
|
}
|
|
2574
2574
|
const n = e;
|
|
2575
2575
|
if ((t == null ? void 0 : t.numericInput) === "canonical") {
|
|
2576
2576
|
const r = n.type === "percentage" ? { ...n, type: "percent" } : n;
|
|
2577
|
-
if (
|
|
2577
|
+
if (ne(r))
|
|
2578
2578
|
return O(r.type, r, t);
|
|
2579
2579
|
}
|
|
2580
2580
|
if (n.type === "percentage")
|
|
@@ -2589,14 +2589,14 @@ function qi(e, t) {
|
|
|
2589
2589
|
if (n.type === "number" || n.type === "currency" || n.type === "percent" || n.type === "scientific")
|
|
2590
2590
|
return O(n.type, n, t);
|
|
2591
2591
|
if (n.type === "date")
|
|
2592
|
-
return
|
|
2592
|
+
return Ut(n);
|
|
2593
2593
|
if (n.type === "duration")
|
|
2594
|
-
return
|
|
2594
|
+
return Lt(n);
|
|
2595
2595
|
if (n.type === "string")
|
|
2596
|
-
return
|
|
2596
|
+
return Wt(n);
|
|
2597
2597
|
}
|
|
2598
|
-
const
|
|
2599
|
-
function
|
|
2598
|
+
const Qi = Object.freeze({ source: "automatic" });
|
|
2599
|
+
function Ji(e, t) {
|
|
2600
2600
|
var r, a;
|
|
2601
2601
|
const n = e.preferences;
|
|
2602
2602
|
switch (t) {
|
|
@@ -2609,7 +2609,7 @@ function Xi(e, t) {
|
|
|
2609
2609
|
return;
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
|
-
function
|
|
2612
|
+
function Ht(e, t) {
|
|
2613
2613
|
const n = e.config;
|
|
2614
2614
|
if (n)
|
|
2615
2615
|
return [
|
|
@@ -2619,11 +2619,11 @@ function Ut(e, t) {
|
|
|
2619
2619
|
...n.pivotByColumns ?? []
|
|
2620
2620
|
].find((r) => r.id === t);
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2623
|
-
if (t.kind === "field") return
|
|
2624
|
-
if (t.kind === "pivot") return
|
|
2622
|
+
function eo(e, t) {
|
|
2623
|
+
if (t.kind === "field") return Ht(e, t.fieldId);
|
|
2624
|
+
if (t.kind === "pivot") return Ht(e, t.metricId);
|
|
2625
2625
|
}
|
|
2626
|
-
function
|
|
2626
|
+
function to(e, t, n) {
|
|
2627
2627
|
var r, a, i, o, s, c, u, l, f;
|
|
2628
2628
|
switch (t.kind) {
|
|
2629
2629
|
case "field":
|
|
@@ -2639,50 +2639,50 @@ function Bi(e, t, n) {
|
|
|
2639
2639
|
return (f = (l = e.config) == null ? void 0 : l.matrix) == null ? void 0 : f.presentation.levelFormats[t.levelId];
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
|
-
function
|
|
2642
|
+
function no(e) {
|
|
2643
2643
|
if (!e) return;
|
|
2644
2644
|
if (e.format && e.formatOrigin !== "override") return e.format;
|
|
2645
2645
|
const t = e.semanticTemporalPresentation;
|
|
2646
2646
|
return t && t.granularity === e.granularity ? t.format : void 0;
|
|
2647
2647
|
}
|
|
2648
|
-
function
|
|
2649
|
-
return e.surface ? { format: e.surface, source: "surface" } : e.override ? { format: e.override, source: "override" } : e.model ? { format: e.model, source: "model" } : e.snapshot ? { format: e.snapshot, source: "snapshot" } :
|
|
2648
|
+
function st(e) {
|
|
2649
|
+
return e.surface ? { format: e.surface, source: "surface" } : e.override ? { format: e.override, source: "override" } : e.model ? { format: e.model, source: "model" } : e.snapshot ? { format: e.snapshot, source: "snapshot" } : Qi;
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function ro(e) {
|
|
2652
2652
|
var o;
|
|
2653
|
-
const { card: t, column: n, surface: r } = e, a =
|
|
2654
|
-
return
|
|
2655
|
-
surface: r ?
|
|
2656
|
-
override:
|
|
2653
|
+
const { card: t, column: n, surface: r } = e, a = eo(t, n), i = n.kind === "field" ? n.fieldId : n.kind === "pivot" ? n.metricId : void 0;
|
|
2654
|
+
return st({
|
|
2655
|
+
surface: r ? Ji(t, r) : void 0,
|
|
2656
|
+
override: to(t, n, a),
|
|
2657
2657
|
model: (i !== void 0 ? (o = e.modelFormats) == null ? void 0 : o[i] : void 0) ?? e.catalogFormat,
|
|
2658
|
-
snapshot:
|
|
2658
|
+
snapshot: no(a)
|
|
2659
2659
|
});
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2661
|
+
function ao(e, t) {
|
|
2662
2662
|
const n = (r) => r && typeof r == "object" && !Array.isArray(r) ? Object.fromEntries(
|
|
2663
2663
|
Object.keys(r).sort().map((a) => [a, n(r[a])])
|
|
2664
2664
|
) : r;
|
|
2665
2665
|
return JSON.stringify(n(e)) === JSON.stringify(n(t));
|
|
2666
2666
|
}
|
|
2667
|
-
const
|
|
2668
|
-
function
|
|
2667
|
+
const io = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns"], jt = /* @__PURE__ */ new WeakMap();
|
|
2668
|
+
function gc(e, t) {
|
|
2669
2669
|
const n = t == null ? void 0 : t.modelFormats;
|
|
2670
2670
|
if (!e || !n || Object.keys(n).length === 0) return e;
|
|
2671
|
-
let r =
|
|
2672
|
-
if (r ||
|
|
2673
|
-
const a =
|
|
2671
|
+
let r = jt.get(e);
|
|
2672
|
+
if (r || jt.set(e, r = /* @__PURE__ */ new WeakMap()), r.has(n)) return r.get(n);
|
|
2673
|
+
const a = oo(e, n);
|
|
2674
2674
|
return r.set(n, a), a;
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2676
|
+
function oo(e, t) {
|
|
2677
2677
|
const n = { config: e };
|
|
2678
2678
|
let r;
|
|
2679
|
-
for (const a of
|
|
2679
|
+
for (const a of io) {
|
|
2680
2680
|
const i = e[a];
|
|
2681
2681
|
if (!(i != null && i.length)) continue;
|
|
2682
2682
|
let o = !1;
|
|
2683
2683
|
const s = i.map((c) => {
|
|
2684
|
-
const u =
|
|
2685
|
-
return u.source !== "model" ||
|
|
2684
|
+
const u = ro({ card: n, column: { kind: "field", fieldId: c.id }, modelFormats: t });
|
|
2685
|
+
return u.source !== "model" || ao(u.format, c.format) ? c : (o = !0, { ...c, format: u.format });
|
|
2686
2686
|
});
|
|
2687
2687
|
o && ((r ?? (r = { ...e }))[a] = s);
|
|
2688
2688
|
}
|
|
@@ -2699,7 +2699,7 @@ function v(e) {
|
|
|
2699
2699
|
) ? t.constructor : void 0;
|
|
2700
2700
|
return typeof n == "function" && Function.prototype.toString.call(n) === Function.prototype.toString.call(Object);
|
|
2701
2701
|
}
|
|
2702
|
-
const
|
|
2702
|
+
const so = [
|
|
2703
2703
|
"type",
|
|
2704
2704
|
"locale",
|
|
2705
2705
|
"minimumFractionDigits",
|
|
@@ -2714,22 +2714,22 @@ const to = [
|
|
|
2714
2714
|
"percentValueMode",
|
|
2715
2715
|
"signDisplay"
|
|
2716
2716
|
];
|
|
2717
|
-
function
|
|
2717
|
+
function co(e) {
|
|
2718
2718
|
if (!v(e))
|
|
2719
2719
|
return {
|
|
2720
2720
|
ok: !1,
|
|
2721
2721
|
issues: [{ path: "$", message: "Numeric format must be an object." }]
|
|
2722
2722
|
};
|
|
2723
|
-
const t = [], n = new Set(
|
|
2723
|
+
const t = [], n = new Set(so);
|
|
2724
2724
|
Object.keys(e).filter((i) => !n.has(i)).forEach(
|
|
2725
2725
|
(i) => t.push({ path: i, message: `Unknown property "${i}".` })
|
|
2726
2726
|
), e.type !== "number" && e.type !== "currency" && e.type !== "percent" && e.type !== "scientific" && t.push({
|
|
2727
2727
|
path: "type",
|
|
2728
2728
|
message: "Expected number, currency, percent, or scientific."
|
|
2729
2729
|
});
|
|
2730
|
-
const r = e.locale === void 0 ? void 0 :
|
|
2730
|
+
const r = e.locale === void 0 ? void 0 : te(e.locale);
|
|
2731
2731
|
e.locale !== void 0 && !r && t.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
|
|
2732
|
-
const a = e.currency === void 0 ? void 0 :
|
|
2732
|
+
const a = e.currency === void 0 ? void 0 : Ze(e.currency);
|
|
2733
2733
|
e.currency !== void 0 && !a && t.push({
|
|
2734
2734
|
path: "currency",
|
|
2735
2735
|
message: "Expected a supported ISO 4217 currency code."
|
|
@@ -2783,8 +2783,8 @@ function no(e) {
|
|
|
2783
2783
|
}
|
|
2784
2784
|
};
|
|
2785
2785
|
}
|
|
2786
|
-
function
|
|
2787
|
-
const t =
|
|
2786
|
+
function uo(e) {
|
|
2787
|
+
const t = co(e);
|
|
2788
2788
|
if (!t.ok)
|
|
2789
2789
|
return t;
|
|
2790
2790
|
const n = [];
|
|
@@ -2802,7 +2802,7 @@ function ro(e) {
|
|
|
2802
2802
|
message: "Resolved currency formats require an explicit currency."
|
|
2803
2803
|
}), n.length > 0 ? { ok: !1, issues: n } : t;
|
|
2804
2804
|
}
|
|
2805
|
-
function
|
|
2805
|
+
function yc(e) {
|
|
2806
2806
|
var r;
|
|
2807
2807
|
const t = /* @__PURE__ */ new Set();
|
|
2808
2808
|
if (e.snapshot.resolvedFormats.forEach((a, i) => {
|
|
@@ -2839,7 +2839,7 @@ function sc(e) {
|
|
|
2839
2839
|
`resolvedFormats is missing visible export column "${n}"`
|
|
2840
2840
|
);
|
|
2841
2841
|
}
|
|
2842
|
-
function
|
|
2842
|
+
function lo(e, t) {
|
|
2843
2843
|
const n = new Intl.NumberFormat(e, {
|
|
2844
2844
|
style: "currency",
|
|
2845
2845
|
currency: t
|
|
@@ -2849,7 +2849,7 @@ function ao(e, t) {
|
|
|
2849
2849
|
maximumFractionDigits: n.maximumFractionDigits
|
|
2850
2850
|
};
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function mo(e) {
|
|
2853
2853
|
if (e.minimumFractionDigits !== void 0 || e.maximumFractionDigits !== void 0) {
|
|
2854
2854
|
const n = e.minimumFractionDigits ?? 0;
|
|
2855
2855
|
return {
|
|
@@ -2863,15 +2863,15 @@ function io(e) {
|
|
|
2863
2863
|
maximumFractionDigits: t
|
|
2864
2864
|
};
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2867
|
-
const r =
|
|
2866
|
+
function fo(e, t, n) {
|
|
2867
|
+
const r = te(e.locale) ?? t.locale, a = e.type === "number" || e.type === "currency" ? Ze(n) : void 0;
|
|
2868
2868
|
if (!(e.type === "currency" || a !== void 0))
|
|
2869
2869
|
return {
|
|
2870
2870
|
...e,
|
|
2871
2871
|
locale: r,
|
|
2872
|
-
...
|
|
2872
|
+
...mo(e)
|
|
2873
2873
|
};
|
|
2874
|
-
const o = a ??
|
|
2874
|
+
const o = a ?? Ze(e.currency) ?? t.defaultCurrency, s = lo(
|
|
2875
2875
|
r,
|
|
2876
2876
|
o
|
|
2877
2877
|
), c = s.minimumFractionDigits ?? 0, u = s.maximumFractionDigits ?? c, l = e.minimumFractionDigits ?? Math.min(
|
|
@@ -2890,7 +2890,7 @@ function oo(e, t, n) {
|
|
|
2890
2890
|
maximumFractionDigits: f
|
|
2891
2891
|
};
|
|
2892
2892
|
}
|
|
2893
|
-
const
|
|
2893
|
+
const qt = [
|
|
2894
2894
|
"YYYY",
|
|
2895
2895
|
"MMMM",
|
|
2896
2896
|
"MMM",
|
|
@@ -2900,92 +2900,92 @@ const Wt = [
|
|
|
2900
2900
|
"HH",
|
|
2901
2901
|
"mm",
|
|
2902
2902
|
"ss"
|
|
2903
|
-
],
|
|
2904
|
-
semaphor_tokens:
|
|
2903
|
+
], ho = ["hh", "h", "a", "A"], go = {
|
|
2904
|
+
semaphor_tokens: qt,
|
|
2905
2905
|
// Longest first within each set; no 12-hour letter starts a Semaphor token.
|
|
2906
|
-
grouped: [...
|
|
2907
|
-
},
|
|
2906
|
+
grouped: [...qt, ...ho]
|
|
2907
|
+
}, yo = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), me = [
|
|
2908
2908
|
"day",
|
|
2909
2909
|
"week",
|
|
2910
2910
|
"month",
|
|
2911
2911
|
"quarter",
|
|
2912
2912
|
"year"
|
|
2913
|
-
],
|
|
2913
|
+
], kn = {
|
|
2914
2914
|
week_of_short: ["week"],
|
|
2915
2915
|
week_of_long: ["week"],
|
|
2916
2916
|
quarter_short: ["quarter"],
|
|
2917
2917
|
quarter_long: ["quarter"],
|
|
2918
2918
|
fiscal_quarter_short: ["quarter"],
|
|
2919
2919
|
fiscal_year: ["year"],
|
|
2920
|
-
short:
|
|
2921
|
-
long:
|
|
2922
|
-
numeric:
|
|
2923
|
-
iso:
|
|
2920
|
+
short: me,
|
|
2921
|
+
long: me,
|
|
2922
|
+
numeric: me,
|
|
2923
|
+
iso: me
|
|
2924
2924
|
};
|
|
2925
|
-
function
|
|
2926
|
-
return typeof e == "string" && Object.prototype.hasOwnProperty.call(
|
|
2925
|
+
function wo(e) {
|
|
2926
|
+
return typeof e == "string" && Object.prototype.hasOwnProperty.call(kn, e);
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2929
|
-
return
|
|
2928
|
+
function po(e, t, n) {
|
|
2929
|
+
return go[n].find((r) => e.startsWith(r, t));
|
|
2930
2930
|
}
|
|
2931
|
-
function
|
|
2931
|
+
function P(e) {
|
|
2932
2932
|
return { ok: !1, code: "invalid_temporal_bucket_pattern", message: e };
|
|
2933
2933
|
}
|
|
2934
|
-
function
|
|
2934
|
+
function ie(e, t) {
|
|
2935
2935
|
var i;
|
|
2936
|
-
if (!e) return
|
|
2937
|
-
if (e.trim() !== e) return
|
|
2936
|
+
if (!e) return P("Type a pattern, for example HH:mm.");
|
|
2937
|
+
if (e.trim() !== e) return P("A pattern can't start or end with a space.");
|
|
2938
2938
|
const n = [];
|
|
2939
2939
|
let r = 0, a = !1;
|
|
2940
2940
|
for (; r < e.length; ) {
|
|
2941
|
-
const o =
|
|
2941
|
+
const o = po(e, r, t);
|
|
2942
2942
|
if (o) {
|
|
2943
2943
|
if (a)
|
|
2944
|
-
return
|
|
2944
|
+
return P("Put a separator between two parts, for example HH:mm.");
|
|
2945
2945
|
n.push({ kind: "token", value: o }), r += o.length, a = !0;
|
|
2946
2946
|
continue;
|
|
2947
2947
|
}
|
|
2948
2948
|
const s = e[r];
|
|
2949
|
-
if (!
|
|
2950
|
-
return
|
|
2949
|
+
if (!yo.has(s))
|
|
2950
|
+
return P(`"${s}" isn't a pattern letter.`);
|
|
2951
2951
|
if (n.length === 0)
|
|
2952
|
-
return
|
|
2952
|
+
return P("A pattern can't start with a separator.");
|
|
2953
2953
|
const c = n[n.length - 1];
|
|
2954
2954
|
c.kind === "literal" ? c.value += s : n.push({ kind: "literal", value: s }), r += 1, a = !1;
|
|
2955
2955
|
}
|
|
2956
|
-
return ((i = n[n.length - 1]) == null ? void 0 : i.kind) !== "token" ?
|
|
2956
|
+
return ((i = n[n.length - 1]) == null ? void 0 : i.kind) !== "token" ? P("A pattern can't end with a separator.") : { ok: !0, segments: n };
|
|
2957
2957
|
}
|
|
2958
|
-
function
|
|
2958
|
+
function To(e) {
|
|
2959
2959
|
return e.flatMap(
|
|
2960
2960
|
(t) => t.kind === "token" ? [t.value] : []
|
|
2961
2961
|
);
|
|
2962
2962
|
}
|
|
2963
|
-
function
|
|
2963
|
+
function fe(e, t) {
|
|
2964
2964
|
return e.filter((n) => t.includes(n)).length;
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function V(e, t) {
|
|
2967
2967
|
return e.some((n) => t.includes(n));
|
|
2968
2968
|
}
|
|
2969
|
-
const
|
|
2970
|
-
function
|
|
2969
|
+
const _n = ["YYYY", "YY"], $n = ["MMMM", "MMM", "MM"], vo = [..._n, ...$n, "DD"], Be = ["HH", "hh", "h"], bo = ["hh", "h"], Ge = ["a", "A"], xo = [...Be, "mm", "ss", ...Ge], de = "A date needs its year, month and day.";
|
|
2970
|
+
function Do(e, t) {
|
|
2971
2971
|
if (new Set(e).size !== e.length) return "Use each part once.";
|
|
2972
|
-
if (
|
|
2972
|
+
if (fe(e, Be) > 1)
|
|
2973
2973
|
return "Use one hour: HH for a 24-hour clock, or h with a for 12-hour.";
|
|
2974
|
-
if (
|
|
2975
|
-
const n =
|
|
2974
|
+
if (fe(e, Ge) > 1) return "Use a once to show AM or PM.";
|
|
2975
|
+
const n = V(e, bo), r = V(e, Ge);
|
|
2976
2976
|
if (r && !n) return "a shows AM or PM: pair it with h or hh, not HH.";
|
|
2977
2977
|
if (n && !r) return "Add a after a 12-hour hour, so 2:30 reads 2:30 PM.";
|
|
2978
|
-
const a =
|
|
2978
|
+
const a = fe(e, _n) === 1, i = fe(e, $n) === 1, o = e.includes("DD"), s = V(e, Be), c = V(e, xo), u = !V(e, vo) || a && i && o;
|
|
2979
2979
|
switch (t) {
|
|
2980
2980
|
case "second":
|
|
2981
|
-
return !s || !e.includes("mm") || !e.includes("ss") ? "A second shows hours, minutes and seconds, for example h:mm:ss a." : u ? void 0 :
|
|
2981
|
+
return !s || !e.includes("mm") || !e.includes("ss") ? "A second shows hours, minutes and seconds, for example h:mm:ss a." : u ? void 0 : de;
|
|
2982
2982
|
case "minute":
|
|
2983
|
-
return !s || !e.includes("mm") ? "A minute shows hours and minutes, for example h:mm a." : u ? void 0 :
|
|
2983
|
+
return !s || !e.includes("mm") ? "A minute shows hours and minutes, for example h:mm a." : u ? void 0 : de;
|
|
2984
2984
|
case "hour":
|
|
2985
|
-
return s ? u ? void 0 :
|
|
2985
|
+
return s ? u ? void 0 : de : "An hour shows its hour, for example h a.";
|
|
2986
2986
|
case "day":
|
|
2987
2987
|
case "week":
|
|
2988
|
-
return c ? `A ${t} shows a date without a time, for example MMM DD, YYYY.` : a && i && o ? void 0 :
|
|
2988
|
+
return c ? `A ${t} shows a date without a time, for example MMM DD, YYYY.` : a && i && o ? void 0 : de;
|
|
2989
2989
|
case "month":
|
|
2990
2990
|
return a && i && !o && !c ? void 0 : "A month shows its month and year, for example MMM YYYY.";
|
|
2991
2991
|
case "quarter":
|
|
@@ -2994,48 +2994,48 @@ function wo(e, t) {
|
|
|
2994
2994
|
return a && !i && !o && !c ? void 0 : "A year shows only its year, for example YYYY.";
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
|
-
function
|
|
2997
|
+
function Nn(e, t) {
|
|
2998
2998
|
if (e.presentation.mode === "auto")
|
|
2999
2999
|
return { ok: !0 };
|
|
3000
3000
|
if (e.presentation.mode === "preset") {
|
|
3001
|
-
const a =
|
|
3001
|
+
const a = kn[e.presentation.preset];
|
|
3002
3002
|
return a.includes(t) ? { ok: !0 } : {
|
|
3003
3003
|
ok: !1,
|
|
3004
3004
|
code: "incompatible_temporal_bucket_preset",
|
|
3005
3005
|
message: `Preset ${e.presentation.preset} requires ${a.join(", ")} granularity.`
|
|
3006
3006
|
};
|
|
3007
3007
|
}
|
|
3008
|
-
const n =
|
|
3008
|
+
const n = ie(e.presentation.pattern, "grouped");
|
|
3009
3009
|
if (!n.ok) return n;
|
|
3010
|
-
const r =
|
|
3010
|
+
const r = Do(To(n.segments), t);
|
|
3011
3011
|
return r ? { ok: !1, code: "incompatible_temporal_bucket_pattern", message: r } : { ok: !0, segments: n.segments };
|
|
3012
3012
|
}
|
|
3013
|
-
function
|
|
3013
|
+
function wc(e, t) {
|
|
3014
3014
|
if (!(!e || !t))
|
|
3015
|
-
return
|
|
3015
|
+
return Nn(e, t).ok ? e : void 0;
|
|
3016
3016
|
}
|
|
3017
|
-
const
|
|
3018
|
-
function
|
|
3017
|
+
const Zt = /* @__PURE__ */ new Map();
|
|
3018
|
+
function En(e, t) {
|
|
3019
3019
|
var r;
|
|
3020
|
-
let n =
|
|
3020
|
+
let n = Zt.get(e);
|
|
3021
3021
|
return n || (n = new Intl.DateTimeFormat(e, {
|
|
3022
3022
|
calendar: "gregory",
|
|
3023
3023
|
timeZone: "UTC",
|
|
3024
3024
|
hour: "numeric",
|
|
3025
3025
|
hour12: !0
|
|
3026
|
-
}),
|
|
3026
|
+
}), Zt.set(e, n)), ((r = n.formatToParts(new Date(Date.UTC(2e3, 0, 1, t))).find((a) => a.type === "dayPeriod")) == null ? void 0 : r.value) ?? "";
|
|
3027
3027
|
}
|
|
3028
|
-
function
|
|
3028
|
+
function So(e) {
|
|
3029
3029
|
return e.preset ? { mode: "preset", preset: e.preset } : e.pattern ? { mode: "pattern", dialect: e.dialect ?? "semaphor_tokens", pattern: e.pattern } : { mode: "auto" };
|
|
3030
3030
|
}
|
|
3031
|
-
class
|
|
3031
|
+
class L extends Error {
|
|
3032
3032
|
constructor(n, r) {
|
|
3033
3033
|
super(r);
|
|
3034
|
-
|
|
3034
|
+
_(this, "code");
|
|
3035
3035
|
this.name = "RawTemporalFormatContractError", this.code = n;
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
|
-
const
|
|
3038
|
+
const Mo = [
|
|
3039
3039
|
"SSSSSSSSS",
|
|
3040
3040
|
"SSSSSSSS",
|
|
3041
3041
|
"SSSSSSS",
|
|
@@ -3045,7 +3045,7 @@ const To = [
|
|
|
3045
3045
|
"SSS",
|
|
3046
3046
|
"SS",
|
|
3047
3047
|
"S"
|
|
3048
|
-
],
|
|
3048
|
+
], ko = [
|
|
3049
3049
|
"yyyy",
|
|
3050
3050
|
"MMMM",
|
|
3051
3051
|
"LLLL",
|
|
@@ -3067,7 +3067,7 @@ const To = [
|
|
|
3067
3067
|
"m",
|
|
3068
3068
|
"s",
|
|
3069
3069
|
"a"
|
|
3070
|
-
],
|
|
3070
|
+
], _o = /* @__PURE__ */ new Set([
|
|
3071
3071
|
"HH",
|
|
3072
3072
|
"H",
|
|
3073
3073
|
"hh",
|
|
@@ -3077,18 +3077,18 @@ const To = [
|
|
|
3077
3077
|
"ss",
|
|
3078
3078
|
"s",
|
|
3079
3079
|
"a",
|
|
3080
|
-
...
|
|
3081
|
-
]),
|
|
3082
|
-
function
|
|
3080
|
+
...Mo
|
|
3081
|
+
]), $o = /* @__PURE__ */ new Set(["zzz", "XXX"]), We = /* @__PURE__ */ new Set(["short", "medium", "long"]);
|
|
3082
|
+
function k(e, t) {
|
|
3083
3083
|
return Object.keys(e).length === t.length && t.every((r) => r in e);
|
|
3084
3084
|
}
|
|
3085
3085
|
function g(e) {
|
|
3086
|
-
throw new
|
|
3086
|
+
throw new L(
|
|
3087
3087
|
"invalid_raw_temporal_format",
|
|
3088
3088
|
e
|
|
3089
3089
|
);
|
|
3090
3090
|
}
|
|
3091
|
-
function
|
|
3091
|
+
function On(e) {
|
|
3092
3092
|
if (!e || e.trim() !== e || e.length > 256)
|
|
3093
3093
|
return g(
|
|
3094
3094
|
"date_fns patterns must be non-empty, trimmed, and at most 256 characters."
|
|
@@ -3135,7 +3135,7 @@ function _n(e) {
|
|
|
3135
3135
|
}), r = o;
|
|
3136
3136
|
continue;
|
|
3137
3137
|
}
|
|
3138
|
-
const a =
|
|
3138
|
+
const a = ko.find(
|
|
3139
3139
|
(o) => e.startsWith(o, r)
|
|
3140
3140
|
);
|
|
3141
3141
|
if (a) {
|
|
@@ -3151,16 +3151,16 @@ function _n(e) {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
return t.some((a) => a.kind === "token") ? t : g("date_fns patterns must contain at least one token.");
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3154
|
+
function In(e, t) {
|
|
3155
3155
|
if (e === "semaphor_tokens") {
|
|
3156
|
-
const n =
|
|
3156
|
+
const n = ie(t, "semaphor_tokens");
|
|
3157
3157
|
n.ok || g(n.message);
|
|
3158
3158
|
return;
|
|
3159
3159
|
}
|
|
3160
|
-
|
|
3160
|
+
On(t);
|
|
3161
3161
|
}
|
|
3162
|
-
function
|
|
3163
|
-
return !v(e) || !
|
|
3162
|
+
function No(e) {
|
|
3163
|
+
return !v(e) || !k(e, ["dateStyle", "dateTime"]) ? g("Automatic raw temporal styles are incomplete.") : We.has(e.dateStyle) ? !v(e.dateTime) || !k(e.dateTime, ["dateStyle", "timeStyle"]) || !We.has(e.dateTime.dateStyle) || !We.has(e.dateTime.timeStyle) ? g(
|
|
3164
3164
|
"Automatic dateTime styles are incomplete or invalid."
|
|
3165
3165
|
) : {
|
|
3166
3166
|
dateStyle: e.dateStyle,
|
|
@@ -3170,35 +3170,35 @@ function bo(e) {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
} : g("Automatic dateStyle is invalid.");
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3173
|
+
function ct(e) {
|
|
3174
3174
|
const t = ["type", "locale", "calendarTimezone", "presentation"], n = [...t, "sourceTimezone"];
|
|
3175
|
-
if (!v(e) || !
|
|
3175
|
+
if (!v(e) || !k(e, t) && !k(e, n) || e.type !== "raw_temporal")
|
|
3176
3176
|
return g("Resolved raw temporal format has an invalid shape.");
|
|
3177
|
-
const r =
|
|
3178
|
-
return r ? typeof e.calendarTimezone != "string" || !
|
|
3177
|
+
const r = te(e.locale);
|
|
3178
|
+
return r ? typeof e.calendarTimezone != "string" || !ve(e.calendarTimezone) ? g(
|
|
3179
3179
|
"Raw temporal calendarTimezone must be a valid IANA timezone."
|
|
3180
|
-
) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !
|
|
3180
|
+
) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !ve(e.sourceTimezone)) ? g(
|
|
3181
3181
|
"Raw temporal sourceTimezone must be a valid IANA timezone."
|
|
3182
|
-
) : v(e.presentation) ? e.presentation.mode === "auto" ?
|
|
3182
|
+
) : v(e.presentation) ? e.presentation.mode === "auto" ? k(e.presentation, ["mode", "styles"]) ? {
|
|
3183
3183
|
type: "raw_temporal",
|
|
3184
3184
|
locale: r,
|
|
3185
3185
|
calendarTimezone: e.calendarTimezone,
|
|
3186
3186
|
...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
|
|
3187
3187
|
presentation: {
|
|
3188
3188
|
mode: "auto",
|
|
3189
|
-
styles:
|
|
3189
|
+
styles: No(e.presentation.styles)
|
|
3190
3190
|
}
|
|
3191
3191
|
} : g(
|
|
3192
3192
|
"Automatic raw temporal presentation has unknown fields."
|
|
3193
|
-
) : e.presentation.mode === "preset" ? !
|
|
3193
|
+
) : e.presentation.mode === "preset" ? !k(e.presentation, ["mode", "preset"]) || !An(e.presentation.preset) ? g("Preset raw temporal presentation has an invalid shape.") : {
|
|
3194
3194
|
type: "raw_temporal",
|
|
3195
3195
|
locale: r,
|
|
3196
3196
|
calendarTimezone: e.calendarTimezone,
|
|
3197
3197
|
...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
|
|
3198
3198
|
presentation: { mode: "preset", preset: e.presentation.preset }
|
|
3199
|
-
} : e.presentation.mode !== "pattern" || !
|
|
3199
|
+
} : e.presentation.mode !== "pattern" || !k(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? g(
|
|
3200
3200
|
"Pattern raw temporal presentation has an invalid shape."
|
|
3201
|
-
) : (
|
|
3201
|
+
) : (In(e.presentation.dialect, e.presentation.pattern), {
|
|
3202
3202
|
type: "raw_temporal",
|
|
3203
3203
|
locale: r,
|
|
3204
3204
|
calendarTimezone: e.calendarTimezone,
|
|
@@ -3210,7 +3210,7 @@ function it(e) {
|
|
|
3210
3210
|
}
|
|
3211
3211
|
}) : g("Raw temporal presentation must be an object.") : g("Raw temporal locale is invalid or unsupported.");
|
|
3212
3212
|
}
|
|
3213
|
-
function
|
|
3213
|
+
function Cn(e) {
|
|
3214
3214
|
var s, c, u;
|
|
3215
3215
|
if (e.format) {
|
|
3216
3216
|
if (!v(e.format))
|
|
@@ -3226,23 +3226,23 @@ function En(e) {
|
|
|
3226
3226
|
);
|
|
3227
3227
|
const f = e.format.presentation;
|
|
3228
3228
|
if (f.mode === "auto") {
|
|
3229
|
-
if (!
|
|
3229
|
+
if (!k(f, ["mode"]))
|
|
3230
3230
|
return g(
|
|
3231
3231
|
"Automatic authored raw temporal format has unknown fields."
|
|
3232
3232
|
);
|
|
3233
3233
|
} else if (f.mode === "preset") {
|
|
3234
|
-
if (!
|
|
3234
|
+
if (!k(f, ["mode", "preset"]) || !An(f.preset))
|
|
3235
3235
|
return g("Authored raw temporal preset has an invalid shape.");
|
|
3236
3236
|
} else {
|
|
3237
|
-
if (f.mode !== "pattern" || !
|
|
3237
|
+
if (f.mode !== "pattern" || !k(f, ["mode", "dialect", "pattern"]) || f.dialect !== "semaphor_tokens" && f.dialect !== "date_fns" || typeof f.pattern != "string")
|
|
3238
3238
|
return g(
|
|
3239
3239
|
"Authored raw temporal pattern has an invalid shape."
|
|
3240
3240
|
);
|
|
3241
|
-
|
|
3241
|
+
In(f.dialect, f.pattern);
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
3244
|
const t = (s = e.format) == null ? void 0 : s.timezone, n = (c = e.format) == null ? void 0 : c.sourceTimezone, r = t && t !== "auto" ? t : e.calendar.tz, a = n && n !== "auto" ? n === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : n : void 0;
|
|
3245
|
-
if (t !== void 0 && t !== "auto" && !
|
|
3245
|
+
if (t !== void 0 && t !== "auto" && !ve(r) || a !== void 0 && !ve(a))
|
|
3246
3246
|
return g("Authored raw temporal timezone is invalid.");
|
|
3247
3247
|
const i = ((u = e.format) == null ? void 0 : u.presentation) ?? { mode: "auto" }, o = {
|
|
3248
3248
|
type: "raw_temporal",
|
|
@@ -3257,21 +3257,21 @@ function En(e) {
|
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
3259
|
};
|
|
3260
|
-
return
|
|
3260
|
+
return ct(o);
|
|
3261
3261
|
}
|
|
3262
|
-
function
|
|
3262
|
+
function pc(e) {
|
|
3263
3263
|
const t = /* @__PURE__ */ new Set();
|
|
3264
3264
|
let n = !1;
|
|
3265
3265
|
for (const r of e.values) {
|
|
3266
3266
|
if (r === null) continue;
|
|
3267
3267
|
n = !0;
|
|
3268
|
-
const a =
|
|
3268
|
+
const a = lr(r);
|
|
3269
3269
|
a && t.add(a);
|
|
3270
3270
|
}
|
|
3271
3271
|
if (!n) return { status: "empty" };
|
|
3272
3272
|
if (t.size === 0) return { status: "invalid_only" };
|
|
3273
3273
|
if (t.size > 1)
|
|
3274
|
-
throw new
|
|
3274
|
+
throw new L(
|
|
3275
3275
|
"mixed_sql_temporal_semantics",
|
|
3276
3276
|
`Declared SQL temporal column "${e.columnKey}" mixes date, wall-datetime, or instant semantics. Normalize it to one kind.`
|
|
3277
3277
|
);
|
|
@@ -3283,7 +3283,7 @@ function uc(e) {
|
|
|
3283
3283
|
}
|
|
3284
3284
|
};
|
|
3285
3285
|
}
|
|
3286
|
-
function
|
|
3286
|
+
function Tc(e) {
|
|
3287
3287
|
return {
|
|
3288
3288
|
version: 1,
|
|
3289
3289
|
columns: Object.fromEntries(
|
|
@@ -3294,9 +3294,9 @@ function lc(e) {
|
|
|
3294
3294
|
)
|
|
3295
3295
|
};
|
|
3296
3296
|
}
|
|
3297
|
-
function
|
|
3297
|
+
function Eo(e) {
|
|
3298
3298
|
if (!v(e) || e.version !== 1 || !v(e.columns) || Object.keys(e).some((r) => r !== "version" && r !== "columns"))
|
|
3299
|
-
throw new
|
|
3299
|
+
throw new L(
|
|
3300
3300
|
"invalid_raw_temporal_format",
|
|
3301
3301
|
"Raw temporal chunk classification evidence is malformed."
|
|
3302
3302
|
);
|
|
@@ -3309,7 +3309,7 @@ function So(e) {
|
|
|
3309
3309
|
]);
|
|
3310
3310
|
for (const [r, a] of Object.entries(e.columns)) {
|
|
3311
3311
|
if (!r.trim() || !n.has(a))
|
|
3312
|
-
throw new
|
|
3312
|
+
throw new L(
|
|
3313
3313
|
"invalid_raw_temporal_format",
|
|
3314
3314
|
"Raw temporal chunk classification evidence contains an invalid column or status."
|
|
3315
3315
|
);
|
|
@@ -3317,13 +3317,13 @@ function So(e) {
|
|
|
3317
3317
|
}
|
|
3318
3318
|
return { version: 1, columns: t };
|
|
3319
3319
|
}
|
|
3320
|
-
function
|
|
3320
|
+
function vc(e) {
|
|
3321
3321
|
if (e.length === 0) return;
|
|
3322
|
-
const t = e.map(
|
|
3322
|
+
const t = e.map(Eo), n = Object.keys(t[0].columns).sort();
|
|
3323
3323
|
for (let r = 1; r < t.length; r += 1) {
|
|
3324
3324
|
const a = Object.keys(t[r].columns).sort();
|
|
3325
3325
|
if (a.length !== n.length || a.some((i, o) => i !== n[o]))
|
|
3326
|
-
throw new
|
|
3326
|
+
throw new L(
|
|
3327
3327
|
"invalid_raw_temporal_format",
|
|
3328
3328
|
"Raw temporal chunk classification evidence has inconsistent columns."
|
|
3329
3329
|
);
|
|
@@ -3334,23 +3334,23 @@ function mc(e) {
|
|
|
3334
3334
|
(i) => i !== "empty" && i !== "invalid_only"
|
|
3335
3335
|
)
|
|
3336
3336
|
).size > 1)
|
|
3337
|
-
throw new
|
|
3337
|
+
throw new L(
|
|
3338
3338
|
"mixed_sql_temporal_semantics",
|
|
3339
3339
|
`Declared SQL temporal column "${r}" has inconsistent semantics across export chunks. Normalize it to one kind.`
|
|
3340
3340
|
);
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function Qe(e) {
|
|
3343
3343
|
const t = /* @__PURE__ */ new Date(0);
|
|
3344
3344
|
return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3346
|
+
function ut(e, t) {
|
|
3347
3347
|
const n = e.fraction ? `.${e.fraction.padEnd(3, "0").slice(0, 3)}` : "";
|
|
3348
|
-
return
|
|
3348
|
+
return ae(
|
|
3349
3349
|
`${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}T${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${n}`,
|
|
3350
3350
|
t
|
|
3351
3351
|
);
|
|
3352
3352
|
}
|
|
3353
|
-
function
|
|
3353
|
+
function Fn(e, t) {
|
|
3354
3354
|
const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
3355
3355
|
let a, i, o;
|
|
3356
3356
|
return {
|
|
@@ -3377,7 +3377,7 @@ function On(e, t) {
|
|
|
3377
3377
|
return ((m = f.formatToParts(s).find((d) => d.type === "month")) == null ? void 0 : m.value) ?? "";
|
|
3378
3378
|
},
|
|
3379
3379
|
dayPeriod(s) {
|
|
3380
|
-
return
|
|
3380
|
+
return En(e, s.getUTCHours());
|
|
3381
3381
|
},
|
|
3382
3382
|
instantFields(s) {
|
|
3383
3383
|
a ?? (a = new Intl.DateTimeFormat("en-CA", {
|
|
@@ -3429,7 +3429,7 @@ function On(e, t) {
|
|
|
3429
3429
|
}
|
|
3430
3430
|
};
|
|
3431
3431
|
}
|
|
3432
|
-
function
|
|
3432
|
+
function Oo(e, t, n, r, a) {
|
|
3433
3433
|
if (/^S{1,9}$/.test(e)) {
|
|
3434
3434
|
const i = t.fraction.padEnd(e.length, "0").slice(0, e.length);
|
|
3435
3435
|
return r.number(Number(i), e.length);
|
|
@@ -3490,47 +3490,47 @@ function Mo(e, t, n, r, a) {
|
|
|
3490
3490
|
);
|
|
3491
3491
|
}
|
|
3492
3492
|
}
|
|
3493
|
-
function
|
|
3494
|
-
const a =
|
|
3493
|
+
function Io(e, t, n, r) {
|
|
3494
|
+
const a = Qe(t);
|
|
3495
3495
|
return e.map(
|
|
3496
|
-
(i) => i.kind === "literal" ? i.value :
|
|
3496
|
+
(i) => i.kind === "literal" ? i.value : Oo(i.value, t, a, n, r)
|
|
3497
3497
|
).join("");
|
|
3498
3498
|
}
|
|
3499
|
-
function
|
|
3500
|
-
const r = t === "date_fns" ?
|
|
3501
|
-
const i =
|
|
3499
|
+
function Pn(e, t, n) {
|
|
3500
|
+
const r = t === "date_fns" ? On(n) : (() => {
|
|
3501
|
+
const i = ie(n, "semaphor_tokens");
|
|
3502
3502
|
return i.ok ? i.segments : g(i.message);
|
|
3503
3503
|
})(), a = r.filter((i) => i.kind === "token").map((i) => i.value);
|
|
3504
|
-
return e === "date" && a.some((i) =>
|
|
3504
|
+
return e === "date" && a.some((i) => _o.has(i)) ? g("Date patterns cannot contain time tokens.") : e !== "instant" && a.some((i) => $o.has(i)) ? g("Timezone pattern tokens require an instant value.") : r;
|
|
3505
3505
|
}
|
|
3506
|
-
function
|
|
3507
|
-
|
|
3506
|
+
function Co(e) {
|
|
3507
|
+
Pn(
|
|
3508
3508
|
e.valueKind ?? "instant",
|
|
3509
3509
|
e.dialect,
|
|
3510
3510
|
e.pattern
|
|
3511
3511
|
);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3514
|
-
const a =
|
|
3513
|
+
function Fo(e, t, n, r) {
|
|
3514
|
+
const a = Pn(
|
|
3515
3515
|
e.valueKind,
|
|
3516
3516
|
n,
|
|
3517
3517
|
r
|
|
3518
|
-
), i =
|
|
3518
|
+
), i = Fn(t.locale, t.calendarTimezone);
|
|
3519
3519
|
return (o) => {
|
|
3520
|
-
const s = e.valueKind === "wall_datetime" && t.sourceTimezone ?
|
|
3520
|
+
const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? ut(o.fields, t.sourceTimezone) : void 0, c = e.valueKind === "instant" ? {
|
|
3521
3521
|
...i.instantFields(o.instant),
|
|
3522
3522
|
fraction: o.fields.fraction
|
|
3523
3523
|
} : s ? {
|
|
3524
3524
|
...i.instantFields(s),
|
|
3525
3525
|
fraction: o.fields.fraction
|
|
3526
3526
|
} : o.fields;
|
|
3527
|
-
return
|
|
3527
|
+
return Io(a, c, i, o.instant ?? s);
|
|
3528
3528
|
};
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3531
|
-
const n =
|
|
3530
|
+
function Yn(e, t) {
|
|
3531
|
+
const n = Fn(t.locale, t.calendarTimezone);
|
|
3532
3532
|
return (r) => {
|
|
3533
|
-
const a = e.valueKind === "instant" ? n.instantFields(r.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? n.instantFields(
|
|
3533
|
+
const a = e.valueKind === "instant" ? n.instantFields(r.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? n.instantFields(ut(r.fields, t.sourceTimezone)) : r.fields;
|
|
3534
3534
|
return {
|
|
3535
3535
|
year: a.year,
|
|
3536
3536
|
month: a.month,
|
|
@@ -3541,12 +3541,12 @@ function In(e, t) {
|
|
|
3541
3541
|
};
|
|
3542
3542
|
};
|
|
3543
3543
|
}
|
|
3544
|
-
const
|
|
3545
|
-
function
|
|
3546
|
-
return typeof e == "string" &&
|
|
3544
|
+
const Po = /* @__PURE__ */ new Set(["short", "long", "numeric", "iso"]);
|
|
3545
|
+
function An(e) {
|
|
3546
|
+
return typeof e == "string" && Po.has(e);
|
|
3547
3547
|
}
|
|
3548
|
-
function
|
|
3549
|
-
const r =
|
|
3548
|
+
function Yo(e, t, n) {
|
|
3549
|
+
const r = Yn(e, t), a = e.valueKind !== "date", i = (s, c = 2) => String(s).padStart(c, "0");
|
|
3550
3550
|
if (n === "iso")
|
|
3551
3551
|
return (s) => {
|
|
3552
3552
|
const c = r(s), u = `${i(c.year, 4)}-${i(c.month)}-${i(c.day)}`;
|
|
@@ -3565,7 +3565,7 @@ function Oo(e, t, n) {
|
|
|
3565
3565
|
return u.setUTCFullYear(c.year, c.month - 1, c.day), u.setUTCHours(c.hour, c.minute, c.second, 0), o.format(u);
|
|
3566
3566
|
};
|
|
3567
3567
|
}
|
|
3568
|
-
function
|
|
3568
|
+
function Ao(e, t) {
|
|
3569
3569
|
const n = t.presentation.mode === "auto" ? t.presentation.styles : g("Automatic raw temporal formatting requires styles.");
|
|
3570
3570
|
if (e.valueKind === "date") {
|
|
3571
3571
|
const o = new Intl.DateTimeFormat(t.locale, {
|
|
@@ -3573,7 +3573,7 @@ function $o(e, t) {
|
|
|
3573
3573
|
timeZone: "UTC",
|
|
3574
3574
|
dateStyle: n.dateStyle
|
|
3575
3575
|
});
|
|
3576
|
-
return (s) => o.format(
|
|
3576
|
+
return (s) => o.format(Qe(s.fields));
|
|
3577
3577
|
}
|
|
3578
3578
|
const r = e.valueKind === "instant", a = !r && n.dateTime.timeStyle === "long" ? "medium" : n.dateTime.timeStyle, i = new Intl.DateTimeFormat(t.locale, {
|
|
3579
3579
|
calendar: "gregory",
|
|
@@ -3581,9 +3581,9 @@ function $o(e, t) {
|
|
|
3581
3581
|
dateStyle: n.dateTime.dateStyle,
|
|
3582
3582
|
timeStyle: a
|
|
3583
3583
|
});
|
|
3584
|
-
return (o) => r ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(
|
|
3584
|
+
return (o) => r ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(ut(o.fields, t.sourceTimezone)) : i.format(Qe(o.fields));
|
|
3585
3585
|
}
|
|
3586
|
-
function
|
|
3586
|
+
function Xt(e, t, n) {
|
|
3587
3587
|
return {
|
|
3588
3588
|
ok: !1,
|
|
3589
3589
|
text: e,
|
|
@@ -3593,18 +3593,18 @@ function jt(e, t, n) {
|
|
|
3593
3593
|
}
|
|
3594
3594
|
};
|
|
3595
3595
|
}
|
|
3596
|
-
function
|
|
3597
|
-
const t =
|
|
3596
|
+
function zn(e) {
|
|
3597
|
+
const t = cr(e.metadata), n = ct(e.format), r = n.presentation.mode === "auto" ? Ao(t, n) : n.presentation.mode === "preset" ? Yo(t, n, n.presentation.preset) : Fo(
|
|
3598
3598
|
t,
|
|
3599
3599
|
n,
|
|
3600
3600
|
n.presentation.dialect,
|
|
3601
3601
|
n.presentation.pattern
|
|
3602
|
-
), a =
|
|
3602
|
+
), a = Yn(t, n);
|
|
3603
3603
|
return (i) => {
|
|
3604
3604
|
if (i === null)
|
|
3605
3605
|
return { ok: !0, text: "", status: "empty" };
|
|
3606
|
-
const o =
|
|
3607
|
-
return o.status === "invalid_shape" ?
|
|
3606
|
+
const o = ur(i, t.valueKind);
|
|
3607
|
+
return o.status === "invalid_shape" ? Xt(i, t, "invalid_raw_temporal_value") : o.status === "out_of_range" ? Xt(i, t, "out_of_range_raw_temporal_value") : {
|
|
3608
3608
|
ok: !0,
|
|
3609
3609
|
text: r(o),
|
|
3610
3610
|
status: "formatted",
|
|
@@ -3612,28 +3612,28 @@ function Fn(e) {
|
|
|
3612
3612
|
};
|
|
3613
3613
|
};
|
|
3614
3614
|
}
|
|
3615
|
-
function
|
|
3616
|
-
return
|
|
3615
|
+
function zo(e) {
|
|
3616
|
+
return zn({
|
|
3617
3617
|
metadata: e.metadata,
|
|
3618
3618
|
format: e.format
|
|
3619
3619
|
})(e.value);
|
|
3620
3620
|
}
|
|
3621
|
-
function
|
|
3622
|
-
const t =
|
|
3623
|
-
return { format: t, formatValue:
|
|
3621
|
+
function Ro(e) {
|
|
3622
|
+
const t = Cn({ format: e.authored, preferences: e.preferences, calendar: e.calendar });
|
|
3623
|
+
return { format: t, formatValue: zn({ metadata: e.metadata, format: t }) };
|
|
3624
3624
|
}
|
|
3625
|
-
const
|
|
3625
|
+
const Uo = {
|
|
3626
3626
|
dateStyle: "short",
|
|
3627
3627
|
dateTime: { dateStyle: "short", timeStyle: "short" }
|
|
3628
3628
|
};
|
|
3629
|
-
class
|
|
3629
|
+
class pe extends Error {
|
|
3630
3630
|
constructor(n, r) {
|
|
3631
3631
|
super(r);
|
|
3632
|
-
|
|
3632
|
+
_(this, "code");
|
|
3633
3633
|
this.name = "TemporalBucketContractError", this.code = n;
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
|
-
const
|
|
3636
|
+
const Lo = [
|
|
3637
3637
|
"Jan",
|
|
3638
3638
|
"Feb",
|
|
3639
3639
|
"Mar",
|
|
@@ -3646,7 +3646,7 @@ const Po = [
|
|
|
3646
3646
|
"Oct",
|
|
3647
3647
|
"Nov",
|
|
3648
3648
|
"Dec"
|
|
3649
|
-
],
|
|
3649
|
+
], Wo = [
|
|
3650
3650
|
"January",
|
|
3651
3651
|
"February",
|
|
3652
3652
|
"March",
|
|
@@ -3660,31 +3660,31 @@ const Po = [
|
|
|
3660
3660
|
"November",
|
|
3661
3661
|
"December"
|
|
3662
3662
|
];
|
|
3663
|
-
function
|
|
3663
|
+
function He(e) {
|
|
3664
3664
|
return {
|
|
3665
3665
|
ok: !1,
|
|
3666
3666
|
error: { code: "invalid_temporal_bucket_value", message: e }
|
|
3667
3667
|
};
|
|
3668
3668
|
}
|
|
3669
|
-
function
|
|
3669
|
+
function Ho(e) {
|
|
3670
3670
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
3671
3671
|
}
|
|
3672
|
-
function
|
|
3673
|
-
return t === 2 ?
|
|
3672
|
+
function jo(e, t) {
|
|
3673
|
+
return t === 2 ? Ho(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
|
|
3674
3674
|
}
|
|
3675
|
-
function
|
|
3675
|
+
function qo(e, t, n) {
|
|
3676
3676
|
const r = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4], a = t < 3 ? e - 1 : e;
|
|
3677
3677
|
return (a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + r[t - 1] + n) % 7;
|
|
3678
3678
|
}
|
|
3679
|
-
function
|
|
3679
|
+
function Ie(e) {
|
|
3680
3680
|
var t;
|
|
3681
3681
|
return (t = e.calendar.fiscalCalendar) == null ? void 0 : t.yearStartMonth;
|
|
3682
3682
|
}
|
|
3683
|
-
function
|
|
3683
|
+
function Zo(e, t) {
|
|
3684
3684
|
return (e - t + 12) % 12 % 3 === 0;
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3687
|
-
const { granularity: n } = t, r =
|
|
3686
|
+
function Xo(e, t) {
|
|
3687
|
+
const { granularity: n } = t, r = Ie(t) ?? 1;
|
|
3688
3688
|
switch (n) {
|
|
3689
3689
|
case "second":
|
|
3690
3690
|
return !0;
|
|
@@ -3695,20 +3695,20 @@ function Lo(e, t) {
|
|
|
3695
3695
|
case "day":
|
|
3696
3696
|
return !0;
|
|
3697
3697
|
case "week":
|
|
3698
|
-
return
|
|
3698
|
+
return qo(e.year, e.month, e.day) === t.calendar.weekStart;
|
|
3699
3699
|
case "month":
|
|
3700
3700
|
return e.day === 1;
|
|
3701
3701
|
case "quarter":
|
|
3702
|
-
return e.day === 1 &&
|
|
3702
|
+
return e.day === 1 && Zo(e.month, r);
|
|
3703
3703
|
case "year":
|
|
3704
3704
|
return e.day === 1 && e.month === r;
|
|
3705
3705
|
}
|
|
3706
3706
|
}
|
|
3707
|
-
function
|
|
3707
|
+
function oe(e, t) {
|
|
3708
3708
|
if (e === null) return { ok: !0, value: null };
|
|
3709
3709
|
const n = t.granularity === "second" || t.granularity === "minute" || t.granularity === "hour", r = n ? /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/.exec(e) : /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
3710
3710
|
if (!r)
|
|
3711
|
-
return
|
|
3711
|
+
return He(
|
|
3712
3712
|
`Expected ${n ? "YYYY-MM-DDTHH:mm:ss" : "YYYY-MM-DD"} for ${t.granularity} granularity.`
|
|
3713
3713
|
);
|
|
3714
3714
|
const a = {
|
|
@@ -3719,50 +3719,50 @@ function ie(e, t) {
|
|
|
3719
3719
|
minute: n ? Number(r[5]) : 0,
|
|
3720
3720
|
second: n ? Number(r[6]) : 0
|
|
3721
3721
|
};
|
|
3722
|
-
return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day >
|
|
3722
|
+
return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day > jo(a.year, a.month) || a.hour > 23 || a.minute > 59 || a.second > 59 ? He(`Invalid canonical ${t.granularity} bucket value ${e}.`) : Xo(a, t) ? { ok: !0, value: a } : He(
|
|
3723
3723
|
`Canonical value ${e} is not aligned to ${t.granularity} granularity and its governed Calendar.`
|
|
3724
3724
|
);
|
|
3725
3725
|
}
|
|
3726
|
-
const
|
|
3727
|
-
function
|
|
3728
|
-
const r =
|
|
3726
|
+
const Ne = (e) => `${T(e.year, 4)}-${T(e.month)}-${T(e.day)}`;
|
|
3727
|
+
function bc(e, t, n) {
|
|
3728
|
+
const r = oe(e, t);
|
|
3729
3729
|
if (!r.ok || !r.value) return;
|
|
3730
|
-
const a =
|
|
3730
|
+
const a = be({ ...r.value, millisecond: 0 }, n.amount, n.unit), { granularity: i } = t;
|
|
3731
3731
|
if (i === "second" || i === "minute" || i === "hour") {
|
|
3732
3732
|
const o = {
|
|
3733
3733
|
...a,
|
|
3734
3734
|
second: i === "second" ? a.second : 0,
|
|
3735
3735
|
minute: i === "hour" ? 0 : a.minute
|
|
3736
3736
|
};
|
|
3737
|
-
return `${
|
|
3737
|
+
return `${Ne(o)}T${T(o.hour)}:${T(o.minute)}:${T(o.second)}`;
|
|
3738
3738
|
}
|
|
3739
|
-
return
|
|
3739
|
+
return Ne(mr(a, i, t.calendar));
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3742
|
-
const n =
|
|
3741
|
+
function xc(e, t) {
|
|
3742
|
+
const n = oe(e, t);
|
|
3743
3743
|
if (!n.ok || !n.value) return;
|
|
3744
3744
|
const r = { ...n.value, millisecond: 0 }, a = t.calendar.tz;
|
|
3745
3745
|
return {
|
|
3746
|
-
startInclusive:
|
|
3747
|
-
endExclusive:
|
|
3746
|
+
startInclusive: gt(r, a).toISOString(),
|
|
3747
|
+
endExclusive: gt(be(r, 1, t.granularity), a).toISOString(),
|
|
3748
3748
|
timezone: a
|
|
3749
3749
|
};
|
|
3750
3750
|
}
|
|
3751
|
-
function
|
|
3751
|
+
function Dc(e, t) {
|
|
3752
3752
|
const { granularity: n } = t;
|
|
3753
3753
|
if (n === "second" || n === "minute" || n === "hour") return;
|
|
3754
|
-
const r =
|
|
3754
|
+
const r = oe(e, t);
|
|
3755
3755
|
if (!r.ok || !r.value) return;
|
|
3756
|
-
const a = { ...r.value, hour: 0, minute: 0, second: 0, millisecond: 0 }, i =
|
|
3757
|
-
return { first:
|
|
3756
|
+
const a = { ...r.value, hour: 0, minute: 0, second: 0, millisecond: 0 }, i = be(be(a, 1, n), -1, "day");
|
|
3757
|
+
return { first: Ne(a), last: Ne(i) };
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3759
|
+
function Sc(e) {
|
|
3760
3760
|
const { granularity: t, calendar: n } = e, r = (o, s) => new Intl.DateTimeFormat("en-US", { ...o, timeZone: "UTC" }).format(s), a = [`by ${t} in the ${n.tz} calendar`];
|
|
3761
3761
|
t === "week" && a.push(`weeks starting on ${r({ weekday: "long" }, new Date(Date.UTC(2023, 0, 1 + n.weekStart)))}`);
|
|
3762
|
-
const i =
|
|
3762
|
+
const i = Ie(e);
|
|
3763
3763
|
return i && (t === "quarter" || t === "year") && a.push(`the fiscal year starting in ${r({ month: "long" }, new Date(Date.UTC(2e3, i - 1, 1)))}`), `${a.join(", ")}; each value is a bucket's start`;
|
|
3764
3764
|
}
|
|
3765
|
-
function
|
|
3765
|
+
function Rn(e) {
|
|
3766
3766
|
if (!v(e))
|
|
3767
3767
|
return {
|
|
3768
3768
|
ok: !1,
|
|
@@ -3783,12 +3783,12 @@ function Pn(e) {
|
|
|
3783
3783
|
message: `Unknown property "${c}".`
|
|
3784
3784
|
});
|
|
3785
3785
|
if (o === "preset")
|
|
3786
|
-
|
|
3786
|
+
wo(r.preset) || t.push({ path: "presentation.preset", message: "Expected a supported preset." });
|
|
3787
3787
|
else if (o === "pattern")
|
|
3788
3788
|
if (typeof r.pattern != "string" || !r.pattern)
|
|
3789
3789
|
t.push({ path: "presentation.pattern", message: "Expected a non-empty pattern." });
|
|
3790
3790
|
else {
|
|
3791
|
-
const c =
|
|
3791
|
+
const c = ie(r.pattern, "grouped");
|
|
3792
3792
|
c.ok || t.push({
|
|
3793
3793
|
path: "presentation.pattern",
|
|
3794
3794
|
message: c.message
|
|
@@ -3811,7 +3811,7 @@ function Pn(e) {
|
|
|
3811
3811
|
} else
|
|
3812
3812
|
t.push({ path: "presentation.mode", message: "Expected auto, preset, or pattern." });
|
|
3813
3813
|
}
|
|
3814
|
-
const a =
|
|
3814
|
+
const a = te(e.locale);
|
|
3815
3815
|
if (a || t.push({ path: "locale", message: "Expected a supported base BCP 47 locale." }), t.length > 0 || !a || !v(r))
|
|
3816
3816
|
return { ok: !1, issues: t };
|
|
3817
3817
|
if (r.mode === "auto") {
|
|
@@ -3849,36 +3849,36 @@ function Pn(e) {
|
|
|
3849
3849
|
}
|
|
3850
3850
|
};
|
|
3851
3851
|
}
|
|
3852
|
-
function
|
|
3852
|
+
function Ko(e, t) {
|
|
3853
3853
|
const n = !!t.calendar.fiscalCalendar;
|
|
3854
|
-
return e === "fiscal_quarter_short" || e === "fiscal_year" ? n : e === "quarter_short" || e === "quarter_long" ||
|
|
3854
|
+
return e === "fiscal_quarter_short" || e === "fiscal_year" ? n : e === "quarter_short" || e === "quarter_long" || jn(e) && (t.granularity === "quarter" || t.granularity === "year") ? !n : !0;
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3857
|
-
return
|
|
3856
|
+
function Un(e, t) {
|
|
3857
|
+
return Nn(e, t.granularity).ok ? e.presentation.mode === "preset" ? Ko(e.presentation.preset, t) : !(e.presentation.mode === "pattern" && t.calendar.fiscalCalendar && (t.granularity === "quarter" || t.granularity === "year")) : !1;
|
|
3858
3858
|
}
|
|
3859
|
-
function
|
|
3859
|
+
function Kt(e, t) {
|
|
3860
3860
|
if (!(!e || e.presentation.mode === "auto"))
|
|
3861
|
-
return
|
|
3861
|
+
return Un(e, t) ? { type: "temporal_bucket", presentation: e.presentation } : void 0;
|
|
3862
3862
|
}
|
|
3863
|
-
function
|
|
3863
|
+
function Ln(e) {
|
|
3864
3864
|
var a;
|
|
3865
|
-
const t =
|
|
3865
|
+
const t = te(e.locale);
|
|
3866
3866
|
if (!t)
|
|
3867
|
-
throw new
|
|
3867
|
+
throw new pe(
|
|
3868
3868
|
"invalid_temporal_bucket_format",
|
|
3869
3869
|
"Temporal bucket locale must be a supported base BCP 47 locale."
|
|
3870
3870
|
);
|
|
3871
|
-
const n =
|
|
3871
|
+
const n = Kt(e.cardFormat, e.metadata);
|
|
3872
3872
|
if (n)
|
|
3873
3873
|
return { format: { ...n, locale: t }, source: "card" };
|
|
3874
|
-
const r = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ?
|
|
3874
|
+
const r = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ? Kt(e.semanticFormat.format, e.metadata) : void 0;
|
|
3875
3875
|
return r ? { format: { ...r, locale: t }, source: "semantic" } : {
|
|
3876
3876
|
format: {
|
|
3877
3877
|
type: "temporal_bucket",
|
|
3878
3878
|
locale: t,
|
|
3879
3879
|
presentation: {
|
|
3880
3880
|
mode: "auto",
|
|
3881
|
-
styles: e.styles ??
|
|
3881
|
+
styles: e.styles ?? Uo
|
|
3882
3882
|
}
|
|
3883
3883
|
},
|
|
3884
3884
|
source: "automatic"
|
|
@@ -3887,9 +3887,9 @@ function An(e) {
|
|
|
3887
3887
|
function T(e, t = 2) {
|
|
3888
3888
|
return String(e).padStart(t, "0");
|
|
3889
3889
|
}
|
|
3890
|
-
function
|
|
3890
|
+
function J(e, t, n) {
|
|
3891
3891
|
if (t === "en-US")
|
|
3892
|
-
return (n === "short" ?
|
|
3892
|
+
return (n === "short" ? Lo : Wo)[e - 1];
|
|
3893
3893
|
const r = new Date(Date.UTC(2e3, e - 1, 15));
|
|
3894
3894
|
return new Intl.DateTimeFormat(t, {
|
|
3895
3895
|
calendar: "gregory",
|
|
@@ -3897,7 +3897,7 @@ function Q(e, t, n) {
|
|
|
3897
3897
|
timeZone: "UTC"
|
|
3898
3898
|
}).format(r);
|
|
3899
3899
|
}
|
|
3900
|
-
function
|
|
3900
|
+
function Vo(e, t, n) {
|
|
3901
3901
|
return t.map((r) => {
|
|
3902
3902
|
if (r.kind === "literal") return r.value;
|
|
3903
3903
|
switch (r.value) {
|
|
@@ -3906,9 +3906,9 @@ function Ho(e, t, n) {
|
|
|
3906
3906
|
case "YY":
|
|
3907
3907
|
return T(e.year % 100);
|
|
3908
3908
|
case "MMMM":
|
|
3909
|
-
return
|
|
3909
|
+
return J(e.month, n, "long");
|
|
3910
3910
|
case "MMM":
|
|
3911
|
-
return
|
|
3911
|
+
return J(e.month, n, "short");
|
|
3912
3912
|
case "MM":
|
|
3913
3913
|
return T(e.month);
|
|
3914
3914
|
case "DD":
|
|
@@ -3921,7 +3921,7 @@ function Ho(e, t, n) {
|
|
|
3921
3921
|
return String(e.hour % 12 || 12);
|
|
3922
3922
|
case "a":
|
|
3923
3923
|
case "A":
|
|
3924
|
-
return
|
|
3924
|
+
return En(n, e.hour);
|
|
3925
3925
|
case "mm":
|
|
3926
3926
|
return T(e.minute);
|
|
3927
3927
|
case "ss":
|
|
@@ -3929,42 +3929,42 @@ function Ho(e, t, n) {
|
|
|
3929
3929
|
}
|
|
3930
3930
|
}).join("");
|
|
3931
3931
|
}
|
|
3932
|
-
const
|
|
3933
|
-
function
|
|
3934
|
-
const n = `${e}:${JSON.stringify(t)}`, r =
|
|
3932
|
+
const Vt = /* @__PURE__ */ new Map();
|
|
3933
|
+
function z(e, t) {
|
|
3934
|
+
const n = `${e}:${JSON.stringify(t)}`, r = Vt.get(n);
|
|
3935
3935
|
if (r) return r;
|
|
3936
3936
|
const a = new Intl.DateTimeFormat(e, t);
|
|
3937
|
-
return
|
|
3937
|
+
return Vt.set(n, a), a;
|
|
3938
3938
|
}
|
|
3939
|
-
function
|
|
3939
|
+
function ee(e) {
|
|
3940
3940
|
const t = /* @__PURE__ */ new Date(0);
|
|
3941
3941
|
return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
|
|
3942
3942
|
}
|
|
3943
|
-
function
|
|
3944
|
-
return
|
|
3943
|
+
function Bt(e, t, n) {
|
|
3944
|
+
return z(t, {
|
|
3945
3945
|
calendar: "gregory",
|
|
3946
3946
|
dateStyle: n,
|
|
3947
3947
|
timeZone: "UTC"
|
|
3948
|
-
}).format(
|
|
3948
|
+
}).format(ee(e));
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3951
|
-
return
|
|
3950
|
+
function Bo(e, t, n) {
|
|
3951
|
+
return z(t, {
|
|
3952
3952
|
calendar: "gregory",
|
|
3953
3953
|
dateStyle: n.dateStyle,
|
|
3954
3954
|
// Grouped buckets are civil values, not instants. Long time styles would
|
|
3955
3955
|
// append a zone label that the canonical value does not semantically own.
|
|
3956
3956
|
timeStyle: n.timeStyle === "long" ? "medium" : n.timeStyle,
|
|
3957
3957
|
timeZone: "UTC"
|
|
3958
|
-
}).format(
|
|
3958
|
+
}).format(ee(e));
|
|
3959
3959
|
}
|
|
3960
|
-
function
|
|
3960
|
+
function Go(e, t, n) {
|
|
3961
3961
|
var a;
|
|
3962
3962
|
if (n === "short") {
|
|
3963
|
-
const i =
|
|
3963
|
+
const i = ee(e), o = z(t, {
|
|
3964
3964
|
calendar: "gregory",
|
|
3965
3965
|
dateStyle: "short",
|
|
3966
3966
|
timeZone: "UTC"
|
|
3967
|
-
}).formatToParts(i), s = o.findIndex((l) => l.type === "month"), c = o.findIndex((l) => l.type === "year"), u = (a =
|
|
3967
|
+
}).formatToParts(i), s = o.findIndex((l) => l.type === "month"), c = o.findIndex((l) => l.type === "year"), u = (a = z(t, {
|
|
3968
3968
|
calendar: "gregory",
|
|
3969
3969
|
timeZone: "UTC",
|
|
3970
3970
|
year: "numeric"
|
|
@@ -3975,138 +3975,138 @@ function qo(e, t, n) {
|
|
|
3975
3975
|
return o.slice(l, f + 1).filter((d) => d.type === "day" ? (m = !0, !1) : m && d.type === "literal" ? (m = !1, !1) : !0).map((d) => d.type === "year" ? u : d.value).join("");
|
|
3976
3976
|
}
|
|
3977
3977
|
}
|
|
3978
|
-
return
|
|
3978
|
+
return z(t, {
|
|
3979
3979
|
calendar: "gregory",
|
|
3980
3980
|
month: n === "short" ? "numeric" : n === "medium" ? "short" : "long",
|
|
3981
3981
|
timeZone: "UTC",
|
|
3982
3982
|
year: "numeric"
|
|
3983
|
-
}).format(
|
|
3983
|
+
}).format(ee(e));
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Wn(e, t) {
|
|
3986
3986
|
return Math.floor((e.month - t + 12) % 12 / 3) + 1;
|
|
3987
3987
|
}
|
|
3988
|
-
function
|
|
3988
|
+
function Gt(e, t) {
|
|
3989
3989
|
return t === 1 || e.month < t ? e.year : e.year + 1;
|
|
3990
3990
|
}
|
|
3991
|
-
function
|
|
3991
|
+
function Hn(e) {
|
|
3992
3992
|
return e === 1 ? "1st" : e === 2 ? "2nd" : e === 3 ? "3rd" : `${e}th`;
|
|
3993
3993
|
}
|
|
3994
|
-
function
|
|
3994
|
+
function jn(e) {
|
|
3995
3995
|
return e === "short" || e === "long" || e === "numeric" || e === "iso";
|
|
3996
3996
|
}
|
|
3997
|
-
function
|
|
3998
|
-
return t === "iso" ? `${T(e.year, 4)}-${T(e.month)}-${T(e.day)}` :
|
|
3997
|
+
function je(e, t, n) {
|
|
3998
|
+
return t === "iso" ? `${T(e.year, 4)}-${T(e.month)}-${T(e.day)}` : z(n, {
|
|
3999
3999
|
calendar: "gregory",
|
|
4000
4000
|
month: t === "numeric" ? "numeric" : t === "long" ? "long" : "short",
|
|
4001
4001
|
day: "numeric",
|
|
4002
4002
|
year: "numeric",
|
|
4003
4003
|
timeZone: "UTC"
|
|
4004
|
-
}).format(
|
|
4004
|
+
}).format(ee(e));
|
|
4005
4005
|
}
|
|
4006
|
-
function
|
|
4007
|
-
const a =
|
|
4006
|
+
function Qo(e, t, n, r) {
|
|
4007
|
+
const a = Wn(e, 1);
|
|
4008
4008
|
switch (r) {
|
|
4009
4009
|
case "week":
|
|
4010
|
-
return t === "numeric" || t === "iso" ?
|
|
4010
|
+
return t === "numeric" || t === "iso" ? je(e, t, n) : `Week of ${je(e, t, n)}`;
|
|
4011
4011
|
case "month":
|
|
4012
|
-
return t === "iso" ? `${T(e.year, 4)}-${T(e.month)}` : t === "numeric" ? `${T(e.month)}/${T(e.year, 4)}` : `${
|
|
4012
|
+
return t === "iso" ? `${T(e.year, 4)}-${T(e.month)}` : t === "numeric" ? `${T(e.month)}/${T(e.year, 4)}` : `${J(e.month, n, t === "long" ? "long" : "short")} ${e.year}`;
|
|
4013
4013
|
case "quarter":
|
|
4014
|
-
return t === "iso" ? `${T(e.year, 4)}-Q${a}` : t === "long" ? `${
|
|
4014
|
+
return t === "iso" ? `${T(e.year, 4)}-Q${a}` : t === "long" ? `${Hn(a)} Quarter ${e.year}` : `Q${a} ${e.year}`;
|
|
4015
4015
|
case "year":
|
|
4016
4016
|
return String(e.year);
|
|
4017
4017
|
default:
|
|
4018
|
-
return
|
|
4018
|
+
return je(e, t, n);
|
|
4019
4019
|
}
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4022
|
-
if (
|
|
4023
|
-
return
|
|
4024
|
-
const a =
|
|
4021
|
+
function Je(e, t, n, r) {
|
|
4022
|
+
if (jn(t))
|
|
4023
|
+
return Qo(e, t, n, r.granularity);
|
|
4024
|
+
const a = Ie(r) ?? 1, i = Wn(e, a);
|
|
4025
4025
|
switch (t) {
|
|
4026
4026
|
case "week_of_short":
|
|
4027
|
-
return `Week of ${
|
|
4027
|
+
return `Week of ${J(e.month, n, "short")} ${e.day}, ${e.year}`;
|
|
4028
4028
|
case "week_of_long":
|
|
4029
|
-
return `Week of ${
|
|
4029
|
+
return `Week of ${J(e.month, n, "long")} ${e.day}, ${e.year}`;
|
|
4030
4030
|
case "quarter_short":
|
|
4031
4031
|
return `Q${i} ${e.year}`;
|
|
4032
4032
|
case "quarter_long":
|
|
4033
|
-
return `${
|
|
4033
|
+
return `${Hn(i)} Quarter ${e.year}`;
|
|
4034
4034
|
case "fiscal_quarter_short":
|
|
4035
|
-
return `Q${i} FY${
|
|
4035
|
+
return `Q${i} FY${Gt(e, a)}`;
|
|
4036
4036
|
case "fiscal_year":
|
|
4037
|
-
return `FY${
|
|
4037
|
+
return `FY${Gt(e, a)}`;
|
|
4038
4038
|
}
|
|
4039
4039
|
}
|
|
4040
|
-
function
|
|
4041
|
-
const a =
|
|
4040
|
+
function Jo(e, t, n, r) {
|
|
4041
|
+
const a = Ie(t);
|
|
4042
4042
|
switch (t.granularity) {
|
|
4043
4043
|
case "second":
|
|
4044
4044
|
case "minute":
|
|
4045
4045
|
case "hour":
|
|
4046
|
-
return
|
|
4046
|
+
return Bo(e, n, r.dateTime);
|
|
4047
4047
|
case "day":
|
|
4048
|
-
return
|
|
4048
|
+
return Bt(e, n, r.dateStyle);
|
|
4049
4049
|
case "week":
|
|
4050
|
-
return `Week of ${
|
|
4050
|
+
return `Week of ${Bt(e, n, r.dateStyle)}`;
|
|
4051
4051
|
case "month":
|
|
4052
|
-
return
|
|
4052
|
+
return Go(e, n, r.dateStyle);
|
|
4053
4053
|
case "quarter":
|
|
4054
|
-
return
|
|
4054
|
+
return Je(
|
|
4055
4055
|
e,
|
|
4056
4056
|
a ? "fiscal_quarter_short" : "quarter_short",
|
|
4057
4057
|
n,
|
|
4058
4058
|
t
|
|
4059
4059
|
);
|
|
4060
4060
|
case "year":
|
|
4061
|
-
return a ?
|
|
4061
|
+
return a ? Je(e, "fiscal_year", n, t) : String(e.year);
|
|
4062
4062
|
}
|
|
4063
4063
|
}
|
|
4064
|
-
function
|
|
4064
|
+
function Mc(e, t) {
|
|
4065
4065
|
if (t.granularity !== "second" && t.granularity !== "minute" && t.granularity !== "hour" && t.granularity !== "day" && t.granularity !== "month")
|
|
4066
4066
|
return;
|
|
4067
|
-
const n =
|
|
4067
|
+
const n = oe(e, t);
|
|
4068
4068
|
if (!n.ok || n.value === null) return;
|
|
4069
4069
|
const { year: r, month: a, day: i, hour: o, minute: s, second: c } = n.value;
|
|
4070
4070
|
return { year: r, month: a, day: i, hour: o, minute: s, second: c };
|
|
4071
4071
|
}
|
|
4072
|
-
function
|
|
4073
|
-
const t =
|
|
4074
|
-
if (!t.ok || !
|
|
4075
|
-
throw new
|
|
4072
|
+
function lt(e) {
|
|
4073
|
+
const t = Rn(e.format);
|
|
4074
|
+
if (!t.ok || !Un(t.value, e.metadata))
|
|
4075
|
+
throw new pe(
|
|
4076
4076
|
"invalid_temporal_bucket_format",
|
|
4077
4077
|
"Resolved temporal bucket format is invalid or inapplicable to its metadata."
|
|
4078
4078
|
);
|
|
4079
|
-
const n =
|
|
4079
|
+
const n = oe(e.value, e.metadata);
|
|
4080
4080
|
if (!n.ok)
|
|
4081
|
-
throw new
|
|
4081
|
+
throw new pe(
|
|
4082
4082
|
n.error.code,
|
|
4083
4083
|
n.error.message
|
|
4084
4084
|
);
|
|
4085
4085
|
if (n.value === null) return "(Blank)";
|
|
4086
4086
|
const { presentation: r, locale: a } = t.value;
|
|
4087
4087
|
if (r.mode === "auto")
|
|
4088
|
-
return
|
|
4088
|
+
return Jo(
|
|
4089
4089
|
n.value,
|
|
4090
4090
|
e.metadata,
|
|
4091
4091
|
a,
|
|
4092
4092
|
r.styles
|
|
4093
4093
|
);
|
|
4094
4094
|
if (r.mode === "preset")
|
|
4095
|
-
return
|
|
4095
|
+
return Je(
|
|
4096
4096
|
n.value,
|
|
4097
4097
|
r.preset,
|
|
4098
4098
|
a,
|
|
4099
4099
|
e.metadata
|
|
4100
4100
|
);
|
|
4101
|
-
const i =
|
|
4101
|
+
const i = ie(r.pattern, "grouped");
|
|
4102
4102
|
if (!i.ok)
|
|
4103
|
-
throw new
|
|
4103
|
+
throw new pe(
|
|
4104
4104
|
"invalid_temporal_bucket_format",
|
|
4105
4105
|
i.message
|
|
4106
4106
|
);
|
|
4107
|
-
return
|
|
4107
|
+
return Vo(n.value, i.segments, a);
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4109
|
+
function es(e, t) {
|
|
4110
4110
|
var a;
|
|
4111
4111
|
const n = e[e.length - 1];
|
|
4112
4112
|
if (!n) return "";
|
|
@@ -4114,21 +4114,21 @@ function Ko(e, t) {
|
|
|
4114
4114
|
const r = n.member.value;
|
|
4115
4115
|
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));
|
|
4116
4116
|
}
|
|
4117
|
-
function
|
|
4118
|
-
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(
|
|
4117
|
+
function ts(e, t, n) {
|
|
4118
|
+
return e === "grand_total" ? n ?? "Grand Total" : e === "subtotal" ? (n == null ? void 0 : n.split(er).join(t)) ?? `${t} Total` : t;
|
|
4119
4119
|
}
|
|
4120
|
-
function
|
|
4120
|
+
function kc(e, t, n, r) {
|
|
4121
4121
|
var o;
|
|
4122
4122
|
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;
|
|
4123
|
-
return
|
|
4123
|
+
return ts(t, es(e, r), i);
|
|
4124
4124
|
}
|
|
4125
|
-
function
|
|
4125
|
+
function _c(e, t, n) {
|
|
4126
4126
|
return e.kind === "value" ? (t == null ? void 0 : t(e.value)) ?? "" : e.kind === "null" ? n.nullText : n.emptyText;
|
|
4127
4127
|
}
|
|
4128
|
-
function
|
|
4128
|
+
function $c(e) {
|
|
4129
4129
|
const { path: t, previousPath: n, role: r, repeatLabels: a, levelCount: i } = e;
|
|
4130
4130
|
return Array.from({ length: i }, (o, s) => {
|
|
4131
|
-
const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, l = n && n.length > s &&
|
|
4131
|
+
const c = t.slice(0, s + 1), u = r === "grand_total" ? s === 0 : r === "subtotal" && s === t.length - 1, l = n && n.length > s && ht(n.slice(0, s + 1)) === ht(c);
|
|
4132
4132
|
return {
|
|
4133
4133
|
path: c,
|
|
4134
4134
|
total: u,
|
|
@@ -4136,42 +4136,42 @@ function Tc(e) {
|
|
|
4136
4136
|
};
|
|
4137
4137
|
});
|
|
4138
4138
|
}
|
|
4139
|
-
function
|
|
4140
|
-
return (e == null ? void 0 : e.type) === "date" ? { type: "raw_temporal", timezone: e.timezone, sourceTimezone: e.sourceTimezone, presentation:
|
|
4139
|
+
function ns(e) {
|
|
4140
|
+
return (e == null ? void 0 : e.type) === "date" ? { type: "raw_temporal", timezone: e.timezone, sourceTimezone: e.sourceTimezone, presentation: So(e) } : void 0;
|
|
4141
4141
|
}
|
|
4142
|
-
function
|
|
4143
|
-
return
|
|
4142
|
+
function rs(e, t) {
|
|
4143
|
+
return Gi(st({ override: e, model: t }).format, {
|
|
4144
4144
|
preserveOmittedProperties: !0,
|
|
4145
4145
|
numericInput: "canonical"
|
|
4146
4146
|
});
|
|
4147
4147
|
}
|
|
4148
|
-
function
|
|
4148
|
+
function Nc(e, t, n) {
|
|
4149
4149
|
const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
4150
|
-
const c = (s === "levels" ? t.levelFormats : t.measureFormats)[o.id], u = o.semanticFormat, l =
|
|
4150
|
+
const c = (s === "levels" ? t.levelFormats : t.measureFormats)[o.id], u = o.semanticFormat, l = rs(c, u);
|
|
4151
4151
|
s === "measures" && r.set(o.id, {
|
|
4152
|
-
isNumeric:
|
|
4152
|
+
isNumeric: Jn(o.column.dataType) === "number",
|
|
4153
4153
|
// Use normalized affixes: a redundant percent suffix is already removed.
|
|
4154
4154
|
hasTextAffixes: !!l && !!("prefix" in l && l.prefix || "suffix" in l && l.suffix)
|
|
4155
4155
|
});
|
|
4156
|
-
const f = (m) =>
|
|
4156
|
+
const f = (m) => Sn(m, void 0, {
|
|
4157
4157
|
useFormattedValues: !0,
|
|
4158
4158
|
timezone: n.calendar.tz,
|
|
4159
4159
|
locale: n.valueFormat.locale,
|
|
4160
4160
|
absence: t.absence
|
|
4161
4161
|
});
|
|
4162
4162
|
if (o.column.temporalBucket) {
|
|
4163
|
-
const m = o.column.temporalBucket, d =
|
|
4163
|
+
const m = o.column.temporalBucket, d = Ln({
|
|
4164
4164
|
metadata: m,
|
|
4165
4165
|
cardFormat: (c == null ? void 0 : c.type) === "temporal_bucket" ? c : void 0,
|
|
4166
4166
|
semanticFormat: (u == null ? void 0 : u.type) === "temporal_bucket" ? { granularity: m.granularity, format: u } : void 0,
|
|
4167
4167
|
locale: n.valueFormat.locale,
|
|
4168
4168
|
styles: { dateStyle: n.valueFormat.dateStyle, dateTime: n.valueFormat.dateTime }
|
|
4169
4169
|
});
|
|
4170
|
-
return (h) => typeof h == "string" ?
|
|
4170
|
+
return (h) => typeof h == "string" ? lt({ value: h, metadata: m, format: d.format }) : f(h);
|
|
4171
4171
|
}
|
|
4172
4172
|
if (o.column.rawTemporal) {
|
|
4173
|
-
const m =
|
|
4174
|
-
authored:
|
|
4173
|
+
const m = st({ override: c, model: u }).format, { formatValue: d } = Ro({
|
|
4174
|
+
authored: ns(m),
|
|
4175
4175
|
metadata: o.column.rawTemporal,
|
|
4176
4176
|
preferences: n.valueFormat,
|
|
4177
4177
|
calendar: n.calendar
|
|
@@ -4182,11 +4182,11 @@ function vc(e, t, n) {
|
|
|
4182
4182
|
return S.ok ? S.text : f(h);
|
|
4183
4183
|
};
|
|
4184
4184
|
}
|
|
4185
|
-
if (
|
|
4186
|
-
const m =
|
|
4187
|
-
return s === "measures" && a.set(o.id, m), (d) => typeof d == "number" || typeof d == "object" && d !== null ?
|
|
4185
|
+
if (ne(l)) {
|
|
4186
|
+
const m = fo(l, n.valueFormat);
|
|
4187
|
+
return s === "measures" && a.set(o.id, m), (d) => typeof d == "number" || typeof d == "object" && d !== null ? rt(d, m) : f(d);
|
|
4188
4188
|
}
|
|
4189
|
-
return (l == null ? void 0 : l.type) === "duration" && s === "measures" && a.set(o.id, l), (l == null ? void 0 : l.type) === "duration" ? (m) => typeof m == "number" || typeof m == "string" || typeof m == "object" && m !== null ?
|
|
4189
|
+
return (l == null ? void 0 : l.type) === "duration" && s === "measures" && a.set(o.id, l), (l == null ? void 0 : l.type) === "duration" ? (m) => typeof m == "number" || typeof m == "string" || typeof m == "object" && m !== null ? on(
|
|
4190
4190
|
typeof m == "object" ? m.value : m,
|
|
4191
4191
|
l
|
|
4192
4192
|
) : f(m) : (l == null ? void 0 : l.type) === "string" ? (m) => m === null ? f(m) : `${l.prefix ?? ""}${f(m)}${l.suffix ?? ""}` : f;
|
|
@@ -4203,17 +4203,17 @@ function vc(e, t, n) {
|
|
|
4203
4203
|
absence: t.absence
|
|
4204
4204
|
};
|
|
4205
4205
|
}
|
|
4206
|
-
function
|
|
4206
|
+
function Ec(e, t) {
|
|
4207
4207
|
return t.levelLabels[e.id] ?? e.field.label ?? e.field.name;
|
|
4208
4208
|
}
|
|
4209
|
-
function
|
|
4209
|
+
function Oc(e, t) {
|
|
4210
4210
|
return t.measureLabels[e.id] ?? (e.kind === "aggregate" ? e.field.label ?? e.field.name : e.definition.label);
|
|
4211
4211
|
}
|
|
4212
|
-
function
|
|
4213
|
-
return
|
|
4212
|
+
function Ic(e) {
|
|
4213
|
+
return ar.parse(as(e));
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4216
|
-
const t =
|
|
4215
|
+
function as(e) {
|
|
4216
|
+
const t = tr.parse(e), n = (r) => ({
|
|
4217
4217
|
grand: { visible: !0, position: "after" },
|
|
4218
4218
|
levels: Object.fromEntries(
|
|
4219
4219
|
r.map((a) => [
|
|
@@ -4222,7 +4222,7 @@ function Qo(e) {
|
|
|
4222
4222
|
])
|
|
4223
4223
|
)
|
|
4224
4224
|
});
|
|
4225
|
-
return
|
|
4225
|
+
return nr.parse({
|
|
4226
4226
|
version: 1,
|
|
4227
4227
|
spec: t,
|
|
4228
4228
|
presentation: {
|
|
@@ -4240,14 +4240,14 @@ function Qo(e) {
|
|
|
4240
4240
|
}
|
|
4241
4241
|
});
|
|
4242
4242
|
}
|
|
4243
|
-
function
|
|
4243
|
+
function is(e, t) {
|
|
4244
4244
|
const n = new Map(e.map((r) => [B(r), r]));
|
|
4245
4245
|
for (const r of t ?? []) n.set(B(r), r);
|
|
4246
4246
|
return [...n.values()];
|
|
4247
4247
|
}
|
|
4248
|
-
function
|
|
4249
|
-
const { spec: t, presentation: n, defaults: r, session: a } =
|
|
4250
|
-
|
|
4248
|
+
function Cc(e) {
|
|
4249
|
+
const { spec: t, presentation: n, defaults: r, session: a } = rr.parse(e), i = new Map(
|
|
4250
|
+
is(t.sorts, a == null ? void 0 : a.sorts).map((s) => [B(s), s])
|
|
4251
4251
|
);
|
|
4252
4252
|
for (const s of ["rows", "columns"])
|
|
4253
4253
|
for (const c of t[s]) {
|
|
@@ -4281,35 +4281,35 @@ function Sc(e) {
|
|
|
4281
4281
|
}
|
|
4282
4282
|
};
|
|
4283
4283
|
}
|
|
4284
|
-
class
|
|
4284
|
+
class Qt extends Error {
|
|
4285
4285
|
constructor(n) {
|
|
4286
4286
|
super(
|
|
4287
4287
|
`invalid_presentation_execution_snapshot: ${n} Resave this report before running it again.`
|
|
4288
4288
|
);
|
|
4289
|
-
|
|
4290
|
-
|
|
4289
|
+
_(this, "code", "invalid_presentation_execution_snapshot");
|
|
4290
|
+
_(this, "deliveryBlocking", !0);
|
|
4291
4291
|
this.name = "PresentationExecutionSnapshotError";
|
|
4292
4292
|
}
|
|
4293
4293
|
}
|
|
4294
|
-
class
|
|
4294
|
+
class Fc extends Error {
|
|
4295
4295
|
constructor(n) {
|
|
4296
4296
|
super(
|
|
4297
4297
|
`missing_resolved_raw_temporal_format: Column "${n}" has no captured presentation. Resave this report before running it again.`
|
|
4298
4298
|
);
|
|
4299
|
-
|
|
4300
|
-
|
|
4299
|
+
_(this, "code", "missing_resolved_raw_temporal_format");
|
|
4300
|
+
_(this, "deliveryBlocking", !0);
|
|
4301
4301
|
this.name = "MissingResolvedRawTemporalFormatError";
|
|
4302
4302
|
}
|
|
4303
4303
|
}
|
|
4304
|
-
function
|
|
4304
|
+
function C(e, t, n) {
|
|
4305
4305
|
const r = new Set(t), a = Object.keys(e).find((i) => !r.has(i));
|
|
4306
4306
|
if (a)
|
|
4307
4307
|
throw new Error(`${n} contains unknown property "${a}"`);
|
|
4308
4308
|
}
|
|
4309
|
-
function
|
|
4309
|
+
function os(e, t = "scope") {
|
|
4310
4310
|
if (!v(e))
|
|
4311
4311
|
throw new Error(`${t} must be an object`);
|
|
4312
|
-
|
|
4312
|
+
C(
|
|
4313
4313
|
e,
|
|
4314
4314
|
["dashboardId", "cardId", "attachmentIndex"],
|
|
4315
4315
|
t
|
|
@@ -4331,22 +4331,22 @@ function es(e, t = "scope") {
|
|
|
4331
4331
|
...typeof a == "number" ? { attachmentIndex: a } : {}
|
|
4332
4332
|
};
|
|
4333
4333
|
}
|
|
4334
|
-
function
|
|
4334
|
+
function R(e, t, n, r) {
|
|
4335
4335
|
if (e.kind !== t) return;
|
|
4336
|
-
|
|
4336
|
+
C(e, ["kind", n], r);
|
|
4337
4337
|
const a = e[n];
|
|
4338
4338
|
if (typeof a != "string" || !a.trim())
|
|
4339
4339
|
throw new Error(`${r}.${n} is required`);
|
|
4340
4340
|
return a;
|
|
4341
4341
|
}
|
|
4342
|
-
function
|
|
4342
|
+
function qe(e, t) {
|
|
4343
4343
|
if (!v(e))
|
|
4344
4344
|
throw new Error(`${t} must be an object`);
|
|
4345
|
-
const n =
|
|
4345
|
+
const n = R(e, "metric", "metricId", t);
|
|
4346
4346
|
if (n) return { kind: "metric", metricId: n };
|
|
4347
|
-
const r =
|
|
4347
|
+
const r = R(e, "column", "columnKey", t);
|
|
4348
4348
|
if (r) return { kind: "column", columnKey: r };
|
|
4349
|
-
const a =
|
|
4349
|
+
const a = R(
|
|
4350
4350
|
e,
|
|
4351
4351
|
"matrix_measure",
|
|
4352
4352
|
"measureId",
|
|
@@ -4355,7 +4355,7 @@ function He(e, t) {
|
|
|
4355
4355
|
if (a) return { kind: "matrix_measure", measureId: a };
|
|
4356
4356
|
throw new Error(`${t} is not a valid numeric presentation target`);
|
|
4357
4357
|
}
|
|
4358
|
-
const
|
|
4358
|
+
const ss = [
|
|
4359
4359
|
"type",
|
|
4360
4360
|
"inputUnit",
|
|
4361
4361
|
"outputStyle",
|
|
@@ -4366,12 +4366,12 @@ const ts = [
|
|
|
4366
4366
|
"suffix",
|
|
4367
4367
|
"negativeStyle"
|
|
4368
4368
|
];
|
|
4369
|
-
function
|
|
4369
|
+
function cs(e) {
|
|
4370
4370
|
return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
|
|
4371
4371
|
}
|
|
4372
|
-
const
|
|
4373
|
-
function
|
|
4374
|
-
if (
|
|
4372
|
+
const us = ["type", "locale", "pattern", "timezone", "sourceTimezone"];
|
|
4373
|
+
function ls(e, t) {
|
|
4374
|
+
if (C(e, us, t), typeof e.locale != "string" || !e.locale.trim())
|
|
4375
4375
|
throw new Error(`${t}.locale must be a non-empty string`);
|
|
4376
4376
|
for (const n of ["pattern", "timezone", "sourceTimezone"])
|
|
4377
4377
|
if (e[n] !== void 0 && typeof e[n] != "string")
|
|
@@ -4384,10 +4384,10 @@ function as(e, t) {
|
|
|
4384
4384
|
...typeof e.sourceTimezone == "string" ? { sourceTimezone: e.sourceTimezone } : {}
|
|
4385
4385
|
};
|
|
4386
4386
|
}
|
|
4387
|
-
function
|
|
4388
|
-
|
|
4387
|
+
function ms(e, t) {
|
|
4388
|
+
C(e, ss, t);
|
|
4389
4389
|
for (const i of ["inputUnit", "largestUnit", "smallestUnit"])
|
|
4390
|
-
if (e[i] !== void 0 && !
|
|
4390
|
+
if (e[i] !== void 0 && !cs(e[i]))
|
|
4391
4391
|
throw new Error(`${t}.${i} must be a duration unit`);
|
|
4392
4392
|
const n = e.outputStyle;
|
|
4393
4393
|
if (n !== void 0 && n !== "compact" && n !== "digital" && n !== "long")
|
|
@@ -4413,11 +4413,11 @@ function is(e, t) {
|
|
|
4413
4413
|
...a !== void 0 ? { negativeStyle: a } : {}
|
|
4414
4414
|
};
|
|
4415
4415
|
}
|
|
4416
|
-
function
|
|
4416
|
+
function fs(e, t) {
|
|
4417
4417
|
if (!v(e))
|
|
4418
4418
|
throw new Error(`${t} must be an object`);
|
|
4419
4419
|
if (e.kind === "field") {
|
|
4420
|
-
|
|
4420
|
+
C(e, ["kind", "fieldId", "role"], t);
|
|
4421
4421
|
const a = typeof e.fieldId == "string" ? e.fieldId.trim() : "";
|
|
4422
4422
|
if (!a)
|
|
4423
4423
|
throw new Error(`${t}.fieldId is required`);
|
|
@@ -4430,9 +4430,9 @@ function os(e, t) {
|
|
|
4430
4430
|
...i ? { role: i } : {}
|
|
4431
4431
|
};
|
|
4432
4432
|
}
|
|
4433
|
-
const n =
|
|
4433
|
+
const n = R(e, "column", "columnKey", t);
|
|
4434
4434
|
if (n) return { kind: "column", columnKey: n };
|
|
4435
|
-
const r =
|
|
4435
|
+
const r = R(
|
|
4436
4436
|
e,
|
|
4437
4437
|
"matrix_axis",
|
|
4438
4438
|
"axisInstanceId",
|
|
@@ -4441,22 +4441,22 @@ function os(e, t) {
|
|
|
4441
4441
|
if (r) return { kind: "matrix_axis", axisInstanceId: r };
|
|
4442
4442
|
throw new Error(`${t} is not a valid temporal bucket presentation target`);
|
|
4443
4443
|
}
|
|
4444
|
-
function
|
|
4444
|
+
function ds(e, t) {
|
|
4445
4445
|
if (!v(e))
|
|
4446
4446
|
throw new Error(`${t} must be an object`);
|
|
4447
|
-
const n =
|
|
4447
|
+
const n = R(e, "column", "columnKey", t);
|
|
4448
4448
|
if (!n)
|
|
4449
4449
|
throw new Error(`${t} must identify a column`);
|
|
4450
4450
|
return { kind: "column", columnKey: n };
|
|
4451
4451
|
}
|
|
4452
|
-
function
|
|
4452
|
+
function hs(e) {
|
|
4453
4453
|
return [
|
|
4454
4454
|
e.dashboardId,
|
|
4455
4455
|
e.cardId ?? null,
|
|
4456
4456
|
e.attachmentIndex ?? null
|
|
4457
4457
|
];
|
|
4458
4458
|
}
|
|
4459
|
-
function
|
|
4459
|
+
function Ee(e) {
|
|
4460
4460
|
switch (e.kind) {
|
|
4461
4461
|
case "metric":
|
|
4462
4462
|
return [e.kind, e.metricId];
|
|
@@ -4470,14 +4470,14 @@ function Ne(e) {
|
|
|
4470
4470
|
return [e.kind, e.axisInstanceId];
|
|
4471
4471
|
}
|
|
4472
4472
|
}
|
|
4473
|
-
function
|
|
4473
|
+
function W(e, t) {
|
|
4474
4474
|
return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === t.attachmentIndex;
|
|
4475
4475
|
}
|
|
4476
|
-
function
|
|
4477
|
-
const n =
|
|
4476
|
+
function H(e, t) {
|
|
4477
|
+
const n = Ee(e), r = Ee(t);
|
|
4478
4478
|
return n.length === r.length && n.every((a, i) => a === r[i]);
|
|
4479
4479
|
}
|
|
4480
|
-
function
|
|
4480
|
+
function gs(e) {
|
|
4481
4481
|
if (!Array.isArray(e))
|
|
4482
4482
|
throw new Error("resolvedFormats must be an array");
|
|
4483
4483
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -4486,21 +4486,21 @@ function us(e) {
|
|
|
4486
4486
|
const a = `resolvedFormats.${r}`;
|
|
4487
4487
|
if (!v(n))
|
|
4488
4488
|
throw new Error(`${a} must be an object`);
|
|
4489
|
-
|
|
4490
|
-
const i =
|
|
4489
|
+
C(n, ["scope", "target", "format"], a);
|
|
4490
|
+
const i = os(n.scope, `${a}.scope`);
|
|
4491
4491
|
if (!v(n.format))
|
|
4492
4492
|
throw new Error(`${a}.format must be an object`);
|
|
4493
4493
|
let o;
|
|
4494
4494
|
switch (n.format.type) {
|
|
4495
4495
|
case "temporal_bucket": {
|
|
4496
|
-
const l =
|
|
4496
|
+
const l = Rn(n.format);
|
|
4497
4497
|
if (!l.ok)
|
|
4498
4498
|
throw new Error(
|
|
4499
4499
|
`${a}.format is invalid: ${((c = l.issues[0]) == null ? void 0 : c.message) ?? "invalid value"}`
|
|
4500
4500
|
);
|
|
4501
4501
|
o = {
|
|
4502
4502
|
scope: i,
|
|
4503
|
-
target:
|
|
4503
|
+
target: fs(n.target, `${a}.target`),
|
|
4504
4504
|
format: l.value
|
|
4505
4505
|
};
|
|
4506
4506
|
break;
|
|
@@ -4508,42 +4508,42 @@ function us(e) {
|
|
|
4508
4508
|
case "raw_temporal":
|
|
4509
4509
|
o = {
|
|
4510
4510
|
scope: i,
|
|
4511
|
-
target:
|
|
4512
|
-
format:
|
|
4511
|
+
target: ds(n.target, `${a}.target`),
|
|
4512
|
+
format: ct(n.format)
|
|
4513
4513
|
};
|
|
4514
4514
|
break;
|
|
4515
4515
|
case "number":
|
|
4516
4516
|
case "currency":
|
|
4517
4517
|
case "percent":
|
|
4518
4518
|
case "scientific": {
|
|
4519
|
-
const l =
|
|
4519
|
+
const l = uo(n.format);
|
|
4520
4520
|
if (!l.ok)
|
|
4521
4521
|
throw new Error(
|
|
4522
4522
|
`${a}.format is invalid: ${((u = l.issues[0]) == null ? void 0 : u.message) ?? "invalid value"}`
|
|
4523
4523
|
);
|
|
4524
4524
|
o = {
|
|
4525
4525
|
scope: i,
|
|
4526
|
-
target:
|
|
4526
|
+
target: qe(n.target, `${a}.target`),
|
|
4527
4527
|
format: l.value
|
|
4528
4528
|
};
|
|
4529
4529
|
break;
|
|
4530
4530
|
}
|
|
4531
4531
|
case "date": {
|
|
4532
|
-
const l =
|
|
4532
|
+
const l = qe(n.target, `${a}.target`);
|
|
4533
4533
|
if (l.kind !== "column")
|
|
4534
4534
|
throw new Error(`${a}.target must identify a column for a date format`);
|
|
4535
4535
|
o = {
|
|
4536
4536
|
scope: i,
|
|
4537
4537
|
target: l,
|
|
4538
|
-
format:
|
|
4538
|
+
format: ls(n.format, `${a}.format`)
|
|
4539
4539
|
};
|
|
4540
4540
|
break;
|
|
4541
4541
|
}
|
|
4542
4542
|
case "duration":
|
|
4543
4543
|
o = {
|
|
4544
4544
|
scope: i,
|
|
4545
|
-
target:
|
|
4546
|
-
format:
|
|
4545
|
+
target: qe(n.target, `${a}.target`),
|
|
4546
|
+
format: ms(
|
|
4547
4547
|
n.format,
|
|
4548
4548
|
`${a}.format`
|
|
4549
4549
|
)
|
|
@@ -4553,8 +4553,8 @@ function us(e) {
|
|
|
4553
4553
|
throw new Error(`${a}.format.type is unsupported`);
|
|
4554
4554
|
}
|
|
4555
4555
|
const s = JSON.stringify([
|
|
4556
|
-
...
|
|
4557
|
-
...
|
|
4556
|
+
...hs(o.scope),
|
|
4557
|
+
...Ee(o.target)
|
|
4558
4558
|
]);
|
|
4559
4559
|
if (t.has(s))
|
|
4560
4560
|
throw new Error(
|
|
@@ -4563,17 +4563,17 @@ function us(e) {
|
|
|
4563
4563
|
return t.add(s), o;
|
|
4564
4564
|
});
|
|
4565
4565
|
}
|
|
4566
|
-
function
|
|
4566
|
+
function ys(e) {
|
|
4567
4567
|
try {
|
|
4568
4568
|
if (!v(e))
|
|
4569
4569
|
throw new Error("presentation execution snapshot must be an object");
|
|
4570
|
-
if (
|
|
4570
|
+
if (C(
|
|
4571
4571
|
e,
|
|
4572
4572
|
["version", "reportContext", "resolvedFormats"],
|
|
4573
4573
|
"presentation execution snapshot"
|
|
4574
4574
|
), e.version !== 1)
|
|
4575
4575
|
throw new Error("presentation execution snapshot version must be 1");
|
|
4576
|
-
const t =
|
|
4576
|
+
const t = or(e.reportContext);
|
|
4577
4577
|
if (!t.ok) {
|
|
4578
4578
|
const n = t.issues[0];
|
|
4579
4579
|
throw new Error(
|
|
@@ -4583,64 +4583,64 @@ function ls(e) {
|
|
|
4583
4583
|
return {
|
|
4584
4584
|
version: 1,
|
|
4585
4585
|
reportContext: t.value,
|
|
4586
|
-
resolvedFormats:
|
|
4586
|
+
resolvedFormats: gs(e.resolvedFormats)
|
|
4587
4587
|
};
|
|
4588
4588
|
} catch (t) {
|
|
4589
|
-
throw t instanceof
|
|
4589
|
+
throw t instanceof Qt ? t : new Qt(
|
|
4590
4590
|
t instanceof Error ? t.message : "Snapshot is invalid."
|
|
4591
4591
|
);
|
|
4592
4592
|
}
|
|
4593
4593
|
}
|
|
4594
|
-
function
|
|
4595
|
-
return
|
|
4594
|
+
function ws(e) {
|
|
4595
|
+
return ys({
|
|
4596
4596
|
version: 1,
|
|
4597
4597
|
reportContext: e.reportContext,
|
|
4598
4598
|
resolvedFormats: [...e.resolvedFormats]
|
|
4599
4599
|
});
|
|
4600
4600
|
}
|
|
4601
|
-
function
|
|
4601
|
+
function Pc(e, t) {
|
|
4602
4602
|
const n = t.filter(
|
|
4603
4603
|
(r, a) => !e.resolvedFormats.some(
|
|
4604
|
-
(i) =>
|
|
4604
|
+
(i) => W(i.scope, r.scope) && H(i.target, r.target)
|
|
4605
4605
|
) && // One entry per target, as the snapshot's parser requires.
|
|
4606
4606
|
t.findIndex(
|
|
4607
|
-
(i) =>
|
|
4607
|
+
(i) => W(i.scope, r.scope) && H(i.target, r.target)
|
|
4608
4608
|
) === a
|
|
4609
4609
|
);
|
|
4610
|
-
return n.length === 0 ? e :
|
|
4610
|
+
return n.length === 0 ? e : ws({
|
|
4611
4611
|
reportContext: e.reportContext,
|
|
4612
4612
|
resolvedFormats: [...e.resolvedFormats, ...n]
|
|
4613
4613
|
});
|
|
4614
4614
|
}
|
|
4615
|
-
function
|
|
4616
|
-
const t =
|
|
4617
|
-
return
|
|
4615
|
+
function Yc(e) {
|
|
4616
|
+
const t = ps(e);
|
|
4617
|
+
return ne(t) ? t : void 0;
|
|
4618
4618
|
}
|
|
4619
|
-
function
|
|
4619
|
+
function ps(e) {
|
|
4620
4620
|
const t = e.snapshot.resolvedFormats.find(
|
|
4621
|
-
(n) => n.format.type !== "temporal_bucket" && n.format.type !== "raw_temporal" && n.format.type !== "date" &&
|
|
4621
|
+
(n) => n.format.type !== "temporal_bucket" && n.format.type !== "raw_temporal" && n.format.type !== "date" && W(n.scope, e.scope) && H(n.target, e.target)
|
|
4622
4622
|
);
|
|
4623
4623
|
return t == null ? void 0 : t.format;
|
|
4624
4624
|
}
|
|
4625
|
-
function
|
|
4625
|
+
function Ac(e) {
|
|
4626
4626
|
const t = e.snapshot.resolvedFormats.find(
|
|
4627
|
-
(n) => n.format.type === "date" &&
|
|
4627
|
+
(n) => n.format.type === "date" && W(n.scope, e.scope) && H(n.target, e.target)
|
|
4628
4628
|
);
|
|
4629
4629
|
return t == null ? void 0 : t.format;
|
|
4630
4630
|
}
|
|
4631
|
-
function
|
|
4631
|
+
function zc(e) {
|
|
4632
4632
|
const t = e.snapshot.resolvedFormats.find(
|
|
4633
|
-
(n) => n.format.type === "raw_temporal" &&
|
|
4633
|
+
(n) => n.format.type === "raw_temporal" && W(n.scope, e.scope) && H(n.target, e.target)
|
|
4634
4634
|
);
|
|
4635
4635
|
return t == null ? void 0 : t.format;
|
|
4636
4636
|
}
|
|
4637
|
-
function
|
|
4637
|
+
function Rc(e) {
|
|
4638
4638
|
const t = e.snapshot.resolvedFormats.find(
|
|
4639
|
-
(n) => n.format.type === "temporal_bucket" &&
|
|
4639
|
+
(n) => n.format.type === "temporal_bucket" && W(n.scope, e.scope) && H(n.target, e.target)
|
|
4640
4640
|
);
|
|
4641
4641
|
return t == null ? void 0 : t.format;
|
|
4642
4642
|
}
|
|
4643
|
-
function
|
|
4643
|
+
function Uc(e) {
|
|
4644
4644
|
var a;
|
|
4645
4645
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
4646
4646
|
if (e.snapshot.resolvedFormats.forEach((i, o) => {
|
|
@@ -4653,7 +4653,7 @@ function $c(e) {
|
|
|
4653
4653
|
`resolvedFormats.${o}.scope must match the executing dashboard/card`
|
|
4654
4654
|
);
|
|
4655
4655
|
if (i.target.kind === "field" && i.format.type === "temporal_bucket") {
|
|
4656
|
-
const s = JSON.stringify(
|
|
4656
|
+
const s = JSON.stringify(Ee(i.target));
|
|
4657
4657
|
if (n.has(s))
|
|
4658
4658
|
throw new Error(
|
|
4659
4659
|
`resolvedFormats.${o} duplicates export field "${i.target.fieldId}"`
|
|
@@ -4681,75 +4681,75 @@ function $c(e) {
|
|
|
4681
4681
|
`resolvedFormats is missing visible export column "${r}"`
|
|
4682
4682
|
);
|
|
4683
4683
|
}
|
|
4684
|
-
const
|
|
4685
|
-
function
|
|
4684
|
+
const Ts = /* @__PURE__ */ new Set(["short", "medium", "long"]), vs = /^(\d{4})-(\d{2})-(\d{2})$/, bs = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, xs = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, mt = " – ";
|
|
4685
|
+
function Lc(e) {
|
|
4686
4686
|
if (!v(e)) return;
|
|
4687
4687
|
const t = Object.keys(e);
|
|
4688
4688
|
if (e.mode === "period_label" && t.length === 1)
|
|
4689
4689
|
return { mode: "period_label" };
|
|
4690
|
-
if (e.mode === "style" && t.length === 2 && typeof e.dateStyle == "string" &&
|
|
4690
|
+
if (e.mode === "style" && t.length === 2 && typeof e.dateStyle == "string" && Ts.has(e.dateStyle))
|
|
4691
4691
|
return { mode: "style", dateStyle: e.dateStyle };
|
|
4692
|
-
if (e.mode === "pattern" && t.length === 3 && e.dialect === "semaphor_tokens" && typeof e.pattern == "string" &&
|
|
4692
|
+
if (e.mode === "pattern" && t.length === 3 && e.dialect === "semaphor_tokens" && typeof e.pattern == "string" && Ds(e.pattern) === null)
|
|
4693
4693
|
return {
|
|
4694
4694
|
mode: "pattern",
|
|
4695
4695
|
dialect: "semaphor_tokens",
|
|
4696
4696
|
pattern: e.pattern
|
|
4697
4697
|
};
|
|
4698
4698
|
}
|
|
4699
|
-
function
|
|
4699
|
+
function Ds(e) {
|
|
4700
4700
|
try {
|
|
4701
|
-
return
|
|
4701
|
+
return Co({ dialect: "semaphor_tokens", pattern: e }), null;
|
|
4702
4702
|
} catch (t) {
|
|
4703
4703
|
return t instanceof Error ? t.message : "The pattern is invalid.";
|
|
4704
4704
|
}
|
|
4705
4705
|
}
|
|
4706
|
-
function
|
|
4706
|
+
function Wc(e) {
|
|
4707
4707
|
const { value: t, part: n, presentation: r, preferences: a, calendar: i } = e;
|
|
4708
4708
|
if ((r == null ? void 0 : r.mode) === "period_label" && t.periodLabel && n === "range")
|
|
4709
4709
|
return { ok: !0, text: t.periodLabel };
|
|
4710
4710
|
const [o, s] = t.bounds, u = s === void 0 || n === "start" ? [{ raw: o, role: "start" }] : n === "end" ? [{ raw: s, role: "end" }] : [
|
|
4711
4711
|
{ raw: o, role: "start" },
|
|
4712
4712
|
{ raw: s, role: "end" }
|
|
4713
|
-
], l = u.map(({ raw: h }) =>
|
|
4713
|
+
], l = u.map(({ raw: h }) => _s(h, i.tz));
|
|
4714
4714
|
if (l.some((h) => h === null))
|
|
4715
4715
|
return {
|
|
4716
4716
|
ok: !1,
|
|
4717
|
-
text: u.map(({ raw: h }) => h).join(
|
|
4717
|
+
text: u.map(({ raw: h }) => h).join(mt),
|
|
4718
4718
|
diagnostic: {
|
|
4719
4719
|
code: "invalid_temporal_input_value",
|
|
4720
4720
|
message: "A date input bound is not a date or an instant."
|
|
4721
4721
|
}
|
|
4722
4722
|
};
|
|
4723
4723
|
const f = t.precision === "day" ? l.map(
|
|
4724
|
-
(h, S) =>
|
|
4724
|
+
(h, S) => Ns(h, u[S].role, i.tz)
|
|
4725
4725
|
) : [], m = f.length > 0 && f.every((h) => h !== null) ? f : null;
|
|
4726
|
-
return { ok: !0, text: m ?
|
|
4727
|
-
l.map((h) =>
|
|
4726
|
+
return { ok: !0, text: m ? Ss(m, r, a, i) : Ms(
|
|
4727
|
+
l.map((h) => $s(h, i.tz)),
|
|
4728
4728
|
r,
|
|
4729
4729
|
a,
|
|
4730
4730
|
i
|
|
4731
4731
|
) };
|
|
4732
4732
|
}
|
|
4733
|
-
function
|
|
4733
|
+
function Ss(e, t, n, r) {
|
|
4734
4734
|
const [a, i = a] = e;
|
|
4735
4735
|
if ((t == null ? void 0 : t.mode) === "pattern")
|
|
4736
|
-
return
|
|
4736
|
+
return Xn(
|
|
4737
4737
|
e.map(
|
|
4738
|
-
(c) =>
|
|
4738
|
+
(c) => Zn(et(c), "date", t.pattern, n, r)
|
|
4739
4739
|
)
|
|
4740
4740
|
);
|
|
4741
4741
|
const o = (t == null ? void 0 : t.mode) === "style" ? t.dateStyle : n.dateStyle;
|
|
4742
4742
|
if (!t || t.mode === "period_label") {
|
|
4743
|
-
const c =
|
|
4743
|
+
const c = Es(a, i, r);
|
|
4744
4744
|
if (c)
|
|
4745
|
-
return
|
|
4746
|
-
value:
|
|
4745
|
+
return lt({
|
|
4746
|
+
value: et(a),
|
|
4747
4747
|
metadata: {
|
|
4748
4748
|
kind: "temporal_bucket",
|
|
4749
4749
|
granularity: c,
|
|
4750
4750
|
calendar: { tz: r.tz, weekStart: r.weekStart ?? 1 }
|
|
4751
4751
|
},
|
|
4752
|
-
format:
|
|
4752
|
+
format: Ln({
|
|
4753
4753
|
metadata: {
|
|
4754
4754
|
kind: "temporal_bucket",
|
|
4755
4755
|
granularity: c,
|
|
@@ -4765,13 +4765,13 @@ function ps(e, t, n, r) {
|
|
|
4765
4765
|
timeZone: "UTC",
|
|
4766
4766
|
dateStyle: o
|
|
4767
4767
|
});
|
|
4768
|
-
return
|
|
4768
|
+
return Is(a, i) ? s.format(Te(a)) : qn(s, Te(a), Te(i));
|
|
4769
4769
|
}
|
|
4770
|
-
function
|
|
4770
|
+
function Ms(e, t, n, r) {
|
|
4771
4771
|
if ((t == null ? void 0 : t.mode) === "pattern")
|
|
4772
|
-
return
|
|
4772
|
+
return Xn(
|
|
4773
4773
|
e.map(
|
|
4774
|
-
(s) =>
|
|
4774
|
+
(s) => Zn(
|
|
4775
4775
|
s.toISOString(),
|
|
4776
4776
|
"instant",
|
|
4777
4777
|
t.pattern,
|
|
@@ -4786,14 +4786,14 @@ function Ts(e, t, n, r) {
|
|
|
4786
4786
|
dateStyle: (t == null ? void 0 : t.mode) === "style" ? t.dateStyle : n.dateTime.dateStyle,
|
|
4787
4787
|
timeStyle: n.dateTime.timeStyle
|
|
4788
4788
|
}), [i, o] = e;
|
|
4789
|
-
return o && o.getTime() !== i.getTime() ?
|
|
4789
|
+
return o && o.getTime() !== i.getTime() ? qn(a, i, o) : a.format(i);
|
|
4790
4790
|
}
|
|
4791
|
-
function
|
|
4791
|
+
function qn(e, t, n) {
|
|
4792
4792
|
const r = e;
|
|
4793
|
-
return typeof r.formatRange == "function" ? r.formatRange(t, n) : `${e.format(t)}${
|
|
4793
|
+
return typeof r.formatRange == "function" ? r.formatRange(t, n) : `${e.format(t)}${mt}${e.format(n)}`;
|
|
4794
4794
|
}
|
|
4795
|
-
function
|
|
4796
|
-
const i =
|
|
4795
|
+
function Zn(e, t, n, r, a) {
|
|
4796
|
+
const i = Cn({
|
|
4797
4797
|
format: {
|
|
4798
4798
|
type: "raw_temporal",
|
|
4799
4799
|
presentation: { mode: "pattern", dialect: "semaphor_tokens", pattern: n }
|
|
@@ -4801,80 +4801,80 @@ function Wn(e, t, n, r, a) {
|
|
|
4801
4801
|
// Temporal formatting reads no currency.
|
|
4802
4802
|
preferences: {
|
|
4803
4803
|
...r,
|
|
4804
|
-
defaultCurrency:
|
|
4804
|
+
defaultCurrency: sr.defaultCurrency
|
|
4805
4805
|
},
|
|
4806
4806
|
calendar: { tz: a.tz }
|
|
4807
|
-
}), o = t === "date" &&
|
|
4808
|
-
return
|
|
4809
|
-
value: o === t ? e :
|
|
4807
|
+
}), o = t === "date" && ks(n) ? "instant" : t;
|
|
4808
|
+
return zo({
|
|
4809
|
+
value: o === t ? e : ae(`${e}T00:00:00`, a.tz).toISOString(),
|
|
4810
4810
|
metadata: { kind: "raw_temporal", valueKind: o },
|
|
4811
4811
|
format: i
|
|
4812
4812
|
}).text;
|
|
4813
4813
|
}
|
|
4814
|
-
function
|
|
4814
|
+
function ks(e) {
|
|
4815
4815
|
return /HH|mm|ss/.test(e);
|
|
4816
4816
|
}
|
|
4817
|
-
function
|
|
4818
|
-
return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(
|
|
4817
|
+
function Xn(e) {
|
|
4818
|
+
return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(mt);
|
|
4819
4819
|
}
|
|
4820
|
-
function
|
|
4821
|
-
const n =
|
|
4820
|
+
function _s(e, t) {
|
|
4821
|
+
const n = vs.exec(e);
|
|
4822
4822
|
if (n) {
|
|
4823
4823
|
const a = {
|
|
4824
4824
|
year: Number(n[1]),
|
|
4825
4825
|
month: Number(n[2]),
|
|
4826
4826
|
day: Number(n[3])
|
|
4827
4827
|
};
|
|
4828
|
-
return
|
|
4828
|
+
return Cs(a) ? { kind: "date", date: a } : null;
|
|
4829
4829
|
}
|
|
4830
|
-
const r =
|
|
4830
|
+
const r = xs.test(e) ? new Date(e.replace(" ", "T")) : bs.test(e) ? ae(e.replace(" ", "T"), t) : null;
|
|
4831
4831
|
return r && !Number.isNaN(r.getTime()) ? { kind: "instant", instant: r } : null;
|
|
4832
4832
|
}
|
|
4833
|
-
function
|
|
4834
|
-
return e.kind === "instant" ? e.instant :
|
|
4833
|
+
function $s(e, t) {
|
|
4834
|
+
return e.kind === "instant" ? e.instant : ae(`${et(e.date)}T00:00:00`, t);
|
|
4835
4835
|
}
|
|
4836
|
-
function
|
|
4836
|
+
function Ns(e, t, n) {
|
|
4837
4837
|
if (e.kind === "date") return e.date;
|
|
4838
|
-
const r =
|
|
4839
|
-
if (r.hour === 0 && r.minute === 0 && r.second === 0 && e.instant.getUTCMilliseconds() === 0) return t === "start" ? a :
|
|
4838
|
+
const r = fr(e.instant, n), a = { year: r.year, month: r.month, day: r.day };
|
|
4839
|
+
if (r.hour === 0 && r.minute === 0 && r.second === 0 && e.instant.getUTCMilliseconds() === 0) return t === "start" ? a : Os(a, -1);
|
|
4840
4840
|
const o = r.hour === 23 && r.minute === 59 && r.second === 59;
|
|
4841
4841
|
return t === "end" && o ? a : null;
|
|
4842
4842
|
}
|
|
4843
|
-
function
|
|
4844
|
-
return n.fiscalCalendar || e.day !== 1 || e.year !== t.year || t.day !==
|
|
4843
|
+
function Es(e, t, n) {
|
|
4844
|
+
return n.fiscalCalendar || e.day !== 1 || e.year !== t.year || t.day !== Kn(t.year, t.month) ? null : e.month === t.month ? "month" : e.month % 3 === 1 && t.month === e.month + 2 ? "quarter" : e.month === 1 && t.month === 12 ? "year" : null;
|
|
4845
4845
|
}
|
|
4846
|
-
function
|
|
4846
|
+
function et(e) {
|
|
4847
4847
|
return `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
|
|
4848
4848
|
}
|
|
4849
|
-
function
|
|
4849
|
+
function Te(e) {
|
|
4850
4850
|
const t = /* @__PURE__ */ new Date(0);
|
|
4851
4851
|
return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(0, 0, 0, 0), t;
|
|
4852
4852
|
}
|
|
4853
|
-
function
|
|
4854
|
-
const n =
|
|
4853
|
+
function Os(e, t) {
|
|
4854
|
+
const n = Te(e);
|
|
4855
4855
|
return n.setUTCDate(n.getUTCDate() + t), {
|
|
4856
4856
|
year: n.getUTCFullYear(),
|
|
4857
4857
|
month: n.getUTCMonth() + 1,
|
|
4858
4858
|
day: n.getUTCDate()
|
|
4859
4859
|
};
|
|
4860
4860
|
}
|
|
4861
|
-
function
|
|
4861
|
+
function Is(e, t) {
|
|
4862
4862
|
return e.year === t.year && e.month === t.month && e.day === t.day;
|
|
4863
4863
|
}
|
|
4864
|
-
function
|
|
4864
|
+
function Kn(e, t) {
|
|
4865
4865
|
return new Date(Date.UTC(e, t, 0)).getUTCDate();
|
|
4866
4866
|
}
|
|
4867
|
-
function
|
|
4868
|
-
return e.year >= 1 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <=
|
|
4867
|
+
function Cs(e) {
|
|
4868
|
+
return e.year >= 1 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Kn(e.year, e.month);
|
|
4869
4869
|
}
|
|
4870
|
-
class
|
|
4870
|
+
class Fs extends Error {
|
|
4871
4871
|
constructor(n, r) {
|
|
4872
4872
|
super(`${n}: ${r}`);
|
|
4873
|
-
|
|
4873
|
+
_(this, "deliveryBlocking", !0);
|
|
4874
4874
|
this.code = n, this.name = "PivotHeaderPresentationError";
|
|
4875
4875
|
}
|
|
4876
4876
|
}
|
|
4877
|
-
function
|
|
4877
|
+
function Hc(e) {
|
|
4878
4878
|
var a;
|
|
4879
4879
|
const t = e.mode ?? "formatted", n = e.members.map((i) => {
|
|
4880
4880
|
var s;
|
|
@@ -4882,11 +4882,11 @@ function Fc(e) {
|
|
|
4882
4882
|
return i.value === null ? "" : String(i.value);
|
|
4883
4883
|
const o = (s = e.resolveTemporalFormat) == null ? void 0 : s.call(e, i.fieldId);
|
|
4884
4884
|
if (!o)
|
|
4885
|
-
throw new
|
|
4885
|
+
throw new Fs(
|
|
4886
4886
|
"missing_resolved_temporal_format",
|
|
4887
4887
|
`Missing resolved temporal presentation for pivot field "${i.fieldId}"`
|
|
4888
4888
|
);
|
|
4889
|
-
return
|
|
4889
|
+
return lt({
|
|
4890
4890
|
value: i.value,
|
|
4891
4891
|
metadata: i.temporalBucket,
|
|
4892
4892
|
format: o
|
|
@@ -4901,146 +4901,192 @@ function Fc(e) {
|
|
|
4901
4901
|
].join(" / ")
|
|
4902
4902
|
};
|
|
4903
4903
|
}
|
|
4904
|
-
|
|
4904
|
+
const M = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
4905
|
+
function Jt(e) {
|
|
4906
|
+
return e ? e.period ? e.period : e.unit && e.count ? `${e.unit}s` : e.days <= 1 ? "day" : "days" : "period";
|
|
4907
|
+
}
|
|
4908
|
+
function Ps(e, t) {
|
|
4909
|
+
return t != null && t.period ? e === 1 ? `Previous ${t.period}` : `${M(e, t.period)} back` : t != null && t.unit && t.count ? e === 1 ? `Previous ${M(t.count, t.unit)}` : `${M(e, "period")} back` : t && t.days <= 1 ? e === 1 ? "Previous day" : `${M(e, "day")} back` : t ? e === 1 ? `Previous ${t.days} days` : `${M(e, "period")} back` : e === 1 ? "Previous period" : `${M(e, "period")} back`;
|
|
4910
|
+
}
|
|
4911
|
+
function he(e) {
|
|
4912
|
+
return e.charAt(0).toLowerCase() + e.slice(1);
|
|
4913
|
+
}
|
|
4914
|
+
function Ys(e) {
|
|
4915
|
+
return e.period ? `a ${e.period}` : e.unit && e.count ? M(e.count, e.unit) : e.days <= 1 ? "a day" : M(e.days, "day");
|
|
4916
|
+
}
|
|
4917
|
+
function jc(e, t) {
|
|
4918
|
+
const n = tt(e, t).label, r = dr(t).map((a) => `"${tt(a, t).label}"`);
|
|
4919
|
+
return {
|
|
4920
|
+
message: `"${n}" lands inside the window it compares (${Ys(t)}), so it shows no comparison there.`,
|
|
4921
|
+
fix: `Pick a step that clears the window: ${r.join(", ")}.`
|
|
4922
|
+
};
|
|
4923
|
+
}
|
|
4924
|
+
function tt(e, t) {
|
|
4925
|
+
const n = hr(e);
|
|
4926
|
+
if (n.kind === "target")
|
|
4927
|
+
return { label: `Target · ${n.targetValue.toLocaleString("en-US")}`, sentence: `a target of ${n.targetValue.toLocaleString("en-US")}` };
|
|
4928
|
+
const r = n.offset ?? 1, a = n.matchWeekdays ? ", matching weekdays" : "";
|
|
4929
|
+
if (n.unit === "period") {
|
|
4930
|
+
const o = Ps(r, t);
|
|
4931
|
+
return { label: o, sentence: r === 1 ? `the ${he(o)}` : he(o) };
|
|
4932
|
+
}
|
|
4933
|
+
if (n.unit === "day") {
|
|
4934
|
+
const o = r === 1 ? "The day before" : `${M(r, "day")} back`;
|
|
4935
|
+
return { label: o, sentence: he(o) };
|
|
4936
|
+
}
|
|
4937
|
+
const i = r === 1 ? `Same ${Jt(t)} last ${n.unit}${a}` : `Same ${Jt(t)} ${M(r, n.unit)} back${a}`;
|
|
4938
|
+
return { label: i, sentence: `the ${he(i)}` };
|
|
4939
|
+
}
|
|
4940
|
+
function As(e) {
|
|
4941
|
+
return (e == null ? void 0 : e.kind) === "field_date" ? `the ${JSON.stringify(e.label)} filter` : "the dashboard date";
|
|
4942
|
+
}
|
|
4943
|
+
function qc(e, t) {
|
|
4944
|
+
const n = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${As(t.owner)}`;
|
|
4945
|
+
return `${e} is compared with ${tt(t.spec).sentence} (${n})`;
|
|
4946
|
+
}
|
|
4947
|
+
function Zc(e) {
|
|
4905
4948
|
const t = /* @__PURE__ */ new Map();
|
|
4906
4949
|
return e.forEach((n) => {
|
|
4907
4950
|
n.id && t.set(n.id, (t.get(n.id) ?? 0) + 1);
|
|
4908
4951
|
}), e.flatMap(
|
|
4909
|
-
(n) => n.id && (t.get(n.id) ?? 0) > 1 ? [
|
|
4952
|
+
(n) => n.id && (t.get(n.id) ?? 0) > 1 ? [gr(n)] : []
|
|
4910
4953
|
);
|
|
4911
4954
|
}
|
|
4912
4955
|
export {
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
4956
|
+
os as $,
|
|
4957
|
+
ac as A,
|
|
4958
|
+
oc as B,
|
|
4959
|
+
sc as C,
|
|
4960
|
+
Mn as D,
|
|
4961
|
+
cc as E,
|
|
4962
|
+
Ri as F,
|
|
4963
|
+
uc as G,
|
|
4964
|
+
Ui as H,
|
|
4965
|
+
lc as I,
|
|
4966
|
+
_e as J,
|
|
4967
|
+
A as K,
|
|
4968
|
+
mc as L,
|
|
4969
|
+
ic as M,
|
|
4970
|
+
fc as N,
|
|
4971
|
+
ji as O,
|
|
4972
|
+
qi as P,
|
|
4973
|
+
dc as Q,
|
|
4974
|
+
Zi as R,
|
|
4975
|
+
hc as S,
|
|
4976
|
+
Nc as T,
|
|
4977
|
+
co as U,
|
|
4978
|
+
uo as V,
|
|
4979
|
+
yc as W,
|
|
4980
|
+
lo as X,
|
|
4981
|
+
fo as Y,
|
|
4982
|
+
Qt as Z,
|
|
4983
|
+
Fc as _,
|
|
4984
|
+
Bs as a,
|
|
4985
|
+
w as a$,
|
|
4986
|
+
gs as a0,
|
|
4987
|
+
ys as a1,
|
|
4988
|
+
ws as a2,
|
|
4989
|
+
Pc as a3,
|
|
4990
|
+
Yc as a4,
|
|
4991
|
+
Ac as a5,
|
|
4992
|
+
zc as a6,
|
|
4993
|
+
Rc as a7,
|
|
4994
|
+
Uc as a8,
|
|
4995
|
+
qt as a9,
|
|
4996
|
+
zo as aA,
|
|
4997
|
+
Ro as aB,
|
|
4998
|
+
Lc as aC,
|
|
4999
|
+
Ds as aD,
|
|
5000
|
+
Wc as aE,
|
|
5001
|
+
Fs as aF,
|
|
5002
|
+
Hc as aG,
|
|
5003
|
+
Zc as aH,
|
|
5004
|
+
qc as aI,
|
|
5005
|
+
Vs as aJ,
|
|
5006
|
+
es as aK,
|
|
5007
|
+
kc as aL,
|
|
5008
|
+
$c as aM,
|
|
5009
|
+
_c as aN,
|
|
5010
|
+
Ec as aO,
|
|
5011
|
+
Dn as aP,
|
|
5012
|
+
Js as aQ,
|
|
5013
|
+
Cc as aR,
|
|
5014
|
+
jc as aS,
|
|
5015
|
+
Oc as aT,
|
|
5016
|
+
Ic as aU,
|
|
5017
|
+
as as aV,
|
|
5018
|
+
is as aW,
|
|
5019
|
+
at as aX,
|
|
5020
|
+
q as aY,
|
|
5021
|
+
wn as aZ,
|
|
5022
|
+
ge as a_,
|
|
5023
|
+
ho as aa,
|
|
5024
|
+
wo as ab,
|
|
5025
|
+
ie as ac,
|
|
5026
|
+
Nn as ad,
|
|
5027
|
+
wc as ae,
|
|
5028
|
+
Uo as af,
|
|
5029
|
+
pe as ag,
|
|
5030
|
+
oe as ah,
|
|
5031
|
+
bc as ai,
|
|
5032
|
+
xc as aj,
|
|
5033
|
+
Dc as ak,
|
|
5034
|
+
Sc as al,
|
|
5035
|
+
Rn as am,
|
|
5036
|
+
Ln as an,
|
|
5037
|
+
Mc as ao,
|
|
5038
|
+
lt as ap,
|
|
5039
|
+
So as aq,
|
|
5040
|
+
L as ar,
|
|
5041
|
+
ct as as,
|
|
5042
|
+
Cn as at,
|
|
5043
|
+
pc as au,
|
|
5044
|
+
Tc as av,
|
|
5045
|
+
Eo as aw,
|
|
5046
|
+
vc as ax,
|
|
5047
|
+
Co as ay,
|
|
5048
|
+
zn as az,
|
|
5049
|
+
Gi as b,
|
|
5050
|
+
Rr as b0,
|
|
5051
|
+
Se as b1,
|
|
5052
|
+
bt as b2,
|
|
5053
|
+
ue as b3,
|
|
5054
|
+
Qs as b4,
|
|
5055
|
+
hn as b5,
|
|
5056
|
+
Pr as b6,
|
|
5057
|
+
ja as b7,
|
|
5058
|
+
Xi as b8,
|
|
5059
|
+
Nr as b9,
|
|
5060
|
+
rs as ba,
|
|
5061
|
+
Lt as bb,
|
|
5062
|
+
O as bc,
|
|
5063
|
+
Ut as bd,
|
|
5064
|
+
zt as be,
|
|
5065
|
+
ns as bf,
|
|
5066
|
+
ae as bg,
|
|
5067
|
+
ts as bh,
|
|
5068
|
+
Ks as c,
|
|
5069
|
+
tt as d,
|
|
5070
|
+
nt as e,
|
|
5071
|
+
ps as f,
|
|
5072
|
+
ln as g,
|
|
5073
|
+
mn as h,
|
|
5074
|
+
ne as i,
|
|
5075
|
+
fn as j,
|
|
5076
|
+
rt as k,
|
|
5077
|
+
Er as l,
|
|
5078
|
+
Gs as m,
|
|
5079
|
+
on as n,
|
|
5080
|
+
sn as o,
|
|
5081
|
+
st as p,
|
|
5082
|
+
Yi as q,
|
|
5083
|
+
ro as r,
|
|
5084
|
+
Ai as s,
|
|
5085
|
+
rc as t,
|
|
5086
|
+
ec as u,
|
|
5087
|
+
tc as v,
|
|
5088
|
+
gc as w,
|
|
5089
|
+
nc as x,
|
|
5090
|
+
ot as y,
|
|
5091
|
+
Sn as z
|
|
5046
5092
|
};
|