@oneclick.dev/cms-core-modules 0.0.110 → 0.0.111
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/{Acquisition-Dt2rREU8.js → Acquisition-DgzDQH51.js} +1 -1
- package/dist/{Acquisition-DNCy8nQz.mjs → Acquisition-FV3QpaUX.mjs} +2 -2
- package/dist/{Audience-Bs7b0TNm.js → Audience-BSgNvcVb.js} +1 -1
- package/dist/{Audience-CUeMVYRy.mjs → Audience-ka0b7YPE.mjs} +2 -2
- package/dist/{ContentEditor-D9-1SJ5F.mjs → ContentEditor-pZPfo0qN.mjs} +4384 -4282
- package/dist/{ContentEditor-BprPiHMJ.js → ContentEditor-tYkh4vRV.js} +42 -42
- package/dist/{Create-89z41K73.js → Create--MOBOTA-.js} +1 -1
- package/dist/{Create-BCklc_T1.mjs → Create-BXNLRQag.mjs} +1 -1
- package/dist/DateFormatter-CSAbE3BC.js +1 -0
- package/dist/{DateFormatter-DUxlo8X8.mjs → DateFormatter-qbhRYxI_.mjs} +226 -222
- package/dist/{Detail-CNlljBfH.mjs → Detail-ChD5XurA.mjs} +1 -1
- package/dist/{Detail-C857g62L.js → Detail-RISEJJab.js} +1 -1
- package/dist/{Find-DIISO5GO.mjs → Find-zN_dKz4p.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Baqy-rTT.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dx4Bpa2m.mjs +1263 -0
- package/dist/{Overview-Di84CsR5.mjs → Overview-98nkJUWN.mjs} +162 -157
- package/dist/{Overview-C-Jb_BxY.mjs → Overview-BR_y8x3W.mjs} +1 -1
- package/dist/{Overview-DC9io1bk.js → Overview-CX-n6W7d.js} +1 -1
- package/dist/Overview-Dl8cMlsr.js +1 -0
- package/dist/{Overview-BKAti8nc.mjs → Overview-MpgkLB6m.mjs} +36 -36
- package/dist/{SeoHealth-az1YuNF2.js → SeoHealth-C5npw7mE.js} +1 -1
- package/dist/{SeoHealth-MC3lSCOY.mjs → SeoHealth-bVQj_Xgm.mjs} +29 -29
- package/dist/{TableView-DXHhJ-jm.mjs → TableView-Bf1fdJrD.mjs} +1838 -1822
- package/dist/TableView-DNcXyIMu.js +4 -0
- package/dist/{agenda-IOqtALWf.js → agenda-BaJu3-1c.js} +1 -1
- package/dist/{agenda-DcatSSYQ.mjs → agenda-BwVY_8oM.mjs} +3 -3
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-CI0B4xVj.js → exceptions-B6P9UiCj.js} +1 -1
- package/dist/{exceptions-YCQkHa6a.mjs → exceptions-De9-FvdP.mjs} +67 -67
- package/dist/{index-CpzDEMeC.mjs → index-B8GvmAwh.mjs} +438 -478
- package/dist/{index-wjkEPsNx.mjs → index-BIF2RB7k.mjs} +1212 -1316
- package/dist/index-ByRsp77L.js +70 -0
- package/dist/{index-BhWvXMOp.mjs → index-CFzn2Lus.mjs} +5 -9
- package/dist/{index-BFLV54kw.mjs → index-CkVwMqpn.mjs} +1114 -1100
- package/dist/index-DL6orwdK.js +35 -0
- package/dist/index-DUlYrnXH.js +58 -0
- package/dist/index-DZV720u-.mjs +439 -0
- package/dist/index-D_nfGegA.js +184 -0
- package/dist/index-DtSvAFLL.js +54 -0
- package/dist/{index-D30apIn-.mjs → index-L54VBzwJ.mjs} +2 -3
- package/dist/{index-BzWmWCo5.mjs → index-hH3e-IYz.mjs} +267 -267
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +15 -15
- package/dist/math-BJ-oX_IM.mjs +80 -0
- package/dist/math-emotyaF6.js +1 -0
- package/dist/{resources-CYOb5Bl6.mjs → resources-DwYxn2Vi.mjs} +1 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +1 -2
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/useFocus.d.ts +1 -0
- package/package.json +2 -2
- package/dist/DateFormatter-CYAD4GBN.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dh9jzvE0.mjs +0 -1255
- package/dist/Overview-UoZHUMUz.js +0 -1
- package/dist/TableView-DQW0A1oG.js +0 -4
- package/dist/array-CbATeQbk.js +0 -1
- package/dist/array-DT5pE8Gm.mjs +0 -108
- package/dist/index-A2kp8Isi.js +0 -75
- package/dist/index-B5aBwdxY.js +0 -54
- package/dist/index-BiT55eU0.js +0 -58
- package/dist/index-G7cIlnGN.js +0 -158
- package/dist/index-V78huaSJ.mjs +0 -442
- package/dist/index-vHmvbEwa.js +0 -35
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
1
|
+
function k(e, t) {
|
|
2
2
|
return e - t * Math.floor(e / t);
|
|
3
3
|
}
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
t =
|
|
4
|
+
const G = 1721426;
|
|
5
|
+
function S(e, t, r, n) {
|
|
6
|
+
t = j(e, t);
|
|
7
7
|
let a = t - 1, o = -2;
|
|
8
|
-
return r <= 2 ? o = 0 : T(t) && (o = -1),
|
|
8
|
+
return r <= 2 ? o = 0 : T(t) && (o = -1), G - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + o + n);
|
|
9
9
|
}
|
|
10
10
|
function T(e) {
|
|
11
11
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function j(e, t) {
|
|
14
14
|
return e === "BC" ? 1 - t : t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function ue(e) {
|
|
17
17
|
let t = "AD";
|
|
18
18
|
return e <= 0 && (t = "BC", e = 1 - e), [
|
|
19
19
|
t,
|
|
20
20
|
e
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const de = {
|
|
24
24
|
standard: [
|
|
25
25
|
31,
|
|
26
26
|
28,
|
|
@@ -50,18 +50,18 @@ const $e = {
|
|
|
50
50
|
31
|
|
51
51
|
]
|
|
52
52
|
};
|
|
53
|
-
class
|
|
53
|
+
class g {
|
|
54
54
|
fromJulianDay(t) {
|
|
55
|
-
let r = t, n = r -
|
|
56
|
-
r <
|
|
57
|
-
let
|
|
58
|
-
return new
|
|
55
|
+
let r = t, n = r - G, a = Math.floor(n / 146097), o = k(n, 146097), i = Math.floor(o / 36524), c = k(o, 36524), l = Math.floor(c / 1461), f = k(c, 1461), M = Math.floor(f / 365), w = a * 400 + i * 100 + l * 4 + M + (i !== 4 && M !== 4 ? 1 : 0), [p, m] = ue(w), y = r - S(p, m, 1, 1), R = 2;
|
|
56
|
+
r < S(p, m, 3, 1) ? R = 0 : T(m) && (R = 1);
|
|
57
|
+
let W = Math.floor(((y + R) * 12 + 373) / 367), fe = r - S(p, m, W, 1) + 1;
|
|
58
|
+
return new x(p, m, W, fe);
|
|
59
59
|
}
|
|
60
60
|
toJulianDay(t) {
|
|
61
|
-
return
|
|
61
|
+
return S(t.era, t.year, t.month, t.day);
|
|
62
62
|
}
|
|
63
63
|
getDaysInMonth(t) {
|
|
64
|
-
return
|
|
64
|
+
return de[T(t.year) ? "leapyear" : "standard"][t.month - 1];
|
|
65
65
|
}
|
|
66
66
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
67
|
getMonthsInYear(t) {
|
|
@@ -70,12 +70,6 @@ class w {
|
|
|
70
70
|
getDaysInYear(t) {
|
|
71
71
|
return T(t.year) ? 366 : 365;
|
|
72
72
|
}
|
|
73
|
-
getMaximumMonthsInYear() {
|
|
74
|
-
return 12;
|
|
75
|
-
}
|
|
76
|
-
getMaximumDaysInMonth() {
|
|
77
|
-
return 31;
|
|
78
|
-
}
|
|
79
73
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
80
74
|
getYearsInEra(t) {
|
|
81
75
|
return 9999;
|
|
@@ -96,49 +90,47 @@ class w {
|
|
|
96
90
|
this.identifier = "gregory";
|
|
97
91
|
}
|
|
98
92
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
93
|
+
function $e(e, t) {
|
|
94
|
+
var r, n, a, o;
|
|
95
|
+
return (o = (a = (r = e.isEqual) === null || r === void 0 ? void 0 : r.call(e, t)) !== null && a !== void 0 ? a : (n = t.isEqual) === null || n === void 0 ? void 0 : n.call(t, e)) !== null && o !== void 0 ? o : e.identifier === t.identifier;
|
|
101
96
|
}
|
|
102
|
-
function
|
|
97
|
+
function ye(e) {
|
|
103
98
|
return d(Date.now(), e);
|
|
104
99
|
}
|
|
105
|
-
function
|
|
106
|
-
return we(
|
|
100
|
+
function Je(e) {
|
|
101
|
+
return we(ye(e));
|
|
107
102
|
}
|
|
108
|
-
function
|
|
103
|
+
function Q(e, t) {
|
|
109
104
|
return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
|
|
110
105
|
}
|
|
111
|
-
function
|
|
106
|
+
function me(e, t) {
|
|
112
107
|
return z(e) - z(t);
|
|
113
108
|
}
|
|
114
109
|
function z(e) {
|
|
115
110
|
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
116
111
|
}
|
|
117
|
-
let
|
|
118
|
-
function Q() {
|
|
119
|
-
return P == null && (P = new Intl.DateTimeFormat().resolvedOptions().timeZone), P;
|
|
120
|
-
}
|
|
112
|
+
let U = null;
|
|
121
113
|
function X() {
|
|
122
|
-
return
|
|
114
|
+
return U == null && (U = new Intl.DateTimeFormat().resolvedOptions().timeZone), U;
|
|
123
115
|
}
|
|
124
|
-
function
|
|
125
|
-
e = h(e, new
|
|
126
|
-
let t =
|
|
116
|
+
function v(e) {
|
|
117
|
+
e = h(e, new g());
|
|
118
|
+
let t = j(e.era, e.year);
|
|
127
119
|
return ee(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
128
120
|
}
|
|
129
|
-
function ee(e, t, r, n, a, o,
|
|
130
|
-
let
|
|
131
|
-
return
|
|
121
|
+
function ee(e, t, r, n, a, o, i) {
|
|
122
|
+
let c = /* @__PURE__ */ new Date();
|
|
123
|
+
return c.setUTCHours(n, a, o, i), c.setUTCFullYear(e, t - 1, r), c.getTime();
|
|
132
124
|
}
|
|
133
|
-
function
|
|
125
|
+
function O(e, t) {
|
|
134
126
|
if (t === "UTC") return 0;
|
|
135
|
-
if (e > 0 && t ===
|
|
136
|
-
let { year: r, month: n, day: a, hour: o, minute:
|
|
137
|
-
return ee(r, n, a, o,
|
|
127
|
+
if (e > 0 && t === X()) return new Date(e).getTimezoneOffset() * -6e4;
|
|
128
|
+
let { year: r, month: n, day: a, hour: o, minute: i, second: c } = te(e, t);
|
|
129
|
+
return ee(r, n, a, o, i, c, 0) - Math.floor(e / 1e3) * 1e3;
|
|
138
130
|
}
|
|
139
|
-
const
|
|
131
|
+
const L = /* @__PURE__ */ new Map();
|
|
140
132
|
function te(e, t) {
|
|
141
|
-
let r =
|
|
133
|
+
let r = L.get(t);
|
|
142
134
|
r || (r = new Intl.DateTimeFormat("en-US", {
|
|
143
135
|
timeZone: t,
|
|
144
136
|
hour12: !1,
|
|
@@ -149,7 +141,7 @@ function te(e, t) {
|
|
|
149
141
|
hour: "numeric",
|
|
150
142
|
minute: "numeric",
|
|
151
143
|
second: "numeric"
|
|
152
|
-
}),
|
|
144
|
+
}), L.set(t, r));
|
|
153
145
|
let n = r.formatToParts(new Date(e)), a = {};
|
|
154
146
|
for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
|
|
155
147
|
return {
|
|
@@ -163,112 +155,114 @@ function te(e, t) {
|
|
|
163
155
|
};
|
|
164
156
|
}
|
|
165
157
|
const K = 864e5;
|
|
166
|
-
function
|
|
158
|
+
function be(e, t, r, n) {
|
|
167
159
|
return (r === n ? [
|
|
168
160
|
r
|
|
169
161
|
] : [
|
|
170
162
|
r,
|
|
171
163
|
n
|
|
172
|
-
]).filter((o) =>
|
|
164
|
+
]).filter((o) => Me(e, t, o));
|
|
173
165
|
}
|
|
174
|
-
function
|
|
166
|
+
function Me(e, t, r) {
|
|
175
167
|
let n = te(r, t);
|
|
176
168
|
return e.year === n.year && e.month === n.month && e.day === n.day && e.hour === n.hour && e.minute === n.minute && e.second === n.second;
|
|
177
169
|
}
|
|
178
|
-
function
|
|
179
|
-
let n =
|
|
180
|
-
if (t === "UTC") return
|
|
181
|
-
if (t ===
|
|
182
|
-
n = h(n, new
|
|
183
|
-
let
|
|
184
|
-
return
|
|
185
|
-
}
|
|
186
|
-
let a =
|
|
187
|
-
if (
|
|
188
|
-
if (
|
|
170
|
+
function u(e, t, r = "compatible") {
|
|
171
|
+
let n = D(e);
|
|
172
|
+
if (t === "UTC") return v(n);
|
|
173
|
+
if (t === X() && r === "compatible") {
|
|
174
|
+
n = h(n, new g());
|
|
175
|
+
let l = /* @__PURE__ */ new Date(), f = j(n.era, n.year);
|
|
176
|
+
return l.setFullYear(f, n.month - 1, n.day), l.setHours(n.hour, n.minute, n.second, n.millisecond), l.getTime();
|
|
177
|
+
}
|
|
178
|
+
let a = v(n), o = O(a - K, t), i = O(a + K, t), c = be(n, t, a - o, a - i);
|
|
179
|
+
if (c.length === 1) return c[0];
|
|
180
|
+
if (c.length > 1) switch (r) {
|
|
189
181
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
190
182
|
case "compatible":
|
|
191
183
|
case "earlier":
|
|
192
|
-
return
|
|
184
|
+
return c[0];
|
|
193
185
|
case "later":
|
|
194
|
-
return
|
|
186
|
+
return c[c.length - 1];
|
|
195
187
|
case "reject":
|
|
196
188
|
throw new RangeError("Multiple possible absolute times found");
|
|
197
189
|
}
|
|
198
190
|
switch (r) {
|
|
199
191
|
case "earlier":
|
|
200
|
-
return Math.min(a - o, a -
|
|
192
|
+
return Math.min(a - o, a - i);
|
|
201
193
|
// 'compatible' means 'later' for "spring forward" transitions
|
|
202
194
|
case "compatible":
|
|
203
195
|
case "later":
|
|
204
|
-
return Math.max(a - o, a -
|
|
196
|
+
return Math.max(a - o, a - i);
|
|
205
197
|
case "reject":
|
|
206
198
|
throw new RangeError("No such absolute time found");
|
|
207
199
|
}
|
|
208
200
|
}
|
|
209
201
|
function re(e, t, r = "compatible") {
|
|
210
|
-
return new Date(
|
|
202
|
+
return new Date(u(e, t, r));
|
|
211
203
|
}
|
|
212
204
|
function d(e, t) {
|
|
213
|
-
let r =
|
|
214
|
-
return new E(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o,
|
|
205
|
+
let r = O(e, t), n = new Date(e + r), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), c = n.getUTCHours(), l = n.getUTCMinutes(), f = n.getUTCSeconds(), M = n.getUTCMilliseconds();
|
|
206
|
+
return new E(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, t, r, c, l, f, M);
|
|
215
207
|
}
|
|
216
208
|
function we(e) {
|
|
217
|
-
return new
|
|
209
|
+
return new x(e.calendar, e.era, e.year, e.month, e.day);
|
|
218
210
|
}
|
|
219
|
-
function
|
|
211
|
+
function D(e, t) {
|
|
220
212
|
let r = 0, n = 0, a = 0, o = 0;
|
|
221
213
|
if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: o } = e);
|
|
222
214
|
else if ("hour" in e && !t) return e;
|
|
223
215
|
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new C(e.calendar, e.era, e.year, e.month, e.day, r, n, a, o);
|
|
224
216
|
}
|
|
225
217
|
function h(e, t) {
|
|
226
|
-
if (
|
|
218
|
+
if ($e(e.calendar, t)) return e;
|
|
227
219
|
let r = t.fromJulianDay(e.calendar.toJulianDay(e)), n = e.copy();
|
|
228
220
|
return n.calendar = t, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, b(n), n;
|
|
229
221
|
}
|
|
230
|
-
function
|
|
222
|
+
function pe(e, t, r) {
|
|
231
223
|
if (e instanceof E)
|
|
232
|
-
return e.timeZone === t ? e :
|
|
233
|
-
let n =
|
|
224
|
+
return e.timeZone === t ? e : ve(e, t);
|
|
225
|
+
let n = u(e, t, r);
|
|
234
226
|
return d(n, t);
|
|
235
227
|
}
|
|
236
|
-
function
|
|
237
|
-
let t =
|
|
228
|
+
function ge(e) {
|
|
229
|
+
let t = v(e) - e.offset;
|
|
238
230
|
return new Date(t);
|
|
239
231
|
}
|
|
240
|
-
function
|
|
241
|
-
let r =
|
|
232
|
+
function ve(e, t) {
|
|
233
|
+
let r = v(e) - e.offset;
|
|
242
234
|
return h(d(r, t), e.calendar);
|
|
243
235
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
246
|
-
let r = e.copy(), n = "hour" in r ?
|
|
247
|
-
F(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0,
|
|
236
|
+
const I = 36e5;
|
|
237
|
+
function P(e, t) {
|
|
238
|
+
let r = e.copy(), n = "hour" in r ? Ce(r, t) : 0;
|
|
239
|
+
F(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, q(r), ne(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, De(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
|
|
248
240
|
let a = r.calendar.getYearsInEra(r);
|
|
249
241
|
if (r.year > a) {
|
|
250
|
-
|
|
251
|
-
|
|
242
|
+
var o, i;
|
|
243
|
+
let l = (o = (i = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, r);
|
|
244
|
+
r.year = a, r.month = l ? 1 : r.calendar.getMonthsInYear(r), r.day = l ? 1 : r.calendar.getDaysInMonth(r);
|
|
252
245
|
}
|
|
253
246
|
r.month < 1 && (r.month = 1, r.day = 1);
|
|
254
|
-
let
|
|
255
|
-
return r.month >
|
|
247
|
+
let c = r.calendar.getMonthsInYear(r);
|
|
248
|
+
return r.month > c && (r.month = c, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
|
|
256
249
|
}
|
|
257
250
|
function F(e, t) {
|
|
258
|
-
|
|
251
|
+
var r, n;
|
|
252
|
+
!((r = (n = e.calendar).isInverseEra) === null || r === void 0) && r.call(n, e) && (t = -t), e.year += t;
|
|
259
253
|
}
|
|
260
|
-
function
|
|
254
|
+
function q(e) {
|
|
261
255
|
for (; e.month < 1; )
|
|
262
256
|
F(e, -1), e.month += e.calendar.getMonthsInYear(e);
|
|
263
257
|
let t = 0;
|
|
264
258
|
for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
|
|
265
259
|
e.month -= t, F(e, 1);
|
|
266
260
|
}
|
|
267
|
-
function
|
|
261
|
+
function De(e) {
|
|
268
262
|
for (; e.day < 1; )
|
|
269
|
-
e.month--,
|
|
263
|
+
e.month--, q(e), e.day += e.calendar.getDaysInMonth(e);
|
|
270
264
|
for (; e.day > e.calendar.getDaysInMonth(e); )
|
|
271
|
-
e.day -= e.calendar.getDaysInMonth(e), e.month++,
|
|
265
|
+
e.day -= e.calendar.getDaysInMonth(e), e.month++, q(e);
|
|
272
266
|
}
|
|
273
267
|
function ne(e) {
|
|
274
268
|
e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
|
|
@@ -282,42 +276,43 @@ function ae(e) {
|
|
|
282
276
|
return t;
|
|
283
277
|
}
|
|
284
278
|
function oe(e, t) {
|
|
285
|
-
return
|
|
279
|
+
return P(e, ae(t));
|
|
286
280
|
}
|
|
287
281
|
function J(e, t) {
|
|
288
282
|
let r = e.copy();
|
|
289
283
|
return t.era != null && (r.era = t.era), t.year != null && (r.year = t.year), t.month != null && (r.month = t.month), t.day != null && (r.day = t.day), b(r), r;
|
|
290
284
|
}
|
|
291
|
-
function
|
|
285
|
+
function B(e, t) {
|
|
292
286
|
let r = e.copy();
|
|
293
|
-
return t.hour != null && (r.hour = t.hour), t.minute != null && (r.minute = t.minute), t.second != null && (r.second = t.second), t.millisecond != null && (r.millisecond = t.millisecond),
|
|
287
|
+
return t.hour != null && (r.hour = t.hour), t.minute != null && (r.minute = t.minute), t.second != null && (r.second = t.second), t.millisecond != null && (r.millisecond = t.millisecond), Ie(r), r;
|
|
294
288
|
}
|
|
295
|
-
function
|
|
289
|
+
function xe(e) {
|
|
296
290
|
e.second += Math.floor(e.millisecond / 1e3), e.millisecond = Y(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = Y(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = Y(e.minute, 60);
|
|
297
291
|
let t = Math.floor(e.hour / 24);
|
|
298
292
|
return e.hour = Y(e.hour, 24), t;
|
|
299
293
|
}
|
|
300
|
-
function
|
|
294
|
+
function Ie(e) {
|
|
301
295
|
e.millisecond = Math.max(0, Math.min(e.millisecond, 1e3)), e.second = Math.max(0, Math.min(e.second, 59)), e.minute = Math.max(0, Math.min(e.minute, 59)), e.hour = Math.max(0, Math.min(e.hour, 23));
|
|
302
296
|
}
|
|
303
297
|
function Y(e, t) {
|
|
304
298
|
let r = e % t;
|
|
305
299
|
return r < 0 && (r += t), r;
|
|
306
300
|
}
|
|
307
|
-
function
|
|
308
|
-
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0,
|
|
301
|
+
function Ce(e, t) {
|
|
302
|
+
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, xe(e);
|
|
309
303
|
}
|
|
310
|
-
function
|
|
304
|
+
function _(e, t, r, n) {
|
|
311
305
|
let a = e.copy();
|
|
312
306
|
switch (t) {
|
|
313
307
|
case "era": {
|
|
314
|
-
let
|
|
315
|
-
if (
|
|
316
|
-
|
|
308
|
+
let c = e.calendar.getEras(), l = c.indexOf(e.era);
|
|
309
|
+
if (l < 0) throw new Error("Invalid era: " + e.era);
|
|
310
|
+
l = $(l, r, 0, c.length - 1, n?.round), a.era = c[l], b(a);
|
|
317
311
|
break;
|
|
318
312
|
}
|
|
319
313
|
case "year":
|
|
320
|
-
|
|
314
|
+
var o, i;
|
|
315
|
+
!((o = (i = a.calendar).isInverseEra) === null || o === void 0) && o.call(i, a) && (r = -r), a.year = $(e.year, r, -1 / 0, 9999, n?.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, e);
|
|
321
316
|
break;
|
|
322
317
|
case "month":
|
|
323
318
|
a.month = $(e.month, r, 1, e.calendar.getMonthsInYear(e), n?.round);
|
|
@@ -330,16 +325,16 @@ function N(e, t, r, n) {
|
|
|
330
325
|
}
|
|
331
326
|
return e.calendar.balanceDate && e.calendar.balanceDate(a), b(a), a;
|
|
332
327
|
}
|
|
333
|
-
function
|
|
328
|
+
function ie(e, t, r, n) {
|
|
334
329
|
let a = e.copy();
|
|
335
330
|
switch (t) {
|
|
336
331
|
case "hour": {
|
|
337
|
-
let o = e.hour,
|
|
332
|
+
let o = e.hour, i = 0, c = 23;
|
|
338
333
|
if (n?.hourCycle === 12) {
|
|
339
|
-
let
|
|
340
|
-
|
|
334
|
+
let l = o >= 12;
|
|
335
|
+
i = l ? 12 : 0, c = l ? 23 : 11;
|
|
341
336
|
}
|
|
342
|
-
a.hour = $(o, r,
|
|
337
|
+
a.hour = $(o, r, i, c, n?.round);
|
|
343
338
|
break;
|
|
344
339
|
}
|
|
345
340
|
case "minute":
|
|
@@ -365,26 +360,26 @@ function $(e, t, r, n, a = !1) {
|
|
|
365
360
|
e += t, e < r ? e = n - (r - e - 1) : e > n && (e = r + (e - n - 1));
|
|
366
361
|
return e;
|
|
367
362
|
}
|
|
368
|
-
function
|
|
363
|
+
function ce(e, t) {
|
|
369
364
|
let r;
|
|
370
365
|
if (t.years != null && t.years !== 0 || t.months != null && t.months !== 0 || t.weeks != null && t.weeks !== 0 || t.days != null && t.days !== 0) {
|
|
371
|
-
let a =
|
|
366
|
+
let a = P(D(e), {
|
|
372
367
|
years: t.years,
|
|
373
368
|
months: t.months,
|
|
374
369
|
weeks: t.weeks,
|
|
375
370
|
days: t.days
|
|
376
371
|
});
|
|
377
|
-
r =
|
|
372
|
+
r = u(a, e.timeZone);
|
|
378
373
|
} else
|
|
379
|
-
r =
|
|
374
|
+
r = v(e) - e.offset;
|
|
380
375
|
r += t.milliseconds || 0, r += (t.seconds || 0) * 1e3, r += (t.minutes || 0) * 6e4, r += (t.hours || 0) * 36e5;
|
|
381
376
|
let n = d(r, e.timeZone);
|
|
382
377
|
return h(n, e.calendar);
|
|
383
378
|
}
|
|
384
|
-
function
|
|
385
|
-
return
|
|
379
|
+
function Ee(e, t) {
|
|
380
|
+
return ce(e, ae(t));
|
|
386
381
|
}
|
|
387
|
-
function
|
|
382
|
+
function Se(e, t, r, n) {
|
|
388
383
|
switch (t) {
|
|
389
384
|
case "hour": {
|
|
390
385
|
let a = 0, o = 23;
|
|
@@ -392,85 +387,90 @@ function Te(e, t, r, n) {
|
|
|
392
387
|
let y = e.hour >= 12;
|
|
393
388
|
a = y ? 12 : 0, o = y ? 23 : 11;
|
|
394
389
|
}
|
|
395
|
-
let
|
|
390
|
+
let i = D(e), c = h(B(i, {
|
|
396
391
|
hour: a
|
|
397
|
-
}), new
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
].filter((y) => d(y, e.timeZone).day ===
|
|
392
|
+
}), new g()), l = [
|
|
393
|
+
u(c, e.timeZone, "earlier"),
|
|
394
|
+
u(c, e.timeZone, "later")
|
|
395
|
+
].filter((y) => d(y, e.timeZone).day === c.day)[0], f = h(B(i, {
|
|
401
396
|
hour: o
|
|
402
|
-
}), new
|
|
403
|
-
f
|
|
404
|
-
f
|
|
405
|
-
].filter((y) => d(y, e.timeZone).day ===
|
|
406
|
-
return
|
|
397
|
+
}), new g()), M = [
|
|
398
|
+
u(f, e.timeZone, "earlier"),
|
|
399
|
+
u(f, e.timeZone, "later")
|
|
400
|
+
].filter((y) => d(y, e.timeZone).day === f.day).pop(), w = v(e) - e.offset, p = Math.floor(w / I), m = w % I;
|
|
401
|
+
return w = $(p, r, Math.floor(l / I), Math.floor(M / I), n?.round) * I + m, h(d(w, e.timeZone), e.calendar);
|
|
407
402
|
}
|
|
408
403
|
case "minute":
|
|
409
404
|
case "second":
|
|
410
405
|
case "millisecond":
|
|
411
|
-
return
|
|
406
|
+
return ie(e, t, r, n);
|
|
412
407
|
case "era":
|
|
413
408
|
case "year":
|
|
414
409
|
case "month":
|
|
415
410
|
case "day": {
|
|
416
|
-
let a =
|
|
411
|
+
let a = _(D(e), t, r, n), o = u(a, e.timeZone);
|
|
417
412
|
return h(d(o, e.timeZone), e.calendar);
|
|
418
413
|
}
|
|
419
414
|
default:
|
|
420
415
|
throw new Error("Unsupported field " + t);
|
|
421
416
|
}
|
|
422
417
|
}
|
|
423
|
-
function
|
|
424
|
-
let n =
|
|
418
|
+
function Ye(e, t, r) {
|
|
419
|
+
let n = D(e), a = B(J(n, t), t);
|
|
425
420
|
if (a.compare(n) === 0) return e;
|
|
426
|
-
let o =
|
|
421
|
+
let o = u(a, e.timeZone, r);
|
|
427
422
|
return h(d(o, e.timeZone), e.calendar);
|
|
428
423
|
}
|
|
429
|
-
const
|
|
430
|
-
function
|
|
431
|
-
let t = e.match(
|
|
432
|
-
if (!t)
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return r.day = l(t[3], 1, r.calendar.getDaysInMonth(r)), r;
|
|
424
|
+
const Te = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Be = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
425
|
+
function _e(e) {
|
|
426
|
+
let t = e.match(Te);
|
|
427
|
+
if (!t) throw new Error("Invalid ISO 8601 date string: " + e);
|
|
428
|
+
let r = new x(s(t[1], 0, 9999), s(t[2], 1, 12), 1);
|
|
429
|
+
return r.day = s(t[3], 1, r.calendar.getDaysInMonth(r)), r;
|
|
436
430
|
}
|
|
437
|
-
function
|
|
438
|
-
let t = e.match(
|
|
439
|
-
if (!t)
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return a.day = l(t[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
431
|
+
function Ne(e) {
|
|
432
|
+
let t = e.match(Be);
|
|
433
|
+
if (!t) throw new Error("Invalid ISO 8601 date time string: " + e);
|
|
434
|
+
let r = s(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new C(n, r < 1 ? -r + 1 : r, s(t[2], 1, 12), 1, t[4] ? s(t[4], 0, 23) : 0, t[5] ? s(t[5], 0, 59) : 0, t[6] ? s(t[6], 0, 59) : 0, t[7] ? s(t[7], 0, 1 / 0) * 1e3 : 0);
|
|
435
|
+
return a.day = s(t[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
443
436
|
}
|
|
444
|
-
function
|
|
437
|
+
function s(e, t, r) {
|
|
445
438
|
let n = Number(e);
|
|
446
439
|
if (n < t || n > r) throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);
|
|
447
440
|
return n;
|
|
448
441
|
}
|
|
449
|
-
function
|
|
442
|
+
function Pe(e) {
|
|
450
443
|
return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${e.millisecond ? String(e.millisecond / 1e3).slice(1) : ""}`;
|
|
451
444
|
}
|
|
452
445
|
function le(e) {
|
|
453
|
-
let t = h(e, new
|
|
446
|
+
let t = h(e, new g()), r;
|
|
454
447
|
return t.era === "BC" ? r = t.year === 1 ? "0000" : "-" + String(Math.abs(1 - t.year)).padStart(6, "00") : r = String(t.year).padStart(4, "0"), `${r}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
|
|
455
448
|
}
|
|
456
|
-
function
|
|
457
|
-
return `${le(e)}T${
|
|
449
|
+
function se(e) {
|
|
450
|
+
return `${le(e)}T${Pe(e)}`;
|
|
458
451
|
}
|
|
459
|
-
function
|
|
452
|
+
function Re(e) {
|
|
460
453
|
let t = Math.sign(e) < 0 ? "-" : "+";
|
|
461
454
|
e = Math.abs(e);
|
|
462
|
-
let r = Math.floor(e / 36e5), n =
|
|
463
|
-
return
|
|
455
|
+
let r = Math.floor(e / 36e5), n = e % 36e5 / 6e4;
|
|
456
|
+
return `${t}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
457
|
+
}
|
|
458
|
+
function ke(e) {
|
|
459
|
+
return `${se(e)}${Re(e.offset)}[${e.timeZone}]`;
|
|
464
460
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
461
|
+
function Ue(e, t) {
|
|
462
|
+
if (t.has(e))
|
|
463
|
+
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
464
|
+
}
|
|
465
|
+
function N(e, t, r) {
|
|
466
|
+
Ue(e, t), t.set(e, r);
|
|
467
467
|
}
|
|
468
468
|
function V(e) {
|
|
469
|
-
let t = typeof e[0] == "object" ? e.shift() : new
|
|
469
|
+
let t = typeof e[0] == "object" ? e.shift() : new g(), r;
|
|
470
470
|
if (typeof e[0] == "string") r = e.shift();
|
|
471
471
|
else {
|
|
472
|
-
let
|
|
473
|
-
r =
|
|
472
|
+
let i = t.getEras();
|
|
473
|
+
r = i[i.length - 1];
|
|
474
474
|
}
|
|
475
475
|
let n = e.shift(), a = e.shift(), o = e.shift();
|
|
476
476
|
return [
|
|
@@ -481,23 +481,15 @@ function V(e) {
|
|
|
481
481
|
o
|
|
482
482
|
];
|
|
483
483
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
|
|
487
|
-
// If that behavior is desired, use the AnyCalendarDate interface instead.
|
|
488
|
-
// @ts-ignore
|
|
489
|
-
#e;
|
|
490
|
-
constructor(...t) {
|
|
491
|
-
let [r, n, a, o, c] = V(t);
|
|
492
|
-
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = c, b(this);
|
|
493
|
-
}
|
|
484
|
+
var He = /* @__PURE__ */ new WeakMap();
|
|
485
|
+
class x {
|
|
494
486
|
/** Returns a copy of this date. */
|
|
495
487
|
copy() {
|
|
496
|
-
return this.era ? new
|
|
488
|
+
return this.era ? new x(this.calendar, this.era, this.year, this.month, this.day) : new x(this.calendar, this.year, this.month, this.day);
|
|
497
489
|
}
|
|
498
490
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
499
491
|
add(t) {
|
|
500
|
-
return
|
|
492
|
+
return P(this, t);
|
|
501
493
|
}
|
|
502
494
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
503
495
|
subtract(t) {
|
|
@@ -512,7 +504,7 @@ class I {
|
|
|
512
504
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
513
505
|
*/
|
|
514
506
|
cycle(t, r, n) {
|
|
515
|
-
return
|
|
507
|
+
return _(this, t, r, n);
|
|
516
508
|
}
|
|
517
509
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
518
510
|
toDate(t) {
|
|
@@ -524,24 +516,26 @@ class I {
|
|
|
524
516
|
}
|
|
525
517
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
526
518
|
compare(t) {
|
|
527
|
-
return
|
|
519
|
+
return Q(this, t);
|
|
528
520
|
}
|
|
529
|
-
}
|
|
530
|
-
class C {
|
|
531
|
-
// This prevents TypeScript from allowing other types with the same fields to match.
|
|
532
|
-
// @ts-ignore
|
|
533
|
-
#e;
|
|
534
521
|
constructor(...t) {
|
|
535
|
-
|
|
536
|
-
|
|
522
|
+
N(this, He, {
|
|
523
|
+
writable: !0,
|
|
524
|
+
value: void 0
|
|
525
|
+
});
|
|
526
|
+
let [r, n, a, o, i] = V(t);
|
|
527
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, b(this);
|
|
537
528
|
}
|
|
529
|
+
}
|
|
530
|
+
var Ze = /* @__PURE__ */ new WeakMap();
|
|
531
|
+
class C {
|
|
538
532
|
/** Returns a copy of this date. */
|
|
539
533
|
copy() {
|
|
540
534
|
return this.era ? new C(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new C(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
541
535
|
}
|
|
542
536
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
543
537
|
add(t) {
|
|
544
|
-
return
|
|
538
|
+
return P(this, t);
|
|
545
539
|
}
|
|
546
540
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
547
541
|
subtract(t) {
|
|
@@ -549,7 +543,7 @@ class C {
|
|
|
549
543
|
}
|
|
550
544
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
551
545
|
set(t) {
|
|
552
|
-
return J(
|
|
546
|
+
return J(B(this, t), t);
|
|
553
547
|
}
|
|
554
548
|
/**
|
|
555
549
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -561,9 +555,9 @@ class C {
|
|
|
561
555
|
case "year":
|
|
562
556
|
case "month":
|
|
563
557
|
case "day":
|
|
564
|
-
return
|
|
558
|
+
return _(this, t, r, n);
|
|
565
559
|
default:
|
|
566
|
-
return
|
|
560
|
+
return ie(this, t, r, n);
|
|
567
561
|
}
|
|
568
562
|
}
|
|
569
563
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
@@ -572,52 +566,54 @@ class C {
|
|
|
572
566
|
}
|
|
573
567
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
574
568
|
toString() {
|
|
575
|
-
return
|
|
569
|
+
return se(this);
|
|
576
570
|
}
|
|
577
571
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
578
572
|
compare(t) {
|
|
579
|
-
let r =
|
|
580
|
-
return r === 0 ?
|
|
573
|
+
let r = Q(this, t);
|
|
574
|
+
return r === 0 ? me(this, D(t)) : r;
|
|
581
575
|
}
|
|
582
|
-
}
|
|
583
|
-
class E {
|
|
584
|
-
// This prevents TypeScript from allowing other types with the same fields to match.
|
|
585
|
-
// @ts-ignore
|
|
586
|
-
#e;
|
|
587
576
|
constructor(...t) {
|
|
588
|
-
|
|
589
|
-
|
|
577
|
+
N(this, Ze, {
|
|
578
|
+
writable: !0,
|
|
579
|
+
value: void 0
|
|
580
|
+
});
|
|
581
|
+
let [r, n, a, o, i] = V(t);
|
|
582
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
|
|
590
583
|
}
|
|
584
|
+
}
|
|
585
|
+
var Ae = /* @__PURE__ */ new WeakMap();
|
|
586
|
+
class E {
|
|
591
587
|
/** Returns a copy of this date. */
|
|
592
588
|
copy() {
|
|
593
589
|
return this.era ? new E(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new E(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
594
590
|
}
|
|
595
591
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
596
592
|
add(t) {
|
|
597
|
-
return
|
|
593
|
+
return ce(this, t);
|
|
598
594
|
}
|
|
599
595
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
600
596
|
subtract(t) {
|
|
601
|
-
return
|
|
597
|
+
return Ee(this, t);
|
|
602
598
|
}
|
|
603
599
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
604
600
|
set(t, r) {
|
|
605
|
-
return
|
|
601
|
+
return Ye(this, t, r);
|
|
606
602
|
}
|
|
607
603
|
/**
|
|
608
604
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
609
605
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
610
606
|
*/
|
|
611
607
|
cycle(t, r, n) {
|
|
612
|
-
return
|
|
608
|
+
return Se(this, t, r, n);
|
|
613
609
|
}
|
|
614
610
|
/** Converts the date to a native JavaScript Date object. */
|
|
615
611
|
toDate() {
|
|
616
|
-
return
|
|
612
|
+
return ge(this);
|
|
617
613
|
}
|
|
618
614
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
619
615
|
toString() {
|
|
620
|
-
return
|
|
616
|
+
return ke(this);
|
|
621
617
|
}
|
|
622
618
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
623
619
|
toAbsoluteString() {
|
|
@@ -625,14 +621,19 @@ class E {
|
|
|
625
621
|
}
|
|
626
622
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
627
623
|
compare(t) {
|
|
628
|
-
return this.toDate().getTime() -
|
|
624
|
+
return this.toDate().getTime() - pe(t, this.timeZone).toDate().getTime();
|
|
629
625
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
626
|
+
constructor(...t) {
|
|
627
|
+
N(this, Ae, {
|
|
628
|
+
writable: !0,
|
|
629
|
+
value: void 0
|
|
630
|
+
});
|
|
631
|
+
let [r, n, a, o, i] = V(t), c = t.shift(), l = t.shift();
|
|
632
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset = l, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
|
|
635
633
|
}
|
|
634
|
+
}
|
|
635
|
+
let H = /* @__PURE__ */ new Map();
|
|
636
|
+
class Ve {
|
|
636
637
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
637
638
|
format(t) {
|
|
638
639
|
return this.formatter.format(t);
|
|
@@ -673,47 +674,50 @@ class Ne {
|
|
|
673
674
|
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
674
675
|
resolvedOptions() {
|
|
675
676
|
let t = this.formatter.resolvedOptions();
|
|
676
|
-
return
|
|
677
|
+
return qe() && (this.resolvedHourCycle || (this.resolvedHourCycle = je(t.locale, this.options)), t.hourCycle = this.resolvedHourCycle, t.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), t.calendar === "ethiopic-amete-alem" && (t.calendar = "ethioaa"), t;
|
|
678
|
+
}
|
|
679
|
+
constructor(t, r = {}) {
|
|
680
|
+
this.formatter = he(t, r), this.options = r;
|
|
677
681
|
}
|
|
678
682
|
}
|
|
679
|
-
const
|
|
683
|
+
const Oe = {
|
|
680
684
|
true: {
|
|
681
685
|
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
|
|
682
686
|
ja: "h11"
|
|
683
687
|
},
|
|
684
688
|
false: {}
|
|
685
689
|
};
|
|
686
|
-
function
|
|
687
|
-
if (typeof t.hour12 == "boolean" &&
|
|
690
|
+
function he(e, t = {}) {
|
|
691
|
+
if (typeof t.hour12 == "boolean" && Fe()) {
|
|
688
692
|
t = {
|
|
689
693
|
...t
|
|
690
694
|
};
|
|
691
|
-
let a =
|
|
695
|
+
let a = Oe[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
|
|
692
696
|
t.hourCycle = a ?? o, delete t.hour12;
|
|
693
697
|
}
|
|
694
698
|
let r = e + (t ? Object.entries(t).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
|
|
695
|
-
if (
|
|
699
|
+
if (H.has(r)) return H.get(r);
|
|
696
700
|
let n = new Intl.DateTimeFormat(e, t);
|
|
697
|
-
return
|
|
701
|
+
return H.set(r, n), n;
|
|
698
702
|
}
|
|
699
703
|
let Z = null;
|
|
700
|
-
function
|
|
704
|
+
function Fe() {
|
|
701
705
|
return Z == null && (Z = new Intl.DateTimeFormat("en-US", {
|
|
702
706
|
hour: "numeric",
|
|
703
707
|
hour12: !1
|
|
704
708
|
}).format(new Date(2020, 2, 3, 0)) === "24"), Z;
|
|
705
709
|
}
|
|
706
|
-
let
|
|
707
|
-
function
|
|
708
|
-
return
|
|
710
|
+
let A = null;
|
|
711
|
+
function qe() {
|
|
712
|
+
return A == null && (A = new Intl.DateTimeFormat("fr", {
|
|
709
713
|
hour: "numeric",
|
|
710
714
|
hour12: !1
|
|
711
|
-
}).resolvedOptions().hourCycle === "h12"),
|
|
715
|
+
}).resolvedOptions().hourCycle === "h12"), A;
|
|
712
716
|
}
|
|
713
|
-
function
|
|
717
|
+
function je(e, t) {
|
|
714
718
|
if (!t.timeStyle && !t.hour) return;
|
|
715
719
|
e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
716
|
-
let r =
|
|
720
|
+
let r = he(e, {
|
|
717
721
|
...t,
|
|
718
722
|
timeZone: void 0
|
|
719
723
|
// use local timezone
|
|
@@ -725,10 +729,10 @@ function Fe(e, t) {
|
|
|
725
729
|
throw new Error("Unexpected hour cycle result");
|
|
726
730
|
}
|
|
727
731
|
export {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
732
|
+
X as $,
|
|
733
|
+
Je as a,
|
|
734
|
+
x as b,
|
|
735
|
+
Ne as c,
|
|
736
|
+
_e as d,
|
|
737
|
+
Ve as e
|
|
734
738
|
};
|