@konstructio/ui 0.1.2-alpha.65 → 0.1.2-alpha.67

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 (89) hide show
  1. package/dist/{DayPicker-PUEUVAST.js → DayPicker-CaeUXRCF.js} +475 -470
  2. package/dist/assets/icons/components/AlertOutline.d.ts +3 -0
  3. package/dist/assets/icons/components/AlertOutline.js +28 -0
  4. package/dist/assets/icons/components/index.d.ts +1 -0
  5. package/dist/assets/icons/components/index.js +126 -124
  6. package/dist/assets/icons/index.js +122 -120
  7. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  8. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  9. package/dist/components/AlertDialog/components/index.js +1 -1
  10. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  11. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  12. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +51 -51
  15. package/dist/components/Command/Command.js +1 -1
  16. package/dist/components/Command/components/Command.js +1 -1
  17. package/dist/components/Command/components/CommandEmpty.js +1 -1
  18. package/dist/components/Command/components/CommandGroup.js +1 -1
  19. package/dist/components/Command/components/CommandInput.js +1 -1
  20. package/dist/components/Command/components/CommandItem.js +1 -1
  21. package/dist/components/Command/components/CommandList.js +1 -1
  22. package/dist/components/Command/components/CommandSeparator.js +1 -1
  23. package/dist/components/Command/components/DialogContent.js +1 -1
  24. package/dist/components/Command/components/DialogOverlay.js +1 -1
  25. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  26. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  27. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  28. package/dist/components/Datepicker/DatePicker.js +1 -1
  29. package/dist/components/Drawer/components/index.js +6 -6
  30. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -0
  31. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  32. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  33. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  34. package/dist/components/ProgressBar/ProgressBar.d.ts +0 -17
  35. package/dist/components/ProgressBar/ProgressBar.js +38 -59
  36. package/dist/components/ProgressBar/ProgressBar.types.d.ts +12 -28
  37. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +3 -3
  38. package/dist/components/ProgressBar/ProgressBar.variants.js +23 -24
  39. package/dist/components/Range/Range.js +1 -1
  40. package/dist/components/Slider/Slider.js +1 -1
  41. package/dist/components/Spinner/Spinner.d.ts +4 -0
  42. package/dist/components/Spinner/Spinner.js +57 -0
  43. package/dist/components/Spinner/Spinner.types.d.ts +13 -0
  44. package/dist/components/Spinner/Spinner.variants.d.ts +6 -0
  45. package/dist/components/Spinner/Spinner.variants.js +54 -0
  46. package/dist/components/Switch/Switch.js +47 -47
  47. package/dist/components/Tabs/Tabs.js +1 -1
  48. package/dist/components/Tabs/components/Content.js +1 -1
  49. package/dist/components/Tabs/components/List.js +1 -1
  50. package/dist/components/Tabs/components/Trigger.js +1 -1
  51. package/dist/components/Toast/Toast.js +9 -9
  52. package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +5 -0
  53. package/dist/components/VirtualizedTable/VirtualizedTable.js +83 -71
  54. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +5 -0
  55. package/dist/components/VirtualizedTable/components/Body/Body.js +56 -53
  56. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  57. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +2 -2
  58. package/dist/components/VirtualizedTable/contexts/table.context.d.ts +4 -1
  59. package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  60. package/dist/components/VirtualizedTable/contexts/table.provider.js +192 -108
  61. package/dist/components/VirtualizedTable/contexts/table.types.d.ts +4 -1
  62. package/dist/components/VirtualizedTable/events/index.d.ts +12 -0
  63. package/dist/components/VirtualizedTable/events/index.js +29 -0
  64. package/dist/components/index.d.ts +3 -0
  65. package/dist/components/index.js +98 -91
  66. package/dist/icons.d.ts +1 -1
  67. package/dist/icons.js +122 -120
  68. package/dist/{index-DKfEnhKr.js → index--l0zux8V.js} +2 -2
  69. package/dist/{index-AV6ZtGhy.js → index-3fEdeexs.js} +1 -1
  70. package/dist/{index-CeZcoQDw.js → index-9a-FL_6D.js} +6 -6
  71. package/dist/{index-Dy59FQl5.js → index-BKMaItIC.js} +1 -1
  72. package/dist/{index-DtEcCIrM.js → index-BRXMsxSL.js} +1 -1
  73. package/dist/{index-DMb4KD0b.js → index-CESXsoMn.js} +1 -1
  74. package/dist/{index-BG8O18ZY.js → index-CJnS4BVW.js} +1 -1
  75. package/dist/{index-vcSp8YRZ.js → index-Cmf-IG4l.js} +10 -10
  76. package/dist/{index-Byr10W8m.js → index-DPcwqB8q.js} +618 -613
  77. package/dist/{index-BqhYevy7.js → index-Dd_ZmIqU.js} +19 -19
  78. package/dist/{index-D9SSJ6om.js → index-Dfq4O3b4.js} +3 -3
  79. package/dist/{index-gSPwC-1I.js → index-Jr0cra7i.js} +9 -9
  80. package/dist/{index-BlSRBdPy.js → index-URQGEGX7.js} +1 -1
  81. package/dist/index.js +142 -135
  82. package/dist/{libphonenumber-C9G59k5J.js → libphonenumber-aZ-2KWIf.js} +3 -3
  83. package/dist/package.json +21 -21
  84. package/dist/{proxy-BhEKW5n7.js → proxy-BIRlSMN_.js} +856 -851
  85. package/dist/styles.css +1 -1
  86. package/dist/useBreadcrumb-C_Wb2cXs.js +1435 -0
  87. package/dist/utils/index.js +514 -355
  88. package/package.json +21 -21
  89. package/dist/useBreadcrumb-vSs0pRo3.js +0 -1412
@@ -7,21 +7,21 @@ function Sn(e, t, r = "long") {
7
7
  timeZoneName: r
8
8
  }).format(t).split(/\s/g).slice(2).join(" ");
9
9
  }
10
- const Nn = {}, ye = {};
10
+ const Cn = {}, ye = {};
11
11
  function ae(e, t) {
12
12
  try {
13
- const n = (Nn[e] ||= new Intl.DateTimeFormat("en-US", {
13
+ const n = (Cn[e] ||= new Intl.DateTimeFormat("en-US", {
14
14
  timeZone: e,
15
15
  timeZoneName: "longOffset"
16
16
  }).format)(t).split("GMT")[1];
17
17
  return n in ye ? ye[n] : st(n, n.split(":"));
18
18
  } catch {
19
19
  if (e in ye) return ye[e];
20
- const r = e?.match(Cn);
20
+ const r = e?.match(Nn);
21
21
  return r ? st(e, r.slice(1)) : NaN;
22
22
  }
23
23
  }
24
- const Cn = /([+-]\d\d):?(\d\d)?/;
24
+ const Nn = /([+-]\d\d):?(\d\d)?/;
25
25
  function st(e, t) {
26
26
  const r = +(t[0] || 0), n = +(t[1] || 0), o = +(t[2] || 0) / 60;
27
27
  return ye[e] = r * 60 + n > 0 ? r * 60 + n + o : r * 60 - n - o;
@@ -76,19 +76,19 @@ function Yn(e) {
76
76
  function wt(e) {
77
77
  const t = ae(e.timeZone, e), r = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
78
78
  n.setUTCHours(n.getUTCHours() - 1);
79
- const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = o - i, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
80
- a && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
79
+ const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), i = o - a, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
80
+ i && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
81
81
  const c = o - r;
82
82
  c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
83
83
  const u = /* @__PURE__ */ new Date(+e);
84
84
  u.setUTCSeconds(0);
85
- const l = o > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, f = Math.round(-(ae(e.timeZone, e) * 60)) % 60;
86
- (f || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + f), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + f + l));
87
- const h = ae(e.timeZone, e), w = h > 0 ? Math.floor(h) : Math.ceil(h), N = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, D = w !== r, v = N - c;
88
- if (D && v) {
89
- Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v);
90
- const T = ae(e.timeZone, e), M = T > 0 ? Math.floor(T) : Math.ceil(T), k = w - M;
91
- k && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + k), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + k));
85
+ const f = o > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, l = Math.round(-(ae(e.timeZone, e) * 60)) % 60;
86
+ (l || f) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + l), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + l + f));
87
+ const h = ae(e.timeZone, e), g = h > 0 ? Math.floor(h) : Math.ceil(h), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - g, O = g !== r, T = C - c;
88
+ if (O && T) {
89
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + T);
90
+ const p = ae(e.timeZone, e), w = p > 0 ? Math.floor(p) : Math.ceil(p), D = g - w;
91
+ D && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + D), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + D));
92
92
  }
93
93
  }
94
94
  class H extends K {
@@ -163,12 +163,12 @@ function Dt(e, t, r) {
163
163
  if (isNaN(t)) return B(e, NaN);
164
164
  if (!t)
165
165
  return n;
166
- const o = n.getDate(), i = B(e, n.getTime());
167
- i.setMonth(n.getMonth() + t + 1, 0);
168
- const a = i.getDate();
169
- return o >= a ? i : (n.setFullYear(
170
- i.getFullYear(),
171
- i.getMonth(),
166
+ const o = n.getDate(), a = B(e, n.getTime());
167
+ a.setMonth(n.getMonth() + t + 1, 0);
168
+ const i = a.getDate();
169
+ return o >= i ? a : (n.setFullYear(
170
+ a.getFullYear(),
171
+ a.getMonth(),
172
172
  o
173
173
  ), n);
174
174
  }
@@ -176,20 +176,20 @@ let xn = {};
176
176
  function Me() {
177
177
  return xn;
178
178
  }
179
- function le(e, t) {
180
- const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? 7 : 0) + i - n;
181
- return o.setDate(o.getDate() - a), o.setHours(0, 0, 0, 0), o;
179
+ function fe(e, t) {
180
+ const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), i = (a < n ? 7 : 0) + a - n;
181
+ return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
182
182
  }
183
183
  function be(e, t) {
184
- return le(e, { ...t, weekStartsOn: 1 });
184
+ return fe(e, { ...t, weekStartsOn: 1 });
185
185
  }
186
186
  function kt(e, t) {
187
187
  const r = P(e, t?.in), n = r.getFullYear(), o = B(r, 0);
188
188
  o.setFullYear(n + 1, 0, 4), o.setHours(0, 0, 0, 0);
189
- const i = be(o), a = B(r, 0);
190
- a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
191
- const s = be(a);
192
- return r.getTime() >= i.getTime() ? n + 1 : r.getTime() >= s.getTime() ? n : n - 1;
189
+ const a = be(o), i = B(r, 0);
190
+ i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
191
+ const s = be(i);
192
+ return r.getTime() >= a.getTime() ? n + 1 : r.getTime() >= s.getTime() ? n : n - 1;
193
193
  }
194
194
  function ct(e) {
195
195
  const t = P(e), r = new Date(
@@ -221,7 +221,7 @@ function ze(e, t, r) {
221
221
  r?.in,
222
222
  e,
223
223
  t
224
- ), i = we(n), a = we(o), s = +i - ct(i), c = +a - ct(a);
224
+ ), a = we(n), i = we(o), s = +a - ct(a), c = +i - ct(i);
225
225
  return Math.round((s - c) / Tn);
226
226
  }
227
227
  function Pn(e, t) {
@@ -238,16 +238,16 @@ function Fn(e, t) {
238
238
  let r, n = t?.in;
239
239
  return e.forEach((o) => {
240
240
  !n && typeof o == "object" && (n = B.bind(null, o));
241
- const i = P(o, n);
242
- (!r || r < i || isNaN(+i)) && (r = i);
241
+ const a = P(o, n);
242
+ (!r || r < a || isNaN(+a)) && (r = a);
243
243
  }), B(n, r || NaN);
244
244
  }
245
245
  function Bn(e, t) {
246
246
  let r, n = t?.in;
247
247
  return e.forEach((o) => {
248
248
  !n && typeof o == "object" && (n = B.bind(null, o));
249
- const i = P(o, n);
250
- (!r || r > i || isNaN(+i)) && (r = i);
249
+ const a = P(o, n);
250
+ (!r || r > a || isNaN(+a)) && (r = a);
251
251
  }), B(n, r || NaN);
252
252
  }
253
253
  function In(e, t, r) {
@@ -269,8 +269,8 @@ function vt(e, t, r) {
269
269
  r?.in,
270
270
  e,
271
271
  t
272
- ), i = n.getFullYear() - o.getFullYear(), a = n.getMonth() - o.getMonth();
273
- return i * 12 + a;
272
+ ), a = n.getFullYear() - o.getFullYear(), i = n.getMonth() - o.getMonth();
273
+ return a * 12 + i;
274
274
  }
275
275
  function An(e, t) {
276
276
  const r = P(e, t?.in), n = r.getMonth();
@@ -283,12 +283,12 @@ function Wt(e, t) {
283
283
  function qn(e, t) {
284
284
  const { start: r, end: n } = Wt(t?.in, e);
285
285
  let o = +r > +n;
286
- const i = o ? +r : +n, a = o ? n : r;
287
- a.setHours(0, 0, 0, 0), a.setDate(1);
286
+ const a = o ? +r : +n, i = o ? n : r;
287
+ i.setHours(0, 0, 0, 0), i.setDate(1);
288
288
  let s = 1;
289
289
  const c = [];
290
- for (; +a <= i; )
291
- c.push(B(r, a)), a.setMonth(a.getMonth() + s);
290
+ for (; +i <= a; )
291
+ c.push(B(r, i)), i.setMonth(i.getMonth() + s);
292
292
  return o ? c.reverse() : c;
293
293
  }
294
294
  function jn(e, t) {
@@ -306,20 +306,20 @@ function St(e, t) {
306
306
  function $n(e, t) {
307
307
  const { start: r, end: n } = Wt(t?.in, e);
308
308
  let o = +r > +n;
309
- const i = o ? +r : +n, a = o ? n : r;
310
- a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
309
+ const a = o ? +r : +n, i = o ? n : r;
310
+ i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
311
311
  let s = 1;
312
312
  const c = [];
313
- for (; +a <= i; )
314
- c.push(B(r, a)), a.setFullYear(a.getFullYear() + s);
313
+ for (; +i <= a; )
314
+ c.push(B(r, i)), i.setFullYear(i.getFullYear() + s);
315
315
  return o ? c.reverse() : c;
316
316
  }
317
- function Nt(e, t) {
318
- const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? -7 : 0) + 6 - (i - n);
319
- return o.setDate(o.getDate() + a), o.setHours(23, 59, 59, 999), o;
317
+ function Ct(e, t) {
318
+ const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), a = o.getDay(), i = (a < n ? -7 : 0) + 6 - (a - n);
319
+ return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
320
320
  }
321
321
  function Rn(e, t) {
322
- return Nt(e, { ...t, weekStartsOn: 1 });
322
+ return Ct(e, { ...t, weekStartsOn: 1 });
323
323
  }
324
324
  const zn = {
325
325
  lessThanXSeconds: {
@@ -435,14 +435,14 @@ function he(e) {
435
435
  const n = r?.context ? String(r.context) : "standalone";
436
436
  let o;
437
437
  if (n === "formatting" && e.formattingValues) {
438
- const a = e.defaultFormattingWidth || e.defaultWidth, s = r?.width ? String(r.width) : a;
439
- o = e.formattingValues[s] || e.formattingValues[a];
438
+ const i = e.defaultFormattingWidth || e.defaultWidth, s = r?.width ? String(r.width) : i;
439
+ o = e.formattingValues[s] || e.formattingValues[i];
440
440
  } else {
441
- const a = e.defaultWidth, s = r?.width ? String(r.width) : e.defaultWidth;
442
- o = e.values[s] || e.values[a];
441
+ const i = e.defaultWidth, s = r?.width ? String(r.width) : e.defaultWidth;
442
+ o = e.values[s] || e.values[i];
443
443
  }
444
- const i = e.argumentCallback ? e.argumentCallback(t) : t;
445
- return o[i];
444
+ const a = e.argumentCallback ? e.argumentCallback(t) : t;
445
+ return o[a];
446
446
  };
447
447
  }
448
448
  const Ln = {
@@ -598,20 +598,20 @@ const Ln = {
598
598
  };
599
599
  function me(e) {
600
600
  return (t, r = {}) => {
601
- const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
602
- if (!i)
601
+ const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
602
+ if (!a)
603
603
  return null;
604
- const a = i[0], s = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? cr(s, (f) => f.test(a)) : (
604
+ const i = a[0], s = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? cr(s, (l) => l.test(i)) : (
605
605
  // [TODO] -- I challenge you to fix the type
606
- ir(s, (f) => f.test(a))
606
+ ir(s, (l) => l.test(i))
607
607
  );
608
608
  let u;
609
609
  u = e.valueCallback ? e.valueCallback(c) : c, u = r.valueCallback ? (
610
610
  // [TODO] -- I challenge you to fix the type
611
611
  r.valueCallback(u)
612
612
  ) : u;
613
- const l = t.slice(a.length);
614
- return { value: u, rest: l };
613
+ const f = t.slice(i.length);
614
+ return { value: u, rest: f };
615
615
  };
616
616
  }
617
617
  function ir(e, t) {
@@ -628,15 +628,15 @@ function ur(e) {
628
628
  return (t, r = {}) => {
629
629
  const n = t.match(e.matchPattern);
630
630
  if (!n) return null;
631
- const o = n[0], i = t.match(e.parsePattern);
632
- if (!i) return null;
633
- let a = e.valueCallback ? e.valueCallback(i[0]) : i[0];
634
- a = r.valueCallback ? r.valueCallback(a) : a;
631
+ const o = n[0], a = t.match(e.parsePattern);
632
+ if (!a) return null;
633
+ let i = e.valueCallback ? e.valueCallback(a[0]) : a[0];
634
+ i = r.valueCallback ? r.valueCallback(i) : i;
635
635
  const s = t.slice(o.length);
636
- return { value: a, rest: s };
636
+ return { value: i, rest: s };
637
637
  };
638
638
  }
639
- const fr = /^(\d+)(th|st|nd|rd)?/i, lr = /\d+/i, dr = {
639
+ const lr = /^(\d+)(th|st|nd|rd)?/i, fr = /\d+/i, dr = {
640
640
  narrow: /^(b|a)/i,
641
641
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
642
642
  wide: /^(before christ|before common era|anno domini|common era)/i
@@ -705,8 +705,8 @@ const fr = /^(\d+)(th|st|nd|rd)?/i, lr = /\d+/i, dr = {
705
705
  }
706
706
  }, kr = {
707
707
  ordinalNumber: ur({
708
- matchPattern: fr,
709
- parsePattern: lr,
708
+ matchPattern: lr,
709
+ parsePattern: fr,
710
710
  valueCallback: (e) => parseInt(e, 10)
711
711
  }),
712
712
  era: me({
@@ -740,7 +740,7 @@ const fr = /^(\d+)(th|st|nd|rd)?/i, lr = /\d+/i, dr = {
740
740
  parsePatterns: Dr,
741
741
  defaultParseWidth: "any"
742
742
  })
743
- }, fe = {
743
+ }, le = {
744
744
  code: "en-US",
745
745
  formatDistance: Qn,
746
746
  formatLong: Zn,
@@ -760,20 +760,20 @@ function Qe(e, t) {
760
760
  const r = P(e, t?.in), n = +be(r) - +Pn(r);
761
761
  return Math.round(n / Mt) + 1;
762
762
  }
763
- function Ct(e, t) {
764
- const r = P(e, t?.in), n = r.getFullYear(), o = Me(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = B(t?.in || e, 0);
765
- a.setFullYear(n + 1, 0, i), a.setHours(0, 0, 0, 0);
766
- const s = le(a, t), c = B(t?.in || e, 0);
767
- c.setFullYear(n, 0, i), c.setHours(0, 0, 0, 0);
768
- const u = le(c, t);
763
+ function Nt(e, t) {
764
+ const r = P(e, t?.in), n = r.getFullYear(), o = Me(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = B(t?.in || e, 0);
765
+ i.setFullYear(n + 1, 0, a), i.setHours(0, 0, 0, 0);
766
+ const s = fe(i, t), c = B(t?.in || e, 0);
767
+ c.setFullYear(n, 0, a), c.setHours(0, 0, 0, 0);
768
+ const u = fe(c, t);
769
769
  return +r >= +s ? n + 1 : +r >= +u ? n : n - 1;
770
770
  }
771
771
  function vr(e, t) {
772
- const r = Me(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = Ct(e, t), i = B(t?.in || e, 0);
773
- return i.setFullYear(o, 0, n), i.setHours(0, 0, 0, 0), le(i, t);
772
+ const r = Me(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = Nt(e, t), a = B(t?.in || e, 0);
773
+ return a.setFullYear(o, 0, n), a.setHours(0, 0, 0, 0), fe(a, t);
774
774
  }
775
775
  function Xe(e, t) {
776
- const r = P(e, t?.in), n = +le(r, t) - +vr(r, t);
776
+ const r = P(e, t?.in), n = +fe(r, t) - +vr(r, t);
777
777
  return Math.round(n / Mt) + 1;
778
778
  }
779
779
  function x(e, t) {
@@ -867,12 +867,12 @@ const oe = {
867
867
  },
868
868
  // Local week-numbering year
869
869
  Y: function(e, t, r, n) {
870
- const o = Ct(e, n), i = o > 0 ? o : 1 - o;
870
+ const o = Nt(e, n), a = o > 0 ? o : 1 - o;
871
871
  if (t === "YY") {
872
- const a = i % 100;
873
- return x(a, 2);
872
+ const i = a % 100;
873
+ return x(i, 2);
874
874
  }
875
- return t === "Yo" ? r.ordinalNumber(i, { unit: "year" }) : x(i, t.length);
875
+ return t === "Yo" ? r.ordinalNumber(a, { unit: "year" }) : x(a, t.length);
876
876
  },
877
877
  // ISO week-numbering year
878
878
  R: function(e, t) {
@@ -1063,17 +1063,17 @@ const oe = {
1063
1063
  },
1064
1064
  // Local day of week
1065
1065
  e: function(e, t, r, n) {
1066
- const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
1066
+ const o = e.getDay(), a = (o - n.weekStartsOn + 8) % 7 || 7;
1067
1067
  switch (t) {
1068
1068
  // Numerical value (Nth day of week with current locale or weekStartsOn)
1069
1069
  case "e":
1070
- return String(i);
1070
+ return String(a);
1071
1071
  // Padded numerical value
1072
1072
  case "ee":
1073
- return x(i, 2);
1073
+ return x(a, 2);
1074
1074
  // 1st, 2nd, ..., 7th
1075
1075
  case "eo":
1076
- return r.ordinalNumber(i, { unit: "day" });
1076
+ return r.ordinalNumber(a, { unit: "day" });
1077
1077
  case "eee":
1078
1078
  return r.day(o, {
1079
1079
  width: "abbreviated",
@@ -1100,17 +1100,17 @@ const oe = {
1100
1100
  },
1101
1101
  // Stand-alone local day of week
1102
1102
  c: function(e, t, r, n) {
1103
- const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
1103
+ const o = e.getDay(), a = (o - n.weekStartsOn + 8) % 7 || 7;
1104
1104
  switch (t) {
1105
1105
  // Numerical value (same as in `e`)
1106
1106
  case "c":
1107
- return String(i);
1107
+ return String(a);
1108
1108
  // Padded numerical value
1109
1109
  case "cc":
1110
- return x(i, t.length);
1110
+ return x(a, t.length);
1111
1111
  // 1st, 2nd, ..., 7th
1112
1112
  case "co":
1113
- return r.ordinalNumber(i, { unit: "day" });
1113
+ return r.ordinalNumber(a, { unit: "day" });
1114
1114
  case "ccc":
1115
1115
  return r.day(o, {
1116
1116
  width: "abbreviated",
@@ -1294,7 +1294,7 @@ const oe = {
1294
1294
  switch (t) {
1295
1295
  // Hours and optional minutes
1296
1296
  case "X":
1297
- return lt(n);
1297
+ return ft(n);
1298
1298
  // Hours, minutes and optional seconds without `:` delimiter
1299
1299
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1300
1300
  // so this token always has the same output as `XX`
@@ -1312,7 +1312,7 @@ const oe = {
1312
1312
  switch (t) {
1313
1313
  // Hours and optional minutes
1314
1314
  case "x":
1315
- return lt(n);
1315
+ return ft(n);
1316
1316
  // Hours, minutes and optional seconds without `:` delimiter
1317
1317
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1318
1318
  // so this token always has the same output as `xx`
@@ -1332,7 +1332,7 @@ const oe = {
1332
1332
  case "O":
1333
1333
  case "OO":
1334
1334
  case "OOO":
1335
- return "GMT" + ft(n, ":");
1335
+ return "GMT" + lt(n, ":");
1336
1336
  default:
1337
1337
  return "GMT" + se(n, ":");
1338
1338
  }
@@ -1345,7 +1345,7 @@ const oe = {
1345
1345
  case "z":
1346
1346
  case "zz":
1347
1347
  case "zzz":
1348
- return "GMT" + ft(n, ":");
1348
+ return "GMT" + lt(n, ":");
1349
1349
  default:
1350
1350
  return "GMT" + se(n, ":");
1351
1351
  }
@@ -1360,16 +1360,16 @@ const oe = {
1360
1360
  return x(+e, t.length);
1361
1361
  }
1362
1362
  };
1363
- function ft(e, t = "") {
1364
- const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), i = n % 60;
1365
- return i === 0 ? r + String(o) : r + String(o) + t + x(i, 2);
1363
+ function lt(e, t = "") {
1364
+ const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), a = n % 60;
1365
+ return a === 0 ? r + String(o) : r + String(o) + t + x(a, 2);
1366
1366
  }
1367
- function lt(e, t) {
1367
+ function ft(e, t) {
1368
1368
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + x(Math.abs(e) / 60, 2) : se(e, t);
1369
1369
  }
1370
1370
  function se(e, t = "") {
1371
- const r = e > 0 ? "-" : "+", n = Math.abs(e), o = x(Math.trunc(n / 60), 2), i = x(n % 60, 2);
1372
- return r + o + t + i;
1371
+ const r = e > 0 ? "-" : "+", n = Math.abs(e), o = x(Math.trunc(n / 60), 2), a = x(n % 60, 2);
1372
+ return r + o + t + a;
1373
1373
  }
1374
1374
  const dt = (e, t) => {
1375
1375
  switch (e) {
@@ -1397,31 +1397,31 @@ const dt = (e, t) => {
1397
1397
  const r = e.match(/(P+)(p+)?/) || [], n = r[1], o = r[2];
1398
1398
  if (!o)
1399
1399
  return dt(e, t);
1400
- let i;
1400
+ let a;
1401
1401
  switch (n) {
1402
1402
  case "P":
1403
- i = t.dateTime({ width: "short" });
1403
+ a = t.dateTime({ width: "short" });
1404
1404
  break;
1405
1405
  case "PP":
1406
- i = t.dateTime({ width: "medium" });
1406
+ a = t.dateTime({ width: "medium" });
1407
1407
  break;
1408
1408
  case "PPP":
1409
- i = t.dateTime({ width: "long" });
1409
+ a = t.dateTime({ width: "long" });
1410
1410
  break;
1411
1411
  default:
1412
- i = t.dateTime({ width: "full" });
1412
+ a = t.dateTime({ width: "full" });
1413
1413
  break;
1414
1414
  }
1415
- return i.replace("{{date}}", dt(n, t)).replace("{{time}}", Yt(o, t));
1415
+ return a.replace("{{date}}", dt(n, t)).replace("{{time}}", Yt(o, t));
1416
1416
  }, Sr = {
1417
1417
  p: Yt,
1418
1418
  P: Wr
1419
- }, Nr = /^D+$/, Cr = /^Y+$/, Yr = ["D", "DD", "YY", "YYYY"];
1419
+ }, Cr = /^D+$/, Nr = /^Y+$/, Yr = ["D", "DD", "YY", "YYYY"];
1420
1420
  function Tr(e) {
1421
- return Nr.test(e);
1421
+ return Cr.test(e);
1422
1422
  }
1423
1423
  function xr(e) {
1424
- return Cr.test(e);
1424
+ return Nr.test(e);
1425
1425
  }
1426
1426
  function Pr(e, t, r) {
1427
1427
  const n = Er(e, t, r);
@@ -1433,42 +1433,42 @@ function Er(e, t, r) {
1433
1433
  }
1434
1434
  const _r = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Fr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Br = /^'([^]*?)'?$/, Ir = /''/g, Hr = /[a-zA-Z]/;
1435
1435
  function ge(e, t, r) {
1436
- const n = Me(), o = r?.locale ?? n.locale ?? fe, i = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = P(e, r?.in);
1436
+ const n = Me(), o = r?.locale ?? n.locale ?? le, a = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, i = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = P(e, r?.in);
1437
1437
  if (!Hn(s))
1438
1438
  throw new RangeError("Invalid time value");
1439
- let c = t.match(Fr).map((l) => {
1440
- const f = l[0];
1441
- if (f === "p" || f === "P") {
1442
- const h = Sr[f];
1443
- return h(l, o.formatLong);
1439
+ let c = t.match(Fr).map((f) => {
1440
+ const l = f[0];
1441
+ if (l === "p" || l === "P") {
1442
+ const h = Sr[l];
1443
+ return h(f, o.formatLong);
1444
1444
  }
1445
- return l;
1446
- }).join("").match(_r).map((l) => {
1447
- if (l === "''")
1445
+ return f;
1446
+ }).join("").match(_r).map((f) => {
1447
+ if (f === "''")
1448
1448
  return { isToken: !1, value: "'" };
1449
- const f = l[0];
1450
- if (f === "'")
1451
- return { isToken: !1, value: Ar(l) };
1452
- if (ut[f])
1453
- return { isToken: !0, value: l };
1454
- if (f.match(Hr))
1449
+ const l = f[0];
1450
+ if (l === "'")
1451
+ return { isToken: !1, value: Ar(f) };
1452
+ if (ut[l])
1453
+ return { isToken: !0, value: f };
1454
+ if (l.match(Hr))
1455
1455
  throw new RangeError(
1456
- "Format string contains an unescaped latin alphabet character `" + f + "`"
1456
+ "Format string contains an unescaped latin alphabet character `" + l + "`"
1457
1457
  );
1458
- return { isToken: !1, value: l };
1458
+ return { isToken: !1, value: f };
1459
1459
  });
1460
1460
  o.localize.preprocessor && (c = o.localize.preprocessor(s, c));
1461
1461
  const u = {
1462
- firstWeekContainsDate: i,
1463
- weekStartsOn: a,
1462
+ firstWeekContainsDate: a,
1463
+ weekStartsOn: i,
1464
1464
  locale: o
1465
1465
  };
1466
- return c.map((l) => {
1467
- if (!l.isToken) return l.value;
1468
- const f = l.value;
1469
- (!r?.useAdditionalWeekYearTokens && xr(f) || !r?.useAdditionalDayOfYearTokens && Tr(f)) && Pr(f, t, String(e));
1470
- const h = ut[f[0]];
1471
- return h(s, f, o.localize, u);
1466
+ return c.map((f) => {
1467
+ if (!f.isToken) return f.value;
1468
+ const l = f.value;
1469
+ (!r?.useAdditionalWeekYearTokens && xr(l) || !r?.useAdditionalDayOfYearTokens && Tr(l)) && Pr(l, t, String(e));
1470
+ const h = ut[l[0]];
1471
+ return h(s, l, o.localize, u);
1472
1472
  }).join("");
1473
1473
  }
1474
1474
  function Ar(e) {
@@ -1476,8 +1476,8 @@ function Ar(e) {
1476
1476
  return t ? t[1].replace(Ir, "'") : e;
1477
1477
  }
1478
1478
  function qr(e, t) {
1479
- const r = P(e, t?.in), n = r.getFullYear(), o = r.getMonth(), i = B(r, 0);
1480
- return i.setFullYear(n, o + 1, 0), i.setHours(0, 0, 0, 0), i.getDate();
1479
+ const r = P(e, t?.in), n = r.getFullYear(), o = r.getMonth(), a = B(r, 0);
1480
+ return a.setFullYear(n, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
1481
1481
  }
1482
1482
  function jr(e, t) {
1483
1483
  return P(e, t?.in).getMonth();
@@ -1508,10 +1508,10 @@ function Qr(e, t, r) {
1508
1508
  return n.getFullYear() === o.getFullYear();
1509
1509
  }
1510
1510
  function Xr(e, t, r) {
1511
- const n = P(e, r?.in), o = n.getFullYear(), i = n.getDate(), a = B(e, 0);
1512
- a.setFullYear(o, t, 15), a.setHours(0, 0, 0, 0);
1513
- const s = qr(a);
1514
- return n.setMonth(t, Math.min(i, s)), n;
1511
+ const n = P(e, r?.in), o = n.getFullYear(), a = n.getDate(), i = B(e, 0);
1512
+ i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
1513
+ const s = qr(i);
1514
+ return n.setMonth(t, Math.min(a, s)), n;
1515
1515
  }
1516
1516
  function Ur(e, t, r) {
1517
1517
  const n = P(e, r?.in);
@@ -1519,8 +1519,8 @@ function Ur(e, t, r) {
1519
1519
  }
1520
1520
  const ht = 5, Vr = 4;
1521
1521
  function Zr(e, t) {
1522
- const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, o = t.addDays(e, -n + 1), i = t.addDays(o, ht * 7 - 1);
1523
- return t.getMonth(e) === t.getMonth(i) ? ht : Vr;
1522
+ const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, o = t.addDays(e, -n + 1), a = t.addDays(o, ht * 7 - 1);
1523
+ return t.getMonth(e) === t.getMonth(a) ? ht : Vr;
1524
1524
  }
1525
1525
  function Tt(e, t) {
1526
1526
  const r = t.startOfMonth(e), n = r.getDay();
@@ -1531,13 +1531,13 @@ function Kr(e, t) {
1531
1531
  return t.addDays(r, n * 7 - 1);
1532
1532
  }
1533
1533
  const xt = {
1534
- ...fe,
1534
+ ...le,
1535
1535
  labels: {
1536
1536
  labelDayButton: (e, t, r, n) => {
1537
1537
  let o;
1538
- n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => ge(a, s, { locale: fe, ...r });
1539
- let i = o(e, "PPPP");
1540
- return t.today && (i = `Today, ${i}`), t.selected && (i = `${i}, selected`), i;
1538
+ n && typeof n.format == "function" ? o = n.format.bind(n) : o = (i, s) => ge(i, s, { locale: le, ...r });
1539
+ let a = o(e, "PPPP");
1540
+ return t.today && (a = `Today, ${a}`), t.selected && (a = `${a}, selected`), a;
1541
1541
  },
1542
1542
  labelMonthDropdown: "Choose the Month",
1543
1543
  labelNext: "Go to the Next Month",
@@ -1546,19 +1546,19 @@ const xt = {
1546
1546
  labelYearDropdown: "Choose the Year",
1547
1547
  labelGrid: (e, t, r) => {
1548
1548
  let n;
1549
- return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => ge(o, i, { locale: fe, ...t }), n(e, "LLLL yyyy");
1549
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, a) => ge(o, a, { locale: le, ...t }), n(e, "LLLL yyyy");
1550
1550
  },
1551
1551
  labelGridcell: (e, t, r, n) => {
1552
1552
  let o;
1553
- n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => ge(a, s, { locale: fe, ...r });
1554
- let i = o(e, "PPPP");
1555
- return t?.today && (i = `Today, ${i}`), i;
1553
+ n && typeof n.format == "function" ? o = n.format.bind(n) : o = (i, s) => ge(i, s, { locale: le, ...r });
1554
+ let a = o(e, "PPPP");
1555
+ return t?.today && (a = `Today, ${a}`), a;
1556
1556
  },
1557
1557
  labelNav: "Navigation bar",
1558
1558
  labelWeekNumberHeader: "Week Number",
1559
1559
  labelWeekday: (e, t, r) => {
1560
1560
  let n;
1561
- return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => ge(o, i, { locale: fe, ...t }), n(e, "cccc");
1561
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, a) => ge(o, a, { locale: le, ...t }), n(e, "cccc");
1562
1562
  }
1563
1563
  }
1564
1564
  };
@@ -1570,18 +1570,18 @@ class j {
1570
1570
  * @param overrides Custom overrides for the date library functions.
1571
1571
  */
1572
1572
  constructor(t, r) {
1573
- this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? H.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, o, i) => this.overrides?.newDate ? this.overrides.newDate(n, o, i) : this.options.timeZone ? new H(n, o, i, this.options.timeZone) : new Date(n, o, i), this.addDays = (n, o) => this.overrides?.addDays ? this.overrides.addDays(n, o) : pt(n, o), this.addMonths = (n, o) => this.overrides?.addMonths ? this.overrides.addMonths(n, o) : Dt(n, o), this.addWeeks = (n, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, o) : En(n, o), this.addYears = (n, o) => this.overrides?.addYears ? this.overrides.addYears(n, o) : _n(n, o), this.differenceInCalendarDays = (n, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, o) : ze(n, o), this.differenceInCalendarMonths = (n, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, o) : vt(n, o), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : qn(n), this.eachYearOfInterval = (n) => {
1574
- const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : $n(n), i = new Set(o.map((s) => this.getYear(s)));
1575
- if (i.size === o.length)
1573
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? H.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, o, a) => this.overrides?.newDate ? this.overrides.newDate(n, o, a) : this.options.timeZone ? new H(n, o, a, this.options.timeZone) : new Date(n, o, a), this.addDays = (n, o) => this.overrides?.addDays ? this.overrides.addDays(n, o) : pt(n, o), this.addMonths = (n, o) => this.overrides?.addMonths ? this.overrides.addMonths(n, o) : Dt(n, o), this.addWeeks = (n, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, o) : En(n, o), this.addYears = (n, o) => this.overrides?.addYears ? this.overrides.addYears(n, o) : _n(n, o), this.differenceInCalendarDays = (n, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, o) : ze(n, o), this.differenceInCalendarMonths = (n, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, o) : vt(n, o), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : qn(n), this.eachYearOfInterval = (n) => {
1574
+ const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : $n(n), a = new Set(o.map((s) => this.getYear(s)));
1575
+ if (a.size === o.length)
1576
1576
  return o;
1577
- const a = [];
1578
- return i.forEach((s) => {
1579
- a.push(new Date(s, 0, 1));
1580
- }), a;
1581
- }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : Kr(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Rn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : An(n), this.endOfWeek = (n, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, o) : Nt(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : Gn(n), this.format = (n, o, i) => {
1582
- const a = this.overrides?.format ? this.overrides.format(n, o, this.options) : ge(n, o, this.options);
1583
- return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
1584
- }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Qe(n), this.getMonth = (n, o) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : jr(n, this.options), this.getYear = (n, o) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : Gr(n, this.options), this.getWeek = (n, o) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Xe(n, this.options), this.isAfter = (n, o) => this.overrides?.isAfter ? this.overrides.isAfter(n, o) : $r(n, o), this.isBefore = (n, o) => this.overrides?.isBefore ? this.overrides.isBefore(n, o) : Rr(n, o), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Ot(n), this.isSameDay = (n, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, o) : In(n, o), this.isSameMonth = (n, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, o) : zr(n, o), this.isSameYear = (n, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, o) : Qr(n, o), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : Fn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : Bn(n), this.setMonth = (n, o) => this.overrides?.setMonth ? this.overrides.setMonth(n, o) : Xr(n, o), this.setYear = (n, o) => this.overrides?.setYear ? this.overrides.setYear(n, o) : Ur(n, o), this.startOfBroadcastWeek = (n, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : Tt(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : we(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : be(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : jn(n), this.startOfWeek = (n, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : le(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : St(n), this.options = { locale: xt, ...t }, this.overrides = r;
1577
+ const i = [];
1578
+ return a.forEach((s) => {
1579
+ i.push(new Date(s, 0, 1));
1580
+ }), i;
1581
+ }, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : Kr(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Rn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : An(n), this.endOfWeek = (n, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, o) : Ct(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : Gn(n), this.format = (n, o, a) => {
1582
+ const i = this.overrides?.format ? this.overrides.format(n, o, this.options) : ge(n, o, this.options);
1583
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
1584
+ }, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Qe(n), this.getMonth = (n, o) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : jr(n, this.options), this.getYear = (n, o) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : Gr(n, this.options), this.getWeek = (n, o) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Xe(n, this.options), this.isAfter = (n, o) => this.overrides?.isAfter ? this.overrides.isAfter(n, o) : $r(n, o), this.isBefore = (n, o) => this.overrides?.isBefore ? this.overrides.isBefore(n, o) : Rr(n, o), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Ot(n), this.isSameDay = (n, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, o) : In(n, o), this.isSameMonth = (n, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, o) : zr(n, o), this.isSameYear = (n, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, o) : Qr(n, o), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : Fn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : Bn(n), this.setMonth = (n, o) => this.overrides?.setMonth ? this.overrides.setMonth(n, o) : Xr(n, o), this.setYear = (n, o) => this.overrides?.setYear ? this.overrides.setYear(n, o) : Ur(n, o), this.startOfBroadcastWeek = (n, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : Tt(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : we(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : be(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : jn(n), this.startOfWeek = (n, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : fe(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : St(n), this.options = { locale: xt, ...t }, this.overrides = r;
1585
1585
  }
1586
1586
  /**
1587
1587
  * Generates a mapping of Arabic digits (0-9) to the target numbering system
@@ -1633,10 +1633,10 @@ class j {
1633
1633
  * @since 9.11.0
1634
1634
  */
1635
1635
  formatMonthYear(t) {
1636
- const { locale: r, timeZone: n, numerals: o } = this.options, i = r?.code;
1637
- if (i && j.yearFirstLocales.has(i))
1636
+ const { locale: r, timeZone: n, numerals: o } = this.options, a = r?.code;
1637
+ if (a && j.yearFirstLocales.has(a))
1638
1638
  try {
1639
- return new Intl.DateTimeFormat(i, {
1639
+ return new Intl.DateTimeFormat(a, {
1640
1640
  month: "long",
1641
1641
  year: "numeric",
1642
1642
  timeZone: n,
@@ -1644,8 +1644,8 @@ class j {
1644
1644
  }).format(t);
1645
1645
  } catch {
1646
1646
  }
1647
- const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1648
- return this.format(t, a);
1647
+ const i = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1648
+ return this.format(t, i);
1649
1649
  }
1650
1650
  }
1651
1651
  j.yearFirstLocales = /* @__PURE__ */ new Set([
@@ -1740,11 +1740,11 @@ var q;
1740
1740
  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";
1741
1741
  })(q || (q = {}));
1742
1742
  function so(e) {
1743
- const { options: t, className: r, components: n, classNames: o, ...i } = e, a = [o[y.Dropdown], r].join(" "), s = t?.find(({ value: c }) => c === i.value);
1743
+ const { options: t, className: r, components: n, classNames: o, ...a } = e, i = [o[y.Dropdown], r].join(" "), s = t?.find(({ value: c }) => c === a.value);
1744
1744
  return d.createElement(
1745
1745
  "span",
1746
- { "data-disabled": i.disabled, className: o[y.DropdownRoot] },
1747
- d.createElement(n.Select, { className: a, ...i }, t?.map(({ value: c, label: u, disabled: l }) => d.createElement(n.Option, { key: c, value: c, disabled: l }, u))),
1746
+ { "data-disabled": a.disabled, className: o[y.DropdownRoot] },
1747
+ d.createElement(n.Select, { className: i, ...a }, t?.map(({ value: c, label: u, disabled: f }) => d.createElement(n.Option, { key: c, value: c, disabled: f }, u))),
1748
1748
  d.createElement(
1749
1749
  "span",
1750
1750
  { className: o[y.CaptionLabel], "aria-hidden": !0 },
@@ -1767,10 +1767,10 @@ function uo(e) {
1767
1767
  const { calendarMonth: t, displayIndex: r, ...n } = e;
1768
1768
  return d.createElement("div", { ...n });
1769
1769
  }
1770
- function fo(e) {
1770
+ function lo(e) {
1771
1771
  return d.createElement("table", { ...e });
1772
1772
  }
1773
- function lo(e) {
1773
+ function fo(e) {
1774
1774
  return d.createElement("div", { ...e });
1775
1775
  }
1776
1776
  const Et = kn(void 0);
@@ -1785,23 +1785,23 @@ function ho(e) {
1785
1785
  return d.createElement(t.Dropdown, { ...e });
1786
1786
  }
1787
1787
  function mo(e) {
1788
- const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: o, ...i } = e, { components: a, classNames: s, labels: { labelPrevious: c, labelNext: u } } = pe(), l = $((h) => {
1788
+ const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: o, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: u } } = pe(), f = $((h) => {
1789
1789
  o && r?.(h);
1790
- }, [o, r]), f = $((h) => {
1790
+ }, [o, r]), l = $((h) => {
1791
1791
  n && t?.(h);
1792
1792
  }, [n, t]);
1793
1793
  return d.createElement(
1794
1794
  "nav",
1795
- { ...i },
1795
+ { ...a },
1796
1796
  d.createElement(
1797
- a.PreviousMonthButton,
1798
- { type: "button", className: s[y.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: f },
1799
- d.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: s[y.Chevron], orientation: "left" })
1797
+ i.PreviousMonthButton,
1798
+ { type: "button", className: s[y.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: l },
1799
+ d.createElement(i.Chevron, { disabled: n ? void 0 : !0, className: s[y.Chevron], orientation: "left" })
1800
1800
  ),
1801
1801
  d.createElement(
1802
- a.NextMonthButton,
1803
- { type: "button", className: s[y.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": u(o), onClick: l },
1804
- d.createElement(a.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[y.Chevron] })
1802
+ i.NextMonthButton,
1803
+ { type: "button", className: s[y.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": u(o), onClick: f },
1804
+ d.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[y.Chevron] })
1805
1805
  )
1806
1806
  );
1807
1807
  }
@@ -1851,16 +1851,16 @@ function So(e) {
1851
1851
  const { components: t } = pe();
1852
1852
  return d.createElement(t.Dropdown, { ...e });
1853
1853
  }
1854
- const No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: eo, CaptionLabel: to, Chevron: no, Day: ro, DayButton: oo, Dropdown: so, DropdownNav: ao, Footer: io, Month: co, MonthCaption: uo, MonthGrid: fo, Months: lo, MonthsDropdown: ho, Nav: mo, NextMonthButton: yo, Option: go, PreviousMonthButton: bo, Root: wo, Select: Mo, Week: po, WeekNumber: Oo, WeekNumberHeader: vo, Weekday: Do, Weekdays: ko, Weeks: Wo, YearsDropdown: So }, Symbol.toStringTag, { value: "Module" }));
1854
+ const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: eo, CaptionLabel: to, Chevron: no, Day: ro, DayButton: oo, Dropdown: so, DropdownNav: ao, Footer: io, Month: co, MonthCaption: uo, MonthGrid: lo, Months: fo, MonthsDropdown: ho, Nav: mo, NextMonthButton: yo, Option: go, PreviousMonthButton: bo, Root: wo, Select: Mo, Week: po, WeekNumber: Oo, WeekNumberHeader: vo, Weekday: Do, Weekdays: ko, Weeks: Wo, YearsDropdown: So }, Symbol.toStringTag, { value: "Module" }));
1855
1855
  function te(e, t, r = !1, n = J) {
1856
- let { from: o, to: i } = e;
1857
- const { differenceInCalendarDays: a, isSameDay: s } = n;
1858
- return o && i ? (a(i, o) < 0 && ([o, i] = [i, o]), a(t, o) >= (r ? 1 : 0) && a(i, t) >= (r ? 1 : 0)) : !r && i ? s(i, t) : !r && o ? s(o, t) : !1;
1856
+ let { from: o, to: a } = e;
1857
+ const { differenceInCalendarDays: i, isSameDay: s } = n;
1858
+ return o && a ? (i(a, o) < 0 && ([o, a] = [a, o]), i(t, o) >= (r ? 1 : 0) && i(a, t) >= (r ? 1 : 0)) : !r && a ? s(a, t) : !r && o ? s(o, t) : !1;
1859
1859
  }
1860
1860
  function Ue(e) {
1861
1861
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
1862
1862
  }
1863
- function Ne(e) {
1863
+ function Ce(e) {
1864
1864
  return !!(e && typeof e == "object" && "from" in e);
1865
1865
  }
1866
1866
  function Ve(e) {
@@ -1876,7 +1876,7 @@ function Ft(e, t) {
1876
1876
  return Array.isArray(e) && e.every(t.isDate);
1877
1877
  }
1878
1878
  function ne(e, t, r = J) {
1879
- const n = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: i, isAfter: a } = r;
1879
+ const n = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: a, isAfter: i } = r;
1880
1880
  return n.some((s) => {
1881
1881
  if (typeof s == "boolean")
1882
1882
  return s;
@@ -1884,31 +1884,31 @@ function ne(e, t, r = J) {
1884
1884
  return o(e, s);
1885
1885
  if (Ft(s, r))
1886
1886
  return s.some((c) => o(e, c));
1887
- if (Ne(s))
1887
+ if (Ce(s))
1888
1888
  return te(s, e, !1, r);
1889
1889
  if (_t(s))
1890
1890
  return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
1891
1891
  if (Ue(s)) {
1892
- const c = i(s.before, e), u = i(s.after, e), l = c > 0, f = u < 0;
1893
- return a(s.before, s.after) ? f && l : l || f;
1892
+ const c = a(s.before, e), u = a(s.after, e), f = c > 0, l = u < 0;
1893
+ return i(s.before, s.after) ? l && f : f || l;
1894
1894
  }
1895
- return Ve(s) ? i(e, s.after) > 0 : Ze(s) ? i(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1895
+ return Ve(s) ? a(e, s.after) > 0 : Ze(s) ? a(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
1896
1896
  });
1897
1897
  }
1898
- function Co(e, t, r, n, o) {
1899
- const { disabled: i, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l = o.today() } = t, { isSameDay: f, isSameMonth: h, startOfMonth: w, isBefore: O, endOfMonth: N, isAfter: D } = o, v = r && w(r), T = n && N(n), M = {
1898
+ function No(e, t, r, n, o) {
1899
+ const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: f = o.today() } = t, { isSameDay: l, isSameMonth: h, startOfMonth: g, isBefore: v, endOfMonth: C, isAfter: O } = o, T = r && g(r), p = n && C(n), w = {
1900
1900
  [_.focused]: [],
1901
1901
  [_.outside]: [],
1902
1902
  [_.disabled]: [],
1903
1903
  [_.hidden]: [],
1904
1904
  [_.today]: []
1905
- }, k = {};
1905
+ }, D = {};
1906
1906
  for (const b of e) {
1907
- const { date: m, displayMonth: W } = b, E = !!(W && !h(m, W)), I = !!(v && O(m, v)), F = !!(T && D(m, T)), V = !!(i && ne(m, i, o)), re = !!(a && ne(m, a, o)) || I || F || // Broadcast calendar will show outside days as default
1908
- !u && !c && E || u && c === !1 && E, L = f(m, l);
1909
- E && M.outside.push(b), V && M.disabled.push(b), re && M.hidden.push(b), L && M.today.push(b), s && Object.keys(s).forEach((G) => {
1907
+ const { date: m, displayMonth: W } = b, E = !!(W && !h(m, W)), I = !!(T && v(m, T)), F = !!(p && O(m, p)), V = !!(a && ne(m, a, o)), re = !!(i && ne(m, i, o)) || I || F || // Broadcast calendar will show outside days as default
1908
+ !u && !c && E || u && c === !1 && E, L = l(m, f);
1909
+ E && w.outside.push(b), V && w.disabled.push(b), re && w.hidden.push(b), L && w.today.push(b), s && Object.keys(s).forEach((G) => {
1910
1910
  const ie = s?.[G];
1911
- ie && ne(m, ie, o) && (k[G] ? k[G].push(b) : k[G] = [b]);
1911
+ ie && ne(m, ie, o) && (D[G] ? D[G].push(b) : D[G] = [b]);
1912
1912
  });
1913
1913
  }
1914
1914
  return (b) => {
@@ -1919,12 +1919,12 @@ function Co(e, t, r, n, o) {
1919
1919
  [_.outside]: !1,
1920
1920
  [_.today]: !1
1921
1921
  }, W = {};
1922
- for (const E in M) {
1923
- const I = M[E];
1922
+ for (const E in w) {
1923
+ const I = w[E];
1924
1924
  m[E] = I.some((F) => F === b);
1925
1925
  }
1926
- for (const E in k)
1927
- W[E] = k[E].some((I) => I === b);
1926
+ for (const E in D)
1927
+ W[E] = D[E].some((I) => I === b);
1928
1928
  return {
1929
1929
  ...m,
1930
1930
  // custom modifiers should override all the previous ones
@@ -1933,11 +1933,11 @@ function Co(e, t, r, n, o) {
1933
1933
  };
1934
1934
  }
1935
1935
  function Yo(e, t, r = {}) {
1936
- return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [i]) => (r[i] ? o.push(r[i]) : t[_[i]] ? o.push(t[_[i]]) : t[U[i]] && o.push(t[U[i]]), o), [t[y.Day]]);
1936
+ return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [a]) => (r[a] ? o.push(r[a]) : t[_[a]] ? o.push(t[_[a]]) : t[U[a]] && o.push(t[U[a]]), o), [t[y.Day]]);
1937
1937
  }
1938
1938
  function To(e) {
1939
1939
  return {
1940
- ...No,
1940
+ ...Co,
1941
1941
  ...e
1942
1942
  };
1943
1943
  }
@@ -2053,13 +2053,13 @@ function Qo(e, t) {
2053
2053
  };
2054
2054
  }
2055
2055
  function Xo(e, t, r, n, o) {
2056
- const { startOfMonth: i, startOfYear: a, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
2056
+ const { startOfMonth: a, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
2057
2057
  return c({
2058
- start: a(e),
2058
+ start: i(e),
2059
2059
  end: s(e)
2060
2060
  }).map((h) => {
2061
- const w = n.formatMonthDropdown(h, o), O = u(h), N = t && h < i(t) || r && h > i(r) || !1;
2062
- return { value: O, label: w, disabled: N };
2061
+ const g = n.formatMonthDropdown(h, o), v = u(h), C = t && h < a(t) || r && h > a(r) || !1;
2062
+ return { value: v, label: g, disabled: C };
2063
2063
  });
2064
2064
  }
2065
2065
  function Uo(e, t = {}, r = {}) {
@@ -2072,176 +2072,176 @@ function Uo(e, t = {}, r = {}) {
2072
2072
  }), n;
2073
2073
  }
2074
2074
  function Vo(e, t, r, n) {
2075
- const o = n ?? e.today(), i = r ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), a = [];
2075
+ const o = n ?? e.today(), a = r ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), i = [];
2076
2076
  for (let s = 0; s < 7; s++) {
2077
- const c = e.addDays(i, s);
2078
- a.push(c);
2077
+ const c = e.addDays(a, s);
2078
+ i.push(c);
2079
2079
  }
2080
- return a;
2080
+ return i;
2081
2081
  }
2082
2082
  function Zo(e, t, r, n, o = !1) {
2083
2083
  if (!e || !t)
2084
2084
  return;
2085
- const { startOfYear: i, endOfYear: a, eachYearOfInterval: s, getYear: c } = n, u = i(e), l = a(t), f = s({ start: u, end: l });
2086
- return o && f.reverse(), f.map((h) => {
2087
- const w = r.formatYearDropdown(h, n);
2085
+ const { startOfYear: a, endOfYear: i, eachYearOfInterval: s, getYear: c } = n, u = a(e), f = i(t), l = s({ start: u, end: f });
2086
+ return o && l.reverse(), l.map((h) => {
2087
+ const g = r.formatYearDropdown(h, n);
2088
2088
  return {
2089
2089
  value: c(h),
2090
- label: w,
2090
+ label: g,
2091
2091
  disabled: !1
2092
2092
  };
2093
2093
  });
2094
2094
  }
2095
2095
  function Ko(e, t = {}) {
2096
- const { weekStartsOn: r, locale: n } = t, o = r ?? n?.options?.weekStartsOn ?? 0, i = (s) => {
2096
+ const { weekStartsOn: r, locale: n } = t, o = r ?? n?.options?.weekStartsOn ?? 0, a = (s) => {
2097
2097
  const c = typeof s == "number" || typeof s == "string" ? new Date(s) : s;
2098
2098
  return new H(c.getFullYear(), c.getMonth(), c.getDate(), 12, 0, 0, e);
2099
- }, a = (s) => {
2100
- const c = i(s);
2099
+ }, i = (s) => {
2100
+ const c = a(s);
2101
2101
  return new Date(c.getFullYear(), c.getMonth(), c.getDate(), 0, 0, 0, 0);
2102
2102
  };
2103
2103
  return {
2104
- today: () => i(H.tz(e)),
2104
+ today: () => a(H.tz(e)),
2105
2105
  newDate: (s, c, u) => new H(s, c, u, 12, 0, 0, e),
2106
- startOfDay: (s) => i(s),
2106
+ startOfDay: (s) => a(s),
2107
2107
  startOfWeek: (s, c) => {
2108
- const u = i(s), l = c?.weekStartsOn ?? o, f = (u.getDay() - l + 7) % 7;
2109
- return u.setDate(u.getDate() - f), u;
2108
+ const u = a(s), f = c?.weekStartsOn ?? o, l = (u.getDay() - f + 7) % 7;
2109
+ return u.setDate(u.getDate() - l), u;
2110
2110
  },
2111
2111
  startOfISOWeek: (s) => {
2112
- const c = i(s), u = (c.getDay() - 1 + 7) % 7;
2112
+ const c = a(s), u = (c.getDay() - 1 + 7) % 7;
2113
2113
  return c.setDate(c.getDate() - u), c;
2114
2114
  },
2115
2115
  startOfMonth: (s) => {
2116
- const c = i(s);
2116
+ const c = a(s);
2117
2117
  return c.setDate(1), c;
2118
2118
  },
2119
2119
  startOfYear: (s) => {
2120
- const c = i(s);
2120
+ const c = a(s);
2121
2121
  return c.setMonth(0, 1), c;
2122
2122
  },
2123
2123
  endOfWeek: (s, c) => {
2124
- const u = i(s), h = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
2124
+ const u = a(s), h = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
2125
2125
  return u.setDate(u.getDate() + h), u;
2126
2126
  },
2127
2127
  endOfISOWeek: (s) => {
2128
- const c = i(s), u = (7 - c.getDay()) % 7;
2128
+ const c = a(s), u = (7 - c.getDay()) % 7;
2129
2129
  return c.setDate(c.getDate() + u), c;
2130
2130
  },
2131
2131
  endOfMonth: (s) => {
2132
- const c = i(s);
2132
+ const c = a(s);
2133
2133
  return c.setMonth(c.getMonth() + 1, 0), c;
2134
2134
  },
2135
2135
  endOfYear: (s) => {
2136
- const c = i(s);
2136
+ const c = a(s);
2137
2137
  return c.setMonth(11, 31), c;
2138
2138
  },
2139
2139
  eachMonthOfInterval: (s) => {
2140
- const c = i(s.start), u = i(s.end), l = [], f = new H(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), h = u.getFullYear() * 12 + u.getMonth();
2141
- for (; f.getFullYear() * 12 + f.getMonth() <= h; )
2142
- l.push(new H(f, e)), f.setMonth(f.getMonth() + 1, 1);
2143
- return l;
2140
+ const c = a(s.start), u = a(s.end), f = [], l = new H(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), h = u.getFullYear() * 12 + u.getMonth();
2141
+ for (; l.getFullYear() * 12 + l.getMonth() <= h; )
2142
+ f.push(new H(l, e)), l.setMonth(l.getMonth() + 1, 1);
2143
+ return f;
2144
2144
  },
2145
2145
  // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
2146
2146
  // mutate the same TZDate, and return it.
2147
2147
  addDays: (s, c) => {
2148
- const u = i(s);
2148
+ const u = a(s);
2149
2149
  return u.setDate(u.getDate() + c), u;
2150
2150
  },
2151
2151
  addWeeks: (s, c) => {
2152
- const u = i(s);
2152
+ const u = a(s);
2153
2153
  return u.setDate(u.getDate() + c * 7), u;
2154
2154
  },
2155
2155
  addMonths: (s, c) => {
2156
- const u = i(s);
2156
+ const u = a(s);
2157
2157
  return u.setMonth(u.getMonth() + c), u;
2158
2158
  },
2159
2159
  addYears: (s, c) => {
2160
- const u = i(s);
2160
+ const u = a(s);
2161
2161
  return u.setFullYear(u.getFullYear() + c), u;
2162
2162
  },
2163
2163
  eachYearOfInterval: (s) => {
2164
- const c = i(s.start), u = i(s.end), l = [], f = new H(c.getFullYear(), 0, 1, 12, 0, 0, e);
2165
- for (; f.getFullYear() <= u.getFullYear(); )
2166
- l.push(new H(f, e)), f.setFullYear(f.getFullYear() + 1, 0, 1);
2167
- return l;
2164
+ const c = a(s.start), u = a(s.end), f = [], l = new H(c.getFullYear(), 0, 1, 12, 0, 0, e);
2165
+ for (; l.getFullYear() <= u.getFullYear(); )
2166
+ f.push(new H(l, e)), l.setFullYear(l.getFullYear() + 1, 0, 1);
2167
+ return f;
2168
2168
  },
2169
2169
  getWeek: (s, c) => {
2170
- const u = a(s);
2170
+ const u = i(s);
2171
2171
  return Xe(u, {
2172
2172
  weekStartsOn: c?.weekStartsOn ?? o,
2173
2173
  firstWeekContainsDate: c?.firstWeekContainsDate ?? n?.options?.firstWeekContainsDate ?? 1
2174
2174
  });
2175
2175
  },
2176
2176
  getISOWeek: (s) => {
2177
- const c = a(s);
2177
+ const c = i(s);
2178
2178
  return Qe(c);
2179
2179
  },
2180
2180
  differenceInCalendarDays: (s, c) => {
2181
- const u = a(s), l = a(c);
2182
- return ze(u, l);
2181
+ const u = i(s), f = i(c);
2182
+ return ze(u, f);
2183
2183
  },
2184
2184
  differenceInCalendarMonths: (s, c) => {
2185
- const u = a(s), l = a(c);
2186
- return vt(u, l);
2185
+ const u = i(s), f = i(c);
2186
+ return vt(u, f);
2187
2187
  }
2188
2188
  };
2189
2189
  }
2190
2190
  const De = (e) => e instanceof HTMLElement ? e : null, Ae = (e) => [
2191
2191
  ...e.querySelectorAll("[data-animated-month]") ?? []
2192
2192
  ], Jo = (e) => De(e.querySelector("[data-animated-month]")), qe = (e) => De(e.querySelector("[data-animated-caption]")), je = (e) => De(e.querySelector("[data-animated-weeks]")), Lo = (e) => De(e.querySelector("[data-animated-nav]")), es = (e) => De(e.querySelector("[data-animated-weekdays]"));
2193
- function ts(e, t, { classNames: r, months: n, focused: o, dateLib: i }) {
2194
- const a = We(null), s = We(n), c = We(!1);
2193
+ function ts(e, t, { classNames: r, months: n, focused: o, dateLib: a }) {
2194
+ const i = We(null), s = We(n), c = We(!1);
2195
2195
  vn(() => {
2196
2196
  const u = s.current;
2197
2197
  if (s.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
2198
2198
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
2199
2199
  n.length === 0 || u.length === 0 || n.length !== u.length)
2200
2200
  return;
2201
- const l = i.isSameMonth(n[0].date, u[0].date), f = i.isAfter(n[0].date, u[0].date), h = f ? r[q.caption_after_enter] : r[q.caption_before_enter], w = f ? r[q.weeks_after_enter] : r[q.weeks_before_enter], O = a.current, N = e.current.cloneNode(!0);
2202
- if (N instanceof HTMLElement ? (Ae(N).forEach((M) => {
2203
- if (!(M instanceof HTMLElement))
2201
+ const f = a.isSameMonth(n[0].date, u[0].date), l = a.isAfter(n[0].date, u[0].date), h = l ? r[q.caption_after_enter] : r[q.caption_before_enter], g = l ? r[q.weeks_after_enter] : r[q.weeks_before_enter], v = i.current, C = e.current.cloneNode(!0);
2202
+ if (C instanceof HTMLElement ? (Ae(C).forEach((w) => {
2203
+ if (!(w instanceof HTMLElement))
2204
2204
  return;
2205
- const k = Jo(M);
2206
- k && M.contains(k) && M.removeChild(k);
2207
- const b = qe(M);
2205
+ const D = Jo(w);
2206
+ D && w.contains(D) && w.removeChild(D);
2207
+ const b = qe(w);
2208
2208
  b && b.classList.remove(h);
2209
- const m = je(M);
2210
- m && m.classList.remove(w);
2211
- }), a.current = N) : a.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
2209
+ const m = je(w);
2210
+ m && m.classList.remove(g);
2211
+ }), i.current = C) : i.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
2212
2212
  o)
2213
2213
  return;
2214
- const D = O instanceof HTMLElement ? Ae(O) : [], v = Ae(e.current);
2215
- if (v?.every((T) => T instanceof HTMLElement) && D && D.every((T) => T instanceof HTMLElement)) {
2214
+ const O = v instanceof HTMLElement ? Ae(v) : [], T = Ae(e.current);
2215
+ if (T?.every((p) => p instanceof HTMLElement) && O && O.every((p) => p instanceof HTMLElement)) {
2216
2216
  c.current = !0, e.current.style.isolation = "isolate";
2217
- const T = Lo(e.current);
2218
- T && (T.style.zIndex = "1"), v.forEach((M, k) => {
2219
- const b = D[k];
2217
+ const p = Lo(e.current);
2218
+ p && (p.style.zIndex = "1"), T.forEach((w, D) => {
2219
+ const b = O[D];
2220
2220
  if (!b)
2221
2221
  return;
2222
- M.style.position = "relative", M.style.overflow = "hidden";
2223
- const m = qe(M);
2222
+ w.style.position = "relative", w.style.overflow = "hidden";
2223
+ const m = qe(w);
2224
2224
  m && m.classList.add(h);
2225
- const W = je(M);
2226
- W && W.classList.add(w);
2225
+ const W = je(w);
2226
+ W && W.classList.add(g);
2227
2227
  const E = () => {
2228
- c.current = !1, e.current && (e.current.style.isolation = ""), T && (T.style.zIndex = ""), m && m.classList.remove(h), W && W.classList.remove(w), M.style.position = "", M.style.overflow = "", M.contains(b) && M.removeChild(b);
2228
+ c.current = !1, e.current && (e.current.style.isolation = ""), p && (p.style.zIndex = ""), m && m.classList.remove(h), W && W.classList.remove(g), w.style.position = "", w.style.overflow = "", w.contains(b) && w.removeChild(b);
2229
2229
  };
2230
2230
  b.style.pointerEvents = "none", b.style.position = "absolute", b.style.overflow = "hidden", b.setAttribute("aria-hidden", "true");
2231
2231
  const I = es(b);
2232
2232
  I && (I.style.opacity = "0");
2233
2233
  const F = qe(b);
2234
- F && (F.classList.add(f ? r[q.caption_before_exit] : r[q.caption_after_exit]), F.addEventListener("animationend", E));
2234
+ F && (F.classList.add(l ? r[q.caption_before_exit] : r[q.caption_after_exit]), F.addEventListener("animationend", E));
2235
2235
  const V = je(b);
2236
- V && V.classList.add(f ? r[q.weeks_before_exit] : r[q.weeks_after_exit]), M.insertBefore(b, M.firstChild);
2236
+ V && V.classList.add(l ? r[q.weeks_before_exit] : r[q.weeks_after_exit]), w.insertBefore(b, w.firstChild);
2237
2237
  });
2238
2238
  }
2239
2239
  });
2240
2240
  }
2241
2241
  function ns(e, t, r, n) {
2242
- const o = e[0], i = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = r ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: f, endOfBroadcastWeek: h, endOfISOWeek: w, endOfMonth: O, endOfWeek: N, isAfter: D, startOfBroadcastWeek: v, startOfISOWeek: T, startOfWeek: M } = n, k = c ? v(o, n) : a ? T(o) : M(o), b = c ? h(i) : a ? w(O(i)) : N(O(i)), m = t && (c ? h(t) : a ? w(t) : N(t)), W = m && D(b, m) ? m : b, E = l(W, k), I = f(i, o) + 1, F = [];
2242
+ const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = r ?? {}, { addDays: u, differenceInCalendarDays: f, differenceInCalendarMonths: l, endOfBroadcastWeek: h, endOfISOWeek: g, endOfMonth: v, endOfWeek: C, isAfter: O, startOfBroadcastWeek: T, startOfISOWeek: p, startOfWeek: w } = n, D = c ? T(o, n) : i ? p(o) : w(o), b = c ? h(a) : i ? g(v(a)) : C(v(a)), m = t && (c ? h(t) : i ? g(t) : C(t)), W = m && O(b, m) ? m : b, E = f(W, D), I = l(a, o) + 1, F = [];
2243
2243
  for (let L = 0; L <= E; L++) {
2244
- const G = u(k, L);
2244
+ const G = u(D, L);
2245
2245
  F.push(G);
2246
2246
  }
2247
2247
  const re = (c ? 35 : 42) * I;
@@ -2257,100 +2257,100 @@ function ns(e, t, r, n) {
2257
2257
  function rs(e) {
2258
2258
  const t = [];
2259
2259
  return e.reduce((r, n) => {
2260
- const o = n.weeks.reduce((i, a) => i.concat(a.days.slice()), t.slice());
2260
+ const o = n.weeks.reduce((a, i) => a.concat(i.days.slice()), t.slice());
2261
2261
  return r.concat(o.slice());
2262
2262
  }, t.slice());
2263
2263
  }
2264
2264
  function os(e, t, r, n) {
2265
- const { numberOfMonths: o = 1 } = r, i = [];
2266
- for (let a = 0; a < o; a++) {
2267
- const s = n.addMonths(e, a);
2265
+ const { numberOfMonths: o = 1 } = r, a = [];
2266
+ for (let i = 0; i < o; i++) {
2267
+ const s = n.addMonths(e, i);
2268
2268
  if (t && s > t)
2269
2269
  break;
2270
- i.push(s);
2270
+ a.push(s);
2271
2271
  }
2272
- return i;
2272
+ return a;
2273
2273
  }
2274
2274
  function mt(e, t, r, n) {
2275
- const { month: o, defaultMonth: i, today: a = n.today(), numberOfMonths: s = 1 } = e;
2276
- let c = o || i || a;
2277
- const { differenceInCalendarMonths: u, addMonths: l, startOfMonth: f } = n;
2275
+ const { month: o, defaultMonth: a, today: i = n.today(), numberOfMonths: s = 1 } = e;
2276
+ let c = o || a || i;
2277
+ const { differenceInCalendarMonths: u, addMonths: f, startOfMonth: l } = n;
2278
2278
  if (r && u(r, c) < s - 1) {
2279
2279
  const h = -1 * (s - 1);
2280
- c = l(r, h);
2280
+ c = f(r, h);
2281
2281
  }
2282
- return t && u(c, t) < 0 && (c = t), f(c);
2282
+ return t && u(c, t) < 0 && (c = t), l(c);
2283
2283
  }
2284
2284
  function ss(e, t, r, n) {
2285
- const { addDays: o, endOfBroadcastWeek: i, endOfISOWeek: a, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: f, startOfISOWeek: h, startOfWeek: w } = n, O = e.reduce((N, D) => {
2286
- const v = r.broadcastCalendar ? f(D, n) : r.ISOWeek ? h(D) : w(D), T = r.broadcastCalendar ? i(D) : r.ISOWeek ? a(s(D)) : c(s(D)), M = t.filter((W) => W >= v && W <= T), k = r.broadcastCalendar ? 35 : 42;
2287
- if (r.fixedWeeks && M.length < k) {
2285
+ const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: f, startOfBroadcastWeek: l, startOfISOWeek: h, startOfWeek: g } = n, v = e.reduce((C, O) => {
2286
+ const T = r.broadcastCalendar ? l(O, n) : r.ISOWeek ? h(O) : g(O), p = r.broadcastCalendar ? a(O) : r.ISOWeek ? i(s(O)) : c(s(O)), w = t.filter((W) => W >= T && W <= p), D = r.broadcastCalendar ? 35 : 42;
2287
+ if (r.fixedWeeks && w.length < D) {
2288
2288
  const W = t.filter((E) => {
2289
- const I = k - M.length;
2290
- return E > T && E <= o(T, I);
2289
+ const I = D - w.length;
2290
+ return E > p && E <= o(p, I);
2291
2291
  });
2292
- M.push(...W);
2292
+ w.push(...W);
2293
2293
  }
2294
- const b = M.reduce((W, E) => {
2295
- const I = r.ISOWeek ? u(E) : l(E), F = W.find((re) => re.weekNumber === I), V = new Pt(E, D, n);
2294
+ const b = w.reduce((W, E) => {
2295
+ const I = r.ISOWeek ? u(E) : f(E), F = W.find((re) => re.weekNumber === I), V = new Pt(E, O, n);
2296
2296
  return F ? F.days.push(V) : W.push(new Lr(I, [V])), W;
2297
- }, []), m = new Jr(D, b);
2298
- return N.push(m), N;
2297
+ }, []), m = new Jr(O, b);
2298
+ return C.push(m), C;
2299
2299
  }, []);
2300
- return r.reverseMonths ? O.reverse() : O;
2300
+ return r.reverseMonths ? v.reverse() : v;
2301
2301
  }
2302
2302
  function as(e, t) {
2303
2303
  let { startMonth: r, endMonth: n } = e;
2304
- const { startOfYear: o, startOfDay: i, startOfMonth: a, endOfMonth: s, addYears: c, endOfYear: u, newDate: l, today: f } = t, { fromYear: h, toYear: w, fromMonth: O, toMonth: N } = e;
2305
- !r && O && (r = O), !r && h && (r = t.newDate(h, 0, 1)), !n && N && (n = N), !n && w && (n = l(w, 11, 31));
2306
- const D = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2307
- return r ? r = a(r) : h ? r = l(h, 0, 1) : !r && D && (r = o(c(e.today ?? f(), -100))), n ? n = s(n) : w ? n = l(w, 11, 31) : !n && D && (n = u(e.today ?? f())), [
2308
- r && i(r),
2309
- n && i(n)
2304
+ const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: u, newDate: f, today: l } = t, { fromYear: h, toYear: g, fromMonth: v, toMonth: C } = e;
2305
+ !r && v && (r = v), !r && h && (r = t.newDate(h, 0, 1)), !n && C && (n = C), !n && g && (n = f(g, 11, 31));
2306
+ const O = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2307
+ return r ? r = i(r) : h ? r = f(h, 0, 1) : !r && O && (r = o(c(e.today ?? l(), -100))), n ? n = s(n) : g ? n = f(g, 11, 31) : !n && O && (n = u(e.today ?? l())), [
2308
+ r && a(r),
2309
+ n && a(n)
2310
2310
  ];
2311
2311
  }
2312
2312
  function is(e, t, r, n) {
2313
2313
  if (r.disableNavigation)
2314
2314
  return;
2315
- const { pagedNavigation: o, numberOfMonths: i = 1 } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i : 1, l = a(e);
2315
+ const { pagedNavigation: o, numberOfMonths: a = 1 } = r, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? a : 1, f = i(e);
2316
2316
  if (!t)
2317
- return s(l, u);
2318
- if (!(c(t, e) < i))
2319
- return s(l, u);
2317
+ return s(f, u);
2318
+ if (!(c(t, e) < a))
2319
+ return s(f, u);
2320
2320
  }
2321
2321
  function cs(e, t, r, n) {
2322
2322
  if (r.disableNavigation)
2323
2323
  return;
2324
- const { pagedNavigation: o, numberOfMonths: i } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i ?? 1 : 1, l = a(e);
2324
+ const { pagedNavigation: o, numberOfMonths: a } = r, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? a ?? 1 : 1, f = i(e);
2325
2325
  if (!t)
2326
- return s(l, -u);
2327
- if (!(c(l, t) <= 0))
2328
- return s(l, -u);
2326
+ return s(f, -u);
2327
+ if (!(c(f, t) <= 0))
2328
+ return s(f, -u);
2329
2329
  }
2330
2330
  function us(e) {
2331
2331
  const t = [];
2332
2332
  return e.reduce((r, n) => r.concat(n.weeks.slice()), t.slice());
2333
2333
  }
2334
- function Ce(e, t) {
2334
+ function Ne(e, t) {
2335
2335
  const [r, n] = $e(e);
2336
2336
  return [t === void 0 ? r : t, n];
2337
2337
  }
2338
- function fs(e, t) {
2339
- const [r, n] = as(e, t), { startOfMonth: o, endOfMonth: i } = t, a = mt(e, r, n, t), [s, c] = Ce(
2340
- a,
2338
+ function ls(e, t) {
2339
+ const [r, n] = as(e, t), { startOfMonth: o, endOfMonth: a } = t, i = mt(e, r, n, t), [s, c] = Ne(
2340
+ i,
2341
2341
  // initialMonth is always computed from props.month if provided
2342
- e.month ? a : void 0
2342
+ e.month ? i : void 0
2343
2343
  );
2344
2344
  Wn(() => {
2345
- const k = mt(e, r, n, t);
2346
- c(k);
2345
+ const D = mt(e, r, n, t);
2346
+ c(D);
2347
2347
  }, [e.timeZone]);
2348
- const { months: u, weeks: l, days: f, previousMonth: h, nextMonth: w } = Se(() => {
2349
- const k = os(s, n, { numberOfMonths: e.numberOfMonths }, t), b = ns(k, e.endMonth ? i(e.endMonth) : void 0, {
2348
+ const { months: u, weeks: f, days: l, previousMonth: h, nextMonth: g } = Se(() => {
2349
+ const D = os(s, n, { numberOfMonths: e.numberOfMonths }, t), b = ns(D, e.endMonth ? a(e.endMonth) : void 0, {
2350
2350
  ISOWeek: e.ISOWeek,
2351
2351
  fixedWeeks: e.fixedWeeks,
2352
2352
  broadcastCalendar: e.broadcastCalendar
2353
- }, t), m = ss(k, b, {
2353
+ }, t), m = ss(D, b, {
2354
2354
  broadcastCalendar: e.broadcastCalendar,
2355
2355
  fixedWeeks: e.fixedWeeks,
2356
2356
  ISOWeek: e.ISOWeek,
@@ -2376,23 +2376,23 @@ function fs(e, t) {
2376
2376
  e.numberOfMonths,
2377
2377
  e.pagedNavigation,
2378
2378
  e.reverseMonths
2379
- ]), { disableNavigation: O, onMonthChange: N } = e, D = (k) => l.some((b) => b.days.some((m) => m.isEqualTo(k))), v = (k) => {
2380
- if (O)
2379
+ ]), { disableNavigation: v, onMonthChange: C } = e, O = (D) => f.some((b) => b.days.some((m) => m.isEqualTo(D))), T = (D) => {
2380
+ if (v)
2381
2381
  return;
2382
- let b = o(k);
2383
- r && b < o(r) && (b = o(r)), n && b > o(n) && (b = o(n)), c(b), N?.(b);
2382
+ let b = o(D);
2383
+ r && b < o(r) && (b = o(r)), n && b > o(n) && (b = o(n)), c(b), C?.(b);
2384
2384
  };
2385
2385
  return {
2386
2386
  months: u,
2387
- weeks: l,
2388
- days: f,
2387
+ weeks: f,
2388
+ days: l,
2389
2389
  navStart: r,
2390
2390
  navEnd: n,
2391
2391
  previousMonth: h,
2392
- nextMonth: w,
2393
- goToMonth: v,
2394
- goToDay: (k) => {
2395
- D(k) || v(k.date);
2392
+ nextMonth: g,
2393
+ goToMonth: T,
2394
+ goToDay: (D) => {
2395
+ O(D) || T(D.date);
2396
2396
  }
2397
2397
  };
2398
2398
  }
@@ -2403,99 +2403,99 @@ var Z;
2403
2403
  function yt(e) {
2404
2404
  return !e[_.disabled] && !e[_.hidden] && !e[_.outside];
2405
2405
  }
2406
- function ls(e, t, r, n) {
2407
- let o, i = -1;
2408
- for (const a of e) {
2409
- const s = t(a);
2410
- yt(s) && (s[_.focused] && i < Z.FocusedModifier ? (o = a, i = Z.FocusedModifier) : n?.isEqualTo(a) && i < Z.LastFocused ? (o = a, i = Z.LastFocused) : r(a.date) && i < Z.Selected ? (o = a, i = Z.Selected) : s[_.today] && i < Z.Today && (o = a, i = Z.Today));
2406
+ function fs(e, t, r, n) {
2407
+ let o, a = -1;
2408
+ for (const i of e) {
2409
+ const s = t(i);
2410
+ yt(s) && (s[_.focused] && a < Z.FocusedModifier ? (o = i, a = Z.FocusedModifier) : n?.isEqualTo(i) && a < Z.LastFocused ? (o = i, a = Z.LastFocused) : r(i.date) && a < Z.Selected ? (o = i, a = Z.Selected) : s[_.today] && a < Z.Today && (o = i, a = Z.Today));
2411
2411
  }
2412
- return o || (o = e.find((a) => yt(t(a)))), o;
2412
+ return o || (o = e.find((i) => yt(t(i)))), o;
2413
2413
  }
2414
- function ds(e, t, r, n, o, i, a) {
2415
- const { ISOWeek: s, broadcastCalendar: c } = i, { addDays: u, addMonths: l, addWeeks: f, addYears: h, endOfBroadcastWeek: w, endOfISOWeek: O, endOfWeek: N, max: D, min: v, startOfBroadcastWeek: T, startOfISOWeek: M, startOfWeek: k } = a;
2414
+ function ds(e, t, r, n, o, a, i) {
2415
+ const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: u, addMonths: f, addWeeks: l, addYears: h, endOfBroadcastWeek: g, endOfISOWeek: v, endOfWeek: C, max: O, min: T, startOfBroadcastWeek: p, startOfISOWeek: w, startOfWeek: D } = i;
2416
2416
  let m = {
2417
2417
  day: u,
2418
- week: f,
2419
- month: l,
2418
+ week: l,
2419
+ month: f,
2420
2420
  year: h,
2421
- startOfWeek: (W) => c ? T(W, a) : s ? M(W) : k(W),
2422
- endOfWeek: (W) => c ? w(W) : s ? O(W) : N(W)
2421
+ startOfWeek: (W) => c ? p(W, i) : s ? w(W) : D(W),
2422
+ endOfWeek: (W) => c ? g(W) : s ? v(W) : C(W)
2423
2423
  }[e](r, t === "after" ? 1 : -1);
2424
- return t === "before" && n ? m = D([n, m]) : t === "after" && o && (m = v([o, m])), m;
2424
+ return t === "before" && n ? m = O([n, m]) : t === "after" && o && (m = T([o, m])), m;
2425
2425
  }
2426
- function Xt(e, t, r, n, o, i, a, s = 0) {
2426
+ function Xt(e, t, r, n, o, a, i, s = 0) {
2427
2427
  if (s > 365)
2428
2428
  return;
2429
- const c = ds(e, t, r.date, n, o, i, a), u = !!(i.disabled && ne(c, i.disabled, a)), l = !!(i.hidden && ne(c, i.hidden, a)), f = c, h = new Pt(c, f, a);
2430
- return !u && !l ? h : Xt(e, t, h, n, o, i, a, s + 1);
2429
+ const c = ds(e, t, r.date, n, o, a, i), u = !!(a.disabled && ne(c, a.disabled, i)), f = !!(a.hidden && ne(c, a.hidden, i)), l = c, h = new Pt(c, l, i);
2430
+ return !u && !f ? h : Xt(e, t, h, n, o, a, i, s + 1);
2431
2431
  }
2432
2432
  function hs(e, t, r, n, o) {
2433
- const { autoFocus: i } = e, [a, s] = $e(), c = ls(t.days, r, n || (() => !1), a), [u, l] = $e(i ? c : void 0);
2433
+ const { autoFocus: a } = e, [i, s] = $e(), c = fs(t.days, r, n || (() => !1), i), [u, f] = $e(a ? c : void 0);
2434
2434
  return {
2435
- isFocusTarget: (N) => !!c?.isEqualTo(N),
2436
- setFocused: l,
2435
+ isFocusTarget: (C) => !!c?.isEqualTo(C),
2436
+ setFocused: f,
2437
2437
  focused: u,
2438
2438
  blur: () => {
2439
- s(u), l(void 0);
2439
+ s(u), f(void 0);
2440
2440
  },
2441
- moveFocus: (N, D) => {
2441
+ moveFocus: (C, O) => {
2442
2442
  if (!u)
2443
2443
  return;
2444
- const v = Xt(N, D, u, t.navStart, t.navEnd, e, o);
2445
- v && (e.disableNavigation && !t.days.some((M) => M.isEqualTo(v)) || (t.goToDay(v), l(v)));
2444
+ const T = Xt(C, O, u, t.navStart, t.navEnd, e, o);
2445
+ T && (e.disableNavigation && !t.days.some((w) => w.isEqualTo(T)) || (t.goToDay(T), f(T)));
2446
2446
  }
2447
2447
  };
2448
2448
  }
2449
2449
  function ms(e, t) {
2450
- const { selected: r, required: n, onSelect: o } = e, [i, a] = Ce(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t, u = (w) => s?.some((O) => c(O, w)) ?? !1, { min: l, max: f } = e;
2450
+ const { selected: r, required: n, onSelect: o } = e, [a, i] = Ne(r, o ? r : void 0), s = o ? r : a, { isSameDay: c } = t, u = (g) => s?.some((v) => c(v, g)) ?? !1, { min: f, max: l } = e;
2451
2451
  return {
2452
2452
  selected: s,
2453
- select: (w, O, N) => {
2454
- let D = [...s ?? []];
2455
- if (u(w)) {
2456
- if (s?.length === l || n && s?.length === 1)
2453
+ select: (g, v, C) => {
2454
+ let O = [...s ?? []];
2455
+ if (u(g)) {
2456
+ if (s?.length === f || n && s?.length === 1)
2457
2457
  return;
2458
- D = s?.filter((v) => !c(v, w));
2458
+ O = s?.filter((T) => !c(T, g));
2459
2459
  } else
2460
- s?.length === f ? D = [w] : D = [...D, w];
2461
- return o || a(D), o?.(D, w, O, N), D;
2460
+ s?.length === l ? O = [g] : O = [...O, g];
2461
+ return o || i(O), o?.(O, g, v, C), O;
2462
2462
  },
2463
2463
  isSelected: u
2464
2464
  };
2465
2465
  }
2466
- function ys(e, t, r = 0, n = 0, o = !1, i = J) {
2467
- const { from: a, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: l } = i;
2468
- let f;
2469
- if (!a && !s)
2470
- f = { from: e, to: r > 0 ? void 0 : e };
2471
- else if (a && !s)
2472
- c(a, e) ? r === 0 ? f = { from: a, to: e } : o ? f = { from: a, to: void 0 } : f = void 0 : l(e, a) ? f = { from: e, to: a } : f = { from: a, to: e };
2473
- else if (a && s)
2474
- if (c(a, e) && c(s, e))
2475
- o ? f = { from: a, to: s } : f = void 0;
2476
- else if (c(a, e))
2477
- f = { from: a, to: r > 0 ? void 0 : e };
2466
+ function ys(e, t, r = 0, n = 0, o = !1, a = J) {
2467
+ const { from: i, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: f } = a;
2468
+ let l;
2469
+ if (!i && !s)
2470
+ l = { from: e, to: r > 0 ? void 0 : e };
2471
+ else if (i && !s)
2472
+ c(i, e) ? r === 0 ? l = { from: i, to: e } : o ? l = { from: i, to: void 0 } : l = void 0 : f(e, i) ? l = { from: e, to: i } : l = { from: i, to: e };
2473
+ else if (i && s)
2474
+ if (c(i, e) && c(s, e))
2475
+ o ? l = { from: i, to: s } : l = void 0;
2476
+ else if (c(i, e))
2477
+ l = { from: i, to: r > 0 ? void 0 : e };
2478
2478
  else if (c(s, e))
2479
- f = { from: e, to: r > 0 ? void 0 : e };
2480
- else if (l(e, a))
2481
- f = { from: e, to: s };
2482
- else if (u(e, a))
2483
- f = { from: a, to: e };
2479
+ l = { from: e, to: r > 0 ? void 0 : e };
2480
+ else if (f(e, i))
2481
+ l = { from: e, to: s };
2482
+ else if (u(e, i))
2483
+ l = { from: i, to: e };
2484
2484
  else if (u(e, s))
2485
- f = { from: a, to: e };
2485
+ l = { from: i, to: e };
2486
2486
  else
2487
2487
  throw new Error("Invalid range");
2488
- if (f?.from && f?.to) {
2489
- const h = i.differenceInCalendarDays(f.to, f.from);
2490
- n > 0 && h > n ? f = { from: e, to: void 0 } : r > 1 && h < r && (f = { from: e, to: void 0 });
2488
+ if (l?.from && l?.to) {
2489
+ const h = a.differenceInCalendarDays(l.to, l.from);
2490
+ n > 0 && h > n ? l = { from: e, to: void 0 } : r > 1 && h < r && (l = { from: e, to: void 0 });
2491
2491
  }
2492
- return f;
2492
+ return l;
2493
2493
  }
2494
2494
  function gs(e, t, r = J) {
2495
2495
  const n = Array.isArray(t) ? t : [t];
2496
2496
  let o = e.from;
2497
- const i = r.differenceInCalendarDays(e.to, e.from), a = Math.min(i, 6);
2498
- for (let s = 0; s <= a; s++) {
2497
+ const a = r.differenceInCalendarDays(e.to, e.from), i = Math.min(a, 6);
2498
+ for (let s = 0; s <= i; s++) {
2499
2499
  if (n.includes(o.getDay()))
2500
2500
  return !0;
2501
2501
  o = r.addDays(o, 1);
@@ -2507,17 +2507,17 @@ function gt(e, t, r = J) {
2507
2507
  }
2508
2508
  function bs(e, t, r = J) {
2509
2509
  const n = Array.isArray(t) ? t : [t];
2510
- if (n.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : r.isDate(s) ? te(e, s, !1, r) : Ft(s, r) ? s.some((c) => te(e, c, !1, r)) : Ne(s) ? s.from && s.to ? gt(e, { from: s.from, to: s.to }, r) : !1 : _t(s) ? gs(e, s.dayOfWeek, r) : Ue(s) ? r.isAfter(s.before, s.after) ? gt(e, {
2510
+ if (n.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : r.isDate(s) ? te(e, s, !1, r) : Ft(s, r) ? s.some((c) => te(e, c, !1, r)) : Ce(s) ? s.from && s.to ? gt(e, { from: s.from, to: s.to }, r) : !1 : _t(s) ? gs(e, s.dayOfWeek, r) : Ue(s) ? r.isAfter(s.before, s.after) ? gt(e, {
2511
2511
  from: r.addDays(s.after, 1),
2512
2512
  to: r.addDays(s.before, -1)
2513
2513
  }, r) : ne(e.from, s, r) || ne(e.to, s, r) : Ve(s) || Ze(s) ? ne(e.from, s, r) || ne(e.to, s, r) : !1))
2514
2514
  return !0;
2515
- const a = n.filter((s) => typeof s == "function");
2516
- if (a.length) {
2515
+ const i = n.filter((s) => typeof s == "function");
2516
+ if (i.length) {
2517
2517
  let s = e.from;
2518
2518
  const c = r.differenceInCalendarDays(e.to, e.from);
2519
2519
  for (let u = 0; u <= c; u++) {
2520
- if (a.some((l) => l(s)))
2520
+ if (i.some((f) => f(s)))
2521
2521
  return !0;
2522
2522
  s = r.addDays(s, 1);
2523
2523
  }
@@ -2525,25 +2525,30 @@ function bs(e, t, r = J) {
2525
2525
  return !1;
2526
2526
  }
2527
2527
  function ws(e, t) {
2528
- const { disabled: r, excludeDisabled: n, selected: o, required: i, onSelect: a } = e, [s, c] = Ce(o, a ? o : void 0), u = a ? o : s;
2528
+ const { disabled: r, excludeDisabled: n, resetOnSelect: o, selected: a, required: i, onSelect: s } = e, [c, u] = Ne(a, s ? a : void 0), f = s ? a : c;
2529
2529
  return {
2530
- selected: u,
2531
- select: (h, w, O) => {
2532
- const { min: N, max: D } = e, v = h ? ys(h, u, N, D, i, t) : void 0;
2533
- return n && r && v?.from && v.to && bs({ from: v.from, to: v.to }, r, t) && (v.from = h, v.to = void 0), a || c(v), a?.(v, h, w, O), v;
2530
+ selected: f,
2531
+ select: (g, v, C) => {
2532
+ const { min: O, max: T } = e;
2533
+ let p;
2534
+ if (g) {
2535
+ const w = f?.from, D = f?.to, b = !!w && !!D, m = !!w && !!D && t.isSameDay(w, D) && t.isSameDay(g, w);
2536
+ o && (b || !f?.from) ? !i && m ? p = void 0 : p = { from: g, to: void 0 } : p = ys(g, f, O, T, i, t);
2537
+ }
2538
+ return n && r && p?.from && p.to && bs({ from: p.from, to: p.to }, r, t) && (p.from = g, p.to = void 0), s || u(p), s?.(p, g, v, C), p;
2534
2539
  },
2535
- isSelected: (h) => u && te(u, h, !1, t)
2540
+ isSelected: (g) => f && te(f, g, !1, t)
2536
2541
  };
2537
2542
  }
2538
2543
  function Ms(e, t) {
2539
- const { selected: r, required: n, onSelect: o } = e, [i, a] = Ce(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t;
2544
+ const { selected: r, required: n, onSelect: o } = e, [a, i] = Ne(r, o ? r : void 0), s = o ? r : a, { isSameDay: c } = t;
2540
2545
  return {
2541
2546
  selected: s,
2542
- select: (f, h, w) => {
2543
- let O = f;
2544
- return !n && s && s && c(f, s) && (O = void 0), o || a(O), o?.(O, f, h, w), O;
2547
+ select: (l, h, g) => {
2548
+ let v = l;
2549
+ return !n && s && s && c(l, s) && (v = void 0), o || i(v), o?.(v, l, h, g), v;
2545
2550
  },
2546
- isSelected: (f) => s ? c(s, f) : !1
2551
+ isSelected: (l) => s ? c(s, l) : !1
2547
2552
  };
2548
2553
  }
2549
2554
  function ps(e, t) {
@@ -2566,7 +2571,7 @@ function ue(e, t, r) {
2566
2571
  return R(e, t);
2567
2572
  }
2568
2573
  function bt(e, t, r) {
2569
- return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? ue(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? ue(n, t) : n) : Ne(e) ? {
2574
+ return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? ue(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? ue(n, t) : n) : Ce(e) ? {
2570
2575
  ...e,
2571
2576
  from: e.from ? R(e.from, t) : e.from,
2572
2577
  to: e.to ? R(e.to, t) : e.to
@@ -2588,34 +2593,34 @@ function ks(e) {
2588
2593
  if (r && (t = {
2589
2594
  ...e,
2590
2595
  timeZone: r
2591
- }, t.today && (t.today = R(t.today, r)), t.month && (t.month = R(t.month, r)), t.defaultMonth && (t.defaultMonth = R(t.defaultMonth, r)), t.startMonth && (t.startMonth = R(t.startMonth, r)), t.endMonth && (t.endMonth = R(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = R(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((p) => R(p, r)) : t.mode === "range" && t.selected && (t.selected = {
2596
+ }, t.today && (t.today = R(t.today, r)), t.month && (t.month = R(t.month, r)), t.defaultMonth && (t.defaultMonth = R(t.defaultMonth, r)), t.startMonth && (t.startMonth = R(t.startMonth, r)), t.endMonth && (t.endMonth = R(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = R(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((k) => R(k, r)) : t.mode === "range" && t.selected && (t.selected = {
2592
2597
  from: t.selected.from ? R(t.selected.from, r) : t.selected.from,
2593
2598
  to: t.selected.to ? R(t.selected.to, r) : t.selected.to
2594
2599
  }), t.disabled !== void 0 && (t.disabled = Ge(t.disabled, r)), t.hidden !== void 0 && (t.hidden = Ge(t.hidden, r)), t.modifiers)) {
2595
- const p = {};
2600
+ const k = {};
2596
2601
  Object.keys(t.modifiers).forEach((Y) => {
2597
- p[Y] = Ge(t.modifiers?.[Y], r);
2598
- }), t.modifiers = p;
2602
+ k[Y] = Ge(t.modifiers?.[Y], r);
2603
+ }), t.modifiers = k;
2599
2604
  }
2600
- const { components: n, formatters: o, labels: i, dateLib: a, locale: s, classNames: c } = Se(() => {
2601
- const p = { ...xt, ...t.locale }, Y = t.broadcastCalendar ? 1 : t.weekStartsOn, g = t.noonSafe && t.timeZone ? Ko(t.timeZone, {
2605
+ const { components: n, formatters: o, labels: a, dateLib: i, locale: s, classNames: c } = Se(() => {
2606
+ const k = { ...xt, ...t.locale }, Y = t.broadcastCalendar ? 1 : t.weekStartsOn, M = t.noonSafe && t.timeZone ? Ko(t.timeZone, {
2602
2607
  weekStartsOn: Y,
2603
- locale: p
2604
- }) : void 0, C = t.dateLib && g ? { ...g, ...t.dateLib } : t.dateLib ?? g, A = new j({
2605
- locale: p,
2608
+ locale: k
2609
+ }) : void 0, N = t.dateLib && M ? { ...M, ...t.dateLib } : t.dateLib ?? M, A = new j({
2610
+ locale: k,
2606
2611
  weekStartsOn: Y,
2607
2612
  firstWeekContainsDate: t.firstWeekContainsDate,
2608
2613
  useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
2609
2614
  useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
2610
2615
  timeZone: t.timeZone,
2611
2616
  numerals: t.numerals
2612
- }, C);
2617
+ }, N);
2613
2618
  return {
2614
2619
  dateLib: A,
2615
2620
  components: To(t.components),
2616
2621
  formatters: jo(t.formatters),
2617
2622
  labels: Qo(t.labels, A.options),
2618
- locale: p,
2623
+ locale: k,
2619
2624
  classNames: { ...Po(), ...t.classNames }
2620
2625
  };
2621
2626
  }, [
@@ -2634,51 +2639,51 @@ function ks(e) {
2634
2639
  t.labels,
2635
2640
  t.classNames
2636
2641
  ]);
2637
- t.today || (t = { ...t, today: a.today() });
2638
- const { captionLayout: u, mode: l, navLayout: f, numberOfMonths: h = 1, onDayBlur: w, onDayClick: O, onDayFocus: N, onDayKeyDown: D, onDayMouseEnter: v, onDayMouseLeave: T, onNextClick: M, onPrevClick: k, showWeekNumber: b, styles: m } = t, { formatCaption: W, formatDay: E, formatMonthDropdown: I, formatWeekNumber: F, formatWeekNumberHeader: V, formatWeekdayName: re, formatYearDropdown: L } = o, G = fs(t, a), { days: ie, months: ke, navStart: Ye, navEnd: Te, previousMonth: z, nextMonth: Q, goToMonth: ee } = G, xe = Co(ie, t, Ye, Te, a), { isSelected: Pe, select: Ee, selected: Oe } = ps(t, a) ?? {}, { blur: Le, focused: et, isFocusTarget: Ut, moveFocus: tt, setFocused: ve } = hs(t, G, xe, Pe ?? (() => !1), a), { labelDayButton: Vt, labelGridcell: Zt, labelGrid: Kt, labelMonthDropdown: Jt, labelNav: nt, labelPrevious: Lt, labelNext: en, labelWeekday: tn, labelWeekNumber: nn, labelWeekNumberHeader: rn, labelYearDropdown: on } = i, sn = Se(() => Vo(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), rt = l !== void 0 || O !== void 0, _e = $(() => {
2639
- z && (ee(z), k?.(z));
2640
- }, [z, ee, k]), Fe = $(() => {
2641
- Q && (ee(Q), M?.(Q));
2642
- }, [ee, Q, M]), an = $((p, Y) => (g) => {
2643
- g.preventDefault(), g.stopPropagation(), ve(p), !Y.disabled && (Ee?.(p.date, Y, g), O?.(p.date, Y, g));
2644
- }, [Ee, O, ve]), cn = $((p, Y) => (g) => {
2645
- ve(p), N?.(p.date, Y, g);
2646
- }, [N, ve]), un = $((p, Y) => (g) => {
2647
- Le(), w?.(p.date, Y, g);
2648
- }, [Le, w]), fn = $((p, Y) => (g) => {
2649
- const C = {
2642
+ t.today || (t = { ...t, today: i.today() });
2643
+ const { captionLayout: u, mode: f, navLayout: l, numberOfMonths: h = 1, onDayBlur: g, onDayClick: v, onDayFocus: C, onDayKeyDown: O, onDayMouseEnter: T, onDayMouseLeave: p, onNextClick: w, onPrevClick: D, showWeekNumber: b, styles: m } = t, { formatCaption: W, formatDay: E, formatMonthDropdown: I, formatWeekNumber: F, formatWeekNumberHeader: V, formatWeekdayName: re, formatYearDropdown: L } = o, G = ls(t, i), { days: ie, months: ke, navStart: Ye, navEnd: Te, previousMonth: z, nextMonth: Q, goToMonth: ee } = G, xe = No(ie, t, Ye, Te, i), { isSelected: Pe, select: Ee, selected: Oe } = ps(t, i) ?? {}, { blur: Le, focused: et, isFocusTarget: Ut, moveFocus: tt, setFocused: ve } = hs(t, G, xe, Pe ?? (() => !1), i), { labelDayButton: Vt, labelGridcell: Zt, labelGrid: Kt, labelMonthDropdown: Jt, labelNav: nt, labelPrevious: Lt, labelNext: en, labelWeekday: tn, labelWeekNumber: nn, labelWeekNumberHeader: rn, labelYearDropdown: on } = a, sn = Se(() => Vo(i, t.ISOWeek, t.broadcastCalendar, t.today), [i, t.ISOWeek, t.broadcastCalendar, t.today]), rt = f !== void 0 || v !== void 0, _e = $(() => {
2644
+ z && (ee(z), D?.(z));
2645
+ }, [z, ee, D]), Fe = $(() => {
2646
+ Q && (ee(Q), w?.(Q));
2647
+ }, [ee, Q, w]), an = $((k, Y) => (M) => {
2648
+ M.preventDefault(), M.stopPropagation(), ve(k), !Y.disabled && (Ee?.(k.date, Y, M), v?.(k.date, Y, M));
2649
+ }, [Ee, v, ve]), cn = $((k, Y) => (M) => {
2650
+ ve(k), C?.(k.date, Y, M);
2651
+ }, [C, ve]), un = $((k, Y) => (M) => {
2652
+ Le(), g?.(k.date, Y, M);
2653
+ }, [Le, g]), ln = $((k, Y) => (M) => {
2654
+ const N = {
2650
2655
  ArrowLeft: [
2651
- g.shiftKey ? "month" : "day",
2656
+ M.shiftKey ? "month" : "day",
2652
2657
  t.dir === "rtl" ? "after" : "before"
2653
2658
  ],
2654
2659
  ArrowRight: [
2655
- g.shiftKey ? "month" : "day",
2660
+ M.shiftKey ? "month" : "day",
2656
2661
  t.dir === "rtl" ? "before" : "after"
2657
2662
  ],
2658
- ArrowDown: [g.shiftKey ? "year" : "week", "after"],
2659
- ArrowUp: [g.shiftKey ? "year" : "week", "before"],
2660
- PageUp: [g.shiftKey ? "year" : "month", "before"],
2661
- PageDown: [g.shiftKey ? "year" : "month", "after"],
2663
+ ArrowDown: [M.shiftKey ? "year" : "week", "after"],
2664
+ ArrowUp: [M.shiftKey ? "year" : "week", "before"],
2665
+ PageUp: [M.shiftKey ? "year" : "month", "before"],
2666
+ PageDown: [M.shiftKey ? "year" : "month", "after"],
2662
2667
  Home: ["startOfWeek", "before"],
2663
2668
  End: ["endOfWeek", "after"]
2664
2669
  };
2665
- if (C[g.key]) {
2666
- g.preventDefault(), g.stopPropagation();
2667
- const [A, S] = C[g.key];
2670
+ if (N[M.key]) {
2671
+ M.preventDefault(), M.stopPropagation();
2672
+ const [A, S] = N[M.key];
2668
2673
  tt(A, S);
2669
2674
  }
2670
- D?.(p.date, Y, g);
2671
- }, [tt, D, t.dir]), ln = $((p, Y) => (g) => {
2672
- v?.(p.date, Y, g);
2673
- }, [v]), dn = $((p, Y) => (g) => {
2674
- T?.(p.date, Y, g);
2675
- }, [T]), hn = $((p) => (Y) => {
2676
- const g = Number(Y.target.value), C = a.setMonth(a.startOfMonth(p), g);
2677
- ee(C);
2678
- }, [a, ee]), mn = $((p) => (Y) => {
2679
- const g = Number(Y.target.value), C = a.setYear(a.startOfMonth(p), g);
2680
- ee(C);
2681
- }, [a, ee]), { className: yn, style: gn } = Se(() => ({
2675
+ O?.(k.date, Y, M);
2676
+ }, [tt, O, t.dir]), fn = $((k, Y) => (M) => {
2677
+ T?.(k.date, Y, M);
2678
+ }, [T]), dn = $((k, Y) => (M) => {
2679
+ p?.(k.date, Y, M);
2680
+ }, [p]), hn = $((k) => (Y) => {
2681
+ const M = Number(Y.target.value), N = i.setMonth(i.startOfMonth(k), M);
2682
+ ee(N);
2683
+ }, [i, ee]), mn = $((k) => (Y) => {
2684
+ const M = Number(Y.target.value), N = i.setYear(i.startOfMonth(k), M);
2685
+ ee(N);
2686
+ }, [i, ee]), { className: yn, style: gn } = Se(() => ({
2682
2687
  className: [c[y.Root], t.className].filter(Boolean).join(" "),
2683
2688
  style: { ...m?.[y.Root], ...t.style }
2684
2689
  }), [c, t.className, t.style, m]), bn = xo(t), ot = We(null);
@@ -2686,7 +2691,7 @@ function ks(e) {
2686
2691
  classNames: c,
2687
2692
  months: ke,
2688
2693
  focused: et,
2689
- dateLib: a
2694
+ dateLib: i
2690
2695
  });
2691
2696
  const wn = {
2692
2697
  dayPickerProps: t,
@@ -2701,7 +2706,7 @@ function ks(e) {
2701
2706
  components: n,
2702
2707
  classNames: c,
2703
2708
  styles: m,
2704
- labels: i,
2709
+ labels: a,
2705
2710
  formatters: o
2706
2711
  };
2707
2712
  return d.createElement(
@@ -2709,12 +2714,12 @@ function ks(e) {
2709
2714
  { value: wn },
2710
2715
  d.createElement(
2711
2716
  n.Root,
2712
- { rootRef: t.animate ? ot : void 0, className: yn, style: gn, 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"], ...bn },
2717
+ { rootRef: t.animate ? ot : void 0, className: yn, style: gn, dir: t.dir, id: t.id, lang: t.lang ?? s.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...bn },
2713
2718
  d.createElement(
2714
2719
  n.Months,
2715
2720
  { className: c[y.Months], style: m?.[y.Months] },
2716
- !t.hideNavigation && !f && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": nt(), onPreviousClick: _e, onNextClick: Fe, previousMonth: z, nextMonth: Q }),
2717
- ke.map((p, Y) => d.createElement(
2721
+ !t.hideNavigation && !l && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": nt(), onPreviousClick: _e, onNextClick: Fe, previousMonth: z, nextMonth: Q }),
2722
+ ke.map((k, Y) => d.createElement(
2718
2723
  n.Month,
2719
2724
  {
2720
2725
  "data-animated-month": t.animate ? "true" : void 0,
@@ -2723,19 +2728,19 @@ function ks(e) {
2723
2728
  // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
2724
2729
  key: Y,
2725
2730
  displayIndex: Y,
2726
- calendarMonth: p
2731
+ calendarMonth: k
2727
2732
  },
2728
- f === "around" && !t.hideNavigation && Y === 0 && d.createElement(
2733
+ l === "around" && !t.hideNavigation && Y === 0 && d.createElement(
2729
2734
  n.PreviousMonthButton,
2730
2735
  { type: "button", className: c[y.PreviousMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": Lt(z), onClick: _e, "data-animated-button": t.animate ? "true" : void 0 },
2731
2736
  d.createElement(n.Chevron, { disabled: z ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2732
2737
  ),
2733
- d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: p, displayIndex: Y }, u?.startsWith("dropdown") ? d.createElement(
2738
+ d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: k, displayIndex: Y }, u?.startsWith("dropdown") ? d.createElement(
2734
2739
  n.DropdownNav,
2735
2740
  { className: c[y.Dropdowns], style: m?.[y.Dropdowns] },
2736
2741
  (() => {
2737
- const g = u === "dropdown" || u === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": Jt(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: hn(p.date), options: Xo(p.date, Ye, Te, o, a), style: m?.[y.Dropdown], value: a.getMonth(p.date) }) : d.createElement("span", { key: "month" }, I(p.date, a)), C = u === "dropdown" || u === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": on(a.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: mn(p.date), options: Zo(Ye, Te, o, a, !!t.reverseYears), style: m?.[y.Dropdown], value: a.getYear(p.date) }) : d.createElement("span", { key: "year" }, L(p.date, a));
2738
- return a.getMonthYearOrder() === "year-first" ? [C, g] : [g, C];
2742
+ const M = u === "dropdown" || u === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": Jt(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: hn(k.date), options: Xo(k.date, Ye, Te, o, i), style: m?.[y.Dropdown], value: i.getMonth(k.date) }) : d.createElement("span", { key: "month" }, I(k.date, i)), N = u === "dropdown" || u === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": on(i.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: mn(k.date), options: Zo(Ye, Te, o, i, !!t.reverseYears), style: m?.[y.Dropdown], value: i.getYear(k.date) }) : d.createElement("span", { key: "year" }, L(k.date, i));
2743
+ return i.getMonthYearOrder() === "year-first" ? [N, M] : [M, N];
2739
2744
  })(),
2740
2745
  d.createElement("span", { role: "status", "aria-live": "polite", style: {
2741
2746
  border: 0,
@@ -2748,37 +2753,37 @@ function ks(e) {
2748
2753
  width: "1px",
2749
2754
  whiteSpace: "nowrap",
2750
2755
  wordWrap: "normal"
2751
- } }, W(p.date, a.options, a))
2752
- ) : d.createElement(n.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(p.date, a.options, a))),
2753
- f === "around" && !t.hideNavigation && Y === h - 1 && d.createElement(
2756
+ } }, W(k.date, i.options, i))
2757
+ ) : d.createElement(n.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(k.date, i.options, i))),
2758
+ l === "around" && !t.hideNavigation && Y === h - 1 && d.createElement(
2754
2759
  n.NextMonthButton,
2755
2760
  { type: "button", className: c[y.NextMonthButton], tabIndex: Q ? void 0 : -1, "aria-disabled": Q ? void 0 : !0, "aria-label": en(Q), onClick: Fe, "data-animated-button": t.animate ? "true" : void 0 },
2756
2761
  d.createElement(n.Chevron, { disabled: Q ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2757
2762
  ),
2758
- Y === h - 1 && f === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": nt(), onPreviousClick: _e, onNextClick: Fe, previousMonth: z, nextMonth: Q }),
2763
+ Y === h - 1 && l === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": nt(), onPreviousClick: _e, onNextClick: Fe, previousMonth: z, nextMonth: Q }),
2759
2764
  d.createElement(
2760
2765
  n.MonthGrid,
2761
- { role: "grid", "aria-multiselectable": l === "multiple" || l === "range", "aria-label": Kt(p.date, a.options, a) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
2766
+ { role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Kt(k.date, i.options, i) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
2762
2767
  !t.hideWeekdays && d.createElement(
2763
2768
  n.Weekdays,
2764
2769
  { "data-animated-weekdays": t.animate ? "true" : void 0, className: c[y.Weekdays], style: m?.[y.Weekdays] },
2765
- b && d.createElement(n.WeekNumberHeader, { "aria-label": rn(a.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, V()),
2766
- sn.map((g) => d.createElement(n.Weekday, { "aria-label": tn(g, a.options, a), className: c[y.Weekday], key: String(g), style: m?.[y.Weekday], scope: "col" }, re(g, a.options, a)))
2770
+ b && d.createElement(n.WeekNumberHeader, { "aria-label": rn(i.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, V()),
2771
+ sn.map((M) => d.createElement(n.Weekday, { "aria-label": tn(M, i.options, i), className: c[y.Weekday], key: String(M), style: m?.[y.Weekday], scope: "col" }, re(M, i.options, i)))
2767
2772
  ),
2768
- d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, p.weeks.map((g) => d.createElement(
2773
+ d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, k.weeks.map((M) => d.createElement(
2769
2774
  n.Week,
2770
- { className: c[y.Week], key: g.weekNumber, style: m?.[y.Week], week: g },
2771
- b && d.createElement(n.WeekNumber, { week: g, style: m?.[y.WeekNumber], "aria-label": nn(g.weekNumber, {
2775
+ { className: c[y.Week], key: M.weekNumber, style: m?.[y.Week], week: M },
2776
+ b && d.createElement(n.WeekNumber, { week: M, style: m?.[y.WeekNumber], "aria-label": nn(M.weekNumber, {
2772
2777
  locale: s
2773
- }), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, F(g.weekNumber, a)),
2774
- g.days.map((C) => {
2775
- const { date: A } = C, S = xe(C);
2776
- if (S[_.focused] = !S.hidden && !!et?.isEqualTo(C), S[U.selected] = Pe?.(A) || S.selected, Ne(Oe)) {
2778
+ }), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, F(M.weekNumber, i)),
2779
+ M.days.map((N) => {
2780
+ const { date: A } = N, S = xe(N);
2781
+ if (S[_.focused] = !S.hidden && !!et?.isEqualTo(N), S[U.selected] = Pe?.(A) || S.selected, Ce(Oe)) {
2777
2782
  const { from: Be, to: Ie } = Oe;
2778
- S[U.range_start] = !!(Be && Ie && a.isSameDay(A, Be)), S[U.range_end] = !!(Be && Ie && a.isSameDay(A, Ie)), S[U.range_middle] = te(Oe, A, !0, a);
2783
+ S[U.range_start] = !!(Be && Ie && i.isSameDay(A, Be)), S[U.range_end] = !!(Be && Ie && i.isSameDay(A, Ie)), S[U.range_middle] = te(Oe, A, !0, i);
2779
2784
  }
2780
- const Mn = Uo(S, m, t.modifiersStyles), pn = Yo(S, c, t.modifiersClassNames), Dn = !rt && !S.hidden ? Zt(A, S, a.options, a) : void 0;
2781
- return d.createElement(n.Day, { key: `${C.isoDate}_${C.displayMonthId}`, day: C, modifiers: S, className: pn.join(" "), style: Mn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": Dn, "data-day": C.isoDate, "data-month": C.outside ? C.dateMonthId : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": C.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && rt ? d.createElement(n.DayButton, { className: c[y.DayButton], style: m?.[y.DayButton], type: "button", day: C, modifiers: S, disabled: !S.focused && S.disabled || void 0, "aria-disabled": S.focused && S.disabled || void 0, tabIndex: Ut(C) ? 0 : -1, "aria-label": Vt(A, S, a.options, a), onClick: an(C, S), onBlur: un(C, S), onFocus: cn(C, S), onKeyDown: fn(C, S), onMouseEnter: ln(C, S), onMouseLeave: dn(C, S) }, E(A, a.options, a)) : !S.hidden && E(C.date, a.options, a));
2785
+ const Mn = Uo(S, m, t.modifiersStyles), pn = Yo(S, c, t.modifiersClassNames), Dn = !rt && !S.hidden ? Zt(A, S, i.options, i) : void 0;
2786
+ return d.createElement(n.Day, { key: `${N.isoDate}_${N.displayMonthId}`, day: N, modifiers: S, className: pn.join(" "), style: Mn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": Dn, "data-day": N.isoDate, "data-month": N.outside ? N.dateMonthId : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": N.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && rt ? d.createElement(n.DayButton, { className: c[y.DayButton], style: m?.[y.DayButton], type: "button", day: N, modifiers: S, disabled: !S.focused && S.disabled || void 0, "aria-disabled": S.focused && S.disabled || void 0, tabIndex: Ut(N) ? 0 : -1, "aria-label": Vt(A, S, i.options, i), onClick: an(N, S), onBlur: un(N, S), onFocus: cn(N, S), onKeyDown: ln(N, S), onMouseEnter: fn(N, S), onMouseLeave: dn(N, S) }, E(A, i.options, i)) : !S.hidden && E(N.date, i.options, i));
2782
2787
  })
2783
2788
  )))
2784
2789
  )