@alfadocs/ui-kit 1.3.13 → 1.4.1

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 (185) hide show
  1. package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
  2. package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
  3. package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-DZcrt8dP.js} +2141 -2069
  4. package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
  5. package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
  6. package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
  7. package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
  8. package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
  9. package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
  10. package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
  11. package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
  12. package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
  13. package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
  14. package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
  15. package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
  16. package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
  17. package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
  18. package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
  19. package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
  20. package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
  21. package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
  22. package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
  23. package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
  24. package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
  25. package/dist/_chunks/format-4HNwNGrN.js +1315 -0
  26. package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
  27. package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
  28. package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
  29. package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
  30. package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
  31. package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
  32. package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
  33. package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
  34. package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
  35. package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
  36. package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
  37. package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
  38. package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
  39. package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
  40. package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
  41. package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
  42. package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
  43. package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
  44. package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
  45. package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
  46. package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
  47. package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
  48. package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
  49. package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
  50. package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
  51. package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
  52. package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
  53. package/dist/_chunks/progress-CK8otcQ-.js +343 -0
  54. package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
  55. package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
  56. package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
  57. package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
  58. package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
  59. package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
  60. package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
  61. package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
  62. package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
  63. package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
  64. package/dist/_chunks/subDays-CAUv47M1.js +8 -0
  65. package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
  66. package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
  67. package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
  68. package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
  69. package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
  70. package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
  71. package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
  72. package/dist/agent-catalog.json +6426 -3382
  73. package/dist/agent-i18n/en.json +234 -15
  74. package/dist/components/agenda-card/index.js +1 -1
  75. package/dist/components/appointment-timeline/index.js +1 -1
  76. package/dist/components/bmi-calculator/index.js +1 -1
  77. package/dist/components/booking/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/care-plan-card/index.js +1 -1
  80. package/dist/components/care-plan-entry-card/index.js +1 -1
  81. package/dist/components/chat-container/chat-container.d.ts +14 -0
  82. package/dist/components/chat-container/index.js +1 -1
  83. package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
  84. package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
  85. package/dist/components/cycle-calculator/index.d.ts +1 -1
  86. package/dist/components/cycle-calculator/index.js +1 -1
  87. package/dist/components/data-table/index.js +1 -1
  88. package/dist/components/date-picker/index.js +1 -1
  89. package/dist/components/date-range-picker/index.js +1 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
  93. package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
  94. package/dist/components/due-date-calculator/index.d.ts +1 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
  97. package/dist/components/editor-overlay/index.js +1 -1
  98. package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
  99. package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
  100. package/dist/components/fetal-weight/index.d.ts +1 -1
  101. package/dist/components/fetal-weight/index.js +1 -1
  102. package/dist/components/freemium-paywall/index.js +1 -1
  103. package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
  104. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
  105. package/dist/components/gestational-age-calculator/index.d.ts +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
  108. package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
  109. package/dist/components/hcg-doubling/index.d.ts +1 -1
  110. package/dist/components/hcg-doubling/index.js +1 -1
  111. package/dist/components/header-settings/header-settings.d.ts +13 -1
  112. package/dist/components/header-settings/index.js +1 -1
  113. package/dist/components/locale-picker/index.js +1 -1
  114. package/dist/components/locale-picker/locale-picker.d.ts +9 -0
  115. package/dist/components/map-view/index.js +1 -1
  116. package/dist/components/map-view/map-view.d.ts +22 -0
  117. package/dist/components/notes-panel/index.js +1 -1
  118. package/dist/components/number-input/index.js +1 -1
  119. package/dist/components/number-input/number-input.d.ts +2 -1
  120. package/dist/components/optical-prescription/index.js +1 -1
  121. package/dist/components/patient-details/index.js +1 -1
  122. package/dist/components/patient-table/index.js +1 -1
  123. package/dist/components/payment-form/index.d.ts +1 -1
  124. package/dist/components/payment-form/index.js +1 -1
  125. package/dist/components/payment-form/payment-form.d.ts +32 -1
  126. package/dist/components/pdf-viewer/index.js +1 -1
  127. package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
  128. package/dist/components/practice-results/index.js +1 -1
  129. package/dist/components/pregnancy-dating/index.d.ts +1 -1
  130. package/dist/components/pregnancy-dating/index.js +1 -1
  131. package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
  132. package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
  133. package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
  134. package/dist/components/pregnancy-weight-gain/index.js +6 -5
  135. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
  136. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
  137. package/dist/components/progress/index.js +1 -1
  138. package/dist/components/progress/progress.d.ts +13 -0
  139. package/dist/components/radiograph-panel/index.js +1 -1
  140. package/dist/components/rich-text-editor/index.js +1 -1
  141. package/dist/components/session-countdown/index.js +1 -1
  142. package/dist/components/sign-document/index.js +1 -1
  143. package/dist/components/slot-grid/index.d.ts +2 -1
  144. package/dist/components/slot-grid/index.js +5 -4
  145. package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
  146. package/dist/components/slot-grid/slot-grid.d.ts +34 -0
  147. package/dist/components/sparkline/index.js +1 -1
  148. package/dist/components/sparkline/sparkline.d.ts +10 -0
  149. package/dist/components/tab-bar/index.js +1 -1
  150. package/dist/components/tab-bar/tab-bar.d.ts +13 -0
  151. package/dist/components/task-card/index.js +1 -1
  152. package/dist/components/unit-converter/index.js +1 -1
  153. package/dist/components/warning-stack/index.js +1 -1
  154. package/dist/index.js +630 -627
  155. package/dist/patterns/alia-assistant/index.js +1 -1
  156. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
  157. package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
  158. package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
  159. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
  160. package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
  161. package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
  162. package/dist/patterns/anamnesis/index.d.ts +3 -2
  163. package/dist/patterns/anamnesis/index.js +7 -6
  164. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  165. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
  166. package/dist/tokens.css +1 -1
  167. package/package.json +1 -1
  168. package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
  169. package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
  170. package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
  171. package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
  172. package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
  173. package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
  174. package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
  175. package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
  176. package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
  177. package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
  178. package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
  179. package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
  180. package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
  181. package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
  182. package/dist/_chunks/progress-DA413-zn.js +0 -299
  183. package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
  184. package/dist/_chunks/subDays-BcNi04uf.js +0 -8
  185. package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
@@ -0,0 +1,2089 @@
1
+ import m, { createContext as ln, useContext as cn, useCallback as G, useRef as be, useLayoutEffect as un, useState as Me, useEffect as dt, useMemo as pe } from "react";
2
+ import { t as B, c as V, n as De, o as hn, x as fe, f as le, d as ft, v as lt, u as ct, C as mn, b as yn, l as gn, r as vn, s as bn, D as pn } from "./format-4HNwNGrN.js";
3
+ import { jsx as Xe } from "react/jsx-runtime";
4
+ import { C as Mn } from "./chevron-left-B8cOyH-V.js";
5
+ import { C as Dn } from "./chevron-right-I9AeSxH2.js";
6
+ import { c as ne } from "./index-D2ZczOXr.js";
7
+ function kn(e, t, r = "long") {
8
+ return new Intl.DateTimeFormat("en-US", {
9
+ // Enforces engine to render the time. Without the option JavaScriptCore omits it.
10
+ hour: "numeric",
11
+ timeZone: e,
12
+ timeZoneName: r
13
+ }).format(t).split(/\s/g).slice(2).join(" ");
14
+ }
15
+ const Ye = {}, ce = {};
16
+ function se(e, t) {
17
+ try {
18
+ const n = (Ye[e] || (Ye[e] = new Intl.DateTimeFormat("en-US", {
19
+ timeZone: e,
20
+ timeZoneName: "longOffset"
21
+ }).format))(t).split("GMT")[1];
22
+ return n in ce ? ce[n] : Le(n, n.split(":"));
23
+ } catch {
24
+ if (e in ce) return ce[e];
25
+ const r = e == null ? void 0 : e.match(On);
26
+ return r ? Le(e, r.slice(1)) : NaN;
27
+ }
28
+ }
29
+ const On = /([+-]\d\d):?(\d\d)?/;
30
+ function Le(e, t) {
31
+ const r = +(t[0] || 0), n = +(t[1] || 0), s = +(t[2] || 0) / 60;
32
+ return ce[e] = r * 60 + n > 0 ? r * 60 + n + s : r * 60 - n - s;
33
+ }
34
+ class J extends Date {
35
+ //#region static
36
+ constructor(...t) {
37
+ super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(se(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)), ut(this), He(this)) : this.setTime(Date.now());
38
+ }
39
+ static tz(t, ...r) {
40
+ return r.length ? new J(...r, t) : new J(Date.now(), t);
41
+ }
42
+ //#endregion
43
+ //#region time zone
44
+ withTimeZone(t) {
45
+ return new J(+this, t);
46
+ }
47
+ getTimezoneOffset() {
48
+ const t = -se(this.timeZone, this);
49
+ return t > 0 ? Math.floor(t) : Math.ceil(t);
50
+ }
51
+ //#endregion
52
+ //#region time
53
+ setTime(t) {
54
+ return Date.prototype.setTime.apply(this, arguments), He(this), +this;
55
+ }
56
+ //#endregion
57
+ //#region date-fns integration
58
+ [Symbol.for("constructDateFrom")](t) {
59
+ return new J(+new Date(t), this.timeZone);
60
+ }
61
+ //#endregion
62
+ }
63
+ const et = /^(get|set)(?!UTC)/;
64
+ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
65
+ if (!et.test(e)) return;
66
+ const t = e.replace(et, "$1UTC");
67
+ J.prototype[t] && (e.startsWith("get") ? J.prototype[e] = function() {
68
+ return this.internal[t]();
69
+ } : (J.prototype[e] = function() {
70
+ return Date.prototype[t].apply(this.internal, arguments), wn(this), +this;
71
+ }, J.prototype[t] = function() {
72
+ return Date.prototype[t].apply(this, arguments), He(this), +this;
73
+ }));
74
+ });
75
+ function He(e) {
76
+ e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-se(e.timeZone, e) * 60));
77
+ }
78
+ function wn(e) {
79
+ 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()), ut(e);
80
+ }
81
+ function ut(e) {
82
+ const t = se(e.timeZone, e), r = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
83
+ n.setUTCHours(n.getUTCHours() - 1);
84
+ const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), o = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = s - o, i = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
85
+ a && i && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
86
+ const d = s - r;
87
+ d && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + d);
88
+ const f = /* @__PURE__ */ new Date(+e);
89
+ f.setUTCSeconds(0);
90
+ const l = s > 0 ? f.getSeconds() : (f.getSeconds() - 60) % 60, u = Math.round(-(se(e.timeZone, e) * 60)) % 60;
91
+ (u || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + l));
92
+ const y = se(e.timeZone, e), g = y > 0 ? Math.floor(y) : Math.ceil(y), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - g, D = g !== r, S = W - d;
93
+ if (D && S) {
94
+ Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + S);
95
+ const M = se(e.timeZone, e), b = M > 0 ? Math.floor(M) : Math.ceil(M), N = g - b;
96
+ N && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + N), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + N));
97
+ }
98
+ }
99
+ class F extends J {
100
+ //#region static
101
+ static tz(t, ...r) {
102
+ return r.length ? new F(...r, t) : new F(Date.now(), t);
103
+ }
104
+ //#endregion
105
+ //#region representation
106
+ toISOString() {
107
+ const [t, r, n] = this.tzComponents(), s = `${t}${r}:${n}`;
108
+ return this.internal.toISOString().slice(0, -1) + s;
109
+ }
110
+ toString() {
111
+ return `${this.toDateString()} ${this.toTimeString()}`;
112
+ }
113
+ toDateString() {
114
+ const [t, r, n, s] = this.internal.toUTCString().split(" ");
115
+ return `${t == null ? void 0 : t.slice(0, -1)} ${n} ${r} ${s}`;
116
+ }
117
+ toTimeString() {
118
+ const t = this.internal.toUTCString().split(" ")[4], [r, n, s] = this.tzComponents();
119
+ return `${t} GMT${r}${n}${s} (${kn(this.timeZone, this)})`;
120
+ }
121
+ toLocaleString(t, r) {
122
+ return Date.prototype.toLocaleString.call(this, t, {
123
+ ...r,
124
+ timeZone: (r == null ? void 0 : r.timeZone) || this.timeZone
125
+ });
126
+ }
127
+ toLocaleDateString(t, r) {
128
+ return Date.prototype.toLocaleDateString.call(this, t, {
129
+ ...r,
130
+ timeZone: (r == null ? void 0 : r.timeZone) || this.timeZone
131
+ });
132
+ }
133
+ toLocaleTimeString(t, r) {
134
+ return Date.prototype.toLocaleTimeString.call(this, t, {
135
+ ...r,
136
+ timeZone: (r == null ? void 0 : r.timeZone) || this.timeZone
137
+ });
138
+ }
139
+ //#endregion
140
+ //#region private
141
+ tzComponents() {
142
+ const t = this.getTimezoneOffset(), r = t > 0 ? "-" : "+", n = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), s = String(Math.abs(t) % 60).padStart(2, "0");
143
+ return [r, n, s];
144
+ }
145
+ //#endregion
146
+ withTimeZone(t) {
147
+ return new F(+this, t);
148
+ }
149
+ //#region date-fns integration
150
+ [Symbol.for("constructDateFrom")](t) {
151
+ return new F(+new Date(t), this.timeZone);
152
+ }
153
+ //#endregion
154
+ }
155
+ function ht(e, t, r) {
156
+ const n = B(e, r == null ? void 0 : r.in);
157
+ return isNaN(t) ? V((r == null ? void 0 : r.in) || e, NaN) : (t && n.setDate(n.getDate() + t), n);
158
+ }
159
+ function mt(e, t, r) {
160
+ const n = B(e, r == null ? void 0 : r.in);
161
+ if (isNaN(t)) return V(e, NaN);
162
+ if (!t)
163
+ return n;
164
+ const s = n.getDate(), o = V(e, n.getTime());
165
+ o.setMonth(n.getMonth() + t + 1, 0);
166
+ const a = o.getDate();
167
+ return s >= a ? o : (n.setFullYear(
168
+ o.getFullYear(),
169
+ o.getMonth(),
170
+ s
171
+ ), n);
172
+ }
173
+ function Wn(e, t, r) {
174
+ return ht(e, t * 7, r);
175
+ }
176
+ function Nn(e, t, r) {
177
+ return mt(e, t * 12, r);
178
+ }
179
+ function Cn(e, t) {
180
+ let r, n = t == null ? void 0 : t.in;
181
+ return e.forEach((s) => {
182
+ !n && typeof s == "object" && (n = V.bind(null, s));
183
+ const o = B(s, n);
184
+ (!r || r < o || isNaN(+o)) && (r = o);
185
+ }), V(n, r || NaN);
186
+ }
187
+ function Sn(e, t) {
188
+ let r, n = t == null ? void 0 : t.in;
189
+ return e.forEach((s) => {
190
+ !n && typeof s == "object" && (n = V.bind(null, s));
191
+ const o = B(s, n);
192
+ (!r || r > o || isNaN(+o)) && (r = o);
193
+ }), V(n, r || NaN);
194
+ }
195
+ function yt(e, t, r) {
196
+ const [n, s] = De(
197
+ r == null ? void 0 : r.in,
198
+ e,
199
+ t
200
+ ), o = n.getFullYear() - s.getFullYear(), a = n.getMonth() - s.getMonth();
201
+ return o * 12 + a;
202
+ }
203
+ function _n(e, t) {
204
+ const r = B(e, t == null ? void 0 : t.in), n = r.getMonth();
205
+ return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(23, 59, 59, 999), r;
206
+ }
207
+ function gt(e, t) {
208
+ const [r, n] = De(e, t.start, t.end);
209
+ return { start: r, end: n };
210
+ }
211
+ function xn(e, t) {
212
+ const { start: r, end: n } = gt(t == null ? void 0 : t.in, e);
213
+ let s = +r > +n;
214
+ const o = s ? +r : +n, a = s ? n : r;
215
+ a.setHours(0, 0, 0, 0), a.setDate(1);
216
+ let i = 1;
217
+ const d = [];
218
+ for (; +a <= o; )
219
+ d.push(V(r, a)), a.setMonth(a.getMonth() + i);
220
+ return s ? d.reverse() : d;
221
+ }
222
+ function Yn(e, t) {
223
+ const r = B(e, t == null ? void 0 : t.in);
224
+ return r.setDate(1), r.setHours(0, 0, 0, 0), r;
225
+ }
226
+ function Tn(e, t) {
227
+ const r = B(e, t == null ? void 0 : t.in), n = r.getFullYear();
228
+ return r.setFullYear(n + 1, 0, 0), r.setHours(23, 59, 59, 999), r;
229
+ }
230
+ function En(e, t) {
231
+ const { start: r, end: n } = gt(t == null ? void 0 : t.in, e);
232
+ let s = +r > +n;
233
+ const o = s ? +r : +n, a = s ? n : r;
234
+ a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
235
+ let i = 1;
236
+ const d = [];
237
+ for (; +a <= o; )
238
+ d.push(V(r, a)), a.setFullYear(a.getFullYear() + i);
239
+ return s ? d.reverse() : d;
240
+ }
241
+ function vt(e, t) {
242
+ var i, d, f, l;
243
+ const r = hn(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.weekStartsOn) ?? r.weekStartsOn ?? ((l = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : l.weekStartsOn) ?? 0, s = B(e, t == null ? void 0 : t.in), o = s.getDay(), a = (o < n ? -7 : 0) + 6 - (o - n);
244
+ return s.setDate(s.getDate() + a), s.setHours(23, 59, 59, 999), s;
245
+ }
246
+ function In(e, t) {
247
+ return vt(e, { ...t, weekStartsOn: 1 });
248
+ }
249
+ function Bn(e, t) {
250
+ const r = B(e, t == null ? void 0 : t.in), n = r.getFullYear(), s = r.getMonth(), o = V(r, 0);
251
+ return o.setFullYear(n, s + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
252
+ }
253
+ function Fn(e, t) {
254
+ return B(e, t == null ? void 0 : t.in).getMonth();
255
+ }
256
+ function zn(e, t) {
257
+ return B(e, t == null ? void 0 : t.in).getFullYear();
258
+ }
259
+ function An(e, t) {
260
+ return +B(e) > +B(t);
261
+ }
262
+ function Pn(e, t) {
263
+ return +B(e) < +B(t);
264
+ }
265
+ function Hn(e, t, r) {
266
+ const [n, s] = De(
267
+ r == null ? void 0 : r.in,
268
+ e,
269
+ t
270
+ );
271
+ return n.getFullYear() === s.getFullYear() && n.getMonth() === s.getMonth();
272
+ }
273
+ function jn(e, t, r) {
274
+ const [n, s] = De(
275
+ r == null ? void 0 : r.in,
276
+ e,
277
+ t
278
+ );
279
+ return n.getFullYear() === s.getFullYear();
280
+ }
281
+ function $n(e, t, r) {
282
+ const n = B(e, r == null ? void 0 : r.in), s = n.getFullYear(), o = n.getDate(), a = V(e, 0);
283
+ a.setFullYear(s, t, 15), a.setHours(0, 0, 0, 0);
284
+ const i = Bn(a);
285
+ return n.setMonth(t, Math.min(o, i)), n;
286
+ }
287
+ function Gn(e, t, r) {
288
+ const n = B(e, r == null ? void 0 : r.in);
289
+ return isNaN(+n) ? V(e, NaN) : (n.setFullYear(t), n);
290
+ }
291
+ const tt = 5, qn = 4;
292
+ function Vn(e, t) {
293
+ const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, s = t.addDays(e, -n + 1), o = t.addDays(s, tt * 7 - 1);
294
+ return t.getMonth(e) === t.getMonth(o) ? tt : qn;
295
+ }
296
+ function bt(e, t) {
297
+ const r = t.startOfMonth(e), n = r.getDay();
298
+ return n === 1 ? r : n === 0 ? t.addDays(r, -6) : t.addDays(r, -1 * (n - 1));
299
+ }
300
+ function Rn(e, t) {
301
+ const r = bt(e, t), n = Vn(e, t);
302
+ return t.addDays(r, n * 7 - 1);
303
+ }
304
+ const pt = {
305
+ ...fe,
306
+ labels: {
307
+ labelDayButton: (e, t, r, n) => {
308
+ let s;
309
+ n && typeof n.format == "function" ? s = n.format.bind(n) : s = (a, i) => le(a, i, { locale: fe, ...r });
310
+ let o = s(e, "PPPP");
311
+ return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
312
+ },
313
+ labelMonthDropdown: "Choose the Month",
314
+ labelNext: "Go to the Next Month",
315
+ labelPrevious: "Go to the Previous Month",
316
+ labelWeekNumber: (e) => `Week ${e}`,
317
+ labelYearDropdown: "Choose the Year",
318
+ labelGrid: (e, t, r) => {
319
+ let n;
320
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (s, o) => le(s, o, { locale: fe, ...t }), n(e, "LLLL yyyy");
321
+ },
322
+ labelGridcell: (e, t, r, n) => {
323
+ let s;
324
+ n && typeof n.format == "function" ? s = n.format.bind(n) : s = (a, i) => le(a, i, { locale: fe, ...r });
325
+ let o = s(e, "PPPP");
326
+ return t != null && t.today && (o = `Today, ${o}`), o;
327
+ },
328
+ labelNav: "Navigation bar",
329
+ labelWeekNumberHeader: "Week Number",
330
+ labelWeekday: (e, t, r) => {
331
+ let n;
332
+ return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (s, o) => le(s, o, { locale: fe, ...t }), n(e, "cccc");
333
+ }
334
+ }
335
+ };
336
+ class H {
337
+ /**
338
+ * Creates an instance of `DateLib`.
339
+ *
340
+ * @param options Configuration options for the date library.
341
+ * @param overrides Custom overrides for the date library functions.
342
+ */
343
+ constructor(t, r) {
344
+ this.Date = Date, this.today = () => {
345
+ var n;
346
+ return (n = this.overrides) != null && n.today ? this.overrides.today() : this.options.timeZone ? F.tz(this.options.timeZone) : new this.Date();
347
+ }, this.newDate = (n, s, o) => {
348
+ var a;
349
+ return (a = this.overrides) != null && a.newDate ? this.overrides.newDate(n, s, o) : this.options.timeZone ? new F(n, s, o, this.options.timeZone) : new Date(n, s, o);
350
+ }, this.addDays = (n, s) => {
351
+ var o;
352
+ return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(n, s) : ht(n, s);
353
+ }, this.addMonths = (n, s) => {
354
+ var o;
355
+ return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(n, s) : mt(n, s);
356
+ }, this.addWeeks = (n, s) => {
357
+ var o;
358
+ return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(n, s) : Wn(n, s);
359
+ }, this.addYears = (n, s) => {
360
+ var o;
361
+ return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(n, s) : Nn(n, s);
362
+ }, this.differenceInCalendarDays = (n, s) => {
363
+ var o;
364
+ return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, s) : ft(n, s);
365
+ }, this.differenceInCalendarMonths = (n, s) => {
366
+ var o;
367
+ return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, s) : yt(n, s);
368
+ }, this.eachMonthOfInterval = (n) => {
369
+ var s;
370
+ return (s = this.overrides) != null && s.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : xn(n);
371
+ }, this.eachYearOfInterval = (n) => {
372
+ var i;
373
+ const s = (i = this.overrides) != null && i.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : En(n), o = new Set(s.map((d) => this.getYear(d)));
374
+ if (o.size === s.length)
375
+ return s;
376
+ const a = [];
377
+ return o.forEach((d) => {
378
+ a.push(new Date(d, 0, 1));
379
+ }), a;
380
+ }, this.endOfBroadcastWeek = (n) => {
381
+ var s;
382
+ return (s = this.overrides) != null && s.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : Rn(n, this);
383
+ }, this.endOfISOWeek = (n) => {
384
+ var s;
385
+ return (s = this.overrides) != null && s.endOfISOWeek ? this.overrides.endOfISOWeek(n) : In(n);
386
+ }, this.endOfMonth = (n) => {
387
+ var s;
388
+ return (s = this.overrides) != null && s.endOfMonth ? this.overrides.endOfMonth(n) : _n(n);
389
+ }, this.endOfWeek = (n, s) => {
390
+ var o;
391
+ return (o = this.overrides) != null && o.endOfWeek ? this.overrides.endOfWeek(n, s) : vt(n, this.options);
392
+ }, this.endOfYear = (n) => {
393
+ var s;
394
+ return (s = this.overrides) != null && s.endOfYear ? this.overrides.endOfYear(n) : Tn(n);
395
+ }, this.format = (n, s, o) => {
396
+ var i;
397
+ const a = (i = this.overrides) != null && i.format ? this.overrides.format(n, s, this.options) : le(n, s, this.options);
398
+ return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
399
+ }, this.getISOWeek = (n) => {
400
+ var s;
401
+ return (s = this.overrides) != null && s.getISOWeek ? this.overrides.getISOWeek(n) : lt(n);
402
+ }, this.getMonth = (n, s) => {
403
+ var o;
404
+ return (o = this.overrides) != null && o.getMonth ? this.overrides.getMonth(n, this.options) : Fn(n, this.options);
405
+ }, this.getYear = (n, s) => {
406
+ var o;
407
+ return (o = this.overrides) != null && o.getYear ? this.overrides.getYear(n, this.options) : zn(n, this.options);
408
+ }, this.getWeek = (n, s) => {
409
+ var o;
410
+ return (o = this.overrides) != null && o.getWeek ? this.overrides.getWeek(n, this.options) : ct(n, this.options);
411
+ }, this.isAfter = (n, s) => {
412
+ var o;
413
+ return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(n, s) : An(n, s);
414
+ }, this.isBefore = (n, s) => {
415
+ var o;
416
+ return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(n, s) : Pn(n, s);
417
+ }, this.isDate = (n) => {
418
+ var s;
419
+ return (s = this.overrides) != null && s.isDate ? this.overrides.isDate(n) : mn(n);
420
+ }, this.isSameDay = (n, s) => {
421
+ var o;
422
+ return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(n, s) : yn(n, s);
423
+ }, this.isSameMonth = (n, s) => {
424
+ var o;
425
+ return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(n, s) : Hn(n, s);
426
+ }, this.isSameYear = (n, s) => {
427
+ var o;
428
+ return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(n, s) : jn(n, s);
429
+ }, this.max = (n) => {
430
+ var s;
431
+ return (s = this.overrides) != null && s.max ? this.overrides.max(n) : Cn(n);
432
+ }, this.min = (n) => {
433
+ var s;
434
+ return (s = this.overrides) != null && s.min ? this.overrides.min(n) : Sn(n);
435
+ }, this.setMonth = (n, s) => {
436
+ var o;
437
+ return (o = this.overrides) != null && o.setMonth ? this.overrides.setMonth(n, s) : $n(n, s);
438
+ }, this.setYear = (n, s) => {
439
+ var o;
440
+ return (o = this.overrides) != null && o.setYear ? this.overrides.setYear(n, s) : Gn(n, s);
441
+ }, this.startOfBroadcastWeek = (n, s) => {
442
+ var o;
443
+ return (o = this.overrides) != null && o.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : bt(n, this);
444
+ }, this.startOfDay = (n) => {
445
+ var s;
446
+ return (s = this.overrides) != null && s.startOfDay ? this.overrides.startOfDay(n) : gn(n);
447
+ }, this.startOfISOWeek = (n) => {
448
+ var s;
449
+ return (s = this.overrides) != null && s.startOfISOWeek ? this.overrides.startOfISOWeek(n) : vn(n);
450
+ }, this.startOfMonth = (n) => {
451
+ var s;
452
+ return (s = this.overrides) != null && s.startOfMonth ? this.overrides.startOfMonth(n) : Yn(n);
453
+ }, this.startOfWeek = (n, s) => {
454
+ var o;
455
+ return (o = this.overrides) != null && o.startOfWeek ? this.overrides.startOfWeek(n, this.options) : bn(n, this.options);
456
+ }, this.startOfYear = (n) => {
457
+ var s;
458
+ return (s = this.overrides) != null && s.startOfYear ? this.overrides.startOfYear(n) : pn(n);
459
+ }, this.options = { locale: pt, ...t }, this.overrides = r;
460
+ }
461
+ /**
462
+ * Generates a mapping of Arabic digits (0-9) to the target numbering system
463
+ * digits.
464
+ *
465
+ * @since 9.5.0
466
+ * @returns A record mapping Arabic digits to the target numerals.
467
+ */
468
+ getDigitMap() {
469
+ const { numerals: t = "latn" } = this.options, r = new Intl.NumberFormat("en-US", {
470
+ numberingSystem: t
471
+ }), n = {};
472
+ for (let s = 0; s < 10; s++)
473
+ n[s.toString()] = r.format(s);
474
+ return n;
475
+ }
476
+ /**
477
+ * Replaces Arabic digits in a string with the target numbering system digits.
478
+ *
479
+ * @since 9.5.0
480
+ * @param input The string containing Arabic digits.
481
+ * @returns The string with digits replaced.
482
+ */
483
+ replaceDigits(t) {
484
+ const r = this.getDigitMap();
485
+ return t.replace(/\d/g, (n) => r[n] || n);
486
+ }
487
+ /**
488
+ * Formats a number using the configured numbering system.
489
+ *
490
+ * @since 9.5.0
491
+ * @param value The number to format.
492
+ * @returns The formatted number as a string.
493
+ */
494
+ formatNumber(t) {
495
+ return this.replaceDigits(t.toString());
496
+ }
497
+ /**
498
+ * Returns the preferred ordering for month and year labels for the current
499
+ * locale.
500
+ */
501
+ getMonthYearOrder() {
502
+ var r;
503
+ const t = (r = this.options.locale) == null ? void 0 : r.code;
504
+ return t && H.yearFirstLocales.has(t) ? "year-first" : "month-first";
505
+ }
506
+ /**
507
+ * Formats the month/year pair respecting locale conventions.
508
+ *
509
+ * @since 9.11.0
510
+ */
511
+ formatMonthYear(t) {
512
+ const { locale: r, timeZone: n, numerals: s } = this.options, o = r == null ? void 0 : r.code;
513
+ if (o && H.yearFirstLocales.has(o))
514
+ try {
515
+ return new Intl.DateTimeFormat(o, {
516
+ month: "long",
517
+ year: "numeric",
518
+ timeZone: n,
519
+ numberingSystem: s
520
+ }).format(t);
521
+ } catch {
522
+ }
523
+ const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
524
+ return this.format(t, a);
525
+ }
526
+ }
527
+ H.yearFirstLocales = /* @__PURE__ */ new Set([
528
+ "eu",
529
+ "hu",
530
+ "ja",
531
+ "ja-Hira",
532
+ "ja-JP",
533
+ "ko",
534
+ "ko-KR",
535
+ "lt",
536
+ "lt-LT",
537
+ "lv",
538
+ "lv-LV",
539
+ "mn",
540
+ "mn-MN",
541
+ "zh",
542
+ "zh-CN",
543
+ "zh-HK",
544
+ "zh-TW"
545
+ ]);
546
+ const Q = new H();
547
+ class Mt {
548
+ constructor(t, r, n = Q) {
549
+ this.date = t, this.displayMonth = r, this.outside = !!(r && !n.isSameMonth(t, r)), this.dateLib = n, this.isoDate = n.format(t, "yyyy-MM-dd"), this.displayMonthId = n.format(r, "yyyy-MM"), this.dateMonthId = n.format(t, "yyyy-MM");
550
+ }
551
+ /**
552
+ * Checks if this day is equal to another `CalendarDay`, considering both the
553
+ * date and the displayed month.
554
+ *
555
+ * @param day The `CalendarDay` to compare with.
556
+ * @returns `true` if the days are equal, otherwise `false`.
557
+ */
558
+ isEqualTo(t) {
559
+ return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
560
+ }
561
+ }
562
+ class Un {
563
+ constructor(t, r) {
564
+ this.date = t, this.weeks = r;
565
+ }
566
+ }
567
+ class Kn {
568
+ constructor(t, r) {
569
+ this.days = r, this.weekNumber = t;
570
+ }
571
+ }
572
+ function Zn(e) {
573
+ return m.createElement("button", { ...e });
574
+ }
575
+ function Jn(e) {
576
+ return m.createElement("span", { ...e });
577
+ }
578
+ function Qn(e) {
579
+ const { size: t = 24, orientation: r = "left", className: n } = e;
580
+ return (
581
+ // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
582
+ m.createElement(
583
+ "svg",
584
+ { className: n, width: t, height: t, viewBox: "0 0 24 24" },
585
+ r === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
586
+ r === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
587
+ r === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
588
+ r === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
589
+ )
590
+ );
591
+ }
592
+ function Xn(e) {
593
+ const { day: t, modifiers: r, ...n } = e;
594
+ return m.createElement("td", { ...n });
595
+ }
596
+ function Ln(e) {
597
+ const { day: t, modifiers: r, ...n } = e, s = m.useRef(null);
598
+ return m.useEffect(() => {
599
+ var o;
600
+ r.focused && ((o = s.current) == null || o.focus());
601
+ }, [r.focused]), m.createElement("button", { ref: s, ...n });
602
+ }
603
+ var h;
604
+ (function(e) {
605
+ 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";
606
+ })(h || (h = {}));
607
+ var Y;
608
+ (function(e) {
609
+ e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
610
+ })(Y || (Y = {}));
611
+ var z;
612
+ (function(e) {
613
+ e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
614
+ })(z || (z = {}));
615
+ var P;
616
+ (function(e) {
617
+ 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";
618
+ })(P || (P = {}));
619
+ function er(e) {
620
+ const { options: t, className: r, components: n, classNames: s, ...o } = e, a = [s[h.Dropdown], r].join(" "), i = t == null ? void 0 : t.find(({ value: d }) => d === o.value);
621
+ return m.createElement(
622
+ "span",
623
+ { "data-disabled": o.disabled, className: s[h.DropdownRoot] },
624
+ m.createElement(n.Select, { className: a, ...o }, t == null ? void 0 : t.map(({ value: d, label: f, disabled: l }) => m.createElement(n.Option, { key: d, value: d, disabled: l }, f))),
625
+ m.createElement(
626
+ "span",
627
+ { className: s[h.CaptionLabel], "aria-hidden": !0 },
628
+ i == null ? void 0 : i.label,
629
+ m.createElement(n.Chevron, { orientation: "down", size: 18, className: s[h.Chevron] })
630
+ )
631
+ );
632
+ }
633
+ function tr(e) {
634
+ return m.createElement("div", { ...e });
635
+ }
636
+ function nr(e) {
637
+ return m.createElement("div", { ...e });
638
+ }
639
+ function rr(e) {
640
+ const { calendarMonth: t, displayIndex: r, ...n } = e;
641
+ return m.createElement("div", { ...n }, e.children);
642
+ }
643
+ function sr(e) {
644
+ const { calendarMonth: t, displayIndex: r, ...n } = e;
645
+ return m.createElement("div", { ...n });
646
+ }
647
+ function or(e) {
648
+ return m.createElement("table", { ...e });
649
+ }
650
+ function ar(e) {
651
+ return m.createElement("div", { ...e });
652
+ }
653
+ const Dt = ln(void 0);
654
+ function ue() {
655
+ const e = cn(Dt);
656
+ if (e === void 0)
657
+ throw new Error("useDayPicker() must be used within a custom component.");
658
+ return e;
659
+ }
660
+ function ir(e) {
661
+ const { components: t } = ue();
662
+ return m.createElement(t.Dropdown, { ...e });
663
+ }
664
+ function dr(e) {
665
+ const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: s, ...o } = e, { components: a, classNames: i, labels: { labelPrevious: d, labelNext: f } } = ue(), l = G((y) => {
666
+ s && (r == null || r(y));
667
+ }, [s, r]), u = G((y) => {
668
+ n && (t == null || t(y));
669
+ }, [n, t]);
670
+ return m.createElement(
671
+ "nav",
672
+ { ...o },
673
+ m.createElement(
674
+ a.PreviousMonthButton,
675
+ { type: "button", className: i[h.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": d(n), onClick: u },
676
+ m.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: i[h.Chevron], orientation: "left" })
677
+ ),
678
+ m.createElement(
679
+ a.NextMonthButton,
680
+ { type: "button", className: i[h.NextMonthButton], tabIndex: s ? void 0 : -1, "aria-disabled": s ? void 0 : !0, "aria-label": f(s), onClick: l },
681
+ m.createElement(a.Chevron, { disabled: s ? void 0 : !0, orientation: "right", className: i[h.Chevron] })
682
+ )
683
+ );
684
+ }
685
+ function fr(e) {
686
+ const { components: t } = ue();
687
+ return m.createElement(t.Button, { ...e });
688
+ }
689
+ function lr(e) {
690
+ return m.createElement("option", { ...e });
691
+ }
692
+ function cr(e) {
693
+ const { components: t } = ue();
694
+ return m.createElement(t.Button, { ...e });
695
+ }
696
+ function ur(e) {
697
+ const { rootRef: t, ...r } = e;
698
+ return m.createElement("div", { ...r, ref: t });
699
+ }
700
+ function hr(e) {
701
+ return m.createElement("select", { ...e });
702
+ }
703
+ function mr(e) {
704
+ const { week: t, ...r } = e;
705
+ return m.createElement("tr", { ...r });
706
+ }
707
+ function yr(e) {
708
+ return m.createElement("th", { ...e });
709
+ }
710
+ function gr(e) {
711
+ return m.createElement(
712
+ "thead",
713
+ { "aria-hidden": !0 },
714
+ m.createElement("tr", { ...e })
715
+ );
716
+ }
717
+ function vr(e) {
718
+ const { week: t, ...r } = e;
719
+ return m.createElement("th", { ...r });
720
+ }
721
+ function br(e) {
722
+ return m.createElement("th", { ...e });
723
+ }
724
+ function pr(e) {
725
+ return m.createElement("tbody", { ...e });
726
+ }
727
+ function Mr(e) {
728
+ const { components: t } = ue();
729
+ return m.createElement(t.Dropdown, { ...e });
730
+ }
731
+ const Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
732
+ __proto__: null,
733
+ Button: Zn,
734
+ CaptionLabel: Jn,
735
+ Chevron: Qn,
736
+ Day: Xn,
737
+ DayButton: Ln,
738
+ Dropdown: er,
739
+ DropdownNav: tr,
740
+ Footer: nr,
741
+ Month: rr,
742
+ MonthCaption: sr,
743
+ MonthGrid: or,
744
+ Months: ar,
745
+ MonthsDropdown: ir,
746
+ Nav: dr,
747
+ NextMonthButton: fr,
748
+ Option: lr,
749
+ PreviousMonthButton: cr,
750
+ Root: ur,
751
+ Select: hr,
752
+ Week: mr,
753
+ WeekNumber: vr,
754
+ WeekNumberHeader: br,
755
+ Weekday: yr,
756
+ Weekdays: gr,
757
+ Weeks: pr,
758
+ YearsDropdown: Mr
759
+ }, Symbol.toStringTag, { value: "Module" }));
760
+ function ee(e, t, r = !1, n = Q) {
761
+ let { from: s, to: o } = e;
762
+ const { differenceInCalendarDays: a, isSameDay: i } = n;
763
+ return s && o ? (a(o, s) < 0 && ([s, o] = [o, s]), a(t, s) >= (r ? 1 : 0) && a(o, t) >= (r ? 1 : 0)) : !r && o ? i(o, t) : !r && s ? i(s, t) : !1;
764
+ }
765
+ function je(e) {
766
+ return !!(e && typeof e == "object" && "before" in e && "after" in e);
767
+ }
768
+ function ke(e) {
769
+ return !!(e && typeof e == "object" && "from" in e);
770
+ }
771
+ function $e(e) {
772
+ return !!(e && typeof e == "object" && "after" in e);
773
+ }
774
+ function Ge(e) {
775
+ return !!(e && typeof e == "object" && "before" in e);
776
+ }
777
+ function kt(e) {
778
+ return !!(e && typeof e == "object" && "dayOfWeek" in e);
779
+ }
780
+ function Ot(e, t) {
781
+ return Array.isArray(e) && e.every(t.isDate);
782
+ }
783
+ function te(e, t, r = Q) {
784
+ const n = Array.isArray(t) ? t : [t], { isSameDay: s, differenceInCalendarDays: o, isAfter: a } = r;
785
+ return n.some((i) => {
786
+ if (typeof i == "boolean")
787
+ return i;
788
+ if (r.isDate(i))
789
+ return s(e, i);
790
+ if (Ot(i, r))
791
+ return i.some((d) => s(e, d));
792
+ if (ke(i))
793
+ return ee(i, e, !1, r);
794
+ if (kt(i))
795
+ return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
796
+ if (je(i)) {
797
+ const d = o(i.before, e), f = o(i.after, e), l = d > 0, u = f < 0;
798
+ return a(i.before, i.after) ? u && l : l || u;
799
+ }
800
+ return $e(i) ? o(e, i.after) > 0 : Ge(i) ? o(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
801
+ });
802
+ }
803
+ function kr(e, t, r, n, s) {
804
+ const { disabled: o, hidden: a, modifiers: i, showOutsideDays: d, broadcastCalendar: f, today: l = s.today() } = t, { isSameDay: u, isSameMonth: y, startOfMonth: g, isBefore: O, endOfMonth: W, isAfter: D } = s, S = r && g(r), M = n && W(n), b = {
805
+ [Y.focused]: [],
806
+ [Y.outside]: [],
807
+ [Y.disabled]: [],
808
+ [Y.hidden]: [],
809
+ [Y.today]: []
810
+ }, N = {};
811
+ for (const p of e) {
812
+ const { date: c, displayMonth: w } = p, T = !!(w && !y(c, w)), I = !!(S && O(c, S)), E = !!(M && D(c, M)), j = !!(o && te(c, o, s)), re = !!(a && te(c, a, s)) || I || E || // Broadcast calendar will show outside days as default
813
+ !f && !d && T || f && d === !1 && T, X = u(c, l);
814
+ T && b.outside.push(p), j && b.disabled.push(p), re && b.hidden.push(p), X && b.today.push(p), i && Object.keys(i).forEach(($) => {
815
+ const oe = i == null ? void 0 : i[$];
816
+ oe && te(c, oe, s) && (N[$] ? N[$].push(p) : N[$] = [p]);
817
+ });
818
+ }
819
+ return (p) => {
820
+ const c = {
821
+ [Y.focused]: !1,
822
+ [Y.disabled]: !1,
823
+ [Y.hidden]: !1,
824
+ [Y.outside]: !1,
825
+ [Y.today]: !1
826
+ }, w = {};
827
+ for (const T in b) {
828
+ const I = b[T];
829
+ c[T] = I.some((E) => E === p);
830
+ }
831
+ for (const T in N)
832
+ w[T] = N[T].some((I) => I === p);
833
+ return {
834
+ ...c,
835
+ // custom modifiers should override all the previous ones
836
+ ...w
837
+ };
838
+ };
839
+ }
840
+ function Or(e, t, r = {}) {
841
+ return Object.entries(e).filter(([, s]) => s === !0).reduce((s, [o]) => (r[o] ? s.push(r[o]) : t[Y[o]] ? s.push(t[Y[o]]) : t[z[o]] && s.push(t[z[o]]), s), [t[h.Day]]);
842
+ }
843
+ function wr(e) {
844
+ return {
845
+ ...Dr,
846
+ ...e
847
+ };
848
+ }
849
+ function Wr(e) {
850
+ const t = {
851
+ "data-mode": e.mode ?? void 0,
852
+ "data-required": "required" in e ? e.required : void 0,
853
+ "data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
854
+ "data-week-numbers": e.showWeekNumber || void 0,
855
+ "data-broadcast-calendar": e.broadcastCalendar || void 0,
856
+ "data-nav-layout": e.navLayout || void 0
857
+ };
858
+ return Object.entries(e).forEach(([r, n]) => {
859
+ r.startsWith("data-") && (t[r] = n);
860
+ }), t;
861
+ }
862
+ function Nr() {
863
+ const e = {};
864
+ for (const t in h)
865
+ e[h[t]] = `rdp-${h[t]}`;
866
+ for (const t in Y)
867
+ e[Y[t]] = `rdp-${Y[t]}`;
868
+ for (const t in z)
869
+ e[z[t]] = `rdp-${z[t]}`;
870
+ for (const t in P)
871
+ e[P[t]] = `rdp-${P[t]}`;
872
+ return e;
873
+ }
874
+ function wt(e, t, r) {
875
+ return (r ?? new H(t)).formatMonthYear(e);
876
+ }
877
+ const Cr = wt;
878
+ function Sr(e, t, r) {
879
+ return (r ?? new H(t)).format(e, "d");
880
+ }
881
+ function _r(e, t = Q) {
882
+ return t.format(e, "LLLL");
883
+ }
884
+ function xr(e, t, r) {
885
+ return (r ?? new H(t)).format(e, "cccccc");
886
+ }
887
+ function Yr(e, t = Q) {
888
+ return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
889
+ }
890
+ function Tr() {
891
+ return "";
892
+ }
893
+ function Wt(e, t = Q) {
894
+ return t.format(e, "yyyy");
895
+ }
896
+ const Er = Wt, Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
897
+ __proto__: null,
898
+ formatCaption: wt,
899
+ formatDay: Sr,
900
+ formatMonthCaption: Cr,
901
+ formatMonthDropdown: _r,
902
+ formatWeekNumber: Yr,
903
+ formatWeekNumberHeader: Tr,
904
+ formatWeekdayName: xr,
905
+ formatYearCaption: Er,
906
+ formatYearDropdown: Wt
907
+ }, Symbol.toStringTag, { value: "Module" }));
908
+ function Br(e) {
909
+ return e != null && e.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e != null && e.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
910
+ ...Ir,
911
+ ...e
912
+ };
913
+ }
914
+ function qe(e, t, r, n) {
915
+ let s = (n ?? new H(r)).format(e, "PPPP");
916
+ return t.today && (s = `Today, ${s}`), t.selected && (s = `${s}, selected`), s;
917
+ }
918
+ const Fr = qe;
919
+ function Ve(e, t, r) {
920
+ return (r ?? new H(t)).formatMonthYear(e);
921
+ }
922
+ const zr = Ve;
923
+ function Nt(e, t, r, n) {
924
+ let s = (n ?? new H(r)).format(e, "PPPP");
925
+ return t != null && t.today && (s = `Today, ${s}`), s;
926
+ }
927
+ function Ct(e) {
928
+ return "Choose the Month";
929
+ }
930
+ function St() {
931
+ return "";
932
+ }
933
+ const Ar = "Go to the Next Month";
934
+ function _t(e, t) {
935
+ return Ar;
936
+ }
937
+ function xt(e) {
938
+ return "Go to the Previous Month";
939
+ }
940
+ function Yt(e, t, r) {
941
+ return (r ?? new H(t)).format(e, "cccc");
942
+ }
943
+ function Tt(e, t) {
944
+ return `Week ${e}`;
945
+ }
946
+ function Et(e) {
947
+ return "Week Number";
948
+ }
949
+ function It(e) {
950
+ return "Choose the Year";
951
+ }
952
+ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
953
+ __proto__: null,
954
+ labelCaption: zr,
955
+ labelDay: Fr,
956
+ labelDayButton: qe,
957
+ labelGrid: Ve,
958
+ labelGridcell: Nt,
959
+ labelMonthDropdown: Ct,
960
+ labelNav: St,
961
+ labelNext: _t,
962
+ labelPrevious: xt,
963
+ labelWeekNumber: Tt,
964
+ labelWeekNumberHeader: Et,
965
+ labelWeekday: Yt,
966
+ labelYearDropdown: It
967
+ }, Symbol.toStringTag, { value: "Module" })), K = (e, t, r) => t || (r ? typeof r == "function" ? r : (...n) => r : e);
968
+ function Hr(e, t) {
969
+ var n;
970
+ const r = ((n = t.locale) == null ? void 0 : n.labels) ?? {};
971
+ return {
972
+ ...Pr,
973
+ ...e ?? {},
974
+ labelDayButton: K(qe, e == null ? void 0 : e.labelDayButton, r.labelDayButton),
975
+ labelMonthDropdown: K(Ct, e == null ? void 0 : e.labelMonthDropdown, r.labelMonthDropdown),
976
+ labelNext: K(_t, e == null ? void 0 : e.labelNext, r.labelNext),
977
+ labelPrevious: K(xt, e == null ? void 0 : e.labelPrevious, r.labelPrevious),
978
+ labelWeekNumber: K(Tt, e == null ? void 0 : e.labelWeekNumber, r.labelWeekNumber),
979
+ labelYearDropdown: K(It, e == null ? void 0 : e.labelYearDropdown, r.labelYearDropdown),
980
+ labelGrid: K(Ve, e == null ? void 0 : e.labelGrid, r.labelGrid),
981
+ labelGridcell: K(Nt, e == null ? void 0 : e.labelGridcell, r.labelGridcell),
982
+ labelNav: K(St, e == null ? void 0 : e.labelNav, r.labelNav),
983
+ labelWeekNumberHeader: K(Et, e == null ? void 0 : e.labelWeekNumberHeader, r.labelWeekNumberHeader),
984
+ labelWeekday: K(Yt, e == null ? void 0 : e.labelWeekday, r.labelWeekday)
985
+ };
986
+ }
987
+ function jr(e, t, r, n, s) {
988
+ const { startOfMonth: o, startOfYear: a, endOfYear: i, eachMonthOfInterval: d, getMonth: f } = s;
989
+ return d({
990
+ start: a(e),
991
+ end: i(e)
992
+ }).map((y) => {
993
+ const g = n.formatMonthDropdown(y, s), O = f(y), W = t && y < o(t) || r && y > o(r) || !1;
994
+ return { value: O, label: g, disabled: W };
995
+ });
996
+ }
997
+ function $r(e, t = {}, r = {}) {
998
+ let n = { ...t == null ? void 0 : t[h.Day] };
999
+ return Object.entries(e).filter(([, s]) => s === !0).forEach(([s]) => {
1000
+ n = {
1001
+ ...n,
1002
+ ...r == null ? void 0 : r[s]
1003
+ };
1004
+ }), n;
1005
+ }
1006
+ function Gr(e, t, r, n) {
1007
+ const s = n ?? e.today(), o = r ? e.startOfBroadcastWeek(s, e) : t ? e.startOfISOWeek(s) : e.startOfWeek(s), a = [];
1008
+ for (let i = 0; i < 7; i++) {
1009
+ const d = e.addDays(o, i);
1010
+ a.push(d);
1011
+ }
1012
+ return a;
1013
+ }
1014
+ function qr(e, t, r, n, s = !1) {
1015
+ if (!e || !t)
1016
+ return;
1017
+ const { startOfYear: o, endOfYear: a, eachYearOfInterval: i, getYear: d } = n, f = o(e), l = a(t), u = i({ start: f, end: l });
1018
+ return s && u.reverse(), u.map((y) => {
1019
+ const g = r.formatYearDropdown(y, n);
1020
+ return {
1021
+ value: d(y),
1022
+ label: g,
1023
+ disabled: !1
1024
+ };
1025
+ });
1026
+ }
1027
+ function Vr(e, t = {}) {
1028
+ var i;
1029
+ const { weekStartsOn: r, locale: n } = t, s = r ?? ((i = n == null ? void 0 : n.options) == null ? void 0 : i.weekStartsOn) ?? 0, o = (d) => {
1030
+ const f = typeof d == "number" || typeof d == "string" ? new Date(d) : d;
1031
+ return new F(f.getFullYear(), f.getMonth(), f.getDate(), 12, 0, 0, e);
1032
+ }, a = (d) => {
1033
+ const f = o(d);
1034
+ return new Date(f.getFullYear(), f.getMonth(), f.getDate(), 0, 0, 0, 0);
1035
+ };
1036
+ return {
1037
+ today: () => o(F.tz(e)),
1038
+ newDate: (d, f, l) => new F(d, f, l, 12, 0, 0, e),
1039
+ startOfDay: (d) => o(d),
1040
+ startOfWeek: (d, f) => {
1041
+ const l = o(d), u = (f == null ? void 0 : f.weekStartsOn) ?? s, y = (l.getDay() - u + 7) % 7;
1042
+ return l.setDate(l.getDate() - y), l;
1043
+ },
1044
+ startOfISOWeek: (d) => {
1045
+ const f = o(d), l = (f.getDay() - 1 + 7) % 7;
1046
+ return f.setDate(f.getDate() - l), f;
1047
+ },
1048
+ startOfMonth: (d) => {
1049
+ const f = o(d);
1050
+ return f.setDate(1), f;
1051
+ },
1052
+ startOfYear: (d) => {
1053
+ const f = o(d);
1054
+ return f.setMonth(0, 1), f;
1055
+ },
1056
+ endOfWeek: (d, f) => {
1057
+ const l = o(d), g = ((((f == null ? void 0 : f.weekStartsOn) ?? s) + 6) % 7 - l.getDay() + 7) % 7;
1058
+ return l.setDate(l.getDate() + g), l;
1059
+ },
1060
+ endOfISOWeek: (d) => {
1061
+ const f = o(d), l = (7 - f.getDay()) % 7;
1062
+ return f.setDate(f.getDate() + l), f;
1063
+ },
1064
+ endOfMonth: (d) => {
1065
+ const f = o(d);
1066
+ return f.setMonth(f.getMonth() + 1, 0), f;
1067
+ },
1068
+ endOfYear: (d) => {
1069
+ const f = o(d);
1070
+ return f.setMonth(11, 31), f;
1071
+ },
1072
+ eachMonthOfInterval: (d) => {
1073
+ const f = o(d.start), l = o(d.end), u = [], y = new F(f.getFullYear(), f.getMonth(), 1, 12, 0, 0, e), g = l.getFullYear() * 12 + l.getMonth();
1074
+ for (; y.getFullYear() * 12 + y.getMonth() <= g; )
1075
+ u.push(new F(y, e)), y.setMonth(y.getMonth() + 1, 1);
1076
+ return u;
1077
+ },
1078
+ // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
1079
+ // mutate the same TZDate, and return it.
1080
+ addDays: (d, f) => {
1081
+ const l = o(d);
1082
+ return l.setDate(l.getDate() + f), l;
1083
+ },
1084
+ addWeeks: (d, f) => {
1085
+ const l = o(d);
1086
+ return l.setDate(l.getDate() + f * 7), l;
1087
+ },
1088
+ addMonths: (d, f) => {
1089
+ const l = o(d);
1090
+ return l.setMonth(l.getMonth() + f), l;
1091
+ },
1092
+ addYears: (d, f) => {
1093
+ const l = o(d);
1094
+ return l.setFullYear(l.getFullYear() + f), l;
1095
+ },
1096
+ eachYearOfInterval: (d) => {
1097
+ const f = o(d.start), l = o(d.end), u = [], y = new F(f.getFullYear(), 0, 1, 12, 0, 0, e);
1098
+ for (; y.getFullYear() <= l.getFullYear(); )
1099
+ u.push(new F(y, e)), y.setFullYear(y.getFullYear() + 1, 0, 1);
1100
+ return u;
1101
+ },
1102
+ getWeek: (d, f) => {
1103
+ var u;
1104
+ const l = a(d);
1105
+ return ct(l, {
1106
+ weekStartsOn: (f == null ? void 0 : f.weekStartsOn) ?? s,
1107
+ firstWeekContainsDate: (f == null ? void 0 : f.firstWeekContainsDate) ?? ((u = n == null ? void 0 : n.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1
1108
+ });
1109
+ },
1110
+ getISOWeek: (d) => {
1111
+ const f = a(d);
1112
+ return lt(f);
1113
+ },
1114
+ differenceInCalendarDays: (d, f) => {
1115
+ const l = a(d), u = a(f);
1116
+ return ft(l, u);
1117
+ },
1118
+ differenceInCalendarMonths: (d, f) => {
1119
+ const l = a(d), u = a(f);
1120
+ return yt(l, u);
1121
+ }
1122
+ };
1123
+ }
1124
+ const he = (e) => e instanceof HTMLElement ? e : null, Te = (e) => [
1125
+ ...e.querySelectorAll("[data-animated-month]") ?? []
1126
+ ], Rr = (e) => he(e.querySelector("[data-animated-month]")), Ee = (e) => he(e.querySelector("[data-animated-caption]")), Ie = (e) => he(e.querySelector("[data-animated-weeks]")), Ur = (e) => he(e.querySelector("[data-animated-nav]")), Kr = (e) => he(e.querySelector("[data-animated-weekdays]"));
1127
+ function Zr(e, t, { classNames: r, months: n, focused: s, dateLib: o }) {
1128
+ const a = be(null), i = be(n), d = be(!1);
1129
+ un(() => {
1130
+ const f = i.current;
1131
+ if (i.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
1132
+ !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
1133
+ n.length === 0 || f.length === 0 || n.length !== f.length)
1134
+ return;
1135
+ const l = o.isSameMonth(n[0].date, f[0].date), u = o.isAfter(n[0].date, f[0].date), y = u ? r[P.caption_after_enter] : r[P.caption_before_enter], g = u ? r[P.weeks_after_enter] : r[P.weeks_before_enter], O = a.current, W = e.current.cloneNode(!0);
1136
+ if (W instanceof HTMLElement ? (Te(W).forEach((b) => {
1137
+ if (!(b instanceof HTMLElement))
1138
+ return;
1139
+ const N = Rr(b);
1140
+ N && b.contains(N) && b.removeChild(N);
1141
+ const p = Ee(b);
1142
+ p && p.classList.remove(y);
1143
+ const c = Ie(b);
1144
+ c && c.classList.remove(g);
1145
+ }), a.current = W) : a.current = null, d.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
1146
+ s)
1147
+ return;
1148
+ const D = O instanceof HTMLElement ? Te(O) : [], S = Te(e.current);
1149
+ if (S != null && S.every((M) => M instanceof HTMLElement) && D && D.every((M) => M instanceof HTMLElement)) {
1150
+ d.current = !0, e.current.style.isolation = "isolate";
1151
+ const M = Ur(e.current);
1152
+ M && (M.style.zIndex = "1"), S.forEach((b, N) => {
1153
+ const p = D[N];
1154
+ if (!p)
1155
+ return;
1156
+ b.style.position = "relative", b.style.overflow = "hidden";
1157
+ const c = Ee(b);
1158
+ c && c.classList.add(y);
1159
+ const w = Ie(b);
1160
+ w && w.classList.add(g);
1161
+ const T = () => {
1162
+ d.current = !1, e.current && (e.current.style.isolation = ""), M && (M.style.zIndex = ""), c && c.classList.remove(y), w && w.classList.remove(g), b.style.position = "", b.style.overflow = "", b.contains(p) && b.removeChild(p);
1163
+ };
1164
+ p.style.pointerEvents = "none", p.style.position = "absolute", p.style.overflow = "hidden", p.setAttribute("aria-hidden", "true");
1165
+ const I = Kr(p);
1166
+ I && (I.style.opacity = "0");
1167
+ const E = Ee(p);
1168
+ E && (E.classList.add(u ? r[P.caption_before_exit] : r[P.caption_after_exit]), E.addEventListener("animationend", T));
1169
+ const j = Ie(p);
1170
+ j && j.classList.add(u ? r[P.weeks_before_exit] : r[P.weeks_after_exit]), b.insertBefore(p, b.firstChild);
1171
+ });
1172
+ }
1173
+ });
1174
+ }
1175
+ function Jr(e, t, r, n) {
1176
+ const s = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: d } = r ?? {}, { addDays: f, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: y, endOfISOWeek: g, endOfMonth: O, endOfWeek: W, isAfter: D, startOfBroadcastWeek: S, startOfISOWeek: M, startOfWeek: b } = n, N = d ? S(s, n) : a ? M(s) : b(s), p = d ? y(o) : a ? g(O(o)) : W(O(o)), c = t && (d ? y(t) : a ? g(t) : W(t)), w = c && D(p, c) ? c : p, T = l(w, N), I = u(o, s) + 1, E = [];
1177
+ for (let X = 0; X <= T; X++) {
1178
+ const $ = f(N, X);
1179
+ E.push($);
1180
+ }
1181
+ const re = (d ? 35 : 42) * I;
1182
+ if (i && E.length < re) {
1183
+ const X = re - E.length;
1184
+ for (let $ = 0; $ < X; $++) {
1185
+ const oe = f(E[E.length - 1], 1);
1186
+ E.push(oe);
1187
+ }
1188
+ }
1189
+ return E;
1190
+ }
1191
+ function Qr(e) {
1192
+ const t = [];
1193
+ return e.reduce((r, n) => {
1194
+ const s = n.weeks.reduce((o, a) => o.concat(a.days.slice()), t.slice());
1195
+ return r.concat(s.slice());
1196
+ }, t.slice());
1197
+ }
1198
+ function Xr(e, t, r, n) {
1199
+ const { numberOfMonths: s = 1 } = r, o = [];
1200
+ for (let a = 0; a < s; a++) {
1201
+ const i = n.addMonths(e, a);
1202
+ if (t && i > t)
1203
+ break;
1204
+ o.push(i);
1205
+ }
1206
+ return o;
1207
+ }
1208
+ function nt(e, t, r, n) {
1209
+ const { month: s, defaultMonth: o, today: a = n.today(), numberOfMonths: i = 1 } = e;
1210
+ let d = s || o || a;
1211
+ const { differenceInCalendarMonths: f, addMonths: l, startOfMonth: u } = n;
1212
+ if (r && f(r, d) < i - 1) {
1213
+ const y = -1 * (i - 1);
1214
+ d = l(r, y);
1215
+ }
1216
+ return t && f(d, t) < 0 && (d = t), u(d);
1217
+ }
1218
+ function Lr(e, t, r, n) {
1219
+ const { addDays: s, endOfBroadcastWeek: o, endOfISOWeek: a, endOfMonth: i, endOfWeek: d, getISOWeek: f, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: y, startOfWeek: g } = n, O = e.reduce((W, D) => {
1220
+ const S = r.broadcastCalendar ? u(D, n) : r.ISOWeek ? y(D) : g(D), M = r.broadcastCalendar ? o(D) : r.ISOWeek ? a(i(D)) : d(i(D)), b = t.filter((w) => w >= S && w <= M), N = r.broadcastCalendar ? 35 : 42;
1221
+ if (r.fixedWeeks && b.length < N) {
1222
+ const w = t.filter((T) => {
1223
+ const I = N - b.length;
1224
+ return T > M && T <= s(M, I);
1225
+ });
1226
+ b.push(...w);
1227
+ }
1228
+ const p = b.reduce((w, T) => {
1229
+ const I = r.ISOWeek ? f(T) : l(T), E = w.find((re) => re.weekNumber === I), j = new Mt(T, D, n);
1230
+ return E ? E.days.push(j) : w.push(new Kn(I, [j])), w;
1231
+ }, []), c = new Un(D, p);
1232
+ return W.push(c), W;
1233
+ }, []);
1234
+ return r.reverseMonths ? O.reverse() : O;
1235
+ }
1236
+ function es(e, t) {
1237
+ let { startMonth: r, endMonth: n } = e;
1238
+ const { startOfYear: s, startOfDay: o, startOfMonth: a, endOfMonth: i, addYears: d, endOfYear: f, newDate: l, today: u } = t, { fromYear: y, toYear: g, fromMonth: O, toMonth: W } = e;
1239
+ !r && O && (r = O), !r && y && (r = t.newDate(y, 0, 1)), !n && W && (n = W), !n && g && (n = l(g, 11, 31));
1240
+ const D = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
1241
+ return r ? r = a(r) : y ? r = l(y, 0, 1) : !r && D && (r = s(d(e.today ?? u(), -100))), n ? n = i(n) : g ? n = l(g, 11, 31) : !n && D && (n = f(e.today ?? u())), [
1242
+ r && o(r),
1243
+ n && o(n)
1244
+ ];
1245
+ }
1246
+ function ts(e, t, r, n) {
1247
+ if (r.disableNavigation)
1248
+ return;
1249
+ const { pagedNavigation: s, numberOfMonths: o = 1 } = r, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: d } = n, f = s ? o : 1, l = a(e);
1250
+ if (!t)
1251
+ return i(l, f);
1252
+ if (!(d(t, e) < o))
1253
+ return i(l, f);
1254
+ }
1255
+ function ns(e, t, r, n) {
1256
+ if (r.disableNavigation)
1257
+ return;
1258
+ const { pagedNavigation: s, numberOfMonths: o } = r, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: d } = n, f = s ? o ?? 1 : 1, l = a(e);
1259
+ if (!t)
1260
+ return i(l, -f);
1261
+ if (!(d(l, t) <= 0))
1262
+ return i(l, -f);
1263
+ }
1264
+ function rs(e) {
1265
+ const t = [];
1266
+ return e.reduce((r, n) => r.concat(n.weeks.slice()), t.slice());
1267
+ }
1268
+ function Oe(e, t) {
1269
+ const [r, n] = Me(e);
1270
+ return [t === void 0 ? r : t, n];
1271
+ }
1272
+ function ss(e, t) {
1273
+ var N;
1274
+ const [r, n] = es(e, t), { startOfMonth: s, endOfMonth: o } = t, a = nt(e, r, n, t), [i, d] = Oe(
1275
+ a,
1276
+ // initialMonth is always computed from props.month if provided
1277
+ e.month ? a : void 0
1278
+ );
1279
+ dt(() => {
1280
+ const p = nt(e, r, n, t);
1281
+ d(p);
1282
+ }, [e.timeZone]);
1283
+ const { months: f, weeks: l, days: u, previousMonth: y, nextMonth: g } = pe(() => {
1284
+ const p = Xr(i, n, { numberOfMonths: e.numberOfMonths }, t), c = Jr(p, e.endMonth ? o(e.endMonth) : void 0, {
1285
+ ISOWeek: e.ISOWeek,
1286
+ fixedWeeks: e.fixedWeeks,
1287
+ broadcastCalendar: e.broadcastCalendar
1288
+ }, t), w = Lr(p, c, {
1289
+ broadcastCalendar: e.broadcastCalendar,
1290
+ fixedWeeks: e.fixedWeeks,
1291
+ ISOWeek: e.ISOWeek,
1292
+ reverseMonths: e.reverseMonths
1293
+ }, t), T = rs(w), I = Qr(w), E = ns(i, r, e, t), j = ts(i, n, e, t);
1294
+ return {
1295
+ months: w,
1296
+ weeks: T,
1297
+ days: I,
1298
+ previousMonth: E,
1299
+ nextMonth: j
1300
+ };
1301
+ }, [
1302
+ t,
1303
+ i.getTime(),
1304
+ n == null ? void 0 : n.getTime(),
1305
+ r == null ? void 0 : r.getTime(),
1306
+ e.disableNavigation,
1307
+ e.broadcastCalendar,
1308
+ (N = e.endMonth) == null ? void 0 : N.getTime(),
1309
+ e.fixedWeeks,
1310
+ e.ISOWeek,
1311
+ e.numberOfMonths,
1312
+ e.pagedNavigation,
1313
+ e.reverseMonths
1314
+ ]), { disableNavigation: O, onMonthChange: W } = e, D = (p) => l.some((c) => c.days.some((w) => w.isEqualTo(p))), S = (p) => {
1315
+ if (O)
1316
+ return;
1317
+ let c = s(p);
1318
+ r && c < s(r) && (c = s(r)), n && c > s(n) && (c = s(n)), d(c), W == null || W(c);
1319
+ };
1320
+ return {
1321
+ months: f,
1322
+ weeks: l,
1323
+ days: u,
1324
+ navStart: r,
1325
+ navEnd: n,
1326
+ previousMonth: y,
1327
+ nextMonth: g,
1328
+ goToMonth: S,
1329
+ goToDay: (p) => {
1330
+ D(p) || S(p.date);
1331
+ }
1332
+ };
1333
+ }
1334
+ var Z;
1335
+ (function(e) {
1336
+ e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
1337
+ })(Z || (Z = {}));
1338
+ function rt(e) {
1339
+ return !e[Y.disabled] && !e[Y.hidden] && !e[Y.outside];
1340
+ }
1341
+ function os(e, t, r, n) {
1342
+ let s, o = -1;
1343
+ for (const a of e) {
1344
+ const i = t(a);
1345
+ rt(i) && (i[Y.focused] && o < Z.FocusedModifier ? (s = a, o = Z.FocusedModifier) : n != null && n.isEqualTo(a) && o < Z.LastFocused ? (s = a, o = Z.LastFocused) : r(a.date) && o < Z.Selected ? (s = a, o = Z.Selected) : i[Y.today] && o < Z.Today && (s = a, o = Z.Today));
1346
+ }
1347
+ return s || (s = e.find((a) => rt(t(a)))), s;
1348
+ }
1349
+ function as(e, t, r, n, s, o, a) {
1350
+ const { ISOWeek: i, broadcastCalendar: d } = o, { addDays: f, addMonths: l, addWeeks: u, addYears: y, endOfBroadcastWeek: g, endOfISOWeek: O, endOfWeek: W, max: D, min: S, startOfBroadcastWeek: M, startOfISOWeek: b, startOfWeek: N } = a;
1351
+ let c = {
1352
+ day: f,
1353
+ week: u,
1354
+ month: l,
1355
+ year: y,
1356
+ startOfWeek: (w) => d ? M(w, a) : i ? b(w) : N(w),
1357
+ endOfWeek: (w) => d ? g(w) : i ? O(w) : W(w)
1358
+ }[e](r, t === "after" ? 1 : -1);
1359
+ return t === "before" && n ? c = D([n, c]) : t === "after" && s && (c = S([s, c])), c;
1360
+ }
1361
+ function Bt(e, t, r, n, s, o, a, i = 0) {
1362
+ if (i > 365)
1363
+ return;
1364
+ const d = as(e, t, r.date, n, s, o, a), f = !!(o.disabled && te(d, o.disabled, a)), l = !!(o.hidden && te(d, o.hidden, a)), u = d, y = new Mt(d, u, a);
1365
+ return !f && !l ? y : Bt(e, t, y, n, s, o, a, i + 1);
1366
+ }
1367
+ function is(e, t, r, n, s) {
1368
+ const { autoFocus: o } = e, [a, i] = Me(), d = os(t.days, r, n || (() => !1), a), [f, l] = Me(o ? d : void 0);
1369
+ return {
1370
+ isFocusTarget: (W) => !!(d != null && d.isEqualTo(W)),
1371
+ setFocused: l,
1372
+ focused: f,
1373
+ blur: () => {
1374
+ i(f), l(void 0);
1375
+ },
1376
+ moveFocus: (W, D) => {
1377
+ if (!f)
1378
+ return;
1379
+ const S = Bt(W, D, f, t.navStart, t.navEnd, e, s);
1380
+ S && (e.disableNavigation && !t.days.some((b) => b.isEqualTo(S)) || (t.goToDay(S), l(S)));
1381
+ }
1382
+ };
1383
+ }
1384
+ function ds(e, t) {
1385
+ const { selected: r, required: n, onSelect: s } = e, [o, a] = Oe(r, s ? r : void 0), i = s ? r : o, { isSameDay: d } = t, f = (g) => (i == null ? void 0 : i.some((O) => d(O, g))) ?? !1, { min: l, max: u } = e;
1386
+ return {
1387
+ selected: i,
1388
+ select: (g, O, W) => {
1389
+ let D = [...i ?? []];
1390
+ if (f(g)) {
1391
+ if ((i == null ? void 0 : i.length) === l || n && (i == null ? void 0 : i.length) === 1)
1392
+ return;
1393
+ D = i == null ? void 0 : i.filter((S) => !d(S, g));
1394
+ } else
1395
+ (i == null ? void 0 : i.length) === u ? D = [g] : D = [...D, g];
1396
+ return s || a(D), s == null || s(D, g, O, W), D;
1397
+ },
1398
+ isSelected: f
1399
+ };
1400
+ }
1401
+ function fs(e, t, r = 0, n = 0, s = !1, o = Q) {
1402
+ const { from: a, to: i } = t || {}, { isSameDay: d, isAfter: f, isBefore: l } = o;
1403
+ let u;
1404
+ if (!a && !i)
1405
+ u = { from: e, to: r > 0 ? void 0 : e };
1406
+ else if (a && !i)
1407
+ d(a, e) ? r === 0 ? u = { from: a, to: e } : s ? u = { from: a, to: void 0 } : u = void 0 : l(e, a) ? u = { from: e, to: a } : u = { from: a, to: e };
1408
+ else if (a && i)
1409
+ if (d(a, e) && d(i, e))
1410
+ s ? u = { from: a, to: i } : u = void 0;
1411
+ else if (d(a, e))
1412
+ u = { from: a, to: r > 0 ? void 0 : e };
1413
+ else if (d(i, e))
1414
+ u = { from: e, to: r > 0 ? void 0 : e };
1415
+ else if (l(e, a))
1416
+ u = { from: e, to: i };
1417
+ else if (f(e, a))
1418
+ u = { from: a, to: e };
1419
+ else if (f(e, i))
1420
+ u = { from: a, to: e };
1421
+ else
1422
+ throw new Error("Invalid range");
1423
+ if (u != null && u.from && (u != null && u.to)) {
1424
+ const y = o.differenceInCalendarDays(u.to, u.from);
1425
+ n > 0 && y > n ? u = { from: e, to: void 0 } : r > 1 && y < r && (u = { from: e, to: void 0 });
1426
+ }
1427
+ return u;
1428
+ }
1429
+ function ls(e, t, r = Q) {
1430
+ const n = Array.isArray(t) ? t : [t];
1431
+ let s = e.from;
1432
+ const o = r.differenceInCalendarDays(e.to, e.from), a = Math.min(o, 6);
1433
+ for (let i = 0; i <= a; i++) {
1434
+ if (n.includes(s.getDay()))
1435
+ return !0;
1436
+ s = r.addDays(s, 1);
1437
+ }
1438
+ return !1;
1439
+ }
1440
+ function st(e, t, r = Q) {
1441
+ return ee(e, t.from, !1, r) || ee(e, t.to, !1, r) || ee(t, e.from, !1, r) || ee(t, e.to, !1, r);
1442
+ }
1443
+ function cs(e, t, r = Q) {
1444
+ const n = Array.isArray(t) ? t : [t];
1445
+ if (n.filter((i) => typeof i != "function").some((i) => typeof i == "boolean" ? i : r.isDate(i) ? ee(e, i, !1, r) : Ot(i, r) ? i.some((d) => ee(e, d, !1, r)) : ke(i) ? i.from && i.to ? st(e, { from: i.from, to: i.to }, r) : !1 : kt(i) ? ls(e, i.dayOfWeek, r) : je(i) ? r.isAfter(i.before, i.after) ? st(e, {
1446
+ from: r.addDays(i.after, 1),
1447
+ to: r.addDays(i.before, -1)
1448
+ }, r) : te(e.from, i, r) || te(e.to, i, r) : $e(i) || Ge(i) ? te(e.from, i, r) || te(e.to, i, r) : !1))
1449
+ return !0;
1450
+ const a = n.filter((i) => typeof i == "function");
1451
+ if (a.length) {
1452
+ let i = e.from;
1453
+ const d = r.differenceInCalendarDays(e.to, e.from);
1454
+ for (let f = 0; f <= d; f++) {
1455
+ if (a.some((l) => l(i)))
1456
+ return !0;
1457
+ i = r.addDays(i, 1);
1458
+ }
1459
+ }
1460
+ return !1;
1461
+ }
1462
+ function us(e, t) {
1463
+ const { disabled: r, excludeDisabled: n, resetOnSelect: s, selected: o, required: a, onSelect: i } = e, [d, f] = Oe(o, i ? o : void 0), l = i ? o : d;
1464
+ return {
1465
+ selected: l,
1466
+ select: (g, O, W) => {
1467
+ const { min: D, max: S } = e;
1468
+ let M;
1469
+ if (g) {
1470
+ const b = l == null ? void 0 : l.from, N = l == null ? void 0 : l.to, p = !!b && !!N, c = !!b && !!N && t.isSameDay(b, N) && t.isSameDay(g, b);
1471
+ s && (p || !(l != null && l.from)) ? !a && c ? M = void 0 : M = { from: g, to: void 0 } : M = fs(g, l, D, S, a, t);
1472
+ }
1473
+ return n && r && (M != null && M.from) && M.to && cs({ from: M.from, to: M.to }, r, t) && (M.from = g, M.to = void 0), i || f(M), i == null || i(M, g, O, W), M;
1474
+ },
1475
+ isSelected: (g) => l && ee(l, g, !1, t)
1476
+ };
1477
+ }
1478
+ function hs(e, t) {
1479
+ const { selected: r, required: n, onSelect: s } = e, [o, a] = Oe(r, s ? r : void 0), i = s ? r : o, { isSameDay: d } = t;
1480
+ return {
1481
+ selected: i,
1482
+ select: (u, y, g) => {
1483
+ let O = u;
1484
+ return !n && i && i && d(u, i) && (O = void 0), s || a(O), s == null || s(O, u, y, g), O;
1485
+ },
1486
+ isSelected: (u) => i ? d(i, u) : !1
1487
+ };
1488
+ }
1489
+ function ms(e, t) {
1490
+ const r = hs(e, t), n = ds(e, t), s = us(e, t);
1491
+ switch (e.mode) {
1492
+ case "single":
1493
+ return r;
1494
+ case "multiple":
1495
+ return n;
1496
+ case "range":
1497
+ return s;
1498
+ default:
1499
+ return;
1500
+ }
1501
+ }
1502
+ function q(e, t) {
1503
+ return e instanceof F && e.timeZone === t ? e : new F(e, t);
1504
+ }
1505
+ function ae(e, t, r) {
1506
+ return q(e, t);
1507
+ }
1508
+ function ot(e, t, r) {
1509
+ return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? ae(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? ae(n, t) : n) : ke(e) ? {
1510
+ ...e,
1511
+ from: e.from ? q(e.from, t) : e.from,
1512
+ to: e.to ? q(e.to, t) : e.to
1513
+ } : je(e) ? {
1514
+ before: ae(e.before, t),
1515
+ after: ae(e.after, t)
1516
+ } : $e(e) ? {
1517
+ after: ae(e.after, t)
1518
+ } : Ge(e) ? {
1519
+ before: ae(e.before, t)
1520
+ } : e;
1521
+ }
1522
+ function Be(e, t, r) {
1523
+ return e && (Array.isArray(e) ? e.map((n) => ot(n, t)) : ot(e, t));
1524
+ }
1525
+ function Ws(e) {
1526
+ var Qe;
1527
+ let t = e;
1528
+ const r = t.timeZone;
1529
+ if (r && (t = {
1530
+ ...e,
1531
+ timeZone: r
1532
+ }, t.today && (t.today = q(t.today, r)), t.month && (t.month = q(t.month, r)), t.defaultMonth && (t.defaultMonth = q(t.defaultMonth, r)), t.startMonth && (t.startMonth = q(t.startMonth, r)), t.endMonth && (t.endMonth = q(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = q(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = (Qe = t.selected) == null ? void 0 : Qe.map((k) => q(k, r)) : t.mode === "range" && t.selected && (t.selected = {
1533
+ from: t.selected.from ? q(t.selected.from, r) : t.selected.from,
1534
+ to: t.selected.to ? q(t.selected.to, r) : t.selected.to
1535
+ }), t.disabled !== void 0 && (t.disabled = Be(t.disabled, r)), t.hidden !== void 0 && (t.hidden = Be(t.hidden, r)), t.modifiers)) {
1536
+ const k = {};
1537
+ Object.keys(t.modifiers).forEach((x) => {
1538
+ var v;
1539
+ k[x] = Be((v = t.modifiers) == null ? void 0 : v[x], r);
1540
+ }), t.modifiers = k;
1541
+ }
1542
+ const { components: n, formatters: s, labels: o, dateLib: a, locale: i, classNames: d } = pe(() => {
1543
+ const k = { ...pt, ...t.locale }, x = t.broadcastCalendar ? 1 : t.weekStartsOn, v = t.noonSafe && t.timeZone ? Vr(t.timeZone, {
1544
+ weekStartsOn: x,
1545
+ locale: k
1546
+ }) : void 0, _ = t.dateLib && v ? { ...v, ...t.dateLib } : t.dateLib ?? v, A = new H({
1547
+ locale: k,
1548
+ weekStartsOn: x,
1549
+ firstWeekContainsDate: t.firstWeekContainsDate,
1550
+ useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
1551
+ useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
1552
+ timeZone: t.timeZone,
1553
+ numerals: t.numerals
1554
+ }, _);
1555
+ return {
1556
+ dateLib: A,
1557
+ components: wr(t.components),
1558
+ formatters: Br(t.formatters),
1559
+ labels: Hr(t.labels, A.options),
1560
+ locale: k,
1561
+ classNames: { ...Nr(), ...t.classNames }
1562
+ };
1563
+ }, [
1564
+ t.locale,
1565
+ t.broadcastCalendar,
1566
+ t.weekStartsOn,
1567
+ t.firstWeekContainsDate,
1568
+ t.useAdditionalWeekYearTokens,
1569
+ t.useAdditionalDayOfYearTokens,
1570
+ t.timeZone,
1571
+ t.numerals,
1572
+ t.dateLib,
1573
+ t.noonSafe,
1574
+ t.components,
1575
+ t.formatters,
1576
+ t.labels,
1577
+ t.classNames
1578
+ ]);
1579
+ t.today || (t = { ...t, today: a.today() });
1580
+ const { captionLayout: f, mode: l, navLayout: u, numberOfMonths: y = 1, onDayBlur: g, onDayClick: O, onDayFocus: W, onDayKeyDown: D, onDayMouseEnter: S, onDayMouseLeave: M, onNextClick: b, onPrevClick: N, showWeekNumber: p, styles: c } = t, { formatCaption: w, formatDay: T, formatMonthDropdown: I, formatWeekNumber: E, formatWeekNumberHeader: j, formatWeekdayName: re, formatYearDropdown: X } = s, $ = ss(t, a), { days: oe, months: me, navStart: we, navEnd: We, previousMonth: R, nextMonth: U, goToMonth: L } = $, Ne = kr(oe, t, we, We, a), { isSelected: ie, select: de, selected: ye } = ms(t, a) ?? {}, { blur: Re, focused: ge, isFocusTarget: Ft, moveFocus: Ue, setFocused: ve } = is(t, $, Ne, ie ?? (() => !1), a), { labelDayButton: zt, labelGridcell: At, labelGrid: Pt, labelMonthDropdown: Ht, labelNav: Ke, labelPrevious: jt, labelNext: $t, labelWeekday: Gt, labelWeekNumber: qt, labelWeekNumberHeader: Vt, labelYearDropdown: Rt } = o, Ut = pe(() => Gr(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Ze = l !== void 0 || O !== void 0, Ce = G(() => {
1581
+ R && (L(R), N == null || N(R));
1582
+ }, [R, L, N]), Se = G(() => {
1583
+ U && (L(U), b == null || b(U));
1584
+ }, [L, U, b]), Kt = G((k, x) => (v) => {
1585
+ v.preventDefault(), v.stopPropagation(), ve(k), !x.disabled && (de == null || de(k.date, x, v), O == null || O(k.date, x, v));
1586
+ }, [de, O, ve]), Zt = G((k, x) => (v) => {
1587
+ ve(k), W == null || W(k.date, x, v);
1588
+ }, [W, ve]), Jt = G((k, x) => (v) => {
1589
+ Re(), g == null || g(k.date, x, v);
1590
+ }, [Re, g]), Qt = G((k, x) => (v) => {
1591
+ const _ = {
1592
+ ArrowLeft: [
1593
+ v.shiftKey ? "month" : "day",
1594
+ t.dir === "rtl" ? "after" : "before"
1595
+ ],
1596
+ ArrowRight: [
1597
+ v.shiftKey ? "month" : "day",
1598
+ t.dir === "rtl" ? "before" : "after"
1599
+ ],
1600
+ ArrowDown: [v.shiftKey ? "year" : "week", "after"],
1601
+ ArrowUp: [v.shiftKey ? "year" : "week", "before"],
1602
+ PageUp: [v.shiftKey ? "year" : "month", "before"],
1603
+ PageDown: [v.shiftKey ? "year" : "month", "after"],
1604
+ Home: ["startOfWeek", "before"],
1605
+ End: ["endOfWeek", "after"]
1606
+ };
1607
+ if (_[v.key]) {
1608
+ v.preventDefault(), v.stopPropagation();
1609
+ const [A, C] = _[v.key];
1610
+ Ue(A, C);
1611
+ }
1612
+ D == null || D(k.date, x, v);
1613
+ }, [Ue, D, t.dir]), Xt = G((k, x) => (v) => {
1614
+ S == null || S(k.date, x, v);
1615
+ }, [S]), Lt = G((k, x) => (v) => {
1616
+ M == null || M(k.date, x, v);
1617
+ }, [M]), en = G((k) => (x) => {
1618
+ const v = Number(x.target.value), _ = a.setMonth(a.startOfMonth(k), v);
1619
+ L(_);
1620
+ }, [a, L]), tn = G((k) => (x) => {
1621
+ const v = Number(x.target.value), _ = a.setYear(a.startOfMonth(k), v);
1622
+ L(_);
1623
+ }, [a, L]), { className: nn, style: rn } = pe(() => ({
1624
+ className: [d[h.Root], t.className].filter(Boolean).join(" "),
1625
+ style: { ...c == null ? void 0 : c[h.Root], ...t.style }
1626
+ }), [d, t.className, t.style, c]), sn = Wr(t), Je = be(null);
1627
+ Zr(Je, !!t.animate, {
1628
+ classNames: d,
1629
+ months: me,
1630
+ focused: ge,
1631
+ dateLib: a
1632
+ });
1633
+ const on = {
1634
+ dayPickerProps: t,
1635
+ selected: ye,
1636
+ select: de,
1637
+ isSelected: ie,
1638
+ months: me,
1639
+ nextMonth: U,
1640
+ previousMonth: R,
1641
+ goToMonth: L,
1642
+ getModifiers: Ne,
1643
+ components: n,
1644
+ classNames: d,
1645
+ styles: c,
1646
+ labels: o,
1647
+ formatters: s
1648
+ };
1649
+ return m.createElement(
1650
+ Dt.Provider,
1651
+ { value: on },
1652
+ m.createElement(
1653
+ n.Root,
1654
+ { rootRef: t.animate ? Je : void 0, className: nn, style: rn, dir: t.dir, id: t.id, lang: t.lang ?? i.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...sn },
1655
+ m.createElement(
1656
+ n.Months,
1657
+ { className: d[h.Months], style: c == null ? void 0 : c[h.Months] },
1658
+ !t.hideNavigation && !u && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: c == null ? void 0 : c[h.Nav], "aria-label": Ke(), onPreviousClick: Ce, onNextClick: Se, previousMonth: R, nextMonth: U }),
1659
+ me.map((k, x) => m.createElement(
1660
+ n.Month,
1661
+ {
1662
+ "data-animated-month": t.animate ? "true" : void 0,
1663
+ className: d[h.Month],
1664
+ style: c == null ? void 0 : c[h.Month],
1665
+ // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
1666
+ key: x,
1667
+ displayIndex: x,
1668
+ calendarMonth: k
1669
+ },
1670
+ u === "around" && !t.hideNavigation && x === 0 && m.createElement(
1671
+ n.PreviousMonthButton,
1672
+ { type: "button", className: d[h.PreviousMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": jt(R), onClick: Ce, "data-animated-button": t.animate ? "true" : void 0 },
1673
+ m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: d[h.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
1674
+ ),
1675
+ m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: d[h.MonthCaption], style: c == null ? void 0 : c[h.MonthCaption], calendarMonth: k, displayIndex: x }, f != null && f.startsWith("dropdown") ? m.createElement(
1676
+ n.DropdownNav,
1677
+ { className: d[h.Dropdowns], style: c == null ? void 0 : c[h.Dropdowns] },
1678
+ (() => {
1679
+ const v = f === "dropdown" || f === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: d[h.MonthsDropdown], "aria-label": Ht(), classNames: d, components: n, disabled: !!t.disableNavigation, onChange: en(k.date), options: jr(k.date, we, We, s, a), style: c == null ? void 0 : c[h.Dropdown], value: a.getMonth(k.date) }) : m.createElement("span", { key: "month" }, I(k.date, a)), _ = f === "dropdown" || f === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: d[h.YearsDropdown], "aria-label": Rt(a.options), classNames: d, components: n, disabled: !!t.disableNavigation, onChange: tn(k.date), options: qr(we, We, s, a, !!t.reverseYears), style: c == null ? void 0 : c[h.Dropdown], value: a.getYear(k.date) }) : m.createElement("span", { key: "year" }, X(k.date, a));
1680
+ return a.getMonthYearOrder() === "year-first" ? [_, v] : [v, _];
1681
+ })(),
1682
+ m.createElement("span", { role: "status", "aria-live": "polite", style: {
1683
+ border: 0,
1684
+ clip: "rect(0 0 0 0)",
1685
+ height: "1px",
1686
+ margin: "-1px",
1687
+ overflow: "hidden",
1688
+ padding: 0,
1689
+ position: "absolute",
1690
+ width: "1px",
1691
+ whiteSpace: "nowrap",
1692
+ wordWrap: "normal"
1693
+ } }, w(k.date, a.options, a))
1694
+ ) : m.createElement(n.CaptionLabel, { className: d[h.CaptionLabel], role: "status", "aria-live": "polite" }, w(k.date, a.options, a))),
1695
+ u === "around" && !t.hideNavigation && x === y - 1 && m.createElement(
1696
+ n.NextMonthButton,
1697
+ { type: "button", className: d[h.NextMonthButton], tabIndex: U ? void 0 : -1, "aria-disabled": U ? void 0 : !0, "aria-label": $t(U), onClick: Se, "data-animated-button": t.animate ? "true" : void 0 },
1698
+ m.createElement(n.Chevron, { disabled: U ? void 0 : !0, className: d[h.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
1699
+ ),
1700
+ x === y - 1 && u === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: c == null ? void 0 : c[h.Nav], "aria-label": Ke(), onPreviousClick: Ce, onNextClick: Se, previousMonth: R, nextMonth: U }),
1701
+ m.createElement(
1702
+ n.MonthGrid,
1703
+ { role: "grid", "aria-multiselectable": l === "multiple" || l === "range", "aria-label": Pt(k.date, a.options, a) || void 0, className: d[h.MonthGrid], style: c == null ? void 0 : c[h.MonthGrid] },
1704
+ !t.hideWeekdays && m.createElement(
1705
+ n.Weekdays,
1706
+ { "data-animated-weekdays": t.animate ? "true" : void 0, className: d[h.Weekdays], style: c == null ? void 0 : c[h.Weekdays] },
1707
+ p && m.createElement(n.WeekNumberHeader, { "aria-label": Vt(a.options), className: d[h.WeekNumberHeader], style: c == null ? void 0 : c[h.WeekNumberHeader], scope: "col" }, j()),
1708
+ Ut.map((v) => m.createElement(n.Weekday, { "aria-label": Gt(v, a.options, a), className: d[h.Weekday], key: String(v), style: c == null ? void 0 : c[h.Weekday], scope: "col" }, re(v, a.options, a)))
1709
+ ),
1710
+ m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: d[h.Weeks], style: c == null ? void 0 : c[h.Weeks] }, k.weeks.map((v) => m.createElement(
1711
+ n.Week,
1712
+ { className: d[h.Week], key: v.weekNumber, style: c == null ? void 0 : c[h.Week], week: v },
1713
+ p && m.createElement(n.WeekNumber, { week: v, style: c == null ? void 0 : c[h.WeekNumber], "aria-label": qt(v.weekNumber, {
1714
+ locale: i
1715
+ }), className: d[h.WeekNumber], scope: "row", role: "rowheader" }, E(v.weekNumber, a)),
1716
+ v.days.map((_) => {
1717
+ const { date: A } = _, C = Ne(_);
1718
+ if (C[Y.focused] = !C.hidden && !!(ge != null && ge.isEqualTo(_)), C[z.selected] = (ie == null ? void 0 : ie(A)) || C.selected, ke(ye)) {
1719
+ const { from: _e, to: xe } = ye;
1720
+ C[z.range_start] = !!(_e && xe && a.isSameDay(A, _e)), C[z.range_end] = !!(_e && xe && a.isSameDay(A, xe)), C[z.range_middle] = ee(ye, A, !0, a);
1721
+ }
1722
+ const an = $r(C, c, t.modifiersStyles), dn = Or(C, d, t.modifiersClassNames), fn = !Ze && !C.hidden ? At(A, C, a.options, a) : void 0;
1723
+ return m.createElement(n.Day, { key: `${_.isoDate}_${_.displayMonthId}`, day: _, modifiers: C, className: dn.join(" "), style: an, role: "gridcell", "aria-selected": C.selected || void 0, "aria-label": fn, "data-day": _.isoDate, "data-month": _.outside ? _.dateMonthId : void 0, "data-selected": C.selected || void 0, "data-disabled": C.disabled || void 0, "data-hidden": C.hidden || void 0, "data-outside": _.outside || void 0, "data-focused": C.focused || void 0, "data-today": C.today || void 0 }, !C.hidden && Ze ? m.createElement(n.DayButton, { className: d[h.DayButton], style: c == null ? void 0 : c[h.DayButton], type: "button", day: _, modifiers: C, disabled: !C.focused && C.disabled || void 0, "aria-disabled": C.focused && C.disabled || void 0, tabIndex: Ft(_) ? 0 : -1, "aria-label": zt(A, C, a.options, a), onClick: Kt(_, C), onBlur: Jt(_, C), onFocus: Zt(_, C), onKeyDown: Qt(_, C), onMouseEnter: Xt(_, C), onMouseLeave: Lt(_, C) }, T(A, a.options, a)) : !C.hidden && T(_.date, a.options, a));
1724
+ })
1725
+ )))
1726
+ )
1727
+ ))
1728
+ ),
1729
+ t.footer && m.createElement(n.Footer, { className: d[h.Footer], style: c == null ? void 0 : c[h.Footer], role: "status", "aria-live": "polite" }, t.footer)
1730
+ )
1731
+ );
1732
+ }
1733
+ const at = {
1734
+ en: () => import("./format-4HNwNGrN.js").then((e) => e.E).then((e) => e.enUS),
1735
+ it: () => import("./it-Xmjomvyj.js").then((e) => e.it),
1736
+ de: () => import("./de-3iM4rGqo.js").then((e) => e.de),
1737
+ es: () => import("./es-Cxiqjx8r.js").then((e) => e.es),
1738
+ fr: () => import("./fr-Bhr6SYKj.js").then((e) => e.fr),
1739
+ pt: () => import("./pt-BSPnVrQ7.js").then((e) => e.pt),
1740
+ nl: () => import("./nl-DDs-KEnD.js").then((e) => e.nl),
1741
+ pl: () => import("./pl-BYYMnEWP.js").then((e) => e.pl),
1742
+ ro: () => import("./ro-BbiylGmG.js").then((e) => e.ro),
1743
+ ru: () => import("./ru-BX_qsV67.js").then((e) => e.ru),
1744
+ sv: () => import("./sv-CpTdtmDQ.js").then((e) => e.sv),
1745
+ el: () => import("./el-C96rGJvU.js").then((e) => e.el),
1746
+ ja: () => import("./ja-mfZvt1ZV.js").then((e) => e.ja),
1747
+ zh: () => import("./zh-CN-vPkPEK6H.js").then((e) => e.zhCN),
1748
+ hi: () => import("./hi-BxXX26d_.js").then((e) => e.hi),
1749
+ ar: () => import("./ar-BR1FGFP2.js").then((e) => e.ar),
1750
+ tr: () => import("./tr-DXG2QN1K.js").then((e) => e.tr),
1751
+ sq: () => import("./sq-i9UOk4P7.js").then((e) => e.sq)
1752
+ };
1753
+ async function ys(e) {
1754
+ const t = e.toLowerCase().split("-")[0];
1755
+ return (at[t] ?? at.en)();
1756
+ }
1757
+ const Fe = /* @__PURE__ */ new Map();
1758
+ function Ns(e) {
1759
+ const t = e.toLowerCase().split("-")[0], [r, n] = Me(
1760
+ () => Fe.get(t)
1761
+ );
1762
+ return dt(() => {
1763
+ const s = Fe.get(t);
1764
+ if (s) {
1765
+ n(s);
1766
+ return;
1767
+ }
1768
+ let o = !1;
1769
+ return ys(t).then((a) => {
1770
+ Fe.set(t, a), o || n(a);
1771
+ }), () => {
1772
+ o = !0;
1773
+ };
1774
+ }, [t]), r;
1775
+ }
1776
+ const ze = {
1777
+ en: "dd/MM/yyyy",
1778
+ "en-us": "MM/dd/yyyy",
1779
+ de: "dd.MM.yyyy",
1780
+ fr: "dd/MM/yyyy",
1781
+ es: "dd/MM/yyyy",
1782
+ it: "dd/MM/yyyy",
1783
+ pt: "dd/MM/yyyy",
1784
+ nl: "dd-MM-yyyy",
1785
+ pl: "dd.MM.yyyy",
1786
+ cs: "dd.MM.yyyy",
1787
+ da: "dd.MM.yyyy",
1788
+ sv: "yyyy-MM-dd",
1789
+ fi: "dd.MM.yyyy",
1790
+ nb: "dd.MM.yyyy",
1791
+ ja: "yyyy/MM/dd",
1792
+ zh: "yyyy/MM/dd",
1793
+ ko: "yyyy.MM.dd",
1794
+ ar: "dd/MM/yyyy",
1795
+ he: "dd.MM.yyyy"
1796
+ };
1797
+ function Cs(e) {
1798
+ const t = e.toLowerCase();
1799
+ return ze[t] ?? ze[t.split("-")[0]] ?? ze.en;
1800
+ }
1801
+ function Ss(e, t, r) {
1802
+ const n = [];
1803
+ return e && n.push({ before: e }), t && n.push({ after: t }), Array.isArray(r) ? n.push(...r) : typeof r == "function" && n.push(r), n.length === 1 ? n[0] : n;
1804
+ }
1805
+ function _s({ orientation: e }) {
1806
+ return e === "left" ? /* @__PURE__ */ Xe(Mn, { className: "ds:size-4 ds:rtl:-scale-x-100" }) : /* @__PURE__ */ Xe(Dn, { className: "ds:size-4 ds:rtl:-scale-x-100" });
1807
+ }
1808
+ const Ae = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target-size)] ds:text-center ds:align-middle", vs = [
1809
+ // `rdp-day_button` stays as a stable structural/test hook. Selection fills
1810
+ // target the descendant `button` instead: inside an arbitrary variant an
1811
+ // underscore reads as a SPACE, so `.rdp-day_button` would compile to the
1812
+ // never-matching `.rdp-day button` pair.
1813
+ "rdp-day_button",
1814
+ // `relative` anchors the `today` dot (an `::after` marker set on this button
1815
+ // by the `DayFlag.today` entry below) so it survives every cell state.
1816
+ "ds:relative",
1817
+ "ds:flex ds:items-center ds:justify-center",
1818
+ "ds:size-[calc(var(--min-target-size)-2px)]",
1819
+ "ds:mx-auto ds:rounded-[var(--radius-sm)]",
1820
+ "ds:border-2 ds:border-transparent",
1821
+ "ds:cursor-pointer ds:font-[inherit] ds:text-[inherit] ds:bg-transparent",
1822
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1823
+ "ds:hover:bg-muted",
1824
+ // Disabled days must not offer hover affordance — the base `hover:bg-muted`
1825
+ // still fires on a disabled `<button>`, implying it is clickable. Reset it.
1826
+ "ds:disabled:hover:bg-transparent",
1827
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1828
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1829
+ "ds:forced-colors:focus-visible:outline-[Highlight]",
1830
+ "ds:disabled:cursor-default"
1831
+ ].join(" "), bs = [
1832
+ "rdp-today",
1833
+ "ds:[&_button]:font-semibold",
1834
+ "ds:[&_button]:after:content-['']",
1835
+ "ds:[&_button]:after:absolute",
1836
+ // Centre it: logical `start-1/2` + a physical translate that is flipped
1837
+ // under RTL (kit idiom `-translate-x-1/2 rtl:translate-x-1/2`) so the dot
1838
+ // stays centred under the numeral in Arabic too.
1839
+ "ds:[&_button]:after:bottom-[3px] ds:[&_button]:after:start-1/2",
1840
+ "ds:[&_button]:after:-translate-x-1/2 ds:[&_button]:after:rtl:translate-x-1/2",
1841
+ "ds:[&_button]:after:size-[3px] ds:[&_button]:after:rounded-full",
1842
+ // `bg-current` = the button's own text colour, so the dot is `--foreground`
1843
+ // on a plain/in-range cell and `--primary-foreground` on a solid cap. Under
1844
+ // forced-colors, `currentColor` is preserved and resolves to the button's
1845
+ // forced colour — CanvasText on a plain cell, HighlightText on a
1846
+ // Highlight-filled cap/range (the selection states already force the button
1847
+ // text to HighlightText) — so the dot keeps the guaranteed system-colour
1848
+ // pairing in every state without a separate (and previously wrong, because
1849
+ // it pinned CanvasText even on a Highlight cap) forced-colors override.
1850
+ "ds:[&_button]:after:bg-current"
1851
+ ].join(" "), it = [
1852
+ "ds:inline-flex ds:items-center ds:justify-center",
1853
+ "ds:size-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
1854
+ "ds:cursor-pointer ds:bg-transparent ds:text-foreground",
1855
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1856
+ "ds:hover:bg-muted",
1857
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1858
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1859
+ "ds:disabled:opacity-50 ds:disabled:cursor-default",
1860
+ "ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-default"
1861
+ ].join(" "), xs = {
1862
+ /* ---- Layout shell ---- */
1863
+ [h.Root]: "rdp-root ds:relative ds:font-sans ds:text-foreground",
1864
+ [h.Months]: "rdp-months ds:relative ds:flex ds:flex-wrap ds:gap-[var(--spacing-lg)]",
1865
+ [h.Month]: "rdp-month ds:flex ds:flex-col",
1866
+ [h.MonthGrid]: "rdp-month_grid ds:border-collapse",
1867
+ /* ---- Caption + navigation ---- */
1868
+ [h.MonthCaption]: "rdp-month_caption ds:flex ds:items-center ds:h-[var(--min-target-size)] ds:font-semibold ds:text-[length:var(--font-size-base)]",
1869
+ [h.CaptionLabel]: "rdp-caption_label ds:inline-flex ds:items-center",
1870
+ // `top-0` is the block-axis (RTL-agnostic) inset; `end-0` is the
1871
+ // inline-axis logical inset → `inset-inline-end: 0`, mirroring under RTL.
1872
+ [h.Nav]: "rdp-nav ds:absolute ds:top-0 ds:end-0 ds:flex ds:items-center ds:h-[var(--min-target-size)]",
1873
+ [h.PreviousMonthButton]: `rdp-button_previous ${it}`,
1874
+ [h.NextMonthButton]: `rdp-button_next ${it}`,
1875
+ [h.Chevron]: "rdp-chevron ds:inline-block ds:fill-current",
1876
+ /* ---- Weekday header row ---- */
1877
+ [h.Weekdays]: "rdp-weekdays",
1878
+ // Full-strength `--muted-foreground` (6.93:1 on white), not the old
1879
+ // `opacity-75` multiply on top of it (≈3.80:1 — fails AA).
1880
+ [h.Weekday]: "rdp-weekday ds:py-[var(--spacing-xs)] ds:text-center ds:font-medium ds:text-[length:var(--font-size-sm)] ds:text-muted-foreground",
1881
+ /* ---- Week rows + day cells ---- */
1882
+ [h.Weeks]: "rdp-weeks",
1883
+ [h.Week]: "rdp-week",
1884
+ [h.Day]: `rdp-day ${gs}`,
1885
+ [h.DayButton]: vs,
1886
+ [h.WeekNumber]: "rdp-week_number ds:text-muted-foreground ds:text-center ds:text-[length:var(--font-size-sm)] ds:size-[var(--min-target-size)]",
1887
+ /* ---- Day flags ----
1888
+ De-emphasised states now ride tokened colours with GUARANTEED contrast
1889
+ ratios instead of `opacity-*` alpha multiplies (which read muddy and
1890
+ dodge the ratio). `today` is a shape marker (see TODAY_DOT) that survives
1891
+ inside a range and on a solid cap; `disabled` adds a `line-through`
1892
+ non-colour "unavailable" cue on top of the muted colour. */
1893
+ [Y.today]: bs,
1894
+ [Y.outside]: "rdp-outside ds:text-muted-foreground",
1895
+ [Y.disabled]: "rdp-disabled ds:text-muted-foreground ds:[&_button]:line-through",
1896
+ [Y.hidden]: "rdp-hidden ds:invisible",
1897
+ /* ---- Selection states ----
1898
+ The colour fill lives on the inner `.rdp-day_button` via descendant
1899
+ selectors so the cell padding stays transparent and the rounded
1900
+ button reads as the selected chip. */
1901
+ [z.selected]: "rdp-selected ds:[&_button]:bg-primary ds:[&_button]:text-primary-foreground ds:[&_button]:border-primary ds:[&_button]:hover:bg-primary-hover ds:forced-colors:[&_button]:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]",
1902
+ [z.range_start]: `rdp-range_start ${Ae} ds:rounded-s-[var(--radius-sm)] ds:[&_button]:bg-primary ds:[&_button]:text-primary-foreground ds:[&_button]:border-primary ds:forced-colors:bg-[Highlight] ds:forced-colors:[&_button]:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]`,
1903
+ // rdp applies BOTH `selected` and `range_middle` to a middle day. `selected`
1904
+ // fills the button (solid `--primary`, white text); `range_middle` must undo
1905
+ // that so the day reads as `--foreground` on the soft band, NOT white text on
1906
+ // it (≈1.3:1). The `bg`/`text` overrides use the compound `&.rdp-selected`
1907
+ // selector so they out-specify `selected`'s `[&_button]` rules deterministically
1908
+ // (Tailwind emits same-specificity utilities in an unstable order otherwise).
1909
+ [z.range_middle]: `rdp-range_middle ${Ae} ds:[&.rdp-selected_button]:bg-transparent ds:[&_button]:border-transparent ds:[&.rdp-selected_button]:text-foreground ds:[&_button]:rounded-none ds:forced-colors:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]`,
1910
+ [z.range_end]: `rdp-range_end ${Ae} ds:rounded-e-[var(--radius-sm)] ds:[&_button]:bg-primary ds:[&_button]:text-primary-foreground ds:[&_button]:border-primary ds:forced-colors:bg-[Highlight] ds:forced-colors:[&_button]:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]`
1911
+ }, Pe = "ds:bg-[var(--calendar-compare-fill)] ds:border-b-2 ds:border-dashed ds:border-b-[var(--calendar-compare-edge)]", Ys = {
1912
+ compareStart: `rdp-compare_start ${Pe} ds:rounded-s-[var(--radius-sm)]`,
1913
+ compareMiddle: `rdp-compare_middle ${Pe}`,
1914
+ compareEnd: `rdp-compare_end ${Pe} ds:rounded-e-[var(--radius-sm)]`
1915
+ }, Ts = ne(
1916
+ [
1917
+ "ds:relative ds:flex ds:items-center ds:w-full",
1918
+ "ds:border ds:text-foreground",
1919
+ "ds:placeholder:text-muted-foreground",
1920
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1921
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1922
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1923
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
1924
+ ].join(" "),
1925
+ {
1926
+ variants: {
1927
+ size: {
1928
+ sm: "ds:h-8 ds:text-[length:var(--font-size-sm)] ds:ps-3 ds:pe-10",
1929
+ md: "ds:text-[length:var(--font-size-base)] ds:ps-3 ds:pe-10",
1930
+ lg: "ds:h-12 ds:text-[length:var(--font-size-lg)] ds:ps-4 ds:pe-12"
1931
+ },
1932
+ tone: {
1933
+ default: "ds:border-border",
1934
+ error: "ds:border-destructive"
1935
+ },
1936
+ // `input` (default) shares the soft fill + halo with TextInput / Select
1937
+ // (`INPUT_SURFACE_CHROME`). `button` drops the halo and takes the outline
1938
+ // Button's chrome (radius-md, transparent fill, hover/active) so a picker
1939
+ // can sit flush among Buttons in a toolbar. The halo is a11y-load-bearing
1940
+ // on the input chrome (tokens `--shadow-input`), so `input` stays default.
1941
+ chrome: {
1942
+ input: "ds:rounded-[var(--radius-sm)] ds:bg-input ds:shadow-[var(--shadow-input)]",
1943
+ button: "ds:rounded-[var(--radius-md)] ds:bg-transparent ds:shadow-none ds:hover:bg-muted/10 ds:active:bg-muted/20"
1944
+ }
1945
+ },
1946
+ compoundVariants: [
1947
+ // `md` height is chrome-specific: `input` keeps the 44px touch target;
1948
+ // `button` matches the kit Button's `md` height (40px / h-10).
1949
+ { chrome: "input", size: "md", class: "ds:h-[var(--min-target-size)]" },
1950
+ { chrome: "button", size: "md", class: "ds:h-10" }
1951
+ ],
1952
+ defaultVariants: {
1953
+ size: "md",
1954
+ tone: "default",
1955
+ chrome: "input"
1956
+ }
1957
+ }
1958
+ ), Es = ne(
1959
+ [
1960
+ "ds:w-full ds:min-w-0 ds:rounded-[var(--radius-sm)] ds:border ds:bg-input",
1961
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
1962
+ "ds:text-[length:var(--font-size-sm)] ds:text-foreground",
1963
+ "ds:shadow-[var(--shadow-input)]",
1964
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1965
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1966
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
1967
+ ].join(" "),
1968
+ {
1969
+ variants: {
1970
+ state: {
1971
+ default: "ds:border-border",
1972
+ active: "ds:border-primary",
1973
+ error: "ds:border-destructive"
1974
+ }
1975
+ },
1976
+ defaultVariants: { state: "default" }
1977
+ }
1978
+ ), Is = ne(
1979
+ [
1980
+ "ds:inline-flex ds:items-center ds:justify-center ds:min-h-[var(--min-target-size)]",
1981
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:rounded-[var(--radius-sm)]",
1982
+ "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:cursor-pointer",
1983
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1984
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1985
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1986
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
1987
+ ].join(" "),
1988
+ {
1989
+ variants: {
1990
+ intent: {
1991
+ ghost: "ds:bg-transparent ds:text-foreground ds:hover:bg-muted",
1992
+ primary: "ds:bg-primary ds:text-primary-foreground ds:hover:bg-primary-hover"
1993
+ }
1994
+ },
1995
+ defaultVariants: { intent: "ghost" }
1996
+ }
1997
+ ), Bs = ne(
1998
+ "ds:inline-flex ds:items-center ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input ds:p-[2px]"
1999
+ ), Fs = ne(
2000
+ [
2001
+ "ds:inline-flex ds:items-center ds:justify-center ds:cursor-pointer",
2002
+ // Meet the kit touch-target rule (44px base / 48px accessible), matching
2003
+ // the footer actions, rather than the ~22px a bare text segment would be.
2004
+ "ds:min-h-[calc(var(--min-target-size)-4px)]",
2005
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
2006
+ "ds:rounded-[calc(var(--radius-sm)-2px)] ds:text-[length:var(--font-size-xs)] ds:font-medium",
2007
+ "ds:text-muted-foreground",
2008
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
2009
+ "ds:data-[state=checked]:bg-primary ds:data-[state=checked]:text-primary-foreground",
2010
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
2011
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
2012
+ ].join(" ")
2013
+ ), zs = ne(
2014
+ "ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:uppercase ds:tracking-wide ds:text-muted-foreground"
2015
+ ), As = ne(
2016
+ "ds:absolute ds:inset-y-0 ds:end-0 ds:flex ds:items-center ds:pointer-events-none ds:text-muted-foreground",
2017
+ {
2018
+ variants: {
2019
+ size: {
2020
+ sm: "ds:pe-3 ds:[&_svg]:size-4",
2021
+ md: "ds:pe-3 ds:[&_svg]:size-4",
2022
+ lg: "ds:pe-4 ds:[&_svg]:size-5"
2023
+ }
2024
+ },
2025
+ defaultVariants: { size: "md" }
2026
+ }
2027
+ ), Ps = ne(
2028
+ [
2029
+ "ds:z-[var(--z-popover)] ds:rounded-[var(--radius-md)]",
2030
+ "ds:border ds:border-border ds:bg-background ds:shadow-[var(--shadow-lg)]",
2031
+ "ds:p-[var(--spacing-md)]"
2032
+ ].join(" ")
2033
+ ), Hs = ne(
2034
+ [
2035
+ // A flex row so an `active` preset can carry a trailing check icon and the
2036
+ // label still fills the width and truncates rather than wrapping.
2037
+ "ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)]",
2038
+ "ds:text-start ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
2039
+ "ds:min-h-[var(--min-target-size)]",
2040
+ "ds:rounded-[var(--radius-sm)] ds:text-[length:var(--font-size-sm)] ds:text-foreground",
2041
+ "ds:hover:bg-muted ds:cursor-pointer",
2042
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
2043
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
2044
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
2045
+ ].join(" "),
2046
+ {
2047
+ variants: {
2048
+ // The applied-preset state. Tints with the shared `--calendar-range-fill`
2049
+ // (violet primary wash) and keeps the label on `--foreground` (high
2050
+ // contrast) — it does NOT use the magenta accent, which fails AA on white.
2051
+ // The component pairs this with `aria-pressed` + a trailing check icon so
2052
+ // the state is not conveyed by colour alone.
2053
+ active: {
2054
+ true: "ds:bg-[var(--calendar-range-fill)] ds:font-semibold ds:hover:bg-[var(--calendar-range-fill)]",
2055
+ false: ""
2056
+ }
2057
+ },
2058
+ defaultVariants: { active: !1 }
2059
+ }
2060
+ );
2061
+ export {
2062
+ _s as C,
2063
+ Ws as D,
2064
+ ht as a,
2065
+ Ss as b,
2066
+ An as c,
2067
+ As as d,
2068
+ xs as e,
2069
+ Ps as f,
2070
+ Cs as g,
2071
+ Wn as h,
2072
+ Pn as i,
2073
+ Nn as j,
2074
+ vt as k,
2075
+ _n as l,
2076
+ Fs as m,
2077
+ Bs as n,
2078
+ zs as o,
2079
+ Hs as p,
2080
+ Ys as q,
2081
+ Es as r,
2082
+ Yn as s,
2083
+ Ts as t,
2084
+ Ns as u,
2085
+ Is as v,
2086
+ mt as w,
2087
+ Hn as x
2088
+ };
2089
+ //# sourceMappingURL=date-picker-variants-pKAJfnWr.js.map