@everymatrix/player-account-controller 1.76.10 → 1.76.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3533 +0,0 @@
1
- import { r as Ae, g as Ee, h as u, H as it, a as ot, c as st } from "./index-6e523641-C-aWDr56.js";
2
- const ut = {
3
- en: {
4
- deposit: "Deposit",
5
- withdrawals: "Withdrawals",
6
- show: "Show",
7
- from: "From",
8
- to: "To",
9
- filter: "Filter",
10
- transactionId: "Transaction ID",
11
- date: "Date",
12
- amount: "Amount",
13
- productType: "Product Type",
14
- status: "Status",
15
- noData: "There are no account activities",
16
- transactionTitle: "Transaction History"
17
- },
18
- hr: {
19
- deposit: "Uplate",
20
- withdrawals: "Isplate",
21
- show: "Prikaži",
22
- from: "Od",
23
- to: "Do",
24
- filter: "Filter",
25
- transactionId: "ID transakcije",
26
- date: "Datum",
27
- amount: "Iznos",
28
- productType: "Vrsta proizvoda",
29
- status: "Status",
30
- noData: "Nema aktivnosti na računu",
31
- transactionTitle: "Povijest transakcija"
32
- }
33
- };
34
- class g {
35
- constructor() {
36
- }
37
- static async loadCustomTranslations(a) {
38
- try {
39
- const t = await fetch(a, {
40
- headers: {
41
- "Content-Type": "application/json"
42
- }
43
- });
44
- if (!t.ok) {
45
- const e = await t.text();
46
- throw new Error(e);
47
- }
48
- const r = await t.json();
49
- g.updateTranslations(r);
50
- } catch (t) {
51
- console.error(`Failed to load translations ${a}. ${t.message}`);
52
- }
53
- }
54
- static translate(a, t) {
55
- var r, e;
56
- const o = g.getAvaliableLanguages(t);
57
- return ((e = (r = g.customTranslation) === null || r === void 0 ? void 0 : r[o.customLanguage]) === null || e === void 0 ? void 0 : e[a]) || g.defaultTranslation[o.predefinedLanguage][a];
58
- }
59
- static getAvaliableLanguages(a) {
60
- var t;
61
- const r = !((t = g.customLanguages) === null || t === void 0) && t.includes(a) ? a : g.defaultLanguage;
62
- return { predefinedLanguage: g.supportedLanguages.includes(a) ? a : g.defaultLanguage, customLanguage: r };
63
- }
64
- static updateTranslations(a) {
65
- g.customLanguages = Array.from(/* @__PURE__ */ new Set([...g.supportedLanguages, ...Object.keys(a).map((t) => t.toLowerCase())])), g.customTranslation = a;
66
- }
67
- }
68
- g.defaultLanguage = "en";
69
- g.supportedLanguages = ["en"];
70
- g.defaultTranslation = ut;
71
- const lt = () => u(
72
- "div",
73
- { class: "loader" },
74
- u("div", null),
75
- u("div", null),
76
- u("div", null),
77
- u("div", null),
78
- u("div", null),
79
- u("div", null),
80
- u("div", null),
81
- u("div", null),
82
- u("div", null),
83
- u("div", null),
84
- u("div", null),
85
- u("div", null)
86
- );
87
- function Q(i) {
88
- "@babel/helpers - typeof";
89
- return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
90
- return typeof a;
91
- } : function(a) {
92
- return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
93
- }, Q(i);
94
- }
95
- function M(i, a) {
96
- if (a.length < i)
97
- throw new TypeError(i + " argument" + (i > 1 ? "s" : "") + " required, but only " + a.length + " present");
98
- }
99
- function ct(i) {
100
- return M(1, arguments), i instanceof Date || Q(i) === "object" && Object.prototype.toString.call(i) === "[object Date]";
101
- }
102
- function W(i) {
103
- M(1, arguments);
104
- var a = Object.prototype.toString.call(i);
105
- return i instanceof Date || Q(i) === "object" && a === "[object Date]" ? new Date(i.getTime()) : typeof i == "number" || a === "[object Number]" ? new Date(i) : ((typeof i == "string" || a === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
106
- }
107
- function dt(i) {
108
- if (M(1, arguments), !ct(i) && typeof i != "number")
109
- return !1;
110
- var a = W(i);
111
- return !isNaN(Number(a));
112
- }
113
- function S(i) {
114
- if (i === null || i === !0 || i === !1)
115
- return NaN;
116
- var a = Number(i);
117
- return isNaN(a) ? a : a < 0 ? Math.ceil(a) : Math.floor(a);
118
- }
119
- function ft(i, a) {
120
- M(2, arguments);
121
- var t = W(i).getTime(), r = S(a);
122
- return new Date(t + r);
123
- }
124
- function Fe(i, a) {
125
- M(2, arguments);
126
- var t = S(a);
127
- return ft(i, -t);
128
- }
129
- var ht = 864e5;
130
- function vt(i) {
131
- M(1, arguments);
132
- var a = W(i), t = a.getTime();
133
- a.setUTCMonth(0, 1), a.setUTCHours(0, 0, 0, 0);
134
- var r = a.getTime(), e = t - r;
135
- return Math.floor(e / ht) + 1;
136
- }
137
- function ee(i) {
138
- M(1, arguments);
139
- var a = 1, t = W(i), r = t.getUTCDay(), e = (r < a ? 7 : 0) + r - a;
140
- return t.setUTCDate(t.getUTCDate() - e), t.setUTCHours(0, 0, 0, 0), t;
141
- }
142
- function Ie(i) {
143
- M(1, arguments);
144
- var a = W(i), t = a.getUTCFullYear(), r = /* @__PURE__ */ new Date(0);
145
- r.setUTCFullYear(t + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
146
- var e = ee(r), o = /* @__PURE__ */ new Date(0);
147
- o.setUTCFullYear(t, 0, 4), o.setUTCHours(0, 0, 0, 0);
148
- var n = ee(o);
149
- return a.getTime() >= e.getTime() ? t + 1 : a.getTime() >= n.getTime() ? t : t - 1;
150
- }
151
- function mt(i) {
152
- M(1, arguments);
153
- var a = Ie(i), t = /* @__PURE__ */ new Date(0);
154
- t.setUTCFullYear(a, 0, 4), t.setUTCHours(0, 0, 0, 0);
155
- var r = ee(t);
156
- return r;
157
- }
158
- var pt = 6048e5;
159
- function qe(i) {
160
- M(1, arguments);
161
- var a = W(i), t = ee(a).getTime() - mt(a).getTime();
162
- return Math.round(t / pt) + 1;
163
- }
164
- var gt = {};
165
- function te() {
166
- return gt;
167
- }
168
- function Z(i, a) {
169
- var t, r, e, o, n, s, d, f;
170
- M(1, arguments);
171
- var w = te(), y = S((t = (r = (e = (o = a?.weekStartsOn) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && e !== void 0 ? e : w.weekStartsOn) !== null && r !== void 0 ? r : (d = w.locale) === null || d === void 0 || (f = d.options) === null || f === void 0 ? void 0 : f.weekStartsOn) !== null && t !== void 0 ? t : 0);
172
- if (!(y >= 0 && y <= 6))
173
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
174
- var k = W(i), C = k.getUTCDay(), E = (C < y ? 7 : 0) + C - y;
175
- return k.setUTCDate(k.getUTCDate() - E), k.setUTCHours(0, 0, 0, 0), k;
176
- }
177
- function be(i, a) {
178
- var t, r, e, o, n, s, d, f;
179
- M(1, arguments);
180
- var w = W(i), y = w.getUTCFullYear(), k = te(), C = S((t = (r = (e = (o = a?.firstWeekContainsDate) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : k.firstWeekContainsDate) !== null && r !== void 0 ? r : (d = k.locale) === null || d === void 0 || (f = d.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && t !== void 0 ? t : 1);
181
- if (!(C >= 1 && C <= 7))
182
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
183
- var E = /* @__PURE__ */ new Date(0);
184
- E.setUTCFullYear(y + 1, 0, C), E.setUTCHours(0, 0, 0, 0);
185
- var F = Z(E, a), H = /* @__PURE__ */ new Date(0);
186
- H.setUTCFullYear(y, 0, C), H.setUTCHours(0, 0, 0, 0);
187
- var $ = Z(H, a);
188
- return w.getTime() >= F.getTime() ? y + 1 : w.getTime() >= $.getTime() ? y : y - 1;
189
- }
190
- function wt(i, a) {
191
- var t, r, e, o, n, s, d, f;
192
- M(1, arguments);
193
- var w = te(), y = S((t = (r = (e = (o = a?.firstWeekContainsDate) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : w.firstWeekContainsDate) !== null && r !== void 0 ? r : (d = w.locale) === null || d === void 0 || (f = d.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), k = be(i, a), C = /* @__PURE__ */ new Date(0);
194
- C.setUTCFullYear(k, 0, y), C.setUTCHours(0, 0, 0, 0);
195
- var E = Z(C, a);
196
- return E;
197
- }
198
- var yt = 6048e5;
199
- function Be(i, a) {
200
- M(1, arguments);
201
- var t = W(i), r = Z(t, a).getTime() - wt(t, a).getTime();
202
- return Math.round(r / yt) + 1;
203
- }
204
- function T(i, a) {
205
- for (var t = i < 0 ? "-" : "", r = Math.abs(i).toString(); r.length < a; )
206
- r = "0" + r;
207
- return t + r;
208
- }
209
- var bt = {
210
- // Year
211
- y: function(a, t) {
212
- var r = a.getUTCFullYear(), e = r > 0 ? r : 1 - r;
213
- return T(t === "yy" ? e % 100 : e, t.length);
214
- },
215
- // Month
216
- M: function(a, t) {
217
- var r = a.getUTCMonth();
218
- return t === "M" ? String(r + 1) : T(r + 1, 2);
219
- },
220
- // Day of the month
221
- d: function(a, t) {
222
- return T(a.getUTCDate(), t.length);
223
- },
224
- // AM or PM
225
- a: function(a, t) {
226
- var r = a.getUTCHours() / 12 >= 1 ? "pm" : "am";
227
- switch (t) {
228
- case "a":
229
- case "aa":
230
- return r.toUpperCase();
231
- case "aaa":
232
- return r;
233
- case "aaaaa":
234
- return r[0];
235
- case "aaaa":
236
- default:
237
- return r === "am" ? "a.m." : "p.m.";
238
- }
239
- },
240
- // Hour [1-12]
241
- h: function(a, t) {
242
- return T(a.getUTCHours() % 12 || 12, t.length);
243
- },
244
- // Hour [0-23]
245
- H: function(a, t) {
246
- return T(a.getUTCHours(), t.length);
247
- },
248
- // Minute
249
- m: function(a, t) {
250
- return T(a.getUTCMinutes(), t.length);
251
- },
252
- // Second
253
- s: function(a, t) {
254
- return T(a.getUTCSeconds(), t.length);
255
- },
256
- // Fraction of second
257
- S: function(a, t) {
258
- var r = t.length, e = a.getUTCMilliseconds(), o = Math.floor(e * Math.pow(10, r - 3));
259
- return T(o, t.length);
260
- }
261
- };
262
- const G = bt;
263
- var J = {
264
- midnight: "midnight",
265
- noon: "noon",
266
- morning: "morning",
267
- afternoon: "afternoon",
268
- evening: "evening",
269
- night: "night"
270
- }, Tt = {
271
- // Era
272
- G: function(a, t, r) {
273
- var e = a.getUTCFullYear() > 0 ? 1 : 0;
274
- switch (t) {
275
- case "G":
276
- case "GG":
277
- case "GGG":
278
- return r.era(e, {
279
- width: "abbreviated"
280
- });
281
- case "GGGGG":
282
- return r.era(e, {
283
- width: "narrow"
284
- });
285
- case "GGGG":
286
- default:
287
- return r.era(e, {
288
- width: "wide"
289
- });
290
- }
291
- },
292
- // Year
293
- y: function(a, t, r) {
294
- if (t === "yo") {
295
- var e = a.getUTCFullYear(), o = e > 0 ? e : 1 - e;
296
- return r.ordinalNumber(o, {
297
- unit: "year"
298
- });
299
- }
300
- return G.y(a, t);
301
- },
302
- // Local week-numbering year
303
- Y: function(a, t, r, e) {
304
- var o = be(a, e), n = o > 0 ? o : 1 - o;
305
- if (t === "YY") {
306
- var s = n % 100;
307
- return T(s, 2);
308
- }
309
- return t === "Yo" ? r.ordinalNumber(n, {
310
- unit: "year"
311
- }) : T(n, t.length);
312
- },
313
- // ISO week-numbering year
314
- R: function(a, t) {
315
- var r = Ie(a);
316
- return T(r, t.length);
317
- },
318
- // Extended year. This is a single number designating the year of this calendar system.
319
- // The main difference between `y` and `u` localizers are B.C. years:
320
- // | Year | `y` | `u` |
321
- // |------|-----|-----|
322
- // | AC 1 | 1 | 1 |
323
- // | BC 1 | 1 | 0 |
324
- // | BC 2 | 2 | -1 |
325
- // Also `yy` always returns the last two digits of a year,
326
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
327
- u: function(a, t) {
328
- var r = a.getUTCFullYear();
329
- return T(r, t.length);
330
- },
331
- // Quarter
332
- Q: function(a, t, r) {
333
- var e = Math.ceil((a.getUTCMonth() + 1) / 3);
334
- switch (t) {
335
- case "Q":
336
- return String(e);
337
- case "QQ":
338
- return T(e, 2);
339
- case "Qo":
340
- return r.ordinalNumber(e, {
341
- unit: "quarter"
342
- });
343
- case "QQQ":
344
- return r.quarter(e, {
345
- width: "abbreviated",
346
- context: "formatting"
347
- });
348
- case "QQQQQ":
349
- return r.quarter(e, {
350
- width: "narrow",
351
- context: "formatting"
352
- });
353
- case "QQQQ":
354
- default:
355
- return r.quarter(e, {
356
- width: "wide",
357
- context: "formatting"
358
- });
359
- }
360
- },
361
- // Stand-alone quarter
362
- q: function(a, t, r) {
363
- var e = Math.ceil((a.getUTCMonth() + 1) / 3);
364
- switch (t) {
365
- case "q":
366
- return String(e);
367
- case "qq":
368
- return T(e, 2);
369
- case "qo":
370
- return r.ordinalNumber(e, {
371
- unit: "quarter"
372
- });
373
- case "qqq":
374
- return r.quarter(e, {
375
- width: "abbreviated",
376
- context: "standalone"
377
- });
378
- case "qqqqq":
379
- return r.quarter(e, {
380
- width: "narrow",
381
- context: "standalone"
382
- });
383
- case "qqqq":
384
- default:
385
- return r.quarter(e, {
386
- width: "wide",
387
- context: "standalone"
388
- });
389
- }
390
- },
391
- // Month
392
- M: function(a, t, r) {
393
- var e = a.getUTCMonth();
394
- switch (t) {
395
- case "M":
396
- case "MM":
397
- return G.M(a, t);
398
- case "Mo":
399
- return r.ordinalNumber(e + 1, {
400
- unit: "month"
401
- });
402
- case "MMM":
403
- return r.month(e, {
404
- width: "abbreviated",
405
- context: "formatting"
406
- });
407
- case "MMMMM":
408
- return r.month(e, {
409
- width: "narrow",
410
- context: "formatting"
411
- });
412
- case "MMMM":
413
- default:
414
- return r.month(e, {
415
- width: "wide",
416
- context: "formatting"
417
- });
418
- }
419
- },
420
- // Stand-alone month
421
- L: function(a, t, r) {
422
- var e = a.getUTCMonth();
423
- switch (t) {
424
- case "L":
425
- return String(e + 1);
426
- case "LL":
427
- return T(e + 1, 2);
428
- case "Lo":
429
- return r.ordinalNumber(e + 1, {
430
- unit: "month"
431
- });
432
- case "LLL":
433
- return r.month(e, {
434
- width: "abbreviated",
435
- context: "standalone"
436
- });
437
- case "LLLLL":
438
- return r.month(e, {
439
- width: "narrow",
440
- context: "standalone"
441
- });
442
- case "LLLL":
443
- default:
444
- return r.month(e, {
445
- width: "wide",
446
- context: "standalone"
447
- });
448
- }
449
- },
450
- // Local week of year
451
- w: function(a, t, r, e) {
452
- var o = Be(a, e);
453
- return t === "wo" ? r.ordinalNumber(o, {
454
- unit: "week"
455
- }) : T(o, t.length);
456
- },
457
- // ISO week of year
458
- I: function(a, t, r) {
459
- var e = qe(a);
460
- return t === "Io" ? r.ordinalNumber(e, {
461
- unit: "week"
462
- }) : T(e, t.length);
463
- },
464
- // Day of the month
465
- d: function(a, t, r) {
466
- return t === "do" ? r.ordinalNumber(a.getUTCDate(), {
467
- unit: "date"
468
- }) : G.d(a, t);
469
- },
470
- // Day of year
471
- D: function(a, t, r) {
472
- var e = vt(a);
473
- return t === "Do" ? r.ordinalNumber(e, {
474
- unit: "dayOfYear"
475
- }) : T(e, t.length);
476
- },
477
- // Day of week
478
- E: function(a, t, r) {
479
- var e = a.getUTCDay();
480
- switch (t) {
481
- case "E":
482
- case "EE":
483
- case "EEE":
484
- return r.day(e, {
485
- width: "abbreviated",
486
- context: "formatting"
487
- });
488
- case "EEEEE":
489
- return r.day(e, {
490
- width: "narrow",
491
- context: "formatting"
492
- });
493
- case "EEEEEE":
494
- return r.day(e, {
495
- width: "short",
496
- context: "formatting"
497
- });
498
- case "EEEE":
499
- default:
500
- return r.day(e, {
501
- width: "wide",
502
- context: "formatting"
503
- });
504
- }
505
- },
506
- // Local day of week
507
- e: function(a, t, r, e) {
508
- var o = a.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
509
- switch (t) {
510
- case "e":
511
- return String(n);
512
- case "ee":
513
- return T(n, 2);
514
- case "eo":
515
- return r.ordinalNumber(n, {
516
- unit: "day"
517
- });
518
- case "eee":
519
- return r.day(o, {
520
- width: "abbreviated",
521
- context: "formatting"
522
- });
523
- case "eeeee":
524
- return r.day(o, {
525
- width: "narrow",
526
- context: "formatting"
527
- });
528
- case "eeeeee":
529
- return r.day(o, {
530
- width: "short",
531
- context: "formatting"
532
- });
533
- case "eeee":
534
- default:
535
- return r.day(o, {
536
- width: "wide",
537
- context: "formatting"
538
- });
539
- }
540
- },
541
- // Stand-alone local day of week
542
- c: function(a, t, r, e) {
543
- var o = a.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
544
- switch (t) {
545
- case "c":
546
- return String(n);
547
- case "cc":
548
- return T(n, t.length);
549
- case "co":
550
- return r.ordinalNumber(n, {
551
- unit: "day"
552
- });
553
- case "ccc":
554
- return r.day(o, {
555
- width: "abbreviated",
556
- context: "standalone"
557
- });
558
- case "ccccc":
559
- return r.day(o, {
560
- width: "narrow",
561
- context: "standalone"
562
- });
563
- case "cccccc":
564
- return r.day(o, {
565
- width: "short",
566
- context: "standalone"
567
- });
568
- case "cccc":
569
- default:
570
- return r.day(o, {
571
- width: "wide",
572
- context: "standalone"
573
- });
574
- }
575
- },
576
- // ISO day of week
577
- i: function(a, t, r) {
578
- var e = a.getUTCDay(), o = e === 0 ? 7 : e;
579
- switch (t) {
580
- case "i":
581
- return String(o);
582
- case "ii":
583
- return T(o, t.length);
584
- case "io":
585
- return r.ordinalNumber(o, {
586
- unit: "day"
587
- });
588
- case "iii":
589
- return r.day(e, {
590
- width: "abbreviated",
591
- context: "formatting"
592
- });
593
- case "iiiii":
594
- return r.day(e, {
595
- width: "narrow",
596
- context: "formatting"
597
- });
598
- case "iiiiii":
599
- return r.day(e, {
600
- width: "short",
601
- context: "formatting"
602
- });
603
- case "iiii":
604
- default:
605
- return r.day(e, {
606
- width: "wide",
607
- context: "formatting"
608
- });
609
- }
610
- },
611
- // AM or PM
612
- a: function(a, t, r) {
613
- var e = a.getUTCHours(), o = e / 12 >= 1 ? "pm" : "am";
614
- switch (t) {
615
- case "a":
616
- case "aa":
617
- return r.dayPeriod(o, {
618
- width: "abbreviated",
619
- context: "formatting"
620
- });
621
- case "aaa":
622
- return r.dayPeriod(o, {
623
- width: "abbreviated",
624
- context: "formatting"
625
- }).toLowerCase();
626
- case "aaaaa":
627
- return r.dayPeriod(o, {
628
- width: "narrow",
629
- context: "formatting"
630
- });
631
- case "aaaa":
632
- default:
633
- return r.dayPeriod(o, {
634
- width: "wide",
635
- context: "formatting"
636
- });
637
- }
638
- },
639
- // AM, PM, midnight, noon
640
- b: function(a, t, r) {
641
- var e = a.getUTCHours(), o;
642
- switch (e === 12 ? o = J.noon : e === 0 ? o = J.midnight : o = e / 12 >= 1 ? "pm" : "am", t) {
643
- case "b":
644
- case "bb":
645
- return r.dayPeriod(o, {
646
- width: "abbreviated",
647
- context: "formatting"
648
- });
649
- case "bbb":
650
- return r.dayPeriod(o, {
651
- width: "abbreviated",
652
- context: "formatting"
653
- }).toLowerCase();
654
- case "bbbbb":
655
- return r.dayPeriod(o, {
656
- width: "narrow",
657
- context: "formatting"
658
- });
659
- case "bbbb":
660
- default:
661
- return r.dayPeriod(o, {
662
- width: "wide",
663
- context: "formatting"
664
- });
665
- }
666
- },
667
- // in the morning, in the afternoon, in the evening, at night
668
- B: function(a, t, r) {
669
- var e = a.getUTCHours(), o;
670
- switch (e >= 17 ? o = J.evening : e >= 12 ? o = J.afternoon : e >= 4 ? o = J.morning : o = J.night, t) {
671
- case "B":
672
- case "BB":
673
- case "BBB":
674
- return r.dayPeriod(o, {
675
- width: "abbreviated",
676
- context: "formatting"
677
- });
678
- case "BBBBB":
679
- return r.dayPeriod(o, {
680
- width: "narrow",
681
- context: "formatting"
682
- });
683
- case "BBBB":
684
- default:
685
- return r.dayPeriod(o, {
686
- width: "wide",
687
- context: "formatting"
688
- });
689
- }
690
- },
691
- // Hour [1-12]
692
- h: function(a, t, r) {
693
- if (t === "ho") {
694
- var e = a.getUTCHours() % 12;
695
- return e === 0 && (e = 12), r.ordinalNumber(e, {
696
- unit: "hour"
697
- });
698
- }
699
- return G.h(a, t);
700
- },
701
- // Hour [0-23]
702
- H: function(a, t, r) {
703
- return t === "Ho" ? r.ordinalNumber(a.getUTCHours(), {
704
- unit: "hour"
705
- }) : G.H(a, t);
706
- },
707
- // Hour [0-11]
708
- K: function(a, t, r) {
709
- var e = a.getUTCHours() % 12;
710
- return t === "Ko" ? r.ordinalNumber(e, {
711
- unit: "hour"
712
- }) : T(e, t.length);
713
- },
714
- // Hour [1-24]
715
- k: function(a, t, r) {
716
- var e = a.getUTCHours();
717
- return e === 0 && (e = 24), t === "ko" ? r.ordinalNumber(e, {
718
- unit: "hour"
719
- }) : T(e, t.length);
720
- },
721
- // Minute
722
- m: function(a, t, r) {
723
- return t === "mo" ? r.ordinalNumber(a.getUTCMinutes(), {
724
- unit: "minute"
725
- }) : G.m(a, t);
726
- },
727
- // Second
728
- s: function(a, t, r) {
729
- return t === "so" ? r.ordinalNumber(a.getUTCSeconds(), {
730
- unit: "second"
731
- }) : G.s(a, t);
732
- },
733
- // Fraction of second
734
- S: function(a, t) {
735
- return G.S(a, t);
736
- },
737
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
738
- X: function(a, t, r, e) {
739
- var o = e._originalDate || a, n = o.getTimezoneOffset();
740
- if (n === 0)
741
- return "Z";
742
- switch (t) {
743
- case "X":
744
- return _e(n);
745
- case "XXXX":
746
- case "XX":
747
- return V(n);
748
- case "XXXXX":
749
- case "XXX":
750
- default:
751
- return V(n, ":");
752
- }
753
- },
754
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
755
- x: function(a, t, r, e) {
756
- var o = e._originalDate || a, n = o.getTimezoneOffset();
757
- switch (t) {
758
- case "x":
759
- return _e(n);
760
- case "xxxx":
761
- case "xx":
762
- return V(n);
763
- case "xxxxx":
764
- case "xxx":
765
- default:
766
- return V(n, ":");
767
- }
768
- },
769
- // Timezone (GMT)
770
- O: function(a, t, r, e) {
771
- var o = e._originalDate || a, n = o.getTimezoneOffset();
772
- switch (t) {
773
- case "O":
774
- case "OO":
775
- case "OOO":
776
- return "GMT" + Ye(n, ":");
777
- case "OOOO":
778
- default:
779
- return "GMT" + V(n, ":");
780
- }
781
- },
782
- // Timezone (specific non-location)
783
- z: function(a, t, r, e) {
784
- var o = e._originalDate || a, n = o.getTimezoneOffset();
785
- switch (t) {
786
- case "z":
787
- case "zz":
788
- case "zzz":
789
- return "GMT" + Ye(n, ":");
790
- case "zzzz":
791
- default:
792
- return "GMT" + V(n, ":");
793
- }
794
- },
795
- // Seconds timestamp
796
- t: function(a, t, r, e) {
797
- var o = e._originalDate || a, n = Math.floor(o.getTime() / 1e3);
798
- return T(n, t.length);
799
- },
800
- // Milliseconds timestamp
801
- T: function(a, t, r, e) {
802
- var o = e._originalDate || a, n = o.getTime();
803
- return T(n, t.length);
804
- }
805
- };
806
- function Ye(i, a) {
807
- var t = i > 0 ? "-" : "+", r = Math.abs(i), e = Math.floor(r / 60), o = r % 60;
808
- if (o === 0)
809
- return t + String(e);
810
- var n = a;
811
- return t + String(e) + n + T(o, 2);
812
- }
813
- function _e(i, a) {
814
- if (i % 60 === 0) {
815
- var t = i > 0 ? "-" : "+";
816
- return t + T(Math.abs(i) / 60, 2);
817
- }
818
- return V(i, a);
819
- }
820
- function V(i, a) {
821
- var t = a || "", r = i > 0 ? "-" : "+", e = Math.abs(i), o = T(Math.floor(e / 60), 2), n = T(e % 60, 2);
822
- return r + o + t + n;
823
- }
824
- const xt = Tt;
825
- var We = function(a, t) {
826
- switch (a) {
827
- case "P":
828
- return t.date({
829
- width: "short"
830
- });
831
- case "PP":
832
- return t.date({
833
- width: "medium"
834
- });
835
- case "PPP":
836
- return t.date({
837
- width: "long"
838
- });
839
- case "PPPP":
840
- default:
841
- return t.date({
842
- width: "full"
843
- });
844
- }
845
- }, $e = function(a, t) {
846
- switch (a) {
847
- case "p":
848
- return t.time({
849
- width: "short"
850
- });
851
- case "pp":
852
- return t.time({
853
- width: "medium"
854
- });
855
- case "ppp":
856
- return t.time({
857
- width: "long"
858
- });
859
- case "pppp":
860
- default:
861
- return t.time({
862
- width: "full"
863
- });
864
- }
865
- }, Ct = function(a, t) {
866
- var r = a.match(/(P+)(p+)?/) || [], e = r[1], o = r[2];
867
- if (!o)
868
- return We(a, t);
869
- var n;
870
- switch (e) {
871
- case "P":
872
- n = t.dateTime({
873
- width: "short"
874
- });
875
- break;
876
- case "PP":
877
- n = t.dateTime({
878
- width: "medium"
879
- });
880
- break;
881
- case "PPP":
882
- n = t.dateTime({
883
- width: "long"
884
- });
885
- break;
886
- case "PPPP":
887
- default:
888
- n = t.dateTime({
889
- width: "full"
890
- });
891
- break;
892
- }
893
- return n.replace("{{date}}", We(e, t)).replace("{{time}}", $e(o, t));
894
- }, Dt = {
895
- p: $e,
896
- P: Ct
897
- };
898
- const we = Dt;
899
- function Re(i) {
900
- var a = new Date(Date.UTC(i.getFullYear(), i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds(), i.getMilliseconds()));
901
- return a.setUTCFullYear(i.getFullYear()), i.getTime() - a.getTime();
902
- }
903
- var kt = ["D", "DD"], Pt = ["YY", "YYYY"];
904
- function Qe(i) {
905
- return kt.indexOf(i) !== -1;
906
- }
907
- function je(i) {
908
- return Pt.indexOf(i) !== -1;
909
- }
910
- function de(i, a, t) {
911
- if (i === "YYYY")
912
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
913
- if (i === "YY")
914
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
915
- if (i === "D")
916
- throw new RangeError("Use `d` instead of `D` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
917
- if (i === "DD")
918
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
919
- }
920
- var Mt = {
921
- lessThanXSeconds: {
922
- one: "less than a second",
923
- other: "less than {{count}} seconds"
924
- },
925
- xSeconds: {
926
- one: "1 second",
927
- other: "{{count}} seconds"
928
- },
929
- halfAMinute: "half a minute",
930
- lessThanXMinutes: {
931
- one: "less than a minute",
932
- other: "less than {{count}} minutes"
933
- },
934
- xMinutes: {
935
- one: "1 minute",
936
- other: "{{count}} minutes"
937
- },
938
- aboutXHours: {
939
- one: "about 1 hour",
940
- other: "about {{count}} hours"
941
- },
942
- xHours: {
943
- one: "1 hour",
944
- other: "{{count}} hours"
945
- },
946
- xDays: {
947
- one: "1 day",
948
- other: "{{count}} days"
949
- },
950
- aboutXWeeks: {
951
- one: "about 1 week",
952
- other: "about {{count}} weeks"
953
- },
954
- xWeeks: {
955
- one: "1 week",
956
- other: "{{count}} weeks"
957
- },
958
- aboutXMonths: {
959
- one: "about 1 month",
960
- other: "about {{count}} months"
961
- },
962
- xMonths: {
963
- one: "1 month",
964
- other: "{{count}} months"
965
- },
966
- aboutXYears: {
967
- one: "about 1 year",
968
- other: "about {{count}} years"
969
- },
970
- xYears: {
971
- one: "1 year",
972
- other: "{{count}} years"
973
- },
974
- overXYears: {
975
- one: "over 1 year",
976
- other: "over {{count}} years"
977
- },
978
- almostXYears: {
979
- one: "almost 1 year",
980
- other: "almost {{count}} years"
981
- }
982
- }, Ot = function(a, t, r) {
983
- var e, o = Mt[a];
984
- return typeof o == "string" ? e = o : t === 1 ? e = o.one : e = o.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + e : e + " ago" : e;
985
- };
986
- const Ut = Ot;
987
- function ge(i) {
988
- return function() {
989
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = a.width ? String(a.width) : i.defaultWidth, r = i.formats[t] || i.formats[i.defaultWidth];
990
- return r;
991
- };
992
- }
993
- var Et = {
994
- full: "EEEE, MMMM do, y",
995
- long: "MMMM do, y",
996
- medium: "MMM d, y",
997
- short: "MM/dd/yyyy"
998
- }, Yt = {
999
- full: "h:mm:ss a zzzz",
1000
- long: "h:mm:ss a z",
1001
- medium: "h:mm:ss a",
1002
- short: "h:mm a"
1003
- }, _t = {
1004
- full: "{{date}} 'at' {{time}}",
1005
- long: "{{date}} 'at' {{time}}",
1006
- medium: "{{date}}, {{time}}",
1007
- short: "{{date}}, {{time}}"
1008
- }, Wt = {
1009
- date: ge({
1010
- formats: Et,
1011
- defaultWidth: "full"
1012
- }),
1013
- time: ge({
1014
- formats: Yt,
1015
- defaultWidth: "full"
1016
- }),
1017
- dateTime: ge({
1018
- formats: _t,
1019
- defaultWidth: "full"
1020
- })
1021
- };
1022
- const Lt = Wt;
1023
- var St = {
1024
- lastWeek: "'last' eeee 'at' p",
1025
- yesterday: "'yesterday at' p",
1026
- today: "'today at' p",
1027
- tomorrow: "'tomorrow at' p",
1028
- nextWeek: "eeee 'at' p",
1029
- other: "P"
1030
- }, Ht = function(a, t, r, e) {
1031
- return St[a];
1032
- };
1033
- const Nt = Ht;
1034
- function oe(i) {
1035
- return function(a, t) {
1036
- var r = t != null && t.context ? String(t.context) : "standalone", e;
1037
- if (r === "formatting" && i.formattingValues) {
1038
- var o = i.defaultFormattingWidth || i.defaultWidth, n = t != null && t.width ? String(t.width) : o;
1039
- e = i.formattingValues[n] || i.formattingValues[o];
1040
- } else {
1041
- var s = i.defaultWidth, d = t != null && t.width ? String(t.width) : i.defaultWidth;
1042
- e = i.values[d] || i.values[s];
1043
- }
1044
- var f = i.argumentCallback ? i.argumentCallback(a) : a;
1045
- return e[f];
1046
- };
1047
- }
1048
- var At = {
1049
- narrow: ["B", "A"],
1050
- abbreviated: ["BC", "AD"],
1051
- wide: ["Before Christ", "Anno Domini"]
1052
- }, Ft = {
1053
- narrow: ["1", "2", "3", "4"],
1054
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1055
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1056
- }, It = {
1057
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1058
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1059
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
1060
- }, qt = {
1061
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
1062
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1063
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1064
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
1065
- }, Bt = {
1066
- narrow: {
1067
- am: "a",
1068
- pm: "p",
1069
- midnight: "mi",
1070
- noon: "n",
1071
- morning: "morning",
1072
- afternoon: "afternoon",
1073
- evening: "evening",
1074
- night: "night"
1075
- },
1076
- abbreviated: {
1077
- am: "AM",
1078
- pm: "PM",
1079
- midnight: "midnight",
1080
- noon: "noon",
1081
- morning: "morning",
1082
- afternoon: "afternoon",
1083
- evening: "evening",
1084
- night: "night"
1085
- },
1086
- wide: {
1087
- am: "a.m.",
1088
- pm: "p.m.",
1089
- midnight: "midnight",
1090
- noon: "noon",
1091
- morning: "morning",
1092
- afternoon: "afternoon",
1093
- evening: "evening",
1094
- night: "night"
1095
- }
1096
- }, $t = {
1097
- narrow: {
1098
- am: "a",
1099
- pm: "p",
1100
- midnight: "mi",
1101
- noon: "n",
1102
- morning: "in the morning",
1103
- afternoon: "in the afternoon",
1104
- evening: "in the evening",
1105
- night: "at night"
1106
- },
1107
- abbreviated: {
1108
- am: "AM",
1109
- pm: "PM",
1110
- midnight: "midnight",
1111
- noon: "noon",
1112
- morning: "in the morning",
1113
- afternoon: "in the afternoon",
1114
- evening: "in the evening",
1115
- night: "at night"
1116
- },
1117
- wide: {
1118
- am: "a.m.",
1119
- pm: "p.m.",
1120
- midnight: "midnight",
1121
- noon: "noon",
1122
- morning: "in the morning",
1123
- afternoon: "in the afternoon",
1124
- evening: "in the evening",
1125
- night: "at night"
1126
- }
1127
- }, Rt = function(a, t) {
1128
- var r = Number(a), e = r % 100;
1129
- if (e > 20 || e < 10)
1130
- switch (e % 10) {
1131
- case 1:
1132
- return r + "st";
1133
- case 2:
1134
- return r + "nd";
1135
- case 3:
1136
- return r + "rd";
1137
- }
1138
- return r + "th";
1139
- }, Qt = {
1140
- ordinalNumber: Rt,
1141
- era: oe({
1142
- values: At,
1143
- defaultWidth: "wide"
1144
- }),
1145
- quarter: oe({
1146
- values: Ft,
1147
- defaultWidth: "wide",
1148
- argumentCallback: function(a) {
1149
- return a - 1;
1150
- }
1151
- }),
1152
- month: oe({
1153
- values: It,
1154
- defaultWidth: "wide"
1155
- }),
1156
- day: oe({
1157
- values: qt,
1158
- defaultWidth: "wide"
1159
- }),
1160
- dayPeriod: oe({
1161
- values: Bt,
1162
- defaultWidth: "wide",
1163
- formattingValues: $t,
1164
- defaultFormattingWidth: "wide"
1165
- })
1166
- };
1167
- const jt = Qt;
1168
- function se(i) {
1169
- return function(a) {
1170
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.width, e = r && i.matchPatterns[r] || i.matchPatterns[i.defaultMatchWidth], o = a.match(e);
1171
- if (!o)
1172
- return null;
1173
- var n = o[0], s = r && i.parsePatterns[r] || i.parsePatterns[i.defaultParseWidth], d = Array.isArray(s) ? Gt(s, function(y) {
1174
- return y.test(n);
1175
- }) : Xt(s, function(y) {
1176
- return y.test(n);
1177
- }), f;
1178
- f = i.valueCallback ? i.valueCallback(d) : d, f = t.valueCallback ? t.valueCallback(f) : f;
1179
- var w = a.slice(n.length);
1180
- return {
1181
- value: f,
1182
- rest: w
1183
- };
1184
- };
1185
- }
1186
- function Xt(i, a) {
1187
- for (var t in i)
1188
- if (i.hasOwnProperty(t) && a(i[t]))
1189
- return t;
1190
- }
1191
- function Gt(i, a) {
1192
- for (var t = 0; t < i.length; t++)
1193
- if (a(i[t]))
1194
- return t;
1195
- }
1196
- function zt(i) {
1197
- return function(a) {
1198
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = a.match(i.matchPattern);
1199
- if (!r)
1200
- return null;
1201
- var e = r[0], o = a.match(i.parsePattern);
1202
- if (!o)
1203
- return null;
1204
- var n = i.valueCallback ? i.valueCallback(o[0]) : o[0];
1205
- n = t.valueCallback ? t.valueCallback(n) : n;
1206
- var s = a.slice(e.length);
1207
- return {
1208
- value: n,
1209
- rest: s
1210
- };
1211
- };
1212
- }
1213
- var Vt = /^(\d+)(th|st|nd|rd)?/i, Kt = /\d+/i, Zt = {
1214
- narrow: /^(b|a)/i,
1215
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1216
- wide: /^(before christ|before common era|anno domini|common era)/i
1217
- }, Jt = {
1218
- any: [/^b/i, /^(a|c)/i]
1219
- }, er = {
1220
- narrow: /^[1234]/i,
1221
- abbreviated: /^q[1234]/i,
1222
- wide: /^[1234](th|st|nd|rd)? quarter/i
1223
- }, tr = {
1224
- any: [/1/i, /2/i, /3/i, /4/i]
1225
- }, rr = {
1226
- narrow: /^[jfmasond]/i,
1227
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1228
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1229
- }, ar = {
1230
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
1231
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
1232
- }, nr = {
1233
- narrow: /^[smtwf]/i,
1234
- short: /^(su|mo|tu|we|th|fr|sa)/i,
1235
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1236
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1237
- }, ir = {
1238
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1239
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1240
- }, or = {
1241
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1242
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1243
- }, sr = {
1244
- any: {
1245
- am: /^a/i,
1246
- pm: /^p/i,
1247
- midnight: /^mi/i,
1248
- noon: /^no/i,
1249
- morning: /morning/i,
1250
- afternoon: /afternoon/i,
1251
- evening: /evening/i,
1252
- night: /night/i
1253
- }
1254
- }, ur = {
1255
- ordinalNumber: zt({
1256
- matchPattern: Vt,
1257
- parsePattern: Kt,
1258
- valueCallback: function(a) {
1259
- return parseInt(a, 10);
1260
- }
1261
- }),
1262
- era: se({
1263
- matchPatterns: Zt,
1264
- defaultMatchWidth: "wide",
1265
- parsePatterns: Jt,
1266
- defaultParseWidth: "any"
1267
- }),
1268
- quarter: se({
1269
- matchPatterns: er,
1270
- defaultMatchWidth: "wide",
1271
- parsePatterns: tr,
1272
- defaultParseWidth: "any",
1273
- valueCallback: function(a) {
1274
- return a + 1;
1275
- }
1276
- }),
1277
- month: se({
1278
- matchPatterns: rr,
1279
- defaultMatchWidth: "wide",
1280
- parsePatterns: ar,
1281
- defaultParseWidth: "any"
1282
- }),
1283
- day: se({
1284
- matchPatterns: nr,
1285
- defaultMatchWidth: "wide",
1286
- parsePatterns: ir,
1287
- defaultParseWidth: "any"
1288
- }),
1289
- dayPeriod: se({
1290
- matchPatterns: or,
1291
- defaultMatchWidth: "any",
1292
- parsePatterns: sr,
1293
- defaultParseWidth: "any"
1294
- })
1295
- };
1296
- const lr = ur;
1297
- var cr = {
1298
- code: "en-US",
1299
- formatDistance: Ut,
1300
- formatLong: Lt,
1301
- formatRelative: Nt,
1302
- localize: jt,
1303
- match: lr,
1304
- options: {
1305
- weekStartsOn: 0,
1306
- firstWeekContainsDate: 1
1307
- }
1308
- };
1309
- const Xe = cr;
1310
- var dr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, hr = /^'([^]*?)'?$/, vr = /''/g, mr = /[a-zA-Z]/;
1311
- function K(i, a, t) {
1312
- var r, e, o, n, s, d, f, w, y, k, C, E, F, H;
1313
- M(2, arguments);
1314
- var $ = String(a), L = te(), I = (r = (e = void 0) !== null && e !== void 0 ? e : L.locale) !== null && r !== void 0 ? r : Xe, R = S((o = (n = (s = (d = void 0) !== null && d !== void 0 ? d : void 0) !== null && s !== void 0 ? s : L.firstWeekContainsDate) !== null && n !== void 0 ? n : (f = L.locale) === null || f === void 0 || (w = f.options) === null || w === void 0 ? void 0 : w.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
1315
- if (!(R >= 1 && R <= 7))
1316
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
1317
- var j = S((y = (k = (C = (E = void 0) !== null && E !== void 0 ? E : void 0) !== null && C !== void 0 ? C : L.weekStartsOn) !== null && k !== void 0 ? k : (F = L.locale) === null || F === void 0 || (H = F.options) === null || H === void 0 ? void 0 : H.weekStartsOn) !== null && y !== void 0 ? y : 0);
1318
- if (!(j >= 0 && j <= 6))
1319
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1320
- if (!I.localize)
1321
- throw new RangeError("locale must contain localize property");
1322
- if (!I.formatLong)
1323
- throw new RangeError("locale must contain formatLong property");
1324
- var X = W(i);
1325
- if (!dt(X))
1326
- throw new RangeError("Invalid time value");
1327
- var re = Re(X), ae = Fe(X, re), ne = {
1328
- firstWeekContainsDate: R,
1329
- weekStartsOn: j,
1330
- locale: I,
1331
- _originalDate: X
1332
- }, ve = $.match(fr).map(function(_) {
1333
- var N = _[0];
1334
- if (N === "p" || N === "P") {
1335
- var z = we[N];
1336
- return z(_, I.formatLong);
1337
- }
1338
- return _;
1339
- }).join("").match(dr).map(function(_) {
1340
- if (_ === "''")
1341
- return "'";
1342
- var N = _[0];
1343
- if (N === "'")
1344
- return pr(_);
1345
- var z = xt[N];
1346
- if (z)
1347
- return je(_) && de(_, a, String(i)), Qe(_) && de(_, a, String(i)), z(ae, _, I.localize, ne);
1348
- if (N.match(mr))
1349
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + N + "`");
1350
- return _;
1351
- }).join("");
1352
- return ve;
1353
- }
1354
- function pr(i) {
1355
- var a = i.match(hr);
1356
- return a ? a[1].replace(vr, "'") : i;
1357
- }
1358
- class Ge {
1359
- constructor() {
1360
- }
1361
- static dateToFormatedString(a, t) {
1362
- const r = t ? K(a, t) : a.toLocaleDateString("en-gb"), e = a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 });
1363
- return `${r}, ${e}`;
1364
- }
1365
- }
1366
- class ze {
1367
- constructor() {
1368
- }
1369
- static format(a, t) {
1370
- let r = `${t} ${a}`;
1371
- try {
1372
- r = new Intl.NumberFormat("en-US", {
1373
- style: "currency",
1374
- currency: a
1375
- }).format(t);
1376
- } catch {
1377
- }
1378
- return r;
1379
- }
1380
- }
1381
- const gr = (i) => u(
1382
- "div",
1383
- { class: "data-transaction" },
1384
- u("p", null, i.productType),
1385
- u(
1386
- "p",
1387
- { class: "text-style text-style-status" },
1388
- u("span", { class: i.status.toLowerCase() }, i.status)
1389
- ),
1390
- u(
1391
- "p",
1392
- { class: "date" },
1393
- i.transId,
1394
- " | ",
1395
- Ge.dateToFormatedString(new Date(i.created), i.dateformat)
1396
- ),
1397
- u(
1398
- "p",
1399
- { class: "text-style" },
1400
- ze.format(i.currency, i.realAmount),
1401
- " "
1402
- )
1403
- ), wr = (i) => u(
1404
- "div",
1405
- { class: "page-size" },
1406
- u("span", null, g.translate("show", i.language)),
1407
- i.pageSizes.map((a) => u("button", { class: i.currentPageSize === a ? "active" : "", onClick: () => i.changePageSize(a) }, a))
1408
- ), yr = ({ source: i, language: a, dateformat: t }) => {
1409
- const r = [
1410
- { name: g.translate("transactionId", a) },
1411
- {
1412
- name: g.translate("date", a)
1413
- },
1414
- {
1415
- name: g.translate("amount", a)
1416
- },
1417
- { name: g.translate("productType", a) },
1418
- {
1419
- name: g.translate("status", a)
1420
- }
1421
- ];
1422
- return u(
1423
- "table",
1424
- null,
1425
- u(
1426
- "thead",
1427
- null,
1428
- u("tr", null, r.map((e) => u("th", null, e.name)))
1429
- ),
1430
- u("tbody", null, i.map((e) => u(
1431
- "tr",
1432
- null,
1433
- u("td", null, e.transId),
1434
- u("td", null, Ge.dateToFormatedString(new Date(e.created), t)),
1435
- u(
1436
- "td",
1437
- null,
1438
- ze.format(e.currency, e.realAmount),
1439
- " "
1440
- ),
1441
- u("td", null, e.productType),
1442
- u(
1443
- "td",
1444
- null,
1445
- u("span", { class: e.status.toLowerCase() }, e.status)
1446
- )
1447
- )))
1448
- );
1449
- };
1450
- function Le(i, a) {
1451
- if (i) {
1452
- const t = document.createElement("style");
1453
- t.innerHTML = a, i.appendChild(t);
1454
- }
1455
- }
1456
- function Se(i, a) {
1457
- const t = new URL(a);
1458
- fetch(t.href).then((r) => r.text()).then((r) => {
1459
- const e = document.createElement("style");
1460
- e.innerHTML = r, i && i.appendChild(e);
1461
- }).catch((r) => {
1462
- console.error("There was an error while trying to load client styling from URL", r);
1463
- });
1464
- }
1465
- function br(i, a, t) {
1466
- if (window.emMessageBus) {
1467
- const r = document.createElement("style");
1468
- window.emMessageBus.subscribe(a, (e) => {
1469
- r.innerHTML = e, i && i.appendChild(r);
1470
- });
1471
- }
1472
- }
1473
- function He(i, a) {
1474
- (a == null || a > i.length) && (a = i.length);
1475
- for (var t = 0, r = Array(a); t < a; t++)
1476
- r[t] = i[t];
1477
- return r;
1478
- }
1479
- function Tr(i, a) {
1480
- if (i) {
1481
- if (typeof i == "string")
1482
- return He(i, a);
1483
- var t = {}.toString.call(i).slice(8, -1);
1484
- return t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set" ? Array.from(i) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? He(i, a) : void 0;
1485
- }
1486
- }
1487
- function Ne(i, a) {
1488
- var t = typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
1489
- if (!t) {
1490
- if (Array.isArray(i) || (t = Tr(i)) || a) {
1491
- t && (i = t);
1492
- var r = 0, e = function() {
1493
- };
1494
- return {
1495
- s: e,
1496
- n: function() {
1497
- return r >= i.length ? {
1498
- done: !0
1499
- } : {
1500
- done: !1,
1501
- value: i[r++]
1502
- };
1503
- },
1504
- e: function(f) {
1505
- throw f;
1506
- },
1507
- f: e
1508
- };
1509
- }
1510
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1511
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1512
- }
1513
- var o, n = !0, s = !1;
1514
- return {
1515
- s: function() {
1516
- t = t.call(i);
1517
- },
1518
- n: function() {
1519
- var f = t.next();
1520
- return n = f.done, f;
1521
- },
1522
- e: function(f) {
1523
- s = !0, o = f;
1524
- },
1525
- f: function() {
1526
- try {
1527
- n || t.return == null || t.return();
1528
- } finally {
1529
- if (s)
1530
- throw o;
1531
- }
1532
- }
1533
- };
1534
- }
1535
- function xr(i, a) {
1536
- if (i == null)
1537
- throw new TypeError("assign requires that input parameter not be null or undefined");
1538
- for (var t in a)
1539
- Object.prototype.hasOwnProperty.call(a, t) && (i[t] = a[t]);
1540
- return i;
1541
- }
1542
- function c(i) {
1543
- if (i === void 0)
1544
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1545
- return i;
1546
- }
1547
- function ye(i, a) {
1548
- return ye = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
1549
- return t.__proto__ = r, t;
1550
- }, ye(i, a);
1551
- }
1552
- function m(i, a) {
1553
- if (typeof a != "function" && a !== null)
1554
- throw new TypeError("Super expression must either be null or a function");
1555
- i.prototype = Object.create(a && a.prototype, {
1556
- constructor: {
1557
- value: i,
1558
- writable: !0,
1559
- configurable: !0
1560
- }
1561
- }), Object.defineProperty(i, "prototype", {
1562
- writable: !1
1563
- }), a && ye(i, a);
1564
- }
1565
- function fe(i) {
1566
- return fe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(a) {
1567
- return a.__proto__ || Object.getPrototypeOf(a);
1568
- }, fe(i);
1569
- }
1570
- function Ve() {
1571
- try {
1572
- var i = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1573
- }));
1574
- } catch {
1575
- }
1576
- return (Ve = function() {
1577
- return !!i;
1578
- })();
1579
- }
1580
- function Cr(i, a) {
1581
- if (a && (Q(a) == "object" || typeof a == "function"))
1582
- return a;
1583
- if (a !== void 0)
1584
- throw new TypeError("Derived constructors may only return object or undefined");
1585
- return c(i);
1586
- }
1587
- function p(i) {
1588
- var a = Ve();
1589
- return function() {
1590
- var t, r = fe(i);
1591
- if (a) {
1592
- var e = fe(this).constructor;
1593
- t = Reflect.construct(r, arguments, e);
1594
- } else
1595
- t = r.apply(this, arguments);
1596
- return Cr(this, t);
1597
- };
1598
- }
1599
- function h(i, a) {
1600
- if (!(i instanceof a))
1601
- throw new TypeError("Cannot call a class as a function");
1602
- }
1603
- function Dr(i, a) {
1604
- if (Q(i) != "object" || !i)
1605
- return i;
1606
- var t = i[Symbol.toPrimitive];
1607
- if (t !== void 0) {
1608
- var r = t.call(i, a);
1609
- if (Q(r) != "object")
1610
- return r;
1611
- throw new TypeError("@@toPrimitive must return a primitive value.");
1612
- }
1613
- return (a === "string" ? String : Number)(i);
1614
- }
1615
- function Ke(i) {
1616
- var a = Dr(i, "string");
1617
- return Q(a) == "symbol" ? a : a + "";
1618
- }
1619
- function kr(i, a) {
1620
- for (var t = 0; t < a.length; t++) {
1621
- var r = a[t];
1622
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(i, Ke(r.key), r);
1623
- }
1624
- }
1625
- function v(i, a, t) {
1626
- return a && kr(i.prototype, a), Object.defineProperty(i, "prototype", {
1627
- writable: !1
1628
- }), i;
1629
- }
1630
- function l(i, a, t) {
1631
- return (a = Ke(a)) in i ? Object.defineProperty(i, a, {
1632
- value: t,
1633
- enumerable: !0,
1634
- configurable: !0,
1635
- writable: !0
1636
- }) : i[a] = t, i;
1637
- }
1638
- var Pr = 10, Ze = /* @__PURE__ */ function() {
1639
- function i() {
1640
- h(this, i), l(this, "priority", void 0), l(this, "subPriority", 0);
1641
- }
1642
- return v(i, [{
1643
- key: "validate",
1644
- value: function(t, r) {
1645
- return !0;
1646
- }
1647
- }]), i;
1648
- }(), Mr = /* @__PURE__ */ function(i) {
1649
- m(t, i);
1650
- var a = p(t);
1651
- function t(r, e, o, n, s) {
1652
- var d;
1653
- return h(this, t), d = a.call(this), d.value = r, d.validateValue = e, d.setValue = o, d.priority = n, s && (d.subPriority = s), d;
1654
- }
1655
- return v(t, [{
1656
- key: "validate",
1657
- value: function(e, o) {
1658
- return this.validateValue(e, this.value, o);
1659
- }
1660
- }, {
1661
- key: "set",
1662
- value: function(e, o, n) {
1663
- return this.setValue(e, o, this.value, n);
1664
- }
1665
- }]), t;
1666
- }(Ze), Or = /* @__PURE__ */ function(i) {
1667
- m(t, i);
1668
- var a = p(t);
1669
- function t() {
1670
- var r;
1671
- h(this, t);
1672
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1673
- o[n] = arguments[n];
1674
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", Pr), l(c(r), "subPriority", -1), r;
1675
- }
1676
- return v(t, [{
1677
- key: "set",
1678
- value: function(e, o) {
1679
- if (o.timestampIsSet)
1680
- return e;
1681
- var n = /* @__PURE__ */ new Date(0);
1682
- return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
1683
- }
1684
- }]), t;
1685
- }(Ze), b = /* @__PURE__ */ function() {
1686
- function i() {
1687
- h(this, i), l(this, "incompatibleTokens", void 0), l(this, "priority", void 0), l(this, "subPriority", void 0);
1688
- }
1689
- return v(i, [{
1690
- key: "run",
1691
- value: function(t, r, e, o) {
1692
- var n = this.parse(t, r, e, o);
1693
- return n ? {
1694
- setter: new Mr(n.value, this.validate, this.set, this.priority, this.subPriority),
1695
- rest: n.rest
1696
- } : null;
1697
- }
1698
- }, {
1699
- key: "validate",
1700
- value: function(t, r, e) {
1701
- return !0;
1702
- }
1703
- }]), i;
1704
- }(), Ur = /* @__PURE__ */ function(i) {
1705
- m(t, i);
1706
- var a = p(t);
1707
- function t() {
1708
- var r;
1709
- h(this, t);
1710
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1711
- o[n] = arguments[n];
1712
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 140), l(c(r), "incompatibleTokens", ["R", "u", "t", "T"]), r;
1713
- }
1714
- return v(t, [{
1715
- key: "parse",
1716
- value: function(e, o, n) {
1717
- switch (o) {
1718
- case "G":
1719
- case "GG":
1720
- case "GGG":
1721
- return n.era(e, {
1722
- width: "abbreviated"
1723
- }) || n.era(e, {
1724
- width: "narrow"
1725
- });
1726
- case "GGGGG":
1727
- return n.era(e, {
1728
- width: "narrow"
1729
- });
1730
- case "GGGG":
1731
- default:
1732
- return n.era(e, {
1733
- width: "wide"
1734
- }) || n.era(e, {
1735
- width: "abbreviated"
1736
- }) || n.era(e, {
1737
- width: "narrow"
1738
- });
1739
- }
1740
- }
1741
- }, {
1742
- key: "set",
1743
- value: function(e, o, n) {
1744
- return o.era = n, e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1745
- }
1746
- }]), t;
1747
- }(b), Er = 6e4, Yr = 36e5, _r = 1e3, O = {
1748
- month: /^(1[0-2]|0?\d)/,
1749
- // 0 to 12
1750
- date: /^(3[0-1]|[0-2]?\d)/,
1751
- // 0 to 31
1752
- dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
1753
- // 0 to 366
1754
- week: /^(5[0-3]|[0-4]?\d)/,
1755
- // 0 to 53
1756
- hour23h: /^(2[0-3]|[0-1]?\d)/,
1757
- // 0 to 23
1758
- hour24h: /^(2[0-4]|[0-1]?\d)/,
1759
- // 0 to 24
1760
- hour11h: /^(1[0-1]|0?\d)/,
1761
- // 0 to 11
1762
- hour12h: /^(1[0-2]|0?\d)/,
1763
- // 0 to 12
1764
- minute: /^[0-5]?\d/,
1765
- // 0 to 59
1766
- second: /^[0-5]?\d/,
1767
- // 0 to 59
1768
- singleDigit: /^\d/,
1769
- // 0 to 9
1770
- twoDigits: /^\d{1,2}/,
1771
- // 0 to 99
1772
- threeDigits: /^\d{1,3}/,
1773
- // 0 to 999
1774
- fourDigits: /^\d{1,4}/,
1775
- // 0 to 9999
1776
- anyDigitsSigned: /^-?\d+/,
1777
- singleDigitSigned: /^-?\d/,
1778
- // 0 to 9, -0 to -9
1779
- twoDigitsSigned: /^-?\d{1,2}/,
1780
- // 0 to 99, -0 to -99
1781
- threeDigitsSigned: /^-?\d{1,3}/,
1782
- // 0 to 999, -0 to -999
1783
- fourDigitsSigned: /^-?\d{1,4}/
1784
- // 0 to 9999, -0 to -9999
1785
- }, q = {
1786
- basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
1787
- basic: /^([+-])(\d{2})(\d{2})|Z/,
1788
- basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
1789
- extended: /^([+-])(\d{2}):(\d{2})|Z/,
1790
- extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
1791
- };
1792
- function U(i, a) {
1793
- return i && {
1794
- value: a(i.value),
1795
- rest: i.rest
1796
- };
1797
- }
1798
- function D(i, a) {
1799
- var t = a.match(i);
1800
- return t ? {
1801
- value: parseInt(t[0], 10),
1802
- rest: a.slice(t[0].length)
1803
- } : null;
1804
- }
1805
- function B(i, a) {
1806
- var t = a.match(i);
1807
- if (!t)
1808
- return null;
1809
- if (t[0] === "Z")
1810
- return {
1811
- value: 0,
1812
- rest: a.slice(1)
1813
- };
1814
- var r = t[1] === "+" ? 1 : -1, e = t[2] ? parseInt(t[2], 10) : 0, o = t[3] ? parseInt(t[3], 10) : 0, n = t[5] ? parseInt(t[5], 10) : 0;
1815
- return {
1816
- value: r * (e * Yr + o * Er + n * _r),
1817
- rest: a.slice(t[0].length)
1818
- };
1819
- }
1820
- function Je(i) {
1821
- return D(O.anyDigitsSigned, i);
1822
- }
1823
- function P(i, a) {
1824
- switch (i) {
1825
- case 1:
1826
- return D(O.singleDigit, a);
1827
- case 2:
1828
- return D(O.twoDigits, a);
1829
- case 3:
1830
- return D(O.threeDigits, a);
1831
- case 4:
1832
- return D(O.fourDigits, a);
1833
- default:
1834
- return D(new RegExp("^\\d{1," + i + "}"), a);
1835
- }
1836
- }
1837
- function he(i, a) {
1838
- switch (i) {
1839
- case 1:
1840
- return D(O.singleDigitSigned, a);
1841
- case 2:
1842
- return D(O.twoDigitsSigned, a);
1843
- case 3:
1844
- return D(O.threeDigitsSigned, a);
1845
- case 4:
1846
- return D(O.fourDigitsSigned, a);
1847
- default:
1848
- return D(new RegExp("^-?\\d{1," + i + "}"), a);
1849
- }
1850
- }
1851
- function Te(i) {
1852
- switch (i) {
1853
- case "morning":
1854
- return 4;
1855
- case "evening":
1856
- return 17;
1857
- case "pm":
1858
- case "noon":
1859
- case "afternoon":
1860
- return 12;
1861
- case "am":
1862
- case "midnight":
1863
- case "night":
1864
- default:
1865
- return 0;
1866
- }
1867
- }
1868
- function et(i, a) {
1869
- var t = a > 0, r = t ? a : 1 - a, e;
1870
- if (r <= 50)
1871
- e = i || 100;
1872
- else {
1873
- var o = r + 50, n = Math.floor(o / 100) * 100, s = i >= o % 100;
1874
- e = i + n - (s ? 100 : 0);
1875
- }
1876
- return t ? e : 1 - e;
1877
- }
1878
- function tt(i) {
1879
- return i % 400 === 0 || i % 4 === 0 && i % 100 !== 0;
1880
- }
1881
- var Wr = /* @__PURE__ */ function(i) {
1882
- m(t, i);
1883
- var a = p(t);
1884
- function t() {
1885
- var r;
1886
- h(this, t);
1887
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1888
- o[n] = arguments[n];
1889
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 130), l(c(r), "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]), r;
1890
- }
1891
- return v(t, [{
1892
- key: "parse",
1893
- value: function(e, o, n) {
1894
- var s = function(f) {
1895
- return {
1896
- year: f,
1897
- isTwoDigitYear: o === "yy"
1898
- };
1899
- };
1900
- switch (o) {
1901
- case "y":
1902
- return U(P(4, e), s);
1903
- case "yo":
1904
- return U(n.ordinalNumber(e, {
1905
- unit: "year"
1906
- }), s);
1907
- default:
1908
- return U(P(o.length, e), s);
1909
- }
1910
- }
1911
- }, {
1912
- key: "validate",
1913
- value: function(e, o) {
1914
- return o.isTwoDigitYear || o.year > 0;
1915
- }
1916
- }, {
1917
- key: "set",
1918
- value: function(e, o, n) {
1919
- var s = e.getUTCFullYear();
1920
- if (n.isTwoDigitYear) {
1921
- var d = et(n.year, s);
1922
- return e.setUTCFullYear(d, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1923
- }
1924
- var f = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1925
- return e.setUTCFullYear(f, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1926
- }
1927
- }]), t;
1928
- }(b), Lr = /* @__PURE__ */ function(i) {
1929
- m(t, i);
1930
- var a = p(t);
1931
- function t() {
1932
- var r;
1933
- h(this, t);
1934
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1935
- o[n] = arguments[n];
1936
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 130), l(c(r), "incompatibleTokens", ["y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
1937
- }
1938
- return v(t, [{
1939
- key: "parse",
1940
- value: function(e, o, n) {
1941
- var s = function(f) {
1942
- return {
1943
- year: f,
1944
- isTwoDigitYear: o === "YY"
1945
- };
1946
- };
1947
- switch (o) {
1948
- case "Y":
1949
- return U(P(4, e), s);
1950
- case "Yo":
1951
- return U(n.ordinalNumber(e, {
1952
- unit: "year"
1953
- }), s);
1954
- default:
1955
- return U(P(o.length, e), s);
1956
- }
1957
- }
1958
- }, {
1959
- key: "validate",
1960
- value: function(e, o) {
1961
- return o.isTwoDigitYear || o.year > 0;
1962
- }
1963
- }, {
1964
- key: "set",
1965
- value: function(e, o, n, s) {
1966
- var d = be(e, s);
1967
- if (n.isTwoDigitYear) {
1968
- var f = et(n.year, d);
1969
- return e.setUTCFullYear(f, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), Z(e, s);
1970
- }
1971
- var w = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1972
- return e.setUTCFullYear(w, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), Z(e, s);
1973
- }
1974
- }]), t;
1975
- }(b), Sr = /* @__PURE__ */ function(i) {
1976
- m(t, i);
1977
- var a = p(t);
1978
- function t() {
1979
- var r;
1980
- h(this, t);
1981
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1982
- o[n] = arguments[n];
1983
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 130), l(c(r), "incompatibleTokens", ["G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
1984
- }
1985
- return v(t, [{
1986
- key: "parse",
1987
- value: function(e, o) {
1988
- return he(o === "R" ? 4 : o.length, e);
1989
- }
1990
- }, {
1991
- key: "set",
1992
- value: function(e, o, n) {
1993
- var s = /* @__PURE__ */ new Date(0);
1994
- return s.setUTCFullYear(n, 0, 4), s.setUTCHours(0, 0, 0, 0), ee(s);
1995
- }
1996
- }]), t;
1997
- }(b), Hr = /* @__PURE__ */ function(i) {
1998
- m(t, i);
1999
- var a = p(t);
2000
- function t() {
2001
- var r;
2002
- h(this, t);
2003
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2004
- o[n] = arguments[n];
2005
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 130), l(c(r), "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]), r;
2006
- }
2007
- return v(t, [{
2008
- key: "parse",
2009
- value: function(e, o) {
2010
- return he(o === "u" ? 4 : o.length, e);
2011
- }
2012
- }, {
2013
- key: "set",
2014
- value: function(e, o, n) {
2015
- return e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
2016
- }
2017
- }]), t;
2018
- }(b), Nr = /* @__PURE__ */ function(i) {
2019
- m(t, i);
2020
- var a = p(t);
2021
- function t() {
2022
- var r;
2023
- h(this, t);
2024
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2025
- o[n] = arguments[n];
2026
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 120), l(c(r), "incompatibleTokens", ["Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
2027
- }
2028
- return v(t, [{
2029
- key: "parse",
2030
- value: function(e, o, n) {
2031
- switch (o) {
2032
- case "Q":
2033
- case "QQ":
2034
- return P(o.length, e);
2035
- case "Qo":
2036
- return n.ordinalNumber(e, {
2037
- unit: "quarter"
2038
- });
2039
- case "QQQ":
2040
- return n.quarter(e, {
2041
- width: "abbreviated",
2042
- context: "formatting"
2043
- }) || n.quarter(e, {
2044
- width: "narrow",
2045
- context: "formatting"
2046
- });
2047
- case "QQQQQ":
2048
- return n.quarter(e, {
2049
- width: "narrow",
2050
- context: "formatting"
2051
- });
2052
- case "QQQQ":
2053
- default:
2054
- return n.quarter(e, {
2055
- width: "wide",
2056
- context: "formatting"
2057
- }) || n.quarter(e, {
2058
- width: "abbreviated",
2059
- context: "formatting"
2060
- }) || n.quarter(e, {
2061
- width: "narrow",
2062
- context: "formatting"
2063
- });
2064
- }
2065
- }
2066
- }, {
2067
- key: "validate",
2068
- value: function(e, o) {
2069
- return o >= 1 && o <= 4;
2070
- }
2071
- }, {
2072
- key: "set",
2073
- value: function(e, o, n) {
2074
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2075
- }
2076
- }]), t;
2077
- }(b), Ar = /* @__PURE__ */ function(i) {
2078
- m(t, i);
2079
- var a = p(t);
2080
- function t() {
2081
- var r;
2082
- h(this, t);
2083
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2084
- o[n] = arguments[n];
2085
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 120), l(c(r), "incompatibleTokens", ["Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
2086
- }
2087
- return v(t, [{
2088
- key: "parse",
2089
- value: function(e, o, n) {
2090
- switch (o) {
2091
- case "q":
2092
- case "qq":
2093
- return P(o.length, e);
2094
- case "qo":
2095
- return n.ordinalNumber(e, {
2096
- unit: "quarter"
2097
- });
2098
- case "qqq":
2099
- return n.quarter(e, {
2100
- width: "abbreviated",
2101
- context: "standalone"
2102
- }) || n.quarter(e, {
2103
- width: "narrow",
2104
- context: "standalone"
2105
- });
2106
- case "qqqqq":
2107
- return n.quarter(e, {
2108
- width: "narrow",
2109
- context: "standalone"
2110
- });
2111
- case "qqqq":
2112
- default:
2113
- return n.quarter(e, {
2114
- width: "wide",
2115
- context: "standalone"
2116
- }) || n.quarter(e, {
2117
- width: "abbreviated",
2118
- context: "standalone"
2119
- }) || n.quarter(e, {
2120
- width: "narrow",
2121
- context: "standalone"
2122
- });
2123
- }
2124
- }
2125
- }, {
2126
- key: "validate",
2127
- value: function(e, o) {
2128
- return o >= 1 && o <= 4;
2129
- }
2130
- }, {
2131
- key: "set",
2132
- value: function(e, o, n) {
2133
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2134
- }
2135
- }]), t;
2136
- }(b), Fr = /* @__PURE__ */ function(i) {
2137
- m(t, i);
2138
- var a = p(t);
2139
- function t() {
2140
- var r;
2141
- h(this, t);
2142
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2143
- o[n] = arguments[n];
2144
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "incompatibleTokens", ["Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T"]), l(c(r), "priority", 110), r;
2145
- }
2146
- return v(t, [{
2147
- key: "parse",
2148
- value: function(e, o, n) {
2149
- var s = function(f) {
2150
- return f - 1;
2151
- };
2152
- switch (o) {
2153
- case "M":
2154
- return U(D(O.month, e), s);
2155
- case "MM":
2156
- return U(P(2, e), s);
2157
- case "Mo":
2158
- return U(n.ordinalNumber(e, {
2159
- unit: "month"
2160
- }), s);
2161
- case "MMM":
2162
- return n.month(e, {
2163
- width: "abbreviated",
2164
- context: "formatting"
2165
- }) || n.month(e, {
2166
- width: "narrow",
2167
- context: "formatting"
2168
- });
2169
- case "MMMMM":
2170
- return n.month(e, {
2171
- width: "narrow",
2172
- context: "formatting"
2173
- });
2174
- case "MMMM":
2175
- default:
2176
- return n.month(e, {
2177
- width: "wide",
2178
- context: "formatting"
2179
- }) || n.month(e, {
2180
- width: "abbreviated",
2181
- context: "formatting"
2182
- }) || n.month(e, {
2183
- width: "narrow",
2184
- context: "formatting"
2185
- });
2186
- }
2187
- }
2188
- }, {
2189
- key: "validate",
2190
- value: function(e, o) {
2191
- return o >= 0 && o <= 11;
2192
- }
2193
- }, {
2194
- key: "set",
2195
- value: function(e, o, n) {
2196
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2197
- }
2198
- }]), t;
2199
- }(b), Ir = /* @__PURE__ */ function(i) {
2200
- m(t, i);
2201
- var a = p(t);
2202
- function t() {
2203
- var r;
2204
- h(this, t);
2205
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2206
- o[n] = arguments[n];
2207
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 110), l(c(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2208
- }
2209
- return v(t, [{
2210
- key: "parse",
2211
- value: function(e, o, n) {
2212
- var s = function(f) {
2213
- return f - 1;
2214
- };
2215
- switch (o) {
2216
- case "L":
2217
- return U(D(O.month, e), s);
2218
- case "LL":
2219
- return U(P(2, e), s);
2220
- case "Lo":
2221
- return U(n.ordinalNumber(e, {
2222
- unit: "month"
2223
- }), s);
2224
- case "LLL":
2225
- return n.month(e, {
2226
- width: "abbreviated",
2227
- context: "standalone"
2228
- }) || n.month(e, {
2229
- width: "narrow",
2230
- context: "standalone"
2231
- });
2232
- case "LLLLL":
2233
- return n.month(e, {
2234
- width: "narrow",
2235
- context: "standalone"
2236
- });
2237
- case "LLLL":
2238
- default:
2239
- return n.month(e, {
2240
- width: "wide",
2241
- context: "standalone"
2242
- }) || n.month(e, {
2243
- width: "abbreviated",
2244
- context: "standalone"
2245
- }) || n.month(e, {
2246
- width: "narrow",
2247
- context: "standalone"
2248
- });
2249
- }
2250
- }
2251
- }, {
2252
- key: "validate",
2253
- value: function(e, o) {
2254
- return o >= 0 && o <= 11;
2255
- }
2256
- }, {
2257
- key: "set",
2258
- value: function(e, o, n) {
2259
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2260
- }
2261
- }]), t;
2262
- }(b);
2263
- function qr(i, a, t) {
2264
- M(2, arguments);
2265
- var r = W(i), e = S(a), o = Be(r, t) - e;
2266
- return r.setUTCDate(r.getUTCDate() - o * 7), r;
2267
- }
2268
- var Br = /* @__PURE__ */ function(i) {
2269
- m(t, i);
2270
- var a = p(t);
2271
- function t() {
2272
- var r;
2273
- h(this, t);
2274
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2275
- o[n] = arguments[n];
2276
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 100), l(c(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
2277
- }
2278
- return v(t, [{
2279
- key: "parse",
2280
- value: function(e, o, n) {
2281
- switch (o) {
2282
- case "w":
2283
- return D(O.week, e);
2284
- case "wo":
2285
- return n.ordinalNumber(e, {
2286
- unit: "week"
2287
- });
2288
- default:
2289
- return P(o.length, e);
2290
- }
2291
- }
2292
- }, {
2293
- key: "validate",
2294
- value: function(e, o) {
2295
- return o >= 1 && o <= 53;
2296
- }
2297
- }, {
2298
- key: "set",
2299
- value: function(e, o, n, s) {
2300
- return Z(qr(e, n, s), s);
2301
- }
2302
- }]), t;
2303
- }(b);
2304
- function $r(i, a) {
2305
- M(2, arguments);
2306
- var t = W(i), r = S(a), e = qe(t) - r;
2307
- return t.setUTCDate(t.getUTCDate() - e * 7), t;
2308
- }
2309
- var Rr = /* @__PURE__ */ function(i) {
2310
- m(t, i);
2311
- var a = p(t);
2312
- function t() {
2313
- var r;
2314
- h(this, t);
2315
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2316
- o[n] = arguments[n];
2317
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 100), l(c(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
2318
- }
2319
- return v(t, [{
2320
- key: "parse",
2321
- value: function(e, o, n) {
2322
- switch (o) {
2323
- case "I":
2324
- return D(O.week, e);
2325
- case "Io":
2326
- return n.ordinalNumber(e, {
2327
- unit: "week"
2328
- });
2329
- default:
2330
- return P(o.length, e);
2331
- }
2332
- }
2333
- }, {
2334
- key: "validate",
2335
- value: function(e, o) {
2336
- return o >= 1 && o <= 53;
2337
- }
2338
- }, {
2339
- key: "set",
2340
- value: function(e, o, n) {
2341
- return ee($r(e, n));
2342
- }
2343
- }]), t;
2344
- }(b), Qr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], jr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Xr = /* @__PURE__ */ function(i) {
2345
- m(t, i);
2346
- var a = p(t);
2347
- function t() {
2348
- var r;
2349
- h(this, t);
2350
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2351
- o[n] = arguments[n];
2352
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "subPriority", 1), l(c(r), "incompatibleTokens", ["Y", "R", "q", "Q", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2353
- }
2354
- return v(t, [{
2355
- key: "parse",
2356
- value: function(e, o, n) {
2357
- switch (o) {
2358
- case "d":
2359
- return D(O.date, e);
2360
- case "do":
2361
- return n.ordinalNumber(e, {
2362
- unit: "date"
2363
- });
2364
- default:
2365
- return P(o.length, e);
2366
- }
2367
- }
2368
- }, {
2369
- key: "validate",
2370
- value: function(e, o) {
2371
- var n = e.getUTCFullYear(), s = tt(n), d = e.getUTCMonth();
2372
- return s ? o >= 1 && o <= jr[d] : o >= 1 && o <= Qr[d];
2373
- }
2374
- }, {
2375
- key: "set",
2376
- value: function(e, o, n) {
2377
- return e.setUTCDate(n), e.setUTCHours(0, 0, 0, 0), e;
2378
- }
2379
- }]), t;
2380
- }(b), Gr = /* @__PURE__ */ function(i) {
2381
- m(t, i);
2382
- var a = p(t);
2383
- function t() {
2384
- var r;
2385
- h(this, t);
2386
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2387
- o[n] = arguments[n];
2388
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "subpriority", 1), l(c(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "L", "w", "I", "d", "E", "i", "e", "c", "t", "T"]), r;
2389
- }
2390
- return v(t, [{
2391
- key: "parse",
2392
- value: function(e, o, n) {
2393
- switch (o) {
2394
- case "D":
2395
- case "DD":
2396
- return D(O.dayOfYear, e);
2397
- case "Do":
2398
- return n.ordinalNumber(e, {
2399
- unit: "date"
2400
- });
2401
- default:
2402
- return P(o.length, e);
2403
- }
2404
- }
2405
- }, {
2406
- key: "validate",
2407
- value: function(e, o) {
2408
- var n = e.getUTCFullYear(), s = tt(n);
2409
- return s ? o >= 1 && o <= 366 : o >= 1 && o <= 365;
2410
- }
2411
- }, {
2412
- key: "set",
2413
- value: function(e, o, n) {
2414
- return e.setUTCMonth(0, n), e.setUTCHours(0, 0, 0, 0), e;
2415
- }
2416
- }]), t;
2417
- }(b);
2418
- function xe(i, a, t) {
2419
- var r, e, o, n, s, d, f, w;
2420
- M(2, arguments);
2421
- var y = te(), k = S((r = (e = (o = (n = t?.weekStartsOn) !== null && n !== void 0 ? n : t == null || (s = t.locale) === null || s === void 0 || (d = s.options) === null || d === void 0 ? void 0 : d.weekStartsOn) !== null && o !== void 0 ? o : y.weekStartsOn) !== null && e !== void 0 ? e : (f = y.locale) === null || f === void 0 || (w = f.options) === null || w === void 0 ? void 0 : w.weekStartsOn) !== null && r !== void 0 ? r : 0);
2422
- if (!(k >= 0 && k <= 6))
2423
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
2424
- var C = W(i), E = S(a), F = C.getUTCDay(), H = E % 7, $ = (H + 7) % 7, L = ($ < k ? 7 : 0) + E - F;
2425
- return C.setUTCDate(C.getUTCDate() + L), C;
2426
- }
2427
- var zr = /* @__PURE__ */ function(i) {
2428
- m(t, i);
2429
- var a = p(t);
2430
- function t() {
2431
- var r;
2432
- h(this, t);
2433
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2434
- o[n] = arguments[n];
2435
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]), r;
2436
- }
2437
- return v(t, [{
2438
- key: "parse",
2439
- value: function(e, o, n) {
2440
- switch (o) {
2441
- case "E":
2442
- case "EE":
2443
- case "EEE":
2444
- return n.day(e, {
2445
- width: "abbreviated",
2446
- context: "formatting"
2447
- }) || n.day(e, {
2448
- width: "short",
2449
- context: "formatting"
2450
- }) || n.day(e, {
2451
- width: "narrow",
2452
- context: "formatting"
2453
- });
2454
- case "EEEEE":
2455
- return n.day(e, {
2456
- width: "narrow",
2457
- context: "formatting"
2458
- });
2459
- case "EEEEEE":
2460
- return n.day(e, {
2461
- width: "short",
2462
- context: "formatting"
2463
- }) || n.day(e, {
2464
- width: "narrow",
2465
- context: "formatting"
2466
- });
2467
- case "EEEE":
2468
- default:
2469
- return n.day(e, {
2470
- width: "wide",
2471
- context: "formatting"
2472
- }) || n.day(e, {
2473
- width: "abbreviated",
2474
- context: "formatting"
2475
- }) || n.day(e, {
2476
- width: "short",
2477
- context: "formatting"
2478
- }) || n.day(e, {
2479
- width: "narrow",
2480
- context: "formatting"
2481
- });
2482
- }
2483
- }
2484
- }, {
2485
- key: "validate",
2486
- value: function(e, o) {
2487
- return o >= 0 && o <= 6;
2488
- }
2489
- }, {
2490
- key: "set",
2491
- value: function(e, o, n, s) {
2492
- return e = xe(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2493
- }
2494
- }]), t;
2495
- }(b), Vr = /* @__PURE__ */ function(i) {
2496
- m(t, i);
2497
- var a = p(t);
2498
- function t() {
2499
- var r;
2500
- h(this, t);
2501
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2502
- o[n] = arguments[n];
2503
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "c", "t", "T"]), r;
2504
- }
2505
- return v(t, [{
2506
- key: "parse",
2507
- value: function(e, o, n, s) {
2508
- var d = function(w) {
2509
- var y = Math.floor((w - 1) / 7) * 7;
2510
- return (w + s.weekStartsOn + 6) % 7 + y;
2511
- };
2512
- switch (o) {
2513
- case "e":
2514
- case "ee":
2515
- return U(P(o.length, e), d);
2516
- case "eo":
2517
- return U(n.ordinalNumber(e, {
2518
- unit: "day"
2519
- }), d);
2520
- case "eee":
2521
- return n.day(e, {
2522
- width: "abbreviated",
2523
- context: "formatting"
2524
- }) || n.day(e, {
2525
- width: "short",
2526
- context: "formatting"
2527
- }) || n.day(e, {
2528
- width: "narrow",
2529
- context: "formatting"
2530
- });
2531
- case "eeeee":
2532
- return n.day(e, {
2533
- width: "narrow",
2534
- context: "formatting"
2535
- });
2536
- case "eeeeee":
2537
- return n.day(e, {
2538
- width: "short",
2539
- context: "formatting"
2540
- }) || n.day(e, {
2541
- width: "narrow",
2542
- context: "formatting"
2543
- });
2544
- case "eeee":
2545
- default:
2546
- return n.day(e, {
2547
- width: "wide",
2548
- context: "formatting"
2549
- }) || n.day(e, {
2550
- width: "abbreviated",
2551
- context: "formatting"
2552
- }) || n.day(e, {
2553
- width: "short",
2554
- context: "formatting"
2555
- }) || n.day(e, {
2556
- width: "narrow",
2557
- context: "formatting"
2558
- });
2559
- }
2560
- }
2561
- }, {
2562
- key: "validate",
2563
- value: function(e, o) {
2564
- return o >= 0 && o <= 6;
2565
- }
2566
- }, {
2567
- key: "set",
2568
- value: function(e, o, n, s) {
2569
- return e = xe(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2570
- }
2571
- }]), t;
2572
- }(b), Kr = /* @__PURE__ */ function(i) {
2573
- m(t, i);
2574
- var a = p(t);
2575
- function t() {
2576
- var r;
2577
- h(this, t);
2578
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2579
- o[n] = arguments[n];
2580
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "e", "t", "T"]), r;
2581
- }
2582
- return v(t, [{
2583
- key: "parse",
2584
- value: function(e, o, n, s) {
2585
- var d = function(w) {
2586
- var y = Math.floor((w - 1) / 7) * 7;
2587
- return (w + s.weekStartsOn + 6) % 7 + y;
2588
- };
2589
- switch (o) {
2590
- case "c":
2591
- case "cc":
2592
- return U(P(o.length, e), d);
2593
- case "co":
2594
- return U(n.ordinalNumber(e, {
2595
- unit: "day"
2596
- }), d);
2597
- case "ccc":
2598
- return n.day(e, {
2599
- width: "abbreviated",
2600
- context: "standalone"
2601
- }) || n.day(e, {
2602
- width: "short",
2603
- context: "standalone"
2604
- }) || n.day(e, {
2605
- width: "narrow",
2606
- context: "standalone"
2607
- });
2608
- case "ccccc":
2609
- return n.day(e, {
2610
- width: "narrow",
2611
- context: "standalone"
2612
- });
2613
- case "cccccc":
2614
- return n.day(e, {
2615
- width: "short",
2616
- context: "standalone"
2617
- }) || n.day(e, {
2618
- width: "narrow",
2619
- context: "standalone"
2620
- });
2621
- case "cccc":
2622
- default:
2623
- return n.day(e, {
2624
- width: "wide",
2625
- context: "standalone"
2626
- }) || n.day(e, {
2627
- width: "abbreviated",
2628
- context: "standalone"
2629
- }) || n.day(e, {
2630
- width: "short",
2631
- context: "standalone"
2632
- }) || n.day(e, {
2633
- width: "narrow",
2634
- context: "standalone"
2635
- });
2636
- }
2637
- }
2638
- }, {
2639
- key: "validate",
2640
- value: function(e, o) {
2641
- return o >= 0 && o <= 6;
2642
- }
2643
- }, {
2644
- key: "set",
2645
- value: function(e, o, n, s) {
2646
- return e = xe(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2647
- }
2648
- }]), t;
2649
- }(b);
2650
- function Zr(i, a) {
2651
- M(2, arguments);
2652
- var t = S(a);
2653
- t % 7 === 0 && (t = t - 7);
2654
- var r = 1, e = W(i), o = e.getUTCDay(), n = t % 7, s = (n + 7) % 7, d = (s < r ? 7 : 0) + t - o;
2655
- return e.setUTCDate(e.getUTCDate() + d), e;
2656
- }
2657
- var Jr = /* @__PURE__ */ function(i) {
2658
- m(t, i);
2659
- var a = p(t);
2660
- function t() {
2661
- var r;
2662
- h(this, t);
2663
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2664
- o[n] = arguments[n];
2665
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 90), l(c(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "E", "e", "c", "t", "T"]), r;
2666
- }
2667
- return v(t, [{
2668
- key: "parse",
2669
- value: function(e, o, n) {
2670
- var s = function(f) {
2671
- return f === 0 ? 7 : f;
2672
- };
2673
- switch (o) {
2674
- case "i":
2675
- case "ii":
2676
- return P(o.length, e);
2677
- case "io":
2678
- return n.ordinalNumber(e, {
2679
- unit: "day"
2680
- });
2681
- case "iii":
2682
- return U(n.day(e, {
2683
- width: "abbreviated",
2684
- context: "formatting"
2685
- }) || n.day(e, {
2686
- width: "short",
2687
- context: "formatting"
2688
- }) || n.day(e, {
2689
- width: "narrow",
2690
- context: "formatting"
2691
- }), s);
2692
- case "iiiii":
2693
- return U(n.day(e, {
2694
- width: "narrow",
2695
- context: "formatting"
2696
- }), s);
2697
- case "iiiiii":
2698
- return U(n.day(e, {
2699
- width: "short",
2700
- context: "formatting"
2701
- }) || n.day(e, {
2702
- width: "narrow",
2703
- context: "formatting"
2704
- }), s);
2705
- case "iiii":
2706
- default:
2707
- return U(n.day(e, {
2708
- width: "wide",
2709
- context: "formatting"
2710
- }) || n.day(e, {
2711
- width: "abbreviated",
2712
- context: "formatting"
2713
- }) || n.day(e, {
2714
- width: "short",
2715
- context: "formatting"
2716
- }) || n.day(e, {
2717
- width: "narrow",
2718
- context: "formatting"
2719
- }), s);
2720
- }
2721
- }
2722
- }, {
2723
- key: "validate",
2724
- value: function(e, o) {
2725
- return o >= 1 && o <= 7;
2726
- }
2727
- }, {
2728
- key: "set",
2729
- value: function(e, o, n) {
2730
- return e = Zr(e, n), e.setUTCHours(0, 0, 0, 0), e;
2731
- }
2732
- }]), t;
2733
- }(b), ea = /* @__PURE__ */ function(i) {
2734
- m(t, i);
2735
- var a = p(t);
2736
- function t() {
2737
- var r;
2738
- h(this, t);
2739
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2740
- o[n] = arguments[n];
2741
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 80), l(c(r), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]), r;
2742
- }
2743
- return v(t, [{
2744
- key: "parse",
2745
- value: function(e, o, n) {
2746
- switch (o) {
2747
- case "a":
2748
- case "aa":
2749
- case "aaa":
2750
- return n.dayPeriod(e, {
2751
- width: "abbreviated",
2752
- context: "formatting"
2753
- }) || n.dayPeriod(e, {
2754
- width: "narrow",
2755
- context: "formatting"
2756
- });
2757
- case "aaaaa":
2758
- return n.dayPeriod(e, {
2759
- width: "narrow",
2760
- context: "formatting"
2761
- });
2762
- case "aaaa":
2763
- default:
2764
- return n.dayPeriod(e, {
2765
- width: "wide",
2766
- context: "formatting"
2767
- }) || n.dayPeriod(e, {
2768
- width: "abbreviated",
2769
- context: "formatting"
2770
- }) || n.dayPeriod(e, {
2771
- width: "narrow",
2772
- context: "formatting"
2773
- });
2774
- }
2775
- }
2776
- }, {
2777
- key: "set",
2778
- value: function(e, o, n) {
2779
- return e.setUTCHours(Te(n), 0, 0, 0), e;
2780
- }
2781
- }]), t;
2782
- }(b), ta = /* @__PURE__ */ function(i) {
2783
- m(t, i);
2784
- var a = p(t);
2785
- function t() {
2786
- var r;
2787
- h(this, t);
2788
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2789
- o[n] = arguments[n];
2790
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 80), l(c(r), "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]), r;
2791
- }
2792
- return v(t, [{
2793
- key: "parse",
2794
- value: function(e, o, n) {
2795
- switch (o) {
2796
- case "b":
2797
- case "bb":
2798
- case "bbb":
2799
- return n.dayPeriod(e, {
2800
- width: "abbreviated",
2801
- context: "formatting"
2802
- }) || n.dayPeriod(e, {
2803
- width: "narrow",
2804
- context: "formatting"
2805
- });
2806
- case "bbbbb":
2807
- return n.dayPeriod(e, {
2808
- width: "narrow",
2809
- context: "formatting"
2810
- });
2811
- case "bbbb":
2812
- default:
2813
- return n.dayPeriod(e, {
2814
- width: "wide",
2815
- context: "formatting"
2816
- }) || n.dayPeriod(e, {
2817
- width: "abbreviated",
2818
- context: "formatting"
2819
- }) || n.dayPeriod(e, {
2820
- width: "narrow",
2821
- context: "formatting"
2822
- });
2823
- }
2824
- }
2825
- }, {
2826
- key: "set",
2827
- value: function(e, o, n) {
2828
- return e.setUTCHours(Te(n), 0, 0, 0), e;
2829
- }
2830
- }]), t;
2831
- }(b), ra = /* @__PURE__ */ function(i) {
2832
- m(t, i);
2833
- var a = p(t);
2834
- function t() {
2835
- var r;
2836
- h(this, t);
2837
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2838
- o[n] = arguments[n];
2839
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 80), l(c(r), "incompatibleTokens", ["a", "b", "t", "T"]), r;
2840
- }
2841
- return v(t, [{
2842
- key: "parse",
2843
- value: function(e, o, n) {
2844
- switch (o) {
2845
- case "B":
2846
- case "BB":
2847
- case "BBB":
2848
- return n.dayPeriod(e, {
2849
- width: "abbreviated",
2850
- context: "formatting"
2851
- }) || n.dayPeriod(e, {
2852
- width: "narrow",
2853
- context: "formatting"
2854
- });
2855
- case "BBBBB":
2856
- return n.dayPeriod(e, {
2857
- width: "narrow",
2858
- context: "formatting"
2859
- });
2860
- case "BBBB":
2861
- default:
2862
- return n.dayPeriod(e, {
2863
- width: "wide",
2864
- context: "formatting"
2865
- }) || n.dayPeriod(e, {
2866
- width: "abbreviated",
2867
- context: "formatting"
2868
- }) || n.dayPeriod(e, {
2869
- width: "narrow",
2870
- context: "formatting"
2871
- });
2872
- }
2873
- }
2874
- }, {
2875
- key: "set",
2876
- value: function(e, o, n) {
2877
- return e.setUTCHours(Te(n), 0, 0, 0), e;
2878
- }
2879
- }]), t;
2880
- }(b), aa = /* @__PURE__ */ function(i) {
2881
- m(t, i);
2882
- var a = p(t);
2883
- function t() {
2884
- var r;
2885
- h(this, t);
2886
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2887
- o[n] = arguments[n];
2888
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 70), l(c(r), "incompatibleTokens", ["H", "K", "k", "t", "T"]), r;
2889
- }
2890
- return v(t, [{
2891
- key: "parse",
2892
- value: function(e, o, n) {
2893
- switch (o) {
2894
- case "h":
2895
- return D(O.hour12h, e);
2896
- case "ho":
2897
- return n.ordinalNumber(e, {
2898
- unit: "hour"
2899
- });
2900
- default:
2901
- return P(o.length, e);
2902
- }
2903
- }
2904
- }, {
2905
- key: "validate",
2906
- value: function(e, o) {
2907
- return o >= 1 && o <= 12;
2908
- }
2909
- }, {
2910
- key: "set",
2911
- value: function(e, o, n) {
2912
- var s = e.getUTCHours() >= 12;
2913
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : !s && n === 12 ? e.setUTCHours(0, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
2914
- }
2915
- }]), t;
2916
- }(b), na = /* @__PURE__ */ function(i) {
2917
- m(t, i);
2918
- var a = p(t);
2919
- function t() {
2920
- var r;
2921
- h(this, t);
2922
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2923
- o[n] = arguments[n];
2924
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 70), l(c(r), "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]), r;
2925
- }
2926
- return v(t, [{
2927
- key: "parse",
2928
- value: function(e, o, n) {
2929
- switch (o) {
2930
- case "H":
2931
- return D(O.hour23h, e);
2932
- case "Ho":
2933
- return n.ordinalNumber(e, {
2934
- unit: "hour"
2935
- });
2936
- default:
2937
- return P(o.length, e);
2938
- }
2939
- }
2940
- }, {
2941
- key: "validate",
2942
- value: function(e, o) {
2943
- return o >= 0 && o <= 23;
2944
- }
2945
- }, {
2946
- key: "set",
2947
- value: function(e, o, n) {
2948
- return e.setUTCHours(n, 0, 0, 0), e;
2949
- }
2950
- }]), t;
2951
- }(b), ia = /* @__PURE__ */ function(i) {
2952
- m(t, i);
2953
- var a = p(t);
2954
- function t() {
2955
- var r;
2956
- h(this, t);
2957
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2958
- o[n] = arguments[n];
2959
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 70), l(c(r), "incompatibleTokens", ["h", "H", "k", "t", "T"]), r;
2960
- }
2961
- return v(t, [{
2962
- key: "parse",
2963
- value: function(e, o, n) {
2964
- switch (o) {
2965
- case "K":
2966
- return D(O.hour11h, e);
2967
- case "Ko":
2968
- return n.ordinalNumber(e, {
2969
- unit: "hour"
2970
- });
2971
- default:
2972
- return P(o.length, e);
2973
- }
2974
- }
2975
- }, {
2976
- key: "validate",
2977
- value: function(e, o) {
2978
- return o >= 0 && o <= 11;
2979
- }
2980
- }, {
2981
- key: "set",
2982
- value: function(e, o, n) {
2983
- var s = e.getUTCHours() >= 12;
2984
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
2985
- }
2986
- }]), t;
2987
- }(b), oa = /* @__PURE__ */ function(i) {
2988
- m(t, i);
2989
- var a = p(t);
2990
- function t() {
2991
- var r;
2992
- h(this, t);
2993
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2994
- o[n] = arguments[n];
2995
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 70), l(c(r), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]), r;
2996
- }
2997
- return v(t, [{
2998
- key: "parse",
2999
- value: function(e, o, n) {
3000
- switch (o) {
3001
- case "k":
3002
- return D(O.hour24h, e);
3003
- case "ko":
3004
- return n.ordinalNumber(e, {
3005
- unit: "hour"
3006
- });
3007
- default:
3008
- return P(o.length, e);
3009
- }
3010
- }
3011
- }, {
3012
- key: "validate",
3013
- value: function(e, o) {
3014
- return o >= 1 && o <= 24;
3015
- }
3016
- }, {
3017
- key: "set",
3018
- value: function(e, o, n) {
3019
- var s = n <= 24 ? n % 24 : n;
3020
- return e.setUTCHours(s, 0, 0, 0), e;
3021
- }
3022
- }]), t;
3023
- }(b), sa = /* @__PURE__ */ function(i) {
3024
- m(t, i);
3025
- var a = p(t);
3026
- function t() {
3027
- var r;
3028
- h(this, t);
3029
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3030
- o[n] = arguments[n];
3031
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 60), l(c(r), "incompatibleTokens", ["t", "T"]), r;
3032
- }
3033
- return v(t, [{
3034
- key: "parse",
3035
- value: function(e, o, n) {
3036
- switch (o) {
3037
- case "m":
3038
- return D(O.minute, e);
3039
- case "mo":
3040
- return n.ordinalNumber(e, {
3041
- unit: "minute"
3042
- });
3043
- default:
3044
- return P(o.length, e);
3045
- }
3046
- }
3047
- }, {
3048
- key: "validate",
3049
- value: function(e, o) {
3050
- return o >= 0 && o <= 59;
3051
- }
3052
- }, {
3053
- key: "set",
3054
- value: function(e, o, n) {
3055
- return e.setUTCMinutes(n, 0, 0), e;
3056
- }
3057
- }]), t;
3058
- }(b), ua = /* @__PURE__ */ function(i) {
3059
- m(t, i);
3060
- var a = p(t);
3061
- function t() {
3062
- var r;
3063
- h(this, t);
3064
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3065
- o[n] = arguments[n];
3066
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 50), l(c(r), "incompatibleTokens", ["t", "T"]), r;
3067
- }
3068
- return v(t, [{
3069
- key: "parse",
3070
- value: function(e, o, n) {
3071
- switch (o) {
3072
- case "s":
3073
- return D(O.second, e);
3074
- case "so":
3075
- return n.ordinalNumber(e, {
3076
- unit: "second"
3077
- });
3078
- default:
3079
- return P(o.length, e);
3080
- }
3081
- }
3082
- }, {
3083
- key: "validate",
3084
- value: function(e, o) {
3085
- return o >= 0 && o <= 59;
3086
- }
3087
- }, {
3088
- key: "set",
3089
- value: function(e, o, n) {
3090
- return e.setUTCSeconds(n, 0), e;
3091
- }
3092
- }]), t;
3093
- }(b), la = /* @__PURE__ */ function(i) {
3094
- m(t, i);
3095
- var a = p(t);
3096
- function t() {
3097
- var r;
3098
- h(this, t);
3099
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3100
- o[n] = arguments[n];
3101
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 30), l(c(r), "incompatibleTokens", ["t", "T"]), r;
3102
- }
3103
- return v(t, [{
3104
- key: "parse",
3105
- value: function(e, o) {
3106
- var n = function(d) {
3107
- return Math.floor(d * Math.pow(10, -o.length + 3));
3108
- };
3109
- return U(P(o.length, e), n);
3110
- }
3111
- }, {
3112
- key: "set",
3113
- value: function(e, o, n) {
3114
- return e.setUTCMilliseconds(n), e;
3115
- }
3116
- }]), t;
3117
- }(b), ca = /* @__PURE__ */ function(i) {
3118
- m(t, i);
3119
- var a = p(t);
3120
- function t() {
3121
- var r;
3122
- h(this, t);
3123
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3124
- o[n] = arguments[n];
3125
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 10), l(c(r), "incompatibleTokens", ["t", "T", "x"]), r;
3126
- }
3127
- return v(t, [{
3128
- key: "parse",
3129
- value: function(e, o) {
3130
- switch (o) {
3131
- case "X":
3132
- return B(q.basicOptionalMinutes, e);
3133
- case "XX":
3134
- return B(q.basic, e);
3135
- case "XXXX":
3136
- return B(q.basicOptionalSeconds, e);
3137
- case "XXXXX":
3138
- return B(q.extendedOptionalSeconds, e);
3139
- case "XXX":
3140
- default:
3141
- return B(q.extended, e);
3142
- }
3143
- }
3144
- }, {
3145
- key: "set",
3146
- value: function(e, o, n) {
3147
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3148
- }
3149
- }]), t;
3150
- }(b), da = /* @__PURE__ */ function(i) {
3151
- m(t, i);
3152
- var a = p(t);
3153
- function t() {
3154
- var r;
3155
- h(this, t);
3156
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3157
- o[n] = arguments[n];
3158
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 10), l(c(r), "incompatibleTokens", ["t", "T", "X"]), r;
3159
- }
3160
- return v(t, [{
3161
- key: "parse",
3162
- value: function(e, o) {
3163
- switch (o) {
3164
- case "x":
3165
- return B(q.basicOptionalMinutes, e);
3166
- case "xx":
3167
- return B(q.basic, e);
3168
- case "xxxx":
3169
- return B(q.basicOptionalSeconds, e);
3170
- case "xxxxx":
3171
- return B(q.extendedOptionalSeconds, e);
3172
- case "xxx":
3173
- default:
3174
- return B(q.extended, e);
3175
- }
3176
- }
3177
- }, {
3178
- key: "set",
3179
- value: function(e, o, n) {
3180
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3181
- }
3182
- }]), t;
3183
- }(b), fa = /* @__PURE__ */ function(i) {
3184
- m(t, i);
3185
- var a = p(t);
3186
- function t() {
3187
- var r;
3188
- h(this, t);
3189
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3190
- o[n] = arguments[n];
3191
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 40), l(c(r), "incompatibleTokens", "*"), r;
3192
- }
3193
- return v(t, [{
3194
- key: "parse",
3195
- value: function(e) {
3196
- return Je(e);
3197
- }
3198
- }, {
3199
- key: "set",
3200
- value: function(e, o, n) {
3201
- return [new Date(n * 1e3), {
3202
- timestampIsSet: !0
3203
- }];
3204
- }
3205
- }]), t;
3206
- }(b), ha = /* @__PURE__ */ function(i) {
3207
- m(t, i);
3208
- var a = p(t);
3209
- function t() {
3210
- var r;
3211
- h(this, t);
3212
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3213
- o[n] = arguments[n];
3214
- return r = a.call.apply(a, [this].concat(o)), l(c(r), "priority", 20), l(c(r), "incompatibleTokens", "*"), r;
3215
- }
3216
- return v(t, [{
3217
- key: "parse",
3218
- value: function(e) {
3219
- return Je(e);
3220
- }
3221
- }, {
3222
- key: "set",
3223
- value: function(e, o, n) {
3224
- return [new Date(n), {
3225
- timestampIsSet: !0
3226
- }];
3227
- }
3228
- }]), t;
3229
- }(b), va = {
3230
- G: new Ur(),
3231
- y: new Wr(),
3232
- Y: new Lr(),
3233
- R: new Sr(),
3234
- u: new Hr(),
3235
- Q: new Nr(),
3236
- q: new Ar(),
3237
- M: new Fr(),
3238
- L: new Ir(),
3239
- w: new Br(),
3240
- I: new Rr(),
3241
- d: new Xr(),
3242
- D: new Gr(),
3243
- E: new zr(),
3244
- e: new Vr(),
3245
- c: new Kr(),
3246
- i: new Jr(),
3247
- a: new ea(),
3248
- b: new ta(),
3249
- B: new ra(),
3250
- h: new aa(),
3251
- H: new na(),
3252
- K: new ia(),
3253
- k: new oa(),
3254
- m: new sa(),
3255
- s: new ua(),
3256
- S: new la(),
3257
- X: new ca(),
3258
- x: new da(),
3259
- t: new fa(),
3260
- T: new ha()
3261
- }, ma = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, pa = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ga = /^'([^]*?)'?$/, wa = /''/g, ya = /\S/, ba = /[a-zA-Z]/;
3262
- function rt(i, a, t, r) {
3263
- var e, o, n, s, d, f, w, y, k, C, E, F, H, $;
3264
- M(3, arguments);
3265
- var L = String(i), I = String(a), R = te(), j = (e = (o = void 0) !== null && o !== void 0 ? o : R.locale) !== null && e !== void 0 ? e : Xe;
3266
- if (!j.match)
3267
- throw new RangeError("locale must contain match property");
3268
- var X = S((n = (s = (d = (f = void 0) !== null && f !== void 0 ? f : void 0) !== null && d !== void 0 ? d : R.firstWeekContainsDate) !== null && s !== void 0 ? s : (w = R.locale) === null || w === void 0 || (y = w.options) === null || y === void 0 ? void 0 : y.firstWeekContainsDate) !== null && n !== void 0 ? n : 1);
3269
- if (!(X >= 1 && X <= 7))
3270
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
3271
- var re = S((k = (C = (E = (F = void 0) !== null && F !== void 0 ? F : void 0) !== null && E !== void 0 ? E : R.weekStartsOn) !== null && C !== void 0 ? C : (H = R.locale) === null || H === void 0 || ($ = H.options) === null || $ === void 0 ? void 0 : $.weekStartsOn) !== null && k !== void 0 ? k : 0);
3272
- if (!(re >= 0 && re <= 6))
3273
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3274
- if (I === "")
3275
- return L === "" ? W(t) : /* @__PURE__ */ new Date(NaN);
3276
- var ae = {
3277
- firstWeekContainsDate: X,
3278
- weekStartsOn: re,
3279
- locale: j
3280
- }, ne = [new Or()], ve = I.match(pa).map(function(Y) {
3281
- var x = Y[0];
3282
- if (x in we) {
3283
- var A = we[x];
3284
- return A(Y, j.formatLong);
3285
- }
3286
- return Y;
3287
- }).join("").match(ma), _ = [], N = Ne(ve), z;
3288
- try {
3289
- var at = function() {
3290
- var x = z.value;
3291
- !(r != null && r.useAdditionalWeekYearTokens) && je(x) && de(x, I, i), !(r != null && r.useAdditionalDayOfYearTokens) && Qe(x) && de(x, I, i);
3292
- var A = x[0], ce = va[A];
3293
- if (ce) {
3294
- var Me = ce.incompatibleTokens;
3295
- if (Array.isArray(Me)) {
3296
- var Oe = _.find(function(Ue) {
3297
- return Me.includes(Ue.token) || Ue.token === A;
3298
- });
3299
- if (Oe)
3300
- throw new RangeError("The format string mustn't contain `".concat(Oe.fullToken, "` and `").concat(x, "` at the same time"));
3301
- } else if (ce.incompatibleTokens === "*" && _.length > 0)
3302
- throw new RangeError("The format string mustn't contain `".concat(x, "` and any other token at the same time"));
3303
- _.push({
3304
- token: A,
3305
- fullToken: x
3306
- });
3307
- var pe = ce.run(L, x, j.match, ae);
3308
- if (!pe)
3309
- return {
3310
- v: /* @__PURE__ */ new Date(NaN)
3311
- };
3312
- ne.push(pe.setter), L = pe.rest;
3313
- } else {
3314
- if (A.match(ba))
3315
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + A + "`");
3316
- if (x === "''" ? x = "'" : A === "'" && (x = Ta(x)), L.indexOf(x) === 0)
3317
- L = L.slice(x.length);
3318
- else
3319
- return {
3320
- v: /* @__PURE__ */ new Date(NaN)
3321
- };
3322
- }
3323
- };
3324
- for (N.s(); !(z = N.n()).done; ) {
3325
- var Ce = at();
3326
- if (Q(Ce) === "object")
3327
- return Ce.v;
3328
- }
3329
- } catch (Y) {
3330
- N.e(Y);
3331
- } finally {
3332
- N.f();
3333
- }
3334
- if (L.length > 0 && ya.test(L))
3335
- return /* @__PURE__ */ new Date(NaN);
3336
- var nt = ne.map(function(Y) {
3337
- return Y.priority;
3338
- }).sort(function(Y, x) {
3339
- return x - Y;
3340
- }).filter(function(Y, x, A) {
3341
- return A.indexOf(Y) === x;
3342
- }).map(function(Y) {
3343
- return ne.filter(function(x) {
3344
- return x.priority === Y;
3345
- }).sort(function(x, A) {
3346
- return A.subPriority - x.subPriority;
3347
- });
3348
- }).map(function(Y) {
3349
- return Y[0];
3350
- }), me = W(t);
3351
- if (isNaN(me.getTime()))
3352
- return /* @__PURE__ */ new Date(NaN);
3353
- var ie = Fe(me, Re(me)), De = {}, ue = Ne(nt), ke;
3354
- try {
3355
- for (ue.s(); !(ke = ue.n()).done; ) {
3356
- var Pe = ke.value;
3357
- if (!Pe.validate(ie, ae))
3358
- return /* @__PURE__ */ new Date(NaN);
3359
- var le = Pe.set(ie, De, ae);
3360
- Array.isArray(le) ? (ie = le[0], xr(De, le[1])) : ie = le;
3361
- }
3362
- } catch (Y) {
3363
- ue.e(Y);
3364
- } finally {
3365
- ue.f();
3366
- }
3367
- return ie;
3368
- }
3369
- function Ta(i) {
3370
- return i.match(ga)[1].replace(wa, "'");
3371
- }
3372
- function xa(i, a) {
3373
- M(2, arguments);
3374
- var t = W(i), r = S(a);
3375
- if (isNaN(r))
3376
- return /* @__PURE__ */ new Date(NaN);
3377
- if (!r)
3378
- return t;
3379
- var e = t.getDate(), o = new Date(t.getTime());
3380
- o.setMonth(t.getMonth() + r + 1, 0);
3381
- var n = o.getDate();
3382
- return e >= n ? o : (t.setFullYear(o.getFullYear(), o.getMonth(), e), t);
3383
- }
3384
- function Ca(i, a) {
3385
- M(2, arguments);
3386
- var t = S(a);
3387
- return xa(i, -t);
3388
- }
3389
- const Da = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}.MenuReturnButton{font:inherit;color:var(--emw--color-gray-300, #58586B);display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.MenuReturnButton h2.TransactionTitleMobile{font-size:16px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}', ka = Da, Pa = class {
3390
- constructor(i) {
3391
- Ae(this, i), this.pageSizes = [10, 25, 50], this.pagination = null, this.toggleScreen = () => {
3392
- window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.mobile }, window.location.href);
3393
- }, this.endpoint = void 0, this.session = void 0, this.language = g.defaultLanguage, this.userId = void 0, this.translationUrl = void 0, this.mobile = !1, this.clientStyling = null, this.clientStylingUrl = null, this.mbSource = void 0, this.dateFormat = "", this.page = 0, this.pageSize = this.pageSizes[0], this.showMobileFilter = !1, this.to = void 0, this.from = void 0, this.type = "0", this.transactions = void 0, this.showLoader = !0;
3394
- }
3395
- watchMultiple() {
3396
- this.loadTransactions();
3397
- }
3398
- handleClientStylingChange(i, a) {
3399
- i != a && Le(this.stylingContainer, this.clientStyling);
3400
- }
3401
- handleClientStylingUrlChange(i, a) {
3402
- i != a && this.clientStylingUrl && Se(this.stylingContainer, this.clientStylingUrl);
3403
- }
3404
- async componentWillLoad() {
3405
- this.translationUrl && await g.loadCustomTranslations(this.translationUrl), this.to = K(/* @__PURE__ */ new Date(), `${this.dateFormat || "yyyy-MM-dd"}`), this.from = K(Ca(/* @__PURE__ */ new Date(), 1), `${this.dateFormat || "yyyy-MM-dd"}`), this.loadTransactions();
3406
- }
3407
- componentDidLoad() {
3408
- this.stylingContainer && (window.emMessageBus != null ? br(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && Le(this.stylingContainer, this.clientStyling), this.clientStylingUrl && Se(this.stylingContainer, this.clientStylingUrl)));
3409
- }
3410
- componentDidRender() {
3411
- this.getComponentHeight();
3412
- }
3413
- getComponentHeight() {
3414
- var i;
3415
- if (this.mobile) {
3416
- let a = this.el.getBoundingClientRect().height - ((i = this.el.shadowRoot.querySelector(".table")) === null || i === void 0 ? void 0 : i.getBoundingClientRect().y);
3417
- this.el.style.setProperty("--heightScrollableContainer", a + "px");
3418
- }
3419
- }
3420
- setHeightTableProperty() {
3421
- let i = this.getComponentHeight();
3422
- this.el.style.setProperty("--heightScrollableContainer", i + "px");
3423
- }
3424
- changeTransactionsType(i) {
3425
- this.type = i;
3426
- }
3427
- changePageSize(i) {
3428
- this.pageSize = i;
3429
- }
3430
- prev() {
3431
- var i;
3432
- !((i = this.pagination) === null || i === void 0) && i.previous && this.page--;
3433
- }
3434
- next() {
3435
- var i;
3436
- !((i = this.pagination) === null || i === void 0) && i.next && this.page++;
3437
- }
3438
- applyFilters(i, a) {
3439
- this.from = i, this.to = a, this.loadTransactions();
3440
- }
3441
- showFilter() {
3442
- this.showMobileFilter = !this.showMobileFilter;
3443
- }
3444
- disconnectedCallback() {
3445
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
3446
- }
3447
- render() {
3448
- var i;
3449
- const a = Ee("../assets/filter.svg"), t = Ee("../assets/warning.svg");
3450
- return u(it, { key: "395328866f9fbae0a79d1dcf9dc5e9fd6e321406" }, this.showLoader ? u(lt, null) : "", u("div", { key: "fcb0efc2b0c9f2daa3df8c6c1d541dabe76c8126", class: "wrapper", ref: (r) => this.stylingContainer = r }, this.mobile ? u("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, u("defs", null), u("g", { transform: "translate(-20 -158)" }, u("g", { transform: "translate(20 158)" }, u("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), u("h2", { class: "TransactionTitleMobile" }, g.translate("transactionTitle", this.language))) : u("h2", { class: "TransactionTitle" }, g.translate("transactionTitle", this.language)), u("div", { key: "3fcb0ac0f3bc81ce2c3e298e53649a7050a53cb2", class: { "types types-mobile": this.mobile, "types types-desktop": !this.mobile } }, u("button", { key: "1fcfd5dbf9857488bd0594f5b908e845a66f0d05", class: "transaction-type " + (this.type === "0" ? "clicked" : ""), onClick: () => this.changeTransactionsType("0") }, g.translate("deposit", this.language)), u("button", { key: "58c6707975e3854e8a4afcf270a11dacd3c15947", class: "transaction-type " + (this.type === "1" ? "clicked" : ""), onClick: () => this.changeTransactionsType("1") }, g.translate("withdrawals", this.language))), this.mobile ? "" : u(wr, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: (r) => this.changePageSize(r) }), this.mobile ? u("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, u("img", { src: a, alt: "Filter" }), g.translate("filter", this.language)) : "", !this.mobile || this.showMobileFilter && this.mobile ? u("user-transaction-history-filter", { language: this.language, onApplyFilters: ({ detail: { from: r, to: e } }) => this.applyFilters(r, e), from: this.from, to: this.to, dateformat: this.dateFormat }) : "", ((i = this.transactions) === null || i === void 0 ? void 0 : i.length) > 0 ? u("div", { class: "table" }, this.mobile ? u("div", { class: "mobile-table" }, this.transactions.map((r) => u(gr, Object.assign({}, r, { dateformat: this.dateFormat })))) : u(yr, { source: this.transactions, language: this.language, dateformat: this.dateFormat })) : u("div", { class: "noData" }, u("img", { src: t, alt: "Warning" }), u("span", null, g.translate("noData", this.language))), u("div", { key: "a58ec540ecc0d4162bb32eae5bd453e37cf7fed1", class: "pagination" }, u("button", { key: "f21b01b72d7a4470e1cbbefdec50169e6e5bc222", onClick: () => this.prev() }, "<"), u("button", { key: "d14d057b3620a30ae3c11a5f22640913c0a1d32e", onClick: () => this.next() }, ">"))));
3451
- }
3452
- async loadTransactions() {
3453
- this.showLoader = !0;
3454
- try {
3455
- const i = `${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`, a = await fetch(i, {
3456
- headers: {
3457
- "X-Sessionid": this.session,
3458
- "Content-Type": "application/json"
3459
- }
3460
- });
3461
- if (!a.ok) {
3462
- const r = await a.text();
3463
- throw new Error(r);
3464
- }
3465
- const t = await a.json();
3466
- this.pagination = t.pagination, this.transactions = t.transactions;
3467
- } catch (i) {
3468
- console.error(i);
3469
- } finally {
3470
- this.showLoader = !1;
3471
- }
3472
- }
3473
- formatDateForApi(i) {
3474
- const a = rt(i, `${this.dateFormat || "yyyy-MM-dd"}`, /* @__PURE__ */ new Date());
3475
- return K(a, "yyyy-MM-dd");
3476
- }
3477
- getParams() {
3478
- const i = (this.page * this.pageSize).toString(), a = this.formatDateForApi(this.from), t = this.formatDateForApi(this.to);
3479
- return `offset=${i}&endDate=${t}&startDate=${a}&type=${this.type}&limit=${this.pageSize}`;
3480
- }
3481
- static get assetsDirs() {
3482
- return ["../assets"];
3483
- }
3484
- get el() {
3485
- return ot(this);
3486
- }
3487
- static get watchers() {
3488
- return {
3489
- page: ["watchMultiple"],
3490
- type: ["watchMultiple"],
3491
- session: ["watchMultiple"],
3492
- userId: ["watchMultiple"],
3493
- pageSize: ["watchMultiple"],
3494
- clientStyling: ["handleClientStylingChange"],
3495
- clientStylingUrl: ["handleClientStylingUrlChange"],
3496
- showMobileFilter: ["getComponentHeight"]
3497
- };
3498
- }
3499
- };
3500
- Pa.style = ka;
3501
- const Oa = class {
3502
- constructor(i) {
3503
- Ae(this, i), this.applyFilters = st(this, "applyFilters"), this.startDateChange = () => {
3504
- this.startDate = K(new Date(this.startDatePicker.value), `${this.dateformat || "yyyy-MM-dd"}`);
3505
- }, this.endDateChange = () => {
3506
- this.endDate = K(new Date(this.endDatePicker.value), `${this.dateformat || "yyyy-MM-dd"}`);
3507
- }, this.from = void 0, this.to = void 0, this.language = void 0, this.dateformat = void 0, this.startDate = void 0, this.endDate = void 0;
3508
- }
3509
- componentWillLoad() {
3510
- this.startDate = this.from, this.endDate = this.to;
3511
- }
3512
- componentDidLoad() {
3513
- this.startDatePicker.i18n = Object.assign(Object.assign({}, this.startDatePicker.i18n), { formatDate: this.formatVaadinDate.bind(this), parseDate: this.parseDate.bind(this) }), this.endDatePicker.i18n = Object.assign(Object.assign({}, this.endDatePicker.i18n), { formatDate: this.formatVaadinDate.bind(this), parseDate: this.parseDate.bind(this) });
3514
- }
3515
- formatVaadinDate(i) {
3516
- const { year: a, month: t, day: r } = i, e = new Date(a, t, r);
3517
- return K(e, this.dateformat || "yyyy-MM-dd");
3518
- }
3519
- parseDate(i) {
3520
- const a = rt(i, this.dateformat || "yyyy-MM-dd", /* @__PURE__ */ new Date());
3521
- return { year: a.getFullYear(), month: a.getMonth(), day: a.getDate() };
3522
- }
3523
- handleApplyFilters() {
3524
- this.applyFilters.emit({ from: this.startDate, to: this.endDate });
3525
- }
3526
- render() {
3527
- return u("div", { key: "e25ee310b522ecfcc8dda8b6294e30f5e66c4edd", class: "period" }, u("div", { key: "a6ec37aafe30774077bae55366d6357c1b0a8c60", class: "period-content" }, u("div", { key: "d9796d6972931e14190fcd8ab558162af64d8d62", class: "date-input" }, u("vaadin-date-picker", { key: "3df25b815c7b2a7f3bf72ece4c430f595446122e", value: this.startDate, placeholder: this.startDate, ref: (i) => this.startDatePicker = i, label: g.translate("from", this.language), onChange: this.startDateChange })), u("span", { key: "f251410540f18bb86946c2e08915edbf73765fbc" }, u("svg", { key: "7c5d28705c152fbc73c3709b5e3b6bee5b14c0c7", width: "24px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, u("path", { key: "3ebc124be61de20e9f946ae5f9116a5f9bf043ff", d: "m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z", "fill-rule": "nonzero", fill: "5d687b" }))), u("div", { key: "84aa35e5d8598c713904bfd4baf109a422b83e2c", class: "date-input" }, u("vaadin-date-picker", { key: "3ef7bd62bc9ed6034fb55fff38013425b627d1c9", value: this.endDate, placeholder: this.endDate, ref: (i) => this.endDatePicker = i, label: g.translate("to", this.language), onChange: this.endDateChange })), u("button", { key: "6f3be9bf3a0c2de87d7661691e3b72b16018e460", class: "filter-btn", onClick: this.handleApplyFilters.bind(this) }, g.translate("filter", this.language))));
3528
- }
3529
- };
3530
- export {
3531
- Pa as user_transaction_history,
3532
- Oa as user_transaction_history_filter
3533
- };