react-luminus-components 2.1.8 → 2.1.10

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.
Files changed (48) hide show
  1. package/dist/.vite/manifest.json +191 -50
  2. package/dist/Alert-BApdinGX.cjs +1 -0
  3. package/dist/Alert-D2Bw906t.js +495 -0
  4. package/dist/DelegationContext-B1WXROG2.cjs +201 -0
  5. package/dist/DelegationContext-CCnk58PI.js +3156 -0
  6. package/dist/HelmetContext-ChKPef74.js +49 -0
  7. package/dist/HelmetContext-DDQ-Phg7.cjs +1 -0
  8. package/dist/PrimaryButton-D7r0m8xi.js +742 -0
  9. package/dist/PrimaryButton-D91b3Dmv.cjs +1 -0
  10. package/dist/SimpleTooltip-B00uLuVM.cjs +1 -0
  11. package/dist/SimpleTooltip-dwOOgecT.js +1642 -0
  12. package/dist/Typography-C5KJzU5O.js +1627 -0
  13. package/dist/Typography-Fo21SeyJ.cjs +20 -0
  14. package/dist/UserContext-45ZxeQHB.cjs +1 -0
  15. package/dist/UserContext-ZsTsf5Xe.js +270 -0
  16. package/dist/contexts.cjs.js +1 -1
  17. package/dist/contexts.es.js +1773 -852
  18. package/dist/dateUtils-CXm9PEh6.cjs +1 -0
  19. package/dist/dateUtils-ayErBYbI.js +1488 -0
  20. package/dist/hooks.cjs.js +1 -1
  21. package/dist/hooks.es.js +118 -123
  22. package/dist/index-4IYT9u10.js +95 -0
  23. package/dist/index-jmbq5h95.cjs +25 -0
  24. package/dist/layout.cjs.js +1 -1
  25. package/dist/layout.es.js +97 -98
  26. package/dist/localStorageUtils-BSATUi5m.cjs +1 -0
  27. package/dist/localStorageUtils-DNgjNynk.js +1070 -0
  28. package/dist/main.cjs.js +56 -7
  29. package/dist/main.es.js +36401 -11370
  30. package/dist/models/texts/SubstitutionsTexts.d.ts +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/useIsFormDirty-76y8Dca-.cjs +1 -0
  33. package/dist/useIsFormDirty-Ba5uhPH7.js +3257 -0
  34. package/dist/useWindowSize-7W91GsJQ.js +56 -0
  35. package/dist/useWindowSize-CLoDaEYh.cjs +1 -0
  36. package/dist/utils.cjs.js +1 -1
  37. package/dist/utils.es.js +79 -85
  38. package/package.json +10 -1
  39. package/dist/FormDisabledProvider-D-DRODSt.js +0 -51
  40. package/dist/FormDisabledProvider-Dt39yr7W.cjs +0 -1
  41. package/dist/localStorageUtils-CVwJ9FKd.cjs +0 -1
  42. package/dist/localStorageUtils-TeLq8MHE.js +0 -59
  43. package/dist/nivo-bar-D6NJLYWS.js +0 -39616
  44. package/dist/nivo-bar-SBWBmyeI.cjs +0 -293
  45. package/dist/useIsFormDirty-CZ4jNRFn.js +0 -117
  46. package/dist/useIsFormDirty-Crsu8mjo.cjs +0 -1
  47. package/dist/useLocalStorageState-Ca7olZgH.cjs +0 -1
  48. package/dist/useLocalStorageState-DtBc-C2W.js +0 -25
@@ -0,0 +1,1488 @@
1
+ function h(t) {
2
+ const e = Object.prototype.toString.call(t);
3
+ return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
4
+ }
5
+ function b(t, e) {
6
+ return t instanceof Date ? new t.constructor(e) : new Date(e);
7
+ }
8
+ const tt = 365.2425, _ = 6048e5, et = 864e5, X = 6e4, A = 36e5, nt = 3600, Fe = 60, B = nt * 24, Ce = B * 7, rt = B * tt, at = rt / 12, Ee = at * 3;
9
+ let st = {};
10
+ function S() {
11
+ return st;
12
+ }
13
+ function x(t, e) {
14
+ var c, o, d, l;
15
+ const n = S(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((o = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : o.weekStartsOn) ?? n.weekStartsOn ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = h(t), s = a.getDay(), i = (s < r ? 7 : 0) + s - r;
16
+ return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a;
17
+ }
18
+ function v(t) {
19
+ return x(t, { weekStartsOn: 1 });
20
+ }
21
+ function V(t) {
22
+ const e = h(t), n = e.getFullYear(), r = b(t, 0);
23
+ r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
24
+ const a = v(r), s = b(t, 0);
25
+ s.setFullYear(n, 0, 4), s.setHours(0, 0, 0, 0);
26
+ const i = v(s);
27
+ return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= i.getTime() ? n : n - 1;
28
+ }
29
+ function j(t) {
30
+ const e = h(t);
31
+ return e.setHours(0, 0, 0, 0), e;
32
+ }
33
+ function U(t) {
34
+ const e = h(t), n = new Date(
35
+ Date.UTC(
36
+ e.getFullYear(),
37
+ e.getMonth(),
38
+ e.getDate(),
39
+ e.getHours(),
40
+ e.getMinutes(),
41
+ e.getSeconds(),
42
+ e.getMilliseconds()
43
+ )
44
+ );
45
+ return n.setUTCFullYear(e.getFullYear()), +t - +n;
46
+ }
47
+ function it(t, e) {
48
+ const n = j(t), r = j(e), a = +n - U(n), s = +r - U(r);
49
+ return Math.round((a - s) / et);
50
+ }
51
+ function ot(t) {
52
+ const e = V(t), n = b(t, 0);
53
+ return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), v(n);
54
+ }
55
+ function ut(t) {
56
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
57
+ }
58
+ function ct(t) {
59
+ if (!ut(t) && typeof t != "number")
60
+ return !1;
61
+ const e = h(t);
62
+ return !isNaN(Number(e));
63
+ }
64
+ function dt(t) {
65
+ const e = h(t), n = e.getMonth();
66
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
67
+ }
68
+ function ft(t) {
69
+ const e = h(t), n = b(t, 0);
70
+ return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
71
+ }
72
+ const lt = {
73
+ lessThanXSeconds: {
74
+ one: "less than a second",
75
+ other: "less than {{count}} seconds"
76
+ },
77
+ xSeconds: {
78
+ one: "1 second",
79
+ other: "{{count}} seconds"
80
+ },
81
+ halfAMinute: "half a minute",
82
+ lessThanXMinutes: {
83
+ one: "less than a minute",
84
+ other: "less than {{count}} minutes"
85
+ },
86
+ xMinutes: {
87
+ one: "1 minute",
88
+ other: "{{count}} minutes"
89
+ },
90
+ aboutXHours: {
91
+ one: "about 1 hour",
92
+ other: "about {{count}} hours"
93
+ },
94
+ xHours: {
95
+ one: "1 hour",
96
+ other: "{{count}} hours"
97
+ },
98
+ xDays: {
99
+ one: "1 day",
100
+ other: "{{count}} days"
101
+ },
102
+ aboutXWeeks: {
103
+ one: "about 1 week",
104
+ other: "about {{count}} weeks"
105
+ },
106
+ xWeeks: {
107
+ one: "1 week",
108
+ other: "{{count}} weeks"
109
+ },
110
+ aboutXMonths: {
111
+ one: "about 1 month",
112
+ other: "about {{count}} months"
113
+ },
114
+ xMonths: {
115
+ one: "1 month",
116
+ other: "{{count}} months"
117
+ },
118
+ aboutXYears: {
119
+ one: "about 1 year",
120
+ other: "about {{count}} years"
121
+ },
122
+ xYears: {
123
+ one: "1 year",
124
+ other: "{{count}} years"
125
+ },
126
+ overXYears: {
127
+ one: "over 1 year",
128
+ other: "over {{count}} years"
129
+ },
130
+ almostXYears: {
131
+ one: "almost 1 year",
132
+ other: "almost {{count}} years"
133
+ }
134
+ }, mt = (t, e, n) => {
135
+ let r;
136
+ const a = lt[t];
137
+ return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
138
+ };
139
+ function N(t) {
140
+ return (e = {}) => {
141
+ const n = e.width ? String(e.width) : t.defaultWidth;
142
+ return t.formats[n] || t.formats[t.defaultWidth];
143
+ };
144
+ }
145
+ const ht = {
146
+ full: "EEEE, MMMM do, y",
147
+ long: "MMMM do, y",
148
+ medium: "MMM d, y",
149
+ short: "MM/dd/yyyy"
150
+ }, gt = {
151
+ full: "h:mm:ss a zzzz",
152
+ long: "h:mm:ss a z",
153
+ medium: "h:mm:ss a",
154
+ short: "h:mm a"
155
+ }, wt = {
156
+ full: "{{date}} 'at' {{time}}",
157
+ long: "{{date}} 'at' {{time}}",
158
+ medium: "{{date}}, {{time}}",
159
+ short: "{{date}}, {{time}}"
160
+ }, yt = {
161
+ date: N({
162
+ formats: ht,
163
+ defaultWidth: "full"
164
+ }),
165
+ time: N({
166
+ formats: gt,
167
+ defaultWidth: "full"
168
+ }),
169
+ dateTime: N({
170
+ formats: wt,
171
+ defaultWidth: "full"
172
+ })
173
+ }, bt = {
174
+ lastWeek: "'last' eeee 'at' p",
175
+ yesterday: "'yesterday at' p",
176
+ today: "'today at' p",
177
+ tomorrow: "'tomorrow at' p",
178
+ nextWeek: "eeee 'at' p",
179
+ other: "P"
180
+ }, Dt = (t, e, n, r) => bt[t];
181
+ function T(t) {
182
+ return (e, n) => {
183
+ const r = n != null && n.context ? String(n.context) : "standalone";
184
+ let a;
185
+ if (r === "formatting" && t.formattingValues) {
186
+ const i = t.defaultFormattingWidth || t.defaultWidth, c = n != null && n.width ? String(n.width) : i;
187
+ a = t.formattingValues[c] || t.formattingValues[i];
188
+ } else {
189
+ const i = t.defaultWidth, c = n != null && n.width ? String(n.width) : t.defaultWidth;
190
+ a = t.values[c] || t.values[i];
191
+ }
192
+ const s = t.argumentCallback ? t.argumentCallback(e) : e;
193
+ return a[s];
194
+ };
195
+ }
196
+ const Ot = {
197
+ narrow: ["B", "A"],
198
+ abbreviated: ["BC", "AD"],
199
+ wide: ["Before Christ", "Anno Domini"]
200
+ }, Mt = {
201
+ narrow: ["1", "2", "3", "4"],
202
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
203
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
204
+ }, Tt = {
205
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
206
+ abbreviated: [
207
+ "Jan",
208
+ "Feb",
209
+ "Mar",
210
+ "Apr",
211
+ "May",
212
+ "Jun",
213
+ "Jul",
214
+ "Aug",
215
+ "Sep",
216
+ "Oct",
217
+ "Nov",
218
+ "Dec"
219
+ ],
220
+ wide: [
221
+ "January",
222
+ "February",
223
+ "March",
224
+ "April",
225
+ "May",
226
+ "June",
227
+ "July",
228
+ "August",
229
+ "September",
230
+ "October",
231
+ "November",
232
+ "December"
233
+ ]
234
+ }, Pt = {
235
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
236
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
237
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
238
+ wide: [
239
+ "Sunday",
240
+ "Monday",
241
+ "Tuesday",
242
+ "Wednesday",
243
+ "Thursday",
244
+ "Friday",
245
+ "Saturday"
246
+ ]
247
+ }, pt = {
248
+ narrow: {
249
+ am: "a",
250
+ pm: "p",
251
+ midnight: "mi",
252
+ noon: "n",
253
+ morning: "morning",
254
+ afternoon: "afternoon",
255
+ evening: "evening",
256
+ night: "night"
257
+ },
258
+ abbreviated: {
259
+ am: "AM",
260
+ pm: "PM",
261
+ midnight: "midnight",
262
+ noon: "noon",
263
+ morning: "morning",
264
+ afternoon: "afternoon",
265
+ evening: "evening",
266
+ night: "night"
267
+ },
268
+ wide: {
269
+ am: "a.m.",
270
+ pm: "p.m.",
271
+ midnight: "midnight",
272
+ noon: "noon",
273
+ morning: "morning",
274
+ afternoon: "afternoon",
275
+ evening: "evening",
276
+ night: "night"
277
+ }
278
+ }, xt = {
279
+ narrow: {
280
+ am: "a",
281
+ pm: "p",
282
+ midnight: "mi",
283
+ noon: "n",
284
+ morning: "in the morning",
285
+ afternoon: "in the afternoon",
286
+ evening: "in the evening",
287
+ night: "at night"
288
+ },
289
+ abbreviated: {
290
+ am: "AM",
291
+ pm: "PM",
292
+ midnight: "midnight",
293
+ noon: "noon",
294
+ morning: "in the morning",
295
+ afternoon: "in the afternoon",
296
+ evening: "in the evening",
297
+ night: "at night"
298
+ },
299
+ wide: {
300
+ am: "a.m.",
301
+ pm: "p.m.",
302
+ midnight: "midnight",
303
+ noon: "noon",
304
+ morning: "in the morning",
305
+ afternoon: "in the afternoon",
306
+ evening: "in the evening",
307
+ night: "at night"
308
+ }
309
+ }, kt = (t, e) => {
310
+ const n = Number(t), r = n % 100;
311
+ if (r > 20 || r < 10)
312
+ switch (r % 10) {
313
+ case 1:
314
+ return n + "st";
315
+ case 2:
316
+ return n + "nd";
317
+ case 3:
318
+ return n + "rd";
319
+ }
320
+ return n + "th";
321
+ }, vt = {
322
+ ordinalNumber: kt,
323
+ era: T({
324
+ values: Ot,
325
+ defaultWidth: "wide"
326
+ }),
327
+ quarter: T({
328
+ values: Mt,
329
+ defaultWidth: "wide",
330
+ argumentCallback: (t) => t - 1
331
+ }),
332
+ month: T({
333
+ values: Tt,
334
+ defaultWidth: "wide"
335
+ }),
336
+ day: T({
337
+ values: Pt,
338
+ defaultWidth: "wide"
339
+ }),
340
+ dayPeriod: T({
341
+ values: pt,
342
+ defaultWidth: "wide",
343
+ formattingValues: xt,
344
+ defaultFormattingWidth: "wide"
345
+ })
346
+ };
347
+ function P(t) {
348
+ return (e, n = {}) => {
349
+ const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], s = e.match(a);
350
+ if (!s)
351
+ return null;
352
+ const i = s[0], c = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], o = Array.isArray(c) ? Wt(c, (g) => g.test(i)) : (
353
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
354
+ St(c, (g) => g.test(i))
355
+ );
356
+ let d;
357
+ d = t.valueCallback ? t.valueCallback(o) : o, d = n.valueCallback ? (
358
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
359
+ n.valueCallback(d)
360
+ ) : d;
361
+ const l = e.slice(i.length);
362
+ return { value: d, rest: l };
363
+ };
364
+ }
365
+ function St(t, e) {
366
+ for (const n in t)
367
+ if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
368
+ return n;
369
+ }
370
+ function Wt(t, e) {
371
+ for (let n = 0; n < t.length; n++)
372
+ if (e(t[n]))
373
+ return n;
374
+ }
375
+ function Yt(t) {
376
+ return (e, n = {}) => {
377
+ const r = e.match(t.matchPattern);
378
+ if (!r) return null;
379
+ const a = r[0], s = e.match(t.parsePattern);
380
+ if (!s) return null;
381
+ let i = t.valueCallback ? t.valueCallback(s[0]) : s[0];
382
+ i = n.valueCallback ? n.valueCallback(i) : i;
383
+ const c = e.slice(a.length);
384
+ return { value: i, rest: c };
385
+ };
386
+ }
387
+ const Nt = /^(\d+)(th|st|nd|rd)?/i, Ft = /\d+/i, Ct = {
388
+ narrow: /^(b|a)/i,
389
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
390
+ wide: /^(before christ|before common era|anno domini|common era)/i
391
+ }, Et = {
392
+ any: [/^b/i, /^(a|c)/i]
393
+ }, It = {
394
+ narrow: /^[1234]/i,
395
+ abbreviated: /^q[1234]/i,
396
+ wide: /^[1234](th|st|nd|rd)? quarter/i
397
+ }, Ht = {
398
+ any: [/1/i, /2/i, /3/i, /4/i]
399
+ }, qt = {
400
+ narrow: /^[jfmasond]/i,
401
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
402
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
403
+ }, jt = {
404
+ narrow: [
405
+ /^j/i,
406
+ /^f/i,
407
+ /^m/i,
408
+ /^a/i,
409
+ /^m/i,
410
+ /^j/i,
411
+ /^j/i,
412
+ /^a/i,
413
+ /^s/i,
414
+ /^o/i,
415
+ /^n/i,
416
+ /^d/i
417
+ ],
418
+ any: [
419
+ /^ja/i,
420
+ /^f/i,
421
+ /^mar/i,
422
+ /^ap/i,
423
+ /^may/i,
424
+ /^jun/i,
425
+ /^jul/i,
426
+ /^au/i,
427
+ /^s/i,
428
+ /^o/i,
429
+ /^n/i,
430
+ /^d/i
431
+ ]
432
+ }, Ut = {
433
+ narrow: /^[smtwf]/i,
434
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
435
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
436
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
437
+ }, $t = {
438
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
439
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
440
+ }, Lt = {
441
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
442
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
443
+ }, Rt = {
444
+ any: {
445
+ am: /^a/i,
446
+ pm: /^p/i,
447
+ midnight: /^mi/i,
448
+ noon: /^no/i,
449
+ morning: /morning/i,
450
+ afternoon: /afternoon/i,
451
+ evening: /evening/i,
452
+ night: /night/i
453
+ }
454
+ }, Qt = {
455
+ ordinalNumber: Yt({
456
+ matchPattern: Nt,
457
+ parsePattern: Ft,
458
+ valueCallback: (t) => parseInt(t, 10)
459
+ }),
460
+ era: P({
461
+ matchPatterns: Ct,
462
+ defaultMatchWidth: "wide",
463
+ parsePatterns: Et,
464
+ defaultParseWidth: "any"
465
+ }),
466
+ quarter: P({
467
+ matchPatterns: It,
468
+ defaultMatchWidth: "wide",
469
+ parsePatterns: Ht,
470
+ defaultParseWidth: "any",
471
+ valueCallback: (t) => t + 1
472
+ }),
473
+ month: P({
474
+ matchPatterns: qt,
475
+ defaultMatchWidth: "wide",
476
+ parsePatterns: jt,
477
+ defaultParseWidth: "any"
478
+ }),
479
+ day: P({
480
+ matchPatterns: Ut,
481
+ defaultMatchWidth: "wide",
482
+ parsePatterns: $t,
483
+ defaultParseWidth: "any"
484
+ }),
485
+ dayPeriod: P({
486
+ matchPatterns: Lt,
487
+ defaultMatchWidth: "any",
488
+ parsePatterns: Rt,
489
+ defaultParseWidth: "any"
490
+ })
491
+ }, _t = {
492
+ code: "en-US",
493
+ formatDistance: mt,
494
+ formatLong: yt,
495
+ formatRelative: Dt,
496
+ localize: vt,
497
+ match: Qt,
498
+ options: {
499
+ weekStartsOn: 0,
500
+ firstWeekContainsDate: 1
501
+ }
502
+ };
503
+ function Xt(t) {
504
+ const e = h(t);
505
+ return it(e, ft(e)) + 1;
506
+ }
507
+ function At(t) {
508
+ const e = h(t), n = +v(e) - +ot(e);
509
+ return Math.round(n / _) + 1;
510
+ }
511
+ function G(t, e) {
512
+ var l, g, O, M;
513
+ const n = h(t), r = n.getFullYear(), a = S(), s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((g = (l = e == null ? void 0 : e.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((M = (O = a.locale) == null ? void 0 : O.options) == null ? void 0 : M.firstWeekContainsDate) ?? 1, i = b(t, 0);
514
+ i.setFullYear(r + 1, 0, s), i.setHours(0, 0, 0, 0);
515
+ const c = x(i, e), o = b(t, 0);
516
+ o.setFullYear(r, 0, s), o.setHours(0, 0, 0, 0);
517
+ const d = x(o, e);
518
+ return n.getTime() >= c.getTime() ? r + 1 : n.getTime() >= d.getTime() ? r : r - 1;
519
+ }
520
+ function Bt(t, e) {
521
+ var c, o, d, l;
522
+ const n = S(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((o = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : o.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = G(t, e), s = b(t, 0);
523
+ return s.setFullYear(a, 0, r), s.setHours(0, 0, 0, 0), x(s, e);
524
+ }
525
+ function Vt(t, e) {
526
+ const n = h(t), r = +x(n, e) - +Bt(n, e);
527
+ return Math.round(r / _) + 1;
528
+ }
529
+ function u(t, e) {
530
+ const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
531
+ return n + r;
532
+ }
533
+ const w = {
534
+ // Year
535
+ y(t, e) {
536
+ const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
537
+ return u(e === "yy" ? r % 100 : r, e.length);
538
+ },
539
+ // Month
540
+ M(t, e) {
541
+ const n = t.getMonth();
542
+ return e === "M" ? String(n + 1) : u(n + 1, 2);
543
+ },
544
+ // Day of the month
545
+ d(t, e) {
546
+ return u(t.getDate(), e.length);
547
+ },
548
+ // AM or PM
549
+ a(t, e) {
550
+ const n = t.getHours() / 12 >= 1 ? "pm" : "am";
551
+ switch (e) {
552
+ case "a":
553
+ case "aa":
554
+ return n.toUpperCase();
555
+ case "aaa":
556
+ return n;
557
+ case "aaaaa":
558
+ return n[0];
559
+ case "aaaa":
560
+ default:
561
+ return n === "am" ? "a.m." : "p.m.";
562
+ }
563
+ },
564
+ // Hour [1-12]
565
+ h(t, e) {
566
+ return u(t.getHours() % 12 || 12, e.length);
567
+ },
568
+ // Hour [0-23]
569
+ H(t, e) {
570
+ return u(t.getHours(), e.length);
571
+ },
572
+ // Minute
573
+ m(t, e) {
574
+ return u(t.getMinutes(), e.length);
575
+ },
576
+ // Second
577
+ s(t, e) {
578
+ return u(t.getSeconds(), e.length);
579
+ },
580
+ // Fraction of second
581
+ S(t, e) {
582
+ const n = e.length, r = t.getMilliseconds(), a = Math.trunc(
583
+ r * Math.pow(10, n - 3)
584
+ );
585
+ return u(a, e.length);
586
+ }
587
+ }, D = {
588
+ midnight: "midnight",
589
+ noon: "noon",
590
+ morning: "morning",
591
+ afternoon: "afternoon",
592
+ evening: "evening",
593
+ night: "night"
594
+ }, $ = {
595
+ // Era
596
+ G: function(t, e, n) {
597
+ const r = t.getFullYear() > 0 ? 1 : 0;
598
+ switch (e) {
599
+ case "G":
600
+ case "GG":
601
+ case "GGG":
602
+ return n.era(r, { width: "abbreviated" });
603
+ case "GGGGG":
604
+ return n.era(r, { width: "narrow" });
605
+ case "GGGG":
606
+ default:
607
+ return n.era(r, { width: "wide" });
608
+ }
609
+ },
610
+ // Year
611
+ y: function(t, e, n) {
612
+ if (e === "yo") {
613
+ const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
614
+ return n.ordinalNumber(a, { unit: "year" });
615
+ }
616
+ return w.y(t, e);
617
+ },
618
+ // Local week-numbering year
619
+ Y: function(t, e, n, r) {
620
+ const a = G(t, r), s = a > 0 ? a : 1 - a;
621
+ if (e === "YY") {
622
+ const i = s % 100;
623
+ return u(i, 2);
624
+ }
625
+ return e === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : u(s, e.length);
626
+ },
627
+ // ISO week-numbering year
628
+ R: function(t, e) {
629
+ const n = V(t);
630
+ return u(n, e.length);
631
+ },
632
+ // Extended year. This is a single number designating the year of this calendar system.
633
+ // The main difference between `y` and `u` localizers are B.C. years:
634
+ // | Year | `y` | `u` |
635
+ // |------|-----|-----|
636
+ // | AC 1 | 1 | 1 |
637
+ // | BC 1 | 1 | 0 |
638
+ // | BC 2 | 2 | -1 |
639
+ // Also `yy` always returns the last two digits of a year,
640
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
641
+ u: function(t, e) {
642
+ const n = t.getFullYear();
643
+ return u(n, e.length);
644
+ },
645
+ // Quarter
646
+ Q: function(t, e, n) {
647
+ const r = Math.ceil((t.getMonth() + 1) / 3);
648
+ switch (e) {
649
+ case "Q":
650
+ return String(r);
651
+ case "QQ":
652
+ return u(r, 2);
653
+ case "Qo":
654
+ return n.ordinalNumber(r, { unit: "quarter" });
655
+ case "QQQ":
656
+ return n.quarter(r, {
657
+ width: "abbreviated",
658
+ context: "formatting"
659
+ });
660
+ case "QQQQQ":
661
+ return n.quarter(r, {
662
+ width: "narrow",
663
+ context: "formatting"
664
+ });
665
+ case "QQQQ":
666
+ default:
667
+ return n.quarter(r, {
668
+ width: "wide",
669
+ context: "formatting"
670
+ });
671
+ }
672
+ },
673
+ // Stand-alone quarter
674
+ q: function(t, e, n) {
675
+ const r = Math.ceil((t.getMonth() + 1) / 3);
676
+ switch (e) {
677
+ case "q":
678
+ return String(r);
679
+ case "qq":
680
+ return u(r, 2);
681
+ case "qo":
682
+ return n.ordinalNumber(r, { unit: "quarter" });
683
+ case "qqq":
684
+ return n.quarter(r, {
685
+ width: "abbreviated",
686
+ context: "standalone"
687
+ });
688
+ case "qqqqq":
689
+ return n.quarter(r, {
690
+ width: "narrow",
691
+ context: "standalone"
692
+ });
693
+ case "qqqq":
694
+ default:
695
+ return n.quarter(r, {
696
+ width: "wide",
697
+ context: "standalone"
698
+ });
699
+ }
700
+ },
701
+ // Month
702
+ M: function(t, e, n) {
703
+ const r = t.getMonth();
704
+ switch (e) {
705
+ case "M":
706
+ case "MM":
707
+ return w.M(t, e);
708
+ case "Mo":
709
+ return n.ordinalNumber(r + 1, { unit: "month" });
710
+ case "MMM":
711
+ return n.month(r, {
712
+ width: "abbreviated",
713
+ context: "formatting"
714
+ });
715
+ case "MMMMM":
716
+ return n.month(r, {
717
+ width: "narrow",
718
+ context: "formatting"
719
+ });
720
+ case "MMMM":
721
+ default:
722
+ return n.month(r, { width: "wide", context: "formatting" });
723
+ }
724
+ },
725
+ // Stand-alone month
726
+ L: function(t, e, n) {
727
+ const r = t.getMonth();
728
+ switch (e) {
729
+ case "L":
730
+ return String(r + 1);
731
+ case "LL":
732
+ return u(r + 1, 2);
733
+ case "Lo":
734
+ return n.ordinalNumber(r + 1, { unit: "month" });
735
+ case "LLL":
736
+ return n.month(r, {
737
+ width: "abbreviated",
738
+ context: "standalone"
739
+ });
740
+ case "LLLLL":
741
+ return n.month(r, {
742
+ width: "narrow",
743
+ context: "standalone"
744
+ });
745
+ case "LLLL":
746
+ default:
747
+ return n.month(r, { width: "wide", context: "standalone" });
748
+ }
749
+ },
750
+ // Local week of year
751
+ w: function(t, e, n, r) {
752
+ const a = Vt(t, r);
753
+ return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : u(a, e.length);
754
+ },
755
+ // ISO week of year
756
+ I: function(t, e, n) {
757
+ const r = At(t);
758
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : u(r, e.length);
759
+ },
760
+ // Day of the month
761
+ d: function(t, e, n) {
762
+ return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : w.d(t, e);
763
+ },
764
+ // Day of year
765
+ D: function(t, e, n) {
766
+ const r = Xt(t);
767
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : u(r, e.length);
768
+ },
769
+ // Day of week
770
+ E: function(t, e, n) {
771
+ const r = t.getDay();
772
+ switch (e) {
773
+ case "E":
774
+ case "EE":
775
+ case "EEE":
776
+ return n.day(r, {
777
+ width: "abbreviated",
778
+ context: "formatting"
779
+ });
780
+ case "EEEEE":
781
+ return n.day(r, {
782
+ width: "narrow",
783
+ context: "formatting"
784
+ });
785
+ case "EEEEEE":
786
+ return n.day(r, {
787
+ width: "short",
788
+ context: "formatting"
789
+ });
790
+ case "EEEE":
791
+ default:
792
+ return n.day(r, {
793
+ width: "wide",
794
+ context: "formatting"
795
+ });
796
+ }
797
+ },
798
+ // Local day of week
799
+ e: function(t, e, n, r) {
800
+ const a = t.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
801
+ switch (e) {
802
+ case "e":
803
+ return String(s);
804
+ case "ee":
805
+ return u(s, 2);
806
+ case "eo":
807
+ return n.ordinalNumber(s, { unit: "day" });
808
+ case "eee":
809
+ return n.day(a, {
810
+ width: "abbreviated",
811
+ context: "formatting"
812
+ });
813
+ case "eeeee":
814
+ return n.day(a, {
815
+ width: "narrow",
816
+ context: "formatting"
817
+ });
818
+ case "eeeeee":
819
+ return n.day(a, {
820
+ width: "short",
821
+ context: "formatting"
822
+ });
823
+ case "eeee":
824
+ default:
825
+ return n.day(a, {
826
+ width: "wide",
827
+ context: "formatting"
828
+ });
829
+ }
830
+ },
831
+ // Stand-alone local day of week
832
+ c: function(t, e, n, r) {
833
+ const a = t.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
834
+ switch (e) {
835
+ case "c":
836
+ return String(s);
837
+ case "cc":
838
+ return u(s, e.length);
839
+ case "co":
840
+ return n.ordinalNumber(s, { unit: "day" });
841
+ case "ccc":
842
+ return n.day(a, {
843
+ width: "abbreviated",
844
+ context: "standalone"
845
+ });
846
+ case "ccccc":
847
+ return n.day(a, {
848
+ width: "narrow",
849
+ context: "standalone"
850
+ });
851
+ case "cccccc":
852
+ return n.day(a, {
853
+ width: "short",
854
+ context: "standalone"
855
+ });
856
+ case "cccc":
857
+ default:
858
+ return n.day(a, {
859
+ width: "wide",
860
+ context: "standalone"
861
+ });
862
+ }
863
+ },
864
+ // ISO day of week
865
+ i: function(t, e, n) {
866
+ const r = t.getDay(), a = r === 0 ? 7 : r;
867
+ switch (e) {
868
+ case "i":
869
+ return String(a);
870
+ case "ii":
871
+ return u(a, e.length);
872
+ case "io":
873
+ return n.ordinalNumber(a, { unit: "day" });
874
+ case "iii":
875
+ return n.day(r, {
876
+ width: "abbreviated",
877
+ context: "formatting"
878
+ });
879
+ case "iiiii":
880
+ return n.day(r, {
881
+ width: "narrow",
882
+ context: "formatting"
883
+ });
884
+ case "iiiiii":
885
+ return n.day(r, {
886
+ width: "short",
887
+ context: "formatting"
888
+ });
889
+ case "iiii":
890
+ default:
891
+ return n.day(r, {
892
+ width: "wide",
893
+ context: "formatting"
894
+ });
895
+ }
896
+ },
897
+ // AM or PM
898
+ a: function(t, e, n) {
899
+ const a = t.getHours() / 12 >= 1 ? "pm" : "am";
900
+ switch (e) {
901
+ case "a":
902
+ case "aa":
903
+ return n.dayPeriod(a, {
904
+ width: "abbreviated",
905
+ context: "formatting"
906
+ });
907
+ case "aaa":
908
+ return n.dayPeriod(a, {
909
+ width: "abbreviated",
910
+ context: "formatting"
911
+ }).toLowerCase();
912
+ case "aaaaa":
913
+ return n.dayPeriod(a, {
914
+ width: "narrow",
915
+ context: "formatting"
916
+ });
917
+ case "aaaa":
918
+ default:
919
+ return n.dayPeriod(a, {
920
+ width: "wide",
921
+ context: "formatting"
922
+ });
923
+ }
924
+ },
925
+ // AM, PM, midnight, noon
926
+ b: function(t, e, n) {
927
+ const r = t.getHours();
928
+ let a;
929
+ switch (r === 12 ? a = D.noon : r === 0 ? a = D.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
930
+ case "b":
931
+ case "bb":
932
+ return n.dayPeriod(a, {
933
+ width: "abbreviated",
934
+ context: "formatting"
935
+ });
936
+ case "bbb":
937
+ return n.dayPeriod(a, {
938
+ width: "abbreviated",
939
+ context: "formatting"
940
+ }).toLowerCase();
941
+ case "bbbbb":
942
+ return n.dayPeriod(a, {
943
+ width: "narrow",
944
+ context: "formatting"
945
+ });
946
+ case "bbbb":
947
+ default:
948
+ return n.dayPeriod(a, {
949
+ width: "wide",
950
+ context: "formatting"
951
+ });
952
+ }
953
+ },
954
+ // in the morning, in the afternoon, in the evening, at night
955
+ B: function(t, e, n) {
956
+ const r = t.getHours();
957
+ let a;
958
+ switch (r >= 17 ? a = D.evening : r >= 12 ? a = D.afternoon : r >= 4 ? a = D.morning : a = D.night, e) {
959
+ case "B":
960
+ case "BB":
961
+ case "BBB":
962
+ return n.dayPeriod(a, {
963
+ width: "abbreviated",
964
+ context: "formatting"
965
+ });
966
+ case "BBBBB":
967
+ return n.dayPeriod(a, {
968
+ width: "narrow",
969
+ context: "formatting"
970
+ });
971
+ case "BBBB":
972
+ default:
973
+ return n.dayPeriod(a, {
974
+ width: "wide",
975
+ context: "formatting"
976
+ });
977
+ }
978
+ },
979
+ // Hour [1-12]
980
+ h: function(t, e, n) {
981
+ if (e === "ho") {
982
+ let r = t.getHours() % 12;
983
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
984
+ }
985
+ return w.h(t, e);
986
+ },
987
+ // Hour [0-23]
988
+ H: function(t, e, n) {
989
+ return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : w.H(t, e);
990
+ },
991
+ // Hour [0-11]
992
+ K: function(t, e, n) {
993
+ const r = t.getHours() % 12;
994
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, e.length);
995
+ },
996
+ // Hour [1-24]
997
+ k: function(t, e, n) {
998
+ let r = t.getHours();
999
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(r, e.length);
1000
+ },
1001
+ // Minute
1002
+ m: function(t, e, n) {
1003
+ return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : w.m(t, e);
1004
+ },
1005
+ // Second
1006
+ s: function(t, e, n) {
1007
+ return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : w.s(t, e);
1008
+ },
1009
+ // Fraction of second
1010
+ S: function(t, e) {
1011
+ return w.S(t, e);
1012
+ },
1013
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1014
+ X: function(t, e, n) {
1015
+ const r = t.getTimezoneOffset();
1016
+ if (r === 0)
1017
+ return "Z";
1018
+ switch (e) {
1019
+ case "X":
1020
+ return R(r);
1021
+ case "XXXX":
1022
+ case "XX":
1023
+ return y(r);
1024
+ case "XXXXX":
1025
+ case "XXX":
1026
+ default:
1027
+ return y(r, ":");
1028
+ }
1029
+ },
1030
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1031
+ x: function(t, e, n) {
1032
+ const r = t.getTimezoneOffset();
1033
+ switch (e) {
1034
+ case "x":
1035
+ return R(r);
1036
+ case "xxxx":
1037
+ case "xx":
1038
+ return y(r);
1039
+ case "xxxxx":
1040
+ case "xxx":
1041
+ default:
1042
+ return y(r, ":");
1043
+ }
1044
+ },
1045
+ // Timezone (GMT)
1046
+ O: function(t, e, n) {
1047
+ const r = t.getTimezoneOffset();
1048
+ switch (e) {
1049
+ case "O":
1050
+ case "OO":
1051
+ case "OOO":
1052
+ return "GMT" + L(r, ":");
1053
+ case "OOOO":
1054
+ default:
1055
+ return "GMT" + y(r, ":");
1056
+ }
1057
+ },
1058
+ // Timezone (specific non-location)
1059
+ z: function(t, e, n) {
1060
+ const r = t.getTimezoneOffset();
1061
+ switch (e) {
1062
+ case "z":
1063
+ case "zz":
1064
+ case "zzz":
1065
+ return "GMT" + L(r, ":");
1066
+ case "zzzz":
1067
+ default:
1068
+ return "GMT" + y(r, ":");
1069
+ }
1070
+ },
1071
+ // Seconds timestamp
1072
+ t: function(t, e, n) {
1073
+ const r = Math.trunc(t.getTime() / 1e3);
1074
+ return u(r, e.length);
1075
+ },
1076
+ // Milliseconds timestamp
1077
+ T: function(t, e, n) {
1078
+ const r = t.getTime();
1079
+ return u(r, e.length);
1080
+ }
1081
+ };
1082
+ function L(t, e = "") {
1083
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), s = r % 60;
1084
+ return s === 0 ? n + String(a) : n + String(a) + e + u(s, 2);
1085
+ }
1086
+ function R(t, e) {
1087
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + u(Math.abs(t) / 60, 2) : y(t, e);
1088
+ }
1089
+ function y(t, e = "") {
1090
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), a = u(Math.trunc(r / 60), 2), s = u(r % 60, 2);
1091
+ return n + a + e + s;
1092
+ }
1093
+ const Q = (t, e) => {
1094
+ switch (t) {
1095
+ case "P":
1096
+ return e.date({ width: "short" });
1097
+ case "PP":
1098
+ return e.date({ width: "medium" });
1099
+ case "PPP":
1100
+ return e.date({ width: "long" });
1101
+ case "PPPP":
1102
+ default:
1103
+ return e.date({ width: "full" });
1104
+ }
1105
+ }, J = (t, e) => {
1106
+ switch (t) {
1107
+ case "p":
1108
+ return e.time({ width: "short" });
1109
+ case "pp":
1110
+ return e.time({ width: "medium" });
1111
+ case "ppp":
1112
+ return e.time({ width: "long" });
1113
+ case "pppp":
1114
+ default:
1115
+ return e.time({ width: "full" });
1116
+ }
1117
+ }, Gt = (t, e) => {
1118
+ const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1119
+ if (!a)
1120
+ return Q(t, e);
1121
+ let s;
1122
+ switch (r) {
1123
+ case "P":
1124
+ s = e.dateTime({ width: "short" });
1125
+ break;
1126
+ case "PP":
1127
+ s = e.dateTime({ width: "medium" });
1128
+ break;
1129
+ case "PPP":
1130
+ s = e.dateTime({ width: "long" });
1131
+ break;
1132
+ case "PPPP":
1133
+ default:
1134
+ s = e.dateTime({ width: "full" });
1135
+ break;
1136
+ }
1137
+ return s.replace("{{date}}", Q(r, e)).replace("{{time}}", J(a, e));
1138
+ }, Jt = {
1139
+ p: J,
1140
+ P: Gt
1141
+ }, zt = /^D+$/, Zt = /^Y+$/, Kt = ["D", "DD", "YY", "YYYY"];
1142
+ function te(t) {
1143
+ return zt.test(t);
1144
+ }
1145
+ function ee(t) {
1146
+ return Zt.test(t);
1147
+ }
1148
+ function ne(t, e, n) {
1149
+ const r = re(t, e, n);
1150
+ if (console.warn(r), Kt.includes(t)) throw new RangeError(r);
1151
+ }
1152
+ function re(t, e, n) {
1153
+ const r = t[0] === "Y" ? "years" : "days of the month";
1154
+ return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1155
+ }
1156
+ const ae = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, se = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ie = /^'([^]*?)'?$/, oe = /''/g, ue = /[a-zA-Z]/;
1157
+ function z(t, e, n) {
1158
+ var l, g, O, M, E, I, H, q;
1159
+ const r = S(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? _t, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((g = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : g.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((M = (O = r.locale) == null ? void 0 : O.options) == null ? void 0 : M.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((I = (E = n == null ? void 0 : n.locale) == null ? void 0 : E.options) == null ? void 0 : I.weekStartsOn) ?? r.weekStartsOn ?? ((q = (H = r.locale) == null ? void 0 : H.options) == null ? void 0 : q.weekStartsOn) ?? 0, c = h(t);
1160
+ if (!ct(c))
1161
+ throw new RangeError("Invalid time value");
1162
+ let o = e.match(se).map((m) => {
1163
+ const f = m[0];
1164
+ if (f === "p" || f === "P") {
1165
+ const Y = Jt[f];
1166
+ return Y(m, a.formatLong);
1167
+ }
1168
+ return m;
1169
+ }).join("").match(ae).map((m) => {
1170
+ if (m === "''")
1171
+ return { isToken: !1, value: "'" };
1172
+ const f = m[0];
1173
+ if (f === "'")
1174
+ return { isToken: !1, value: ce(m) };
1175
+ if ($[f])
1176
+ return { isToken: !0, value: m };
1177
+ if (f.match(ue))
1178
+ throw new RangeError(
1179
+ "Format string contains an unescaped latin alphabet character `" + f + "`"
1180
+ );
1181
+ return { isToken: !1, value: m };
1182
+ });
1183
+ a.localize.preprocessor && (o = a.localize.preprocessor(c, o));
1184
+ const d = {
1185
+ firstWeekContainsDate: s,
1186
+ weekStartsOn: i,
1187
+ locale: a
1188
+ };
1189
+ return o.map((m) => {
1190
+ if (!m.isToken) return m.value;
1191
+ const f = m.value;
1192
+ (!(n != null && n.useAdditionalWeekYearTokens) && ee(f) || !(n != null && n.useAdditionalDayOfYearTokens) && te(f)) && ne(f, e, String(t));
1193
+ const Y = $[f[0]];
1194
+ return Y(c, f, a.localize, d);
1195
+ }).join("");
1196
+ }
1197
+ function ce(t) {
1198
+ const e = t.match(ie);
1199
+ return e ? e[1].replace(oe, "'") : t;
1200
+ }
1201
+ function W(t, e) {
1202
+ const r = me(t);
1203
+ let a;
1204
+ if (r.date) {
1205
+ const o = he(r.date, 2);
1206
+ a = ge(o.restDateString, o.year);
1207
+ }
1208
+ if (!a || isNaN(a.getTime()))
1209
+ return /* @__PURE__ */ new Date(NaN);
1210
+ const s = a.getTime();
1211
+ let i = 0, c;
1212
+ if (r.time && (i = we(r.time), isNaN(i)))
1213
+ return /* @__PURE__ */ new Date(NaN);
1214
+ if (r.timezone) {
1215
+ if (c = ye(r.timezone), isNaN(c))
1216
+ return /* @__PURE__ */ new Date(NaN);
1217
+ } else {
1218
+ const o = new Date(s + i), d = /* @__PURE__ */ new Date(0);
1219
+ return d.setFullYear(
1220
+ o.getUTCFullYear(),
1221
+ o.getUTCMonth(),
1222
+ o.getUTCDate()
1223
+ ), d.setHours(
1224
+ o.getUTCHours(),
1225
+ o.getUTCMinutes(),
1226
+ o.getUTCSeconds(),
1227
+ o.getUTCMilliseconds()
1228
+ ), d;
1229
+ }
1230
+ return new Date(s + i + c);
1231
+ }
1232
+ const k = {
1233
+ dateTimeDelimiter: /[T ]/,
1234
+ timeZoneDelimiter: /[Z ]/i,
1235
+ timezone: /([Z+-].*)$/
1236
+ }, de = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, fe = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, le = /^([+-])(\d{2})(?::?(\d{2}))?$/;
1237
+ function me(t) {
1238
+ const e = {}, n = t.split(k.dateTimeDelimiter);
1239
+ let r;
1240
+ if (n.length > 2)
1241
+ return e;
1242
+ if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1], k.timeZoneDelimiter.test(e.date) && (e.date = t.split(k.timeZoneDelimiter)[0], r = t.substr(
1243
+ e.date.length,
1244
+ t.length
1245
+ ))), r) {
1246
+ const a = k.timezone.exec(r);
1247
+ a ? (e.time = r.replace(a[1], ""), e.timezone = a[1]) : e.time = r;
1248
+ }
1249
+ return e;
1250
+ }
1251
+ function he(t, e) {
1252
+ const n = new RegExp(
1253
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
1254
+ ), r = t.match(n);
1255
+ if (!r) return { year: NaN, restDateString: "" };
1256
+ const a = r[1] ? parseInt(r[1]) : null, s = r[2] ? parseInt(r[2]) : null;
1257
+ return {
1258
+ year: s === null ? a : s * 100,
1259
+ restDateString: t.slice((r[1] || r[2]).length)
1260
+ };
1261
+ }
1262
+ function ge(t, e) {
1263
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
1264
+ const n = t.match(de);
1265
+ if (!n) return /* @__PURE__ */ new Date(NaN);
1266
+ const r = !!n[4], a = p(n[1]), s = p(n[2]) - 1, i = p(n[3]), c = p(n[4]), o = p(n[5]) - 1;
1267
+ if (r)
1268
+ return Te(e, c, o) ? be(e, c, o) : /* @__PURE__ */ new Date(NaN);
1269
+ {
1270
+ const d = /* @__PURE__ */ new Date(0);
1271
+ return !Oe(e, s, i) || !Me(e, a) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(e, s, Math.max(a, i)), d);
1272
+ }
1273
+ }
1274
+ function p(t) {
1275
+ return t ? parseInt(t) : 1;
1276
+ }
1277
+ function we(t) {
1278
+ const e = t.match(fe);
1279
+ if (!e) return NaN;
1280
+ const n = F(e[1]), r = F(e[2]), a = F(e[3]);
1281
+ return Pe(n, r, a) ? n * A + r * X + a * 1e3 : NaN;
1282
+ }
1283
+ function F(t) {
1284
+ return t && parseFloat(t.replace(",", ".")) || 0;
1285
+ }
1286
+ function ye(t) {
1287
+ if (t === "Z") return 0;
1288
+ const e = t.match(le);
1289
+ if (!e) return 0;
1290
+ const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
1291
+ return pe(r, a) ? n * (r * A + a * X) : NaN;
1292
+ }
1293
+ function be(t, e, n) {
1294
+ const r = /* @__PURE__ */ new Date(0);
1295
+ r.setUTCFullYear(t, 0, 4);
1296
+ const a = r.getUTCDay() || 7, s = (e - 1) * 7 + n + 1 - a;
1297
+ return r.setUTCDate(r.getUTCDate() + s), r;
1298
+ }
1299
+ const De = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1300
+ function Z(t) {
1301
+ return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
1302
+ }
1303
+ function Oe(t, e, n) {
1304
+ return e >= 0 && e <= 11 && n >= 1 && n <= (De[e] || (Z(t) ? 29 : 28));
1305
+ }
1306
+ function Me(t, e) {
1307
+ return e >= 1 && e <= (Z(t) ? 366 : 365);
1308
+ }
1309
+ function Te(t, e, n) {
1310
+ return e >= 1 && e <= 53 && n >= 0 && n <= 6;
1311
+ }
1312
+ function Pe(t, e, n) {
1313
+ return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
1314
+ }
1315
+ function pe(t, e) {
1316
+ return e >= 0 && e <= 59;
1317
+ }
1318
+ const C = (t) => t == null ? !0 : !(typeof t == "object" || typeof t == "function"), xe = (t) => {
1319
+ C(t) || Object.keys(t).forEach((e) => {
1320
+ const n = t[e];
1321
+ if (C(n)) return;
1322
+ const r = Object.keys(n);
1323
+ r.includes("id") && r.length === 1 && n.id === null ? t[e] = null : xe(n);
1324
+ });
1325
+ }, ke = (t) => Object.values(t).every((e) => e === null), Ie = (t) => {
1326
+ const e = {};
1327
+ return Object.entries(t).forEach(([n, r]) => {
1328
+ r && typeof r == "object" && ke(r) ? e[n] = null : e[n] = r;
1329
+ }), e;
1330
+ }, K = (t) => t && t.errorFields && t.errorFields.length > 0 ? t.errorFields.map((e) => ({
1331
+ name: e.name.split(".").map((r) => `${r.charAt(0).toLowerCase()}${r.slice(1)}`).join("."),
1332
+ errors: e.errors
1333
+ })) : [], He = async (t) => {
1334
+ if (t.type == null || !t.type.includes("json"))
1335
+ return [];
1336
+ try {
1337
+ const e = await t.text(), n = JSON.parse(e);
1338
+ return K(n);
1339
+ } catch (e) {
1340
+ return console.error("Error parsing blob response:", e), [];
1341
+ }
1342
+ }, qe = (t, e) => {
1343
+ K(e.response.data).forEach((r) => {
1344
+ t.setError(r.name, {
1345
+ message: r.errors,
1346
+ type: "server"
1347
+ }, {
1348
+ shouldFocus: !0
1349
+ }), C(t.getValues(r.name)) || t.setError(`${r.name}.id`, {
1350
+ message: r.errors,
1351
+ type: "server"
1352
+ }, {
1353
+ shouldFocus: !0
1354
+ });
1355
+ });
1356
+ }, je = (t) => {
1357
+ var n;
1358
+ const e = (n = t.response) == null ? void 0 : n.data;
1359
+ return e != null && e.permissions && e.permissions.length > 0 ? e.permissions : null;
1360
+ }, Ue = (t) => t.length < 300 ? t : t.substring(0, 300) + "...", $e = (t) => t < 1024 ? `${t.toFixed(2)} bytes` : t >= 1024 && t < 1048576 ? `${(t / 1024).toFixed(1)} kB` : `${(t / 1048576).toFixed(1)} MB`;
1361
+ function ve(t = " ", ...e) {
1362
+ return e.filter((n) => n != null && n.length > 0).join(t);
1363
+ }
1364
+ const Le = (t, e) => t.map((n) => `&${e}=${n}`).join("").substring(1), Re = (t, e) => t === null ? null : t.length <= e ? t : t.slice(0, e) + "…";
1365
+ function Qe(t) {
1366
+ return t == null ? "" : z(W(t), "dd.MM.yyyy");
1367
+ }
1368
+ function Se(t) {
1369
+ return (t == null ? void 0 : t.toString().split("T")[0]) ?? "";
1370
+ }
1371
+ function _e(t) {
1372
+ return t == null ? "" : z(W(t), "dd.MM.yyyy HH:mm");
1373
+ }
1374
+ function Xe(t) {
1375
+ return t && t.charAt(0).toUpperCase() + t.slice(1);
1376
+ }
1377
+ const Ae = (t, e) => ve(" ", t ? `${t},` : void 0, e), Be = (t, e) => `${e}${t != null ? ` (${t})` : ""}`, Ve = (t, e) => `[${t ?? ""}] ${e ?? ""}`, Ge = (t) => decodeURIComponent(atob(t).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")), We = (t) => {
1378
+ const e = W(t);
1379
+ return !Number.isNaN(e.getTime());
1380
+ }, Je = (t) => {
1381
+ if (!We(t))
1382
+ return !1;
1383
+ const n = W(t).getUTCFullYear();
1384
+ return n >= 1900 && n <= 2100;
1385
+ };
1386
+ function ze() {
1387
+ const t = /* @__PURE__ */ new Date(), e = new Date(t);
1388
+ return e.setHours(24, 0, 0, 0), e.getTime() - t.getTime();
1389
+ }
1390
+ function Ze(t) {
1391
+ return t instanceof Date && !Number.isNaN(t.getTime());
1392
+ }
1393
+ function Ke(t, e) {
1394
+ const n = new Date(t), r = new Date(e);
1395
+ return n.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0), n.getTime() - r.getTime();
1396
+ }
1397
+ function tn(t, e) {
1398
+ const n = new Date(t), r = new Date(e);
1399
+ return n.getTime() - r.getTime();
1400
+ }
1401
+ function en(t = Date.now(), e = Date.now()) {
1402
+ const n = new Date(t), r = new Date(e);
1403
+ n.setHours(10, 0, 0, 0), r.setHours(0, 0, 0, 0);
1404
+ const a = n.getTime() - r.getTime();
1405
+ return Math.floor(a / (1e3 * 3600 * 24));
1406
+ }
1407
+ function Ye(t = /* @__PURE__ */ new Date()) {
1408
+ const e = new Date(t);
1409
+ return e.setUTCDate(1), e;
1410
+ }
1411
+ function Ne(t = /* @__PURE__ */ new Date()) {
1412
+ return dt(t);
1413
+ }
1414
+ function nn(t) {
1415
+ const e = /* @__PURE__ */ new Date();
1416
+ return e.setUTCMonth(e.getUTCMonth() + t), Ye(e);
1417
+ }
1418
+ function rn(t) {
1419
+ const e = /* @__PURE__ */ new Date();
1420
+ return e.setUTCMonth(e.getUTCMonth() + t), Ne(e);
1421
+ }
1422
+ function an(t) {
1423
+ const e = t ?? (/* @__PURE__ */ new Date()).getFullYear(), n = new Date(e, 0, 1);
1424
+ return n.setMinutes(n.getMinutes() - n.getTimezoneOffset()), n;
1425
+ }
1426
+ function sn(t) {
1427
+ const e = t ?? (/* @__PURE__ */ new Date()).getFullYear(), n = new Date(e, 11, 31);
1428
+ return n.setMinutes(n.getMinutes() - n.getTimezoneOffset()), n;
1429
+ }
1430
+ function on(t) {
1431
+ return Se(t.toISOString());
1432
+ }
1433
+ export {
1434
+ Re as $,
1435
+ K as A,
1436
+ xe as B,
1437
+ _e as C,
1438
+ j as D,
1439
+ ze as E,
1440
+ Je as F,
1441
+ Ue as G,
1442
+ He as H,
1443
+ je as I,
1444
+ We as J,
1445
+ Ze as K,
1446
+ Ke as L,
1447
+ tn as M,
1448
+ en as N,
1449
+ Ne as O,
1450
+ nn as P,
1451
+ rn as Q,
1452
+ sn as R,
1453
+ on as S,
1454
+ C as T,
1455
+ ke as U,
1456
+ Ie as V,
1457
+ Xe as W,
1458
+ Ae as X,
1459
+ Be as Y,
1460
+ Ve as Z,
1461
+ Ge as _,
1462
+ A as a,
1463
+ X as b,
1464
+ b as c,
1465
+ it as d,
1466
+ u as e,
1467
+ Fe as f,
1468
+ U as g,
1469
+ nt as h,
1470
+ B as i,
1471
+ Ce as j,
1472
+ at as k,
1473
+ Ee as l,
1474
+ _ as m,
1475
+ rt as n,
1476
+ ve as o,
1477
+ Se as p,
1478
+ qe as q,
1479
+ $e as r,
1480
+ x as s,
1481
+ h as t,
1482
+ Le as u,
1483
+ W as v,
1484
+ z as w,
1485
+ Qe as x,
1486
+ Ye as y,
1487
+ an as z
1488
+ };