@situaction/traq-ui-ste 1.2.26 → 1.2.28

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.
@@ -0,0 +1,1227 @@
1
+ function l(t) {
2
+ const n = Object.prototype.toString.call(t);
3
+ return t instanceof Date || typeof t == "object" && n === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || n === "[object Number]" || typeof t == "string" || n === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
4
+ }
5
+ function y(t, n) {
6
+ return t instanceof Date ? new t.constructor(n) : new Date(n);
7
+ }
8
+ function Jt(t, n) {
9
+ const e = l(t);
10
+ return isNaN(n) ? y(t, NaN) : (n && e.setDate(e.getDate() + n), e);
11
+ }
12
+ const X = 6048e5, R = 864e5, $t = 6e4, Ut = 36e5, zt = 1e3;
13
+ let B = {};
14
+ function W() {
15
+ return B;
16
+ }
17
+ function D(t, n) {
18
+ var u, c, d, h;
19
+ const e = W(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((c = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : c.weekStartsOn) ?? e.weekStartsOn ?? ((h = (d = e.locale) == null ? void 0 : d.options) == null ? void 0 : h.weekStartsOn) ?? 0, a = l(t), i = a.getDay(), s = (i < r ? 7 : 0) + i - r;
20
+ return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
21
+ }
22
+ function v(t) {
23
+ return D(t, { weekStartsOn: 1 });
24
+ }
25
+ function _(t) {
26
+ const n = l(t), e = n.getFullYear(), r = y(t, 0);
27
+ r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
28
+ const a = v(r), i = y(t, 0);
29
+ i.setFullYear(e, 0, 4), i.setHours(0, 0, 0, 0);
30
+ const s = v(i);
31
+ return n.getTime() >= a.getTime() ? e + 1 : n.getTime() >= s.getTime() ? e : e - 1;
32
+ }
33
+ function N(t) {
34
+ const n = l(t);
35
+ return n.setHours(0, 0, 0, 0), n;
36
+ }
37
+ function p(t) {
38
+ const n = l(t), e = new Date(
39
+ Date.UTC(
40
+ n.getFullYear(),
41
+ n.getMonth(),
42
+ n.getDate(),
43
+ n.getHours(),
44
+ n.getMinutes(),
45
+ n.getSeconds(),
46
+ n.getMilliseconds()
47
+ )
48
+ );
49
+ return e.setUTCFullYear(n.getFullYear()), +t - +e;
50
+ }
51
+ function A(t, n) {
52
+ const e = N(t), r = N(n), a = +e - p(e), i = +r - p(r);
53
+ return Math.round((a - i) / R);
54
+ }
55
+ function I(t) {
56
+ const n = _(t), e = y(t, 0);
57
+ return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), v(e);
58
+ }
59
+ function V(t) {
60
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
61
+ }
62
+ function J(t) {
63
+ if (!V(t) && typeof t != "number")
64
+ return !1;
65
+ const n = l(t);
66
+ return !isNaN(Number(n));
67
+ }
68
+ function $(t) {
69
+ const n = l(t), e = y(t, 0);
70
+ return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
71
+ }
72
+ const U = {
73
+ lessThanXSeconds: {
74
+ one: "less than a second",
75
+ other: "less than {{count}} seconds"
76
+ },
77
+ xSeconds: {
78
+ one: "1 second",
79
+ other: "{{count}} seconds"
80
+ },
81
+ halfAMinute: "half a minute",
82
+ lessThanXMinutes: {
83
+ one: "less than a minute",
84
+ other: "less than {{count}} minutes"
85
+ },
86
+ xMinutes: {
87
+ one: "1 minute",
88
+ other: "{{count}} minutes"
89
+ },
90
+ aboutXHours: {
91
+ one: "about 1 hour",
92
+ other: "about {{count}} hours"
93
+ },
94
+ xHours: {
95
+ one: "1 hour",
96
+ other: "{{count}} hours"
97
+ },
98
+ xDays: {
99
+ one: "1 day",
100
+ other: "{{count}} days"
101
+ },
102
+ aboutXWeeks: {
103
+ one: "about 1 week",
104
+ other: "about {{count}} weeks"
105
+ },
106
+ xWeeks: {
107
+ one: "1 week",
108
+ other: "{{count}} weeks"
109
+ },
110
+ aboutXMonths: {
111
+ one: "about 1 month",
112
+ other: "about {{count}} months"
113
+ },
114
+ xMonths: {
115
+ one: "1 month",
116
+ other: "{{count}} months"
117
+ },
118
+ aboutXYears: {
119
+ one: "about 1 year",
120
+ other: "about {{count}} years"
121
+ },
122
+ xYears: {
123
+ one: "1 year",
124
+ other: "{{count}} years"
125
+ },
126
+ overXYears: {
127
+ one: "over 1 year",
128
+ other: "over {{count}} years"
129
+ },
130
+ almostXYears: {
131
+ one: "almost 1 year",
132
+ other: "almost {{count}} years"
133
+ }
134
+ }, z = (t, n, e) => {
135
+ let r;
136
+ const a = U[t];
137
+ return typeof a == "string" ? r = a : n === 1 ? r = a.one : r = a.other.replace("{{count}}", n.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + r : r + " ago" : r;
138
+ };
139
+ function Y(t) {
140
+ return (n = {}) => {
141
+ const e = n.width ? String(n.width) : t.defaultWidth;
142
+ return t.formats[e] || t.formats[t.defaultWidth];
143
+ };
144
+ }
145
+ const K = {
146
+ full: "EEEE, MMMM do, y",
147
+ long: "MMMM do, y",
148
+ medium: "MMM d, y",
149
+ short: "MM/dd/yyyy"
150
+ }, Z = {
151
+ full: "h:mm:ss a zzzz",
152
+ long: "h:mm:ss a z",
153
+ medium: "h:mm:ss a",
154
+ short: "h:mm a"
155
+ }, tt = {
156
+ full: "{{date}} 'at' {{time}}",
157
+ long: "{{date}} 'at' {{time}}",
158
+ medium: "{{date}}, {{time}}",
159
+ short: "{{date}}, {{time}}"
160
+ }, et = {
161
+ date: Y({
162
+ formats: K,
163
+ defaultWidth: "full"
164
+ }),
165
+ time: Y({
166
+ formats: Z,
167
+ defaultWidth: "full"
168
+ }),
169
+ dateTime: Y({
170
+ formats: tt,
171
+ defaultWidth: "full"
172
+ })
173
+ }, nt = {
174
+ lastWeek: "'last' eeee 'at' p",
175
+ yesterday: "'yesterday at' p",
176
+ today: "'today at' p",
177
+ tomorrow: "'tomorrow at' p",
178
+ nextWeek: "eeee 'at' p",
179
+ other: "P"
180
+ }, rt = (t, n, e, r) => nt[t];
181
+ function k(t) {
182
+ return (n, e) => {
183
+ const r = e != null && e.context ? String(e.context) : "standalone";
184
+ let a;
185
+ if (r === "formatting" && t.formattingValues) {
186
+ const s = t.defaultFormattingWidth || t.defaultWidth, u = e != null && e.width ? String(e.width) : s;
187
+ a = t.formattingValues[u] || t.formattingValues[s];
188
+ } else {
189
+ const s = t.defaultWidth, u = e != null && e.width ? String(e.width) : t.defaultWidth;
190
+ a = t.values[u] || t.values[s];
191
+ }
192
+ const i = t.argumentCallback ? t.argumentCallback(n) : n;
193
+ return a[i];
194
+ };
195
+ }
196
+ const at = {
197
+ narrow: ["B", "A"],
198
+ abbreviated: ["BC", "AD"],
199
+ wide: ["Before Christ", "Anno Domini"]
200
+ }, it = {
201
+ narrow: ["1", "2", "3", "4"],
202
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
203
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
204
+ }, ot = {
205
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
206
+ abbreviated: [
207
+ "Jan",
208
+ "Feb",
209
+ "Mar",
210
+ "Apr",
211
+ "May",
212
+ "Jun",
213
+ "Jul",
214
+ "Aug",
215
+ "Sep",
216
+ "Oct",
217
+ "Nov",
218
+ "Dec"
219
+ ],
220
+ wide: [
221
+ "January",
222
+ "February",
223
+ "March",
224
+ "April",
225
+ "May",
226
+ "June",
227
+ "July",
228
+ "August",
229
+ "September",
230
+ "October",
231
+ "November",
232
+ "December"
233
+ ]
234
+ }, st = {
235
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
236
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
237
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
238
+ wide: [
239
+ "Sunday",
240
+ "Monday",
241
+ "Tuesday",
242
+ "Wednesday",
243
+ "Thursday",
244
+ "Friday",
245
+ "Saturday"
246
+ ]
247
+ }, ut = {
248
+ narrow: {
249
+ am: "a",
250
+ pm: "p",
251
+ midnight: "mi",
252
+ noon: "n",
253
+ morning: "morning",
254
+ afternoon: "afternoon",
255
+ evening: "evening",
256
+ night: "night"
257
+ },
258
+ abbreviated: {
259
+ am: "AM",
260
+ pm: "PM",
261
+ midnight: "midnight",
262
+ noon: "noon",
263
+ morning: "morning",
264
+ afternoon: "afternoon",
265
+ evening: "evening",
266
+ night: "night"
267
+ },
268
+ wide: {
269
+ am: "a.m.",
270
+ pm: "p.m.",
271
+ midnight: "midnight",
272
+ noon: "noon",
273
+ morning: "morning",
274
+ afternoon: "afternoon",
275
+ evening: "evening",
276
+ night: "night"
277
+ }
278
+ }, ct = {
279
+ narrow: {
280
+ am: "a",
281
+ pm: "p",
282
+ midnight: "mi",
283
+ noon: "n",
284
+ morning: "in the morning",
285
+ afternoon: "in the afternoon",
286
+ evening: "in the evening",
287
+ night: "at night"
288
+ },
289
+ abbreviated: {
290
+ am: "AM",
291
+ pm: "PM",
292
+ midnight: "midnight",
293
+ noon: "noon",
294
+ morning: "in the morning",
295
+ afternoon: "in the afternoon",
296
+ evening: "in the evening",
297
+ night: "at night"
298
+ },
299
+ wide: {
300
+ am: "a.m.",
301
+ pm: "p.m.",
302
+ midnight: "midnight",
303
+ noon: "noon",
304
+ morning: "in the morning",
305
+ afternoon: "in the afternoon",
306
+ evening: "in the evening",
307
+ night: "at night"
308
+ }
309
+ }, dt = (t, n) => {
310
+ const e = Number(t), r = e % 100;
311
+ if (r > 20 || r < 10)
312
+ switch (r % 10) {
313
+ case 1:
314
+ return e + "st";
315
+ case 2:
316
+ return e + "nd";
317
+ case 3:
318
+ return e + "rd";
319
+ }
320
+ return e + "th";
321
+ }, ft = {
322
+ ordinalNumber: dt,
323
+ era: k({
324
+ values: at,
325
+ defaultWidth: "wide"
326
+ }),
327
+ quarter: k({
328
+ values: it,
329
+ defaultWidth: "wide",
330
+ argumentCallback: (t) => t - 1
331
+ }),
332
+ month: k({
333
+ values: ot,
334
+ defaultWidth: "wide"
335
+ }),
336
+ day: k({
337
+ values: st,
338
+ defaultWidth: "wide"
339
+ }),
340
+ dayPeriod: k({
341
+ values: ut,
342
+ defaultWidth: "wide",
343
+ formattingValues: ct,
344
+ defaultFormattingWidth: "wide"
345
+ })
346
+ };
347
+ function x(t) {
348
+ return (n, e = {}) => {
349
+ const r = e.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = n.match(a);
350
+ if (!i)
351
+ return null;
352
+ const s = i[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(u) ? mt(u, (g) => g.test(s)) : (
353
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
354
+ ht(u, (g) => g.test(s))
355
+ );
356
+ let d;
357
+ d = t.valueCallback ? t.valueCallback(c) : c, d = e.valueCallback ? (
358
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
359
+ e.valueCallback(d)
360
+ ) : d;
361
+ const h = n.slice(s.length);
362
+ return { value: d, rest: h };
363
+ };
364
+ }
365
+ function ht(t, n) {
366
+ for (const e in t)
367
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
368
+ return e;
369
+ }
370
+ function mt(t, n) {
371
+ for (let e = 0; e < t.length; e++)
372
+ if (n(t[e]))
373
+ return e;
374
+ }
375
+ function lt(t) {
376
+ return (n, e = {}) => {
377
+ const r = n.match(t.matchPattern);
378
+ if (!r) return null;
379
+ const a = r[0], i = n.match(t.parsePattern);
380
+ if (!i) return null;
381
+ let s = t.valueCallback ? t.valueCallback(i[0]) : i[0];
382
+ s = e.valueCallback ? e.valueCallback(s) : s;
383
+ const u = n.slice(a.length);
384
+ return { value: s, rest: u };
385
+ };
386
+ }
387
+ const gt = /^(\d+)(th|st|nd|rd)?/i, wt = /\d+/i, yt = {
388
+ narrow: /^(b|a)/i,
389
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
390
+ wide: /^(before christ|before common era|anno domini|common era)/i
391
+ }, bt = {
392
+ any: [/^b/i, /^(a|c)/i]
393
+ }, Mt = {
394
+ narrow: /^[1234]/i,
395
+ abbreviated: /^q[1234]/i,
396
+ wide: /^[1234](th|st|nd|rd)? quarter/i
397
+ }, Pt = {
398
+ any: [/1/i, /2/i, /3/i, /4/i]
399
+ }, Ot = {
400
+ narrow: /^[jfmasond]/i,
401
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
402
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
403
+ }, kt = {
404
+ narrow: [
405
+ /^j/i,
406
+ /^f/i,
407
+ /^m/i,
408
+ /^a/i,
409
+ /^m/i,
410
+ /^j/i,
411
+ /^j/i,
412
+ /^a/i,
413
+ /^s/i,
414
+ /^o/i,
415
+ /^n/i,
416
+ /^d/i
417
+ ],
418
+ any: [
419
+ /^ja/i,
420
+ /^f/i,
421
+ /^mar/i,
422
+ /^ap/i,
423
+ /^may/i,
424
+ /^jun/i,
425
+ /^jul/i,
426
+ /^au/i,
427
+ /^s/i,
428
+ /^o/i,
429
+ /^n/i,
430
+ /^d/i
431
+ ]
432
+ }, xt = {
433
+ narrow: /^[smtwf]/i,
434
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
435
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
436
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
437
+ }, Dt = {
438
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
439
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
440
+ }, vt = {
441
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
442
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
443
+ }, Wt = {
444
+ any: {
445
+ am: /^a/i,
446
+ pm: /^p/i,
447
+ midnight: /^mi/i,
448
+ noon: /^no/i,
449
+ morning: /morning/i,
450
+ afternoon: /afternoon/i,
451
+ evening: /evening/i,
452
+ night: /night/i
453
+ }
454
+ }, St = {
455
+ ordinalNumber: lt({
456
+ matchPattern: gt,
457
+ parsePattern: wt,
458
+ valueCallback: (t) => parseInt(t, 10)
459
+ }),
460
+ era: x({
461
+ matchPatterns: yt,
462
+ defaultMatchWidth: "wide",
463
+ parsePatterns: bt,
464
+ defaultParseWidth: "any"
465
+ }),
466
+ quarter: x({
467
+ matchPatterns: Mt,
468
+ defaultMatchWidth: "wide",
469
+ parsePatterns: Pt,
470
+ defaultParseWidth: "any",
471
+ valueCallback: (t) => t + 1
472
+ }),
473
+ month: x({
474
+ matchPatterns: Ot,
475
+ defaultMatchWidth: "wide",
476
+ parsePatterns: kt,
477
+ defaultParseWidth: "any"
478
+ }),
479
+ day: x({
480
+ matchPatterns: xt,
481
+ defaultMatchWidth: "wide",
482
+ parsePatterns: Dt,
483
+ defaultParseWidth: "any"
484
+ }),
485
+ dayPeriod: x({
486
+ matchPatterns: vt,
487
+ defaultMatchWidth: "any",
488
+ parsePatterns: Wt,
489
+ defaultParseWidth: "any"
490
+ })
491
+ }, Yt = {
492
+ code: "en-US",
493
+ formatDistance: z,
494
+ formatLong: et,
495
+ formatRelative: rt,
496
+ localize: ft,
497
+ match: St,
498
+ options: {
499
+ weekStartsOn: 0,
500
+ firstWeekContainsDate: 1
501
+ }
502
+ };
503
+ function Tt(t) {
504
+ const n = l(t);
505
+ return A(n, $(n)) + 1;
506
+ }
507
+ function Et(t) {
508
+ const n = l(t), e = +v(n) - +I(n);
509
+ return Math.round(e / X) + 1;
510
+ }
511
+ function L(t, n) {
512
+ var h, g, P, O;
513
+ const e = l(t), r = e.getFullYear(), a = W(), i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((O = (P = a.locale) == null ? void 0 : P.options) == null ? void 0 : O.firstWeekContainsDate) ?? 1, s = y(t, 0);
514
+ s.setFullYear(r + 1, 0, i), s.setHours(0, 0, 0, 0);
515
+ const u = D(s, n), c = y(t, 0);
516
+ c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
517
+ const d = D(c, n);
518
+ return e.getTime() >= u.getTime() ? r + 1 : e.getTime() >= d.getTime() ? r : r - 1;
519
+ }
520
+ function Ft(t, n) {
521
+ var u, c, d, h;
522
+ const e = W(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((c = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : c.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((h = (d = e.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, a = L(t, n), i = y(t, 0);
523
+ return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), D(i, n);
524
+ }
525
+ function Ct(t, n) {
526
+ const e = l(t), r = +D(e, n) - +Ft(e, n);
527
+ return Math.round(r / X) + 1;
528
+ }
529
+ function o(t, n) {
530
+ const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
531
+ return e + r;
532
+ }
533
+ const w = {
534
+ // Year
535
+ y(t, n) {
536
+ const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
537
+ return o(n === "yy" ? r % 100 : r, n.length);
538
+ },
539
+ // Month
540
+ M(t, n) {
541
+ const e = t.getMonth();
542
+ return n === "M" ? String(e + 1) : o(e + 1, 2);
543
+ },
544
+ // Day of the month
545
+ d(t, n) {
546
+ return o(t.getDate(), n.length);
547
+ },
548
+ // AM or PM
549
+ a(t, n) {
550
+ const e = t.getHours() / 12 >= 1 ? "pm" : "am";
551
+ switch (n) {
552
+ case "a":
553
+ case "aa":
554
+ return e.toUpperCase();
555
+ case "aaa":
556
+ return e;
557
+ case "aaaaa":
558
+ return e[0];
559
+ case "aaaa":
560
+ default:
561
+ return e === "am" ? "a.m." : "p.m.";
562
+ }
563
+ },
564
+ // Hour [1-12]
565
+ h(t, n) {
566
+ return o(t.getHours() % 12 || 12, n.length);
567
+ },
568
+ // Hour [0-23]
569
+ H(t, n) {
570
+ return o(t.getHours(), n.length);
571
+ },
572
+ // Minute
573
+ m(t, n) {
574
+ return o(t.getMinutes(), n.length);
575
+ },
576
+ // Second
577
+ s(t, n) {
578
+ return o(t.getSeconds(), n.length);
579
+ },
580
+ // Fraction of second
581
+ S(t, n) {
582
+ const e = n.length, r = t.getMilliseconds(), a = Math.trunc(
583
+ r * Math.pow(10, e - 3)
584
+ );
585
+ return o(a, n.length);
586
+ }
587
+ }, M = {
588
+ midnight: "midnight",
589
+ noon: "noon",
590
+ morning: "morning",
591
+ afternoon: "afternoon",
592
+ evening: "evening",
593
+ night: "night"
594
+ }, q = {
595
+ // Era
596
+ G: function(t, n, e) {
597
+ const r = t.getFullYear() > 0 ? 1 : 0;
598
+ switch (n) {
599
+ case "G":
600
+ case "GG":
601
+ case "GGG":
602
+ return e.era(r, { width: "abbreviated" });
603
+ case "GGGGG":
604
+ return e.era(r, { width: "narrow" });
605
+ case "GGGG":
606
+ default:
607
+ return e.era(r, { width: "wide" });
608
+ }
609
+ },
610
+ // Year
611
+ y: function(t, n, e) {
612
+ if (n === "yo") {
613
+ const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
614
+ return e.ordinalNumber(a, { unit: "year" });
615
+ }
616
+ return w.y(t, n);
617
+ },
618
+ // Local week-numbering year
619
+ Y: function(t, n, e, r) {
620
+ const a = L(t, r), i = a > 0 ? a : 1 - a;
621
+ if (n === "YY") {
622
+ const s = i % 100;
623
+ return o(s, 2);
624
+ }
625
+ return n === "Yo" ? e.ordinalNumber(i, { unit: "year" }) : o(i, n.length);
626
+ },
627
+ // ISO week-numbering year
628
+ R: function(t, n) {
629
+ const e = _(t);
630
+ return o(e, n.length);
631
+ },
632
+ // Extended year. This is a single number designating the year of this calendar system.
633
+ // The main difference between `y` and `u` localizers are B.C. years:
634
+ // | Year | `y` | `u` |
635
+ // |------|-----|-----|
636
+ // | AC 1 | 1 | 1 |
637
+ // | BC 1 | 1 | 0 |
638
+ // | BC 2 | 2 | -1 |
639
+ // Also `yy` always returns the last two digits of a year,
640
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
641
+ u: function(t, n) {
642
+ const e = t.getFullYear();
643
+ return o(e, n.length);
644
+ },
645
+ // Quarter
646
+ Q: function(t, n, e) {
647
+ const r = Math.ceil((t.getMonth() + 1) / 3);
648
+ switch (n) {
649
+ case "Q":
650
+ return String(r);
651
+ case "QQ":
652
+ return o(r, 2);
653
+ case "Qo":
654
+ return e.ordinalNumber(r, { unit: "quarter" });
655
+ case "QQQ":
656
+ return e.quarter(r, {
657
+ width: "abbreviated",
658
+ context: "formatting"
659
+ });
660
+ case "QQQQQ":
661
+ return e.quarter(r, {
662
+ width: "narrow",
663
+ context: "formatting"
664
+ });
665
+ case "QQQQ":
666
+ default:
667
+ return e.quarter(r, {
668
+ width: "wide",
669
+ context: "formatting"
670
+ });
671
+ }
672
+ },
673
+ // Stand-alone quarter
674
+ q: function(t, n, e) {
675
+ const r = Math.ceil((t.getMonth() + 1) / 3);
676
+ switch (n) {
677
+ case "q":
678
+ return String(r);
679
+ case "qq":
680
+ return o(r, 2);
681
+ case "qo":
682
+ return e.ordinalNumber(r, { unit: "quarter" });
683
+ case "qqq":
684
+ return e.quarter(r, {
685
+ width: "abbreviated",
686
+ context: "standalone"
687
+ });
688
+ case "qqqqq":
689
+ return e.quarter(r, {
690
+ width: "narrow",
691
+ context: "standalone"
692
+ });
693
+ case "qqqq":
694
+ default:
695
+ return e.quarter(r, {
696
+ width: "wide",
697
+ context: "standalone"
698
+ });
699
+ }
700
+ },
701
+ // Month
702
+ M: function(t, n, e) {
703
+ const r = t.getMonth();
704
+ switch (n) {
705
+ case "M":
706
+ case "MM":
707
+ return w.M(t, n);
708
+ case "Mo":
709
+ return e.ordinalNumber(r + 1, { unit: "month" });
710
+ case "MMM":
711
+ return e.month(r, {
712
+ width: "abbreviated",
713
+ context: "formatting"
714
+ });
715
+ case "MMMMM":
716
+ return e.month(r, {
717
+ width: "narrow",
718
+ context: "formatting"
719
+ });
720
+ case "MMMM":
721
+ default:
722
+ return e.month(r, { width: "wide", context: "formatting" });
723
+ }
724
+ },
725
+ // Stand-alone month
726
+ L: function(t, n, e) {
727
+ const r = t.getMonth();
728
+ switch (n) {
729
+ case "L":
730
+ return String(r + 1);
731
+ case "LL":
732
+ return o(r + 1, 2);
733
+ case "Lo":
734
+ return e.ordinalNumber(r + 1, { unit: "month" });
735
+ case "LLL":
736
+ return e.month(r, {
737
+ width: "abbreviated",
738
+ context: "standalone"
739
+ });
740
+ case "LLLLL":
741
+ return e.month(r, {
742
+ width: "narrow",
743
+ context: "standalone"
744
+ });
745
+ case "LLLL":
746
+ default:
747
+ return e.month(r, { width: "wide", context: "standalone" });
748
+ }
749
+ },
750
+ // Local week of year
751
+ w: function(t, n, e, r) {
752
+ const a = Ct(t, r);
753
+ return n === "wo" ? e.ordinalNumber(a, { unit: "week" }) : o(a, n.length);
754
+ },
755
+ // ISO week of year
756
+ I: function(t, n, e) {
757
+ const r = Et(t);
758
+ return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : o(r, n.length);
759
+ },
760
+ // Day of the month
761
+ d: function(t, n, e) {
762
+ return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : w.d(t, n);
763
+ },
764
+ // Day of year
765
+ D: function(t, n, e) {
766
+ const r = Tt(t);
767
+ return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : o(r, n.length);
768
+ },
769
+ // Day of week
770
+ E: function(t, n, e) {
771
+ const r = t.getDay();
772
+ switch (n) {
773
+ case "E":
774
+ case "EE":
775
+ case "EEE":
776
+ return e.day(r, {
777
+ width: "abbreviated",
778
+ context: "formatting"
779
+ });
780
+ case "EEEEE":
781
+ return e.day(r, {
782
+ width: "narrow",
783
+ context: "formatting"
784
+ });
785
+ case "EEEEEE":
786
+ return e.day(r, {
787
+ width: "short",
788
+ context: "formatting"
789
+ });
790
+ case "EEEE":
791
+ default:
792
+ return e.day(r, {
793
+ width: "wide",
794
+ context: "formatting"
795
+ });
796
+ }
797
+ },
798
+ // Local day of week
799
+ e: function(t, n, e, r) {
800
+ const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
801
+ switch (n) {
802
+ case "e":
803
+ return String(i);
804
+ case "ee":
805
+ return o(i, 2);
806
+ case "eo":
807
+ return e.ordinalNumber(i, { unit: "day" });
808
+ case "eee":
809
+ return e.day(a, {
810
+ width: "abbreviated",
811
+ context: "formatting"
812
+ });
813
+ case "eeeee":
814
+ return e.day(a, {
815
+ width: "narrow",
816
+ context: "formatting"
817
+ });
818
+ case "eeeeee":
819
+ return e.day(a, {
820
+ width: "short",
821
+ context: "formatting"
822
+ });
823
+ case "eeee":
824
+ default:
825
+ return e.day(a, {
826
+ width: "wide",
827
+ context: "formatting"
828
+ });
829
+ }
830
+ },
831
+ // Stand-alone local day of week
832
+ c: function(t, n, e, r) {
833
+ const a = t.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
834
+ switch (n) {
835
+ case "c":
836
+ return String(i);
837
+ case "cc":
838
+ return o(i, n.length);
839
+ case "co":
840
+ return e.ordinalNumber(i, { unit: "day" });
841
+ case "ccc":
842
+ return e.day(a, {
843
+ width: "abbreviated",
844
+ context: "standalone"
845
+ });
846
+ case "ccccc":
847
+ return e.day(a, {
848
+ width: "narrow",
849
+ context: "standalone"
850
+ });
851
+ case "cccccc":
852
+ return e.day(a, {
853
+ width: "short",
854
+ context: "standalone"
855
+ });
856
+ case "cccc":
857
+ default:
858
+ return e.day(a, {
859
+ width: "wide",
860
+ context: "standalone"
861
+ });
862
+ }
863
+ },
864
+ // ISO day of week
865
+ i: function(t, n, e) {
866
+ const r = t.getDay(), a = r === 0 ? 7 : r;
867
+ switch (n) {
868
+ case "i":
869
+ return String(a);
870
+ case "ii":
871
+ return o(a, n.length);
872
+ case "io":
873
+ return e.ordinalNumber(a, { unit: "day" });
874
+ case "iii":
875
+ return e.day(r, {
876
+ width: "abbreviated",
877
+ context: "formatting"
878
+ });
879
+ case "iiiii":
880
+ return e.day(r, {
881
+ width: "narrow",
882
+ context: "formatting"
883
+ });
884
+ case "iiiiii":
885
+ return e.day(r, {
886
+ width: "short",
887
+ context: "formatting"
888
+ });
889
+ case "iiii":
890
+ default:
891
+ return e.day(r, {
892
+ width: "wide",
893
+ context: "formatting"
894
+ });
895
+ }
896
+ },
897
+ // AM or PM
898
+ a: function(t, n, e) {
899
+ const a = t.getHours() / 12 >= 1 ? "pm" : "am";
900
+ switch (n) {
901
+ case "a":
902
+ case "aa":
903
+ return e.dayPeriod(a, {
904
+ width: "abbreviated",
905
+ context: "formatting"
906
+ });
907
+ case "aaa":
908
+ return e.dayPeriod(a, {
909
+ width: "abbreviated",
910
+ context: "formatting"
911
+ }).toLowerCase();
912
+ case "aaaaa":
913
+ return e.dayPeriod(a, {
914
+ width: "narrow",
915
+ context: "formatting"
916
+ });
917
+ case "aaaa":
918
+ default:
919
+ return e.dayPeriod(a, {
920
+ width: "wide",
921
+ context: "formatting"
922
+ });
923
+ }
924
+ },
925
+ // AM, PM, midnight, noon
926
+ b: function(t, n, e) {
927
+ const r = t.getHours();
928
+ let a;
929
+ switch (r === 12 ? a = M.noon : r === 0 ? a = M.midnight : a = r / 12 >= 1 ? "pm" : "am", n) {
930
+ case "b":
931
+ case "bb":
932
+ return e.dayPeriod(a, {
933
+ width: "abbreviated",
934
+ context: "formatting"
935
+ });
936
+ case "bbb":
937
+ return e.dayPeriod(a, {
938
+ width: "abbreviated",
939
+ context: "formatting"
940
+ }).toLowerCase();
941
+ case "bbbbb":
942
+ return e.dayPeriod(a, {
943
+ width: "narrow",
944
+ context: "formatting"
945
+ });
946
+ case "bbbb":
947
+ default:
948
+ return e.dayPeriod(a, {
949
+ width: "wide",
950
+ context: "formatting"
951
+ });
952
+ }
953
+ },
954
+ // in the morning, in the afternoon, in the evening, at night
955
+ B: function(t, n, e) {
956
+ const r = t.getHours();
957
+ let a;
958
+ switch (r >= 17 ? a = M.evening : r >= 12 ? a = M.afternoon : r >= 4 ? a = M.morning : a = M.night, n) {
959
+ case "B":
960
+ case "BB":
961
+ case "BBB":
962
+ return e.dayPeriod(a, {
963
+ width: "abbreviated",
964
+ context: "formatting"
965
+ });
966
+ case "BBBBB":
967
+ return e.dayPeriod(a, {
968
+ width: "narrow",
969
+ context: "formatting"
970
+ });
971
+ case "BBBB":
972
+ default:
973
+ return e.dayPeriod(a, {
974
+ width: "wide",
975
+ context: "formatting"
976
+ });
977
+ }
978
+ },
979
+ // Hour [1-12]
980
+ h: function(t, n, e) {
981
+ if (n === "ho") {
982
+ let r = t.getHours() % 12;
983
+ return r === 0 && (r = 12), e.ordinalNumber(r, { unit: "hour" });
984
+ }
985
+ return w.h(t, n);
986
+ },
987
+ // Hour [0-23]
988
+ H: function(t, n, e) {
989
+ return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : w.H(t, n);
990
+ },
991
+ // Hour [0-11]
992
+ K: function(t, n, e) {
993
+ const r = t.getHours() % 12;
994
+ return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) : o(r, n.length);
995
+ },
996
+ // Hour [1-24]
997
+ k: function(t, n, e) {
998
+ let r = t.getHours();
999
+ return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) : o(r, n.length);
1000
+ },
1001
+ // Minute
1002
+ m: function(t, n, e) {
1003
+ return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : w.m(t, n);
1004
+ },
1005
+ // Second
1006
+ s: function(t, n, e) {
1007
+ return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : w.s(t, n);
1008
+ },
1009
+ // Fraction of second
1010
+ S: function(t, n) {
1011
+ return w.S(t, n);
1012
+ },
1013
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1014
+ X: function(t, n, e) {
1015
+ const r = t.getTimezoneOffset();
1016
+ if (r === 0)
1017
+ return "Z";
1018
+ switch (n) {
1019
+ case "X":
1020
+ return Q(r);
1021
+ case "XXXX":
1022
+ case "XX":
1023
+ return b(r);
1024
+ case "XXXXX":
1025
+ case "XXX":
1026
+ default:
1027
+ return b(r, ":");
1028
+ }
1029
+ },
1030
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1031
+ x: function(t, n, e) {
1032
+ const r = t.getTimezoneOffset();
1033
+ switch (n) {
1034
+ case "x":
1035
+ return Q(r);
1036
+ case "xxxx":
1037
+ case "xx":
1038
+ return b(r);
1039
+ case "xxxxx":
1040
+ case "xxx":
1041
+ default:
1042
+ return b(r, ":");
1043
+ }
1044
+ },
1045
+ // Timezone (GMT)
1046
+ O: function(t, n, e) {
1047
+ const r = t.getTimezoneOffset();
1048
+ switch (n) {
1049
+ case "O":
1050
+ case "OO":
1051
+ case "OOO":
1052
+ return "GMT" + H(r, ":");
1053
+ case "OOOO":
1054
+ default:
1055
+ return "GMT" + b(r, ":");
1056
+ }
1057
+ },
1058
+ // Timezone (specific non-location)
1059
+ z: function(t, n, e) {
1060
+ const r = t.getTimezoneOffset();
1061
+ switch (n) {
1062
+ case "z":
1063
+ case "zz":
1064
+ case "zzz":
1065
+ return "GMT" + H(r, ":");
1066
+ case "zzzz":
1067
+ default:
1068
+ return "GMT" + b(r, ":");
1069
+ }
1070
+ },
1071
+ // Seconds timestamp
1072
+ t: function(t, n, e) {
1073
+ const r = Math.trunc(t.getTime() / 1e3);
1074
+ return o(r, n.length);
1075
+ },
1076
+ // Milliseconds timestamp
1077
+ T: function(t, n, e) {
1078
+ const r = t.getTime();
1079
+ return o(r, n.length);
1080
+ }
1081
+ };
1082
+ function H(t, n = "") {
1083
+ const e = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
1084
+ return i === 0 ? e + String(a) : e + String(a) + n + o(i, 2);
1085
+ }
1086
+ function Q(t, n) {
1087
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + o(Math.abs(t) / 60, 2) : b(t, n);
1088
+ }
1089
+ function b(t, n = "") {
1090
+ const e = t > 0 ? "-" : "+", r = Math.abs(t), a = o(Math.trunc(r / 60), 2), i = o(r % 60, 2);
1091
+ return e + a + n + i;
1092
+ }
1093
+ const j = (t, n) => {
1094
+ switch (t) {
1095
+ case "P":
1096
+ return n.date({ width: "short" });
1097
+ case "PP":
1098
+ return n.date({ width: "medium" });
1099
+ case "PPP":
1100
+ return n.date({ width: "long" });
1101
+ case "PPPP":
1102
+ default:
1103
+ return n.date({ width: "full" });
1104
+ }
1105
+ }, G = (t, n) => {
1106
+ switch (t) {
1107
+ case "p":
1108
+ return n.time({ width: "short" });
1109
+ case "pp":
1110
+ return n.time({ width: "medium" });
1111
+ case "ppp":
1112
+ return n.time({ width: "long" });
1113
+ case "pppp":
1114
+ default:
1115
+ return n.time({ width: "full" });
1116
+ }
1117
+ }, Nt = (t, n) => {
1118
+ const e = t.match(/(P+)(p+)?/) || [], r = e[1], a = e[2];
1119
+ if (!a)
1120
+ return j(t, n);
1121
+ let i;
1122
+ switch (r) {
1123
+ case "P":
1124
+ i = n.dateTime({ width: "short" });
1125
+ break;
1126
+ case "PP":
1127
+ i = n.dateTime({ width: "medium" });
1128
+ break;
1129
+ case "PPP":
1130
+ i = n.dateTime({ width: "long" });
1131
+ break;
1132
+ case "PPPP":
1133
+ default:
1134
+ i = n.dateTime({ width: "full" });
1135
+ break;
1136
+ }
1137
+ return i.replace("{{date}}", j(r, n)).replace("{{time}}", G(a, n));
1138
+ }, pt = {
1139
+ p: G,
1140
+ P: Nt
1141
+ }, qt = /^D+$/, Ht = /^Y+$/, Qt = ["D", "DD", "YY", "YYYY"];
1142
+ function jt(t) {
1143
+ return qt.test(t);
1144
+ }
1145
+ function Xt(t) {
1146
+ return Ht.test(t);
1147
+ }
1148
+ function _t(t, n, e) {
1149
+ const r = Lt(t, n, e);
1150
+ if (console.warn(r), Qt.includes(t)) throw new RangeError(r);
1151
+ }
1152
+ function Lt(t, n, e) {
1153
+ const r = t[0] === "Y" ? "years" : "days of the month";
1154
+ return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1155
+ }
1156
+ const Gt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Rt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Bt = /^'([^]*?)'?$/, At = /''/g, It = /[a-zA-Z]/;
1157
+ function Kt(t, n, e) {
1158
+ var h, g, P, O, T, E, F, C;
1159
+ const r = W(), a = (e == null ? void 0 : e.locale) ?? r.locale ?? Yt, i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((g = (h = e == null ? void 0 : e.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((O = (P = r.locale) == null ? void 0 : P.options) == null ? void 0 : O.firstWeekContainsDate) ?? 1, s = (e == null ? void 0 : e.weekStartsOn) ?? ((E = (T = e == null ? void 0 : e.locale) == null ? void 0 : T.options) == null ? void 0 : E.weekStartsOn) ?? r.weekStartsOn ?? ((C = (F = r.locale) == null ? void 0 : F.options) == null ? void 0 : C.weekStartsOn) ?? 0, u = l(t);
1160
+ if (!J(u))
1161
+ throw new RangeError("Invalid time value");
1162
+ let c = n.match(Rt).map((m) => {
1163
+ const f = m[0];
1164
+ if (f === "p" || f === "P") {
1165
+ const S = pt[f];
1166
+ return S(m, a.formatLong);
1167
+ }
1168
+ return m;
1169
+ }).join("").match(Gt).map((m) => {
1170
+ if (m === "''")
1171
+ return { isToken: !1, value: "'" };
1172
+ const f = m[0];
1173
+ if (f === "'")
1174
+ return { isToken: !1, value: Vt(m) };
1175
+ if (q[f])
1176
+ return { isToken: !0, value: m };
1177
+ if (f.match(It))
1178
+ throw new RangeError(
1179
+ "Format string contains an unescaped latin alphabet character `" + f + "`"
1180
+ );
1181
+ return { isToken: !1, value: m };
1182
+ });
1183
+ a.localize.preprocessor && (c = a.localize.preprocessor(u, c));
1184
+ const d = {
1185
+ firstWeekContainsDate: i,
1186
+ weekStartsOn: s,
1187
+ locale: a
1188
+ };
1189
+ return c.map((m) => {
1190
+ if (!m.isToken) return m.value;
1191
+ const f = m.value;
1192
+ (!(e != null && e.useAdditionalWeekYearTokens) && Xt(f) || !(e != null && e.useAdditionalDayOfYearTokens) && jt(f)) && _t(f, n, String(t));
1193
+ const S = q[f[0]];
1194
+ return S(u, f, a.localize, d);
1195
+ }).join("");
1196
+ }
1197
+ function Vt(t) {
1198
+ const n = t.match(Bt);
1199
+ return n ? n[1].replace(At, "'") : t;
1200
+ }
1201
+ export {
1202
+ k as a,
1203
+ Y as b,
1204
+ y as c,
1205
+ x as d,
1206
+ lt as e,
1207
+ D as f,
1208
+ Kt as g,
1209
+ Jt as h,
1210
+ W as i,
1211
+ $t as j,
1212
+ zt as k,
1213
+ L as l,
1214
+ Ut as m,
1215
+ v as n,
1216
+ Ct as o,
1217
+ Et as p,
1218
+ p as q,
1219
+ Yt as r,
1220
+ N as s,
1221
+ l as t,
1222
+ pt as u,
1223
+ Xt as v,
1224
+ _t as w,
1225
+ jt as x,
1226
+ J as y
1227
+ };