@arcadeai/design-system 3.27.0 → 3.27.2

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 (79) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/icons/railway.js +10 -0
  3. package/dist/calendar-w1IATMME.js +3042 -0
  4. package/dist/components/index.js +444 -435
  5. package/dist/components/ui/atoms/accordion.js +4 -4
  6. package/dist/components/ui/atoms/alert-dialog.js +11 -11
  7. package/dist/components/ui/atoms/breadcrumb.js +3 -3
  8. package/dist/components/ui/atoms/calendar.d.ts +21 -0
  9. package/dist/components/ui/atoms/calendar.d.ts.map +1 -0
  10. package/dist/components/ui/atoms/calendar.js +10 -0
  11. package/dist/components/ui/atoms/command.js +1 -1
  12. package/dist/components/ui/atoms/dialog.js +1 -1
  13. package/dist/components/ui/atoms/dropdown-menu.js +5 -5
  14. package/dist/components/ui/atoms/form.js +3 -3
  15. package/dist/components/ui/atoms/hover-card.js +1 -1
  16. package/dist/components/ui/atoms/icons/index.d.ts +1 -0
  17. package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
  18. package/dist/components/ui/atoms/icons/index.js +80 -78
  19. package/dist/components/ui/atoms/icons/railway.d.ts +4 -0
  20. package/dist/components/ui/atoms/icons/railway.d.ts.map +1 -0
  21. package/dist/components/ui/atoms/icons/railway.js +31 -0
  22. package/dist/components/ui/atoms/index.d.ts +2 -0
  23. package/dist/components/ui/atoms/index.d.ts.map +1 -1
  24. package/dist/components/ui/atoms/index.js +429 -422
  25. package/dist/components/ui/atoms/popover.js +5 -5
  26. package/dist/components/ui/atoms/radio-group.js +1 -1
  27. package/dist/components/ui/atoms/resizable.js +3 -3
  28. package/dist/components/ui/atoms/select.js +1 -1
  29. package/dist/components/ui/atoms/sheet.js +4 -4
  30. package/dist/components/ui/atoms/tabs.js +1 -1
  31. package/dist/components/ui/atoms/tooltip.js +1 -1
  32. package/dist/components/ui/atoms/virtualized-grid.d.ts +23 -0
  33. package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -0
  34. package/dist/components/ui/atoms/virtualized-grid.js +682 -0
  35. package/dist/components/ui/index.js +444 -435
  36. package/dist/components/ui/molecules/date-time-picker.d.ts +12 -0
  37. package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -0
  38. package/dist/components/ui/molecules/date-time-picker.js +84 -0
  39. package/dist/components/ui/molecules/index.d.ts +1 -0
  40. package/dist/components/ui/molecules/index.d.ts.map +1 -1
  41. package/dist/components/ui/molecules/index.js +13 -11
  42. package/dist/components/ui/molecules/requirement-badges.js +7 -6
  43. package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
  44. package/dist/components/ui/molecules/toolkit-card.js +1 -1
  45. package/dist/components/ui/molecules/toolkit-selection-summary.js +6 -5
  46. package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +16 -15
  47. package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts.map +1 -1
  48. package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +11 -10
  49. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
  50. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts +3 -1
  51. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts.map +1 -1
  52. package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +110 -58
  53. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts +3 -1
  54. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts.map +1 -1
  55. package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +75 -70
  56. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts +8 -0
  57. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts.map +1 -0
  58. package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.js +11 -0
  59. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +6 -4
  60. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts.map +1 -1
  61. package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +195 -261
  62. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +5 -1
  63. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts.map +1 -1
  64. package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +154 -80
  65. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts.map +1 -1
  66. package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +89 -75
  67. package/dist/hooks/use-columns.d.ts +6 -0
  68. package/dist/hooks/use-columns.d.ts.map +1 -0
  69. package/dist/hooks/use-columns.js +20 -0
  70. package/dist/{index-C8tglJS9.js → index-By-GFSsC.js} +3 -3
  71. package/dist/{index-8kzT5-zz.js → index-DO05OIM5.js} +385 -380
  72. package/dist/main.js +478 -469
  73. package/dist/metadata/toolkit-icons.d.ts.map +1 -1
  74. package/dist/metadata/toolkit-icons.js +80 -78
  75. package/dist/metadata/toolkits.js +13 -13
  76. package/dist/metadata/utils.js +3 -3
  77. package/dist/{react-resizable-panels.browser-31wAXhAV.js → react-resizable-panels.browser-DYl0LXfw.js} +5 -5
  78. package/dist/{toolkit-card-CsV6xoOG.js → toolkit-card-D6Dqff6p.js} +5 -3
  79. package/package.json +43 -34
@@ -0,0 +1,3042 @@
1
+ import { jsx as ne } from "react/jsx-runtime";
2
+ import { buttonVariants as ct, Button as Cn } from "./components/ui/atoms/button.js";
3
+ import { c as Y } from "./utils-6KgZuQUR.js";
4
+ import { ChevronLeftIcon as Nn, ChevronRightIcon as xn, ChevronUpIcon as Yn, ChevronDownIcon as Tn } from "lucide-react";
5
+ import f, { createContext as _n, useContext as En, useCallback as $, useRef as we, useLayoutEffect as Pn, useState as Re, useEffect as Dt, useMemo as Ne } from "react";
6
+ function Fn(e, t, n = "long") {
7
+ return new Intl.DateTimeFormat("en-US", {
8
+ // Enforces engine to render the time. Without the option JavaScriptCore omits it.
9
+ hour: "numeric",
10
+ timeZone: e,
11
+ timeZoneName: n
12
+ }).format(t).split(/\s/g).slice(2).join(" ");
13
+ }
14
+ const Bn = {}, be = {};
15
+ function ce(e, t) {
16
+ try {
17
+ const r = (Bn[e] ||= new Intl.DateTimeFormat("en-US", {
18
+ timeZone: e,
19
+ timeZoneName: "longOffset"
20
+ }).format)(t).split("GMT")[1];
21
+ return r in be ? be[r] : ut(r, r.split(":"));
22
+ } catch {
23
+ if (e in be) return be[e];
24
+ const n = e?.match(In);
25
+ return n ? ut(e, n.slice(1)) : NaN;
26
+ }
27
+ }
28
+ const In = /([+-]\d\d):?(\d\d)?/;
29
+ function ut(e, t) {
30
+ const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
31
+ return be[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
32
+ }
33
+ class J extends Date {
34
+ //#region static
35
+ constructor(...t) {
36
+ super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ce(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), vt(this), Qe(this)) : this.setTime(Date.now());
37
+ }
38
+ static tz(t, ...n) {
39
+ return n.length ? new J(...n, t) : new J(Date.now(), t);
40
+ }
41
+ //#endregion
42
+ //#region time zone
43
+ withTimeZone(t) {
44
+ return new J(+this, t);
45
+ }
46
+ getTimezoneOffset() {
47
+ const t = -ce(this.timeZone, this);
48
+ return t > 0 ? Math.floor(t) : Math.ceil(t);
49
+ }
50
+ //#endregion
51
+ //#region time
52
+ setTime(t) {
53
+ return Date.prototype.setTime.apply(this, arguments), Qe(this), +this;
54
+ }
55
+ //#endregion
56
+ //#region date-fns integration
57
+ [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
58
+ return new J(+new Date(t), this.timeZone);
59
+ }
60
+ //#endregion
61
+ }
62
+ const dt = /^(get|set)(?!UTC)/;
63
+ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
64
+ if (!dt.test(e)) return;
65
+ const t = e.replace(dt, "$1UTC");
66
+ J.prototype[t] && (e.startsWith("get") ? J.prototype[e] = function() {
67
+ return this.internal[t]();
68
+ } : (J.prototype[e] = function() {
69
+ return Date.prototype[t].apply(this.internal, arguments), Hn(this), +this;
70
+ }, J.prototype[t] = function() {
71
+ return Date.prototype[t].apply(this, arguments), Qe(this), +this;
72
+ }));
73
+ });
74
+ function Qe(e) {
75
+ e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ce(e.timeZone, e) * 60));
76
+ }
77
+ function Hn(e) {
78
+ Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), vt(e);
79
+ }
80
+ function vt(e) {
81
+ const t = ce(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), r = /* @__PURE__ */ new Date(+e);
82
+ r.setUTCHours(r.getUTCHours() - 1);
83
+ const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+r)).getTimezoneOffset(), i = o - s, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
84
+ i && a && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + i);
85
+ const c = o - n;
86
+ c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
87
+ const u = /* @__PURE__ */ new Date(+e);
88
+ u.setUTCSeconds(0);
89
+ const l = o > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, d = Math.round(-(ce(e.timeZone, e) * 60)) % 60;
90
+ (d || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + d), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + d + l));
91
+ const h = ce(e.timeZone, e), p = h > 0 ? Math.floor(h) : Math.ceil(h), C = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - p, k = p !== n, O = C - c;
92
+ if (k && O) {
93
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
94
+ const T = ce(e.timeZone, e), w = T > 0 ? Math.floor(T) : Math.ceil(T), D = p - w;
95
+ D && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + D), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + D));
96
+ }
97
+ }
98
+ class A extends J {
99
+ //#region static
100
+ static tz(t, ...n) {
101
+ return n.length ? new A(...n, t) : new A(Date.now(), t);
102
+ }
103
+ //#endregion
104
+ //#region representation
105
+ toISOString() {
106
+ const [t, n, r] = this.tzComponents(), o = `${t}${n}:${r}`;
107
+ return this.internal.toISOString().slice(0, -1) + o;
108
+ }
109
+ toString() {
110
+ return `${this.toDateString()} ${this.toTimeString()}`;
111
+ }
112
+ toDateString() {
113
+ const [t, n, r, o] = this.internal.toUTCString().split(" ");
114
+ return `${t?.slice(0, -1)} ${r} ${n} ${o}`;
115
+ }
116
+ toTimeString() {
117
+ const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
118
+ return `${t} GMT${n}${r}${o} (${Fn(this.timeZone, this)})`;
119
+ }
120
+ toLocaleString(t, n) {
121
+ return Date.prototype.toLocaleString.call(this, t, {
122
+ ...n,
123
+ timeZone: n?.timeZone || this.timeZone
124
+ });
125
+ }
126
+ toLocaleDateString(t, n) {
127
+ return Date.prototype.toLocaleDateString.call(this, t, {
128
+ ...n,
129
+ timeZone: n?.timeZone || this.timeZone
130
+ });
131
+ }
132
+ toLocaleTimeString(t, n) {
133
+ return Date.prototype.toLocaleTimeString.call(this, t, {
134
+ ...n,
135
+ timeZone: n?.timeZone || this.timeZone
136
+ });
137
+ }
138
+ //#endregion
139
+ //#region private
140
+ tzComponents() {
141
+ const t = this.getTimezoneOffset(), n = t > 0 ? "-" : "+", r = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), o = String(Math.abs(t) % 60).padStart(2, "0");
142
+ return [n, r, o];
143
+ }
144
+ //#endregion
145
+ withTimeZone(t) {
146
+ return new A(+this, t);
147
+ }
148
+ //#region date-fns integration
149
+ [/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
150
+ return new A(+new Date(t), this.timeZone);
151
+ }
152
+ //#endregion
153
+ }
154
+ const Ot = 6048e5, An = 864e5, lt = /* @__PURE__ */ Symbol.for("constructDateFrom");
155
+ function I(e, t) {
156
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && lt in e ? e[lt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
157
+ }
158
+ function E(e, t) {
159
+ return I(t || e, e);
160
+ }
161
+ function Wt(e, t, n) {
162
+ const r = E(e, n?.in);
163
+ return isNaN(t) ? I(e, NaN) : (t && r.setDate(r.getDate() + t), r);
164
+ }
165
+ function St(e, t, n) {
166
+ const r = E(e, n?.in);
167
+ if (isNaN(t)) return I(e, NaN);
168
+ if (!t)
169
+ return r;
170
+ const o = r.getDate(), s = I(e, r.getTime());
171
+ s.setMonth(r.getMonth() + t + 1, 0);
172
+ const i = s.getDate();
173
+ return o >= i ? s : (r.setFullYear(
174
+ s.getFullYear(),
175
+ s.getMonth(),
176
+ o
177
+ ), r);
178
+ }
179
+ let qn = {};
180
+ function De() {
181
+ return qn;
182
+ }
183
+ function he(e, t) {
184
+ const n = De(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = E(e, t?.in), s = o.getDay(), i = (s < r ? 7 : 0) + s - r;
185
+ return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
186
+ }
187
+ function Me(e, t) {
188
+ return he(e, { ...t, weekStartsOn: 1 });
189
+ }
190
+ function Ct(e, t) {
191
+ const n = E(e, t?.in), r = n.getFullYear(), o = I(n, 0);
192
+ o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
193
+ const s = Me(o), i = I(n, 0);
194
+ i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
195
+ const a = Me(i);
196
+ return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= a.getTime() ? r : r - 1;
197
+ }
198
+ function ft(e) {
199
+ const t = E(e), n = new Date(
200
+ Date.UTC(
201
+ t.getFullYear(),
202
+ t.getMonth(),
203
+ t.getDate(),
204
+ t.getHours(),
205
+ t.getMinutes(),
206
+ t.getSeconds(),
207
+ t.getMilliseconds()
208
+ )
209
+ );
210
+ return n.setUTCFullYear(t.getFullYear()), +e - +n;
211
+ }
212
+ function me(e, ...t) {
213
+ const n = I.bind(
214
+ null,
215
+ t.find((r) => typeof r == "object")
216
+ );
217
+ return t.map(n);
218
+ }
219
+ function ke(e, t) {
220
+ const n = E(e, t?.in);
221
+ return n.setHours(0, 0, 0, 0), n;
222
+ }
223
+ function Ue(e, t, n) {
224
+ const [r, o] = me(
225
+ n?.in,
226
+ e,
227
+ t
228
+ ), s = ke(r), i = ke(o), a = +s - ft(s), c = +i - ft(i);
229
+ return Math.round((a - c) / An);
230
+ }
231
+ function zn(e, t) {
232
+ const n = Ct(e, t), r = I(e, 0);
233
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Me(r);
234
+ }
235
+ function jn(e, t, n) {
236
+ return Wt(e, t * 7, n);
237
+ }
238
+ function Gn(e, t, n) {
239
+ return St(e, t * 12, n);
240
+ }
241
+ function $n(e, t) {
242
+ let n, r = t?.in;
243
+ return e.forEach((o) => {
244
+ !r && typeof o == "object" && (r = I.bind(null, o));
245
+ const s = E(o, r);
246
+ (!n || n < s || isNaN(+s)) && (n = s);
247
+ }), I(r, n || NaN);
248
+ }
249
+ function Rn(e, t) {
250
+ let n, r = t?.in;
251
+ return e.forEach((o) => {
252
+ !r && typeof o == "object" && (r = I.bind(null, o));
253
+ const s = E(o, r);
254
+ (!n || n > s || isNaN(+s)) && (n = s);
255
+ }), I(r, n || NaN);
256
+ }
257
+ function Qn(e, t, n) {
258
+ const [r, o] = me(
259
+ n?.in,
260
+ e,
261
+ t
262
+ );
263
+ return +ke(r) == +ke(o);
264
+ }
265
+ function Nt(e) {
266
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
267
+ }
268
+ function Un(e) {
269
+ return !(!Nt(e) && typeof e != "number" || isNaN(+E(e)));
270
+ }
271
+ function xt(e, t, n) {
272
+ const [r, o] = me(
273
+ n?.in,
274
+ e,
275
+ t
276
+ ), s = r.getFullYear() - o.getFullYear(), i = r.getMonth() - o.getMonth();
277
+ return s * 12 + i;
278
+ }
279
+ function Xn(e, t) {
280
+ const n = E(e, t?.in), r = n.getMonth();
281
+ return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
282
+ }
283
+ function Yt(e, t) {
284
+ const [n, r] = me(e, t.start, t.end);
285
+ return { start: n, end: r };
286
+ }
287
+ function Vn(e, t) {
288
+ const { start: n, end: r } = Yt(t?.in, e);
289
+ let o = +n > +r;
290
+ const s = o ? +n : +r, i = o ? r : n;
291
+ i.setHours(0, 0, 0, 0), i.setDate(1);
292
+ let a = 1;
293
+ const c = [];
294
+ for (; +i <= s; )
295
+ c.push(I(n, i)), i.setMonth(i.getMonth() + a);
296
+ return o ? c.reverse() : c;
297
+ }
298
+ function Zn(e, t) {
299
+ const n = E(e, t?.in);
300
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
301
+ }
302
+ function Kn(e, t) {
303
+ const n = E(e, t?.in), r = n.getFullYear();
304
+ return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
305
+ }
306
+ function Tt(e, t) {
307
+ const n = E(e, t?.in);
308
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
309
+ }
310
+ function Jn(e, t) {
311
+ const { start: n, end: r } = Yt(t?.in, e);
312
+ let o = +n > +r;
313
+ const s = o ? +n : +r, i = o ? r : n;
314
+ i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
315
+ let a = 1;
316
+ const c = [];
317
+ for (; +i <= s; )
318
+ c.push(I(n, i)), i.setFullYear(i.getFullYear() + a);
319
+ return o ? c.reverse() : c;
320
+ }
321
+ function _t(e, t) {
322
+ const n = De(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = E(e, t?.in), s = o.getDay(), i = (s < r ? -7 : 0) + 6 - (s - r);
323
+ return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
324
+ }
325
+ function Ln(e, t) {
326
+ return _t(e, { ...t, weekStartsOn: 1 });
327
+ }
328
+ const er = {
329
+ lessThanXSeconds: {
330
+ one: "less than a second",
331
+ other: "less than {{count}} seconds"
332
+ },
333
+ xSeconds: {
334
+ one: "1 second",
335
+ other: "{{count}} seconds"
336
+ },
337
+ halfAMinute: "half a minute",
338
+ lessThanXMinutes: {
339
+ one: "less than a minute",
340
+ other: "less than {{count}} minutes"
341
+ },
342
+ xMinutes: {
343
+ one: "1 minute",
344
+ other: "{{count}} minutes"
345
+ },
346
+ aboutXHours: {
347
+ one: "about 1 hour",
348
+ other: "about {{count}} hours"
349
+ },
350
+ xHours: {
351
+ one: "1 hour",
352
+ other: "{{count}} hours"
353
+ },
354
+ xDays: {
355
+ one: "1 day",
356
+ other: "{{count}} days"
357
+ },
358
+ aboutXWeeks: {
359
+ one: "about 1 week",
360
+ other: "about {{count}} weeks"
361
+ },
362
+ xWeeks: {
363
+ one: "1 week",
364
+ other: "{{count}} weeks"
365
+ },
366
+ aboutXMonths: {
367
+ one: "about 1 month",
368
+ other: "about {{count}} months"
369
+ },
370
+ xMonths: {
371
+ one: "1 month",
372
+ other: "{{count}} months"
373
+ },
374
+ aboutXYears: {
375
+ one: "about 1 year",
376
+ other: "about {{count}} years"
377
+ },
378
+ xYears: {
379
+ one: "1 year",
380
+ other: "{{count}} years"
381
+ },
382
+ overXYears: {
383
+ one: "over 1 year",
384
+ other: "over {{count}} years"
385
+ },
386
+ almostXYears: {
387
+ one: "almost 1 year",
388
+ other: "almost {{count}} years"
389
+ }
390
+ }, tr = (e, t, n) => {
391
+ let r;
392
+ const o = er[e];
393
+ return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
394
+ };
395
+ function qe(e) {
396
+ return (t = {}) => {
397
+ const n = t.width ? String(t.width) : e.defaultWidth;
398
+ return e.formats[n] || e.formats[e.defaultWidth];
399
+ };
400
+ }
401
+ const nr = {
402
+ full: "EEEE, MMMM do, y",
403
+ long: "MMMM do, y",
404
+ medium: "MMM d, y",
405
+ short: "MM/dd/yyyy"
406
+ }, rr = {
407
+ full: "h:mm:ss a zzzz",
408
+ long: "h:mm:ss a z",
409
+ medium: "h:mm:ss a",
410
+ short: "h:mm a"
411
+ }, or = {
412
+ full: "{{date}} 'at' {{time}}",
413
+ long: "{{date}} 'at' {{time}}",
414
+ medium: "{{date}}, {{time}}",
415
+ short: "{{date}}, {{time}}"
416
+ }, ar = {
417
+ date: qe({
418
+ formats: nr,
419
+ defaultWidth: "full"
420
+ }),
421
+ time: qe({
422
+ formats: rr,
423
+ defaultWidth: "full"
424
+ }),
425
+ dateTime: qe({
426
+ formats: or,
427
+ defaultWidth: "full"
428
+ })
429
+ }, sr = {
430
+ lastWeek: "'last' eeee 'at' p",
431
+ yesterday: "'yesterday at' p",
432
+ today: "'today at' p",
433
+ tomorrow: "'tomorrow at' p",
434
+ nextWeek: "eeee 'at' p",
435
+ other: "P"
436
+ }, ir = (e, t, n, r) => sr[e];
437
+ function ye(e) {
438
+ return (t, n) => {
439
+ const r = n?.context ? String(n.context) : "standalone";
440
+ let o;
441
+ if (r === "formatting" && e.formattingValues) {
442
+ const i = e.defaultFormattingWidth || e.defaultWidth, a = n?.width ? String(n.width) : i;
443
+ o = e.formattingValues[a] || e.formattingValues[i];
444
+ } else {
445
+ const i = e.defaultWidth, a = n?.width ? String(n.width) : e.defaultWidth;
446
+ o = e.values[a] || e.values[i];
447
+ }
448
+ const s = e.argumentCallback ? e.argumentCallback(t) : t;
449
+ return o[s];
450
+ };
451
+ }
452
+ const cr = {
453
+ narrow: ["B", "A"],
454
+ abbreviated: ["BC", "AD"],
455
+ wide: ["Before Christ", "Anno Domini"]
456
+ }, ur = {
457
+ narrow: ["1", "2", "3", "4"],
458
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
459
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
460
+ }, dr = {
461
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
462
+ abbreviated: [
463
+ "Jan",
464
+ "Feb",
465
+ "Mar",
466
+ "Apr",
467
+ "May",
468
+ "Jun",
469
+ "Jul",
470
+ "Aug",
471
+ "Sep",
472
+ "Oct",
473
+ "Nov",
474
+ "Dec"
475
+ ],
476
+ wide: [
477
+ "January",
478
+ "February",
479
+ "March",
480
+ "April",
481
+ "May",
482
+ "June",
483
+ "July",
484
+ "August",
485
+ "September",
486
+ "October",
487
+ "November",
488
+ "December"
489
+ ]
490
+ }, lr = {
491
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
492
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
493
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
494
+ wide: [
495
+ "Sunday",
496
+ "Monday",
497
+ "Tuesday",
498
+ "Wednesday",
499
+ "Thursday",
500
+ "Friday",
501
+ "Saturday"
502
+ ]
503
+ }, fr = {
504
+ narrow: {
505
+ am: "a",
506
+ pm: "p",
507
+ midnight: "mi",
508
+ noon: "n",
509
+ morning: "morning",
510
+ afternoon: "afternoon",
511
+ evening: "evening",
512
+ night: "night"
513
+ },
514
+ abbreviated: {
515
+ am: "AM",
516
+ pm: "PM",
517
+ midnight: "midnight",
518
+ noon: "noon",
519
+ morning: "morning",
520
+ afternoon: "afternoon",
521
+ evening: "evening",
522
+ night: "night"
523
+ },
524
+ wide: {
525
+ am: "a.m.",
526
+ pm: "p.m.",
527
+ midnight: "midnight",
528
+ noon: "noon",
529
+ morning: "morning",
530
+ afternoon: "afternoon",
531
+ evening: "evening",
532
+ night: "night"
533
+ }
534
+ }, hr = {
535
+ narrow: {
536
+ am: "a",
537
+ pm: "p",
538
+ midnight: "mi",
539
+ noon: "n",
540
+ morning: "in the morning",
541
+ afternoon: "in the afternoon",
542
+ evening: "in the evening",
543
+ night: "at night"
544
+ },
545
+ abbreviated: {
546
+ am: "AM",
547
+ pm: "PM",
548
+ midnight: "midnight",
549
+ noon: "noon",
550
+ morning: "in the morning",
551
+ afternoon: "in the afternoon",
552
+ evening: "in the evening",
553
+ night: "at night"
554
+ },
555
+ wide: {
556
+ am: "a.m.",
557
+ pm: "p.m.",
558
+ midnight: "midnight",
559
+ noon: "noon",
560
+ morning: "in the morning",
561
+ afternoon: "in the afternoon",
562
+ evening: "in the evening",
563
+ night: "at night"
564
+ }
565
+ }, mr = (e, t) => {
566
+ const n = Number(e), r = n % 100;
567
+ if (r > 20 || r < 10)
568
+ switch (r % 10) {
569
+ case 1:
570
+ return n + "st";
571
+ case 2:
572
+ return n + "nd";
573
+ case 3:
574
+ return n + "rd";
575
+ }
576
+ return n + "th";
577
+ }, yr = {
578
+ ordinalNumber: mr,
579
+ era: ye({
580
+ values: cr,
581
+ defaultWidth: "wide"
582
+ }),
583
+ quarter: ye({
584
+ values: ur,
585
+ defaultWidth: "wide",
586
+ argumentCallback: (e) => e - 1
587
+ }),
588
+ month: ye({
589
+ values: dr,
590
+ defaultWidth: "wide"
591
+ }),
592
+ day: ye({
593
+ values: lr,
594
+ defaultWidth: "wide"
595
+ }),
596
+ dayPeriod: ye({
597
+ values: fr,
598
+ defaultWidth: "wide",
599
+ formattingValues: hr,
600
+ defaultFormattingWidth: "wide"
601
+ })
602
+ };
603
+ function ge(e) {
604
+ return (t, n = {}) => {
605
+ const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(o);
606
+ if (!s)
607
+ return null;
608
+ const i = s[0], a = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(a) ? br(a, (d) => d.test(i)) : (
609
+ // [TODO] -- I challenge you to fix the type
610
+ gr(a, (d) => d.test(i))
611
+ );
612
+ let u;
613
+ u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
614
+ // [TODO] -- I challenge you to fix the type
615
+ n.valueCallback(u)
616
+ ) : u;
617
+ const l = t.slice(i.length);
618
+ return { value: u, rest: l };
619
+ };
620
+ }
621
+ function gr(e, t) {
622
+ for (const n in e)
623
+ if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
624
+ return n;
625
+ }
626
+ function br(e, t) {
627
+ for (let n = 0; n < e.length; n++)
628
+ if (t(e[n]))
629
+ return n;
630
+ }
631
+ function pr(e) {
632
+ return (t, n = {}) => {
633
+ const r = t.match(e.matchPattern);
634
+ if (!r) return null;
635
+ const o = r[0], s = t.match(e.parsePattern);
636
+ if (!s) return null;
637
+ let i = e.valueCallback ? e.valueCallback(s[0]) : s[0];
638
+ i = n.valueCallback ? n.valueCallback(i) : i;
639
+ const a = t.slice(o.length);
640
+ return { value: i, rest: a };
641
+ };
642
+ }
643
+ const wr = /^(\d+)(th|st|nd|rd)?/i, Mr = /\d+/i, kr = {
644
+ narrow: /^(b|a)/i,
645
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
646
+ wide: /^(before christ|before common era|anno domini|common era)/i
647
+ }, Dr = {
648
+ any: [/^b/i, /^(a|c)/i]
649
+ }, vr = {
650
+ narrow: /^[1234]/i,
651
+ abbreviated: /^q[1234]/i,
652
+ wide: /^[1234](th|st|nd|rd)? quarter/i
653
+ }, Or = {
654
+ any: [/1/i, /2/i, /3/i, /4/i]
655
+ }, Wr = {
656
+ narrow: /^[jfmasond]/i,
657
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
658
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
659
+ }, Sr = {
660
+ narrow: [
661
+ /^j/i,
662
+ /^f/i,
663
+ /^m/i,
664
+ /^a/i,
665
+ /^m/i,
666
+ /^j/i,
667
+ /^j/i,
668
+ /^a/i,
669
+ /^s/i,
670
+ /^o/i,
671
+ /^n/i,
672
+ /^d/i
673
+ ],
674
+ any: [
675
+ /^ja/i,
676
+ /^f/i,
677
+ /^mar/i,
678
+ /^ap/i,
679
+ /^may/i,
680
+ /^jun/i,
681
+ /^jul/i,
682
+ /^au/i,
683
+ /^s/i,
684
+ /^o/i,
685
+ /^n/i,
686
+ /^d/i
687
+ ]
688
+ }, Cr = {
689
+ narrow: /^[smtwf]/i,
690
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
691
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
692
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
693
+ }, Nr = {
694
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
695
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
696
+ }, xr = {
697
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
698
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
699
+ }, Yr = {
700
+ any: {
701
+ am: /^a/i,
702
+ pm: /^p/i,
703
+ midnight: /^mi/i,
704
+ noon: /^no/i,
705
+ morning: /morning/i,
706
+ afternoon: /afternoon/i,
707
+ evening: /evening/i,
708
+ night: /night/i
709
+ }
710
+ }, Tr = {
711
+ ordinalNumber: pr({
712
+ matchPattern: wr,
713
+ parsePattern: Mr,
714
+ valueCallback: (e) => parseInt(e, 10)
715
+ }),
716
+ era: ge({
717
+ matchPatterns: kr,
718
+ defaultMatchWidth: "wide",
719
+ parsePatterns: Dr,
720
+ defaultParseWidth: "any"
721
+ }),
722
+ quarter: ge({
723
+ matchPatterns: vr,
724
+ defaultMatchWidth: "wide",
725
+ parsePatterns: Or,
726
+ defaultParseWidth: "any",
727
+ valueCallback: (e) => e + 1
728
+ }),
729
+ month: ge({
730
+ matchPatterns: Wr,
731
+ defaultMatchWidth: "wide",
732
+ parsePatterns: Sr,
733
+ defaultParseWidth: "any"
734
+ }),
735
+ day: ge({
736
+ matchPatterns: Cr,
737
+ defaultMatchWidth: "wide",
738
+ parsePatterns: Nr,
739
+ defaultParseWidth: "any"
740
+ }),
741
+ dayPeriod: ge({
742
+ matchPatterns: xr,
743
+ defaultMatchWidth: "any",
744
+ parsePatterns: Yr,
745
+ defaultParseWidth: "any"
746
+ })
747
+ }, fe = {
748
+ code: "en-US",
749
+ formatDistance: tr,
750
+ formatLong: ar,
751
+ formatRelative: ir,
752
+ localize: yr,
753
+ match: Tr,
754
+ options: {
755
+ weekStartsOn: 0,
756
+ firstWeekContainsDate: 1
757
+ }
758
+ };
759
+ function _r(e, t) {
760
+ const n = E(e, t?.in);
761
+ return Ue(n, Tt(n)) + 1;
762
+ }
763
+ function Xe(e, t) {
764
+ const n = E(e, t?.in), r = +Me(n) - +zn(n);
765
+ return Math.round(r / Ot) + 1;
766
+ }
767
+ function Et(e, t) {
768
+ const n = E(e, t?.in), r = n.getFullYear(), o = De(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = I(t?.in || e, 0);
769
+ i.setFullYear(r + 1, 0, s), i.setHours(0, 0, 0, 0);
770
+ const a = he(i, t), c = I(t?.in || e, 0);
771
+ c.setFullYear(r, 0, s), c.setHours(0, 0, 0, 0);
772
+ const u = he(c, t);
773
+ return +n >= +a ? r + 1 : +n >= +u ? r : r - 1;
774
+ }
775
+ function Er(e, t) {
776
+ const n = De(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = Et(e, t), s = I(t?.in || e, 0);
777
+ return s.setFullYear(o, 0, r), s.setHours(0, 0, 0, 0), he(s, t);
778
+ }
779
+ function Ve(e, t) {
780
+ const n = E(e, t?.in), r = +he(n, t) - +Er(n, t);
781
+ return Math.round(r / Ot) + 1;
782
+ }
783
+ function _(e, t) {
784
+ const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
785
+ return n + r;
786
+ }
787
+ const se = {
788
+ // Year
789
+ y(e, t) {
790
+ const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
791
+ return _(t === "yy" ? r % 100 : r, t.length);
792
+ },
793
+ // Month
794
+ M(e, t) {
795
+ const n = e.getMonth();
796
+ return t === "M" ? String(n + 1) : _(n + 1, 2);
797
+ },
798
+ // Day of the month
799
+ d(e, t) {
800
+ return _(e.getDate(), t.length);
801
+ },
802
+ // AM or PM
803
+ a(e, t) {
804
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
805
+ switch (t) {
806
+ case "a":
807
+ case "aa":
808
+ return n.toUpperCase();
809
+ case "aaa":
810
+ return n;
811
+ case "aaaaa":
812
+ return n[0];
813
+ default:
814
+ return n === "am" ? "a.m." : "p.m.";
815
+ }
816
+ },
817
+ // Hour [1-12]
818
+ h(e, t) {
819
+ return _(e.getHours() % 12 || 12, t.length);
820
+ },
821
+ // Hour [0-23]
822
+ H(e, t) {
823
+ return _(e.getHours(), t.length);
824
+ },
825
+ // Minute
826
+ m(e, t) {
827
+ return _(e.getMinutes(), t.length);
828
+ },
829
+ // Second
830
+ s(e, t) {
831
+ return _(e.getSeconds(), t.length);
832
+ },
833
+ // Fraction of second
834
+ S(e, t) {
835
+ const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
836
+ r * Math.pow(10, n - 3)
837
+ );
838
+ return _(o, t.length);
839
+ }
840
+ }, de = {
841
+ midnight: "midnight",
842
+ noon: "noon",
843
+ morning: "morning",
844
+ afternoon: "afternoon",
845
+ evening: "evening",
846
+ night: "night"
847
+ }, ht = {
848
+ // Era
849
+ G: function(e, t, n) {
850
+ const r = e.getFullYear() > 0 ? 1 : 0;
851
+ switch (t) {
852
+ // AD, BC
853
+ case "G":
854
+ case "GG":
855
+ case "GGG":
856
+ return n.era(r, { width: "abbreviated" });
857
+ // A, B
858
+ case "GGGGG":
859
+ return n.era(r, { width: "narrow" });
860
+ default:
861
+ return n.era(r, { width: "wide" });
862
+ }
863
+ },
864
+ // Year
865
+ y: function(e, t, n) {
866
+ if (t === "yo") {
867
+ const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
868
+ return n.ordinalNumber(o, { unit: "year" });
869
+ }
870
+ return se.y(e, t);
871
+ },
872
+ // Local week-numbering year
873
+ Y: function(e, t, n, r) {
874
+ const o = Et(e, r), s = o > 0 ? o : 1 - o;
875
+ if (t === "YY") {
876
+ const i = s % 100;
877
+ return _(i, 2);
878
+ }
879
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : _(s, t.length);
880
+ },
881
+ // ISO week-numbering year
882
+ R: function(e, t) {
883
+ const n = Ct(e);
884
+ return _(n, t.length);
885
+ },
886
+ // Extended year. This is a single number designating the year of this calendar system.
887
+ // The main difference between `y` and `u` localizers are B.C. years:
888
+ // | Year | `y` | `u` |
889
+ // |------|-----|-----|
890
+ // | AC 1 | 1 | 1 |
891
+ // | BC 1 | 1 | 0 |
892
+ // | BC 2 | 2 | -1 |
893
+ // Also `yy` always returns the last two digits of a year,
894
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
895
+ u: function(e, t) {
896
+ const n = e.getFullYear();
897
+ return _(n, t.length);
898
+ },
899
+ // Quarter
900
+ Q: function(e, t, n) {
901
+ const r = Math.ceil((e.getMonth() + 1) / 3);
902
+ switch (t) {
903
+ // 1, 2, 3, 4
904
+ case "Q":
905
+ return String(r);
906
+ // 01, 02, 03, 04
907
+ case "QQ":
908
+ return _(r, 2);
909
+ // 1st, 2nd, 3rd, 4th
910
+ case "Qo":
911
+ return n.ordinalNumber(r, { unit: "quarter" });
912
+ // Q1, Q2, Q3, Q4
913
+ case "QQQ":
914
+ return n.quarter(r, {
915
+ width: "abbreviated",
916
+ context: "formatting"
917
+ });
918
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
919
+ case "QQQQQ":
920
+ return n.quarter(r, {
921
+ width: "narrow",
922
+ context: "formatting"
923
+ });
924
+ default:
925
+ return n.quarter(r, {
926
+ width: "wide",
927
+ context: "formatting"
928
+ });
929
+ }
930
+ },
931
+ // Stand-alone quarter
932
+ q: function(e, t, n) {
933
+ const r = Math.ceil((e.getMonth() + 1) / 3);
934
+ switch (t) {
935
+ // 1, 2, 3, 4
936
+ case "q":
937
+ return String(r);
938
+ // 01, 02, 03, 04
939
+ case "qq":
940
+ return _(r, 2);
941
+ // 1st, 2nd, 3rd, 4th
942
+ case "qo":
943
+ return n.ordinalNumber(r, { unit: "quarter" });
944
+ // Q1, Q2, Q3, Q4
945
+ case "qqq":
946
+ return n.quarter(r, {
947
+ width: "abbreviated",
948
+ context: "standalone"
949
+ });
950
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
951
+ case "qqqqq":
952
+ return n.quarter(r, {
953
+ width: "narrow",
954
+ context: "standalone"
955
+ });
956
+ default:
957
+ return n.quarter(r, {
958
+ width: "wide",
959
+ context: "standalone"
960
+ });
961
+ }
962
+ },
963
+ // Month
964
+ M: function(e, t, n) {
965
+ const r = e.getMonth();
966
+ switch (t) {
967
+ case "M":
968
+ case "MM":
969
+ return se.M(e, t);
970
+ // 1st, 2nd, ..., 12th
971
+ case "Mo":
972
+ return n.ordinalNumber(r + 1, { unit: "month" });
973
+ // Jan, Feb, ..., Dec
974
+ case "MMM":
975
+ return n.month(r, {
976
+ width: "abbreviated",
977
+ context: "formatting"
978
+ });
979
+ // J, F, ..., D
980
+ case "MMMMM":
981
+ return n.month(r, {
982
+ width: "narrow",
983
+ context: "formatting"
984
+ });
985
+ default:
986
+ return n.month(r, { width: "wide", context: "formatting" });
987
+ }
988
+ },
989
+ // Stand-alone month
990
+ L: function(e, t, n) {
991
+ const r = e.getMonth();
992
+ switch (t) {
993
+ // 1, 2, ..., 12
994
+ case "L":
995
+ return String(r + 1);
996
+ // 01, 02, ..., 12
997
+ case "LL":
998
+ return _(r + 1, 2);
999
+ // 1st, 2nd, ..., 12th
1000
+ case "Lo":
1001
+ return n.ordinalNumber(r + 1, { unit: "month" });
1002
+ // Jan, Feb, ..., Dec
1003
+ case "LLL":
1004
+ return n.month(r, {
1005
+ width: "abbreviated",
1006
+ context: "standalone"
1007
+ });
1008
+ // J, F, ..., D
1009
+ case "LLLLL":
1010
+ return n.month(r, {
1011
+ width: "narrow",
1012
+ context: "standalone"
1013
+ });
1014
+ default:
1015
+ return n.month(r, { width: "wide", context: "standalone" });
1016
+ }
1017
+ },
1018
+ // Local week of year
1019
+ w: function(e, t, n, r) {
1020
+ const o = Ve(e, r);
1021
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : _(o, t.length);
1022
+ },
1023
+ // ISO week of year
1024
+ I: function(e, t, n) {
1025
+ const r = Xe(e);
1026
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : _(r, t.length);
1027
+ },
1028
+ // Day of the month
1029
+ d: function(e, t, n) {
1030
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : se.d(e, t);
1031
+ },
1032
+ // Day of year
1033
+ D: function(e, t, n) {
1034
+ const r = _r(e);
1035
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : _(r, t.length);
1036
+ },
1037
+ // Day of week
1038
+ E: function(e, t, n) {
1039
+ const r = e.getDay();
1040
+ switch (t) {
1041
+ // Tue
1042
+ case "E":
1043
+ case "EE":
1044
+ case "EEE":
1045
+ return n.day(r, {
1046
+ width: "abbreviated",
1047
+ context: "formatting"
1048
+ });
1049
+ // T
1050
+ case "EEEEE":
1051
+ return n.day(r, {
1052
+ width: "narrow",
1053
+ context: "formatting"
1054
+ });
1055
+ // Tu
1056
+ case "EEEEEE":
1057
+ return n.day(r, {
1058
+ width: "short",
1059
+ context: "formatting"
1060
+ });
1061
+ default:
1062
+ return n.day(r, {
1063
+ width: "wide",
1064
+ context: "formatting"
1065
+ });
1066
+ }
1067
+ },
1068
+ // Local day of week
1069
+ e: function(e, t, n, r) {
1070
+ const o = e.getDay(), s = (o - r.weekStartsOn + 8) % 7 || 7;
1071
+ switch (t) {
1072
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
1073
+ case "e":
1074
+ return String(s);
1075
+ // Padded numerical value
1076
+ case "ee":
1077
+ return _(s, 2);
1078
+ // 1st, 2nd, ..., 7th
1079
+ case "eo":
1080
+ return n.ordinalNumber(s, { unit: "day" });
1081
+ case "eee":
1082
+ return n.day(o, {
1083
+ width: "abbreviated",
1084
+ context: "formatting"
1085
+ });
1086
+ // T
1087
+ case "eeeee":
1088
+ return n.day(o, {
1089
+ width: "narrow",
1090
+ context: "formatting"
1091
+ });
1092
+ // Tu
1093
+ case "eeeeee":
1094
+ return n.day(o, {
1095
+ width: "short",
1096
+ context: "formatting"
1097
+ });
1098
+ default:
1099
+ return n.day(o, {
1100
+ width: "wide",
1101
+ context: "formatting"
1102
+ });
1103
+ }
1104
+ },
1105
+ // Stand-alone local day of week
1106
+ c: function(e, t, n, r) {
1107
+ const o = e.getDay(), s = (o - r.weekStartsOn + 8) % 7 || 7;
1108
+ switch (t) {
1109
+ // Numerical value (same as in `e`)
1110
+ case "c":
1111
+ return String(s);
1112
+ // Padded numerical value
1113
+ case "cc":
1114
+ return _(s, t.length);
1115
+ // 1st, 2nd, ..., 7th
1116
+ case "co":
1117
+ return n.ordinalNumber(s, { unit: "day" });
1118
+ case "ccc":
1119
+ return n.day(o, {
1120
+ width: "abbreviated",
1121
+ context: "standalone"
1122
+ });
1123
+ // T
1124
+ case "ccccc":
1125
+ return n.day(o, {
1126
+ width: "narrow",
1127
+ context: "standalone"
1128
+ });
1129
+ // Tu
1130
+ case "cccccc":
1131
+ return n.day(o, {
1132
+ width: "short",
1133
+ context: "standalone"
1134
+ });
1135
+ default:
1136
+ return n.day(o, {
1137
+ width: "wide",
1138
+ context: "standalone"
1139
+ });
1140
+ }
1141
+ },
1142
+ // ISO day of week
1143
+ i: function(e, t, n) {
1144
+ const r = e.getDay(), o = r === 0 ? 7 : r;
1145
+ switch (t) {
1146
+ // 2
1147
+ case "i":
1148
+ return String(o);
1149
+ // 02
1150
+ case "ii":
1151
+ return _(o, t.length);
1152
+ // 2nd
1153
+ case "io":
1154
+ return n.ordinalNumber(o, { unit: "day" });
1155
+ // Tue
1156
+ case "iii":
1157
+ return n.day(r, {
1158
+ width: "abbreviated",
1159
+ context: "formatting"
1160
+ });
1161
+ // T
1162
+ case "iiiii":
1163
+ return n.day(r, {
1164
+ width: "narrow",
1165
+ context: "formatting"
1166
+ });
1167
+ // Tu
1168
+ case "iiiiii":
1169
+ return n.day(r, {
1170
+ width: "short",
1171
+ context: "formatting"
1172
+ });
1173
+ default:
1174
+ return n.day(r, {
1175
+ width: "wide",
1176
+ context: "formatting"
1177
+ });
1178
+ }
1179
+ },
1180
+ // AM or PM
1181
+ a: function(e, t, n) {
1182
+ const o = e.getHours() / 12 >= 1 ? "pm" : "am";
1183
+ switch (t) {
1184
+ case "a":
1185
+ case "aa":
1186
+ return n.dayPeriod(o, {
1187
+ width: "abbreviated",
1188
+ context: "formatting"
1189
+ });
1190
+ case "aaa":
1191
+ return n.dayPeriod(o, {
1192
+ width: "abbreviated",
1193
+ context: "formatting"
1194
+ }).toLowerCase();
1195
+ case "aaaaa":
1196
+ return n.dayPeriod(o, {
1197
+ width: "narrow",
1198
+ context: "formatting"
1199
+ });
1200
+ default:
1201
+ return n.dayPeriod(o, {
1202
+ width: "wide",
1203
+ context: "formatting"
1204
+ });
1205
+ }
1206
+ },
1207
+ // AM, PM, midnight, noon
1208
+ b: function(e, t, n) {
1209
+ const r = e.getHours();
1210
+ let o;
1211
+ switch (r === 12 ? o = de.noon : r === 0 ? o = de.midnight : o = r / 12 >= 1 ? "pm" : "am", t) {
1212
+ case "b":
1213
+ case "bb":
1214
+ return n.dayPeriod(o, {
1215
+ width: "abbreviated",
1216
+ context: "formatting"
1217
+ });
1218
+ case "bbb":
1219
+ return n.dayPeriod(o, {
1220
+ width: "abbreviated",
1221
+ context: "formatting"
1222
+ }).toLowerCase();
1223
+ case "bbbbb":
1224
+ return n.dayPeriod(o, {
1225
+ width: "narrow",
1226
+ context: "formatting"
1227
+ });
1228
+ default:
1229
+ return n.dayPeriod(o, {
1230
+ width: "wide",
1231
+ context: "formatting"
1232
+ });
1233
+ }
1234
+ },
1235
+ // in the morning, in the afternoon, in the evening, at night
1236
+ B: function(e, t, n) {
1237
+ const r = e.getHours();
1238
+ let o;
1239
+ switch (r >= 17 ? o = de.evening : r >= 12 ? o = de.afternoon : r >= 4 ? o = de.morning : o = de.night, t) {
1240
+ case "B":
1241
+ case "BB":
1242
+ case "BBB":
1243
+ return n.dayPeriod(o, {
1244
+ width: "abbreviated",
1245
+ context: "formatting"
1246
+ });
1247
+ case "BBBBB":
1248
+ return n.dayPeriod(o, {
1249
+ width: "narrow",
1250
+ context: "formatting"
1251
+ });
1252
+ default:
1253
+ return n.dayPeriod(o, {
1254
+ width: "wide",
1255
+ context: "formatting"
1256
+ });
1257
+ }
1258
+ },
1259
+ // Hour [1-12]
1260
+ h: function(e, t, n) {
1261
+ if (t === "ho") {
1262
+ let r = e.getHours() % 12;
1263
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1264
+ }
1265
+ return se.h(e, t);
1266
+ },
1267
+ // Hour [0-23]
1268
+ H: function(e, t, n) {
1269
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : se.H(e, t);
1270
+ },
1271
+ // Hour [0-11]
1272
+ K: function(e, t, n) {
1273
+ const r = e.getHours() % 12;
1274
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : _(r, t.length);
1275
+ },
1276
+ // Hour [1-24]
1277
+ k: function(e, t, n) {
1278
+ let r = e.getHours();
1279
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : _(r, t.length);
1280
+ },
1281
+ // Minute
1282
+ m: function(e, t, n) {
1283
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : se.m(e, t);
1284
+ },
1285
+ // Second
1286
+ s: function(e, t, n) {
1287
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : se.s(e, t);
1288
+ },
1289
+ // Fraction of second
1290
+ S: function(e, t) {
1291
+ return se.S(e, t);
1292
+ },
1293
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1294
+ X: function(e, t, n) {
1295
+ const r = e.getTimezoneOffset();
1296
+ if (r === 0)
1297
+ return "Z";
1298
+ switch (t) {
1299
+ // Hours and optional minutes
1300
+ case "X":
1301
+ return yt(r);
1302
+ // Hours, minutes and optional seconds without `:` delimiter
1303
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1304
+ // so this token always has the same output as `XX`
1305
+ case "XXXX":
1306
+ case "XX":
1307
+ return ie(r);
1308
+ // Hours and minutes with `:` delimiter
1309
+ default:
1310
+ return ie(r, ":");
1311
+ }
1312
+ },
1313
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1314
+ x: function(e, t, n) {
1315
+ const r = e.getTimezoneOffset();
1316
+ switch (t) {
1317
+ // Hours and optional minutes
1318
+ case "x":
1319
+ return yt(r);
1320
+ // Hours, minutes and optional seconds without `:` delimiter
1321
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1322
+ // so this token always has the same output as `xx`
1323
+ case "xxxx":
1324
+ case "xx":
1325
+ return ie(r);
1326
+ // Hours and minutes with `:` delimiter
1327
+ default:
1328
+ return ie(r, ":");
1329
+ }
1330
+ },
1331
+ // Timezone (GMT)
1332
+ O: function(e, t, n) {
1333
+ const r = e.getTimezoneOffset();
1334
+ switch (t) {
1335
+ // Short
1336
+ case "O":
1337
+ case "OO":
1338
+ case "OOO":
1339
+ return "GMT" + mt(r, ":");
1340
+ default:
1341
+ return "GMT" + ie(r, ":");
1342
+ }
1343
+ },
1344
+ // Timezone (specific non-location)
1345
+ z: function(e, t, n) {
1346
+ const r = e.getTimezoneOffset();
1347
+ switch (t) {
1348
+ // Short
1349
+ case "z":
1350
+ case "zz":
1351
+ case "zzz":
1352
+ return "GMT" + mt(r, ":");
1353
+ default:
1354
+ return "GMT" + ie(r, ":");
1355
+ }
1356
+ },
1357
+ // Seconds timestamp
1358
+ t: function(e, t, n) {
1359
+ const r = Math.trunc(+e / 1e3);
1360
+ return _(r, t.length);
1361
+ },
1362
+ // Milliseconds timestamp
1363
+ T: function(e, t, n) {
1364
+ return _(+e, t.length);
1365
+ }
1366
+ };
1367
+ function mt(e, t = "") {
1368
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), s = r % 60;
1369
+ return s === 0 ? n + String(o) : n + String(o) + t + _(s, 2);
1370
+ }
1371
+ function yt(e, t) {
1372
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + _(Math.abs(e) / 60, 2) : ie(e, t);
1373
+ }
1374
+ function ie(e, t = "") {
1375
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), o = _(Math.trunc(r / 60), 2), s = _(r % 60, 2);
1376
+ return n + o + t + s;
1377
+ }
1378
+ const gt = (e, t) => {
1379
+ switch (e) {
1380
+ case "P":
1381
+ return t.date({ width: "short" });
1382
+ case "PP":
1383
+ return t.date({ width: "medium" });
1384
+ case "PPP":
1385
+ return t.date({ width: "long" });
1386
+ default:
1387
+ return t.date({ width: "full" });
1388
+ }
1389
+ }, Pt = (e, t) => {
1390
+ switch (e) {
1391
+ case "p":
1392
+ return t.time({ width: "short" });
1393
+ case "pp":
1394
+ return t.time({ width: "medium" });
1395
+ case "ppp":
1396
+ return t.time({ width: "long" });
1397
+ default:
1398
+ return t.time({ width: "full" });
1399
+ }
1400
+ }, Pr = (e, t) => {
1401
+ const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
1402
+ if (!o)
1403
+ return gt(e, t);
1404
+ let s;
1405
+ switch (r) {
1406
+ case "P":
1407
+ s = t.dateTime({ width: "short" });
1408
+ break;
1409
+ case "PP":
1410
+ s = t.dateTime({ width: "medium" });
1411
+ break;
1412
+ case "PPP":
1413
+ s = t.dateTime({ width: "long" });
1414
+ break;
1415
+ default:
1416
+ s = t.dateTime({ width: "full" });
1417
+ break;
1418
+ }
1419
+ return s.replace("{{date}}", gt(r, t)).replace("{{time}}", Pt(o, t));
1420
+ }, Fr = {
1421
+ p: Pt,
1422
+ P: Pr
1423
+ }, Br = /^D+$/, Ir = /^Y+$/, Hr = ["D", "DD", "YY", "YYYY"];
1424
+ function Ar(e) {
1425
+ return Br.test(e);
1426
+ }
1427
+ function qr(e) {
1428
+ return Ir.test(e);
1429
+ }
1430
+ function zr(e, t, n) {
1431
+ const r = jr(e, t, n);
1432
+ if (console.warn(r), Hr.includes(e)) throw new RangeError(r);
1433
+ }
1434
+ function jr(e, t, n) {
1435
+ const r = e[0] === "Y" ? "years" : "days of the month";
1436
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1437
+ }
1438
+ const Gr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, $r = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Rr = /^'([^]*?)'?$/, Qr = /''/g, Ur = /[a-zA-Z]/;
1439
+ function pe(e, t, n) {
1440
+ const r = De(), o = n?.locale ?? r.locale ?? fe, s = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = E(e, n?.in);
1441
+ if (!Un(a))
1442
+ throw new RangeError("Invalid time value");
1443
+ let c = t.match($r).map((l) => {
1444
+ const d = l[0];
1445
+ if (d === "p" || d === "P") {
1446
+ const h = Fr[d];
1447
+ return h(l, o.formatLong);
1448
+ }
1449
+ return l;
1450
+ }).join("").match(Gr).map((l) => {
1451
+ if (l === "''")
1452
+ return { isToken: !1, value: "'" };
1453
+ const d = l[0];
1454
+ if (d === "'")
1455
+ return { isToken: !1, value: Xr(l) };
1456
+ if (ht[d])
1457
+ return { isToken: !0, value: l };
1458
+ if (d.match(Ur))
1459
+ throw new RangeError(
1460
+ "Format string contains an unescaped latin alphabet character `" + d + "`"
1461
+ );
1462
+ return { isToken: !1, value: l };
1463
+ });
1464
+ o.localize.preprocessor && (c = o.localize.preprocessor(a, c));
1465
+ const u = {
1466
+ firstWeekContainsDate: s,
1467
+ weekStartsOn: i,
1468
+ locale: o
1469
+ };
1470
+ return c.map((l) => {
1471
+ if (!l.isToken) return l.value;
1472
+ const d = l.value;
1473
+ (!n?.useAdditionalWeekYearTokens && qr(d) || !n?.useAdditionalDayOfYearTokens && Ar(d)) && zr(d, t, String(e));
1474
+ const h = ht[d[0]];
1475
+ return h(a, d, o.localize, u);
1476
+ }).join("");
1477
+ }
1478
+ function Xr(e) {
1479
+ const t = e.match(Rr);
1480
+ return t ? t[1].replace(Qr, "'") : e;
1481
+ }
1482
+ function Vr(e, t) {
1483
+ const n = E(e, t?.in), r = n.getFullYear(), o = n.getMonth(), s = I(n, 0);
1484
+ return s.setFullYear(r, o + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
1485
+ }
1486
+ function Zr(e, t) {
1487
+ return E(e, t?.in).getMonth();
1488
+ }
1489
+ function Kr(e, t) {
1490
+ return E(e, t?.in).getFullYear();
1491
+ }
1492
+ function Jr(e, t) {
1493
+ return +E(e) > +E(t);
1494
+ }
1495
+ function Lr(e, t) {
1496
+ return +E(e) < +E(t);
1497
+ }
1498
+ function eo(e, t, n) {
1499
+ const [r, o] = me(
1500
+ n?.in,
1501
+ e,
1502
+ t
1503
+ );
1504
+ return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
1505
+ }
1506
+ function to(e, t, n) {
1507
+ const [r, o] = me(
1508
+ n?.in,
1509
+ e,
1510
+ t
1511
+ );
1512
+ return r.getFullYear() === o.getFullYear();
1513
+ }
1514
+ function no(e, t, n) {
1515
+ const r = E(e, n?.in), o = r.getFullYear(), s = r.getDate(), i = I(e, 0);
1516
+ i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
1517
+ const a = Vr(i);
1518
+ return r.setMonth(t, Math.min(s, a)), r;
1519
+ }
1520
+ function ro(e, t, n) {
1521
+ const r = E(e, n?.in);
1522
+ return isNaN(+r) ? I(e, NaN) : (r.setFullYear(t), r);
1523
+ }
1524
+ const bt = 5, oo = 4;
1525
+ function ao(e, t) {
1526
+ const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), s = t.addDays(o, bt * 7 - 1);
1527
+ return t.getMonth(e) === t.getMonth(s) ? bt : oo;
1528
+ }
1529
+ function Ft(e, t) {
1530
+ const n = t.startOfMonth(e), r = n.getDay();
1531
+ return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
1532
+ }
1533
+ function so(e, t) {
1534
+ const n = Ft(e, t), r = ao(e, t);
1535
+ return t.addDays(n, r * 7 - 1);
1536
+ }
1537
+ const Bt = {
1538
+ ...fe,
1539
+ labels: {
1540
+ labelDayButton: (e, t, n, r) => {
1541
+ let o;
1542
+ r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, a) => pe(i, a, { locale: fe, ...n });
1543
+ let s = o(e, "PPPP");
1544
+ return t.today && (s = `Today, ${s}`), t.selected && (s = `${s}, selected`), s;
1545
+ },
1546
+ labelMonthDropdown: "Choose the Month",
1547
+ labelNext: "Go to the Next Month",
1548
+ labelPrevious: "Go to the Previous Month",
1549
+ labelWeekNumber: (e) => `Week ${e}`,
1550
+ labelYearDropdown: "Choose the Year",
1551
+ labelGrid: (e, t, n) => {
1552
+ let r;
1553
+ return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, s) => pe(o, s, { locale: fe, ...t }), r(e, "LLLL yyyy");
1554
+ },
1555
+ labelGridcell: (e, t, n, r) => {
1556
+ let o;
1557
+ r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, a) => pe(i, a, { locale: fe, ...n });
1558
+ let s = o(e, "PPPP");
1559
+ return t?.today && (s = `Today, ${s}`), s;
1560
+ },
1561
+ labelNav: "Navigation bar",
1562
+ labelWeekNumberHeader: "Week Number",
1563
+ labelWeekday: (e, t, n) => {
1564
+ let r;
1565
+ return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, s) => pe(o, s, { locale: fe, ...t }), r(e, "cccc");
1566
+ }
1567
+ }
1568
+ };
1569
+ class j {
1570
+ /**
1571
+ * Creates an instance of `DateLib`.
1572
+ *
1573
+ * @param options Configuration options for the date library.
1574
+ * @param overrides Custom overrides for the date library functions.
1575
+ */
1576
+ constructor(t, n) {
1577
+ this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? A.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, s) => this.overrides?.newDate ? this.overrides.newDate(r, o, s) : this.options.timeZone ? new A(r, o, s, this.options.timeZone) : new Date(r, o, s), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : Wt(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : St(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : jn(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : Gn(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : Ue(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : xt(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Vn(r), this.eachYearOfInterval = (r) => {
1578
+ const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : Jn(r), s = new Set(o.map((a) => this.getYear(a)));
1579
+ if (s.size === o.length)
1580
+ return o;
1581
+ const i = [];
1582
+ return s.forEach((a) => {
1583
+ i.push(new Date(a, 0, 1));
1584
+ }), i;
1585
+ }, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : so(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Ln(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : Xn(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : _t(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : Kn(r), this.format = (r, o, s) => {
1586
+ const i = this.overrides?.format ? this.overrides.format(r, o, this.options) : pe(r, o, this.options);
1587
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
1588
+ }, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : Xe(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Zr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Kr(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : Ve(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Jr(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Lr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : Nt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : Qn(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : eo(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : to(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : $n(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : Rn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : no(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : ro(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : Ft(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : ke(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : Me(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : Zn(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : he(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : Tt(r), this.options = { locale: Bt, ...t }, this.overrides = n;
1589
+ }
1590
+ /**
1591
+ * Generates a mapping of Arabic digits (0-9) to the target numbering system
1592
+ * digits.
1593
+ *
1594
+ * @since 9.5.0
1595
+ * @returns A record mapping Arabic digits to the target numerals.
1596
+ */
1597
+ getDigitMap() {
1598
+ const { numerals: t = "latn" } = this.options, n = new Intl.NumberFormat("en-US", {
1599
+ numberingSystem: t
1600
+ }), r = {};
1601
+ for (let o = 0; o < 10; o++)
1602
+ r[o.toString()] = n.format(o);
1603
+ return r;
1604
+ }
1605
+ /**
1606
+ * Replaces Arabic digits in a string with the target numbering system digits.
1607
+ *
1608
+ * @since 9.5.0
1609
+ * @param input The string containing Arabic digits.
1610
+ * @returns The string with digits replaced.
1611
+ */
1612
+ replaceDigits(t) {
1613
+ const n = this.getDigitMap();
1614
+ return t.replace(/\d/g, (r) => n[r] || r);
1615
+ }
1616
+ /**
1617
+ * Formats a number using the configured numbering system.
1618
+ *
1619
+ * @since 9.5.0
1620
+ * @param value The number to format.
1621
+ * @returns The formatted number as a string.
1622
+ */
1623
+ formatNumber(t) {
1624
+ return this.replaceDigits(t.toString());
1625
+ }
1626
+ /**
1627
+ * Returns the preferred ordering for month and year labels for the current
1628
+ * locale.
1629
+ */
1630
+ getMonthYearOrder() {
1631
+ const t = this.options.locale?.code;
1632
+ return t && j.yearFirstLocales.has(t) ? "year-first" : "month-first";
1633
+ }
1634
+ /**
1635
+ * Formats the month/year pair respecting locale conventions.
1636
+ *
1637
+ * @since 9.11.0
1638
+ */
1639
+ formatMonthYear(t) {
1640
+ const { locale: n, timeZone: r, numerals: o } = this.options, s = n?.code;
1641
+ if (s && j.yearFirstLocales.has(s))
1642
+ try {
1643
+ return new Intl.DateTimeFormat(s, {
1644
+ month: "long",
1645
+ year: "numeric",
1646
+ timeZone: r,
1647
+ numberingSystem: o
1648
+ }).format(t);
1649
+ } catch {
1650
+ }
1651
+ const i = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
1652
+ return this.format(t, i);
1653
+ }
1654
+ }
1655
+ j.yearFirstLocales = /* @__PURE__ */ new Set([
1656
+ "eu",
1657
+ "hu",
1658
+ "ja",
1659
+ "ja-Hira",
1660
+ "ja-JP",
1661
+ "ko",
1662
+ "ko-KR",
1663
+ "lt",
1664
+ "lt-LT",
1665
+ "lv",
1666
+ "lv-LV",
1667
+ "mn",
1668
+ "mn-MN",
1669
+ "zh",
1670
+ "zh-CN",
1671
+ "zh-HK",
1672
+ "zh-TW"
1673
+ ]);
1674
+ const L = new j();
1675
+ class It {
1676
+ constructor(t, n, r = L) {
1677
+ this.date = t, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(t, n)), this.dateLib = r, this.isoDate = r.format(t, "yyyy-MM-dd"), this.displayMonthId = r.format(n, "yyyy-MM"), this.dateMonthId = r.format(t, "yyyy-MM");
1678
+ }
1679
+ /**
1680
+ * Checks if this day is equal to another `CalendarDay`, considering both the
1681
+ * date and the displayed month.
1682
+ *
1683
+ * @param day The `CalendarDay` to compare with.
1684
+ * @returns `true` if the days are equal, otherwise `false`.
1685
+ */
1686
+ isEqualTo(t) {
1687
+ return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
1688
+ }
1689
+ }
1690
+ class io {
1691
+ constructor(t, n) {
1692
+ this.date = t, this.weeks = n;
1693
+ }
1694
+ }
1695
+ class co {
1696
+ constructor(t, n) {
1697
+ this.days = n, this.weekNumber = t;
1698
+ }
1699
+ }
1700
+ function uo(e) {
1701
+ return f.createElement("button", { ...e });
1702
+ }
1703
+ function lo(e) {
1704
+ return f.createElement("span", { ...e });
1705
+ }
1706
+ function fo(e) {
1707
+ const { size: t = 24, orientation: n = "left", className: r } = e;
1708
+ return (
1709
+ // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
1710
+ f.createElement(
1711
+ "svg",
1712
+ { className: r, width: t, height: t, viewBox: "0 0 24 24" },
1713
+ n === "up" && f.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
1714
+ n === "down" && f.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
1715
+ n === "left" && f.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
1716
+ n === "right" && f.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
1717
+ )
1718
+ );
1719
+ }
1720
+ function ho(e) {
1721
+ const { day: t, modifiers: n, ...r } = e;
1722
+ return f.createElement("td", { ...r });
1723
+ }
1724
+ function mo(e) {
1725
+ const { day: t, modifiers: n, ...r } = e, o = f.useRef(null);
1726
+ return f.useEffect(() => {
1727
+ n.focused && o.current?.focus();
1728
+ }, [n.focused]), f.createElement("button", { ref: o, ...r });
1729
+ }
1730
+ var y;
1731
+ (function(e) {
1732
+ e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
1733
+ })(y || (y = {}));
1734
+ var F;
1735
+ (function(e) {
1736
+ e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
1737
+ })(F || (F = {}));
1738
+ var V;
1739
+ (function(e) {
1740
+ e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
1741
+ })(V || (V = {}));
1742
+ var z;
1743
+ (function(e) {
1744
+ 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";
1745
+ })(z || (z = {}));
1746
+ function yo(e) {
1747
+ const { options: t, className: n, components: r, classNames: o, ...s } = e, i = [o[y.Dropdown], n].join(" "), a = t?.find(({ value: c }) => c === s.value);
1748
+ return f.createElement(
1749
+ "span",
1750
+ { "data-disabled": s.disabled, className: o[y.DropdownRoot] },
1751
+ f.createElement(r.Select, { className: i, ...s }, t?.map(({ value: c, label: u, disabled: l }) => f.createElement(r.Option, { key: c, value: c, disabled: l }, u))),
1752
+ f.createElement(
1753
+ "span",
1754
+ { className: o[y.CaptionLabel], "aria-hidden": !0 },
1755
+ a?.label,
1756
+ f.createElement(r.Chevron, { orientation: "down", size: 18, className: o[y.Chevron] })
1757
+ )
1758
+ );
1759
+ }
1760
+ function go(e) {
1761
+ return f.createElement("div", { ...e });
1762
+ }
1763
+ function bo(e) {
1764
+ return f.createElement("div", { ...e });
1765
+ }
1766
+ function po(e) {
1767
+ const { calendarMonth: t, displayIndex: n, ...r } = e;
1768
+ return f.createElement("div", { ...r }, e.children);
1769
+ }
1770
+ function wo(e) {
1771
+ const { calendarMonth: t, displayIndex: n, ...r } = e;
1772
+ return f.createElement("div", { ...r });
1773
+ }
1774
+ function Mo(e) {
1775
+ return f.createElement("table", { ...e });
1776
+ }
1777
+ function ko(e) {
1778
+ return f.createElement("div", { ...e });
1779
+ }
1780
+ const Ht = _n(void 0);
1781
+ function ve() {
1782
+ const e = En(Ht);
1783
+ if (e === void 0)
1784
+ throw new Error("useDayPicker() must be used within a custom component.");
1785
+ return e;
1786
+ }
1787
+ function Do(e) {
1788
+ const { components: t } = ve();
1789
+ return f.createElement(t.Dropdown, { ...e });
1790
+ }
1791
+ function vo(e) {
1792
+ const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...s } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: u } } = ve(), l = $((h) => {
1793
+ o && n?.(h);
1794
+ }, [o, n]), d = $((h) => {
1795
+ r && t?.(h);
1796
+ }, [r, t]);
1797
+ return f.createElement(
1798
+ "nav",
1799
+ { ...s },
1800
+ f.createElement(
1801
+ i.PreviousMonthButton,
1802
+ { type: "button", className: a[y.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: d },
1803
+ f.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: a[y.Chevron], orientation: "left" })
1804
+ ),
1805
+ f.createElement(
1806
+ i.NextMonthButton,
1807
+ { type: "button", className: a[y.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": u(o), onClick: l },
1808
+ f.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: a[y.Chevron] })
1809
+ )
1810
+ );
1811
+ }
1812
+ function Oo(e) {
1813
+ const { components: t } = ve();
1814
+ return f.createElement(t.Button, { ...e });
1815
+ }
1816
+ function Wo(e) {
1817
+ return f.createElement("option", { ...e });
1818
+ }
1819
+ function So(e) {
1820
+ const { components: t } = ve();
1821
+ return f.createElement(t.Button, { ...e });
1822
+ }
1823
+ function Co(e) {
1824
+ const { rootRef: t, ...n } = e;
1825
+ return f.createElement("div", { ...n, ref: t });
1826
+ }
1827
+ function No(e) {
1828
+ return f.createElement("select", { ...e });
1829
+ }
1830
+ function xo(e) {
1831
+ const { week: t, ...n } = e;
1832
+ return f.createElement("tr", { ...n });
1833
+ }
1834
+ function Yo(e) {
1835
+ return f.createElement("th", { ...e });
1836
+ }
1837
+ function To(e) {
1838
+ return f.createElement(
1839
+ "thead",
1840
+ { "aria-hidden": !0 },
1841
+ f.createElement("tr", { ...e })
1842
+ );
1843
+ }
1844
+ function _o(e) {
1845
+ const { week: t, ...n } = e;
1846
+ return f.createElement("th", { ...n });
1847
+ }
1848
+ function Eo(e) {
1849
+ return f.createElement("th", { ...e });
1850
+ }
1851
+ function Po(e) {
1852
+ return f.createElement("tbody", { ...e });
1853
+ }
1854
+ function Fo(e) {
1855
+ const { components: t } = ve();
1856
+ return f.createElement(t.Dropdown, { ...e });
1857
+ }
1858
+ const Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1859
+ __proto__: null,
1860
+ Button: uo,
1861
+ CaptionLabel: lo,
1862
+ Chevron: fo,
1863
+ Day: ho,
1864
+ DayButton: mo,
1865
+ Dropdown: yo,
1866
+ DropdownNav: go,
1867
+ Footer: bo,
1868
+ Month: po,
1869
+ MonthCaption: wo,
1870
+ MonthGrid: Mo,
1871
+ Months: ko,
1872
+ MonthsDropdown: Do,
1873
+ Nav: vo,
1874
+ NextMonthButton: Oo,
1875
+ Option: Wo,
1876
+ PreviousMonthButton: So,
1877
+ Root: Co,
1878
+ Select: No,
1879
+ Week: xo,
1880
+ WeekNumber: _o,
1881
+ WeekNumberHeader: Eo,
1882
+ Weekday: Yo,
1883
+ Weekdays: To,
1884
+ Weeks: Po,
1885
+ YearsDropdown: Fo
1886
+ }, Symbol.toStringTag, { value: "Module" }));
1887
+ function re(e, t, n = !1, r = L) {
1888
+ let { from: o, to: s } = e;
1889
+ const { differenceInCalendarDays: i, isSameDay: a } = r;
1890
+ return o && s ? (i(s, o) < 0 && ([o, s] = [s, o]), i(t, o) >= (n ? 1 : 0) && i(s, t) >= (n ? 1 : 0)) : !n && s ? a(s, t) : !n && o ? a(o, t) : !1;
1891
+ }
1892
+ function Ze(e) {
1893
+ return !!(e && typeof e == "object" && "before" in e && "after" in e);
1894
+ }
1895
+ function xe(e) {
1896
+ return !!(e && typeof e == "object" && "from" in e);
1897
+ }
1898
+ function Ke(e) {
1899
+ return !!(e && typeof e == "object" && "after" in e);
1900
+ }
1901
+ function Je(e) {
1902
+ return !!(e && typeof e == "object" && "before" in e);
1903
+ }
1904
+ function At(e) {
1905
+ return !!(e && typeof e == "object" && "dayOfWeek" in e);
1906
+ }
1907
+ function qt(e, t) {
1908
+ return Array.isArray(e) && e.every(t.isDate);
1909
+ }
1910
+ function oe(e, t, n = L) {
1911
+ const r = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: s, isAfter: i } = n;
1912
+ return r.some((a) => {
1913
+ if (typeof a == "boolean")
1914
+ return a;
1915
+ if (n.isDate(a))
1916
+ return o(e, a);
1917
+ if (qt(a, n))
1918
+ return a.some((c) => o(e, c));
1919
+ if (xe(a))
1920
+ return re(a, e, !1, n);
1921
+ if (At(a))
1922
+ return Array.isArray(a.dayOfWeek) ? a.dayOfWeek.includes(e.getDay()) : a.dayOfWeek === e.getDay();
1923
+ if (Ze(a)) {
1924
+ const c = s(a.before, e), u = s(a.after, e), l = c > 0, d = u < 0;
1925
+ return i(a.before, a.after) ? d && l : l || d;
1926
+ }
1927
+ return Ke(a) ? s(e, a.after) > 0 : Je(a) ? s(a.before, e) > 0 : typeof a == "function" ? a(e) : !1;
1928
+ });
1929
+ }
1930
+ function Io(e, t, n, r, o) {
1931
+ const { disabled: s, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: u, today: l = o.today() } = t, { isSameDay: d, isSameMonth: h, startOfMonth: p, isBefore: v, endOfMonth: C, isAfter: k } = o, O = n && p(n), T = r && C(r), w = {
1932
+ [F.focused]: [],
1933
+ [F.outside]: [],
1934
+ [F.disabled]: [],
1935
+ [F.hidden]: [],
1936
+ [F.today]: []
1937
+ }, D = {};
1938
+ for (const b of e) {
1939
+ const { date: m, displayMonth: W } = b, P = !!(W && !h(m, W)), H = !!(O && v(m, O)), B = !!(T && k(m, T)), Z = !!(s && oe(m, s, o)), ae = !!(i && oe(m, i, o)) || H || B || // Broadcast calendar will show outside days as default
1940
+ !u && !c && P || u && c === !1 && P, ee = d(m, l);
1941
+ P && w.outside.push(b), Z && w.disabled.push(b), ae && w.hidden.push(b), ee && w.today.push(b), a && Object.keys(a).forEach((G) => {
1942
+ const ue = a?.[G];
1943
+ ue && oe(m, ue, o) && (D[G] ? D[G].push(b) : D[G] = [b]);
1944
+ });
1945
+ }
1946
+ return (b) => {
1947
+ const m = {
1948
+ [F.focused]: !1,
1949
+ [F.disabled]: !1,
1950
+ [F.hidden]: !1,
1951
+ [F.outside]: !1,
1952
+ [F.today]: !1
1953
+ }, W = {};
1954
+ for (const P in w) {
1955
+ const H = w[P];
1956
+ m[P] = H.some((B) => B === b);
1957
+ }
1958
+ for (const P in D)
1959
+ W[P] = D[P].some((H) => H === b);
1960
+ return {
1961
+ ...m,
1962
+ // custom modifiers should override all the previous ones
1963
+ ...W
1964
+ };
1965
+ };
1966
+ }
1967
+ function Ho(e, t, n = {}) {
1968
+ return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [s]) => (n[s] ? o.push(n[s]) : t[F[s]] ? o.push(t[F[s]]) : t[V[s]] && o.push(t[V[s]]), o), [t[y.Day]]);
1969
+ }
1970
+ function Ao(e) {
1971
+ return {
1972
+ ...Bo,
1973
+ ...e
1974
+ };
1975
+ }
1976
+ function qo(e) {
1977
+ const t = {
1978
+ "data-mode": e.mode ?? void 0,
1979
+ "data-required": "required" in e ? e.required : void 0,
1980
+ "data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
1981
+ "data-week-numbers": e.showWeekNumber || void 0,
1982
+ "data-broadcast-calendar": e.broadcastCalendar || void 0,
1983
+ "data-nav-layout": e.navLayout || void 0
1984
+ };
1985
+ return Object.entries(e).forEach(([n, r]) => {
1986
+ n.startsWith("data-") && (t[n] = r);
1987
+ }), t;
1988
+ }
1989
+ function Le() {
1990
+ const e = {};
1991
+ for (const t in y)
1992
+ e[y[t]] = `rdp-${y[t]}`;
1993
+ for (const t in F)
1994
+ e[F[t]] = `rdp-${F[t]}`;
1995
+ for (const t in V)
1996
+ e[V[t]] = `rdp-${V[t]}`;
1997
+ for (const t in z)
1998
+ e[z[t]] = `rdp-${z[t]}`;
1999
+ return e;
2000
+ }
2001
+ function zt(e, t, n) {
2002
+ return (n ?? new j(t)).formatMonthYear(e);
2003
+ }
2004
+ const zo = zt;
2005
+ function jo(e, t, n) {
2006
+ return (n ?? new j(t)).format(e, "d");
2007
+ }
2008
+ function Go(e, t = L) {
2009
+ return t.format(e, "LLLL");
2010
+ }
2011
+ function $o(e, t, n) {
2012
+ return (n ?? new j(t)).format(e, "cccccc");
2013
+ }
2014
+ function Ro(e, t = L) {
2015
+ return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
2016
+ }
2017
+ function Qo() {
2018
+ return "";
2019
+ }
2020
+ function jt(e, t = L) {
2021
+ return t.format(e, "yyyy");
2022
+ }
2023
+ const Uo = jt, Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2024
+ __proto__: null,
2025
+ formatCaption: zt,
2026
+ formatDay: jo,
2027
+ formatMonthCaption: zo,
2028
+ formatMonthDropdown: Go,
2029
+ formatWeekNumber: Ro,
2030
+ formatWeekNumberHeader: Qo,
2031
+ formatWeekdayName: $o,
2032
+ formatYearCaption: Uo,
2033
+ formatYearDropdown: jt
2034
+ }, Symbol.toStringTag, { value: "Module" }));
2035
+ function Vo(e) {
2036
+ return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
2037
+ ...Xo,
2038
+ ...e
2039
+ };
2040
+ }
2041
+ function et(e, t, n, r) {
2042
+ let o = (r ?? new j(n)).format(e, "PPPP");
2043
+ return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
2044
+ }
2045
+ const Zo = et;
2046
+ function tt(e, t, n) {
2047
+ return (n ?? new j(t)).formatMonthYear(e);
2048
+ }
2049
+ const Ko = tt;
2050
+ function Gt(e, t, n, r) {
2051
+ let o = (r ?? new j(n)).format(e, "PPPP");
2052
+ return t?.today && (o = `Today, ${o}`), o;
2053
+ }
2054
+ function $t(e) {
2055
+ return "Choose the Month";
2056
+ }
2057
+ function Rt() {
2058
+ return "";
2059
+ }
2060
+ const Jo = "Go to the Next Month";
2061
+ function Qt(e, t) {
2062
+ return Jo;
2063
+ }
2064
+ function Ut(e) {
2065
+ return "Go to the Previous Month";
2066
+ }
2067
+ function Xt(e, t, n) {
2068
+ return (n ?? new j(t)).format(e, "cccc");
2069
+ }
2070
+ function Vt(e, t) {
2071
+ return `Week ${e}`;
2072
+ }
2073
+ function Zt(e) {
2074
+ return "Week Number";
2075
+ }
2076
+ function Kt(e) {
2077
+ return "Choose the Year";
2078
+ }
2079
+ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2080
+ __proto__: null,
2081
+ labelCaption: Ko,
2082
+ labelDay: Zo,
2083
+ labelDayButton: et,
2084
+ labelGrid: tt,
2085
+ labelGridcell: Gt,
2086
+ labelMonthDropdown: $t,
2087
+ labelNav: Rt,
2088
+ labelNext: Qt,
2089
+ labelPrevious: Ut,
2090
+ labelWeekNumber: Vt,
2091
+ labelWeekNumberHeader: Zt,
2092
+ labelWeekday: Xt,
2093
+ labelYearDropdown: Kt
2094
+ }, Symbol.toStringTag, { value: "Module" })), X = (e, t, n) => t || (n ? typeof n == "function" ? n : (...r) => n : e);
2095
+ function ea(e, t) {
2096
+ const n = t.locale?.labels ?? {};
2097
+ return {
2098
+ ...Lo,
2099
+ ...e ?? {},
2100
+ labelDayButton: X(et, e?.labelDayButton, n.labelDayButton),
2101
+ labelMonthDropdown: X($t, e?.labelMonthDropdown, n.labelMonthDropdown),
2102
+ labelNext: X(Qt, e?.labelNext, n.labelNext),
2103
+ labelPrevious: X(Ut, e?.labelPrevious, n.labelPrevious),
2104
+ labelWeekNumber: X(Vt, e?.labelWeekNumber, n.labelWeekNumber),
2105
+ labelYearDropdown: X(Kt, e?.labelYearDropdown, n.labelYearDropdown),
2106
+ labelGrid: X(tt, e?.labelGrid, n.labelGrid),
2107
+ labelGridcell: X(Gt, e?.labelGridcell, n.labelGridcell),
2108
+ labelNav: X(Rt, e?.labelNav, n.labelNav),
2109
+ labelWeekNumberHeader: X(Zt, e?.labelWeekNumberHeader, n.labelWeekNumberHeader),
2110
+ labelWeekday: X(Xt, e?.labelWeekday, n.labelWeekday)
2111
+ };
2112
+ }
2113
+ function ta(e, t, n, r, o) {
2114
+ const { startOfMonth: s, startOfYear: i, endOfYear: a, eachMonthOfInterval: c, getMonth: u } = o;
2115
+ return c({
2116
+ start: i(e),
2117
+ end: a(e)
2118
+ }).map((h) => {
2119
+ const p = r.formatMonthDropdown(h, o), v = u(h), C = t && h < s(t) || n && h > s(n) || !1;
2120
+ return { value: v, label: p, disabled: C };
2121
+ });
2122
+ }
2123
+ function na(e, t = {}, n = {}) {
2124
+ let r = { ...t?.[y.Day] };
2125
+ return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
2126
+ r = {
2127
+ ...r,
2128
+ ...n?.[o]
2129
+ };
2130
+ }), r;
2131
+ }
2132
+ function ra(e, t, n, r) {
2133
+ const o = r ?? e.today(), s = n ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), i = [];
2134
+ for (let a = 0; a < 7; a++) {
2135
+ const c = e.addDays(s, a);
2136
+ i.push(c);
2137
+ }
2138
+ return i;
2139
+ }
2140
+ function oa(e, t, n, r, o = !1) {
2141
+ if (!e || !t)
2142
+ return;
2143
+ const { startOfYear: s, endOfYear: i, eachYearOfInterval: a, getYear: c } = r, u = s(e), l = i(t), d = a({ start: u, end: l });
2144
+ return o && d.reverse(), d.map((h) => {
2145
+ const p = n.formatYearDropdown(h, r);
2146
+ return {
2147
+ value: c(h),
2148
+ label: p,
2149
+ disabled: !1
2150
+ };
2151
+ });
2152
+ }
2153
+ function aa(e, t = {}) {
2154
+ const { weekStartsOn: n, locale: r } = t, o = n ?? r?.options?.weekStartsOn ?? 0, s = (a) => {
2155
+ const c = typeof a == "number" || typeof a == "string" ? new Date(a) : a;
2156
+ return new A(c.getFullYear(), c.getMonth(), c.getDate(), 12, 0, 0, e);
2157
+ }, i = (a) => {
2158
+ const c = s(a);
2159
+ return new Date(c.getFullYear(), c.getMonth(), c.getDate(), 0, 0, 0, 0);
2160
+ };
2161
+ return {
2162
+ today: () => s(A.tz(e)),
2163
+ newDate: (a, c, u) => new A(a, c, u, 12, 0, 0, e),
2164
+ startOfDay: (a) => s(a),
2165
+ startOfWeek: (a, c) => {
2166
+ const u = s(a), l = c?.weekStartsOn ?? o, d = (u.getDay() - l + 7) % 7;
2167
+ return u.setDate(u.getDate() - d), u;
2168
+ },
2169
+ startOfISOWeek: (a) => {
2170
+ const c = s(a), u = (c.getDay() - 1 + 7) % 7;
2171
+ return c.setDate(c.getDate() - u), c;
2172
+ },
2173
+ startOfMonth: (a) => {
2174
+ const c = s(a);
2175
+ return c.setDate(1), c;
2176
+ },
2177
+ startOfYear: (a) => {
2178
+ const c = s(a);
2179
+ return c.setMonth(0, 1), c;
2180
+ },
2181
+ endOfWeek: (a, c) => {
2182
+ const u = s(a), h = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
2183
+ return u.setDate(u.getDate() + h), u;
2184
+ },
2185
+ endOfISOWeek: (a) => {
2186
+ const c = s(a), u = (7 - c.getDay()) % 7;
2187
+ return c.setDate(c.getDate() + u), c;
2188
+ },
2189
+ endOfMonth: (a) => {
2190
+ const c = s(a);
2191
+ return c.setMonth(c.getMonth() + 1, 0), c;
2192
+ },
2193
+ endOfYear: (a) => {
2194
+ const c = s(a);
2195
+ return c.setMonth(11, 31), c;
2196
+ },
2197
+ eachMonthOfInterval: (a) => {
2198
+ const c = s(a.start), u = s(a.end), l = [], d = new A(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), h = u.getFullYear() * 12 + u.getMonth();
2199
+ for (; d.getFullYear() * 12 + d.getMonth() <= h; )
2200
+ l.push(new A(d, e)), d.setMonth(d.getMonth() + 1, 1);
2201
+ return l;
2202
+ },
2203
+ // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
2204
+ // mutate the same TZDate, and return it.
2205
+ addDays: (a, c) => {
2206
+ const u = s(a);
2207
+ return u.setDate(u.getDate() + c), u;
2208
+ },
2209
+ addWeeks: (a, c) => {
2210
+ const u = s(a);
2211
+ return u.setDate(u.getDate() + c * 7), u;
2212
+ },
2213
+ addMonths: (a, c) => {
2214
+ const u = s(a);
2215
+ return u.setMonth(u.getMonth() + c), u;
2216
+ },
2217
+ addYears: (a, c) => {
2218
+ const u = s(a);
2219
+ return u.setFullYear(u.getFullYear() + c), u;
2220
+ },
2221
+ eachYearOfInterval: (a) => {
2222
+ const c = s(a.start), u = s(a.end), l = [], d = new A(c.getFullYear(), 0, 1, 12, 0, 0, e);
2223
+ for (; d.getFullYear() <= u.getFullYear(); )
2224
+ l.push(new A(d, e)), d.setFullYear(d.getFullYear() + 1, 0, 1);
2225
+ return l;
2226
+ },
2227
+ getWeek: (a, c) => {
2228
+ const u = i(a);
2229
+ return Ve(u, {
2230
+ weekStartsOn: c?.weekStartsOn ?? o,
2231
+ firstWeekContainsDate: c?.firstWeekContainsDate ?? r?.options?.firstWeekContainsDate ?? 1
2232
+ });
2233
+ },
2234
+ getISOWeek: (a) => {
2235
+ const c = i(a);
2236
+ return Xe(c);
2237
+ },
2238
+ differenceInCalendarDays: (a, c) => {
2239
+ const u = i(a), l = i(c);
2240
+ return Ue(u, l);
2241
+ },
2242
+ differenceInCalendarMonths: (a, c) => {
2243
+ const u = i(a), l = i(c);
2244
+ return xt(u, l);
2245
+ }
2246
+ };
2247
+ }
2248
+ const Oe = (e) => e instanceof HTMLElement ? e : null, ze = (e) => [
2249
+ ...e.querySelectorAll("[data-animated-month]") ?? []
2250
+ ], sa = (e) => Oe(e.querySelector("[data-animated-month]")), je = (e) => Oe(e.querySelector("[data-animated-caption]")), Ge = (e) => Oe(e.querySelector("[data-animated-weeks]")), ia = (e) => Oe(e.querySelector("[data-animated-nav]")), ca = (e) => Oe(e.querySelector("[data-animated-weekdays]"));
2251
+ function ua(e, t, { classNames: n, months: r, focused: o, dateLib: s }) {
2252
+ const i = we(null), a = we(r), c = we(!1);
2253
+ Pn(() => {
2254
+ const u = a.current;
2255
+ if (a.current = r, !t || !e.current || // safety check because the ref can be set to anything by consumers
2256
+ !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
2257
+ r.length === 0 || u.length === 0 || r.length !== u.length)
2258
+ return;
2259
+ const l = s.isSameMonth(r[0].date, u[0].date), d = s.isAfter(r[0].date, u[0].date), h = d ? n[z.caption_after_enter] : n[z.caption_before_enter], p = d ? n[z.weeks_after_enter] : n[z.weeks_before_enter], v = i.current, C = e.current.cloneNode(!0);
2260
+ if (C instanceof HTMLElement ? (ze(C).forEach((w) => {
2261
+ if (!(w instanceof HTMLElement))
2262
+ return;
2263
+ const D = sa(w);
2264
+ D && w.contains(D) && w.removeChild(D);
2265
+ const b = je(w);
2266
+ b && b.classList.remove(h);
2267
+ const m = Ge(w);
2268
+ m && m.classList.remove(p);
2269
+ }), i.current = C) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
2270
+ o)
2271
+ return;
2272
+ const k = v instanceof HTMLElement ? ze(v) : [], O = ze(e.current);
2273
+ if (O?.every((T) => T instanceof HTMLElement) && k && k.every((T) => T instanceof HTMLElement)) {
2274
+ c.current = !0, e.current.style.isolation = "isolate";
2275
+ const T = ia(e.current);
2276
+ T && (T.style.zIndex = "1"), O.forEach((w, D) => {
2277
+ const b = k[D];
2278
+ if (!b)
2279
+ return;
2280
+ w.style.position = "relative", w.style.overflow = "hidden";
2281
+ const m = je(w);
2282
+ m && m.classList.add(h);
2283
+ const W = Ge(w);
2284
+ W && W.classList.add(p);
2285
+ const P = () => {
2286
+ c.current = !1, e.current && (e.current.style.isolation = ""), T && (T.style.zIndex = ""), m && m.classList.remove(h), W && W.classList.remove(p), w.style.position = "", w.style.overflow = "", w.contains(b) && w.removeChild(b);
2287
+ };
2288
+ b.style.pointerEvents = "none", b.style.position = "absolute", b.style.overflow = "hidden", b.setAttribute("aria-hidden", "true");
2289
+ const H = ca(b);
2290
+ H && (H.style.opacity = "0");
2291
+ const B = je(b);
2292
+ B && (B.classList.add(d ? n[z.caption_before_exit] : n[z.caption_after_exit]), B.addEventListener("animationend", P));
2293
+ const Z = Ge(b);
2294
+ Z && Z.classList.add(d ? n[z.weeks_before_exit] : n[z.weeks_after_exit]), w.insertBefore(b, w.firstChild);
2295
+ });
2296
+ }
2297
+ });
2298
+ }
2299
+ function da(e, t, n, r) {
2300
+ const o = e[0], s = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: h, endOfISOWeek: p, endOfMonth: v, endOfWeek: C, isAfter: k, startOfBroadcastWeek: O, startOfISOWeek: T, startOfWeek: w } = r, D = c ? O(o, r) : i ? T(o) : w(o), b = c ? h(s) : i ? p(v(s)) : C(v(s)), m = t && (c ? h(t) : i ? p(t) : C(t)), W = m && k(b, m) ? m : b, P = l(W, D), H = d(s, o) + 1, B = [];
2301
+ for (let ee = 0; ee <= P; ee++) {
2302
+ const G = u(D, ee);
2303
+ B.push(G);
2304
+ }
2305
+ const ae = (c ? 35 : 42) * H;
2306
+ if (a && B.length < ae) {
2307
+ const ee = ae - B.length;
2308
+ for (let G = 0; G < ee; G++) {
2309
+ const ue = u(B[B.length - 1], 1);
2310
+ B.push(ue);
2311
+ }
2312
+ }
2313
+ return B;
2314
+ }
2315
+ function la(e) {
2316
+ const t = [];
2317
+ return e.reduce((n, r) => {
2318
+ const o = r.weeks.reduce((s, i) => s.concat(i.days.slice()), t.slice());
2319
+ return n.concat(o.slice());
2320
+ }, t.slice());
2321
+ }
2322
+ function fa(e, t, n, r) {
2323
+ const { numberOfMonths: o = 1 } = n, s = [];
2324
+ for (let i = 0; i < o; i++) {
2325
+ const a = r.addMonths(e, i);
2326
+ if (t && a > t)
2327
+ break;
2328
+ s.push(a);
2329
+ }
2330
+ return s;
2331
+ }
2332
+ function pt(e, t, n, r) {
2333
+ const { month: o, defaultMonth: s, today: i = r.today(), numberOfMonths: a = 1 } = e;
2334
+ let c = o || s || i;
2335
+ const { differenceInCalendarMonths: u, addMonths: l, startOfMonth: d } = r;
2336
+ if (n && u(n, c) < a - 1) {
2337
+ const h = -1 * (a - 1);
2338
+ c = l(n, h);
2339
+ }
2340
+ return t && u(c, t) < 0 && (c = t), d(c);
2341
+ }
2342
+ function ha(e, t, n, r) {
2343
+ const { addDays: o, endOfBroadcastWeek: s, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: d, startOfISOWeek: h, startOfWeek: p } = r, v = e.reduce((C, k) => {
2344
+ const O = n.broadcastCalendar ? d(k, r) : n.ISOWeek ? h(k) : p(k), T = n.broadcastCalendar ? s(k) : n.ISOWeek ? i(a(k)) : c(a(k)), w = t.filter((W) => W >= O && W <= T), D = n.broadcastCalendar ? 35 : 42;
2345
+ if (n.fixedWeeks && w.length < D) {
2346
+ const W = t.filter((P) => {
2347
+ const H = D - w.length;
2348
+ return P > T && P <= o(T, H);
2349
+ });
2350
+ w.push(...W);
2351
+ }
2352
+ const b = w.reduce((W, P) => {
2353
+ const H = n.ISOWeek ? u(P) : l(P), B = W.find((ae) => ae.weekNumber === H), Z = new It(P, k, r);
2354
+ return B ? B.days.push(Z) : W.push(new co(H, [Z])), W;
2355
+ }, []), m = new io(k, b);
2356
+ return C.push(m), C;
2357
+ }, []);
2358
+ return n.reverseMonths ? v.reverse() : v;
2359
+ }
2360
+ function ma(e, t) {
2361
+ let { startMonth: n, endMonth: r } = e;
2362
+ const { startOfYear: o, startOfDay: s, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: u, newDate: l, today: d } = t, { fromYear: h, toYear: p, fromMonth: v, toMonth: C } = e;
2363
+ !n && v && (n = v), !n && h && (n = t.newDate(h, 0, 1)), !r && C && (r = C), !r && p && (r = l(p, 11, 31));
2364
+ const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
2365
+ return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && k && (n = o(c(e.today ?? d(), -100))), r ? r = a(r) : p ? r = l(p, 11, 31) : !r && k && (r = u(e.today ?? d())), [
2366
+ n && s(n),
2367
+ r && s(r)
2368
+ ];
2369
+ }
2370
+ function ya(e, t, n, r) {
2371
+ if (n.disableNavigation)
2372
+ return;
2373
+ const { pagedNavigation: o, numberOfMonths: s = 1 } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, u = o ? s : 1, l = i(e);
2374
+ if (!t)
2375
+ return a(l, u);
2376
+ if (!(c(t, e) < s))
2377
+ return a(l, u);
2378
+ }
2379
+ function ga(e, t, n, r) {
2380
+ if (n.disableNavigation)
2381
+ return;
2382
+ const { pagedNavigation: o, numberOfMonths: s } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, u = o ? s ?? 1 : 1, l = i(e);
2383
+ if (!t)
2384
+ return a(l, -u);
2385
+ if (!(c(l, t) <= 0))
2386
+ return a(l, -u);
2387
+ }
2388
+ function ba(e) {
2389
+ const t = [];
2390
+ return e.reduce((n, r) => n.concat(r.weeks.slice()), t.slice());
2391
+ }
2392
+ function Ye(e, t) {
2393
+ const [n, r] = Re(e);
2394
+ return [t === void 0 ? n : t, r];
2395
+ }
2396
+ function pa(e, t) {
2397
+ const [n, r] = ma(e, t), { startOfMonth: o, endOfMonth: s } = t, i = pt(e, n, r, t), [a, c] = Ye(
2398
+ i,
2399
+ // initialMonth is always computed from props.month if provided
2400
+ e.month ? i : void 0
2401
+ );
2402
+ Dt(() => {
2403
+ const D = pt(e, n, r, t);
2404
+ c(D);
2405
+ }, [e.timeZone]);
2406
+ const { months: u, weeks: l, days: d, previousMonth: h, nextMonth: p } = Ne(() => {
2407
+ const D = fa(a, r, { numberOfMonths: e.numberOfMonths }, t), b = da(D, e.endMonth ? s(e.endMonth) : void 0, {
2408
+ ISOWeek: e.ISOWeek,
2409
+ fixedWeeks: e.fixedWeeks,
2410
+ broadcastCalendar: e.broadcastCalendar
2411
+ }, t), m = ha(D, b, {
2412
+ broadcastCalendar: e.broadcastCalendar,
2413
+ fixedWeeks: e.fixedWeeks,
2414
+ ISOWeek: e.ISOWeek,
2415
+ reverseMonths: e.reverseMonths
2416
+ }, t), W = ba(m), P = la(m), H = ga(a, n, e, t), B = ya(a, r, e, t);
2417
+ return {
2418
+ months: m,
2419
+ weeks: W,
2420
+ days: P,
2421
+ previousMonth: H,
2422
+ nextMonth: B
2423
+ };
2424
+ }, [
2425
+ t,
2426
+ a.getTime(),
2427
+ r?.getTime(),
2428
+ n?.getTime(),
2429
+ e.disableNavigation,
2430
+ e.broadcastCalendar,
2431
+ e.endMonth?.getTime(),
2432
+ e.fixedWeeks,
2433
+ e.ISOWeek,
2434
+ e.numberOfMonths,
2435
+ e.pagedNavigation,
2436
+ e.reverseMonths
2437
+ ]), { disableNavigation: v, onMonthChange: C } = e, k = (D) => l.some((b) => b.days.some((m) => m.isEqualTo(D))), O = (D) => {
2438
+ if (v)
2439
+ return;
2440
+ let b = o(D);
2441
+ n && b < o(n) && (b = o(n)), r && b > o(r) && (b = o(r)), c(b), C?.(b);
2442
+ };
2443
+ return {
2444
+ months: u,
2445
+ weeks: l,
2446
+ days: d,
2447
+ navStart: n,
2448
+ navEnd: r,
2449
+ previousMonth: h,
2450
+ nextMonth: p,
2451
+ goToMonth: O,
2452
+ goToDay: (D) => {
2453
+ k(D) || O(D.date);
2454
+ }
2455
+ };
2456
+ }
2457
+ var K;
2458
+ (function(e) {
2459
+ e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
2460
+ })(K || (K = {}));
2461
+ function wt(e) {
2462
+ return !e[F.disabled] && !e[F.hidden] && !e[F.outside];
2463
+ }
2464
+ function wa(e, t, n, r) {
2465
+ let o, s = -1;
2466
+ for (const i of e) {
2467
+ const a = t(i);
2468
+ wt(a) && (a[F.focused] && s < K.FocusedModifier ? (o = i, s = K.FocusedModifier) : r?.isEqualTo(i) && s < K.LastFocused ? (o = i, s = K.LastFocused) : n(i.date) && s < K.Selected ? (o = i, s = K.Selected) : a[F.today] && s < K.Today && (o = i, s = K.Today));
2469
+ }
2470
+ return o || (o = e.find((i) => wt(t(i)))), o;
2471
+ }
2472
+ function Ma(e, t, n, r, o, s, i) {
2473
+ const { ISOWeek: a, broadcastCalendar: c } = s, { addDays: u, addMonths: l, addWeeks: d, addYears: h, endOfBroadcastWeek: p, endOfISOWeek: v, endOfWeek: C, max: k, min: O, startOfBroadcastWeek: T, startOfISOWeek: w, startOfWeek: D } = i;
2474
+ let m = {
2475
+ day: u,
2476
+ week: d,
2477
+ month: l,
2478
+ year: h,
2479
+ startOfWeek: (W) => c ? T(W, i) : a ? w(W) : D(W),
2480
+ endOfWeek: (W) => c ? p(W) : a ? v(W) : C(W)
2481
+ }[e](n, t === "after" ? 1 : -1);
2482
+ return t === "before" && r ? m = k([r, m]) : t === "after" && o && (m = O([o, m])), m;
2483
+ }
2484
+ function Jt(e, t, n, r, o, s, i, a = 0) {
2485
+ if (a > 365)
2486
+ return;
2487
+ const c = Ma(e, t, n.date, r, o, s, i), u = !!(s.disabled && oe(c, s.disabled, i)), l = !!(s.hidden && oe(c, s.hidden, i)), d = c, h = new It(c, d, i);
2488
+ return !u && !l ? h : Jt(e, t, h, r, o, s, i, a + 1);
2489
+ }
2490
+ function ka(e, t, n, r, o) {
2491
+ const { autoFocus: s } = e, [i, a] = Re(), c = wa(t.days, n, r || (() => !1), i), [u, l] = Re(s ? c : void 0);
2492
+ return {
2493
+ isFocusTarget: (C) => !!c?.isEqualTo(C),
2494
+ setFocused: l,
2495
+ focused: u,
2496
+ blur: () => {
2497
+ a(u), l(void 0);
2498
+ },
2499
+ moveFocus: (C, k) => {
2500
+ if (!u)
2501
+ return;
2502
+ const O = Jt(C, k, u, t.navStart, t.navEnd, e, o);
2503
+ O && (e.disableNavigation && !t.days.some((w) => w.isEqualTo(O)) || (t.goToDay(O), l(O)));
2504
+ }
2505
+ };
2506
+ }
2507
+ function Da(e, t) {
2508
+ const { selected: n, required: r, onSelect: o } = e, [s, i] = Ye(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t, u = (p) => a?.some((v) => c(v, p)) ?? !1, { min: l, max: d } = e;
2509
+ return {
2510
+ selected: a,
2511
+ select: (p, v, C) => {
2512
+ let k = [...a ?? []];
2513
+ if (u(p)) {
2514
+ if (a?.length === l || r && a?.length === 1)
2515
+ return;
2516
+ k = a?.filter((O) => !c(O, p));
2517
+ } else
2518
+ a?.length === d ? k = [p] : k = [...k, p];
2519
+ return o || i(k), o?.(k, p, v, C), k;
2520
+ },
2521
+ isSelected: u
2522
+ };
2523
+ }
2524
+ function va(e, t, n = 0, r = 0, o = !1, s = L) {
2525
+ const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: u, isBefore: l } = s;
2526
+ let d;
2527
+ if (!i && !a)
2528
+ d = { from: e, to: n > 0 ? void 0 : e };
2529
+ else if (i && !a)
2530
+ c(i, e) ? n === 0 ? d = { from: i, to: e } : o ? d = { from: i, to: void 0 } : d = void 0 : l(e, i) ? d = { from: e, to: i } : d = { from: i, to: e };
2531
+ else if (i && a)
2532
+ if (c(i, e) && c(a, e))
2533
+ o ? d = { from: i, to: a } : d = void 0;
2534
+ else if (c(i, e))
2535
+ d = { from: i, to: n > 0 ? void 0 : e };
2536
+ else if (c(a, e))
2537
+ d = { from: e, to: n > 0 ? void 0 : e };
2538
+ else if (l(e, i))
2539
+ d = { from: e, to: a };
2540
+ else if (u(e, i))
2541
+ d = { from: i, to: e };
2542
+ else if (u(e, a))
2543
+ d = { from: i, to: e };
2544
+ else
2545
+ throw new Error("Invalid range");
2546
+ if (d?.from && d?.to) {
2547
+ const h = s.differenceInCalendarDays(d.to, d.from);
2548
+ r > 0 && h > r ? d = { from: e, to: void 0 } : n > 1 && h < n && (d = { from: e, to: void 0 });
2549
+ }
2550
+ return d;
2551
+ }
2552
+ function Oa(e, t, n = L) {
2553
+ const r = Array.isArray(t) ? t : [t];
2554
+ let o = e.from;
2555
+ const s = n.differenceInCalendarDays(e.to, e.from), i = Math.min(s, 6);
2556
+ for (let a = 0; a <= i; a++) {
2557
+ if (r.includes(o.getDay()))
2558
+ return !0;
2559
+ o = n.addDays(o, 1);
2560
+ }
2561
+ return !1;
2562
+ }
2563
+ function Mt(e, t, n = L) {
2564
+ return re(e, t.from, !1, n) || re(e, t.to, !1, n) || re(t, e.from, !1, n) || re(t, e.to, !1, n);
2565
+ }
2566
+ function Wa(e, t, n = L) {
2567
+ const r = Array.isArray(t) ? t : [t];
2568
+ if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? re(e, a, !1, n) : qt(a, n) ? a.some((c) => re(e, c, !1, n)) : xe(a) ? a.from && a.to ? Mt(e, { from: a.from, to: a.to }, n) : !1 : At(a) ? Oa(e, a.dayOfWeek, n) : Ze(a) ? n.isAfter(a.before, a.after) ? Mt(e, {
2569
+ from: n.addDays(a.after, 1),
2570
+ to: n.addDays(a.before, -1)
2571
+ }, n) : oe(e.from, a, n) || oe(e.to, a, n) : Ke(a) || Je(a) ? oe(e.from, a, n) || oe(e.to, a, n) : !1))
2572
+ return !0;
2573
+ const i = r.filter((a) => typeof a == "function");
2574
+ if (i.length) {
2575
+ let a = e.from;
2576
+ const c = n.differenceInCalendarDays(e.to, e.from);
2577
+ for (let u = 0; u <= c; u++) {
2578
+ if (i.some((l) => l(a)))
2579
+ return !0;
2580
+ a = n.addDays(a, 1);
2581
+ }
2582
+ }
2583
+ return !1;
2584
+ }
2585
+ function Sa(e, t) {
2586
+ const { disabled: n, excludeDisabled: r, selected: o, required: s, onSelect: i } = e, [a, c] = Ye(o, i ? o : void 0), u = i ? o : a;
2587
+ return {
2588
+ selected: u,
2589
+ select: (h, p, v) => {
2590
+ const { min: C, max: k } = e, O = h ? va(h, u, C, k, s, t) : void 0;
2591
+ return r && n && O?.from && O.to && Wa({ from: O.from, to: O.to }, n, t) && (O.from = h, O.to = void 0), i || c(O), i?.(O, h, p, v), O;
2592
+ },
2593
+ isSelected: (h) => u && re(u, h, !1, t)
2594
+ };
2595
+ }
2596
+ function Ca(e, t) {
2597
+ const { selected: n, required: r, onSelect: o } = e, [s, i] = Ye(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t;
2598
+ return {
2599
+ selected: a,
2600
+ select: (d, h, p) => {
2601
+ let v = d;
2602
+ return !r && a && a && c(d, a) && (v = void 0), o || i(v), o?.(v, d, h, p), v;
2603
+ },
2604
+ isSelected: (d) => a ? c(a, d) : !1
2605
+ };
2606
+ }
2607
+ function Na(e, t) {
2608
+ const n = Ca(e, t), r = Da(e, t), o = Sa(e, t);
2609
+ switch (e.mode) {
2610
+ case "single":
2611
+ return n;
2612
+ case "multiple":
2613
+ return r;
2614
+ case "range":
2615
+ return o;
2616
+ default:
2617
+ return;
2618
+ }
2619
+ }
2620
+ function R(e, t) {
2621
+ return e instanceof A && e.timeZone === t ? e : new A(e, t);
2622
+ }
2623
+ function le(e, t, n) {
2624
+ return R(e, t);
2625
+ }
2626
+ function kt(e, t, n) {
2627
+ return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? le(e, t) : Array.isArray(e) ? e.map((r) => r instanceof Date ? le(r, t) : r) : xe(e) ? {
2628
+ ...e,
2629
+ from: e.from ? R(e.from, t) : e.from,
2630
+ to: e.to ? R(e.to, t) : e.to
2631
+ } : Ze(e) ? {
2632
+ before: le(e.before, t),
2633
+ after: le(e.after, t)
2634
+ } : Ke(e) ? {
2635
+ after: le(e.after, t)
2636
+ } : Je(e) ? {
2637
+ before: le(e.before, t)
2638
+ } : e;
2639
+ }
2640
+ function $e(e, t, n) {
2641
+ return e && (Array.isArray(e) ? e.map((r) => kt(r, t)) : kt(e, t));
2642
+ }
2643
+ function xa(e) {
2644
+ let t = e;
2645
+ const n = t.timeZone;
2646
+ if (n && (t = {
2647
+ ...e,
2648
+ timeZone: n
2649
+ }, t.today && (t.today = R(t.today, n)), t.month && (t.month = R(t.month, n)), t.defaultMonth && (t.defaultMonth = R(t.defaultMonth, n)), t.startMonth && (t.startMonth = R(t.startMonth, n)), t.endMonth && (t.endMonth = R(t.endMonth, n)), t.mode === "single" && t.selected ? t.selected = R(t.selected, n) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((M) => R(M, n)) : t.mode === "range" && t.selected && (t.selected = {
2650
+ from: t.selected.from ? R(t.selected.from, n) : t.selected.from,
2651
+ to: t.selected.to ? R(t.selected.to, n) : t.selected.to
2652
+ }), t.disabled !== void 0 && (t.disabled = $e(t.disabled, n)), t.hidden !== void 0 && (t.hidden = $e(t.hidden, n)), t.modifiers)) {
2653
+ const M = {};
2654
+ Object.keys(t.modifiers).forEach((x) => {
2655
+ M[x] = $e(t.modifiers?.[x], n);
2656
+ }), t.modifiers = M;
2657
+ }
2658
+ const { components: r, formatters: o, labels: s, dateLib: i, locale: a, classNames: c } = Ne(() => {
2659
+ const M = { ...Bt, ...t.locale }, x = t.broadcastCalendar ? 1 : t.weekStartsOn, g = t.noonSafe && t.timeZone ? aa(t.timeZone, {
2660
+ weekStartsOn: x,
2661
+ locale: M
2662
+ }) : void 0, N = t.dateLib && g ? { ...g, ...t.dateLib } : t.dateLib ?? g, q = new j({
2663
+ locale: M,
2664
+ weekStartsOn: x,
2665
+ firstWeekContainsDate: t.firstWeekContainsDate,
2666
+ useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
2667
+ useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
2668
+ timeZone: t.timeZone,
2669
+ numerals: t.numerals
2670
+ }, N);
2671
+ return {
2672
+ dateLib: q,
2673
+ components: Ao(t.components),
2674
+ formatters: Vo(t.formatters),
2675
+ labels: ea(t.labels, q.options),
2676
+ locale: M,
2677
+ classNames: { ...Le(), ...t.classNames }
2678
+ };
2679
+ }, [
2680
+ t.locale,
2681
+ t.broadcastCalendar,
2682
+ t.weekStartsOn,
2683
+ t.firstWeekContainsDate,
2684
+ t.useAdditionalWeekYearTokens,
2685
+ t.useAdditionalDayOfYearTokens,
2686
+ t.timeZone,
2687
+ t.numerals,
2688
+ t.dateLib,
2689
+ t.noonSafe,
2690
+ t.components,
2691
+ t.formatters,
2692
+ t.labels,
2693
+ t.classNames
2694
+ ]);
2695
+ t.today || (t = { ...t, today: i.today() });
2696
+ const { captionLayout: u, mode: l, navLayout: d, numberOfMonths: h = 1, onDayBlur: p, onDayClick: v, onDayFocus: C, onDayKeyDown: k, onDayMouseEnter: O, onDayMouseLeave: T, onNextClick: w, onPrevClick: D, showWeekNumber: b, styles: m } = t, { formatCaption: W, formatDay: P, formatMonthDropdown: H, formatWeekNumber: B, formatWeekNumberHeader: Z, formatWeekdayName: ae, formatYearDropdown: ee } = o, G = pa(t, i), { days: ue, months: We, navStart: Te, navEnd: _e, previousMonth: Q, nextMonth: U, goToMonth: te } = G, Ee = Io(ue, t, Te, _e, i), { isSelected: Pe, select: Fe, selected: Se } = Na(t, i) ?? {}, { blur: nt, focused: rt, isFocusTarget: Lt, moveFocus: ot, setFocused: Ce } = ka(t, G, Ee, Pe ?? (() => !1), i), { labelDayButton: en, labelGridcell: tn, labelGrid: nn, labelMonthDropdown: rn, labelNav: at, labelPrevious: on, labelNext: an, labelWeekday: sn, labelWeekNumber: cn, labelWeekNumberHeader: un, labelYearDropdown: dn } = s, ln = Ne(() => ra(i, t.ISOWeek, t.broadcastCalendar, t.today), [i, t.ISOWeek, t.broadcastCalendar, t.today]), st = l !== void 0 || v !== void 0, Be = $(() => {
2697
+ Q && (te(Q), D?.(Q));
2698
+ }, [Q, te, D]), Ie = $(() => {
2699
+ U && (te(U), w?.(U));
2700
+ }, [te, U, w]), fn = $((M, x) => (g) => {
2701
+ g.preventDefault(), g.stopPropagation(), Ce(M), !x.disabled && (Fe?.(M.date, x, g), v?.(M.date, x, g));
2702
+ }, [Fe, v, Ce]), hn = $((M, x) => (g) => {
2703
+ Ce(M), C?.(M.date, x, g);
2704
+ }, [C, Ce]), mn = $((M, x) => (g) => {
2705
+ nt(), p?.(M.date, x, g);
2706
+ }, [nt, p]), yn = $((M, x) => (g) => {
2707
+ const N = {
2708
+ ArrowLeft: [
2709
+ g.shiftKey ? "month" : "day",
2710
+ t.dir === "rtl" ? "after" : "before"
2711
+ ],
2712
+ ArrowRight: [
2713
+ g.shiftKey ? "month" : "day",
2714
+ t.dir === "rtl" ? "before" : "after"
2715
+ ],
2716
+ ArrowDown: [g.shiftKey ? "year" : "week", "after"],
2717
+ ArrowUp: [g.shiftKey ? "year" : "week", "before"],
2718
+ PageUp: [g.shiftKey ? "year" : "month", "before"],
2719
+ PageDown: [g.shiftKey ? "year" : "month", "after"],
2720
+ Home: ["startOfWeek", "before"],
2721
+ End: ["endOfWeek", "after"]
2722
+ };
2723
+ if (N[g.key]) {
2724
+ g.preventDefault(), g.stopPropagation();
2725
+ const [q, S] = N[g.key];
2726
+ ot(q, S);
2727
+ }
2728
+ k?.(M.date, x, g);
2729
+ }, [ot, k, t.dir]), gn = $((M, x) => (g) => {
2730
+ O?.(M.date, x, g);
2731
+ }, [O]), bn = $((M, x) => (g) => {
2732
+ T?.(M.date, x, g);
2733
+ }, [T]), pn = $((M) => (x) => {
2734
+ const g = Number(x.target.value), N = i.setMonth(i.startOfMonth(M), g);
2735
+ te(N);
2736
+ }, [i, te]), wn = $((M) => (x) => {
2737
+ const g = Number(x.target.value), N = i.setYear(i.startOfMonth(M), g);
2738
+ te(N);
2739
+ }, [i, te]), { className: Mn, style: kn } = Ne(() => ({
2740
+ className: [c[y.Root], t.className].filter(Boolean).join(" "),
2741
+ style: { ...m?.[y.Root], ...t.style }
2742
+ }), [c, t.className, t.style, m]), Dn = qo(t), it = we(null);
2743
+ ua(it, !!t.animate, {
2744
+ classNames: c,
2745
+ months: We,
2746
+ focused: rt,
2747
+ dateLib: i
2748
+ });
2749
+ const vn = {
2750
+ dayPickerProps: t,
2751
+ selected: Se,
2752
+ select: Fe,
2753
+ isSelected: Pe,
2754
+ months: We,
2755
+ nextMonth: U,
2756
+ previousMonth: Q,
2757
+ goToMonth: te,
2758
+ getModifiers: Ee,
2759
+ components: r,
2760
+ classNames: c,
2761
+ styles: m,
2762
+ labels: s,
2763
+ formatters: o
2764
+ };
2765
+ return f.createElement(
2766
+ Ht.Provider,
2767
+ { value: vn },
2768
+ f.createElement(
2769
+ r.Root,
2770
+ { rootRef: t.animate ? it : void 0, className: Mn, style: kn, 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"], ...Dn },
2771
+ f.createElement(
2772
+ r.Months,
2773
+ { className: c[y.Months], style: m?.[y.Months] },
2774
+ !t.hideNavigation && !d && f.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": at(), onPreviousClick: Be, onNextClick: Ie, previousMonth: Q, nextMonth: U }),
2775
+ We.map((M, x) => f.createElement(
2776
+ r.Month,
2777
+ {
2778
+ "data-animated-month": t.animate ? "true" : void 0,
2779
+ className: c[y.Month],
2780
+ style: m?.[y.Month],
2781
+ // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
2782
+ key: x,
2783
+ displayIndex: x,
2784
+ calendarMonth: M
2785
+ },
2786
+ d === "around" && !t.hideNavigation && x === 0 && f.createElement(
2787
+ r.PreviousMonthButton,
2788
+ { type: "button", className: c[y.PreviousMonthButton], tabIndex: Q ? void 0 : -1, "aria-disabled": Q ? void 0 : !0, "aria-label": on(Q), onClick: Be, "data-animated-button": t.animate ? "true" : void 0 },
2789
+ f.createElement(r.Chevron, { disabled: Q ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
2790
+ ),
2791
+ f.createElement(r.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: M, displayIndex: x }, u?.startsWith("dropdown") ? f.createElement(
2792
+ r.DropdownNav,
2793
+ { className: c[y.Dropdowns], style: m?.[y.Dropdowns] },
2794
+ (() => {
2795
+ const g = u === "dropdown" || u === "dropdown-months" ? f.createElement(r.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": rn(), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: pn(M.date), options: ta(M.date, Te, _e, o, i), style: m?.[y.Dropdown], value: i.getMonth(M.date) }) : f.createElement("span", { key: "month" }, H(M.date, i)), N = u === "dropdown" || u === "dropdown-years" ? f.createElement(r.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": dn(i.options), classNames: c, components: r, disabled: !!t.disableNavigation, onChange: wn(M.date), options: oa(Te, _e, o, i, !!t.reverseYears), style: m?.[y.Dropdown], value: i.getYear(M.date) }) : f.createElement("span", { key: "year" }, ee(M.date, i));
2796
+ return i.getMonthYearOrder() === "year-first" ? [N, g] : [g, N];
2797
+ })(),
2798
+ f.createElement("span", { role: "status", "aria-live": "polite", style: {
2799
+ border: 0,
2800
+ clip: "rect(0 0 0 0)",
2801
+ height: "1px",
2802
+ margin: "-1px",
2803
+ overflow: "hidden",
2804
+ padding: 0,
2805
+ position: "absolute",
2806
+ width: "1px",
2807
+ whiteSpace: "nowrap",
2808
+ wordWrap: "normal"
2809
+ } }, W(M.date, i.options, i))
2810
+ ) : f.createElement(r.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(M.date, i.options, i))),
2811
+ d === "around" && !t.hideNavigation && x === h - 1 && f.createElement(
2812
+ r.NextMonthButton,
2813
+ { type: "button", className: c[y.NextMonthButton], tabIndex: U ? void 0 : -1, "aria-disabled": U ? void 0 : !0, "aria-label": an(U), onClick: Ie, "data-animated-button": t.animate ? "true" : void 0 },
2814
+ f.createElement(r.Chevron, { disabled: U ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
2815
+ ),
2816
+ x === h - 1 && d === "after" && !t.hideNavigation && f.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": at(), onPreviousClick: Be, onNextClick: Ie, previousMonth: Q, nextMonth: U }),
2817
+ f.createElement(
2818
+ r.MonthGrid,
2819
+ { role: "grid", "aria-multiselectable": l === "multiple" || l === "range", "aria-label": nn(M.date, i.options, i) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
2820
+ !t.hideWeekdays && f.createElement(
2821
+ r.Weekdays,
2822
+ { "data-animated-weekdays": t.animate ? "true" : void 0, className: c[y.Weekdays], style: m?.[y.Weekdays] },
2823
+ b && f.createElement(r.WeekNumberHeader, { "aria-label": un(i.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, Z()),
2824
+ ln.map((g) => f.createElement(r.Weekday, { "aria-label": sn(g, i.options, i), className: c[y.Weekday], key: String(g), style: m?.[y.Weekday], scope: "col" }, ae(g, i.options, i)))
2825
+ ),
2826
+ f.createElement(r.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, M.weeks.map((g) => f.createElement(
2827
+ r.Week,
2828
+ { className: c[y.Week], key: g.weekNumber, style: m?.[y.Week], week: g },
2829
+ b && f.createElement(r.WeekNumber, { week: g, style: m?.[y.WeekNumber], "aria-label": cn(g.weekNumber, {
2830
+ locale: a
2831
+ }), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, B(g.weekNumber, i)),
2832
+ g.days.map((N) => {
2833
+ const { date: q } = N, S = Ee(N);
2834
+ if (S[F.focused] = !S.hidden && !!rt?.isEqualTo(N), S[V.selected] = Pe?.(q) || S.selected, xe(Se)) {
2835
+ const { from: He, to: Ae } = Se;
2836
+ S[V.range_start] = !!(He && Ae && i.isSameDay(q, He)), S[V.range_end] = !!(He && Ae && i.isSameDay(q, Ae)), S[V.range_middle] = re(Se, q, !0, i);
2837
+ }
2838
+ const On = na(S, m, t.modifiersStyles), Wn = Ho(S, c, t.modifiersClassNames), Sn = !st && !S.hidden ? tn(q, S, i.options, i) : void 0;
2839
+ return f.createElement(r.Day, { key: `${N.isoDate}_${N.displayMonthId}`, day: N, modifiers: S, className: Wn.join(" "), style: On, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": Sn, "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 && st ? f.createElement(r.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: Lt(N) ? 0 : -1, "aria-label": en(q, S, i.options, i), onClick: fn(N, S), onBlur: mn(N, S), onFocus: hn(N, S), onKeyDown: yn(N, S), onMouseEnter: gn(N, S), onMouseLeave: bn(N, S) }, P(q, i.options, i)) : !S.hidden && P(N.date, i.options, i));
2840
+ })
2841
+ )))
2842
+ )
2843
+ ))
2844
+ ),
2845
+ t.footer && f.createElement(r.Footer, { className: c[y.Footer], style: m?.[y.Footer], role: "status", "aria-live": "polite" }, t.footer)
2846
+ )
2847
+ );
2848
+ }
2849
+ function Ya({
2850
+ className: e,
2851
+ rootRef: t,
2852
+ ...n
2853
+ }) {
2854
+ return /* @__PURE__ */ ne(
2855
+ "div",
2856
+ {
2857
+ className: e,
2858
+ "data-slot": "calendar",
2859
+ ref: t,
2860
+ ...n
2861
+ }
2862
+ );
2863
+ }
2864
+ function Ta({
2865
+ className: e,
2866
+ orientation: t,
2867
+ ...n
2868
+ }) {
2869
+ return t === "left" ? /* @__PURE__ */ ne(
2870
+ Nn,
2871
+ {
2872
+ className: Y("size-4", e),
2873
+ ...n
2874
+ }
2875
+ ) : t === "right" ? /* @__PURE__ */ ne(
2876
+ xn,
2877
+ {
2878
+ className: Y("size-4", e),
2879
+ ...n
2880
+ }
2881
+ ) : t === "up" ? /* @__PURE__ */ ne(Yn, { className: Y("size-4", e), ...n }) : /* @__PURE__ */ ne(Tn, { className: Y("size-4", e), ...n });
2882
+ }
2883
+ function _a({
2884
+ week: e,
2885
+ ...t
2886
+ }) {
2887
+ return /* @__PURE__ */ ne("th", { ...t, children: /* @__PURE__ */ ne("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: e.weekNumber }) });
2888
+ }
2889
+ function Aa({
2890
+ className: e,
2891
+ classNames: t,
2892
+ showOutsideDays: n = !0,
2893
+ captionLayout: r = "label",
2894
+ buttonVariant: o = "ghost",
2895
+ formatters: s,
2896
+ components: i,
2897
+ ...a
2898
+ }) {
2899
+ const c = Le();
2900
+ return /* @__PURE__ */ ne(
2901
+ xa,
2902
+ {
2903
+ captionLayout: r,
2904
+ className: Y(
2905
+ "group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
2906
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
2907
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
2908
+ e
2909
+ ),
2910
+ classNames: {
2911
+ root: Y("w-fit", c.root),
2912
+ months: Y(
2913
+ "relative flex flex-col gap-4 md:flex-row",
2914
+ c.months
2915
+ ),
2916
+ month: Y("flex w-full flex-col gap-4", c.month),
2917
+ nav: Y(
2918
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
2919
+ c.nav
2920
+ ),
2921
+ button_previous: Y(
2922
+ ct({ variant: o }),
2923
+ "size-(--cell-size) select-none p-0 aria-disabled:opacity-50",
2924
+ c.button_previous
2925
+ ),
2926
+ button_next: Y(
2927
+ ct({ variant: o }),
2928
+ "size-(--cell-size) select-none p-0 aria-disabled:opacity-50",
2929
+ c.button_next
2930
+ ),
2931
+ month_caption: Y(
2932
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
2933
+ c.month_caption
2934
+ ),
2935
+ dropdowns: Y(
2936
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium text-sm",
2937
+ c.dropdowns
2938
+ ),
2939
+ dropdown_root: Y(
2940
+ "relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
2941
+ c.dropdown_root
2942
+ ),
2943
+ dropdown: Y(
2944
+ "absolute inset-0 bg-popover opacity-0",
2945
+ c.dropdown
2946
+ ),
2947
+ caption_label: Y(
2948
+ "select-none font-medium",
2949
+ r === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
2950
+ c.caption_label
2951
+ ),
2952
+ table: "w-full border-collapse",
2953
+ weekdays: Y("flex", c.weekdays),
2954
+ weekday: Y(
2955
+ "flex-1 select-none rounded-md font-normal text-[0.8rem] text-muted-foreground",
2956
+ c.weekday
2957
+ ),
2958
+ week: Y("mt-2 flex w-full", c.week),
2959
+ week_number_header: Y(
2960
+ "w-(--cell-size) select-none",
2961
+ c.week_number_header
2962
+ ),
2963
+ week_number: Y(
2964
+ "select-none text-[0.8rem] text-muted-foreground",
2965
+ c.week_number
2966
+ ),
2967
+ day: Y(
2968
+ "group/day relative aspect-square h-full w-full select-none p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md",
2969
+ a.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
2970
+ c.day
2971
+ ),
2972
+ range_start: Y(
2973
+ "rounded-l-md bg-accent",
2974
+ c.range_start
2975
+ ),
2976
+ range_middle: Y("rounded-none", c.range_middle),
2977
+ range_end: Y("rounded-r-md bg-accent", c.range_end),
2978
+ today: Y(
2979
+ "rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
2980
+ c.today
2981
+ ),
2982
+ outside: Y(
2983
+ "text-muted-foreground aria-selected:text-muted-foreground",
2984
+ c.outside
2985
+ ),
2986
+ disabled: Y(
2987
+ "text-muted-foreground opacity-50",
2988
+ c.disabled
2989
+ ),
2990
+ hidden: Y("invisible", c.hidden),
2991
+ ...t
2992
+ },
2993
+ components: {
2994
+ Root: Ya,
2995
+ Chevron: Ta,
2996
+ DayButton: Ea,
2997
+ WeekNumber: _a,
2998
+ ...i
2999
+ },
3000
+ formatters: {
3001
+ formatMonthDropdown: (u) => u.toLocaleString("default", { month: "short" }),
3002
+ ...s
3003
+ },
3004
+ showOutsideDays: n,
3005
+ ...a
3006
+ }
3007
+ );
3008
+ }
3009
+ function Ea({
3010
+ className: e,
3011
+ day: t,
3012
+ modifiers: n,
3013
+ ...r
3014
+ }) {
3015
+ const o = Le(), s = we(null);
3016
+ return Dt(() => {
3017
+ n.focused && s.current?.focus();
3018
+ }, [n.focused]), /* @__PURE__ */ ne(
3019
+ Cn,
3020
+ {
3021
+ className: Y(
3022
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md data-[range-end=true]:bg-primary data-[range-middle=true]:bg-accent data-[range-start=true]:bg-primary data-[selected-single=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-primary-foreground group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
3023
+ o.day,
3024
+ e
3025
+ ),
3026
+ "data-day": t.date.toLocaleDateString(),
3027
+ "data-range-end": n.range_end,
3028
+ "data-range-middle": n.range_middle,
3029
+ "data-range-start": n.range_start,
3030
+ "data-selected-single": n.selected && !n.range_start && !n.range_end && !n.range_middle,
3031
+ ref: s,
3032
+ size: "icon",
3033
+ variant: "ghost",
3034
+ ...r
3035
+ }
3036
+ );
3037
+ }
3038
+ export {
3039
+ Aa as C,
3040
+ Ea as a,
3041
+ pe as f
3042
+ };