@enya-learning/nova 0.4.2 → 0.5.0

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