@purpurds/date-field 8.19.0 → 8.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +1 -1
- package/dist/date-field.cjs.js +1 -1
- package/dist/date-field.cjs.js.map +1 -1
- package/dist/date-field.es.js +1004 -1060
- package/dist/date-field.es.js.map +1 -1
- package/package.json +8 -8
package/dist/date-field.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as C, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import * as T from "react";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as le, useId as Ot, useRef as Je, useState as we, useEffect as Mt, useLayoutEffect as Dt } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const
|
|
5
|
+
const Tt = {
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function kt(r) {
|
|
9
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return
|
|
11
|
+
var ye = { exports: {} }, ge;
|
|
12
|
+
function Nt() {
|
|
13
|
+
return ge || (ge = 1, (function(r) {
|
|
14
14
|
(function() {
|
|
15
15
|
var e = {}.hasOwnProperty;
|
|
16
16
|
function t() {
|
|
17
17
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
18
18
|
var s = arguments[o];
|
|
19
|
-
s && (a = i(a,
|
|
19
|
+
s && (a = i(a, n.call(this, s)));
|
|
20
20
|
}
|
|
21
21
|
return a;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function n(a) {
|
|
24
24
|
if (typeof a == "string" || typeof a == "number")
|
|
25
25
|
return this && this[a] || a;
|
|
26
26
|
if (typeof a != "object")
|
|
@@ -37,60 +37,60 @@ function Tt() {
|
|
|
37
37
|
function i(a, o) {
|
|
38
38
|
return o ? a ? a + " " + o : a + o : a;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
42
|
+
})(ye)), ye.exports;
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
const
|
|
44
|
+
var qt = Nt();
|
|
45
|
+
const Yt = /* @__PURE__ */ kt(qt), Et = "_rotate_12t9p_1", $t = "_dash_12t9p_1", Wt = {
|
|
46
46
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
47
|
-
rotate:
|
|
47
|
+
rotate: Et,
|
|
48
48
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
49
49
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
50
50
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
51
51
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
52
52
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
53
53
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
54
|
-
dash:
|
|
54
|
+
dash: $t,
|
|
55
55
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
56
56
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
57
|
-
},
|
|
57
|
+
}, be = Yt.bind(Wt), X = "purpur-spinner", jt = {
|
|
58
58
|
SM: "sm"
|
|
59
|
-
},
|
|
60
|
-
disabled:
|
|
59
|
+
}, Ke = ({
|
|
60
|
+
disabled: r = !1,
|
|
61
61
|
negative: e = !1,
|
|
62
|
-
size: t =
|
|
63
|
-
className:
|
|
62
|
+
size: t = jt.SM,
|
|
63
|
+
className: n,
|
|
64
64
|
...i
|
|
65
|
-
}) => /* @__PURE__ */ d("div", { className:
|
|
65
|
+
}) => /* @__PURE__ */ d("div", { className: be(X, `${X}--${t}`, n), ...i, children: /* @__PURE__ */ d("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ d(
|
|
66
66
|
"circle",
|
|
67
67
|
{
|
|
68
|
-
className:
|
|
69
|
-
[`${
|
|
70
|
-
[`${
|
|
68
|
+
className: be(`${X}__circle`, {
|
|
69
|
+
[`${X}__circle--disabled`]: r,
|
|
70
|
+
[`${X}__circle--negative`]: e
|
|
71
71
|
}),
|
|
72
72
|
cx: "25",
|
|
73
73
|
cy: "25",
|
|
74
74
|
r: "20"
|
|
75
75
|
}
|
|
76
76
|
) }) });
|
|
77
|
-
|
|
78
|
-
function
|
|
79
|
-
return
|
|
77
|
+
Ke.displayName = "Spinner";
|
|
78
|
+
function Ct(r) {
|
|
79
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
80
80
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
-
return
|
|
81
|
+
var xe = { exports: {} }, ve;
|
|
82
|
+
function Ht() {
|
|
83
|
+
return ve || (ve = 1, (function(r) {
|
|
84
84
|
(function() {
|
|
85
85
|
var e = {}.hasOwnProperty;
|
|
86
86
|
function t() {
|
|
87
87
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
88
88
|
var s = arguments[o];
|
|
89
|
-
s && (a = i(a,
|
|
89
|
+
s && (a = i(a, n.call(this, s)));
|
|
90
90
|
}
|
|
91
91
|
return a;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function n(a) {
|
|
94
94
|
if (typeof a == "string" || typeof a == "number")
|
|
95
95
|
return this && this[a] || a;
|
|
96
96
|
if (typeof a != "object")
|
|
@@ -107,12 +107,12 @@ function Ct() {
|
|
|
107
107
|
function i(a, o) {
|
|
108
108
|
return o ? a ? a + " " + o : a + o : a;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
111
111
|
})();
|
|
112
|
-
})(
|
|
112
|
+
})(xe)), xe.exports;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
const
|
|
114
|
+
var Lt = Ht();
|
|
115
|
+
const It = /* @__PURE__ */ Ct(Lt), Ft = {
|
|
116
116
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
117
117
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
118
118
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -135,12 +135,12 @@ const Ht = /* @__PURE__ */ $t(jt), Lt = {
|
|
|
135
135
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
136
136
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
137
137
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
138
|
-
},
|
|
138
|
+
}, Pe = It.bind(Ft), W = "purpur-button", Ue = le(
|
|
139
139
|
({
|
|
140
|
-
children:
|
|
140
|
+
children: r,
|
|
141
141
|
className: e,
|
|
142
142
|
disabled: t = !1,
|
|
143
|
-
fullWidth:
|
|
143
|
+
fullWidth: n = !1,
|
|
144
144
|
iconOnly: i,
|
|
145
145
|
loading: a = !1,
|
|
146
146
|
negative: o = !1,
|
|
@@ -152,23 +152,23 @@ const Ht = /* @__PURE__ */ $t(jt), Lt = {
|
|
|
152
152
|
}, N) => {
|
|
153
153
|
if (i && c === "destructive")
|
|
154
154
|
return null;
|
|
155
|
-
const L =
|
|
155
|
+
const L = Pe(
|
|
156
156
|
[
|
|
157
|
-
|
|
158
|
-
`${
|
|
159
|
-
`${
|
|
157
|
+
W,
|
|
158
|
+
`${W}--${o ? `${c}-negative` : c}`,
|
|
159
|
+
`${W}--${h}`
|
|
160
160
|
],
|
|
161
161
|
{
|
|
162
|
-
[`${
|
|
163
|
-
[`${
|
|
164
|
-
[`${
|
|
165
|
-
[`${
|
|
162
|
+
[`${W}--icon-only`]: i,
|
|
163
|
+
[`${W}--negative`]: o,
|
|
164
|
+
[`${W}--full-width`]: n,
|
|
165
|
+
[`${W}--disabled`]: t || a
|
|
166
166
|
},
|
|
167
167
|
e
|
|
168
168
|
), P = (u) => {
|
|
169
169
|
t || a ? u.preventDefault() : s && s(u);
|
|
170
170
|
}, w = !!p["aria-disabled"] || t || a;
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ C(
|
|
172
172
|
"button",
|
|
173
173
|
{
|
|
174
174
|
className: L,
|
|
@@ -179,38 +179,38 @@ const Ht = /* @__PURE__ */ $t(jt), Lt = {
|
|
|
179
179
|
...p,
|
|
180
180
|
children: [
|
|
181
181
|
a && /* @__PURE__ */ d(
|
|
182
|
-
|
|
182
|
+
Ke,
|
|
183
183
|
{
|
|
184
|
-
size: h ===
|
|
184
|
+
size: h === Tt.LG ? "xs" : "xxs",
|
|
185
185
|
negative: o,
|
|
186
186
|
disabled: w,
|
|
187
|
-
className:
|
|
187
|
+
className: Pe(`${W}__spinner`)
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
190
|
" ",
|
|
191
|
-
|
|
191
|
+
r
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
);
|
|
195
195
|
}
|
|
196
196
|
);
|
|
197
|
-
|
|
198
|
-
function
|
|
199
|
-
return
|
|
197
|
+
Ue.displayName = "Button";
|
|
198
|
+
function Rt(r) {
|
|
199
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
200
200
|
}
|
|
201
|
-
var
|
|
202
|
-
function
|
|
203
|
-
return
|
|
201
|
+
var Oe = { exports: {} }, Me;
|
|
202
|
+
function At() {
|
|
203
|
+
return Me || (Me = 1, (function(r) {
|
|
204
204
|
(function() {
|
|
205
205
|
var e = {}.hasOwnProperty;
|
|
206
206
|
function t() {
|
|
207
207
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
208
208
|
var s = arguments[o];
|
|
209
|
-
s && (a = i(a,
|
|
209
|
+
s && (a = i(a, n.call(this, s)));
|
|
210
210
|
}
|
|
211
211
|
return a;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function n(a) {
|
|
214
214
|
if (typeof a == "string" || typeof a == "number")
|
|
215
215
|
return this && this[a] || a;
|
|
216
216
|
if (typeof a != "object")
|
|
@@ -227,12 +227,12 @@ function Ft() {
|
|
|
227
227
|
function i(a, o) {
|
|
228
228
|
return o ? a ? a + " " + o : a + o : a;
|
|
229
229
|
}
|
|
230
|
-
|
|
230
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
231
231
|
})();
|
|
232
|
-
})(
|
|
232
|
+
})(Oe)), Oe.exports;
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
const
|
|
234
|
+
var Qt = At();
|
|
235
|
+
const Bt = /* @__PURE__ */ Rt(Qt), St = {
|
|
236
236
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
237
237
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
238
238
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -240,44 +240,44 @@ const At = /* @__PURE__ */ It(Rt), Qt = {
|
|
|
240
240
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
241
241
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
242
242
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
243
|
-
},
|
|
243
|
+
}, Xt = Bt.bind(St), De = "purpur-icon", Gt = "md", Vt = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}="${e.value}"`).join(" "), zt = ({ content: r = "", title: e } = {}) => {
|
|
244
244
|
const t = [
|
|
245
245
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
246
246
|
{ name: "fill", value: "currentColor" },
|
|
247
247
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
248
248
|
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
249
|
-
],
|
|
250
|
-
return `<svg ${
|
|
251
|
-
},
|
|
252
|
-
const a =
|
|
253
|
-
content:
|
|
249
|
+
], n = e ? `<title>${e}</title>` : "";
|
|
250
|
+
return `<svg ${Vt(t)}>${n}${r}</svg>`;
|
|
251
|
+
}, Zt = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), et = ({ svg: r, allyTitle: e, className: t, size: n = Gt, ...i }) => {
|
|
252
|
+
const a = zt({
|
|
253
|
+
content: Zt(r.svg),
|
|
254
254
|
title: e
|
|
255
|
-
}), o =
|
|
255
|
+
}), o = Xt(De, `${De}--${n}`, t);
|
|
256
256
|
return /* @__PURE__ */ d("span", { className: o, dangerouslySetInnerHTML: { __html: a }, ...i });
|
|
257
257
|
};
|
|
258
|
-
|
|
259
|
-
const
|
|
258
|
+
et.displayName = "Icon";
|
|
259
|
+
const Jt = {
|
|
260
260
|
name: "error-filled",
|
|
261
261
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
262
262
|
keywords: ["error-filled"],
|
|
263
263
|
category: "status"
|
|
264
264
|
};
|
|
265
|
-
function
|
|
266
|
-
return
|
|
265
|
+
function Kt(r) {
|
|
266
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
267
267
|
}
|
|
268
|
-
var
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
var Te = { exports: {} }, ke;
|
|
269
|
+
function Ut() {
|
|
270
|
+
return ke || (ke = 1, (function(r) {
|
|
271
271
|
(function() {
|
|
272
272
|
var e = {}.hasOwnProperty;
|
|
273
273
|
function t() {
|
|
274
274
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
275
275
|
var s = arguments[o];
|
|
276
|
-
s && (a = i(a,
|
|
276
|
+
s && (a = i(a, n.call(this, s)));
|
|
277
277
|
}
|
|
278
278
|
return a;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function n(a) {
|
|
281
281
|
if (typeof a == "string" || typeof a == "number")
|
|
282
282
|
return this && this[a] || a;
|
|
283
283
|
if (typeof a != "object")
|
|
@@ -294,52 +294,52 @@ function Jt() {
|
|
|
294
294
|
function i(a, o) {
|
|
295
295
|
return o ? a ? a + " " + o : a + o : a;
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
298
298
|
})();
|
|
299
|
-
})(
|
|
299
|
+
})(Te)), Te.exports;
|
|
300
300
|
}
|
|
301
|
-
var
|
|
302
|
-
const
|
|
301
|
+
var er = Ut();
|
|
302
|
+
const tr = /* @__PURE__ */ Kt(er), rr = {
|
|
303
303
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
304
304
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
305
305
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
306
|
-
},
|
|
307
|
-
children:
|
|
306
|
+
}, Ne = tr.bind(rr), ee = "purpur-field-error-text", nr = ({
|
|
307
|
+
children: r,
|
|
308
308
|
className: e,
|
|
309
309
|
negative: t = !1,
|
|
310
|
-
["aria-relevant"]:
|
|
310
|
+
["aria-relevant"]: n = "additions text",
|
|
311
311
|
...i
|
|
312
|
-
}) => /* @__PURE__ */
|
|
312
|
+
}) => /* @__PURE__ */ C(
|
|
313
313
|
"div",
|
|
314
314
|
{
|
|
315
|
-
className:
|
|
316
|
-
[`${
|
|
315
|
+
className: Ne(e, ee, {
|
|
316
|
+
[`${ee}--negative`]: t
|
|
317
317
|
}),
|
|
318
318
|
"aria-live": "assertive",
|
|
319
|
-
"aria-relevant":
|
|
319
|
+
"aria-relevant": n,
|
|
320
320
|
...i,
|
|
321
321
|
children: [
|
|
322
|
-
/* @__PURE__ */ d(
|
|
323
|
-
|
|
322
|
+
/* @__PURE__ */ d(et, { svg: Jt, size: "xs", className: Ne(`${ee}__icon`) }),
|
|
323
|
+
r
|
|
324
324
|
]
|
|
325
325
|
}
|
|
326
326
|
);
|
|
327
|
-
function
|
|
328
|
-
return
|
|
327
|
+
function ar(r) {
|
|
328
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
329
329
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
return
|
|
330
|
+
var qe = { exports: {} }, Ye;
|
|
331
|
+
function ir() {
|
|
332
|
+
return Ye || (Ye = 1, (function(r) {
|
|
333
333
|
(function() {
|
|
334
334
|
var e = {}.hasOwnProperty;
|
|
335
335
|
function t() {
|
|
336
336
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
337
337
|
var s = arguments[o];
|
|
338
|
-
s && (a = i(a,
|
|
338
|
+
s && (a = i(a, n.call(this, s)));
|
|
339
339
|
}
|
|
340
340
|
return a;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function n(a) {
|
|
343
343
|
if (typeof a == "string" || typeof a == "number")
|
|
344
344
|
return this && this[a] || a;
|
|
345
345
|
if (typeof a != "object")
|
|
@@ -356,45 +356,45 @@ function nr() {
|
|
|
356
356
|
function i(a, o) {
|
|
357
357
|
return o ? a ? a + " " + o : a + o : a;
|
|
358
358
|
}
|
|
359
|
-
|
|
359
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
360
360
|
})();
|
|
361
|
-
})(
|
|
361
|
+
})(qe)), qe.exports;
|
|
362
362
|
}
|
|
363
|
-
var
|
|
364
|
-
const
|
|
363
|
+
var or = ir();
|
|
364
|
+
const sr = /* @__PURE__ */ ar(or), ur = {
|
|
365
365
|
"purpur-field-helper-text": "_purpur-field-helper-text_1ociq_1",
|
|
366
366
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_1ociq_9",
|
|
367
367
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_1ociq_12"
|
|
368
|
-
},
|
|
369
|
-
children:
|
|
368
|
+
}, cr = sr.bind(ur), te = "purpur-field-helper-text", lr = ({
|
|
369
|
+
children: r,
|
|
370
370
|
className: e,
|
|
371
371
|
disabled: t,
|
|
372
|
-
id:
|
|
372
|
+
id: n,
|
|
373
373
|
negative: i,
|
|
374
374
|
...a
|
|
375
375
|
}) => {
|
|
376
|
-
const o =
|
|
377
|
-
[`${
|
|
378
|
-
[`${
|
|
376
|
+
const o = cr(e, te, {
|
|
377
|
+
[`${te}--disabled`]: t,
|
|
378
|
+
[`${te}--negative`]: i
|
|
379
379
|
});
|
|
380
|
-
return /* @__PURE__ */ d("span", { id:
|
|
380
|
+
return /* @__PURE__ */ d("span", { id: n, className: o, ...a, children: r });
|
|
381
381
|
};
|
|
382
|
-
function
|
|
383
|
-
return
|
|
382
|
+
function dr(r) {
|
|
383
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
387
|
-
return
|
|
385
|
+
var Ee = { exports: {} }, $e;
|
|
386
|
+
function pr() {
|
|
387
|
+
return $e || ($e = 1, (function(r) {
|
|
388
388
|
(function() {
|
|
389
389
|
var e = {}.hasOwnProperty;
|
|
390
390
|
function t() {
|
|
391
391
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
392
392
|
var s = arguments[o];
|
|
393
|
-
s && (a = i(a,
|
|
393
|
+
s && (a = i(a, n.call(this, s)));
|
|
394
394
|
}
|
|
395
395
|
return a;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function n(a) {
|
|
398
398
|
if (typeof a == "string" || typeof a == "number")
|
|
399
399
|
return this && this[a] || a;
|
|
400
400
|
if (typeof a != "object")
|
|
@@ -411,12 +411,12 @@ function lr() {
|
|
|
411
411
|
function i(a, o) {
|
|
412
412
|
return o ? a ? a + " " + o : a + o : a;
|
|
413
413
|
}
|
|
414
|
-
|
|
414
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
415
415
|
})();
|
|
416
|
-
})(
|
|
416
|
+
})(Ee)), Ee.exports;
|
|
417
417
|
}
|
|
418
|
-
var
|
|
419
|
-
const
|
|
418
|
+
var fr = pr();
|
|
419
|
+
const hr = /* @__PURE__ */ dr(fr), mr = {
|
|
420
420
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
421
421
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
422
422
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -424,101 +424,110 @@ const pr = /* @__PURE__ */ cr(dr), fr = {
|
|
|
424
424
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
425
425
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
426
426
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
427
|
-
},
|
|
427
|
+
}, _r = hr.bind(mr), We = "purpur-icon", wr = "md", yr = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}="${e.value}"`).join(" "), gr = ({ content: r = "", title: e } = {}) => {
|
|
428
428
|
const t = [
|
|
429
429
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
430
430
|
{ name: "fill", value: "currentColor" },
|
|
431
431
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
432
432
|
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
433
|
-
],
|
|
434
|
-
return `<svg ${
|
|
435
|
-
},
|
|
436
|
-
const a =
|
|
437
|
-
content:
|
|
433
|
+
], n = e ? `<title>${e}</title>` : "";
|
|
434
|
+
return `<svg ${yr(t)}>${n}${r}</svg>`;
|
|
435
|
+
}, br = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), de = ({ svg: r, allyTitle: e, className: t, size: n = wr, ...i }) => {
|
|
436
|
+
const a = gr({
|
|
437
|
+
content: br(r.svg),
|
|
438
438
|
title: e
|
|
439
|
-
}), o =
|
|
439
|
+
}), o = _r(We, `${We}--${n}`, t);
|
|
440
440
|
return /* @__PURE__ */ d("span", { className: o, dangerouslySetInnerHTML: { __html: a }, ...i });
|
|
441
441
|
};
|
|
442
|
-
|
|
443
|
-
const
|
|
442
|
+
de.displayName = "Icon";
|
|
443
|
+
const xr = {
|
|
444
444
|
name: "check-circle-filled",
|
|
445
445
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',
|
|
446
446
|
keywords: ["check-circle-filled"],
|
|
447
447
|
category: "status"
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
const
|
|
448
|
+
}, tt = (r) => /* @__PURE__ */ d(de, { ...r, svg: xr });
|
|
449
|
+
tt.displayName = "IconCheckCircleFilled";
|
|
450
|
+
const vr = {
|
|
451
451
|
name: "close",
|
|
452
452
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
453
453
|
keywords: ["close"],
|
|
454
454
|
category: "utility"
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
function
|
|
458
|
-
if (typeof
|
|
459
|
-
return
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
function
|
|
455
|
+
}, rt = (r) => /* @__PURE__ */ d(de, { ...r, svg: vr });
|
|
456
|
+
rt.displayName = "IconClose";
|
|
457
|
+
function je(r, e) {
|
|
458
|
+
if (typeof r == "function")
|
|
459
|
+
return r(e);
|
|
460
|
+
r != null && (r.current = e);
|
|
461
|
+
}
|
|
462
|
+
function Pr(...r) {
|
|
463
463
|
return (e) => {
|
|
464
464
|
let t = !1;
|
|
465
|
-
const
|
|
466
|
-
const a =
|
|
465
|
+
const n = r.map((i) => {
|
|
466
|
+
const a = je(i, e);
|
|
467
467
|
return !t && typeof a == "function" && (t = !0), a;
|
|
468
468
|
});
|
|
469
469
|
if (t)
|
|
470
470
|
return () => {
|
|
471
|
-
for (let i = 0; i <
|
|
472
|
-
const a =
|
|
473
|
-
typeof a == "function" ? a() :
|
|
471
|
+
for (let i = 0; i < n.length; i++) {
|
|
472
|
+
const a = n[i];
|
|
473
|
+
typeof a == "function" ? a() : je(r[i], null);
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
+
var Or = /* @__PURE__ */ Symbol.for("react.lazy"), Z = T[" use ".trim().toString()];
|
|
479
|
+
function Mr(r) {
|
|
480
|
+
return typeof r == "object" && r !== null && "then" in r;
|
|
481
|
+
}
|
|
482
|
+
function nt(r) {
|
|
483
|
+
return r != null && typeof r == "object" && "$$typeof" in r && r.$$typeof === Or && "_payload" in r && Mr(r._payload);
|
|
484
|
+
}
|
|
478
485
|
// @__NO_SIDE_EFFECTS__
|
|
479
|
-
function
|
|
480
|
-
const e = /* @__PURE__ */
|
|
481
|
-
|
|
486
|
+
function Dr(r) {
|
|
487
|
+
const e = /* @__PURE__ */ Tr(r), t = T.forwardRef((n, i) => {
|
|
488
|
+
let { children: a, ...o } = n;
|
|
489
|
+
nt(a) && typeof Z == "function" && (a = Z(a._payload));
|
|
490
|
+
const s = T.Children.toArray(a), h = s.find(Nr);
|
|
482
491
|
if (h) {
|
|
483
492
|
const c = h.props.children, m = s.map((p) => p === h ? T.Children.count(c) > 1 ? T.Children.only(null) : T.isValidElement(c) ? c.props.children : null : p);
|
|
484
493
|
return /* @__PURE__ */ d(e, { ...o, ref: i, children: T.isValidElement(c) ? T.cloneElement(c, void 0, m) : null });
|
|
485
494
|
}
|
|
486
495
|
return /* @__PURE__ */ d(e, { ...o, ref: i, children: a });
|
|
487
496
|
});
|
|
488
|
-
return t.displayName = `${
|
|
497
|
+
return t.displayName = `${r}.Slot`, t;
|
|
489
498
|
}
|
|
490
499
|
// @__NO_SIDE_EFFECTS__
|
|
491
|
-
function
|
|
492
|
-
const e = T.forwardRef((t,
|
|
493
|
-
|
|
494
|
-
if (T.isValidElement(i)) {
|
|
495
|
-
const o =
|
|
496
|
-
return i.type !== T.Fragment && (s.ref =
|
|
500
|
+
function Tr(r) {
|
|
501
|
+
const e = T.forwardRef((t, n) => {
|
|
502
|
+
let { children: i, ...a } = t;
|
|
503
|
+
if (nt(i) && typeof Z == "function" && (i = Z(i._payload)), T.isValidElement(i)) {
|
|
504
|
+
const o = Yr(i), s = qr(a, i.props);
|
|
505
|
+
return i.type !== T.Fragment && (s.ref = n ? Pr(n, o) : o), T.cloneElement(i, s);
|
|
497
506
|
}
|
|
498
507
|
return T.Children.count(i) > 1 ? T.Children.only(null) : null;
|
|
499
508
|
});
|
|
500
|
-
return e.displayName = `${
|
|
509
|
+
return e.displayName = `${r}.SlotClone`, e;
|
|
501
510
|
}
|
|
502
|
-
var
|
|
503
|
-
function
|
|
504
|
-
return T.isValidElement(
|
|
511
|
+
var kr = /* @__PURE__ */ Symbol("radix.slottable");
|
|
512
|
+
function Nr(r) {
|
|
513
|
+
return T.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === kr;
|
|
505
514
|
}
|
|
506
|
-
function
|
|
515
|
+
function qr(r, e) {
|
|
507
516
|
const t = { ...e };
|
|
508
|
-
for (const
|
|
509
|
-
const i = n
|
|
510
|
-
/^on[A-Z]/.test(
|
|
517
|
+
for (const n in e) {
|
|
518
|
+
const i = r[n], a = e[n];
|
|
519
|
+
/^on[A-Z]/.test(n) ? i && a ? t[n] = (...o) => {
|
|
511
520
|
const s = a(...o);
|
|
512
521
|
return i(...o), s;
|
|
513
|
-
} : i && (t[
|
|
522
|
+
} : i && (t[n] = i) : n === "style" ? t[n] = { ...i, ...a } : n === "className" && (t[n] = [i, a].filter(Boolean).join(" "));
|
|
514
523
|
}
|
|
515
|
-
return { ...
|
|
524
|
+
return { ...r, ...t };
|
|
516
525
|
}
|
|
517
|
-
function
|
|
518
|
-
let e = Object.getOwnPropertyDescriptor(
|
|
519
|
-
return t ?
|
|
526
|
+
function Yr(r) {
|
|
527
|
+
let e = Object.getOwnPropertyDescriptor(r.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
528
|
+
return t ? r.ref : (e = Object.getOwnPropertyDescriptor(r, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? r.props.ref : r.props.ref || r.ref);
|
|
520
529
|
}
|
|
521
|
-
var
|
|
530
|
+
var Er = [
|
|
522
531
|
"a",
|
|
523
532
|
"button",
|
|
524
533
|
"div",
|
|
@@ -536,40 +545,40 @@ var kr = [
|
|
|
536
545
|
"span",
|
|
537
546
|
"svg",
|
|
538
547
|
"ul"
|
|
539
|
-
],
|
|
540
|
-
const t = /* @__PURE__ */
|
|
548
|
+
], $r = Er.reduce((r, e) => {
|
|
549
|
+
const t = /* @__PURE__ */ Dr(`Primitive.${e}`), n = T.forwardRef((i, a) => {
|
|
541
550
|
const { asChild: o, ...s } = i, h = o ? t : e;
|
|
542
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(h, { ...s, ref: a });
|
|
551
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(h, { ...s, ref: a });
|
|
543
552
|
});
|
|
544
|
-
return
|
|
545
|
-
}, {}),
|
|
546
|
-
|
|
553
|
+
return n.displayName = `Primitive.${e}`, { ...r, [e]: n };
|
|
554
|
+
}, {}), Wr = "Label", at = T.forwardRef((r, e) => /* @__PURE__ */ d(
|
|
555
|
+
$r.label,
|
|
547
556
|
{
|
|
548
|
-
...
|
|
557
|
+
...r,
|
|
549
558
|
ref: e,
|
|
550
559
|
onMouseDown: (t) => {
|
|
551
|
-
t.target.closest("button, input, select, textarea") || (
|
|
560
|
+
t.target.closest("button, input, select, textarea") || (r.onMouseDown?.(t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
|
|
552
561
|
}
|
|
553
562
|
}
|
|
554
563
|
));
|
|
555
|
-
|
|
556
|
-
var
|
|
557
|
-
function
|
|
558
|
-
return
|
|
559
|
-
}
|
|
560
|
-
var Ce = { exports: {} },
|
|
561
|
-
function
|
|
562
|
-
return
|
|
564
|
+
at.displayName = Wr;
|
|
565
|
+
var jr = at;
|
|
566
|
+
function Cr(r) {
|
|
567
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
568
|
+
}
|
|
569
|
+
var Ce = { exports: {} }, He;
|
|
570
|
+
function Hr() {
|
|
571
|
+
return He || (He = 1, (function(r) {
|
|
563
572
|
(function() {
|
|
564
573
|
var e = {}.hasOwnProperty;
|
|
565
574
|
function t() {
|
|
566
575
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
567
576
|
var s = arguments[o];
|
|
568
|
-
s && (a = i(a,
|
|
577
|
+
s && (a = i(a, n.call(this, s)));
|
|
569
578
|
}
|
|
570
579
|
return a;
|
|
571
580
|
}
|
|
572
|
-
function
|
|
581
|
+
function n(a) {
|
|
573
582
|
if (typeof a == "string" || typeof a == "number")
|
|
574
583
|
return this && this[a] || a;
|
|
575
584
|
if (typeof a != "object")
|
|
@@ -586,44 +595,44 @@ function Wr() {
|
|
|
586
595
|
function i(a, o) {
|
|
587
596
|
return o ? a ? a + " " + o : a + o : a;
|
|
588
597
|
}
|
|
589
|
-
|
|
598
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
590
599
|
})();
|
|
591
600
|
})(Ce)), Ce.exports;
|
|
592
601
|
}
|
|
593
|
-
var
|
|
594
|
-
const
|
|
602
|
+
var Lr = Hr();
|
|
603
|
+
const Ir = /* @__PURE__ */ Cr(Lr), Fr = {
|
|
595
604
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
596
605
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
597
606
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
598
|
-
},
|
|
599
|
-
children:
|
|
607
|
+
}, Rr = Ir.bind(Fr), re = "purpur-label", Ar = ({
|
|
608
|
+
children: r,
|
|
600
609
|
className: e,
|
|
601
610
|
disabled: t,
|
|
602
|
-
negative:
|
|
611
|
+
negative: n = !1,
|
|
603
612
|
...i
|
|
604
613
|
}) => {
|
|
605
|
-
const a =
|
|
606
|
-
[`${
|
|
607
|
-
[`${
|
|
614
|
+
const a = Rr(e, re, {
|
|
615
|
+
[`${re}--disabled`]: t,
|
|
616
|
+
[`${re}--negative`]: n
|
|
608
617
|
});
|
|
609
|
-
return /* @__PURE__ */ d(
|
|
618
|
+
return /* @__PURE__ */ d(jr, { className: a, ...i, children: r });
|
|
610
619
|
};
|
|
611
|
-
function
|
|
612
|
-
return
|
|
620
|
+
function Qr(r) {
|
|
621
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
613
622
|
}
|
|
614
|
-
var
|
|
615
|
-
function
|
|
616
|
-
return
|
|
623
|
+
var Le = { exports: {} }, Ie;
|
|
624
|
+
function Br() {
|
|
625
|
+
return Ie || (Ie = 1, (function(r) {
|
|
617
626
|
(function() {
|
|
618
627
|
var e = {}.hasOwnProperty;
|
|
619
628
|
function t() {
|
|
620
629
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
621
630
|
var s = arguments[o];
|
|
622
|
-
s && (a = i(a,
|
|
631
|
+
s && (a = i(a, n.call(this, s)));
|
|
623
632
|
}
|
|
624
633
|
return a;
|
|
625
634
|
}
|
|
626
|
-
function
|
|
635
|
+
function n(a) {
|
|
627
636
|
if (typeof a == "string" || typeof a == "number")
|
|
628
637
|
return this && this[a] || a;
|
|
629
638
|
if (typeof a != "object")
|
|
@@ -640,60 +649,60 @@ function Fr() {
|
|
|
640
649
|
function i(a, o) {
|
|
641
650
|
return o ? a ? a + " " + o : a + o : a;
|
|
642
651
|
}
|
|
643
|
-
|
|
652
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
644
653
|
})();
|
|
645
|
-
})(
|
|
654
|
+
})(Le)), Le.exports;
|
|
646
655
|
}
|
|
647
|
-
var
|
|
648
|
-
const
|
|
656
|
+
var Sr = Br();
|
|
657
|
+
const Xr = /* @__PURE__ */ Qr(Sr), Gr = "_rotate_12t9p_1", Vr = "_dash_12t9p_1", zr = {
|
|
649
658
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
650
|
-
rotate:
|
|
659
|
+
rotate: Gr,
|
|
651
660
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
652
661
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
653
662
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
654
663
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
655
664
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
656
665
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
657
|
-
dash:
|
|
666
|
+
dash: Vr,
|
|
658
667
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
659
668
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
660
|
-
},
|
|
669
|
+
}, Fe = Xr.bind(zr), G = "purpur-spinner", Zr = {
|
|
661
670
|
SM: "sm"
|
|
662
|
-
},
|
|
663
|
-
disabled:
|
|
671
|
+
}, it = ({
|
|
672
|
+
disabled: r = !1,
|
|
664
673
|
negative: e = !1,
|
|
665
|
-
size: t =
|
|
666
|
-
className:
|
|
674
|
+
size: t = Zr.SM,
|
|
675
|
+
className: n,
|
|
667
676
|
...i
|
|
668
|
-
}) => /* @__PURE__ */ d("div", { className:
|
|
677
|
+
}) => /* @__PURE__ */ d("div", { className: Fe(G, `${G}--${t}`, n), ...i, children: /* @__PURE__ */ d("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ d(
|
|
669
678
|
"circle",
|
|
670
679
|
{
|
|
671
|
-
className:
|
|
672
|
-
[`${
|
|
673
|
-
[`${
|
|
680
|
+
className: Fe(`${G}__circle`, {
|
|
681
|
+
[`${G}__circle--disabled`]: r,
|
|
682
|
+
[`${G}__circle--negative`]: e
|
|
674
683
|
}),
|
|
675
684
|
cx: "25",
|
|
676
685
|
cy: "25",
|
|
677
686
|
r: "20"
|
|
678
687
|
}
|
|
679
688
|
) }) });
|
|
680
|
-
|
|
681
|
-
function
|
|
682
|
-
return
|
|
689
|
+
it.displayName = "Spinner";
|
|
690
|
+
function Jr(r) {
|
|
691
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
683
692
|
}
|
|
684
|
-
var
|
|
685
|
-
function
|
|
686
|
-
return
|
|
693
|
+
var Re = { exports: {} }, Ae;
|
|
694
|
+
function Kr() {
|
|
695
|
+
return Ae || (Ae = 1, (function(r) {
|
|
687
696
|
(function() {
|
|
688
697
|
var e = {}.hasOwnProperty;
|
|
689
698
|
function t() {
|
|
690
699
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
691
700
|
var s = arguments[o];
|
|
692
|
-
s && (a = i(a,
|
|
701
|
+
s && (a = i(a, n.call(this, s)));
|
|
693
702
|
}
|
|
694
703
|
return a;
|
|
695
704
|
}
|
|
696
|
-
function
|
|
705
|
+
function n(a) {
|
|
697
706
|
if (typeof a == "string" || typeof a == "number")
|
|
698
707
|
return this && this[a] || a;
|
|
699
708
|
if (typeof a != "object")
|
|
@@ -710,12 +719,12 @@ function Vr() {
|
|
|
710
719
|
function i(a, o) {
|
|
711
720
|
return o ? a ? a + " " + o : a + o : a;
|
|
712
721
|
}
|
|
713
|
-
|
|
722
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
714
723
|
})();
|
|
715
|
-
})(
|
|
724
|
+
})(Re)), Re.exports;
|
|
716
725
|
}
|
|
717
|
-
var
|
|
718
|
-
const
|
|
726
|
+
var Ur = Kr();
|
|
727
|
+
const en = /* @__PURE__ */ Jr(Ur), tn = {
|
|
719
728
|
"purpur-text-field": "_purpur-text-field_1n0q1_1",
|
|
720
729
|
"purpur-text-field__label": "_purpur-text-field__label_1n0q1_7",
|
|
721
730
|
"purpur-text-field__label-text": "_purpur-text-field__label-text_1n0q1_12",
|
|
@@ -736,12 +745,12 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
736
745
|
"purpur-text-field__adornment-container": "_purpur-text-field__adornment-container_1n0q1_146",
|
|
737
746
|
"purpur-text-field__valid-icon": "_purpur-text-field__valid-icon_1n0q1_151",
|
|
738
747
|
"purpur-text-field__valid-icon--negative": "_purpur-text-field__valid-icon--negative_1n0q1_154"
|
|
739
|
-
},
|
|
748
|
+
}, rn = (r) => Je(r), $ = en.bind(tn), O = "purpur-text-field", ot = le(
|
|
740
749
|
({
|
|
741
|
-
["data-testid"]:
|
|
750
|
+
["data-testid"]: r,
|
|
742
751
|
className: e,
|
|
743
752
|
clearButtonAriaLabel: t,
|
|
744
|
-
beforeField:
|
|
753
|
+
beforeField: n,
|
|
745
754
|
afterField: i,
|
|
746
755
|
endAdornment: a,
|
|
747
756
|
errorText: o,
|
|
@@ -755,13 +764,13 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
755
764
|
negative: P = !1,
|
|
756
765
|
...w
|
|
757
766
|
}, u) => {
|
|
758
|
-
const l =
|
|
759
|
-
|
|
760
|
-
},
|
|
761
|
-
p?.(),
|
|
762
|
-
},
|
|
767
|
+
const l = Ot(), y = w.id ?? l, k = (E) => r ? `${r}-${E}` : void 0, F = L && !o, R = s ? `${y}-helper-text` : void 0, A = [N].filter((E) => !!E), me = (typeof w.value == "number" ? w.value !== void 0 : w.value?.length) && !w.disabled && !w.readOnly && !m && p && t, _e = rn(null), xt = (E) => {
|
|
768
|
+
_e.current = E, typeof u == "function" ? u(E) : u && (u.current = E);
|
|
769
|
+
}, vt = () => {
|
|
770
|
+
p?.(), _e.current?.focus();
|
|
771
|
+
}, U = [
|
|
763
772
|
m && /* @__PURE__ */ d(
|
|
764
|
-
|
|
773
|
+
it,
|
|
765
774
|
{
|
|
766
775
|
disabled: w.disabled,
|
|
767
776
|
size: "xs",
|
|
@@ -770,44 +779,44 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
770
779
|
},
|
|
771
780
|
"spinner"
|
|
772
781
|
),
|
|
773
|
-
|
|
774
|
-
|
|
782
|
+
me && /* @__PURE__ */ d(
|
|
783
|
+
Ue,
|
|
775
784
|
{
|
|
776
785
|
negative: P,
|
|
777
786
|
variant: "tertiary-purple",
|
|
778
|
-
onClick:
|
|
787
|
+
onClick: vt,
|
|
779
788
|
iconOnly: !0,
|
|
780
789
|
"aria-label": t ?? "",
|
|
781
790
|
"data-testid": k("clear-button"),
|
|
782
791
|
tabIndex: -1,
|
|
783
|
-
children: /* @__PURE__ */ d(
|
|
792
|
+
children: /* @__PURE__ */ d(rt, { size: "xs" })
|
|
784
793
|
},
|
|
785
794
|
"clear-button"
|
|
786
795
|
),
|
|
787
796
|
F && /* @__PURE__ */ d(
|
|
788
|
-
|
|
797
|
+
tt,
|
|
789
798
|
{
|
|
790
799
|
"data-testid": k("valid-icon"),
|
|
791
|
-
className:
|
|
800
|
+
className: $(`${O}__valid-icon`, {
|
|
792
801
|
[`${O}__valid-icon--negative`]: P
|
|
793
802
|
})
|
|
794
803
|
},
|
|
795
804
|
"valid-icon"
|
|
796
805
|
)
|
|
797
|
-
].filter((E) => !!E),
|
|
806
|
+
].filter((E) => !!E), Pt = $(`${O}__input-container`, {
|
|
798
807
|
[`${O}__input-container--start-adornment`]: A.length,
|
|
799
|
-
[`${O}__input-container--end-adornment`]:
|
|
808
|
+
[`${O}__input-container--end-adornment`]: U.length || a,
|
|
800
809
|
[`${O}__input-container--disabled`]: w.disabled,
|
|
801
|
-
[`${O}__input-container--has-clear-button`]:
|
|
810
|
+
[`${O}__input-container--has-clear-button`]: me,
|
|
802
811
|
[`${O}__input-container--readonly`]: w.readOnly && !w.disabled,
|
|
803
812
|
[`${O}__input-container--negative`]: P
|
|
804
813
|
});
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
c && /* @__PURE__ */
|
|
807
|
-
|
|
814
|
+
return /* @__PURE__ */ C("div", { className: $(e, O), children: [
|
|
815
|
+
c && /* @__PURE__ */ C(
|
|
816
|
+
Ar,
|
|
808
817
|
{
|
|
809
818
|
htmlFor: y,
|
|
810
|
-
className:
|
|
819
|
+
className: $(`${O}__label`),
|
|
811
820
|
"data-testid": k("label"),
|
|
812
821
|
disabled: w.disabled,
|
|
813
822
|
negative: P,
|
|
@@ -817,14 +826,14 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
817
826
|
]
|
|
818
827
|
}
|
|
819
828
|
),
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
-
!!
|
|
822
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ C("div", { className: $(`${O}__field-row`), children: [
|
|
830
|
+
!!n && n,
|
|
831
|
+
/* @__PURE__ */ C("div", { className: Pt, children: [
|
|
823
832
|
!!A.length && /* @__PURE__ */ d(
|
|
824
833
|
"div",
|
|
825
834
|
{
|
|
826
835
|
"data-testid": k("start-adornments"),
|
|
827
|
-
className:
|
|
836
|
+
className: $(`${O}__adornment-container`),
|
|
828
837
|
children: A
|
|
829
838
|
}
|
|
830
839
|
),
|
|
@@ -833,11 +842,11 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
833
842
|
{
|
|
834
843
|
...w,
|
|
835
844
|
id: y,
|
|
836
|
-
ref:
|
|
845
|
+
ref: xt,
|
|
837
846
|
"data-testid": k("input"),
|
|
838
847
|
"aria-describedby": w["aria-describedby"] || R,
|
|
839
848
|
"aria-invalid": w["aria-invalid"] || !!o,
|
|
840
|
-
className:
|
|
849
|
+
className: $([
|
|
841
850
|
`${O}__input`,
|
|
842
851
|
{
|
|
843
852
|
[`${O}__input--valid`]: F,
|
|
@@ -850,18 +859,18 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
850
859
|
/* @__PURE__ */ d(
|
|
851
860
|
"div",
|
|
852
861
|
{
|
|
853
|
-
className:
|
|
862
|
+
className: $(`${O}__frame`, {
|
|
854
863
|
[`${O}__frame--negative`]: P
|
|
855
864
|
})
|
|
856
865
|
}
|
|
857
866
|
),
|
|
858
|
-
(!!
|
|
867
|
+
(!!U.length || a) && /* @__PURE__ */ C(
|
|
859
868
|
"div",
|
|
860
869
|
{
|
|
861
870
|
"data-testid": k("end-adornments"),
|
|
862
|
-
className:
|
|
871
|
+
className: $(`${O}__adornment-container`),
|
|
863
872
|
children: [
|
|
864
|
-
|
|
873
|
+
U,
|
|
865
874
|
a
|
|
866
875
|
]
|
|
867
876
|
}
|
|
@@ -870,7 +879,7 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
870
879
|
!!i && i
|
|
871
880
|
] }),
|
|
872
881
|
R && /* @__PURE__ */ d(
|
|
873
|
-
|
|
882
|
+
lr,
|
|
874
883
|
{
|
|
875
884
|
"data-testid": k("helper-text"),
|
|
876
885
|
id: R,
|
|
@@ -879,28 +888,28 @@ const Zr = /* @__PURE__ */ Xr(zr), Jr = {
|
|
|
879
888
|
children: s
|
|
880
889
|
}
|
|
881
890
|
),
|
|
882
|
-
o && /* @__PURE__ */ d(
|
|
891
|
+
o && /* @__PURE__ */ d(nr, { "data-testid": k("error-text"), negative: P, children: o })
|
|
883
892
|
] });
|
|
884
893
|
}
|
|
885
894
|
);
|
|
886
|
-
|
|
887
|
-
function
|
|
888
|
-
return
|
|
889
|
-
}
|
|
890
|
-
var
|
|
891
|
-
var
|
|
892
|
-
function
|
|
893
|
-
return
|
|
895
|
+
ot.displayName = "TextField";
|
|
896
|
+
function nn(r) {
|
|
897
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
898
|
+
}
|
|
899
|
+
var ne = { exports: {} };
|
|
900
|
+
var Qe;
|
|
901
|
+
function an() {
|
|
902
|
+
return Qe || (Qe = 1, (function(r) {
|
|
894
903
|
(function() {
|
|
895
904
|
var e = {}.hasOwnProperty;
|
|
896
905
|
function t() {
|
|
897
906
|
for (var a = "", o = 0; o < arguments.length; o++) {
|
|
898
907
|
var s = arguments[o];
|
|
899
|
-
s && (a = i(a,
|
|
908
|
+
s && (a = i(a, n.call(this, s)));
|
|
900
909
|
}
|
|
901
910
|
return a;
|
|
902
911
|
}
|
|
903
|
-
function
|
|
912
|
+
function n(a) {
|
|
904
913
|
if (typeof a == "string" || typeof a == "number")
|
|
905
914
|
return this && this[a] || a;
|
|
906
915
|
if (typeof a != "object")
|
|
@@ -917,43 +926,43 @@ function en() {
|
|
|
917
926
|
function i(a, o) {
|
|
918
927
|
return o ? a ? a + " " + o : a + o : a;
|
|
919
928
|
}
|
|
920
|
-
|
|
929
|
+
r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
|
|
921
930
|
})();
|
|
922
|
-
})(
|
|
931
|
+
})(ne)), ne.exports;
|
|
923
932
|
}
|
|
924
|
-
var
|
|
925
|
-
const
|
|
926
|
-
function D(
|
|
927
|
-
return typeof
|
|
933
|
+
var on = an();
|
|
934
|
+
const sn = /* @__PURE__ */ nn(on), st = 6048e5, un = 864e5, cn = 6e4, ln = 36e5, dn = 1e3, Be = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
935
|
+
function D(r, e) {
|
|
936
|
+
return typeof r == "function" ? r(e) : r && typeof r == "object" && Be in r ? r[Be](e) : r instanceof Date ? new r.constructor(e) : new Date(e);
|
|
928
937
|
}
|
|
929
|
-
function M(
|
|
930
|
-
return D(e ||
|
|
938
|
+
function M(r, e) {
|
|
939
|
+
return D(e || r, r);
|
|
931
940
|
}
|
|
932
|
-
function
|
|
933
|
-
const
|
|
934
|
-
return isNaN(e) ? D(t?.in ||
|
|
941
|
+
function ut(r, e, t) {
|
|
942
|
+
const n = M(r, t?.in);
|
|
943
|
+
return isNaN(e) ? D(t?.in || r, NaN) : (e && n.setDate(n.getDate() + e), n);
|
|
935
944
|
}
|
|
936
|
-
let
|
|
945
|
+
let pn = {};
|
|
937
946
|
function S() {
|
|
938
|
-
return
|
|
947
|
+
return pn;
|
|
939
948
|
}
|
|
940
|
-
function H(
|
|
941
|
-
const t = S(),
|
|
949
|
+
function H(r, e) {
|
|
950
|
+
const t = S(), n = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, i = M(r, e?.in), a = i.getDay(), o = (a < n ? 7 : 0) + a - n;
|
|
942
951
|
return i.setDate(i.getDate() - o), i.setHours(0, 0, 0, 0), i;
|
|
943
952
|
}
|
|
944
|
-
function B(
|
|
945
|
-
return H(
|
|
953
|
+
function B(r, e) {
|
|
954
|
+
return H(r, { ...e, weekStartsOn: 1 });
|
|
946
955
|
}
|
|
947
|
-
function
|
|
948
|
-
const t = M(
|
|
949
|
-
i.setFullYear(
|
|
956
|
+
function ct(r, e) {
|
|
957
|
+
const t = M(r, e?.in), n = t.getFullYear(), i = D(t, 0);
|
|
958
|
+
i.setFullYear(n + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
950
959
|
const a = B(i), o = D(t, 0);
|
|
951
|
-
o.setFullYear(
|
|
960
|
+
o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0);
|
|
952
961
|
const s = B(o);
|
|
953
|
-
return t.getTime() >= a.getTime() ?
|
|
962
|
+
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= s.getTime() ? n : n - 1;
|
|
954
963
|
}
|
|
955
|
-
function
|
|
956
|
-
const e = M(
|
|
964
|
+
function J(r) {
|
|
965
|
+
const e = M(r), t = new Date(
|
|
957
966
|
Date.UTC(
|
|
958
967
|
e.getFullYear(),
|
|
959
968
|
e.getMonth(),
|
|
@@ -964,42 +973,42 @@ function Z(n) {
|
|
|
964
973
|
e.getMilliseconds()
|
|
965
974
|
)
|
|
966
975
|
);
|
|
967
|
-
return t.setUTCFullYear(e.getFullYear()), +
|
|
976
|
+
return t.setUTCFullYear(e.getFullYear()), +r - +t;
|
|
968
977
|
}
|
|
969
|
-
function
|
|
978
|
+
function fn(r, ...e) {
|
|
970
979
|
const t = D.bind(
|
|
971
980
|
null,
|
|
972
|
-
e.find((
|
|
981
|
+
e.find((n) => typeof n == "object")
|
|
973
982
|
);
|
|
974
983
|
return e.map(t);
|
|
975
984
|
}
|
|
976
|
-
function
|
|
977
|
-
const t = M(
|
|
985
|
+
function Se(r, e) {
|
|
986
|
+
const t = M(r, e?.in);
|
|
978
987
|
return t.setHours(0, 0, 0, 0), t;
|
|
979
988
|
}
|
|
980
|
-
function
|
|
981
|
-
const [
|
|
989
|
+
function hn(r, e, t) {
|
|
990
|
+
const [n, i] = fn(
|
|
982
991
|
t?.in,
|
|
983
|
-
|
|
992
|
+
r,
|
|
984
993
|
e
|
|
985
|
-
), a =
|
|
986
|
-
return Math.round((s - h) /
|
|
994
|
+
), a = Se(n), o = Se(i), s = +a - J(a), h = +o - J(o);
|
|
995
|
+
return Math.round((s - h) / un);
|
|
987
996
|
}
|
|
988
|
-
function
|
|
989
|
-
const t =
|
|
990
|
-
return
|
|
997
|
+
function mn(r, e) {
|
|
998
|
+
const t = ct(r, e), n = D(r, 0);
|
|
999
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), B(n);
|
|
991
1000
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
1001
|
+
function _n(r) {
|
|
1002
|
+
return r instanceof Date || typeof r == "object" && Object.prototype.toString.call(r) === "[object Date]";
|
|
994
1003
|
}
|
|
995
|
-
function
|
|
996
|
-
return !(!
|
|
1004
|
+
function lt(r) {
|
|
1005
|
+
return !(!_n(r) && typeof r != "number" || isNaN(+M(r)));
|
|
997
1006
|
}
|
|
998
|
-
function
|
|
999
|
-
const t = M(
|
|
1007
|
+
function wn(r, e) {
|
|
1008
|
+
const t = M(r, e?.in);
|
|
1000
1009
|
return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
1001
1010
|
}
|
|
1002
|
-
const
|
|
1011
|
+
const yn = {
|
|
1003
1012
|
lessThanXSeconds: {
|
|
1004
1013
|
one: "less than a second",
|
|
1005
1014
|
other: "less than {{count}} seconds"
|
|
@@ -1061,77 +1070,77 @@ const hn = {
|
|
|
1061
1070
|
one: "almost 1 year",
|
|
1062
1071
|
other: "almost {{count}} years"
|
|
1063
1072
|
}
|
|
1064
|
-
},
|
|
1065
|
-
let
|
|
1066
|
-
const i =
|
|
1067
|
-
return typeof i == "string" ?
|
|
1073
|
+
}, gn = (r, e, t) => {
|
|
1074
|
+
let n;
|
|
1075
|
+
const i = yn[r];
|
|
1076
|
+
return typeof i == "string" ? n = i : e === 1 ? n = i.one : n = i.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
1068
1077
|
};
|
|
1069
|
-
function
|
|
1078
|
+
function ae(r) {
|
|
1070
1079
|
return (e = {}) => {
|
|
1071
|
-
const t = e.width ? String(e.width) :
|
|
1072
|
-
return
|
|
1080
|
+
const t = e.width ? String(e.width) : r.defaultWidth;
|
|
1081
|
+
return r.formats[t] || r.formats[r.defaultWidth];
|
|
1073
1082
|
};
|
|
1074
1083
|
}
|
|
1075
|
-
const
|
|
1084
|
+
const bn = {
|
|
1076
1085
|
full: "EEEE, MMMM do, y",
|
|
1077
1086
|
long: "MMMM do, y",
|
|
1078
1087
|
medium: "MMM d, y",
|
|
1079
1088
|
short: "MM/dd/yyyy"
|
|
1080
|
-
},
|
|
1089
|
+
}, xn = {
|
|
1081
1090
|
full: "h:mm:ss a zzzz",
|
|
1082
1091
|
long: "h:mm:ss a z",
|
|
1083
1092
|
medium: "h:mm:ss a",
|
|
1084
1093
|
short: "h:mm a"
|
|
1085
|
-
},
|
|
1094
|
+
}, vn = {
|
|
1086
1095
|
full: "{{date}} 'at' {{time}}",
|
|
1087
1096
|
long: "{{date}} 'at' {{time}}",
|
|
1088
1097
|
medium: "{{date}}, {{time}}",
|
|
1089
1098
|
short: "{{date}}, {{time}}"
|
|
1090
|
-
},
|
|
1091
|
-
date:
|
|
1092
|
-
formats:
|
|
1099
|
+
}, Pn = {
|
|
1100
|
+
date: ae({
|
|
1101
|
+
formats: bn,
|
|
1093
1102
|
defaultWidth: "full"
|
|
1094
1103
|
}),
|
|
1095
|
-
time:
|
|
1096
|
-
formats:
|
|
1104
|
+
time: ae({
|
|
1105
|
+
formats: xn,
|
|
1097
1106
|
defaultWidth: "full"
|
|
1098
1107
|
}),
|
|
1099
|
-
dateTime:
|
|
1100
|
-
formats:
|
|
1108
|
+
dateTime: ae({
|
|
1109
|
+
formats: vn,
|
|
1101
1110
|
defaultWidth: "full"
|
|
1102
1111
|
})
|
|
1103
|
-
},
|
|
1112
|
+
}, On = {
|
|
1104
1113
|
lastWeek: "'last' eeee 'at' p",
|
|
1105
1114
|
yesterday: "'yesterday at' p",
|
|
1106
1115
|
today: "'today at' p",
|
|
1107
1116
|
tomorrow: "'tomorrow at' p",
|
|
1108
1117
|
nextWeek: "eeee 'at' p",
|
|
1109
1118
|
other: "P"
|
|
1110
|
-
},
|
|
1111
|
-
function V(
|
|
1119
|
+
}, Mn = (r, e, t, n) => On[r];
|
|
1120
|
+
function V(r) {
|
|
1112
1121
|
return (e, t) => {
|
|
1113
|
-
const
|
|
1122
|
+
const n = t?.context ? String(t.context) : "standalone";
|
|
1114
1123
|
let i;
|
|
1115
|
-
if (
|
|
1116
|
-
const o =
|
|
1117
|
-
i =
|
|
1124
|
+
if (n === "formatting" && r.formattingValues) {
|
|
1125
|
+
const o = r.defaultFormattingWidth || r.defaultWidth, s = t?.width ? String(t.width) : o;
|
|
1126
|
+
i = r.formattingValues[s] || r.formattingValues[o];
|
|
1118
1127
|
} else {
|
|
1119
|
-
const o =
|
|
1120
|
-
i =
|
|
1128
|
+
const o = r.defaultWidth, s = t?.width ? String(t.width) : r.defaultWidth;
|
|
1129
|
+
i = r.values[s] || r.values[o];
|
|
1121
1130
|
}
|
|
1122
|
-
const a =
|
|
1131
|
+
const a = r.argumentCallback ? r.argumentCallback(e) : e;
|
|
1123
1132
|
return i[a];
|
|
1124
1133
|
};
|
|
1125
1134
|
}
|
|
1126
|
-
const
|
|
1135
|
+
const Dn = {
|
|
1127
1136
|
narrow: ["B", "A"],
|
|
1128
1137
|
abbreviated: ["BC", "AD"],
|
|
1129
1138
|
wide: ["Before Christ", "Anno Domini"]
|
|
1130
|
-
},
|
|
1139
|
+
}, Tn = {
|
|
1131
1140
|
narrow: ["1", "2", "3", "4"],
|
|
1132
1141
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1133
1142
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1134
|
-
},
|
|
1143
|
+
}, kn = {
|
|
1135
1144
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1136
1145
|
abbreviated: [
|
|
1137
1146
|
"Jan",
|
|
@@ -1161,7 +1170,7 @@ const vn = {
|
|
|
1161
1170
|
"November",
|
|
1162
1171
|
"December"
|
|
1163
1172
|
]
|
|
1164
|
-
},
|
|
1173
|
+
}, Nn = {
|
|
1165
1174
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1166
1175
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1167
1176
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -1174,7 +1183,7 @@ const vn = {
|
|
|
1174
1183
|
"Friday",
|
|
1175
1184
|
"Saturday"
|
|
1176
1185
|
]
|
|
1177
|
-
},
|
|
1186
|
+
}, qn = {
|
|
1178
1187
|
narrow: {
|
|
1179
1188
|
am: "a",
|
|
1180
1189
|
pm: "p",
|
|
@@ -1205,7 +1214,7 @@ const vn = {
|
|
|
1205
1214
|
evening: "evening",
|
|
1206
1215
|
night: "night"
|
|
1207
1216
|
}
|
|
1208
|
-
},
|
|
1217
|
+
}, Yn = {
|
|
1209
1218
|
narrow: {
|
|
1210
1219
|
am: "a",
|
|
1211
1220
|
pm: "p",
|
|
@@ -1236,10 +1245,10 @@ const vn = {
|
|
|
1236
1245
|
evening: "in the evening",
|
|
1237
1246
|
night: "at night"
|
|
1238
1247
|
}
|
|
1239
|
-
},
|
|
1240
|
-
const t = Number(
|
|
1241
|
-
if (
|
|
1242
|
-
switch (
|
|
1248
|
+
}, En = (r, e) => {
|
|
1249
|
+
const t = Number(r), n = t % 100;
|
|
1250
|
+
if (n > 20 || n < 10)
|
|
1251
|
+
switch (n % 10) {
|
|
1243
1252
|
case 1:
|
|
1244
1253
|
return t + "st";
|
|
1245
1254
|
case 2:
|
|
@@ -1248,43 +1257,43 @@ const vn = {
|
|
|
1248
1257
|
return t + "rd";
|
|
1249
1258
|
}
|
|
1250
1259
|
return t + "th";
|
|
1251
|
-
},
|
|
1252
|
-
ordinalNumber:
|
|
1260
|
+
}, $n = {
|
|
1261
|
+
ordinalNumber: En,
|
|
1253
1262
|
era: V({
|
|
1254
|
-
values:
|
|
1263
|
+
values: Dn,
|
|
1255
1264
|
defaultWidth: "wide"
|
|
1256
1265
|
}),
|
|
1257
1266
|
quarter: V({
|
|
1258
|
-
values:
|
|
1267
|
+
values: Tn,
|
|
1259
1268
|
defaultWidth: "wide",
|
|
1260
|
-
argumentCallback: (
|
|
1269
|
+
argumentCallback: (r) => r - 1
|
|
1261
1270
|
}),
|
|
1262
1271
|
month: V({
|
|
1263
|
-
values:
|
|
1272
|
+
values: kn,
|
|
1264
1273
|
defaultWidth: "wide"
|
|
1265
1274
|
}),
|
|
1266
1275
|
day: V({
|
|
1267
|
-
values:
|
|
1276
|
+
values: Nn,
|
|
1268
1277
|
defaultWidth: "wide"
|
|
1269
1278
|
}),
|
|
1270
1279
|
dayPeriod: V({
|
|
1271
|
-
values:
|
|
1280
|
+
values: qn,
|
|
1272
1281
|
defaultWidth: "wide",
|
|
1273
|
-
formattingValues:
|
|
1282
|
+
formattingValues: Yn,
|
|
1274
1283
|
defaultFormattingWidth: "wide"
|
|
1275
1284
|
})
|
|
1276
1285
|
};
|
|
1277
|
-
function z(
|
|
1286
|
+
function z(r) {
|
|
1278
1287
|
return (e, t = {}) => {
|
|
1279
|
-
const
|
|
1288
|
+
const n = t.width, i = n && r.matchPatterns[n] || r.matchPatterns[r.defaultMatchWidth], a = e.match(i);
|
|
1280
1289
|
if (!a)
|
|
1281
1290
|
return null;
|
|
1282
|
-
const o = a[0], s =
|
|
1291
|
+
const o = a[0], s = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth], h = Array.isArray(s) ? jn(s, (p) => p.test(o)) : (
|
|
1283
1292
|
// [TODO] -- I challenge you to fix the type
|
|
1284
|
-
|
|
1293
|
+
Wn(s, (p) => p.test(o))
|
|
1285
1294
|
);
|
|
1286
1295
|
let c;
|
|
1287
|
-
c =
|
|
1296
|
+
c = r.valueCallback ? r.valueCallback(h) : h, c = t.valueCallback ? (
|
|
1288
1297
|
// [TODO] -- I challenge you to fix the type
|
|
1289
1298
|
t.valueCallback(c)
|
|
1290
1299
|
) : c;
|
|
@@ -1292,45 +1301,45 @@ function z(n) {
|
|
|
1292
1301
|
return { value: c, rest: m };
|
|
1293
1302
|
};
|
|
1294
1303
|
}
|
|
1295
|
-
function
|
|
1296
|
-
for (const t in
|
|
1297
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1304
|
+
function Wn(r, e) {
|
|
1305
|
+
for (const t in r)
|
|
1306
|
+
if (Object.prototype.hasOwnProperty.call(r, t) && e(r[t]))
|
|
1298
1307
|
return t;
|
|
1299
1308
|
}
|
|
1300
|
-
function
|
|
1301
|
-
for (let t = 0; t <
|
|
1302
|
-
if (e(
|
|
1309
|
+
function jn(r, e) {
|
|
1310
|
+
for (let t = 0; t < r.length; t++)
|
|
1311
|
+
if (e(r[t]))
|
|
1303
1312
|
return t;
|
|
1304
1313
|
}
|
|
1305
|
-
function
|
|
1314
|
+
function Cn(r) {
|
|
1306
1315
|
return (e, t = {}) => {
|
|
1307
|
-
const
|
|
1308
|
-
if (!
|
|
1309
|
-
const i =
|
|
1316
|
+
const n = e.match(r.matchPattern);
|
|
1317
|
+
if (!n) return null;
|
|
1318
|
+
const i = n[0], a = e.match(r.parsePattern);
|
|
1310
1319
|
if (!a) return null;
|
|
1311
|
-
let o =
|
|
1320
|
+
let o = r.valueCallback ? r.valueCallback(a[0]) : a[0];
|
|
1312
1321
|
o = t.valueCallback ? t.valueCallback(o) : o;
|
|
1313
1322
|
const s = e.slice(i.length);
|
|
1314
1323
|
return { value: o, rest: s };
|
|
1315
1324
|
};
|
|
1316
1325
|
}
|
|
1317
|
-
const
|
|
1326
|
+
const Hn = /^(\d+)(th|st|nd|rd)?/i, Ln = /\d+/i, In = {
|
|
1318
1327
|
narrow: /^(b|a)/i,
|
|
1319
1328
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1320
1329
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1321
|
-
},
|
|
1330
|
+
}, Fn = {
|
|
1322
1331
|
any: [/^b/i, /^(a|c)/i]
|
|
1323
|
-
},
|
|
1332
|
+
}, Rn = {
|
|
1324
1333
|
narrow: /^[1234]/i,
|
|
1325
1334
|
abbreviated: /^q[1234]/i,
|
|
1326
1335
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1327
|
-
},
|
|
1336
|
+
}, An = {
|
|
1328
1337
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1329
|
-
},
|
|
1338
|
+
}, Qn = {
|
|
1330
1339
|
narrow: /^[jfmasond]/i,
|
|
1331
1340
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1332
1341
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1333
|
-
},
|
|
1342
|
+
}, Bn = {
|
|
1334
1343
|
narrow: [
|
|
1335
1344
|
/^j/i,
|
|
1336
1345
|
/^f/i,
|
|
@@ -1359,18 +1368,18 @@ const Wn = /^(\d+)(th|st|nd|rd)?/i, $n = /\d+/i, Cn = {
|
|
|
1359
1368
|
/^n/i,
|
|
1360
1369
|
/^d/i
|
|
1361
1370
|
]
|
|
1362
|
-
},
|
|
1371
|
+
}, Sn = {
|
|
1363
1372
|
narrow: /^[smtwf]/i,
|
|
1364
1373
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1365
1374
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1366
1375
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1367
|
-
},
|
|
1376
|
+
}, Xn = {
|
|
1368
1377
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1369
1378
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1370
|
-
},
|
|
1379
|
+
}, Gn = {
|
|
1371
1380
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1372
1381
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1373
|
-
},
|
|
1382
|
+
}, Vn = {
|
|
1374
1383
|
any: {
|
|
1375
1384
|
am: /^a/i,
|
|
1376
1385
|
pm: /^p/i,
|
|
@@ -1381,101 +1390,101 @@ const Wn = /^(\d+)(th|st|nd|rd)?/i, $n = /\d+/i, Cn = {
|
|
|
1381
1390
|
evening: /evening/i,
|
|
1382
1391
|
night: /night/i
|
|
1383
1392
|
}
|
|
1384
|
-
},
|
|
1385
|
-
ordinalNumber:
|
|
1386
|
-
matchPattern:
|
|
1387
|
-
parsePattern:
|
|
1388
|
-
valueCallback: (
|
|
1393
|
+
}, zn = {
|
|
1394
|
+
ordinalNumber: Cn({
|
|
1395
|
+
matchPattern: Hn,
|
|
1396
|
+
parsePattern: Ln,
|
|
1397
|
+
valueCallback: (r) => parseInt(r, 10)
|
|
1389
1398
|
}),
|
|
1390
1399
|
era: z({
|
|
1391
|
-
matchPatterns:
|
|
1400
|
+
matchPatterns: In,
|
|
1392
1401
|
defaultMatchWidth: "wide",
|
|
1393
|
-
parsePatterns:
|
|
1402
|
+
parsePatterns: Fn,
|
|
1394
1403
|
defaultParseWidth: "any"
|
|
1395
1404
|
}),
|
|
1396
1405
|
quarter: z({
|
|
1397
|
-
matchPatterns:
|
|
1406
|
+
matchPatterns: Rn,
|
|
1398
1407
|
defaultMatchWidth: "wide",
|
|
1399
|
-
parsePatterns:
|
|
1408
|
+
parsePatterns: An,
|
|
1400
1409
|
defaultParseWidth: "any",
|
|
1401
|
-
valueCallback: (
|
|
1410
|
+
valueCallback: (r) => r + 1
|
|
1402
1411
|
}),
|
|
1403
1412
|
month: z({
|
|
1404
|
-
matchPatterns:
|
|
1413
|
+
matchPatterns: Qn,
|
|
1405
1414
|
defaultMatchWidth: "wide",
|
|
1406
|
-
parsePatterns:
|
|
1415
|
+
parsePatterns: Bn,
|
|
1407
1416
|
defaultParseWidth: "any"
|
|
1408
1417
|
}),
|
|
1409
1418
|
day: z({
|
|
1410
|
-
matchPatterns:
|
|
1419
|
+
matchPatterns: Sn,
|
|
1411
1420
|
defaultMatchWidth: "wide",
|
|
1412
|
-
parsePatterns:
|
|
1421
|
+
parsePatterns: Xn,
|
|
1413
1422
|
defaultParseWidth: "any"
|
|
1414
1423
|
}),
|
|
1415
1424
|
dayPeriod: z({
|
|
1416
|
-
matchPatterns:
|
|
1425
|
+
matchPatterns: Gn,
|
|
1417
1426
|
defaultMatchWidth: "any",
|
|
1418
|
-
parsePatterns:
|
|
1427
|
+
parsePatterns: Vn,
|
|
1419
1428
|
defaultParseWidth: "any"
|
|
1420
1429
|
})
|
|
1421
|
-
},
|
|
1430
|
+
}, dt = {
|
|
1422
1431
|
code: "en-US",
|
|
1423
|
-
formatDistance:
|
|
1424
|
-
formatLong:
|
|
1425
|
-
formatRelative:
|
|
1426
|
-
localize:
|
|
1427
|
-
match:
|
|
1432
|
+
formatDistance: gn,
|
|
1433
|
+
formatLong: Pn,
|
|
1434
|
+
formatRelative: Mn,
|
|
1435
|
+
localize: $n,
|
|
1436
|
+
match: zn,
|
|
1428
1437
|
options: {
|
|
1429
1438
|
weekStartsOn: 0,
|
|
1430
1439
|
firstWeekContainsDate: 1
|
|
1431
1440
|
}
|
|
1432
1441
|
};
|
|
1433
|
-
function
|
|
1434
|
-
const t = M(
|
|
1435
|
-
return
|
|
1436
|
-
}
|
|
1437
|
-
function
|
|
1438
|
-
const t = M(
|
|
1439
|
-
return Math.round(
|
|
1440
|
-
}
|
|
1441
|
-
function
|
|
1442
|
-
const t = M(
|
|
1443
|
-
o.setFullYear(
|
|
1444
|
-
const s = H(o, e), h = D(e?.in ||
|
|
1445
|
-
h.setFullYear(
|
|
1442
|
+
function Zn(r, e) {
|
|
1443
|
+
const t = M(r, e?.in);
|
|
1444
|
+
return hn(t, wn(t)) + 1;
|
|
1445
|
+
}
|
|
1446
|
+
function pt(r, e) {
|
|
1447
|
+
const t = M(r, e?.in), n = +B(t) - +mn(t);
|
|
1448
|
+
return Math.round(n / st) + 1;
|
|
1449
|
+
}
|
|
1450
|
+
function pe(r, e) {
|
|
1451
|
+
const t = M(r, e?.in), n = t.getFullYear(), i = S(), a = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = D(e?.in || r, 0);
|
|
1452
|
+
o.setFullYear(n + 1, 0, a), o.setHours(0, 0, 0, 0);
|
|
1453
|
+
const s = H(o, e), h = D(e?.in || r, 0);
|
|
1454
|
+
h.setFullYear(n, 0, a), h.setHours(0, 0, 0, 0);
|
|
1446
1455
|
const c = H(h, e);
|
|
1447
|
-
return +t >= +s ?
|
|
1456
|
+
return +t >= +s ? n + 1 : +t >= +c ? n : n - 1;
|
|
1448
1457
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const t = S(),
|
|
1451
|
-
return a.setFullYear(i, 0,
|
|
1458
|
+
function Jn(r, e) {
|
|
1459
|
+
const t = S(), n = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? t.firstWeekContainsDate ?? t.locale?.options?.firstWeekContainsDate ?? 1, i = pe(r, e), a = D(e?.in || r, 0);
|
|
1460
|
+
return a.setFullYear(i, 0, n), a.setHours(0, 0, 0, 0), H(a, e);
|
|
1452
1461
|
}
|
|
1453
|
-
function
|
|
1454
|
-
const t = M(
|
|
1455
|
-
return Math.round(
|
|
1462
|
+
function ft(r, e) {
|
|
1463
|
+
const t = M(r, e?.in), n = +H(t, e) - +Jn(t, e);
|
|
1464
|
+
return Math.round(n / st) + 1;
|
|
1456
1465
|
}
|
|
1457
|
-
function _(
|
|
1458
|
-
const t =
|
|
1459
|
-
return t +
|
|
1466
|
+
function _(r, e) {
|
|
1467
|
+
const t = r < 0 ? "-" : "", n = Math.abs(r).toString().padStart(e, "0");
|
|
1468
|
+
return t + n;
|
|
1460
1469
|
}
|
|
1461
|
-
const
|
|
1470
|
+
const j = {
|
|
1462
1471
|
// Year
|
|
1463
|
-
y(
|
|
1464
|
-
const t =
|
|
1465
|
-
return _(e === "yy" ?
|
|
1472
|
+
y(r, e) {
|
|
1473
|
+
const t = r.getFullYear(), n = t > 0 ? t : 1 - t;
|
|
1474
|
+
return _(e === "yy" ? n % 100 : n, e.length);
|
|
1466
1475
|
},
|
|
1467
1476
|
// Month
|
|
1468
|
-
M(
|
|
1469
|
-
const t =
|
|
1477
|
+
M(r, e) {
|
|
1478
|
+
const t = r.getMonth();
|
|
1470
1479
|
return e === "M" ? String(t + 1) : _(t + 1, 2);
|
|
1471
1480
|
},
|
|
1472
1481
|
// Day of the month
|
|
1473
|
-
d(
|
|
1474
|
-
return _(
|
|
1482
|
+
d(r, e) {
|
|
1483
|
+
return _(r.getDate(), e.length);
|
|
1475
1484
|
},
|
|
1476
1485
|
// AM or PM
|
|
1477
|
-
a(
|
|
1478
|
-
const t =
|
|
1486
|
+
a(r, e) {
|
|
1487
|
+
const t = r.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1479
1488
|
switch (e) {
|
|
1480
1489
|
case "a":
|
|
1481
1490
|
case "aa":
|
|
@@ -1484,31 +1493,30 @@ const C = {
|
|
|
1484
1493
|
return t;
|
|
1485
1494
|
case "aaaaa":
|
|
1486
1495
|
return t[0];
|
|
1487
|
-
case "aaaa":
|
|
1488
1496
|
default:
|
|
1489
1497
|
return t === "am" ? "a.m." : "p.m.";
|
|
1490
1498
|
}
|
|
1491
1499
|
},
|
|
1492
1500
|
// Hour [1-12]
|
|
1493
|
-
h(
|
|
1494
|
-
return _(
|
|
1501
|
+
h(r, e) {
|
|
1502
|
+
return _(r.getHours() % 12 || 12, e.length);
|
|
1495
1503
|
},
|
|
1496
1504
|
// Hour [0-23]
|
|
1497
|
-
H(
|
|
1498
|
-
return _(
|
|
1505
|
+
H(r, e) {
|
|
1506
|
+
return _(r.getHours(), e.length);
|
|
1499
1507
|
},
|
|
1500
1508
|
// Minute
|
|
1501
|
-
m(
|
|
1502
|
-
return _(
|
|
1509
|
+
m(r, e) {
|
|
1510
|
+
return _(r.getMinutes(), e.length);
|
|
1503
1511
|
},
|
|
1504
1512
|
// Second
|
|
1505
|
-
s(
|
|
1506
|
-
return _(
|
|
1513
|
+
s(r, e) {
|
|
1514
|
+
return _(r.getSeconds(), e.length);
|
|
1507
1515
|
},
|
|
1508
1516
|
// Fraction of second
|
|
1509
|
-
S(
|
|
1510
|
-
const t = e.length,
|
|
1511
|
-
|
|
1517
|
+
S(r, e) {
|
|
1518
|
+
const t = e.length, n = r.getMilliseconds(), i = Math.trunc(
|
|
1519
|
+
n * Math.pow(10, t - 3)
|
|
1512
1520
|
);
|
|
1513
1521
|
return _(i, e.length);
|
|
1514
1522
|
}
|
|
@@ -1519,36 +1527,34 @@ const C = {
|
|
|
1519
1527
|
afternoon: "afternoon",
|
|
1520
1528
|
evening: "evening",
|
|
1521
1529
|
night: "night"
|
|
1522
|
-
},
|
|
1530
|
+
}, Xe = {
|
|
1523
1531
|
// Era
|
|
1524
|
-
G: function(
|
|
1525
|
-
const
|
|
1532
|
+
G: function(r, e, t) {
|
|
1533
|
+
const n = r.getFullYear() > 0 ? 1 : 0;
|
|
1526
1534
|
switch (e) {
|
|
1527
1535
|
// AD, BC
|
|
1528
1536
|
case "G":
|
|
1529
1537
|
case "GG":
|
|
1530
1538
|
case "GGG":
|
|
1531
|
-
return t.era(
|
|
1539
|
+
return t.era(n, { width: "abbreviated" });
|
|
1532
1540
|
// A, B
|
|
1533
1541
|
case "GGGGG":
|
|
1534
|
-
return t.era(
|
|
1535
|
-
// Anno Domini, Before Christ
|
|
1536
|
-
case "GGGG":
|
|
1542
|
+
return t.era(n, { width: "narrow" });
|
|
1537
1543
|
default:
|
|
1538
|
-
return t.era(
|
|
1544
|
+
return t.era(n, { width: "wide" });
|
|
1539
1545
|
}
|
|
1540
1546
|
},
|
|
1541
1547
|
// Year
|
|
1542
|
-
y: function(
|
|
1548
|
+
y: function(r, e, t) {
|
|
1543
1549
|
if (e === "yo") {
|
|
1544
|
-
const
|
|
1550
|
+
const n = r.getFullYear(), i = n > 0 ? n : 1 - n;
|
|
1545
1551
|
return t.ordinalNumber(i, { unit: "year" });
|
|
1546
1552
|
}
|
|
1547
|
-
return
|
|
1553
|
+
return j.y(r, e);
|
|
1548
1554
|
},
|
|
1549
1555
|
// Local week-numbering year
|
|
1550
|
-
Y: function(
|
|
1551
|
-
const i =
|
|
1556
|
+
Y: function(r, e, t, n) {
|
|
1557
|
+
const i = pe(r, n), a = i > 0 ? i : 1 - i;
|
|
1552
1558
|
if (e === "YY") {
|
|
1553
1559
|
const o = a % 100;
|
|
1554
1560
|
return _(o, 2);
|
|
@@ -1556,8 +1562,8 @@ const C = {
|
|
|
1556
1562
|
return e === "Yo" ? t.ordinalNumber(a, { unit: "year" }) : _(a, e.length);
|
|
1557
1563
|
},
|
|
1558
1564
|
// ISO week-numbering year
|
|
1559
|
-
R: function(
|
|
1560
|
-
const t =
|
|
1565
|
+
R: function(r, e) {
|
|
1566
|
+
const t = ct(r);
|
|
1561
1567
|
return _(t, e.length);
|
|
1562
1568
|
},
|
|
1563
1569
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1569,192 +1575,182 @@ const C = {
|
|
|
1569
1575
|
// | BC 2 | 2 | -1 |
|
|
1570
1576
|
// Also `yy` always returns the last two digits of a year,
|
|
1571
1577
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1572
|
-
u: function(
|
|
1573
|
-
const t =
|
|
1578
|
+
u: function(r, e) {
|
|
1579
|
+
const t = r.getFullYear();
|
|
1574
1580
|
return _(t, e.length);
|
|
1575
1581
|
},
|
|
1576
1582
|
// Quarter
|
|
1577
|
-
Q: function(
|
|
1578
|
-
const
|
|
1583
|
+
Q: function(r, e, t) {
|
|
1584
|
+
const n = Math.ceil((r.getMonth() + 1) / 3);
|
|
1579
1585
|
switch (e) {
|
|
1580
1586
|
// 1, 2, 3, 4
|
|
1581
1587
|
case "Q":
|
|
1582
|
-
return String(
|
|
1588
|
+
return String(n);
|
|
1583
1589
|
// 01, 02, 03, 04
|
|
1584
1590
|
case "QQ":
|
|
1585
|
-
return _(
|
|
1591
|
+
return _(n, 2);
|
|
1586
1592
|
// 1st, 2nd, 3rd, 4th
|
|
1587
1593
|
case "Qo":
|
|
1588
|
-
return t.ordinalNumber(
|
|
1594
|
+
return t.ordinalNumber(n, { unit: "quarter" });
|
|
1589
1595
|
// Q1, Q2, Q3, Q4
|
|
1590
1596
|
case "QQQ":
|
|
1591
|
-
return t.quarter(
|
|
1597
|
+
return t.quarter(n, {
|
|
1592
1598
|
width: "abbreviated",
|
|
1593
1599
|
context: "formatting"
|
|
1594
1600
|
});
|
|
1595
1601
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1596
1602
|
case "QQQQQ":
|
|
1597
|
-
return t.quarter(
|
|
1603
|
+
return t.quarter(n, {
|
|
1598
1604
|
width: "narrow",
|
|
1599
1605
|
context: "formatting"
|
|
1600
1606
|
});
|
|
1601
|
-
// 1st quarter, 2nd quarter, ...
|
|
1602
|
-
case "QQQQ":
|
|
1603
1607
|
default:
|
|
1604
|
-
return t.quarter(
|
|
1608
|
+
return t.quarter(n, {
|
|
1605
1609
|
width: "wide",
|
|
1606
1610
|
context: "formatting"
|
|
1607
1611
|
});
|
|
1608
1612
|
}
|
|
1609
1613
|
},
|
|
1610
1614
|
// Stand-alone quarter
|
|
1611
|
-
q: function(
|
|
1612
|
-
const
|
|
1615
|
+
q: function(r, e, t) {
|
|
1616
|
+
const n = Math.ceil((r.getMonth() + 1) / 3);
|
|
1613
1617
|
switch (e) {
|
|
1614
1618
|
// 1, 2, 3, 4
|
|
1615
1619
|
case "q":
|
|
1616
|
-
return String(
|
|
1620
|
+
return String(n);
|
|
1617
1621
|
// 01, 02, 03, 04
|
|
1618
1622
|
case "qq":
|
|
1619
|
-
return _(
|
|
1623
|
+
return _(n, 2);
|
|
1620
1624
|
// 1st, 2nd, 3rd, 4th
|
|
1621
1625
|
case "qo":
|
|
1622
|
-
return t.ordinalNumber(
|
|
1626
|
+
return t.ordinalNumber(n, { unit: "quarter" });
|
|
1623
1627
|
// Q1, Q2, Q3, Q4
|
|
1624
1628
|
case "qqq":
|
|
1625
|
-
return t.quarter(
|
|
1629
|
+
return t.quarter(n, {
|
|
1626
1630
|
width: "abbreviated",
|
|
1627
1631
|
context: "standalone"
|
|
1628
1632
|
});
|
|
1629
1633
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1630
1634
|
case "qqqqq":
|
|
1631
|
-
return t.quarter(
|
|
1635
|
+
return t.quarter(n, {
|
|
1632
1636
|
width: "narrow",
|
|
1633
1637
|
context: "standalone"
|
|
1634
1638
|
});
|
|
1635
|
-
// 1st quarter, 2nd quarter, ...
|
|
1636
|
-
case "qqqq":
|
|
1637
1639
|
default:
|
|
1638
|
-
return t.quarter(
|
|
1640
|
+
return t.quarter(n, {
|
|
1639
1641
|
width: "wide",
|
|
1640
1642
|
context: "standalone"
|
|
1641
1643
|
});
|
|
1642
1644
|
}
|
|
1643
1645
|
},
|
|
1644
1646
|
// Month
|
|
1645
|
-
M: function(
|
|
1646
|
-
const
|
|
1647
|
+
M: function(r, e, t) {
|
|
1648
|
+
const n = r.getMonth();
|
|
1647
1649
|
switch (e) {
|
|
1648
1650
|
case "M":
|
|
1649
1651
|
case "MM":
|
|
1650
|
-
return
|
|
1652
|
+
return j.M(r, e);
|
|
1651
1653
|
// 1st, 2nd, ..., 12th
|
|
1652
1654
|
case "Mo":
|
|
1653
|
-
return t.ordinalNumber(
|
|
1655
|
+
return t.ordinalNumber(n + 1, { unit: "month" });
|
|
1654
1656
|
// Jan, Feb, ..., Dec
|
|
1655
1657
|
case "MMM":
|
|
1656
|
-
return t.month(
|
|
1658
|
+
return t.month(n, {
|
|
1657
1659
|
width: "abbreviated",
|
|
1658
1660
|
context: "formatting"
|
|
1659
1661
|
});
|
|
1660
1662
|
// J, F, ..., D
|
|
1661
1663
|
case "MMMMM":
|
|
1662
|
-
return t.month(
|
|
1664
|
+
return t.month(n, {
|
|
1663
1665
|
width: "narrow",
|
|
1664
1666
|
context: "formatting"
|
|
1665
1667
|
});
|
|
1666
|
-
// January, February, ..., December
|
|
1667
|
-
case "MMMM":
|
|
1668
1668
|
default:
|
|
1669
|
-
return t.month(
|
|
1669
|
+
return t.month(n, { width: "wide", context: "formatting" });
|
|
1670
1670
|
}
|
|
1671
1671
|
},
|
|
1672
1672
|
// Stand-alone month
|
|
1673
|
-
L: function(
|
|
1674
|
-
const
|
|
1673
|
+
L: function(r, e, t) {
|
|
1674
|
+
const n = r.getMonth();
|
|
1675
1675
|
switch (e) {
|
|
1676
1676
|
// 1, 2, ..., 12
|
|
1677
1677
|
case "L":
|
|
1678
|
-
return String(
|
|
1678
|
+
return String(n + 1);
|
|
1679
1679
|
// 01, 02, ..., 12
|
|
1680
1680
|
case "LL":
|
|
1681
|
-
return _(
|
|
1681
|
+
return _(n + 1, 2);
|
|
1682
1682
|
// 1st, 2nd, ..., 12th
|
|
1683
1683
|
case "Lo":
|
|
1684
|
-
return t.ordinalNumber(
|
|
1684
|
+
return t.ordinalNumber(n + 1, { unit: "month" });
|
|
1685
1685
|
// Jan, Feb, ..., Dec
|
|
1686
1686
|
case "LLL":
|
|
1687
|
-
return t.month(
|
|
1687
|
+
return t.month(n, {
|
|
1688
1688
|
width: "abbreviated",
|
|
1689
1689
|
context: "standalone"
|
|
1690
1690
|
});
|
|
1691
1691
|
// J, F, ..., D
|
|
1692
1692
|
case "LLLLL":
|
|
1693
|
-
return t.month(
|
|
1693
|
+
return t.month(n, {
|
|
1694
1694
|
width: "narrow",
|
|
1695
1695
|
context: "standalone"
|
|
1696
1696
|
});
|
|
1697
|
-
// January, February, ..., December
|
|
1698
|
-
case "LLLL":
|
|
1699
1697
|
default:
|
|
1700
|
-
return t.month(
|
|
1698
|
+
return t.month(n, { width: "wide", context: "standalone" });
|
|
1701
1699
|
}
|
|
1702
1700
|
},
|
|
1703
1701
|
// Local week of year
|
|
1704
|
-
w: function(
|
|
1705
|
-
const i =
|
|
1702
|
+
w: function(r, e, t, n) {
|
|
1703
|
+
const i = ft(r, n);
|
|
1706
1704
|
return e === "wo" ? t.ordinalNumber(i, { unit: "week" }) : _(i, e.length);
|
|
1707
1705
|
},
|
|
1708
1706
|
// ISO week of year
|
|
1709
|
-
I: function(
|
|
1710
|
-
const
|
|
1711
|
-
return e === "Io" ? t.ordinalNumber(
|
|
1707
|
+
I: function(r, e, t) {
|
|
1708
|
+
const n = pt(r);
|
|
1709
|
+
return e === "Io" ? t.ordinalNumber(n, { unit: "week" }) : _(n, e.length);
|
|
1712
1710
|
},
|
|
1713
1711
|
// Day of the month
|
|
1714
|
-
d: function(
|
|
1715
|
-
return e === "do" ? t.ordinalNumber(
|
|
1712
|
+
d: function(r, e, t) {
|
|
1713
|
+
return e === "do" ? t.ordinalNumber(r.getDate(), { unit: "date" }) : j.d(r, e);
|
|
1716
1714
|
},
|
|
1717
1715
|
// Day of year
|
|
1718
|
-
D: function(
|
|
1719
|
-
const
|
|
1720
|
-
return e === "Do" ? t.ordinalNumber(
|
|
1716
|
+
D: function(r, e, t) {
|
|
1717
|
+
const n = Zn(r);
|
|
1718
|
+
return e === "Do" ? t.ordinalNumber(n, { unit: "dayOfYear" }) : _(n, e.length);
|
|
1721
1719
|
},
|
|
1722
1720
|
// Day of week
|
|
1723
|
-
E: function(
|
|
1724
|
-
const
|
|
1721
|
+
E: function(r, e, t) {
|
|
1722
|
+
const n = r.getDay();
|
|
1725
1723
|
switch (e) {
|
|
1726
1724
|
// Tue
|
|
1727
1725
|
case "E":
|
|
1728
1726
|
case "EE":
|
|
1729
1727
|
case "EEE":
|
|
1730
|
-
return t.day(
|
|
1728
|
+
return t.day(n, {
|
|
1731
1729
|
width: "abbreviated",
|
|
1732
1730
|
context: "formatting"
|
|
1733
1731
|
});
|
|
1734
1732
|
// T
|
|
1735
1733
|
case "EEEEE":
|
|
1736
|
-
return t.day(
|
|
1734
|
+
return t.day(n, {
|
|
1737
1735
|
width: "narrow",
|
|
1738
1736
|
context: "formatting"
|
|
1739
1737
|
});
|
|
1740
1738
|
// Tu
|
|
1741
1739
|
case "EEEEEE":
|
|
1742
|
-
return t.day(
|
|
1740
|
+
return t.day(n, {
|
|
1743
1741
|
width: "short",
|
|
1744
1742
|
context: "formatting"
|
|
1745
1743
|
});
|
|
1746
|
-
// Tuesday
|
|
1747
|
-
case "EEEE":
|
|
1748
1744
|
default:
|
|
1749
|
-
return t.day(
|
|
1745
|
+
return t.day(n, {
|
|
1750
1746
|
width: "wide",
|
|
1751
1747
|
context: "formatting"
|
|
1752
1748
|
});
|
|
1753
1749
|
}
|
|
1754
1750
|
},
|
|
1755
1751
|
// Local day of week
|
|
1756
|
-
e: function(
|
|
1757
|
-
const i =
|
|
1752
|
+
e: function(r, e, t, n) {
|
|
1753
|
+
const i = r.getDay(), a = (i - n.weekStartsOn + 8) % 7 || 7;
|
|
1758
1754
|
switch (e) {
|
|
1759
1755
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1760
1756
|
case "e":
|
|
@@ -1782,8 +1778,6 @@ const C = {
|
|
|
1782
1778
|
width: "short",
|
|
1783
1779
|
context: "formatting"
|
|
1784
1780
|
});
|
|
1785
|
-
// Tuesday
|
|
1786
|
-
case "eeee":
|
|
1787
1781
|
default:
|
|
1788
1782
|
return t.day(i, {
|
|
1789
1783
|
width: "wide",
|
|
@@ -1792,8 +1786,8 @@ const C = {
|
|
|
1792
1786
|
}
|
|
1793
1787
|
},
|
|
1794
1788
|
// Stand-alone local day of week
|
|
1795
|
-
c: function(
|
|
1796
|
-
const i =
|
|
1789
|
+
c: function(r, e, t, n) {
|
|
1790
|
+
const i = r.getDay(), a = (i - n.weekStartsOn + 8) % 7 || 7;
|
|
1797
1791
|
switch (e) {
|
|
1798
1792
|
// Numerical value (same as in `e`)
|
|
1799
1793
|
case "c":
|
|
@@ -1821,8 +1815,6 @@ const C = {
|
|
|
1821
1815
|
width: "short",
|
|
1822
1816
|
context: "standalone"
|
|
1823
1817
|
});
|
|
1824
|
-
// Tuesday
|
|
1825
|
-
case "cccc":
|
|
1826
1818
|
default:
|
|
1827
1819
|
return t.day(i, {
|
|
1828
1820
|
width: "wide",
|
|
@@ -1831,8 +1823,8 @@ const C = {
|
|
|
1831
1823
|
}
|
|
1832
1824
|
},
|
|
1833
1825
|
// ISO day of week
|
|
1834
|
-
i: function(
|
|
1835
|
-
const
|
|
1826
|
+
i: function(r, e, t) {
|
|
1827
|
+
const n = r.getDay(), i = n === 0 ? 7 : n;
|
|
1836
1828
|
switch (e) {
|
|
1837
1829
|
// 2
|
|
1838
1830
|
case "i":
|
|
@@ -1845,34 +1837,32 @@ const C = {
|
|
|
1845
1837
|
return t.ordinalNumber(i, { unit: "day" });
|
|
1846
1838
|
// Tue
|
|
1847
1839
|
case "iii":
|
|
1848
|
-
return t.day(
|
|
1840
|
+
return t.day(n, {
|
|
1849
1841
|
width: "abbreviated",
|
|
1850
1842
|
context: "formatting"
|
|
1851
1843
|
});
|
|
1852
1844
|
// T
|
|
1853
1845
|
case "iiiii":
|
|
1854
|
-
return t.day(
|
|
1846
|
+
return t.day(n, {
|
|
1855
1847
|
width: "narrow",
|
|
1856
1848
|
context: "formatting"
|
|
1857
1849
|
});
|
|
1858
1850
|
// Tu
|
|
1859
1851
|
case "iiiiii":
|
|
1860
|
-
return t.day(
|
|
1852
|
+
return t.day(n, {
|
|
1861
1853
|
width: "short",
|
|
1862
1854
|
context: "formatting"
|
|
1863
1855
|
});
|
|
1864
|
-
// Tuesday
|
|
1865
|
-
case "iiii":
|
|
1866
1856
|
default:
|
|
1867
|
-
return t.day(
|
|
1857
|
+
return t.day(n, {
|
|
1868
1858
|
width: "wide",
|
|
1869
1859
|
context: "formatting"
|
|
1870
1860
|
});
|
|
1871
1861
|
}
|
|
1872
1862
|
},
|
|
1873
1863
|
// AM or PM
|
|
1874
|
-
a: function(
|
|
1875
|
-
const i =
|
|
1864
|
+
a: function(r, e, t) {
|
|
1865
|
+
const i = r.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1876
1866
|
switch (e) {
|
|
1877
1867
|
case "a":
|
|
1878
1868
|
case "aa":
|
|
@@ -1890,7 +1880,6 @@ const C = {
|
|
|
1890
1880
|
width: "narrow",
|
|
1891
1881
|
context: "formatting"
|
|
1892
1882
|
});
|
|
1893
|
-
case "aaaa":
|
|
1894
1883
|
default:
|
|
1895
1884
|
return t.dayPeriod(i, {
|
|
1896
1885
|
width: "wide",
|
|
@@ -1899,10 +1888,10 @@ const C = {
|
|
|
1899
1888
|
}
|
|
1900
1889
|
},
|
|
1901
1890
|
// AM, PM, midnight, noon
|
|
1902
|
-
b: function(
|
|
1903
|
-
const
|
|
1891
|
+
b: function(r, e, t) {
|
|
1892
|
+
const n = r.getHours();
|
|
1904
1893
|
let i;
|
|
1905
|
-
switch (
|
|
1894
|
+
switch (n === 12 ? i = Q.noon : n === 0 ? i = Q.midnight : i = n / 12 >= 1 ? "pm" : "am", e) {
|
|
1906
1895
|
case "b":
|
|
1907
1896
|
case "bb":
|
|
1908
1897
|
return t.dayPeriod(i, {
|
|
@@ -1919,7 +1908,6 @@ const C = {
|
|
|
1919
1908
|
width: "narrow",
|
|
1920
1909
|
context: "formatting"
|
|
1921
1910
|
});
|
|
1922
|
-
case "bbbb":
|
|
1923
1911
|
default:
|
|
1924
1912
|
return t.dayPeriod(i, {
|
|
1925
1913
|
width: "wide",
|
|
@@ -1928,10 +1916,10 @@ const C = {
|
|
|
1928
1916
|
}
|
|
1929
1917
|
},
|
|
1930
1918
|
// in the morning, in the afternoon, in the evening, at night
|
|
1931
|
-
B: function(
|
|
1932
|
-
const
|
|
1919
|
+
B: function(r, e, t) {
|
|
1920
|
+
const n = r.getHours();
|
|
1933
1921
|
let i;
|
|
1934
|
-
switch (
|
|
1922
|
+
switch (n >= 17 ? i = Q.evening : n >= 12 ? i = Q.afternoon : n >= 4 ? i = Q.morning : i = Q.night, e) {
|
|
1935
1923
|
case "B":
|
|
1936
1924
|
case "BB":
|
|
1937
1925
|
case "BBB":
|
|
@@ -1944,7 +1932,6 @@ const C = {
|
|
|
1944
1932
|
width: "narrow",
|
|
1945
1933
|
context: "formatting"
|
|
1946
1934
|
});
|
|
1947
|
-
case "BBBB":
|
|
1948
1935
|
default:
|
|
1949
1936
|
return t.dayPeriod(i, {
|
|
1950
1937
|
width: "wide",
|
|
@@ -1953,168 +1940,152 @@ const C = {
|
|
|
1953
1940
|
}
|
|
1954
1941
|
},
|
|
1955
1942
|
// Hour [1-12]
|
|
1956
|
-
h: function(
|
|
1943
|
+
h: function(r, e, t) {
|
|
1957
1944
|
if (e === "ho") {
|
|
1958
|
-
let
|
|
1959
|
-
return
|
|
1945
|
+
let n = r.getHours() % 12;
|
|
1946
|
+
return n === 0 && (n = 12), t.ordinalNumber(n, { unit: "hour" });
|
|
1960
1947
|
}
|
|
1961
|
-
return
|
|
1948
|
+
return j.h(r, e);
|
|
1962
1949
|
},
|
|
1963
1950
|
// Hour [0-23]
|
|
1964
|
-
H: function(
|
|
1965
|
-
return e === "Ho" ? t.ordinalNumber(
|
|
1951
|
+
H: function(r, e, t) {
|
|
1952
|
+
return e === "Ho" ? t.ordinalNumber(r.getHours(), { unit: "hour" }) : j.H(r, e);
|
|
1966
1953
|
},
|
|
1967
1954
|
// Hour [0-11]
|
|
1968
|
-
K: function(
|
|
1969
|
-
const
|
|
1970
|
-
return e === "Ko" ? t.ordinalNumber(
|
|
1955
|
+
K: function(r, e, t) {
|
|
1956
|
+
const n = r.getHours() % 12;
|
|
1957
|
+
return e === "Ko" ? t.ordinalNumber(n, { unit: "hour" }) : _(n, e.length);
|
|
1971
1958
|
},
|
|
1972
1959
|
// Hour [1-24]
|
|
1973
|
-
k: function(
|
|
1974
|
-
let
|
|
1975
|
-
return
|
|
1960
|
+
k: function(r, e, t) {
|
|
1961
|
+
let n = r.getHours();
|
|
1962
|
+
return n === 0 && (n = 24), e === "ko" ? t.ordinalNumber(n, { unit: "hour" }) : _(n, e.length);
|
|
1976
1963
|
},
|
|
1977
1964
|
// Minute
|
|
1978
|
-
m: function(
|
|
1979
|
-
return e === "mo" ? t.ordinalNumber(
|
|
1965
|
+
m: function(r, e, t) {
|
|
1966
|
+
return e === "mo" ? t.ordinalNumber(r.getMinutes(), { unit: "minute" }) : j.m(r, e);
|
|
1980
1967
|
},
|
|
1981
1968
|
// Second
|
|
1982
|
-
s: function(
|
|
1983
|
-
return e === "so" ? t.ordinalNumber(
|
|
1969
|
+
s: function(r, e, t) {
|
|
1970
|
+
return e === "so" ? t.ordinalNumber(r.getSeconds(), { unit: "second" }) : j.s(r, e);
|
|
1984
1971
|
},
|
|
1985
1972
|
// Fraction of second
|
|
1986
|
-
S: function(
|
|
1987
|
-
return
|
|
1973
|
+
S: function(r, e) {
|
|
1974
|
+
return j.S(r, e);
|
|
1988
1975
|
},
|
|
1989
1976
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1990
|
-
X: function(
|
|
1991
|
-
const
|
|
1992
|
-
if (
|
|
1977
|
+
X: function(r, e, t) {
|
|
1978
|
+
const n = r.getTimezoneOffset();
|
|
1979
|
+
if (n === 0)
|
|
1993
1980
|
return "Z";
|
|
1994
1981
|
switch (e) {
|
|
1995
1982
|
// Hours and optional minutes
|
|
1996
1983
|
case "X":
|
|
1997
|
-
return
|
|
1984
|
+
return Ve(n);
|
|
1998
1985
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1999
1986
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2000
1987
|
// so this token always has the same output as `XX`
|
|
2001
1988
|
case "XXXX":
|
|
2002
1989
|
case "XX":
|
|
2003
|
-
return I(
|
|
2004
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
2005
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2006
|
-
// so this token always has the same output as `XXX`
|
|
2007
|
-
case "XXXXX":
|
|
2008
|
-
case "XXX":
|
|
1990
|
+
return I(n);
|
|
2009
1991
|
// Hours and minutes with `:` delimiter
|
|
2010
1992
|
default:
|
|
2011
|
-
return I(
|
|
1993
|
+
return I(n, ":");
|
|
2012
1994
|
}
|
|
2013
1995
|
},
|
|
2014
1996
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2015
|
-
x: function(
|
|
2016
|
-
const
|
|
1997
|
+
x: function(r, e, t) {
|
|
1998
|
+
const n = r.getTimezoneOffset();
|
|
2017
1999
|
switch (e) {
|
|
2018
2000
|
// Hours and optional minutes
|
|
2019
2001
|
case "x":
|
|
2020
|
-
return
|
|
2002
|
+
return Ve(n);
|
|
2021
2003
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
2022
2004
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2023
2005
|
// so this token always has the same output as `xx`
|
|
2024
2006
|
case "xxxx":
|
|
2025
2007
|
case "xx":
|
|
2026
|
-
return I(
|
|
2027
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
2028
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2029
|
-
// so this token always has the same output as `xxx`
|
|
2030
|
-
case "xxxxx":
|
|
2031
|
-
case "xxx":
|
|
2008
|
+
return I(n);
|
|
2032
2009
|
// Hours and minutes with `:` delimiter
|
|
2033
2010
|
default:
|
|
2034
|
-
return I(
|
|
2011
|
+
return I(n, ":");
|
|
2035
2012
|
}
|
|
2036
2013
|
},
|
|
2037
2014
|
// Timezone (GMT)
|
|
2038
|
-
O: function(
|
|
2039
|
-
const
|
|
2015
|
+
O: function(r, e, t) {
|
|
2016
|
+
const n = r.getTimezoneOffset();
|
|
2040
2017
|
switch (e) {
|
|
2041
2018
|
// Short
|
|
2042
2019
|
case "O":
|
|
2043
2020
|
case "OO":
|
|
2044
2021
|
case "OOO":
|
|
2045
|
-
return "GMT" + Ge(
|
|
2046
|
-
// Long
|
|
2047
|
-
case "OOOO":
|
|
2022
|
+
return "GMT" + Ge(n, ":");
|
|
2048
2023
|
default:
|
|
2049
|
-
return "GMT" + I(
|
|
2024
|
+
return "GMT" + I(n, ":");
|
|
2050
2025
|
}
|
|
2051
2026
|
},
|
|
2052
2027
|
// Timezone (specific non-location)
|
|
2053
|
-
z: function(
|
|
2054
|
-
const
|
|
2028
|
+
z: function(r, e, t) {
|
|
2029
|
+
const n = r.getTimezoneOffset();
|
|
2055
2030
|
switch (e) {
|
|
2056
2031
|
// Short
|
|
2057
2032
|
case "z":
|
|
2058
2033
|
case "zz":
|
|
2059
2034
|
case "zzz":
|
|
2060
|
-
return "GMT" + Ge(
|
|
2061
|
-
// Long
|
|
2062
|
-
case "zzzz":
|
|
2035
|
+
return "GMT" + Ge(n, ":");
|
|
2063
2036
|
default:
|
|
2064
|
-
return "GMT" + I(
|
|
2037
|
+
return "GMT" + I(n, ":");
|
|
2065
2038
|
}
|
|
2066
2039
|
},
|
|
2067
2040
|
// Seconds timestamp
|
|
2068
|
-
t: function(
|
|
2069
|
-
const
|
|
2070
|
-
return _(
|
|
2041
|
+
t: function(r, e, t) {
|
|
2042
|
+
const n = Math.trunc(+r / 1e3);
|
|
2043
|
+
return _(n, e.length);
|
|
2071
2044
|
},
|
|
2072
2045
|
// Milliseconds timestamp
|
|
2073
|
-
T: function(
|
|
2074
|
-
return _(+
|
|
2046
|
+
T: function(r, e, t) {
|
|
2047
|
+
return _(+r, e.length);
|
|
2075
2048
|
}
|
|
2076
2049
|
};
|
|
2077
|
-
function Ge(
|
|
2078
|
-
const t =
|
|
2050
|
+
function Ge(r, e = "") {
|
|
2051
|
+
const t = r > 0 ? "-" : "+", n = Math.abs(r), i = Math.trunc(n / 60), a = n % 60;
|
|
2079
2052
|
return a === 0 ? t + String(i) : t + String(i) + e + _(a, 2);
|
|
2080
2053
|
}
|
|
2081
|
-
function
|
|
2082
|
-
return
|
|
2054
|
+
function Ve(r, e) {
|
|
2055
|
+
return r % 60 === 0 ? (r > 0 ? "-" : "+") + _(Math.abs(r) / 60, 2) : I(r, e);
|
|
2083
2056
|
}
|
|
2084
|
-
function I(
|
|
2085
|
-
const t =
|
|
2057
|
+
function I(r, e = "") {
|
|
2058
|
+
const t = r > 0 ? "-" : "+", n = Math.abs(r), i = _(Math.trunc(n / 60), 2), a = _(n % 60, 2);
|
|
2086
2059
|
return t + i + e + a;
|
|
2087
2060
|
}
|
|
2088
|
-
const
|
|
2089
|
-
switch (
|
|
2061
|
+
const ze = (r, e) => {
|
|
2062
|
+
switch (r) {
|
|
2090
2063
|
case "P":
|
|
2091
2064
|
return e.date({ width: "short" });
|
|
2092
2065
|
case "PP":
|
|
2093
2066
|
return e.date({ width: "medium" });
|
|
2094
2067
|
case "PPP":
|
|
2095
2068
|
return e.date({ width: "long" });
|
|
2096
|
-
case "PPPP":
|
|
2097
2069
|
default:
|
|
2098
2070
|
return e.date({ width: "full" });
|
|
2099
2071
|
}
|
|
2100
|
-
},
|
|
2101
|
-
switch (
|
|
2072
|
+
}, ht = (r, e) => {
|
|
2073
|
+
switch (r) {
|
|
2102
2074
|
case "p":
|
|
2103
2075
|
return e.time({ width: "short" });
|
|
2104
2076
|
case "pp":
|
|
2105
2077
|
return e.time({ width: "medium" });
|
|
2106
2078
|
case "ppp":
|
|
2107
2079
|
return e.time({ width: "long" });
|
|
2108
|
-
case "pppp":
|
|
2109
2080
|
default:
|
|
2110
2081
|
return e.time({ width: "full" });
|
|
2111
2082
|
}
|
|
2112
|
-
},
|
|
2113
|
-
const t =
|
|
2083
|
+
}, Kn = (r, e) => {
|
|
2084
|
+
const t = r.match(/(P+)(p+)?/) || [], n = t[1], i = t[2];
|
|
2114
2085
|
if (!i)
|
|
2115
|
-
return
|
|
2086
|
+
return ze(r, e);
|
|
2116
2087
|
let a;
|
|
2117
|
-
switch (
|
|
2088
|
+
switch (n) {
|
|
2118
2089
|
case "P":
|
|
2119
2090
|
a = e.dateTime({ width: "short" });
|
|
2120
2091
|
break;
|
|
@@ -2124,51 +2095,50 @@ const Ve = (n, e) => {
|
|
|
2124
2095
|
case "PPP":
|
|
2125
2096
|
a = e.dateTime({ width: "long" });
|
|
2126
2097
|
break;
|
|
2127
|
-
case "PPPP":
|
|
2128
2098
|
default:
|
|
2129
2099
|
a = e.dateTime({ width: "full" });
|
|
2130
2100
|
break;
|
|
2131
2101
|
}
|
|
2132
|
-
return a.replace("{{date}}",
|
|
2133
|
-
},
|
|
2134
|
-
p:
|
|
2135
|
-
P:
|
|
2136
|
-
},
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2139
|
-
}
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2142
|
-
}
|
|
2143
|
-
function
|
|
2144
|
-
const
|
|
2145
|
-
if (console.warn(
|
|
2146
|
-
}
|
|
2147
|
-
function
|
|
2148
|
-
const
|
|
2149
|
-
return `Use \`${
|
|
2150
|
-
}
|
|
2151
|
-
const
|
|
2152
|
-
function
|
|
2153
|
-
const
|
|
2154
|
-
if (!
|
|
2102
|
+
return a.replace("{{date}}", ze(n, e)).replace("{{time}}", ht(i, e));
|
|
2103
|
+
}, ue = {
|
|
2104
|
+
p: ht,
|
|
2105
|
+
P: Kn
|
|
2106
|
+
}, Un = /^D+$/, ea = /^Y+$/, ta = ["D", "DD", "YY", "YYYY"];
|
|
2107
|
+
function mt(r) {
|
|
2108
|
+
return Un.test(r);
|
|
2109
|
+
}
|
|
2110
|
+
function _t(r) {
|
|
2111
|
+
return ea.test(r);
|
|
2112
|
+
}
|
|
2113
|
+
function ce(r, e, t) {
|
|
2114
|
+
const n = ra(r, e, t);
|
|
2115
|
+
if (console.warn(n), ta.includes(r)) throw new RangeError(n);
|
|
2116
|
+
}
|
|
2117
|
+
function ra(r, e, t) {
|
|
2118
|
+
const n = r[0] === "Y" ? "years" : "days of the month";
|
|
2119
|
+
return `Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2120
|
+
}
|
|
2121
|
+
const na = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, aa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ia = /^'([^]*?)'?$/, oa = /''/g, sa = /[a-zA-Z]/;
|
|
2122
|
+
function ua(r, e, t) {
|
|
2123
|
+
const n = S(), i = n.locale ?? dt, a = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = M(r, t?.in);
|
|
2124
|
+
if (!lt(s))
|
|
2155
2125
|
throw new RangeError("Invalid time value");
|
|
2156
|
-
let h = e.match(
|
|
2126
|
+
let h = e.match(aa).map((m) => {
|
|
2157
2127
|
const p = m[0];
|
|
2158
2128
|
if (p === "p" || p === "P") {
|
|
2159
|
-
const N =
|
|
2129
|
+
const N = ue[p];
|
|
2160
2130
|
return N(m, i.formatLong);
|
|
2161
2131
|
}
|
|
2162
2132
|
return m;
|
|
2163
|
-
}).join("").match(
|
|
2133
|
+
}).join("").match(na).map((m) => {
|
|
2164
2134
|
if (m === "''")
|
|
2165
2135
|
return { isToken: !1, value: "'" };
|
|
2166
2136
|
const p = m[0];
|
|
2167
2137
|
if (p === "'")
|
|
2168
|
-
return { isToken: !1, value:
|
|
2169
|
-
if (
|
|
2138
|
+
return { isToken: !1, value: ca(m) };
|
|
2139
|
+
if (Xe[p])
|
|
2170
2140
|
return { isToken: !0, value: m };
|
|
2171
|
-
if (p.match(
|
|
2141
|
+
if (p.match(sa))
|
|
2172
2142
|
throw new RangeError(
|
|
2173
2143
|
"Format string contains an unescaped latin alphabet character `" + p + "`"
|
|
2174
2144
|
);
|
|
@@ -2183,67 +2153,67 @@ function aa(n, e, t) {
|
|
|
2183
2153
|
return h.map((m) => {
|
|
2184
2154
|
if (!m.isToken) return m.value;
|
|
2185
2155
|
const p = m.value;
|
|
2186
|
-
(
|
|
2187
|
-
const N =
|
|
2156
|
+
(_t(p) || mt(p)) && ce(p, e, String(r));
|
|
2157
|
+
const N = Xe[p[0]];
|
|
2188
2158
|
return N(s, p, i.localize, c);
|
|
2189
2159
|
}).join("");
|
|
2190
2160
|
}
|
|
2191
|
-
function
|
|
2192
|
-
const e =
|
|
2193
|
-
return e ? e[1].replace(
|
|
2161
|
+
function ca(r) {
|
|
2162
|
+
const e = r.match(ia);
|
|
2163
|
+
return e ? e[1].replace(oa, "'") : r;
|
|
2194
2164
|
}
|
|
2195
|
-
function
|
|
2165
|
+
function la() {
|
|
2196
2166
|
return Object.assign({}, S());
|
|
2197
2167
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const t = M(
|
|
2168
|
+
function da(r, e) {
|
|
2169
|
+
const t = M(r, e?.in).getDay();
|
|
2200
2170
|
return t === 0 ? 7 : t;
|
|
2201
2171
|
}
|
|
2202
|
-
function
|
|
2203
|
-
const t =
|
|
2204
|
-
return t.setFullYear(
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2172
|
+
function pa(r, e) {
|
|
2173
|
+
const t = fa(e) ? new e(0) : D(e, 0);
|
|
2174
|
+
return t.setFullYear(r.getFullYear(), r.getMonth(), r.getDate()), t.setHours(
|
|
2175
|
+
r.getHours(),
|
|
2176
|
+
r.getMinutes(),
|
|
2177
|
+
r.getSeconds(),
|
|
2178
|
+
r.getMilliseconds()
|
|
2209
2179
|
), t;
|
|
2210
2180
|
}
|
|
2211
|
-
function
|
|
2212
|
-
return typeof
|
|
2181
|
+
function fa(r) {
|
|
2182
|
+
return typeof r == "function" && r.prototype?.constructor === r;
|
|
2213
2183
|
}
|
|
2214
|
-
const
|
|
2215
|
-
class
|
|
2184
|
+
const ha = 10;
|
|
2185
|
+
class wt {
|
|
2216
2186
|
subPriority = 0;
|
|
2217
2187
|
validate(e, t) {
|
|
2218
2188
|
return !0;
|
|
2219
2189
|
}
|
|
2220
2190
|
}
|
|
2221
|
-
class
|
|
2222
|
-
constructor(e, t,
|
|
2223
|
-
super(), this.value = e, this.validateValue = t, this.setValue =
|
|
2191
|
+
class ma extends wt {
|
|
2192
|
+
constructor(e, t, n, i, a) {
|
|
2193
|
+
super(), this.value = e, this.validateValue = t, this.setValue = n, this.priority = i, a && (this.subPriority = a);
|
|
2224
2194
|
}
|
|
2225
2195
|
validate(e, t) {
|
|
2226
2196
|
return this.validateValue(e, this.value, t);
|
|
2227
2197
|
}
|
|
2228
|
-
set(e, t,
|
|
2229
|
-
return this.setValue(e, t, this.value,
|
|
2198
|
+
set(e, t, n) {
|
|
2199
|
+
return this.setValue(e, t, this.value, n);
|
|
2230
2200
|
}
|
|
2231
2201
|
}
|
|
2232
|
-
class
|
|
2233
|
-
priority =
|
|
2202
|
+
class _a extends wt {
|
|
2203
|
+
priority = ha;
|
|
2234
2204
|
subPriority = -1;
|
|
2235
2205
|
constructor(e, t) {
|
|
2236
|
-
super(), this.context = e || ((
|
|
2206
|
+
super(), this.context = e || ((n) => D(t, n));
|
|
2237
2207
|
}
|
|
2238
2208
|
set(e, t) {
|
|
2239
|
-
return t.timestampIsSet ? e : D(e,
|
|
2209
|
+
return t.timestampIsSet ? e : D(e, pa(e, this.context));
|
|
2240
2210
|
}
|
|
2241
2211
|
}
|
|
2242
2212
|
class f {
|
|
2243
|
-
run(e, t,
|
|
2244
|
-
const a = this.parse(e, t,
|
|
2213
|
+
run(e, t, n, i) {
|
|
2214
|
+
const a = this.parse(e, t, n, i);
|
|
2245
2215
|
return a ? {
|
|
2246
|
-
setter: new
|
|
2216
|
+
setter: new ma(
|
|
2247
2217
|
a.value,
|
|
2248
2218
|
this.validate,
|
|
2249
2219
|
this.set,
|
|
@@ -2253,30 +2223,28 @@ class f {
|
|
|
2253
2223
|
rest: a.rest
|
|
2254
2224
|
} : null;
|
|
2255
2225
|
}
|
|
2256
|
-
validate(e, t,
|
|
2226
|
+
validate(e, t, n) {
|
|
2257
2227
|
return !0;
|
|
2258
2228
|
}
|
|
2259
2229
|
}
|
|
2260
|
-
class
|
|
2230
|
+
class wa extends f {
|
|
2261
2231
|
priority = 140;
|
|
2262
|
-
parse(e, t,
|
|
2232
|
+
parse(e, t, n) {
|
|
2263
2233
|
switch (t) {
|
|
2264
2234
|
// AD, BC
|
|
2265
2235
|
case "G":
|
|
2266
2236
|
case "GG":
|
|
2267
2237
|
case "GGG":
|
|
2268
|
-
return
|
|
2238
|
+
return n.era(e, { width: "abbreviated" }) || n.era(e, { width: "narrow" });
|
|
2269
2239
|
// A, B
|
|
2270
2240
|
case "GGGGG":
|
|
2271
|
-
return
|
|
2272
|
-
// Anno Domini, Before Christ
|
|
2273
|
-
case "GGGG":
|
|
2241
|
+
return n.era(e, { width: "narrow" });
|
|
2274
2242
|
default:
|
|
2275
|
-
return
|
|
2243
|
+
return n.era(e, { width: "wide" }) || n.era(e, { width: "abbreviated" }) || n.era(e, { width: "narrow" });
|
|
2276
2244
|
}
|
|
2277
2245
|
}
|
|
2278
|
-
set(e, t,
|
|
2279
|
-
return t.era =
|
|
2246
|
+
set(e, t, n) {
|
|
2247
|
+
return t.era = n, e.setFullYear(n, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
2280
2248
|
}
|
|
2281
2249
|
incompatibleTokens = ["R", "u", "t", "T"];
|
|
2282
2250
|
}
|
|
@@ -2325,21 +2293,21 @@ const x = {
|
|
|
2325
2293
|
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
2326
2294
|
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
2327
2295
|
};
|
|
2328
|
-
function v(
|
|
2329
|
-
return
|
|
2330
|
-
value: e(
|
|
2331
|
-
rest:
|
|
2296
|
+
function v(r, e) {
|
|
2297
|
+
return r && {
|
|
2298
|
+
value: e(r.value),
|
|
2299
|
+
rest: r.rest
|
|
2332
2300
|
};
|
|
2333
2301
|
}
|
|
2334
|
-
function g(
|
|
2335
|
-
const t = e.match(
|
|
2302
|
+
function g(r, e) {
|
|
2303
|
+
const t = e.match(r);
|
|
2336
2304
|
return t ? {
|
|
2337
2305
|
value: parseInt(t[0], 10),
|
|
2338
2306
|
rest: e.slice(t[0].length)
|
|
2339
2307
|
} : null;
|
|
2340
2308
|
}
|
|
2341
|
-
function Y(
|
|
2342
|
-
const t = e.match(
|
|
2309
|
+
function Y(r, e) {
|
|
2310
|
+
const t = e.match(r);
|
|
2343
2311
|
if (!t)
|
|
2344
2312
|
return null;
|
|
2345
2313
|
if (t[0] === "Z")
|
|
@@ -2347,17 +2315,17 @@ function Y(n, e) {
|
|
|
2347
2315
|
value: 0,
|
|
2348
2316
|
rest: e.slice(1)
|
|
2349
2317
|
};
|
|
2350
|
-
const
|
|
2318
|
+
const n = t[1] === "+" ? 1 : -1, i = t[2] ? parseInt(t[2], 10) : 0, a = t[3] ? parseInt(t[3], 10) : 0, o = t[5] ? parseInt(t[5], 10) : 0;
|
|
2351
2319
|
return {
|
|
2352
|
-
value:
|
|
2320
|
+
value: n * (i * ln + a * cn + o * dn),
|
|
2353
2321
|
rest: e.slice(t[0].length)
|
|
2354
2322
|
};
|
|
2355
2323
|
}
|
|
2356
|
-
function
|
|
2357
|
-
return g(x.anyDigitsSigned,
|
|
2324
|
+
function yt(r) {
|
|
2325
|
+
return g(x.anyDigitsSigned, r);
|
|
2358
2326
|
}
|
|
2359
|
-
function b(
|
|
2360
|
-
switch (
|
|
2327
|
+
function b(r, e) {
|
|
2328
|
+
switch (r) {
|
|
2361
2329
|
case 1:
|
|
2362
2330
|
return g(x.singleDigit, e);
|
|
2363
2331
|
case 2:
|
|
@@ -2367,11 +2335,11 @@ function b(n, e) {
|
|
|
2367
2335
|
case 4:
|
|
2368
2336
|
return g(x.fourDigits, e);
|
|
2369
2337
|
default:
|
|
2370
|
-
return g(new RegExp("^\\d{1," +
|
|
2338
|
+
return g(new RegExp("^\\d{1," + r + "}"), e);
|
|
2371
2339
|
}
|
|
2372
2340
|
}
|
|
2373
|
-
function
|
|
2374
|
-
switch (
|
|
2341
|
+
function K(r, e) {
|
|
2342
|
+
switch (r) {
|
|
2375
2343
|
case 1:
|
|
2376
2344
|
return g(x.singleDigitSigned, e);
|
|
2377
2345
|
case 2:
|
|
@@ -2381,11 +2349,11 @@ function J(n, e) {
|
|
|
2381
2349
|
case 4:
|
|
2382
2350
|
return g(x.fourDigitsSigned, e);
|
|
2383
2351
|
default:
|
|
2384
|
-
return g(new RegExp("^-?\\d{1," +
|
|
2352
|
+
return g(new RegExp("^-?\\d{1," + r + "}"), e);
|
|
2385
2353
|
}
|
|
2386
2354
|
}
|
|
2387
|
-
function
|
|
2388
|
-
switch (
|
|
2355
|
+
function fe(r) {
|
|
2356
|
+
switch (r) {
|
|
2389
2357
|
case "morning":
|
|
2390
2358
|
return 4;
|
|
2391
2359
|
case "evening":
|
|
@@ -2394,31 +2362,28 @@ function pe(n) {
|
|
|
2394
2362
|
case "noon":
|
|
2395
2363
|
case "afternoon":
|
|
2396
2364
|
return 12;
|
|
2397
|
-
case "am":
|
|
2398
|
-
case "midnight":
|
|
2399
|
-
case "night":
|
|
2400
2365
|
default:
|
|
2401
2366
|
return 0;
|
|
2402
2367
|
}
|
|
2403
2368
|
}
|
|
2404
|
-
function
|
|
2405
|
-
const t = e > 0,
|
|
2369
|
+
function gt(r, e) {
|
|
2370
|
+
const t = e > 0, n = t ? e : 1 - e;
|
|
2406
2371
|
let i;
|
|
2407
|
-
if (
|
|
2408
|
-
i =
|
|
2372
|
+
if (n <= 50)
|
|
2373
|
+
i = r || 100;
|
|
2409
2374
|
else {
|
|
2410
|
-
const a =
|
|
2411
|
-
i =
|
|
2375
|
+
const a = n + 50, o = Math.trunc(a / 100) * 100, s = r >= a % 100;
|
|
2376
|
+
i = r + o - (s ? 100 : 0);
|
|
2412
2377
|
}
|
|
2413
2378
|
return t ? i : 1 - i;
|
|
2414
2379
|
}
|
|
2415
|
-
function
|
|
2416
|
-
return
|
|
2380
|
+
function bt(r) {
|
|
2381
|
+
return r % 400 === 0 || r % 4 === 0 && r % 100 !== 0;
|
|
2417
2382
|
}
|
|
2418
|
-
class
|
|
2383
|
+
class ya extends f {
|
|
2419
2384
|
priority = 130;
|
|
2420
2385
|
incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"];
|
|
2421
|
-
parse(e, t,
|
|
2386
|
+
parse(e, t, n) {
|
|
2422
2387
|
const i = (a) => ({
|
|
2423
2388
|
year: a,
|
|
2424
2389
|
isTwoDigitYear: t === "yy"
|
|
@@ -2428,7 +2393,7 @@ class ha extends f {
|
|
|
2428
2393
|
return v(b(4, e), i);
|
|
2429
2394
|
case "yo":
|
|
2430
2395
|
return v(
|
|
2431
|
-
|
|
2396
|
+
n.ordinalNumber(e, {
|
|
2432
2397
|
unit: "year"
|
|
2433
2398
|
}),
|
|
2434
2399
|
i
|
|
@@ -2440,22 +2405,22 @@ class ha extends f {
|
|
|
2440
2405
|
validate(e, t) {
|
|
2441
2406
|
return t.isTwoDigitYear || t.year > 0;
|
|
2442
2407
|
}
|
|
2443
|
-
set(e, t,
|
|
2408
|
+
set(e, t, n) {
|
|
2444
2409
|
const i = e.getFullYear();
|
|
2445
|
-
if (
|
|
2446
|
-
const o =
|
|
2447
|
-
|
|
2410
|
+
if (n.isTwoDigitYear) {
|
|
2411
|
+
const o = gt(
|
|
2412
|
+
n.year,
|
|
2448
2413
|
i
|
|
2449
2414
|
);
|
|
2450
2415
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
2451
2416
|
}
|
|
2452
|
-
const a = !("era" in t) || t.era === 1 ?
|
|
2417
|
+
const a = !("era" in t) || t.era === 1 ? n.year : 1 - n.year;
|
|
2453
2418
|
return e.setFullYear(a, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
2454
2419
|
}
|
|
2455
2420
|
}
|
|
2456
|
-
class
|
|
2421
|
+
class ga extends f {
|
|
2457
2422
|
priority = 130;
|
|
2458
|
-
parse(e, t,
|
|
2423
|
+
parse(e, t, n) {
|
|
2459
2424
|
const i = (a) => ({
|
|
2460
2425
|
year: a,
|
|
2461
2426
|
isTwoDigitYear: t === "YY"
|
|
@@ -2465,7 +2430,7 @@ class ma extends f {
|
|
|
2465
2430
|
return v(b(4, e), i);
|
|
2466
2431
|
case "Yo":
|
|
2467
2432
|
return v(
|
|
2468
|
-
|
|
2433
|
+
n.ordinalNumber(e, {
|
|
2469
2434
|
unit: "year"
|
|
2470
2435
|
}),
|
|
2471
2436
|
i
|
|
@@ -2477,11 +2442,11 @@ class ma extends f {
|
|
|
2477
2442
|
validate(e, t) {
|
|
2478
2443
|
return t.isTwoDigitYear || t.year > 0;
|
|
2479
2444
|
}
|
|
2480
|
-
set(e, t,
|
|
2481
|
-
const a =
|
|
2482
|
-
if (
|
|
2483
|
-
const s =
|
|
2484
|
-
|
|
2445
|
+
set(e, t, n, i) {
|
|
2446
|
+
const a = pe(e, i);
|
|
2447
|
+
if (n.isTwoDigitYear) {
|
|
2448
|
+
const s = gt(
|
|
2449
|
+
n.year,
|
|
2485
2450
|
a
|
|
2486
2451
|
);
|
|
2487
2452
|
return e.setFullYear(
|
|
@@ -2490,7 +2455,7 @@ class ma extends f {
|
|
|
2490
2455
|
i.firstWeekContainsDate
|
|
2491
2456
|
), e.setHours(0, 0, 0, 0), H(e, i);
|
|
2492
2457
|
}
|
|
2493
|
-
const o = !("era" in t) || t.era === 1 ?
|
|
2458
|
+
const o = !("era" in t) || t.era === 1 ? n.year : 1 - n.year;
|
|
2494
2459
|
return e.setFullYear(o, 0, i.firstWeekContainsDate), e.setHours(0, 0, 0, 0), H(e, i);
|
|
2495
2460
|
}
|
|
2496
2461
|
incompatibleTokens = [
|
|
@@ -2509,14 +2474,14 @@ class ma extends f {
|
|
|
2509
2474
|
"T"
|
|
2510
2475
|
];
|
|
2511
2476
|
}
|
|
2512
|
-
class
|
|
2477
|
+
class ba extends f {
|
|
2513
2478
|
priority = 130;
|
|
2514
2479
|
parse(e, t) {
|
|
2515
|
-
return
|
|
2480
|
+
return K(t === "R" ? 4 : t.length, e);
|
|
2516
2481
|
}
|
|
2517
|
-
set(e, t,
|
|
2482
|
+
set(e, t, n) {
|
|
2518
2483
|
const i = D(e, 0);
|
|
2519
|
-
return i.setFullYear(
|
|
2484
|
+
return i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0), B(i);
|
|
2520
2485
|
}
|
|
2521
2486
|
incompatibleTokens = [
|
|
2522
2487
|
"G",
|
|
@@ -2536,19 +2501,19 @@ class _a extends f {
|
|
|
2536
2501
|
"T"
|
|
2537
2502
|
];
|
|
2538
2503
|
}
|
|
2539
|
-
class
|
|
2504
|
+
class xa extends f {
|
|
2540
2505
|
priority = 130;
|
|
2541
2506
|
parse(e, t) {
|
|
2542
|
-
return
|
|
2507
|
+
return K(t === "u" ? 4 : t.length, e);
|
|
2543
2508
|
}
|
|
2544
|
-
set(e, t,
|
|
2545
|
-
return e.setFullYear(
|
|
2509
|
+
set(e, t, n) {
|
|
2510
|
+
return e.setFullYear(n, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
2546
2511
|
}
|
|
2547
2512
|
incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
|
|
2548
2513
|
}
|
|
2549
|
-
class
|
|
2514
|
+
class va extends f {
|
|
2550
2515
|
priority = 120;
|
|
2551
|
-
parse(e, t,
|
|
2516
|
+
parse(e, t, n) {
|
|
2552
2517
|
switch (t) {
|
|
2553
2518
|
// 1, 2, 3, 4
|
|
2554
2519
|
case "Q":
|
|
@@ -2556,32 +2521,30 @@ class ya extends f {
|
|
|
2556
2521
|
return b(t.length, e);
|
|
2557
2522
|
// 1st, 2nd, 3rd, 4th
|
|
2558
2523
|
case "Qo":
|
|
2559
|
-
return
|
|
2524
|
+
return n.ordinalNumber(e, { unit: "quarter" });
|
|
2560
2525
|
// Q1, Q2, Q3, Q4
|
|
2561
2526
|
case "QQQ":
|
|
2562
|
-
return
|
|
2527
|
+
return n.quarter(e, {
|
|
2563
2528
|
width: "abbreviated",
|
|
2564
2529
|
context: "formatting"
|
|
2565
|
-
}) ||
|
|
2530
|
+
}) || n.quarter(e, {
|
|
2566
2531
|
width: "narrow",
|
|
2567
2532
|
context: "formatting"
|
|
2568
2533
|
});
|
|
2569
2534
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
2570
2535
|
case "QQQQQ":
|
|
2571
|
-
return
|
|
2536
|
+
return n.quarter(e, {
|
|
2572
2537
|
width: "narrow",
|
|
2573
2538
|
context: "formatting"
|
|
2574
2539
|
});
|
|
2575
|
-
// 1st quarter, 2nd quarter, ...
|
|
2576
|
-
case "QQQQ":
|
|
2577
2540
|
default:
|
|
2578
|
-
return
|
|
2541
|
+
return n.quarter(e, {
|
|
2579
2542
|
width: "wide",
|
|
2580
2543
|
context: "formatting"
|
|
2581
|
-
}) ||
|
|
2544
|
+
}) || n.quarter(e, {
|
|
2582
2545
|
width: "abbreviated",
|
|
2583
2546
|
context: "formatting"
|
|
2584
|
-
}) ||
|
|
2547
|
+
}) || n.quarter(e, {
|
|
2585
2548
|
width: "narrow",
|
|
2586
2549
|
context: "formatting"
|
|
2587
2550
|
});
|
|
@@ -2590,8 +2553,8 @@ class ya extends f {
|
|
|
2590
2553
|
validate(e, t) {
|
|
2591
2554
|
return t >= 1 && t <= 4;
|
|
2592
2555
|
}
|
|
2593
|
-
set(e, t,
|
|
2594
|
-
return e.setMonth((
|
|
2556
|
+
set(e, t, n) {
|
|
2557
|
+
return e.setMonth((n - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2595
2558
|
}
|
|
2596
2559
|
incompatibleTokens = [
|
|
2597
2560
|
"Y",
|
|
@@ -2610,9 +2573,9 @@ class ya extends f {
|
|
|
2610
2573
|
"T"
|
|
2611
2574
|
];
|
|
2612
2575
|
}
|
|
2613
|
-
class
|
|
2576
|
+
class Pa extends f {
|
|
2614
2577
|
priority = 120;
|
|
2615
|
-
parse(e, t,
|
|
2578
|
+
parse(e, t, n) {
|
|
2616
2579
|
switch (t) {
|
|
2617
2580
|
// 1, 2, 3, 4
|
|
2618
2581
|
case "q":
|
|
@@ -2620,32 +2583,30 @@ class ga extends f {
|
|
|
2620
2583
|
return b(t.length, e);
|
|
2621
2584
|
// 1st, 2nd, 3rd, 4th
|
|
2622
2585
|
case "qo":
|
|
2623
|
-
return
|
|
2586
|
+
return n.ordinalNumber(e, { unit: "quarter" });
|
|
2624
2587
|
// Q1, Q2, Q3, Q4
|
|
2625
2588
|
case "qqq":
|
|
2626
|
-
return
|
|
2589
|
+
return n.quarter(e, {
|
|
2627
2590
|
width: "abbreviated",
|
|
2628
2591
|
context: "standalone"
|
|
2629
|
-
}) ||
|
|
2592
|
+
}) || n.quarter(e, {
|
|
2630
2593
|
width: "narrow",
|
|
2631
2594
|
context: "standalone"
|
|
2632
2595
|
});
|
|
2633
2596
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
2634
2597
|
case "qqqqq":
|
|
2635
|
-
return
|
|
2598
|
+
return n.quarter(e, {
|
|
2636
2599
|
width: "narrow",
|
|
2637
2600
|
context: "standalone"
|
|
2638
2601
|
});
|
|
2639
|
-
// 1st quarter, 2nd quarter, ...
|
|
2640
|
-
case "qqqq":
|
|
2641
2602
|
default:
|
|
2642
|
-
return
|
|
2603
|
+
return n.quarter(e, {
|
|
2643
2604
|
width: "wide",
|
|
2644
2605
|
context: "standalone"
|
|
2645
|
-
}) ||
|
|
2606
|
+
}) || n.quarter(e, {
|
|
2646
2607
|
width: "abbreviated",
|
|
2647
2608
|
context: "standalone"
|
|
2648
|
-
}) ||
|
|
2609
|
+
}) || n.quarter(e, {
|
|
2649
2610
|
width: "narrow",
|
|
2650
2611
|
context: "standalone"
|
|
2651
2612
|
});
|
|
@@ -2654,8 +2615,8 @@ class ga extends f {
|
|
|
2654
2615
|
validate(e, t) {
|
|
2655
2616
|
return t >= 1 && t <= 4;
|
|
2656
2617
|
}
|
|
2657
|
-
set(e, t,
|
|
2658
|
-
return e.setMonth((
|
|
2618
|
+
set(e, t, n) {
|
|
2619
|
+
return e.setMonth((n - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2659
2620
|
}
|
|
2660
2621
|
incompatibleTokens = [
|
|
2661
2622
|
"Y",
|
|
@@ -2674,7 +2635,7 @@ class ga extends f {
|
|
|
2674
2635
|
"T"
|
|
2675
2636
|
];
|
|
2676
2637
|
}
|
|
2677
|
-
class
|
|
2638
|
+
class Oa extends f {
|
|
2678
2639
|
incompatibleTokens = [
|
|
2679
2640
|
"Y",
|
|
2680
2641
|
"R",
|
|
@@ -2691,7 +2652,7 @@ class ba extends f {
|
|
|
2691
2652
|
"T"
|
|
2692
2653
|
];
|
|
2693
2654
|
priority = 110;
|
|
2694
|
-
parse(e, t,
|
|
2655
|
+
parse(e, t, n) {
|
|
2695
2656
|
const i = (a) => a - 1;
|
|
2696
2657
|
switch (t) {
|
|
2697
2658
|
// 1, 2, ..., 12
|
|
@@ -2706,42 +2667,40 @@ class ba extends f {
|
|
|
2706
2667
|
// 1st, 2nd, ..., 12th
|
|
2707
2668
|
case "Mo":
|
|
2708
2669
|
return v(
|
|
2709
|
-
|
|
2670
|
+
n.ordinalNumber(e, {
|
|
2710
2671
|
unit: "month"
|
|
2711
2672
|
}),
|
|
2712
2673
|
i
|
|
2713
2674
|
);
|
|
2714
2675
|
// Jan, Feb, ..., Dec
|
|
2715
2676
|
case "MMM":
|
|
2716
|
-
return
|
|
2677
|
+
return n.month(e, {
|
|
2717
2678
|
width: "abbreviated",
|
|
2718
2679
|
context: "formatting"
|
|
2719
|
-
}) ||
|
|
2680
|
+
}) || n.month(e, { width: "narrow", context: "formatting" });
|
|
2720
2681
|
// J, F, ..., D
|
|
2721
2682
|
case "MMMMM":
|
|
2722
|
-
return
|
|
2683
|
+
return n.month(e, {
|
|
2723
2684
|
width: "narrow",
|
|
2724
2685
|
context: "formatting"
|
|
2725
2686
|
});
|
|
2726
|
-
// January, February, ..., December
|
|
2727
|
-
case "MMMM":
|
|
2728
2687
|
default:
|
|
2729
|
-
return
|
|
2688
|
+
return n.month(e, { width: "wide", context: "formatting" }) || n.month(e, {
|
|
2730
2689
|
width: "abbreviated",
|
|
2731
2690
|
context: "formatting"
|
|
2732
|
-
}) ||
|
|
2691
|
+
}) || n.month(e, { width: "narrow", context: "formatting" });
|
|
2733
2692
|
}
|
|
2734
2693
|
}
|
|
2735
2694
|
validate(e, t) {
|
|
2736
2695
|
return t >= 0 && t <= 11;
|
|
2737
2696
|
}
|
|
2738
|
-
set(e, t,
|
|
2739
|
-
return e.setMonth(
|
|
2697
|
+
set(e, t, n) {
|
|
2698
|
+
return e.setMonth(n, 1), e.setHours(0, 0, 0, 0), e;
|
|
2740
2699
|
}
|
|
2741
2700
|
}
|
|
2742
|
-
class
|
|
2701
|
+
class Ma extends f {
|
|
2743
2702
|
priority = 110;
|
|
2744
|
-
parse(e, t,
|
|
2703
|
+
parse(e, t, n) {
|
|
2745
2704
|
const i = (a) => a - 1;
|
|
2746
2705
|
switch (t) {
|
|
2747
2706
|
// 1, 2, ..., 12
|
|
@@ -2756,37 +2715,35 @@ class xa extends f {
|
|
|
2756
2715
|
// 1st, 2nd, ..., 12th
|
|
2757
2716
|
case "Lo":
|
|
2758
2717
|
return v(
|
|
2759
|
-
|
|
2718
|
+
n.ordinalNumber(e, {
|
|
2760
2719
|
unit: "month"
|
|
2761
2720
|
}),
|
|
2762
2721
|
i
|
|
2763
2722
|
);
|
|
2764
2723
|
// Jan, Feb, ..., Dec
|
|
2765
2724
|
case "LLL":
|
|
2766
|
-
return
|
|
2725
|
+
return n.month(e, {
|
|
2767
2726
|
width: "abbreviated",
|
|
2768
2727
|
context: "standalone"
|
|
2769
|
-
}) ||
|
|
2728
|
+
}) || n.month(e, { width: "narrow", context: "standalone" });
|
|
2770
2729
|
// J, F, ..., D
|
|
2771
2730
|
case "LLLLL":
|
|
2772
|
-
return
|
|
2731
|
+
return n.month(e, {
|
|
2773
2732
|
width: "narrow",
|
|
2774
2733
|
context: "standalone"
|
|
2775
2734
|
});
|
|
2776
|
-
// January, February, ..., December
|
|
2777
|
-
case "LLLL":
|
|
2778
2735
|
default:
|
|
2779
|
-
return
|
|
2736
|
+
return n.month(e, { width: "wide", context: "standalone" }) || n.month(e, {
|
|
2780
2737
|
width: "abbreviated",
|
|
2781
2738
|
context: "standalone"
|
|
2782
|
-
}) ||
|
|
2739
|
+
}) || n.month(e, { width: "narrow", context: "standalone" });
|
|
2783
2740
|
}
|
|
2784
2741
|
}
|
|
2785
2742
|
validate(e, t) {
|
|
2786
2743
|
return t >= 0 && t <= 11;
|
|
2787
2744
|
}
|
|
2788
|
-
set(e, t,
|
|
2789
|
-
return e.setMonth(
|
|
2745
|
+
set(e, t, n) {
|
|
2746
|
+
return e.setMonth(n, 1), e.setHours(0, 0, 0, 0), e;
|
|
2790
2747
|
}
|
|
2791
2748
|
incompatibleTokens = [
|
|
2792
2749
|
"Y",
|
|
@@ -2804,18 +2761,18 @@ class xa extends f {
|
|
|
2804
2761
|
"T"
|
|
2805
2762
|
];
|
|
2806
2763
|
}
|
|
2807
|
-
function
|
|
2808
|
-
const
|
|
2809
|
-
return
|
|
2764
|
+
function Da(r, e, t) {
|
|
2765
|
+
const n = M(r, t?.in), i = ft(n, t) - e;
|
|
2766
|
+
return n.setDate(n.getDate() - i * 7), M(n, t?.in);
|
|
2810
2767
|
}
|
|
2811
|
-
class
|
|
2768
|
+
class Ta extends f {
|
|
2812
2769
|
priority = 100;
|
|
2813
|
-
parse(e, t,
|
|
2770
|
+
parse(e, t, n) {
|
|
2814
2771
|
switch (t) {
|
|
2815
2772
|
case "w":
|
|
2816
2773
|
return g(x.week, e);
|
|
2817
2774
|
case "wo":
|
|
2818
|
-
return
|
|
2775
|
+
return n.ordinalNumber(e, { unit: "week" });
|
|
2819
2776
|
default:
|
|
2820
2777
|
return b(t.length, e);
|
|
2821
2778
|
}
|
|
@@ -2823,8 +2780,8 @@ class Pa extends f {
|
|
|
2823
2780
|
validate(e, t) {
|
|
2824
2781
|
return t >= 1 && t <= 53;
|
|
2825
2782
|
}
|
|
2826
|
-
set(e, t,
|
|
2827
|
-
return H(
|
|
2783
|
+
set(e, t, n, i) {
|
|
2784
|
+
return H(Da(e, n, i), i);
|
|
2828
2785
|
}
|
|
2829
2786
|
incompatibleTokens = [
|
|
2830
2787
|
"y",
|
|
@@ -2842,18 +2799,18 @@ class Pa extends f {
|
|
|
2842
2799
|
"T"
|
|
2843
2800
|
];
|
|
2844
2801
|
}
|
|
2845
|
-
function
|
|
2846
|
-
const
|
|
2847
|
-
return
|
|
2802
|
+
function ka(r, e, t) {
|
|
2803
|
+
const n = M(r, t?.in), i = pt(n, t) - e;
|
|
2804
|
+
return n.setDate(n.getDate() - i * 7), n;
|
|
2848
2805
|
}
|
|
2849
|
-
class
|
|
2806
|
+
class Na extends f {
|
|
2850
2807
|
priority = 100;
|
|
2851
|
-
parse(e, t,
|
|
2808
|
+
parse(e, t, n) {
|
|
2852
2809
|
switch (t) {
|
|
2853
2810
|
case "I":
|
|
2854
2811
|
return g(x.week, e);
|
|
2855
2812
|
case "Io":
|
|
2856
|
-
return
|
|
2813
|
+
return n.ordinalNumber(e, { unit: "week" });
|
|
2857
2814
|
default:
|
|
2858
2815
|
return b(t.length, e);
|
|
2859
2816
|
}
|
|
@@ -2861,8 +2818,8 @@ class Ma extends f {
|
|
|
2861
2818
|
validate(e, t) {
|
|
2862
2819
|
return t >= 1 && t <= 53;
|
|
2863
2820
|
}
|
|
2864
|
-
set(e, t,
|
|
2865
|
-
return B(
|
|
2821
|
+
set(e, t, n) {
|
|
2822
|
+
return B(ka(e, n));
|
|
2866
2823
|
}
|
|
2867
2824
|
incompatibleTokens = [
|
|
2868
2825
|
"y",
|
|
@@ -2881,7 +2838,7 @@ class Ma extends f {
|
|
|
2881
2838
|
"T"
|
|
2882
2839
|
];
|
|
2883
2840
|
}
|
|
2884
|
-
const
|
|
2841
|
+
const qa = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ya = [
|
|
2885
2842
|
31,
|
|
2886
2843
|
29,
|
|
2887
2844
|
31,
|
|
@@ -2895,25 +2852,25 @@ const Da = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ta = [
|
|
|
2895
2852
|
30,
|
|
2896
2853
|
31
|
|
2897
2854
|
];
|
|
2898
|
-
class
|
|
2855
|
+
class Ea extends f {
|
|
2899
2856
|
priority = 90;
|
|
2900
2857
|
subPriority = 1;
|
|
2901
|
-
parse(e, t,
|
|
2858
|
+
parse(e, t, n) {
|
|
2902
2859
|
switch (t) {
|
|
2903
2860
|
case "d":
|
|
2904
2861
|
return g(x.date, e);
|
|
2905
2862
|
case "do":
|
|
2906
|
-
return
|
|
2863
|
+
return n.ordinalNumber(e, { unit: "date" });
|
|
2907
2864
|
default:
|
|
2908
2865
|
return b(t.length, e);
|
|
2909
2866
|
}
|
|
2910
2867
|
}
|
|
2911
2868
|
validate(e, t) {
|
|
2912
|
-
const
|
|
2913
|
-
return i ? t >= 1 && t <=
|
|
2869
|
+
const n = e.getFullYear(), i = bt(n), a = e.getMonth();
|
|
2870
|
+
return i ? t >= 1 && t <= Ya[a] : t >= 1 && t <= qa[a];
|
|
2914
2871
|
}
|
|
2915
|
-
set(e, t,
|
|
2916
|
-
return e.setDate(
|
|
2872
|
+
set(e, t, n) {
|
|
2873
|
+
return e.setDate(n), e.setHours(0, 0, 0, 0), e;
|
|
2917
2874
|
}
|
|
2918
2875
|
incompatibleTokens = [
|
|
2919
2876
|
"Y",
|
|
@@ -2930,26 +2887,26 @@ class ka extends f {
|
|
|
2930
2887
|
"T"
|
|
2931
2888
|
];
|
|
2932
2889
|
}
|
|
2933
|
-
class
|
|
2890
|
+
class $a extends f {
|
|
2934
2891
|
priority = 90;
|
|
2935
2892
|
subpriority = 1;
|
|
2936
|
-
parse(e, t,
|
|
2893
|
+
parse(e, t, n) {
|
|
2937
2894
|
switch (t) {
|
|
2938
2895
|
case "D":
|
|
2939
2896
|
case "DD":
|
|
2940
2897
|
return g(x.dayOfYear, e);
|
|
2941
2898
|
case "Do":
|
|
2942
|
-
return
|
|
2899
|
+
return n.ordinalNumber(e, { unit: "date" });
|
|
2943
2900
|
default:
|
|
2944
2901
|
return b(t.length, e);
|
|
2945
2902
|
}
|
|
2946
2903
|
}
|
|
2947
2904
|
validate(e, t) {
|
|
2948
|
-
const
|
|
2949
|
-
return
|
|
2905
|
+
const n = e.getFullYear();
|
|
2906
|
+
return bt(n) ? t >= 1 && t <= 366 : t >= 1 && t <= 365;
|
|
2950
2907
|
}
|
|
2951
|
-
set(e, t,
|
|
2952
|
-
return e.setMonth(0,
|
|
2908
|
+
set(e, t, n) {
|
|
2909
|
+
return e.setMonth(0, n), e.setHours(0, 0, 0, 0), e;
|
|
2953
2910
|
}
|
|
2954
2911
|
incompatibleTokens = [
|
|
2955
2912
|
"Y",
|
|
@@ -2969,51 +2926,49 @@ class Na extends f {
|
|
|
2969
2926
|
"T"
|
|
2970
2927
|
];
|
|
2971
2928
|
}
|
|
2972
|
-
function
|
|
2973
|
-
const
|
|
2974
|
-
return
|
|
2929
|
+
function he(r, e, t) {
|
|
2930
|
+
const n = S(), i = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = M(r, t?.in), o = a.getDay(), h = (e % 7 + 7) % 7, c = 7 - i, m = e < 0 || e > 6 ? e - (o + c) % 7 : (h + c) % 7 - (o + c) % 7;
|
|
2931
|
+
return ut(a, m, t);
|
|
2975
2932
|
}
|
|
2976
|
-
class
|
|
2933
|
+
class Wa extends f {
|
|
2977
2934
|
priority = 90;
|
|
2978
|
-
parse(e, t,
|
|
2935
|
+
parse(e, t, n) {
|
|
2979
2936
|
switch (t) {
|
|
2980
2937
|
// Tue
|
|
2981
2938
|
case "E":
|
|
2982
2939
|
case "EE":
|
|
2983
2940
|
case "EEE":
|
|
2984
|
-
return
|
|
2941
|
+
return n.day(e, {
|
|
2985
2942
|
width: "abbreviated",
|
|
2986
2943
|
context: "formatting"
|
|
2987
|
-
}) ||
|
|
2944
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2988
2945
|
// T
|
|
2989
2946
|
case "EEEEE":
|
|
2990
|
-
return
|
|
2947
|
+
return n.day(e, {
|
|
2991
2948
|
width: "narrow",
|
|
2992
2949
|
context: "formatting"
|
|
2993
2950
|
});
|
|
2994
2951
|
// Tu
|
|
2995
2952
|
case "EEEEEE":
|
|
2996
|
-
return
|
|
2997
|
-
// Tuesday
|
|
2998
|
-
case "EEEE":
|
|
2953
|
+
return n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2999
2954
|
default:
|
|
3000
|
-
return
|
|
2955
|
+
return n.day(e, { width: "wide", context: "formatting" }) || n.day(e, {
|
|
3001
2956
|
width: "abbreviated",
|
|
3002
2957
|
context: "formatting"
|
|
3003
|
-
}) ||
|
|
2958
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
3004
2959
|
}
|
|
3005
2960
|
}
|
|
3006
2961
|
validate(e, t) {
|
|
3007
2962
|
return t >= 0 && t <= 6;
|
|
3008
2963
|
}
|
|
3009
|
-
set(e, t,
|
|
3010
|
-
return e =
|
|
2964
|
+
set(e, t, n, i) {
|
|
2965
|
+
return e = he(e, n, i), e.setHours(0, 0, 0, 0), e;
|
|
3011
2966
|
}
|
|
3012
2967
|
incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
|
|
3013
2968
|
}
|
|
3014
|
-
class
|
|
2969
|
+
class ja extends f {
|
|
3015
2970
|
priority = 90;
|
|
3016
|
-
parse(e, t,
|
|
2971
|
+
parse(e, t, n, i) {
|
|
3017
2972
|
const a = (o) => {
|
|
3018
2973
|
const s = Math.floor((o - 1) / 7) * 7;
|
|
3019
2974
|
return (o + i.weekStartsOn + 6) % 7 + s;
|
|
@@ -3026,40 +2981,38 @@ class Ya extends f {
|
|
|
3026
2981
|
// 3rd
|
|
3027
2982
|
case "eo":
|
|
3028
2983
|
return v(
|
|
3029
|
-
|
|
2984
|
+
n.ordinalNumber(e, {
|
|
3030
2985
|
unit: "day"
|
|
3031
2986
|
}),
|
|
3032
2987
|
a
|
|
3033
2988
|
);
|
|
3034
2989
|
// Tue
|
|
3035
2990
|
case "eee":
|
|
3036
|
-
return
|
|
2991
|
+
return n.day(e, {
|
|
3037
2992
|
width: "abbreviated",
|
|
3038
2993
|
context: "formatting"
|
|
3039
|
-
}) ||
|
|
2994
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
3040
2995
|
// T
|
|
3041
2996
|
case "eeeee":
|
|
3042
|
-
return
|
|
2997
|
+
return n.day(e, {
|
|
3043
2998
|
width: "narrow",
|
|
3044
2999
|
context: "formatting"
|
|
3045
3000
|
});
|
|
3046
3001
|
// Tu
|
|
3047
3002
|
case "eeeeee":
|
|
3048
|
-
return
|
|
3049
|
-
// Tuesday
|
|
3050
|
-
case "eeee":
|
|
3003
|
+
return n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
3051
3004
|
default:
|
|
3052
|
-
return
|
|
3005
|
+
return n.day(e, { width: "wide", context: "formatting" }) || n.day(e, {
|
|
3053
3006
|
width: "abbreviated",
|
|
3054
3007
|
context: "formatting"
|
|
3055
|
-
}) ||
|
|
3008
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
3056
3009
|
}
|
|
3057
3010
|
}
|
|
3058
3011
|
validate(e, t) {
|
|
3059
3012
|
return t >= 0 && t <= 6;
|
|
3060
3013
|
}
|
|
3061
|
-
set(e, t,
|
|
3062
|
-
return e =
|
|
3014
|
+
set(e, t, n, i) {
|
|
3015
|
+
return e = he(e, n, i), e.setHours(0, 0, 0, 0), e;
|
|
3063
3016
|
}
|
|
3064
3017
|
incompatibleTokens = [
|
|
3065
3018
|
"y",
|
|
@@ -3079,9 +3032,9 @@ class Ya extends f {
|
|
|
3079
3032
|
"T"
|
|
3080
3033
|
];
|
|
3081
3034
|
}
|
|
3082
|
-
class
|
|
3035
|
+
class Ca extends f {
|
|
3083
3036
|
priority = 90;
|
|
3084
|
-
parse(e, t,
|
|
3037
|
+
parse(e, t, n, i) {
|
|
3085
3038
|
const a = (o) => {
|
|
3086
3039
|
const s = Math.floor((o - 1) / 7) * 7;
|
|
3087
3040
|
return (o + i.weekStartsOn + 6) % 7 + s;
|
|
@@ -3094,40 +3047,38 @@ class Ea extends f {
|
|
|
3094
3047
|
// 3rd
|
|
3095
3048
|
case "co":
|
|
3096
3049
|
return v(
|
|
3097
|
-
|
|
3050
|
+
n.ordinalNumber(e, {
|
|
3098
3051
|
unit: "day"
|
|
3099
3052
|
}),
|
|
3100
3053
|
a
|
|
3101
3054
|
);
|
|
3102
3055
|
// Tue
|
|
3103
3056
|
case "ccc":
|
|
3104
|
-
return
|
|
3057
|
+
return n.day(e, {
|
|
3105
3058
|
width: "abbreviated",
|
|
3106
3059
|
context: "standalone"
|
|
3107
|
-
}) ||
|
|
3060
|
+
}) || n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
3108
3061
|
// T
|
|
3109
3062
|
case "ccccc":
|
|
3110
|
-
return
|
|
3063
|
+
return n.day(e, {
|
|
3111
3064
|
width: "narrow",
|
|
3112
3065
|
context: "standalone"
|
|
3113
3066
|
});
|
|
3114
3067
|
// Tu
|
|
3115
3068
|
case "cccccc":
|
|
3116
|
-
return
|
|
3117
|
-
// Tuesday
|
|
3118
|
-
case "cccc":
|
|
3069
|
+
return n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
3119
3070
|
default:
|
|
3120
|
-
return
|
|
3071
|
+
return n.day(e, { width: "wide", context: "standalone" }) || n.day(e, {
|
|
3121
3072
|
width: "abbreviated",
|
|
3122
3073
|
context: "standalone"
|
|
3123
|
-
}) ||
|
|
3074
|
+
}) || n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
3124
3075
|
}
|
|
3125
3076
|
}
|
|
3126
3077
|
validate(e, t) {
|
|
3127
3078
|
return t >= 0 && t <= 6;
|
|
3128
3079
|
}
|
|
3129
|
-
set(e, t,
|
|
3130
|
-
return e =
|
|
3080
|
+
set(e, t, n, i) {
|
|
3081
|
+
return e = he(e, n, i), e.setHours(0, 0, 0, 0), e;
|
|
3131
3082
|
}
|
|
3132
3083
|
incompatibleTokens = [
|
|
3133
3084
|
"y",
|
|
@@ -3147,13 +3098,13 @@ class Ea extends f {
|
|
|
3147
3098
|
"T"
|
|
3148
3099
|
];
|
|
3149
3100
|
}
|
|
3150
|
-
function
|
|
3151
|
-
const
|
|
3152
|
-
return
|
|
3101
|
+
function Ha(r, e, t) {
|
|
3102
|
+
const n = M(r, t?.in), i = da(n, t), a = e - i;
|
|
3103
|
+
return ut(n, a, t);
|
|
3153
3104
|
}
|
|
3154
|
-
class
|
|
3105
|
+
class La extends f {
|
|
3155
3106
|
priority = 90;
|
|
3156
|
-
parse(e, t,
|
|
3107
|
+
parse(e, t, n) {
|
|
3157
3108
|
const i = (a) => a === 0 ? 7 : a;
|
|
3158
3109
|
switch (t) {
|
|
3159
3110
|
// 2
|
|
@@ -3162,17 +3113,17 @@ class $a extends f {
|
|
|
3162
3113
|
return b(t.length, e);
|
|
3163
3114
|
// 2nd
|
|
3164
3115
|
case "io":
|
|
3165
|
-
return
|
|
3116
|
+
return n.ordinalNumber(e, { unit: "day" });
|
|
3166
3117
|
// Tue
|
|
3167
3118
|
case "iii":
|
|
3168
3119
|
return v(
|
|
3169
|
-
|
|
3120
|
+
n.day(e, {
|
|
3170
3121
|
width: "abbreviated",
|
|
3171
3122
|
context: "formatting"
|
|
3172
|
-
}) ||
|
|
3123
|
+
}) || n.day(e, {
|
|
3173
3124
|
width: "short",
|
|
3174
3125
|
context: "formatting"
|
|
3175
|
-
}) ||
|
|
3126
|
+
}) || n.day(e, {
|
|
3176
3127
|
width: "narrow",
|
|
3177
3128
|
context: "formatting"
|
|
3178
3129
|
}),
|
|
@@ -3181,7 +3132,7 @@ class $a extends f {
|
|
|
3181
3132
|
// T
|
|
3182
3133
|
case "iiiii":
|
|
3183
3134
|
return v(
|
|
3184
|
-
|
|
3135
|
+
n.day(e, {
|
|
3185
3136
|
width: "narrow",
|
|
3186
3137
|
context: "formatting"
|
|
3187
3138
|
}),
|
|
@@ -3190,29 +3141,27 @@ class $a extends f {
|
|
|
3190
3141
|
// Tu
|
|
3191
3142
|
case "iiiiii":
|
|
3192
3143
|
return v(
|
|
3193
|
-
|
|
3144
|
+
n.day(e, {
|
|
3194
3145
|
width: "short",
|
|
3195
3146
|
context: "formatting"
|
|
3196
|
-
}) ||
|
|
3147
|
+
}) || n.day(e, {
|
|
3197
3148
|
width: "narrow",
|
|
3198
3149
|
context: "formatting"
|
|
3199
3150
|
}),
|
|
3200
3151
|
i
|
|
3201
3152
|
);
|
|
3202
|
-
// Tuesday
|
|
3203
|
-
case "iiii":
|
|
3204
3153
|
default:
|
|
3205
3154
|
return v(
|
|
3206
|
-
|
|
3155
|
+
n.day(e, {
|
|
3207
3156
|
width: "wide",
|
|
3208
3157
|
context: "formatting"
|
|
3209
|
-
}) ||
|
|
3158
|
+
}) || n.day(e, {
|
|
3210
3159
|
width: "abbreviated",
|
|
3211
3160
|
context: "formatting"
|
|
3212
|
-
}) ||
|
|
3161
|
+
}) || n.day(e, {
|
|
3213
3162
|
width: "short",
|
|
3214
3163
|
context: "formatting"
|
|
3215
|
-
}) ||
|
|
3164
|
+
}) || n.day(e, {
|
|
3216
3165
|
width: "narrow",
|
|
3217
3166
|
context: "formatting"
|
|
3218
3167
|
}),
|
|
@@ -3223,8 +3172,8 @@ class $a extends f {
|
|
|
3223
3172
|
validate(e, t) {
|
|
3224
3173
|
return t >= 1 && t <= 7;
|
|
3225
3174
|
}
|
|
3226
|
-
set(e, t,
|
|
3227
|
-
return e =
|
|
3175
|
+
set(e, t, n) {
|
|
3176
|
+
return e = Ha(e, n), e.setHours(0, 0, 0, 0), e;
|
|
3228
3177
|
}
|
|
3229
3178
|
incompatibleTokens = [
|
|
3230
3179
|
"y",
|
|
@@ -3244,128 +3193,125 @@ class $a extends f {
|
|
|
3244
3193
|
"T"
|
|
3245
3194
|
];
|
|
3246
3195
|
}
|
|
3247
|
-
class
|
|
3196
|
+
class Ia extends f {
|
|
3248
3197
|
priority = 80;
|
|
3249
|
-
parse(e, t,
|
|
3198
|
+
parse(e, t, n) {
|
|
3250
3199
|
switch (t) {
|
|
3251
3200
|
case "a":
|
|
3252
3201
|
case "aa":
|
|
3253
3202
|
case "aaa":
|
|
3254
|
-
return
|
|
3203
|
+
return n.dayPeriod(e, {
|
|
3255
3204
|
width: "abbreviated",
|
|
3256
3205
|
context: "formatting"
|
|
3257
|
-
}) ||
|
|
3206
|
+
}) || n.dayPeriod(e, {
|
|
3258
3207
|
width: "narrow",
|
|
3259
3208
|
context: "formatting"
|
|
3260
3209
|
});
|
|
3261
3210
|
case "aaaaa":
|
|
3262
|
-
return
|
|
3211
|
+
return n.dayPeriod(e, {
|
|
3263
3212
|
width: "narrow",
|
|
3264
3213
|
context: "formatting"
|
|
3265
3214
|
});
|
|
3266
|
-
case "aaaa":
|
|
3267
3215
|
default:
|
|
3268
|
-
return
|
|
3216
|
+
return n.dayPeriod(e, {
|
|
3269
3217
|
width: "wide",
|
|
3270
3218
|
context: "formatting"
|
|
3271
|
-
}) ||
|
|
3219
|
+
}) || n.dayPeriod(e, {
|
|
3272
3220
|
width: "abbreviated",
|
|
3273
3221
|
context: "formatting"
|
|
3274
|
-
}) ||
|
|
3222
|
+
}) || n.dayPeriod(e, {
|
|
3275
3223
|
width: "narrow",
|
|
3276
3224
|
context: "formatting"
|
|
3277
3225
|
});
|
|
3278
3226
|
}
|
|
3279
3227
|
}
|
|
3280
|
-
set(e, t,
|
|
3281
|
-
return e.setHours(
|
|
3228
|
+
set(e, t, n) {
|
|
3229
|
+
return e.setHours(fe(n), 0, 0, 0), e;
|
|
3282
3230
|
}
|
|
3283
3231
|
incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
|
|
3284
3232
|
}
|
|
3285
|
-
class
|
|
3233
|
+
class Fa extends f {
|
|
3286
3234
|
priority = 80;
|
|
3287
|
-
parse(e, t,
|
|
3235
|
+
parse(e, t, n) {
|
|
3288
3236
|
switch (t) {
|
|
3289
3237
|
case "b":
|
|
3290
3238
|
case "bb":
|
|
3291
3239
|
case "bbb":
|
|
3292
|
-
return
|
|
3240
|
+
return n.dayPeriod(e, {
|
|
3293
3241
|
width: "abbreviated",
|
|
3294
3242
|
context: "formatting"
|
|
3295
|
-
}) ||
|
|
3243
|
+
}) || n.dayPeriod(e, {
|
|
3296
3244
|
width: "narrow",
|
|
3297
3245
|
context: "formatting"
|
|
3298
3246
|
});
|
|
3299
3247
|
case "bbbbb":
|
|
3300
|
-
return
|
|
3248
|
+
return n.dayPeriod(e, {
|
|
3301
3249
|
width: "narrow",
|
|
3302
3250
|
context: "formatting"
|
|
3303
3251
|
});
|
|
3304
|
-
case "bbbb":
|
|
3305
3252
|
default:
|
|
3306
|
-
return
|
|
3253
|
+
return n.dayPeriod(e, {
|
|
3307
3254
|
width: "wide",
|
|
3308
3255
|
context: "formatting"
|
|
3309
|
-
}) ||
|
|
3256
|
+
}) || n.dayPeriod(e, {
|
|
3310
3257
|
width: "abbreviated",
|
|
3311
3258
|
context: "formatting"
|
|
3312
|
-
}) ||
|
|
3259
|
+
}) || n.dayPeriod(e, {
|
|
3313
3260
|
width: "narrow",
|
|
3314
3261
|
context: "formatting"
|
|
3315
3262
|
});
|
|
3316
3263
|
}
|
|
3317
3264
|
}
|
|
3318
|
-
set(e, t,
|
|
3319
|
-
return e.setHours(
|
|
3265
|
+
set(e, t, n) {
|
|
3266
|
+
return e.setHours(fe(n), 0, 0, 0), e;
|
|
3320
3267
|
}
|
|
3321
3268
|
incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
|
|
3322
3269
|
}
|
|
3323
|
-
class
|
|
3270
|
+
class Ra extends f {
|
|
3324
3271
|
priority = 80;
|
|
3325
|
-
parse(e, t,
|
|
3272
|
+
parse(e, t, n) {
|
|
3326
3273
|
switch (t) {
|
|
3327
3274
|
case "B":
|
|
3328
3275
|
case "BB":
|
|
3329
3276
|
case "BBB":
|
|
3330
|
-
return
|
|
3277
|
+
return n.dayPeriod(e, {
|
|
3331
3278
|
width: "abbreviated",
|
|
3332
3279
|
context: "formatting"
|
|
3333
|
-
}) ||
|
|
3280
|
+
}) || n.dayPeriod(e, {
|
|
3334
3281
|
width: "narrow",
|
|
3335
3282
|
context: "formatting"
|
|
3336
3283
|
});
|
|
3337
3284
|
case "BBBBB":
|
|
3338
|
-
return
|
|
3285
|
+
return n.dayPeriod(e, {
|
|
3339
3286
|
width: "narrow",
|
|
3340
3287
|
context: "formatting"
|
|
3341
3288
|
});
|
|
3342
|
-
case "BBBB":
|
|
3343
3289
|
default:
|
|
3344
|
-
return
|
|
3290
|
+
return n.dayPeriod(e, {
|
|
3345
3291
|
width: "wide",
|
|
3346
3292
|
context: "formatting"
|
|
3347
|
-
}) ||
|
|
3293
|
+
}) || n.dayPeriod(e, {
|
|
3348
3294
|
width: "abbreviated",
|
|
3349
3295
|
context: "formatting"
|
|
3350
|
-
}) ||
|
|
3296
|
+
}) || n.dayPeriod(e, {
|
|
3351
3297
|
width: "narrow",
|
|
3352
3298
|
context: "formatting"
|
|
3353
3299
|
});
|
|
3354
3300
|
}
|
|
3355
3301
|
}
|
|
3356
|
-
set(e, t,
|
|
3357
|
-
return e.setHours(
|
|
3302
|
+
set(e, t, n) {
|
|
3303
|
+
return e.setHours(fe(n), 0, 0, 0), e;
|
|
3358
3304
|
}
|
|
3359
3305
|
incompatibleTokens = ["a", "b", "t", "T"];
|
|
3360
3306
|
}
|
|
3361
|
-
class
|
|
3307
|
+
class Aa extends f {
|
|
3362
3308
|
priority = 70;
|
|
3363
|
-
parse(e, t,
|
|
3309
|
+
parse(e, t, n) {
|
|
3364
3310
|
switch (t) {
|
|
3365
3311
|
case "h":
|
|
3366
3312
|
return g(x.hour12h, e);
|
|
3367
3313
|
case "ho":
|
|
3368
|
-
return
|
|
3314
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
3369
3315
|
default:
|
|
3370
3316
|
return b(t.length, e);
|
|
3371
3317
|
}
|
|
@@ -3373,20 +3319,20 @@ class La extends f {
|
|
|
3373
3319
|
validate(e, t) {
|
|
3374
3320
|
return t >= 1 && t <= 12;
|
|
3375
3321
|
}
|
|
3376
|
-
set(e, t,
|
|
3322
|
+
set(e, t, n) {
|
|
3377
3323
|
const i = e.getHours() >= 12;
|
|
3378
|
-
return i &&
|
|
3324
|
+
return i && n < 12 ? e.setHours(n + 12, 0, 0, 0) : !i && n === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(n, 0, 0, 0), e;
|
|
3379
3325
|
}
|
|
3380
3326
|
incompatibleTokens = ["H", "K", "k", "t", "T"];
|
|
3381
3327
|
}
|
|
3382
|
-
class
|
|
3328
|
+
class Qa extends f {
|
|
3383
3329
|
priority = 70;
|
|
3384
|
-
parse(e, t,
|
|
3330
|
+
parse(e, t, n) {
|
|
3385
3331
|
switch (t) {
|
|
3386
3332
|
case "H":
|
|
3387
3333
|
return g(x.hour23h, e);
|
|
3388
3334
|
case "Ho":
|
|
3389
|
-
return
|
|
3335
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
3390
3336
|
default:
|
|
3391
3337
|
return b(t.length, e);
|
|
3392
3338
|
}
|
|
@@ -3394,19 +3340,19 @@ class Ia extends f {
|
|
|
3394
3340
|
validate(e, t) {
|
|
3395
3341
|
return t >= 0 && t <= 23;
|
|
3396
3342
|
}
|
|
3397
|
-
set(e, t,
|
|
3398
|
-
return e.setHours(
|
|
3343
|
+
set(e, t, n) {
|
|
3344
|
+
return e.setHours(n, 0, 0, 0), e;
|
|
3399
3345
|
}
|
|
3400
3346
|
incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
|
|
3401
3347
|
}
|
|
3402
|
-
class
|
|
3348
|
+
class Ba extends f {
|
|
3403
3349
|
priority = 70;
|
|
3404
|
-
parse(e, t,
|
|
3350
|
+
parse(e, t, n) {
|
|
3405
3351
|
switch (t) {
|
|
3406
3352
|
case "K":
|
|
3407
3353
|
return g(x.hour11h, e);
|
|
3408
3354
|
case "Ko":
|
|
3409
|
-
return
|
|
3355
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
3410
3356
|
default:
|
|
3411
3357
|
return b(t.length, e);
|
|
3412
3358
|
}
|
|
@@ -3414,19 +3360,19 @@ class Fa extends f {
|
|
|
3414
3360
|
validate(e, t) {
|
|
3415
3361
|
return t >= 0 && t <= 11;
|
|
3416
3362
|
}
|
|
3417
|
-
set(e, t,
|
|
3418
|
-
return e.getHours() >= 12 &&
|
|
3363
|
+
set(e, t, n) {
|
|
3364
|
+
return e.getHours() >= 12 && n < 12 ? e.setHours(n + 12, 0, 0, 0) : e.setHours(n, 0, 0, 0), e;
|
|
3419
3365
|
}
|
|
3420
3366
|
incompatibleTokens = ["h", "H", "k", "t", "T"];
|
|
3421
3367
|
}
|
|
3422
|
-
class
|
|
3368
|
+
class Sa extends f {
|
|
3423
3369
|
priority = 70;
|
|
3424
|
-
parse(e, t,
|
|
3370
|
+
parse(e, t, n) {
|
|
3425
3371
|
switch (t) {
|
|
3426
3372
|
case "k":
|
|
3427
3373
|
return g(x.hour24h, e);
|
|
3428
3374
|
case "ko":
|
|
3429
|
-
return
|
|
3375
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
3430
3376
|
default:
|
|
3431
3377
|
return b(t.length, e);
|
|
3432
3378
|
}
|
|
@@ -3434,20 +3380,20 @@ class Ra extends f {
|
|
|
3434
3380
|
validate(e, t) {
|
|
3435
3381
|
return t >= 1 && t <= 24;
|
|
3436
3382
|
}
|
|
3437
|
-
set(e, t,
|
|
3438
|
-
const i =
|
|
3383
|
+
set(e, t, n) {
|
|
3384
|
+
const i = n <= 24 ? n % 24 : n;
|
|
3439
3385
|
return e.setHours(i, 0, 0, 0), e;
|
|
3440
3386
|
}
|
|
3441
3387
|
incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
|
|
3442
3388
|
}
|
|
3443
|
-
class
|
|
3389
|
+
class Xa extends f {
|
|
3444
3390
|
priority = 60;
|
|
3445
|
-
parse(e, t,
|
|
3391
|
+
parse(e, t, n) {
|
|
3446
3392
|
switch (t) {
|
|
3447
3393
|
case "m":
|
|
3448
3394
|
return g(x.minute, e);
|
|
3449
3395
|
case "mo":
|
|
3450
|
-
return
|
|
3396
|
+
return n.ordinalNumber(e, { unit: "minute" });
|
|
3451
3397
|
default:
|
|
3452
3398
|
return b(t.length, e);
|
|
3453
3399
|
}
|
|
@@ -3455,19 +3401,19 @@ class Aa extends f {
|
|
|
3455
3401
|
validate(e, t) {
|
|
3456
3402
|
return t >= 0 && t <= 59;
|
|
3457
3403
|
}
|
|
3458
|
-
set(e, t,
|
|
3459
|
-
return e.setMinutes(
|
|
3404
|
+
set(e, t, n) {
|
|
3405
|
+
return e.setMinutes(n, 0, 0), e;
|
|
3460
3406
|
}
|
|
3461
3407
|
incompatibleTokens = ["t", "T"];
|
|
3462
3408
|
}
|
|
3463
|
-
class
|
|
3409
|
+
class Ga extends f {
|
|
3464
3410
|
priority = 50;
|
|
3465
|
-
parse(e, t,
|
|
3411
|
+
parse(e, t, n) {
|
|
3466
3412
|
switch (t) {
|
|
3467
3413
|
case "s":
|
|
3468
3414
|
return g(x.second, e);
|
|
3469
3415
|
case "so":
|
|
3470
|
-
return
|
|
3416
|
+
return n.ordinalNumber(e, { unit: "second" });
|
|
3471
3417
|
default:
|
|
3472
3418
|
return b(t.length, e);
|
|
3473
3419
|
}
|
|
@@ -3475,23 +3421,23 @@ class Qa extends f {
|
|
|
3475
3421
|
validate(e, t) {
|
|
3476
3422
|
return t >= 0 && t <= 59;
|
|
3477
3423
|
}
|
|
3478
|
-
set(e, t,
|
|
3479
|
-
return e.setSeconds(
|
|
3424
|
+
set(e, t, n) {
|
|
3425
|
+
return e.setSeconds(n, 0), e;
|
|
3480
3426
|
}
|
|
3481
3427
|
incompatibleTokens = ["t", "T"];
|
|
3482
3428
|
}
|
|
3483
|
-
class
|
|
3429
|
+
class Va extends f {
|
|
3484
3430
|
priority = 30;
|
|
3485
3431
|
parse(e, t) {
|
|
3486
|
-
const
|
|
3487
|
-
return v(b(t.length, e),
|
|
3432
|
+
const n = (i) => Math.trunc(i * Math.pow(10, -t.length + 3));
|
|
3433
|
+
return v(b(t.length, e), n);
|
|
3488
3434
|
}
|
|
3489
|
-
set(e, t,
|
|
3490
|
-
return e.setMilliseconds(
|
|
3435
|
+
set(e, t, n) {
|
|
3436
|
+
return e.setMilliseconds(n), e;
|
|
3491
3437
|
}
|
|
3492
3438
|
incompatibleTokens = ["t", "T"];
|
|
3493
3439
|
}
|
|
3494
|
-
class
|
|
3440
|
+
class za extends f {
|
|
3495
3441
|
priority = 10;
|
|
3496
3442
|
parse(e, t) {
|
|
3497
3443
|
switch (t) {
|
|
@@ -3512,20 +3458,19 @@ class Sa extends f {
|
|
|
3512
3458
|
q.extendedOptionalSeconds,
|
|
3513
3459
|
e
|
|
3514
3460
|
);
|
|
3515
|
-
case "XXX":
|
|
3516
3461
|
default:
|
|
3517
3462
|
return Y(q.extended, e);
|
|
3518
3463
|
}
|
|
3519
3464
|
}
|
|
3520
|
-
set(e, t,
|
|
3465
|
+
set(e, t, n) {
|
|
3521
3466
|
return t.timestampIsSet ? e : D(
|
|
3522
3467
|
e,
|
|
3523
|
-
e.getTime() -
|
|
3468
|
+
e.getTime() - J(e) - n
|
|
3524
3469
|
);
|
|
3525
3470
|
}
|
|
3526
3471
|
incompatibleTokens = ["t", "T", "x"];
|
|
3527
3472
|
}
|
|
3528
|
-
class
|
|
3473
|
+
class Za extends f {
|
|
3529
3474
|
priority = 10;
|
|
3530
3475
|
parse(e, t) {
|
|
3531
3476
|
switch (t) {
|
|
@@ -3546,88 +3491,87 @@ class Ga extends f {
|
|
|
3546
3491
|
q.extendedOptionalSeconds,
|
|
3547
3492
|
e
|
|
3548
3493
|
);
|
|
3549
|
-
case "xxx":
|
|
3550
3494
|
default:
|
|
3551
3495
|
return Y(q.extended, e);
|
|
3552
3496
|
}
|
|
3553
3497
|
}
|
|
3554
|
-
set(e, t,
|
|
3498
|
+
set(e, t, n) {
|
|
3555
3499
|
return t.timestampIsSet ? e : D(
|
|
3556
3500
|
e,
|
|
3557
|
-
e.getTime() -
|
|
3501
|
+
e.getTime() - J(e) - n
|
|
3558
3502
|
);
|
|
3559
3503
|
}
|
|
3560
3504
|
incompatibleTokens = ["t", "T", "X"];
|
|
3561
3505
|
}
|
|
3562
|
-
class
|
|
3506
|
+
class Ja extends f {
|
|
3563
3507
|
priority = 40;
|
|
3564
3508
|
parse(e) {
|
|
3565
|
-
return
|
|
3509
|
+
return yt(e);
|
|
3566
3510
|
}
|
|
3567
|
-
set(e, t,
|
|
3568
|
-
return [D(e,
|
|
3511
|
+
set(e, t, n) {
|
|
3512
|
+
return [D(e, n * 1e3), { timestampIsSet: !0 }];
|
|
3569
3513
|
}
|
|
3570
3514
|
incompatibleTokens = "*";
|
|
3571
3515
|
}
|
|
3572
|
-
class
|
|
3516
|
+
class Ka extends f {
|
|
3573
3517
|
priority = 20;
|
|
3574
3518
|
parse(e) {
|
|
3575
|
-
return
|
|
3519
|
+
return yt(e);
|
|
3576
3520
|
}
|
|
3577
|
-
set(e, t,
|
|
3578
|
-
return [D(e,
|
|
3521
|
+
set(e, t, n) {
|
|
3522
|
+
return [D(e, n), { timestampIsSet: !0 }];
|
|
3579
3523
|
}
|
|
3580
3524
|
incompatibleTokens = "*";
|
|
3581
3525
|
}
|
|
3582
|
-
const
|
|
3583
|
-
G: new
|
|
3584
|
-
y: new
|
|
3585
|
-
Y: new
|
|
3586
|
-
R: new
|
|
3587
|
-
u: new
|
|
3588
|
-
Q: new
|
|
3589
|
-
q: new
|
|
3590
|
-
M: new
|
|
3591
|
-
L: new
|
|
3592
|
-
w: new
|
|
3593
|
-
I: new
|
|
3594
|
-
d: new
|
|
3595
|
-
D: new
|
|
3596
|
-
E: new
|
|
3597
|
-
e: new
|
|
3598
|
-
c: new
|
|
3599
|
-
i: new
|
|
3600
|
-
a: new
|
|
3601
|
-
b: new
|
|
3602
|
-
B: new
|
|
3603
|
-
h: new
|
|
3604
|
-
H: new
|
|
3605
|
-
K: new
|
|
3606
|
-
k: new
|
|
3607
|
-
m: new
|
|
3608
|
-
s: new
|
|
3609
|
-
S: new
|
|
3610
|
-
X: new
|
|
3611
|
-
x: new
|
|
3612
|
-
t: new
|
|
3613
|
-
T: new
|
|
3614
|
-
},
|
|
3615
|
-
function
|
|
3616
|
-
const i = () => D(t, NaN), a =
|
|
3526
|
+
const Ua = {
|
|
3527
|
+
G: new wa(),
|
|
3528
|
+
y: new ya(),
|
|
3529
|
+
Y: new ga(),
|
|
3530
|
+
R: new ba(),
|
|
3531
|
+
u: new xa(),
|
|
3532
|
+
Q: new va(),
|
|
3533
|
+
q: new Pa(),
|
|
3534
|
+
M: new Oa(),
|
|
3535
|
+
L: new Ma(),
|
|
3536
|
+
w: new Ta(),
|
|
3537
|
+
I: new Na(),
|
|
3538
|
+
d: new Ea(),
|
|
3539
|
+
D: new $a(),
|
|
3540
|
+
E: new Wa(),
|
|
3541
|
+
e: new ja(),
|
|
3542
|
+
c: new Ca(),
|
|
3543
|
+
i: new La(),
|
|
3544
|
+
a: new Ia(),
|
|
3545
|
+
b: new Fa(),
|
|
3546
|
+
B: new Ra(),
|
|
3547
|
+
h: new Aa(),
|
|
3548
|
+
H: new Qa(),
|
|
3549
|
+
K: new Ba(),
|
|
3550
|
+
k: new Sa(),
|
|
3551
|
+
m: new Xa(),
|
|
3552
|
+
s: new Ga(),
|
|
3553
|
+
S: new Va(),
|
|
3554
|
+
X: new za(),
|
|
3555
|
+
x: new Za(),
|
|
3556
|
+
t: new Ja(),
|
|
3557
|
+
T: new Ka()
|
|
3558
|
+
}, ei = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ti = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ri = /^'([^]*?)'?$/, ni = /''/g, ai = /\S/, ii = /[a-zA-Z]/;
|
|
3559
|
+
function oi(r, e, t, n) {
|
|
3560
|
+
const i = () => D(t, NaN), a = la(), o = a.locale ?? dt, s = a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, h = a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, c = {
|
|
3617
3561
|
firstWeekContainsDate: s,
|
|
3618
3562
|
weekStartsOn: h,
|
|
3619
3563
|
locale: o
|
|
3620
|
-
}, m = [new
|
|
3564
|
+
}, m = [new _a(n?.in, t)], p = e.match(ti).map((u) => {
|
|
3621
3565
|
const l = u[0];
|
|
3622
|
-
if (l in
|
|
3623
|
-
const y =
|
|
3566
|
+
if (l in ue) {
|
|
3567
|
+
const y = ue[l];
|
|
3624
3568
|
return y(u, o.formatLong);
|
|
3625
3569
|
}
|
|
3626
3570
|
return u;
|
|
3627
|
-
}).join("").match(
|
|
3571
|
+
}).join("").match(ei), N = [];
|
|
3628
3572
|
for (let u of p) {
|
|
3629
|
-
|
|
3630
|
-
const l = u[0], y =
|
|
3573
|
+
_t(u) && ce(u, e, r), mt(u) && ce(u, e, r);
|
|
3574
|
+
const l = u[0], y = Ua[l];
|
|
3631
3575
|
if (y) {
|
|
3632
3576
|
const { incompatibleTokens: k } = y;
|
|
3633
3577
|
if (Array.isArray(k)) {
|
|
@@ -3644,31 +3588,31 @@ function ri(n, e, t, r) {
|
|
|
3644
3588
|
);
|
|
3645
3589
|
N.push({ token: l, fullToken: u });
|
|
3646
3590
|
const F = y.run(
|
|
3647
|
-
|
|
3591
|
+
r,
|
|
3648
3592
|
u,
|
|
3649
3593
|
o.match,
|
|
3650
3594
|
c
|
|
3651
3595
|
);
|
|
3652
3596
|
if (!F)
|
|
3653
3597
|
return i();
|
|
3654
|
-
m.push(F.setter),
|
|
3598
|
+
m.push(F.setter), r = F.rest;
|
|
3655
3599
|
} else {
|
|
3656
|
-
if (l.match(
|
|
3600
|
+
if (l.match(ii))
|
|
3657
3601
|
throw new RangeError(
|
|
3658
3602
|
"Format string contains an unescaped latin alphabet character `" + l + "`"
|
|
3659
3603
|
);
|
|
3660
|
-
if (u === "''" ? u = "'" : l === "'" && (u =
|
|
3661
|
-
|
|
3604
|
+
if (u === "''" ? u = "'" : l === "'" && (u = si(u)), r.indexOf(u) === 0)
|
|
3605
|
+
r = r.slice(u.length);
|
|
3662
3606
|
else
|
|
3663
3607
|
return i();
|
|
3664
3608
|
}
|
|
3665
3609
|
}
|
|
3666
|
-
if (
|
|
3610
|
+
if (r.length > 0 && ai.test(r))
|
|
3667
3611
|
return i();
|
|
3668
3612
|
const L = m.map((u) => u.priority).sort((u, l) => l - u).filter((u, l, y) => y.indexOf(u) === l).map(
|
|
3669
3613
|
(u) => m.filter((l) => l.priority === u).sort((l, y) => y.subPriority - l.subPriority)
|
|
3670
3614
|
).map((u) => u[0]);
|
|
3671
|
-
let P = M(t,
|
|
3615
|
+
let P = M(t, n?.in);
|
|
3672
3616
|
if (isNaN(+P)) return i();
|
|
3673
3617
|
const w = {};
|
|
3674
3618
|
for (const u of L) {
|
|
@@ -3679,27 +3623,27 @@ function ri(n, e, t, r) {
|
|
|
3679
3623
|
}
|
|
3680
3624
|
return P;
|
|
3681
3625
|
}
|
|
3682
|
-
function
|
|
3683
|
-
return
|
|
3626
|
+
function si(r) {
|
|
3627
|
+
return r.match(ri)[1].replace(ni, "'");
|
|
3684
3628
|
}
|
|
3685
|
-
const
|
|
3629
|
+
const ui = {
|
|
3686
3630
|
"purpur-date-field__container": "_purpur-date-field__container_ci2f4_1",
|
|
3687
3631
|
"purpur-date-field__overlay": "_purpur-date-field__overlay_ci2f4_5",
|
|
3688
3632
|
"purpur-date-field__start-adornment": "_purpur-date-field__start-adornment_ci2f4_16"
|
|
3689
|
-
},
|
|
3690
|
-
const e =
|
|
3633
|
+
}, ci = (r) => oi(r, "yyyy-MM-dd", /* @__PURE__ */ new Date()), Ze = (r) => r ? ua(r, "yyyy-MM-dd") : "", li = (...r) => {
|
|
3634
|
+
const e = r.filter(Boolean);
|
|
3691
3635
|
return e.length <= 1 ? e[0] || null : (t) => {
|
|
3692
|
-
for (const
|
|
3693
|
-
typeof
|
|
3636
|
+
for (const n of e)
|
|
3637
|
+
typeof n == "function" ? n(t) : n && (n.current = t);
|
|
3694
3638
|
};
|
|
3695
|
-
},
|
|
3696
|
-
({ id:
|
|
3697
|
-
const [s, h] =
|
|
3698
|
-
|
|
3699
|
-
h(e ?
|
|
3639
|
+
}, ie = sn.bind(ui), oe = "purpur-date-field", se = "YYYY-MM-DD", di = le(
|
|
3640
|
+
({ id: r, value: e, label: t, onChange: n, startAdornment: i, ...a }, o) => {
|
|
3641
|
+
const [s, h] = we(Ze(e));
|
|
3642
|
+
Mt(() => {
|
|
3643
|
+
h(e ? Ze(e) : "");
|
|
3700
3644
|
}, [e]);
|
|
3701
|
-
const c =
|
|
3702
|
-
|
|
3645
|
+
const c = Je(null), m = li(o, c), [p, N] = we({});
|
|
3646
|
+
Dt(() => {
|
|
3703
3647
|
if (c.current) {
|
|
3704
3648
|
const u = window.document.querySelector(
|
|
3705
3649
|
`label[for="${c.current.id}"]`
|
|
@@ -3715,15 +3659,15 @@ const ai = {
|
|
|
3715
3659
|
}
|
|
3716
3660
|
}, [s, t, c]);
|
|
3717
3661
|
const L = (u) => {
|
|
3718
|
-
if (u.length === 0 &&
|
|
3662
|
+
if (u.length === 0 && n?.(void 0), u.length !== se.length)
|
|
3719
3663
|
return;
|
|
3720
|
-
const l =
|
|
3721
|
-
|
|
3664
|
+
const l = ci(u);
|
|
3665
|
+
lt(l) && n?.(l);
|
|
3722
3666
|
}, P = (u) => {
|
|
3723
3667
|
const l = u.target.value.replace(/\D/g, "");
|
|
3724
3668
|
let y = "";
|
|
3725
3669
|
l.length > 0 && (y += l.slice(0, 4)), l.length > 4 && (y += "-" + l.slice(4, 6)), l.length > 6 && (y += "-" + l.slice(6, 8)), h(y), L(u.target.value);
|
|
3726
|
-
}, w = () =>
|
|
3670
|
+
}, w = () => se.split("").map((l, y) => {
|
|
3727
3671
|
const k = s[y];
|
|
3728
3672
|
return /* @__PURE__ */ d(
|
|
3729
3673
|
"span",
|
|
@@ -3736,27 +3680,27 @@ const ai = {
|
|
|
3736
3680
|
y
|
|
3737
3681
|
);
|
|
3738
3682
|
});
|
|
3739
|
-
return /* @__PURE__ */
|
|
3683
|
+
return /* @__PURE__ */ C("div", { className: ie(`${oe}__container`), children: [
|
|
3740
3684
|
/* @__PURE__ */ d(
|
|
3741
|
-
|
|
3685
|
+
ot,
|
|
3742
3686
|
{
|
|
3743
3687
|
...a,
|
|
3744
|
-
startAdornment: i && /* @__PURE__ */ d("span", { className:
|
|
3688
|
+
startAdornment: i && /* @__PURE__ */ d("span", { className: ie(`${oe}__start-adornment`), children: i }, r),
|
|
3745
3689
|
ref: m,
|
|
3746
3690
|
value: s,
|
|
3747
3691
|
onChange: P,
|
|
3748
3692
|
type: "text",
|
|
3749
|
-
maxLength:
|
|
3693
|
+
maxLength: se.length,
|
|
3750
3694
|
inputMode: "numeric",
|
|
3751
3695
|
label: t
|
|
3752
3696
|
}
|
|
3753
3697
|
),
|
|
3754
|
-
/* @__PURE__ */ d("div", { role: "presentation", style: p, className:
|
|
3698
|
+
/* @__PURE__ */ d("div", { role: "presentation", style: p, className: ie(`${oe}__overlay`), children: w() })
|
|
3755
3699
|
] });
|
|
3756
3700
|
}
|
|
3757
3701
|
);
|
|
3758
|
-
|
|
3702
|
+
di.displayName = "DateField";
|
|
3759
3703
|
export {
|
|
3760
|
-
|
|
3704
|
+
di as DateField
|
|
3761
3705
|
};
|
|
3762
3706
|
//# sourceMappingURL=date-field.es.js.map
|