prometeo-design-system 3.1.4 → 3.1.6

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.
Files changed (38) hide show
  1. package/dist/{DatePicker-CehTiXGa.js → DatePicker-6eb-0Ns5.js} +1339 -1237
  2. package/dist/DatePicker.es.js +1 -1
  3. package/dist/Icons/Reassignment.d.ts +6 -0
  4. package/dist/Icons/Reassignment.es.js +22 -0
  5. package/dist/Icons/ReassignmentFill.d.ts +6 -0
  6. package/dist/Icons/ReassignmentFill.es.js +52 -0
  7. package/dist/Icons/Send.d.ts +6 -0
  8. package/dist/Icons/Send.es.js +24 -0
  9. package/dist/Icons/components/Reassignment.d.ts +4 -0
  10. package/dist/Icons/components/ReassignmentFill.d.ts +4 -0
  11. package/dist/Icons/components/Send.d.ts +4 -0
  12. package/dist/Icons/index.d.ts +3 -0
  13. package/dist/Icons/types.d.ts +6 -0
  14. package/dist/Icons.es.js +56 -50
  15. package/dist/NotificationCard.d.ts +6 -0
  16. package/dist/NotificationCard.es.js +50 -0
  17. package/dist/PyrionNavigationDrawer.d.ts +6 -0
  18. package/dist/PyrionNavigationDrawer.es.js +962 -0
  19. package/dist/RecurrentDatePicker.es.js +2 -2
  20. package/dist/RecurrentDatePickerRRule.es.js +1 -1
  21. package/dist/Select.es.js +1059 -2
  22. package/dist/SelectSearch.es.js +67 -66
  23. package/dist/TicketCard.d.ts +6 -0
  24. package/dist/TicketCard.es.js +130 -0
  25. package/dist/badge-B1IK_-i5.js +87 -0
  26. package/dist/components/NotificationCard/index.d.ts +3 -0
  27. package/dist/components/PyrionNavigationDrawer/index.d.ts +3 -0
  28. package/dist/components/TicketCard/index.d.ts +3 -0
  29. package/dist/exports/NotificationCard.d.ts +2 -0
  30. package/dist/exports/PyrionNavigationDrawer.d.ts +2 -0
  31. package/dist/exports/TicketCard.d.ts +2 -0
  32. package/dist/exports/usePyrionNavigation.d.ts +1 -0
  33. package/dist/prometeo-design-system.es.js +287 -365
  34. package/dist/usePyrionNavigation.d.ts +4 -0
  35. package/dist/usePyrionNavigation.es.js +4 -0
  36. package/dist/utils-X4-h3cum.js +54 -0
  37. package/package.json +17 -1
  38. package/dist/Select-BdxmkrjB.js +0 -1111
@@ -1,12 +1,12 @@
1
- import { j as L } from "./jsx-runtime-GkKLlHH4.js";
2
- import m, { createContext as xn, useContext as Pn, useCallback as q, useRef as Ee, useLayoutEffect as Tn, useState as We, useEffect as Fe, useMemo as se, memo as Yn } from "react";
3
- import En from "./InputMultiple.es.js";
4
- import _n from "./Input.es.js";
5
- import { createPortal as Fn } from "react-dom";
6
- import { c as et } from "./cn-B6yFEsav.js";
7
- import { Calendar as Et } from "./Icons/Calendar.es.js";
8
- import _t from "./Button.es.js";
9
- function In(e, t, o = "long") {
1
+ import { j as U } from "./jsx-runtime-GkKLlHH4.js";
2
+ import h, { createContext as Tn, useContext as Yn, useCallback as q, useRef as Ee, useLayoutEffect as En, useState as Se, useEffect as _e, useMemo as ie, memo as Fn } from "react";
3
+ import _n from "./InputMultiple.es.js";
4
+ import In from "./Input.es.js";
5
+ import { createPortal as Bn } from "react-dom";
6
+ import { c as tt } from "./cn-B6yFEsav.js";
7
+ import { Calendar as Bt } from "./Icons/Calendar.es.js";
8
+ import jt from "./Button.es.js";
9
+ function jn(e, t, o = "long") {
10
10
  return new Intl.DateTimeFormat("en-US", {
11
11
  // Enforces engine to render the time. Without the option JavaScriptCore omits it.
12
12
  hour: "numeric",
@@ -14,37 +14,37 @@ function In(e, t, o = "long") {
14
14
  timeZoneName: o
15
15
  }).format(t).split(/\s/g).slice(2).join(" ");
16
16
  }
17
- const Bn = {}, Ke = {};
17
+ const $n = {}, Je = {};
18
18
  function Be(e, t) {
19
19
  try {
20
- const n = (Bn[e] ||= new Intl.DateTimeFormat("en-US", {
20
+ const n = ($n[e] ||= new Intl.DateTimeFormat("en-US", {
21
21
  timeZone: e,
22
22
  timeZoneName: "longOffset"
23
23
  }).format)(t).split("GMT")[1];
24
- return n in Ke ? Ke[n] : Ft(n, n.split(":"));
24
+ return n in Je ? Je[n] : $t(n, n.split(":"));
25
25
  } catch {
26
- if (e in Ke) return Ke[e];
27
- const o = e?.match(jn);
28
- return o ? Ft(e, o.slice(1)) : NaN;
26
+ if (e in Je) return Je[e];
27
+ const o = e?.match(An);
28
+ return o ? $t(e, o.slice(1)) : NaN;
29
29
  }
30
30
  }
31
- const jn = /([+-]\d\d):?(\d\d)?/;
32
- function Ft(e, t) {
31
+ const An = /([+-]\d\d):?(\d\d)?/;
32
+ function $t(e, t) {
33
33
  const o = +(t[0] || 0), n = +(t[1] || 0), r = +(t[2] || 0) / 60;
34
- return Ke[e] = o * 60 + n > 0 ? o * 60 + n + r : o * 60 - n - r;
34
+ return Je[e] = o * 60 + n > 0 ? o * 60 + n + r : o * 60 - n - r;
35
35
  }
36
- class Me extends Date {
36
+ class De extends Date {
37
37
  //#region static
38
38
  constructor(...t) {
39
- super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Be(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)), Qt(this), St(this)) : this.setTime(Date.now());
39
+ super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Be(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)), Zt(this), Nt(this)) : this.setTime(Date.now());
40
40
  }
41
41
  static tz(t, ...o) {
42
- return o.length ? new Me(...o, t) : new Me(Date.now(), t);
42
+ return o.length ? new De(...o, t) : new De(Date.now(), t);
43
43
  }
44
44
  //#endregion
45
45
  //#region time zone
46
46
  withTimeZone(t) {
47
- return new Me(+this, t);
47
+ return new De(+this, t);
48
48
  }
49
49
  getTimezoneOffset() {
50
50
  const t = -Be(this.timeZone, this);
@@ -53,55 +53,55 @@ class Me extends Date {
53
53
  //#endregion
54
54
  //#region time
55
55
  setTime(t) {
56
- return Date.prototype.setTime.apply(this, arguments), St(this), +this;
56
+ return Date.prototype.setTime.apply(this, arguments), Nt(this), +this;
57
57
  }
58
58
  //#endregion
59
59
  //#region date-fns integration
60
60
  [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
61
- return new Me(+new Date(t), this.timeZone);
61
+ return new De(+new Date(t), this.timeZone);
62
62
  }
63
63
  //#endregion
64
64
  }
65
- const It = /^(get|set)(?!UTC)/;
65
+ const At = /^(get|set)(?!UTC)/;
66
66
  Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
67
- if (!It.test(e)) return;
68
- const t = e.replace(It, "$1UTC");
69
- Me.prototype[t] && (e.startsWith("get") ? Me.prototype[e] = function() {
67
+ if (!At.test(e)) return;
68
+ const t = e.replace(At, "$1UTC");
69
+ De.prototype[t] && (e.startsWith("get") ? De.prototype[e] = function() {
70
70
  return this.internal[t]();
71
- } : (Me.prototype[e] = function() {
72
- return Date.prototype[t].apply(this.internal, arguments), $n(this), +this;
73
- }, Me.prototype[t] = function() {
74
- return Date.prototype[t].apply(this, arguments), St(this), +this;
71
+ } : (De.prototype[e] = function() {
72
+ return Date.prototype[t].apply(this.internal, arguments), Hn(this), +this;
73
+ }, De.prototype[t] = function() {
74
+ return Date.prototype[t].apply(this, arguments), Nt(this), +this;
75
75
  }));
76
76
  });
77
- function St(e) {
77
+ function Nt(e) {
78
78
  e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-Be(e.timeZone, e) * 60));
79
79
  }
80
- function $n(e) {
81
- 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()), Qt(e);
80
+ function Hn(e) {
81
+ 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()), Zt(e);
82
82
  }
83
- function Qt(e) {
83
+ function Zt(e) {
84
84
  const t = Be(e.timeZone, e), o = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
85
85
  n.setUTCHours(n.getUTCHours() - 1);
86
- const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = r - s, i = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
87
- a && i && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
86
+ const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), s = r - i, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
87
+ s && a && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + s);
88
88
  const c = r - o;
89
89
  c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
90
- const u = /* @__PURE__ */ new Date(+e);
91
- u.setUTCSeconds(0);
92
- const f = r > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, l = Math.round(-(Be(e.timeZone, e) * 60)) % 60;
93
- (l || f) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + l), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + l + f));
94
- const d = Be(e.timeZone, e), M = d > 0 ? Math.floor(d) : Math.ceil(d), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - M, O = M !== o, v = C - c;
95
- if (O && v) {
90
+ const l = /* @__PURE__ */ new Date(+e);
91
+ l.setUTCSeconds(0);
92
+ const d = r > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, u = Math.round(-(Be(e.timeZone, e) * 60)) % 60;
93
+ (u || d) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + d));
94
+ const f = Be(e.timeZone, e), M = f > 0 ? Math.floor(f) : Math.ceil(f), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - M, W = M !== o, v = C - c;
95
+ if (W && v) {
96
96
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v);
97
97
  const g = Be(e.timeZone, e), p = g > 0 ? Math.floor(g) : Math.ceil(g), S = M - p;
98
98
  S && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + S), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + S));
99
99
  }
100
100
  }
101
- class Se extends Me {
101
+ class J extends De {
102
102
  //#region static
103
103
  static tz(t, ...o) {
104
- return o.length ? new Se(...o, t) : new Se(Date.now(), t);
104
+ return o.length ? new J(...o, t) : new J(Date.now(), t);
105
105
  }
106
106
  //#endregion
107
107
  //#region representation
@@ -118,7 +118,7 @@ class Se extends Me {
118
118
  }
119
119
  toTimeString() {
120
120
  const t = this.internal.toUTCString().split(" ")[4], [o, n, r] = this.tzComponents();
121
- return `${t} GMT${o}${n}${r} (${In(this.timeZone, this)})`;
121
+ return `${t} GMT${o}${n}${r} (${jn(this.timeZone, this)})`;
122
122
  }
123
123
  toLocaleString(t, o) {
124
124
  return Date.prototype.toLocaleString.call(this, t, {
@@ -146,59 +146,59 @@ class Se extends Me {
146
146
  }
147
147
  //#endregion
148
148
  withTimeZone(t) {
149
- return new Se(+this, t);
149
+ return new J(+this, t);
150
150
  }
151
151
  //#region date-fns integration
152
152
  [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
153
- return new Se(+new Date(t), this.timeZone);
153
+ return new J(+new Date(t), this.timeZone);
154
154
  }
155
155
  //#endregion
156
156
  }
157
- const Ut = 6048e5, An = 864e5, Bt = /* @__PURE__ */ Symbol.for("constructDateFrom");
158
- function U(e, t) {
159
- 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);
157
+ const Jt = 6048e5, qn = 864e5, Ht = /* @__PURE__ */ Symbol.for("constructDateFrom");
158
+ function Q(e, t) {
159
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && Ht in e ? e[Ht](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
160
160
  }
161
161
  function B(e, t) {
162
- return U(t || e, e);
162
+ return Q(t || e, e);
163
163
  }
164
- function Lt(e, t, o) {
164
+ function en(e, t, o) {
165
165
  const n = B(e, o?.in);
166
- return isNaN(t) ? U(e, NaN) : (t && n.setDate(n.getDate() + t), n);
166
+ return isNaN(t) ? Q(e, NaN) : (t && n.setDate(n.getDate() + t), n);
167
167
  }
168
- function Zt(e, t, o) {
168
+ function tn(e, t, o) {
169
169
  const n = B(e, o?.in);
170
- if (isNaN(t)) return U(e, NaN);
170
+ if (isNaN(t)) return Q(e, NaN);
171
171
  if (!t)
172
172
  return n;
173
- const r = n.getDate(), s = U(e, n.getTime());
174
- s.setMonth(n.getMonth() + t + 1, 0);
175
- const a = s.getDate();
176
- return r >= a ? s : (n.setFullYear(
177
- s.getFullYear(),
178
- s.getMonth(),
173
+ const r = n.getDate(), i = Q(e, n.getTime());
174
+ i.setMonth(n.getMonth() + t + 1, 0);
175
+ const s = i.getDate();
176
+ return r >= s ? i : (n.setFullYear(
177
+ i.getFullYear(),
178
+ i.getMonth(),
179
179
  r
180
180
  ), n);
181
181
  }
182
- let Hn = {};
183
- function ot() {
184
- return Hn;
182
+ let Rn = {};
183
+ function rt() {
184
+ return Rn;
185
185
  }
186
- function Xe(e, t) {
187
- const o = ot(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = B(e, t?.in), s = r.getDay(), a = (s < n ? 7 : 0) + s - n;
188
- return r.setDate(r.getDate() - a), r.setHours(0, 0, 0, 0), r;
186
+ function Le(e, t) {
187
+ const o = rt(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = B(e, t?.in), i = r.getDay(), s = (i < n ? 7 : 0) + i - n;
188
+ return r.setDate(r.getDate() - s), r.setHours(0, 0, 0, 0), r;
189
189
  }
190
- function tt(e, t) {
191
- return Xe(e, { ...t, weekStartsOn: 1 });
190
+ function nt(e, t) {
191
+ return Le(e, { ...t, weekStartsOn: 1 });
192
192
  }
193
- function Kt(e, t) {
194
- const o = B(e, t?.in), n = o.getFullYear(), r = U(o, 0);
193
+ function nn(e, t) {
194
+ const o = B(e, t?.in), n = o.getFullYear(), r = Q(o, 0);
195
195
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
196
- const s = tt(r), a = U(o, 0);
197
- a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
198
- const i = tt(a);
199
- return o.getTime() >= s.getTime() ? n + 1 : o.getTime() >= i.getTime() ? n : n - 1;
196
+ const i = nt(r), s = Q(o, 0);
197
+ s.setFullYear(n, 0, 4), s.setHours(0, 0, 0, 0);
198
+ const a = nt(s);
199
+ return o.getTime() >= i.getTime() ? n + 1 : o.getTime() >= a.getTime() ? n : n - 1;
200
200
  }
201
- function jt(e) {
201
+ function qt(e) {
202
202
  const t = B(e), o = new Date(
203
203
  Date.UTC(
204
204
  t.getFullYear(),
@@ -213,122 +213,122 @@ function jt(e) {
213
213
  return o.setUTCFullYear(t.getFullYear()), +e - +o;
214
214
  }
215
215
  function Qe(e, ...t) {
216
- const o = U.bind(
216
+ const o = Q.bind(
217
217
  null,
218
218
  t.find((n) => typeof n == "object")
219
219
  );
220
220
  return t.map(o);
221
221
  }
222
- function nt(e, t) {
222
+ function ot(e, t) {
223
223
  const o = B(e, t?.in);
224
224
  return o.setHours(0, 0, 0, 0), o;
225
225
  }
226
- function Jt(e, t, o) {
226
+ function xt(e, t, o) {
227
227
  const [n, r] = Qe(
228
228
  o?.in,
229
229
  e,
230
230
  t
231
- ), s = nt(n), a = nt(r), i = +s - jt(s), c = +a - jt(a);
232
- return Math.round((i - c) / An);
231
+ ), i = ot(n), s = ot(r), a = +i - qt(i), c = +s - qt(s);
232
+ return Math.round((a - c) / qn);
233
233
  }
234
- function qn(e, t) {
235
- const o = Kt(e, t), n = U(e, 0);
236
- return n.setFullYear(o, 0, 4), n.setHours(0, 0, 0, 0), tt(n);
237
- }
238
- function Rn(e, t, o) {
239
- return Lt(e, t * 7, o);
234
+ function zn(e, t) {
235
+ const o = nn(e, t), n = Q(e, 0);
236
+ return n.setFullYear(o, 0, 4), n.setHours(0, 0, 0, 0), nt(n);
240
237
  }
241
238
  function Gn(e, t, o) {
242
- return Zt(e, t * 12, o);
239
+ return en(e, t * 7, o);
243
240
  }
244
- function zn(e, t) {
241
+ function Vn(e, t, o) {
242
+ return tn(e, t * 12, o);
243
+ }
244
+ function Xn(e, t) {
245
245
  let o, n = t?.in;
246
246
  return e.forEach((r) => {
247
- !n && typeof r == "object" && (n = U.bind(null, r));
248
- const s = B(r, n);
249
- (!o || o < s || isNaN(+s)) && (o = s);
250
- }), U(n, o || NaN);
247
+ !n && typeof r == "object" && (n = Q.bind(null, r));
248
+ const i = B(r, n);
249
+ (!o || o < i || isNaN(+i)) && (o = i);
250
+ }), Q(n, o || NaN);
251
251
  }
252
- function Vn(e, t) {
252
+ function Ln(e, t) {
253
253
  let o, n = t?.in;
254
254
  return e.forEach((r) => {
255
- !n && typeof r == "object" && (n = U.bind(null, r));
256
- const s = B(r, n);
257
- (!o || o > s || isNaN(+s)) && (o = s);
258
- }), U(n, o || NaN);
255
+ !n && typeof r == "object" && (n = Q.bind(null, r));
256
+ const i = B(r, n);
257
+ (!o || o > i || isNaN(+i)) && (o = i);
258
+ }), Q(n, o || NaN);
259
259
  }
260
- function Xn(e, t, o) {
260
+ function Qn(e, t, o) {
261
261
  const [n, r] = Qe(
262
262
  o?.in,
263
263
  e,
264
264
  t
265
265
  );
266
- return +nt(n) == +nt(r);
266
+ return +ot(n) == +ot(r);
267
267
  }
268
- function en(e) {
268
+ function on(e) {
269
269
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
270
270
  }
271
- function Qn(e) {
272
- return !(!en(e) && typeof e != "number" || isNaN(+B(e)));
271
+ function Un(e) {
272
+ return !(!on(e) && typeof e != "number" || isNaN(+B(e)));
273
273
  }
274
- function Un(e, t, o) {
274
+ function rn(e, t, o) {
275
275
  const [n, r] = Qe(
276
276
  o?.in,
277
277
  e,
278
278
  t
279
- ), s = n.getFullYear() - r.getFullYear(), a = n.getMonth() - r.getMonth();
280
- return s * 12 + a;
279
+ ), i = n.getFullYear() - r.getFullYear(), s = n.getMonth() - r.getMonth();
280
+ return i * 12 + s;
281
281
  }
282
- function Ln(e, t) {
282
+ function Kn(e, t) {
283
283
  const o = B(e, t?.in), n = o.getMonth();
284
284
  return o.setFullYear(o.getFullYear(), n + 1, 0), o.setHours(23, 59, 59, 999), o;
285
285
  }
286
- function tn(e, t) {
286
+ function an(e, t) {
287
287
  const [o, n] = Qe(e, t.start, t.end);
288
288
  return { start: o, end: n };
289
289
  }
290
290
  function Zn(e, t) {
291
- const { start: o, end: n } = tn(t?.in, e);
291
+ const { start: o, end: n } = an(t?.in, e);
292
292
  let r = +o > +n;
293
- const s = r ? +o : +n, a = r ? n : o;
294
- a.setHours(0, 0, 0, 0), a.setDate(1);
295
- let i = 1;
293
+ const i = r ? +o : +n, s = r ? n : o;
294
+ s.setHours(0, 0, 0, 0), s.setDate(1);
295
+ let a = 1;
296
296
  const c = [];
297
- for (; +a <= s; )
298
- c.push(U(o, a)), a.setMonth(a.getMonth() + i);
297
+ for (; +s <= i; )
298
+ c.push(Q(o, s)), s.setMonth(s.getMonth() + a);
299
299
  return r ? c.reverse() : c;
300
300
  }
301
- function Kn(e, t) {
301
+ function Jn(e, t) {
302
302
  const o = B(e, t?.in);
303
303
  return o.setDate(1), o.setHours(0, 0, 0, 0), o;
304
304
  }
305
- function Jn(e, t) {
305
+ function eo(e, t) {
306
306
  const o = B(e, t?.in), n = o.getFullYear();
307
307
  return o.setFullYear(n + 1, 0, 0), o.setHours(23, 59, 59, 999), o;
308
308
  }
309
- function nn(e, t) {
309
+ function sn(e, t) {
310
310
  const o = B(e, t?.in);
311
311
  return o.setFullYear(o.getFullYear(), 0, 1), o.setHours(0, 0, 0, 0), o;
312
312
  }
313
- function eo(e, t) {
314
- const { start: o, end: n } = tn(t?.in, e);
313
+ function to(e, t) {
314
+ const { start: o, end: n } = an(t?.in, e);
315
315
  let r = +o > +n;
316
- const s = r ? +o : +n, a = r ? n : o;
317
- a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
318
- let i = 1;
316
+ const i = r ? +o : +n, s = r ? n : o;
317
+ s.setHours(0, 0, 0, 0), s.setMonth(0, 1);
318
+ let a = 1;
319
319
  const c = [];
320
- for (; +a <= s; )
321
- c.push(U(o, a)), a.setFullYear(a.getFullYear() + i);
320
+ for (; +s <= i; )
321
+ c.push(Q(o, s)), s.setFullYear(s.getFullYear() + a);
322
322
  return r ? c.reverse() : c;
323
323
  }
324
- function on(e, t) {
325
- const o = ot(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = B(e, t?.in), s = r.getDay(), a = (s < n ? -7 : 0) + 6 - (s - n);
326
- return r.setDate(r.getDate() + a), r.setHours(23, 59, 59, 999), r;
324
+ function cn(e, t) {
325
+ const o = rt(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = B(e, t?.in), i = r.getDay(), s = (i < n ? -7 : 0) + 6 - (i - n);
326
+ return r.setDate(r.getDate() + s), r.setHours(23, 59, 59, 999), r;
327
327
  }
328
- function to(e, t) {
329
- return on(e, { ...t, weekStartsOn: 1 });
328
+ function no(e, t) {
329
+ return cn(e, { ...t, weekStartsOn: 1 });
330
330
  }
331
- const no = {
331
+ const oo = {
332
332
  lessThanXSeconds: {
333
333
  one: "less than a second",
334
334
  other: "less than {{count}} seconds"
@@ -390,73 +390,73 @@ const no = {
390
390
  one: "almost 1 year",
391
391
  other: "almost {{count}} years"
392
392
  }
393
- }, oo = (e, t, o) => {
393
+ }, ro = (e, t, o) => {
394
394
  let n;
395
- const r = no[e];
395
+ const r = oo[e];
396
396
  return typeof r == "string" ? n = r : t === 1 ? n = r.one : n = r.other.replace("{{count}}", t.toString()), o?.addSuffix ? o.comparison && o.comparison > 0 ? "in " + n : n + " ago" : n;
397
397
  };
398
- function Ve(e) {
398
+ function Xe(e) {
399
399
  return (t = {}) => {
400
400
  const o = t.width ? String(t.width) : e.defaultWidth;
401
401
  return e.formats[o] || e.formats[e.defaultWidth];
402
402
  };
403
403
  }
404
- const ro = {
404
+ const ao = {
405
405
  full: "EEEE, MMMM do, y",
406
406
  long: "MMMM do, y",
407
407
  medium: "MMM d, y",
408
408
  short: "MM/dd/yyyy"
409
- }, ao = {
409
+ }, so = {
410
410
  full: "h:mm:ss a zzzz",
411
411
  long: "h:mm:ss a z",
412
412
  medium: "h:mm:ss a",
413
413
  short: "h:mm a"
414
- }, so = {
414
+ }, io = {
415
415
  full: "{{date}} 'at' {{time}}",
416
416
  long: "{{date}} 'at' {{time}}",
417
417
  medium: "{{date}}, {{time}}",
418
418
  short: "{{date}}, {{time}}"
419
- }, io = {
420
- date: Ve({
421
- formats: ro,
422
- defaultWidth: "full"
423
- }),
424
- time: Ve({
419
+ }, co = {
420
+ date: Xe({
425
421
  formats: ao,
426
422
  defaultWidth: "full"
427
423
  }),
428
- dateTime: Ve({
424
+ time: Xe({
429
425
  formats: so,
430
426
  defaultWidth: "full"
427
+ }),
428
+ dateTime: Xe({
429
+ formats: io,
430
+ defaultWidth: "full"
431
431
  })
432
- }, co = {
432
+ }, lo = {
433
433
  lastWeek: "'last' eeee 'at' p",
434
434
  yesterday: "'yesterday at' p",
435
435
  today: "'today at' p",
436
436
  tomorrow: "'tomorrow at' p",
437
437
  nextWeek: "eeee 'at' p",
438
438
  other: "P"
439
- }, lo = (e, t, o, n) => co[e];
440
- function be(e) {
439
+ }, uo = (e, t, o, n) => lo[e];
440
+ function we(e) {
441
441
  return (t, o) => {
442
442
  const n = o?.context ? String(o.context) : "standalone";
443
443
  let r;
444
444
  if (n === "formatting" && e.formattingValues) {
445
- const a = e.defaultFormattingWidth || e.defaultWidth, i = o?.width ? String(o.width) : a;
446
- r = e.formattingValues[i] || e.formattingValues[a];
445
+ const s = e.defaultFormattingWidth || e.defaultWidth, a = o?.width ? String(o.width) : s;
446
+ r = e.formattingValues[a] || e.formattingValues[s];
447
447
  } else {
448
- const a = e.defaultWidth, i = o?.width ? String(o.width) : e.defaultWidth;
449
- r = e.values[i] || e.values[a];
448
+ const s = e.defaultWidth, a = o?.width ? String(o.width) : e.defaultWidth;
449
+ r = e.values[a] || e.values[s];
450
450
  }
451
- const s = e.argumentCallback ? e.argumentCallback(t) : t;
452
- return r[s];
451
+ const i = e.argumentCallback ? e.argumentCallback(t) : t;
452
+ return r[i];
453
453
  };
454
454
  }
455
- const uo = {
455
+ const fo = {
456
456
  narrow: ["B", "A"],
457
457
  abbreviated: ["BC", "AD"],
458
458
  wide: ["Before Christ", "Anno Domini"]
459
- }, fo = {
459
+ }, ho = {
460
460
  narrow: ["1", "2", "3", "4"],
461
461
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
462
462
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
@@ -490,7 +490,7 @@ const uo = {
490
490
  "November",
491
491
  "December"
492
492
  ]
493
- }, ho = {
493
+ }, yo = {
494
494
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
495
495
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
496
496
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -503,7 +503,7 @@ const uo = {
503
503
  "Friday",
504
504
  "Saturday"
505
505
  ]
506
- }, yo = {
506
+ }, go = {
507
507
  narrow: {
508
508
  am: "a",
509
509
  pm: "p",
@@ -534,7 +534,7 @@ const uo = {
534
534
  evening: "evening",
535
535
  night: "night"
536
536
  }
537
- }, go = {
537
+ }, po = {
538
538
  narrow: {
539
539
  am: "a",
540
540
  pm: "p",
@@ -565,7 +565,7 @@ const uo = {
565
565
  evening: "in the evening",
566
566
  night: "at night"
567
567
  }
568
- }, po = (e, t) => {
568
+ }, bo = (e, t) => {
569
569
  const o = Number(e), n = o % 100;
570
570
  if (n > 20 || n < 10)
571
571
  switch (n % 10) {
@@ -577,89 +577,89 @@ const uo = {
577
577
  return o + "rd";
578
578
  }
579
579
  return o + "th";
580
- }, bo = {
581
- ordinalNumber: po,
582
- era: be({
583
- values: uo,
580
+ }, wo = {
581
+ ordinalNumber: bo,
582
+ era: we({
583
+ values: fo,
584
584
  defaultWidth: "wide"
585
585
  }),
586
- quarter: be({
587
- values: fo,
586
+ quarter: we({
587
+ values: ho,
588
588
  defaultWidth: "wide",
589
589
  argumentCallback: (e) => e - 1
590
590
  }),
591
- month: be({
591
+ month: we({
592
592
  values: mo,
593
593
  defaultWidth: "wide"
594
594
  }),
595
- day: be({
596
- values: ho,
595
+ day: we({
596
+ values: yo,
597
597
  defaultWidth: "wide"
598
598
  }),
599
- dayPeriod: be({
600
- values: yo,
599
+ dayPeriod: we({
600
+ values: go,
601
601
  defaultWidth: "wide",
602
- formattingValues: go,
602
+ formattingValues: po,
603
603
  defaultFormattingWidth: "wide"
604
604
  })
605
605
  };
606
- function we(e) {
606
+ function Me(e) {
607
607
  return (t, o = {}) => {
608
- const n = o.width, r = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], s = t.match(r);
609
- if (!s)
608
+ const n = o.width, r = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], i = t.match(r);
609
+ if (!i)
610
610
  return null;
611
- const a = s[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? Mo(i, (l) => l.test(a)) : (
611
+ const s = i[0], a = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(a) ? Do(a, (u) => u.test(s)) : (
612
612
  // [TODO] -- I challenge you to fix the type
613
- wo(i, (l) => l.test(a))
613
+ Mo(a, (u) => u.test(s))
614
614
  );
615
- let u;
616
- u = e.valueCallback ? e.valueCallback(c) : c, u = o.valueCallback ? (
615
+ let l;
616
+ l = e.valueCallback ? e.valueCallback(c) : c, l = o.valueCallback ? (
617
617
  // [TODO] -- I challenge you to fix the type
618
- o.valueCallback(u)
619
- ) : u;
620
- const f = t.slice(a.length);
621
- return { value: u, rest: f };
618
+ o.valueCallback(l)
619
+ ) : l;
620
+ const d = t.slice(s.length);
621
+ return { value: l, rest: d };
622
622
  };
623
623
  }
624
- function wo(e, t) {
624
+ function Mo(e, t) {
625
625
  for (const o in e)
626
626
  if (Object.prototype.hasOwnProperty.call(e, o) && t(e[o]))
627
627
  return o;
628
628
  }
629
- function Mo(e, t) {
629
+ function Do(e, t) {
630
630
  for (let o = 0; o < e.length; o++)
631
631
  if (t(e[o]))
632
632
  return o;
633
633
  }
634
- function rn(e) {
634
+ function ln(e) {
635
635
  return (t, o = {}) => {
636
636
  const n = t.match(e.matchPattern);
637
637
  if (!n) return null;
638
- const r = n[0], s = t.match(e.parsePattern);
639
- if (!s) return null;
640
- let a = e.valueCallback ? e.valueCallback(s[0]) : s[0];
641
- a = o.valueCallback ? o.valueCallback(a) : a;
642
- const i = t.slice(r.length);
643
- return { value: a, rest: i };
638
+ const r = n[0], i = t.match(e.parsePattern);
639
+ if (!i) return null;
640
+ let s = e.valueCallback ? e.valueCallback(i[0]) : i[0];
641
+ s = o.valueCallback ? o.valueCallback(s) : s;
642
+ const a = t.slice(r.length);
643
+ return { value: s, rest: a };
644
644
  };
645
645
  }
646
- const Do = /^(\d+)(th|st|nd|rd)?/i, vo = /\d+/i, ko = {
646
+ const vo = /^(\d+)(th|st|nd|rd)?/i, ko = /\d+/i, Oo = {
647
647
  narrow: /^(b|a)/i,
648
648
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
649
649
  wide: /^(before christ|before common era|anno domini|common era)/i
650
- }, Oo = {
651
- any: [/^b/i, /^(a|c)/i]
652
650
  }, Wo = {
651
+ any: [/^b/i, /^(a|c)/i]
652
+ }, So = {
653
653
  narrow: /^[1234]/i,
654
654
  abbreviated: /^q[1234]/i,
655
655
  wide: /^[1234](th|st|nd|rd)? quarter/i
656
- }, So = {
657
- any: [/1/i, /2/i, /3/i, /4/i]
658
656
  }, No = {
657
+ any: [/1/i, /2/i, /3/i, /4/i]
658
+ }, Co = {
659
659
  narrow: /^[jfmasond]/i,
660
660
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
661
661
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
662
- }, Co = {
662
+ }, xo = {
663
663
  narrow: [
664
664
  /^j/i,
665
665
  /^f/i,
@@ -688,18 +688,18 @@ const Do = /^(\d+)(th|st|nd|rd)?/i, vo = /\d+/i, ko = {
688
688
  /^n/i,
689
689
  /^d/i
690
690
  ]
691
- }, xo = {
691
+ }, Po = {
692
692
  narrow: /^[smtwf]/i,
693
693
  short: /^(su|mo|tu|we|th|fr|sa)/i,
694
694
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
695
695
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
696
- }, Po = {
696
+ }, To = {
697
697
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
698
698
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
699
- }, To = {
699
+ }, Yo = {
700
700
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
701
701
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
702
- }, Yo = {
702
+ }, Eo = {
703
703
  any: {
704
704
  am: /^a/i,
705
705
  pm: /^p/i,
@@ -710,50 +710,50 @@ const Do = /^(\d+)(th|st|nd|rd)?/i, vo = /\d+/i, ko = {
710
710
  evening: /evening/i,
711
711
  night: /night/i
712
712
  }
713
- }, Eo = {
714
- ordinalNumber: rn({
715
- matchPattern: Do,
716
- parsePattern: vo,
713
+ }, Fo = {
714
+ ordinalNumber: ln({
715
+ matchPattern: vo,
716
+ parsePattern: ko,
717
717
  valueCallback: (e) => parseInt(e, 10)
718
718
  }),
719
- era: we({
720
- matchPatterns: ko,
719
+ era: Me({
720
+ matchPatterns: Oo,
721
721
  defaultMatchWidth: "wide",
722
- parsePatterns: Oo,
722
+ parsePatterns: Wo,
723
723
  defaultParseWidth: "any"
724
724
  }),
725
- quarter: we({
726
- matchPatterns: Wo,
725
+ quarter: Me({
726
+ matchPatterns: So,
727
727
  defaultMatchWidth: "wide",
728
- parsePatterns: So,
728
+ parsePatterns: No,
729
729
  defaultParseWidth: "any",
730
730
  valueCallback: (e) => e + 1
731
731
  }),
732
- month: we({
733
- matchPatterns: No,
732
+ month: Me({
733
+ matchPatterns: Co,
734
734
  defaultMatchWidth: "wide",
735
- parsePatterns: Co,
735
+ parsePatterns: xo,
736
736
  defaultParseWidth: "any"
737
737
  }),
738
- day: we({
739
- matchPatterns: xo,
738
+ day: Me({
739
+ matchPatterns: Po,
740
740
  defaultMatchWidth: "wide",
741
- parsePatterns: Po,
741
+ parsePatterns: To,
742
742
  defaultParseWidth: "any"
743
743
  }),
744
- dayPeriod: we({
745
- matchPatterns: To,
744
+ dayPeriod: Me({
745
+ matchPatterns: Yo,
746
746
  defaultMatchWidth: "any",
747
- parsePatterns: Yo,
747
+ parsePatterns: Eo,
748
748
  defaultParseWidth: "any"
749
749
  })
750
- }, ze = {
750
+ }, Ve = {
751
751
  code: "en-US",
752
- formatDistance: oo,
753
- formatLong: io,
754
- formatRelative: lo,
755
- localize: bo,
756
- match: Eo,
752
+ formatDistance: ro,
753
+ formatLong: co,
754
+ formatRelative: uo,
755
+ localize: wo,
756
+ match: Fo,
757
757
  options: {
758
758
  weekStartsOn: 0,
759
759
  firstWeekContainsDate: 1
@@ -761,27 +761,27 @@ const Do = /^(\d+)(th|st|nd|rd)?/i, vo = /\d+/i, ko = {
761
761
  };
762
762
  function _o(e, t) {
763
763
  const o = B(e, t?.in);
764
- return Jt(o, nn(o)) + 1;
764
+ return xt(o, sn(o)) + 1;
765
765
  }
766
- function an(e, t) {
767
- const o = B(e, t?.in), n = +tt(o) - +qn(o);
768
- return Math.round(n / Ut) + 1;
766
+ function Pt(e, t) {
767
+ const o = B(e, t?.in), n = +nt(o) - +zn(o);
768
+ return Math.round(n / Jt) + 1;
769
769
  }
770
- function sn(e, t) {
771
- const o = B(e, t?.in), n = o.getFullYear(), r = ot(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, a = U(t?.in || e, 0);
772
- a.setFullYear(n + 1, 0, s), a.setHours(0, 0, 0, 0);
773
- const i = Xe(a, t), c = U(t?.in || e, 0);
774
- c.setFullYear(n, 0, s), c.setHours(0, 0, 0, 0);
775
- const u = Xe(c, t);
776
- return +o >= +i ? n + 1 : +o >= +u ? n : n - 1;
770
+ function un(e, t) {
771
+ const o = B(e, t?.in), n = o.getFullYear(), r = rt(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = Q(t?.in || e, 0);
772
+ s.setFullYear(n + 1, 0, i), s.setHours(0, 0, 0, 0);
773
+ const a = Le(s, t), c = Q(t?.in || e, 0);
774
+ c.setFullYear(n, 0, i), c.setHours(0, 0, 0, 0);
775
+ const l = Le(c, t);
776
+ return +o >= +a ? n + 1 : +o >= +l ? n : n - 1;
777
777
  }
778
- function Fo(e, t) {
779
- const o = ot(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, r = sn(e, t), s = U(t?.in || e, 0);
780
- return s.setFullYear(r, 0, n), s.setHours(0, 0, 0, 0), Xe(s, t);
778
+ function Io(e, t) {
779
+ const o = rt(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, r = un(e, t), i = Q(t?.in || e, 0);
780
+ return i.setFullYear(r, 0, n), i.setHours(0, 0, 0, 0), Le(i, t);
781
781
  }
782
- function cn(e, t) {
783
- const o = B(e, t?.in), n = +Xe(o, t) - +Fo(o, t);
784
- return Math.round(n / Ut) + 1;
782
+ function Tt(e, t) {
783
+ const o = B(e, t?.in), n = +Le(o, t) - +Io(o, t);
784
+ return Math.round(n / Jt) + 1;
785
785
  }
786
786
  function I(e, t) {
787
787
  const o = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
@@ -840,14 +840,14 @@ const Ye = {
840
840
  );
841
841
  return I(r, t.length);
842
842
  }
843
- }, Ge = {
843
+ }, ze = {
844
844
  midnight: "midnight",
845
845
  noon: "noon",
846
846
  morning: "morning",
847
847
  afternoon: "afternoon",
848
848
  evening: "evening",
849
849
  night: "night"
850
- }, $t = {
850
+ }, Rt = {
851
851
  // Era
852
852
  G: function(e, t, o) {
853
853
  const n = e.getFullYear() > 0 ? 1 : 0;
@@ -874,16 +874,16 @@ const Ye = {
874
874
  },
875
875
  // Local week-numbering year
876
876
  Y: function(e, t, o, n) {
877
- const r = sn(e, n), s = r > 0 ? r : 1 - r;
877
+ const r = un(e, n), i = r > 0 ? r : 1 - r;
878
878
  if (t === "YY") {
879
- const a = s % 100;
880
- return I(a, 2);
879
+ const s = i % 100;
880
+ return I(s, 2);
881
881
  }
882
- return t === "Yo" ? o.ordinalNumber(s, { unit: "year" }) : I(s, t.length);
882
+ return t === "Yo" ? o.ordinalNumber(i, { unit: "year" }) : I(i, t.length);
883
883
  },
884
884
  // ISO week-numbering year
885
885
  R: function(e, t) {
886
- const o = Kt(e);
886
+ const o = nn(e);
887
887
  return I(o, t.length);
888
888
  },
889
889
  // Extended year. This is a single number designating the year of this calendar system.
@@ -1020,12 +1020,12 @@ const Ye = {
1020
1020
  },
1021
1021
  // Local week of year
1022
1022
  w: function(e, t, o, n) {
1023
- const r = cn(e, n);
1023
+ const r = Tt(e, n);
1024
1024
  return t === "wo" ? o.ordinalNumber(r, { unit: "week" }) : I(r, t.length);
1025
1025
  },
1026
1026
  // ISO week of year
1027
1027
  I: function(e, t, o) {
1028
- const n = an(e);
1028
+ const n = Pt(e);
1029
1029
  return t === "Io" ? o.ordinalNumber(n, { unit: "week" }) : I(n, t.length);
1030
1030
  },
1031
1031
  // Day of the month
@@ -1070,17 +1070,17 @@ const Ye = {
1070
1070
  },
1071
1071
  // Local day of week
1072
1072
  e: function(e, t, o, n) {
1073
- const r = e.getDay(), s = (r - n.weekStartsOn + 8) % 7 || 7;
1073
+ const r = e.getDay(), i = (r - n.weekStartsOn + 8) % 7 || 7;
1074
1074
  switch (t) {
1075
1075
  // Numerical value (Nth day of week with current locale or weekStartsOn)
1076
1076
  case "e":
1077
- return String(s);
1077
+ return String(i);
1078
1078
  // Padded numerical value
1079
1079
  case "ee":
1080
- return I(s, 2);
1080
+ return I(i, 2);
1081
1081
  // 1st, 2nd, ..., 7th
1082
1082
  case "eo":
1083
- return o.ordinalNumber(s, { unit: "day" });
1083
+ return o.ordinalNumber(i, { unit: "day" });
1084
1084
  case "eee":
1085
1085
  return o.day(r, {
1086
1086
  width: "abbreviated",
@@ -1107,17 +1107,17 @@ const Ye = {
1107
1107
  },
1108
1108
  // Stand-alone local day of week
1109
1109
  c: function(e, t, o, n) {
1110
- const r = e.getDay(), s = (r - n.weekStartsOn + 8) % 7 || 7;
1110
+ const r = e.getDay(), i = (r - n.weekStartsOn + 8) % 7 || 7;
1111
1111
  switch (t) {
1112
1112
  // Numerical value (same as in `e`)
1113
1113
  case "c":
1114
- return String(s);
1114
+ return String(i);
1115
1115
  // Padded numerical value
1116
1116
  case "cc":
1117
- return I(s, t.length);
1117
+ return I(i, t.length);
1118
1118
  // 1st, 2nd, ..., 7th
1119
1119
  case "co":
1120
- return o.ordinalNumber(s, { unit: "day" });
1120
+ return o.ordinalNumber(i, { unit: "day" });
1121
1121
  case "ccc":
1122
1122
  return o.day(r, {
1123
1123
  width: "abbreviated",
@@ -1211,7 +1211,7 @@ const Ye = {
1211
1211
  b: function(e, t, o) {
1212
1212
  const n = e.getHours();
1213
1213
  let r;
1214
- switch (n === 12 ? r = Ge.noon : n === 0 ? r = Ge.midnight : r = n / 12 >= 1 ? "pm" : "am", t) {
1214
+ switch (n === 12 ? r = ze.noon : n === 0 ? r = ze.midnight : r = n / 12 >= 1 ? "pm" : "am", t) {
1215
1215
  case "b":
1216
1216
  case "bb":
1217
1217
  return o.dayPeriod(r, {
@@ -1239,7 +1239,7 @@ const Ye = {
1239
1239
  B: function(e, t, o) {
1240
1240
  const n = e.getHours();
1241
1241
  let r;
1242
- switch (n >= 17 ? r = Ge.evening : n >= 12 ? r = Ge.afternoon : n >= 4 ? r = Ge.morning : r = Ge.night, t) {
1242
+ switch (n >= 17 ? r = ze.evening : n >= 12 ? r = ze.afternoon : n >= 4 ? r = ze.morning : r = ze.night, t) {
1243
1243
  case "B":
1244
1244
  case "BB":
1245
1245
  case "BBB":
@@ -1301,7 +1301,7 @@ const Ye = {
1301
1301
  switch (t) {
1302
1302
  // Hours and optional minutes
1303
1303
  case "X":
1304
- return Ht(n);
1304
+ return Gt(n);
1305
1305
  // Hours, minutes and optional seconds without `:` delimiter
1306
1306
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1307
1307
  // so this token always has the same output as `XX`
@@ -1319,7 +1319,7 @@ const Ye = {
1319
1319
  switch (t) {
1320
1320
  // Hours and optional minutes
1321
1321
  case "x":
1322
- return Ht(n);
1322
+ return Gt(n);
1323
1323
  // Hours, minutes and optional seconds without `:` delimiter
1324
1324
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1325
1325
  // so this token always has the same output as `xx`
@@ -1339,7 +1339,7 @@ const Ye = {
1339
1339
  case "O":
1340
1340
  case "OO":
1341
1341
  case "OOO":
1342
- return "GMT" + At(n, ":");
1342
+ return "GMT" + zt(n, ":");
1343
1343
  default:
1344
1344
  return "GMT" + Ie(n, ":");
1345
1345
  }
@@ -1352,7 +1352,7 @@ const Ye = {
1352
1352
  case "z":
1353
1353
  case "zz":
1354
1354
  case "zzz":
1355
- return "GMT" + At(n, ":");
1355
+ return "GMT" + zt(n, ":");
1356
1356
  default:
1357
1357
  return "GMT" + Ie(n, ":");
1358
1358
  }
@@ -1367,18 +1367,18 @@ const Ye = {
1367
1367
  return I(+e, t.length);
1368
1368
  }
1369
1369
  };
1370
- function At(e, t = "") {
1371
- const o = e > 0 ? "-" : "+", n = Math.abs(e), r = Math.trunc(n / 60), s = n % 60;
1372
- return s === 0 ? o + String(r) : o + String(r) + t + I(s, 2);
1370
+ function zt(e, t = "") {
1371
+ const o = e > 0 ? "-" : "+", n = Math.abs(e), r = Math.trunc(n / 60), i = n % 60;
1372
+ return i === 0 ? o + String(r) : o + String(r) + t + I(i, 2);
1373
1373
  }
1374
- function Ht(e, t) {
1374
+ function Gt(e, t) {
1375
1375
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + I(Math.abs(e) / 60, 2) : Ie(e, t);
1376
1376
  }
1377
1377
  function Ie(e, t = "") {
1378
- const o = e > 0 ? "-" : "+", n = Math.abs(e), r = I(Math.trunc(n / 60), 2), s = I(n % 60, 2);
1379
- return o + r + t + s;
1378
+ const o = e > 0 ? "-" : "+", n = Math.abs(e), r = I(Math.trunc(n / 60), 2), i = I(n % 60, 2);
1379
+ return o + r + t + i;
1380
1380
  }
1381
- const qt = (e, t) => {
1381
+ const Vt = (e, t) => {
1382
1382
  switch (e) {
1383
1383
  case "P":
1384
1384
  return t.date({ width: "short" });
@@ -1389,7 +1389,7 @@ const qt = (e, t) => {
1389
1389
  default:
1390
1390
  return t.date({ width: "full" });
1391
1391
  }
1392
- }, ln = (e, t) => {
1392
+ }, dn = (e, t) => {
1393
1393
  switch (e) {
1394
1394
  case "p":
1395
1395
  return t.time({ width: "short" });
@@ -1400,105 +1400,105 @@ const qt = (e, t) => {
1400
1400
  default:
1401
1401
  return t.time({ width: "full" });
1402
1402
  }
1403
- }, Io = (e, t) => {
1403
+ }, Bo = (e, t) => {
1404
1404
  const o = e.match(/(P+)(p+)?/) || [], n = o[1], r = o[2];
1405
1405
  if (!r)
1406
- return qt(e, t);
1407
- let s;
1406
+ return Vt(e, t);
1407
+ let i;
1408
1408
  switch (n) {
1409
1409
  case "P":
1410
- s = t.dateTime({ width: "short" });
1410
+ i = t.dateTime({ width: "short" });
1411
1411
  break;
1412
1412
  case "PP":
1413
- s = t.dateTime({ width: "medium" });
1413
+ i = t.dateTime({ width: "medium" });
1414
1414
  break;
1415
1415
  case "PPP":
1416
- s = t.dateTime({ width: "long" });
1416
+ i = t.dateTime({ width: "long" });
1417
1417
  break;
1418
1418
  default:
1419
- s = t.dateTime({ width: "full" });
1419
+ i = t.dateTime({ width: "full" });
1420
1420
  break;
1421
1421
  }
1422
- return s.replace("{{date}}", qt(n, t)).replace("{{time}}", ln(r, t));
1423
- }, Bo = {
1424
- p: ln,
1425
- P: Io
1426
- }, jo = /^D+$/, $o = /^Y+$/, Ao = ["D", "DD", "YY", "YYYY"];
1427
- function Ho(e) {
1428
- return jo.test(e);
1429
- }
1422
+ return i.replace("{{date}}", Vt(n, t)).replace("{{time}}", dn(r, t));
1423
+ }, jo = {
1424
+ p: dn,
1425
+ P: Bo
1426
+ }, $o = /^D+$/, Ao = /^Y+$/, Ho = ["D", "DD", "YY", "YYYY"];
1430
1427
  function qo(e) {
1431
1428
  return $o.test(e);
1432
1429
  }
1433
- function Ro(e, t, o) {
1430
+ function Ro(e) {
1431
+ return Ao.test(e);
1432
+ }
1433
+ function zo(e, t, o) {
1434
1434
  const n = Go(e, t, o);
1435
- if (console.warn(n), Ao.includes(e)) throw new RangeError(n);
1435
+ if (console.warn(n), Ho.includes(e)) throw new RangeError(n);
1436
1436
  }
1437
1437
  function Go(e, t, o) {
1438
1438
  const n = e[0] === "Y" ? "years" : "days of the month";
1439
1439
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1440
1440
  }
1441
- const zo = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Vo = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xo = /^'([^]*?)'?$/, Qo = /''/g, Uo = /[a-zA-Z]/;
1442
- function Je(e, t, o) {
1443
- const n = ot(), r = o?.locale ?? n.locale ?? ze, s = o?.firstWeekContainsDate ?? o?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = o?.weekStartsOn ?? o?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = B(e, o?.in);
1444
- if (!Qn(i))
1441
+ const Vo = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Xo = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Lo = /^'([^]*?)'?$/, Qo = /''/g, Uo = /[a-zA-Z]/;
1442
+ function et(e, t, o) {
1443
+ const n = rt(), r = o?.locale ?? n.locale ?? Ve, i = o?.firstWeekContainsDate ?? o?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = o?.weekStartsOn ?? o?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = B(e, o?.in);
1444
+ if (!Un(a))
1445
1445
  throw new RangeError("Invalid time value");
1446
- let c = t.match(Vo).map((f) => {
1447
- const l = f[0];
1448
- if (l === "p" || l === "P") {
1449
- const d = Bo[l];
1450
- return d(f, r.formatLong);
1446
+ let c = t.match(Xo).map((d) => {
1447
+ const u = d[0];
1448
+ if (u === "p" || u === "P") {
1449
+ const f = jo[u];
1450
+ return f(d, r.formatLong);
1451
1451
  }
1452
- return f;
1453
- }).join("").match(zo).map((f) => {
1454
- if (f === "''")
1452
+ return d;
1453
+ }).join("").match(Vo).map((d) => {
1454
+ if (d === "''")
1455
1455
  return { isToken: !1, value: "'" };
1456
- const l = f[0];
1457
- if (l === "'")
1458
- return { isToken: !1, value: Lo(f) };
1459
- if ($t[l])
1460
- return { isToken: !0, value: f };
1461
- if (l.match(Uo))
1456
+ const u = d[0];
1457
+ if (u === "'")
1458
+ return { isToken: !1, value: Ko(d) };
1459
+ if (Rt[u])
1460
+ return { isToken: !0, value: d };
1461
+ if (u.match(Uo))
1462
1462
  throw new RangeError(
1463
- "Format string contains an unescaped latin alphabet character `" + l + "`"
1463
+ "Format string contains an unescaped latin alphabet character `" + u + "`"
1464
1464
  );
1465
- return { isToken: !1, value: f };
1465
+ return { isToken: !1, value: d };
1466
1466
  });
1467
- r.localize.preprocessor && (c = r.localize.preprocessor(i, c));
1468
- const u = {
1469
- firstWeekContainsDate: s,
1470
- weekStartsOn: a,
1467
+ r.localize.preprocessor && (c = r.localize.preprocessor(a, c));
1468
+ const l = {
1469
+ firstWeekContainsDate: i,
1470
+ weekStartsOn: s,
1471
1471
  locale: r
1472
1472
  };
1473
- return c.map((f) => {
1474
- if (!f.isToken) return f.value;
1475
- const l = f.value;
1476
- (!o?.useAdditionalWeekYearTokens && qo(l) || !o?.useAdditionalDayOfYearTokens && Ho(l)) && Ro(l, t, String(e));
1477
- const d = $t[l[0]];
1478
- return d(i, l, r.localize, u);
1473
+ return c.map((d) => {
1474
+ if (!d.isToken) return d.value;
1475
+ const u = d.value;
1476
+ (!o?.useAdditionalWeekYearTokens && Ro(u) || !o?.useAdditionalDayOfYearTokens && qo(u)) && zo(u, t, String(e));
1477
+ const f = Rt[u[0]];
1478
+ return f(a, u, r.localize, l);
1479
1479
  }).join("");
1480
1480
  }
1481
- function Lo(e) {
1482
- const t = e.match(Xo);
1481
+ function Ko(e) {
1482
+ const t = e.match(Lo);
1483
1483
  return t ? t[1].replace(Qo, "'") : e;
1484
1484
  }
1485
1485
  function Zo(e, t) {
1486
- const o = B(e, t?.in), n = o.getFullYear(), r = o.getMonth(), s = U(o, 0);
1487
- return s.setFullYear(n, r + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
1486
+ const o = B(e, t?.in), n = o.getFullYear(), r = o.getMonth(), i = Q(o, 0);
1487
+ return i.setFullYear(n, r + 1, 0), i.setHours(0, 0, 0, 0), i.getDate();
1488
1488
  }
1489
- function Ko(e, t) {
1489
+ function Jo(e, t) {
1490
1490
  return B(e, t?.in).getMonth();
1491
1491
  }
1492
- function Jo(e, t) {
1492
+ function er(e, t) {
1493
1493
  return B(e, t?.in).getFullYear();
1494
1494
  }
1495
- function er(e, t) {
1495
+ function tr(e, t) {
1496
1496
  return +B(e) > +B(t);
1497
1497
  }
1498
- function tr(e, t) {
1498
+ function nr(e, t) {
1499
1499
  return +B(e) < +B(t);
1500
1500
  }
1501
- function nr(e, t, o) {
1501
+ function or(e, t, o) {
1502
1502
  const [n, r] = Qe(
1503
1503
  o?.in,
1504
1504
  e,
@@ -1506,7 +1506,7 @@ function nr(e, t, o) {
1506
1506
  );
1507
1507
  return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
1508
1508
  }
1509
- function or(e, t, o) {
1509
+ function rr(e, t, o) {
1510
1510
  const [n, r] = Qe(
1511
1511
  o?.in,
1512
1512
  e,
@@ -1514,30 +1514,30 @@ function or(e, t, o) {
1514
1514
  );
1515
1515
  return n.getFullYear() === r.getFullYear();
1516
1516
  }
1517
- function rr(e, t, o) {
1518
- const n = B(e, o?.in), r = n.getFullYear(), s = n.getDate(), a = U(e, 0);
1519
- a.setFullYear(r, t, 15), a.setHours(0, 0, 0, 0);
1520
- const i = Zo(a);
1521
- return n.setMonth(t, Math.min(s, i)), n;
1522
- }
1523
1517
  function ar(e, t, o) {
1518
+ const n = B(e, o?.in), r = n.getFullYear(), i = n.getDate(), s = Q(e, 0);
1519
+ s.setFullYear(r, t, 15), s.setHours(0, 0, 0, 0);
1520
+ const a = Zo(s);
1521
+ return n.setMonth(t, Math.min(i, a)), n;
1522
+ }
1523
+ function sr(e, t, o) {
1524
1524
  const n = B(e, o?.in);
1525
- return isNaN(+n) ? U(e, NaN) : (n.setFullYear(t), n);
1525
+ return isNaN(+n) ? Q(e, NaN) : (n.setFullYear(t), n);
1526
1526
  }
1527
- const Rt = 5, sr = 4;
1528
- function ir(e, t) {
1529
- const o = t.startOfMonth(e), n = o.getDay() > 0 ? o.getDay() : 7, r = t.addDays(e, -n + 1), s = t.addDays(r, Rt * 7 - 1);
1530
- return t.getMonth(e) === t.getMonth(s) ? Rt : sr;
1527
+ const Xt = 5, ir = 4;
1528
+ function cr(e, t) {
1529
+ const o = t.startOfMonth(e), n = o.getDay() > 0 ? o.getDay() : 7, r = t.addDays(e, -n + 1), i = t.addDays(r, Xt * 7 - 1);
1530
+ return t.getMonth(e) === t.getMonth(i) ? Xt : ir;
1531
1531
  }
1532
- function un(e, t) {
1532
+ function fn(e, t) {
1533
1533
  const o = t.startOfMonth(e), n = o.getDay();
1534
1534
  return n === 1 ? o : n === 0 ? t.addDays(o, -6) : t.addDays(o, -1 * (n - 1));
1535
1535
  }
1536
- function cr(e, t) {
1537
- const o = un(e, t), n = ir(e, t);
1536
+ function lr(e, t) {
1537
+ const o = fn(e, t), n = cr(e, t);
1538
1538
  return t.addDays(o, n * 7 - 1);
1539
1539
  }
1540
- const lr = {
1540
+ const ur = {
1541
1541
  lessThanXSeconds: {
1542
1542
  one: "menos de un segundo",
1543
1543
  other: "menos de {{count}} segundos"
@@ -1599,16 +1599,16 @@ const lr = {
1599
1599
  one: "casi 1 año",
1600
1600
  other: "casi {{count}} años"
1601
1601
  }
1602
- }, ur = (e, t, o) => {
1602
+ }, dr = (e, t, o) => {
1603
1603
  let n;
1604
- const r = lr[e];
1604
+ const r = ur[e];
1605
1605
  return typeof r == "string" ? n = r : t === 1 ? n = r.one : n = r.other.replace("{{count}}", t.toString()), o?.addSuffix ? o.comparison && o.comparison > 0 ? "en " + n : "hace " + n : n;
1606
- }, dr = {
1606
+ }, fr = {
1607
1607
  full: "EEEE, d 'de' MMMM 'de' y",
1608
1608
  long: "d 'de' MMMM 'de' y",
1609
1609
  medium: "d MMM y",
1610
1610
  short: "dd/MM/y"
1611
- }, fr = {
1611
+ }, hr = {
1612
1612
  full: "HH:mm:ss zzzz",
1613
1613
  long: "HH:mm:ss z",
1614
1614
  medium: "HH:mm:ss",
@@ -1618,42 +1618,42 @@ const lr = {
1618
1618
  long: "{{date}} 'a las' {{time}}",
1619
1619
  medium: "{{date}}, {{time}}",
1620
1620
  short: "{{date}}, {{time}}"
1621
- }, hr = {
1622
- date: Ve({
1623
- formats: dr,
1621
+ }, yr = {
1622
+ date: Xe({
1623
+ formats: fr,
1624
1624
  defaultWidth: "full"
1625
1625
  }),
1626
- time: Ve({
1627
- formats: fr,
1626
+ time: Xe({
1627
+ formats: hr,
1628
1628
  defaultWidth: "full"
1629
1629
  }),
1630
- dateTime: Ve({
1630
+ dateTime: Xe({
1631
1631
  formats: mr,
1632
1632
  defaultWidth: "full"
1633
1633
  })
1634
- }, yr = {
1634
+ }, gr = {
1635
1635
  lastWeek: "'el' eeee 'pasado a la' p",
1636
1636
  yesterday: "'ayer a la' p",
1637
1637
  today: "'hoy a la' p",
1638
1638
  tomorrow: "'mañana a la' p",
1639
1639
  nextWeek: "eeee 'a la' p",
1640
1640
  other: "P"
1641
- }, gr = {
1641
+ }, pr = {
1642
1642
  lastWeek: "'el' eeee 'pasado a las' p",
1643
1643
  yesterday: "'ayer a las' p",
1644
1644
  today: "'hoy a las' p",
1645
1645
  tomorrow: "'mañana a las' p",
1646
1646
  nextWeek: "eeee 'a las' p",
1647
1647
  other: "P"
1648
- }, pr = (e, t, o, n) => t.getHours() !== 1 ? gr[e] : yr[e], br = {
1648
+ }, br = (e, t, o, n) => t.getHours() !== 1 ? pr[e] : gr[e], wr = {
1649
1649
  narrow: ["AC", "DC"],
1650
1650
  abbreviated: ["AC", "DC"],
1651
1651
  wide: ["antes de cristo", "después de cristo"]
1652
- }, wr = {
1652
+ }, Mr = {
1653
1653
  narrow: ["1", "2", "3", "4"],
1654
1654
  abbreviated: ["T1", "T2", "T3", "T4"],
1655
1655
  wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
1656
- }, Mr = {
1656
+ }, Dr = {
1657
1657
  narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
1658
1658
  abbreviated: [
1659
1659
  "ene",
@@ -1683,7 +1683,7 @@ const lr = {
1683
1683
  "noviembre",
1684
1684
  "diciembre"
1685
1685
  ]
1686
- }, Dr = {
1686
+ }, vr = {
1687
1687
  narrow: ["d", "l", "m", "m", "j", "v", "s"],
1688
1688
  short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
1689
1689
  abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
@@ -1696,7 +1696,7 @@ const lr = {
1696
1696
  "viernes",
1697
1697
  "sábado"
1698
1698
  ]
1699
- }, vr = {
1699
+ }, kr = {
1700
1700
  narrow: {
1701
1701
  am: "a",
1702
1702
  pm: "p",
@@ -1727,7 +1727,7 @@ const lr = {
1727
1727
  evening: "tarde",
1728
1728
  night: "noche"
1729
1729
  }
1730
- }, kr = {
1730
+ }, Or = {
1731
1731
  narrow: {
1732
1732
  am: "a",
1733
1733
  pm: "p",
@@ -1758,52 +1758,52 @@ const lr = {
1758
1758
  evening: "de la tarde",
1759
1759
  night: "de la noche"
1760
1760
  }
1761
- }, Or = (e, t) => Number(e) + "º", Wr = {
1762
- ordinalNumber: Or,
1763
- era: be({
1764
- values: br,
1761
+ }, Wr = (e, t) => Number(e) + "º", Sr = {
1762
+ ordinalNumber: Wr,
1763
+ era: we({
1764
+ values: wr,
1765
1765
  defaultWidth: "wide"
1766
1766
  }),
1767
- quarter: be({
1768
- values: wr,
1767
+ quarter: we({
1768
+ values: Mr,
1769
1769
  defaultWidth: "wide",
1770
1770
  argumentCallback: (e) => Number(e) - 1
1771
1771
  }),
1772
- month: be({
1773
- values: Mr,
1774
- defaultWidth: "wide"
1775
- }),
1776
- day: be({
1772
+ month: we({
1777
1773
  values: Dr,
1778
1774
  defaultWidth: "wide"
1779
1775
  }),
1780
- dayPeriod: be({
1776
+ day: we({
1781
1777
  values: vr,
1778
+ defaultWidth: "wide"
1779
+ }),
1780
+ dayPeriod: we({
1781
+ values: kr,
1782
1782
  defaultWidth: "wide",
1783
- formattingValues: kr,
1783
+ formattingValues: Or,
1784
1784
  defaultFormattingWidth: "wide"
1785
1785
  })
1786
- }, Sr = /^(\d+)(º)?/i, Nr = /\d+/i, Cr = {
1786
+ }, Nr = /^(\d+)(º)?/i, Cr = /\d+/i, xr = {
1787
1787
  narrow: /^(ac|dc|a|d)/i,
1788
1788
  abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
1789
1789
  wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
1790
- }, xr = {
1790
+ }, Pr = {
1791
1791
  any: [/^ac/i, /^dc/i],
1792
1792
  wide: [
1793
1793
  /^(antes de cristo|antes de la era com[uú]n)/i,
1794
1794
  /^(despu[eé]s de cristo|era com[uú]n)/i
1795
1795
  ]
1796
- }, Pr = {
1796
+ }, Tr = {
1797
1797
  narrow: /^[1234]/i,
1798
1798
  abbreviated: /^T[1234]/i,
1799
1799
  wide: /^[1234](º)? trimestre/i
1800
- }, Tr = {
1801
- any: [/1/i, /2/i, /3/i, /4/i]
1802
1800
  }, Yr = {
1801
+ any: [/1/i, /2/i, /3/i, /4/i]
1802
+ }, Er = {
1803
1803
  narrow: /^[efmajsond]/i,
1804
1804
  abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
1805
1805
  wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
1806
- }, Er = {
1806
+ }, Fr = {
1807
1807
  narrow: [
1808
1808
  /^e/i,
1809
1809
  /^f/i,
@@ -1837,13 +1837,13 @@ const lr = {
1837
1837
  short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
1838
1838
  abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
1839
1839
  wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
1840
- }, Fr = {
1840
+ }, Ir = {
1841
1841
  narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
1842
1842
  any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]
1843
- }, Ir = {
1843
+ }, Br = {
1844
1844
  narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
1845
1845
  any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
1846
- }, Br = {
1846
+ }, jr = {
1847
1847
  any: {
1848
1848
  am: /^a/i,
1849
1849
  pm: /^p/i,
@@ -1854,64 +1854,64 @@ const lr = {
1854
1854
  evening: /tarde/i,
1855
1855
  night: /noche/i
1856
1856
  }
1857
- }, jr = {
1858
- ordinalNumber: rn({
1859
- matchPattern: Sr,
1860
- parsePattern: Nr,
1857
+ }, $r = {
1858
+ ordinalNumber: ln({
1859
+ matchPattern: Nr,
1860
+ parsePattern: Cr,
1861
1861
  valueCallback: function(e) {
1862
1862
  return parseInt(e, 10);
1863
1863
  }
1864
1864
  }),
1865
- era: we({
1866
- matchPatterns: Cr,
1865
+ era: Me({
1866
+ matchPatterns: xr,
1867
1867
  defaultMatchWidth: "wide",
1868
- parsePatterns: xr,
1868
+ parsePatterns: Pr,
1869
1869
  defaultParseWidth: "any"
1870
1870
  }),
1871
- quarter: we({
1872
- matchPatterns: Pr,
1871
+ quarter: Me({
1872
+ matchPatterns: Tr,
1873
1873
  defaultMatchWidth: "wide",
1874
- parsePatterns: Tr,
1874
+ parsePatterns: Yr,
1875
1875
  defaultParseWidth: "any",
1876
1876
  valueCallback: (e) => e + 1
1877
1877
  }),
1878
- month: we({
1879
- matchPatterns: Yr,
1878
+ month: Me({
1879
+ matchPatterns: Er,
1880
1880
  defaultMatchWidth: "wide",
1881
- parsePatterns: Er,
1881
+ parsePatterns: Fr,
1882
1882
  defaultParseWidth: "any"
1883
1883
  }),
1884
- day: we({
1884
+ day: Me({
1885
1885
  matchPatterns: _r,
1886
1886
  defaultMatchWidth: "wide",
1887
- parsePatterns: Fr,
1887
+ parsePatterns: Ir,
1888
1888
  defaultParseWidth: "any"
1889
1889
  }),
1890
- dayPeriod: we({
1891
- matchPatterns: Ir,
1890
+ dayPeriod: Me({
1891
+ matchPatterns: Br,
1892
1892
  defaultMatchWidth: "any",
1893
- parsePatterns: Br,
1893
+ parsePatterns: jr,
1894
1894
  defaultParseWidth: "any"
1895
1895
  })
1896
- }, Mt = {
1896
+ }, Dt = {
1897
1897
  code: "es",
1898
- formatDistance: ur,
1899
- formatLong: hr,
1900
- formatRelative: pr,
1901
- localize: Wr,
1902
- match: jr,
1898
+ formatDistance: dr,
1899
+ formatLong: yr,
1900
+ formatRelative: br,
1901
+ localize: Sr,
1902
+ match: $r,
1903
1903
  options: {
1904
1904
  weekStartsOn: 1,
1905
1905
  firstWeekContainsDate: 1
1906
1906
  }
1907
- }, dn = {
1908
- ...ze,
1907
+ }, hn = {
1908
+ ...Ve,
1909
1909
  labels: {
1910
1910
  labelDayButton: (e, t, o, n) => {
1911
1911
  let r;
1912
- n && typeof n.format == "function" ? r = n.format.bind(n) : r = (a, i) => Je(a, i, { locale: ze, ...o });
1913
- let s = r(e, "PPPP");
1914
- return t.today && (s = `Today, ${s}`), t.selected && (s = `${s}, selected`), s;
1912
+ n && typeof n.format == "function" ? r = n.format.bind(n) : r = (s, a) => et(s, a, { locale: Ve, ...o });
1913
+ let i = r(e, "PPPP");
1914
+ return t.today && (i = `Today, ${i}`), t.selected && (i = `${i}, selected`), i;
1915
1915
  },
1916
1916
  labelMonthDropdown: "Choose the Month",
1917
1917
  labelNext: "Go to the Next Month",
@@ -1920,23 +1920,23 @@ const lr = {
1920
1920
  labelYearDropdown: "Choose the Year",
1921
1921
  labelGrid: (e, t, o) => {
1922
1922
  let n;
1923
- return o && typeof o.format == "function" ? n = o.format.bind(o) : n = (r, s) => Je(r, s, { locale: ze, ...t }), n(e, "LLLL yyyy");
1923
+ return o && typeof o.format == "function" ? n = o.format.bind(o) : n = (r, i) => et(r, i, { locale: Ve, ...t }), n(e, "LLLL yyyy");
1924
1924
  },
1925
1925
  labelGridcell: (e, t, o, n) => {
1926
1926
  let r;
1927
- n && typeof n.format == "function" ? r = n.format.bind(n) : r = (a, i) => Je(a, i, { locale: ze, ...o });
1928
- let s = r(e, "PPPP");
1929
- return t?.today && (s = `Today, ${s}`), s;
1927
+ n && typeof n.format == "function" ? r = n.format.bind(n) : r = (s, a) => et(s, a, { locale: Ve, ...o });
1928
+ let i = r(e, "PPPP");
1929
+ return t?.today && (i = `Today, ${i}`), i;
1930
1930
  },
1931
1931
  labelNav: "Navigation bar",
1932
1932
  labelWeekNumberHeader: "Week Number",
1933
1933
  labelWeekday: (e, t, o) => {
1934
1934
  let n;
1935
- return o && typeof o.format == "function" ? n = o.format.bind(o) : n = (r, s) => Je(r, s, { locale: ze, ...t }), n(e, "cccc");
1935
+ return o && typeof o.format == "function" ? n = o.format.bind(o) : n = (r, i) => et(r, i, { locale: Ve, ...t }), n(e, "cccc");
1936
1936
  }
1937
1937
  }
1938
1938
  };
1939
- class ie {
1939
+ class ce {
1940
1940
  /**
1941
1941
  * Creates an instance of `DateLib`.
1942
1942
  *
@@ -1944,18 +1944,18 @@ class ie {
1944
1944
  * @param overrides Custom overrides for the date library functions.
1945
1945
  */
1946
1946
  constructor(t, o) {
1947
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? Se.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, r, s) => this.overrides?.newDate ? this.overrides.newDate(n, r, s) : this.options.timeZone ? new Se(n, r, s, this.options.timeZone) : new Date(n, r, s), this.addDays = (n, r) => this.overrides?.addDays ? this.overrides.addDays(n, r) : Lt(n, r), this.addMonths = (n, r) => this.overrides?.addMonths ? this.overrides.addMonths(n, r) : Zt(n, r), this.addWeeks = (n, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, r) : Rn(n, r), this.addYears = (n, r) => this.overrides?.addYears ? this.overrides.addYears(n, r) : Gn(n, r), this.differenceInCalendarDays = (n, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, r) : Jt(n, r), this.differenceInCalendarMonths = (n, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, r) : Un(n, r), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : Zn(n), this.eachYearOfInterval = (n) => {
1948
- const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : eo(n), s = new Set(r.map((i) => this.getYear(i)));
1949
- if (s.size === r.length)
1947
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? J.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, r, i) => this.overrides?.newDate ? this.overrides.newDate(n, r, i) : this.options.timeZone ? new J(n, r, i, this.options.timeZone) : new Date(n, r, i), this.addDays = (n, r) => this.overrides?.addDays ? this.overrides.addDays(n, r) : en(n, r), this.addMonths = (n, r) => this.overrides?.addMonths ? this.overrides.addMonths(n, r) : tn(n, r), this.addWeeks = (n, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, r) : Gn(n, r), this.addYears = (n, r) => this.overrides?.addYears ? this.overrides.addYears(n, r) : Vn(n, r), this.differenceInCalendarDays = (n, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, r) : xt(n, r), this.differenceInCalendarMonths = (n, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, r) : rn(n, r), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : Zn(n), this.eachYearOfInterval = (n) => {
1948
+ const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : to(n), i = new Set(r.map((a) => this.getYear(a)));
1949
+ if (i.size === r.length)
1950
1950
  return r;
1951
- const a = [];
1952
- return s.forEach((i) => {
1953
- a.push(new Date(i, 0, 1));
1954
- }), a;
1955
- }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : cr(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : to(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : Ln(n), this.endOfWeek = (n, r) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, r) : on(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : Jn(n), this.format = (n, r, s) => {
1956
- const a = this.overrides?.format ? this.overrides.format(n, r, this.options) : Je(n, r, this.options);
1957
- return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
1958
- }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : an(n), this.getMonth = (n, r) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : Ko(n, this.options), this.getYear = (n, r) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : Jo(n, this.options), this.getWeek = (n, r) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : cn(n, this.options), this.isAfter = (n, r) => this.overrides?.isAfter ? this.overrides.isAfter(n, r) : er(n, r), this.isBefore = (n, r) => this.overrides?.isBefore ? this.overrides.isBefore(n, r) : tr(n, r), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : en(n), this.isSameDay = (n, r) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, r) : Xn(n, r), this.isSameMonth = (n, r) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, r) : nr(n, r), this.isSameYear = (n, r) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, r) : or(n, r), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : zn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : Vn(n), this.setMonth = (n, r) => this.overrides?.setMonth ? this.overrides.setMonth(n, r) : rr(n, r), this.setYear = (n, r) => this.overrides?.setYear ? this.overrides.setYear(n, r) : ar(n, r), this.startOfBroadcastWeek = (n, r) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : un(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : nt(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : tt(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : Kn(n), this.startOfWeek = (n, r) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : Xe(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : nn(n), this.options = { locale: dn, ...t }, this.overrides = o;
1951
+ const s = [];
1952
+ return i.forEach((a) => {
1953
+ s.push(new Date(a, 0, 1));
1954
+ }), s;
1955
+ }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : lr(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : no(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : Kn(n), this.endOfWeek = (n, r) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, r) : cn(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : eo(n), this.format = (n, r, i) => {
1956
+ const s = this.overrides?.format ? this.overrides.format(n, r, this.options) : et(n, r, this.options);
1957
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(s) : s;
1958
+ }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Pt(n), this.getMonth = (n, r) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : Jo(n, this.options), this.getYear = (n, r) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : er(n, this.options), this.getWeek = (n, r) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Tt(n, this.options), this.isAfter = (n, r) => this.overrides?.isAfter ? this.overrides.isAfter(n, r) : tr(n, r), this.isBefore = (n, r) => this.overrides?.isBefore ? this.overrides.isBefore(n, r) : nr(n, r), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : on(n), this.isSameDay = (n, r) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, r) : Qn(n, r), this.isSameMonth = (n, r) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, r) : or(n, r), this.isSameYear = (n, r) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, r) : rr(n, r), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : Xn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : Ln(n), this.setMonth = (n, r) => this.overrides?.setMonth ? this.overrides.setMonth(n, r) : ar(n, r), this.setYear = (n, r) => this.overrides?.setYear ? this.overrides.setYear(n, r) : sr(n, r), this.startOfBroadcastWeek = (n, r) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : fn(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : ot(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : nt(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : Jn(n), this.startOfWeek = (n, r) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : Le(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : sn(n), this.options = { locale: hn, ...t }, this.overrides = o;
1959
1959
  }
1960
1960
  /**
1961
1961
  * Generates a mapping of Arabic digits (0-9) to the target numbering system
@@ -1999,7 +1999,7 @@ class ie {
1999
1999
  */
2000
2000
  getMonthYearOrder() {
2001
2001
  const t = this.options.locale?.code;
2002
- return t && ie.yearFirstLocales.has(t) ? "year-first" : "month-first";
2002
+ return t && ce.yearFirstLocales.has(t) ? "year-first" : "month-first";
2003
2003
  }
2004
2004
  /**
2005
2005
  * Formats the month/year pair respecting locale conventions.
@@ -2007,10 +2007,10 @@ class ie {
2007
2007
  * @since 9.11.0
2008
2008
  */
2009
2009
  formatMonthYear(t) {
2010
- const { locale: o, timeZone: n, numerals: r } = this.options, s = o?.code;
2011
- if (s && ie.yearFirstLocales.has(s))
2010
+ const { locale: o, timeZone: n, numerals: r } = this.options, i = o?.code;
2011
+ if (i && ce.yearFirstLocales.has(i))
2012
2012
  try {
2013
- return new Intl.DateTimeFormat(s, {
2013
+ return new Intl.DateTimeFormat(i, {
2014
2014
  month: "long",
2015
2015
  year: "numeric",
2016
2016
  timeZone: n,
@@ -2018,11 +2018,11 @@ class ie {
2018
2018
  }).format(t);
2019
2019
  } catch {
2020
2020
  }
2021
- const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
2022
- return this.format(t, a);
2021
+ const s = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
2022
+ return this.format(t, s);
2023
2023
  }
2024
2024
  }
2025
- ie.yearFirstLocales = /* @__PURE__ */ new Set([
2025
+ ce.yearFirstLocales = /* @__PURE__ */ new Set([
2026
2026
  "eu",
2027
2027
  "hu",
2028
2028
  "ja",
@@ -2041,9 +2041,9 @@ ie.yearFirstLocales = /* @__PURE__ */ new Set([
2041
2041
  "zh-HK",
2042
2042
  "zh-TW"
2043
2043
  ]);
2044
- const De = new ie();
2045
- class fn {
2046
- constructor(t, o, n = De) {
2044
+ const ve = new ce();
2045
+ class mn {
2046
+ constructor(t, o, n = ve) {
2047
2047
  this.date = t, this.displayMonth = o, this.outside = !!(o && !n.isSameMonth(t, o)), this.dateLib = n, this.isoDate = n.format(t, "yyyy-MM-dd"), this.displayMonthId = n.format(o, "yyyy-MM"), this.dateMonthId = n.format(t, "yyyy-MM");
2048
2048
  }
2049
2049
  /**
@@ -2057,45 +2057,45 @@ class fn {
2057
2057
  return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
2058
2058
  }
2059
2059
  }
2060
- class $r {
2060
+ class Ar {
2061
2061
  constructor(t, o) {
2062
2062
  this.date = t, this.weeks = o;
2063
2063
  }
2064
2064
  }
2065
- class Ar {
2065
+ class Hr {
2066
2066
  constructor(t, o) {
2067
2067
  this.days = o, this.weekNumber = t;
2068
2068
  }
2069
2069
  }
2070
- function Hr(e) {
2071
- return m.createElement("button", { ...e });
2072
- }
2073
2070
  function qr(e) {
2074
- return m.createElement("span", { ...e });
2071
+ return h.createElement("button", { ...e });
2075
2072
  }
2076
2073
  function Rr(e) {
2074
+ return h.createElement("span", { ...e });
2075
+ }
2076
+ function zr(e) {
2077
2077
  const { size: t = 24, orientation: o = "left", className: n } = e;
2078
2078
  return (
2079
2079
  // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
2080
- m.createElement(
2080
+ h.createElement(
2081
2081
  "svg",
2082
2082
  { className: n, width: t, height: t, viewBox: "0 0 24 24" },
2083
- o === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
2084
- o === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
2085
- o === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
2086
- o === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
2083
+ o === "up" && h.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
2084
+ o === "down" && h.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
2085
+ o === "left" && h.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
2086
+ o === "right" && h.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
2087
2087
  )
2088
2088
  );
2089
2089
  }
2090
2090
  function Gr(e) {
2091
2091
  const { day: t, modifiers: o, ...n } = e;
2092
- return m.createElement("td", { ...n });
2092
+ return h.createElement("td", { ...n });
2093
2093
  }
2094
- function zr(e) {
2095
- const { day: t, modifiers: o, ...n } = e, r = m.useRef(null);
2096
- return m.useEffect(() => {
2094
+ function Vr(e) {
2095
+ const { day: t, modifiers: o, ...n } = e, r = h.useRef(null);
2096
+ return h.useEffect(() => {
2097
2097
  o.focused && r.current?.focus();
2098
- }, [o.focused]), m.createElement("button", { ref: r, ...n });
2098
+ }, [o.focused]), h.createElement("button", { ref: r, ...n });
2099
2099
  }
2100
2100
  var b;
2101
2101
  (function(e) {
@@ -2105,200 +2105,200 @@ var R;
2105
2105
  (function(e) {
2106
2106
  e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
2107
2107
  })(R || (R = {}));
2108
- var fe;
2108
+ var he;
2109
2109
  (function(e) {
2110
2110
  e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
2111
- })(fe || (fe = {}));
2112
- var ae;
2111
+ })(he || (he = {}));
2112
+ var se;
2113
2113
  (function(e) {
2114
2114
  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";
2115
- })(ae || (ae = {}));
2116
- function Vr(e) {
2117
- const { options: t, className: o, components: n, classNames: r, ...s } = e, a = [r[b.Dropdown], o].join(" "), i = t?.find(({ value: c }) => c === s.value);
2118
- return m.createElement(
2115
+ })(se || (se = {}));
2116
+ function Xr(e) {
2117
+ const { options: t, className: o, components: n, classNames: r, ...i } = e, s = [r[b.Dropdown], o].join(" "), a = t?.find(({ value: c }) => c === i.value);
2118
+ return h.createElement(
2119
2119
  "span",
2120
- { "data-disabled": s.disabled, className: r[b.DropdownRoot] },
2121
- m.createElement(n.Select, { className: a, ...s }, t?.map(({ value: c, label: u, disabled: f }) => m.createElement(n.Option, { key: c, value: c, disabled: f }, u))),
2122
- m.createElement(
2120
+ { "data-disabled": i.disabled, className: r[b.DropdownRoot] },
2121
+ h.createElement(n.Select, { className: s, ...i }, t?.map(({ value: c, label: l, disabled: d }) => h.createElement(n.Option, { key: c, value: c, disabled: d }, l))),
2122
+ h.createElement(
2123
2123
  "span",
2124
2124
  { className: r[b.CaptionLabel], "aria-hidden": !0 },
2125
- i?.label,
2126
- m.createElement(n.Chevron, { orientation: "down", size: 18, className: r[b.Chevron] })
2125
+ a?.label,
2126
+ h.createElement(n.Chevron, { orientation: "down", size: 18, className: r[b.Chevron] })
2127
2127
  )
2128
2128
  );
2129
2129
  }
2130
- function Xr(e) {
2131
- return m.createElement("div", { ...e });
2130
+ function Lr(e) {
2131
+ return h.createElement("div", { ...e });
2132
2132
  }
2133
2133
  function Qr(e) {
2134
- return m.createElement("div", { ...e });
2134
+ return h.createElement("div", { ...e });
2135
2135
  }
2136
2136
  function Ur(e) {
2137
2137
  const { calendarMonth: t, displayIndex: o, ...n } = e;
2138
- return m.createElement("div", { ...n }, e.children);
2138
+ return h.createElement("div", { ...n }, e.children);
2139
2139
  }
2140
- function Lr(e) {
2140
+ function Kr(e) {
2141
2141
  const { calendarMonth: t, displayIndex: o, ...n } = e;
2142
- return m.createElement("div", { ...n });
2142
+ return h.createElement("div", { ...n });
2143
2143
  }
2144
2144
  function Zr(e) {
2145
- return m.createElement("table", { ...e });
2145
+ return h.createElement("table", { ...e });
2146
2146
  }
2147
- function Kr(e) {
2148
- return m.createElement("div", { ...e });
2147
+ function Jr(e) {
2148
+ return h.createElement("div", { ...e });
2149
2149
  }
2150
- const mn = xn(void 0);
2151
- function rt() {
2152
- const e = Pn(mn);
2150
+ const yn = Tn(void 0);
2151
+ function at() {
2152
+ const e = Yn(yn);
2153
2153
  if (e === void 0)
2154
2154
  throw new Error("useDayPicker() must be used within a custom component.");
2155
2155
  return e;
2156
2156
  }
2157
- function Jr(e) {
2158
- const { components: t } = rt();
2159
- return m.createElement(t.Dropdown, { ...e });
2160
- }
2161
2157
  function ea(e) {
2162
- const { onPreviousClick: t, onNextClick: o, previousMonth: n, nextMonth: r, ...s } = e, { components: a, classNames: i, labels: { labelPrevious: c, labelNext: u } } = rt(), f = q((d) => {
2163
- r && o?.(d);
2164
- }, [r, o]), l = q((d) => {
2165
- n && t?.(d);
2158
+ const { components: t } = at();
2159
+ return h.createElement(t.Dropdown, { ...e });
2160
+ }
2161
+ function ta(e) {
2162
+ const { onPreviousClick: t, onNextClick: o, previousMonth: n, nextMonth: r, ...i } = e, { components: s, classNames: a, labels: { labelPrevious: c, labelNext: l } } = at(), d = q((f) => {
2163
+ r && o?.(f);
2164
+ }, [r, o]), u = q((f) => {
2165
+ n && t?.(f);
2166
2166
  }, [n, t]);
2167
- return m.createElement(
2167
+ return h.createElement(
2168
2168
  "nav",
2169
- { ...s },
2170
- m.createElement(
2171
- a.PreviousMonthButton,
2172
- { type: "button", className: i[b.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: l },
2173
- m.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: i[b.Chevron], orientation: "left" })
2169
+ { ...i },
2170
+ h.createElement(
2171
+ s.PreviousMonthButton,
2172
+ { type: "button", className: a[b.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: u },
2173
+ h.createElement(s.Chevron, { disabled: n ? void 0 : !0, className: a[b.Chevron], orientation: "left" })
2174
2174
  ),
2175
- m.createElement(
2176
- a.NextMonthButton,
2177
- { type: "button", className: i[b.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": u(r), onClick: f },
2178
- m.createElement(a.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: i[b.Chevron] })
2175
+ h.createElement(
2176
+ s.NextMonthButton,
2177
+ { type: "button", className: a[b.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": l(r), onClick: d },
2178
+ h.createElement(s.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: a[b.Chevron] })
2179
2179
  )
2180
2180
  );
2181
2181
  }
2182
- function ta(e) {
2183
- const { components: t } = rt();
2184
- return m.createElement(t.Button, { ...e });
2185
- }
2186
2182
  function na(e) {
2187
- return m.createElement("option", { ...e });
2183
+ const { components: t } = at();
2184
+ return h.createElement(t.Button, { ...e });
2188
2185
  }
2189
2186
  function oa(e) {
2190
- const { components: t } = rt();
2191
- return m.createElement(t.Button, { ...e });
2187
+ return h.createElement("option", { ...e });
2192
2188
  }
2193
2189
  function ra(e) {
2194
- const { rootRef: t, ...o } = e;
2195
- return m.createElement("div", { ...o, ref: t });
2190
+ const { components: t } = at();
2191
+ return h.createElement(t.Button, { ...e });
2196
2192
  }
2197
2193
  function aa(e) {
2198
- return m.createElement("select", { ...e });
2194
+ const { rootRef: t, ...o } = e;
2195
+ return h.createElement("div", { ...o, ref: t });
2199
2196
  }
2200
2197
  function sa(e) {
2201
- const { week: t, ...o } = e;
2202
- return m.createElement("tr", { ...o });
2198
+ return h.createElement("select", { ...e });
2203
2199
  }
2204
2200
  function ia(e) {
2205
- return m.createElement("th", { ...e });
2201
+ const { week: t, ...o } = e;
2202
+ return h.createElement("tr", { ...o });
2206
2203
  }
2207
2204
  function ca(e) {
2208
- return m.createElement(
2205
+ return h.createElement("th", { ...e });
2206
+ }
2207
+ function la(e) {
2208
+ return h.createElement(
2209
2209
  "thead",
2210
2210
  { "aria-hidden": !0 },
2211
- m.createElement("tr", { ...e })
2211
+ h.createElement("tr", { ...e })
2212
2212
  );
2213
2213
  }
2214
- function la(e) {
2215
- const { week: t, ...o } = e;
2216
- return m.createElement("th", { ...o });
2217
- }
2218
2214
  function ua(e) {
2219
- return m.createElement("th", { ...e });
2215
+ const { week: t, ...o } = e;
2216
+ return h.createElement("th", { ...o });
2220
2217
  }
2221
2218
  function da(e) {
2222
- return m.createElement("tbody", { ...e });
2219
+ return h.createElement("th", { ...e });
2223
2220
  }
2224
2221
  function fa(e) {
2225
- const { components: t } = rt();
2226
- return m.createElement(t.Dropdown, { ...e });
2222
+ return h.createElement("tbody", { ...e });
2223
+ }
2224
+ function ha(e) {
2225
+ const { components: t } = at();
2226
+ return h.createElement(t.Dropdown, { ...e });
2227
2227
  }
2228
2228
  const ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2229
2229
  __proto__: null,
2230
- Button: Hr,
2231
- CaptionLabel: qr,
2232
- Chevron: Rr,
2230
+ Button: qr,
2231
+ CaptionLabel: Rr,
2232
+ Chevron: zr,
2233
2233
  Day: Gr,
2234
- DayButton: zr,
2235
- Dropdown: Vr,
2236
- DropdownNav: Xr,
2234
+ DayButton: Vr,
2235
+ Dropdown: Xr,
2236
+ DropdownNav: Lr,
2237
2237
  Footer: Qr,
2238
2238
  Month: Ur,
2239
- MonthCaption: Lr,
2239
+ MonthCaption: Kr,
2240
2240
  MonthGrid: Zr,
2241
- Months: Kr,
2242
- MonthsDropdown: Jr,
2243
- Nav: ea,
2244
- NextMonthButton: ta,
2245
- Option: na,
2246
- PreviousMonthButton: oa,
2247
- Root: ra,
2248
- Select: aa,
2249
- Week: sa,
2250
- WeekNumber: la,
2251
- WeekNumberHeader: ua,
2252
- Weekday: ia,
2253
- Weekdays: ca,
2254
- Weeks: da,
2255
- YearsDropdown: fa
2241
+ Months: Jr,
2242
+ MonthsDropdown: ea,
2243
+ Nav: ta,
2244
+ NextMonthButton: na,
2245
+ Option: oa,
2246
+ PreviousMonthButton: ra,
2247
+ Root: aa,
2248
+ Select: sa,
2249
+ Week: ia,
2250
+ WeekNumber: ua,
2251
+ WeekNumberHeader: da,
2252
+ Weekday: ca,
2253
+ Weekdays: la,
2254
+ Weeks: fa,
2255
+ YearsDropdown: ha
2256
2256
  }, Symbol.toStringTag, { value: "Module" }));
2257
- function Ne(e, t, o = !1, n = De) {
2258
- let { from: r, to: s } = e;
2259
- const { differenceInCalendarDays: a, isSameDay: i } = n;
2260
- return r && s ? (a(s, r) < 0 && ([r, s] = [s, r]), a(t, r) >= (o ? 1 : 0) && a(s, t) >= (o ? 1 : 0)) : !o && s ? i(s, t) : !o && r ? i(r, t) : !1;
2257
+ function Ne(e, t, o = !1, n = ve) {
2258
+ let { from: r, to: i } = e;
2259
+ const { differenceInCalendarDays: s, isSameDay: a } = n;
2260
+ return r && i ? (s(i, r) < 0 && ([r, i] = [i, r]), s(t, r) >= (o ? 1 : 0) && s(i, t) >= (o ? 1 : 0)) : !o && i ? a(i, t) : !o && r ? a(r, t) : !1;
2261
2261
  }
2262
- function Ct(e) {
2262
+ function Yt(e) {
2263
2263
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
2264
2264
  }
2265
- function ut(e) {
2265
+ function dt(e) {
2266
2266
  return !!(e && typeof e == "object" && "from" in e);
2267
2267
  }
2268
- function xt(e) {
2268
+ function Et(e) {
2269
2269
  return !!(e && typeof e == "object" && "after" in e);
2270
2270
  }
2271
- function Pt(e) {
2271
+ function Ft(e) {
2272
2272
  return !!(e && typeof e == "object" && "before" in e);
2273
2273
  }
2274
- function hn(e) {
2274
+ function gn(e) {
2275
2275
  return !!(e && typeof e == "object" && "dayOfWeek" in e);
2276
2276
  }
2277
- function yn(e, t) {
2277
+ function pn(e, t) {
2278
2278
  return Array.isArray(e) && e.every(t.isDate);
2279
2279
  }
2280
- function Ce(e, t, o = De) {
2281
- const n = Array.isArray(t) ? t : [t], { isSameDay: r, differenceInCalendarDays: s, isAfter: a } = o;
2282
- return n.some((i) => {
2283
- if (typeof i == "boolean")
2284
- return i;
2285
- if (o.isDate(i))
2286
- return r(e, i);
2287
- if (yn(i, o))
2288
- return i.some((c) => r(e, c));
2289
- if (ut(i))
2290
- return Ne(i, e, !1, o);
2291
- if (hn(i))
2292
- return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
2293
- if (Ct(i)) {
2294
- const c = s(i.before, e), u = s(i.after, e), f = c > 0, l = u < 0;
2295
- return a(i.before, i.after) ? l && f : f || l;
2280
+ function Ce(e, t, o = ve) {
2281
+ const n = Array.isArray(t) ? t : [t], { isSameDay: r, differenceInCalendarDays: i, isAfter: s } = o;
2282
+ return n.some((a) => {
2283
+ if (typeof a == "boolean")
2284
+ return a;
2285
+ if (o.isDate(a))
2286
+ return r(e, a);
2287
+ if (pn(a, o))
2288
+ return a.some((c) => r(e, c));
2289
+ if (dt(a))
2290
+ return Ne(a, e, !1, o);
2291
+ if (gn(a))
2292
+ return Array.isArray(a.dayOfWeek) ? a.dayOfWeek.includes(e.getDay()) : a.dayOfWeek === e.getDay();
2293
+ if (Yt(a)) {
2294
+ const c = i(a.before, e), l = i(a.after, e), d = c > 0, u = l < 0;
2295
+ return s(a.before, a.after) ? u && d : d || u;
2296
2296
  }
2297
- return xt(i) ? s(e, i.after) > 0 : Pt(i) ? s(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
2297
+ return Et(a) ? i(e, a.after) > 0 : Ft(a) ? i(a.before, e) > 0 : typeof a == "function" ? a(e) : !1;
2298
2298
  });
2299
2299
  }
2300
- function ha(e, t, o, n, r) {
2301
- const { disabled: s, hidden: a, modifiers: i, showOutsideDays: c, broadcastCalendar: u, today: f = r.today() } = t, { isSameDay: l, isSameMonth: d, startOfMonth: M, isBefore: w, endOfMonth: C, isAfter: O } = r, v = o && M(o), g = n && C(n), p = {
2300
+ function ya(e, t, o, n, r) {
2301
+ const { disabled: i, hidden: s, modifiers: a, showOutsideDays: c, broadcastCalendar: l, today: d = r.today() } = t, { isSameDay: u, isSameMonth: f, startOfMonth: M, isBefore: w, endOfMonth: C, isAfter: W } = r, v = o && M(o), g = n && C(n), p = {
2302
2302
  [R.focused]: [],
2303
2303
  [R.outside]: [],
2304
2304
  [R.disabled]: [],
@@ -2306,11 +2306,11 @@ function ha(e, t, o, n, r) {
2306
2306
  [R.today]: []
2307
2307
  }, S = {};
2308
2308
  for (const D of e) {
2309
- const { date: y, displayMonth: k } = D, x = !!(k && !d(y, k)), j = !!(v && w(y, v)), E = !!(g && O(y, g)), K = !!(s && Ce(y, s, r)), V = !!(a && Ce(y, a, r)) || j || E || // Broadcast calendar will show outside days as default
2310
- !u && !c && x || u && c === !1 && x, G = l(y, f);
2311
- x && p.outside.push(D), K && p.disabled.push(D), V && p.hidden.push(D), G && p.today.push(D), i && Object.keys(i).forEach((F) => {
2312
- const me = i?.[F];
2313
- me && Ce(y, me, r) && (S[F] ? S[F].push(D) : S[F] = [D]);
2309
+ const { date: y, displayMonth: O } = D, x = !!(O && !f(y, O)), j = !!(v && w(y, v)), F = !!(g && W(y, g)), K = !!(i && Ce(y, i, r)), V = !!(s && Ce(y, s, r)) || j || F || // Broadcast calendar will show outside days as default
2310
+ !l && !c && x || l && c === !1 && x, z = u(y, d);
2311
+ x && p.outside.push(D), K && p.disabled.push(D), V && p.hidden.push(D), z && p.today.push(D), a && Object.keys(a).forEach((_) => {
2312
+ const me = a?.[_];
2313
+ me && Ce(y, me, r) && (S[_] ? S[_].push(D) : S[_] = [D]);
2314
2314
  });
2315
2315
  }
2316
2316
  return (D) => {
@@ -2320,30 +2320,30 @@ function ha(e, t, o, n, r) {
2320
2320
  [R.hidden]: !1,
2321
2321
  [R.outside]: !1,
2322
2322
  [R.today]: !1
2323
- }, k = {};
2323
+ }, O = {};
2324
2324
  for (const x in p) {
2325
2325
  const j = p[x];
2326
- y[x] = j.some((E) => E === D);
2326
+ y[x] = j.some((F) => F === D);
2327
2327
  }
2328
2328
  for (const x in S)
2329
- k[x] = S[x].some((j) => j === D);
2329
+ O[x] = S[x].some((j) => j === D);
2330
2330
  return {
2331
2331
  ...y,
2332
2332
  // custom modifiers should override all the previous ones
2333
- ...k
2333
+ ...O
2334
2334
  };
2335
2335
  };
2336
2336
  }
2337
- function ya(e, t, o = {}) {
2338
- return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [s]) => (o[s] ? r.push(o[s]) : t[R[s]] ? r.push(t[R[s]]) : t[fe[s]] && r.push(t[fe[s]]), r), [t[b.Day]]);
2337
+ function ga(e, t, o = {}) {
2338
+ return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [i]) => (o[i] ? r.push(o[i]) : t[R[i]] ? r.push(t[R[i]]) : t[he[i]] && r.push(t[he[i]]), r), [t[b.Day]]);
2339
2339
  }
2340
- function ga(e) {
2340
+ function pa(e) {
2341
2341
  return {
2342
2342
  ...ma,
2343
2343
  ...e
2344
2344
  };
2345
2345
  }
2346
- function pa(e) {
2346
+ function ba(e) {
2347
2347
  const t = {
2348
2348
  "data-mode": e.mode ?? void 0,
2349
2349
  "data-required": "required" in e ? e.required : void 0,
@@ -2356,137 +2356,137 @@ function pa(e) {
2356
2356
  o.startsWith("data-") && (t[o] = n);
2357
2357
  }), t;
2358
2358
  }
2359
- function ba() {
2359
+ function wa() {
2360
2360
  const e = {};
2361
2361
  for (const t in b)
2362
2362
  e[b[t]] = `rdp-${b[t]}`;
2363
2363
  for (const t in R)
2364
2364
  e[R[t]] = `rdp-${R[t]}`;
2365
- for (const t in fe)
2366
- e[fe[t]] = `rdp-${fe[t]}`;
2367
- for (const t in ae)
2368
- e[ae[t]] = `rdp-${ae[t]}`;
2365
+ for (const t in he)
2366
+ e[he[t]] = `rdp-${he[t]}`;
2367
+ for (const t in se)
2368
+ e[se[t]] = `rdp-${se[t]}`;
2369
2369
  return e;
2370
2370
  }
2371
- function gn(e, t, o) {
2372
- return (o ?? new ie(t)).formatMonthYear(e);
2371
+ function bn(e, t, o) {
2372
+ return (o ?? new ce(t)).formatMonthYear(e);
2373
2373
  }
2374
- const wa = gn;
2375
- function Ma(e, t, o) {
2376
- return (o ?? new ie(t)).format(e, "d");
2374
+ const Ma = bn;
2375
+ function Da(e, t, o) {
2376
+ return (o ?? new ce(t)).format(e, "d");
2377
2377
  }
2378
- function Da(e, t = De) {
2378
+ function va(e, t = ve) {
2379
2379
  return t.format(e, "LLLL");
2380
2380
  }
2381
- function va(e, t, o) {
2382
- return (o ?? new ie(t)).format(e, "cccccc");
2381
+ function ka(e, t, o) {
2382
+ return (o ?? new ce(t)).format(e, "cccccc");
2383
2383
  }
2384
- function ka(e, t = De) {
2384
+ function Oa(e, t = ve) {
2385
2385
  return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
2386
2386
  }
2387
- function Oa() {
2387
+ function Wa() {
2388
2388
  return "";
2389
2389
  }
2390
- function pn(e, t = De) {
2390
+ function wn(e, t = ve) {
2391
2391
  return t.format(e, "yyyy");
2392
2392
  }
2393
- const Wa = pn, Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2393
+ const Sa = wn, Na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2394
2394
  __proto__: null,
2395
- formatCaption: gn,
2396
- formatDay: Ma,
2397
- formatMonthCaption: wa,
2398
- formatMonthDropdown: Da,
2399
- formatWeekNumber: ka,
2400
- formatWeekNumberHeader: Oa,
2401
- formatWeekdayName: va,
2402
- formatYearCaption: Wa,
2403
- formatYearDropdown: pn
2395
+ formatCaption: bn,
2396
+ formatDay: Da,
2397
+ formatMonthCaption: Ma,
2398
+ formatMonthDropdown: va,
2399
+ formatWeekNumber: Oa,
2400
+ formatWeekNumberHeader: Wa,
2401
+ formatWeekdayName: ka,
2402
+ formatYearCaption: Sa,
2403
+ formatYearDropdown: wn
2404
2404
  }, Symbol.toStringTag, { value: "Module" }));
2405
- function Na(e) {
2405
+ function Ca(e) {
2406
2406
  return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
2407
- ...Sa,
2407
+ ...Na,
2408
2408
  ...e
2409
2409
  };
2410
2410
  }
2411
- function Tt(e, t, o, n) {
2412
- let r = (n ?? new ie(o)).format(e, "PPPP");
2411
+ function _t(e, t, o, n) {
2412
+ let r = (n ?? new ce(o)).format(e, "PPPP");
2413
2413
  return t.today && (r = `Today, ${r}`), t.selected && (r = `${r}, selected`), r;
2414
2414
  }
2415
- const Ca = Tt;
2416
- function Yt(e, t, o) {
2417
- return (o ?? new ie(t)).formatMonthYear(e);
2415
+ const xa = _t;
2416
+ function It(e, t, o) {
2417
+ return (o ?? new ce(t)).formatMonthYear(e);
2418
2418
  }
2419
- const xa = Yt;
2420
- function bn(e, t, o, n) {
2421
- let r = (n ?? new ie(o)).format(e, "PPPP");
2419
+ const Pa = It;
2420
+ function Mn(e, t, o, n) {
2421
+ let r = (n ?? new ce(o)).format(e, "PPPP");
2422
2422
  return t?.today && (r = `Today, ${r}`), r;
2423
2423
  }
2424
- function wn(e) {
2424
+ function Dn(e) {
2425
2425
  return "Choose the Month";
2426
2426
  }
2427
- function Mn() {
2427
+ function vn() {
2428
2428
  return "";
2429
2429
  }
2430
- const Pa = "Go to the Next Month";
2431
- function Dn(e, t) {
2432
- return Pa;
2430
+ const Ta = "Go to the Next Month";
2431
+ function kn(e, t) {
2432
+ return Ta;
2433
2433
  }
2434
- function vn(e) {
2434
+ function On(e) {
2435
2435
  return "Go to the Previous Month";
2436
2436
  }
2437
- function kn(e, t, o) {
2438
- return (o ?? new ie(t)).format(e, "cccc");
2437
+ function Wn(e, t, o) {
2438
+ return (o ?? new ce(t)).format(e, "cccc");
2439
2439
  }
2440
- function On(e, t) {
2440
+ function Sn(e, t) {
2441
2441
  return `Week ${e}`;
2442
2442
  }
2443
- function Wn(e) {
2443
+ function Nn(e) {
2444
2444
  return "Week Number";
2445
2445
  }
2446
- function Sn(e) {
2446
+ function Cn(e) {
2447
2447
  return "Choose the Year";
2448
2448
  }
2449
- const Ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2449
+ const Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2450
2450
  __proto__: null,
2451
- labelCaption: xa,
2452
- labelDay: Ca,
2453
- labelDayButton: Tt,
2454
- labelGrid: Yt,
2455
- labelGridcell: bn,
2456
- labelMonthDropdown: wn,
2457
- labelNav: Mn,
2458
- labelNext: Dn,
2459
- labelPrevious: vn,
2460
- labelWeekNumber: On,
2461
- labelWeekNumberHeader: Wn,
2462
- labelWeekday: kn,
2463
- labelYearDropdown: Sn
2464
- }, Symbol.toStringTag, { value: "Module" })), de = (e, t, o) => t || (o ? typeof o == "function" ? o : (...n) => o : e);
2465
- function Ya(e, t) {
2451
+ labelCaption: Pa,
2452
+ labelDay: xa,
2453
+ labelDayButton: _t,
2454
+ labelGrid: It,
2455
+ labelGridcell: Mn,
2456
+ labelMonthDropdown: Dn,
2457
+ labelNav: vn,
2458
+ labelNext: kn,
2459
+ labelPrevious: On,
2460
+ labelWeekNumber: Sn,
2461
+ labelWeekNumberHeader: Nn,
2462
+ labelWeekday: Wn,
2463
+ labelYearDropdown: Cn
2464
+ }, Symbol.toStringTag, { value: "Module" })), fe = (e, t, o) => t || (o ? typeof o == "function" ? o : (...n) => o : e);
2465
+ function Ea(e, t) {
2466
2466
  const o = t.locale?.labels ?? {};
2467
2467
  return {
2468
- ...Ta,
2468
+ ...Ya,
2469
2469
  ...e ?? {},
2470
- labelDayButton: de(Tt, e?.labelDayButton, o.labelDayButton),
2471
- labelMonthDropdown: de(wn, e?.labelMonthDropdown, o.labelMonthDropdown),
2472
- labelNext: de(Dn, e?.labelNext, o.labelNext),
2473
- labelPrevious: de(vn, e?.labelPrevious, o.labelPrevious),
2474
- labelWeekNumber: de(On, e?.labelWeekNumber, o.labelWeekNumber),
2475
- labelYearDropdown: de(Sn, e?.labelYearDropdown, o.labelYearDropdown),
2476
- labelGrid: de(Yt, e?.labelGrid, o.labelGrid),
2477
- labelGridcell: de(bn, e?.labelGridcell, o.labelGridcell),
2478
- labelNav: de(Mn, e?.labelNav, o.labelNav),
2479
- labelWeekNumberHeader: de(Wn, e?.labelWeekNumberHeader, o.labelWeekNumberHeader),
2480
- labelWeekday: de(kn, e?.labelWeekday, o.labelWeekday)
2470
+ labelDayButton: fe(_t, e?.labelDayButton, o.labelDayButton),
2471
+ labelMonthDropdown: fe(Dn, e?.labelMonthDropdown, o.labelMonthDropdown),
2472
+ labelNext: fe(kn, e?.labelNext, o.labelNext),
2473
+ labelPrevious: fe(On, e?.labelPrevious, o.labelPrevious),
2474
+ labelWeekNumber: fe(Sn, e?.labelWeekNumber, o.labelWeekNumber),
2475
+ labelYearDropdown: fe(Cn, e?.labelYearDropdown, o.labelYearDropdown),
2476
+ labelGrid: fe(It, e?.labelGrid, o.labelGrid),
2477
+ labelGridcell: fe(Mn, e?.labelGridcell, o.labelGridcell),
2478
+ labelNav: fe(vn, e?.labelNav, o.labelNav),
2479
+ labelWeekNumberHeader: fe(Nn, e?.labelWeekNumberHeader, o.labelWeekNumberHeader),
2480
+ labelWeekday: fe(Wn, e?.labelWeekday, o.labelWeekday)
2481
2481
  };
2482
2482
  }
2483
- function Ea(e, t, o, n, r) {
2484
- const { startOfMonth: s, startOfYear: a, endOfYear: i, eachMonthOfInterval: c, getMonth: u } = r;
2483
+ function Fa(e, t, o, n, r) {
2484
+ const { startOfMonth: i, startOfYear: s, endOfYear: a, eachMonthOfInterval: c, getMonth: l } = r;
2485
2485
  return c({
2486
- start: a(e),
2487
- end: i(e)
2488
- }).map((d) => {
2489
- const M = n.formatMonthDropdown(d, r), w = u(d), C = t && d < s(t) || o && d > s(o) || !1;
2486
+ start: s(e),
2487
+ end: a(e)
2488
+ }).map((f) => {
2489
+ const M = n.formatMonthDropdown(f, r), w = l(f), C = t && f < i(t) || o && f > i(o) || !1;
2490
2490
  return { value: w, label: M, disabled: C };
2491
2491
  });
2492
2492
  }
@@ -2499,206 +2499,301 @@ function _a(e, t = {}, o = {}) {
2499
2499
  };
2500
2500
  }), n;
2501
2501
  }
2502
- function Fa(e, t, o, n) {
2503
- const r = n ?? e.today(), s = o ? e.startOfBroadcastWeek(r, e) : t ? e.startOfISOWeek(r) : e.startOfWeek(r), a = [];
2504
- for (let i = 0; i < 7; i++) {
2505
- const c = e.addDays(s, i);
2506
- a.push(c);
2502
+ function Ia(e, t, o, n) {
2503
+ const r = n ?? e.today(), i = o ? e.startOfBroadcastWeek(r, e) : t ? e.startOfISOWeek(r) : e.startOfWeek(r), s = [];
2504
+ for (let a = 0; a < 7; a++) {
2505
+ const c = e.addDays(i, a);
2506
+ s.push(c);
2507
2507
  }
2508
- return a;
2508
+ return s;
2509
2509
  }
2510
- function Ia(e, t, o, n, r = !1) {
2510
+ function Ba(e, t, o, n, r = !1) {
2511
2511
  if (!e || !t)
2512
2512
  return;
2513
- const { startOfYear: s, endOfYear: a, eachYearOfInterval: i, getYear: c } = n, u = s(e), f = a(t), l = i({ start: u, end: f });
2514
- return r && l.reverse(), l.map((d) => {
2515
- const M = o.formatYearDropdown(d, n);
2513
+ const { startOfYear: i, endOfYear: s, eachYearOfInterval: a, getYear: c } = n, l = i(e), d = s(t), u = a({ start: l, end: d });
2514
+ return r && u.reverse(), u.map((f) => {
2515
+ const M = o.formatYearDropdown(f, n);
2516
2516
  return {
2517
- value: c(d),
2517
+ value: c(f),
2518
2518
  label: M,
2519
2519
  disabled: !1
2520
2520
  };
2521
2521
  });
2522
2522
  }
2523
- const at = (e) => e instanceof HTMLElement ? e : null, Dt = (e) => [
2523
+ function ja(e, t = {}) {
2524
+ const { weekStartsOn: o, locale: n } = t, r = o ?? n?.options?.weekStartsOn ?? 0, i = (a) => {
2525
+ const c = typeof a == "number" || typeof a == "string" ? new Date(a) : a;
2526
+ return new J(c.getFullYear(), c.getMonth(), c.getDate(), 12, 0, 0, e);
2527
+ }, s = (a) => {
2528
+ const c = i(a);
2529
+ return new Date(c.getFullYear(), c.getMonth(), c.getDate(), 0, 0, 0, 0);
2530
+ };
2531
+ return {
2532
+ today: () => i(J.tz(e)),
2533
+ newDate: (a, c, l) => new J(a, c, l, 12, 0, 0, e),
2534
+ startOfDay: (a) => i(a),
2535
+ startOfWeek: (a, c) => {
2536
+ const l = i(a), d = c?.weekStartsOn ?? r, u = (l.getDay() - d + 7) % 7;
2537
+ return l.setDate(l.getDate() - u), l;
2538
+ },
2539
+ startOfISOWeek: (a) => {
2540
+ const c = i(a), l = (c.getDay() - 1 + 7) % 7;
2541
+ return c.setDate(c.getDate() - l), c;
2542
+ },
2543
+ startOfMonth: (a) => {
2544
+ const c = i(a);
2545
+ return c.setDate(1), c;
2546
+ },
2547
+ startOfYear: (a) => {
2548
+ const c = i(a);
2549
+ return c.setMonth(0, 1), c;
2550
+ },
2551
+ endOfWeek: (a, c) => {
2552
+ const l = i(a), f = (((c?.weekStartsOn ?? r) + 6) % 7 - l.getDay() + 7) % 7;
2553
+ return l.setDate(l.getDate() + f), l;
2554
+ },
2555
+ endOfISOWeek: (a) => {
2556
+ const c = i(a), l = (7 - c.getDay()) % 7;
2557
+ return c.setDate(c.getDate() + l), c;
2558
+ },
2559
+ endOfMonth: (a) => {
2560
+ const c = i(a);
2561
+ return c.setMonth(c.getMonth() + 1, 0), c;
2562
+ },
2563
+ endOfYear: (a) => {
2564
+ const c = i(a);
2565
+ return c.setMonth(11, 31), c;
2566
+ },
2567
+ eachMonthOfInterval: (a) => {
2568
+ const c = i(a.start), l = i(a.end), d = [], u = new J(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), f = l.getFullYear() * 12 + l.getMonth();
2569
+ for (; u.getFullYear() * 12 + u.getMonth() <= f; )
2570
+ d.push(new J(u, e)), u.setMonth(u.getMonth() + 1, 1);
2571
+ return d;
2572
+ },
2573
+ // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
2574
+ // mutate the same TZDate, and return it.
2575
+ addDays: (a, c) => {
2576
+ const l = i(a);
2577
+ return l.setDate(l.getDate() + c), l;
2578
+ },
2579
+ addWeeks: (a, c) => {
2580
+ const l = i(a);
2581
+ return l.setDate(l.getDate() + c * 7), l;
2582
+ },
2583
+ addMonths: (a, c) => {
2584
+ const l = i(a);
2585
+ return l.setMonth(l.getMonth() + c), l;
2586
+ },
2587
+ addYears: (a, c) => {
2588
+ const l = i(a);
2589
+ return l.setFullYear(l.getFullYear() + c), l;
2590
+ },
2591
+ eachYearOfInterval: (a) => {
2592
+ const c = i(a.start), l = i(a.end), d = [], u = new J(c.getFullYear(), 0, 1, 12, 0, 0, e);
2593
+ for (; u.getFullYear() <= l.getFullYear(); )
2594
+ d.push(new J(u, e)), u.setFullYear(u.getFullYear() + 1, 0, 1);
2595
+ return d;
2596
+ },
2597
+ getWeek: (a, c) => {
2598
+ const l = s(a);
2599
+ return Tt(l, {
2600
+ weekStartsOn: c?.weekStartsOn ?? r,
2601
+ firstWeekContainsDate: c?.firstWeekContainsDate ?? n?.options?.firstWeekContainsDate ?? 1
2602
+ });
2603
+ },
2604
+ getISOWeek: (a) => {
2605
+ const c = s(a);
2606
+ return Pt(c);
2607
+ },
2608
+ differenceInCalendarDays: (a, c) => {
2609
+ const l = s(a), d = s(c);
2610
+ return xt(l, d);
2611
+ },
2612
+ differenceInCalendarMonths: (a, c) => {
2613
+ const l = s(a), d = s(c);
2614
+ return rn(l, d);
2615
+ }
2616
+ };
2617
+ }
2618
+ const st = (e) => e instanceof HTMLElement ? e : null, vt = (e) => [
2524
2619
  ...e.querySelectorAll("[data-animated-month]") ?? []
2525
- ], Ba = (e) => at(e.querySelector("[data-animated-month]")), vt = (e) => at(e.querySelector("[data-animated-caption]")), kt = (e) => at(e.querySelector("[data-animated-weeks]")), ja = (e) => at(e.querySelector("[data-animated-nav]")), $a = (e) => at(e.querySelector("[data-animated-weekdays]"));
2526
- function Aa(e, t, { classNames: o, months: n, focused: r, dateLib: s }) {
2527
- const a = Ee(null), i = Ee(n), c = Ee(!1);
2528
- Tn(() => {
2529
- const u = i.current;
2530
- if (i.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
2620
+ ], $a = (e) => st(e.querySelector("[data-animated-month]")), kt = (e) => st(e.querySelector("[data-animated-caption]")), Ot = (e) => st(e.querySelector("[data-animated-weeks]")), Aa = (e) => st(e.querySelector("[data-animated-nav]")), Ha = (e) => st(e.querySelector("[data-animated-weekdays]"));
2621
+ function qa(e, t, { classNames: o, months: n, focused: r, dateLib: i }) {
2622
+ const s = Ee(null), a = Ee(n), c = Ee(!1);
2623
+ En(() => {
2624
+ const l = a.current;
2625
+ if (a.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
2531
2626
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
2532
- n.length === 0 || u.length === 0 || n.length !== u.length)
2627
+ n.length === 0 || l.length === 0 || n.length !== l.length)
2533
2628
  return;
2534
- const f = s.isSameMonth(n[0].date, u[0].date), l = s.isAfter(n[0].date, u[0].date), d = l ? o[ae.caption_after_enter] : o[ae.caption_before_enter], M = l ? o[ae.weeks_after_enter] : o[ae.weeks_before_enter], w = a.current, C = e.current.cloneNode(!0);
2535
- if (C instanceof HTMLElement ? (Dt(C).forEach((p) => {
2629
+ const d = i.isSameMonth(n[0].date, l[0].date), u = i.isAfter(n[0].date, l[0].date), f = u ? o[se.caption_after_enter] : o[se.caption_before_enter], M = u ? o[se.weeks_after_enter] : o[se.weeks_before_enter], w = s.current, C = e.current.cloneNode(!0);
2630
+ if (C instanceof HTMLElement ? (vt(C).forEach((p) => {
2536
2631
  if (!(p instanceof HTMLElement))
2537
2632
  return;
2538
- const S = Ba(p);
2633
+ const S = $a(p);
2539
2634
  S && p.contains(S) && p.removeChild(S);
2540
- const D = vt(p);
2541
- D && D.classList.remove(d);
2542
- const y = kt(p);
2635
+ const D = kt(p);
2636
+ D && D.classList.remove(f);
2637
+ const y = Ot(p);
2543
2638
  y && y.classList.remove(M);
2544
- }), a.current = C) : a.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2639
+ }), s.current = C) : s.current = null, c.current || d || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2545
2640
  r)
2546
2641
  return;
2547
- const O = w instanceof HTMLElement ? Dt(w) : [], v = Dt(e.current);
2548
- if (v?.every((g) => g instanceof HTMLElement) && O && O.every((g) => g instanceof HTMLElement)) {
2642
+ const W = w instanceof HTMLElement ? vt(w) : [], v = vt(e.current);
2643
+ if (v?.every((g) => g instanceof HTMLElement) && W && W.every((g) => g instanceof HTMLElement)) {
2549
2644
  c.current = !0, e.current.style.isolation = "isolate";
2550
- const g = ja(e.current);
2645
+ const g = Aa(e.current);
2551
2646
  g && (g.style.zIndex = "1"), v.forEach((p, S) => {
2552
- const D = O[S];
2647
+ const D = W[S];
2553
2648
  if (!D)
2554
2649
  return;
2555
2650
  p.style.position = "relative", p.style.overflow = "hidden";
2556
- const y = vt(p);
2557
- y && y.classList.add(d);
2558
- const k = kt(p);
2559
- k && k.classList.add(M);
2651
+ const y = kt(p);
2652
+ y && y.classList.add(f);
2653
+ const O = Ot(p);
2654
+ O && O.classList.add(M);
2560
2655
  const x = () => {
2561
- c.current = !1, e.current && (e.current.style.isolation = ""), g && (g.style.zIndex = ""), y && y.classList.remove(d), k && k.classList.remove(M), p.style.position = "", p.style.overflow = "", p.contains(D) && p.removeChild(D);
2656
+ c.current = !1, e.current && (e.current.style.isolation = ""), g && (g.style.zIndex = ""), y && y.classList.remove(f), O && O.classList.remove(M), p.style.position = "", p.style.overflow = "", p.contains(D) && p.removeChild(D);
2562
2657
  };
2563
2658
  D.style.pointerEvents = "none", D.style.position = "absolute", D.style.overflow = "hidden", D.setAttribute("aria-hidden", "true");
2564
- const j = $a(D);
2659
+ const j = Ha(D);
2565
2660
  j && (j.style.opacity = "0");
2566
- const E = vt(D);
2567
- E && (E.classList.add(l ? o[ae.caption_before_exit] : o[ae.caption_after_exit]), E.addEventListener("animationend", x));
2568
- const K = kt(D);
2569
- K && K.classList.add(l ? o[ae.weeks_before_exit] : o[ae.weeks_after_exit]), p.insertBefore(D, p.firstChild);
2661
+ const F = kt(D);
2662
+ F && (F.classList.add(u ? o[se.caption_before_exit] : o[se.caption_after_exit]), F.addEventListener("animationend", x));
2663
+ const K = Ot(D);
2664
+ K && K.classList.add(u ? o[se.weeks_before_exit] : o[se.weeks_after_exit]), p.insertBefore(D, p.firstChild);
2570
2665
  });
2571
2666
  }
2572
2667
  });
2573
2668
  }
2574
- function Ha(e, t, o, n) {
2575
- const r = e[0], s = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: c } = o ?? {}, { addDays: u, differenceInCalendarDays: f, differenceInCalendarMonths: l, endOfBroadcastWeek: d, endOfISOWeek: M, endOfMonth: w, endOfWeek: C, isAfter: O, startOfBroadcastWeek: v, startOfISOWeek: g, startOfWeek: p } = n, S = c ? v(r, n) : a ? g(r) : p(r), D = c ? d(s) : a ? M(w(s)) : C(w(s)), y = t && (c ? d(t) : a ? M(t) : C(t)), k = y && O(D, y) ? y : D, x = f(k, S), j = l(s, r) + 1, E = [];
2576
- for (let G = 0; G <= x; G++) {
2577
- const F = u(S, G);
2578
- E.push(F);
2669
+ function Ra(e, t, o, n) {
2670
+ const r = e[0], i = e[e.length - 1], { ISOWeek: s, fixedWeeks: a, broadcastCalendar: c } = o ?? {}, { addDays: l, differenceInCalendarDays: d, differenceInCalendarMonths: u, endOfBroadcastWeek: f, endOfISOWeek: M, endOfMonth: w, endOfWeek: C, isAfter: W, startOfBroadcastWeek: v, startOfISOWeek: g, startOfWeek: p } = n, S = c ? v(r, n) : s ? g(r) : p(r), D = c ? f(i) : s ? M(w(i)) : C(w(i)), y = t && (c ? f(t) : s ? M(t) : C(t)), O = y && W(D, y) ? y : D, x = d(O, S), j = u(i, r) + 1, F = [];
2671
+ for (let z = 0; z <= x; z++) {
2672
+ const _ = l(S, z);
2673
+ F.push(_);
2579
2674
  }
2580
2675
  const V = (c ? 35 : 42) * j;
2581
- if (i && E.length < V) {
2582
- const G = V - E.length;
2583
- for (let F = 0; F < G; F++) {
2584
- const me = u(E[E.length - 1], 1);
2585
- E.push(me);
2676
+ if (a && F.length < V) {
2677
+ const z = V - F.length;
2678
+ for (let _ = 0; _ < z; _++) {
2679
+ const me = l(F[F.length - 1], 1);
2680
+ F.push(me);
2586
2681
  }
2587
2682
  }
2588
- return E;
2683
+ return F;
2589
2684
  }
2590
- function qa(e) {
2685
+ function za(e) {
2591
2686
  const t = [];
2592
2687
  return e.reduce((o, n) => {
2593
- const r = n.weeks.reduce((s, a) => s.concat(a.days.slice()), t.slice());
2688
+ const r = n.weeks.reduce((i, s) => i.concat(s.days.slice()), t.slice());
2594
2689
  return o.concat(r.slice());
2595
2690
  }, t.slice());
2596
2691
  }
2597
- function Ra(e, t, o, n) {
2598
- const { numberOfMonths: r = 1 } = o, s = [];
2599
- for (let a = 0; a < r; a++) {
2600
- const i = n.addMonths(e, a);
2601
- if (t && i > t)
2692
+ function Ga(e, t, o, n) {
2693
+ const { numberOfMonths: r = 1 } = o, i = [];
2694
+ for (let s = 0; s < r; s++) {
2695
+ const a = n.addMonths(e, s);
2696
+ if (t && a > t)
2602
2697
  break;
2603
- s.push(i);
2698
+ i.push(a);
2604
2699
  }
2605
- return s;
2606
- }
2607
- function Gt(e, t, o, n) {
2608
- const { month: r, defaultMonth: s, today: a = n.today(), numberOfMonths: i = 1 } = e;
2609
- let c = r || s || a;
2610
- const { differenceInCalendarMonths: u, addMonths: f, startOfMonth: l } = n;
2611
- if (o && u(o, c) < i - 1) {
2612
- const d = -1 * (i - 1);
2613
- c = f(o, d);
2700
+ return i;
2701
+ }
2702
+ function Lt(e, t, o, n) {
2703
+ const { month: r, defaultMonth: i, today: s = n.today(), numberOfMonths: a = 1 } = e;
2704
+ let c = r || i || s;
2705
+ const { differenceInCalendarMonths: l, addMonths: d, startOfMonth: u } = n;
2706
+ if (o && l(o, c) < a - 1) {
2707
+ const f = -1 * (a - 1);
2708
+ c = d(o, f);
2614
2709
  }
2615
- return t && u(c, t) < 0 && (c = t), l(c);
2710
+ return t && l(c, t) < 0 && (c = t), u(c);
2616
2711
  }
2617
- function Ga(e, t, o, n) {
2618
- const { addDays: r, endOfBroadcastWeek: s, endOfISOWeek: a, endOfMonth: i, endOfWeek: c, getISOWeek: u, getWeek: f, startOfBroadcastWeek: l, startOfISOWeek: d, startOfWeek: M } = n, w = e.reduce((C, O) => {
2619
- const v = o.broadcastCalendar ? l(O, n) : o.ISOWeek ? d(O) : M(O), g = o.broadcastCalendar ? s(O) : o.ISOWeek ? a(i(O)) : c(i(O)), p = t.filter((k) => k >= v && k <= g), S = o.broadcastCalendar ? 35 : 42;
2712
+ function Va(e, t, o, n) {
2713
+ const { addDays: r, endOfBroadcastWeek: i, endOfISOWeek: s, endOfMonth: a, endOfWeek: c, getISOWeek: l, getWeek: d, startOfBroadcastWeek: u, startOfISOWeek: f, startOfWeek: M } = n, w = e.reduce((C, W) => {
2714
+ const v = o.broadcastCalendar ? u(W, n) : o.ISOWeek ? f(W) : M(W), g = o.broadcastCalendar ? i(W) : o.ISOWeek ? s(a(W)) : c(a(W)), p = t.filter((O) => O >= v && O <= g), S = o.broadcastCalendar ? 35 : 42;
2620
2715
  if (o.fixedWeeks && p.length < S) {
2621
- const k = t.filter((x) => {
2716
+ const O = t.filter((x) => {
2622
2717
  const j = S - p.length;
2623
2718
  return x > g && x <= r(g, j);
2624
2719
  });
2625
- p.push(...k);
2720
+ p.push(...O);
2626
2721
  }
2627
- const D = p.reduce((k, x) => {
2628
- const j = o.ISOWeek ? u(x) : f(x), E = k.find((V) => V.weekNumber === j), K = new fn(x, O, n);
2629
- return E ? E.days.push(K) : k.push(new Ar(j, [K])), k;
2630
- }, []), y = new $r(O, D);
2722
+ const D = p.reduce((O, x) => {
2723
+ const j = o.ISOWeek ? l(x) : d(x), F = O.find((V) => V.weekNumber === j), K = new mn(x, W, n);
2724
+ return F ? F.days.push(K) : O.push(new Hr(j, [K])), O;
2725
+ }, []), y = new Ar(W, D);
2631
2726
  return C.push(y), C;
2632
2727
  }, []);
2633
2728
  return o.reverseMonths ? w.reverse() : w;
2634
2729
  }
2635
- function za(e, t) {
2730
+ function Xa(e, t) {
2636
2731
  let { startMonth: o, endMonth: n } = e;
2637
- const { startOfYear: r, startOfDay: s, startOfMonth: a, endOfMonth: i, addYears: c, endOfYear: u, newDate: f, today: l } = t, { fromYear: d, toYear: M, fromMonth: w, toMonth: C } = e;
2638
- !o && w && (o = w), !o && d && (o = t.newDate(d, 0, 1)), !n && C && (n = C), !n && M && (n = f(M, 11, 31));
2639
- const O = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2640
- return o ? o = a(o) : d ? o = f(d, 0, 1) : !o && O && (o = r(c(e.today ?? l(), -100))), n ? n = i(n) : M ? n = f(M, 11, 31) : !n && O && (n = u(e.today ?? l())), [
2641
- o && s(o),
2642
- n && s(n)
2732
+ const { startOfYear: r, startOfDay: i, startOfMonth: s, endOfMonth: a, addYears: c, endOfYear: l, newDate: d, today: u } = t, { fromYear: f, toYear: M, fromMonth: w, toMonth: C } = e;
2733
+ !o && w && (o = w), !o && f && (o = t.newDate(f, 0, 1)), !n && C && (n = C), !n && M && (n = d(M, 11, 31));
2734
+ const W = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2735
+ return o ? o = s(o) : f ? o = d(f, 0, 1) : !o && W && (o = r(c(e.today ?? u(), -100))), n ? n = a(n) : M ? n = d(M, 11, 31) : !n && W && (n = l(e.today ?? u())), [
2736
+ o && i(o),
2737
+ n && i(n)
2643
2738
  ];
2644
2739
  }
2645
- function Va(e, t, o, n) {
2740
+ function La(e, t, o, n) {
2646
2741
  if (o.disableNavigation)
2647
2742
  return;
2648
- const { pagedNavigation: r, numberOfMonths: s = 1 } = o, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: c } = n, u = r ? s : 1, f = a(e);
2743
+ const { pagedNavigation: r, numberOfMonths: i = 1 } = o, { startOfMonth: s, addMonths: a, differenceInCalendarMonths: c } = n, l = r ? i : 1, d = s(e);
2649
2744
  if (!t)
2650
- return i(f, u);
2651
- if (!(c(t, e) < s))
2652
- return i(f, u);
2745
+ return a(d, l);
2746
+ if (!(c(t, e) < i))
2747
+ return a(d, l);
2653
2748
  }
2654
- function Xa(e, t, o, n) {
2749
+ function Qa(e, t, o, n) {
2655
2750
  if (o.disableNavigation)
2656
2751
  return;
2657
- const { pagedNavigation: r, numberOfMonths: s } = o, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: c } = n, u = r ? s ?? 1 : 1, f = a(e);
2752
+ const { pagedNavigation: r, numberOfMonths: i } = o, { startOfMonth: s, addMonths: a, differenceInCalendarMonths: c } = n, l = r ? i ?? 1 : 1, d = s(e);
2658
2753
  if (!t)
2659
- return i(f, -u);
2660
- if (!(c(f, t) <= 0))
2661
- return i(f, -u);
2754
+ return a(d, -l);
2755
+ if (!(c(d, t) <= 0))
2756
+ return a(d, -l);
2662
2757
  }
2663
- function Qa(e) {
2758
+ function Ua(e) {
2664
2759
  const t = [];
2665
2760
  return e.reduce((o, n) => o.concat(n.weeks.slice()), t.slice());
2666
2761
  }
2667
- function dt(e, t) {
2668
- const [o, n] = We(e);
2762
+ function ft(e, t) {
2763
+ const [o, n] = Se(e);
2669
2764
  return [t === void 0 ? o : t, n];
2670
2765
  }
2671
- function Ua(e, t) {
2672
- const [o, n] = za(e, t), { startOfMonth: r, endOfMonth: s } = t, a = Gt(e, o, n, t), [i, c] = dt(
2673
- a,
2766
+ function Ka(e, t) {
2767
+ const [o, n] = Xa(e, t), { startOfMonth: r, endOfMonth: i } = t, s = Lt(e, o, n, t), [a, c] = ft(
2768
+ s,
2674
2769
  // initialMonth is always computed from props.month if provided
2675
- e.month ? a : void 0
2770
+ e.month ? s : void 0
2676
2771
  );
2677
- Fe(() => {
2678
- const S = Gt(e, o, n, t);
2772
+ _e(() => {
2773
+ const S = Lt(e, o, n, t);
2679
2774
  c(S);
2680
2775
  }, [e.timeZone]);
2681
- const { months: u, weeks: f, days: l, previousMonth: d, nextMonth: M } = se(() => {
2682
- const S = Ra(i, n, { numberOfMonths: e.numberOfMonths }, t), D = Ha(S, e.endMonth ? s(e.endMonth) : void 0, {
2776
+ const { months: l, weeks: d, days: u, previousMonth: f, nextMonth: M } = ie(() => {
2777
+ const S = Ga(a, n, { numberOfMonths: e.numberOfMonths }, t), D = Ra(S, e.endMonth ? i(e.endMonth) : void 0, {
2683
2778
  ISOWeek: e.ISOWeek,
2684
2779
  fixedWeeks: e.fixedWeeks,
2685
2780
  broadcastCalendar: e.broadcastCalendar
2686
- }, t), y = Ga(S, D, {
2781
+ }, t), y = Va(S, D, {
2687
2782
  broadcastCalendar: e.broadcastCalendar,
2688
2783
  fixedWeeks: e.fixedWeeks,
2689
2784
  ISOWeek: e.ISOWeek,
2690
2785
  reverseMonths: e.reverseMonths
2691
- }, t), k = Qa(y), x = qa(y), j = Xa(i, o, e, t), E = Va(i, n, e, t);
2786
+ }, t), O = Ua(y), x = za(y), j = Qa(a, o, e, t), F = La(a, n, e, t);
2692
2787
  return {
2693
2788
  months: y,
2694
- weeks: k,
2789
+ weeks: O,
2695
2790
  days: x,
2696
2791
  previousMonth: j,
2697
- nextMonth: E
2792
+ nextMonth: F
2698
2793
  };
2699
2794
  }, [
2700
2795
  t,
2701
- i.getTime(),
2796
+ a.getTime(),
2702
2797
  n?.getTime(),
2703
2798
  o?.getTime(),
2704
2799
  e.disableNavigation,
@@ -2709,178 +2804,178 @@ function Ua(e, t) {
2709
2804
  e.numberOfMonths,
2710
2805
  e.pagedNavigation,
2711
2806
  e.reverseMonths
2712
- ]), { disableNavigation: w, onMonthChange: C } = e, O = (S) => f.some((D) => D.days.some((y) => y.isEqualTo(S))), v = (S) => {
2807
+ ]), { disableNavigation: w, onMonthChange: C } = e, W = (S) => d.some((D) => D.days.some((y) => y.isEqualTo(S))), v = (S) => {
2713
2808
  if (w)
2714
2809
  return;
2715
2810
  let D = r(S);
2716
2811
  o && D < r(o) && (D = r(o)), n && D > r(n) && (D = r(n)), c(D), C?.(D);
2717
2812
  };
2718
2813
  return {
2719
- months: u,
2720
- weeks: f,
2721
- days: l,
2814
+ months: l,
2815
+ weeks: d,
2816
+ days: u,
2722
2817
  navStart: o,
2723
2818
  navEnd: n,
2724
- previousMonth: d,
2819
+ previousMonth: f,
2725
2820
  nextMonth: M,
2726
2821
  goToMonth: v,
2727
2822
  goToDay: (S) => {
2728
- O(S) || v(S.date);
2823
+ W(S) || v(S.date);
2729
2824
  }
2730
2825
  };
2731
2826
  }
2732
- var pe;
2827
+ var be;
2733
2828
  (function(e) {
2734
2829
  e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
2735
- })(pe || (pe = {}));
2736
- function zt(e) {
2830
+ })(be || (be = {}));
2831
+ function Qt(e) {
2737
2832
  return !e[R.disabled] && !e[R.hidden] && !e[R.outside];
2738
2833
  }
2739
- function La(e, t, o, n) {
2740
- let r, s = -1;
2741
- for (const a of e) {
2742
- const i = t(a);
2743
- zt(i) && (i[R.focused] && s < pe.FocusedModifier ? (r = a, s = pe.FocusedModifier) : n?.isEqualTo(a) && s < pe.LastFocused ? (r = a, s = pe.LastFocused) : o(a.date) && s < pe.Selected ? (r = a, s = pe.Selected) : i[R.today] && s < pe.Today && (r = a, s = pe.Today));
2834
+ function Za(e, t, o, n) {
2835
+ let r, i = -1;
2836
+ for (const s of e) {
2837
+ const a = t(s);
2838
+ Qt(a) && (a[R.focused] && i < be.FocusedModifier ? (r = s, i = be.FocusedModifier) : n?.isEqualTo(s) && i < be.LastFocused ? (r = s, i = be.LastFocused) : o(s.date) && i < be.Selected ? (r = s, i = be.Selected) : a[R.today] && i < be.Today && (r = s, i = be.Today));
2744
2839
  }
2745
- return r || (r = e.find((a) => zt(t(a)))), r;
2840
+ return r || (r = e.find((s) => Qt(t(s)))), r;
2746
2841
  }
2747
- function Za(e, t, o, n, r, s, a) {
2748
- const { ISOWeek: i, broadcastCalendar: c } = s, { addDays: u, addMonths: f, addWeeks: l, addYears: d, endOfBroadcastWeek: M, endOfISOWeek: w, endOfWeek: C, max: O, min: v, startOfBroadcastWeek: g, startOfISOWeek: p, startOfWeek: S } = a;
2842
+ function Ja(e, t, o, n, r, i, s) {
2843
+ const { ISOWeek: a, broadcastCalendar: c } = i, { addDays: l, addMonths: d, addWeeks: u, addYears: f, endOfBroadcastWeek: M, endOfISOWeek: w, endOfWeek: C, max: W, min: v, startOfBroadcastWeek: g, startOfISOWeek: p, startOfWeek: S } = s;
2749
2844
  let y = {
2750
- day: u,
2751
- week: l,
2752
- month: f,
2753
- year: d,
2754
- startOfWeek: (k) => c ? g(k, a) : i ? p(k) : S(k),
2755
- endOfWeek: (k) => c ? M(k) : i ? w(k) : C(k)
2845
+ day: l,
2846
+ week: u,
2847
+ month: d,
2848
+ year: f,
2849
+ startOfWeek: (O) => c ? g(O, s) : a ? p(O) : S(O),
2850
+ endOfWeek: (O) => c ? M(O) : a ? w(O) : C(O)
2756
2851
  }[e](o, t === "after" ? 1 : -1);
2757
- return t === "before" && n ? y = O([n, y]) : t === "after" && r && (y = v([r, y])), y;
2852
+ return t === "before" && n ? y = W([n, y]) : t === "after" && r && (y = v([r, y])), y;
2758
2853
  }
2759
- function Nn(e, t, o, n, r, s, a, i = 0) {
2760
- if (i > 365)
2854
+ function xn(e, t, o, n, r, i, s, a = 0) {
2855
+ if (a > 365)
2761
2856
  return;
2762
- const c = Za(e, t, o.date, n, r, s, a), u = !!(s.disabled && Ce(c, s.disabled, a)), f = !!(s.hidden && Ce(c, s.hidden, a)), l = c, d = new fn(c, l, a);
2763
- return !u && !f ? d : Nn(e, t, d, n, r, s, a, i + 1);
2857
+ const c = Ja(e, t, o.date, n, r, i, s), l = !!(i.disabled && Ce(c, i.disabled, s)), d = !!(i.hidden && Ce(c, i.hidden, s)), u = c, f = new mn(c, u, s);
2858
+ return !l && !d ? f : xn(e, t, f, n, r, i, s, a + 1);
2764
2859
  }
2765
- function Ka(e, t, o, n, r) {
2766
- const { autoFocus: s } = e, [a, i] = We(), c = La(t.days, o, n || (() => !1), a), [u, f] = We(s ? c : void 0);
2860
+ function es(e, t, o, n, r) {
2861
+ const { autoFocus: i } = e, [s, a] = Se(), c = Za(t.days, o, n || (() => !1), s), [l, d] = Se(i ? c : void 0);
2767
2862
  return {
2768
2863
  isFocusTarget: (C) => !!c?.isEqualTo(C),
2769
- setFocused: f,
2770
- focused: u,
2864
+ setFocused: d,
2865
+ focused: l,
2771
2866
  blur: () => {
2772
- i(u), f(void 0);
2867
+ a(l), d(void 0);
2773
2868
  },
2774
- moveFocus: (C, O) => {
2775
- if (!u)
2869
+ moveFocus: (C, W) => {
2870
+ if (!l)
2776
2871
  return;
2777
- const v = Nn(C, O, u, t.navStart, t.navEnd, e, r);
2778
- v && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(v)) || (t.goToDay(v), f(v)));
2872
+ const v = xn(C, W, l, t.navStart, t.navEnd, e, r);
2873
+ v && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(v)) || (t.goToDay(v), d(v)));
2779
2874
  }
2780
2875
  };
2781
2876
  }
2782
- function Ja(e, t) {
2783
- const { selected: o, required: n, onSelect: r } = e, [s, a] = dt(o, r ? o : void 0), i = r ? o : s, { isSameDay: c } = t, u = (M) => i?.some((w) => c(w, M)) ?? !1, { min: f, max: l } = e;
2877
+ function ts(e, t) {
2878
+ const { selected: o, required: n, onSelect: r } = e, [i, s] = ft(o, r ? o : void 0), a = r ? o : i, { isSameDay: c } = t, l = (M) => a?.some((w) => c(w, M)) ?? !1, { min: d, max: u } = e;
2784
2879
  return {
2785
- selected: i,
2880
+ selected: a,
2786
2881
  select: (M, w, C) => {
2787
- let O = [...i ?? []];
2788
- if (u(M)) {
2789
- if (i?.length === f || n && i?.length === 1)
2882
+ let W = [...a ?? []];
2883
+ if (l(M)) {
2884
+ if (a?.length === d || n && a?.length === 1)
2790
2885
  return;
2791
- O = i?.filter((v) => !c(v, M));
2886
+ W = a?.filter((v) => !c(v, M));
2792
2887
  } else
2793
- i?.length === l ? O = [M] : O = [...O, M];
2794
- return r || a(O), r?.(O, M, w, C), O;
2888
+ a?.length === u ? W = [M] : W = [...W, M];
2889
+ return r || s(W), r?.(W, M, w, C), W;
2795
2890
  },
2796
- isSelected: u
2891
+ isSelected: l
2797
2892
  };
2798
2893
  }
2799
- function es(e, t, o = 0, n = 0, r = !1, s = De) {
2800
- const { from: a, to: i } = t || {}, { isSameDay: c, isAfter: u, isBefore: f } = s;
2801
- let l;
2802
- if (!a && !i)
2803
- l = { from: e, to: o > 0 ? void 0 : e };
2804
- else if (a && !i)
2805
- c(a, e) ? o === 0 ? l = { from: a, to: e } : r ? l = { from: a, to: void 0 } : l = void 0 : f(e, a) ? l = { from: e, to: a } : l = { from: a, to: e };
2806
- else if (a && i)
2807
- if (c(a, e) && c(i, e))
2808
- r ? l = { from: a, to: i } : l = void 0;
2894
+ function ns(e, t, o = 0, n = 0, r = !1, i = ve) {
2895
+ const { from: s, to: a } = t || {}, { isSameDay: c, isAfter: l, isBefore: d } = i;
2896
+ let u;
2897
+ if (!s && !a)
2898
+ u = { from: e, to: o > 0 ? void 0 : e };
2899
+ else if (s && !a)
2900
+ c(s, e) ? o === 0 ? u = { from: s, to: e } : r ? u = { from: s, to: void 0 } : u = void 0 : d(e, s) ? u = { from: e, to: s } : u = { from: s, to: e };
2901
+ else if (s && a)
2902
+ if (c(s, e) && c(a, e))
2903
+ r ? u = { from: s, to: a } : u = void 0;
2904
+ else if (c(s, e))
2905
+ u = { from: s, to: o > 0 ? void 0 : e };
2809
2906
  else if (c(a, e))
2810
- l = { from: a, to: o > 0 ? void 0 : e };
2811
- else if (c(i, e))
2812
- l = { from: e, to: o > 0 ? void 0 : e };
2813
- else if (f(e, a))
2814
- l = { from: e, to: i };
2815
- else if (u(e, a))
2816
- l = { from: a, to: e };
2817
- else if (u(e, i))
2818
- l = { from: a, to: e };
2907
+ u = { from: e, to: o > 0 ? void 0 : e };
2908
+ else if (d(e, s))
2909
+ u = { from: e, to: a };
2910
+ else if (l(e, s))
2911
+ u = { from: s, to: e };
2912
+ else if (l(e, a))
2913
+ u = { from: s, to: e };
2819
2914
  else
2820
2915
  throw new Error("Invalid range");
2821
- if (l?.from && l?.to) {
2822
- const d = s.differenceInCalendarDays(l.to, l.from);
2823
- n > 0 && d > n ? l = { from: e, to: void 0 } : o > 1 && d < o && (l = { from: e, to: void 0 });
2916
+ if (u?.from && u?.to) {
2917
+ const f = i.differenceInCalendarDays(u.to, u.from);
2918
+ n > 0 && f > n ? u = { from: e, to: void 0 } : o > 1 && f < o && (u = { from: e, to: void 0 });
2824
2919
  }
2825
- return l;
2920
+ return u;
2826
2921
  }
2827
- function ts(e, t, o = De) {
2922
+ function os(e, t, o = ve) {
2828
2923
  const n = Array.isArray(t) ? t : [t];
2829
2924
  let r = e.from;
2830
- const s = o.differenceInCalendarDays(e.to, e.from), a = Math.min(s, 6);
2831
- for (let i = 0; i <= a; i++) {
2925
+ const i = o.differenceInCalendarDays(e.to, e.from), s = Math.min(i, 6);
2926
+ for (let a = 0; a <= s; a++) {
2832
2927
  if (n.includes(r.getDay()))
2833
2928
  return !0;
2834
2929
  r = o.addDays(r, 1);
2835
2930
  }
2836
2931
  return !1;
2837
2932
  }
2838
- function Vt(e, t, o = De) {
2933
+ function Ut(e, t, o = ve) {
2839
2934
  return Ne(e, t.from, !1, o) || Ne(e, t.to, !1, o) || Ne(t, e.from, !1, o) || Ne(t, e.to, !1, o);
2840
2935
  }
2841
- function ns(e, t, o = De) {
2936
+ function rs(e, t, o = ve) {
2842
2937
  const n = Array.isArray(t) ? t : [t];
2843
- if (n.filter((i) => typeof i != "function").some((i) => typeof i == "boolean" ? i : o.isDate(i) ? Ne(e, i, !1, o) : yn(i, o) ? i.some((c) => Ne(e, c, !1, o)) : ut(i) ? i.from && i.to ? Vt(e, { from: i.from, to: i.to }, o) : !1 : hn(i) ? ts(e, i.dayOfWeek, o) : Ct(i) ? o.isAfter(i.before, i.after) ? Vt(e, {
2844
- from: o.addDays(i.after, 1),
2845
- to: o.addDays(i.before, -1)
2846
- }, o) : Ce(e.from, i, o) || Ce(e.to, i, o) : xt(i) || Pt(i) ? Ce(e.from, i, o) || Ce(e.to, i, o) : !1))
2938
+ if (n.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : o.isDate(a) ? Ne(e, a, !1, o) : pn(a, o) ? a.some((c) => Ne(e, c, !1, o)) : dt(a) ? a.from && a.to ? Ut(e, { from: a.from, to: a.to }, o) : !1 : gn(a) ? os(e, a.dayOfWeek, o) : Yt(a) ? o.isAfter(a.before, a.after) ? Ut(e, {
2939
+ from: o.addDays(a.after, 1),
2940
+ to: o.addDays(a.before, -1)
2941
+ }, o) : Ce(e.from, a, o) || Ce(e.to, a, o) : Et(a) || Ft(a) ? Ce(e.from, a, o) || Ce(e.to, a, o) : !1))
2847
2942
  return !0;
2848
- const a = n.filter((i) => typeof i == "function");
2849
- if (a.length) {
2850
- let i = e.from;
2943
+ const s = n.filter((a) => typeof a == "function");
2944
+ if (s.length) {
2945
+ let a = e.from;
2851
2946
  const c = o.differenceInCalendarDays(e.to, e.from);
2852
- for (let u = 0; u <= c; u++) {
2853
- if (a.some((f) => f(i)))
2947
+ for (let l = 0; l <= c; l++) {
2948
+ if (s.some((d) => d(a)))
2854
2949
  return !0;
2855
- i = o.addDays(i, 1);
2950
+ a = o.addDays(a, 1);
2856
2951
  }
2857
2952
  }
2858
2953
  return !1;
2859
2954
  }
2860
- function os(e, t) {
2861
- const { disabled: o, excludeDisabled: n, selected: r, required: s, onSelect: a } = e, [i, c] = dt(r, a ? r : void 0), u = a ? r : i;
2955
+ function as(e, t) {
2956
+ const { disabled: o, excludeDisabled: n, selected: r, required: i, onSelect: s } = e, [a, c] = ft(r, s ? r : void 0), l = s ? r : a;
2862
2957
  return {
2863
- selected: u,
2864
- select: (d, M, w) => {
2865
- const { min: C, max: O } = e, v = d ? es(d, u, C, O, s, t) : void 0;
2866
- return n && o && v?.from && v.to && ns({ from: v.from, to: v.to }, o, t) && (v.from = d, v.to = void 0), a || c(v), a?.(v, d, M, w), v;
2958
+ selected: l,
2959
+ select: (f, M, w) => {
2960
+ const { min: C, max: W } = e, v = f ? ns(f, l, C, W, i, t) : void 0;
2961
+ return n && o && v?.from && v.to && rs({ from: v.from, to: v.to }, o, t) && (v.from = f, v.to = void 0), s || c(v), s?.(v, f, M, w), v;
2867
2962
  },
2868
- isSelected: (d) => u && Ne(u, d, !1, t)
2963
+ isSelected: (f) => l && Ne(l, f, !1, t)
2869
2964
  };
2870
2965
  }
2871
- function rs(e, t) {
2872
- const { selected: o, required: n, onSelect: r } = e, [s, a] = dt(o, r ? o : void 0), i = r ? o : s, { isSameDay: c } = t;
2966
+ function ss(e, t) {
2967
+ const { selected: o, required: n, onSelect: r } = e, [i, s] = ft(o, r ? o : void 0), a = r ? o : i, { isSameDay: c } = t;
2873
2968
  return {
2874
- selected: i,
2875
- select: (l, d, M) => {
2876
- let w = l;
2877
- return !n && i && i && c(l, i) && (w = void 0), r || a(w), r?.(w, l, d, M), w;
2969
+ selected: a,
2970
+ select: (u, f, M) => {
2971
+ let w = u;
2972
+ return !n && a && a && c(u, a) && (w = void 0), r || s(w), r?.(w, u, f, M), w;
2878
2973
  },
2879
- isSelected: (l) => i ? c(i, l) : !1
2974
+ isSelected: (u) => a ? c(a, u) : !1
2880
2975
  };
2881
2976
  }
2882
- function as(e, t) {
2883
- const o = rs(e, t), n = Ja(e, t), r = os(e, t);
2977
+ function is(e, t) {
2978
+ const o = ss(e, t), n = ts(e, t), r = as(e, t);
2884
2979
  switch (e.mode) {
2885
2980
  case "single":
2886
2981
  return o;
@@ -2892,58 +2987,64 @@ function as(e, t) {
2892
2987
  return;
2893
2988
  }
2894
2989
  }
2895
- function Z(e, t) {
2896
- return e instanceof Se && e.timeZone === t ? e : new Se(e, t);
2990
+ function de(e, t) {
2991
+ return e instanceof J && e.timeZone === t ? e : new J(e, t);
2992
+ }
2993
+ function Ge(e, t, o) {
2994
+ return de(e, t);
2897
2995
  }
2898
- function Xt(e, t) {
2899
- return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? Z(e, t) : Array.isArray(e) ? e.map((o) => o instanceof Date ? Z(o, t) : o) : ut(e) ? {
2996
+ function Kt(e, t, o) {
2997
+ return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? Ge(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? Ge(n, t) : n) : dt(e) ? {
2900
2998
  ...e,
2901
- from: e.from ? Z(e.from, t) : e.from,
2902
- to: e.to ? Z(e.to, t) : e.to
2903
- } : Ct(e) ? {
2904
- before: Z(e.before, t),
2905
- after: Z(e.after, t)
2906
- } : xt(e) ? {
2907
- after: Z(e.after, t)
2908
- } : Pt(e) ? {
2909
- before: Z(e.before, t)
2999
+ from: e.from ? de(e.from, t) : e.from,
3000
+ to: e.to ? de(e.to, t) : e.to
3001
+ } : Yt(e) ? {
3002
+ before: Ge(e.before, t),
3003
+ after: Ge(e.after, t)
3004
+ } : Et(e) ? {
3005
+ after: Ge(e.after, t)
3006
+ } : Ft(e) ? {
3007
+ before: Ge(e.before, t)
2910
3008
  } : e;
2911
3009
  }
2912
- function Ot(e, t) {
2913
- return e && (Array.isArray(e) ? e.map((o) => Xt(o, t)) : Xt(e, t));
3010
+ function Wt(e, t, o) {
3011
+ return e && (Array.isArray(e) ? e.map((n) => Kt(n, t)) : Kt(e, t));
2914
3012
  }
2915
- function Wt(e) {
3013
+ function St(e) {
2916
3014
  let t = e;
2917
3015
  const o = t.timeZone;
2918
3016
  if (o && (t = {
2919
3017
  ...e,
2920
3018
  timeZone: o
2921
- }, t.today && (t.today = Z(t.today, o)), t.month && (t.month = Z(t.month, o)), t.defaultMonth && (t.defaultMonth = Z(t.defaultMonth, o)), t.startMonth && (t.startMonth = Z(t.startMonth, o)), t.endMonth && (t.endMonth = Z(t.endMonth, o)), t.mode === "single" && t.selected ? t.selected = Z(t.selected, o) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((N) => Z(N, o)) : t.mode === "range" && t.selected && (t.selected = {
2922
- from: t.selected.from ? Z(t.selected.from, o) : t.selected.from,
2923
- to: t.selected.to ? Z(t.selected.to, o) : t.selected.to
2924
- }), t.disabled !== void 0 && (t.disabled = Ot(t.disabled, o)), t.hidden !== void 0 && (t.hidden = Ot(t.hidden, o)), t.modifiers)) {
3019
+ }, t.today && (t.today = de(t.today, o)), t.month && (t.month = de(t.month, o)), t.defaultMonth && (t.defaultMonth = de(t.defaultMonth, o)), t.startMonth && (t.startMonth = de(t.startMonth, o)), t.endMonth && (t.endMonth = de(t.endMonth, o)), t.mode === "single" && t.selected ? t.selected = de(t.selected, o) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((N) => de(N, o)) : t.mode === "range" && t.selected && (t.selected = {
3020
+ from: t.selected.from ? de(t.selected.from, o) : t.selected.from,
3021
+ to: t.selected.to ? de(t.selected.to, o) : t.selected.to
3022
+ }), t.disabled !== void 0 && (t.disabled = Wt(t.disabled, o)), t.hidden !== void 0 && (t.hidden = Wt(t.hidden, o)), t.modifiers)) {
2925
3023
  const N = {};
2926
- Object.keys(t.modifiers).forEach((Y) => {
2927
- N[Y] = Ot(t.modifiers?.[Y], o);
3024
+ Object.keys(t.modifiers).forEach((E) => {
3025
+ N[E] = Wt(t.modifiers?.[E], o);
2928
3026
  }), t.modifiers = N;
2929
3027
  }
2930
- const { components: n, formatters: r, labels: s, dateLib: a, locale: i, classNames: c } = se(() => {
2931
- const N = { ...dn, ...t.locale }, Y = new ie({
3028
+ const { components: n, formatters: r, labels: i, dateLib: s, locale: a, classNames: c } = ie(() => {
3029
+ const N = { ...hn, ...t.locale }, E = t.broadcastCalendar ? 1 : t.weekStartsOn, k = t.noonSafe && t.timeZone ? ja(t.timeZone, {
3030
+ weekStartsOn: E,
3031
+ locale: N
3032
+ }) : void 0, Y = t.dateLib && k ? { ...k, ...t.dateLib } : t.dateLib ?? k, ne = new ce({
2932
3033
  locale: N,
2933
- weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
3034
+ weekStartsOn: E,
2934
3035
  firstWeekContainsDate: t.firstWeekContainsDate,
2935
3036
  useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
2936
3037
  useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
2937
3038
  timeZone: t.timeZone,
2938
3039
  numerals: t.numerals
2939
- }, t.dateLib);
3040
+ }, Y);
2940
3041
  return {
2941
- dateLib: Y,
2942
- components: ga(t.components),
2943
- formatters: Na(t.formatters),
2944
- labels: Ya(t.labels, Y.options),
3042
+ dateLib: ne,
3043
+ components: pa(t.components),
3044
+ formatters: Ca(t.formatters),
3045
+ labels: Ea(t.labels, ne.options),
2945
3046
  locale: N,
2946
- classNames: { ...ba(), ...t.classNames }
3047
+ classNames: { ...wa(), ...t.classNames }
2947
3048
  };
2948
3049
  }, [
2949
3050
  t.locale,
@@ -2955,115 +3056,116 @@ function Wt(e) {
2955
3056
  t.timeZone,
2956
3057
  t.numerals,
2957
3058
  t.dateLib,
3059
+ t.noonSafe,
2958
3060
  t.components,
2959
3061
  t.formatters,
2960
3062
  t.labels,
2961
3063
  t.classNames
2962
3064
  ]);
2963
- t.today || (t = { ...t, today: a.today() });
2964
- const { captionLayout: u, mode: f, navLayout: l, numberOfMonths: d = 1, onDayBlur: M, onDayClick: w, onDayFocus: C, onDayKeyDown: O, onDayMouseEnter: v, onDayMouseLeave: g, onNextClick: p, onPrevClick: S, showWeekNumber: D, styles: y } = t, { formatCaption: k, formatDay: x, formatMonthDropdown: j, formatWeekNumber: E, formatWeekNumberHeader: K, formatWeekdayName: V, formatYearDropdown: G } = r, F = Ua(t, a), { days: me, months: ve, navStart: he, navEnd: je, previousMonth: ne, nextMonth: X, goToMonth: J } = F, ke = ha(me, t, he, je, a), { isSelected: $e, select: _e, selected: ye } = as(t, a) ?? {}, { blur: Ae, focused: ce, isFocusTarget: st, moveFocus: Ue, setFocused: ge } = Ka(t, F, ke, $e ?? (() => !1), a), { labelDayButton: ft, labelGridcell: mt, labelGrid: it, labelMonthDropdown: ct, labelNav: Le, labelPrevious: xe, labelNext: Oe, labelWeekday: He, labelWeekNumber: Ze, labelWeekNumberHeader: ht, labelYearDropdown: yt } = s, gt = se(() => Fa(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), h = f !== void 0 || w !== void 0, T = q(() => {
2965
- ne && (J(ne), S?.(ne));
2966
- }, [ne, J, S]), A = q(() => {
2967
- X && (J(X), p?.(X));
2968
- }, [J, X, p]), Q = q((N, Y) => (W) => {
2969
- W.preventDefault(), W.stopPropagation(), ge(N), !Y.disabled && (_e?.(N.date, Y, W), w?.(N.date, Y, W));
2970
- }, [_e, w, ge]), z = q((N, Y) => (W) => {
2971
- ge(N), C?.(N.date, Y, W);
2972
- }, [C, ge]), ee = q((N, Y) => (W) => {
2973
- Ae(), M?.(N.date, Y, W);
2974
- }, [Ae, M]), re = q((N, Y) => (W) => {
2975
- const _ = {
3065
+ t.today || (t = { ...t, today: s.today() });
3066
+ const { captionLayout: l, mode: d, navLayout: u, numberOfMonths: f = 1, onDayBlur: M, onDayClick: w, onDayFocus: C, onDayKeyDown: W, onDayMouseEnter: v, onDayMouseLeave: g, onNextClick: p, onPrevClick: S, showWeekNumber: D, styles: y } = t, { formatCaption: O, formatDay: x, formatMonthDropdown: j, formatWeekNumber: F, formatWeekNumberHeader: K, formatWeekdayName: V, formatYearDropdown: z } = r, _ = Ka(t, s), { days: me, months: ke, navStart: ye, navEnd: je, previousMonth: oe, nextMonth: X, goToMonth: Z } = _, Oe = ya(me, t, ye, je, s), { isSelected: $e, select: Fe, selected: ge } = is(t, s) ?? {}, { blur: Ae, focused: le, isFocusTarget: it, moveFocus: Ue, setFocused: pe } = es(t, _, Oe, $e ?? (() => !1), s), { labelDayButton: ht, labelGridcell: mt, labelGrid: ct, labelMonthDropdown: lt, labelNav: Ke, labelPrevious: xe, labelNext: We, labelWeekday: He, labelWeekNumber: Ze, labelWeekNumberHeader: yt, labelYearDropdown: gt } = i, pt = ie(() => Ia(s, t.ISOWeek, t.broadcastCalendar, t.today), [s, t.ISOWeek, t.broadcastCalendar, t.today]), m = d !== void 0 || w !== void 0, T = q(() => {
3067
+ oe && (Z(oe), S?.(oe));
3068
+ }, [oe, Z, S]), A = q(() => {
3069
+ X && (Z(X), p?.(X));
3070
+ }, [Z, X, p]), L = q((N, E) => (k) => {
3071
+ k.preventDefault(), k.stopPropagation(), pe(N), !E.disabled && (Fe?.(N.date, E, k), w?.(N.date, E, k));
3072
+ }, [Fe, w, pe]), G = q((N, E) => (k) => {
3073
+ pe(N), C?.(N.date, E, k);
3074
+ }, [C, pe]), ee = q((N, E) => (k) => {
3075
+ Ae(), M?.(N.date, E, k);
3076
+ }, [Ae, M]), ae = q((N, E) => (k) => {
3077
+ const Y = {
2976
3078
  ArrowLeft: [
2977
- W.shiftKey ? "month" : "day",
3079
+ k.shiftKey ? "month" : "day",
2978
3080
  t.dir === "rtl" ? "after" : "before"
2979
3081
  ],
2980
3082
  ArrowRight: [
2981
- W.shiftKey ? "month" : "day",
3083
+ k.shiftKey ? "month" : "day",
2982
3084
  t.dir === "rtl" ? "before" : "after"
2983
3085
  ],
2984
- ArrowDown: [W.shiftKey ? "year" : "week", "after"],
2985
- ArrowUp: [W.shiftKey ? "year" : "week", "before"],
2986
- PageUp: [W.shiftKey ? "year" : "month", "before"],
2987
- PageDown: [W.shiftKey ? "year" : "month", "after"],
3086
+ ArrowDown: [k.shiftKey ? "year" : "week", "after"],
3087
+ ArrowUp: [k.shiftKey ? "year" : "week", "before"],
3088
+ PageUp: [k.shiftKey ? "year" : "month", "before"],
3089
+ PageDown: [k.shiftKey ? "year" : "month", "after"],
2988
3090
  Home: ["startOfWeek", "before"],
2989
3091
  End: ["endOfWeek", "after"]
2990
3092
  };
2991
- if (_[W.key]) {
2992
- W.preventDefault(), W.stopPropagation();
2993
- const [ue, P] = _[W.key];
2994
- Ue(ue, P);
3093
+ if (Y[k.key]) {
3094
+ k.preventDefault(), k.stopPropagation();
3095
+ const [ne, P] = Y[k.key];
3096
+ Ue(ne, P);
2995
3097
  }
2996
- O?.(N.date, Y, W);
2997
- }, [Ue, O, t.dir]), oe = q((N, Y) => (W) => {
2998
- v?.(N.date, Y, W);
2999
- }, [v]), $ = q((N, Y) => (W) => {
3000
- g?.(N.date, Y, W);
3001
- }, [g]), le = q((N) => (Y) => {
3002
- const W = Number(Y.target.value), _ = a.setMonth(a.startOfMonth(N), W);
3003
- J(_);
3004
- }, [a, J]), te = q((N) => (Y) => {
3005
- const W = Number(Y.target.value), _ = a.setYear(a.startOfMonth(N), W);
3006
- J(_);
3007
- }, [a, J]), { className: H, style: qe } = se(() => ({
3098
+ W?.(N.date, E, k);
3099
+ }, [Ue, W, t.dir]), re = q((N, E) => (k) => {
3100
+ v?.(N.date, E, k);
3101
+ }, [v]), $ = q((N, E) => (k) => {
3102
+ g?.(N.date, E, k);
3103
+ }, [g]), ue = q((N) => (E) => {
3104
+ const k = Number(E.target.value), Y = s.setMonth(s.startOfMonth(N), k);
3105
+ Z(Y);
3106
+ }, [s, Z]), te = q((N) => (E) => {
3107
+ const k = Number(E.target.value), Y = s.setYear(s.startOfMonth(N), k);
3108
+ Z(Y);
3109
+ }, [s, Z]), { className: H, style: qe } = ie(() => ({
3008
3110
  className: [c[b.Root], t.className].filter(Boolean).join(" "),
3009
3111
  style: { ...y?.[b.Root], ...t.style }
3010
- }), [c, t.className, t.style, y]), Re = pa(t), Pe = Ee(null);
3011
- Aa(Pe, !!t.animate, {
3112
+ }), [c, t.className, t.style, y]), Re = ba(t), Pe = Ee(null);
3113
+ qa(Pe, !!t.animate, {
3012
3114
  classNames: c,
3013
- months: ve,
3014
- focused: ce,
3015
- dateLib: a
3115
+ months: ke,
3116
+ focused: le,
3117
+ dateLib: s
3016
3118
  });
3017
3119
  const Te = {
3018
3120
  dayPickerProps: t,
3019
- selected: ye,
3020
- select: _e,
3121
+ selected: ge,
3122
+ select: Fe,
3021
3123
  isSelected: $e,
3022
- months: ve,
3124
+ months: ke,
3023
3125
  nextMonth: X,
3024
- previousMonth: ne,
3025
- goToMonth: J,
3026
- getModifiers: ke,
3126
+ previousMonth: oe,
3127
+ goToMonth: Z,
3128
+ getModifiers: Oe,
3027
3129
  components: n,
3028
3130
  classNames: c,
3029
3131
  styles: y,
3030
- labels: s,
3132
+ labels: i,
3031
3133
  formatters: r
3032
3134
  };
3033
- return m.createElement(
3034
- mn.Provider,
3135
+ return h.createElement(
3136
+ yn.Provider,
3035
3137
  { value: Te },
3036
- m.createElement(
3138
+ h.createElement(
3037
3139
  n.Root,
3038
3140
  { rootRef: t.animate ? Pe : void 0, className: H, style: qe, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...Re },
3039
- m.createElement(
3141
+ h.createElement(
3040
3142
  n.Months,
3041
3143
  { className: c[b.Months], style: y?.[b.Months] },
3042
- !t.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[b.Nav], style: y?.[b.Nav], "aria-label": Le(), onPreviousClick: T, onNextClick: A, previousMonth: ne, nextMonth: X }),
3043
- ve.map((N, Y) => m.createElement(
3144
+ !t.hideNavigation && !u && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[b.Nav], style: y?.[b.Nav], "aria-label": Ke(), onPreviousClick: T, onNextClick: A, previousMonth: oe, nextMonth: X }),
3145
+ ke.map((N, E) => h.createElement(
3044
3146
  n.Month,
3045
3147
  {
3046
3148
  "data-animated-month": t.animate ? "true" : void 0,
3047
3149
  className: c[b.Month],
3048
3150
  style: y?.[b.Month],
3049
3151
  // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
3050
- key: Y,
3051
- displayIndex: Y,
3152
+ key: E,
3153
+ displayIndex: E,
3052
3154
  calendarMonth: N
3053
3155
  },
3054
- l === "around" && !t.hideNavigation && Y === 0 && m.createElement(
3156
+ u === "around" && !t.hideNavigation && E === 0 && h.createElement(
3055
3157
  n.PreviousMonthButton,
3056
- { type: "button", className: c[b.PreviousMonthButton], tabIndex: ne ? void 0 : -1, "aria-disabled": ne ? void 0 : !0, "aria-label": xe(ne), onClick: T, "data-animated-button": t.animate ? "true" : void 0 },
3057
- m.createElement(n.Chevron, { disabled: ne ? void 0 : !0, className: c[b.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
3158
+ { type: "button", className: c[b.PreviousMonthButton], tabIndex: oe ? void 0 : -1, "aria-disabled": oe ? void 0 : !0, "aria-label": xe(oe), onClick: T, "data-animated-button": t.animate ? "true" : void 0 },
3159
+ h.createElement(n.Chevron, { disabled: oe ? void 0 : !0, className: c[b.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
3058
3160
  ),
3059
- m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[b.MonthCaption], style: y?.[b.MonthCaption], calendarMonth: N, displayIndex: Y }, u?.startsWith("dropdown") ? m.createElement(
3161
+ h.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[b.MonthCaption], style: y?.[b.MonthCaption], calendarMonth: N, displayIndex: E }, l?.startsWith("dropdown") ? h.createElement(
3060
3162
  n.DropdownNav,
3061
3163
  { className: c[b.Dropdowns], style: y?.[b.Dropdowns] },
3062
3164
  (() => {
3063
- const W = u === "dropdown" || u === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: c[b.MonthsDropdown], "aria-label": ct(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: le(N.date), options: Ea(N.date, he, je, r, a), style: y?.[b.Dropdown], value: a.getMonth(N.date) }) : m.createElement("span", { key: "month" }, j(N.date, a)), _ = u === "dropdown" || u === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: c[b.YearsDropdown], "aria-label": yt(a.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: te(N.date), options: Ia(he, je, r, a, !!t.reverseYears), style: y?.[b.Dropdown], value: a.getYear(N.date) }) : m.createElement("span", { key: "year" }, G(N.date, a));
3064
- return a.getMonthYearOrder() === "year-first" ? [_, W] : [W, _];
3165
+ const k = l === "dropdown" || l === "dropdown-months" ? h.createElement(n.MonthsDropdown, { key: "month", className: c[b.MonthsDropdown], "aria-label": lt(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: ue(N.date), options: Fa(N.date, ye, je, r, s), style: y?.[b.Dropdown], value: s.getMonth(N.date) }) : h.createElement("span", { key: "month" }, j(N.date, s)), Y = l === "dropdown" || l === "dropdown-years" ? h.createElement(n.YearsDropdown, { key: "year", className: c[b.YearsDropdown], "aria-label": gt(s.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: te(N.date), options: Ba(ye, je, r, s, !!t.reverseYears), style: y?.[b.Dropdown], value: s.getYear(N.date) }) : h.createElement("span", { key: "year" }, z(N.date, s));
3166
+ return s.getMonthYearOrder() === "year-first" ? [Y, k] : [k, Y];
3065
3167
  })(),
3066
- m.createElement("span", { role: "status", "aria-live": "polite", style: {
3168
+ h.createElement("span", { role: "status", "aria-live": "polite", style: {
3067
3169
  border: 0,
3068
3170
  clip: "rect(0 0 0 0)",
3069
3171
  height: "1px",
@@ -3074,419 +3176,419 @@ function Wt(e) {
3074
3176
  width: "1px",
3075
3177
  whiteSpace: "nowrap",
3076
3178
  wordWrap: "normal"
3077
- } }, k(N.date, a.options, a))
3078
- ) : m.createElement(n.CaptionLabel, { className: c[b.CaptionLabel], role: "status", "aria-live": "polite" }, k(N.date, a.options, a))),
3079
- l === "around" && !t.hideNavigation && Y === d - 1 && m.createElement(
3179
+ } }, O(N.date, s.options, s))
3180
+ ) : h.createElement(n.CaptionLabel, { className: c[b.CaptionLabel], role: "status", "aria-live": "polite" }, O(N.date, s.options, s))),
3181
+ u === "around" && !t.hideNavigation && E === f - 1 && h.createElement(
3080
3182
  n.NextMonthButton,
3081
- { type: "button", className: c[b.NextMonthButton], tabIndex: X ? void 0 : -1, "aria-disabled": X ? void 0 : !0, "aria-label": Oe(X), onClick: A, "data-animated-button": t.animate ? "true" : void 0 },
3082
- m.createElement(n.Chevron, { disabled: X ? void 0 : !0, className: c[b.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
3183
+ { type: "button", className: c[b.NextMonthButton], tabIndex: X ? void 0 : -1, "aria-disabled": X ? void 0 : !0, "aria-label": We(X), onClick: A, "data-animated-button": t.animate ? "true" : void 0 },
3184
+ h.createElement(n.Chevron, { disabled: X ? void 0 : !0, className: c[b.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
3083
3185
  ),
3084
- Y === d - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[b.Nav], style: y?.[b.Nav], "aria-label": Le(), onPreviousClick: T, onNextClick: A, previousMonth: ne, nextMonth: X }),
3085
- m.createElement(
3186
+ E === f - 1 && u === "after" && !t.hideNavigation && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[b.Nav], style: y?.[b.Nav], "aria-label": Ke(), onPreviousClick: T, onNextClick: A, previousMonth: oe, nextMonth: X }),
3187
+ h.createElement(
3086
3188
  n.MonthGrid,
3087
- { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": it(N.date, a.options, a) || void 0, className: c[b.MonthGrid], style: y?.[b.MonthGrid] },
3088
- !t.hideWeekdays && m.createElement(
3189
+ { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": ct(N.date, s.options, s) || void 0, className: c[b.MonthGrid], style: y?.[b.MonthGrid] },
3190
+ !t.hideWeekdays && h.createElement(
3089
3191
  n.Weekdays,
3090
3192
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: c[b.Weekdays], style: y?.[b.Weekdays] },
3091
- D && m.createElement(n.WeekNumberHeader, { "aria-label": ht(a.options), className: c[b.WeekNumberHeader], style: y?.[b.WeekNumberHeader], scope: "col" }, K()),
3092
- gt.map((W) => m.createElement(n.Weekday, { "aria-label": He(W, a.options, a), className: c[b.Weekday], key: String(W), style: y?.[b.Weekday], scope: "col" }, V(W, a.options, a)))
3193
+ D && h.createElement(n.WeekNumberHeader, { "aria-label": yt(s.options), className: c[b.WeekNumberHeader], style: y?.[b.WeekNumberHeader], scope: "col" }, K()),
3194
+ pt.map((k) => h.createElement(n.Weekday, { "aria-label": He(k, s.options, s), className: c[b.Weekday], key: String(k), style: y?.[b.Weekday], scope: "col" }, V(k, s.options, s)))
3093
3195
  ),
3094
- m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[b.Weeks], style: y?.[b.Weeks] }, N.weeks.map((W) => m.createElement(
3196
+ h.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[b.Weeks], style: y?.[b.Weeks] }, N.weeks.map((k) => h.createElement(
3095
3197
  n.Week,
3096
- { className: c[b.Week], key: W.weekNumber, style: y?.[b.Week], week: W },
3097
- D && m.createElement(n.WeekNumber, { week: W, style: y?.[b.WeekNumber], "aria-label": Ze(W.weekNumber, {
3098
- locale: i
3099
- }), className: c[b.WeekNumber], scope: "row", role: "rowheader" }, E(W.weekNumber, a)),
3100
- W.days.map((_) => {
3101
- const { date: ue } = _, P = ke(_);
3102
- if (P[R.focused] = !P.hidden && !!ce?.isEqualTo(_), P[fe.selected] = $e?.(ue) || P.selected, ut(ye)) {
3103
- const { from: bt, to: wt } = ye;
3104
- P[fe.range_start] = !!(bt && wt && a.isSameDay(ue, bt)), P[fe.range_end] = !!(bt && wt && a.isSameDay(ue, wt)), P[fe.range_middle] = Ne(ye, ue, !0, a);
3198
+ { className: c[b.Week], key: k.weekNumber, style: y?.[b.Week], week: k },
3199
+ D && h.createElement(n.WeekNumber, { week: k, style: y?.[b.WeekNumber], "aria-label": Ze(k.weekNumber, {
3200
+ locale: a
3201
+ }), className: c[b.WeekNumber], scope: "row", role: "rowheader" }, F(k.weekNumber, s)),
3202
+ k.days.map((Y) => {
3203
+ const { date: ne } = Y, P = Oe(Y);
3204
+ if (P[R.focused] = !P.hidden && !!le?.isEqualTo(Y), P[he.selected] = $e?.(ne) || P.selected, dt(ge)) {
3205
+ const { from: wt, to: Mt } = ge;
3206
+ P[he.range_start] = !!(wt && Mt && s.isSameDay(ne, wt)), P[he.range_end] = !!(wt && Mt && s.isSameDay(ne, Mt)), P[he.range_middle] = Ne(ge, ne, !0, s);
3105
3207
  }
3106
- const lt = _a(P, y, t.modifiersStyles), pt = ya(P, c, t.modifiersClassNames), Cn = !h && !P.hidden ? mt(ue, P, a.options, a) : void 0;
3107
- return m.createElement(n.Day, { key: `${_.isoDate}_${_.displayMonthId}`, day: _, modifiers: P, className: pt.join(" "), style: lt, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": Cn, "data-day": _.isoDate, "data-month": _.outside ? _.dateMonthId : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": _.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && h ? m.createElement(n.DayButton, { className: c[b.DayButton], style: y?.[b.DayButton], type: "button", day: _, modifiers: P, disabled: !P.focused && P.disabled || void 0, "aria-disabled": P.focused && P.disabled || void 0, tabIndex: st(_) ? 0 : -1, "aria-label": ft(ue, P, a.options, a), onClick: Q(_, P), onBlur: ee(_, P), onFocus: z(_, P), onKeyDown: re(_, P), onMouseEnter: oe(_, P), onMouseLeave: $(_, P) }, x(ue, a.options, a)) : !P.hidden && x(_.date, a.options, a));
3208
+ const ut = _a(P, y, t.modifiersStyles), bt = ga(P, c, t.modifiersClassNames), Pn = !m && !P.hidden ? mt(ne, P, s.options, s) : void 0;
3209
+ return h.createElement(n.Day, { key: `${Y.isoDate}_${Y.displayMonthId}`, day: Y, modifiers: P, className: bt.join(" "), style: ut, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": Pn, "data-day": Y.isoDate, "data-month": Y.outside ? Y.dateMonthId : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": Y.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && m ? h.createElement(n.DayButton, { className: c[b.DayButton], style: y?.[b.DayButton], type: "button", day: Y, modifiers: P, disabled: !P.focused && P.disabled || void 0, "aria-disabled": P.focused && P.disabled || void 0, tabIndex: it(Y) ? 0 : -1, "aria-label": ht(ne, P, s.options, s), onClick: L(Y, P), onBlur: ee(Y, P), onFocus: G(Y, P), onKeyDown: ae(Y, P), onMouseEnter: re(Y, P), onMouseLeave: $(Y, P) }, x(ne, s.options, s)) : !P.hidden && x(Y.date, s.options, s));
3108
3210
  })
3109
3211
  )))
3110
3212
  )
3111
3213
  ))
3112
3214
  ),
3113
- t.footer && m.createElement(n.Footer, { className: c[b.Footer], style: y?.[b.Footer], role: "status", "aria-live": "polite" }, t.footer)
3215
+ t.footer && h.createElement(n.Footer, { className: c[b.Footer], style: y?.[b.Footer], role: "status", "aria-live": "polite" }, t.footer)
3114
3216
  )
3115
3217
  );
3116
3218
  }
3117
- const hs = (e) => {
3219
+ const gs = (e) => {
3118
3220
  const {
3119
3221
  mode: t = "single",
3120
3222
  required: o = !1,
3121
3223
  selected: n,
3122
3224
  onSelect: r,
3123
- disabledDates: s,
3124
- header: a,
3125
- footer: i,
3225
+ disabledDates: i,
3226
+ header: s,
3227
+ footer: a,
3126
3228
  hideOutsideDays: c = !1,
3127
- numberOfMonths: u = 1,
3128
- startMonth: f,
3129
- endMonth: l,
3130
- showActionButtons: d = !1,
3229
+ numberOfMonths: l = 1,
3230
+ startMonth: d,
3231
+ endMonth: u,
3232
+ showActionButtons: f = !1,
3131
3233
  applyLabel: M = "Aplicar",
3132
3234
  cancelLabel: w = "Cancelar",
3133
3235
  onApply: C,
3134
- onCancel: O,
3236
+ onCancel: W,
3135
3237
  hideFooter: v = !1,
3136
3238
  variant: g = "input",
3137
3239
  inputProps: p,
3138
3240
  label: S = "",
3139
3241
  name: D = "datepicker",
3140
3242
  className: y
3141
- } = e, k = t === "range" || t === "multiple" ? e.min : void 0, x = t === "range" || t === "multiple" ? e.max : void 0, j = t === "range" ? e.excludeDisabled : void 0, [E, K] = We({}), [V, G] = We(!1), [F, me] = We(!1), [ve, he] = We(n), [je, ne] = We(!1), [X, J] = We(""), ke = Ee(null), $e = Ee(null), _e = Ee(null), ye = Ee(null), Ae = d ? ve : n, ce = d ? n : Ae;
3142
- Fe(() => {
3143
- window.innerWidth < 768 ? ne(!0) : ne(!1);
3144
- }, []), Fe(() => {
3145
- d && he(n);
3146
- }, [n, d]), Fe(() => {
3243
+ } = e, O = t === "range" || t === "multiple" ? e.min : void 0, x = t === "range" || t === "multiple" ? e.max : void 0, j = t === "range" ? e.excludeDisabled : void 0, [F, K] = Se({}), [V, z] = Se(!1), [_, me] = Se(!1), [ke, ye] = Se(n), [je, oe] = Se(!1), [X, Z] = Se(""), Oe = Ee(null), $e = Ee(null), Fe = Ee(null), ge = Ee(null), Ae = f ? ke : n, le = f ? n : Ae;
3244
+ _e(() => {
3245
+ window.innerWidth < 768 ? oe(!0) : oe(!1);
3246
+ }, []), _e(() => {
3247
+ f && ye(n);
3248
+ }, [n, f]), _e(() => {
3147
3249
  if (g !== "input" || !V) return;
3148
- const h = (T) => {
3149
- ke.current && !ke.current.contains(T.target) && (G(!1), d && he(n));
3250
+ const m = (T) => {
3251
+ Oe.current && !Oe.current.contains(T.target) && (z(!1), f && ye(n));
3150
3252
  };
3151
- return document.addEventListener("mousedown", h), () => {
3152
- document.removeEventListener("mousedown", h);
3253
+ return document.addEventListener("mousedown", m), () => {
3254
+ document.removeEventListener("mousedown", m);
3153
3255
  };
3154
- }, [g, V, n, d]), Fe(() => {
3155
- if (!V || g !== "input" || !ke.current) {
3256
+ }, [g, V, n, f]), _e(() => {
3257
+ if (!V || g !== "input" || !Oe.current) {
3156
3258
  me(!1);
3157
3259
  return;
3158
3260
  }
3159
- const h = 16, T = () => {
3160
- const z = ke?.current?.getBoundingClientRect(), ee = $e?.current?.getBoundingClientRect();
3161
- if (!z || !ee) return;
3162
- const re = window.innerHeight, oe = window.innerWidth, $ = z.height, le = z.width, te = ee.left, H = ee.bottom, qe = H, Re = re - H, Pe = oe - ee.left, Te = le - Pe, N = Te > 0 && Pe >= le + h, Y = qe >= $ + h, W = Re >= $ + h, _ = !W && Y, ue = !W && !Y;
3163
- let P = _ ? void 0 : `${H + 8}px`, lt = _ ? `${Re + ee.height + 8}px` : void 0;
3164
- ue && (P = void 0, lt = `${h}px`);
3165
- const pt = Te > 0 ? Te : 0;
3261
+ const m = 16, T = () => {
3262
+ const G = Oe?.current?.getBoundingClientRect(), ee = $e?.current?.getBoundingClientRect();
3263
+ if (!G || !ee) return;
3264
+ const ae = window.innerHeight, re = window.innerWidth, $ = G.height, ue = G.width, te = ee.left, H = ee.bottom, qe = H, Re = ae - H, Pe = re - ee.left, Te = ue - Pe, N = Te > 0 && Pe >= ue + m, E = qe >= $ + m, k = Re >= $ + m, Y = !k && E, ne = !k && !E;
3265
+ let P = Y ? void 0 : `${H + 8}px`, ut = Y ? `${Re + ee.height + 8}px` : void 0;
3266
+ ne && (P = void 0, ut = `${m}px`);
3267
+ const bt = Te > 0 ? Te : 0;
3166
3268
  K(
3167
3269
  {
3168
3270
  top: P,
3169
- bottom: lt,
3271
+ bottom: ut,
3170
3272
  right: N ? "0" : void 0,
3171
- left: N ? void 0 : `${te - pt}px`
3273
+ left: N ? void 0 : `${te - bt}px`
3172
3274
  }
3173
3275
  ), me(!0);
3174
3276
  }, A = () => {
3175
- G(!1), me(!1);
3277
+ z(!1), me(!1);
3176
3278
  };
3177
3279
  window.addEventListener("scroll", A, !0);
3178
- const Q = setTimeout(T, 0);
3280
+ const L = setTimeout(T, 0);
3179
3281
  return () => {
3180
- clearTimeout(Q), window.removeEventListener("scroll", A, !0);
3282
+ clearTimeout(L), window.removeEventListener("scroll", A, !0);
3181
3283
  };
3182
3284
  }, [V, g]);
3183
- const st = q(() => {
3184
- C?.(ve), r?.(ve), g === "input" && G(!1);
3185
- }, [C, r, ve, g]), Ue = q(() => {
3186
- he(n), O?.(), g === "input" && G(!1);
3187
- }, [O, n, g]), ge = se(() => {
3188
- if (!ce) return "";
3285
+ const it = q(() => {
3286
+ C?.(ke), r?.(ke), g === "input" && z(!1);
3287
+ }, [C, r, ke, g]), Ue = q(() => {
3288
+ ye(n), W?.(), g === "input" && z(!1);
3289
+ }, [W, n, g]), pe = ie(() => {
3290
+ if (!le) return "";
3189
3291
  if (t === "single")
3190
- return ce.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3292
+ return le.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3191
3293
  if (t === "range") {
3192
- const h = ce;
3193
- if (!h.from) return "";
3194
- const T = h.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3195
- if (!h.to) return T;
3196
- const A = h.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3294
+ const m = le;
3295
+ if (!m.from) return "";
3296
+ const T = m.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3297
+ if (!m.to) return T;
3298
+ const A = m.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
3197
3299
  return `${T} - ${A}`;
3198
3300
  }
3199
3301
  if (t === "multiple") {
3200
- const h = ce;
3201
- return h.length === 0 ? "" : h.length === 1 ? h[0].toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : `${h.length} fechas seleccionadas`;
3302
+ const m = le;
3303
+ return m.length === 0 ? "" : m.length === 1 ? m[0].toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : `${m.length} fechas seleccionadas`;
3202
3304
  }
3203
3305
  return "";
3204
- }, [ce, t]);
3205
- Fe(() => {
3206
- J(ge);
3207
- }, [ge]), Fe(() => {
3208
- if (ye.current !== null && _e.current) {
3209
- const h = ye.current;
3210
- _e.current.setSelectionRange(h, h), ye.current = null;
3306
+ }, [le, t]);
3307
+ _e(() => {
3308
+ Z(pe);
3309
+ }, [pe]), _e(() => {
3310
+ if (ge.current !== null && Fe.current) {
3311
+ const m = ge.current;
3312
+ Fe.current.setSelectionRange(m, m), ge.current = null;
3211
3313
  }
3212
3314
  }, [X]);
3213
- const ft = se(() => g === "input" || g === "input-and-calendar", [g]), mt = se(() => g === "only-calendar" || g === "input-and-calendar" || g === "input", [g]), it = q((h) => {
3214
- r?.(h);
3215
- }, [r]), ct = q((h) => {
3216
- const T = new Date(parseInt(h.slice(6, 10)), parseInt(h.slice(3, 5)) - 1, parseInt(h.slice(0, 2)));
3315
+ const ht = ie(() => g === "input" || g === "input-and-calendar", [g]), mt = ie(() => g === "only-calendar" || g === "input-and-calendar" || g === "input", [g]), ct = q((m) => {
3316
+ r?.(m);
3317
+ }, [r]), lt = q((m) => {
3318
+ const T = new Date(parseInt(m.slice(6, 10)), parseInt(m.slice(3, 5)) - 1, parseInt(m.slice(0, 2)));
3217
3319
  if (t === "multiple") {
3218
- const Q = (ce || []).filter((z) => z.getTime() !== T.getTime());
3219
- d ? (r?.(Q), he(Q)) : it(Q);
3320
+ const L = (le || []).filter((G) => G.getTime() !== T.getTime());
3321
+ f ? (r?.(L), ye(L)) : ct(L);
3220
3322
  }
3221
- }, [t, ce, d, r, it]), Le = q((h) => {
3222
- if (d) {
3223
- he(h);
3323
+ }, [t, le, f, r, ct]), Ke = q((m) => {
3324
+ if (f) {
3325
+ ye(m);
3224
3326
  return;
3225
3327
  }
3226
- g === "input" && t === "single" && G(!1), r?.(h);
3227
- }, [d, g, t, r]), xe = q((h) => {
3228
- if (d) {
3229
- he(h);
3328
+ g === "input" && t === "single" && z(!1), r?.(m);
3329
+ }, [f, g, t, r]), xe = q((m) => {
3330
+ if (f) {
3331
+ ye(m);
3230
3332
  return;
3231
3333
  }
3232
- r?.(h);
3233
- }, [d, r]), Oe = q((h) => {
3234
- const T = h.trim();
3334
+ r?.(m);
3335
+ }, [f, r]), We = q((m) => {
3336
+ const T = m.trim();
3235
3337
  if (!T) return null;
3236
- const [A, Q, z] = T.split("/").map((le) => le.trim()), ee = parseInt(A, 10), re = parseInt(Q, 10), oe = parseInt(z, 10);
3237
- if (Number.isNaN(ee) || Number.isNaN(re) || Number.isNaN(oe) || oe < 1e3 || oe > 9999) return null;
3238
- const $ = new Date(oe, re - 1, ee);
3239
- return $.getFullYear() !== oe || $.getMonth() !== re - 1 || $.getDate() !== ee ? null : $;
3240
- }, []), He = q((h) => {
3241
- const T = h.trim();
3338
+ const [A, L, G] = T.split("/").map((ue) => ue.trim()), ee = parseInt(A, 10), ae = parseInt(L, 10), re = parseInt(G, 10);
3339
+ if (Number.isNaN(ee) || Number.isNaN(ae) || Number.isNaN(re) || re < 1e3 || re > 9999) return null;
3340
+ const $ = new Date(re, ae - 1, ee);
3341
+ return $.getFullYear() !== re || $.getMonth() !== ae - 1 || $.getDate() !== ee ? null : $;
3342
+ }, []), He = q((m) => {
3343
+ const T = m.trim();
3242
3344
  if (!T) return null;
3243
- const [A, Q] = T.split("-"), z = Oe(A ?? "");
3244
- if (!z) return null;
3245
- const ee = Q?.trim() ?? "", oe = (ee ? Oe(ee) : void 0) || void 0;
3246
- let $ = { from: z, to: oe };
3345
+ const [A, L] = T.split("-"), G = We(A ?? "");
3346
+ if (!G) return null;
3347
+ const ee = L?.trim() ?? "", re = (ee ? We(ee) : void 0) || void 0;
3348
+ let $ = { from: G, to: re };
3247
3349
  if ($.to && $.from && $.to.getTime() < $.from.getTime()) {
3248
- const le = $.from;
3249
- $ = { from: $.to, to: le };
3350
+ const ue = $.from;
3351
+ $ = { from: $.to, to: ue };
3250
3352
  }
3251
- if (t === "range" && (k || x) && $.from && $.to) {
3353
+ if (t === "range" && (O || x) && $.from && $.to) {
3252
3354
  const te = Math.round(($.to.getTime() - $.from.getTime()) / 864e5) + 1;
3253
- if (k && te < k || x && te > x) return null;
3355
+ if (O && te < O || x && te > x) return null;
3254
3356
  }
3255
3357
  return $;
3256
- }, [t, k, x, Oe]), Ze = q(() => {
3257
- const h = X.trim();
3258
- if (!h) {
3358
+ }, [t, O, x, We]), Ze = q(() => {
3359
+ const m = X.trim();
3360
+ if (!m) {
3259
3361
  (t === "single" || t === "range") && r?.(void 0);
3260
3362
  return;
3261
3363
  }
3262
3364
  if (t === "single") {
3263
- const T = Oe(h);
3365
+ const T = We(m);
3264
3366
  if (!T) {
3265
- J(ge);
3367
+ Z(pe);
3266
3368
  return;
3267
3369
  }
3268
3370
  xe(T);
3269
3371
  return;
3270
3372
  }
3271
3373
  if (t === "range") {
3272
- const T = He(h);
3374
+ const T = He(m);
3273
3375
  if (!T) {
3274
- J(ge);
3376
+ Z(pe);
3275
3377
  return;
3276
3378
  }
3277
3379
  xe(T);
3278
3380
  }
3279
- }, [X, t, Oe, He, xe, ge]), ht = q((h) => {
3280
- if (h.key === "Enter") {
3281
- h.preventDefault(), Ze();
3381
+ }, [X, t, We, He, xe, pe]), yt = q((m) => {
3382
+ if (m.key === "Enter") {
3383
+ m.preventDefault(), Ze();
3282
3384
  return;
3283
3385
  }
3284
- if (h.key === "ArrowUp" || h.key === "ArrowDown") {
3285
- const T = h.key === "ArrowUp" ? 1 : -1, A = h.currentTarget.selectionStart ?? 0;
3386
+ if (m.key === "ArrowUp" || m.key === "ArrowDown") {
3387
+ const T = m.key === "ArrowUp" ? 1 : -1, A = m.currentTarget.selectionStart ?? 0;
3286
3388
  if (t === "single") {
3287
- const Q = Oe(X);
3288
- if (!Q) return;
3289
- h.preventDefault();
3290
- const z = new Date(Q);
3291
- A <= 2 ? z.setDate(z.getDate() + T) : A <= 5 ? z.setMonth(z.getMonth() + T) : z.setFullYear(z.getFullYear() + T), ye.current = A, J(z.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })), xe(z);
3389
+ const L = We(X);
3390
+ if (!L) return;
3391
+ m.preventDefault();
3392
+ const G = new Date(L);
3393
+ A <= 2 ? G.setDate(G.getDate() + T) : A <= 5 ? G.setMonth(G.getMonth() + T) : G.setFullYear(G.getFullYear() + T), ge.current = A, Z(G.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })), xe(G);
3292
3394
  return;
3293
3395
  }
3294
3396
  if (t === "range") {
3295
- const Q = He(X);
3296
- if (!Q || !Q.from) return;
3297
- h.preventDefault();
3298
- const re = X.indexOf("-") === -1 || A <= 9, oe = re ? A : Math.max(0, A - 13), $ = new Date(Q.from), le = Q.to ? new Date(Q.to) : void 0, te = re ? $ : le ?? $;
3299
- oe <= 2 ? te.setDate(te.getDate() + T) : oe <= 5 ? te.setMonth(te.getMonth() + T) : te.setFullYear(te.getFullYear() + T);
3397
+ const L = He(X);
3398
+ if (!L || !L.from) return;
3399
+ m.preventDefault();
3400
+ const ae = X.indexOf("-") === -1 || A <= 9, re = ae ? A : Math.max(0, A - 13), $ = new Date(L.from), ue = L.to ? new Date(L.to) : void 0, te = ae ? $ : ue ?? $;
3401
+ re <= 2 ? te.setDate(te.getDate() + T) : re <= 5 ? te.setMonth(te.getMonth() + T) : te.setFullYear(te.getFullYear() + T);
3300
3402
  let H = {
3301
- from: re ? te : $,
3302
- to: re ? le : te
3403
+ from: ae ? te : $,
3404
+ to: ae ? ue : te
3303
3405
  };
3304
3406
  if (H.to && H.from && H.to.getTime() < H.from.getTime()) {
3305
3407
  const Pe = H.from;
3306
3408
  H = { from: H.to, to: Pe };
3307
3409
  }
3308
- if ((k || x) && H.from && H.to) {
3410
+ if ((O || x) && H.from && H.to) {
3309
3411
  const Te = Math.round((H.to.getTime() - H.from.getTime()) / 864e5) + 1;
3310
- if (k && Te < k || x && Te > x) return;
3412
+ if (O && Te < O || x && Te > x) return;
3311
3413
  }
3312
3414
  if (!H.from) return;
3313
3415
  const qe = H.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }), Re = H.to ? H.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : "";
3314
- ye.current = A, J(H.to ? `${qe} - ${Re}` : qe), xe(H);
3416
+ ge.current = A, Z(H.to ? `${qe} - ${Re}` : qe), xe(H);
3315
3417
  return;
3316
3418
  }
3317
3419
  }
3318
- }, [Ze, t, X, Oe, He, k, x, xe]), yt = q(() => {
3319
- const h = ce || [];
3320
- return /* @__PURE__ */ L.jsx(
3321
- En,
3420
+ }, [Ze, t, X, We, He, O, x, xe]), gt = q(() => {
3421
+ const m = le || [];
3422
+ return /* @__PURE__ */ U.jsx(
3423
+ _n,
3322
3424
  {
3323
3425
  label: S,
3324
3426
  placeholder: "Seleccione una o más fechas",
3325
3427
  name: D,
3326
- value: h.sort((T, A) => T.getTime() - A.getTime()).map((T) => T.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3428
+ value: m.sort((T, A) => T.getTime() - A.getTime()).map((T) => T.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
3327
3429
  onChange: () => {
3328
3430
  },
3329
- onClick: () => G(!0),
3330
- className: et("w-[360px]", p?.className),
3431
+ onClick: () => z(!0),
3432
+ className: tt("w-[360px]", p?.className),
3331
3433
  readonly: !0,
3332
- onValueDelete: ct,
3333
- icon: /* @__PURE__ */ L.jsx(Et, {})
3434
+ onValueDelete: lt,
3435
+ icon: /* @__PURE__ */ U.jsx(Bt, {})
3334
3436
  }
3335
3437
  );
3336
- }, [ce, S, D, ct, p]), gt = se(() => ({
3337
- top: E?.top,
3338
- left: E?.left,
3339
- bottom: E?.bottom,
3340
- right: E?.right,
3341
- opacity: F && V ? 1 : 0,
3438
+ }, [le, S, D, lt, p]), pt = ie(() => ({
3439
+ top: F?.top,
3440
+ left: F?.left,
3441
+ bottom: F?.bottom,
3442
+ right: F?.right,
3443
+ opacity: _ && V ? 1 : 0,
3342
3444
  transition: "opacity 0.15s linear",
3343
3445
  position: "fixed",
3344
3446
  zIndex: 1e3,
3345
- pointerEvents: F && V ? "auto" : "none"
3346
- }), [E, F, V]);
3347
- return /* @__PURE__ */ L.jsxs("div", { className: et("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", p?.className), children: [
3348
- ft && /* @__PURE__ */ L.jsx(
3447
+ pointerEvents: _ && V ? "auto" : "none"
3448
+ }), [F, _, V]);
3449
+ return /* @__PURE__ */ U.jsxs("div", { className: tt("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", p?.className), children: [
3450
+ ht && /* @__PURE__ */ U.jsx(
3349
3451
  "div",
3350
3452
  {
3351
3453
  ref: $e,
3352
3454
  className: "relative w-full",
3353
- children: t === "multiple" ? yt() : /* @__PURE__ */ L.jsx(
3354
- _n,
3455
+ children: t === "multiple" ? gt() : /* @__PURE__ */ U.jsx(
3456
+ In,
3355
3457
  {
3356
3458
  ...p,
3357
- ref: _e,
3358
- readOnly: d || p?.readOnly,
3359
- icon: /* @__PURE__ */ L.jsx(Et, {}),
3459
+ ref: Fe,
3460
+ readOnly: f || p?.readOnly,
3461
+ icon: /* @__PURE__ */ U.jsx(Bt, {}),
3360
3462
  iconPosition: "right",
3361
3463
  type: "text",
3362
3464
  inputMode: p?.inputMode ?? "numeric",
3363
3465
  value: X,
3364
- onChange: (h) => {
3365
- if (d) {
3366
- p?.onChange?.(h);
3466
+ onChange: (m) => {
3467
+ if (f) {
3468
+ p?.onChange?.(m);
3367
3469
  return;
3368
3470
  }
3369
- J(h.target.value);
3471
+ Z(m.target.value);
3370
3472
  },
3371
3473
  name: D,
3372
3474
  label: S,
3373
- onFocus: (h) => {
3374
- h.stopPropagation(), p?.onFocus?.(h), g === "input" && G(!0);
3475
+ onFocus: (m) => {
3476
+ m.stopPropagation(), p?.onFocus?.(m), g === "input" && z(!0);
3375
3477
  },
3376
- onClick: (h) => {
3377
- h.stopPropagation(), g === "input" && !V && G(!0);
3478
+ onClick: (m) => {
3479
+ m.stopPropagation(), g === "input" && !V && z(!0);
3378
3480
  },
3379
- onBlur: (h) => {
3380
- p?.onBlur?.(h), d || Ze();
3481
+ onBlur: (m) => {
3482
+ p?.onBlur?.(m), f || Ze();
3381
3483
  },
3382
- onKeyDown: (h) => {
3383
- p?.onKeyDown?.(h), d || ht(h);
3484
+ onKeyDown: (m) => {
3485
+ p?.onKeyDown?.(m), f || yt(m);
3384
3486
  }
3385
3487
  }
3386
3488
  )
3387
3489
  }
3388
3490
  ),
3389
- mt && (g === "input" ? document?.body && Fn(
3390
- /* @__PURE__ */ L.jsx(
3391
- Nt,
3491
+ mt && (g === "input" ? document?.body && Bn(
3492
+ /* @__PURE__ */ U.jsx(
3493
+ Ct,
3392
3494
  {
3393
3495
  mode: t,
3394
- footer: i,
3395
- header: a,
3496
+ footer: a,
3497
+ header: s,
3396
3498
  selected: n,
3397
- ref: ke,
3398
- endMonth: l,
3499
+ ref: Oe,
3500
+ endMonth: u,
3399
3501
  required: o,
3400
- onApply: st,
3502
+ onApply: it,
3401
3503
  onCancel: Ue,
3402
3504
  hideFooter: v,
3403
- startMonth: f,
3505
+ startMonth: d,
3404
3506
  applyLabel: M,
3405
3507
  cancelLabel: w,
3406
3508
  displayValue: Ae,
3407
- disabledDates: s,
3408
- numberOfMonths: je ? 1 : u,
3409
- onSelect: Le,
3509
+ disabledDates: i,
3510
+ numberOfMonths: je ? 1 : l,
3511
+ onSelect: Ke,
3410
3512
  hideOutsideDays: c,
3411
- showActionButtons: d,
3412
- min: k,
3513
+ showActionButtons: f,
3514
+ min: O,
3413
3515
  max: x,
3414
3516
  excludeDisabled: j,
3415
- className: et("bg-neutral-strong-default text-neutral-default-default shadow", y),
3416
- style: gt
3517
+ className: tt("bg-neutral-strong-default text-neutral-default-default shadow", y),
3518
+ style: pt
3417
3519
  }
3418
3520
  ),
3419
3521
  document.body
3420
- ) : /* @__PURE__ */ L.jsx(
3421
- Nt,
3522
+ ) : /* @__PURE__ */ U.jsx(
3523
+ Ct,
3422
3524
  {
3423
- min: k,
3525
+ min: O,
3424
3526
  max: x,
3425
3527
  mode: t,
3426
- header: a,
3427
- footer: i,
3528
+ header: s,
3529
+ footer: a,
3428
3530
  required: o,
3429
- endMonth: l,
3531
+ endMonth: u,
3430
3532
  selected: n,
3431
3533
  className: y,
3432
- onApply: st,
3433
- startMonth: f,
3534
+ onApply: it,
3535
+ startMonth: d,
3434
3536
  applyLabel: M,
3435
3537
  hideFooter: v,
3436
3538
  onCancel: Ue,
3437
3539
  cancelLabel: w,
3438
3540
  displayValue: Ae,
3439
- disabledDates: s,
3440
- numberOfMonths: je ? 1 : u,
3441
- onSelect: Le,
3541
+ disabledDates: i,
3542
+ numberOfMonths: je ? 1 : l,
3543
+ onSelect: Ke,
3442
3544
  hideOutsideDays: c,
3443
- showActionButtons: d,
3545
+ showActionButtons: f,
3444
3546
  excludeDisabled: j
3445
3547
  }
3446
3548
  ))
3447
3549
  ] });
3448
- }, Nt = Yn((e) => {
3550
+ }, Ct = Fn((e) => {
3449
3551
  const {
3450
3552
  ref: t,
3451
3553
  min: o,
3452
3554
  max: n,
3453
3555
  style: r,
3454
- header: s,
3455
- footer: a,
3456
- onApply: i,
3556
+ header: i,
3557
+ footer: s,
3558
+ onApply: a,
3457
3559
  onCancel: c,
3458
- onSelect: u,
3459
- required: f,
3460
- endMonth: l,
3461
- className: d,
3560
+ onSelect: l,
3561
+ required: d,
3562
+ endMonth: u,
3563
+ className: f,
3462
3564
  startMonth: M,
3463
3565
  displayValue: w,
3464
3566
  disabledDates: C,
3465
- excludeDisabled: O,
3567
+ excludeDisabled: W,
3466
3568
  mode: v = "single",
3467
3569
  readonly: g = !1,
3468
3570
  numberOfMonths: p = 1,
3469
3571
  hideFooter: S = !1,
3470
3572
  applyLabel: D = "Aplicar",
3471
3573
  cancelLabel: y = "Cancelar",
3472
- hideOutsideDays: k = !1,
3574
+ hideOutsideDays: O = !1,
3473
3575
  showActionButtons: x = !1
3474
- } = e, j = se(() => {
3576
+ } = e, j = ie(() => {
3475
3577
  if (w) {
3476
3578
  if (v === "single")
3477
3579
  return w;
3478
3580
  if (v === "range") {
3479
- const F = w;
3480
- return F.to ? F.to : F.from ? F.from : void 0;
3581
+ const _ = w;
3582
+ return _.to ? _.to : _.from ? _.from : void 0;
3481
3583
  }
3482
3584
  if (v === "multiple") {
3483
- const F = w;
3484
- return F.length > 0 ? F[F.length - 1] : void 0;
3585
+ const _ = w;
3586
+ return _.length > 0 ? _[_.length - 1] : void 0;
3485
3587
  }
3486
3588
  }
3487
- }, [w, v]), E = se(() => ({
3488
- formatWeekdayName: (F) => F.toLocaleDateString("es-ES", { weekday: "narrow" }).toUpperCase()
3489
- }), []), K = se(() => ({
3589
+ }, [w, v]), F = ie(() => ({
3590
+ formatWeekdayName: (_) => _.toLocaleDateString("es-ES", { weekday: "narrow" }).toUpperCase()
3591
+ }), []), K = ie(() => ({
3490
3592
  // Días de la semana (cabecera)
3491
3593
  weekday: " prometeo-fonts-body-large text-neutral-default-default h-12 w-12 ",
3492
3594
  // Días del mes
@@ -3507,21 +3609,21 @@ const hs = (e) => {
3507
3609
  //Contenedor
3508
3610
  months: "flex gap-4 justify-center relative w-full flex-wrap overflow-auto ",
3509
3611
  root: "px-2 text-neutral-default-default "
3510
- }), [g]), V = se(() => {
3511
- if (l) return l;
3512
- const F = /* @__PURE__ */ new Date();
3513
- return new Date(F.getFullYear() + 20, 11, 31);
3514
- }, [l]), G = se(() => {
3515
- const F = w ? JSON.stringify(w) : "empty";
3516
- return `${v}-${F}`;
3612
+ }), [g]), V = ie(() => {
3613
+ if (u) return u;
3614
+ const _ = /* @__PURE__ */ new Date();
3615
+ return new Date(_.getFullYear() + 20, 11, 31);
3616
+ }, [u]), z = ie(() => {
3617
+ const _ = w ? JSON.stringify(w) : "empty";
3618
+ return `${v}-${_}`;
3517
3619
  }, [v, w]);
3518
- return /* @__PURE__ */ L.jsxs(
3620
+ return /* @__PURE__ */ U.jsxs(
3519
3621
  "div",
3520
3622
  {
3521
3623
  ref: t,
3522
- className: et(
3624
+ className: tt(
3523
3625
  "border border-neutral-default-default rounded-lg",
3524
- d
3626
+ f
3525
3627
  ),
3526
3628
  style: {
3527
3629
  ...r,
@@ -3529,80 +3631,80 @@ const hs = (e) => {
3529
3631
  overflowX: "auto"
3530
3632
  },
3531
3633
  children: [
3532
- s && /* @__PURE__ */ L.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof s == "string" ? /* @__PURE__ */ L.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: s }) : s }),
3533
- v === "single" && /* @__PURE__ */ L.jsx(
3534
- Wt,
3634
+ i && /* @__PURE__ */ U.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof i == "string" ? /* @__PURE__ */ U.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: i }) : i }),
3635
+ v === "single" && /* @__PURE__ */ U.jsx(
3636
+ St,
3535
3637
  {
3536
- locale: Mt,
3638
+ locale: Dt,
3537
3639
  mode: "single",
3538
3640
  captionLayout: "dropdown",
3539
- formatters: E,
3641
+ formatters: F,
3540
3642
  classNames: K,
3541
- required: f,
3643
+ required: d,
3542
3644
  disabled: C,
3543
3645
  selected: w,
3544
3646
  defaultMonth: j,
3545
3647
  className: "px-3",
3546
- showOutsideDays: !k,
3648
+ showOutsideDays: !O,
3547
3649
  numberOfMonths: p,
3548
3650
  startMonth: M,
3549
3651
  endMonth: V,
3550
3652
  onSelect: g ? () => {
3551
- } : u
3653
+ } : l
3552
3654
  },
3553
- G
3655
+ z
3554
3656
  ),
3555
- v === "range" && /* @__PURE__ */ L.jsx(
3556
- Wt,
3657
+ v === "range" && /* @__PURE__ */ U.jsx(
3658
+ St,
3557
3659
  {
3558
3660
  mode: "range",
3559
3661
  captionLayout: "dropdown",
3560
- formatters: E,
3662
+ formatters: F,
3561
3663
  classNames: K,
3562
3664
  numberOfMonths: p,
3563
3665
  selected: w,
3564
3666
  defaultMonth: j,
3565
3667
  onSelect: g ? () => {
3566
- } : u,
3567
- required: f,
3668
+ } : l,
3669
+ required: d,
3568
3670
  disabled: C,
3569
3671
  startMonth: M,
3570
3672
  endMonth: V,
3571
3673
  min: o,
3572
3674
  max: n,
3573
3675
  pagedNavigation: !0,
3574
- locale: Mt,
3575
- excludeDisabled: O ?? !0
3676
+ locale: Dt,
3677
+ excludeDisabled: W ?? !0
3576
3678
  },
3577
- G
3679
+ z
3578
3680
  ),
3579
- v === "multiple" && /* @__PURE__ */ L.jsx(
3580
- Wt,
3681
+ v === "multiple" && /* @__PURE__ */ U.jsx(
3682
+ St,
3581
3683
  {
3582
3684
  mode: "multiple",
3583
3685
  captionLayout: "dropdown",
3584
- formatters: E,
3686
+ formatters: F,
3585
3687
  classNames: K,
3586
3688
  selected: w,
3587
3689
  defaultMonth: j,
3588
3690
  onSelect: g ? () => {
3589
- } : u,
3590
- required: f,
3691
+ } : l,
3692
+ required: d,
3591
3693
  disabled: C,
3592
3694
  startMonth: M,
3593
- endMonth: l,
3695
+ endMonth: u,
3594
3696
  min: o,
3595
3697
  max: n,
3596
- locale: Mt
3698
+ locale: Dt
3597
3699
  },
3598
- G
3700
+ z
3599
3701
  ),
3600
- !S && /* @__PURE__ */ L.jsx("div", { className: et(
3702
+ !S && /* @__PURE__ */ U.jsx("div", { className: tt(
3601
3703
  "w-full min-h-[40px] pt-2 px-3 pb-3 flex items-center relative"
3602
- ), children: typeof a == "string" ? /* @__PURE__ */ L.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: a }) : a }),
3603
- x && /* @__PURE__ */ L.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
3604
- /* @__PURE__ */ L.jsx(
3605
- _t,
3704
+ ), children: typeof s == "string" ? /* @__PURE__ */ U.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: s }) : s }),
3705
+ x && /* @__PURE__ */ U.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
3706
+ /* @__PURE__ */ U.jsx(
3707
+ jt,
3606
3708
  {
3607
3709
  variant: "text",
3608
3710
  onClick: c,
@@ -3610,10 +3712,10 @@ const hs = (e) => {
3610
3712
  children: y
3611
3713
  }
3612
3714
  ),
3613
- /* @__PURE__ */ L.jsx(
3614
- _t,
3715
+ /* @__PURE__ */ U.jsx(
3716
+ jt,
3615
3717
  {
3616
- onClick: i,
3718
+ onClick: a,
3617
3719
  variant: "text",
3618
3720
  color: "primary",
3619
3721
  children: D
@@ -3624,8 +3726,8 @@ const hs = (e) => {
3624
3726
  }
3625
3727
  );
3626
3728
  });
3627
- Nt.displayName = "Calendar";
3729
+ Ct.displayName = "Calendar";
3628
3730
  export {
3629
- Nt as C,
3630
- hs as D
3731
+ Ct as C,
3732
+ gs as D
3631
3733
  };