@helsenorge/datepicker 9.2.0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
- import { jsx as s, jsxs as B, Fragment as Y } from "react/jsx-runtime";
2
- import q, { createContext as ne, forwardRef as Xt, useContext as re, useState as A, useEffect as Q, useLayoutEffect as Zt, useRef as oe } from "react";
3
- import { isSameDay as N, subDays as Ce, addDays as E, differenceInCalendarDays as X, startOfMonth as R, endOfMonth as Fe, startOfDay as rt, addMonths as K, differenceInCalendarMonths as de, isSameMonth as Ae, isBefore as He, isAfter as be, getUnixTime as Gt, getWeeksInMonth as $t, addWeeks as Ee, isSameYear as qt, setMonth as Pe, setYear as at, startOfYear as Jt, max as Qt, min as zt, endOfISOWeek as ht, endOfWeek as pt, startOfISOWeek as Ye, startOfWeek as je, getISOWeek as en, getWeek as tn, format as W, isDate as yt, addYears as nn, isValid as ue, parse as se, isWithinInterval as rn } from "date-fns";
4
- import { enUS as an, nb as on } from "date-fns/locale";
5
- import ln from "@helsenorge/designsystem-react/components/Button";
6
- import sn from "@helsenorge/designsystem-react/components/Icon";
7
- import dn from "@helsenorge/designsystem-react/components/Icons/Calendar";
1
+ import { jsx as s, jsxs as L, Fragment as A } from "react/jsx-runtime";
2
+ import J, { createContext as ne, forwardRef as Ut, useContext as re, useState as B, useEffect as z, useLayoutEffect as Xt, useRef as oe } from "react";
3
+ import { isSameDay as N, subDays as Ce, addDays as W, differenceInCalendarDays as U, startOfMonth as S, endOfMonth as Fe, startOfDay as rt, addMonths as j, differenceInCalendarMonths as le, isSameMonth as Ae, isBefore as He, isAfter as ge, getUnixTime as Zt, getWeeksInMonth as Gt, addWeeks as Ee, isSameYear as $t, setMonth as Pe, setYear as at, startOfYear as qt, max as Jt, min as Qt, endOfISOWeek as ht, endOfWeek as pt, startOfISOWeek as Ye, startOfWeek as je, getISOWeek as zt, getWeek as en, format as O, isDate as yt, addYears as tn, isValid as se, parse as ie, isWithinInterval as nn } from "date-fns";
4
+ import { enUS as rn, nb as an } from "date-fns/locale";
5
+ import on from "@helsenorge/designsystem-react/components/Button";
6
+ import ln from "@helsenorge/designsystem-react/components/Icon";
7
+ import sn from "@helsenorge/designsystem-react/components/Icons/Calendar";
8
8
  import Re from "@helsenorge/designsystem-react/components/Input";
9
- import { PopOverVariant as H } from "@helsenorge/designsystem-react/components/PopOver";
10
- import { ZIndex as un, KeyboardEventKey as ot } from "@helsenorge/designsystem-react/constants";
9
+ import { PopOverVariant as F } from "@helsenorge/designsystem-react/components/PopOver";
10
+ import { ZIndex as dn, KeyboardEventKey as ot } from "@helsenorge/designsystem-react/constants";
11
11
  import { useKeyboardEvent as it } from "@helsenorge/designsystem-react/hooks/useKeyboardEvent";
12
- import { useOutsideEvent as cn } from "@helsenorge/designsystem-react/hooks/useOutsideEvent";
12
+ import { useOutsideEvent as un } from "@helsenorge/designsystem-react/hooks/useOutsideEvent";
13
13
  import { usePseudoClasses as bt } from "@helsenorge/designsystem-react/hooks/usePseudoClasses";
14
- import { isMobileUA as fn } from "@helsenorge/designsystem-react/utils/mobile";
14
+ import { isMobileUA as cn } from "@helsenorge/designsystem-react/utils/mobile";
15
15
  import { isMutableRefObject as gt, mergeRefs as _t } from "@helsenorge/designsystem-react/utils/refs";
16
16
  import Be from "classnames";
17
- import vn from "react-day-picker/dist/style.module.css";
18
- import { useFocusTrap as mn } from "@helsenorge/designsystem-react/hooks/useFocusTrap";
19
- import { useInterval as hn } from "@helsenorge/designsystem-react/hooks/useInterval";
20
- import { useIsVisible as pn } from "@helsenorge/designsystem-react/hooks/useIsVisible";
21
- import { useLayoutEvent as yn } from "@helsenorge/designsystem-react/hooks/useLayoutEvent";
22
- import { useSize as bn } from "@helsenorge/designsystem-react/hooks/useSize";
23
- import { getSpacer as gn } from "@helsenorge/designsystem-react/theme/currys/spacing";
24
- import x from "./styles.module.scss";
25
- import _n from "@helsenorge/designsystem-react/components/ErrorWrapper";
26
- import { useUuid as wn } from "@helsenorge/designsystem-react/hooks/useUuid";
17
+ import fn from "react-day-picker/dist/style.module.css";
18
+ import { useFocusTrap as vn } from "@helsenorge/designsystem-react/hooks/useFocusTrap";
19
+ import { useInterval as mn } from "@helsenorge/designsystem-react/hooks/useInterval";
20
+ import { useIsVisible as hn } from "@helsenorge/designsystem-react/hooks/useIsVisible";
21
+ import { useLayoutEvent as pn } from "@helsenorge/designsystem-react/hooks/useLayoutEvent";
22
+ import { useSize as yn } from "@helsenorge/designsystem-react/hooks/useSize";
23
+ import { getSpacer as bn } from "@helsenorge/designsystem-react/theme/currys/spacing";
24
+ import P from "./styles.module.scss";
25
+ import gn from "@helsenorge/designsystem-react/components/ErrorWrapper";
26
+ import { useUuid as _n } from "@helsenorge/designsystem-react/hooks/useUuid";
27
27
  import { isComponent as lt } from "@helsenorge/designsystem-react/utils/component";
28
28
  var g = function() {
29
29
  return g = Object.assign || function(t) {
@@ -34,7 +34,7 @@ var g = function() {
34
34
  return t;
35
35
  }, g.apply(this, arguments);
36
36
  };
37
- function Dn(e, t) {
37
+ function wn(e, t) {
38
38
  var n = {};
39
39
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
40
40
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -47,16 +47,16 @@ function wt(e, t, n) {
47
47
  (o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
48
48
  return e.concat(o || Array.prototype.slice.call(t));
49
49
  }
50
- function ce(e) {
50
+ function de(e) {
51
51
  return e.mode === "multiple";
52
52
  }
53
- function fe(e) {
53
+ function ue(e) {
54
54
  return e.mode === "range";
55
55
  }
56
- function _e(e) {
56
+ function we(e) {
57
57
  return e.mode === "single";
58
58
  }
59
- var Mn = {
59
+ var Dn = {
60
60
  root: "rdp",
61
61
  multiple_months: "rdp-multiple_months",
62
62
  with_weeknumber: "rdp-with_weeknumber",
@@ -99,63 +99,63 @@ var Mn = {
99
99
  day_range_end: "rdp-day_range_end",
100
100
  day_range_middle: "rdp-day_range_middle"
101
101
  };
102
+ function Mn(e, t) {
103
+ return O(e, "LLLL y", t);
104
+ }
102
105
  function kn(e, t) {
103
- return W(e, "LLLL y", t);
106
+ return O(e, "d", t);
104
107
  }
105
108
  function Nn(e, t) {
106
- return W(e, "d", t);
107
- }
108
- function Cn(e, t) {
109
- return W(e, "LLLL", t);
109
+ return O(e, "LLLL", t);
110
110
  }
111
- function Pn(e) {
111
+ function Cn(e) {
112
112
  return "".concat(e);
113
113
  }
114
- function xn(e, t) {
115
- return W(e, "cccccc", t);
114
+ function Pn(e, t) {
115
+ return O(e, "cccccc", t);
116
116
  }
117
- function In(e, t) {
118
- return W(e, "yyyy", t);
117
+ function xn(e, t) {
118
+ return O(e, "yyyy", t);
119
119
  }
120
120
  var On = /* @__PURE__ */ Object.freeze({
121
121
  __proto__: null,
122
- formatCaption: kn,
123
- formatDay: Nn,
124
- formatMonthCaption: Cn,
125
- formatWeekNumber: Pn,
126
- formatWeekdayName: xn,
127
- formatYearCaption: In
128
- }), Wn = function(e, t, n) {
129
- return W(e, "do MMMM (EEEE)", n);
130
- }, Sn = function() {
122
+ formatCaption: Mn,
123
+ formatDay: kn,
124
+ formatMonthCaption: Nn,
125
+ formatWeekNumber: Cn,
126
+ formatWeekdayName: Pn,
127
+ formatYearCaption: xn
128
+ }), In = function(e, t, n) {
129
+ return O(e, "do MMMM (EEEE)", n);
130
+ }, Wn = function() {
131
131
  return "Month: ";
132
- }, Ln = function() {
132
+ }, Sn = function() {
133
133
  return "Go to next month";
134
- }, En = function() {
134
+ }, Ln = function() {
135
135
  return "Go to previous month";
136
- }, Rn = function(e, t) {
137
- return W(e, "cccc", t);
138
- }, Bn = function(e) {
136
+ }, En = function(e, t) {
137
+ return O(e, "cccc", t);
138
+ }, Rn = function(e) {
139
139
  return "Week n. ".concat(e);
140
- }, Tn = function() {
140
+ }, Bn = function() {
141
141
  return "Year: ";
142
- }, Fn = /* @__PURE__ */ Object.freeze({
142
+ }, Tn = /* @__PURE__ */ Object.freeze({
143
143
  __proto__: null,
144
- labelDay: Wn,
145
- labelMonthDropdown: Sn,
146
- labelNext: Ln,
147
- labelPrevious: En,
148
- labelWeekNumber: Bn,
149
- labelWeekday: Rn,
150
- labelYearDropdown: Tn
144
+ labelDay: In,
145
+ labelMonthDropdown: Wn,
146
+ labelNext: Sn,
147
+ labelPrevious: Ln,
148
+ labelWeekNumber: Rn,
149
+ labelWeekday: En,
150
+ labelYearDropdown: Bn
151
151
  });
152
- function An() {
153
- var e = "buttons", t = Mn, n = an, r = {}, a = {}, o = 1, i = {}, l = /* @__PURE__ */ new Date();
152
+ function Fn() {
153
+ var e = "buttons", t = Dn, n = rn, r = {}, a = {}, o = 1, i = {}, l = /* @__PURE__ */ new Date();
154
154
  return {
155
155
  captionLayout: e,
156
156
  classNames: t,
157
157
  formatters: On,
158
- labels: Fn,
158
+ labels: Tn,
159
159
  locale: n,
160
160
  modifiersClassNames: r,
161
161
  modifiers: a,
@@ -165,19 +165,19 @@ function An() {
165
165
  mode: "default"
166
166
  };
167
167
  }
168
- function Hn(e) {
168
+ function An(e) {
169
169
  var t = e.fromYear, n = e.toYear, r = e.fromMonth, a = e.toMonth, o = e.fromDate, i = e.toDate;
170
- return r ? o = R(r) : t && (o = new Date(t, 0, 1)), a ? i = Fe(a) : n && (i = new Date(n, 11, 31)), {
170
+ return r ? o = S(r) : t && (o = new Date(t, 0, 1)), a ? i = Fe(a) : n && (i = new Date(n, 11, 31)), {
171
171
  fromDate: o ? rt(o) : void 0,
172
172
  toDate: i ? rt(i) : void 0
173
173
  };
174
174
  }
175
175
  var Dt = ne(void 0);
176
- function Yn(e) {
177
- var t, n = e.initialProps, r = An(), a = Hn(n), o = a.fromDate, i = a.toDate, l = (t = n.captionLayout) !== null && t !== void 0 ? t : r.captionLayout;
176
+ function Hn(e) {
177
+ var t, n = e.initialProps, r = Fn(), a = An(n), o = a.fromDate, i = a.toDate, l = (t = n.captionLayout) !== null && t !== void 0 ? t : r.captionLayout;
178
178
  l !== "buttons" && (!o || !i) && (l = "buttons");
179
179
  var d;
180
- (_e(n) || ce(n) || fe(n)) && (d = n.onSelect);
180
+ (we(n) || de(n) || ue(n)) && (d = n.onSelect);
181
181
  var u = g(g(g({}, r), n), { captionLayout: l, classNames: g(g({}, r.classNames), n.classNames), components: g({}, n.components), formatters: g(g({}, r.formatters), n.formatters), fromDate: o, labels: g(g({}, r.labels), n.labels), mode: n.mode || r.mode, modifiers: g(g({}, r.modifiers), n.modifiers), modifiersClassNames: g(g({}, r.modifiersClassNames), n.modifiersClassNames), onSelect: d, styles: g(g({}, r.styles), n.styles), toDate: i });
182
182
  return s(Dt.Provider, { value: u, children: e.children });
183
183
  }
@@ -191,107 +191,107 @@ function Mt(e) {
191
191
  var t = k(), n = t.locale, r = t.classNames, a = t.styles, o = t.formatters.formatCaption;
192
192
  return s("div", { className: r.caption_label, style: a.caption_label, "aria-live": "polite", role: "presentation", id: e.id, children: o(e.displayMonth, { locale: n }) });
193
193
  }
194
- function jn(e) {
194
+ function Yn(e) {
195
195
  return s("svg", g({ width: "8px", height: "8px", viewBox: "0 0 120 120", "data-testid": "iconDropdown" }, e, { children: s("path", { d: "M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z", fill: "currentColor", fillRule: "nonzero" }) }));
196
196
  }
197
197
  function kt(e) {
198
- var t, n, r = e.onChange, a = e.value, o = e.children, i = e.caption, l = e.className, d = e.style, u = k(), c = (n = (t = u.components) === null || t === void 0 ? void 0 : t.IconDropdown) !== null && n !== void 0 ? n : jn;
199
- return B("div", { className: l, style: d, children: [s("span", { className: u.classNames.vhidden, children: e["aria-label"] }), s("select", { name: e.name, "aria-label": e["aria-label"], className: u.classNames.dropdown, style: u.styles.dropdown, value: a, onChange: r, children: o }), B("div", { className: u.classNames.caption_label, style: u.styles.caption_label, "aria-hidden": "true", children: [i, s(c, { className: u.classNames.dropdown_icon, style: u.styles.dropdown_icon })] })] });
198
+ var t, n, r = e.onChange, a = e.value, o = e.children, i = e.caption, l = e.className, d = e.style, u = k(), c = (n = (t = u.components) === null || t === void 0 ? void 0 : t.IconDropdown) !== null && n !== void 0 ? n : Yn;
199
+ return L("div", { className: l, style: d, children: [s("span", { className: u.classNames.vhidden, children: e["aria-label"] }), s("select", { name: e.name, "aria-label": e["aria-label"], className: u.classNames.dropdown, style: u.styles.dropdown, value: a, onChange: r, children: o }), L("div", { className: u.classNames.caption_label, style: u.styles.caption_label, "aria-hidden": "true", children: [i, s(c, { className: u.classNames.dropdown_icon, style: u.styles.dropdown_icon })] })] });
200
200
  }
201
- function Vn(e) {
201
+ function jn(e) {
202
202
  var t, n = k(), r = n.fromDate, a = n.toDate, o = n.styles, i = n.locale, l = n.formatters.formatMonthCaption, d = n.classNames, u = n.components, c = n.labels.labelMonthDropdown;
203
203
  if (!r)
204
- return s(Y, {});
204
+ return s(A, {});
205
205
  if (!a)
206
- return s(Y, {});
206
+ return s(A, {});
207
207
  var f = [];
208
- if (qt(r, a))
209
- for (var v = R(r), m = r.getMonth(); m <= a.getMonth(); m++)
208
+ if ($t(r, a))
209
+ for (var v = S(r), m = r.getMonth(); m <= a.getMonth(); m++)
210
210
  f.push(Pe(v, m));
211
211
  else
212
- for (var v = R(/* @__PURE__ */ new Date()), m = 0; m <= 11; m++)
212
+ for (var v = S(/* @__PURE__ */ new Date()), m = 0; m <= 11; m++)
213
213
  f.push(Pe(v, m));
214
214
  var y = function(p) {
215
- var D = Number(p.target.value), M = Pe(R(e.displayMonth), D);
215
+ var D = Number(p.target.value), M = Pe(S(e.displayMonth), D);
216
216
  e.onChange(M);
217
217
  }, _ = (t = u == null ? void 0 : u.Dropdown) !== null && t !== void 0 ? t : kt;
218
218
  return s(_, { name: "months", "aria-label": c(), className: d.dropdown_month, style: o.dropdown_month, onChange: y, value: e.displayMonth.getMonth(), caption: l(e.displayMonth, { locale: i }), children: f.map(function(p) {
219
219
  return s("option", { value: p.getMonth(), children: l(p, { locale: i }) }, p.getMonth());
220
220
  }) });
221
221
  }
222
- function Kn(e) {
222
+ function Vn(e) {
223
223
  var t, n = e.displayMonth, r = k(), a = r.fromDate, o = r.toDate, i = r.locale, l = r.styles, d = r.classNames, u = r.components, c = r.formatters.formatYearCaption, f = r.labels.labelYearDropdown, v = [];
224
224
  if (!a)
225
- return s(Y, {});
225
+ return s(A, {});
226
226
  if (!o)
227
- return s(Y, {});
227
+ return s(A, {});
228
228
  for (var m = a.getFullYear(), y = o.getFullYear(), _ = m; _ <= y; _++)
229
- v.push(at(Jt(/* @__PURE__ */ new Date()), _));
229
+ v.push(at(qt(/* @__PURE__ */ new Date()), _));
230
230
  var p = function(M) {
231
- var S = at(R(n), Number(M.target.value));
232
- e.onChange(S);
231
+ var I = at(S(n), Number(M.target.value));
232
+ e.onChange(I);
233
233
  }, D = (t = u == null ? void 0 : u.Dropdown) !== null && t !== void 0 ? t : kt;
234
234
  return s(D, { name: "years", "aria-label": f(), className: d.dropdown_year, style: l.dropdown_year, onChange: p, value: n.getFullYear(), caption: c(n, { locale: i }), children: v.map(function(M) {
235
235
  return s("option", { value: M.getFullYear(), children: c(M, { locale: i }) }, M.getFullYear());
236
236
  }) });
237
237
  }
238
- function Un(e, t) {
239
- var n = A(e), r = n[0], a = n[1], o = t === void 0 ? r : t;
238
+ function Kn(e, t) {
239
+ var n = B(e), r = n[0], a = n[1], o = t === void 0 ? r : t;
240
240
  return [o, a];
241
241
  }
242
- function Xn(e) {
242
+ function Un(e) {
243
243
  var t = e.month, n = e.defaultMonth, r = e.today, a = t || n || r || /* @__PURE__ */ new Date(), o = e.toDate, i = e.fromDate, l = e.numberOfMonths, d = l === void 0 ? 1 : l;
244
- if (o && de(o, a) < 0) {
244
+ if (o && le(o, a) < 0) {
245
245
  var u = -1 * (d - 1);
246
- a = K(o, u);
246
+ a = j(o, u);
247
247
  }
248
- return i && de(a, i) < 0 && (a = i), R(a);
248
+ return i && le(a, i) < 0 && (a = i), S(a);
249
249
  }
250
- function Zn() {
251
- var e = k(), t = Xn(e), n = Un(t, e.month), r = n[0], a = n[1], o = function(i) {
250
+ function Xn() {
251
+ var e = k(), t = Un(e), n = Kn(t, e.month), r = n[0], a = n[1], o = function(i) {
252
252
  var l;
253
253
  if (!e.disableNavigation) {
254
- var d = R(i);
254
+ var d = S(i);
255
255
  a(d), (l = e.onMonthChange) === null || l === void 0 || l.call(e, d);
256
256
  }
257
257
  };
258
258
  return [r, o];
259
259
  }
260
- function Gn(e, t) {
261
- for (var n = t.reverseMonths, r = t.numberOfMonths, a = R(e), o = R(K(a, r)), i = de(o, a), l = [], d = 0; d < i; d++) {
262
- var u = K(a, d);
260
+ function Zn(e, t) {
261
+ for (var n = t.reverseMonths, r = t.numberOfMonths, a = S(e), o = S(j(a, r)), i = le(o, a), l = [], d = 0; d < i; d++) {
262
+ var u = j(a, d);
263
263
  l.push(u);
264
264
  }
265
265
  return n && (l = l.reverse()), l;
266
266
  }
267
- function $n(e, t) {
267
+ function Gn(e, t) {
268
268
  if (!t.disableNavigation) {
269
- var n = t.toDate, r = t.pagedNavigation, a = t.numberOfMonths, o = a === void 0 ? 1 : a, i = r ? o : 1, l = R(e);
269
+ var n = t.toDate, r = t.pagedNavigation, a = t.numberOfMonths, o = a === void 0 ? 1 : a, i = r ? o : 1, l = S(e);
270
270
  if (!n)
271
- return K(l, i);
272
- var d = de(n, e);
271
+ return j(l, i);
272
+ var d = le(n, e);
273
273
  if (!(d < o))
274
- return K(l, i);
274
+ return j(l, i);
275
275
  }
276
276
  }
277
- function qn(e, t) {
277
+ function $n(e, t) {
278
278
  if (!t.disableNavigation) {
279
- var n = t.fromDate, r = t.pagedNavigation, a = t.numberOfMonths, o = a === void 0 ? 1 : a, i = r ? o : 1, l = R(e);
279
+ var n = t.fromDate, r = t.pagedNavigation, a = t.numberOfMonths, o = a === void 0 ? 1 : a, i = r ? o : 1, l = S(e);
280
280
  if (!n)
281
- return K(l, -i);
282
- var d = de(l, n);
281
+ return j(l, -i);
282
+ var d = le(l, n);
283
283
  if (!(d <= 0))
284
- return K(l, -i);
284
+ return j(l, -i);
285
285
  }
286
286
  }
287
287
  var Nt = ne(void 0);
288
- function Jn(e) {
289
- var t = k(), n = Zn(), r = n[0], a = n[1], o = Gn(r, t), i = $n(r, t), l = qn(r, t), d = function(f) {
288
+ function qn(e) {
289
+ var t = k(), n = Xn(), r = n[0], a = n[1], o = Zn(r, t), i = Gn(r, t), l = $n(r, t), d = function(f) {
290
290
  return o.some(function(v) {
291
291
  return Ae(f, v);
292
292
  });
293
293
  }, u = function(f, v) {
294
- d(f) || (v && He(f, v) ? a(K(f, 1 + t.numberOfMonths * -1)) : a(f));
294
+ d(f) || (v && He(f, v) ? a(j(f, 1 + t.numberOfMonths * -1)) : a(f));
295
295
  }, c = {
296
296
  currentMonth: r,
297
297
  displayMonths: o,
@@ -303,85 +303,85 @@ function Jn(e) {
303
303
  };
304
304
  return s(Nt.Provider, { value: c, children: e.children });
305
305
  }
306
- function ve() {
306
+ function ce() {
307
307
  var e = re(Nt);
308
308
  if (!e)
309
309
  throw new Error("useNavigation must be used within a NavigationProvider");
310
310
  return e;
311
311
  }
312
312
  function st(e) {
313
- var t, n = k(), r = n.classNames, a = n.styles, o = n.components, i = ve().goToMonth, l = function(c) {
314
- i(K(c, e.displayIndex ? -e.displayIndex : 0));
313
+ var t, n = k(), r = n.classNames, a = n.styles, o = n.components, i = ce().goToMonth, l = function(c) {
314
+ i(j(c, e.displayIndex ? -e.displayIndex : 0));
315
315
  }, d = (t = o == null ? void 0 : o.CaptionLabel) !== null && t !== void 0 ? t : Mt, u = s(d, { id: e.id, displayMonth: e.displayMonth });
316
- return B("div", { className: r.caption_dropdowns, style: a.caption_dropdowns, children: [s("div", { className: r.vhidden, children: u }), s(Vn, { onChange: l, displayMonth: e.displayMonth }), s(Kn, { onChange: l, displayMonth: e.displayMonth })] });
316
+ return L("div", { className: r.caption_dropdowns, style: a.caption_dropdowns, children: [s("div", { className: r.vhidden, children: u }), s(jn, { onChange: l, displayMonth: e.displayMonth }), s(Vn, { onChange: l, displayMonth: e.displayMonth })] });
317
317
  }
318
- function Qn(e) {
318
+ function Jn(e) {
319
319
  return s("svg", g({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: s("path", { d: "M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z", fill: "currentColor", fillRule: "nonzero" }) }));
320
320
  }
321
- function zn(e) {
321
+ function Qn(e) {
322
322
  return s("svg", g({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: s("path", { d: "M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z", fill: "currentColor" }) }));
323
323
  }
324
- var ge = Xt(function(e, t) {
324
+ var _e = Ut(function(e, t) {
325
325
  var n = k(), r = n.classNames, a = n.styles, o = [r.button_reset, r.button];
326
326
  e.className && o.push(e.className);
327
327
  var i = o.join(" "), l = g(g({}, a.button_reset), a.button);
328
328
  return e.style && Object.assign(l, e.style), s("button", g({}, e, { ref: t, type: "button", className: i, style: l }));
329
329
  });
330
- function er(e) {
330
+ function zn(e) {
331
331
  var t, n, r = k(), a = r.dir, o = r.locale, i = r.classNames, l = r.styles, d = r.labels, u = d.labelPrevious, c = d.labelNext, f = r.components;
332
332
  if (!e.nextMonth && !e.previousMonth)
333
- return s(Y, {});
333
+ return s(A, {});
334
334
  var v = u(e.previousMonth, { locale: o }), m = [
335
335
  i.nav_button,
336
336
  i.nav_button_previous
337
337
  ].join(" "), y = c(e.nextMonth, { locale: o }), _ = [
338
338
  i.nav_button,
339
339
  i.nav_button_next
340
- ].join(" "), p = (t = f == null ? void 0 : f.IconRight) !== null && t !== void 0 ? t : zn, D = (n = f == null ? void 0 : f.IconLeft) !== null && n !== void 0 ? n : Qn;
341
- return B("div", { className: i.nav, style: l.nav, children: [!e.hidePrevious && s(ge, { name: "previous-month", "aria-label": v, className: m, style: l.nav_button_previous, disabled: !e.previousMonth, onClick: e.onPreviousClick, children: a === "rtl" ? s(p, { className: i.nav_icon, style: l.nav_icon }) : s(D, { className: i.nav_icon, style: l.nav_icon }) }), !e.hideNext && s(ge, { name: "next-month", "aria-label": y, className: _, style: l.nav_button_next, disabled: !e.nextMonth, onClick: e.onNextClick, children: a === "rtl" ? s(D, { className: i.nav_icon, style: l.nav_icon }) : s(p, { className: i.nav_icon, style: l.nav_icon }) })] });
340
+ ].join(" "), p = (t = f == null ? void 0 : f.IconRight) !== null && t !== void 0 ? t : Qn, D = (n = f == null ? void 0 : f.IconLeft) !== null && n !== void 0 ? n : Jn;
341
+ return L("div", { className: i.nav, style: l.nav, children: [!e.hidePrevious && s(_e, { name: "previous-month", "aria-label": v, className: m, style: l.nav_button_previous, disabled: !e.previousMonth, onClick: e.onPreviousClick, children: a === "rtl" ? s(p, { className: i.nav_icon, style: l.nav_icon }) : s(D, { className: i.nav_icon, style: l.nav_icon }) }), !e.hideNext && s(_e, { name: "next-month", "aria-label": y, className: _, style: l.nav_button_next, disabled: !e.nextMonth, onClick: e.onNextClick, children: a === "rtl" ? s(D, { className: i.nav_icon, style: l.nav_icon }) : s(p, { className: i.nav_icon, style: l.nav_icon }) })] });
342
342
  }
343
343
  function dt(e) {
344
- var t = k().numberOfMonths, n = ve(), r = n.previousMonth, a = n.nextMonth, o = n.goToMonth, i = n.displayMonths, l = i.findIndex(function(y) {
344
+ var t = k().numberOfMonths, n = ce(), r = n.previousMonth, a = n.nextMonth, o = n.goToMonth, i = n.displayMonths, l = i.findIndex(function(y) {
345
345
  return Ae(e.displayMonth, y);
346
346
  }), d = l === 0, u = l === i.length - 1, c = t > 1 && (d || !u), f = t > 1 && (u || !d), v = function() {
347
347
  r && o(r);
348
348
  }, m = function() {
349
349
  a && o(a);
350
350
  };
351
- return s(er, { displayMonth: e.displayMonth, hideNext: c, hidePrevious: f, nextMonth: a, previousMonth: r, onPreviousClick: v, onNextClick: m });
351
+ return s(zn, { displayMonth: e.displayMonth, hideNext: c, hidePrevious: f, nextMonth: a, previousMonth: r, onPreviousClick: v, onNextClick: m });
352
352
  }
353
- function tr(e) {
353
+ function er(e) {
354
354
  var t, n = k(), r = n.classNames, a = n.disableNavigation, o = n.styles, i = n.captionLayout, l = n.components, d = (t = l == null ? void 0 : l.CaptionLabel) !== null && t !== void 0 ? t : Mt, u;
355
- return a ? u = s(d, { id: e.id, displayMonth: e.displayMonth }) : i === "dropdown" ? u = s(st, { displayMonth: e.displayMonth, id: e.id }) : i === "dropdown-buttons" ? u = B(Y, { children: [s(st, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), s(dt, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : u = B(Y, { children: [s(d, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(dt, { displayMonth: e.displayMonth, id: e.id })] }), s("div", { className: r.caption, style: o.caption, children: u });
355
+ return a ? u = s(d, { id: e.id, displayMonth: e.displayMonth }) : i === "dropdown" ? u = s(st, { displayMonth: e.displayMonth, id: e.id }) : i === "dropdown-buttons" ? u = L(A, { children: [s(st, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), s(dt, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : u = L(A, { children: [s(d, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(dt, { displayMonth: e.displayMonth, id: e.id })] }), s("div", { className: r.caption, style: o.caption, children: u });
356
356
  }
357
- function nr(e) {
357
+ function tr(e) {
358
358
  var t = k(), n = t.footer, r = t.styles, a = t.classNames.tfoot;
359
- return n ? s("tfoot", { className: a, style: r.tfoot, children: s("tr", { children: s("td", { colSpan: 8, children: n }) }) }) : s(Y, {});
359
+ return n ? s("tfoot", { className: a, style: r.tfoot, children: s("tr", { children: s("td", { colSpan: 8, children: n }) }) }) : s(A, {});
360
360
  }
361
- function rr(e, t, n) {
361
+ function nr(e, t, n) {
362
362
  for (var r = n ? Ye(/* @__PURE__ */ new Date()) : je(/* @__PURE__ */ new Date(), { locale: e, weekStartsOn: t }), a = [], o = 0; o < 7; o++) {
363
- var i = E(r, o);
363
+ var i = W(r, o);
364
364
  a.push(i);
365
365
  }
366
366
  return a;
367
367
  }
368
- function ar() {
369
- var e = k(), t = e.classNames, n = e.styles, r = e.showWeekNumber, a = e.locale, o = e.weekStartsOn, i = e.ISOWeek, l = e.formatters.formatWeekdayName, d = e.labels.labelWeekday, u = rr(a, o, i);
370
- return B("tr", { style: n.head_row, className: t.head_row, children: [r && s("td", { style: n.head_cell, className: t.head_cell }), u.map(function(c, f) {
368
+ function rr() {
369
+ var e = k(), t = e.classNames, n = e.styles, r = e.showWeekNumber, a = e.locale, o = e.weekStartsOn, i = e.ISOWeek, l = e.formatters.formatWeekdayName, d = e.labels.labelWeekday, u = nr(a, o, i);
370
+ return L("tr", { style: n.head_row, className: t.head_row, children: [r && s("td", { style: n.head_cell, className: t.head_cell }), u.map(function(c, f) {
371
371
  return s("th", { scope: "col", className: t.head_cell, style: n.head_cell, "aria-label": d(c, { locale: a }), children: l(c, { locale: a }) }, f);
372
372
  })] });
373
373
  }
374
- function or() {
375
- var e, t = k(), n = t.classNames, r = t.styles, a = t.components, o = (e = a == null ? void 0 : a.HeadRow) !== null && e !== void 0 ? e : ar;
374
+ function ar() {
375
+ var e, t = k(), n = t.classNames, r = t.styles, a = t.components, o = (e = a == null ? void 0 : a.HeadRow) !== null && e !== void 0 ? e : rr;
376
376
  return s("thead", { style: r.head, className: n.head, children: s(o, {}) });
377
377
  }
378
- function ir(e) {
378
+ function or(e) {
379
379
  var t = k(), n = t.locale, r = t.formatters.formatDay;
380
- return s(Y, { children: r(e.date, { locale: n }) });
380
+ return s(A, { children: r(e.date, { locale: n }) });
381
381
  }
382
382
  var Ve = ne(void 0);
383
- function lr(e) {
384
- if (!ce(e.initialProps)) {
383
+ function ir(e) {
384
+ if (!de(e.initialProps)) {
385
385
  var t = {
386
386
  selected: void 0,
387
387
  modifiers: {
@@ -390,9 +390,9 @@ function lr(e) {
390
390
  };
391
391
  return s(Ve.Provider, { value: t, children: e.children });
392
392
  }
393
- return s(sr, { initialProps: e.initialProps, children: e.children });
393
+ return s(lr, { initialProps: e.initialProps, children: e.children });
394
394
  }
395
- function sr(e) {
395
+ function lr(e) {
396
396
  var t = e.initialProps, n = e.children, r = t.selected, a = t.min, o = t.max, i = function(u, c, f) {
397
397
  var v, m;
398
398
  (v = t.onDayClick) === null || v === void 0 || v.call(t, u, c, f);
@@ -433,13 +433,13 @@ function Ke() {
433
433
  throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");
434
434
  return e;
435
435
  }
436
- function dr(e, t) {
436
+ function sr(e, t) {
437
437
  var n = t || {}, r = n.from, a = n.to;
438
- return r && a ? N(a, e) && N(r, e) ? void 0 : N(a, e) ? { from: a, to: void 0 } : N(r, e) ? void 0 : be(r, e) ? { from: e, to: a } : { from: r, to: e } : a ? be(e, a) ? { from: a, to: e } : { from: e, to: a } : r ? He(e, r) ? { from: e, to: r } : { from: r, to: e } : { from: e, to: void 0 };
438
+ return r && a ? N(a, e) && N(r, e) ? void 0 : N(a, e) ? { from: a, to: void 0 } : N(r, e) ? void 0 : ge(r, e) ? { from: e, to: a } : { from: r, to: e } : a ? ge(e, a) ? { from: a, to: e } : { from: e, to: a } : r ? He(e, r) ? { from: e, to: r } : { from: r, to: e } : { from: e, to: void 0 };
439
439
  }
440
440
  var Ue = ne(void 0);
441
- function ur(e) {
442
- if (!fe(e.initialProps)) {
441
+ function dr(e) {
442
+ if (!ue(e.initialProps)) {
443
443
  var t = {
444
444
  selected: void 0,
445
445
  modifiers: {
@@ -451,13 +451,13 @@ function ur(e) {
451
451
  };
452
452
  return s(Ue.Provider, { value: t, children: e.children });
453
453
  }
454
- return s(cr, { initialProps: e.initialProps, children: e.children });
454
+ return s(ur, { initialProps: e.initialProps, children: e.children });
455
455
  }
456
- function cr(e) {
456
+ function ur(e) {
457
457
  var t = e.initialProps, n = e.children, r = t.selected, a = r || {}, o = a.from, i = a.to, l = t.min, d = t.max, u = function(m, y, _) {
458
458
  var p, D;
459
459
  (p = t.onDayClick) === null || p === void 0 || p.call(t, m, y, _);
460
- var M = dr(m, r);
460
+ var M = sr(m, r);
461
461
  (D = t.onSelect) === null || D === void 0 || D.call(t, M, m, y, _);
462
462
  }, c = {
463
463
  range_start: [],
@@ -472,30 +472,30 @@ function cr(e) {
472
472
  }
473
473
  ])) : c.range_end = [o]) : i && (c.range_start = [i], c.range_end = [i]), l && (o && !i && c.disabled.push({
474
474
  after: Ce(o, l - 1),
475
- before: E(o, l - 1)
475
+ before: W(o, l - 1)
476
476
  }), o && i && c.disabled.push({
477
477
  after: o,
478
- before: E(o, l - 1)
478
+ before: W(o, l - 1)
479
479
  }), !o && i && c.disabled.push({
480
480
  after: Ce(i, l - 1),
481
- before: E(i, l - 1)
481
+ before: W(i, l - 1)
482
482
  })), d) {
483
483
  if (o && !i && (c.disabled.push({
484
- before: E(o, -d + 1)
484
+ before: W(o, -d + 1)
485
485
  }), c.disabled.push({
486
- after: E(o, d - 1)
486
+ after: W(o, d - 1)
487
487
  })), o && i) {
488
- var f = X(i, o) + 1, v = d - f;
488
+ var f = U(i, o) + 1, v = d - f;
489
489
  c.disabled.push({
490
490
  before: Ce(o, v)
491
491
  }), c.disabled.push({
492
- after: E(i, v)
492
+ after: W(i, v)
493
493
  });
494
494
  }
495
495
  !o && i && (c.disabled.push({
496
- before: E(i, -d + 1)
496
+ before: W(i, -d + 1)
497
497
  }), c.disabled.push({
498
- after: E(i, d - 1)
498
+ after: W(i, d - 1)
499
499
  }));
500
500
  }
501
501
  return s(Ue.Provider, { value: { selected: r, onDayClick: u, modifiers: c }, children: n });
@@ -506,28 +506,28 @@ function Xe() {
506
506
  throw new Error("useSelectRange must be used within a SelectRangeProvider");
507
507
  return e;
508
508
  }
509
- function ye(e) {
509
+ function be(e) {
510
510
  return Array.isArray(e) ? wt([], e) : e !== void 0 ? [e] : [];
511
511
  }
512
- function fr(e) {
512
+ function cr(e) {
513
513
  var t = {};
514
514
  return Object.entries(e).forEach(function(n) {
515
515
  var r = n[0], a = n[1];
516
- t[r] = ye(a);
516
+ t[r] = be(a);
517
517
  }), t;
518
518
  }
519
- var j;
519
+ var H;
520
520
  (function(e) {
521
521
  e.Outside = "outside", e.Disabled = "disabled", e.Selected = "selected", e.Hidden = "hidden", e.Today = "today", e.RangeStart = "range_start", e.RangeEnd = "range_end", e.RangeMiddle = "range_middle";
522
- })(j || (j = {}));
523
- var vr = j.Selected, U = j.Disabled, mr = j.Hidden, hr = j.Today, xe = j.RangeEnd, Ie = j.RangeMiddle, Oe = j.RangeStart, pr = j.Outside;
524
- function yr(e, t, n) {
525
- var r, a = (r = {}, r[vr] = ye(e.selected), r[U] = ye(e.disabled), r[mr] = ye(e.hidden), r[hr] = [e.today], r[xe] = [], r[Ie] = [], r[Oe] = [], r[pr] = [], r);
526
- return e.fromDate && a[U].push({ before: e.fromDate }), e.toDate && a[U].push({ after: e.toDate }), ce(e) ? a[U] = a[U].concat(t.modifiers[U]) : fe(e) && (a[U] = a[U].concat(n.modifiers[U]), a[Oe] = n.modifiers[Oe], a[Ie] = n.modifiers[Ie], a[xe] = n.modifiers[xe]), a;
522
+ })(H || (H = {}));
523
+ var fr = H.Selected, K = H.Disabled, vr = H.Hidden, mr = H.Today, xe = H.RangeEnd, Oe = H.RangeMiddle, Ie = H.RangeStart, hr = H.Outside;
524
+ function pr(e, t, n) {
525
+ var r, a = (r = {}, r[fr] = be(e.selected), r[K] = be(e.disabled), r[vr] = be(e.hidden), r[mr] = [e.today], r[xe] = [], r[Oe] = [], r[Ie] = [], r[hr] = [], r);
526
+ return e.fromDate && a[K].push({ before: e.fromDate }), e.toDate && a[K].push({ after: e.toDate }), de(e) ? a[K] = a[K].concat(t.modifiers[K]) : ue(e) && (a[K] = a[K].concat(n.modifiers[K]), a[Ie] = n.modifiers[Ie], a[Oe] = n.modifiers[Oe], a[xe] = n.modifiers[xe]), a;
527
527
  }
528
528
  var Ct = ne(void 0);
529
- function br(e) {
530
- var t = k(), n = Ke(), r = Xe(), a = yr(t, n, r), o = fr(t.modifiers), i = g(g({}, a), o);
529
+ function yr(e) {
530
+ var t = k(), n = Ke(), r = Xe(), a = pr(t, n, r), o = cr(t.modifiers), i = g(g({}, a), o);
531
531
  return s(Ct.Provider, { value: i, children: e.children });
532
532
  }
533
533
  function Pt() {
@@ -536,85 +536,85 @@ function Pt() {
536
536
  throw new Error("useModifiers must be used within a ModifiersProvider");
537
537
  return e;
538
538
  }
539
- function gr(e) {
539
+ function br(e) {
540
540
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
541
541
  }
542
- function _r(e) {
542
+ function gr(e) {
543
543
  return !!(e && typeof e == "object" && "from" in e);
544
544
  }
545
- function wr(e) {
545
+ function _r(e) {
546
546
  return !!(e && typeof e == "object" && "after" in e);
547
547
  }
548
- function Dr(e) {
548
+ function wr(e) {
549
549
  return !!(e && typeof e == "object" && "before" in e);
550
550
  }
551
- function Mr(e) {
551
+ function Dr(e) {
552
552
  return !!(e && typeof e == "object" && "dayOfWeek" in e);
553
553
  }
554
- function kr(e, t) {
554
+ function Mr(e, t) {
555
555
  var n, r = t.from, a = t.to;
556
556
  if (r && a) {
557
- var o = X(a, r) < 0;
557
+ var o = U(a, r) < 0;
558
558
  o && (n = [a, r], r = n[0], a = n[1]);
559
- var i = X(e, r) >= 0 && X(a, e) >= 0;
559
+ var i = U(e, r) >= 0 && U(a, e) >= 0;
560
560
  return i;
561
561
  }
562
562
  return a ? N(a, e) : r ? N(r, e) : !1;
563
563
  }
564
- function Nr(e) {
564
+ function kr(e) {
565
565
  return yt(e);
566
566
  }
567
- function Cr(e) {
567
+ function Nr(e) {
568
568
  return Array.isArray(e) && e.every(yt);
569
569
  }
570
- function Pr(e, t) {
570
+ function Cr(e, t) {
571
571
  return t.some(function(n) {
572
572
  if (typeof n == "boolean")
573
573
  return n;
574
- if (Nr(n))
574
+ if (kr(n))
575
575
  return N(e, n);
576
- if (Cr(n))
576
+ if (Nr(n))
577
577
  return n.includes(e);
578
- if (_r(n))
579
- return kr(e, n);
580
- if (Mr(n))
578
+ if (gr(n))
579
+ return Mr(e, n);
580
+ if (Dr(n))
581
581
  return n.dayOfWeek.includes(e.getDay());
582
- if (gr(n)) {
583
- var r = X(n.before, e), a = X(n.after, e), o = r > 0, i = a < 0, l = be(n.before, n.after);
582
+ if (br(n)) {
583
+ var r = U(n.before, e), a = U(n.after, e), o = r > 0, i = a < 0, l = ge(n.before, n.after);
584
584
  return l ? i && o : o || i;
585
585
  }
586
- return wr(n) ? X(e, n.after) > 0 : Dr(n) ? X(n.before, e) > 0 : typeof n == "function" ? n(e) : !1;
586
+ return _r(n) ? U(e, n.after) > 0 : wr(n) ? U(n.before, e) > 0 : typeof n == "function" ? n(e) : !1;
587
587
  });
588
588
  }
589
589
  function Ze(e, t, n) {
590
590
  var r = Object.keys(t).reduce(function(o, i) {
591
591
  var l = t[i];
592
- return Pr(e, l) && o.push(i), o;
592
+ return Cr(e, l) && o.push(i), o;
593
593
  }, []), a = {};
594
594
  return r.forEach(function(o) {
595
595
  return a[o] = !0;
596
596
  }), n && !Ae(e, n) && (a.outside = !0), a;
597
597
  }
598
- function xr(e, t) {
599
- for (var n = R(e[0]), r = Fe(e[e.length - 1]), a, o, i = n; i <= r; ) {
598
+ function Pr(e, t) {
599
+ for (var n = S(e[0]), r = Fe(e[e.length - 1]), a, o, i = n; i <= r; ) {
600
600
  var l = Ze(i, t), d = !l.disabled && !l.hidden;
601
601
  if (!d) {
602
- i = E(i, 1);
602
+ i = W(i, 1);
603
603
  continue;
604
604
  }
605
605
  if (l.selected)
606
606
  return i;
607
- l.today && !o && (o = i), a || (a = i), i = E(i, 1);
607
+ l.today && !o && (o = i), a || (a = i), i = W(i, 1);
608
608
  }
609
609
  return o || a;
610
610
  }
611
- var Ir = 365;
611
+ var xr = 365;
612
612
  function xt(e, t) {
613
613
  var n = t.moveBy, r = t.direction, a = t.context, o = t.modifiers, i = t.retry, l = i === void 0 ? { count: 0, lastFocused: e } : i, d = a.weekStartsOn, u = a.fromDate, c = a.toDate, f = a.locale, v = {
614
- day: E,
614
+ day: W,
615
615
  week: Ee,
616
- month: K,
617
- year: nn,
616
+ month: j,
617
+ year: tn,
618
618
  startOfWeek: function(p) {
619
619
  return a.ISOWeek ? Ye(p) : je(p, { locale: f, weekStartsOn: d });
620
620
  },
@@ -622,13 +622,13 @@ function xt(e, t) {
622
622
  return a.ISOWeek ? ht(p) : pt(p, { locale: f, weekStartsOn: d });
623
623
  }
624
624
  }, m = v[n](e, r === "after" ? 1 : -1);
625
- r === "before" && u ? m = Qt([u, m]) : r === "after" && c && (m = zt([c, m]));
625
+ r === "before" && u ? m = Jt([u, m]) : r === "after" && c && (m = Qt([c, m]));
626
626
  var y = !0;
627
627
  if (o) {
628
628
  var _ = Ze(m, o);
629
629
  y = !_.disabled && !_.hidden;
630
630
  }
631
- return y ? m : l.count > Ir ? l.lastFocused : xt(m, {
631
+ return y ? m : l.count > xr ? l.lastFocused : xt(m, {
632
632
  moveBy: n,
633
633
  direction: r,
634
634
  context: a,
@@ -636,9 +636,9 @@ function xt(e, t) {
636
636
  retry: g(g({}, l), { count: l.count + 1 })
637
637
  });
638
638
  }
639
- var It = ne(void 0);
639
+ var Ot = ne(void 0);
640
640
  function Or(e) {
641
- var t = ve(), n = Pt(), r = A(), a = r[0], o = r[1], i = A(), l = i[0], d = i[1], u = xr(t.displayMonths, n), c = a ?? (l && t.isDateDisplayed(l)) ? l : u, f = function() {
641
+ var t = ce(), n = Pt(), r = B(), a = r[0], o = r[1], i = B(), l = i[0], d = i[1], u = Pr(t.displayMonths, n), c = a ?? (l && t.isDateDisplayed(l)) ? l : u, f = function() {
642
642
  d(a), o(void 0);
643
643
  }, v = function(p) {
644
644
  o(p);
@@ -688,29 +688,29 @@ function Or(e) {
688
688
  return y("endOfWeek", "after");
689
689
  }
690
690
  };
691
- return s(It.Provider, { value: _, children: e.children });
691
+ return s(Ot.Provider, { value: _, children: e.children });
692
692
  }
693
693
  function Ge() {
694
- var e = re(It);
694
+ var e = re(Ot);
695
695
  if (!e)
696
696
  throw new Error("useFocusContext must be used within a FocusProvider");
697
697
  return e;
698
698
  }
699
- function Wr(e, t) {
699
+ function Ir(e, t) {
700
700
  var n = Pt(), r = Ze(e, n, t);
701
701
  return r;
702
702
  }
703
703
  var $e = ne(void 0);
704
- function Sr(e) {
705
- if (!_e(e.initialProps)) {
704
+ function Wr(e) {
705
+ if (!we(e.initialProps)) {
706
706
  var t = {
707
707
  selected: void 0
708
708
  };
709
709
  return s($e.Provider, { value: t, children: e.children });
710
710
  }
711
- return s(Lr, { initialProps: e.initialProps, children: e.children });
711
+ return s(Sr, { initialProps: e.initialProps, children: e.children });
712
712
  }
713
- function Lr(e) {
713
+ function Sr(e) {
714
714
  var t = e.initialProps, n = e.children, r = function(o, i, l) {
715
715
  var d, u, c;
716
716
  if ((d = t.onDayClick) === null || d === void 0 || d.call(t, o, i, l), i.selected && !t.required) {
@@ -724,50 +724,50 @@ function Lr(e) {
724
724
  };
725
725
  return s($e.Provider, { value: a, children: n });
726
726
  }
727
- function Ot() {
727
+ function It() {
728
728
  var e = re($e);
729
729
  if (!e)
730
730
  throw new Error("useSelectSingle must be used within a SelectSingleProvider");
731
731
  return e;
732
732
  }
733
- function Er(e, t) {
734
- var n = k(), r = Ot(), a = Ke(), o = Xe(), i = Ge(), l = i.focusDayAfter, d = i.focusDayBefore, u = i.focusWeekAfter, c = i.focusWeekBefore, f = i.blur, v = i.focus, m = i.focusMonthBefore, y = i.focusMonthAfter, _ = i.focusYearBefore, p = i.focusYearAfter, D = i.focusStartOfWeek, M = i.focusEndOfWeek, S = function(b) {
735
- var h, ee, L, te;
736
- _e(n) ? (h = r.onDayClick) === null || h === void 0 || h.call(r, e, t, b) : ce(n) ? (ee = a.onDayClick) === null || ee === void 0 || ee.call(a, e, t, b) : fe(n) ? (L = o.onDayClick) === null || L === void 0 || L.call(o, e, t, b) : (te = n.onDayClick) === null || te === void 0 || te.call(n, e, t, b);
737
- }, T = function(b) {
733
+ function Lr(e, t) {
734
+ var n = k(), r = It(), a = Ke(), o = Xe(), i = Ge(), l = i.focusDayAfter, d = i.focusDayBefore, u = i.focusWeekAfter, c = i.focusWeekBefore, f = i.blur, v = i.focus, m = i.focusMonthBefore, y = i.focusMonthAfter, _ = i.focusYearBefore, p = i.focusYearAfter, D = i.focusStartOfWeek, M = i.focusEndOfWeek, I = function(b) {
735
+ var h, $, T, te;
736
+ we(n) ? (h = r.onDayClick) === null || h === void 0 || h.call(r, e, t, b) : de(n) ? ($ = a.onDayClick) === null || $ === void 0 || $.call(a, e, t, b) : ue(n) ? (T = o.onDayClick) === null || T === void 0 || T.call(o, e, t, b) : (te = n.onDayClick) === null || te === void 0 || te.call(n, e, t, b);
737
+ }, E = function(b) {
738
738
  var h;
739
739
  v(e), (h = n.onDayFocus) === null || h === void 0 || h.call(n, e, t, b);
740
- }, Z = function(b) {
740
+ }, X = function(b) {
741
741
  var h;
742
742
  f(), (h = n.onDayBlur) === null || h === void 0 || h.call(n, e, t, b);
743
- }, I = function(b) {
743
+ }, x = function(b) {
744
744
  var h;
745
745
  (h = n.onDayMouseEnter) === null || h === void 0 || h.call(n, e, t, b);
746
746
  }, C = function(b) {
747
747
  var h;
748
748
  (h = n.onDayMouseLeave) === null || h === void 0 || h.call(n, e, t, b);
749
- }, V = function(b) {
749
+ }, Y = function(b) {
750
750
  var h;
751
751
  (h = n.onDayPointerEnter) === null || h === void 0 || h.call(n, e, t, b);
752
- }, G = function(b) {
752
+ }, Z = function(b) {
753
753
  var h;
754
754
  (h = n.onDayPointerLeave) === null || h === void 0 || h.call(n, e, t, b);
755
- }, De = function(b) {
755
+ }, Me = function(b) {
756
756
  var h;
757
757
  (h = n.onDayTouchCancel) === null || h === void 0 || h.call(n, e, t, b);
758
- }, Me = function(b) {
758
+ }, ke = function(b) {
759
759
  var h;
760
760
  (h = n.onDayTouchEnd) === null || h === void 0 || h.call(n, e, t, b);
761
- }, me = function(b) {
761
+ }, fe = function(b) {
762
762
  var h;
763
763
  (h = n.onDayTouchMove) === null || h === void 0 || h.call(n, e, t, b);
764
- }, $ = function(b) {
764
+ }, G = function(b) {
765
765
  var h;
766
766
  (h = n.onDayTouchStart) === null || h === void 0 || h.call(n, e, t, b);
767
- }, z = function(b) {
767
+ }, ee = function(b) {
768
768
  var h;
769
769
  (h = n.onDayKeyUp) === null || h === void 0 || h.call(n, e, t, b);
770
- }, ke = function(b) {
770
+ }, Ne = function(b) {
771
771
  var h;
772
772
  switch (b.key) {
773
773
  case "ArrowLeft":
@@ -797,53 +797,53 @@ function Er(e, t) {
797
797
  }
798
798
  (h = n.onDayKeyDown) === null || h === void 0 || h.call(n, e, t, b);
799
799
  }, ae = {
800
- onClick: S,
801
- onFocus: T,
802
- onBlur: Z,
803
- onKeyDown: ke,
804
- onKeyUp: z,
805
- onMouseEnter: I,
800
+ onClick: I,
801
+ onFocus: E,
802
+ onBlur: X,
803
+ onKeyDown: Ne,
804
+ onKeyUp: ee,
805
+ onMouseEnter: x,
806
806
  onMouseLeave: C,
807
- onPointerEnter: V,
808
- onPointerLeave: G,
809
- onTouchCancel: De,
810
- onTouchEnd: Me,
811
- onTouchMove: me,
812
- onTouchStart: $
807
+ onPointerEnter: Y,
808
+ onPointerLeave: Z,
809
+ onTouchCancel: Me,
810
+ onTouchEnd: ke,
811
+ onTouchMove: fe,
812
+ onTouchStart: G
813
813
  };
814
814
  return ae;
815
815
  }
816
- function Rr() {
817
- var e = k(), t = Ot(), n = Ke(), r = Xe(), a = _e(e) ? t.selected : ce(e) ? n.selected : fe(e) ? r.selected : void 0;
816
+ function Er() {
817
+ var e = k(), t = It(), n = Ke(), r = Xe(), a = we(e) ? t.selected : de(e) ? n.selected : ue(e) ? r.selected : void 0;
818
818
  return a;
819
819
  }
820
- function Br(e) {
821
- return Object.values(j).includes(e);
820
+ function Rr(e) {
821
+ return Object.values(H).includes(e);
822
822
  }
823
- function Tr(e, t) {
823
+ function Br(e, t) {
824
824
  var n = [e.classNames.day];
825
825
  return Object.keys(t).forEach(function(r) {
826
826
  var a = e.modifiersClassNames[r];
827
827
  if (a)
828
828
  n.push(a);
829
- else if (Br(r)) {
829
+ else if (Rr(r)) {
830
830
  var o = e.classNames["day_".concat(r)];
831
831
  o && n.push(o);
832
832
  }
833
833
  }), n;
834
834
  }
835
- function Fr(e, t) {
835
+ function Tr(e, t) {
836
836
  var n = g({}, e.styles.day);
837
837
  return Object.keys(t).forEach(function(r) {
838
838
  var a;
839
839
  n = g(g({}, n), (a = e.modifiersStyles) === null || a === void 0 ? void 0 : a[r]);
840
840
  }), n;
841
841
  }
842
- function Ar(e, t, n) {
843
- var r, a, o, i = k(), l = Ge(), d = Wr(e, t), u = Er(e, d), c = Rr(), f = !!(i.onDayClick || i.mode !== "default");
844
- Q(function() {
845
- var I;
846
- d.outside || l.focusedDay && f && N(l.focusedDay, e) && ((I = n.current) === null || I === void 0 || I.focus());
842
+ function Fr(e, t, n) {
843
+ var r, a, o, i = k(), l = Ge(), d = Ir(e, t), u = Lr(e, d), c = Er(), f = !!(i.onDayClick || i.mode !== "default");
844
+ z(function() {
845
+ var x;
846
+ d.outside || l.focusedDay && f && N(l.focusedDay, e) && ((x = n.current) === null || x === void 0 || x.focus());
847
847
  }, [
848
848
  l.focusedDay,
849
849
  e,
@@ -851,45 +851,45 @@ function Ar(e, t, n) {
851
851
  f,
852
852
  d.outside
853
853
  ]);
854
- var v = Tr(i, d).join(" "), m = Fr(i, d), y = !!(d.outside && !i.showOutsideDays || d.hidden), _ = (o = (a = i.components) === null || a === void 0 ? void 0 : a.DayContent) !== null && o !== void 0 ? o : ir, p = s(_, { date: e, displayMonth: t, activeModifiers: d }), D = {
854
+ var v = Br(i, d).join(" "), m = Tr(i, d), y = !!(d.outside && !i.showOutsideDays || d.hidden), _ = (o = (a = i.components) === null || a === void 0 ? void 0 : a.DayContent) !== null && o !== void 0 ? o : or, p = s(_, { date: e, displayMonth: t, activeModifiers: d }), D = {
855
855
  style: m,
856
856
  className: v,
857
857
  children: p,
858
858
  role: "gridcell"
859
- }, M = l.focusTarget && N(l.focusTarget, e) && !d.outside, S = l.focusedDay && N(l.focusedDay, e), T = g(g(g({}, D), (r = { disabled: d.disabled, role: "gridcell" }, r["aria-selected"] = d.selected, r.tabIndex = S || M ? 0 : -1, r)), u), Z = {
859
+ }, M = l.focusTarget && N(l.focusTarget, e) && !d.outside, I = l.focusedDay && N(l.focusedDay, e), E = g(g(g({}, D), (r = { disabled: d.disabled, role: "gridcell" }, r["aria-selected"] = d.selected, r.tabIndex = I || M ? 0 : -1, r)), u), X = {
860
860
  isButton: f,
861
861
  isHidden: y,
862
862
  activeModifiers: d,
863
863
  selectedDays: c,
864
- buttonProps: T,
864
+ buttonProps: E,
865
865
  divProps: D
866
866
  };
867
- return Z;
867
+ return X;
868
868
  }
869
- function Hr(e) {
870
- var t = oe(null), n = Ar(e.date, e.displayMonth, t);
871
- return n.isHidden ? s("div", { role: "gridcell" }) : n.isButton ? s(ge, g({ name: "day", ref: t }, n.buttonProps)) : s("div", g({}, n.divProps));
869
+ function Ar(e) {
870
+ var t = oe(null), n = Fr(e.date, e.displayMonth, t);
871
+ return n.isHidden ? s("div", { role: "gridcell" }) : n.isButton ? s(_e, g({ name: "day", ref: t }, n.buttonProps)) : s("div", g({}, n.divProps));
872
872
  }
873
- function Yr(e) {
873
+ function Hr(e) {
874
874
  var t = e.number, n = e.dates, r = k(), a = r.onWeekNumberClick, o = r.styles, i = r.classNames, l = r.locale, d = r.labels.labelWeekNumber, u = r.formatters.formatWeekNumber, c = u(Number(t), { locale: l });
875
875
  if (!a)
876
876
  return s("span", { className: i.weeknumber, style: o.weeknumber, children: c });
877
877
  var f = d(Number(t), { locale: l }), v = function(m) {
878
878
  a(t, n, m);
879
879
  };
880
- return s(ge, { name: "week-number", "aria-label": f, className: i.weeknumber, style: o.weeknumber, onClick: v, children: c });
880
+ return s(_e, { name: "week-number", "aria-label": f, className: i.weeknumber, style: o.weeknumber, onClick: v, children: c });
881
881
  }
882
- function jr(e) {
883
- var t, n, r = k(), a = r.styles, o = r.classNames, i = r.showWeekNumber, l = r.components, d = (t = l == null ? void 0 : l.Day) !== null && t !== void 0 ? t : Hr, u = (n = l == null ? void 0 : l.WeekNumber) !== null && n !== void 0 ? n : Yr, c;
884
- return i && (c = s("td", { className: o.cell, style: a.cell, children: s(u, { number: e.weekNumber, dates: e.dates }) })), B("tr", { className: o.row, style: a.row, children: [c, e.dates.map(function(f) {
885
- return s("td", { className: o.cell, style: a.cell, role: "presentation", children: s(d, { displayMonth: e.displayMonth, date: f }) }, Gt(f));
882
+ function Yr(e) {
883
+ var t, n, r = k(), a = r.styles, o = r.classNames, i = r.showWeekNumber, l = r.components, d = (t = l == null ? void 0 : l.Day) !== null && t !== void 0 ? t : Ar, u = (n = l == null ? void 0 : l.WeekNumber) !== null && n !== void 0 ? n : Hr, c;
884
+ return i && (c = s("td", { className: o.cell, style: a.cell, children: s(u, { number: e.weekNumber, dates: e.dates }) })), L("tr", { className: o.row, style: a.row, children: [c, e.dates.map(function(f) {
885
+ return s("td", { className: o.cell, style: a.cell, role: "presentation", children: s(d, { displayMonth: e.displayMonth, date: f }) }, Zt(f));
886
886
  })] });
887
887
  }
888
888
  function ut(e, t, n) {
889
- for (var r = n != null && n.ISOWeek ? ht(t) : pt(t, n), a = n != null && n.ISOWeek ? Ye(e) : je(e, n), o = X(r, a), i = [], l = 0; l <= o; l++)
890
- i.push(E(a, l));
889
+ for (var r = n != null && n.ISOWeek ? ht(t) : pt(t, n), a = n != null && n.ISOWeek ? Ye(e) : je(e, n), o = U(r, a), i = [], l = 0; l <= o; l++)
890
+ i.push(W(a, l));
891
891
  var d = i.reduce(function(u, c) {
892
- var f = n != null && n.ISOWeek ? en(c) : tn(c, n), v = u.find(function(m) {
892
+ var f = n != null && n.ISOWeek ? zt(c) : en(c, n), v = u.find(function(m) {
893
893
  return m.weekNumber === f;
894
894
  });
895
895
  return v ? (v.dates.push(c), u) : (u.push({
@@ -899,10 +899,10 @@ function ut(e, t, n) {
899
899
  }, []);
900
900
  return d;
901
901
  }
902
- function Vr(e, t) {
903
- var n = ut(R(e), Fe(e), t);
902
+ function jr(e, t) {
903
+ var n = ut(S(e), Fe(e), t);
904
904
  if (t != null && t.useFixedWeeks) {
905
- var r = $t(e, t);
905
+ var r = Gt(e, t);
906
906
  if (r < 6) {
907
907
  var a = n[n.length - 1], o = a.dates[a.dates.length - 1], i = Ee(o, 6 - r), l = ut(Ee(o, 1), i, t);
908
908
  n.push.apply(n, l);
@@ -910,46 +910,46 @@ function Vr(e, t) {
910
910
  }
911
911
  return n;
912
912
  }
913
- function Kr(e) {
914
- var t, n, r, a = k(), o = a.locale, i = a.classNames, l = a.styles, d = a.hideHead, u = a.fixedWeeks, c = a.components, f = a.weekStartsOn, v = a.firstWeekContainsDate, m = a.ISOWeek, y = Vr(e.displayMonth, {
913
+ function Vr(e) {
914
+ var t, n, r, a = k(), o = a.locale, i = a.classNames, l = a.styles, d = a.hideHead, u = a.fixedWeeks, c = a.components, f = a.weekStartsOn, v = a.firstWeekContainsDate, m = a.ISOWeek, y = jr(e.displayMonth, {
915
915
  useFixedWeeks: !!u,
916
916
  ISOWeek: m,
917
917
  locale: o,
918
918
  weekStartsOn: f,
919
919
  firstWeekContainsDate: v
920
- }), _ = (t = c == null ? void 0 : c.Head) !== null && t !== void 0 ? t : or, p = (n = c == null ? void 0 : c.Row) !== null && n !== void 0 ? n : jr, D = (r = c == null ? void 0 : c.Footer) !== null && r !== void 0 ? r : nr;
921
- return B("table", { id: e.id, className: i.table, style: l.table, role: "grid", "aria-labelledby": e["aria-labelledby"], children: [!d && s(_, {}), s("tbody", { className: i.tbody, style: l.tbody, children: y.map(function(M) {
920
+ }), _ = (t = c == null ? void 0 : c.Head) !== null && t !== void 0 ? t : ar, p = (n = c == null ? void 0 : c.Row) !== null && n !== void 0 ? n : Yr, D = (r = c == null ? void 0 : c.Footer) !== null && r !== void 0 ? r : tr;
921
+ return L("table", { id: e.id, className: i.table, style: l.table, role: "grid", "aria-labelledby": e["aria-labelledby"], children: [!d && s(_, {}), s("tbody", { className: i.tbody, style: l.tbody, children: y.map(function(M) {
922
922
  return s(p, { displayMonth: e.displayMonth, dates: M.dates, weekNumber: M.weekNumber }, M.weekNumber);
923
923
  }) }), s(D, { displayMonth: e.displayMonth })] });
924
924
  }
925
- function Ur() {
925
+ function Kr() {
926
926
  return !!(typeof window < "u" && window.document && window.document.createElement);
927
927
  }
928
- var Xr = Ur() ? Zt : Q, We = !1, Zr = 0;
928
+ var Ur = Kr() ? Xt : z, We = !1, Xr = 0;
929
929
  function ct() {
930
- return "react-day-picker-".concat(++Zr);
930
+ return "react-day-picker-".concat(++Xr);
931
931
  }
932
- function Gr(e) {
933
- var t, n = e ?? (We ? ct() : null), r = A(n), a = r[0], o = r[1];
934
- return Xr(function() {
932
+ function Zr(e) {
933
+ var t, n = e ?? (We ? ct() : null), r = B(n), a = r[0], o = r[1];
934
+ return Ur(function() {
935
935
  a === null && o(ct());
936
- }, []), Q(function() {
936
+ }, []), z(function() {
937
937
  We === !1 && (We = !0);
938
938
  }, []), (t = e ?? a) !== null && t !== void 0 ? t : void 0;
939
939
  }
940
- function $r(e) {
941
- var t, n, r = k(), a = r.dir, o = r.classNames, i = r.styles, l = r.components, d = ve().displayMonths, u = Gr(r.id ? "".concat(r.id, "-").concat(e.displayIndex) : void 0), c = r.id ? "".concat(r.id, "-grid-").concat(e.displayIndex) : void 0, f = [o.month], v = i.month, m = e.displayIndex === 0, y = e.displayIndex === d.length - 1, _ = !m && !y;
940
+ function Gr(e) {
941
+ var t, n, r = k(), a = r.dir, o = r.classNames, i = r.styles, l = r.components, d = ce().displayMonths, u = Zr(r.id ? "".concat(r.id, "-").concat(e.displayIndex) : void 0), c = r.id ? "".concat(r.id, "-grid-").concat(e.displayIndex) : void 0, f = [o.month], v = i.month, m = e.displayIndex === 0, y = e.displayIndex === d.length - 1, _ = !m && !y;
942
942
  a === "rtl" && (t = [m, y], y = t[0], m = t[1]), m && (f.push(o.caption_start), v = g(g({}, v), i.caption_start)), y && (f.push(o.caption_end), v = g(g({}, v), i.caption_end)), _ && (f.push(o.caption_between), v = g(g({}, v), i.caption_between));
943
- var p = (n = l == null ? void 0 : l.Caption) !== null && n !== void 0 ? n : tr;
944
- return B("div", { className: f.join(" "), style: v, children: [s(p, { id: u, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(Kr, { id: c, "aria-labelledby": u, displayMonth: e.displayMonth })] }, e.displayIndex);
943
+ var p = (n = l == null ? void 0 : l.Caption) !== null && n !== void 0 ? n : er;
944
+ return L("div", { className: f.join(" "), style: v, children: [s(p, { id: u, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(Vr, { id: c, "aria-labelledby": u, displayMonth: e.displayMonth })] }, e.displayIndex);
945
945
  }
946
- function qr(e) {
946
+ function $r(e) {
947
947
  var t = k(), n = t.classNames, r = t.styles;
948
948
  return s("div", { className: n.months, style: r.months, children: e.children });
949
949
  }
950
- function Jr(e) {
951
- var t, n, r = e.initialProps, a = k(), o = Ge(), i = ve(), l = A(!1), d = l[0], u = l[1];
952
- Q(function() {
950
+ function qr(e) {
951
+ var t, n, r = e.initialProps, a = k(), o = Ge(), i = ce(), l = B(!1), d = l[0], u = l[1];
952
+ z(function() {
953
953
  a.initialFocus && o.focusTarget && (d || (o.focus(o.focusTarget), u(!0)));
954
954
  }, [
955
955
  a.initialFocus,
@@ -965,80 +965,80 @@ function Jr(e) {
965
965
  }).reduce(function(y, _) {
966
966
  var p;
967
967
  return g(g({}, y), (p = {}, p[_] = r[_], p));
968
- }, {}), m = (n = (t = r.components) === null || t === void 0 ? void 0 : t.Months) !== null && n !== void 0 ? n : qr;
968
+ }, {}), m = (n = (t = r.components) === null || t === void 0 ? void 0 : t.Months) !== null && n !== void 0 ? n : $r;
969
969
  return s("div", g({ className: c.join(" "), style: f, dir: a.dir, id: a.id, nonce: r.nonce, title: r.title, lang: r.lang }, v, { children: s(m, { children: i.displayMonths.map(function(y, _) {
970
- return s($r, { displayIndex: _, displayMonth: y }, _);
970
+ return s(Gr, { displayIndex: _, displayMonth: y }, _);
971
971
  }) }) }));
972
972
  }
973
- function Qr(e) {
974
- var t = e.children, n = Dn(e, ["children"]);
975
- return s(Yn, { initialProps: n, children: s(Jn, { children: s(Sr, { initialProps: n, children: s(lr, { initialProps: n, children: s(ur, { initialProps: n, children: s(br, { children: s(Or, { children: t }) }) }) }) }) }) });
973
+ function Jr(e) {
974
+ var t = e.children, n = wn(e, ["children"]);
975
+ return s(Hn, { initialProps: n, children: s(qn, { children: s(Wr, { initialProps: n, children: s(ir, { initialProps: n, children: s(dr, { initialProps: n, children: s(yr, { children: s(Or, { children: t }) }) }) }) }) }) });
976
976
  }
977
- function zr(e) {
978
- return s(Qr, g({}, e, { children: s(Jr, { initialProps: e }) }));
977
+ function Qr(e) {
978
+ return s(Jr, g({}, e, { children: s(qr, { initialProps: e }) }));
979
979
  }
980
- const ea = 329, J = 12, we = 26, Wt = 20, Te = 9, ft = 12, St = (e, t, n) => n !== H.positionautomatic && n !== void 0 ? n : e.top > t.height + we ? H.positionabove : H.positionbelow, ta = (e) => e.left + e.width / 4, na = (e) => document.documentElement.clientWidth - e.right + e.width / 4, ra = (e, t) => e.left + t.width, aa = (e) => e.left > J, oa = (e, t) => ra(e, t) < document.documentElement.clientWidth - J, ia = (e, t) => oa(e, t) ? aa(e) ? "floating" : "left" : "right", Se = (e, t) => e.top - we - t.height, Le = (e) => e.bottom + we, la = () => document.documentElement.clientWidth - J * 2, sa = () => document.documentElement.clientWidth > ea + J * 2, vt = (e) => e.top - we - Te + 5, da = (e) => ta(e) - Wt / 2, ua = (e) => na(e) - Wt / 2, ca = (e, t, n) => {
981
- const r = ia(e, t), a = St(e, t, n);
982
- return r === "left" ? a === H.positionabove ? "leftabove" : "leftbelow" : r === "right" ? a === H.positionabove ? "rightabove" : "rightbelow" : a === H.positionabove ? "floatingabove" : "floatingbelow";
983
- }, fa = (e, t, n) => {
984
- const r = ca(e, t, n), a = sa() ? void 0 : la();
980
+ const zr = 329, Q = 12, De = 26, Wt = 20, Te = 9, ft = 12, St = (e, t, n) => n !== F.positionautomatic && n !== void 0 ? n : e.top > t.height + De ? F.positionabove : F.positionbelow, ea = (e) => e.left + e.width / 4, ta = (e) => document.documentElement.clientWidth - e.right + e.width / 4, na = (e, t) => e.left + t.width, ra = (e) => e.left > Q, aa = (e, t) => na(e, t) < document.documentElement.clientWidth - Q, oa = (e, t) => aa(e, t) ? ra(e) ? "floating" : "left" : "right", Se = (e, t) => e.top - De - t.height, Le = (e) => e.bottom + De, ia = () => document.documentElement.clientWidth - Q * 2, la = () => document.documentElement.clientWidth > zr + Q * 2, vt = (e) => e.top - De - Te + 5, sa = (e) => ea(e) - Wt / 2, da = (e) => ta(e) - Wt / 2, ua = (e, t, n) => {
981
+ const r = oa(e, t), a = St(e, t, n);
982
+ return r === "left" ? a === F.positionabove ? "leftabove" : "leftbelow" : r === "right" ? a === F.positionabove ? "rightabove" : "rightbelow" : a === F.positionabove ? "floatingabove" : "floatingbelow";
983
+ }, ca = (e, t, n) => {
984
+ const r = ua(e, t, n), a = la() ? void 0 : ia();
985
985
  return r === "leftabove" ? {
986
- left: J,
986
+ left: Q,
987
987
  top: Se(e, t),
988
988
  width: a
989
- } : r === "leftbelow" ? { left: J, top: Le(e), width: a } : r === "rightabove" ? { right: J, top: Se(e, t), width: a } : r === "rightbelow" ? { right: J, top: Le(e), width: a } : r === "floatingbelow" ? { left: mt(e, t), top: Le(e), width: a } : { left: mt(e, t), top: Se(e, t), width: a };
990
- }, mt = (e, t) => va(e) - t.width / 2, va = (e) => e.left + e.width / 2, ma = (e, t, n) => {
991
- const r = da(t), a = ua(t), o = e.left + ft, i = e.right + ft;
992
- return e.right ? n === H.positionabove ? {
989
+ } : r === "leftbelow" ? { left: Q, top: Le(e), width: a } : r === "rightabove" ? { right: Q, top: Se(e, t), width: a } : r === "rightbelow" ? { right: Q, top: Le(e), width: a } : r === "floatingbelow" ? { left: mt(e, t), top: Le(e), width: a } : { left: mt(e, t), top: Se(e, t), width: a };
990
+ }, mt = (e, t) => fa(e) - t.width / 2, fa = (e) => e.left + e.width / 2, va = (e, t, n) => {
991
+ const r = sa(t), a = da(t), o = e.left + ft, i = e.right + ft;
992
+ return e.right ? n === F.positionabove ? {
993
993
  right: a > i ? a : i,
994
994
  top: vt(t)
995
995
  } : {
996
996
  right: a > i ? a : i,
997
997
  top: t.bottom + Te
998
- } : n === H.positionabove ? {
998
+ } : n === F.positionabove ? {
999
999
  left: r > o ? r : o,
1000
1000
  top: vt(t)
1001
1001
  } : {
1002
1002
  left: r > o ? r : o,
1003
1003
  top: t.bottom + Te
1004
1004
  };
1005
- }, ha = (e) => {
1006
- const { datepickerWrapperRef: t, footer: n, inputRef: r, testId: a, variant: o, zIndex: i, ...l } = e, d = oe(null), [u, c] = A(), f = bn(t), v = pn(r, 0);
1007
- mn(t, !0);
1005
+ }, ma = (e) => {
1006
+ const { datepickerWrapperRef: t, footer: n, inputRef: r, testId: a, variant: o, zIndex: i, ...l } = e, d = oe(null), [u, c] = B(), f = yn(t), v = hn(r, 0);
1007
+ vn(t, !0);
1008
1008
  const m = () => {
1009
- var T;
1010
- c((T = r.current) == null ? void 0 : T.getBoundingClientRect());
1009
+ var E;
1010
+ c((E = r.current) == null ? void 0 : E.getBoundingClientRect());
1011
1011
  };
1012
- q.useEffect(() => {
1012
+ J.useEffect(() => {
1013
1013
  m();
1014
- }, []), hn(m, 500), yn(m, ["scroll", "resize"], 10);
1015
- const y = Be(x["datepicker-popup-container"], {
1016
- [x["datepicker-popup-container--visible"]]: v
1017
- }), _ = u && f && St(u, f, o), p = Be(x["datepicker-popup-arrow"], {
1018
- [x["datepicker-popup-arrow--visible"]]: v,
1019
- [x["datepicker-popup-arrow--over"]]: _ === H.positionbelow,
1020
- [x["datepicker-popup-arrow--under"]]: _ === H.positionabove
1021
- }), D = u && f && fa(u, f, o), M = D && u && _ && ma(D, u, _), S = {
1022
- ...vn,
1023
- ...x
1014
+ }, []), mn(m, 500), pn(m, ["scroll", "resize"], 10);
1015
+ const y = Be(P["datepicker-popup-container"], {
1016
+ [P["datepicker-popup-container--visible"]]: v
1017
+ }), _ = u && f && St(u, f, o), p = Be(P["datepicker-popup-arrow"], {
1018
+ [P["datepicker-popup-arrow--visible"]]: v,
1019
+ [P["datepicker-popup-arrow--over"]]: _ === F.positionbelow,
1020
+ [P["datepicker-popup-arrow--under"]]: _ === F.positionabove
1021
+ }), D = u && f && ca(u, f, o), M = D && u && _ && va(D, u, _), I = {
1022
+ ...fn,
1023
+ ...P
1024
1024
  };
1025
- return /* @__PURE__ */ B(Y, { children: [
1025
+ return /* @__PURE__ */ L(A, { children: [
1026
1026
  /* @__PURE__ */ s("div", { className: y, "data-testid": a, ref: t, style: { ...D, zIndex: i }, children: /* @__PURE__ */ s(
1027
- zr,
1027
+ Qr,
1028
1028
  {
1029
1029
  captionLayout: "dropdown-buttons",
1030
- classNames: S,
1030
+ classNames: I,
1031
1031
  mode: "single",
1032
- style: { "--rdp-cell-size": gn("l") },
1033
- modifiersClassNames: { today: x["day--today"], selected: x.day_selected, disabled: x["day--disabled"] },
1034
- footer: /* @__PURE__ */ s("span", { className: x["footer-wrapper"], children: n }),
1032
+ style: { "--rdp-cell-size": bn("l") },
1033
+ modifiersClassNames: { today: P["day--today"], selected: P.day_selected, disabled: P["day--disabled"] },
1034
+ footer: /* @__PURE__ */ s("span", { className: P["footer-wrapper"], children: n }),
1035
1035
  fixedWeeks: !0,
1036
1036
  ...l
1037
1037
  }
1038
1038
  ) }),
1039
1039
  /* @__PURE__ */ s("div", { ref: d, className: p, style: { ...M, zIndex: i } })
1040
1040
  ] });
1041
- }, Lt = q.forwardRef((e, t) => {
1041
+ }, Lt = J.forwardRef((e, t) => {
1042
1042
  const {
1043
1043
  className: n,
1044
1044
  dateButtonAriaLabel: r,
@@ -1056,72 +1056,75 @@ const ea = 329, J = 12, we = 26, Wt = 20, Te = 9, ft = 12, St = (e, t, n) => n !
1056
1056
  footerContent: _,
1057
1057
  label: p,
1058
1058
  inputId: D,
1059
- locale: M = on,
1060
- maxDate: S,
1061
- minDate: T,
1062
- onBlur: Z,
1063
- onChange: I,
1059
+ locale: M = an,
1060
+ maxDate: I,
1061
+ minDate: E,
1062
+ onBlur: X,
1063
+ onChange: x,
1064
1064
  onDatePopupClosed: C,
1065
- testId: V,
1066
- autoComplete: G = "off",
1067
- variant: De = H.positionautomatic,
1068
- zIndex: Me = un.PopOver,
1069
- ...me
1070
- } = e, [$, z] = A(o), [ke, ae] = A($ ? W($, a) : ""), [b, h] = A(i), [ee, L] = A(!1), [te, qe] = A(!1), Bt = {
1065
+ testId: Y,
1066
+ autoComplete: Z = "off",
1067
+ variant: Me = F.positionautomatic,
1068
+ zIndex: ke = dn.PopOver,
1069
+ ...fe
1070
+ } = e, [G, ee] = B(o), [Ne, ae] = B(G ? O(G, a) : ""), [b, h] = B(i), [$, T] = B(!1), [te, qe] = B(!1), Bt = {
1071
1071
  dayOfWeek: [0, 6]
1072
- }, Tt = c ? [...u, Bt] : u, Je = oe(null), Ne = oe(null), ie = oe(null), { refObject: F } = bt(gt(t) ? t : null), Qe = _t([t, F]), he = oe(!1);
1073
- cn(Ne, (w) => {
1074
- var O, le;
1075
- const P = w.target;
1076
- !((O = Ne.current) != null && O.contains(P)) && !((le = ie.current) != null && le.contains(P)) && L(!1);
1077
- }), Q(() => {
1078
- ue(o) ? (ae(o ? W(o, a) : ""), z(o), h(o)) : (ae(""), z(void 0), h(void 0));
1079
- }, [o, a]), Q(() => {
1080
- te && F.current && F.current.focus();
1072
+ }, Tt = c ? [...u, Bt] : u, Je = oe(null), ve = oe(null), me = oe(null), { refObject: R } = bt(gt(t) ? t : null), Qe = _t([t, R]), he = oe(!1);
1073
+ un(ve, (w) => {
1074
+ ve.current && me.current && !(w != null && w.composedPath().includes(ve.current)) && !(w != null && w.composedPath().includes(me.current)) && T(!1);
1075
+ }), z(() => {
1076
+ se(o) ? (ae(o ? O(o, a) : ""), ee(o), h(o)) : (ae(""), ee(void 0), h(void 0));
1077
+ }, [o, a]), z(() => {
1078
+ te && R.current && R.current.focus();
1081
1079
  }, [te]);
1082
1080
  const ze = () => {
1083
- F != null && F.current && F.current.focus(), L(!1);
1081
+ R != null && R.current && R.current.focus(), T(!1);
1084
1082
  };
1085
- it(ie, ze, [ot.Escape]), it(Je, ze, [ot.Escape]);
1086
- const et = (w, P) => {
1083
+ it(me, ze, [ot.Escape]), it(Je, ze, [ot.Escape]);
1084
+ const et = (w, V) => {
1087
1085
  ae(w.currentTarget.value);
1088
- const O = se(w.currentTarget.value, P, /* @__PURE__ */ new Date());
1089
- ue(O) ? (z(O), h(O)) : z(void 0), I && I(w, w.currentTarget.value);
1086
+ const q = ie(w.currentTarget.value, V, /* @__PURE__ */ new Date());
1087
+ se(q) ? (ee(q), h(q)) : ee(void 0), x && x(w, w.currentTarget.value);
1090
1088
  }, Ft = () => {
1091
- te ? qe(!1) : L(!0);
1092
- }, At = (w, P, O, le) => {
1089
+ te ? qe(!1) : T(!0);
1090
+ }, At = (w, V, q, nt) => {
1093
1091
  if (qe(!0), !w) {
1094
- L(!1);
1092
+ T(!1);
1095
1093
  return;
1096
1094
  }
1097
- z(w), F.current && (ae(W(w, a)), L(!1)), I && I(le, w), Ht(F, W(w, a), w), C && C(w);
1098
- }, Ht = (w, P, O, le) => {
1095
+ ee(w), R.current && (ae(O(w, a)), T(!1)), x && x(nt, w), Ht(R, O(w, a), w), C && C(w);
1096
+ }, Ht = (w, V, q, nt) => {
1099
1097
  if (w.current) {
1100
- w.current.value = P;
1101
- const nt = new Event("change", { bubbles: !0 });
1102
- w.current.dispatchEvent(nt), I && I(nt, O);
1098
+ w.current.value = V;
1099
+ const pe = new Event("change", { bubbles: !0 });
1100
+ Object.defineProperty(pe, "target", {
1101
+ value: w.current,
1102
+ writable: !1,
1103
+ enumerable: !0,
1104
+ configurable: !0
1105
+ }), Object.defineProperty(pe, "currentTarget", {
1106
+ value: w.current,
1107
+ writable: !1,
1108
+ enumerable: !0,
1109
+ configurable: !0
1110
+ }), w.current.dispatchEvent(pe), x && x(pe, q);
1103
1111
  }
1104
- }, Yt = (w) => {
1105
- var P;
1106
- (P = ie.current) != null && P.contains(w.relatedTarget) || L(!1), tt(w);
1107
1112
  }, tt = (w) => {
1108
- var O;
1109
- const P = (O = ie.current) == null ? void 0 : O.contains(w.relatedTarget);
1110
- P || L(!1), !P && (typeof C > "u" || he.current) && Z && Z(w), he.current = !1;
1111
- }, jt = (w) => {
1112
- w == null || w.stopPropagation(), L(!ee);
1113
+ !$ && (typeof C > "u" || he.current) && X && X(w), he.current = !1;
1114
+ }, Yt = (w) => {
1115
+ w == null || w.stopPropagation(), T(!$);
1113
1116
  };
1114
- Q(() => {
1115
- const w = (O) => {
1116
- ["Escape", "Enter", "Tab"].includes(O.key) || (he.current = !0, L(!1));
1117
- }, P = F.current;
1118
- return P && P.addEventListener("keydown", w), () => {
1119
- P && P.removeEventListener("keydown", w);
1117
+ z(() => {
1118
+ const w = (q) => {
1119
+ ["Escape", "Enter", "Tab"].includes(q.key) || (he.current = !0, T(!1));
1120
+ }, V = R.current;
1121
+ return V && V.addEventListener("keydown", w), () => {
1122
+ V && V.removeEventListener("keydown", w);
1120
1123
  };
1121
- }, [F]);
1122
- const Vt = (w) => {
1123
- et(w, "yyyy-MM-dd"), he.current || C && C($);
1124
- }, Kt = /* @__PURE__ */ s(
1124
+ }, [R]);
1125
+ const jt = (w) => {
1126
+ et(w, "yyyy-MM-dd"), he.current || C && C(G);
1127
+ }, Vt = /* @__PURE__ */ s(
1125
1128
  Re,
1126
1129
  {
1127
1130
  disabled: d,
@@ -1130,18 +1133,18 @@ const ea = 329, J = 12, we = 26, Wt = 20, Te = 9, ft = 12, St = (e, t, n) => n !
1130
1133
  errorTextId: m,
1131
1134
  inputId: D,
1132
1135
  label: p,
1133
- max: S ? W(S, "yyyy-MM-dd") : "",
1134
- min: T ? W(T, "yyyy-MM-dd") : "",
1136
+ max: I ? O(I, "yyyy-MM-dd") : "",
1137
+ min: E ? O(E, "yyyy-MM-dd") : "",
1135
1138
  type: "date",
1136
1139
  ref: Qe,
1137
- value: $ ? W($, "yyyy-MM-dd") : "",
1140
+ value: G ? O(G, "yyyy-MM-dd") : "",
1138
1141
  width: 14,
1139
- ...me,
1142
+ ...fe,
1140
1143
  onBlur: tt,
1141
- onChange: Vt,
1142
- autoComplete: G || void 0
1144
+ onChange: jt,
1145
+ autoComplete: Z || void 0
1143
1146
  }
1144
- ), Ut = /* @__PURE__ */ B(Y, { children: [
1147
+ ), Kt = /* @__PURE__ */ L(A, { children: [
1145
1148
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
1146
1149
  Re,
1147
1150
  {
@@ -1151,60 +1154,60 @@ const ea = 329, J = 12, we = 26, Wt = 20, Te = 9, ft = 12, St = (e, t, n) => n !
1151
1154
  errorText: v,
1152
1155
  errorTextId: m,
1153
1156
  inputId: D,
1154
- inputContainerRef: Ne,
1157
+ inputContainerRef: ve,
1155
1158
  inputWrapperRef: Je,
1156
1159
  label: p,
1157
1160
  onFocus: Ft,
1158
1161
  type: "text",
1159
1162
  ref: Qe,
1160
- value: ke,
1163
+ value: Ne,
1161
1164
  width: 12,
1162
- ...me,
1163
- onBlur: Yt,
1165
+ ...fe,
1166
+ onBlur: tt,
1164
1167
  onChange: (w) => et(w, "yyyy-MM-dd"),
1165
1168
  rightOfInput: /* @__PURE__ */ s(
1166
- ln,
1169
+ on,
1167
1170
  {
1168
1171
  disabled: d,
1169
1172
  ariaLabel: r ?? "Velg dato",
1170
- onClick: jt,
1171
- tabIndex: ee ? -1 : 0,
1173
+ onClick: Yt,
1174
+ tabIndex: $ ? -1 : 0,
1172
1175
  variant: "borderless",
1173
- wrapperClassName: x["date-button"],
1174
- className: x["date-button__inner"],
1175
- children: /* @__PURE__ */ s(sn, { color: "black", svgIcon: dn })
1176
+ wrapperClassName: P["date-button"],
1177
+ className: P["date-button__inner"],
1178
+ children: /* @__PURE__ */ s(ln, { color: "black", svgIcon: sn })
1176
1179
  }
1177
1180
  ),
1178
- autoComplete: G || void 0
1181
+ autoComplete: Z || void 0
1179
1182
  }
1180
1183
  ) }),
1181
- ee && !d && /* @__PURE__ */ s(
1182
- ha,
1184
+ $ && !d && /* @__PURE__ */ s(
1185
+ ma,
1183
1186
  {
1184
1187
  dir: l,
1185
1188
  disabled: Tt,
1186
- datepickerWrapperRef: ie,
1189
+ datepickerWrapperRef: me,
1187
1190
  footer: _,
1188
- fromDate: T,
1189
- toDate: S,
1190
- inputRef: F,
1191
+ fromDate: E,
1192
+ toDate: I,
1193
+ inputRef: R,
1191
1194
  locale: M,
1192
1195
  month: b,
1193
- selected: $,
1196
+ selected: G,
1194
1197
  onSelect: At,
1195
1198
  onMonthChange: h,
1196
- variant: De,
1197
- zIndex: Me
1199
+ variant: Me,
1200
+ zIndex: ke
1198
1201
  }
1199
1202
  )
1200
1203
  ] });
1201
- return /* @__PURE__ */ s("div", { className: n, "data-testid": V, children: fn() ? Kt : Ut });
1204
+ return /* @__PURE__ */ s("div", { className: n, "data-testid": Y, children: cn() ? Vt : Kt });
1202
1205
  });
1203
1206
  Lt.displayName = "DatePicker";
1204
- const pe = (e) => {
1207
+ const ye = (e) => {
1205
1208
  const t = String(e);
1206
1209
  return t.length === 1 ? "0" + t : t;
1207
- }, pa = (e) => !e || /^\d+$/.test(e) && e.length <= 2, Et = q.forwardRef((e, t) => {
1210
+ }, ha = (e) => !e || /^\d+$/.test(e) && e.length <= 2, Et = J.forwardRef((e, t) => {
1208
1211
  const {
1209
1212
  error: n,
1210
1213
  errorText: r,
@@ -1219,22 +1222,22 @@ const pe = (e) => {
1219
1222
  value: v,
1220
1223
  autoComplete: m = "off",
1221
1224
  ...y
1222
- } = e, [_, p] = A(
1223
- typeof v < "u" ? pe(v) : void 0
1225
+ } = e, [_, p] = B(
1226
+ typeof v < "u" ? ye(v) : void 0
1224
1227
  ), { refObject: D } = bt(gt(t) ? t : null), M = _t([t, D]);
1225
- Q(() => {
1226
- p(v ? pe(v) : void 0);
1228
+ z(() => {
1229
+ p(v ? ye(v) : void 0);
1227
1230
  }, [v]);
1228
- const S = (C) => {
1229
- const V = C.target.value;
1230
- pa(V) && (p(V), d && d(C));
1231
- }, T = (C) => {
1232
- const V = pe(C.target.value);
1233
- p(V), d && d(C), l && l(C);
1234
- }, Z = (C) => {
1235
- const V = /[0-9]/, G = ["Backspace", " ", "Enter", "Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
1236
- !V.test(C.key) && !G.includes(C.key) && C.preventDefault();
1237
- }, I = () => u === "hours" && /* @__PURE__ */ s("span", { className: x["time-separator"], children: ":" });
1231
+ const I = (C) => {
1232
+ const Y = C.target.value;
1233
+ ha(Y) && (p(Y), d && d(C));
1234
+ }, E = (C) => {
1235
+ const Y = ye(C.target.value);
1236
+ p(Y), d && d(C), l && l(C);
1237
+ }, X = (C) => {
1238
+ const Y = /[0-9]/, Z = ["Backspace", " ", "Enter", "Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
1239
+ !Y.test(C.key) && !Z.includes(C.key) && C.preventDefault();
1240
+ }, x = () => u === "hours" && /* @__PURE__ */ s("span", { className: P["time-separator"], children: ":" });
1238
1241
  return /* @__PURE__ */ s("div", { "data-testid": c, children: /* @__PURE__ */ s(
1239
1242
  Re,
1240
1243
  {
@@ -1250,62 +1253,62 @@ const pe = (e) => {
1250
1253
  ref: M,
1251
1254
  value: _,
1252
1255
  width: 5,
1253
- defaultValue: typeof e.defaultValue < "u" ? pe(e.defaultValue) : void 0,
1256
+ defaultValue: typeof e.defaultValue < "u" ? ye(e.defaultValue) : void 0,
1254
1257
  ...y,
1255
- onChange: S,
1256
- onBlur: T,
1257
- rightOfInput: I(),
1258
- onKeyDown: Z,
1258
+ onChange: I,
1259
+ onBlur: E,
1260
+ rightOfInput: x(),
1261
+ onKeyDown: X,
1259
1262
  autoComplete: m || void 0
1260
1263
  }
1261
1264
  ) });
1262
1265
  });
1263
1266
  Et.displayName = "DateTime";
1264
- const ya = q.forwardRef((e, t) => {
1265
- const { children: n, errorWrapperClassName: r, errorText: a, legend: o, testId: i } = e, l = wn(), d = (u) => lt(u, Lt) ? q.cloneElement(u, {
1266
- className: Be(x["date-time-picker-wrapper__date-picker"]),
1267
+ const pa = J.forwardRef((e, t) => {
1268
+ const { children: n, errorWrapperClassName: r, errorText: a, legend: o, testId: i } = e, l = _n(), d = (u) => lt(u, Lt) ? J.cloneElement(u, {
1269
+ className: Be(P["date-time-picker-wrapper__date-picker"]),
1267
1270
  error: !!a,
1268
1271
  errorTextId: l
1269
- }) : lt(u, Et) ? q.cloneElement(u, {
1272
+ }) : lt(u, Et) ? J.cloneElement(u, {
1270
1273
  error: !!a,
1271
1274
  errorTextId: l
1272
1275
  }) : u;
1273
- return /* @__PURE__ */ s("div", { ref: t, tabIndex: -1, children: /* @__PURE__ */ s(_n, { className: r, errorText: a, errorTextId: l, children: e.legend ? /* @__PURE__ */ B("fieldset", { className: x["date-time-picker-wrapper"], "data-testid": i, children: [
1274
- e.legend && /* @__PURE__ */ s("legend", { className: x["date-time-picker-wrapper__legend"], children: o }),
1275
- q.Children.map(n, d)
1276
- ] }) : /* @__PURE__ */ s("div", { className: x["date-time-picker-wrapper"], children: q.Children.map(n, d) }) }) });
1276
+ return /* @__PURE__ */ s("div", { ref: t, tabIndex: -1, children: /* @__PURE__ */ s(gn, { className: r, errorText: a, errorTextId: l, children: e.legend ? /* @__PURE__ */ L("fieldset", { className: P["date-time-picker-wrapper"], "data-testid": i, children: [
1277
+ e.legend && /* @__PURE__ */ s("legend", { className: P["date-time-picker-wrapper__legend"], children: o }),
1278
+ J.Children.map(n, d)
1279
+ ] }) : /* @__PURE__ */ s("div", { className: P["date-time-picker-wrapper"], children: J.Children.map(n, d) }) }) });
1277
1280
  });
1278
- ya.displayName = "DateTimePickerWrapper";
1281
+ pa.displayName = "DateTimePickerWrapper";
1279
1282
  const Rt = (e) => {
1280
1283
  const t = ["yyyy-MM-dd", "dd.MM.yyyy"];
1281
1284
  for (const n of t) {
1282
- const r = se(e, n, /* @__PURE__ */ new Date());
1283
- if (ue(r))
1285
+ const r = ie(e, n, /* @__PURE__ */ new Date());
1286
+ if (se(r))
1284
1287
  return r;
1285
1288
  }
1286
1289
  return null;
1287
- }, Ua = (e) => {
1290
+ }, Ka = (e) => {
1288
1291
  const t = new Date(e);
1289
1292
  return t instanceof Date && !isNaN(t.getTime());
1290
- }, Xa = (e, t, n, r, a) => {
1293
+ }, Ua = (e, t, n, r, a) => {
1291
1294
  const o = Rt(e), i = typeof r < "u", l = typeof a < "u";
1292
- return !o || i && !ue(r) || l && !ue(a) ? n || "Invalid date format" : i && !l && (N(o, r) || be(o, r)) || l && !i && (N(o, a) || He(o, a)) || i && l && (N(o, r) || N(o, a) || rn(o, { start: r, end: a })) ? !0 : t;
1293
- }, Za = (e, t, n, r) => {
1295
+ return !o || i && !se(r) || l && !se(a) ? n || "Invalid date format" : i && !l && (N(o, r) || ge(o, r)) || l && !i && (N(o, a) || He(o, a)) || i && l && (N(o, r) || N(o, a) || nn(o, { start: r, end: a })) ? !0 : t;
1296
+ }, Xa = (e, t, n, r) => {
1294
1297
  const a = Rt(e);
1295
1298
  return a ? t.some((o) => N(o, a)) ? n : !0 : r || "Invalid date format";
1296
- }, Ga = (e, t, n, r) => {
1297
- const a = se((e.hour + ":" + e.minute).toString(), "HH:mm", /* @__PURE__ */ new Date()), o = se(((n == null ? void 0 : n.hour) + ":" + (n == null ? void 0 : n.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date()), i = se(((r == null ? void 0 : r.hour) + ":" + (r == null ? void 0 : r.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date());
1299
+ }, Za = (e, t, n, r) => {
1300
+ const a = ie((e.hour + ":" + e.minute).toString(), "HH:mm", /* @__PURE__ */ new Date()), o = ie(((n == null ? void 0 : n.hour) + ":" + (n == null ? void 0 : n.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date()), i = ie(((r == null ? void 0 : r.hour) + ":" + (r == null ? void 0 : r.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date());
1298
1301
  return (typeof n > "u" || a >= o) && (typeof r > "u" || a <= i) ? !0 : t;
1299
1302
  };
1300
1303
  export {
1301
1304
  Lt as DatePicker,
1302
1305
  Et as DateTime,
1303
- ya as DateTimePickerWrapper,
1306
+ pa as DateTimePickerWrapper,
1304
1307
  Lt as default,
1305
- Ua as isValidDate,
1308
+ Ka as isValidDate,
1306
1309
  Rt as parseInputDate,
1307
- Za as validateDisabledDates,
1308
- Xa as validateMinMaxDate,
1309
- Ga as validateMinTimeMaxTime
1310
+ Xa as validateDisabledDates,
1311
+ Ua as validateMinMaxDate,
1312
+ Za as validateMinTimeMaxTime
1310
1313
  };
1311
1314
  //# sourceMappingURL=index.js.map