@oneclick.dev/cms-core-modules 0.0.59 → 0.0.60
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/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
- package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
- package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
- package/dist/Create-Bh4g6QW4.js +1 -0
- package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
- package/dist/DateFormatter-BPPBZp1j.js +1 -0
- package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
- package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
- package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
- package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
- package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
- package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
- package/dist/Detail-CtbWzq-R.js +1 -0
- package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
- package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
- package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
- package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
- package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
- package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
- package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
- package/dist/Overview-B-8TLLjh.js +1 -0
- package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
- package/dist/Overview-B_99j5eA.js +1 -0
- package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
- package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
- package/dist/Overview-DtWvKB3W.mjs +327 -0
- package/dist/Overview-HvlDEgqi.mjs +862 -0
- package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
- package/dist/{TableView-CS13LLxk.mjs → TableView-B8iLWWcP.mjs} +48394 -36321
- package/dist/TableView-BxK6R8v3.js +312 -0
- package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
- package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
- package/dist/View-DfzaVOzS.js +1 -0
- package/dist/agenda-D81m29_4.mjs +1135 -0
- package/dist/agenda-uzPPxgsW.js +1 -0
- package/dist/availability-B-tRp8hB.mjs +629 -0
- package/dist/availability-BiBbzEIM.js +1 -0
- package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
- package/dist/exceptions-C-DPRNQa.js +1 -0
- package/dist/index-4tjmIans.js +1 -0
- package/dist/index-AmUV8LZQ.mjs +176 -0
- package/dist/index-BDaVYdkD.mjs +7763 -0
- package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
- package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
- package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
- package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
- package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
- package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
- package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
- package/dist/index-CxETuRsG.js +1 -0
- package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
- package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
- package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
- package/dist/index-DfV8-6ON.js +245 -0
- package/dist/index-Dnn2SCSl.js +1 -0
- package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
- package/dist/index-Uf7TwBuW.mjs +110 -0
- package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
- package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +399 -363
- package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
- package/dist/index-hlylYYgy.mjs +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +98 -81
- package/dist/orders-Bh8w0ueq.mjs +346 -0
- package/dist/orders-Dt0zMz97.js +1 -0
- package/dist/payment-BQaAqQ5q.js +1 -0
- package/dist/payment-BbWByERf.mjs +1080 -0
- package/dist/regular-1LXNPviB.js +1 -0
- package/dist/regular-_05oq5Tx.mjs +1101 -0
- package/dist/regular-slots-Bs3WJB3U.js +1 -0
- package/dist/regular-slots-C2NYxLPn.mjs +222 -0
- package/dist/resources-DgPnEv76.mjs +811 -0
- package/dist/resources-eb0pivDL.js +1 -0
- package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
- package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
- package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
- package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
- package/dist/src/appointments/config.d.ts +30 -0
- package/dist/src/appointments/index.d.ts +32 -5
- package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
- package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
- package/dist/src/appointments/routes.d.ts +2 -5
- package/dist/src/appointments/types.d.ts +16 -0
- package/dist/src/appointments/utils/printReservation.d.ts +45 -0
- package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
- package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
- package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
- package/dist/src/content-manager/types.d.ts +5 -0
- package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
- package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
- package/package.json +4 -2
- package/dist/CalendarDate-CWtpXgpD.js +0 -1
- package/dist/Create-BP8TX6rj.js +0 -1
- package/dist/DateFormatter-BbcSwTs4.js +0 -1
- package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
- package/dist/Detail-DUo6qKqO.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
- package/dist/Overview-BNMZ9MUK.js +0 -1
- package/dist/Overview-CEPodGCn.mjs +0 -311
- package/dist/Overview-CvquDPhB.js +0 -1
- package/dist/Overview-D67UjG6n.mjs +0 -947
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
- package/dist/TableView-Dv4YXBD1.js +0 -111
- package/dist/View-7qb_ohVo.js +0 -1
- package/dist/agenda-B49oKGeh.mjs +0 -706
- package/dist/agenda-DipQ5IWP.js +0 -1
- package/dist/availability-C7q9tq6l.js +0 -1
- package/dist/availability-DeCkqiu8.mjs +0 -613
- package/dist/exceptions-DJ9zWX3k.js +0 -1
- package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
- package/dist/index-DUeFrD-B.js +0 -1
- package/dist/index-DsnoK4ia.mjs +0 -579
- package/dist/index-WL1P6d3j.js +0 -1
- package/dist/index-_mG-aU3Z.mjs +0 -87
- package/dist/index-_sQDF1pH.js +0 -1
- package/dist/index-klI238nT.mjs +0 -24
- package/dist/payment-kTjsV0Jj.js +0 -1
- package/dist/payment-zpCM0LD-.mjs +0 -981
- package/dist/regular-C4_3YXqx.mjs +0 -602
- package/dist/regular-DFwPEbZO.js +0 -1
- package/dist/regular-slots-4ooEpICB.mjs +0 -67
- package/dist/regular-slots-BAVGbomI.js +0 -1
- package/dist/resources-MpQkSstv.mjs +0 -563
- package/dist/resources-iM28T3dD.js +0 -1
- package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
1
|
+
function U(e, t) {
|
|
2
2
|
return e - t * Math.floor(e / t);
|
|
3
3
|
}
|
|
4
|
-
const
|
|
4
|
+
const te = 1721426;
|
|
5
5
|
function C(e, t, r, n) {
|
|
6
|
-
t =
|
|
7
|
-
let a = t - 1,
|
|
8
|
-
return r <= 2 ?
|
|
6
|
+
t = W(e, t);
|
|
7
|
+
let a = t - 1, o = -2;
|
|
8
|
+
return r <= 2 ? o = 0 : R(t) && (o = -1), te - 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 R(e) {
|
|
11
11
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function W(e, t) {
|
|
14
14
|
return e === "BC" ? 1 - t : t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Me(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 pe = {
|
|
24
24
|
standard: [
|
|
25
25
|
31,
|
|
26
26
|
28,
|
|
@@ -50,25 +50,25 @@ const ye = {
|
|
|
50
50
|
31
|
|
51
51
|
]
|
|
52
52
|
};
|
|
53
|
-
class
|
|
53
|
+
class w {
|
|
54
54
|
fromJulianDay(t) {
|
|
55
|
-
let r = t, n = r -
|
|
56
|
-
r < C(
|
|
57
|
-
let
|
|
58
|
-
return new I(
|
|
55
|
+
let r = t, n = r - te, a = Math.floor(n / 146097), o = U(n, 146097), i = Math.floor(o / 36524), c = U(o, 36524), s = Math.floor(c / 1461), h = U(c, 1461), M = Math.floor(h / 365), p = a * 400 + i * 100 + s * 4 + M + (i !== 4 && M !== 4 ? 1 : 0), [g, m] = Me(p), y = r - C(g, m, 1, 1), T = 2;
|
|
56
|
+
r < C(g, m, 3, 1) ? T = 0 : R(m) && (T = 1);
|
|
57
|
+
let G = Math.floor(((y + T) * 12 + 373) / 367), be = r - C(g, m, G, 1) + 1;
|
|
58
|
+
return new I(g, m, G, be);
|
|
59
59
|
}
|
|
60
60
|
toJulianDay(t) {
|
|
61
61
|
return C(t.era, t.year, t.month, t.day);
|
|
62
62
|
}
|
|
63
63
|
getDaysInMonth(t) {
|
|
64
|
-
return
|
|
64
|
+
return pe[R(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 R(t.year) ? 366 : 365;
|
|
72
72
|
}
|
|
73
73
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
74
|
getYearsInEra(t) {
|
|
@@ -90,7 +90,7 @@ class D {
|
|
|
90
90
|
this.identifier = "gregory";
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const ge = {
|
|
94
94
|
"001": 1,
|
|
95
95
|
AD: 1,
|
|
96
96
|
AE: 6,
|
|
@@ -187,76 +187,76 @@ const me = {
|
|
|
187
187
|
VN: 1,
|
|
188
188
|
XK: 1
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function re(e, t) {
|
|
191
191
|
return t = l(t, e.calendar), e.era === t.era && e.year === t.year && e.month === t.month && e.day === t.day;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
return t = l(t, e.calendar), e =
|
|
193
|
+
function we(e, t) {
|
|
194
|
+
return t = l(t, e.calendar), e = z(e), t = z(t), e.era === t.era && e.year === t.year && e.month === t.month;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
return
|
|
196
|
+
function Xe(e, t) {
|
|
197
|
+
return J(e.calendar, t.calendar) && re(e, t);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
199
|
+
function et(e, t) {
|
|
200
|
+
return J(e.calendar, t.calendar) && we(e, t);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
var r, n, a,
|
|
204
|
-
return (
|
|
202
|
+
function J(e, t) {
|
|
203
|
+
var r, n, a, o;
|
|
204
|
+
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;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
206
|
+
function tt(e, t) {
|
|
207
|
+
return re(e, ve(t));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
let n = e.calendar.toJulianDay(e), a =
|
|
211
|
-
return
|
|
209
|
+
function rt(e, t, r) {
|
|
210
|
+
let n = e.calendar.toJulianDay(e), a = Ee(t), o = Math.ceil(n + 1 - a) % 7;
|
|
211
|
+
return o < 0 && (o += 7), o;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
return
|
|
213
|
+
function De(e) {
|
|
214
|
+
return d(Date.now(), e);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return
|
|
216
|
+
function ve(e) {
|
|
217
|
+
return Ae(De(e));
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function ne(e, t) {
|
|
220
220
|
return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
return
|
|
222
|
+
function Ie(e, t) {
|
|
223
|
+
return _(e) - _(t);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function _(e) {
|
|
226
226
|
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
227
227
|
}
|
|
228
|
-
let
|
|
229
|
-
function
|
|
230
|
-
return
|
|
228
|
+
let k = null;
|
|
229
|
+
function ae() {
|
|
230
|
+
return k == null && (k = new Intl.DateTimeFormat().resolvedOptions().timeZone), k;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function z(e) {
|
|
233
233
|
return e.subtract({
|
|
234
234
|
days: e.day - 1
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function nt(e) {
|
|
238
238
|
return e.add({
|
|
239
239
|
days: e.calendar.getDaysInMonth(e) - e.day
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
function
|
|
242
|
+
const Q = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map();
|
|
243
|
+
function xe(e) {
|
|
244
244
|
if (Intl.Locale) {
|
|
245
|
-
let r =
|
|
246
|
-
return r || (r = new Intl.Locale(e).maximize().region, r &&
|
|
245
|
+
let r = Q.get(e);
|
|
246
|
+
return r || (r = new Intl.Locale(e).maximize().region, r && Q.set(e, r)), r;
|
|
247
247
|
}
|
|
248
248
|
let t = e.split("-")[1];
|
|
249
249
|
return t === "u" ? void 0 : t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
let t =
|
|
251
|
+
function Ee(e) {
|
|
252
|
+
let t = O.get(e);
|
|
253
253
|
if (!t) {
|
|
254
254
|
if (Intl.Locale) {
|
|
255
255
|
let n = new Intl.Locale(e);
|
|
256
256
|
if ("getWeekInfo" in n && (t = n.getWeekInfo(), t))
|
|
257
|
-
return
|
|
257
|
+
return O.set(e, t), t.firstDay;
|
|
258
258
|
}
|
|
259
|
-
let r =
|
|
259
|
+
let r = xe(e);
|
|
260
260
|
if (e.includes("-fw-")) {
|
|
261
261
|
let n = e.split("-fw-")[1].split("-")[0];
|
|
262
262
|
n === "mon" ? t = {
|
|
@@ -277,30 +277,30 @@ function ge(e) {
|
|
|
277
277
|
} else e.includes("-ca-iso8601") ? t = {
|
|
278
278
|
firstDay: 1
|
|
279
279
|
} : t = {
|
|
280
|
-
firstDay: r &&
|
|
280
|
+
firstDay: r && ge[r] || 0
|
|
281
281
|
};
|
|
282
|
-
|
|
282
|
+
O.set(e, t);
|
|
283
283
|
}
|
|
284
284
|
return t.firstDay;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
e = l(e, new
|
|
288
|
-
let t =
|
|
289
|
-
return
|
|
286
|
+
function D(e) {
|
|
287
|
+
e = l(e, new w());
|
|
288
|
+
let t = W(e.era, e.year);
|
|
289
|
+
return oe(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
let
|
|
293
|
-
return
|
|
291
|
+
function oe(e, t, r, n, a, o, i) {
|
|
292
|
+
let c = /* @__PURE__ */ new Date();
|
|
293
|
+
return c.setUTCHours(n, a, o, i), c.setUTCFullYear(e, t - 1, r), c.getTime();
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function F(e, t) {
|
|
296
296
|
if (t === "UTC") return 0;
|
|
297
|
-
if (e > 0 && t ===
|
|
298
|
-
let { year: r, month: n, day: a, hour:
|
|
299
|
-
return
|
|
297
|
+
if (e > 0 && t === ae()) return new Date(e).getTimezoneOffset() * -6e4;
|
|
298
|
+
let { year: r, month: n, day: a, hour: o, minute: i, second: c } = ie(e, t);
|
|
299
|
+
return oe(r, n, a, o, i, c, 0) - Math.floor(e / 1e3) * 1e3;
|
|
300
300
|
}
|
|
301
|
-
const
|
|
302
|
-
function
|
|
303
|
-
let r =
|
|
301
|
+
const X = /* @__PURE__ */ new Map();
|
|
302
|
+
function ie(e, t) {
|
|
303
|
+
let r = X.get(t);
|
|
304
304
|
r || (r = new Intl.DateTimeFormat("en-US", {
|
|
305
305
|
timeZone: t,
|
|
306
306
|
hour12: !1,
|
|
@@ -311,9 +311,9 @@ function ne(e, t) {
|
|
|
311
311
|
hour: "numeric",
|
|
312
312
|
minute: "numeric",
|
|
313
313
|
second: "numeric"
|
|
314
|
-
}),
|
|
314
|
+
}), X.set(t, r));
|
|
315
315
|
let n = r.formatToParts(new Date(e)), a = {};
|
|
316
|
-
for (let
|
|
316
|
+
for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
|
|
317
317
|
return {
|
|
318
318
|
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
|
|
319
319
|
year: a.era === "BC" || a.era === "B" ? -a.year + 1 : +a.year,
|
|
@@ -324,139 +324,139 @@ function ne(e, t) {
|
|
|
324
324
|
second: +a.second
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
const
|
|
328
|
-
function
|
|
327
|
+
const ee = 864e5;
|
|
328
|
+
function Se(e, t, r, n) {
|
|
329
329
|
return (r === n ? [
|
|
330
330
|
r
|
|
331
331
|
] : [
|
|
332
332
|
r,
|
|
333
333
|
n
|
|
334
|
-
]).filter((
|
|
334
|
+
]).filter((o) => Ce(e, t, o));
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
let n =
|
|
336
|
+
function Ce(e, t, r) {
|
|
337
|
+
let n = ie(r, t);
|
|
338
338
|
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;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
let n =
|
|
342
|
-
if (t === "UTC") return
|
|
343
|
-
if (t ===
|
|
344
|
-
n = l(n, new
|
|
345
|
-
let s = /* @__PURE__ */ new Date(), h =
|
|
340
|
+
function u(e, t, r = "compatible") {
|
|
341
|
+
let n = v(e);
|
|
342
|
+
if (t === "UTC") return D(n);
|
|
343
|
+
if (t === ae() && r === "compatible") {
|
|
344
|
+
n = l(n, new w());
|
|
345
|
+
let s = /* @__PURE__ */ new Date(), h = W(n.era, n.year);
|
|
346
346
|
return s.setFullYear(h, n.month - 1, n.day), s.setHours(n.hour, n.minute, n.second, n.millisecond), s.getTime();
|
|
347
347
|
}
|
|
348
|
-
let a =
|
|
349
|
-
if (
|
|
350
|
-
if (
|
|
348
|
+
let a = D(n), o = F(a - ee, t), i = F(a + ee, t), c = Se(n, t, a - o, a - i);
|
|
349
|
+
if (c.length === 1) return c[0];
|
|
350
|
+
if (c.length > 1) switch (r) {
|
|
351
351
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
352
352
|
case "compatible":
|
|
353
353
|
case "earlier":
|
|
354
|
-
return
|
|
354
|
+
return c[0];
|
|
355
355
|
case "later":
|
|
356
|
-
return
|
|
356
|
+
return c[c.length - 1];
|
|
357
357
|
case "reject":
|
|
358
358
|
throw new RangeError("Multiple possible absolute times found");
|
|
359
359
|
}
|
|
360
360
|
switch (r) {
|
|
361
361
|
case "earlier":
|
|
362
|
-
return Math.min(a -
|
|
362
|
+
return Math.min(a - o, a - i);
|
|
363
363
|
// 'compatible' means 'later' for "spring forward" transitions
|
|
364
364
|
case "compatible":
|
|
365
365
|
case "later":
|
|
366
|
-
return Math.max(a -
|
|
366
|
+
return Math.max(a - o, a - i);
|
|
367
367
|
case "reject":
|
|
368
368
|
throw new RangeError("No such absolute time found");
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
return new Date(
|
|
371
|
+
function ce(e, t, r = "compatible") {
|
|
372
|
+
return new Date(u(e, t, r));
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
let r =
|
|
376
|
-
return new
|
|
374
|
+
function d(e, t) {
|
|
375
|
+
let r = F(e, t), n = new Date(e + r), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), c = n.getUTCHours(), s = n.getUTCMinutes(), h = n.getUTCSeconds(), M = n.getUTCMilliseconds();
|
|
376
|
+
return new S(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, t, r, c, s, h, M);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Ae(e) {
|
|
379
379
|
return new I(e.calendar, e.era, e.year, e.month, e.day);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
let r = 0, n = 0, a = 0,
|
|
383
|
-
if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond:
|
|
381
|
+
function v(e, t) {
|
|
382
|
+
let r = 0, n = 0, a = 0, o = 0;
|
|
383
|
+
if ("timeZone" in e) ({ hour: r, minute: n, second: a, millisecond: o } = e);
|
|
384
384
|
else if ("hour" in e && !t) return e;
|
|
385
|
-
return t && ({ hour: r, minute: n, second: a, millisecond:
|
|
385
|
+
return t && ({ hour: r, minute: n, second: a, millisecond: o } = t), new E(e.calendar, e.era, e.year, e.month, e.day, r, n, a, o);
|
|
386
386
|
}
|
|
387
387
|
function l(e, t) {
|
|
388
|
-
if (
|
|
388
|
+
if (J(e.calendar, t)) return e;
|
|
389
389
|
let r = t.fromJulianDay(e.calendar.toJulianDay(e)), n = e.copy();
|
|
390
390
|
return n.calendar = t, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, b(n), n;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
if (e instanceof
|
|
394
|
-
return e.timeZone === t ? e :
|
|
395
|
-
let n =
|
|
396
|
-
return
|
|
392
|
+
function Re(e, t, r) {
|
|
393
|
+
if (e instanceof S)
|
|
394
|
+
return e.timeZone === t ? e : Be(e, t);
|
|
395
|
+
let n = u(e, t, r);
|
|
396
|
+
return d(n, t);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
let t =
|
|
398
|
+
function Ye(e) {
|
|
399
|
+
let t = D(e) - e.offset;
|
|
400
400
|
return new Date(t);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
let r =
|
|
404
|
-
return l(
|
|
402
|
+
function Be(e, t) {
|
|
403
|
+
let r = D(e) - e.offset;
|
|
404
|
+
return l(d(r, t), e.calendar);
|
|
405
405
|
}
|
|
406
|
-
const
|
|
407
|
-
function
|
|
408
|
-
let r = e.copy(), n = "hour" in r ?
|
|
409
|
-
|
|
406
|
+
const x = 36e5;
|
|
407
|
+
function B(e, t) {
|
|
408
|
+
let r = e.copy(), n = "hour" in r ? Oe(r, t) : 0;
|
|
409
|
+
L(r, t.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, e), r.month += t.months || 0, N(r), se(r), r.day += (t.weeks || 0) * 7, r.day += t.days || 0, r.day += n, Te(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
|
|
410
410
|
let a = r.calendar.getYearsInEra(r);
|
|
411
411
|
if (r.year > a) {
|
|
412
|
-
var
|
|
413
|
-
let s = (
|
|
412
|
+
var o, i;
|
|
413
|
+
let s = (o = (i = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(i, r);
|
|
414
414
|
r.year = a, r.month = s ? 1 : r.calendar.getMonthsInYear(r), r.day = s ? 1 : r.calendar.getDaysInMonth(r);
|
|
415
415
|
}
|
|
416
416
|
r.month < 1 && (r.month = 1, r.day = 1);
|
|
417
|
-
let
|
|
418
|
-
return r.month >
|
|
417
|
+
let c = r.calendar.getMonthsInYear(r);
|
|
418
|
+
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;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function L(e, t) {
|
|
421
421
|
var r, n;
|
|
422
422
|
!((r = (n = e.calendar).isInverseEra) === null || r === void 0) && r.call(n, e) && (t = -t), e.year += t;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function N(e) {
|
|
425
425
|
for (; e.month < 1; )
|
|
426
|
-
|
|
426
|
+
L(e, -1), e.month += e.calendar.getMonthsInYear(e);
|
|
427
427
|
let t = 0;
|
|
428
428
|
for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
|
|
429
|
-
e.month -= t,
|
|
429
|
+
e.month -= t, L(e, 1);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Te(e) {
|
|
432
432
|
for (; e.day < 1; )
|
|
433
|
-
e.month--,
|
|
433
|
+
e.month--, N(e), e.day += e.calendar.getDaysInMonth(e);
|
|
434
434
|
for (; e.day > e.calendar.getDaysInMonth(e); )
|
|
435
|
-
e.day -= e.calendar.getDaysInMonth(e), e.month++,
|
|
435
|
+
e.day -= e.calendar.getDaysInMonth(e), e.month++, N(e);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function se(e) {
|
|
438
438
|
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));
|
|
439
439
|
}
|
|
440
440
|
function b(e) {
|
|
441
|
-
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)),
|
|
441
|
+
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), se(e);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function le(e) {
|
|
444
444
|
let t = {};
|
|
445
445
|
for (let r in e) typeof e[r] == "number" && (t[r] = -e[r]);
|
|
446
446
|
return t;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
448
|
+
function fe(e, t) {
|
|
449
|
+
return B(e, le(t));
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function j(e, t) {
|
|
452
452
|
let r = e.copy();
|
|
453
453
|
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;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Y(e, t) {
|
|
456
456
|
let r = e.copy();
|
|
457
457
|
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), ke(r), r;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Ue(e) {
|
|
460
460
|
e.second += Math.floor(e.millisecond / 1e3), e.millisecond = A(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = A(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = A(e.minute, 60);
|
|
461
461
|
let t = Math.floor(e.hour / 24);
|
|
462
462
|
return e.hour = A(e.hour, 24), t;
|
|
@@ -468,21 +468,21 @@ function A(e, t) {
|
|
|
468
468
|
let r = e % t;
|
|
469
469
|
return r < 0 && (r += t), r;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0,
|
|
471
|
+
function Oe(e, t) {
|
|
472
|
+
return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, Ue(e);
|
|
473
473
|
}
|
|
474
474
|
function q(e, t, r, n) {
|
|
475
475
|
let a = e.copy();
|
|
476
476
|
switch (t) {
|
|
477
477
|
case "era": {
|
|
478
|
-
let
|
|
478
|
+
let c = e.calendar.getEras(), s = c.indexOf(e.era);
|
|
479
479
|
if (s < 0) throw new Error("Invalid era: " + e.era);
|
|
480
|
-
s = $(s, r, 0,
|
|
480
|
+
s = $(s, r, 0, c.length - 1, n?.round), a.era = c[s], b(a);
|
|
481
481
|
break;
|
|
482
482
|
}
|
|
483
483
|
case "year":
|
|
484
|
-
var
|
|
485
|
-
!((
|
|
484
|
+
var o, i;
|
|
485
|
+
!((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);
|
|
486
486
|
break;
|
|
487
487
|
case "month":
|
|
488
488
|
a.month = $(e.month, r, 1, e.calendar.getMonthsInYear(e), n?.round);
|
|
@@ -495,16 +495,16 @@ function q(e, t, r, n) {
|
|
|
495
495
|
}
|
|
496
496
|
return e.calendar.balanceDate && e.calendar.balanceDate(a), b(a), a;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function he(e, t, r, n) {
|
|
499
499
|
let a = e.copy();
|
|
500
500
|
switch (t) {
|
|
501
501
|
case "hour": {
|
|
502
|
-
let
|
|
502
|
+
let o = e.hour, i = 0, c = 23;
|
|
503
503
|
if (n?.hourCycle === 12) {
|
|
504
|
-
let s =
|
|
505
|
-
|
|
504
|
+
let s = o >= 12;
|
|
505
|
+
i = s ? 12 : 0, c = s ? 23 : 11;
|
|
506
506
|
}
|
|
507
|
-
a.hour = $(
|
|
507
|
+
a.hour = $(o, r, i, c, n?.round);
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
case "minute":
|
|
@@ -524,86 +524,86 @@ function se(e, t, r, n) {
|
|
|
524
524
|
function $(e, t, r, n, a = !1) {
|
|
525
525
|
if (a) {
|
|
526
526
|
e += Math.sign(t), e < r && (e = n);
|
|
527
|
-
let
|
|
528
|
-
t > 0 ? e = Math.ceil(e /
|
|
527
|
+
let o = Math.abs(t);
|
|
528
|
+
t > 0 ? e = Math.ceil(e / o) * o : e = Math.floor(e / o) * o, e > n && (e = r);
|
|
529
529
|
} else
|
|
530
530
|
e += t, e < r ? e = n - (r - e - 1) : e > n && (e = r + (e - n - 1));
|
|
531
531
|
return e;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function ue(e, t) {
|
|
534
534
|
let r;
|
|
535
535
|
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) {
|
|
536
|
-
let a =
|
|
536
|
+
let a = B(v(e), {
|
|
537
537
|
years: t.years,
|
|
538
538
|
months: t.months,
|
|
539
539
|
weeks: t.weeks,
|
|
540
540
|
days: t.days
|
|
541
541
|
});
|
|
542
|
-
r =
|
|
542
|
+
r = u(a, e.timeZone);
|
|
543
543
|
} else
|
|
544
|
-
r =
|
|
544
|
+
r = D(e) - e.offset;
|
|
545
545
|
r += t.milliseconds || 0, r += (t.seconds || 0) * 1e3, r += (t.minutes || 0) * 6e4, r += (t.hours || 0) * 36e5;
|
|
546
|
-
let n =
|
|
546
|
+
let n = d(r, e.timeZone);
|
|
547
547
|
return l(n, e.calendar);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return
|
|
549
|
+
function Ze(e, t) {
|
|
550
|
+
return ue(e, le(t));
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function He(e, t, r, n) {
|
|
553
553
|
switch (t) {
|
|
554
554
|
case "hour": {
|
|
555
|
-
let a = 0,
|
|
555
|
+
let a = 0, o = 23;
|
|
556
556
|
if (n?.hourCycle === 12) {
|
|
557
557
|
let y = e.hour >= 12;
|
|
558
|
-
a = y ? 12 : 0,
|
|
558
|
+
a = y ? 12 : 0, o = y ? 23 : 11;
|
|
559
559
|
}
|
|
560
|
-
let
|
|
560
|
+
let i = v(e), c = l(Y(i, {
|
|
561
561
|
hour: a
|
|
562
|
-
}), new
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
].filter((y) =>
|
|
566
|
-
hour:
|
|
567
|
-
}), new
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
].filter((y) =>
|
|
571
|
-
return p = $(
|
|
562
|
+
}), new w()), s = [
|
|
563
|
+
u(c, e.timeZone, "earlier"),
|
|
564
|
+
u(c, e.timeZone, "later")
|
|
565
|
+
].filter((y) => d(y, e.timeZone).day === c.day)[0], h = l(Y(i, {
|
|
566
|
+
hour: o
|
|
567
|
+
}), new w()), M = [
|
|
568
|
+
u(h, e.timeZone, "earlier"),
|
|
569
|
+
u(h, e.timeZone, "later")
|
|
570
|
+
].filter((y) => d(y, e.timeZone).day === h.day).pop(), p = D(e) - e.offset, g = Math.floor(p / x), m = p % x;
|
|
571
|
+
return p = $(g, r, Math.floor(s / x), Math.floor(M / x), n?.round) * x + m, l(d(p, e.timeZone), e.calendar);
|
|
572
572
|
}
|
|
573
573
|
case "minute":
|
|
574
574
|
case "second":
|
|
575
575
|
case "millisecond":
|
|
576
|
-
return
|
|
576
|
+
return he(e, t, r, n);
|
|
577
577
|
case "era":
|
|
578
578
|
case "year":
|
|
579
579
|
case "month":
|
|
580
580
|
case "day": {
|
|
581
|
-
let a = q(
|
|
582
|
-
return l(
|
|
581
|
+
let a = q(v(e), t, r, n), o = u(a, e.timeZone);
|
|
582
|
+
return l(d(o, e.timeZone), e.calendar);
|
|
583
583
|
}
|
|
584
584
|
default:
|
|
585
585
|
throw new Error("Unsupported field " + t);
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
let n =
|
|
588
|
+
function Pe(e, t, r) {
|
|
589
|
+
let n = v(e), a = Y(j(n, t), t);
|
|
590
590
|
if (a.compare(n) === 0) return e;
|
|
591
|
-
let
|
|
592
|
-
return l(
|
|
591
|
+
let o = u(a, e.timeZone, r);
|
|
592
|
+
return l(d(o, e.timeZone), e.calendar);
|
|
593
593
|
}
|
|
594
|
-
const
|
|
595
|
-
function
|
|
596
|
-
let t = e.match(
|
|
594
|
+
const Fe = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Le = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/, de = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
595
|
+
function at(e) {
|
|
596
|
+
let t = e.match(Fe);
|
|
597
597
|
if (!t)
|
|
598
|
-
throw
|
|
598
|
+
throw de.test(e) ? new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date string: " + e);
|
|
599
599
|
let r = new I(f(t[1], 0, 9999), f(t[2], 1, 12), 1);
|
|
600
600
|
return r.day = f(t[3], 1, r.calendar.getDaysInMonth(r)), r;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function ot(e) {
|
|
603
603
|
let t = e.match(Le);
|
|
604
604
|
if (!t)
|
|
605
|
-
throw
|
|
606
|
-
let r = f(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new
|
|
605
|
+
throw de.test(e) ? new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`) : new Error("Invalid ISO 8601 date time string: " + e);
|
|
606
|
+
let r = f(t[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new E(n, r < 1 ? -r + 1 : r, f(t[2], 1, 12), 1, t[4] ? f(t[4], 0, 23) : 0, t[5] ? f(t[5], 0, 59) : 0, t[6] ? f(t[6], 0, 59) : 0, t[7] ? f(t[7], 0, 1 / 0) * 1e3 : 0);
|
|
607
607
|
return a.day = f(t[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
608
608
|
}
|
|
609
609
|
function f(e, t, r) {
|
|
@@ -611,49 +611,49 @@ function f(e, t, r) {
|
|
|
611
611
|
if (n < t || n > r) throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);
|
|
612
612
|
return n;
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Ne(e) {
|
|
615
615
|
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) : ""}`;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
let t = l(e, new
|
|
617
|
+
function $e(e) {
|
|
618
|
+
let t = l(e, new w()), r;
|
|
619
619
|
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")}`;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
return `${
|
|
621
|
+
function ye(e) {
|
|
622
|
+
return `${$e(e)}T${Ne(e)}`;
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function We(e) {
|
|
625
625
|
let t = Math.sign(e) < 0 ? "-" : "+";
|
|
626
626
|
e = Math.abs(e);
|
|
627
|
-
let r = Math.floor(e / 36e5), n = Math.floor(e % 36e5 / 6e4), a = Math.floor(e % 36e5 % 6e4 / 1e3),
|
|
628
|
-
return a !== 0 && (
|
|
627
|
+
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")}`;
|
|
628
|
+
return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return `${
|
|
630
|
+
function Je(e) {
|
|
631
|
+
return `${ye(e)}${We(e.offset)}[${e.timeZone}]`;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function je(e, t) {
|
|
634
634
|
if (t.has(e))
|
|
635
635
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
|
|
637
|
+
function K(e, t, r) {
|
|
638
|
+
je(e, t), t.set(e, r);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
let t = typeof e[0] == "object" ? e.shift() : new
|
|
640
|
+
function V(e) {
|
|
641
|
+
let t = typeof e[0] == "object" ? e.shift() : new w(), r;
|
|
642
642
|
if (typeof e[0] == "string") r = e.shift();
|
|
643
643
|
else {
|
|
644
|
-
let
|
|
645
|
-
r =
|
|
644
|
+
let i = t.getEras();
|
|
645
|
+
r = i[i.length - 1];
|
|
646
646
|
}
|
|
647
|
-
let n = e.shift(), a = e.shift(),
|
|
647
|
+
let n = e.shift(), a = e.shift(), o = e.shift();
|
|
648
648
|
return [
|
|
649
649
|
t,
|
|
650
650
|
r,
|
|
651
651
|
n,
|
|
652
652
|
a,
|
|
653
|
-
|
|
653
|
+
o
|
|
654
654
|
];
|
|
655
655
|
}
|
|
656
|
-
var
|
|
656
|
+
var qe = /* @__PURE__ */ new WeakMap();
|
|
657
657
|
class I {
|
|
658
658
|
/** Returns a copy of this date. */
|
|
659
659
|
copy() {
|
|
@@ -661,15 +661,15 @@ class I {
|
|
|
661
661
|
}
|
|
662
662
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
663
663
|
add(t) {
|
|
664
|
-
return
|
|
664
|
+
return B(this, t);
|
|
665
665
|
}
|
|
666
666
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
667
667
|
subtract(t) {
|
|
668
|
-
return
|
|
668
|
+
return fe(this, t);
|
|
669
669
|
}
|
|
670
670
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
671
671
|
set(t) {
|
|
672
|
-
return
|
|
672
|
+
return j(this, t);
|
|
673
673
|
}
|
|
674
674
|
/**
|
|
675
675
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
@@ -680,42 +680,42 @@ class I {
|
|
|
680
680
|
}
|
|
681
681
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
682
682
|
toDate(t) {
|
|
683
|
-
return
|
|
683
|
+
return ce(this, t);
|
|
684
684
|
}
|
|
685
685
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
686
686
|
toString() {
|
|
687
|
-
return
|
|
687
|
+
return $e(this);
|
|
688
688
|
}
|
|
689
689
|
/** 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. */
|
|
690
690
|
compare(t) {
|
|
691
|
-
return
|
|
691
|
+
return ne(this, t);
|
|
692
692
|
}
|
|
693
693
|
constructor(...t) {
|
|
694
|
-
|
|
694
|
+
K(this, qe, {
|
|
695
695
|
writable: !0,
|
|
696
696
|
value: void 0
|
|
697
697
|
});
|
|
698
|
-
let [r, n, a,
|
|
699
|
-
this.calendar = r, this.era = n, this.year = a, this.month =
|
|
698
|
+
let [r, n, a, o, i] = V(t);
|
|
699
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, b(this);
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
|
-
var
|
|
703
|
-
class
|
|
702
|
+
var Ke = /* @__PURE__ */ new WeakMap();
|
|
703
|
+
class E {
|
|
704
704
|
/** Returns a copy of this date. */
|
|
705
705
|
copy() {
|
|
706
|
-
return this.era ? new
|
|
706
|
+
return this.era ? new E(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new E(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
707
707
|
}
|
|
708
708
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
709
709
|
add(t) {
|
|
710
|
-
return
|
|
710
|
+
return B(this, t);
|
|
711
711
|
}
|
|
712
712
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
713
713
|
subtract(t) {
|
|
714
|
-
return
|
|
714
|
+
return fe(this, t);
|
|
715
715
|
}
|
|
716
716
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
717
717
|
set(t) {
|
|
718
|
-
return
|
|
718
|
+
return j(Y(this, t), t);
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
721
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -729,63 +729,63 @@ class S {
|
|
|
729
729
|
case "day":
|
|
730
730
|
return q(this, t, r, n);
|
|
731
731
|
default:
|
|
732
|
-
return
|
|
732
|
+
return he(this, t, r, n);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
736
736
|
toDate(t, r) {
|
|
737
|
-
return
|
|
737
|
+
return ce(this, t, r);
|
|
738
738
|
}
|
|
739
739
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
740
740
|
toString() {
|
|
741
|
-
return
|
|
741
|
+
return ye(this);
|
|
742
742
|
}
|
|
743
743
|
/** 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. */
|
|
744
744
|
compare(t) {
|
|
745
|
-
let r =
|
|
746
|
-
return r === 0 ?
|
|
745
|
+
let r = ne(this, t);
|
|
746
|
+
return r === 0 ? Ie(this, v(t)) : r;
|
|
747
747
|
}
|
|
748
748
|
constructor(...t) {
|
|
749
|
-
|
|
749
|
+
K(this, Ke, {
|
|
750
750
|
writable: !0,
|
|
751
751
|
value: void 0
|
|
752
752
|
});
|
|
753
|
-
let [r, n, a,
|
|
754
|
-
this.calendar = r, this.era = n, this.year = a, this.month =
|
|
753
|
+
let [r, n, a, o, i] = V(t);
|
|
754
|
+
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);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
var
|
|
758
|
-
class
|
|
757
|
+
var Ve = /* @__PURE__ */ new WeakMap();
|
|
758
|
+
class S {
|
|
759
759
|
/** Returns a copy of this date. */
|
|
760
760
|
copy() {
|
|
761
|
-
return this.era ? new
|
|
761
|
+
return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new S(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
762
762
|
}
|
|
763
763
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
764
764
|
add(t) {
|
|
765
|
-
return
|
|
765
|
+
return ue(this, t);
|
|
766
766
|
}
|
|
767
767
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
768
768
|
subtract(t) {
|
|
769
|
-
return
|
|
769
|
+
return Ze(this, t);
|
|
770
770
|
}
|
|
771
771
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
772
772
|
set(t, r) {
|
|
773
|
-
return
|
|
773
|
+
return Pe(this, t, r);
|
|
774
774
|
}
|
|
775
775
|
/**
|
|
776
776
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
777
777
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
778
778
|
*/
|
|
779
779
|
cycle(t, r, n) {
|
|
780
|
-
return
|
|
780
|
+
return He(this, t, r, n);
|
|
781
781
|
}
|
|
782
782
|
/** Converts the date to a native JavaScript Date object. */
|
|
783
783
|
toDate() {
|
|
784
|
-
return
|
|
784
|
+
return Ye(this);
|
|
785
785
|
}
|
|
786
786
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
787
787
|
toString() {
|
|
788
|
-
return
|
|
788
|
+
return Je(this);
|
|
789
789
|
}
|
|
790
790
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
791
791
|
toAbsoluteString() {
|
|
@@ -793,38 +793,135 @@ class E {
|
|
|
793
793
|
}
|
|
794
794
|
/** 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. */
|
|
795
795
|
compare(t) {
|
|
796
|
-
return this.toDate().getTime() -
|
|
796
|
+
return this.toDate().getTime() - Re(t, this.timeZone).toDate().getTime();
|
|
797
797
|
}
|
|
798
798
|
constructor(...t) {
|
|
799
|
-
|
|
799
|
+
K(this, Ve, {
|
|
800
800
|
writable: !0,
|
|
801
801
|
value: void 0
|
|
802
802
|
});
|
|
803
|
-
let [r, n, a,
|
|
804
|
-
this.calendar = r, this.era = n, this.year = a, this.month =
|
|
803
|
+
let [r, n, a, o, i] = V(t), c = t.shift(), s = t.shift();
|
|
804
|
+
this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = c, this.offset = s, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, b(this);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
let Z = /* @__PURE__ */ new Map();
|
|
808
|
+
class it {
|
|
809
|
+
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
810
|
+
format(t) {
|
|
811
|
+
return this.formatter.format(t);
|
|
812
|
+
}
|
|
813
|
+
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
|
|
814
|
+
formatToParts(t) {
|
|
815
|
+
return this.formatter.formatToParts(t);
|
|
816
|
+
}
|
|
817
|
+
/** Formats a date range as a string. */
|
|
818
|
+
formatRange(t, r) {
|
|
819
|
+
if (typeof this.formatter.formatRange == "function")
|
|
820
|
+
return this.formatter.formatRange(t, r);
|
|
821
|
+
if (r < t) throw new RangeError("End date must be >= start date");
|
|
822
|
+
return `${this.formatter.format(t)} – ${this.formatter.format(r)}`;
|
|
823
|
+
}
|
|
824
|
+
/** Formats a date range as an array of parts. */
|
|
825
|
+
formatRangeToParts(t, r) {
|
|
826
|
+
if (typeof this.formatter.formatRangeToParts == "function")
|
|
827
|
+
return this.formatter.formatRangeToParts(t, r);
|
|
828
|
+
if (r < t) throw new RangeError("End date must be >= start date");
|
|
829
|
+
let n = this.formatter.formatToParts(t), a = this.formatter.formatToParts(r);
|
|
830
|
+
return [
|
|
831
|
+
...n.map((o) => ({
|
|
832
|
+
...o,
|
|
833
|
+
source: "startRange"
|
|
834
|
+
})),
|
|
835
|
+
{
|
|
836
|
+
type: "literal",
|
|
837
|
+
value: " – ",
|
|
838
|
+
source: "shared"
|
|
839
|
+
},
|
|
840
|
+
...a.map((o) => ({
|
|
841
|
+
...o,
|
|
842
|
+
source: "endRange"
|
|
843
|
+
}))
|
|
844
|
+
];
|
|
845
|
+
}
|
|
846
|
+
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
847
|
+
resolvedOptions() {
|
|
848
|
+
let t = this.formatter.resolvedOptions();
|
|
849
|
+
return ze() && (this.resolvedHourCycle || (this.resolvedHourCycle = Qe(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;
|
|
805
850
|
}
|
|
851
|
+
constructor(t, r = {}) {
|
|
852
|
+
this.formatter = me(t, r), this.options = r;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
const Ge = {
|
|
856
|
+
true: {
|
|
857
|
+
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
|
|
858
|
+
ja: "h11"
|
|
859
|
+
},
|
|
860
|
+
false: {}
|
|
861
|
+
};
|
|
862
|
+
function me(e, t = {}) {
|
|
863
|
+
if (typeof t.hour12 == "boolean" && _e()) {
|
|
864
|
+
t = {
|
|
865
|
+
...t
|
|
866
|
+
};
|
|
867
|
+
let a = Ge[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
|
|
868
|
+
t.hourCycle = a ?? o, delete t.hour12;
|
|
869
|
+
}
|
|
870
|
+
let r = e + (t ? Object.entries(t).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
|
|
871
|
+
if (Z.has(r)) return Z.get(r);
|
|
872
|
+
let n = new Intl.DateTimeFormat(e, t);
|
|
873
|
+
return Z.set(r, n), n;
|
|
874
|
+
}
|
|
875
|
+
let H = null;
|
|
876
|
+
function _e() {
|
|
877
|
+
return H == null && (H = new Intl.DateTimeFormat("en-US", {
|
|
878
|
+
hour: "numeric",
|
|
879
|
+
hour12: !1
|
|
880
|
+
}).format(new Date(2020, 2, 3, 0)) === "24"), H;
|
|
881
|
+
}
|
|
882
|
+
let P = null;
|
|
883
|
+
function ze() {
|
|
884
|
+
return P == null && (P = new Intl.DateTimeFormat("fr", {
|
|
885
|
+
hour: "numeric",
|
|
886
|
+
hour12: !1
|
|
887
|
+
}).resolvedOptions().hourCycle === "h12"), P;
|
|
888
|
+
}
|
|
889
|
+
function Qe(e, t) {
|
|
890
|
+
if (!t.timeStyle && !t.hour) return;
|
|
891
|
+
e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
892
|
+
let r = me(e, {
|
|
893
|
+
...t,
|
|
894
|
+
timeZone: void 0
|
|
895
|
+
// use local timezone
|
|
896
|
+
}), n = parseInt(r.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), a = parseInt(r.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
|
|
897
|
+
if (n === 0 && a === 23) return "h23";
|
|
898
|
+
if (n === 24 && a === 23) return "h24";
|
|
899
|
+
if (n === 0 && a === 11) return "h11";
|
|
900
|
+
if (n === 12 && a === 11) return "h12";
|
|
901
|
+
throw new Error("Unexpected hour cycle result");
|
|
806
902
|
}
|
|
807
903
|
export {
|
|
808
|
-
|
|
904
|
+
w as $,
|
|
809
905
|
I as a,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
906
|
+
W as b,
|
|
907
|
+
Me as c,
|
|
908
|
+
U as d,
|
|
813
909
|
C as e,
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
910
|
+
R as f,
|
|
911
|
+
ae as g,
|
|
912
|
+
it as h,
|
|
913
|
+
l as i,
|
|
818
914
|
E as j,
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
915
|
+
S as k,
|
|
916
|
+
rt as l,
|
|
917
|
+
z as m,
|
|
918
|
+
nt as n,
|
|
919
|
+
ve as o,
|
|
920
|
+
et as p,
|
|
921
|
+
re as q,
|
|
922
|
+
Xe as r,
|
|
923
|
+
tt as s,
|
|
924
|
+
we as t,
|
|
925
|
+
ot as u,
|
|
926
|
+
at as v
|
|
830
927
|
};
|