@konstructio/ui 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (46) hide show
  1. package/dist/{Combination-Dyw3lLGQ.js → Combination-VYaRRJBZ.js} +82 -78
  2. package/dist/{Modal-CdsrVAoM.js → Modal-CrG0m703.js} +1 -1
  3. package/dist/chevron-down-UW8ts6wI.js +11 -0
  4. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  5. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  6. package/dist/components/AlertDialog/components/index.js +1 -1
  7. package/dist/components/Badge/Badge.js +2 -2
  8. package/dist/components/Button/Button.variants.js +1 -1
  9. package/dist/components/Checkbox/Checkbox.js +92 -87
  10. package/dist/components/Checkbox/Checkbox.variants.js +2 -2
  11. package/dist/components/Command/Command.js +1 -1
  12. package/dist/components/Command/components/Command.js +1 -1
  13. package/dist/components/Command/components/CommandEmpty.js +1 -1
  14. package/dist/components/Command/components/CommandGroup.js +1 -1
  15. package/dist/components/Command/components/CommandInput.js +1 -1
  16. package/dist/components/Command/components/CommandItem.js +1 -1
  17. package/dist/components/Command/components/CommandList.js +1 -1
  18. package/dist/components/Command/components/CommandSeparator.js +1 -1
  19. package/dist/components/Command/components/DialogContent.js +1 -1
  20. package/dist/components/Command/components/DialogOverlay.js +1 -1
  21. package/dist/components/Datepicker/DatePicker.js +279 -268
  22. package/dist/components/Filter/Filter.js +20 -0
  23. package/dist/components/Filter/Filter.variants.js +22 -0
  24. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +87 -0
  25. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +82 -0
  26. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +87 -0
  27. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +77 -0
  28. package/dist/components/Filter/components/ResetButton/ResetButton.js +18 -0
  29. package/dist/components/Filter/components/index.js +8 -0
  30. package/dist/components/Filter/events/index.js +12 -0
  31. package/dist/components/Input/Input.js +8 -8
  32. package/dist/components/Loading/Loading.js +2 -2
  33. package/dist/components/Modal/Modal.js +1 -1
  34. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  35. package/dist/components/Modal/components/index.js +1 -1
  36. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +28 -34
  37. package/dist/components/index.js +66 -60
  38. package/dist/{createLucideIcon-vyksFS6P.js → createLucideIcon-ByJ0JZvK.js} +4 -4
  39. package/dist/{index-CI55pdPK.js → index-BNU3RH-3.js} +1 -1
  40. package/dist/{index-Cod3awtw.js → index-DLYwlPRZ.js} +1 -1
  41. package/dist/{index-Cj4IZ4ka.js → index-Dkt8F6CZ.js} +1 -1
  42. package/dist/index.d.ts +48 -4
  43. package/dist/index.js +74 -68
  44. package/dist/package.json +22 -25
  45. package/dist/styles.css +1 -1
  46. package/package.json +22 -25
@@ -1,32 +1,32 @@
1
- import { jsx as Ee } from "react/jsx-runtime";
2
- import h, { createContext as fn, useContext as ln, useCallback as A, useRef as Oe, useLayoutEffect as hn, useState as We, useEffect as mn, useMemo as Pe } from "react";
3
- import { cn as _e } from "../../utils/index.js";
1
+ import { jsx as Pe } from "react/jsx-runtime";
2
+ import m, { createContext as fn, useContext as ln, useCallback as A, useRef as We, useLayoutEffect as hn, useState as Se, useEffect as mn, useMemo as _e } from "react";
3
+ import { cn as de } from "../../utils/index.js";
4
4
  import { datePickerVariants as yn } from "./DatePicker.variants.js";
5
- import { c as dt } from "../../createLucideIcon-vyksFS6P.js";
5
+ import { c as dt } from "../../createLucideIcon-ByJ0JZvK.js";
6
6
  import '../../DatePicker.css';/**
7
- * @license lucide-react v0.511.0 - ISC
7
+ * @license lucide-react v0.513.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
12
  const gn = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], wn = dt("chevron-left", gn);
13
13
  /**
14
- * @license lucide-react v0.511.0 - ISC
14
+ * @license lucide-react v0.513.0 - ISC
15
15
  *
16
16
  * This source code is licensed under the ISC license.
17
17
  * See the LICENSE file in the root directory of this source tree.
18
18
  */
19
- const bn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Mn = dt("chevron-right", bn), Fe = {}, le = {};
20
- function he(t, e) {
19
+ const bn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Mn = dt("chevron-right", bn), Fe = {}, he = {};
20
+ function me(t, e) {
21
21
  try {
22
22
  const r = (Fe[t] || (Fe[t] = new Intl.DateTimeFormat("en-GB", {
23
23
  timeZone: t,
24
24
  hour: "numeric",
25
25
  timeZoneName: "longOffset"
26
26
  }).format))(e).split("GMT")[1] || "";
27
- return r in le ? le[r] : Je(r, r.split(":"));
27
+ return r in he ? he[r] : Je(r, r.split(":"));
28
28
  } catch {
29
- if (t in le) return le[t];
29
+ if (t in he) return he[t];
30
30
  const n = t == null ? void 0 : t.match(kn);
31
31
  return n ? Je(t, n.slice(1)) : NaN;
32
32
  }
@@ -34,12 +34,12 @@ function he(t, e) {
34
34
  const kn = /([+-]\d\d):?(\d\d)?/;
35
35
  function Je(t, e) {
36
36
  const n = +e[0], r = +(e[1] || 0);
37
- return le[t] = n > 0 ? n * 60 + r : n * 60 - r;
37
+ return he[t] = n > 0 ? n * 60 + r : n * 60 - r;
38
38
  }
39
39
  class L extends Date {
40
40
  //#region static
41
41
  constructor(...e) {
42
- super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(he(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), ft(this), Ae(this)) : this.setTime(Date.now());
42
+ super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(me(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), ft(this), Ae(this)) : this.setTime(Date.now());
43
43
  }
44
44
  static tz(e, ...n) {
45
45
  return n.length ? new L(...n, e) : new L(Date.now(), e);
@@ -50,7 +50,7 @@ class L extends Date {
50
50
  return new L(+this, e);
51
51
  }
52
52
  getTimezoneOffset() {
53
- return -he(this.timeZone, this);
53
+ return -me(this.timeZone, this);
54
54
  }
55
55
  //#endregion
56
56
  //#region time
@@ -83,16 +83,16 @@ function Dn(t) {
83
83
  Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), ft(t);
84
84
  }
85
85
  function ft(t) {
86
- const e = he(t.timeZone, t), n = /* @__PURE__ */ new Date(+t);
86
+ const e = me(t.timeZone, t), n = /* @__PURE__ */ new Date(+t);
87
87
  n.setUTCHours(n.getUTCHours() - 1);
88
88
  const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), o = r - a, i = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
89
89
  o && i && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + o);
90
90
  const s = r - e;
91
91
  s && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + s);
92
- const c = he(t.timeZone, t), l = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - c, d = c !== e, m = l - s;
93
- if (d && m) {
94
- Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + m);
95
- const w = he(t.timeZone, t), b = c - w;
92
+ const c = me(t.timeZone, t), l = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - c, u = c !== e, h = l - s;
93
+ if (u && h) {
94
+ Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + h);
95
+ const w = me(t.timeZone, t), b = c - w;
96
96
  b && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + b), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + b));
97
97
  }
98
98
  }
@@ -200,23 +200,23 @@ function mt(t, e, n) {
200
200
  ), r);
201
201
  }
202
202
  let Wn = {};
203
- function ge() {
203
+ function we() {
204
204
  return Wn;
205
205
  }
206
206
  function se(t, e) {
207
- var s, c, u, l;
208
- const n = ge(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
207
+ var s, c, d, l;
208
+ const n = we(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r;
209
209
  return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
210
210
  }
211
- function me(t, e) {
211
+ function ye(t, e) {
212
212
  return se(t, { ...e, weekStartsOn: 1 });
213
213
  }
214
214
  function yt(t, e) {
215
215
  const n = x(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = _(n, 0);
216
216
  a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
217
- const o = me(a), i = _(n, 0);
217
+ const o = ye(a), i = _(n, 0);
218
218
  i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
219
- const s = me(i);
219
+ const s = ye(i);
220
220
  return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
221
221
  }
222
222
  function tt(t) {
@@ -240,7 +240,7 @@ function ie(t, ...e) {
240
240
  );
241
241
  return e.map(n);
242
242
  }
243
- function ye(t, e) {
243
+ function ge(t, e) {
244
244
  const n = x(t, e == null ? void 0 : e.in);
245
245
  return n.setHours(0, 0, 0, 0), n;
246
246
  }
@@ -249,12 +249,12 @@ function gt(t, e, n) {
249
249
  n == null ? void 0 : n.in,
250
250
  t,
251
251
  e
252
- ), o = ye(r), i = ye(a), s = +o - tt(o), c = +i - tt(i);
252
+ ), o = ge(r), i = ge(a), s = +o - tt(o), c = +i - tt(i);
253
253
  return Math.round((s - c) / On);
254
254
  }
255
255
  function Sn(t, e) {
256
256
  const n = yt(t, e), r = _(t, 0);
257
- return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), me(r);
257
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), ye(r);
258
258
  }
259
259
  function Nn(t, e, n) {
260
260
  return ht(t, e * 7, n);
@@ -284,7 +284,7 @@ function Yn(t, e, n) {
284
284
  t,
285
285
  e
286
286
  );
287
- return +ye(r) == +ye(a);
287
+ return +ge(r) == +ge(a);
288
288
  }
289
289
  function wt(t) {
290
290
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
@@ -332,8 +332,8 @@ function bt(t, e) {
332
332
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
333
333
  }
334
334
  function Mt(t, e) {
335
- var s, c, u, l;
336
- const n = ge(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? -7 : 0) + 6 - (o - r);
335
+ var s, c, d, l;
336
+ const n = we(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(t, e == null ? void 0 : e.in), o = a.getDay(), i = (o < r ? -7 : 0) + 6 - (o - r);
337
337
  return a.setDate(a.getDate() + i), a.setHours(23, 59, 59, 999), a;
338
338
  }
339
339
  function Hn(t, e) {
@@ -448,7 +448,7 @@ const jn = {
448
448
  nextWeek: "eeee 'at' p",
449
449
  other: "P"
450
450
  }, Zn = (t, e, n, r) => zn[t];
451
- function de(t) {
451
+ function fe(t) {
452
452
  return (e, n) => {
453
453
  const r = n != null && n.context ? String(n.context) : "standalone";
454
454
  let a;
@@ -590,46 +590,46 @@ const Qn = {
590
590
  return n + "th";
591
591
  }, er = {
592
592
  ordinalNumber: Kn,
593
- era: de({
593
+ era: fe({
594
594
  values: Qn,
595
595
  defaultWidth: "wide"
596
596
  }),
597
- quarter: de({
597
+ quarter: fe({
598
598
  values: Xn,
599
599
  defaultWidth: "wide",
600
600
  argumentCallback: (t) => t - 1
601
601
  }),
602
- month: de({
602
+ month: fe({
603
603
  values: Ln,
604
604
  defaultWidth: "wide"
605
605
  }),
606
- day: de({
606
+ day: fe({
607
607
  values: Vn,
608
608
  defaultWidth: "wide"
609
609
  }),
610
- dayPeriod: de({
610
+ dayPeriod: fe({
611
611
  values: Un,
612
612
  defaultWidth: "wide",
613
613
  formattingValues: Jn,
614
614
  defaultFormattingWidth: "wide"
615
615
  })
616
616
  };
617
- function fe(t) {
617
+ function le(t) {
618
618
  return (e, n = {}) => {
619
619
  const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], o = e.match(a);
620
620
  if (!o)
621
621
  return null;
622
- const i = o[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? nr(s, (d) => d.test(i)) : (
622
+ const i = o[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? nr(s, (u) => u.test(i)) : (
623
623
  // [TODO] -- I challenge you to fix the type
624
- tr(s, (d) => d.test(i))
624
+ tr(s, (u) => u.test(i))
625
625
  );
626
- let u;
627
- u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
626
+ let d;
627
+ d = t.valueCallback ? t.valueCallback(c) : c, d = n.valueCallback ? (
628
628
  // [TODO] -- I challenge you to fix the type
629
- n.valueCallback(u)
630
- ) : u;
629
+ n.valueCallback(d)
630
+ ) : d;
631
631
  const l = e.slice(i.length);
632
- return { value: u, rest: l };
632
+ return { value: d, rest: l };
633
633
  };
634
634
  }
635
635
  function tr(t, e) {
@@ -727,32 +727,32 @@ const ar = /^(\d+)(th|st|nd|rd)?/i, or = /\d+/i, sr = {
727
727
  parsePattern: or,
728
728
  valueCallback: (t) => parseInt(t, 10)
729
729
  }),
730
- era: fe({
730
+ era: le({
731
731
  matchPatterns: sr,
732
732
  defaultMatchWidth: "wide",
733
733
  parsePatterns: ir,
734
734
  defaultParseWidth: "any"
735
735
  }),
736
- quarter: fe({
736
+ quarter: le({
737
737
  matchPatterns: cr,
738
738
  defaultMatchWidth: "wide",
739
739
  parsePatterns: ur,
740
740
  defaultParseWidth: "any",
741
741
  valueCallback: (t) => t + 1
742
742
  }),
743
- month: fe({
743
+ month: le({
744
744
  matchPatterns: dr,
745
745
  defaultMatchWidth: "wide",
746
746
  parsePatterns: fr,
747
747
  defaultParseWidth: "any"
748
748
  }),
749
- day: fe({
749
+ day: le({
750
750
  matchPatterns: lr,
751
751
  defaultMatchWidth: "wide",
752
752
  parsePatterns: hr,
753
753
  defaultParseWidth: "any"
754
754
  }),
755
- dayPeriod: fe({
755
+ dayPeriod: le({
756
756
  matchPatterns: mr,
757
757
  defaultMatchWidth: "any",
758
758
  parsePatterns: yr,
@@ -775,21 +775,21 @@ function wr(t, e) {
775
775
  return gt(n, bt(n)) + 1;
776
776
  }
777
777
  function kt(t, e) {
778
- const n = x(t, e == null ? void 0 : e.in), r = +me(n) - +Sn(n);
778
+ const n = x(t, e == null ? void 0 : e.in), r = +ye(n) - +Sn(n);
779
779
  return Math.round(r / lt) + 1;
780
780
  }
781
781
  function Dt(t, e) {
782
- var l, d, m, w;
783
- const n = x(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = ge(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : d.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = _((e == null ? void 0 : e.in) || t, 0);
782
+ var l, u, h, w;
783
+ const n = x(t, e == null ? void 0 : e.in), r = n.getFullYear(), a = we(), o = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((u = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = _((e == null ? void 0 : e.in) || t, 0);
784
784
  i.setFullYear(r + 1, 0, o), i.setHours(0, 0, 0, 0);
785
785
  const s = se(i, e), c = _((e == null ? void 0 : e.in) || t, 0);
786
786
  c.setFullYear(r, 0, o), c.setHours(0, 0, 0, 0);
787
- const u = se(c, e);
788
- return +n >= +s ? r + 1 : +n >= +u ? r : r - 1;
787
+ const d = se(c, e);
788
+ return +n >= +s ? r + 1 : +n >= +d ? r : r - 1;
789
789
  }
790
790
  function br(t, e) {
791
- var s, c, u, l;
792
- const n = ge(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = Dt(t, e), o = _((e == null ? void 0 : e.in) || t, 0);
791
+ var s, c, d, l;
792
+ const n = we(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = Dt(t, e), o = _((e == null ? void 0 : e.in) || t, 0);
793
793
  return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), se(o, e);
794
794
  }
795
795
  function vt(t, e) {
@@ -1492,8 +1492,8 @@ function pr(t, e, n) {
1492
1492
  }
1493
1493
  const Cr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Yr = /^'([^]*?)'?$/, Tr = /''/g, Er = /[a-zA-Z]/;
1494
1494
  function Pr(t, e, n) {
1495
- var l, d, m, w, b, W, k, M;
1496
- const r = ge(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? je, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((d = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : d.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((w = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((W = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : W.weekStartsOn) ?? r.weekStartsOn ?? ((M = (k = r.locale) == null ? void 0 : k.options) == null ? void 0 : M.weekStartsOn) ?? 0, s = x(t, n == null ? void 0 : n.in);
1495
+ var l, u, h, w, b, W, k, M;
1496
+ const r = we(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? je, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : u.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((W = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : W.weekStartsOn) ?? r.weekStartsOn ?? ((M = (k = r.locale) == null ? void 0 : k.options) == null ? void 0 : M.weekStartsOn) ?? 0, s = x(t, n == null ? void 0 : n.in);
1497
1497
  if (!Tn(s))
1498
1498
  throw new RangeError("Invalid time value");
1499
1499
  let c = e.match(xr).map((D) => {
@@ -1518,7 +1518,7 @@ function Pr(t, e, n) {
1518
1518
  return { isToken: !1, value: D };
1519
1519
  });
1520
1520
  a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
1521
- const u = {
1521
+ const d = {
1522
1522
  firstWeekContainsDate: o,
1523
1523
  weekStartsOn: i,
1524
1524
  locale: a
@@ -1528,7 +1528,7 @@ function Pr(t, e, n) {
1528
1528
  const y = D.value;
1529
1529
  (!(n != null && n.useAdditionalWeekYearTokens) && Sr(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Wr(y)) && Nr(y, e, String(t));
1530
1530
  const N = nt[y[0]];
1531
- return N(s, y, a.localize, u);
1531
+ return N(s, y, a.localize, d);
1532
1532
  }).join("");
1533
1533
  }
1534
1534
  function _r(t) {
@@ -1691,10 +1691,10 @@ class ee {
1691
1691
  return (o = this.overrides) != null && o.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : Wt(r, this);
1692
1692
  }, this.startOfDay = (r) => {
1693
1693
  var a;
1694
- return (a = this.overrides) != null && a.startOfDay ? this.overrides.startOfDay(r) : ye(r);
1694
+ return (a = this.overrides) != null && a.startOfDay ? this.overrides.startOfDay(r) : ge(r);
1695
1695
  }, this.startOfISOWeek = (r) => {
1696
1696
  var a;
1697
- return (a = this.overrides) != null && a.startOfISOWeek ? this.overrides.startOfISOWeek(r) : me(r);
1697
+ return (a = this.overrides) != null && a.startOfISOWeek ? this.overrides.startOfISOWeek(r) : ye(r);
1698
1698
  }, this.startOfMonth = (r) => {
1699
1699
  var a;
1700
1700
  return (a = this.overrides) != null && a.startOfMonth ? this.overrides.startOfMonth(r) : Bn(r);
@@ -1806,14 +1806,14 @@ function K(t, e, n = V) {
1806
1806
  if (xt(s))
1807
1807
  return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(t.getDay()) : s.dayOfWeek === t.getDay();
1808
1808
  if (Nt(s)) {
1809
- const c = o(s.before, t), u = o(s.after, t), l = c > 0, d = u < 0;
1810
- return i(s.before, s.after) ? d && l : l || d;
1809
+ const c = o(s.before, t), d = o(s.after, t), l = c > 0, u = d < 0;
1810
+ return i(s.before, s.after) ? u && l : l || u;
1811
1811
  }
1812
1812
  return pt(s) ? o(t, s.after) > 0 : Ct(s) ? o(s.before, t) > 0 : typeof s == "function" ? s(t) : !1;
1813
1813
  });
1814
1814
  }
1815
1815
  function Lr(t, e, n) {
1816
- const { disabled: r, hidden: a, modifiers: o, showOutsideDays: i, broadcastCalendar: s, today: c } = e, { isSameDay: u, isSameMonth: l, startOfMonth: d, isBefore: m, endOfMonth: w, isAfter: b } = n, W = e.startMonth && d(e.startMonth), k = e.endMonth && w(e.endMonth), M = {
1816
+ const { disabled: r, hidden: a, modifiers: o, showOutsideDays: i, broadcastCalendar: s, today: c } = e, { isSameDay: d, isSameMonth: l, startOfMonth: u, isBefore: h, endOfMonth: w, isAfter: b } = n, W = e.startMonth && u(e.startMonth), k = e.endMonth && w(e.endMonth), M = {
1817
1817
  [P.focused]: [],
1818
1818
  [P.outside]: [],
1819
1819
  [P.disabled]: [],
@@ -1821,8 +1821,8 @@ function Lr(t, e, n) {
1821
1821
  [P.today]: []
1822
1822
  }, D = {};
1823
1823
  for (const y of t) {
1824
- const { date: N, displayMonth: f } = y, O = !!(f && !l(N, f)), v = !!(W && m(N, W)), T = !!(k && b(N, k)), $ = !!(r && K(N, r, n)), q = !!(a && K(N, a, n)) || v || T || // Broadcast calendar will show outside days as default
1825
- !s && !i && O || s && i === !1 && O, I = u(N, c ?? n.today());
1824
+ const { date: N, displayMonth: f } = y, O = !!(f && !l(N, f)), v = !!(W && h(N, W)), T = !!(k && b(N, k)), $ = !!(r && K(N, r, n)), q = !!(a && K(N, a, n)) || v || T || // Broadcast calendar will show outside days as default
1825
+ !s && !i && O || s && i === !1 && O, I = d(N, c ?? n.today());
1826
1826
  O && M.outside.push(y), $ && M.disabled.push(y), q && M.hidden.push(y), I && M.today.push(y), o && Object.keys(o).forEach((H) => {
1827
1827
  const re = o == null ? void 0 : o[H];
1828
1828
  re && K(N, re, n) && (D[H] ? D[H].push(y) : D[H] = [y]);
@@ -1853,144 +1853,144 @@ function Vr(t, e, n = {}) {
1853
1853
  return Object.entries(t).filter(([, a]) => a === !0).reduce((a, [o]) => (n[o] ? a.push(n[o]) : e[P[o]] ? a.push(e[P[o]]) : e[Z[o]] && a.push(e[Z[o]]), a), [e[g.Day]]);
1854
1854
  }
1855
1855
  function Ur(t) {
1856
- return h.createElement("button", { ...t });
1856
+ return m.createElement("button", { ...t });
1857
1857
  }
1858
1858
  function Jr(t) {
1859
- return h.createElement("span", { ...t });
1859
+ return m.createElement("span", { ...t });
1860
1860
  }
1861
1861
  function Kr(t) {
1862
1862
  const { size: e = 24, orientation: n = "left", className: r } = t;
1863
- return h.createElement(
1863
+ return m.createElement(
1864
1864
  "svg",
1865
1865
  { className: r, width: e, height: e, viewBox: "0 0 24 24" },
1866
- n === "up" && h.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
1867
- n === "down" && h.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
1868
- n === "left" && h.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
1869
- n === "right" && h.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
1866
+ n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
1867
+ n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
1868
+ n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
1869
+ n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
1870
1870
  );
1871
1871
  }
1872
1872
  function ea(t) {
1873
1873
  const { day: e, modifiers: n, ...r } = t;
1874
- return h.createElement("td", { ...r });
1874
+ return m.createElement("td", { ...r });
1875
1875
  }
1876
1876
  function ta(t) {
1877
- const { day: e, modifiers: n, ...r } = t, a = h.useRef(null);
1878
- return h.useEffect(() => {
1877
+ const { day: e, modifiers: n, ...r } = t, a = m.useRef(null);
1878
+ return m.useEffect(() => {
1879
1879
  var o;
1880
1880
  n.focused && ((o = a.current) == null || o.focus());
1881
- }, [n.focused]), h.createElement("button", { ref: a, ...r });
1881
+ }, [n.focused]), m.createElement("button", { ref: a, ...r });
1882
1882
  }
1883
1883
  function na(t) {
1884
1884
  const { options: e, className: n, components: r, classNames: a, ...o } = t, i = [a[g.Dropdown], n].join(" "), s = e == null ? void 0 : e.find(({ value: c }) => c === o.value);
1885
- return h.createElement(
1885
+ return m.createElement(
1886
1886
  "span",
1887
1887
  { "data-disabled": o.disabled, className: a[g.DropdownRoot] },
1888
- h.createElement(r.Select, { className: i, ...o }, e == null ? void 0 : e.map(({ value: c, label: u, disabled: l }) => h.createElement(r.Option, { key: c, value: c, disabled: l }, u))),
1889
- h.createElement(
1888
+ m.createElement(r.Select, { className: i, ...o }, e == null ? void 0 : e.map(({ value: c, label: d, disabled: l }) => m.createElement(r.Option, { key: c, value: c, disabled: l }, d))),
1889
+ m.createElement(
1890
1890
  "span",
1891
1891
  { className: a[g.CaptionLabel], "aria-hidden": !0 },
1892
1892
  s == null ? void 0 : s.label,
1893
- h.createElement(r.Chevron, { orientation: "down", size: 18, className: a[g.Chevron] })
1893
+ m.createElement(r.Chevron, { orientation: "down", size: 18, className: a[g.Chevron] })
1894
1894
  )
1895
1895
  );
1896
1896
  }
1897
1897
  function ra(t) {
1898
- return h.createElement("div", { ...t });
1898
+ return m.createElement("div", { ...t });
1899
1899
  }
1900
1900
  function aa(t) {
1901
- return h.createElement("div", { ...t });
1901
+ return m.createElement("div", { ...t });
1902
1902
  }
1903
1903
  function oa(t) {
1904
1904
  const { calendarMonth: e, displayIndex: n, ...r } = t;
1905
- return h.createElement("div", { ...r }, t.children);
1905
+ return m.createElement("div", { ...r }, t.children);
1906
1906
  }
1907
1907
  function sa(t) {
1908
1908
  const { calendarMonth: e, displayIndex: n, ...r } = t;
1909
- return h.createElement("div", { ...r });
1909
+ return m.createElement("div", { ...r });
1910
1910
  }
1911
1911
  function ia(t) {
1912
- return h.createElement("table", { ...t });
1912
+ return m.createElement("table", { ...t });
1913
1913
  }
1914
1914
  function ca(t) {
1915
- return h.createElement("div", { ...t });
1915
+ return m.createElement("div", { ...t });
1916
1916
  }
1917
1917
  const Tt = fn(void 0);
1918
- function we() {
1918
+ function be() {
1919
1919
  const t = ln(Tt);
1920
1920
  if (t === void 0)
1921
1921
  throw new Error("useDayPicker() must be used within a custom component.");
1922
1922
  return t;
1923
1923
  }
1924
1924
  function ua(t) {
1925
- const { components: e } = we();
1926
- return h.createElement(e.Dropdown, { ...t });
1925
+ const { components: e } = be();
1926
+ return m.createElement(e.Dropdown, { ...t });
1927
1927
  }
1928
1928
  function da(t) {
1929
- const { onPreviousClick: e, onNextClick: n, previousMonth: r, nextMonth: a, ...o } = t, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: u } } = we(), l = A((m) => {
1930
- a && (n == null || n(m));
1931
- }, [a, n]), d = A((m) => {
1932
- r && (e == null || e(m));
1929
+ const { onPreviousClick: e, onNextClick: n, previousMonth: r, nextMonth: a, ...o } = t, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = be(), l = A((h) => {
1930
+ a && (n == null || n(h));
1931
+ }, [a, n]), u = A((h) => {
1932
+ r && (e == null || e(h));
1933
1933
  }, [r, e]);
1934
- return h.createElement(
1934
+ return m.createElement(
1935
1935
  "nav",
1936
1936
  { ...o },
1937
- h.createElement(
1937
+ m.createElement(
1938
1938
  i.PreviousMonthButton,
1939
- { type: "button", className: s[g.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: d },
1940
- h.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: s[g.Chevron], orientation: "left" })
1939
+ { type: "button", className: s[g.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: u },
1940
+ m.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: s[g.Chevron], orientation: "left" })
1941
1941
  ),
1942
- h.createElement(
1942
+ m.createElement(
1943
1943
  i.NextMonthButton,
1944
- { type: "button", className: s[g.NextMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": u(a), onClick: l },
1945
- h.createElement(i.Chevron, { disabled: a ? void 0 : !0, orientation: "right", className: s[g.Chevron] })
1944
+ { type: "button", className: s[g.NextMonthButton], tabIndex: a ? void 0 : -1, "aria-disabled": a ? void 0 : !0, "aria-label": d(a), onClick: l },
1945
+ m.createElement(i.Chevron, { disabled: a ? void 0 : !0, orientation: "right", className: s[g.Chevron] })
1946
1946
  )
1947
1947
  );
1948
1948
  }
1949
1949
  function fa(t) {
1950
- const { components: e } = we();
1951
- return h.createElement(e.Button, { ...t });
1950
+ const { components: e } = be();
1951
+ return m.createElement(e.Button, { ...t });
1952
1952
  }
1953
1953
  function la(t) {
1954
- return h.createElement("option", { ...t });
1954
+ return m.createElement("option", { ...t });
1955
1955
  }
1956
1956
  function ha(t) {
1957
- const { components: e } = we();
1958
- return h.createElement(e.Button, { ...t });
1957
+ const { components: e } = be();
1958
+ return m.createElement(e.Button, { ...t });
1959
1959
  }
1960
1960
  function ma(t) {
1961
1961
  const { rootRef: e, ...n } = t;
1962
- return h.createElement("div", { ...n, ref: e });
1962
+ return m.createElement("div", { ...n, ref: e });
1963
1963
  }
1964
1964
  function ya(t) {
1965
- return h.createElement("select", { ...t });
1965
+ return m.createElement("select", { ...t });
1966
1966
  }
1967
1967
  function ga(t) {
1968
1968
  const { week: e, ...n } = t;
1969
- return h.createElement("tr", { ...n });
1969
+ return m.createElement("tr", { ...n });
1970
1970
  }
1971
1971
  function wa(t) {
1972
- return h.createElement("th", { ...t });
1972
+ return m.createElement("th", { ...t });
1973
1973
  }
1974
1974
  function ba(t) {
1975
- return h.createElement(
1975
+ return m.createElement(
1976
1976
  "thead",
1977
1977
  { "aria-hidden": !0 },
1978
- h.createElement("tr", { ...t })
1978
+ m.createElement("tr", { ...t })
1979
1979
  );
1980
1980
  }
1981
1981
  function Ma(t) {
1982
1982
  const { week: e, ...n } = t;
1983
- return h.createElement("th", { ...n });
1983
+ return m.createElement("th", { ...n });
1984
1984
  }
1985
1985
  function ka(t) {
1986
- return h.createElement("th", { ...t });
1986
+ return m.createElement("th", { ...t });
1987
1987
  }
1988
1988
  function Da(t) {
1989
- return h.createElement("tbody", { ...t });
1989
+ return m.createElement("tbody", { ...t });
1990
1990
  }
1991
1991
  function va(t) {
1992
- const { components: e } = we();
1993
- return h.createElement(e.Dropdown, { ...t });
1992
+ const { components: e } = be();
1993
+ return m.createElement(e.Dropdown, { ...t });
1994
1994
  }
1995
1995
  const Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: Ur, CaptionLabel: Jr, Chevron: Kr, Day: ea, DayButton: ta, Dropdown: na, DropdownNav: ra, Footer: aa, Month: oa, MonthCaption: sa, MonthGrid: ia, Months: ca, MonthsDropdown: ua, Nav: da, NextMonthButton: fa, Option: la, PreviousMonthButton: ha, Root: ma, Select: ya, Week: ga, WeekNumber: Ma, WeekNumberHeader: ka, Weekday: wa, Weekdays: ba, Weeks: Da, YearsDropdown: va }, Symbol.toStringTag, { value: "Module" }));
1996
1996
  function Wa(t) {
@@ -2054,12 +2054,12 @@ function Fa(t) {
2054
2054
  };
2055
2055
  }
2056
2056
  function Ba(t, e, n, r, a) {
2057
- const { startOfMonth: o, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = a;
2057
+ const { startOfMonth: o, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: d } = a;
2058
2058
  return c({
2059
2059
  start: i(t),
2060
2060
  end: s(t)
2061
- }).map((m) => {
2062
- const w = r.formatMonthDropdown(m, a), b = u(m), W = e && m < o(e) || n && m > o(n) || !1;
2061
+ }).map((h) => {
2062
+ const w = r.formatMonthDropdown(h, a), b = d(h), W = e && h < o(e) || n && h > o(n) || !1;
2063
2063
  return { value: b, label: w, disabled: W };
2064
2064
  });
2065
2065
  }
@@ -2083,11 +2083,11 @@ function Ha(t, e, n) {
2083
2083
  function qa(t, e, n, r) {
2084
2084
  if (!t || !e)
2085
2085
  return;
2086
- const { startOfYear: a, endOfYear: o, addYears: i, getYear: s, isBefore: c, isSameYear: u } = r, l = a(t), d = o(e), m = [];
2086
+ const { startOfYear: a, endOfYear: o, addYears: i, getYear: s, isBefore: c, isSameYear: d } = r, l = a(t), u = o(e), h = [];
2087
2087
  let w = l;
2088
- for (; c(w, d) || u(w, d); )
2089
- m.push(w), w = i(w, 1);
2090
- return m.map((b) => {
2088
+ for (; c(w, u) || d(w, u); )
2089
+ h.push(w), w = i(w, 1);
2090
+ return h.map((b) => {
2091
2091
  const W = n.formatYearDropdown(b, r);
2092
2092
  return {
2093
2093
  value: s(b),
@@ -2133,25 +2133,25 @@ function La(t) {
2133
2133
  function Va(t) {
2134
2134
  return "Choose the Year";
2135
2135
  }
2136
- const Ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Aa, labelDay: $a, labelDayButton: Ft, labelGrid: _t, labelGridcell: ja, labelMonthDropdown: Ra, labelNav: Ga, labelNext: za, labelPrevious: Za, labelWeekNumber: Xa, labelWeekNumberHeader: La, labelWeekday: Qa, labelYearDropdown: Va }, Symbol.toStringTag, { value: "Module" })), be = (t) => t instanceof HTMLElement ? t : null, Ie = (t) => [
2136
+ const Ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Aa, labelDay: $a, labelDayButton: Ft, labelGrid: _t, labelGridcell: ja, labelMonthDropdown: Ra, labelNav: Ga, labelNext: za, labelPrevious: Za, labelWeekNumber: Xa, labelWeekNumberHeader: La, labelWeekday: Qa, labelYearDropdown: Va }, Symbol.toStringTag, { value: "Module" })), Me = (t) => t instanceof HTMLElement ? t : null, Ie = (t) => [
2137
2137
  ...t.querySelectorAll("[data-animated-month]") ?? []
2138
- ], Ja = (t) => be(t.querySelector("[data-animated-month]")), He = (t) => be(t.querySelector("[data-animated-caption]")), qe = (t) => be(t.querySelector("[data-animated-weeks]")), Ka = (t) => be(t.querySelector("[data-animated-nav]")), eo = (t) => be(t.querySelector("[data-animated-weekdays]"));
2138
+ ], Ja = (t) => Me(t.querySelector("[data-animated-month]")), He = (t) => Me(t.querySelector("[data-animated-caption]")), qe = (t) => Me(t.querySelector("[data-animated-weeks]")), Ka = (t) => Me(t.querySelector("[data-animated-nav]")), eo = (t) => Me(t.querySelector("[data-animated-weekdays]"));
2139
2139
  function to(t, e, { classNames: n, months: r, focused: a, dateLib: o }) {
2140
- const i = Oe(null), s = Oe(r), c = Oe(!1);
2140
+ const i = We(null), s = We(r), c = We(!1);
2141
2141
  hn(() => {
2142
- const u = s.current;
2142
+ const d = s.current;
2143
2143
  if (s.current = r, !e || !t.current || // safety check because the ref can be set to anything by consumers
2144
2144
  !(t.current instanceof HTMLElement) || // validation required for the animation to work as expected
2145
- r.length === 0 || u.length === 0 || r.length !== u.length)
2145
+ r.length === 0 || d.length === 0 || r.length !== d.length)
2146
2146
  return;
2147
- const l = o.isSameMonth(r[0].date, u[0].date), d = o.isAfter(r[0].date, u[0].date), m = d ? n[j.caption_after_enter] : n[j.caption_before_enter], w = d ? n[j.weeks_after_enter] : n[j.weeks_before_enter], b = i.current, W = t.current.cloneNode(!0);
2147
+ const l = o.isSameMonth(r[0].date, d[0].date), u = o.isAfter(r[0].date, d[0].date), h = u ? n[j.caption_after_enter] : n[j.caption_before_enter], w = u ? n[j.weeks_after_enter] : n[j.weeks_before_enter], b = i.current, W = t.current.cloneNode(!0);
2148
2148
  if (W instanceof HTMLElement ? (Ie(W).forEach((y) => {
2149
2149
  if (!(y instanceof HTMLElement))
2150
2150
  return;
2151
2151
  const N = Ja(y);
2152
2152
  N && y.contains(N) && y.removeChild(N);
2153
2153
  const f = He(y);
2154
- f && f.classList.remove(m);
2154
+ f && f.classList.remove(h);
2155
2155
  const O = qe(y);
2156
2156
  O && O.classList.remove(w);
2157
2157
  }), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
@@ -2167,27 +2167,27 @@ function to(t, e, { classNames: n, months: r, focused: a, dateLib: o }) {
2167
2167
  return;
2168
2168
  y.style.position = "relative", y.style.overflow = "hidden";
2169
2169
  const O = He(y);
2170
- O && O.classList.add(m);
2170
+ O && O.classList.add(h);
2171
2171
  const v = qe(y);
2172
2172
  v && v.classList.add(w);
2173
2173
  const T = () => {
2174
- c.current = !1, t.current && (t.current.style.isolation = ""), D && (D.style.zIndex = ""), O && O.classList.remove(m), v && v.classList.remove(w), y.style.position = "", y.style.overflow = "", y.contains(f) && y.removeChild(f);
2174
+ c.current = !1, t.current && (t.current.style.isolation = ""), D && (D.style.zIndex = ""), O && O.classList.remove(h), v && v.classList.remove(w), y.style.position = "", y.style.overflow = "", y.contains(f) && y.removeChild(f);
2175
2175
  };
2176
2176
  f.style.pointerEvents = "none", f.style.position = "absolute", f.style.overflow = "hidden", f.setAttribute("aria-hidden", "true");
2177
2177
  const $ = eo(f);
2178
2178
  $ && ($.style.opacity = "0");
2179
2179
  const q = He(f);
2180
- q && (q.classList.add(d ? n[j.caption_before_exit] : n[j.caption_after_exit]), q.addEventListener("animationend", T));
2180
+ q && (q.classList.add(u ? n[j.caption_before_exit] : n[j.caption_after_exit]), q.addEventListener("animationend", T));
2181
2181
  const I = qe(f);
2182
- I && I.classList.add(d ? n[j.weeks_before_exit] : n[j.weeks_after_exit]), y.insertBefore(f, y.firstChild);
2182
+ I && I.classList.add(u ? n[j.weeks_before_exit] : n[j.weeks_after_exit]), y.insertBefore(f, y.firstChild);
2183
2183
  });
2184
2184
  }
2185
2185
  });
2186
2186
  }
2187
2187
  function no(t, e, n, r) {
2188
- const a = t[0], o = t[t.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: m, endOfISOWeek: w, endOfMonth: b, endOfWeek: W, isAfter: k, startOfBroadcastWeek: M, startOfISOWeek: D, startOfWeek: y } = r, N = c ? M(a, r) : i ? D(a) : y(a), f = c ? m(o) : i ? w(b(o)) : W(b(o)), O = l(f, N), v = d(o, a) + 1, T = [];
2188
+ const a = t[0], o = t[t.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: h, endOfISOWeek: w, endOfMonth: b, endOfWeek: W, isAfter: k, startOfBroadcastWeek: M, startOfISOWeek: D, startOfWeek: y } = r, N = c ? M(a, r) : i ? D(a) : y(a), f = c ? h(o) : i ? w(b(o)) : W(b(o)), O = l(f, N), v = u(o, a) + 1, T = [];
2189
2189
  for (let I = 0; I <= O; I++) {
2190
- const H = u(N, I);
2190
+ const H = d(N, I);
2191
2191
  if (e && k(H, e))
2192
2192
  break;
2193
2193
  T.push(H);
@@ -2196,7 +2196,7 @@ function no(t, e, n, r) {
2196
2196
  if (s && T.length < q) {
2197
2197
  const I = q - T.length;
2198
2198
  for (let H = 0; H < I; H++) {
2199
- const re = u(T[T.length - 1], 1);
2199
+ const re = d(T[T.length - 1], 1);
2200
2200
  T.push(re);
2201
2201
  }
2202
2202
  }
@@ -2222,16 +2222,16 @@ function ao(t, e, n, r) {
2222
2222
  function it(t, e) {
2223
2223
  const { month: n, defaultMonth: r, today: a = e.today(), numberOfMonths: o = 1, endMonth: i, startMonth: s } = t;
2224
2224
  let c = n || r || a;
2225
- const { differenceInCalendarMonths: u, addMonths: l, startOfMonth: d } = e;
2226
- if (i && u(i, c) < 0) {
2227
- const m = -1 * (o - 1);
2228
- c = l(i, m);
2225
+ const { differenceInCalendarMonths: d, addMonths: l, startOfMonth: u } = e;
2226
+ if (i && d(i, c) < 0) {
2227
+ const h = -1 * (o - 1);
2228
+ c = l(i, h);
2229
2229
  }
2230
- return s && u(c, s) < 0 && (c = s), d(c);
2230
+ return s && d(c, s) < 0 && (c = s), u(c);
2231
2231
  }
2232
2232
  function oo(t, e, n, r) {
2233
- const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: d, startOfISOWeek: m, startOfWeek: w } = r, b = t.reduce((W, k) => {
2234
- const M = n.broadcastCalendar ? d(k, r) : n.ISOWeek ? m(k) : w(k), D = n.broadcastCalendar ? o(k) : n.ISOWeek ? i(s(k)) : c(s(k)), y = e.filter((v) => v >= M && v <= D), N = n.broadcastCalendar ? 35 : 42;
2233
+ const { addDays: a, endOfBroadcastWeek: o, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: h, startOfWeek: w } = r, b = t.reduce((W, k) => {
2234
+ const M = n.broadcastCalendar ? u(k, r) : n.ISOWeek ? h(k) : w(k), D = n.broadcastCalendar ? o(k) : n.ISOWeek ? i(s(k)) : c(s(k)), y = e.filter((v) => v >= M && v <= D), N = n.broadcastCalendar ? 35 : 42;
2235
2235
  if (n.fixedWeeks && y.length < N) {
2236
2236
  const v = e.filter((T) => {
2237
2237
  const $ = N - y.length;
@@ -2240,7 +2240,7 @@ function oo(t, e, n, r) {
2240
2240
  y.push(...v);
2241
2241
  }
2242
2242
  const f = y.reduce((v, T) => {
2243
- const $ = n.ISOWeek ? u(T) : l(T), q = v.find((H) => H.weekNumber === $), I = new St(T, k, r);
2243
+ const $ = n.ISOWeek ? d(T) : l(T), q = v.find((H) => H.weekNumber === $), I = new St(T, k, r);
2244
2244
  return q ? q.days.push(I) : v.push(new Xr($, [I])), v;
2245
2245
  }, []), O = new Qr(k, f);
2246
2246
  return W.push(O), W;
@@ -2249,10 +2249,10 @@ function oo(t, e, n, r) {
2249
2249
  }
2250
2250
  function so(t, e) {
2251
2251
  let { startMonth: n, endMonth: r } = t;
2252
- const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: u, newDate: l, today: d } = e, { fromYear: m, toYear: w, fromMonth: b, toMonth: W } = t;
2253
- !n && b && (n = b), !n && m && (n = e.newDate(m, 0, 1)), !r && W && (r = W), !r && w && (r = l(w, 11, 31));
2252
+ const { startOfYear: a, startOfDay: o, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: l, today: u } = e, { fromYear: h, toYear: w, fromMonth: b, toMonth: W } = t;
2253
+ !n && b && (n = b), !n && h && (n = e.newDate(h, 0, 1)), !r && W && (r = W), !r && w && (r = l(w, 11, 31));
2254
2254
  const k = t.captionLayout === "dropdown" || t.captionLayout === "dropdown-years";
2255
- return n ? n = i(n) : m ? n = l(m, 0, 1) : !n && k && (n = a(c(t.today ?? d(), -100))), r ? r = s(r) : w ? r = l(w, 11, 31) : !r && k && (r = u(t.today ?? d())), [
2255
+ return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && k && (n = a(c(t.today ?? u(), -100))), r ? r = s(r) : w ? r = l(w, 11, 31) : !r && k && (r = d(t.today ?? u())), [
2256
2256
  n && o(n),
2257
2257
  r && o(r)
2258
2258
  ];
@@ -2260,31 +2260,31 @@ function so(t, e) {
2260
2260
  function io(t, e, n, r) {
2261
2261
  if (n.disableNavigation)
2262
2262
  return;
2263
- const { pagedNavigation: a, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, u = a ? o : 1, l = i(t);
2263
+ const { pagedNavigation: a, numberOfMonths: o = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, d = a ? o : 1, l = i(t);
2264
2264
  if (!e)
2265
- return s(l, u);
2265
+ return s(l, d);
2266
2266
  if (!(c(e, t) < o))
2267
- return s(l, u);
2267
+ return s(l, d);
2268
2268
  }
2269
2269
  function co(t, e, n, r) {
2270
2270
  if (n.disableNavigation)
2271
2271
  return;
2272
- const { pagedNavigation: a, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, u = a ? o ?? 1 : 1, l = i(t);
2272
+ const { pagedNavigation: a, numberOfMonths: o } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, d = a ? o ?? 1 : 1, l = i(t);
2273
2273
  if (!e)
2274
- return s(l, -u);
2274
+ return s(l, -d);
2275
2275
  if (!(c(l, e) <= 0))
2276
- return s(l, -u);
2276
+ return s(l, -d);
2277
2277
  }
2278
2278
  function uo(t) {
2279
2279
  const e = [];
2280
2280
  return t.reduce((n, r) => [...n, ...r.weeks], e);
2281
2281
  }
2282
- function Se(t, e) {
2283
- const [n, r] = We(t);
2282
+ function Ne(t, e) {
2283
+ const [n, r] = Se(t);
2284
2284
  return [e === void 0 ? n : e, r];
2285
2285
  }
2286
2286
  function fo(t, e) {
2287
- const [n, r] = so(t, e), { startOfMonth: a, endOfMonth: o } = e, i = it(t, e), [s, c] = Se(
2287
+ const [n, r] = so(t, e), { startOfMonth: a, endOfMonth: o } = e, i = it(t, e), [s, c] = Ne(
2288
2288
  i,
2289
2289
  // initialMonth is always computed from props.month if provided
2290
2290
  t.month ? i : void 0
@@ -2293,15 +2293,15 @@ function fo(t, e) {
2293
2293
  const O = it(t, e);
2294
2294
  c(O);
2295
2295
  }, [t.timeZone]);
2296
- const u = ao(s, r, t, e), l = no(u, t.endMonth ? o(t.endMonth) : void 0, t, e), d = oo(u, l, t, e), m = uo(d), w = ro(d), b = co(s, n, t, e), W = io(s, r, t, e), { disableNavigation: k, onMonthChange: M } = t, D = (O) => m.some((v) => v.days.some((T) => T.isEqualTo(O))), y = (O) => {
2296
+ const d = ao(s, r, t, e), l = no(d, t.endMonth ? o(t.endMonth) : void 0, t, e), u = oo(d, l, t, e), h = uo(u), w = ro(u), b = co(s, n, t, e), W = io(s, r, t, e), { disableNavigation: k, onMonthChange: M } = t, D = (O) => h.some((v) => v.days.some((T) => T.isEqualTo(O))), y = (O) => {
2297
2297
  if (k)
2298
2298
  return;
2299
2299
  let v = a(O);
2300
2300
  n && v < a(n) && (v = a(n)), r && v > a(r) && (v = a(r)), c(v), M == null || M(v);
2301
2301
  };
2302
2302
  return {
2303
- months: d,
2304
- weeks: m,
2303
+ months: u,
2304
+ weeks: h,
2305
2305
  days: w,
2306
2306
  navStart: n,
2307
2307
  navEnd: r,
@@ -2329,12 +2329,12 @@ function lo(t, e, n, r) {
2329
2329
  return a || (a = t.find((i) => ct(e(i)))), a;
2330
2330
  }
2331
2331
  function ho(t, e, n, r, a, o, i) {
2332
- const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: u, addMonths: l, addWeeks: d, addYears: m, endOfBroadcastWeek: w, endOfISOWeek: b, endOfWeek: W, max: k, min: M, startOfBroadcastWeek: D, startOfISOWeek: y, startOfWeek: N } = i;
2332
+ const { ISOWeek: s, broadcastCalendar: c } = o, { addDays: d, addMonths: l, addWeeks: u, addYears: h, endOfBroadcastWeek: w, endOfISOWeek: b, endOfWeek: W, max: k, min: M, startOfBroadcastWeek: D, startOfISOWeek: y, startOfWeek: N } = i;
2333
2333
  let O = {
2334
- day: u,
2335
- week: d,
2334
+ day: d,
2335
+ week: u,
2336
2336
  month: l,
2337
- year: m,
2337
+ year: h,
2338
2338
  startOfWeek: (v) => c ? D(v, i) : s ? y(v) : N(v),
2339
2339
  endOfWeek: (v) => c ? w(v) : s ? b(v) : W(v)
2340
2340
  }[t](n, e === "after" ? 1 : -1);
@@ -2343,70 +2343,70 @@ function ho(t, e, n, r, a, o, i) {
2343
2343
  function Bt(t, e, n, r, a, o, i, s = 0) {
2344
2344
  if (s > 365)
2345
2345
  return;
2346
- const c = ho(t, e, n.date, r, a, o, i), u = !!(o.disabled && K(c, o.disabled, i)), l = !!(o.hidden && K(c, o.hidden, i)), d = c, m = new St(c, d, i);
2347
- return !u && !l ? m : Bt(t, e, m, r, a, o, i, s + 1);
2346
+ const c = ho(t, e, n.date, r, a, o, i), d = !!(o.disabled && K(c, o.disabled, i)), l = !!(o.hidden && K(c, o.hidden, i)), u = c, h = new St(c, u, i);
2347
+ return !d && !l ? h : Bt(t, e, h, r, a, o, i, s + 1);
2348
2348
  }
2349
2349
  function mo(t, e, n, r, a) {
2350
- const { autoFocus: o } = t, [i, s] = We(), c = lo(e.days, n, r || (() => !1), i), [u, l] = We(o ? c : void 0);
2350
+ const { autoFocus: o } = t, [i, s] = Se(), c = lo(e.days, n, r || (() => !1), i), [d, l] = Se(o ? c : void 0);
2351
2351
  return {
2352
2352
  isFocusTarget: (W) => !!(c != null && c.isEqualTo(W)),
2353
2353
  setFocused: l,
2354
- focused: u,
2354
+ focused: d,
2355
2355
  blur: () => {
2356
- s(u), l(void 0);
2356
+ s(d), l(void 0);
2357
2357
  },
2358
2358
  moveFocus: (W, k) => {
2359
- if (!u)
2359
+ if (!d)
2360
2360
  return;
2361
- const M = Bt(W, k, u, e.navStart, e.navEnd, t, a);
2361
+ const M = Bt(W, k, d, e.navStart, e.navEnd, t, a);
2362
2362
  M && (e.goToDay(M), l(M));
2363
2363
  }
2364
2364
  };
2365
2365
  }
2366
2366
  function yo(t, e) {
2367
- const { selected: n, required: r, onSelect: a } = t, [o, i] = Se(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e, u = (w) => (s == null ? void 0 : s.some((b) => c(b, w))) ?? !1, { min: l, max: d } = t;
2367
+ const { selected: n, required: r, onSelect: a } = t, [o, i] = Ne(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e, d = (w) => (s == null ? void 0 : s.some((b) => c(b, w))) ?? !1, { min: l, max: u } = t;
2368
2368
  return {
2369
2369
  selected: s,
2370
2370
  select: (w, b, W) => {
2371
2371
  let k = [...s ?? []];
2372
- if (u(w)) {
2372
+ if (d(w)) {
2373
2373
  if ((s == null ? void 0 : s.length) === l || r && (s == null ? void 0 : s.length) === 1)
2374
2374
  return;
2375
2375
  k = s == null ? void 0 : s.filter((M) => !c(M, w));
2376
2376
  } else
2377
- (s == null ? void 0 : s.length) === d ? k = [w] : k = [...k, w];
2377
+ (s == null ? void 0 : s.length) === u ? k = [w] : k = [...k, w];
2378
2378
  return a || i(k), a == null || a(k, w, b, W), k;
2379
2379
  },
2380
- isSelected: u
2380
+ isSelected: d
2381
2381
  };
2382
2382
  }
2383
2383
  function go(t, e, n = 0, r = 0, a = !1, o = V) {
2384
- const { from: i, to: s } = e || {}, { isSameDay: c, isAfter: u, isBefore: l } = o;
2385
- let d;
2384
+ const { from: i, to: s } = e || {}, { isSameDay: c, isAfter: d, isBefore: l } = o;
2385
+ let u;
2386
2386
  if (!i && !s)
2387
- d = { from: t, to: n > 0 ? void 0 : t };
2387
+ u = { from: t, to: n > 0 ? void 0 : t };
2388
2388
  else if (i && !s)
2389
- c(i, t) ? a ? d = { from: i, to: void 0 } : d = void 0 : l(t, i) ? d = { from: t, to: i } : d = { from: i, to: t };
2389
+ c(i, t) ? a ? u = { from: i, to: void 0 } : u = void 0 : l(t, i) ? u = { from: t, to: i } : u = { from: i, to: t };
2390
2390
  else if (i && s)
2391
2391
  if (c(i, t) && c(s, t))
2392
- a ? d = { from: i, to: s } : d = void 0;
2392
+ a ? u = { from: i, to: s } : u = void 0;
2393
2393
  else if (c(i, t))
2394
- d = { from: i, to: n > 0 ? void 0 : t };
2394
+ u = { from: i, to: n > 0 ? void 0 : t };
2395
2395
  else if (c(s, t))
2396
- d = { from: t, to: n > 0 ? void 0 : t };
2396
+ u = { from: t, to: n > 0 ? void 0 : t };
2397
2397
  else if (l(t, i))
2398
- d = { from: t, to: s };
2399
- else if (u(t, i))
2400
- d = { from: i, to: t };
2401
- else if (u(t, s))
2402
- d = { from: i, to: t };
2398
+ u = { from: t, to: s };
2399
+ else if (d(t, i))
2400
+ u = { from: i, to: t };
2401
+ else if (d(t, s))
2402
+ u = { from: i, to: t };
2403
2403
  else
2404
2404
  throw new Error("Invalid range");
2405
- if (d != null && d.from && (d != null && d.to)) {
2406
- const m = o.differenceInCalendarDays(d.to, d.from);
2407
- r > 0 && m > r ? d = { from: t, to: void 0 } : n > 1 && m < n && (d = { from: t, to: void 0 });
2405
+ if (u != null && u.from && (u != null && u.to)) {
2406
+ const h = o.differenceInCalendarDays(u.to, u.from);
2407
+ r > 0 && h > r ? u = { from: t, to: void 0 } : n > 1 && h < n && (u = { from: t, to: void 0 });
2408
2408
  }
2409
- return d;
2409
+ return u;
2410
2410
  }
2411
2411
  function wo(t, e, n = V) {
2412
2412
  const r = Array.isArray(e) ? e : [e];
@@ -2433,7 +2433,7 @@ function bo(t, e, n = V) {
2433
2433
  if (i.length) {
2434
2434
  let s = t.from;
2435
2435
  const c = n.differenceInCalendarDays(t.to, t.from);
2436
- for (let u = 0; u <= c; u++) {
2436
+ for (let d = 0; d <= c; d++) {
2437
2437
  if (i.some((l) => l(s)))
2438
2438
  return !0;
2439
2439
  s = n.addDays(s, 1);
@@ -2442,25 +2442,25 @@ function bo(t, e, n = V) {
2442
2442
  return !1;
2443
2443
  }
2444
2444
  function Mo(t, e) {
2445
- const { disabled: n, excludeDisabled: r, selected: a, required: o, onSelect: i } = t, [s, c] = Se(a, i ? a : void 0), u = i ? a : s;
2445
+ const { disabled: n, excludeDisabled: r, selected: a, required: o, onSelect: i } = t, [s, c] = Ne(a, i ? a : void 0), d = i ? a : s;
2446
2446
  return {
2447
- selected: u,
2448
- select: (m, w, b) => {
2449
- const { min: W, max: k } = t, M = m ? go(m, u, W, k, o, e) : void 0;
2450
- return r && n && (M != null && M.from) && M.to && bo({ from: M.from, to: M.to }, n, e) && (M.from = m, M.to = void 0), i || c(M), i == null || i(M, m, w, b), M;
2447
+ selected: d,
2448
+ select: (h, w, b) => {
2449
+ const { min: W, max: k } = t, M = h ? go(h, d, W, k, o, e) : void 0;
2450
+ return r && n && (M != null && M.from) && M.to && bo({ from: M.from, to: M.to }, n, e) && (M.from = h, M.to = void 0), i || c(M), i == null || i(M, h, w, b), M;
2451
2451
  },
2452
- isSelected: (m) => u && J(u, m, !1, e)
2452
+ isSelected: (h) => d && J(d, h, !1, e)
2453
2453
  };
2454
2454
  }
2455
2455
  function ko(t, e) {
2456
- const { selected: n, required: r, onSelect: a } = t, [o, i] = Se(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e;
2456
+ const { selected: n, required: r, onSelect: a } = t, [o, i] = Ne(n, a ? n : void 0), s = a ? n : o, { isSameDay: c } = e;
2457
2457
  return {
2458
2458
  selected: s,
2459
- select: (d, m, w) => {
2460
- let b = d;
2461
- return !r && s && s && c(d, s) && (b = void 0), a || i(b), a == null || a(b, d, m, w), b;
2459
+ select: (u, h, w) => {
2460
+ let b = u;
2461
+ return !r && s && s && c(u, s) && (b = void 0), a || i(b), a == null || a(b, u, h, w), b;
2462
2462
  },
2463
- isSelected: (d) => s ? c(s, d) : !1
2463
+ isSelected: (u) => s ? c(s, u) : !1
2464
2464
  };
2465
2465
  }
2466
2466
  function Do(t, e) {
@@ -2485,7 +2485,7 @@ function vo(t) {
2485
2485
  from: e.selected.from ? new B(e.selected.from, e.timeZone) : void 0,
2486
2486
  to: e.selected.to ? new B(e.selected.to, e.timeZone) : void 0
2487
2487
  }));
2488
- const { components: n, formatters: r, labels: a, dateLib: o, locale: i, classNames: s } = Pe(() => {
2488
+ const { components: n, formatters: r, labels: a, dateLib: o, locale: i, classNames: s } = _e(() => {
2489
2489
  const S = { ...je, ...e.locale };
2490
2490
  return {
2491
2491
  dateLib: new ee({
@@ -2517,17 +2517,17 @@ function vo(t) {
2517
2517
  e.formatters,
2518
2518
  e.labels,
2519
2519
  e.classNames
2520
- ]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: m, onDayClick: w, onDayFocus: b, onDayKeyDown: W, onDayMouseEnter: k, onDayMouseLeave: M, onNextClick: D, onPrevClick: y, showWeekNumber: N, styles: f } = e, { formatCaption: O, formatDay: v, formatMonthDropdown: T, formatWeekNumber: $, formatWeekNumberHeader: q, formatWeekdayName: I, formatYearDropdown: H } = r, re = fo(e, o), { days: Ge, months: Ne, navStart: Re, navEnd: ze, previousMonth: G, nextMonth: R, goToMonth: U } = re, pe = Lr(Ge, e, o), { isSelected: ce, select: ue, selected: Me } = Do(e, o) ?? {}, { blur: Ze, focused: ke, isFocusTarget: It, moveFocus: Qe, setFocused: De } = mo(e, re, pe, ce ?? (() => !1), o), { labelDayButton: Ht, labelGridcell: qt, labelGrid: At, labelMonthDropdown: jt, labelNav: Xe, labelPrevious: $t, labelNext: Gt, labelWeekday: Rt, labelWeekNumber: zt, labelWeekNumberHeader: Zt, labelYearDropdown: Qt } = a, Xt = Pe(() => Ha(o, e.ISOWeek), [o, e.ISOWeek]), Le = u !== void 0 || w !== void 0, Ce = A(() => {
2520
+ ]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: h, onDayClick: w, onDayFocus: b, onDayKeyDown: W, onDayMouseEnter: k, onDayMouseLeave: M, onNextClick: D, onPrevClick: y, showWeekNumber: N, styles: f } = e, { formatCaption: O, formatDay: v, formatMonthDropdown: T, formatWeekNumber: $, formatWeekNumberHeader: q, formatWeekdayName: I, formatYearDropdown: H } = r, re = fo(e, o), { days: Ge, months: pe, navStart: Re, navEnd: ze, previousMonth: G, nextMonth: R, goToMonth: U } = re, Ce = Lr(Ge, e, o), { isSelected: ce, select: ue, selected: ke } = Do(e, o) ?? {}, { blur: Ze, focused: De, isFocusTarget: It, moveFocus: Qe, setFocused: ve } = mo(e, re, Ce, ce ?? (() => !1), o), { labelDayButton: Ht, labelGridcell: qt, labelGrid: At, labelMonthDropdown: jt, labelNav: Xe, labelPrevious: $t, labelNext: Gt, labelWeekday: Rt, labelWeekNumber: zt, labelWeekNumberHeader: Zt, labelYearDropdown: Qt } = a, Xt = _e(() => Ha(o, e.ISOWeek), [o, e.ISOWeek]), Le = d !== void 0 || w !== void 0, xe = A(() => {
2521
2521
  G && (U(G), y == null || y(G));
2522
- }, [G, U, y]), xe = A(() => {
2522
+ }, [G, U, y]), Ye = A(() => {
2523
2523
  R && (U(R), D == null || D(R));
2524
2524
  }, [U, R, D]), Lt = A((S, E) => (Y) => {
2525
- Y.preventDefault(), Y.stopPropagation(), De(S), ue == null || ue(S.date, E, Y), w == null || w(S.date, E, Y);
2526
- }, [ue, w, De]), Vt = A((S, E) => (Y) => {
2527
- De(S), b == null || b(S.date, E, Y);
2528
- }, [b, De]), Ut = A((S, E) => (Y) => {
2529
- Ze(), m == null || m(S.date, E, Y);
2530
- }, [Ze, m]), Jt = A((S, E) => (Y) => {
2525
+ Y.preventDefault(), Y.stopPropagation(), ve(S), ue == null || ue(S.date, E, Y), w == null || w(S.date, E, Y);
2526
+ }, [ue, w, ve]), Vt = A((S, E) => (Y) => {
2527
+ ve(S), b == null || b(S.date, E, Y);
2528
+ }, [b, ve]), Ut = A((S, E) => (Y) => {
2529
+ Ze(), h == null || h(S.date, E, Y);
2530
+ }, [Ze, h]), Jt = A((S, E) => (Y) => {
2531
2531
  const te = {
2532
2532
  ArrowLeft: ["day", e.dir === "rtl" ? "after" : "before"],
2533
2533
  ArrowRight: ["day", e.dir === "rtl" ? "before" : "after"],
@@ -2540,8 +2540,8 @@ function vo(t) {
2540
2540
  };
2541
2541
  if (te[Y.key]) {
2542
2542
  Y.preventDefault(), Y.stopPropagation();
2543
- const [z, ve] = te[Y.key];
2544
- Qe(z, ve);
2543
+ const [z, Oe] = te[Y.key];
2544
+ Qe(z, Oe);
2545
2545
  }
2546
2546
  W == null || W(S.date, E, Y);
2547
2547
  }, [Qe, W, e.dir]), Kt = A((S, E) => (Y) => {
@@ -2554,58 +2554,58 @@ function vo(t) {
2554
2554
  }, [o, U]), nn = A((S) => (E) => {
2555
2555
  const Y = Number(E.target.value), te = o.setYear(o.startOfMonth(S), Y);
2556
2556
  U(te);
2557
- }, [o, U]), { className: rn, style: an } = Pe(() => ({
2557
+ }, [o, U]), { className: rn, style: an } = _e(() => ({
2558
2558
  className: [s[g.Root], e.className].filter(Boolean).join(" "),
2559
2559
  style: { ...f == null ? void 0 : f[g.Root], ...e.style }
2560
- }), [s, e.className, e.style, f]), on = Sa(e), Ve = Oe(null);
2560
+ }), [s, e.className, e.style, f]), on = Sa(e), Ve = We(null);
2561
2561
  to(Ve, !!e.animate, {
2562
2562
  classNames: s,
2563
- months: Ne,
2564
- focused: ke,
2563
+ months: pe,
2564
+ focused: De,
2565
2565
  dateLib: o
2566
2566
  });
2567
2567
  const sn = {
2568
2568
  dayPickerProps: e,
2569
- selected: Me,
2569
+ selected: ke,
2570
2570
  select: ue,
2571
2571
  isSelected: ce,
2572
- months: Ne,
2572
+ months: pe,
2573
2573
  nextMonth: R,
2574
2574
  previousMonth: G,
2575
2575
  goToMonth: U,
2576
- getModifiers: pe,
2576
+ getModifiers: Ce,
2577
2577
  components: n,
2578
2578
  classNames: s,
2579
2579
  styles: f,
2580
2580
  labels: a,
2581
2581
  formatters: r
2582
2582
  };
2583
- return h.createElement(
2583
+ return m.createElement(
2584
2584
  Tt.Provider,
2585
2585
  { value: sn },
2586
- h.createElement(
2586
+ m.createElement(
2587
2587
  n.Root,
2588
2588
  { rootRef: e.animate ? Ve : void 0, className: rn, style: an, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...on },
2589
- h.createElement(
2589
+ m.createElement(
2590
2590
  n.Months,
2591
2591
  { className: s[g.Months], style: f == null ? void 0 : f[g.Months] },
2592
- !e.hideNavigation && !l && h.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: Ce, onNextClick: xe, previousMonth: G, nextMonth: R }),
2593
- Ne.map((S, E) => {
2592
+ !e.hideNavigation && !l && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: xe, onNextClick: Ye, previousMonth: G, nextMonth: R }),
2593
+ pe.map((S, E) => {
2594
2594
  const Y = Ba(S.date, Re, ze, r, o), te = qa(Re, ze, r, o);
2595
- return h.createElement(
2595
+ return m.createElement(
2596
2596
  n.Month,
2597
2597
  { "data-animated-month": e.animate ? "true" : void 0, className: s[g.Month], style: f == null ? void 0 : f[g.Month], key: E, displayIndex: E, calendarMonth: S },
2598
- l === "around" && !e.hideNavigation && E === 0 && h.createElement(
2598
+ l === "around" && !e.hideNavigation && E === 0 && m.createElement(
2599
2599
  n.PreviousMonthButton,
2600
- { type: "button", className: s[g.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": $t(G), onClick: Ce, "data-animated-button": e.animate ? "true" : void 0 },
2601
- h.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
2600
+ { type: "button", className: s[g.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": $t(G), onClick: xe, "data-animated-button": e.animate ? "true" : void 0 },
2601
+ m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
2602
2602
  ),
2603
- h.createElement(n.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[g.MonthCaption], style: f == null ? void 0 : f[g.MonthCaption], calendarMonth: S, displayIndex: E }, c != null && c.startsWith("dropdown") ? h.createElement(
2603
+ m.createElement(n.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[g.MonthCaption], style: f == null ? void 0 : f[g.MonthCaption], calendarMonth: S, displayIndex: E }, c != null && c.startsWith("dropdown") ? m.createElement(
2604
2604
  n.DropdownNav,
2605
2605
  { className: s[g.Dropdowns], style: f == null ? void 0 : f[g.Dropdowns] },
2606
- c === "dropdown" || c === "dropdown-months" ? h.createElement(n.MonthsDropdown, { className: s[g.MonthsDropdown], "aria-label": jt(), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: tn(S.date), options: Y, style: f == null ? void 0 : f[g.Dropdown], value: o.getMonth(S.date) }) : h.createElement("span", null, T(S.date, o)),
2607
- c === "dropdown" || c === "dropdown-years" ? h.createElement(n.YearsDropdown, { className: s[g.YearsDropdown], "aria-label": Qt(o.options), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: nn(S.date), options: te, style: f == null ? void 0 : f[g.Dropdown], value: o.getYear(S.date) }) : h.createElement("span", null, H(S.date, o)),
2608
- h.createElement("span", { role: "status", "aria-live": "polite", style: {
2606
+ c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { className: s[g.MonthsDropdown], "aria-label": jt(), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: tn(S.date), options: Y, style: f == null ? void 0 : f[g.Dropdown], value: o.getMonth(S.date) }) : m.createElement("span", null, T(S.date, o)),
2607
+ c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { className: s[g.YearsDropdown], "aria-label": Qt(o.options), classNames: s, components: n, disabled: !!e.disableNavigation, onChange: nn(S.date), options: te, style: f == null ? void 0 : f[g.Dropdown], value: o.getYear(S.date) }) : m.createElement("span", null, H(S.date, o)),
2608
+ m.createElement("span", { role: "status", "aria-live": "polite", style: {
2609
2609
  border: 0,
2610
2610
  clip: "rect(0 0 0 0)",
2611
2611
  height: "1px",
@@ -2617,43 +2617,43 @@ function vo(t) {
2617
2617
  whiteSpace: "nowrap",
2618
2618
  wordWrap: "normal"
2619
2619
  } }, O(S.date, o.options, o))
2620
- ) : h.createElement(n.CaptionLabel, { className: s[g.CaptionLabel], role: "status", "aria-live": "polite" }, O(S.date, o.options, o))),
2621
- l === "around" && !e.hideNavigation && E === d - 1 && h.createElement(
2620
+ ) : m.createElement(n.CaptionLabel, { className: s[g.CaptionLabel], role: "status", "aria-live": "polite" }, O(S.date, o.options, o))),
2621
+ l === "around" && !e.hideNavigation && E === u - 1 && m.createElement(
2622
2622
  n.NextMonthButton,
2623
- { type: "button", className: s[g.NextMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": Gt(R), onClick: xe, "data-animated-button": e.animate ? "true" : void 0 },
2624
- h.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
2623
+ { type: "button", className: s[g.NextMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": Gt(R), onClick: Ye, "data-animated-button": e.animate ? "true" : void 0 },
2624
+ m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: s[g.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
2625
2625
  ),
2626
- E === d - 1 && l === "after" && !e.hideNavigation && h.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: Ce, onNextClick: xe, previousMonth: G, nextMonth: R }),
2627
- h.createElement(
2626
+ E === u - 1 && l === "after" && !e.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[g.Nav], style: f == null ? void 0 : f[g.Nav], "aria-label": Xe(), onPreviousClick: xe, onNextClick: Ye, previousMonth: G, nextMonth: R }),
2627
+ m.createElement(
2628
2628
  n.MonthGrid,
2629
- { role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label": At(S.date, o.options, o) || void 0, className: s[g.MonthGrid], style: f == null ? void 0 : f[g.MonthGrid] },
2630
- !e.hideWeekdays && h.createElement(
2629
+ { role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": At(S.date, o.options, o) || void 0, className: s[g.MonthGrid], style: f == null ? void 0 : f[g.MonthGrid] },
2630
+ !e.hideWeekdays && m.createElement(
2631
2631
  n.Weekdays,
2632
2632
  { "data-animated-weekdays": e.animate ? "true" : void 0, className: s[g.Weekdays], style: f == null ? void 0 : f[g.Weekdays] },
2633
- N && h.createElement(n.WeekNumberHeader, { "aria-label": Zt(o.options), className: s[g.WeekNumberHeader], style: f == null ? void 0 : f[g.WeekNumberHeader], scope: "col" }, q()),
2634
- Xt.map((z, ve) => h.createElement(n.Weekday, { "aria-label": Rt(z, o.options, o), className: s[g.Weekday], key: ve, style: f == null ? void 0 : f[g.Weekday], scope: "col" }, I(z, o.options, o)))
2633
+ N && m.createElement(n.WeekNumberHeader, { "aria-label": Zt(o.options), className: s[g.WeekNumberHeader], style: f == null ? void 0 : f[g.WeekNumberHeader], scope: "col" }, q()),
2634
+ Xt.map((z, Oe) => m.createElement(n.Weekday, { "aria-label": Rt(z, o.options, o), className: s[g.Weekday], key: Oe, style: f == null ? void 0 : f[g.Weekday], scope: "col" }, I(z, o.options, o)))
2635
2635
  ),
2636
- h.createElement(n.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: s[g.Weeks], style: f == null ? void 0 : f[g.Weeks] }, S.weeks.map((z, ve) => h.createElement(
2636
+ m.createElement(n.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: s[g.Weeks], style: f == null ? void 0 : f[g.Weeks] }, S.weeks.map((z, Oe) => m.createElement(
2637
2637
  n.Week,
2638
2638
  { className: s[g.Week], key: z.weekNumber, style: f == null ? void 0 : f[g.Week], week: z },
2639
- N && h.createElement(n.WeekNumber, { week: z, style: f == null ? void 0 : f[g.WeekNumber], "aria-label": zt(z.weekNumber, {
2639
+ N && m.createElement(n.WeekNumber, { week: z, style: f == null ? void 0 : f[g.WeekNumber], "aria-label": zt(z.weekNumber, {
2640
2640
  locale: i
2641
2641
  }), className: s[g.WeekNumber], scope: "row", role: "rowheader" }, $(z.weekNumber, o)),
2642
2642
  z.days.map((F) => {
2643
- const { date: Q } = F, p = pe(F);
2644
- if (p[P.focused] = !p.hidden && !!(ke != null && ke.isEqualTo(F)), p[Z.selected] = (ce == null ? void 0 : ce(Q)) || p.selected, $e(Me)) {
2645
- const { from: Ye, to: Te } = Me;
2646
- p[Z.range_start] = !!(Ye && Te && o.isSameDay(Q, Ye)), p[Z.range_end] = !!(Ye && Te && o.isSameDay(Q, Te)), p[Z.range_middle] = J(Me, Q, !0, o);
2643
+ const { date: Q } = F, p = Ce(F);
2644
+ if (p[P.focused] = !p.hidden && !!(De != null && De.isEqualTo(F)), p[Z.selected] = (ce == null ? void 0 : ce(Q)) || p.selected, $e(ke)) {
2645
+ const { from: Te, to: Ee } = ke;
2646
+ p[Z.range_start] = !!(Te && Ee && o.isSameDay(Q, Te)), p[Z.range_end] = !!(Te && Ee && o.isSameDay(Q, Ee)), p[Z.range_middle] = J(ke, Q, !0, o);
2647
2647
  }
2648
2648
  const cn = Ia(p, f, e.modifiersStyles), un = Vr(p, s, e.modifiersClassNames), dn = !Le && !p.hidden ? qt(Q, p, o.options, o) : void 0;
2649
- return h.createElement(n.Day, { key: `${o.format(Q, "yyyy-MM-dd")}_${o.format(F.displayMonth, "yyyy-MM")}`, day: F, modifiers: p, className: un.join(" "), style: cn, role: "gridcell", "aria-selected": p.selected || void 0, "aria-label": dn, "data-day": o.format(Q, "yyyy-MM-dd"), "data-month": F.outside ? o.format(Q, "yyyy-MM") : void 0, "data-selected": p.selected || void 0, "data-disabled": p.disabled || void 0, "data-hidden": p.hidden || void 0, "data-outside": F.outside || void 0, "data-focused": p.focused || void 0, "data-today": p.today || void 0 }, !p.hidden && Le ? h.createElement(n.DayButton, { className: s[g.DayButton], style: f == null ? void 0 : f[g.DayButton], type: "button", day: F, modifiers: p, disabled: p.disabled || void 0, tabIndex: It(F) ? 0 : -1, "aria-label": Ht(Q, p, o.options, o), onClick: Lt(F, p), onBlur: Ut(F, p), onFocus: Vt(F, p), onKeyDown: Jt(F, p), onMouseEnter: Kt(F, p), onMouseLeave: en(F, p) }, v(Q, o.options, o)) : !p.hidden && v(F.date, o.options, o));
2649
+ return m.createElement(n.Day, { key: `${o.format(Q, "yyyy-MM-dd")}_${o.format(F.displayMonth, "yyyy-MM")}`, day: F, modifiers: p, className: un.join(" "), style: cn, role: "gridcell", "aria-selected": p.selected || void 0, "aria-label": dn, "data-day": o.format(Q, "yyyy-MM-dd"), "data-month": F.outside ? o.format(Q, "yyyy-MM") : void 0, "data-selected": p.selected || void 0, "data-disabled": p.disabled || void 0, "data-hidden": p.hidden || void 0, "data-outside": F.outside || void 0, "data-focused": p.focused || void 0, "data-today": p.today || void 0 }, !p.hidden && Le ? m.createElement(n.DayButton, { className: s[g.DayButton], style: f == null ? void 0 : f[g.DayButton], type: "button", day: F, modifiers: p, disabled: p.disabled || void 0, tabIndex: It(F) ? 0 : -1, "aria-label": Ht(Q, p, o.options, o), onClick: Lt(F, p), onBlur: Ut(F, p), onFocus: Vt(F, p), onKeyDown: Jt(F, p), onMouseEnter: Kt(F, p), onMouseLeave: en(F, p) }, v(Q, o.options, o)) : !p.hidden && v(F.date, o.options, o));
2650
2650
  })
2651
2651
  )))
2652
2652
  )
2653
2653
  );
2654
2654
  })
2655
2655
  ),
2656
- e.footer && h.createElement(n.Footer, { className: s[g.Footer], style: f == null ? void 0 : f[g.Footer], role: "status", "aria-live": "polite" }, e.footer)
2656
+ e.footer && m.createElement(n.Footer, { className: s[g.Footer], style: f == null ? void 0 : f[g.Footer], role: "status", "aria-live": "polite" }, e.footer)
2657
2657
  )
2658
2658
  );
2659
2659
  }
@@ -2661,23 +2661,28 @@ const Oo = ({
2661
2661
  className: t,
2662
2662
  showOutsideDays: e = !0,
2663
2663
  animate: n = !0,
2664
- onSelect: r,
2665
- ...a
2664
+ arrowClassName: r,
2665
+ monthsClassName: a,
2666
+ defaultSelected: o,
2667
+ onSelect: i,
2668
+ ...s
2666
2669
  }) => {
2667
- const [o, i] = We(), s = A(
2668
- (c) => {
2669
- c && (i(c), r == null || r(c));
2670
+ const [c, d] = Se(
2671
+ () => o
2672
+ ), l = A(
2673
+ (u) => {
2674
+ u && (d(u), i == null || i(u));
2670
2675
  },
2671
- [r]
2676
+ [i]
2672
2677
  );
2673
- return /* @__PURE__ */ Ee(
2678
+ return /* @__PURE__ */ Pe(
2674
2679
  vo,
2675
2680
  {
2676
- className: _e(yn({ className: t })),
2681
+ className: de(yn({ className: t })),
2677
2682
  animate: n,
2678
2683
  mode: "single",
2679
- selected: o,
2680
- onSelect: s,
2684
+ selected: c,
2685
+ onSelect: l,
2681
2686
  showOutsideDays: e,
2682
2687
  role: "dialog",
2683
2688
  "aria-label": "Datepicker",
@@ -2686,9 +2691,15 @@ const Oo = ({
2686
2691
  day_button: "h-[30px] aria-selected:opacity-100 font-semibold hover:rounded-full cursor-pointer rounded-full w-[30px]",
2687
2692
  day: "text-center text-[14px] leading-[20px]",
2688
2693
  month_caption: "text-slate-700 font-semibold text-sm pl-1 h-[32px] flex items-center",
2689
- months: "flex flex-col relative px-5 py-4 rounded-lg shadow-md px-6 py-4 w-[307px] justify-center items-center",
2694
+ months: de(
2695
+ "flex flex-col relative px-5 py-4 rounded-lg shadow-md px-6 py-4 w-[307px] justify-center items-center",
2696
+ a
2697
+ ),
2690
2698
  month: "flex flex-col gap-4",
2691
- nav: "absolute right-4 top-3.5 flex justify-center items-center gap-[4px]",
2699
+ nav: de(
2700
+ "absolute right-4 top-3.5 flex justify-center items-center gap-[4px]",
2701
+ r
2702
+ ),
2692
2703
  outside: "text-slate-400",
2693
2704
  selected: "[&>button]:bg-blue-600 [&>button]:text-white [&>button]:hover:bg-blue-700 [&>button]:transition-all [&>button]:duration-300 [&>button]:rounded-full",
2694
2705
  table: "w-full",
@@ -2699,9 +2710,9 @@ const Oo = ({
2699
2710
  month_grid: '[&>thead]:table-header-group [&>thead]:relative [&>thead]:after:block [&>thead]:after:content-[" "] [&>thead]:after:h-4'
2700
2711
  },
2701
2712
  components: {
2702
- Chevron: ({ className: c, ...u }) => u.orientation === "left" ? /* @__PURE__ */ Ee(wn, { className: _e(c), ...u }) : /* @__PURE__ */ Ee(Mn, { className: _e(c), ...u })
2713
+ Chevron: ({ className: u, ...h }) => h.orientation === "left" ? /* @__PURE__ */ Pe(wn, { className: de(u), ...h }) : /* @__PURE__ */ Pe(Mn, { className: de(u), ...h })
2703
2714
  },
2704
- ...a
2715
+ ...s
2705
2716
  }
2706
2717
  );
2707
2718
  };