@enya-learning/nova 0.5.0 → 0.6.0
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/README.md +8 -10
- package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -1
- package/dist/components/accordion.js +23 -20
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/avatar.js +24 -24
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +12 -12
- package/dist/components/badge.js.map +1 -1
- package/dist/components/box.js +16 -0
- package/dist/components/box.js.map +1 -0
- package/dist/components/breadcrumb.js +28 -24
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +10 -10
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +491 -487
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/carousel.js +105 -98
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/chart.js +2 -2
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.js +7 -6
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.js +64 -51
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.js +167 -160
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +40 -36
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +25 -24
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +39 -35
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/heading.js +39 -0
- package/dist/components/heading.js.map +1 -0
- package/dist/components/input-group.js +14 -14
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.js +28 -27
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/item.js +34 -34
- package/dist/components/item.js.map +1 -1
- package/dist/components/kbd.js +7 -7
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/menubar.js +52 -51
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/native-select.js +21 -19
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.js +21 -19
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.js +33 -30
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/progress.js +4 -4
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +14 -14
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/select.js +64 -57
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +22 -21
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +83 -79
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js +7 -7
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +137 -121
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.js +10 -8
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/switch.js +5 -5
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +14 -14
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +15 -15
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.js +47 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/textarea.js +5 -5
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +7 -7
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.js +5 -5
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +22 -14
- package/dist/src/components/box/box.d.ts +7 -0
- package/dist/src/components/box/index.d.ts +1 -0
- package/dist/src/components/heading/heading.d.ts +15 -0
- package/dist/src/components/heading/index.d.ts +1 -0
- package/dist/src/components/spinner/spinner.d.ts +2 -1
- package/dist/src/components/text/index.d.ts +1 -0
- package/dist/src/components/text/text.d.ts +13 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/styles/nova-binding.css +264 -266
- package/dist/styles/nova.css +158 -49
- package/dist/styles/typography.css +3 -123
- package/package.json +15 -2
- package/src/eslint/no-primitive-colors.js +2 -2
- package/dist/styles/theme-nova.css +0 -197
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as
|
|
2
|
+
import { n as Je } from "../chunks/rolldown-runtime-fifbipqm1abz4ydz.js";
|
|
3
3
|
import { t as Y } from "../chunks/utils-kyb5nny4y41y7hd8.js";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as En, buttonVariants as ht } from "./button.js";
|
|
5
5
|
import { jsx as te } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
6
|
+
import { HugeiconsIcon as $e } from "@hugeicons/react";
|
|
7
|
+
import { ChevronDownIcon as Fn, ChevronLeftIcon as Bn, ChevronRightIcon as In } from "@hugeicons/core-free-icons";
|
|
8
|
+
import * as mt from "react";
|
|
9
|
+
import m, { createContext as Hn, useCallback as G, useContext as An, useEffect as qn, useLayoutEffect as zn, useMemo as xe, useRef as Te, useState as Ke } from "react";
|
|
10
|
+
function jn(e, t, n = "long") {
|
|
10
11
|
return new Intl.DateTimeFormat("en-US", {
|
|
11
12
|
hour: "numeric",
|
|
12
13
|
timeZone: e,
|
|
13
14
|
timeZoneName: n
|
|
14
15
|
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
+
var Gn = {}, ge = {};
|
|
17
18
|
function ne(e, t) {
|
|
18
19
|
try {
|
|
19
|
-
const n = (
|
|
20
|
+
const n = (Gn[e] ||= new Intl.DateTimeFormat("en-US", {
|
|
20
21
|
timeZone: e,
|
|
21
22
|
timeZoneName: "longOffset"
|
|
22
23
|
}).format)(t).split("GMT")[1];
|
|
23
|
-
return n in ge ? ge[n] :
|
|
24
|
+
return n in ge ? ge[n] : yt(n, n.split(":"));
|
|
24
25
|
} catch {
|
|
25
26
|
if (e in ge) return ge[e];
|
|
26
|
-
const n = e?.match(
|
|
27
|
-
return n ?
|
|
27
|
+
const n = e?.match($n);
|
|
28
|
+
return n ? yt(e, n.slice(1)) : NaN;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
31
|
+
var $n = /([+-]\d\d):?(\d\d)?/;
|
|
32
|
+
function yt(e, t) {
|
|
32
33
|
const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
|
|
33
34
|
return ge[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
|
|
34
35
|
}
|
|
35
36
|
var ve = class be extends Date {
|
|
36
37
|
constructor(...t) {
|
|
37
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)),
|
|
38
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), xt(this, t)) : this.setTime(Date.now());
|
|
38
39
|
}
|
|
39
40
|
static tz(t, ...n) {
|
|
40
41
|
return n.length ? new be(...n, t) : new be(Date.now(), t);
|
|
@@ -52,14 +53,14 @@ var ve = class be extends Date {
|
|
|
52
53
|
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
53
54
|
return new be(+new Date(t), this.timeZone);
|
|
54
55
|
}
|
|
55
|
-
},
|
|
56
|
+
}, gt = /^(get|set)(?!UTC)/;
|
|
56
57
|
Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
57
|
-
if (!
|
|
58
|
-
const t = e.replace(
|
|
58
|
+
if (!gt.test(e)) return;
|
|
59
|
+
const t = e.replace(gt, "$1UTC");
|
|
59
60
|
ve.prototype[t] && (e.startsWith("get") ? ve.prototype[e] = function() {
|
|
60
61
|
return this.internal[t]();
|
|
61
62
|
} : (ve.prototype[e] = function() {
|
|
62
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
63
|
+
return Date.prototype[t].apply(this.internal, arguments), Rn(this), +this;
|
|
63
64
|
}, ve.prototype[t] = function() {
|
|
64
65
|
return Date.prototype[t].apply(this, arguments), Ye(this), +this;
|
|
65
66
|
}));
|
|
@@ -67,11 +68,11 @@ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
|
67
68
|
function Ye(e) {
|
|
68
69
|
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ne(e.timeZone, e) * 60));
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()),
|
|
71
|
+
function Rn(e) {
|
|
72
|
+
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), xt(e);
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
const n = Array.isArray(t) ?
|
|
74
|
+
function xt(e, t) {
|
|
75
|
+
const n = Array.isArray(t) ? Zn(t) : +e.internal, r = ne(e.timeZone, e), o = r > 0 ? Math.floor(r) : Math.ceil(r), a = /* @__PURE__ */ new Date(+e);
|
|
75
76
|
a.setUTCHours(a.getUTCHours() - 1);
|
|
76
77
|
const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+a)).getTimezoneOffset(), u = s - i;
|
|
77
78
|
let l = s;
|
|
@@ -87,7 +88,7 @@ function Ct(e, t) {
|
|
|
87
88
|
c.setUTCSeconds(0);
|
|
88
89
|
const w = s > 0 ? c.getSeconds() : (c.getSeconds() - 60) % 60, g = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
|
|
89
90
|
(g || w) && Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + g + w);
|
|
90
|
-
const M = ne(e.timeZone, e), C = M > 0 ? Math.floor(M) : Math.ceil(M), D = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - C, E = C !== o, b = D - d, v = C - o, y = n - C * 60 * 1e3, O = v > 0 &&
|
|
91
|
+
const M = ne(e.timeZone, e), C = M > 0 ? Math.floor(M) : Math.ceil(M), D = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - C, E = C !== o, b = D - d, v = C - o, y = n - C * 60 * 1e3, O = v > 0 && vt(e) - n === v * 60 * 1e3 && vt(e, y) !== n;
|
|
91
92
|
if (E && b && !O) {
|
|
92
93
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + b);
|
|
93
94
|
const x = ne(e.timeZone, e), T = C - (x > 0 ? Math.floor(x) : Math.ceil(x));
|
|
@@ -97,10 +98,10 @@ function Ct(e, t) {
|
|
|
97
98
|
const f = (t ? n : n + g * 1e3) - +e.internal;
|
|
98
99
|
f && Math.abs(f) < 1800 * 1e3 && (Date.prototype.setTime.call(e, +e + f), Ye(e));
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function Zn(e) {
|
|
101
102
|
return Date.UTC(e[0], e.length > 1 ? e[1] : 0, e.length > 2 ? e[2] : 1, ...e.slice(3));
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function vt(e, t) {
|
|
104
105
|
const n = new Date(t ?? +e);
|
|
105
106
|
return n.setUTCSeconds(n.getUTCSeconds() - Math.round(-ne(e.timeZone, n) * 60)), +n;
|
|
106
107
|
}
|
|
@@ -121,7 +122,7 @@ var $ = class we extends ve {
|
|
|
121
122
|
}
|
|
122
123
|
toTimeString() {
|
|
123
124
|
const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
|
|
124
|
-
return `${t} GMT${n}${r}${o} (${
|
|
125
|
+
return `${t} GMT${n}${r}${o} (${jn(this.timeZone, this)})`;
|
|
125
126
|
}
|
|
126
127
|
toLocaleString(t, n) {
|
|
127
128
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
@@ -155,27 +156,27 @@ var $ = class we extends ve {
|
|
|
155
156
|
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
156
157
|
return new we(+new Date(t), this.timeZone);
|
|
157
158
|
}
|
|
158
|
-
},
|
|
159
|
+
}, Un = 365.2425, Qn = Math.pow(10, 8) * 24 * 60 * 60 * 1e3, Qa = -Qn, Tt = 6048e5, Vn = 864e5, Kn = 3600, Yt = Kn * 24, Va = Yt * 7, Xn = Yt * Un, Jn = Xn / 12, Ka = Jn * 3, bt = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
159
160
|
function H(e, t) {
|
|
160
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
161
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && bt in e ? e[bt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
161
162
|
}
|
|
162
163
|
function P(e, t) {
|
|
163
164
|
return H(t || e, e);
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
+
function _t(e, t, n) {
|
|
166
167
|
const r = P(e, n?.in);
|
|
167
168
|
return isNaN(t) ? H(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
168
169
|
}
|
|
169
|
-
function
|
|
170
|
+
function Pt(e, t, n) {
|
|
170
171
|
const r = P(e, n?.in);
|
|
171
172
|
if (isNaN(t)) return H(n?.in || e, NaN);
|
|
172
173
|
if (!t) return r;
|
|
173
174
|
const o = r.getDate(), a = H(n?.in || e, r.getTime());
|
|
174
175
|
return a.setMonth(r.getMonth() + t + 1, 0), o >= a.getDate() ? a : (r.setFullYear(a.getFullYear(), a.getMonth(), o), r);
|
|
175
176
|
}
|
|
176
|
-
var
|
|
177
|
+
var Ln = {};
|
|
177
178
|
function ke() {
|
|
178
|
-
return
|
|
179
|
+
return Ln;
|
|
179
180
|
}
|
|
180
181
|
function de(e, t) {
|
|
181
182
|
const n = ke(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), s = (a < r ? 7 : 0) + a - r;
|
|
@@ -187,7 +188,7 @@ function De(e, t) {
|
|
|
187
188
|
weekStartsOn: 1
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
|
-
function
|
|
191
|
+
function Et(e, t) {
|
|
191
192
|
const n = P(e, t?.in), r = n.getFullYear(), o = H(n, 0);
|
|
192
193
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
193
194
|
const a = De(o), s = H(n, 0);
|
|
@@ -195,7 +196,7 @@ function Pt(e, t) {
|
|
|
195
196
|
const i = De(s);
|
|
196
197
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
+
function wt(e) {
|
|
199
200
|
const t = P(e), n = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
200
201
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
201
202
|
}
|
|
@@ -207,21 +208,21 @@ function Me(e, t) {
|
|
|
207
208
|
const n = P(e, t?.in);
|
|
208
209
|
return n.setHours(0, 0, 0, 0), n;
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
-
const [r, o] = fe(n?.in, e, t), a = Me(r), s = Me(o), i = +a -
|
|
212
|
-
return Math.round((i - u) /
|
|
211
|
+
function Le(e, t, n) {
|
|
212
|
+
const [r, o] = fe(n?.in, e, t), a = Me(r), s = Me(o), i = +a - wt(a), u = +s - wt(s);
|
|
213
|
+
return Math.round((i - u) / Vn);
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
-
const n =
|
|
215
|
+
function er(e, t) {
|
|
216
|
+
const n = Et(e, t), r = H(t?.in || e, 0);
|
|
216
217
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), De(r);
|
|
217
218
|
}
|
|
218
|
-
function er(e, t, n) {
|
|
219
|
-
return Yt(e, t * 7, n);
|
|
220
|
-
}
|
|
221
219
|
function tr(e, t, n) {
|
|
222
|
-
return _t(e, t *
|
|
220
|
+
return _t(e, t * 7, n);
|
|
223
221
|
}
|
|
224
|
-
function nr(e, t) {
|
|
222
|
+
function nr(e, t, n) {
|
|
223
|
+
return Pt(e, t * 12, n);
|
|
224
|
+
}
|
|
225
|
+
function rr(e, t) {
|
|
225
226
|
let n, r = t?.in;
|
|
226
227
|
return e.forEach((o) => {
|
|
227
228
|
!r && typeof o == "object" && (r = H.bind(null, o));
|
|
@@ -229,7 +230,7 @@ function nr(e, t) {
|
|
|
229
230
|
(!n || n < a || isNaN(+a)) && (n = a);
|
|
230
231
|
}), H(r, n || NaN);
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function or(e, t) {
|
|
233
234
|
let n, r = t?.in;
|
|
234
235
|
return e.forEach((o) => {
|
|
235
236
|
!r && typeof o == "object" && (r = H.bind(null, o));
|
|
@@ -237,33 +238,33 @@ function rr(e, t) {
|
|
|
237
238
|
(!n || n > a || isNaN(+a)) && (n = a);
|
|
238
239
|
}), H(r, n || NaN);
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
+
function ar(e, t, n) {
|
|
241
242
|
const [r, o] = fe(n?.in, e, t);
|
|
242
243
|
return +Me(r) == +Me(o);
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
+
function Ft(e) {
|
|
245
246
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
246
247
|
}
|
|
247
|
-
function
|
|
248
|
-
return !(!
|
|
248
|
+
function sr(e) {
|
|
249
|
+
return !(!Ft(e) && typeof e != "number" || isNaN(+P(e)));
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
+
function Bt(e, t, n) {
|
|
251
252
|
const [r, o] = fe(n?.in, e, t), a = r.getFullYear() - o.getFullYear(), s = r.getMonth() - o.getMonth();
|
|
252
253
|
return a * 12 + s;
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function ir(e, t) {
|
|
255
256
|
const n = P(e, t?.in), r = n.getMonth();
|
|
256
257
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
257
258
|
}
|
|
258
|
-
function
|
|
259
|
+
function It(e, t) {
|
|
259
260
|
const [n, r] = fe(e, t.start, t.end);
|
|
260
261
|
return {
|
|
261
262
|
start: n,
|
|
262
263
|
end: r
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
|
-
function
|
|
266
|
-
const { start: n, end: r } =
|
|
266
|
+
function ur(e, t) {
|
|
267
|
+
const { start: n, end: r } = It(t?.in, e);
|
|
267
268
|
let o = +n > +r;
|
|
268
269
|
const a = o ? +n : +r, s = o ? r : n;
|
|
269
270
|
s.setHours(0, 0, 0, 0), s.setDate(1);
|
|
@@ -275,20 +276,20 @@ function ir(e, t) {
|
|
|
275
276
|
u.push(H(n, s)), s.setMonth(s.getMonth() + i);
|
|
276
277
|
return o ? u.reverse() : u;
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
+
function lr(e, t) {
|
|
279
280
|
const n = P(e, t?.in);
|
|
280
281
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
+
function cr(e, t) {
|
|
283
284
|
const n = P(e, t?.in), r = n.getFullYear();
|
|
284
285
|
return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
|
|
285
286
|
}
|
|
286
|
-
function
|
|
287
|
+
function Ht(e, t) {
|
|
287
288
|
const n = P(e, t?.in);
|
|
288
289
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
const { start: n, end: r } =
|
|
291
|
+
function dr(e, t) {
|
|
292
|
+
const { start: n, end: r } = It(t?.in, e);
|
|
292
293
|
let o = +n > +r;
|
|
293
294
|
const a = o ? +n : +r, s = o ? r : n;
|
|
294
295
|
s.setHours(0, 0, 0, 0), s.setMonth(0, 1);
|
|
@@ -300,17 +301,17 @@ function cr(e, t) {
|
|
|
300
301
|
u.push(H(n, s)), s.setFullYear(s.getFullYear() + i);
|
|
301
302
|
return o ? u.reverse() : u;
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function At(e, t) {
|
|
304
305
|
const n = ke(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), s = (a < r ? -7 : 0) + 6 - (a - r);
|
|
305
306
|
return o.setDate(o.getDate() + s), o.setHours(23, 59, 59, 999), o;
|
|
306
307
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
308
|
+
function fr(e, t) {
|
|
309
|
+
return At(e, {
|
|
309
310
|
...t,
|
|
310
311
|
weekStartsOn: 1
|
|
311
312
|
});
|
|
312
313
|
}
|
|
313
|
-
var
|
|
314
|
+
var hr = {
|
|
314
315
|
lessThanXSeconds: {
|
|
315
316
|
one: "less than a second",
|
|
316
317
|
other: "less than {{count}} seconds"
|
|
@@ -372,53 +373,53 @@ var fr = {
|
|
|
372
373
|
one: "almost 1 year",
|
|
373
374
|
other: "almost {{count}} years"
|
|
374
375
|
}
|
|
375
|
-
},
|
|
376
|
+
}, mr = (e, t, n) => {
|
|
376
377
|
let r;
|
|
377
|
-
const o =
|
|
378
|
+
const o = hr[e];
|
|
378
379
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
379
380
|
};
|
|
380
|
-
function
|
|
381
|
+
function Re(e) {
|
|
381
382
|
return (t = {}) => {
|
|
382
383
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
383
384
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
384
385
|
};
|
|
385
386
|
}
|
|
386
|
-
var
|
|
387
|
+
var yr = {
|
|
387
388
|
full: "EEEE, MMMM do, y",
|
|
388
389
|
long: "MMMM do, y",
|
|
389
390
|
medium: "MMM d, y",
|
|
390
391
|
short: "MM/dd/yyyy"
|
|
391
|
-
},
|
|
392
|
+
}, gr = {
|
|
392
393
|
full: "h:mm:ss a zzzz",
|
|
393
394
|
long: "h:mm:ss a z",
|
|
394
395
|
medium: "h:mm:ss a",
|
|
395
396
|
short: "h:mm a"
|
|
396
|
-
},
|
|
397
|
+
}, vr = {
|
|
397
398
|
full: "{{date}} 'at' {{time}}",
|
|
398
399
|
long: "{{date}} 'at' {{time}}",
|
|
399
400
|
medium: "{{date}}, {{time}}",
|
|
400
401
|
short: "{{date}}, {{time}}"
|
|
401
|
-
},
|
|
402
|
-
date:
|
|
403
|
-
formats: mr,
|
|
404
|
-
defaultWidth: "full"
|
|
405
|
-
}),
|
|
406
|
-
time: $e({
|
|
402
|
+
}, br = {
|
|
403
|
+
date: Re({
|
|
407
404
|
formats: yr,
|
|
408
405
|
defaultWidth: "full"
|
|
409
406
|
}),
|
|
410
|
-
|
|
407
|
+
time: Re({
|
|
411
408
|
formats: gr,
|
|
412
409
|
defaultWidth: "full"
|
|
410
|
+
}),
|
|
411
|
+
dateTime: Re({
|
|
412
|
+
formats: vr,
|
|
413
|
+
defaultWidth: "full"
|
|
413
414
|
})
|
|
414
|
-
},
|
|
415
|
+
}, wr = {
|
|
415
416
|
lastWeek: "'last' eeee 'at' p",
|
|
416
417
|
yesterday: "'yesterday at' p",
|
|
417
418
|
today: "'today at' p",
|
|
418
419
|
tomorrow: "'tomorrow at' p",
|
|
419
420
|
nextWeek: "eeee 'at' p",
|
|
420
421
|
other: "P"
|
|
421
|
-
},
|
|
422
|
+
}, pr = (e, t, n, r) => wr[e];
|
|
422
423
|
function me(e) {
|
|
423
424
|
return (t, n) => {
|
|
424
425
|
const r = n?.context ? String(n.context) : "standalone";
|
|
@@ -434,11 +435,11 @@ function me(e) {
|
|
|
434
435
|
return o[a];
|
|
435
436
|
};
|
|
436
437
|
}
|
|
437
|
-
var
|
|
438
|
+
var Dr = {
|
|
438
439
|
narrow: ["B", "A"],
|
|
439
440
|
abbreviated: ["BC", "AD"],
|
|
440
441
|
wide: ["Before Christ", "Anno Domini"]
|
|
441
|
-
},
|
|
442
|
+
}, Mr = {
|
|
442
443
|
narrow: [
|
|
443
444
|
"1",
|
|
444
445
|
"2",
|
|
@@ -457,7 +458,7 @@ var pr = {
|
|
|
457
458
|
"3rd quarter",
|
|
458
459
|
"4th quarter"
|
|
459
460
|
]
|
|
460
|
-
},
|
|
461
|
+
}, kr = {
|
|
461
462
|
narrow: [
|
|
462
463
|
"J",
|
|
463
464
|
"F",
|
|
@@ -500,7 +501,7 @@ var pr = {
|
|
|
500
501
|
"November",
|
|
501
502
|
"December"
|
|
502
503
|
]
|
|
503
|
-
},
|
|
504
|
+
}, Or = {
|
|
504
505
|
narrow: [
|
|
505
506
|
"S",
|
|
506
507
|
"M",
|
|
@@ -537,7 +538,7 @@ var pr = {
|
|
|
537
538
|
"Friday",
|
|
538
539
|
"Saturday"
|
|
539
540
|
]
|
|
540
|
-
},
|
|
541
|
+
}, Wr = {
|
|
541
542
|
narrow: {
|
|
542
543
|
am: "a",
|
|
543
544
|
pm: "p",
|
|
@@ -568,7 +569,7 @@ var pr = {
|
|
|
568
569
|
evening: "evening",
|
|
569
570
|
night: "night"
|
|
570
571
|
}
|
|
571
|
-
},
|
|
572
|
+
}, Sr = {
|
|
572
573
|
narrow: {
|
|
573
574
|
am: "a",
|
|
574
575
|
pm: "p",
|
|
@@ -599,7 +600,7 @@ var pr = {
|
|
|
599
600
|
evening: "in the evening",
|
|
600
601
|
night: "at night"
|
|
601
602
|
}
|
|
602
|
-
},
|
|
603
|
+
}, Nr = (e, t) => {
|
|
603
604
|
const n = Number(e), r = n % 100;
|
|
604
605
|
if (r > 20 || r < 10) switch (r % 10) {
|
|
605
606
|
case 1:
|
|
@@ -610,29 +611,29 @@ var pr = {
|
|
|
610
611
|
return n + "rd";
|
|
611
612
|
}
|
|
612
613
|
return n + "th";
|
|
613
|
-
},
|
|
614
|
-
ordinalNumber:
|
|
614
|
+
}, Cr = {
|
|
615
|
+
ordinalNumber: Nr,
|
|
615
616
|
era: me({
|
|
616
|
-
values:
|
|
617
|
+
values: Dr,
|
|
617
618
|
defaultWidth: "wide"
|
|
618
619
|
}),
|
|
619
620
|
quarter: me({
|
|
620
|
-
values:
|
|
621
|
+
values: Mr,
|
|
621
622
|
defaultWidth: "wide",
|
|
622
623
|
argumentCallback: (e) => e - 1
|
|
623
624
|
}),
|
|
624
625
|
month: me({
|
|
625
|
-
values:
|
|
626
|
+
values: kr,
|
|
626
627
|
defaultWidth: "wide"
|
|
627
628
|
}),
|
|
628
629
|
day: me({
|
|
629
|
-
values:
|
|
630
|
+
values: Or,
|
|
630
631
|
defaultWidth: "wide"
|
|
631
632
|
}),
|
|
632
633
|
dayPeriod: me({
|
|
633
|
-
values:
|
|
634
|
+
values: Wr,
|
|
634
635
|
defaultWidth: "wide",
|
|
635
|
-
formattingValues:
|
|
636
|
+
formattingValues: Sr,
|
|
636
637
|
defaultFormattingWidth: "wide"
|
|
637
638
|
})
|
|
638
639
|
};
|
|
@@ -640,7 +641,7 @@ function ye(e) {
|
|
|
640
641
|
return (t, n = {}) => {
|
|
641
642
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
642
643
|
if (!a) return null;
|
|
643
|
-
const s = a[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ?
|
|
644
|
+
const s = a[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(i) ? Tr(i, (c) => c.test(s)) : xr(i, (c) => c.test(s));
|
|
644
645
|
let l;
|
|
645
646
|
l = e.valueCallback ? e.valueCallback(u) : u, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
646
647
|
const d = t.slice(s.length);
|
|
@@ -650,13 +651,13 @@ function ye(e) {
|
|
|
650
651
|
};
|
|
651
652
|
};
|
|
652
653
|
}
|
|
653
|
-
function
|
|
654
|
+
function xr(e, t) {
|
|
654
655
|
for (const n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
655
656
|
}
|
|
656
|
-
function
|
|
657
|
+
function Tr(e, t) {
|
|
657
658
|
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
658
659
|
}
|
|
659
|
-
function
|
|
660
|
+
function Yr(e) {
|
|
660
661
|
return (t, n = {}) => {
|
|
661
662
|
const r = t.match(e.matchPattern);
|
|
662
663
|
if (!r) return null;
|
|
@@ -671,24 +672,24 @@ function Tr(e) {
|
|
|
671
672
|
};
|
|
672
673
|
};
|
|
673
674
|
}
|
|
674
|
-
var
|
|
675
|
+
var _r = /^(\d+)(th|st|nd|rd)?/i, Pr = /\d+/i, Er = {
|
|
675
676
|
narrow: /^(b|a)/i,
|
|
676
677
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
677
678
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
678
|
-
},
|
|
679
|
+
}, Fr = { any: [/^b/i, /^(a|c)/i] }, Br = {
|
|
679
680
|
narrow: /^[1234]/i,
|
|
680
681
|
abbreviated: /^q[1234]/i,
|
|
681
682
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
682
|
-
},
|
|
683
|
+
}, Ir = { any: [
|
|
683
684
|
/1/i,
|
|
684
685
|
/2/i,
|
|
685
686
|
/3/i,
|
|
686
687
|
/4/i
|
|
687
|
-
] },
|
|
688
|
+
] }, Hr = {
|
|
688
689
|
narrow: /^[jfmasond]/i,
|
|
689
690
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
690
691
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
691
|
-
},
|
|
692
|
+
}, Ar = {
|
|
692
693
|
narrow: [
|
|
693
694
|
/^j/i,
|
|
694
695
|
/^f/i,
|
|
@@ -717,12 +718,12 @@ var Yr = /^(\d+)(th|st|nd|rd)?/i, _r = /\d+/i, Pr = {
|
|
|
717
718
|
/^n/i,
|
|
718
719
|
/^d/i
|
|
719
720
|
]
|
|
720
|
-
},
|
|
721
|
+
}, qr = {
|
|
721
722
|
narrow: /^[smtwf]/i,
|
|
722
723
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
723
724
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
724
725
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
725
|
-
},
|
|
726
|
+
}, zr = {
|
|
726
727
|
narrow: [
|
|
727
728
|
/^s/i,
|
|
728
729
|
/^m/i,
|
|
@@ -741,10 +742,10 @@ var Yr = /^(\d+)(th|st|nd|rd)?/i, _r = /\d+/i, Pr = {
|
|
|
741
742
|
/^f/i,
|
|
742
743
|
/^sa/i
|
|
743
744
|
]
|
|
744
|
-
},
|
|
745
|
+
}, jr = {
|
|
745
746
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
746
747
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
747
|
-
},
|
|
748
|
+
}, Gr = { any: {
|
|
748
749
|
am: /^a/i,
|
|
749
750
|
pm: /^p/i,
|
|
750
751
|
midnight: /^mi/i,
|
|
@@ -753,64 +754,64 @@ var Yr = /^(\d+)(th|st|nd|rd)?/i, _r = /\d+/i, Pr = {
|
|
|
753
754
|
afternoon: /afternoon/i,
|
|
754
755
|
evening: /evening/i,
|
|
755
756
|
night: /night/i
|
|
756
|
-
} },
|
|
757
|
-
ordinalNumber:
|
|
758
|
-
matchPattern:
|
|
759
|
-
parsePattern:
|
|
757
|
+
} }, $r = {
|
|
758
|
+
ordinalNumber: Yr({
|
|
759
|
+
matchPattern: _r,
|
|
760
|
+
parsePattern: Pr,
|
|
760
761
|
valueCallback: (e) => parseInt(e, 10)
|
|
761
762
|
}),
|
|
762
763
|
era: ye({
|
|
763
|
-
matchPatterns:
|
|
764
|
+
matchPatterns: Er,
|
|
764
765
|
defaultMatchWidth: "wide",
|
|
765
|
-
parsePatterns:
|
|
766
|
+
parsePatterns: Fr,
|
|
766
767
|
defaultParseWidth: "any"
|
|
767
768
|
}),
|
|
768
769
|
quarter: ye({
|
|
769
|
-
matchPatterns:
|
|
770
|
+
matchPatterns: Br,
|
|
770
771
|
defaultMatchWidth: "wide",
|
|
771
|
-
parsePatterns:
|
|
772
|
+
parsePatterns: Ir,
|
|
772
773
|
defaultParseWidth: "any",
|
|
773
774
|
valueCallback: (e) => e + 1
|
|
774
775
|
}),
|
|
775
776
|
month: ye({
|
|
776
|
-
matchPatterns:
|
|
777
|
+
matchPatterns: Hr,
|
|
777
778
|
defaultMatchWidth: "wide",
|
|
778
|
-
parsePatterns:
|
|
779
|
+
parsePatterns: Ar,
|
|
779
780
|
defaultParseWidth: "any"
|
|
780
781
|
}),
|
|
781
782
|
day: ye({
|
|
782
|
-
matchPatterns:
|
|
783
|
+
matchPatterns: qr,
|
|
783
784
|
defaultMatchWidth: "wide",
|
|
784
|
-
parsePatterns:
|
|
785
|
+
parsePatterns: zr,
|
|
785
786
|
defaultParseWidth: "any"
|
|
786
787
|
}),
|
|
787
788
|
dayPeriod: ye({
|
|
788
|
-
matchPatterns:
|
|
789
|
+
matchPatterns: jr,
|
|
789
790
|
defaultMatchWidth: "any",
|
|
790
|
-
parsePatterns:
|
|
791
|
+
parsePatterns: Gr,
|
|
791
792
|
defaultParseWidth: "any"
|
|
792
793
|
})
|
|
793
794
|
}, ce = {
|
|
794
795
|
code: "en-US",
|
|
795
|
-
formatDistance:
|
|
796
|
-
formatLong:
|
|
797
|
-
formatRelative:
|
|
798
|
-
localize:
|
|
799
|
-
match:
|
|
796
|
+
formatDistance: mr,
|
|
797
|
+
formatLong: br,
|
|
798
|
+
formatRelative: pr,
|
|
799
|
+
localize: Cr,
|
|
800
|
+
match: $r,
|
|
800
801
|
options: {
|
|
801
802
|
weekStartsOn: 0,
|
|
802
803
|
firstWeekContainsDate: 1
|
|
803
804
|
}
|
|
804
805
|
};
|
|
805
|
-
function
|
|
806
|
+
function Rr(e, t) {
|
|
806
807
|
const n = P(e, t?.in);
|
|
807
|
-
return
|
|
808
|
+
return Le(n, Ht(n)) + 1;
|
|
808
809
|
}
|
|
809
|
-
function
|
|
810
|
-
const n = P(e, t?.in), r = +De(n) - +
|
|
811
|
-
return Math.round(r /
|
|
810
|
+
function et(e, t) {
|
|
811
|
+
const n = P(e, t?.in), r = +De(n) - +er(n);
|
|
812
|
+
return Math.round(r / Tt) + 1;
|
|
812
813
|
}
|
|
813
|
-
function
|
|
814
|
+
function qt(e, t) {
|
|
814
815
|
const n = P(e, t?.in), r = n.getFullYear(), o = ke(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = H(t?.in || e, 0);
|
|
815
816
|
s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
816
817
|
const i = de(s, t), u = H(t?.in || e, 0);
|
|
@@ -818,13 +819,13 @@ function At(e, t) {
|
|
|
818
819
|
const l = de(u, t);
|
|
819
820
|
return +n >= +i ? r + 1 : +n >= +l ? r : r - 1;
|
|
820
821
|
}
|
|
821
|
-
function
|
|
822
|
-
const n = ke(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o =
|
|
822
|
+
function Zr(e, t) {
|
|
823
|
+
const n = ke(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = qt(e, t), a = H(t?.in || e, 0);
|
|
823
824
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), de(a, t);
|
|
824
825
|
}
|
|
825
|
-
function
|
|
826
|
-
const n = P(e, t?.in), r = +de(n, t) - +
|
|
827
|
-
return Math.round(r /
|
|
826
|
+
function tt(e, t) {
|
|
827
|
+
const n = P(e, t?.in), r = +de(n, t) - +Zr(n, t);
|
|
828
|
+
return Math.round(r / Tt) + 1;
|
|
828
829
|
}
|
|
829
830
|
function _(e, t) {
|
|
830
831
|
return (e < 0 ? "-" : "") + Math.abs(e).toString().padStart(t, "0");
|
|
@@ -880,7 +881,7 @@ var ae = {
|
|
|
880
881
|
afternoon: "afternoon",
|
|
881
882
|
evening: "evening",
|
|
882
883
|
night: "night"
|
|
883
|
-
},
|
|
884
|
+
}, pt = {
|
|
884
885
|
G: function(e, t, n) {
|
|
885
886
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
886
887
|
switch (t) {
|
|
@@ -902,11 +903,11 @@ var ae = {
|
|
|
902
903
|
return ae.y(e, t);
|
|
903
904
|
},
|
|
904
905
|
Y: function(e, t, n, r) {
|
|
905
|
-
const o =
|
|
906
|
+
const o = qt(e, r), a = o > 0 ? o : 1 - o;
|
|
906
907
|
return t === "YY" ? _(a % 100, 2) : t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : _(a, t.length);
|
|
907
908
|
},
|
|
908
909
|
R: function(e, t) {
|
|
909
|
-
return _(
|
|
910
|
+
return _(Et(e), t.length);
|
|
910
911
|
},
|
|
911
912
|
u: function(e, t) {
|
|
912
913
|
return _(e.getFullYear(), t.length);
|
|
@@ -1015,18 +1016,18 @@ var ae = {
|
|
|
1015
1016
|
}
|
|
1016
1017
|
},
|
|
1017
1018
|
w: function(e, t, n, r) {
|
|
1018
|
-
const o =
|
|
1019
|
+
const o = tt(e, r);
|
|
1019
1020
|
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : _(o, t.length);
|
|
1020
1021
|
},
|
|
1021
1022
|
I: function(e, t, n) {
|
|
1022
|
-
const r =
|
|
1023
|
+
const r = et(e);
|
|
1023
1024
|
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : _(r, t.length);
|
|
1024
1025
|
},
|
|
1025
1026
|
d: function(e, t, n) {
|
|
1026
1027
|
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : ae.d(e, t);
|
|
1027
1028
|
},
|
|
1028
1029
|
D: function(e, t, n) {
|
|
1029
|
-
const r =
|
|
1030
|
+
const r = Rr(e);
|
|
1030
1031
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : _(r, t.length);
|
|
1031
1032
|
},
|
|
1032
1033
|
E: function(e, t, n) {
|
|
@@ -1257,7 +1258,7 @@ var ae = {
|
|
|
1257
1258
|
if (r === 0) return "Z";
|
|
1258
1259
|
switch (t) {
|
|
1259
1260
|
case "X":
|
|
1260
|
-
return
|
|
1261
|
+
return Mt(r);
|
|
1261
1262
|
case "XXXX":
|
|
1262
1263
|
case "XX":
|
|
1263
1264
|
return ie(r);
|
|
@@ -1269,7 +1270,7 @@ var ae = {
|
|
|
1269
1270
|
const r = e.getTimezoneOffset();
|
|
1270
1271
|
switch (t) {
|
|
1271
1272
|
case "x":
|
|
1272
|
-
return
|
|
1273
|
+
return Mt(r);
|
|
1273
1274
|
case "xxxx":
|
|
1274
1275
|
case "xx":
|
|
1275
1276
|
return ie(r);
|
|
@@ -1283,7 +1284,7 @@ var ae = {
|
|
|
1283
1284
|
case "O":
|
|
1284
1285
|
case "OO":
|
|
1285
1286
|
case "OOO":
|
|
1286
|
-
return "GMT" +
|
|
1287
|
+
return "GMT" + Dt(r, ":");
|
|
1287
1288
|
default:
|
|
1288
1289
|
return "GMT" + ie(r, ":");
|
|
1289
1290
|
}
|
|
@@ -1294,7 +1295,7 @@ var ae = {
|
|
|
1294
1295
|
case "z":
|
|
1295
1296
|
case "zz":
|
|
1296
1297
|
case "zzz":
|
|
1297
|
-
return "GMT" +
|
|
1298
|
+
return "GMT" + Dt(r, ":");
|
|
1298
1299
|
default:
|
|
1299
1300
|
return "GMT" + ie(r, ":");
|
|
1300
1301
|
}
|
|
@@ -1306,18 +1307,18 @@ var ae = {
|
|
|
1306
1307
|
return _(+e, t.length);
|
|
1307
1308
|
}
|
|
1308
1309
|
};
|
|
1309
|
-
function
|
|
1310
|
+
function Dt(e, t = "") {
|
|
1310
1311
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
1311
1312
|
return a === 0 ? n + String(o) : n + String(o) + t + _(a, 2);
|
|
1312
1313
|
}
|
|
1313
|
-
function
|
|
1314
|
+
function Mt(e, t) {
|
|
1314
1315
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + _(Math.abs(e) / 60, 2) : ie(e, t);
|
|
1315
1316
|
}
|
|
1316
1317
|
function ie(e, t = "") {
|
|
1317
1318
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = _(Math.trunc(r / 60), 2), a = _(r % 60, 2);
|
|
1318
1319
|
return n + o + t + a;
|
|
1319
1320
|
}
|
|
1320
|
-
var
|
|
1321
|
+
var kt = (e, t) => {
|
|
1321
1322
|
switch (e) {
|
|
1322
1323
|
case "P":
|
|
1323
1324
|
return t.date({ width: "short" });
|
|
@@ -1328,7 +1329,7 @@ var Mt = (e, t) => {
|
|
|
1328
1329
|
default:
|
|
1329
1330
|
return t.date({ width: "full" });
|
|
1330
1331
|
}
|
|
1331
|
-
},
|
|
1332
|
+
}, zt = (e, t) => {
|
|
1332
1333
|
switch (e) {
|
|
1333
1334
|
case "p":
|
|
1334
1335
|
return t.time({ width: "short" });
|
|
@@ -1339,9 +1340,9 @@ var Mt = (e, t) => {
|
|
|
1339
1340
|
default:
|
|
1340
1341
|
return t.time({ width: "full" });
|
|
1341
1342
|
}
|
|
1342
|
-
},
|
|
1343
|
+
}, Ur = (e, t) => {
|
|
1343
1344
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
1344
|
-
if (!o) return
|
|
1345
|
+
if (!o) return kt(e, t);
|
|
1345
1346
|
let a;
|
|
1346
1347
|
switch (r) {
|
|
1347
1348
|
case "P":
|
|
@@ -1357,42 +1358,42 @@ var Mt = (e, t) => {
|
|
|
1357
1358
|
a = t.dateTime({ width: "full" });
|
|
1358
1359
|
break;
|
|
1359
1360
|
}
|
|
1360
|
-
return a.replace("{{date}}",
|
|
1361
|
-
},
|
|
1362
|
-
p:
|
|
1363
|
-
P:
|
|
1364
|
-
},
|
|
1361
|
+
return a.replace("{{date}}", kt(r, t)).replace("{{time}}", zt(o, t));
|
|
1362
|
+
}, Qr = {
|
|
1363
|
+
p: zt,
|
|
1364
|
+
P: Ur
|
|
1365
|
+
}, Vr = /^D+$/, Kr = /^Y+$/, Xr = [
|
|
1365
1366
|
"D",
|
|
1366
1367
|
"DD",
|
|
1367
1368
|
"YY",
|
|
1368
1369
|
"YYYY"
|
|
1369
1370
|
];
|
|
1370
|
-
function Xr(e) {
|
|
1371
|
-
return Qr.test(e);
|
|
1372
|
-
}
|
|
1373
1371
|
function Jr(e) {
|
|
1374
1372
|
return Vr.test(e);
|
|
1375
1373
|
}
|
|
1376
|
-
function Lr(e
|
|
1377
|
-
|
|
1378
|
-
if (console.warn(r), Kr.includes(e)) throw new RangeError(r);
|
|
1374
|
+
function Lr(e) {
|
|
1375
|
+
return Kr.test(e);
|
|
1379
1376
|
}
|
|
1380
1377
|
function eo(e, t, n) {
|
|
1378
|
+
const r = to(e, t, n);
|
|
1379
|
+
if (console.warn(r), Xr.includes(e)) throw new RangeError(r);
|
|
1380
|
+
}
|
|
1381
|
+
function to(e, t, n) {
|
|
1381
1382
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1382
1383
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1383
1384
|
}
|
|
1384
|
-
var
|
|
1385
|
+
var no = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ro = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, oo = /^'([^]*?)'?$/, ao = /''/g, so = /[a-zA-Z]/;
|
|
1385
1386
|
function pe(e, t, n) {
|
|
1386
1387
|
const r = ke(), o = n?.locale ?? r.locale ?? ce, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = P(e, n?.in);
|
|
1387
|
-
if (!
|
|
1388
|
-
let u = t.match(
|
|
1388
|
+
if (!sr(i)) throw new RangeError("Invalid time value");
|
|
1389
|
+
let u = t.match(ro).map((d) => {
|
|
1389
1390
|
const c = d[0];
|
|
1390
1391
|
if (c === "p" || c === "P") {
|
|
1391
|
-
const w =
|
|
1392
|
+
const w = Qr[c];
|
|
1392
1393
|
return w(d, o.formatLong);
|
|
1393
1394
|
}
|
|
1394
1395
|
return d;
|
|
1395
|
-
}).join("").match(
|
|
1396
|
+
}).join("").match(no).map((d) => {
|
|
1396
1397
|
if (d === "''") return {
|
|
1397
1398
|
isToken: !1,
|
|
1398
1399
|
value: "'"
|
|
@@ -1400,13 +1401,13 @@ function pe(e, t, n) {
|
|
|
1400
1401
|
const c = d[0];
|
|
1401
1402
|
if (c === "'") return {
|
|
1402
1403
|
isToken: !1,
|
|
1403
|
-
value:
|
|
1404
|
+
value: io(d)
|
|
1404
1405
|
};
|
|
1405
|
-
if (
|
|
1406
|
+
if (pt[c]) return {
|
|
1406
1407
|
isToken: !0,
|
|
1407
1408
|
value: d
|
|
1408
1409
|
};
|
|
1409
|
-
if (c.match(
|
|
1410
|
+
if (c.match(so)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + c + "`");
|
|
1410
1411
|
return {
|
|
1411
1412
|
isToken: !1,
|
|
1412
1413
|
value: d
|
|
@@ -1421,63 +1422,63 @@ function pe(e, t, n) {
|
|
|
1421
1422
|
return u.map((d) => {
|
|
1422
1423
|
if (!d.isToken) return d.value;
|
|
1423
1424
|
const c = d.value;
|
|
1424
|
-
(!n?.useAdditionalWeekYearTokens &&
|
|
1425
|
-
const w =
|
|
1425
|
+
(!n?.useAdditionalWeekYearTokens && Lr(c) || !n?.useAdditionalDayOfYearTokens && Jr(c)) && eo(c, t, String(e));
|
|
1426
|
+
const w = pt[c[0]];
|
|
1426
1427
|
return w(i, c, o.localize, l);
|
|
1427
1428
|
}).join("");
|
|
1428
1429
|
}
|
|
1429
|
-
function
|
|
1430
|
-
const t = e.match(
|
|
1431
|
-
return t ? t[1].replace(
|
|
1430
|
+
function io(e) {
|
|
1431
|
+
const t = e.match(oo);
|
|
1432
|
+
return t ? t[1].replace(ao, "'") : e;
|
|
1432
1433
|
}
|
|
1433
|
-
function
|
|
1434
|
+
function uo(e, t) {
|
|
1434
1435
|
const n = P(e, t?.in), r = n.getFullYear(), o = n.getMonth(), a = H(n, 0);
|
|
1435
1436
|
return a.setFullYear(r, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
|
|
1436
1437
|
}
|
|
1437
|
-
function
|
|
1438
|
+
function lo(e, t) {
|
|
1438
1439
|
return P(e, t?.in).getMonth();
|
|
1439
1440
|
}
|
|
1440
|
-
function
|
|
1441
|
+
function co(e, t) {
|
|
1441
1442
|
return P(e, t?.in).getFullYear();
|
|
1442
1443
|
}
|
|
1443
|
-
function
|
|
1444
|
+
function fo(e, t) {
|
|
1444
1445
|
return +P(e) > +P(t);
|
|
1445
1446
|
}
|
|
1446
|
-
function
|
|
1447
|
+
function ho(e, t) {
|
|
1447
1448
|
return +P(e) < +P(t);
|
|
1448
1449
|
}
|
|
1449
|
-
function
|
|
1450
|
+
function mo(e, t, n) {
|
|
1450
1451
|
const [r, o] = fe(n?.in, e, t);
|
|
1451
1452
|
return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
|
|
1452
1453
|
}
|
|
1453
|
-
function
|
|
1454
|
+
function yo(e, t, n) {
|
|
1454
1455
|
const [r, o] = fe(n?.in, e, t);
|
|
1455
1456
|
return r.getFullYear() === o.getFullYear();
|
|
1456
1457
|
}
|
|
1457
|
-
function
|
|
1458
|
+
function go(e, t, n) {
|
|
1458
1459
|
const r = P(e, n?.in), o = r.getFullYear(), a = r.getDate(), s = H(n?.in || e, 0);
|
|
1459
1460
|
s.setFullYear(o, t, 15), s.setHours(0, 0, 0, 0);
|
|
1460
|
-
const i =
|
|
1461
|
+
const i = uo(s);
|
|
1461
1462
|
return r.setMonth(t, Math.min(a, i)), r;
|
|
1462
1463
|
}
|
|
1463
|
-
function
|
|
1464
|
+
function vo(e, t, n) {
|
|
1464
1465
|
const r = P(e, n?.in);
|
|
1465
1466
|
return isNaN(+r) ? H(n?.in || e, NaN) : (r.setFullYear(t), r);
|
|
1466
1467
|
}
|
|
1467
|
-
var
|
|
1468
|
-
function
|
|
1469
|
-
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o,
|
|
1470
|
-
return t.getMonth(e) === t.getMonth(a) ?
|
|
1468
|
+
var Ot = 5, bo = 4;
|
|
1469
|
+
function wo(e, t) {
|
|
1470
|
+
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o, Ot * 7 - 1);
|
|
1471
|
+
return t.getMonth(e) === t.getMonth(a) ? Ot : bo;
|
|
1471
1472
|
}
|
|
1472
|
-
function
|
|
1473
|
+
function jt(e, t) {
|
|
1473
1474
|
const n = t.startOfMonth(e), r = n.getDay();
|
|
1474
1475
|
return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
|
|
1475
1476
|
}
|
|
1476
|
-
function
|
|
1477
|
-
const n =
|
|
1477
|
+
function po(e, t) {
|
|
1478
|
+
const n = jt(e, t), r = wo(e, t);
|
|
1478
1479
|
return t.addDays(n, r * 7 - 1);
|
|
1479
1480
|
}
|
|
1480
|
-
var
|
|
1481
|
+
var Gt = {
|
|
1481
1482
|
...ce,
|
|
1482
1483
|
labels: {
|
|
1483
1484
|
labelDayButton: (e, t, n, r) => {
|
|
@@ -1520,20 +1521,20 @@ var jt = {
|
|
|
1520
1521
|
}), r(e, "cccc");
|
|
1521
1522
|
}
|
|
1522
1523
|
}
|
|
1523
|
-
}, X = class
|
|
1524
|
+
}, X = class Xe {
|
|
1524
1525
|
constructor(t, n) {
|
|
1525
|
-
this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? $.tz(this.options.timeZone) : new (this.options.Date ?? Date)(), this.newDate = (r, o, a) => this.overrides?.newDate ? this.overrides.newDate(r, o, a) : this.options.timeZone ? new $(r, o, a, this.options.timeZone) : new Date(r, o, a), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) :
|
|
1526
|
-
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) :
|
|
1526
|
+
this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? $.tz(this.options.timeZone) : new (this.options.Date ?? Date)(), this.newDate = (r, o, a) => this.overrides?.newDate ? this.overrides.newDate(r, o, a) : this.options.timeZone ? new $(r, o, a, this.options.timeZone) : new Date(r, o, a), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : _t(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : Pt(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : tr(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : nr(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : Le(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : Bt(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : ur(r), this.eachYearOfInterval = (r) => {
|
|
1527
|
+
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : dr(r), a = new Set(o.map((i) => this.getYear(i)));
|
|
1527
1528
|
if (a.size === o.length) return o;
|
|
1528
1529
|
const s = [];
|
|
1529
1530
|
return a.forEach((i) => {
|
|
1530
1531
|
s.push(new Date(i, 0, 1));
|
|
1531
1532
|
}), s;
|
|
1532
|
-
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) :
|
|
1533
|
+
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : po(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : fr(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : ir(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : At(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : cr(r), this.format = (r, o, a) => {
|
|
1533
1534
|
const s = this.overrides?.format ? this.overrides.format(r, o, this.options) : pe(r, o, this.options);
|
|
1534
1535
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(s) : s;
|
|
1535
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) :
|
|
1536
|
-
locale:
|
|
1536
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : et(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : lo(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : co(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : tt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : fo(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : ho(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : Ft(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : ar(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : mo(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : yo(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : rr(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : or(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : go(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : vo(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : jt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : Me(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : De(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : lr(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : de(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : Ht(r), this.options = {
|
|
1537
|
+
locale: Gt,
|
|
1537
1538
|
...t
|
|
1538
1539
|
}, this.overrides = n;
|
|
1539
1540
|
}
|
|
@@ -1551,11 +1552,11 @@ var jt = {
|
|
|
1551
1552
|
}
|
|
1552
1553
|
getMonthYearOrder() {
|
|
1553
1554
|
const t = this.options.locale?.code;
|
|
1554
|
-
return t &&
|
|
1555
|
+
return t && Xe.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1555
1556
|
}
|
|
1556
1557
|
formatMonthYear(t) {
|
|
1557
1558
|
const { locale: n, timeZone: r, numerals: o } = this.options, a = n?.code;
|
|
1558
|
-
if (a &&
|
|
1559
|
+
if (a && Xe.yearFirstLocales.has(a)) try {
|
|
1559
1560
|
return new Intl.DateTimeFormat(a, {
|
|
1560
1561
|
month: "long",
|
|
1561
1562
|
year: "numeric",
|
|
@@ -1587,26 +1588,26 @@ X.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1587
1588
|
"zh-HK",
|
|
1588
1589
|
"zh-TW"
|
|
1589
1590
|
]);
|
|
1590
|
-
var J = new X(),
|
|
1591
|
+
var J = new X(), $t = class {
|
|
1591
1592
|
constructor(e, t, n = J) {
|
|
1592
1593
|
this.date = e, this.displayMonth = t, this.outside = !!(t && !n.isSameMonth(e, t)), this.dateLib = n, this.isoDate = n.format(e, "yyyy-MM-dd"), this.displayMonthId = n.format(t, "yyyy-MM"), this.dateMonthId = n.format(e, "yyyy-MM");
|
|
1593
1594
|
}
|
|
1594
1595
|
isEqualTo(e) {
|
|
1595
1596
|
return this.dateLib.isSameDay(e.date, this.date) && this.dateLib.isSameMonth(e.displayMonth, this.displayMonth);
|
|
1596
1597
|
}
|
|
1597
|
-
},
|
|
1598
|
+
}, Do = class {
|
|
1598
1599
|
constructor(e, t) {
|
|
1599
1600
|
this.date = e, this.weeks = t;
|
|
1600
1601
|
}
|
|
1601
|
-
},
|
|
1602
|
+
}, Mo = class {
|
|
1602
1603
|
constructor(e, t) {
|
|
1603
1604
|
this.days = t, this.weekNumber = e;
|
|
1604
1605
|
}
|
|
1605
1606
|
};
|
|
1606
|
-
function
|
|
1607
|
+
function ko(e) {
|
|
1607
1608
|
return m.createElement("span", { ...e });
|
|
1608
1609
|
}
|
|
1609
|
-
function
|
|
1610
|
+
function Oo(e) {
|
|
1610
1611
|
const { size: t = 24, orientation: n = "left", className: r, style: o } = e;
|
|
1611
1612
|
return m.createElement("svg", {
|
|
1612
1613
|
className: r,
|
|
@@ -1616,11 +1617,11 @@ function ko(e) {
|
|
|
1616
1617
|
viewBox: "0 0 24 24"
|
|
1617
1618
|
}, n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }), n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }), n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }), n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" }));
|
|
1618
1619
|
}
|
|
1619
|
-
function
|
|
1620
|
+
function Wo(e) {
|
|
1620
1621
|
const { day: t, modifiers: n, ...r } = e;
|
|
1621
1622
|
return m.createElement("td", { ...r });
|
|
1622
1623
|
}
|
|
1623
|
-
function
|
|
1624
|
+
function So(e) {
|
|
1624
1625
|
const { day: t, modifiers: n, ...r } = e, o = m.useRef(null);
|
|
1625
1626
|
return m.useEffect(() => {
|
|
1626
1627
|
n.focused && o.current?.focus();
|
|
@@ -1645,13 +1646,13 @@ var z;
|
|
|
1645
1646
|
(function(e) {
|
|
1646
1647
|
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
1647
1648
|
})(z || (z = {}));
|
|
1648
|
-
var
|
|
1649
|
+
var Rt = Hn(void 0);
|
|
1649
1650
|
function _e() {
|
|
1650
|
-
const e =
|
|
1651
|
+
const e = An(Rt);
|
|
1651
1652
|
if (e === void 0) throw new Error("useDayPicker() must be used within a custom component.");
|
|
1652
1653
|
return e;
|
|
1653
1654
|
}
|
|
1654
|
-
function
|
|
1655
|
+
function No(e) {
|
|
1655
1656
|
const { options: t, className: n, ...r } = e, { classNames: o, components: a, styles: s } = _e(), i = [o[h.Dropdown], n].join(" "), u = t?.find(({ value: l }) => l === r.value);
|
|
1656
1657
|
return m.createElement("span", {
|
|
1657
1658
|
"data-disabled": r.disabled,
|
|
@@ -1675,31 +1676,31 @@ function So(e) {
|
|
|
1675
1676
|
style: s?.[h.Chevron]
|
|
1676
1677
|
})));
|
|
1677
1678
|
}
|
|
1678
|
-
function No(e) {
|
|
1679
|
-
return m.createElement("div", { ...e });
|
|
1680
|
-
}
|
|
1681
1679
|
function Co(e) {
|
|
1682
1680
|
return m.createElement("div", { ...e });
|
|
1683
1681
|
}
|
|
1684
1682
|
function xo(e) {
|
|
1683
|
+
return m.createElement("div", { ...e });
|
|
1684
|
+
}
|
|
1685
|
+
function To(e) {
|
|
1685
1686
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1686
1687
|
return m.createElement("div", { ...r }, e.children);
|
|
1687
1688
|
}
|
|
1688
|
-
function
|
|
1689
|
+
function Yo(e) {
|
|
1689
1690
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1690
1691
|
return m.createElement("div", { ...r });
|
|
1691
1692
|
}
|
|
1692
|
-
function
|
|
1693
|
+
function _o(e) {
|
|
1693
1694
|
return m.createElement("table", { ...e });
|
|
1694
1695
|
}
|
|
1695
|
-
function
|
|
1696
|
+
function Po(e) {
|
|
1696
1697
|
return m.createElement("div", { ...e });
|
|
1697
1698
|
}
|
|
1698
|
-
function
|
|
1699
|
+
function Eo(e) {
|
|
1699
1700
|
const { components: t } = _e();
|
|
1700
1701
|
return m.createElement(t.Dropdown, { ...e });
|
|
1701
1702
|
}
|
|
1702
|
-
function
|
|
1703
|
+
function Fo(e) {
|
|
1703
1704
|
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...a } = e, { components: s, classNames: i, styles: u, labels: { labelPrevious: l, labelNext: d } } = _e(), c = G((g) => {
|
|
1704
1705
|
o && n?.(g);
|
|
1705
1706
|
}, [o, n]), w = G((g) => {
|
|
@@ -1733,97 +1734,97 @@ function Eo(e) {
|
|
|
1733
1734
|
style: u?.[h.Chevron]
|
|
1734
1735
|
})));
|
|
1735
1736
|
}
|
|
1736
|
-
function
|
|
1737
|
+
function Bo(e) {
|
|
1737
1738
|
return m.createElement("button", { ...e });
|
|
1738
1739
|
}
|
|
1739
|
-
function
|
|
1740
|
+
function Io(e) {
|
|
1740
1741
|
return m.createElement("option", { ...e });
|
|
1741
1742
|
}
|
|
1742
|
-
function
|
|
1743
|
+
function Ho(e) {
|
|
1743
1744
|
return m.createElement("button", { ...e });
|
|
1744
1745
|
}
|
|
1745
|
-
function
|
|
1746
|
+
function Ao(e) {
|
|
1746
1747
|
const { rootRef: t, ...n } = e;
|
|
1747
1748
|
return m.createElement("div", {
|
|
1748
1749
|
...n,
|
|
1749
1750
|
ref: t
|
|
1750
1751
|
});
|
|
1751
1752
|
}
|
|
1752
|
-
function
|
|
1753
|
+
function qo(e) {
|
|
1753
1754
|
return m.createElement("select", { ...e });
|
|
1754
1755
|
}
|
|
1755
|
-
function
|
|
1756
|
+
function zo(e) {
|
|
1756
1757
|
const { week: t, ...n } = e;
|
|
1757
1758
|
return m.createElement("tr", { ...n });
|
|
1758
1759
|
}
|
|
1759
|
-
function
|
|
1760
|
+
function jo(e) {
|
|
1760
1761
|
return m.createElement("th", { ...e });
|
|
1761
1762
|
}
|
|
1762
|
-
function
|
|
1763
|
+
function Go(e) {
|
|
1763
1764
|
return m.createElement("thead", { "aria-hidden": !0 }, m.createElement("tr", { ...e }));
|
|
1764
1765
|
}
|
|
1765
|
-
function
|
|
1766
|
+
function $o(e) {
|
|
1766
1767
|
const { week: t, ...n } = e;
|
|
1767
1768
|
return m.createElement("th", { ...n });
|
|
1768
1769
|
}
|
|
1769
|
-
function
|
|
1770
|
+
function Ro(e) {
|
|
1770
1771
|
return m.createElement("th", { ...e });
|
|
1771
1772
|
}
|
|
1772
|
-
function
|
|
1773
|
+
function Zo(e) {
|
|
1773
1774
|
return m.createElement("tbody", { ...e });
|
|
1774
1775
|
}
|
|
1775
|
-
function
|
|
1776
|
+
function Uo(e) {
|
|
1776
1777
|
const { components: t } = _e();
|
|
1777
1778
|
return m.createElement(t.Dropdown, { ...e });
|
|
1778
1779
|
}
|
|
1779
|
-
var
|
|
1780
|
-
CaptionLabel: () =>
|
|
1781
|
-
Chevron: () =>
|
|
1782
|
-
Day: () =>
|
|
1783
|
-
DayButton: () =>
|
|
1784
|
-
Dropdown: () =>
|
|
1785
|
-
DropdownNav: () =>
|
|
1786
|
-
Footer: () =>
|
|
1787
|
-
Month: () =>
|
|
1788
|
-
MonthCaption: () =>
|
|
1789
|
-
MonthGrid: () =>
|
|
1790
|
-
Months: () =>
|
|
1791
|
-
MonthsDropdown: () =>
|
|
1792
|
-
Nav: () =>
|
|
1793
|
-
NextMonthButton: () =>
|
|
1794
|
-
Option: () =>
|
|
1795
|
-
PreviousMonthButton: () =>
|
|
1796
|
-
Root: () =>
|
|
1797
|
-
Select: () =>
|
|
1798
|
-
Week: () =>
|
|
1799
|
-
WeekNumber: () =>
|
|
1800
|
-
WeekNumberHeader: () =>
|
|
1801
|
-
Weekday: () =>
|
|
1802
|
-
Weekdays: () =>
|
|
1803
|
-
Weeks: () =>
|
|
1804
|
-
YearsDropdown: () =>
|
|
1780
|
+
var Qo = /* @__PURE__ */ Je({
|
|
1781
|
+
CaptionLabel: () => ko,
|
|
1782
|
+
Chevron: () => Oo,
|
|
1783
|
+
Day: () => Wo,
|
|
1784
|
+
DayButton: () => So,
|
|
1785
|
+
Dropdown: () => No,
|
|
1786
|
+
DropdownNav: () => Co,
|
|
1787
|
+
Footer: () => xo,
|
|
1788
|
+
Month: () => To,
|
|
1789
|
+
MonthCaption: () => Yo,
|
|
1790
|
+
MonthGrid: () => _o,
|
|
1791
|
+
Months: () => Po,
|
|
1792
|
+
MonthsDropdown: () => Eo,
|
|
1793
|
+
Nav: () => Fo,
|
|
1794
|
+
NextMonthButton: () => Bo,
|
|
1795
|
+
Option: () => Io,
|
|
1796
|
+
PreviousMonthButton: () => Ho,
|
|
1797
|
+
Root: () => Ao,
|
|
1798
|
+
Select: () => qo,
|
|
1799
|
+
Week: () => zo,
|
|
1800
|
+
WeekNumber: () => $o,
|
|
1801
|
+
WeekNumberHeader: () => Ro,
|
|
1802
|
+
Weekday: () => jo,
|
|
1803
|
+
Weekdays: () => Go,
|
|
1804
|
+
Weeks: () => Zo,
|
|
1805
|
+
YearsDropdown: () => Uo
|
|
1805
1806
|
});
|
|
1806
1807
|
function re(e, t, n = !1, r = J) {
|
|
1807
1808
|
let { from: o, to: a } = e;
|
|
1808
1809
|
const { differenceInCalendarDays: s, isSameDay: i } = r;
|
|
1809
1810
|
return o && a ? (s(a, o) < 0 && ([o, a] = [a, o]), s(t, o) >= (n ? 1 : 0) && s(a, t) >= (n ? 1 : 0)) : !n && a ? i(a, t) : !n && o ? i(o, t) : !1;
|
|
1810
1811
|
}
|
|
1811
|
-
function
|
|
1812
|
+
function nt(e) {
|
|
1812
1813
|
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1813
1814
|
}
|
|
1814
1815
|
function Pe(e) {
|
|
1815
1816
|
return !!(e && typeof e == "object" && "from" in e);
|
|
1816
1817
|
}
|
|
1817
|
-
function
|
|
1818
|
+
function rt(e) {
|
|
1818
1819
|
return !!(e && typeof e == "object" && "after" in e);
|
|
1819
1820
|
}
|
|
1820
|
-
function
|
|
1821
|
+
function ot(e) {
|
|
1821
1822
|
return !!(e && typeof e == "object" && "before" in e);
|
|
1822
1823
|
}
|
|
1823
|
-
function
|
|
1824
|
+
function Zt(e) {
|
|
1824
1825
|
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
1825
1826
|
}
|
|
1826
|
-
function
|
|
1827
|
+
function Ut(e, t) {
|
|
1827
1828
|
return Array.isArray(e) && e.every(t.isDate);
|
|
1828
1829
|
}
|
|
1829
1830
|
function oe(e, t, n = J) {
|
|
@@ -1831,18 +1832,18 @@ function oe(e, t, n = J) {
|
|
|
1831
1832
|
return r.some((i) => {
|
|
1832
1833
|
if (typeof i == "boolean") return i;
|
|
1833
1834
|
if (n.isDate(i)) return o(e, i);
|
|
1834
|
-
if (
|
|
1835
|
+
if (Ut(i, n)) return i.some((u) => o(e, u));
|
|
1835
1836
|
if (Pe(i)) return re(i, e, !1, n);
|
|
1836
|
-
if (
|
|
1837
|
+
if (Zt(i))
|
|
1837
1838
|
return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
|
|
1838
|
-
if (
|
|
1839
|
+
if (nt(i)) {
|
|
1839
1840
|
const u = a(i.before, e), l = a(i.after, e), d = u > 0, c = l < 0;
|
|
1840
1841
|
return s(i.before, i.after) ? c && d : d || c;
|
|
1841
1842
|
}
|
|
1842
|
-
return
|
|
1843
|
+
return rt(i) ? a(e, i.after) > 0 : ot(i) ? a(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
|
|
1843
1844
|
});
|
|
1844
1845
|
}
|
|
1845
|
-
function
|
|
1846
|
+
function Vo(e, t, n, r, o) {
|
|
1846
1847
|
const { disabled: a, hidden: s, modifiers: i, showOutsideDays: u, broadcastCalendar: l, today: d = o.today() } = t, { isSameDay: c, isSameMonth: w, startOfMonth: g, isBefore: M, endOfMonth: C, isAfter: D } = o, E = n && g(n), b = r && C(r), v = {
|
|
1847
1848
|
[B.focused]: [],
|
|
1848
1849
|
[B.outside]: [],
|
|
@@ -1873,16 +1874,16 @@ function Qo(e, t, n, r, o) {
|
|
|
1873
1874
|
};
|
|
1874
1875
|
};
|
|
1875
1876
|
}
|
|
1876
|
-
function
|
|
1877
|
+
function Ko(e, t, n = {}) {
|
|
1877
1878
|
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [o]) => (n[o] ? r.push(n[o]) : t[B[o]] ? r.push(t[B[o]]) : t[V[o]] && r.push(t[V[o]]), r), [t[h.Day]]);
|
|
1878
1879
|
}
|
|
1879
|
-
function
|
|
1880
|
+
function Xo(e) {
|
|
1880
1881
|
return {
|
|
1881
|
-
...
|
|
1882
|
+
...Qo,
|
|
1882
1883
|
...e
|
|
1883
1884
|
};
|
|
1884
1885
|
}
|
|
1885
|
-
function
|
|
1886
|
+
function Jo(e) {
|
|
1886
1887
|
const t = {
|
|
1887
1888
|
"data-mode": e.mode ?? void 0,
|
|
1888
1889
|
"data-required": "required" in e ? e.required : void 0,
|
|
@@ -1895,7 +1896,7 @@ function Xo(e) {
|
|
|
1895
1896
|
n.startsWith("data-") && (t[n] = r);
|
|
1896
1897
|
}), t;
|
|
1897
1898
|
}
|
|
1898
|
-
function
|
|
1899
|
+
function at() {
|
|
1899
1900
|
const e = {};
|
|
1900
1901
|
for (const t in h) e[h[t]] = `rdp-${h[t]}`;
|
|
1901
1902
|
for (const t in B) e[B[t]] = `rdp-${B[t]}`;
|
|
@@ -1903,110 +1904,110 @@ function ot() {
|
|
|
1903
1904
|
for (const t in z) e[z[t]] = `rdp-${z[t]}`;
|
|
1904
1905
|
return e;
|
|
1905
1906
|
}
|
|
1906
|
-
function
|
|
1907
|
+
function Lo(e, t, n) {
|
|
1907
1908
|
return (n ?? new X(t)).formatMonthYear(e);
|
|
1908
1909
|
}
|
|
1909
|
-
function
|
|
1910
|
+
function ea(e, t, n) {
|
|
1910
1911
|
return (n ?? new X(t)).format(e, "d");
|
|
1911
1912
|
}
|
|
1912
|
-
function
|
|
1913
|
+
function ta(e, t = J) {
|
|
1913
1914
|
return t.format(e, "LLLL");
|
|
1914
1915
|
}
|
|
1915
|
-
function
|
|
1916
|
+
function na(e, t, n) {
|
|
1916
1917
|
return (n ?? new X(t)).format(e, "cccccc");
|
|
1917
1918
|
}
|
|
1918
|
-
function
|
|
1919
|
+
function ra(e, t = J) {
|
|
1919
1920
|
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
1920
1921
|
}
|
|
1921
|
-
function
|
|
1922
|
+
function oa() {
|
|
1922
1923
|
return "";
|
|
1923
1924
|
}
|
|
1924
|
-
function
|
|
1925
|
+
function aa(e, t = J) {
|
|
1925
1926
|
return t.format(e, "yyyy");
|
|
1926
1927
|
}
|
|
1927
|
-
var
|
|
1928
|
-
formatCaption: () =>
|
|
1929
|
-
formatDay: () =>
|
|
1930
|
-
formatMonthDropdown: () =>
|
|
1931
|
-
formatWeekNumber: () =>
|
|
1932
|
-
formatWeekNumberHeader: () =>
|
|
1933
|
-
formatWeekdayName: () =>
|
|
1934
|
-
formatYearDropdown: () =>
|
|
1928
|
+
var sa = /* @__PURE__ */ Je({
|
|
1929
|
+
formatCaption: () => Lo,
|
|
1930
|
+
formatDay: () => ea,
|
|
1931
|
+
formatMonthDropdown: () => ta,
|
|
1932
|
+
formatWeekNumber: () => ra,
|
|
1933
|
+
formatWeekNumberHeader: () => oa,
|
|
1934
|
+
formatWeekdayName: () => na,
|
|
1935
|
+
formatYearDropdown: () => aa
|
|
1935
1936
|
});
|
|
1936
|
-
function
|
|
1937
|
+
function ia(e) {
|
|
1937
1938
|
return {
|
|
1938
|
-
...
|
|
1939
|
+
...sa,
|
|
1939
1940
|
...e
|
|
1940
1941
|
};
|
|
1941
1942
|
}
|
|
1942
|
-
function
|
|
1943
|
+
function Qt(e, t, n, r) {
|
|
1943
1944
|
let o = (r ?? new X(n)).format(e, "PPPP");
|
|
1944
1945
|
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
1945
1946
|
}
|
|
1946
|
-
function
|
|
1947
|
+
function Vt(e, t, n) {
|
|
1947
1948
|
return (n ?? new X(t)).formatMonthYear(e);
|
|
1948
1949
|
}
|
|
1949
|
-
function
|
|
1950
|
+
function Kt(e, t, n, r) {
|
|
1950
1951
|
let o = (r ?? new X(n)).format(e, "PPPP");
|
|
1951
1952
|
return t?.today && (o = `Today, ${o}`), o;
|
|
1952
1953
|
}
|
|
1953
|
-
function
|
|
1954
|
+
function Xt(e) {
|
|
1954
1955
|
return "Choose the Month";
|
|
1955
1956
|
}
|
|
1956
|
-
function
|
|
1957
|
+
function Jt() {
|
|
1957
1958
|
return "";
|
|
1958
1959
|
}
|
|
1959
|
-
var
|
|
1960
|
-
function
|
|
1961
|
-
return
|
|
1960
|
+
var ua = "Go to the Next Month";
|
|
1961
|
+
function Lt(e, t) {
|
|
1962
|
+
return ua;
|
|
1962
1963
|
}
|
|
1963
|
-
function
|
|
1964
|
+
function en(e) {
|
|
1964
1965
|
return "Go to the Previous Month";
|
|
1965
1966
|
}
|
|
1966
|
-
function
|
|
1967
|
+
function tn(e, t, n) {
|
|
1967
1968
|
return (n ?? new X(t)).format(e, "cccc");
|
|
1968
1969
|
}
|
|
1969
|
-
function
|
|
1970
|
+
function nn(e, t) {
|
|
1970
1971
|
return `Week ${e}`;
|
|
1971
1972
|
}
|
|
1972
|
-
function
|
|
1973
|
+
function rn(e) {
|
|
1973
1974
|
return "Week Number";
|
|
1974
1975
|
}
|
|
1975
|
-
function
|
|
1976
|
+
function on(e) {
|
|
1976
1977
|
return "Choose the Year";
|
|
1977
1978
|
}
|
|
1978
|
-
var
|
|
1979
|
-
labelDayButton: () =>
|
|
1980
|
-
labelGrid: () =>
|
|
1981
|
-
labelGridcell: () =>
|
|
1982
|
-
labelMonthDropdown: () =>
|
|
1983
|
-
labelNav: () =>
|
|
1984
|
-
labelNext: () =>
|
|
1985
|
-
labelPrevious: () =>
|
|
1986
|
-
labelWeekNumber: () =>
|
|
1987
|
-
labelWeekNumberHeader: () =>
|
|
1988
|
-
labelWeekday: () =>
|
|
1989
|
-
labelYearDropdown: () =>
|
|
1979
|
+
var la = /* @__PURE__ */ Je({
|
|
1980
|
+
labelDayButton: () => Qt,
|
|
1981
|
+
labelGrid: () => Vt,
|
|
1982
|
+
labelGridcell: () => Kt,
|
|
1983
|
+
labelMonthDropdown: () => Xt,
|
|
1984
|
+
labelNav: () => Jt,
|
|
1985
|
+
labelNext: () => Lt,
|
|
1986
|
+
labelPrevious: () => en,
|
|
1987
|
+
labelWeekNumber: () => nn,
|
|
1988
|
+
labelWeekNumberHeader: () => rn,
|
|
1989
|
+
labelWeekday: () => tn,
|
|
1990
|
+
labelYearDropdown: () => on
|
|
1990
1991
|
}), Q = (e, t, n) => t || (n ? typeof n == "function" ? n : (...r) => n : e);
|
|
1991
|
-
function
|
|
1992
|
+
function ca(e, t) {
|
|
1992
1993
|
const n = t.locale?.labels ?? {};
|
|
1993
1994
|
return {
|
|
1994
|
-
...
|
|
1995
|
+
...la,
|
|
1995
1996
|
...e ?? {},
|
|
1996
|
-
labelDayButton: Q(
|
|
1997
|
-
labelMonthDropdown: Q(
|
|
1998
|
-
labelNext: Q(
|
|
1999
|
-
labelPrevious: Q(
|
|
2000
|
-
labelWeekNumber: Q(
|
|
2001
|
-
labelYearDropdown: Q(
|
|
2002
|
-
labelGrid: Q(
|
|
2003
|
-
labelGridcell: Q(
|
|
2004
|
-
labelNav: Q(
|
|
2005
|
-
labelWeekNumberHeader: Q(
|
|
2006
|
-
labelWeekday: Q(
|
|
1997
|
+
labelDayButton: Q(Qt, e?.labelDayButton, n.labelDayButton),
|
|
1998
|
+
labelMonthDropdown: Q(Xt, e?.labelMonthDropdown, n.labelMonthDropdown),
|
|
1999
|
+
labelNext: Q(Lt, e?.labelNext, n.labelNext),
|
|
2000
|
+
labelPrevious: Q(en, e?.labelPrevious, n.labelPrevious),
|
|
2001
|
+
labelWeekNumber: Q(nn, e?.labelWeekNumber, n.labelWeekNumber),
|
|
2002
|
+
labelYearDropdown: Q(on, e?.labelYearDropdown, n.labelYearDropdown),
|
|
2003
|
+
labelGrid: Q(Vt, e?.labelGrid, n.labelGrid),
|
|
2004
|
+
labelGridcell: Q(Kt, e?.labelGridcell, n.labelGridcell),
|
|
2005
|
+
labelNav: Q(Jt, e?.labelNav, n.labelNav),
|
|
2006
|
+
labelWeekNumberHeader: Q(rn, e?.labelWeekNumberHeader, n.labelWeekNumberHeader),
|
|
2007
|
+
labelWeekday: Q(tn, e?.labelWeekday, n.labelWeekday)
|
|
2007
2008
|
};
|
|
2008
2009
|
}
|
|
2009
|
-
function
|
|
2010
|
+
function da(e, t, n, r, o) {
|
|
2010
2011
|
const { startOfMonth: a, startOfYear: s, endOfYear: i, eachMonthOfInterval: u, getMonth: l } = o;
|
|
2011
2012
|
return u({
|
|
2012
2013
|
start: s(e),
|
|
@@ -2020,7 +2021,7 @@ function ca(e, t, n, r, o) {
|
|
|
2020
2021
|
};
|
|
2021
2022
|
});
|
|
2022
2023
|
}
|
|
2023
|
-
function
|
|
2024
|
+
function fa(e, t = {}, n = {}) {
|
|
2024
2025
|
let r = { ...t?.[h.Day] };
|
|
2025
2026
|
return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
|
|
2026
2027
|
r = {
|
|
@@ -2029,7 +2030,7 @@ function da(e, t = {}, n = {}) {
|
|
|
2029
2030
|
};
|
|
2030
2031
|
}), r;
|
|
2031
2032
|
}
|
|
2032
|
-
function
|
|
2033
|
+
function ha(e, t, n, r) {
|
|
2033
2034
|
const o = r ?? e.today(), a = n ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), s = [];
|
|
2034
2035
|
for (let i = 0; i < 7; i++) {
|
|
2035
2036
|
const u = e.addDays(a, i);
|
|
@@ -2037,7 +2038,7 @@ function fa(e, t, n, r) {
|
|
|
2037
2038
|
}
|
|
2038
2039
|
return s;
|
|
2039
2040
|
}
|
|
2040
|
-
function
|
|
2041
|
+
function ma(e, t, n, r, o = !1) {
|
|
2041
2042
|
if (!e || !t) return;
|
|
2042
2043
|
const { startOfYear: a, endOfYear: s, eachYearOfInterval: i, getYear: u } = r, l = i({
|
|
2043
2044
|
start: a(e),
|
|
@@ -2052,7 +2053,7 @@ function ha(e, t, n, r, o = !1) {
|
|
|
2052
2053
|
};
|
|
2053
2054
|
});
|
|
2054
2055
|
}
|
|
2055
|
-
function
|
|
2056
|
+
function ya(e, t = {}) {
|
|
2056
2057
|
const { weekStartsOn: n, locale: r } = t, o = n ?? r?.options?.weekStartsOn ?? 0, a = (i) => {
|
|
2057
2058
|
const u = typeof i == "number" || typeof i == "string" ? new Date(i) : i;
|
|
2058
2059
|
return new $(u.getFullYear(), u.getMonth(), u.getDate(), 12, 0, 0, e);
|
|
@@ -2124,60 +2125,60 @@ function ma(e, t = {}) {
|
|
|
2124
2125
|
d.push(new $(c, e)), c.setFullYear(c.getFullYear() + 1, 0, 1);
|
|
2125
2126
|
return d;
|
|
2126
2127
|
},
|
|
2127
|
-
getWeek: (i, u) =>
|
|
2128
|
+
getWeek: (i, u) => tt(s(i), {
|
|
2128
2129
|
weekStartsOn: u?.weekStartsOn ?? o,
|
|
2129
2130
|
firstWeekContainsDate: u?.firstWeekContainsDate ?? r?.options?.firstWeekContainsDate ?? 1
|
|
2130
2131
|
}),
|
|
2131
|
-
getISOWeek: (i) =>
|
|
2132
|
-
differenceInCalendarDays: (i, u) =>
|
|
2133
|
-
differenceInCalendarMonths: (i, u) =>
|
|
2132
|
+
getISOWeek: (i) => et(s(i)),
|
|
2133
|
+
differenceInCalendarDays: (i, u) => Le(s(i), s(u)),
|
|
2134
|
+
differenceInCalendarMonths: (i, u) => Bt(s(i), s(u))
|
|
2134
2135
|
};
|
|
2135
2136
|
}
|
|
2136
|
-
var Oe = (e) => e instanceof HTMLElement ? e : null,
|
|
2137
|
-
function
|
|
2137
|
+
var Oe = (e) => e instanceof HTMLElement ? e : null, Ze = (e) => [...e.querySelectorAll("[data-animated-month]") ?? []], ga = (e) => Oe(e.querySelector("[data-animated-month]")), Ue = (e) => Oe(e.querySelector("[data-animated-caption]")), Qe = (e) => Oe(e.querySelector("[data-animated-weeks]")), va = (e) => Oe(e.querySelector("[data-animated-nav]")), ba = (e) => Oe(e.querySelector("[data-animated-weekdays]"));
|
|
2138
|
+
function wa(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
2138
2139
|
const s = Te(null), i = Te(r), u = Te(!1);
|
|
2139
|
-
|
|
2140
|
+
zn(() => {
|
|
2140
2141
|
const l = i.current;
|
|
2141
2142
|
if (i.current = r, !t || !e.current || !(e.current instanceof HTMLElement) || r.length === 0 || l.length === 0 || r.length !== l.length) return;
|
|
2142
2143
|
const d = a.isSameMonth(r[0].date, l[0].date), c = a.isAfter(r[0].date, l[0].date), w = c ? n[z.caption_after_enter] : n[z.caption_before_enter], g = c ? n[z.weeks_after_enter] : n[z.weeks_before_enter], M = s.current, C = e.current.cloneNode(!0);
|
|
2143
|
-
if (C instanceof HTMLElement ? (
|
|
2144
|
+
if (C instanceof HTMLElement ? (Ze(C).forEach((b) => {
|
|
2144
2145
|
if (!(b instanceof HTMLElement)) return;
|
|
2145
|
-
const v =
|
|
2146
|
+
const v = ga(b);
|
|
2146
2147
|
v && b.contains(v) && b.removeChild(v);
|
|
2147
|
-
const y =
|
|
2148
|
+
const y = Ue(b);
|
|
2148
2149
|
y && y.classList.remove(w);
|
|
2149
|
-
const O =
|
|
2150
|
+
const O = Qe(b);
|
|
2150
2151
|
O && O.classList.remove(g);
|
|
2151
2152
|
}), s.current = C) : s.current = null, u.current || d || o) return;
|
|
2152
|
-
const D = M instanceof HTMLElement ?
|
|
2153
|
+
const D = M instanceof HTMLElement ? Ze(M) : [], E = Ze(e.current);
|
|
2153
2154
|
if (E?.every((b) => b instanceof HTMLElement) && D?.every((b) => b instanceof HTMLElement)) {
|
|
2154
2155
|
u.current = !0;
|
|
2155
2156
|
const b = [];
|
|
2156
2157
|
e.current.style.isolation = "isolate";
|
|
2157
|
-
const v =
|
|
2158
|
+
const v = va(e.current);
|
|
2158
2159
|
v && (v.style.zIndex = "1"), E.forEach((y, O) => {
|
|
2159
2160
|
const f = D[O];
|
|
2160
2161
|
if (!f) return;
|
|
2161
2162
|
y.style.position = "relative", y.style.overflow = "hidden";
|
|
2162
|
-
const x =
|
|
2163
|
+
const x = Ue(y);
|
|
2163
2164
|
x && x.classList.add(w);
|
|
2164
|
-
const T =
|
|
2165
|
+
const T = Qe(y);
|
|
2165
2166
|
T && T.classList.add(g);
|
|
2166
2167
|
const F = () => {
|
|
2167
2168
|
u.current = !1, e.current && (e.current.style.isolation = ""), v && (v.style.zIndex = ""), x && x.classList.remove(w), T && T.classList.remove(g), y.style.position = "", y.style.overflow = "", y.contains(f) && y.removeChild(f);
|
|
2168
2169
|
};
|
|
2169
2170
|
b.push(F), f.style.pointerEvents = "none", f.style.position = "absolute", f.style.overflow = "hidden", f.setAttribute("aria-hidden", "true");
|
|
2170
|
-
const j =
|
|
2171
|
+
const j = ba(f);
|
|
2171
2172
|
j && (j.style.opacity = "0");
|
|
2172
|
-
const A =
|
|
2173
|
+
const A = Ue(f);
|
|
2173
2174
|
A && (A.classList.add(c ? n[z.caption_before_exit] : n[z.caption_after_exit]), A.addEventListener("animationend", F));
|
|
2174
|
-
const R =
|
|
2175
|
+
const R = Qe(f);
|
|
2175
2176
|
R && R.classList.add(c ? n[z.weeks_before_exit] : n[z.weeks_after_exit]), y.insertBefore(f, y.firstChild);
|
|
2176
2177
|
});
|
|
2177
2178
|
}
|
|
2178
2179
|
});
|
|
2179
2180
|
}
|
|
2180
|
-
function
|
|
2181
|
+
function pa(e, t, n, r) {
|
|
2181
2182
|
const o = e[0], a = e[e.length - 1], { ISOWeek: s, fixedWeeks: i, broadcastCalendar: u } = n ?? {}, { addDays: l, differenceInCalendarDays: d, differenceInCalendarMonths: c, endOfBroadcastWeek: w, endOfISOWeek: g, endOfMonth: M, endOfWeek: C, isAfter: D, startOfBroadcastWeek: E, startOfISOWeek: b, startOfWeek: v } = r, y = u ? E(o, r) : s ? b(o) : v(o), O = u ? w(a) : s ? g(M(a)) : C(M(a)), f = t && (u ? w(t) : s ? g(t) : C(t)), x = d(f && D(O, f) ? f : O, y), T = c(a, o) + 1, F = [];
|
|
2182
2183
|
for (let A = 0; A <= x; A++) {
|
|
2183
2184
|
const R = l(y, A);
|
|
@@ -2193,14 +2194,14 @@ function wa(e, t, n, r) {
|
|
|
2193
2194
|
}
|
|
2194
2195
|
return F;
|
|
2195
2196
|
}
|
|
2196
|
-
function
|
|
2197
|
+
function Da(e) {
|
|
2197
2198
|
const t = [];
|
|
2198
2199
|
return e.reduce((n, r) => {
|
|
2199
2200
|
const o = r.weeks.reduce((a, s) => a.concat(s.days.slice()), t.slice());
|
|
2200
2201
|
return n.concat(o.slice());
|
|
2201
2202
|
}, t.slice());
|
|
2202
2203
|
}
|
|
2203
|
-
function
|
|
2204
|
+
function Ma(e, t, n, r) {
|
|
2204
2205
|
const { numberOfMonths: o = 1 } = n, a = [];
|
|
2205
2206
|
for (let s = 0; s < o; s++) {
|
|
2206
2207
|
const i = r.addMonths(e, s);
|
|
@@ -2209,13 +2210,13 @@ function Da(e, t, n, r) {
|
|
|
2209
2210
|
}
|
|
2210
2211
|
return a;
|
|
2211
2212
|
}
|
|
2212
|
-
function
|
|
2213
|
+
function Wt(e, t, n, r) {
|
|
2213
2214
|
const { month: o, defaultMonth: a, today: s = r.today(), numberOfMonths: i = 1 } = e;
|
|
2214
2215
|
let u = o || a || s;
|
|
2215
2216
|
const { differenceInCalendarMonths: l, addMonths: d, startOfMonth: c } = r;
|
|
2216
2217
|
return n && l(n, u) < i - 1 && (u = d(n, -1 * (i - 1))), t && l(u, t) < 0 && (u = t), c(u);
|
|
2217
2218
|
}
|
|
2218
|
-
function
|
|
2219
|
+
function ka(e, t, n, r) {
|
|
2219
2220
|
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: s, endOfMonth: i, endOfWeek: u, getISOWeek: l, getWeek: d, startOfBroadcastWeek: c, startOfISOWeek: w, startOfWeek: g } = r, M = e.reduce((C, D) => {
|
|
2220
2221
|
const E = n.broadcastCalendar ? c(D, r) : n.ISOWeek ? w(D) : g(D), b = n.broadcastCalendar ? a(D) : n.ISOWeek ? s(i(D)) : u(i(D)), v = t.filter((f) => f >= E && f <= b), y = n.broadcastCalendar ? 35 : 42;
|
|
2221
2222
|
if (n.fixedWeeks && v.length < y) {
|
|
@@ -2225,47 +2226,47 @@ function Ma(e, t, n, r) {
|
|
|
2225
2226
|
});
|
|
2226
2227
|
v.push(...f);
|
|
2227
2228
|
}
|
|
2228
|
-
const O = new
|
|
2229
|
-
const T = n.ISOWeek ? l(x) : d(x), F = f.find((A) => A.weekNumber === T), j = new
|
|
2230
|
-
return F ? F.days.push(j) : f.push(new
|
|
2229
|
+
const O = new Do(D, v.reduce((f, x) => {
|
|
2230
|
+
const T = n.ISOWeek ? l(x) : d(x), F = f.find((A) => A.weekNumber === T), j = new $t(x, D, r);
|
|
2231
|
+
return F ? F.days.push(j) : f.push(new Mo(T, [j])), f;
|
|
2231
2232
|
}, []));
|
|
2232
2233
|
return C.push(O), C;
|
|
2233
2234
|
}, []);
|
|
2234
2235
|
return n.reverseMonths ? M.reverse() : M;
|
|
2235
2236
|
}
|
|
2236
|
-
function
|
|
2237
|
+
function Oa(e, t) {
|
|
2237
2238
|
let { startMonth: n, endMonth: r } = e;
|
|
2238
2239
|
const { startOfYear: o, startOfDay: a, startOfMonth: s, endOfMonth: i, addYears: u, endOfYear: l, today: d } = t, c = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2239
2240
|
return n ? n = s(n) : !n && c && (n = o(u(e.today ?? d(), -100))), r ? r = i(r) : !r && c && (r = l(e.today ?? d())), [n && a(n), r && a(r)];
|
|
2240
2241
|
}
|
|
2241
|
-
function
|
|
2242
|
+
function Wa(e, t, n, r) {
|
|
2242
2243
|
if (n.disableNavigation) return;
|
|
2243
2244
|
const { pagedNavigation: o, numberOfMonths: a = 1 } = n, { startOfMonth: s, addMonths: i, differenceInCalendarMonths: u } = r, l = o ? a : 1, d = s(e);
|
|
2244
2245
|
if (!t) return i(d, l);
|
|
2245
2246
|
if (!(u(t, e) < a))
|
|
2246
2247
|
return i(d, l);
|
|
2247
2248
|
}
|
|
2248
|
-
function
|
|
2249
|
+
function Sa(e, t, n, r) {
|
|
2249
2250
|
if (n.disableNavigation) return;
|
|
2250
2251
|
const { pagedNavigation: o, numberOfMonths: a } = n, { startOfMonth: s, addMonths: i, differenceInCalendarMonths: u } = r, l = o ? a ?? 1 : 1, d = s(e);
|
|
2251
2252
|
if (!t) return i(d, -l);
|
|
2252
2253
|
if (!(u(d, t) <= 0))
|
|
2253
2254
|
return i(d, -l);
|
|
2254
2255
|
}
|
|
2255
|
-
function
|
|
2256
|
+
function Na(e) {
|
|
2256
2257
|
return e.reduce((t, n) => t.concat(n.weeks.slice()), [].slice());
|
|
2257
2258
|
}
|
|
2258
2259
|
function Ee(e, t) {
|
|
2259
|
-
const [n, r] =
|
|
2260
|
+
const [n, r] = Ke(e);
|
|
2260
2261
|
return [t === void 0 ? n : t, r];
|
|
2261
2262
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const [n, r] =
|
|
2264
|
-
|
|
2265
|
-
u(
|
|
2263
|
+
function Ca(e, t) {
|
|
2264
|
+
const [n, r] = Oa(e, t), { startOfMonth: o, endOfMonth: a } = t, s = Wt(e, n, r, t), [i, u] = Ee(s, e.month ? s : void 0);
|
|
2265
|
+
qn(() => {
|
|
2266
|
+
u(Wt(e, n, r, t));
|
|
2266
2267
|
}, [e.timeZone]);
|
|
2267
2268
|
const { months: l, weeks: d, days: c, previousMonth: w, nextMonth: g } = xe(() => {
|
|
2268
|
-
const v =
|
|
2269
|
+
const v = Ma(i, r, { numberOfMonths: e.numberOfMonths }, t), y = ka(v, pa(v, e.endMonth ? a(e.endMonth) : void 0, {
|
|
2269
2270
|
ISOWeek: e.ISOWeek,
|
|
2270
2271
|
fixedWeeks: e.fixedWeeks,
|
|
2271
2272
|
broadcastCalendar: e.broadcastCalendar
|
|
@@ -2277,10 +2278,10 @@ function Na(e, t) {
|
|
|
2277
2278
|
}, t);
|
|
2278
2279
|
return {
|
|
2279
2280
|
months: y,
|
|
2280
|
-
weeks:
|
|
2281
|
-
days:
|
|
2282
|
-
previousMonth:
|
|
2283
|
-
nextMonth:
|
|
2281
|
+
weeks: Na(y),
|
|
2282
|
+
days: Da(y),
|
|
2283
|
+
previousMonth: Sa(i, n, e, t),
|
|
2284
|
+
nextMonth: Wa(i, r, e, t)
|
|
2284
2285
|
};
|
|
2285
2286
|
}, [
|
|
2286
2287
|
t,
|
|
@@ -2318,18 +2319,18 @@ var K;
|
|
|
2318
2319
|
(function(e) {
|
|
2319
2320
|
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
2320
2321
|
})(K || (K = {}));
|
|
2321
|
-
function
|
|
2322
|
+
function St(e) {
|
|
2322
2323
|
return !e[B.disabled] && !e[B.hidden] && !e[B.outside];
|
|
2323
2324
|
}
|
|
2324
|
-
function
|
|
2325
|
+
function xa(e, t, n, r) {
|
|
2325
2326
|
let o, a = -1;
|
|
2326
2327
|
for (const s of e) {
|
|
2327
2328
|
const i = t(s);
|
|
2328
|
-
|
|
2329
|
+
St(i) && (i[B.focused] && a < K.FocusedModifier ? (o = s, a = K.FocusedModifier) : r?.isEqualTo(s) && a < K.LastFocused ? (o = s, a = K.LastFocused) : n(s.date) && a < K.Selected ? (o = s, a = K.Selected) : i[B.today] && a < K.Today && (o = s, a = K.Today));
|
|
2329
2330
|
}
|
|
2330
|
-
return o || (o = e.find((s) =>
|
|
2331
|
+
return o || (o = e.find((s) => St(t(s)))), o;
|
|
2331
2332
|
}
|
|
2332
|
-
function
|
|
2333
|
+
function Ta(e, t, n, r, o, a, s) {
|
|
2333
2334
|
const { ISOWeek: i, broadcastCalendar: u } = a, { addDays: l, addMonths: d, addWeeks: c, addYears: w, endOfBroadcastWeek: g, endOfISOWeek: M, endOfWeek: C, max: D, min: E, startOfBroadcastWeek: b, startOfISOWeek: v, startOfWeek: y } = s;
|
|
2334
2335
|
let O = {
|
|
2335
2336
|
day: l,
|
|
@@ -2341,13 +2342,13 @@ function xa(e, t, n, r, o, a, s) {
|
|
|
2341
2342
|
}[e](n, t === "after" ? 1 : -1);
|
|
2342
2343
|
return t === "before" && r ? O = D([r, O]) : t === "after" && o && (O = E([o, O])), O;
|
|
2343
2344
|
}
|
|
2344
|
-
function
|
|
2345
|
+
function an(e, t, n, r, o, a, s, i = 0) {
|
|
2345
2346
|
if (i > 365) return;
|
|
2346
|
-
const u =
|
|
2347
|
-
return !l && !d ? c :
|
|
2347
|
+
const u = Ta(e, t, n.date, r, o, a, s), l = !!(a.disabled && oe(u, a.disabled, s)), d = !!(a.hidden && oe(u, a.hidden, s)), c = new $t(u, u, s);
|
|
2348
|
+
return !l && !d ? c : an(e, t, c, r, o, a, s, i + 1);
|
|
2348
2349
|
}
|
|
2349
|
-
function
|
|
2350
|
-
const { autoFocus: a } = e, [s, i] =
|
|
2350
|
+
function Ya(e, t, n, r, o) {
|
|
2351
|
+
const { autoFocus: a } = e, [s, i] = Ke(), u = xa(t.days, n, r || (() => !1), s), [l, d] = Ke(a ? u : void 0);
|
|
2351
2352
|
return {
|
|
2352
2353
|
isFocusTarget: (M) => !!u?.isEqualTo(M),
|
|
2353
2354
|
setFocused: d,
|
|
@@ -2357,12 +2358,12 @@ function Ta(e, t, n, r, o) {
|
|
|
2357
2358
|
},
|
|
2358
2359
|
moveFocus: (M, C) => {
|
|
2359
2360
|
if (!l) return;
|
|
2360
|
-
const D =
|
|
2361
|
+
const D = an(M, C, l, t.navStart, t.navEnd, e, o);
|
|
2361
2362
|
D && (e.disableNavigation && !t.days.some((E) => E.isEqualTo(D)) || (t.goToDay(D), d(D)));
|
|
2362
2363
|
}
|
|
2363
2364
|
};
|
|
2364
2365
|
}
|
|
2365
|
-
function
|
|
2366
|
+
function _a(e, t) {
|
|
2366
2367
|
const { selected: n, required: r, onSelect: o } = e, [a, s] = Ee(n, o ? n : void 0), i = o ? n : a, { isSameDay: u } = t, l = (g) => i?.some((M) => u(M, g)) ?? !1, { min: d, max: c } = e;
|
|
2367
2368
|
return {
|
|
2368
2369
|
selected: i,
|
|
@@ -2377,7 +2378,7 @@ function Ya(e, t) {
|
|
|
2377
2378
|
isSelected: l
|
|
2378
2379
|
};
|
|
2379
2380
|
}
|
|
2380
|
-
function
|
|
2381
|
+
function Pa(e, t, n = 0, r = 0, o = !1, a = J) {
|
|
2381
2382
|
const { from: s, to: i } = t || {}, { isSameDay: u, isAfter: l, isBefore: d } = a;
|
|
2382
2383
|
let c;
|
|
2383
2384
|
if (!s && !i) c = {
|
|
@@ -2434,7 +2435,7 @@ function _a(e, t, n = 0, r = 0, o = !1, a = J) {
|
|
|
2434
2435
|
}
|
|
2435
2436
|
return c;
|
|
2436
2437
|
}
|
|
2437
|
-
function
|
|
2438
|
+
function Ea(e, t, n = J) {
|
|
2438
2439
|
const r = Array.isArray(t) ? t : [t];
|
|
2439
2440
|
let o = e.from;
|
|
2440
2441
|
const a = n.differenceInCalendarDays(e.to, e.from), s = Math.min(a, 6);
|
|
@@ -2444,18 +2445,18 @@ function Pa(e, t, n = J) {
|
|
|
2444
2445
|
}
|
|
2445
2446
|
return !1;
|
|
2446
2447
|
}
|
|
2447
|
-
function
|
|
2448
|
+
function Nt(e, t, n = J) {
|
|
2448
2449
|
return re(e, t.from, !1, n) || re(e, t.to, !1, n) || re(t, e.from, !1, n) || re(t, e.to, !1, n);
|
|
2449
2450
|
}
|
|
2450
|
-
function
|
|
2451
|
+
function Fa(e, t, n = J) {
|
|
2451
2452
|
const r = Array.isArray(t) ? t : [t];
|
|
2452
|
-
if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? re(e, a, !1, n) :
|
|
2453
|
+
if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? re(e, a, !1, n) : Ut(a, n) ? a.some((s) => re(e, s, !1, n)) : Pe(a) ? a.from && a.to ? Nt(e, {
|
|
2453
2454
|
from: a.from,
|
|
2454
2455
|
to: a.to
|
|
2455
|
-
}, n) : !1 :
|
|
2456
|
+
}, n) : !1 : Zt(a) ? Ea(e, a.dayOfWeek, n) : nt(a) ? n.isAfter(a.before, a.after) ? Nt(e, {
|
|
2456
2457
|
from: n.addDays(a.after, 1),
|
|
2457
2458
|
to: n.addDays(a.before, -1)
|
|
2458
|
-
}, n) : oe(e.from, a, n) || oe(e.to, a, n) :
|
|
2459
|
+
}, n) : oe(e.from, a, n) || oe(e.to, a, n) : rt(a) || ot(a) ? oe(e.from, a, n) || oe(e.to, a, n) : !1)) return !0;
|
|
2459
2460
|
const o = r.filter((a) => typeof a == "function");
|
|
2460
2461
|
if (o.length) {
|
|
2461
2462
|
let a = e.from;
|
|
@@ -2467,7 +2468,7 @@ function Ea(e, t, n = J) {
|
|
|
2467
2468
|
}
|
|
2468
2469
|
return !1;
|
|
2469
2470
|
}
|
|
2470
|
-
function
|
|
2471
|
+
function Ba(e, t) {
|
|
2471
2472
|
const { disabled: n, excludeDisabled: r, resetOnSelect: o, selected: a, required: s, onSelect: i } = e, [u, l] = Ee(a, i ? a : void 0), d = i ? a : u;
|
|
2472
2473
|
return {
|
|
2473
2474
|
selected: d,
|
|
@@ -2479,9 +2480,9 @@ function Fa(e, t) {
|
|
|
2479
2480
|
o && (O || !d?.from) ? !s && f ? b = void 0 : b = {
|
|
2480
2481
|
from: g,
|
|
2481
2482
|
to: void 0
|
|
2482
|
-
} : b =
|
|
2483
|
+
} : b = Pa(g, d, D, E, s, t);
|
|
2483
2484
|
}
|
|
2484
|
-
return r && n && b?.from && b.to &&
|
|
2485
|
+
return r && n && b?.from && b.to && Fa({
|
|
2485
2486
|
from: b.from,
|
|
2486
2487
|
to: b.to
|
|
2487
2488
|
}, n, t) && (b.from = g, b.to = void 0), i || l(b), i?.(b, g, M, C), b;
|
|
@@ -2489,7 +2490,7 @@ function Fa(e, t) {
|
|
|
2489
2490
|
isSelected: (g) => d && re(d, g, !1, t)
|
|
2490
2491
|
};
|
|
2491
2492
|
}
|
|
2492
|
-
function
|
|
2493
|
+
function Ia(e, t) {
|
|
2493
2494
|
const { selected: n, required: r, onSelect: o } = e, [a, s] = Ee(n, o ? n : void 0), i = o ? n : a, { isSameDay: u } = t;
|
|
2494
2495
|
return {
|
|
2495
2496
|
selected: i,
|
|
@@ -2500,8 +2501,8 @@ function Ba(e, t) {
|
|
|
2500
2501
|
isSelected: (c) => i ? u(i, c) : !1
|
|
2501
2502
|
};
|
|
2502
2503
|
}
|
|
2503
|
-
function
|
|
2504
|
-
const n =
|
|
2504
|
+
function Ha(e, t) {
|
|
2505
|
+
const n = Ia(e, t), r = _a(e, t), o = Ba(e, t);
|
|
2505
2506
|
switch (e.mode) {
|
|
2506
2507
|
case "single":
|
|
2507
2508
|
return n;
|
|
@@ -2521,20 +2522,20 @@ function le(e, t, n) {
|
|
|
2521
2522
|
const r = q(e, t), o = new $(r.getFullYear(), r.getMonth(), r.getDate(), 12, 0, 0, t);
|
|
2522
2523
|
return new Date(o.getTime());
|
|
2523
2524
|
}
|
|
2524
|
-
function
|
|
2525
|
+
function Ct(e, t, n) {
|
|
2525
2526
|
return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? le(e, t, n) : Array.isArray(e) ? e.map((r) => r instanceof Date ? le(r, t, n) : r) : Pe(e) ? {
|
|
2526
2527
|
...e,
|
|
2527
2528
|
from: e.from ? q(e.from, t) : e.from,
|
|
2528
2529
|
to: e.to ? q(e.to, t) : e.to
|
|
2529
|
-
} :
|
|
2530
|
+
} : nt(e) ? {
|
|
2530
2531
|
before: le(e.before, t, n),
|
|
2531
2532
|
after: le(e.after, t, n)
|
|
2532
|
-
} :
|
|
2533
|
+
} : rt(e) ? { after: le(e.after, t, n) } : ot(e) ? { before: le(e.before, t, n) } : e;
|
|
2533
2534
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return e && (Array.isArray(e) ? e.map((r) =>
|
|
2535
|
+
function Ve(e, t, n) {
|
|
2536
|
+
return e && (Array.isArray(e) ? e.map((r) => Ct(r, t, n)) : Ct(e, t, n));
|
|
2536
2537
|
}
|
|
2537
|
-
function
|
|
2538
|
+
function Aa(e) {
|
|
2538
2539
|
let t = e;
|
|
2539
2540
|
const n = t.timeZone;
|
|
2540
2541
|
if (n && (t = {
|
|
@@ -2543,17 +2544,17 @@ function Ha(e) {
|
|
|
2543
2544
|
}, t.today && (t.today = q(t.today, n)), t.month && (t.month = q(t.month, n)), t.defaultMonth && (t.defaultMonth = q(t.defaultMonth, n)), t.startMonth && (t.startMonth = q(t.startMonth, n)), t.endMonth && (t.endMonth = q(t.endMonth, n)), t.mode === "single" && t.selected ? t.selected = q(t.selected, n) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((p) => q(p, n)) : t.mode === "range" && t.selected && (t.selected = {
|
|
2544
2545
|
from: t.selected.from ? q(t.selected.from, n) : t.selected.from,
|
|
2545
2546
|
to: t.selected.to ? q(t.selected.to, n) : t.selected.to
|
|
2546
|
-
}), t.disabled !== void 0 && (t.disabled =
|
|
2547
|
+
}), t.disabled !== void 0 && (t.disabled = Ve(t.disabled, n)), t.hidden !== void 0 && (t.hidden = Ve(t.hidden, n)), t.modifiers)) {
|
|
2547
2548
|
const p = {};
|
|
2548
2549
|
Object.keys(t.modifiers).forEach((W) => {
|
|
2549
|
-
p[W] =
|
|
2550
|
+
p[W] = Ve(t.modifiers?.[W], n);
|
|
2550
2551
|
}), t.modifiers = p;
|
|
2551
2552
|
}
|
|
2552
2553
|
const { components: r, formatters: o, labels: a, dateLib: s, locale: i, classNames: u } = xe(() => {
|
|
2553
2554
|
const p = {
|
|
2554
|
-
...
|
|
2555
|
+
...Gt,
|
|
2555
2556
|
...t.locale
|
|
2556
|
-
}, W = t.broadcastCalendar ? 1 : t.weekStartsOn, k = t.noonSafe && t.timeZone ?
|
|
2557
|
+
}, W = t.broadcastCalendar ? 1 : t.weekStartsOn, k = t.noonSafe && t.timeZone ? ya(t.timeZone, {
|
|
2557
2558
|
weekStartsOn: W,
|
|
2558
2559
|
locale: p
|
|
2559
2560
|
}) : void 0, I = t.dateLib && k ? {
|
|
@@ -2570,12 +2571,12 @@ function Ha(e) {
|
|
|
2570
2571
|
}, I);
|
|
2571
2572
|
return {
|
|
2572
2573
|
dateLib: N,
|
|
2573
|
-
components:
|
|
2574
|
-
formatters:
|
|
2575
|
-
labels:
|
|
2574
|
+
components: Xo(t.components),
|
|
2575
|
+
formatters: ia(t.formatters),
|
|
2576
|
+
labels: ca(t.labels, N.options),
|
|
2576
2577
|
locale: p,
|
|
2577
2578
|
classNames: {
|
|
2578
|
-
...
|
|
2579
|
+
...at(),
|
|
2579
2580
|
...t.classNames
|
|
2580
2581
|
}
|
|
2581
2582
|
};
|
|
@@ -2599,12 +2600,12 @@ function Ha(e) {
|
|
|
2599
2600
|
...t,
|
|
2600
2601
|
today: s.today()
|
|
2601
2602
|
});
|
|
2602
|
-
const { captionLayout: l, mode: d, navLayout: c, numberOfMonths: w = 1, onDayBlur: g, onDayClick: M, onDayFocus: C, onDayKeyDown: D, onDayMouseEnter: E, onDayMouseLeave: b, onNextClick: v, onPrevClick: y, showWeekNumber: O, styles: f } = t, { formatCaption: x, formatDay: T, formatMonthDropdown: F, formatWeekNumber: j, formatWeekNumberHeader: A, formatWeekdayName: R, formatYearDropdown: he } = o, se =
|
|
2603
|
+
const { captionLayout: l, mode: d, navLayout: c, numberOfMonths: w = 1, onDayBlur: g, onDayClick: M, onDayFocus: C, onDayKeyDown: D, onDayMouseEnter: E, onDayMouseLeave: b, onNextClick: v, onPrevClick: y, showWeekNumber: O, styles: f } = t, { formatCaption: x, formatDay: T, formatMonthDropdown: F, formatWeekNumber: j, formatWeekNumberHeader: A, formatWeekdayName: R, formatYearDropdown: he } = o, se = Ca(t, s), { days: We, months: Se, navStart: Fe, navEnd: Be, previousMonth: Z, nextMonth: U, goToMonth: L } = se, Ie = Vo(We, t, Fe, Be, s), { isSelected: He, select: Ae, selected: Ne } = Ha(t, s) ?? {}, { blur: st, focused: it, isFocusTarget: sn, moveFocus: ut, setFocused: Ce } = Ya(t, se, Ie, He ?? (() => !1), s), { labelDayButton: un, labelGridcell: ln, labelGrid: cn, labelMonthDropdown: dn, labelNav: lt, labelPrevious: fn, labelNext: hn, labelWeekday: mn, labelWeekNumber: yn, labelWeekNumberHeader: gn, labelYearDropdown: vn } = a, bn = xe(() => ha(s, t.ISOWeek, t.broadcastCalendar, t.today), [
|
|
2603
2604
|
s,
|
|
2604
2605
|
t.ISOWeek,
|
|
2605
2606
|
t.broadcastCalendar,
|
|
2606
2607
|
t.today
|
|
2607
|
-
]),
|
|
2608
|
+
]), ct = d !== void 0 || M !== void 0, qe = G(() => {
|
|
2608
2609
|
Z && (L(Z), y?.(Z));
|
|
2609
2610
|
}, [
|
|
2610
2611
|
Z,
|
|
@@ -2616,17 +2617,17 @@ function Ha(e) {
|
|
|
2616
2617
|
L,
|
|
2617
2618
|
U,
|
|
2618
2619
|
v
|
|
2619
|
-
]),
|
|
2620
|
+
]), wn = G((p, W) => (k) => {
|
|
2620
2621
|
k.preventDefault(), k.stopPropagation(), Ce(p), !W.disabled && (Ae?.(p.date, W, k), M?.(p.date, W, k));
|
|
2621
2622
|
}, [
|
|
2622
2623
|
Ae,
|
|
2623
2624
|
M,
|
|
2624
2625
|
Ce
|
|
2625
|
-
]),
|
|
2626
|
+
]), pn = G((p, W) => (k) => {
|
|
2626
2627
|
Ce(p), C?.(p.date, W, k);
|
|
2627
|
-
}, [C, Ce]),
|
|
2628
|
-
|
|
2629
|
-
}, [
|
|
2628
|
+
}, [C, Ce]), Dn = G((p, W) => (k) => {
|
|
2629
|
+
st(), g?.(p.date, W, k);
|
|
2630
|
+
}, [st, g]), Mn = G((p, W) => (k) => {
|
|
2630
2631
|
const I = {
|
|
2631
2632
|
ArrowLeft: [k.shiftKey ? "month" : "day", t.dir === "rtl" ? "after" : "before"],
|
|
2632
2633
|
ArrowRight: [k.shiftKey ? "month" : "day", t.dir === "rtl" ? "before" : "after"],
|
|
@@ -2640,24 +2641,24 @@ function Ha(e) {
|
|
|
2640
2641
|
if (I[k.key]) {
|
|
2641
2642
|
k.preventDefault(), k.stopPropagation();
|
|
2642
2643
|
const [N, ee] = I[k.key];
|
|
2643
|
-
|
|
2644
|
+
ut(N, ee);
|
|
2644
2645
|
}
|
|
2645
2646
|
D?.(p.date, W, k);
|
|
2646
2647
|
}, [
|
|
2647
|
-
|
|
2648
|
+
ut,
|
|
2648
2649
|
D,
|
|
2649
2650
|
t.dir
|
|
2650
|
-
]),
|
|
2651
|
+
]), kn = G((p, W) => (k) => {
|
|
2651
2652
|
E?.(p.date, W, k);
|
|
2652
|
-
}, [E]),
|
|
2653
|
+
}, [E]), On = G((p, W) => (k) => {
|
|
2653
2654
|
b?.(p.date, W, k);
|
|
2654
|
-
}, [b]),
|
|
2655
|
+
}, [b]), Wn = G((p, W) => (k) => {
|
|
2655
2656
|
const I = Number(k.target.value), N = s.setMonth(s.startOfMonth(p), I);
|
|
2656
2657
|
L(s.addMonths(N, -W));
|
|
2657
|
-
}, [s, L]),
|
|
2658
|
+
}, [s, L]), Sn = G((p, W) => (k) => {
|
|
2658
2659
|
const I = Number(k.target.value), N = s.setYear(s.startOfMonth(p), I);
|
|
2659
2660
|
L(s.addMonths(N, -W));
|
|
2660
|
-
}, [s, L]), { className:
|
|
2661
|
+
}, [s, L]), { className: Nn, style: Cn } = xe(() => ({
|
|
2661
2662
|
className: [u[h.Root], t.className].filter(Boolean).join(" "),
|
|
2662
2663
|
style: {
|
|
2663
2664
|
...f?.[h.Root],
|
|
@@ -2668,21 +2669,21 @@ function Ha(e) {
|
|
|
2668
2669
|
t.className,
|
|
2669
2670
|
t.style,
|
|
2670
2671
|
f
|
|
2671
|
-
]),
|
|
2672
|
+
]), xn = Jo(t), dt = (p) => {
|
|
2672
2673
|
const W = f?.[h.Dropdown], k = f?.[p];
|
|
2673
2674
|
if (!(!W && !k))
|
|
2674
2675
|
return {
|
|
2675
2676
|
...W,
|
|
2676
2677
|
...k
|
|
2677
2678
|
};
|
|
2678
|
-
},
|
|
2679
|
-
|
|
2679
|
+
}, ft = Te(null);
|
|
2680
|
+
wa(ft, !!t.animate, {
|
|
2680
2681
|
classNames: u,
|
|
2681
2682
|
months: Se,
|
|
2682
|
-
focused:
|
|
2683
|
+
focused: it,
|
|
2683
2684
|
dateLib: s
|
|
2684
2685
|
});
|
|
2685
|
-
const
|
|
2686
|
+
const Tn = {
|
|
2686
2687
|
dayPickerProps: t,
|
|
2687
2688
|
selected: Ne,
|
|
2688
2689
|
select: Ae,
|
|
@@ -2698,10 +2699,10 @@ function Ha(e) {
|
|
|
2698
2699
|
labels: a,
|
|
2699
2700
|
formatters: o
|
|
2700
2701
|
};
|
|
2701
|
-
return m.createElement(
|
|
2702
|
-
rootRef: t.animate ?
|
|
2703
|
-
className:
|
|
2704
|
-
style:
|
|
2702
|
+
return m.createElement(Rt.Provider, { value: Tn }, m.createElement(r.Root, {
|
|
2703
|
+
rootRef: t.animate ? ft : void 0,
|
|
2704
|
+
className: Nn,
|
|
2705
|
+
style: Cn,
|
|
2705
2706
|
dir: t.dir,
|
|
2706
2707
|
id: t.id,
|
|
2707
2708
|
lang: t.lang ?? i.code,
|
|
@@ -2710,7 +2711,7 @@ function Ha(e) {
|
|
|
2710
2711
|
role: t.role,
|
|
2711
2712
|
"aria-label": t["aria-label"],
|
|
2712
2713
|
"aria-labelledby": t["aria-labelledby"],
|
|
2713
|
-
...
|
|
2714
|
+
...xn
|
|
2714
2715
|
}, m.createElement(r.Months, {
|
|
2715
2716
|
className: u[h.Months],
|
|
2716
2717
|
style: f?.[h.Months]
|
|
@@ -2718,7 +2719,7 @@ function Ha(e) {
|
|
|
2718
2719
|
"data-animated-nav": t.animate ? "true" : void 0,
|
|
2719
2720
|
className: u[h.Nav],
|
|
2720
2721
|
style: f?.[h.Nav],
|
|
2721
|
-
"aria-label":
|
|
2722
|
+
"aria-label": lt(),
|
|
2722
2723
|
onPreviousClick: qe,
|
|
2723
2724
|
onNextClick: ze,
|
|
2724
2725
|
previousMonth: Z,
|
|
@@ -2738,7 +2739,7 @@ function Ha(e) {
|
|
|
2738
2739
|
style: f?.[h.PreviousMonthButton],
|
|
2739
2740
|
tabIndex: Z ? void 0 : -1,
|
|
2740
2741
|
"aria-disabled": Z ? void 0 : !0,
|
|
2741
|
-
"aria-label":
|
|
2742
|
+
"aria-label": fn(Z),
|
|
2742
2743
|
onClick: qe,
|
|
2743
2744
|
"data-animated-button": t.animate ? "true" : void 0
|
|
2744
2745
|
}, m.createElement(r.Chevron, {
|
|
@@ -2759,20 +2760,20 @@ function Ha(e) {
|
|
|
2759
2760
|
const I = l === "dropdown" || l === "dropdown-months" ? m.createElement(r.MonthsDropdown, {
|
|
2760
2761
|
key: "month",
|
|
2761
2762
|
className: u[h.MonthsDropdown],
|
|
2762
|
-
"aria-label":
|
|
2763
|
+
"aria-label": dn(),
|
|
2763
2764
|
disabled: !!t.disableNavigation,
|
|
2764
|
-
onChange:
|
|
2765
|
-
options:
|
|
2766
|
-
style:
|
|
2765
|
+
onChange: Wn(p.date, k),
|
|
2766
|
+
options: da(p.date, Fe, Be, o, s),
|
|
2767
|
+
style: dt(h.MonthsDropdown),
|
|
2767
2768
|
value: s.getMonth(p.date)
|
|
2768
2769
|
}) : m.createElement("span", { key: "month" }, F(p.date, s)), N = l === "dropdown" || l === "dropdown-years" ? m.createElement(r.YearsDropdown, {
|
|
2769
2770
|
key: "year",
|
|
2770
2771
|
className: u[h.YearsDropdown],
|
|
2771
|
-
"aria-label":
|
|
2772
|
+
"aria-label": vn(s.options),
|
|
2772
2773
|
disabled: !!t.disableNavigation,
|
|
2773
|
-
onChange:
|
|
2774
|
-
options:
|
|
2775
|
-
style:
|
|
2774
|
+
onChange: Sn(p.date, k),
|
|
2775
|
+
options: ma(Fe, Be, o, s, !!t.reverseYears),
|
|
2776
|
+
style: dt(h.YearsDropdown),
|
|
2776
2777
|
value: s.getYear(p.date)
|
|
2777
2778
|
}) : m.createElement("span", { key: "year" }, he(p.date, s));
|
|
2778
2779
|
return s.getMonthYearOrder() === "year-first" ? [N, I] : [I, N];
|
|
@@ -2802,7 +2803,7 @@ function Ha(e) {
|
|
|
2802
2803
|
style: f?.[h.NextMonthButton],
|
|
2803
2804
|
tabIndex: U ? void 0 : -1,
|
|
2804
2805
|
"aria-disabled": U ? void 0 : !0,
|
|
2805
|
-
"aria-label":
|
|
2806
|
+
"aria-label": hn(U),
|
|
2806
2807
|
onClick: ze,
|
|
2807
2808
|
"data-animated-button": t.animate ? "true" : void 0
|
|
2808
2809
|
}, m.createElement(r.Chevron, {
|
|
@@ -2814,7 +2815,7 @@ function Ha(e) {
|
|
|
2814
2815
|
"data-animated-nav": t.animate ? "true" : void 0,
|
|
2815
2816
|
className: u[h.Nav],
|
|
2816
2817
|
style: f?.[h.Nav],
|
|
2817
|
-
"aria-label":
|
|
2818
|
+
"aria-label": lt(),
|
|
2818
2819
|
onPreviousClick: qe,
|
|
2819
2820
|
onNextClick: ze,
|
|
2820
2821
|
previousMonth: Z,
|
|
@@ -2822,7 +2823,7 @@ function Ha(e) {
|
|
|
2822
2823
|
}), m.createElement(r.MonthGrid, {
|
|
2823
2824
|
role: "grid",
|
|
2824
2825
|
"aria-multiselectable": d === "multiple" || d === "range",
|
|
2825
|
-
"aria-label":
|
|
2826
|
+
"aria-label": cn(p.date, s.options, s) || void 0,
|
|
2826
2827
|
className: u[h.MonthGrid],
|
|
2827
2828
|
style: f?.[h.MonthGrid]
|
|
2828
2829
|
}, !t.hideWeekdays && m.createElement(r.Weekdays, {
|
|
@@ -2830,12 +2831,12 @@ function Ha(e) {
|
|
|
2830
2831
|
className: u[h.Weekdays],
|
|
2831
2832
|
style: f?.[h.Weekdays]
|
|
2832
2833
|
}, O && m.createElement(r.WeekNumberHeader, {
|
|
2833
|
-
"aria-label":
|
|
2834
|
+
"aria-label": gn(s.options),
|
|
2834
2835
|
className: u[h.WeekNumberHeader],
|
|
2835
2836
|
style: f?.[h.WeekNumberHeader],
|
|
2836
2837
|
scope: "col"
|
|
2837
|
-
}, A()),
|
|
2838
|
-
"aria-label":
|
|
2838
|
+
}, A()), bn.map((I) => m.createElement(r.Weekday, {
|
|
2839
|
+
"aria-label": mn(I, s.options, s),
|
|
2839
2840
|
className: u[h.Weekday],
|
|
2840
2841
|
key: String(I),
|
|
2841
2842
|
style: f?.[h.Weekday],
|
|
@@ -2852,26 +2853,26 @@ function Ha(e) {
|
|
|
2852
2853
|
}, O && m.createElement(r.WeekNumber, {
|
|
2853
2854
|
week: I,
|
|
2854
2855
|
style: f?.[h.WeekNumber],
|
|
2855
|
-
"aria-label":
|
|
2856
|
+
"aria-label": yn(I.weekNumber, { locale: i }),
|
|
2856
2857
|
className: u[h.WeekNumber],
|
|
2857
2858
|
scope: "row",
|
|
2858
2859
|
role: "rowheader"
|
|
2859
2860
|
}, j(I.weekNumber, s)), I.days.map((N) => {
|
|
2860
2861
|
const { date: ee } = N, S = Ie(N);
|
|
2861
|
-
if (S[B.focused] = !S.hidden && !!
|
|
2862
|
+
if (S[B.focused] = !S.hidden && !!it?.isEqualTo(N), S[V.selected] = He?.(ee) || S.selected, Pe(Ne)) {
|
|
2862
2863
|
const { from: je, to: Ge } = Ne;
|
|
2863
2864
|
S[V.range_start] = !!(je && Ge && s.isSameDay(ee, je)), S[V.range_end] = !!(je && Ge && s.isSameDay(ee, Ge)), S[V.range_middle] = re(Ne, ee, !0, s);
|
|
2864
2865
|
}
|
|
2865
|
-
const
|
|
2866
|
+
const Yn = fa(S, f, t.modifiersStyles), _n = Ko(S, u, t.modifiersClassNames), Pn = !ct && !S.hidden ? ln(ee, S, s.options, s) : void 0;
|
|
2866
2867
|
return m.createElement(r.Day, {
|
|
2867
2868
|
key: `${N.isoDate}_${N.displayMonthId}`,
|
|
2868
2869
|
day: N,
|
|
2869
2870
|
modifiers: S,
|
|
2870
|
-
className:
|
|
2871
|
-
style:
|
|
2871
|
+
className: _n.join(" "),
|
|
2872
|
+
style: Yn,
|
|
2872
2873
|
role: "gridcell",
|
|
2873
2874
|
"aria-selected": S.selected || void 0,
|
|
2874
|
-
"aria-label":
|
|
2875
|
+
"aria-label": Pn,
|
|
2875
2876
|
"data-day": N.isoDate,
|
|
2876
2877
|
"data-month": N.outside ? N.dateMonthId : void 0,
|
|
2877
2878
|
"data-selected": S.selected || void 0,
|
|
@@ -2880,7 +2881,7 @@ function Ha(e) {
|
|
|
2880
2881
|
"data-outside": N.outside || void 0,
|
|
2881
2882
|
"data-focused": S.focused || void 0,
|
|
2882
2883
|
"data-today": S.today || void 0
|
|
2883
|
-
}, !S.hidden &&
|
|
2884
|
+
}, !S.hidden && ct ? m.createElement(r.DayButton, {
|
|
2884
2885
|
className: u[h.DayButton],
|
|
2885
2886
|
style: f?.[h.DayButton],
|
|
2886
2887
|
type: "button",
|
|
@@ -2888,14 +2889,14 @@ function Ha(e) {
|
|
|
2888
2889
|
modifiers: S,
|
|
2889
2890
|
disabled: !S.focused && S.disabled || void 0,
|
|
2890
2891
|
"aria-disabled": S.focused && S.disabled || void 0,
|
|
2891
|
-
tabIndex:
|
|
2892
|
-
"aria-label":
|
|
2893
|
-
onClick:
|
|
2894
|
-
onBlur:
|
|
2895
|
-
onFocus:
|
|
2896
|
-
onKeyDown:
|
|
2897
|
-
onMouseEnter:
|
|
2898
|
-
onMouseLeave:
|
|
2892
|
+
tabIndex: sn(N) ? 0 : -1,
|
|
2893
|
+
"aria-label": un(ee, S, s.options, s),
|
|
2894
|
+
onClick: wn(N, S),
|
|
2895
|
+
onBlur: Dn(N, S),
|
|
2896
|
+
onFocus: pn(N, S),
|
|
2897
|
+
onKeyDown: Mn(N, S),
|
|
2898
|
+
onMouseEnter: kn(N, S),
|
|
2899
|
+
onMouseLeave: On(N, S)
|
|
2899
2900
|
}, T(ee, s.options, s)) : !S.hidden && T(N.date, s.options, s));
|
|
2900
2901
|
}))))));
|
|
2901
2902
|
})), t.footer && m.createElement(r.Footer, {
|
|
@@ -2905,11 +2906,11 @@ function Ha(e) {
|
|
|
2905
2906
|
"aria-live": "polite"
|
|
2906
2907
|
}, t.footer)));
|
|
2907
2908
|
}
|
|
2908
|
-
function
|
|
2909
|
-
const l =
|
|
2910
|
-
return /* @__PURE__ */ te(
|
|
2909
|
+
function Xa({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: o = "ghost", locale: a, formatters: s, components: i, ...u }) {
|
|
2910
|
+
const l = at();
|
|
2911
|
+
return /* @__PURE__ */ te(Aa, {
|
|
2911
2912
|
showOutsideDays: n,
|
|
2912
|
-
className: Y("group/calendar bg-
|
|
2913
|
+
className: Y("group/calendar bg-surface-1 p-3 [--cell-radius:var(--radius-4xl)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
2913
2914
|
captionLayout: r,
|
|
2914
2915
|
locale: a,
|
|
2915
2916
|
formatters: {
|
|
@@ -2921,8 +2922,8 @@ function Va({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2921
2922
|
months: Y("relative flex flex-col gap-4 md:flex-row", l.months),
|
|
2922
2923
|
month: Y("flex w-full flex-col gap-4", l.month),
|
|
2923
2924
|
nav: Y("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", l.nav),
|
|
2924
|
-
button_previous: Y(
|
|
2925
|
-
button_next: Y(
|
|
2925
|
+
button_previous: Y(ht({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_previous),
|
|
2926
|
+
button_next: Y(ht({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", l.button_next),
|
|
2926
2927
|
month_caption: Y("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", l.month_caption),
|
|
2927
2928
|
dropdowns: Y("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", l.dropdowns),
|
|
2928
2929
|
dropdown_root: Y("relative rounded-(--cell-radius)", l.dropdown_root),
|
|
@@ -2934,10 +2935,10 @@ function Va({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2934
2935
|
week_number_header: Y("w-(--cell-size) select-none", l.week_number_header),
|
|
2935
2936
|
week_number: Y("text-[0.8rem] text-muted-foreground select-none", l.week_number),
|
|
2936
2937
|
day: Y("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-e-(--cell-radius)", u.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-s-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-s-(--cell-radius)", l.day),
|
|
2937
|
-
range_start: Y("relative isolate z-0 rounded-s-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-muted", l.range_start),
|
|
2938
|
+
range_start: Y("relative isolate z-0 rounded-s-(--cell-radius) bg-surface-muted after:absolute after:inset-y-0 after:end-0 after:w-4 after:bg-surface-muted", l.range_start),
|
|
2938
2939
|
range_middle: Y("rounded-none", l.range_middle),
|
|
2939
|
-
range_end: Y("relative isolate z-0 rounded-e-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-muted", l.range_end),
|
|
2940
|
-
today: Y("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", l.today),
|
|
2940
|
+
range_end: Y("relative isolate z-0 rounded-e-(--cell-radius) bg-surface-muted after:absolute after:inset-y-0 after:start-0 after:w-4 after:bg-surface-muted", l.range_end),
|
|
2941
|
+
today: Y("rounded-(--cell-radius) bg-surface-muted text-foreground data-[selected=true]:rounded-none", l.today),
|
|
2941
2942
|
outside: Y("text-muted-foreground aria-selected:text-muted-foreground", l.outside),
|
|
2942
2943
|
disabled: Y("text-muted-foreground opacity-50", l.disabled),
|
|
2943
2944
|
hidden: Y("invisible", l.hidden),
|
|
@@ -2950,17 +2951,20 @@ function Va({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2950
2951
|
className: Y(d),
|
|
2951
2952
|
...w
|
|
2952
2953
|
}),
|
|
2953
|
-
Chevron: ({ className: d, orientation: c, ...w }) => c === "left" ? /* @__PURE__ */ te(
|
|
2954
|
+
Chevron: ({ className: d, orientation: c, ...w }) => c === "left" ? /* @__PURE__ */ te($e, {
|
|
2955
|
+
icon: Bn,
|
|
2954
2956
|
className: Y("size-4 rtl:rotate-180", d),
|
|
2955
2957
|
...w
|
|
2956
|
-
}) : c === "right" ? /* @__PURE__ */ te(
|
|
2958
|
+
}) : c === "right" ? /* @__PURE__ */ te($e, {
|
|
2959
|
+
icon: In,
|
|
2957
2960
|
className: Y("size-4 rtl:rotate-180", d),
|
|
2958
2961
|
...w
|
|
2959
|
-
}) : /* @__PURE__ */ te(
|
|
2962
|
+
}) : /* @__PURE__ */ te($e, {
|
|
2963
|
+
icon: Fn,
|
|
2960
2964
|
className: Y("size-4", d),
|
|
2961
2965
|
...w
|
|
2962
2966
|
}),
|
|
2963
|
-
DayButton: ({ ...d }) => /* @__PURE__ */ te(
|
|
2967
|
+
DayButton: ({ ...d }) => /* @__PURE__ */ te(qa, {
|
|
2964
2968
|
locale: a,
|
|
2965
2969
|
...d
|
|
2966
2970
|
}),
|
|
@@ -2976,11 +2980,11 @@ function Va({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
2976
2980
|
...u
|
|
2977
2981
|
});
|
|
2978
2982
|
}
|
|
2979
|
-
function
|
|
2980
|
-
const a =
|
|
2981
|
-
return
|
|
2983
|
+
function qa({ className: e, day: t, modifiers: n, locale: r, ...o }) {
|
|
2984
|
+
const a = at(), s = mt.useRef(null);
|
|
2985
|
+
return mt.useEffect(() => {
|
|
2982
2986
|
n.focused && s.current?.focus();
|
|
2983
|
-
}, [n.focused]), /* @__PURE__ */ te(
|
|
2987
|
+
}, [n.focused]), /* @__PURE__ */ te(En, {
|
|
2984
2988
|
variant: "ghost",
|
|
2985
2989
|
size: "icon",
|
|
2986
2990
|
"data-day": t.date.toLocaleDateString(r?.code),
|
|
@@ -2988,13 +2992,13 @@ function Aa({ className: e, day: t, modifiers: n, locale: r, ...o }) {
|
|
|
2988
2992
|
"data-range-start": n.range_start,
|
|
2989
2993
|
"data-range-end": n.range_end,
|
|
2990
2994
|
"data-range-middle": n.range_middle,
|
|
2991
|
-
className: Y("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", a.day, e),
|
|
2995
|
+
className: Y("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-surface-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", a.day, e),
|
|
2992
2996
|
...o
|
|
2993
2997
|
});
|
|
2994
2998
|
}
|
|
2995
2999
|
export {
|
|
2996
|
-
|
|
2997
|
-
|
|
3000
|
+
Xa as Calendar,
|
|
3001
|
+
qa as CalendarDayButton
|
|
2998
3002
|
};
|
|
2999
3003
|
|
|
3000
3004
|
//# sourceMappingURL=calendar.js.map
|