@oneclick.dev/cms-core-modules 0.0.83 → 0.0.84
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/{ContentEditor-CxKirDdL.mjs → ContentEditor-DPhhOkx3.mjs} +7068 -5926
- package/dist/{ContentEditor-CRFkD4tE.js → ContentEditor-DrxtH_Hq.js} +42 -42
- package/dist/{Create-CsqVYhPO.mjs → Create-6uT9HWar.mjs} +35 -35
- package/dist/{Create-ip0MnS0o.js → Create-DuZ5nZrX.js} +1 -1
- package/dist/{DateFormatter-CvOfaUnU.mjs → DateFormatter-2B0R-DY4.mjs} +204 -400
- package/dist/DateFormatter-DbtOLV0L.js +1 -0
- package/dist/{Detail-RMXFuSRQ.js → Detail-BZ-iE9vf.js} +1 -1
- package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
- package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
- package/dist/{Detail-CbLk1v37.mjs → Detail-CJVMJDP7.mjs} +17 -17
- package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
- package/dist/Detail-CjuhjPby.js +1 -0
- package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
- package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
- package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
- package/dist/Entries-CcEW98F5.js +1 -0
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
- package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
- package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
- package/dist/{Overview-B2bFNGhH.js → Overview-Da0XexiT.js} +1 -1
- package/dist/Overview-DeQQ0FY3.js +1 -0
- package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
- package/dist/{Overview-Cczt_dcE.mjs → Overview-gJSvftdE.mjs} +34 -34
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
- package/dist/{SeoHealth-ZpvB7CS2.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
- package/dist/{SeoHealth-DFZ0LLBH.js → SeoHealth-BkpJ1F2Y.js} +1 -1
- package/dist/TableView-BPWAx--G.mjs +5743 -0
- package/dist/TableView-D63QrVlK.js +4 -0
- package/dist/View-BL70u98U.js +1 -0
- package/dist/{View-DDXN0tKD.mjs → View-BO5N911y.mjs} +5 -5
- package/dist/{agenda-Cl3s_FIE.mjs → agenda-C5grvzSa.mjs} +166 -169
- package/dist/agenda-DXMwVWpN.js +1 -0
- package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
- package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-DQPSFSj7.mjs → exceptions-BIwMhYa4.mjs} +1 -1
- package/dist/{exceptions-BA3PsW4n.js → exceptions-Cn7zooEu.js} +1 -1
- package/dist/{index-CBC9dWZ9.js → index-C9pSS15N.js} +2 -2
- package/dist/{index-YOOlBEZB.mjs → index-MwjeLHPP.mjs} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +22 -22
- package/dist/orders-CG1QUCN8.js +1 -0
- package/dist/{orders-DZzdsHOW.mjs → orders-CeixEBcU.mjs} +57 -58
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +142 -147
- package/package.json +2 -2
- package/dist/DateFormatter-ls6HfWpS.js +0 -1
- package/dist/Detail-BcboL7NF.js +0 -1
- package/dist/Entries-BPkZ7Jg5.js +0 -1
- package/dist/Overview-B-8TLLjh.js +0 -1
- package/dist/TableView-BUPPcHUW.mjs +0 -89505
- package/dist/TableView-CksiPsTL.js +0 -586
- package/dist/View-DfzaVOzS.js +0 -1
- package/dist/agenda-rlFma_wn.js +0 -1
- package/dist/floating-ui.dom-B9WYoHj2.js +0 -1
- package/dist/floating-ui.dom-fpIfhXTZ.mjs +0 -1291
- package/dist/index-DYpruS-A-Cw57iwdY.mjs +0 -4210
- package/dist/index-DYpruS-A-DwDXo9Tq.js +0 -88
- package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
- package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
- package/dist/orders-tP4WdF5q.js +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
1
|
+
function R(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 E(e, t, r, n) {
|
|
6
|
+
t = j(e, t);
|
|
7
7
|
let a = t - 1, o = -2;
|
|
8
|
-
return r <= 2 ? o = 0 :
|
|
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
|
-
function
|
|
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 $e(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 ye = {
|
|
24
24
|
standard: [
|
|
25
25
|
31,
|
|
26
26
|
28,
|
|
@@ -50,25 +50,25 @@ const ge = {
|
|
|
50
50
|
31
|
|
51
51
|
]
|
|
52
52
|
};
|
|
53
|
-
class
|
|
53
|
+
class p {
|
|
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 = R(n, 146097), i = Math.floor(o / 36524), c = R(o, 36524), l = Math.floor(c / 1461), f = R(c, 1461), M = Math.floor(f / 365), w = a * 400 + i * 100 + l * 4 + M + (i !== 4 && M !== 4 ? 1 : 0), [g, m] = $e(w), y = r - E(g, m, 1, 1), O = 2;
|
|
56
|
+
r < E(g, m, 3, 1) ? O = 0 : T(m) && (O = 1);
|
|
57
|
+
let W = Math.floor(((y + O) * 12 + 373) / 367), de = r - E(g, m, W, 1) + 1;
|
|
58
|
+
return new x(g, m, W, de);
|
|
59
59
|
}
|
|
60
60
|
toJulianDay(t) {
|
|
61
|
-
return
|
|
61
|
+
return E(t.era, t.year, t.month, t.day);
|
|
62
62
|
}
|
|
63
63
|
getDaysInMonth(t) {
|
|
64
|
-
return
|
|
64
|
+
return ye[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) {
|
|
68
68
|
return 12;
|
|
69
69
|
}
|
|
70
70
|
getDaysInYear(t) {
|
|
71
|
-
return
|
|
71
|
+
return T(t.year) ? 366 : 365;
|
|
72
72
|
}
|
|
73
73
|
getMaximumMonthsInYear() {
|
|
74
74
|
return 12;
|
|
@@ -96,229 +96,50 @@ class w {
|
|
|
96
96
|
this.identifier = "gregory";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
"001": 1,
|
|
101
|
-
AD: 1,
|
|
102
|
-
AE: 6,
|
|
103
|
-
AF: 6,
|
|
104
|
-
AI: 1,
|
|
105
|
-
AL: 1,
|
|
106
|
-
AM: 1,
|
|
107
|
-
AN: 1,
|
|
108
|
-
AR: 1,
|
|
109
|
-
AT: 1,
|
|
110
|
-
AU: 1,
|
|
111
|
-
AX: 1,
|
|
112
|
-
AZ: 1,
|
|
113
|
-
BA: 1,
|
|
114
|
-
BE: 1,
|
|
115
|
-
BG: 1,
|
|
116
|
-
BH: 6,
|
|
117
|
-
BM: 1,
|
|
118
|
-
BN: 1,
|
|
119
|
-
BY: 1,
|
|
120
|
-
CH: 1,
|
|
121
|
-
CL: 1,
|
|
122
|
-
CM: 1,
|
|
123
|
-
CN: 1,
|
|
124
|
-
CR: 1,
|
|
125
|
-
CY: 1,
|
|
126
|
-
CZ: 1,
|
|
127
|
-
DE: 1,
|
|
128
|
-
DJ: 6,
|
|
129
|
-
DK: 1,
|
|
130
|
-
DZ: 6,
|
|
131
|
-
EC: 1,
|
|
132
|
-
EE: 1,
|
|
133
|
-
EG: 6,
|
|
134
|
-
ES: 1,
|
|
135
|
-
FI: 1,
|
|
136
|
-
FJ: 1,
|
|
137
|
-
FO: 1,
|
|
138
|
-
FR: 1,
|
|
139
|
-
GB: 1,
|
|
140
|
-
GE: 1,
|
|
141
|
-
GF: 1,
|
|
142
|
-
GP: 1,
|
|
143
|
-
GR: 1,
|
|
144
|
-
HR: 1,
|
|
145
|
-
HU: 1,
|
|
146
|
-
IE: 1,
|
|
147
|
-
IQ: 6,
|
|
148
|
-
IR: 6,
|
|
149
|
-
IS: 1,
|
|
150
|
-
IT: 1,
|
|
151
|
-
JO: 6,
|
|
152
|
-
KG: 1,
|
|
153
|
-
KW: 6,
|
|
154
|
-
KZ: 1,
|
|
155
|
-
LB: 1,
|
|
156
|
-
LI: 1,
|
|
157
|
-
LK: 1,
|
|
158
|
-
LT: 1,
|
|
159
|
-
LU: 1,
|
|
160
|
-
LV: 1,
|
|
161
|
-
LY: 6,
|
|
162
|
-
MC: 1,
|
|
163
|
-
MD: 1,
|
|
164
|
-
ME: 1,
|
|
165
|
-
MK: 1,
|
|
166
|
-
MN: 1,
|
|
167
|
-
MQ: 1,
|
|
168
|
-
MV: 5,
|
|
169
|
-
MY: 1,
|
|
170
|
-
NL: 1,
|
|
171
|
-
NO: 1,
|
|
172
|
-
NZ: 1,
|
|
173
|
-
OM: 6,
|
|
174
|
-
PL: 1,
|
|
175
|
-
QA: 6,
|
|
176
|
-
RE: 1,
|
|
177
|
-
RO: 1,
|
|
178
|
-
RS: 1,
|
|
179
|
-
RU: 1,
|
|
180
|
-
SD: 6,
|
|
181
|
-
SE: 1,
|
|
182
|
-
SI: 1,
|
|
183
|
-
SK: 1,
|
|
184
|
-
SM: 1,
|
|
185
|
-
SY: 6,
|
|
186
|
-
TJ: 1,
|
|
187
|
-
TM: 1,
|
|
188
|
-
TR: 1,
|
|
189
|
-
UA: 1,
|
|
190
|
-
UY: 1,
|
|
191
|
-
UZ: 1,
|
|
192
|
-
VA: 1,
|
|
193
|
-
VN: 1,
|
|
194
|
-
XK: 1
|
|
195
|
-
};
|
|
196
|
-
function re(e, t) {
|
|
197
|
-
return t = l(t, e.calendar), e.era === t.era && e.year === t.year && e.month === t.month && e.day === t.day;
|
|
198
|
-
}
|
|
199
|
-
function ve(e, t) {
|
|
200
|
-
return t = l(t, e.calendar), e = z(e), t = z(t), e.era === t.era && e.year === t.year && e.month === t.month;
|
|
201
|
-
}
|
|
202
|
-
function rt(e, t) {
|
|
203
|
-
return j(e.calendar, t.calendar) && re(e, t);
|
|
204
|
-
}
|
|
205
|
-
function nt(e, t) {
|
|
206
|
-
return j(e.calendar, t.calendar) && ve(e, t);
|
|
207
|
-
}
|
|
208
|
-
function j(e, t) {
|
|
99
|
+
function me(e, t) {
|
|
209
100
|
var r, n, a, o;
|
|
210
101
|
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;
|
|
211
102
|
}
|
|
212
|
-
function
|
|
213
|
-
return re(e, xe(t));
|
|
214
|
-
}
|
|
215
|
-
const De = {
|
|
216
|
-
sun: 0,
|
|
217
|
-
mon: 1,
|
|
218
|
-
tue: 2,
|
|
219
|
-
wed: 3,
|
|
220
|
-
thu: 4,
|
|
221
|
-
fri: 5,
|
|
222
|
-
sat: 6
|
|
223
|
-
};
|
|
224
|
-
function ot(e, t, r) {
|
|
225
|
-
let n = e.calendar.toJulianDay(e), a = r ? De[r] : Ae(t), o = Math.ceil(n + 1 - a) % 7;
|
|
226
|
-
return o < 0 && (o += 7), o;
|
|
227
|
-
}
|
|
228
|
-
function Ie(e) {
|
|
103
|
+
function be(e) {
|
|
229
104
|
return d(Date.now(), e);
|
|
230
105
|
}
|
|
231
|
-
function
|
|
232
|
-
return
|
|
106
|
+
function Ve(e) {
|
|
107
|
+
return ve(be(e));
|
|
233
108
|
}
|
|
234
|
-
function
|
|
109
|
+
function Q(e, t) {
|
|
235
110
|
return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
|
|
236
111
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
112
|
+
function Me(e, t) {
|
|
113
|
+
return z(e) - z(t);
|
|
239
114
|
}
|
|
240
|
-
function
|
|
115
|
+
function z(e) {
|
|
241
116
|
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
242
117
|
}
|
|
243
|
-
let
|
|
244
|
-
function
|
|
245
|
-
return
|
|
246
|
-
}
|
|
247
|
-
function oe() {
|
|
248
|
-
return Se;
|
|
118
|
+
let P = null, we = !1;
|
|
119
|
+
function X() {
|
|
120
|
+
return P == null && (P = new Intl.DateTimeFormat().resolvedOptions().timeZone), P;
|
|
249
121
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
252
|
-
days: e.day - 1
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function it(e) {
|
|
256
|
-
return e.add({
|
|
257
|
-
days: e.calendar.getDaysInMonth(e) - e.day
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
const Q = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
|
|
261
|
-
function Ce(e) {
|
|
262
|
-
if (Intl.Locale) {
|
|
263
|
-
let r = Q.get(e);
|
|
264
|
-
return r || (r = new Intl.Locale(e).maximize().region, r && Q.set(e, r)), r;
|
|
265
|
-
}
|
|
266
|
-
let t = e.split("-")[1];
|
|
267
|
-
return t === "u" ? void 0 : t;
|
|
268
|
-
}
|
|
269
|
-
function Ae(e) {
|
|
270
|
-
let t = O.get(e);
|
|
271
|
-
if (!t) {
|
|
272
|
-
if (Intl.Locale) {
|
|
273
|
-
let n = new Intl.Locale(e);
|
|
274
|
-
if ("getWeekInfo" in n && (t = n.getWeekInfo(), t))
|
|
275
|
-
return O.set(e, t), t.firstDay;
|
|
276
|
-
}
|
|
277
|
-
let r = Ce(e);
|
|
278
|
-
if (e.includes("-fw-")) {
|
|
279
|
-
let n = e.split("-fw-")[1].split("-")[0];
|
|
280
|
-
n === "mon" ? t = {
|
|
281
|
-
firstDay: 1
|
|
282
|
-
} : n === "tue" ? t = {
|
|
283
|
-
firstDay: 2
|
|
284
|
-
} : n === "wed" ? t = {
|
|
285
|
-
firstDay: 3
|
|
286
|
-
} : n === "thu" ? t = {
|
|
287
|
-
firstDay: 4
|
|
288
|
-
} : n === "fri" ? t = {
|
|
289
|
-
firstDay: 5
|
|
290
|
-
} : n === "sat" ? t = {
|
|
291
|
-
firstDay: 6
|
|
292
|
-
} : t = {
|
|
293
|
-
firstDay: 0
|
|
294
|
-
};
|
|
295
|
-
} else e.includes("-ca-iso8601") ? t = {
|
|
296
|
-
firstDay: 1
|
|
297
|
-
} : t = {
|
|
298
|
-
firstDay: r && we[r] || 0
|
|
299
|
-
};
|
|
300
|
-
O.set(e, t);
|
|
301
|
-
}
|
|
302
|
-
return t.firstDay;
|
|
122
|
+
function ee() {
|
|
123
|
+
return we;
|
|
303
124
|
}
|
|
304
125
|
function v(e) {
|
|
305
|
-
e =
|
|
306
|
-
let t =
|
|
307
|
-
return
|
|
126
|
+
e = h(e, new p());
|
|
127
|
+
let t = j(e.era, e.year);
|
|
128
|
+
return te(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
308
129
|
}
|
|
309
|
-
function
|
|
130
|
+
function te(e, t, r, n, a, o, i) {
|
|
310
131
|
let c = /* @__PURE__ */ new Date();
|
|
311
132
|
return c.setUTCHours(n, a, o, i), c.setUTCFullYear(e, t - 1, r), c.getTime();
|
|
312
133
|
}
|
|
313
|
-
function
|
|
134
|
+
function H(e, t) {
|
|
314
135
|
if (t === "UTC") return 0;
|
|
315
|
-
if (e > 0 && t ===
|
|
316
|
-
let { year: r, month: n, day: a, hour: o, minute: i, second: c } =
|
|
317
|
-
return
|
|
136
|
+
if (e > 0 && t === X() && !ee()) return new Date(e).getTimezoneOffset() * -6e4;
|
|
137
|
+
let { year: r, month: n, day: a, hour: o, minute: i, second: c } = re(e, t);
|
|
138
|
+
return te(r, n, a, o, i, c, 0) - Math.floor(e / 1e3) * 1e3;
|
|
318
139
|
}
|
|
319
|
-
const
|
|
320
|
-
function
|
|
321
|
-
let r =
|
|
140
|
+
const L = /* @__PURE__ */ new Map();
|
|
141
|
+
function re(e, t) {
|
|
142
|
+
let r = L.get(t);
|
|
322
143
|
r || (r = new Intl.DateTimeFormat("en-US", {
|
|
323
144
|
timeZone: t,
|
|
324
145
|
hour12: !1,
|
|
@@ -329,7 +150,7 @@ function ce(e, t) {
|
|
|
329
150
|
hour: "numeric",
|
|
330
151
|
minute: "numeric",
|
|
331
152
|
second: "numeric"
|
|
332
|
-
}),
|
|
153
|
+
}), L.set(t, r));
|
|
333
154
|
let n = r.formatToParts(new Date(e)), a = {};
|
|
334
155
|
for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
|
|
335
156
|
return {
|
|
@@ -342,28 +163,28 @@ function ce(e, t) {
|
|
|
342
163
|
second: +a.second
|
|
343
164
|
};
|
|
344
165
|
}
|
|
345
|
-
const
|
|
346
|
-
function
|
|
166
|
+
const K = 864e5;
|
|
167
|
+
function ge(e, t, r, n) {
|
|
347
168
|
return (r === n ? [
|
|
348
169
|
r
|
|
349
170
|
] : [
|
|
350
171
|
r,
|
|
351
172
|
n
|
|
352
|
-
]).filter((o) =>
|
|
173
|
+
]).filter((o) => pe(e, t, o));
|
|
353
174
|
}
|
|
354
|
-
function
|
|
355
|
-
let n =
|
|
175
|
+
function pe(e, t, r) {
|
|
176
|
+
let n = re(r, t);
|
|
356
177
|
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;
|
|
357
178
|
}
|
|
358
179
|
function u(e, t, r = "compatible") {
|
|
359
180
|
let n = D(e);
|
|
360
181
|
if (t === "UTC") return v(n);
|
|
361
|
-
if (t ===
|
|
362
|
-
n =
|
|
363
|
-
let
|
|
364
|
-
return
|
|
182
|
+
if (t === X() && r === "compatible" && !ee()) {
|
|
183
|
+
n = h(n, new p());
|
|
184
|
+
let l = /* @__PURE__ */ new Date(), f = j(n.era, n.year);
|
|
185
|
+
return l.setFullYear(f, n.month - 1, n.day), l.setHours(n.hour, n.minute, n.second, n.millisecond), l.getTime();
|
|
365
186
|
}
|
|
366
|
-
let a = v(n), o =
|
|
187
|
+
let a = v(n), o = H(a - K, t), i = H(a + K, t), c = ge(n, t, a - o, a - i);
|
|
367
188
|
if (c.length === 1) return c[0];
|
|
368
189
|
if (c.length > 1) switch (r) {
|
|
369
190
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
@@ -386,116 +207,116 @@ function u(e, t, r = "compatible") {
|
|
|
386
207
|
throw new RangeError("No such absolute time found");
|
|
387
208
|
}
|
|
388
209
|
}
|
|
389
|
-
function
|
|
210
|
+
function ne(e, t, r = "compatible") {
|
|
390
211
|
return new Date(u(e, t, r));
|
|
391
212
|
}
|
|
392
213
|
function d(e, t) {
|
|
393
|
-
let r =
|
|
394
|
-
return new
|
|
214
|
+
let r = H(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();
|
|
215
|
+
return new C(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, t, r, c, l, f, M);
|
|
395
216
|
}
|
|
396
|
-
function
|
|
397
|
-
return new
|
|
217
|
+
function ve(e) {
|
|
218
|
+
return new x(e.calendar, e.era, e.year, e.month, e.day);
|
|
398
219
|
}
|
|
399
220
|
function D(e, t) {
|
|
400
221
|
let r = 0, n = 0, a = 0, o = 0;
|
|
401
222
|
if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: o } = e);
|
|
402
223
|
else if ("hour" in e && !t) return e;
|
|
403
|
-
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new
|
|
224
|
+
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new S(e.calendar, e.era, e.year, e.month, e.day, r, n, a, o);
|
|
404
225
|
}
|
|
405
|
-
function
|
|
406
|
-
if (
|
|
226
|
+
function h(e, t) {
|
|
227
|
+
if (me(e.calendar, t)) return e;
|
|
407
228
|
let r = t.fromJulianDay(e.calendar.toJulianDay(e)), n = e.copy();
|
|
408
229
|
return n.calendar = t, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, b(n), n;
|
|
409
230
|
}
|
|
410
|
-
function
|
|
411
|
-
if (e instanceof
|
|
412
|
-
return e.timeZone === t ? e :
|
|
231
|
+
function De(e, t, r) {
|
|
232
|
+
if (e instanceof C)
|
|
233
|
+
return e.timeZone === t ? e : Ie(e, t);
|
|
413
234
|
let n = u(e, t, r);
|
|
414
235
|
return d(n, t);
|
|
415
236
|
}
|
|
416
|
-
function
|
|
237
|
+
function xe(e) {
|
|
417
238
|
let t = v(e) - e.offset;
|
|
418
239
|
return new Date(t);
|
|
419
240
|
}
|
|
420
|
-
function
|
|
241
|
+
function Ie(e, t) {
|
|
421
242
|
let r = v(e) - e.offset;
|
|
422
|
-
return
|
|
243
|
+
return h(d(r, t), e.calendar);
|
|
423
244
|
}
|
|
424
|
-
const
|
|
245
|
+
const I = 36e5;
|
|
425
246
|
function B(e, t) {
|
|
426
|
-
let r = e.copy(), n = "hour" in r ?
|
|
427
|
-
|
|
247
|
+
let r = e.copy(), n = "hour" in r ? Ye(r, t) : 0;
|
|
248
|
+
F(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, q(r), ae(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, Se(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
|
|
428
249
|
let a = r.calendar.getYearsInEra(r);
|
|
429
250
|
if (r.year > a) {
|
|
430
251
|
var o, i;
|
|
431
|
-
let
|
|
432
|
-
r.year = a, r.month =
|
|
252
|
+
let l = (o = (i = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, r);
|
|
253
|
+
r.year = a, r.month = l ? 1 : r.calendar.getMonthsInYear(r), r.day = l ? 1 : r.calendar.getDaysInMonth(r);
|
|
433
254
|
}
|
|
434
255
|
r.month < 1 && (r.month = 1, r.day = 1);
|
|
435
256
|
let c = r.calendar.getMonthsInYear(r);
|
|
436
257
|
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;
|
|
437
258
|
}
|
|
438
|
-
function
|
|
259
|
+
function F(e, t) {
|
|
439
260
|
var r, n;
|
|
440
261
|
!((r = (n = e.calendar).isInverseEra) === null || r === void 0) && r.call(n, e) && (t = -t), e.year += t;
|
|
441
262
|
}
|
|
442
|
-
function
|
|
263
|
+
function q(e) {
|
|
443
264
|
for (; e.month < 1; )
|
|
444
|
-
|
|
265
|
+
F(e, -1), e.month += e.calendar.getMonthsInYear(e);
|
|
445
266
|
let t = 0;
|
|
446
267
|
for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
|
|
447
|
-
e.month -= t,
|
|
268
|
+
e.month -= t, F(e, 1);
|
|
448
269
|
}
|
|
449
|
-
function
|
|
270
|
+
function Se(e) {
|
|
450
271
|
for (; e.day < 1; )
|
|
451
|
-
e.month--,
|
|
272
|
+
e.month--, q(e), e.day += e.calendar.getDaysInMonth(e);
|
|
452
273
|
for (; e.day > e.calendar.getDaysInMonth(e); )
|
|
453
|
-
e.day -= e.calendar.getDaysInMonth(e), e.month++,
|
|
274
|
+
e.day -= e.calendar.getDaysInMonth(e), e.month++, q(e);
|
|
454
275
|
}
|
|
455
|
-
function
|
|
276
|
+
function ae(e) {
|
|
456
277
|
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));
|
|
457
278
|
}
|
|
458
279
|
function b(e) {
|
|
459
|
-
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)),
|
|
280
|
+
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), ae(e);
|
|
460
281
|
}
|
|
461
|
-
function
|
|
282
|
+
function oe(e) {
|
|
462
283
|
let t = {};
|
|
463
284
|
for (let r in e) typeof e[r] == "number" && (t[r] = -e[r]);
|
|
464
285
|
return t;
|
|
465
286
|
}
|
|
466
|
-
function
|
|
467
|
-
return B(e,
|
|
287
|
+
function ie(e, t) {
|
|
288
|
+
return B(e, oe(t));
|
|
468
289
|
}
|
|
469
|
-
function
|
|
290
|
+
function _(e, t) {
|
|
470
291
|
let r = e.copy();
|
|
471
292
|
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;
|
|
472
293
|
}
|
|
473
|
-
function
|
|
294
|
+
function U(e, t) {
|
|
474
295
|
let r = e.copy();
|
|
475
|
-
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),
|
|
296
|
+
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), Ee(r), r;
|
|
476
297
|
}
|
|
477
|
-
function
|
|
478
|
-
e.second += Math.floor(e.millisecond / 1e3), e.millisecond =
|
|
298
|
+
function Ce(e) {
|
|
299
|
+
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);
|
|
479
300
|
let t = Math.floor(e.hour / 24);
|
|
480
|
-
return e.hour =
|
|
301
|
+
return e.hour = Y(e.hour, 24), t;
|
|
481
302
|
}
|
|
482
|
-
function
|
|
303
|
+
function Ee(e) {
|
|
483
304
|
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));
|
|
484
305
|
}
|
|
485
|
-
function
|
|
306
|
+
function Y(e, t) {
|
|
486
307
|
let r = e % t;
|
|
487
308
|
return r < 0 && (r += t), r;
|
|
488
309
|
}
|
|
489
|
-
function
|
|
490
|
-
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0,
|
|
310
|
+
function Ye(e, t) {
|
|
311
|
+
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, Ce(e);
|
|
491
312
|
}
|
|
492
|
-
function
|
|
313
|
+
function J(e, t, r, n) {
|
|
493
314
|
let a = e.copy();
|
|
494
315
|
switch (t) {
|
|
495
316
|
case "era": {
|
|
496
|
-
let c = e.calendar.getEras(),
|
|
497
|
-
if (
|
|
498
|
-
|
|
317
|
+
let c = e.calendar.getEras(), l = c.indexOf(e.era);
|
|
318
|
+
if (l < 0) throw new Error("Invalid era: " + e.era);
|
|
319
|
+
l = $(l, r, 0, c.length - 1, n?.round), a.era = c[l], b(a);
|
|
499
320
|
break;
|
|
500
321
|
}
|
|
501
322
|
case "year":
|
|
@@ -513,14 +334,14 @@ function W(e, t, r, n) {
|
|
|
513
334
|
}
|
|
514
335
|
return e.calendar.balanceDate && e.calendar.balanceDate(a), b(a), a;
|
|
515
336
|
}
|
|
516
|
-
function
|
|
337
|
+
function ce(e, t, r, n) {
|
|
517
338
|
let a = e.copy();
|
|
518
339
|
switch (t) {
|
|
519
340
|
case "hour": {
|
|
520
341
|
let o = e.hour, i = 0, c = 23;
|
|
521
342
|
if (n?.hourCycle === 12) {
|
|
522
|
-
let
|
|
523
|
-
i =
|
|
343
|
+
let l = o >= 12;
|
|
344
|
+
i = l ? 12 : 0, c = l ? 23 : 11;
|
|
524
345
|
}
|
|
525
346
|
a.hour = $(o, r, i, c, n?.round);
|
|
526
347
|
break;
|
|
@@ -548,7 +369,7 @@ function $(e, t, r, n, a = !1) {
|
|
|
548
369
|
e += t, e < r ? e = n - (r - e - 1) : e > n && (e = r + (e - n - 1));
|
|
549
370
|
return e;
|
|
550
371
|
}
|
|
551
|
-
function
|
|
372
|
+
function le(e, t) {
|
|
552
373
|
let r;
|
|
553
374
|
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) {
|
|
554
375
|
let a = B(D(e), {
|
|
@@ -562,12 +383,12 @@ function de(e, t) {
|
|
|
562
383
|
r = v(e) - e.offset;
|
|
563
384
|
r += t.milliseconds || 0, r += (t.seconds || 0) * 1e3, r += (t.minutes || 0) * 6e4, r += (t.hours || 0) * 36e5;
|
|
564
385
|
let n = d(r, e.timeZone);
|
|
565
|
-
return
|
|
386
|
+
return h(n, e.calendar);
|
|
566
387
|
}
|
|
567
|
-
function
|
|
568
|
-
return
|
|
388
|
+
function Te(e, t) {
|
|
389
|
+
return le(e, oe(t));
|
|
569
390
|
}
|
|
570
|
-
function
|
|
391
|
+
function Ue(e, t, r, n) {
|
|
571
392
|
switch (t) {
|
|
572
393
|
case "hour": {
|
|
573
394
|
let a = 0, o = 23;
|
|
@@ -575,88 +396,88 @@ function Le(e, t, r, n) {
|
|
|
575
396
|
let y = e.hour >= 12;
|
|
576
397
|
a = y ? 12 : 0, o = y ? 23 : 11;
|
|
577
398
|
}
|
|
578
|
-
let i = D(e), c =
|
|
399
|
+
let i = D(e), c = h(U(i, {
|
|
579
400
|
hour: a
|
|
580
|
-
}), new
|
|
401
|
+
}), new p()), l = [
|
|
581
402
|
u(c, e.timeZone, "earlier"),
|
|
582
403
|
u(c, e.timeZone, "later")
|
|
583
|
-
].filter((y) => d(y, e.timeZone).day === c.day)[0],
|
|
404
|
+
].filter((y) => d(y, e.timeZone).day === c.day)[0], f = h(U(i, {
|
|
584
405
|
hour: o
|
|
585
|
-
}), new
|
|
586
|
-
u(
|
|
587
|
-
u(
|
|
588
|
-
].filter((y) => d(y, e.timeZone).day ===
|
|
589
|
-
return
|
|
406
|
+
}), new p()), M = [
|
|
407
|
+
u(f, e.timeZone, "earlier"),
|
|
408
|
+
u(f, e.timeZone, "later")
|
|
409
|
+
].filter((y) => d(y, e.timeZone).day === f.day).pop(), w = v(e) - e.offset, g = Math.floor(w / I), m = w % I;
|
|
410
|
+
return w = $(g, r, Math.floor(l / I), Math.floor(M / I), n?.round) * I + m, h(d(w, e.timeZone), e.calendar);
|
|
590
411
|
}
|
|
591
412
|
case "minute":
|
|
592
413
|
case "second":
|
|
593
414
|
case "millisecond":
|
|
594
|
-
return
|
|
415
|
+
return ce(e, t, r, n);
|
|
595
416
|
case "era":
|
|
596
417
|
case "year":
|
|
597
418
|
case "month":
|
|
598
419
|
case "day": {
|
|
599
|
-
let a =
|
|
600
|
-
return
|
|
420
|
+
let a = J(D(e), t, r, n), o = u(a, e.timeZone);
|
|
421
|
+
return h(d(o, e.timeZone), e.calendar);
|
|
601
422
|
}
|
|
602
423
|
default:
|
|
603
424
|
throw new Error("Unsupported field " + t);
|
|
604
425
|
}
|
|
605
426
|
}
|
|
606
|
-
function
|
|
607
|
-
let n = D(e), a =
|
|
427
|
+
function Be(e, t, r) {
|
|
428
|
+
let n = D(e), a = U(_(n, t), t);
|
|
608
429
|
if (a.compare(n) === 0) return e;
|
|
609
430
|
let o = u(a, e.timeZone, r);
|
|
610
|
-
return
|
|
431
|
+
return h(d(o, e.timeZone), e.calendar);
|
|
611
432
|
}
|
|
612
|
-
const
|
|
613
|
-
function
|
|
614
|
-
let t = e.match(
|
|
433
|
+
const Oe = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Re = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, se = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
434
|
+
function We(e) {
|
|
435
|
+
let t = e.match(Oe);
|
|
615
436
|
if (!t)
|
|
616
|
-
throw
|
|
617
|
-
let r = new
|
|
618
|
-
return r.day =
|
|
437
|
+
throw se.test(e) ? new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date string: " + e);
|
|
438
|
+
let r = new x(s(t[1], 0, 9999), s(t[2], 1, 12), 1);
|
|
439
|
+
return r.day = s(t[3], 1, r.calendar.getDaysInMonth(r)), r;
|
|
619
440
|
}
|
|
620
|
-
function
|
|
621
|
-
let t = e.match(
|
|
441
|
+
function ze(e) {
|
|
442
|
+
let t = e.match(Re);
|
|
622
443
|
if (!t)
|
|
623
|
-
throw
|
|
624
|
-
let r =
|
|
625
|
-
return a.day =
|
|
444
|
+
throw se.test(e) ? new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date time string: " + e);
|
|
445
|
+
let r = s(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new S(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);
|
|
446
|
+
return a.day = s(t[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
626
447
|
}
|
|
627
|
-
function
|
|
448
|
+
function s(e, t, r) {
|
|
628
449
|
let n = Number(e);
|
|
629
450
|
if (n < t || n > r) throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);
|
|
630
451
|
return n;
|
|
631
452
|
}
|
|
632
|
-
function
|
|
453
|
+
function Pe(e) {
|
|
633
454
|
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) : ""}`;
|
|
634
455
|
}
|
|
635
|
-
function
|
|
636
|
-
let t =
|
|
456
|
+
function he(e) {
|
|
457
|
+
let t = h(e, new p()), r;
|
|
637
458
|
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")}`;
|
|
638
459
|
}
|
|
639
|
-
function
|
|
640
|
-
return `${
|
|
460
|
+
function fe(e) {
|
|
461
|
+
return `${he(e)}T${Pe(e)}`;
|
|
641
462
|
}
|
|
642
|
-
function
|
|
463
|
+
function ke(e) {
|
|
643
464
|
let t = Math.sign(e) < 0 ? "-" : "+";
|
|
644
465
|
e = Math.abs(e);
|
|
645
466
|
let r = Math.floor(e / 36e5), n = Math.floor(e % 36e5 / 6e4), a = Math.floor(e % 36e5 % 6e4 / 1e3), o = `${t}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
646
467
|
return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
|
|
647
468
|
}
|
|
648
|
-
function
|
|
649
|
-
return `${
|
|
469
|
+
function Ae(e) {
|
|
470
|
+
return `${fe(e)}${ke(e.offset)}[${e.timeZone}]`;
|
|
650
471
|
}
|
|
651
|
-
function
|
|
472
|
+
function Ze(e, t) {
|
|
652
473
|
if (t.has(e))
|
|
653
474
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
654
475
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
476
|
+
function N(e, t, r) {
|
|
477
|
+
Ze(e, t), t.set(e, r);
|
|
657
478
|
}
|
|
658
479
|
function V(e) {
|
|
659
|
-
let t = typeof e[0] == "object" ? e.shift() : new
|
|
480
|
+
let t = typeof e[0] == "object" ? e.shift() : new p(), r;
|
|
660
481
|
if (typeof e[0] == "string") r = e.shift();
|
|
661
482
|
else {
|
|
662
483
|
let i = t.getEras();
|
|
@@ -671,11 +492,11 @@ function V(e) {
|
|
|
671
492
|
o
|
|
672
493
|
];
|
|
673
494
|
}
|
|
674
|
-
var
|
|
675
|
-
class
|
|
495
|
+
var He = /* @__PURE__ */ new WeakMap();
|
|
496
|
+
class x {
|
|
676
497
|
/** Returns a copy of this date. */
|
|
677
498
|
copy() {
|
|
678
|
-
return this.era ? new
|
|
499
|
+
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);
|
|
679
500
|
}
|
|
680
501
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
681
502
|
add(t) {
|
|
@@ -683,33 +504,33 @@ class I {
|
|
|
683
504
|
}
|
|
684
505
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
685
506
|
subtract(t) {
|
|
686
|
-
return
|
|
507
|
+
return ie(this, t);
|
|
687
508
|
}
|
|
688
509
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
689
510
|
set(t) {
|
|
690
|
-
return
|
|
511
|
+
return _(this, t);
|
|
691
512
|
}
|
|
692
513
|
/**
|
|
693
514
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
694
515
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
695
516
|
*/
|
|
696
517
|
cycle(t, r, n) {
|
|
697
|
-
return
|
|
518
|
+
return J(this, t, r, n);
|
|
698
519
|
}
|
|
699
520
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
700
521
|
toDate(t) {
|
|
701
|
-
return
|
|
522
|
+
return ne(this, t);
|
|
702
523
|
}
|
|
703
524
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
704
525
|
toString() {
|
|
705
|
-
return
|
|
526
|
+
return he(this);
|
|
706
527
|
}
|
|
707
528
|
/** 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. */
|
|
708
529
|
compare(t) {
|
|
709
|
-
return
|
|
530
|
+
return Q(this, t);
|
|
710
531
|
}
|
|
711
532
|
constructor(...t) {
|
|
712
|
-
|
|
533
|
+
N(this, He, {
|
|
713
534
|
writable: !0,
|
|
714
535
|
value: void 0
|
|
715
536
|
});
|
|
@@ -717,11 +538,11 @@ class I {
|
|
|
717
538
|
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, b(this);
|
|
718
539
|
}
|
|
719
540
|
}
|
|
720
|
-
var
|
|
721
|
-
class
|
|
541
|
+
var Fe = /* @__PURE__ */ new WeakMap();
|
|
542
|
+
class S {
|
|
722
543
|
/** Returns a copy of this date. */
|
|
723
544
|
copy() {
|
|
724
|
-
return this.era ? new
|
|
545
|
+
return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new S(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
725
546
|
}
|
|
726
547
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
727
548
|
add(t) {
|
|
@@ -729,11 +550,11 @@ class E {
|
|
|
729
550
|
}
|
|
730
551
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
731
552
|
subtract(t) {
|
|
732
|
-
return
|
|
553
|
+
return ie(this, t);
|
|
733
554
|
}
|
|
734
555
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
735
556
|
set(t) {
|
|
736
|
-
return
|
|
557
|
+
return _(U(this, t), t);
|
|
737
558
|
}
|
|
738
559
|
/**
|
|
739
560
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -745,26 +566,26 @@ class E {
|
|
|
745
566
|
case "year":
|
|
746
567
|
case "month":
|
|
747
568
|
case "day":
|
|
748
|
-
return
|
|
569
|
+
return J(this, t, r, n);
|
|
749
570
|
default:
|
|
750
|
-
return
|
|
571
|
+
return ce(this, t, r, n);
|
|
751
572
|
}
|
|
752
573
|
}
|
|
753
574
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
754
575
|
toDate(t, r) {
|
|
755
|
-
return
|
|
576
|
+
return ne(this, t, r);
|
|
756
577
|
}
|
|
757
578
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
758
579
|
toString() {
|
|
759
|
-
return
|
|
580
|
+
return fe(this);
|
|
760
581
|
}
|
|
761
582
|
/** 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. */
|
|
762
583
|
compare(t) {
|
|
763
|
-
let r =
|
|
764
|
-
return r === 0 ?
|
|
584
|
+
let r = Q(this, t);
|
|
585
|
+
return r === 0 ? Me(this, D(t)) : r;
|
|
765
586
|
}
|
|
766
587
|
constructor(...t) {
|
|
767
|
-
|
|
588
|
+
N(this, Fe, {
|
|
768
589
|
writable: !0,
|
|
769
590
|
value: void 0
|
|
770
591
|
});
|
|
@@ -772,38 +593,38 @@ class E {
|
|
|
772
593
|
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);
|
|
773
594
|
}
|
|
774
595
|
}
|
|
775
|
-
var
|
|
776
|
-
class
|
|
596
|
+
var qe = /* @__PURE__ */ new WeakMap();
|
|
597
|
+
class C {
|
|
777
598
|
/** Returns a copy of this date. */
|
|
778
599
|
copy() {
|
|
779
|
-
return this.era ? new
|
|
600
|
+
return this.era ? new C(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new C(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
780
601
|
}
|
|
781
602
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
782
603
|
add(t) {
|
|
783
|
-
return
|
|
604
|
+
return le(this, t);
|
|
784
605
|
}
|
|
785
606
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
786
607
|
subtract(t) {
|
|
787
|
-
return
|
|
608
|
+
return Te(this, t);
|
|
788
609
|
}
|
|
789
610
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
790
611
|
set(t, r) {
|
|
791
|
-
return
|
|
612
|
+
return Be(this, t, r);
|
|
792
613
|
}
|
|
793
614
|
/**
|
|
794
615
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
795
616
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
796
617
|
*/
|
|
797
618
|
cycle(t, r, n) {
|
|
798
|
-
return
|
|
619
|
+
return Ue(this, t, r, n);
|
|
799
620
|
}
|
|
800
621
|
/** Converts the date to a native JavaScript Date object. */
|
|
801
622
|
toDate() {
|
|
802
|
-
return
|
|
623
|
+
return xe(this);
|
|
803
624
|
}
|
|
804
625
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
805
626
|
toString() {
|
|
806
|
-
return
|
|
627
|
+
return Ae(this);
|
|
807
628
|
}
|
|
808
629
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
809
630
|
toAbsoluteString() {
|
|
@@ -811,19 +632,19 @@ class S {
|
|
|
811
632
|
}
|
|
812
633
|
/** 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. */
|
|
813
634
|
compare(t) {
|
|
814
|
-
return this.toDate().getTime() -
|
|
635
|
+
return this.toDate().getTime() - De(t, this.timeZone).toDate().getTime();
|
|
815
636
|
}
|
|
816
637
|
constructor(...t) {
|
|
817
|
-
|
|
638
|
+
N(this, qe, {
|
|
818
639
|
writable: !0,
|
|
819
640
|
value: void 0
|
|
820
641
|
});
|
|
821
|
-
let [r, n, a, o, i] = V(t), c = t.shift(),
|
|
822
|
-
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset =
|
|
642
|
+
let [r, n, a, o, i] = V(t), c = t.shift(), l = t.shift();
|
|
643
|
+
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);
|
|
823
644
|
}
|
|
824
645
|
}
|
|
825
|
-
let
|
|
826
|
-
class
|
|
646
|
+
let k = /* @__PURE__ */ new Map();
|
|
647
|
+
class Le {
|
|
827
648
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
828
649
|
format(t) {
|
|
829
650
|
return this.formatter.format(t);
|
|
@@ -864,50 +685,50 @@ class lt {
|
|
|
864
685
|
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
865
686
|
resolvedOptions() {
|
|
866
687
|
let t = this.formatter.resolvedOptions();
|
|
867
|
-
return
|
|
688
|
+
return Je() && (this.resolvedHourCycle || (this.resolvedHourCycle = Ne(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;
|
|
868
689
|
}
|
|
869
690
|
constructor(t, r = {}) {
|
|
870
|
-
this.formatter =
|
|
691
|
+
this.formatter = ue(t, r), this.options = r;
|
|
871
692
|
}
|
|
872
693
|
}
|
|
873
|
-
const
|
|
694
|
+
const je = {
|
|
874
695
|
true: {
|
|
875
696
|
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
|
|
876
697
|
ja: "h11"
|
|
877
698
|
},
|
|
878
699
|
false: {}
|
|
879
700
|
};
|
|
880
|
-
function
|
|
881
|
-
if (typeof t.hour12 == "boolean" &&
|
|
701
|
+
function ue(e, t = {}) {
|
|
702
|
+
if (typeof t.hour12 == "boolean" && _e()) {
|
|
882
703
|
t = {
|
|
883
704
|
...t
|
|
884
705
|
};
|
|
885
|
-
let a =
|
|
706
|
+
let a = je[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
|
|
886
707
|
t.hourCycle = a ?? o, delete t.hour12;
|
|
887
708
|
}
|
|
888
709
|
let r = e + (t ? Object.entries(t).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
|
|
889
|
-
if (
|
|
710
|
+
if (k.has(r)) return k.get(r);
|
|
890
711
|
let n = new Intl.DateTimeFormat(e, t);
|
|
891
|
-
return
|
|
712
|
+
return k.set(r, n), n;
|
|
892
713
|
}
|
|
893
|
-
let
|
|
894
|
-
function
|
|
895
|
-
return
|
|
714
|
+
let A = null;
|
|
715
|
+
function _e() {
|
|
716
|
+
return A == null && (A = new Intl.DateTimeFormat("en-US", {
|
|
896
717
|
hour: "numeric",
|
|
897
718
|
hour12: !1
|
|
898
|
-
}).format(new Date(2020, 2, 3, 0)) === "24"),
|
|
719
|
+
}).format(new Date(2020, 2, 3, 0)) === "24"), A;
|
|
899
720
|
}
|
|
900
|
-
let
|
|
901
|
-
function
|
|
902
|
-
return
|
|
721
|
+
let Z = null;
|
|
722
|
+
function Je() {
|
|
723
|
+
return Z == null && (Z = new Intl.DateTimeFormat("fr", {
|
|
903
724
|
hour: "numeric",
|
|
904
725
|
hour12: !1
|
|
905
|
-
}).resolvedOptions().hourCycle === "h12"),
|
|
726
|
+
}).resolvedOptions().hourCycle === "h12"), Z;
|
|
906
727
|
}
|
|
907
|
-
function
|
|
728
|
+
function Ne(e, t) {
|
|
908
729
|
if (!t.timeStyle && !t.hour) return;
|
|
909
730
|
e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
910
|
-
let r =
|
|
731
|
+
let r = ue(e, {
|
|
911
732
|
...t,
|
|
912
733
|
timeZone: void 0
|
|
913
734
|
// use local timezone
|
|
@@ -919,27 +740,10 @@ function tt(e, t) {
|
|
|
919
740
|
throw new Error("Unexpected hour cycle result");
|
|
920
741
|
}
|
|
921
742
|
export {
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
R as f,
|
|
929
|
-
ae as g,
|
|
930
|
-
lt as h,
|
|
931
|
-
l as i,
|
|
932
|
-
E as j,
|
|
933
|
-
S as k,
|
|
934
|
-
ot as l,
|
|
935
|
-
z as m,
|
|
936
|
-
it as n,
|
|
937
|
-
xe as o,
|
|
938
|
-
nt as p,
|
|
939
|
-
ve as q,
|
|
940
|
-
re as r,
|
|
941
|
-
rt as s,
|
|
942
|
-
at as t,
|
|
943
|
-
st as u,
|
|
944
|
-
ct as v
|
|
743
|
+
Le as $,
|
|
744
|
+
x as a,
|
|
745
|
+
X as b,
|
|
746
|
+
Ve as c,
|
|
747
|
+
ze as d,
|
|
748
|
+
We as e
|
|
945
749
|
};
|