@situaction/traq-ui-ste 1.2.9 → 1.2.11
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.
- package/dist/components/button/Button.js +41 -41
- package/dist/components/calendar/Calendar.js +319 -319
- package/dist/components/editable-select/EditableSelect.d.ts +4 -1
- package/dist/components/editable-select/EditableSelect.js +41 -32
- package/dist/components/icon-button/IconButton.js +21 -21
- package/dist/components/input/Input.js +34 -34
- package/dist/components/menu/Menu.js +59 -57
- package/dist/components/select/Select.d.ts +10 -9
- package/dist/components/select/Select.js +159 -149
- package/dist/components/tabs/Tabs.js +102 -94
- package/dist/styles/Button.css +1 -1
- package/dist/styles/Calendar.css +1 -1
- package/dist/styles/EditableSelect.css +1 -1
- package/dist/styles/IconButton.css +1 -1
- package/dist/styles/Input.css +1 -1
- package/dist/styles/Menu.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as q, jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as O, useRef as I, useEffect as B } from "react";
|
|
3
3
|
import { IconButton as z } from "../icon-button/IconButton.js";
|
|
4
4
|
import { Button as Se } from "../button/Button.js";
|
|
5
|
-
import '../../styles/Calendar.css';const Ne = "
|
|
5
|
+
import '../../styles/Calendar.css';const Ne = "_calendar_eq51k_6", je = "_relative_eq51k_15", qe = "_dropDownCtn_eq51k_18", Ee = "_calendarHeader_eq51k_28", Fe = "_calendarWeekdays_eq51k_38", Le = "_calendarGrid_eq51k_39", $e = "_calendarDay_eq51k_49", He = "_today_eq51k_64", Ae = "_selected_eq51k_67", Je = "_disabled_eq51k_74", Xe = "_inRange_eq51k_81", Re = "_dropdown_eq51k_84", Be = "_yearList_eq51k_96", Ve = "_yearItem_eq51k_103", Qe = "_loading_eq51k_111", M = {
|
|
6
6
|
calendar: Ne,
|
|
7
7
|
relative: je,
|
|
8
|
-
dropDownCtn:
|
|
9
|
-
calendarHeader:
|
|
10
|
-
calendarWeekdays:
|
|
11
|
-
calendarGrid:
|
|
12
|
-
calendarDay:
|
|
13
|
-
today:
|
|
8
|
+
dropDownCtn: qe,
|
|
9
|
+
calendarHeader: Ee,
|
|
10
|
+
calendarWeekdays: Fe,
|
|
11
|
+
calendarGrid: Le,
|
|
12
|
+
calendarDay: $e,
|
|
13
|
+
today: He,
|
|
14
14
|
selected: Ae,
|
|
15
15
|
disabled: Je,
|
|
16
16
|
inRange: Xe,
|
|
@@ -23,25 +23,25 @@ function m(t) {
|
|
|
23
23
|
const e = Object.prototype.toString.call(t);
|
|
24
24
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function D(t, e) {
|
|
27
27
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
28
28
|
}
|
|
29
29
|
function Ge(t, e) {
|
|
30
30
|
const n = m(t);
|
|
31
|
-
return isNaN(e) ?
|
|
31
|
+
return isNaN(e) ? D(t, NaN) : (n.setDate(n.getDate() + e), n);
|
|
32
32
|
}
|
|
33
33
|
function ie(t, e) {
|
|
34
34
|
const n = m(t);
|
|
35
|
-
if (isNaN(e)) return
|
|
35
|
+
if (isNaN(e)) return D(t, NaN);
|
|
36
36
|
if (!e)
|
|
37
37
|
return n;
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const i =
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const r = n.getDate(), a = D(t, n.getTime());
|
|
39
|
+
a.setMonth(n.getMonth() + e + 1, 0);
|
|
40
|
+
const i = a.getDate();
|
|
41
|
+
return r >= i ? a : (n.setFullYear(
|
|
42
|
+
a.getFullYear(),
|
|
43
|
+
a.getMonth(),
|
|
44
|
+
r
|
|
45
45
|
), n);
|
|
46
46
|
}
|
|
47
47
|
const se = 6048e5, Ie = 864e5;
|
|
@@ -51,21 +51,21 @@ function A() {
|
|
|
51
51
|
}
|
|
52
52
|
function N(t, e) {
|
|
53
53
|
var s, f, h, w;
|
|
54
|
-
const n = A(),
|
|
55
|
-
return
|
|
54
|
+
const n = A(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((f = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((w = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : w.weekStartsOn) ?? 0, a = m(t), i = a.getDay(), u = (i < r ? 7 : 0) + i - r;
|
|
55
|
+
return a.setDate(a.getDate() - u), a.setHours(0, 0, 0, 0), a;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function $(t) {
|
|
58
58
|
return N(t, { weekStartsOn: 1 });
|
|
59
59
|
}
|
|
60
60
|
function oe(t) {
|
|
61
|
-
const e = m(t), n = e.getFullYear(),
|
|
62
|
-
|
|
63
|
-
const
|
|
61
|
+
const e = m(t), n = e.getFullYear(), r = D(t, 0);
|
|
62
|
+
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
63
|
+
const a = $(r), i = D(t, 0);
|
|
64
64
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
65
|
-
const u =
|
|
66
|
-
return e.getTime() >=
|
|
65
|
+
const u = $(i);
|
|
66
|
+
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= u.getTime() ? n : n - 1;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function H(t) {
|
|
69
69
|
const e = m(t);
|
|
70
70
|
return e.setHours(0, 0, 0, 0), e;
|
|
71
71
|
}
|
|
@@ -84,16 +84,16 @@ function Z(t) {
|
|
|
84
84
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
85
85
|
}
|
|
86
86
|
function Ze(t, e) {
|
|
87
|
-
const n =
|
|
88
|
-
return Math.round((
|
|
87
|
+
const n = H(t), r = H(e), a = +n - Z(n), i = +r - Z(r);
|
|
88
|
+
return Math.round((a - i) / Ie);
|
|
89
89
|
}
|
|
90
90
|
function Ue(t) {
|
|
91
|
-
const e = oe(t), n =
|
|
92
|
-
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0),
|
|
91
|
+
const e = oe(t), n = D(t, 0);
|
|
92
|
+
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), $(n);
|
|
93
93
|
}
|
|
94
94
|
function _(t, e) {
|
|
95
|
-
const n =
|
|
96
|
-
return +n == +
|
|
95
|
+
const n = H(t), r = H(e);
|
|
96
|
+
return +n == +r;
|
|
97
97
|
}
|
|
98
98
|
function Ke(t) {
|
|
99
99
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
@@ -112,13 +112,13 @@ function nt(t) {
|
|
|
112
112
|
const e = m(t);
|
|
113
113
|
return e.setDate(1), e.setHours(0, 0, 0, 0), e;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const e = m(t), n =
|
|
115
|
+
function rt(t) {
|
|
116
|
+
const e = m(t), n = D(t, 0);
|
|
117
117
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
const n = e == null ? void 0 : e.weekStartsOn,
|
|
121
|
-
return
|
|
119
|
+
function at(t, e) {
|
|
120
|
+
const n = e == null ? void 0 : e.weekStartsOn, r = m(t), a = r.getDay(), i = (a < n ? -7 : 0) + 6 - (a - n);
|
|
121
|
+
return r.setDate(r.getDate() + i), r.setHours(23, 59, 59, 999), r;
|
|
122
122
|
}
|
|
123
123
|
const it = {
|
|
124
124
|
lessThanXSeconds: {
|
|
@@ -183,9 +183,9 @@ const it = {
|
|
|
183
183
|
other: "almost {{count}} years"
|
|
184
184
|
}
|
|
185
185
|
}, st = (t, e, n) => {
|
|
186
|
-
let
|
|
187
|
-
const
|
|
188
|
-
return typeof
|
|
186
|
+
let r;
|
|
187
|
+
const a = it[t];
|
|
188
|
+
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
189
189
|
};
|
|
190
190
|
function S(t) {
|
|
191
191
|
return (e = {}) => {
|
|
@@ -228,20 +228,20 @@ const ot = {
|
|
|
228
228
|
tomorrow: "'tomorrow at' p",
|
|
229
229
|
nextWeek: "eeee 'at' p",
|
|
230
230
|
other: "P"
|
|
231
|
-
}, mt = (t, e, n,
|
|
232
|
-
function
|
|
231
|
+
}, mt = (t, e, n, r) => lt[t];
|
|
232
|
+
function P(t) {
|
|
233
233
|
return (e, n) => {
|
|
234
|
-
const
|
|
235
|
-
let
|
|
236
|
-
if (
|
|
234
|
+
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
235
|
+
let a;
|
|
236
|
+
if (r === "formatting" && t.formattingValues) {
|
|
237
237
|
const u = t.defaultFormattingWidth || t.defaultWidth, s = n != null && n.width ? String(n.width) : u;
|
|
238
|
-
|
|
238
|
+
a = t.formattingValues[s] || t.formattingValues[u];
|
|
239
239
|
} else {
|
|
240
240
|
const u = t.defaultWidth, s = n != null && n.width ? String(n.width) : t.defaultWidth;
|
|
241
|
-
|
|
241
|
+
a = t.values[s] || t.values[u];
|
|
242
242
|
}
|
|
243
243
|
const i = t.argumentCallback ? t.argumentCallback(e) : e;
|
|
244
|
-
return
|
|
244
|
+
return a[i];
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
247
|
const ht = {
|
|
@@ -295,7 +295,7 @@ const ht = {
|
|
|
295
295
|
"Friday",
|
|
296
296
|
"Saturday"
|
|
297
297
|
]
|
|
298
|
-
},
|
|
298
|
+
}, yt = {
|
|
299
299
|
narrow: {
|
|
300
300
|
am: "a",
|
|
301
301
|
pm: "p",
|
|
@@ -326,7 +326,7 @@ const ht = {
|
|
|
326
326
|
evening: "evening",
|
|
327
327
|
night: "night"
|
|
328
328
|
}
|
|
329
|
-
},
|
|
329
|
+
}, bt = {
|
|
330
330
|
narrow: {
|
|
331
331
|
am: "a",
|
|
332
332
|
pm: "p",
|
|
@@ -358,9 +358,9 @@ const ht = {
|
|
|
358
358
|
night: "at night"
|
|
359
359
|
}
|
|
360
360
|
}, Mt = (t, e) => {
|
|
361
|
-
const n = Number(t),
|
|
362
|
-
if (
|
|
363
|
-
switch (
|
|
361
|
+
const n = Number(t), r = n % 100;
|
|
362
|
+
if (r > 20 || r < 10)
|
|
363
|
+
switch (r % 10) {
|
|
364
364
|
case 1:
|
|
365
365
|
return n + "st";
|
|
366
366
|
case 2:
|
|
@@ -371,38 +371,38 @@ const ht = {
|
|
|
371
371
|
return n + "th";
|
|
372
372
|
}, vt = {
|
|
373
373
|
ordinalNumber: Mt,
|
|
374
|
-
era:
|
|
374
|
+
era: P({
|
|
375
375
|
values: ht,
|
|
376
376
|
defaultWidth: "wide"
|
|
377
377
|
}),
|
|
378
|
-
quarter:
|
|
378
|
+
quarter: P({
|
|
379
379
|
values: ft,
|
|
380
380
|
defaultWidth: "wide",
|
|
381
381
|
argumentCallback: (t) => t - 1
|
|
382
382
|
}),
|
|
383
|
-
month:
|
|
383
|
+
month: P({
|
|
384
384
|
values: gt,
|
|
385
385
|
defaultWidth: "wide"
|
|
386
386
|
}),
|
|
387
|
-
day:
|
|
387
|
+
day: P({
|
|
388
388
|
values: wt,
|
|
389
389
|
defaultWidth: "wide"
|
|
390
390
|
}),
|
|
391
|
-
dayPeriod:
|
|
392
|
-
values:
|
|
391
|
+
dayPeriod: P({
|
|
392
|
+
values: yt,
|
|
393
393
|
defaultWidth: "wide",
|
|
394
|
-
formattingValues:
|
|
394
|
+
formattingValues: bt,
|
|
395
395
|
defaultFormattingWidth: "wide"
|
|
396
396
|
})
|
|
397
397
|
};
|
|
398
|
-
function
|
|
398
|
+
function p(t) {
|
|
399
399
|
return (e, n = {}) => {
|
|
400
|
-
const
|
|
400
|
+
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
401
401
|
if (!i)
|
|
402
402
|
return null;
|
|
403
|
-
const u = i[0], s =
|
|
403
|
+
const u = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(s) ? Pt(s, (v) => v.test(u)) : (
|
|
404
404
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
405
|
-
|
|
405
|
+
kt(s, (v) => v.test(u))
|
|
406
406
|
);
|
|
407
407
|
let h;
|
|
408
408
|
h = t.valueCallback ? t.valueCallback(f) : f, h = n.valueCallback ? (
|
|
@@ -413,29 +413,29 @@ function D(t) {
|
|
|
413
413
|
return { value: h, rest: w };
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function kt(t, e) {
|
|
417
417
|
for (const n in t)
|
|
418
418
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
419
419
|
return n;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function Pt(t, e) {
|
|
422
422
|
for (let n = 0; n < t.length; n++)
|
|
423
423
|
if (e(t[n]))
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
426
|
function ce(t) {
|
|
427
427
|
return (e, n = {}) => {
|
|
428
|
-
const
|
|
429
|
-
if (!
|
|
430
|
-
const
|
|
428
|
+
const r = e.match(t.matchPattern);
|
|
429
|
+
if (!r) return null;
|
|
430
|
+
const a = r[0], i = e.match(t.parsePattern);
|
|
431
431
|
if (!i) return null;
|
|
432
432
|
let u = t.valueCallback ? t.valueCallback(i[0]) : i[0];
|
|
433
433
|
u = n.valueCallback ? n.valueCallback(u) : u;
|
|
434
|
-
const s = e.slice(
|
|
434
|
+
const s = e.slice(a.length);
|
|
435
435
|
return { value: u, rest: s };
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
|
-
const
|
|
438
|
+
const pt = /^(\d+)(th|st|nd|rd)?/i, Dt = /\d+/i, Ot = {
|
|
439
439
|
narrow: /^(b|a)/i,
|
|
440
440
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
441
441
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
@@ -502,90 +502,90 @@ const Dt = /^(\d+)(th|st|nd|rd)?/i, kt = /\d+/i, Ot = {
|
|
|
502
502
|
evening: /evening/i,
|
|
503
503
|
night: /night/i
|
|
504
504
|
}
|
|
505
|
-
},
|
|
505
|
+
}, qt = {
|
|
506
506
|
ordinalNumber: ce({
|
|
507
|
-
matchPattern:
|
|
508
|
-
parsePattern:
|
|
507
|
+
matchPattern: pt,
|
|
508
|
+
parsePattern: Dt,
|
|
509
509
|
valueCallback: (t) => parseInt(t, 10)
|
|
510
510
|
}),
|
|
511
|
-
era:
|
|
511
|
+
era: p({
|
|
512
512
|
matchPatterns: Ot,
|
|
513
513
|
defaultMatchWidth: "wide",
|
|
514
514
|
parsePatterns: Wt,
|
|
515
515
|
defaultParseWidth: "any"
|
|
516
516
|
}),
|
|
517
|
-
quarter:
|
|
517
|
+
quarter: p({
|
|
518
518
|
matchPatterns: xt,
|
|
519
519
|
defaultMatchWidth: "wide",
|
|
520
520
|
parsePatterns: Tt,
|
|
521
521
|
defaultParseWidth: "any",
|
|
522
522
|
valueCallback: (t) => t + 1
|
|
523
523
|
}),
|
|
524
|
-
month:
|
|
524
|
+
month: p({
|
|
525
525
|
matchPatterns: _t,
|
|
526
526
|
defaultMatchWidth: "wide",
|
|
527
527
|
parsePatterns: Yt,
|
|
528
528
|
defaultParseWidth: "any"
|
|
529
529
|
}),
|
|
530
|
-
day:
|
|
530
|
+
day: p({
|
|
531
531
|
matchPatterns: Ct,
|
|
532
532
|
defaultMatchWidth: "wide",
|
|
533
533
|
parsePatterns: St,
|
|
534
534
|
defaultParseWidth: "any"
|
|
535
535
|
}),
|
|
536
|
-
dayPeriod:
|
|
536
|
+
dayPeriod: p({
|
|
537
537
|
matchPatterns: Nt,
|
|
538
538
|
defaultMatchWidth: "any",
|
|
539
539
|
parsePatterns: jt,
|
|
540
540
|
defaultParseWidth: "any"
|
|
541
541
|
})
|
|
542
|
-
},
|
|
542
|
+
}, Et = {
|
|
543
543
|
code: "en-US",
|
|
544
544
|
formatDistance: st,
|
|
545
545
|
formatLong: dt,
|
|
546
546
|
formatRelative: mt,
|
|
547
547
|
localize: vt,
|
|
548
|
-
match:
|
|
548
|
+
match: qt,
|
|
549
549
|
options: {
|
|
550
550
|
weekStartsOn: 0,
|
|
551
551
|
firstWeekContainsDate: 1
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
|
-
function
|
|
554
|
+
function Ft(t) {
|
|
555
555
|
const e = m(t);
|
|
556
|
-
return Ze(e,
|
|
556
|
+
return Ze(e, rt(e)) + 1;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
const e = m(t), n =
|
|
558
|
+
function Lt(t) {
|
|
559
|
+
const e = m(t), n = +$(e) - +Ue(e);
|
|
560
560
|
return Math.round(n / se) + 1;
|
|
561
561
|
}
|
|
562
562
|
function ue(t, e) {
|
|
563
563
|
var w, v, x, T;
|
|
564
|
-
const n = m(t),
|
|
565
|
-
u.setFullYear(
|
|
566
|
-
const s = N(u, e), f =
|
|
567
|
-
f.setFullYear(
|
|
564
|
+
const n = m(t), r = n.getFullYear(), a = A(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((v = (w = e == null ? void 0 : e.locale) == null ? void 0 : w.options) == null ? void 0 : v.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((T = (x = a.locale) == null ? void 0 : x.options) == null ? void 0 : T.firstWeekContainsDate) ?? 1, u = D(t, 0);
|
|
565
|
+
u.setFullYear(r + 1, 0, i), u.setHours(0, 0, 0, 0);
|
|
566
|
+
const s = N(u, e), f = D(t, 0);
|
|
567
|
+
f.setFullYear(r, 0, i), f.setHours(0, 0, 0, 0);
|
|
568
568
|
const h = N(f, e);
|
|
569
|
-
return n.getTime() >= s.getTime() ?
|
|
569
|
+
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= h.getTime() ? r : r - 1;
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function $t(t, e) {
|
|
572
572
|
var s, f, h, w;
|
|
573
|
-
const n = A(),
|
|
574
|
-
return i.setFullYear(
|
|
573
|
+
const n = A(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((w = (h = n.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, a = ue(t, e), i = D(t, 0);
|
|
574
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), N(i, e);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
const n = m(t),
|
|
578
|
-
return Math.round(
|
|
576
|
+
function Ht(t, e) {
|
|
577
|
+
const n = m(t), r = +N(n, e) - +$t(n, e);
|
|
578
|
+
return Math.round(r / se) + 1;
|
|
579
579
|
}
|
|
580
580
|
function d(t, e) {
|
|
581
|
-
const n = t < 0 ? "-" : "",
|
|
582
|
-
return n +
|
|
581
|
+
const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
|
|
582
|
+
return n + r;
|
|
583
583
|
}
|
|
584
584
|
const W = {
|
|
585
585
|
// Year
|
|
586
586
|
y(t, e) {
|
|
587
|
-
const n = t.getFullYear(),
|
|
588
|
-
return d(e === "yy" ?
|
|
587
|
+
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
588
|
+
return d(e === "yy" ? r % 100 : r, e.length);
|
|
589
589
|
},
|
|
590
590
|
// Month
|
|
591
591
|
M(t, e) {
|
|
@@ -630,10 +630,10 @@ const W = {
|
|
|
630
630
|
},
|
|
631
631
|
// Fraction of second
|
|
632
632
|
S(t, e) {
|
|
633
|
-
const n = e.length,
|
|
634
|
-
|
|
633
|
+
const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
|
|
634
|
+
r * Math.pow(10, n - 3)
|
|
635
635
|
);
|
|
636
|
-
return d(
|
|
636
|
+
return d(a, e.length);
|
|
637
637
|
}
|
|
638
638
|
}, C = {
|
|
639
639
|
am: "am",
|
|
@@ -647,30 +647,30 @@ const W = {
|
|
|
647
647
|
}, U = {
|
|
648
648
|
// Era
|
|
649
649
|
G: function(t, e, n) {
|
|
650
|
-
const
|
|
650
|
+
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
651
651
|
switch (e) {
|
|
652
652
|
case "G":
|
|
653
653
|
case "GG":
|
|
654
654
|
case "GGG":
|
|
655
|
-
return n.era(
|
|
655
|
+
return n.era(r, { width: "abbreviated" });
|
|
656
656
|
case "GGGGG":
|
|
657
|
-
return n.era(
|
|
657
|
+
return n.era(r, { width: "narrow" });
|
|
658
658
|
case "GGGG":
|
|
659
659
|
default:
|
|
660
|
-
return n.era(
|
|
660
|
+
return n.era(r, { width: "wide" });
|
|
661
661
|
}
|
|
662
662
|
},
|
|
663
663
|
// Year
|
|
664
664
|
y: function(t, e, n) {
|
|
665
665
|
if (e === "yo") {
|
|
666
|
-
const
|
|
667
|
-
return n.ordinalNumber(
|
|
666
|
+
const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
667
|
+
return n.ordinalNumber(a, { unit: "year" });
|
|
668
668
|
}
|
|
669
669
|
return W.y(t, e);
|
|
670
670
|
},
|
|
671
671
|
// Local week-numbering year
|
|
672
|
-
Y: function(t, e, n,
|
|
673
|
-
const
|
|
672
|
+
Y: function(t, e, n, r) {
|
|
673
|
+
const a = ue(t, r), i = a > 0 ? a : 1 - a;
|
|
674
674
|
if (e === "YY") {
|
|
675
675
|
const u = i % 100;
|
|
676
676
|
return d(u, 2);
|
|
@@ -697,27 +697,27 @@ const W = {
|
|
|
697
697
|
},
|
|
698
698
|
// Quarter
|
|
699
699
|
Q: function(t, e, n) {
|
|
700
|
-
const
|
|
700
|
+
const r = Math.ceil((t.getMonth() + 1) / 3);
|
|
701
701
|
switch (e) {
|
|
702
702
|
case "Q":
|
|
703
|
-
return String(
|
|
703
|
+
return String(r);
|
|
704
704
|
case "QQ":
|
|
705
|
-
return d(
|
|
705
|
+
return d(r, 2);
|
|
706
706
|
case "Qo":
|
|
707
|
-
return n.ordinalNumber(
|
|
707
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
708
708
|
case "QQQ":
|
|
709
|
-
return n.quarter(
|
|
709
|
+
return n.quarter(r, {
|
|
710
710
|
width: "abbreviated",
|
|
711
711
|
context: "formatting"
|
|
712
712
|
});
|
|
713
713
|
case "QQQQQ":
|
|
714
|
-
return n.quarter(
|
|
714
|
+
return n.quarter(r, {
|
|
715
715
|
width: "narrow",
|
|
716
716
|
context: "formatting"
|
|
717
717
|
});
|
|
718
718
|
case "QQQQ":
|
|
719
719
|
default:
|
|
720
|
-
return n.quarter(
|
|
720
|
+
return n.quarter(r, {
|
|
721
721
|
width: "wide",
|
|
722
722
|
context: "formatting"
|
|
723
723
|
});
|
|
@@ -725,27 +725,27 @@ const W = {
|
|
|
725
725
|
},
|
|
726
726
|
// Stand-alone quarter
|
|
727
727
|
q: function(t, e, n) {
|
|
728
|
-
const
|
|
728
|
+
const r = Math.ceil((t.getMonth() + 1) / 3);
|
|
729
729
|
switch (e) {
|
|
730
730
|
case "q":
|
|
731
|
-
return String(
|
|
731
|
+
return String(r);
|
|
732
732
|
case "qq":
|
|
733
|
-
return d(
|
|
733
|
+
return d(r, 2);
|
|
734
734
|
case "qo":
|
|
735
|
-
return n.ordinalNumber(
|
|
735
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
736
736
|
case "qqq":
|
|
737
|
-
return n.quarter(
|
|
737
|
+
return n.quarter(r, {
|
|
738
738
|
width: "abbreviated",
|
|
739
739
|
context: "standalone"
|
|
740
740
|
});
|
|
741
741
|
case "qqqqq":
|
|
742
|
-
return n.quarter(
|
|
742
|
+
return n.quarter(r, {
|
|
743
743
|
width: "narrow",
|
|
744
744
|
context: "standalone"
|
|
745
745
|
});
|
|
746
746
|
case "qqqq":
|
|
747
747
|
default:
|
|
748
|
-
return n.quarter(
|
|
748
|
+
return n.quarter(r, {
|
|
749
749
|
width: "wide",
|
|
750
750
|
context: "standalone"
|
|
751
751
|
});
|
|
@@ -753,62 +753,62 @@ const W = {
|
|
|
753
753
|
},
|
|
754
754
|
// Month
|
|
755
755
|
M: function(t, e, n) {
|
|
756
|
-
const
|
|
756
|
+
const r = t.getMonth();
|
|
757
757
|
switch (e) {
|
|
758
758
|
case "M":
|
|
759
759
|
case "MM":
|
|
760
760
|
return W.M(t, e);
|
|
761
761
|
case "Mo":
|
|
762
|
-
return n.ordinalNumber(
|
|
762
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
763
763
|
case "MMM":
|
|
764
|
-
return n.month(
|
|
764
|
+
return n.month(r, {
|
|
765
765
|
width: "abbreviated",
|
|
766
766
|
context: "formatting"
|
|
767
767
|
});
|
|
768
768
|
case "MMMMM":
|
|
769
|
-
return n.month(
|
|
769
|
+
return n.month(r, {
|
|
770
770
|
width: "narrow",
|
|
771
771
|
context: "formatting"
|
|
772
772
|
});
|
|
773
773
|
case "MMMM":
|
|
774
774
|
default:
|
|
775
|
-
return n.month(
|
|
775
|
+
return n.month(r, { width: "wide", context: "formatting" });
|
|
776
776
|
}
|
|
777
777
|
},
|
|
778
778
|
// Stand-alone month
|
|
779
779
|
L: function(t, e, n) {
|
|
780
|
-
const
|
|
780
|
+
const r = t.getMonth();
|
|
781
781
|
switch (e) {
|
|
782
782
|
case "L":
|
|
783
|
-
return String(
|
|
783
|
+
return String(r + 1);
|
|
784
784
|
case "LL":
|
|
785
|
-
return d(
|
|
785
|
+
return d(r + 1, 2);
|
|
786
786
|
case "Lo":
|
|
787
|
-
return n.ordinalNumber(
|
|
787
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
788
788
|
case "LLL":
|
|
789
|
-
return n.month(
|
|
789
|
+
return n.month(r, {
|
|
790
790
|
width: "abbreviated",
|
|
791
791
|
context: "standalone"
|
|
792
792
|
});
|
|
793
793
|
case "LLLLL":
|
|
794
|
-
return n.month(
|
|
794
|
+
return n.month(r, {
|
|
795
795
|
width: "narrow",
|
|
796
796
|
context: "standalone"
|
|
797
797
|
});
|
|
798
798
|
case "LLLL":
|
|
799
799
|
default:
|
|
800
|
-
return n.month(
|
|
800
|
+
return n.month(r, { width: "wide", context: "standalone" });
|
|
801
801
|
}
|
|
802
802
|
},
|
|
803
803
|
// Local week of year
|
|
804
|
-
w: function(t, e, n,
|
|
805
|
-
const
|
|
806
|
-
return e === "wo" ? n.ordinalNumber(
|
|
804
|
+
w: function(t, e, n, r) {
|
|
805
|
+
const a = Ht(t, r);
|
|
806
|
+
return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : d(a, e.length);
|
|
807
807
|
},
|
|
808
808
|
// ISO week of year
|
|
809
809
|
I: function(t, e, n) {
|
|
810
|
-
const
|
|
811
|
-
return e === "Io" ? n.ordinalNumber(
|
|
810
|
+
const r = Lt(t);
|
|
811
|
+
return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : d(r, e.length);
|
|
812
812
|
},
|
|
813
813
|
// Day of the month
|
|
814
814
|
d: function(t, e, n) {
|
|
@@ -816,41 +816,41 @@ const W = {
|
|
|
816
816
|
},
|
|
817
817
|
// Day of year
|
|
818
818
|
D: function(t, e, n) {
|
|
819
|
-
const
|
|
820
|
-
return e === "Do" ? n.ordinalNumber(
|
|
819
|
+
const r = Ft(t);
|
|
820
|
+
return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : d(r, e.length);
|
|
821
821
|
},
|
|
822
822
|
// Day of week
|
|
823
823
|
E: function(t, e, n) {
|
|
824
|
-
const
|
|
824
|
+
const r = t.getDay();
|
|
825
825
|
switch (e) {
|
|
826
826
|
case "E":
|
|
827
827
|
case "EE":
|
|
828
828
|
case "EEE":
|
|
829
|
-
return n.day(
|
|
829
|
+
return n.day(r, {
|
|
830
830
|
width: "abbreviated",
|
|
831
831
|
context: "formatting"
|
|
832
832
|
});
|
|
833
833
|
case "EEEEE":
|
|
834
|
-
return n.day(
|
|
834
|
+
return n.day(r, {
|
|
835
835
|
width: "narrow",
|
|
836
836
|
context: "formatting"
|
|
837
837
|
});
|
|
838
838
|
case "EEEEEE":
|
|
839
|
-
return n.day(
|
|
839
|
+
return n.day(r, {
|
|
840
840
|
width: "short",
|
|
841
841
|
context: "formatting"
|
|
842
842
|
});
|
|
843
843
|
case "EEEE":
|
|
844
844
|
default:
|
|
845
|
-
return n.day(
|
|
845
|
+
return n.day(r, {
|
|
846
846
|
width: "wide",
|
|
847
847
|
context: "formatting"
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
},
|
|
851
851
|
// Local day of week
|
|
852
|
-
e: function(t, e, n,
|
|
853
|
-
const
|
|
852
|
+
e: function(t, e, n, r) {
|
|
853
|
+
const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
854
854
|
switch (e) {
|
|
855
855
|
case "e":
|
|
856
856
|
return String(i);
|
|
@@ -859,31 +859,31 @@ const W = {
|
|
|
859
859
|
case "eo":
|
|
860
860
|
return n.ordinalNumber(i, { unit: "day" });
|
|
861
861
|
case "eee":
|
|
862
|
-
return n.day(
|
|
862
|
+
return n.day(a, {
|
|
863
863
|
width: "abbreviated",
|
|
864
864
|
context: "formatting"
|
|
865
865
|
});
|
|
866
866
|
case "eeeee":
|
|
867
|
-
return n.day(
|
|
867
|
+
return n.day(a, {
|
|
868
868
|
width: "narrow",
|
|
869
869
|
context: "formatting"
|
|
870
870
|
});
|
|
871
871
|
case "eeeeee":
|
|
872
|
-
return n.day(
|
|
872
|
+
return n.day(a, {
|
|
873
873
|
width: "short",
|
|
874
874
|
context: "formatting"
|
|
875
875
|
});
|
|
876
876
|
case "eeee":
|
|
877
877
|
default:
|
|
878
|
-
return n.day(
|
|
878
|
+
return n.day(a, {
|
|
879
879
|
width: "wide",
|
|
880
880
|
context: "formatting"
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
},
|
|
884
884
|
// Stand-alone local day of week
|
|
885
|
-
c: function(t, e, n,
|
|
886
|
-
const
|
|
885
|
+
c: function(t, e, n, r) {
|
|
886
|
+
const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
887
887
|
switch (e) {
|
|
888
888
|
case "c":
|
|
889
889
|
return String(i);
|
|
@@ -892,23 +892,23 @@ const W = {
|
|
|
892
892
|
case "co":
|
|
893
893
|
return n.ordinalNumber(i, { unit: "day" });
|
|
894
894
|
case "ccc":
|
|
895
|
-
return n.day(
|
|
895
|
+
return n.day(a, {
|
|
896
896
|
width: "abbreviated",
|
|
897
897
|
context: "standalone"
|
|
898
898
|
});
|
|
899
899
|
case "ccccc":
|
|
900
|
-
return n.day(
|
|
900
|
+
return n.day(a, {
|
|
901
901
|
width: "narrow",
|
|
902
902
|
context: "standalone"
|
|
903
903
|
});
|
|
904
904
|
case "cccccc":
|
|
905
|
-
return n.day(
|
|
905
|
+
return n.day(a, {
|
|
906
906
|
width: "short",
|
|
907
907
|
context: "standalone"
|
|
908
908
|
});
|
|
909
909
|
case "cccc":
|
|
910
910
|
default:
|
|
911
|
-
return n.day(
|
|
911
|
+
return n.day(a, {
|
|
912
912
|
width: "wide",
|
|
913
913
|
context: "standalone"
|
|
914
914
|
});
|
|
@@ -916,32 +916,32 @@ const W = {
|
|
|
916
916
|
},
|
|
917
917
|
// ISO day of week
|
|
918
918
|
i: function(t, e, n) {
|
|
919
|
-
const
|
|
919
|
+
const r = t.getDay(), a = r === 0 ? 7 : r;
|
|
920
920
|
switch (e) {
|
|
921
921
|
case "i":
|
|
922
|
-
return String(
|
|
922
|
+
return String(a);
|
|
923
923
|
case "ii":
|
|
924
|
-
return d(
|
|
924
|
+
return d(a, e.length);
|
|
925
925
|
case "io":
|
|
926
|
-
return n.ordinalNumber(
|
|
926
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
927
927
|
case "iii":
|
|
928
|
-
return n.day(
|
|
928
|
+
return n.day(r, {
|
|
929
929
|
width: "abbreviated",
|
|
930
930
|
context: "formatting"
|
|
931
931
|
});
|
|
932
932
|
case "iiiii":
|
|
933
|
-
return n.day(
|
|
933
|
+
return n.day(r, {
|
|
934
934
|
width: "narrow",
|
|
935
935
|
context: "formatting"
|
|
936
936
|
});
|
|
937
937
|
case "iiiiii":
|
|
938
|
-
return n.day(
|
|
938
|
+
return n.day(r, {
|
|
939
939
|
width: "short",
|
|
940
940
|
context: "formatting"
|
|
941
941
|
});
|
|
942
942
|
case "iiii":
|
|
943
943
|
default:
|
|
944
|
-
return n.day(
|
|
944
|
+
return n.day(r, {
|
|
945
945
|
width: "wide",
|
|
946
946
|
context: "formatting"
|
|
947
947
|
});
|
|
@@ -949,27 +949,27 @@ const W = {
|
|
|
949
949
|
},
|
|
950
950
|
// AM or PM
|
|
951
951
|
a: function(t, e, n) {
|
|
952
|
-
const
|
|
952
|
+
const a = t.getHours() / 12 >= 1 ? "pm" : "am";
|
|
953
953
|
switch (e) {
|
|
954
954
|
case "a":
|
|
955
955
|
case "aa":
|
|
956
|
-
return n.dayPeriod(
|
|
956
|
+
return n.dayPeriod(a, {
|
|
957
957
|
width: "abbreviated",
|
|
958
958
|
context: "formatting"
|
|
959
959
|
});
|
|
960
960
|
case "aaa":
|
|
961
|
-
return n.dayPeriod(
|
|
961
|
+
return n.dayPeriod(a, {
|
|
962
962
|
width: "abbreviated",
|
|
963
963
|
context: "formatting"
|
|
964
964
|
}).toLowerCase();
|
|
965
965
|
case "aaaaa":
|
|
966
|
-
return n.dayPeriod(
|
|
966
|
+
return n.dayPeriod(a, {
|
|
967
967
|
width: "narrow",
|
|
968
968
|
context: "formatting"
|
|
969
969
|
});
|
|
970
970
|
case "aaaa":
|
|
971
971
|
default:
|
|
972
|
-
return n.dayPeriod(
|
|
972
|
+
return n.dayPeriod(a, {
|
|
973
973
|
width: "wide",
|
|
974
974
|
context: "formatting"
|
|
975
975
|
});
|
|
@@ -977,28 +977,28 @@ const W = {
|
|
|
977
977
|
},
|
|
978
978
|
// AM, PM, midnight, noon
|
|
979
979
|
b: function(t, e, n) {
|
|
980
|
-
const
|
|
981
|
-
let
|
|
982
|
-
switch (
|
|
980
|
+
const r = t.getHours();
|
|
981
|
+
let a;
|
|
982
|
+
switch (r === 12 ? a = C.noon : r === 0 ? a = C.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
|
|
983
983
|
case "b":
|
|
984
984
|
case "bb":
|
|
985
|
-
return n.dayPeriod(
|
|
985
|
+
return n.dayPeriod(a, {
|
|
986
986
|
width: "abbreviated",
|
|
987
987
|
context: "formatting"
|
|
988
988
|
});
|
|
989
989
|
case "bbb":
|
|
990
|
-
return n.dayPeriod(
|
|
990
|
+
return n.dayPeriod(a, {
|
|
991
991
|
width: "abbreviated",
|
|
992
992
|
context: "formatting"
|
|
993
993
|
}).toLowerCase();
|
|
994
994
|
case "bbbbb":
|
|
995
|
-
return n.dayPeriod(
|
|
995
|
+
return n.dayPeriod(a, {
|
|
996
996
|
width: "narrow",
|
|
997
997
|
context: "formatting"
|
|
998
998
|
});
|
|
999
999
|
case "bbbb":
|
|
1000
1000
|
default:
|
|
1001
|
-
return n.dayPeriod(
|
|
1001
|
+
return n.dayPeriod(a, {
|
|
1002
1002
|
width: "wide",
|
|
1003
1003
|
context: "formatting"
|
|
1004
1004
|
});
|
|
@@ -1006,24 +1006,24 @@ const W = {
|
|
|
1006
1006
|
},
|
|
1007
1007
|
// in the morning, in the afternoon, in the evening, at night
|
|
1008
1008
|
B: function(t, e, n) {
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
switch (
|
|
1009
|
+
const r = t.getHours();
|
|
1010
|
+
let a;
|
|
1011
|
+
switch (r >= 17 ? a = C.evening : r >= 12 ? a = C.afternoon : r >= 4 ? a = C.morning : a = C.night, e) {
|
|
1012
1012
|
case "B":
|
|
1013
1013
|
case "BB":
|
|
1014
1014
|
case "BBB":
|
|
1015
|
-
return n.dayPeriod(
|
|
1015
|
+
return n.dayPeriod(a, {
|
|
1016
1016
|
width: "abbreviated",
|
|
1017
1017
|
context: "formatting"
|
|
1018
1018
|
});
|
|
1019
1019
|
case "BBBBB":
|
|
1020
|
-
return n.dayPeriod(
|
|
1020
|
+
return n.dayPeriod(a, {
|
|
1021
1021
|
width: "narrow",
|
|
1022
1022
|
context: "formatting"
|
|
1023
1023
|
});
|
|
1024
1024
|
case "BBBB":
|
|
1025
1025
|
default:
|
|
1026
|
-
return n.dayPeriod(
|
|
1026
|
+
return n.dayPeriod(a, {
|
|
1027
1027
|
width: "wide",
|
|
1028
1028
|
context: "formatting"
|
|
1029
1029
|
});
|
|
@@ -1032,8 +1032,8 @@ const W = {
|
|
|
1032
1032
|
// Hour [1-12]
|
|
1033
1033
|
h: function(t, e, n) {
|
|
1034
1034
|
if (e === "ho") {
|
|
1035
|
-
let
|
|
1036
|
-
return
|
|
1035
|
+
let r = t.getHours() % 12;
|
|
1036
|
+
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1037
1037
|
}
|
|
1038
1038
|
return W.h(t, e);
|
|
1039
1039
|
},
|
|
@@ -1043,13 +1043,13 @@ const W = {
|
|
|
1043
1043
|
},
|
|
1044
1044
|
// Hour [0-11]
|
|
1045
1045
|
K: function(t, e, n) {
|
|
1046
|
-
const
|
|
1047
|
-
return e === "Ko" ? n.ordinalNumber(
|
|
1046
|
+
const r = t.getHours() % 12;
|
|
1047
|
+
return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, e.length);
|
|
1048
1048
|
},
|
|
1049
1049
|
// Hour [1-24]
|
|
1050
1050
|
k: function(t, e, n) {
|
|
1051
|
-
let
|
|
1052
|
-
return
|
|
1051
|
+
let r = t.getHours();
|
|
1052
|
+
return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : d(r, e.length);
|
|
1053
1053
|
},
|
|
1054
1054
|
// Minute
|
|
1055
1055
|
m: function(t, e, n) {
|
|
@@ -1065,83 +1065,83 @@ const W = {
|
|
|
1065
1065
|
},
|
|
1066
1066
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1067
1067
|
X: function(t, e, n) {
|
|
1068
|
-
const
|
|
1069
|
-
if (
|
|
1068
|
+
const r = t.getTimezoneOffset();
|
|
1069
|
+
if (r === 0)
|
|
1070
1070
|
return "Z";
|
|
1071
1071
|
switch (e) {
|
|
1072
1072
|
case "X":
|
|
1073
|
-
return ee(
|
|
1073
|
+
return ee(r);
|
|
1074
1074
|
case "XXXX":
|
|
1075
1075
|
case "XX":
|
|
1076
|
-
return Y(
|
|
1076
|
+
return Y(r);
|
|
1077
1077
|
case "XXXXX":
|
|
1078
1078
|
case "XXX":
|
|
1079
1079
|
default:
|
|
1080
|
-
return Y(
|
|
1080
|
+
return Y(r, ":");
|
|
1081
1081
|
}
|
|
1082
1082
|
},
|
|
1083
1083
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1084
1084
|
x: function(t, e, n) {
|
|
1085
|
-
const
|
|
1085
|
+
const r = t.getTimezoneOffset();
|
|
1086
1086
|
switch (e) {
|
|
1087
1087
|
case "x":
|
|
1088
|
-
return ee(
|
|
1088
|
+
return ee(r);
|
|
1089
1089
|
case "xxxx":
|
|
1090
1090
|
case "xx":
|
|
1091
|
-
return Y(
|
|
1091
|
+
return Y(r);
|
|
1092
1092
|
case "xxxxx":
|
|
1093
1093
|
case "xxx":
|
|
1094
1094
|
default:
|
|
1095
|
-
return Y(
|
|
1095
|
+
return Y(r, ":");
|
|
1096
1096
|
}
|
|
1097
1097
|
},
|
|
1098
1098
|
// Timezone (GMT)
|
|
1099
1099
|
O: function(t, e, n) {
|
|
1100
|
-
const
|
|
1100
|
+
const r = t.getTimezoneOffset();
|
|
1101
1101
|
switch (e) {
|
|
1102
1102
|
case "O":
|
|
1103
1103
|
case "OO":
|
|
1104
1104
|
case "OOO":
|
|
1105
|
-
return "GMT" + K(
|
|
1105
|
+
return "GMT" + K(r, ":");
|
|
1106
1106
|
case "OOOO":
|
|
1107
1107
|
default:
|
|
1108
|
-
return "GMT" + Y(
|
|
1108
|
+
return "GMT" + Y(r, ":");
|
|
1109
1109
|
}
|
|
1110
1110
|
},
|
|
1111
1111
|
// Timezone (specific non-location)
|
|
1112
1112
|
z: function(t, e, n) {
|
|
1113
|
-
const
|
|
1113
|
+
const r = t.getTimezoneOffset();
|
|
1114
1114
|
switch (e) {
|
|
1115
1115
|
case "z":
|
|
1116
1116
|
case "zz":
|
|
1117
1117
|
case "zzz":
|
|
1118
|
-
return "GMT" + K(
|
|
1118
|
+
return "GMT" + K(r, ":");
|
|
1119
1119
|
case "zzzz":
|
|
1120
1120
|
default:
|
|
1121
|
-
return "GMT" + Y(
|
|
1121
|
+
return "GMT" + Y(r, ":");
|
|
1122
1122
|
}
|
|
1123
1123
|
},
|
|
1124
1124
|
// Seconds timestamp
|
|
1125
1125
|
t: function(t, e, n) {
|
|
1126
|
-
const
|
|
1127
|
-
return d(
|
|
1126
|
+
const r = Math.trunc(t.getTime() / 1e3);
|
|
1127
|
+
return d(r, e.length);
|
|
1128
1128
|
},
|
|
1129
1129
|
// Milliseconds timestamp
|
|
1130
1130
|
T: function(t, e, n) {
|
|
1131
|
-
const
|
|
1132
|
-
return d(
|
|
1131
|
+
const r = t.getTime();
|
|
1132
|
+
return d(r, e.length);
|
|
1133
1133
|
}
|
|
1134
1134
|
};
|
|
1135
1135
|
function K(t, e = "") {
|
|
1136
|
-
const n = t > 0 ? "-" : "+",
|
|
1137
|
-
return i === 0 ? n + String(
|
|
1136
|
+
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
|
|
1137
|
+
return i === 0 ? n + String(a) : n + String(a) + e + d(i, 2);
|
|
1138
1138
|
}
|
|
1139
1139
|
function ee(t, e) {
|
|
1140
1140
|
return t % 60 === 0 ? (t > 0 ? "-" : "+") + d(Math.abs(t) / 60, 2) : Y(t, e);
|
|
1141
1141
|
}
|
|
1142
1142
|
function Y(t, e = "") {
|
|
1143
|
-
const n = t > 0 ? "-" : "+",
|
|
1144
|
-
return n +
|
|
1143
|
+
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = d(Math.trunc(r / 60), 2), i = d(r % 60, 2);
|
|
1144
|
+
return n + a + e + i;
|
|
1145
1145
|
}
|
|
1146
1146
|
const te = (t, e) => {
|
|
1147
1147
|
switch (t) {
|
|
@@ -1168,11 +1168,11 @@ const te = (t, e) => {
|
|
|
1168
1168
|
return e.time({ width: "full" });
|
|
1169
1169
|
}
|
|
1170
1170
|
}, At = (t, e) => {
|
|
1171
|
-
const n = t.match(/(P+)(p+)?/) || [],
|
|
1172
|
-
if (!
|
|
1171
|
+
const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1172
|
+
if (!a)
|
|
1173
1173
|
return te(t, e);
|
|
1174
1174
|
let i;
|
|
1175
|
-
switch (
|
|
1175
|
+
switch (r) {
|
|
1176
1176
|
case "P":
|
|
1177
1177
|
i = e.dateTime({ width: "short" });
|
|
1178
1178
|
break;
|
|
@@ -1187,7 +1187,7 @@ const te = (t, e) => {
|
|
|
1187
1187
|
i = e.dateTime({ width: "full" });
|
|
1188
1188
|
break;
|
|
1189
1189
|
}
|
|
1190
|
-
return i.replace("{{date}}", te(
|
|
1190
|
+
return i.replace("{{date}}", te(r, e)).replace("{{time}}", de(a, e));
|
|
1191
1191
|
}, Jt = {
|
|
1192
1192
|
p: de,
|
|
1193
1193
|
P: At
|
|
@@ -1199,74 +1199,74 @@ function Qt(t) {
|
|
|
1199
1199
|
return Rt.test(t);
|
|
1200
1200
|
}
|
|
1201
1201
|
function Gt(t, e, n) {
|
|
1202
|
-
const
|
|
1203
|
-
if (console.warn(
|
|
1202
|
+
const r = It(t, e, n);
|
|
1203
|
+
if (console.warn(r), Bt.includes(t)) throw new RangeError(r);
|
|
1204
1204
|
}
|
|
1205
1205
|
function It(t, e, n) {
|
|
1206
|
-
const
|
|
1207
|
-
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${
|
|
1206
|
+
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1207
|
+
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1208
1208
|
}
|
|
1209
1209
|
const zt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ut = /^'([^]*?)'?$/, Kt = /''/g, en = /[a-zA-Z]/;
|
|
1210
1210
|
function ne(t, e, n) {
|
|
1211
|
-
var w, v, x, T,
|
|
1212
|
-
const
|
|
1211
|
+
var w, v, x, T, E, F, j, L;
|
|
1212
|
+
const r = A(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? Et, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((v = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.options) == null ? void 0 : v.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((T = (x = r.locale) == null ? void 0 : x.options) == null ? void 0 : T.firstWeekContainsDate) ?? 1, u = (n == null ? void 0 : n.weekStartsOn) ?? ((F = (E = n == null ? void 0 : n.locale) == null ? void 0 : E.options) == null ? void 0 : F.weekStartsOn) ?? r.weekStartsOn ?? ((L = (j = r.locale) == null ? void 0 : j.options) == null ? void 0 : L.weekStartsOn) ?? 0, s = m(t);
|
|
1213
1213
|
if (!et(s))
|
|
1214
1214
|
throw new RangeError("Invalid time value");
|
|
1215
|
-
let f = e.match(Zt).map((
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1218
|
-
const
|
|
1219
|
-
return
|
|
1215
|
+
let f = e.match(Zt).map((b) => {
|
|
1216
|
+
const y = b[0];
|
|
1217
|
+
if (y === "p" || y === "P") {
|
|
1218
|
+
const k = Jt[y];
|
|
1219
|
+
return k(b, a.formatLong);
|
|
1220
1220
|
}
|
|
1221
|
-
return
|
|
1222
|
-
}).join("").match(zt).map((
|
|
1223
|
-
if (
|
|
1221
|
+
return b;
|
|
1222
|
+
}).join("").match(zt).map((b) => {
|
|
1223
|
+
if (b === "''")
|
|
1224
1224
|
return { isToken: !1, value: "'" };
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1227
|
-
return { isToken: !1, value: tn(
|
|
1228
|
-
if (U[
|
|
1229
|
-
return { isToken: !0, value:
|
|
1230
|
-
if (
|
|
1225
|
+
const y = b[0];
|
|
1226
|
+
if (y === "'")
|
|
1227
|
+
return { isToken: !1, value: tn(b) };
|
|
1228
|
+
if (U[y])
|
|
1229
|
+
return { isToken: !0, value: b };
|
|
1230
|
+
if (y.match(en))
|
|
1231
1231
|
throw new RangeError(
|
|
1232
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1232
|
+
"Format string contains an unescaped latin alphabet character `" + y + "`"
|
|
1233
1233
|
);
|
|
1234
|
-
return { isToken: !1, value:
|
|
1234
|
+
return { isToken: !1, value: b };
|
|
1235
1235
|
});
|
|
1236
|
-
|
|
1236
|
+
a.localize.preprocessor && (f = a.localize.preprocessor(s, f));
|
|
1237
1237
|
const h = {
|
|
1238
1238
|
firstWeekContainsDate: i,
|
|
1239
1239
|
weekStartsOn: u,
|
|
1240
|
-
locale:
|
|
1240
|
+
locale: a
|
|
1241
1241
|
};
|
|
1242
|
-
return f.map((
|
|
1243
|
-
if (!
|
|
1244
|
-
const
|
|
1245
|
-
(!(n != null && n.useAdditionalWeekYearTokens) && Qt(
|
|
1246
|
-
const
|
|
1247
|
-
return
|
|
1242
|
+
return f.map((b) => {
|
|
1243
|
+
if (!b.isToken) return b.value;
|
|
1244
|
+
const y = b.value;
|
|
1245
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && Qt(y) || !(n != null && n.useAdditionalDayOfYearTokens) && Vt(y)) && Gt(y, e, String(t));
|
|
1246
|
+
const k = U[y[0]];
|
|
1247
|
+
return k(s, y, a.localize, h);
|
|
1248
1248
|
}).join("");
|
|
1249
1249
|
}
|
|
1250
1250
|
function tn(t) {
|
|
1251
1251
|
const e = t.match(Ut);
|
|
1252
1252
|
return e ? e[1].replace(Kt, "'") : t;
|
|
1253
1253
|
}
|
|
1254
|
-
function ae(t, e) {
|
|
1255
|
-
const n = m(t), a = m(e);
|
|
1256
|
-
return n.getTime() > a.getTime();
|
|
1257
|
-
}
|
|
1258
1254
|
function re(t, e) {
|
|
1259
|
-
const n = m(t),
|
|
1260
|
-
return
|
|
1255
|
+
const n = m(t), r = m(e);
|
|
1256
|
+
return n.getTime() > r.getTime();
|
|
1257
|
+
}
|
|
1258
|
+
function ae(t, e) {
|
|
1259
|
+
const n = m(t), r = m(e);
|
|
1260
|
+
return +n < +r;
|
|
1261
1261
|
}
|
|
1262
1262
|
function nn(t, e) {
|
|
1263
|
-
const n = m(t),
|
|
1264
|
-
return n.getFullYear() ===
|
|
1263
|
+
const n = m(t), r = m(e);
|
|
1264
|
+
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function rn(t, e) {
|
|
1267
1267
|
return ie(t, -e);
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const an = {
|
|
1270
1270
|
lessThanXSeconds: {
|
|
1271
1271
|
one: "moins d’une seconde",
|
|
1272
1272
|
other: "moins de {{count}} secondes"
|
|
@@ -1329,9 +1329,9 @@ const rn = {
|
|
|
1329
1329
|
other: "presque {{count}} ans"
|
|
1330
1330
|
}
|
|
1331
1331
|
}, sn = (t, e, n) => {
|
|
1332
|
-
let
|
|
1333
|
-
const
|
|
1334
|
-
return typeof
|
|
1332
|
+
let r;
|
|
1333
|
+
const a = an[t];
|
|
1334
|
+
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", String(e)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "dans " + r : "il y a " + r : r;
|
|
1335
1335
|
}, on = {
|
|
1336
1336
|
full: "EEEE d MMMM y",
|
|
1337
1337
|
long: "d MMMM y",
|
|
@@ -1367,7 +1367,7 @@ const rn = {
|
|
|
1367
1367
|
tomorrow: "'demain à' p'",
|
|
1368
1368
|
nextWeek: "eeee 'prochain à' p",
|
|
1369
1369
|
other: "P"
|
|
1370
|
-
}, mn = (t, e, n,
|
|
1370
|
+
}, mn = (t, e, n, r) => ln[t], hn = {
|
|
1371
1371
|
narrow: ["av. J.-C", "ap. J.-C"],
|
|
1372
1372
|
abbreviated: ["av. J.-C", "ap. J.-C"],
|
|
1373
1373
|
wide: ["avant Jésus-Christ", "après Jésus-Christ"]
|
|
@@ -1418,7 +1418,7 @@ const rn = {
|
|
|
1418
1418
|
"vendredi",
|
|
1419
1419
|
"samedi"
|
|
1420
1420
|
]
|
|
1421
|
-
},
|
|
1421
|
+
}, yn = {
|
|
1422
1422
|
narrow: {
|
|
1423
1423
|
am: "AM",
|
|
1424
1424
|
pm: "PM",
|
|
@@ -1449,45 +1449,45 @@ const rn = {
|
|
|
1449
1449
|
evening: "du soir",
|
|
1450
1450
|
night: "du matin"
|
|
1451
1451
|
}
|
|
1452
|
-
},
|
|
1453
|
-
const n = Number(t),
|
|
1452
|
+
}, bn = (t, e) => {
|
|
1453
|
+
const n = Number(t), r = e == null ? void 0 : e.unit;
|
|
1454
1454
|
if (n === 0) return "0";
|
|
1455
|
-
const
|
|
1455
|
+
const a = ["year", "week", "hour", "minute", "second"];
|
|
1456
1456
|
let i;
|
|
1457
|
-
return n === 1 ? i =
|
|
1457
|
+
return n === 1 ? i = r && a.includes(r) ? "ère" : "er" : i = "ème", n + i;
|
|
1458
1458
|
}, Mn = ["MMM", "MMMM"], vn = {
|
|
1459
1459
|
preprocessor: (t, e) => t.getDate() === 1 || !e.some(
|
|
1460
|
-
(
|
|
1460
|
+
(r) => r.isToken && Mn.includes(r.value)
|
|
1461
1461
|
) ? e : e.map(
|
|
1462
|
-
(
|
|
1462
|
+
(r) => r.isToken && r.value === "do" ? { isToken: !0, value: "d" } : r
|
|
1463
1463
|
),
|
|
1464
|
-
ordinalNumber:
|
|
1465
|
-
era:
|
|
1464
|
+
ordinalNumber: bn,
|
|
1465
|
+
era: P({
|
|
1466
1466
|
values: hn,
|
|
1467
1467
|
defaultWidth: "wide"
|
|
1468
1468
|
}),
|
|
1469
|
-
quarter:
|
|
1469
|
+
quarter: P({
|
|
1470
1470
|
values: fn,
|
|
1471
1471
|
defaultWidth: "wide",
|
|
1472
1472
|
argumentCallback: (t) => t - 1
|
|
1473
1473
|
}),
|
|
1474
|
-
month:
|
|
1474
|
+
month: P({
|
|
1475
1475
|
values: gn,
|
|
1476
1476
|
defaultWidth: "wide"
|
|
1477
1477
|
}),
|
|
1478
|
-
day:
|
|
1478
|
+
day: P({
|
|
1479
1479
|
values: wn,
|
|
1480
1480
|
defaultWidth: "wide"
|
|
1481
1481
|
}),
|
|
1482
|
-
dayPeriod:
|
|
1483
|
-
values:
|
|
1482
|
+
dayPeriod: P({
|
|
1483
|
+
values: yn,
|
|
1484
1484
|
defaultWidth: "wide"
|
|
1485
1485
|
})
|
|
1486
|
-
},
|
|
1486
|
+
}, kn = /^(\d+)(ième|ère|ème|er|e)?/i, Pn = /\d+/i, pn = {
|
|
1487
1487
|
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
1488
1488
|
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
1489
1489
|
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
|
|
1490
|
-
},
|
|
1490
|
+
}, Dn = {
|
|
1491
1491
|
any: [/^av/i, /^ap/i]
|
|
1492
1492
|
}, On = {
|
|
1493
1493
|
narrow: /^T?[1234]/i,
|
|
@@ -1552,36 +1552,36 @@ const rn = {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}, Nn = {
|
|
1554
1554
|
ordinalNumber: ce({
|
|
1555
|
-
matchPattern:
|
|
1556
|
-
parsePattern:
|
|
1555
|
+
matchPattern: kn,
|
|
1556
|
+
parsePattern: Pn,
|
|
1557
1557
|
valueCallback: (t) => parseInt(t)
|
|
1558
1558
|
}),
|
|
1559
|
-
era:
|
|
1560
|
-
matchPatterns:
|
|
1559
|
+
era: p({
|
|
1560
|
+
matchPatterns: pn,
|
|
1561
1561
|
defaultMatchWidth: "wide",
|
|
1562
|
-
parsePatterns:
|
|
1562
|
+
parsePatterns: Dn,
|
|
1563
1563
|
defaultParseWidth: "any"
|
|
1564
1564
|
}),
|
|
1565
|
-
quarter:
|
|
1565
|
+
quarter: p({
|
|
1566
1566
|
matchPatterns: On,
|
|
1567
1567
|
defaultMatchWidth: "wide",
|
|
1568
1568
|
parsePatterns: Wn,
|
|
1569
1569
|
defaultParseWidth: "any",
|
|
1570
1570
|
valueCallback: (t) => t + 1
|
|
1571
1571
|
}),
|
|
1572
|
-
month:
|
|
1572
|
+
month: p({
|
|
1573
1573
|
matchPatterns: xn,
|
|
1574
1574
|
defaultMatchWidth: "wide",
|
|
1575
1575
|
parsePatterns: Tn,
|
|
1576
1576
|
defaultParseWidth: "any"
|
|
1577
1577
|
}),
|
|
1578
|
-
day:
|
|
1578
|
+
day: p({
|
|
1579
1579
|
matchPatterns: _n,
|
|
1580
1580
|
defaultMatchWidth: "wide",
|
|
1581
1581
|
parsePatterns: Yn,
|
|
1582
1582
|
defaultParseWidth: "any"
|
|
1583
1583
|
}),
|
|
1584
|
-
dayPeriod:
|
|
1584
|
+
dayPeriod: p({
|
|
1585
1585
|
matchPatterns: Cn,
|
|
1586
1586
|
defaultMatchWidth: "any",
|
|
1587
1587
|
parsePatterns: Sn,
|
|
@@ -1598,13 +1598,13 @@ const rn = {
|
|
|
1598
1598
|
weekStartsOn: 1,
|
|
1599
1599
|
firstWeekContainsDate: 4
|
|
1600
1600
|
}
|
|
1601
|
-
},
|
|
1602
|
-
const [i, u] = O(() => t && e && "start" in e ? e.start : /* @__PURE__ */ new Date()), [s, f] = O(e || null), [h, w] = O(!1), [v, x] = O(null), [T,
|
|
1601
|
+
}, $n = ({ selectRange: t = !1, selectedDate: e, onDateSelect: n, maxDateSelected: r, minDateSelected: a }) => {
|
|
1602
|
+
const [i, u] = O(() => t && e && "start" in e ? e.start : /* @__PURE__ */ new Date()), [s, f] = O(e || null), [h, w] = O(!1), [v, x] = O(null), [T, E] = O([]), [F, j] = O(!1), [L, b] = O((/* @__PURE__ */ new Date()).getFullYear()), y = 1900, k = I(null), J = I(null), le = /* @__PURE__ */ new Date(), V = nt(i), me = tt(i), he = N(V, { weekStartsOn: 1 }), fe = at(me, { weekStartsOn: 1 }), [X, ge] = O(null);
|
|
1603
1603
|
B(() => {
|
|
1604
1604
|
e && (t && JSON.stringify(e) !== JSON.stringify(s) || !t && e instanceof Date && !_(e, s)) && (f(e ?? null), t && "start" in e ? u(e.start) : !t && e instanceof Date && u(e));
|
|
1605
1605
|
}, [e, t]);
|
|
1606
1606
|
const Q = (o) => {
|
|
1607
|
-
u((c) => o > 0 ? ie(c, 1) :
|
|
1607
|
+
u((c) => o > 0 ? ie(c, 1) : rn(c, 1));
|
|
1608
1608
|
}, we = (o) => {
|
|
1609
1609
|
let c;
|
|
1610
1610
|
if (t)
|
|
@@ -1619,31 +1619,31 @@ const rn = {
|
|
|
1619
1619
|
else
|
|
1620
1620
|
c = o;
|
|
1621
1621
|
f(c), ge(o), n(c);
|
|
1622
|
-
},
|
|
1622
|
+
}, ye = () => w((o) => !o);
|
|
1623
1623
|
B(() => {
|
|
1624
1624
|
G();
|
|
1625
1625
|
}, []);
|
|
1626
1626
|
const G = () => {
|
|
1627
|
-
|
|
1627
|
+
F || (j(!0), setTimeout(() => {
|
|
1628
1628
|
const o = [];
|
|
1629
|
-
let c =
|
|
1630
|
-
for (let l = 0; l < 10 && !(c <
|
|
1629
|
+
let c = L;
|
|
1630
|
+
for (let l = 0; l < 10 && !(c < y); l++)
|
|
1631
1631
|
o.push(c), c -= 1;
|
|
1632
|
-
o.length > 0 && (
|
|
1632
|
+
o.length > 0 && (E((l) => [...l, ...o]), b(c)), j(!1);
|
|
1633
1633
|
}, 500));
|
|
1634
1634
|
};
|
|
1635
1635
|
B(() => {
|
|
1636
|
-
if (h && v &&
|
|
1637
|
-
const o =
|
|
1638
|
-
o &&
|
|
1636
|
+
if (h && v && k.current) {
|
|
1637
|
+
const o = k.current.querySelector(`[data-year="${v}"]`);
|
|
1638
|
+
o && k.current && (k.current.scrollTop = o.offsetTop - k.current.offsetTop);
|
|
1639
1639
|
}
|
|
1640
1640
|
}, [h, v]);
|
|
1641
|
-
const
|
|
1641
|
+
const be = () => ["Lu", "Ma", "Me", "Je", "Ve", "Sa", "Di"].map((c, l) => /* @__PURE__ */ g("div", { className: M.calendarWeekdays, children: c }, l)), Me = () => {
|
|
1642
1642
|
let o = [], c = he;
|
|
1643
1643
|
for (; c <= fe; )
|
|
1644
1644
|
o.push(c), c = Ge(c, 1);
|
|
1645
|
-
return o.map((l,
|
|
1646
|
-
const R = s && typeof s == "object" && "start" in s && "end" in s,
|
|
1645
|
+
return o.map((l, pe) => {
|
|
1646
|
+
const R = s && typeof s == "object" && "start" in s && "end" in s, De = R && _(l, s.start), Oe = R && _(l, s.end), We = R && re(l, s.start) && ae(l, s.end), xe = a && (ae(l, a) || _(l, a)), Te = r && (re(l, r) || _(l, r)), _e = a && xe || r && Te, Ye = !nn(l, V), Ce = _e || Ye;
|
|
1647
1647
|
return /* @__PURE__ */ g(
|
|
1648
1648
|
"div",
|
|
1649
1649
|
{
|
|
@@ -1651,51 +1651,51 @@ const rn = {
|
|
|
1651
1651
|
${M.calendarDay}
|
|
1652
1652
|
${_(l, le) ? M.today : ""}
|
|
1653
1653
|
${s && _(l, s) ? M.selected : ""}
|
|
1654
|
-
${
|
|
1654
|
+
${De || Oe ? M.selected : ""} // Applique 'selected' si start ou end
|
|
1655
1655
|
${We ? M.inRange : ""} // Applique 'inRange' si la date est entre start et end
|
|
1656
1656
|
${Ce ? M.disabled : ""}
|
|
1657
1657
|
`,
|
|
1658
1658
|
onClick: () => we(l),
|
|
1659
1659
|
children: ne(l, "d")
|
|
1660
1660
|
},
|
|
1661
|
-
|
|
1661
|
+
pe
|
|
1662
1662
|
);
|
|
1663
1663
|
});
|
|
1664
1664
|
}, ve = (o) => {
|
|
1665
1665
|
const c = o.currentTarget;
|
|
1666
1666
|
c.scrollHeight === c.scrollTop + c.clientHeight && G();
|
|
1667
|
-
},
|
|
1667
|
+
}, ke = () => {
|
|
1668
1668
|
const o = (c) => {
|
|
1669
|
-
|
|
1669
|
+
k.current && !k.current.contains(c.target) && J.current && !J.current.contains(c.target) && w(!1);
|
|
1670
1670
|
};
|
|
1671
1671
|
return document.addEventListener("click", o), () => {
|
|
1672
1672
|
document.removeEventListener("click", o);
|
|
1673
1673
|
};
|
|
1674
|
-
},
|
|
1674
|
+
}, Pe = (o) => {
|
|
1675
1675
|
const c = ne(o, "MMM yyyy", { locale: jn });
|
|
1676
1676
|
return c.charAt(0).toUpperCase() + c.slice(1);
|
|
1677
1677
|
};
|
|
1678
|
-
return /* @__PURE__ */
|
|
1679
|
-
/* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */ g(z, { size: "s", mode: "ghost", onClick: () => Q(-1), children: /* @__PURE__ */
|
|
1678
|
+
return /* @__PURE__ */ q("div", { className: M.calendar, onClick: ke, children: [
|
|
1679
|
+
/* @__PURE__ */ q("div", { className: `${M.calendarHeader}`, children: [
|
|
1680
|
+
/* @__PURE__ */ g(z, { size: "s", mode: "ghost", onClick: () => Q(-1), children: /* @__PURE__ */ q("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", fill: "#000000", viewBox: "0 0 256 256", children: [
|
|
1681
1681
|
/* @__PURE__ */ g("path", { d: "M160,48V208L80,128Z", opacity: "0.2" }),
|
|
1682
1682
|
/* @__PURE__ */ g("path", { d: "M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z" })
|
|
1683
1683
|
] }) }),
|
|
1684
|
-
/* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ q("div", { ref: J, className: M.dropDownCtn, children: [
|
|
1685
1685
|
/* @__PURE__ */ g(
|
|
1686
1686
|
Se,
|
|
1687
1687
|
{
|
|
1688
1688
|
size: "s",
|
|
1689
1689
|
mode: "tertiary",
|
|
1690
|
-
label:
|
|
1691
|
-
onClick:
|
|
1690
|
+
label: Pe(i),
|
|
1691
|
+
onClick: ye,
|
|
1692
1692
|
childrenRight: h ? /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ g("path", { d: "M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z" }) }) : /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ g("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }) })
|
|
1693
1693
|
}
|
|
1694
1694
|
),
|
|
1695
1695
|
h && /* @__PURE__ */ g("div", { className: M.dropdown, children: /* @__PURE__ */ g(
|
|
1696
1696
|
"div",
|
|
1697
1697
|
{
|
|
1698
|
-
ref:
|
|
1698
|
+
ref: k,
|
|
1699
1699
|
className: M.yearList,
|
|
1700
1700
|
onScroll: (o) => ve(o),
|
|
1701
1701
|
children: T.map((o) => /* @__PURE__ */ g(
|
|
@@ -1713,15 +1713,15 @@ const rn = {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
) })
|
|
1715
1715
|
] }),
|
|
1716
|
-
/* @__PURE__ */ g(z, { size: "s", mode: "ghost", onClick: () => Q(1), children: /* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ g(z, { size: "s", mode: "ghost", onClick: () => Q(1), children: /* @__PURE__ */ q("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", fill: "#000000", viewBox: "0 0 256 256", children: [
|
|
1717
1717
|
/* @__PURE__ */ g("path", { d: "M176,128,96,208V48Z", opacity: "0.2" }),
|
|
1718
1718
|
/* @__PURE__ */ g("path", { d: "M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z" })
|
|
1719
1719
|
] }) })
|
|
1720
1720
|
] }),
|
|
1721
|
-
/* @__PURE__ */ g("div", { className: `${M.calendarWeekdays} labelSmall`, children:
|
|
1721
|
+
/* @__PURE__ */ g("div", { className: `${M.calendarWeekdays} labelSmall`, children: be() }),
|
|
1722
1722
|
/* @__PURE__ */ g("div", { className: `${M.calendarGrid} textSmall`, children: Me() })
|
|
1723
1723
|
] });
|
|
1724
1724
|
};
|
|
1725
1725
|
export {
|
|
1726
|
-
|
|
1726
|
+
$n as Calendar
|
|
1727
1727
|
};
|