@everymatrix/casino-challenge-details 0.8.12 → 0.8.13

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 (30) hide show
  1. package/dist/casino-challenge-details/casino-challenge-details-4e26ab78.js +7 -0
  2. package/dist/casino-challenge-details/casino-challenge-details_4.entry.js +1 -1
  3. package/dist/casino-challenge-details/index.esm.js +1 -1
  4. package/dist/cjs/{casino-challenge-details-ec73864c.js → casino-challenge-details-63ae2c71.js} +2209 -15
  5. package/dist/cjs/casino-challenge-details_4.cjs.entry.js +5 -5
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/collection/assets/reward-gift.svg +123 -0
  8. package/dist/collection/components/casino-challenge-details/casino-challenge-details.css +6 -4
  9. package/dist/collection/components/casino-challenge-details/casino-challenge-details.js +11 -8
  10. package/dist/collection/components/components/casino-challenge-progress-bar.css +1 -0
  11. package/dist/collection/components/components/casino-challenge-progress-bar.js +3 -3
  12. package/dist/collection/utils/utils.js +2 -6
  13. package/dist/esm/{casino-challenge-details-9f39552b.js → casino-challenge-details-4e26ab78.js} +2209 -15
  14. package/dist/esm/casino-challenge-details_4.entry.js +6 -6
  15. package/dist/esm/index.js +1 -1
  16. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/stencil.config.d.ts +2 -0
  17. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/stencil.config.dev.d.ts +2 -0
  18. package/package.json +1 -1
  19. package/dist/casino-challenge-details/casino-challenge-details-9f39552b.js +0 -7
  20. package/dist/collection/assets/finish.svg +0 -7
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/stencil.config.d.ts +0 -2
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/stencil.config.dev.d.ts +0 -2
  23. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  24. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/storybook/main.d.ts +0 -0
  25. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/packages/stencil/casino-challenge-details/storybook/preview.d.ts +0 -0
  26. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/tools/plugins/index.d.ts +0 -0
  27. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +0 -0
  28. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  29. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  30. /package/dist/types/{Users/adrian.pripon/Documents/Work → builds/emfe-widgets}/widgets-monorepo/packages/stencil/casino-challenge-details/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -266,6 +266,2202 @@ const resolveTranslationUrl = async (translationUrl) => {
266
266
  }
267
267
  };
268
268
 
269
+ function _typeof(o) {
270
+ "@babel/helpers - typeof";
271
+
272
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
273
+ return typeof o;
274
+ } : function (o) {
275
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
276
+ }, _typeof(o);
277
+ }
278
+
279
+ function toInteger(dirtyNumber) {
280
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
281
+ return NaN;
282
+ }
283
+ var number = Number(dirtyNumber);
284
+ if (isNaN(number)) {
285
+ return number;
286
+ }
287
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
288
+ }
289
+
290
+ function requiredArgs(required, args) {
291
+ if (args.length < required) {
292
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
293
+ }
294
+ }
295
+
296
+ /**
297
+ * @name toDate
298
+ * @category Common Helpers
299
+ * @summary Convert the given argument to an instance of Date.
300
+ *
301
+ * @description
302
+ * Convert the given argument to an instance of Date.
303
+ *
304
+ * If the argument is an instance of Date, the function returns its clone.
305
+ *
306
+ * If the argument is a number, it is treated as a timestamp.
307
+ *
308
+ * If the argument is none of the above, the function returns Invalid Date.
309
+ *
310
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
311
+ *
312
+ * @param {Date|Number} argument - the value to convert
313
+ * @returns {Date} the parsed date in the local time zone
314
+ * @throws {TypeError} 1 argument required
315
+ *
316
+ * @example
317
+ * // Clone the date:
318
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
319
+ * //=> Tue Feb 11 2014 11:30:30
320
+ *
321
+ * @example
322
+ * // Convert the timestamp to date:
323
+ * const result = toDate(1392098430000)
324
+ * //=> Tue Feb 11 2014 11:30:30
325
+ */
326
+ function toDate(argument) {
327
+ requiredArgs(1, arguments);
328
+ var argStr = Object.prototype.toString.call(argument);
329
+
330
+ // Clone the date
331
+ if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
332
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
333
+ return new Date(argument.getTime());
334
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
335
+ return new Date(argument);
336
+ } else {
337
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
338
+ // eslint-disable-next-line no-console
339
+ 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");
340
+ // eslint-disable-next-line no-console
341
+ console.warn(new Error().stack);
342
+ }
343
+ return new Date(NaN);
344
+ }
345
+ }
346
+
347
+ /**
348
+ * @name addMilliseconds
349
+ * @category Millisecond Helpers
350
+ * @summary Add the specified number of milliseconds to the given date.
351
+ *
352
+ * @description
353
+ * Add the specified number of milliseconds to the given date.
354
+ *
355
+ * @param {Date|Number} date - the date to be changed
356
+ * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
357
+ * @returns {Date} the new date with the milliseconds added
358
+ * @throws {TypeError} 2 arguments required
359
+ *
360
+ * @example
361
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
362
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
363
+ * //=> Thu Jul 10 2014 12:45:30.750
364
+ */
365
+ function addMilliseconds(dirtyDate, dirtyAmount) {
366
+ requiredArgs(2, arguments);
367
+ var timestamp = toDate(dirtyDate).getTime();
368
+ var amount = toInteger(dirtyAmount);
369
+ return new Date(timestamp + amount);
370
+ }
371
+
372
+ var defaultOptions = {};
373
+ function getDefaultOptions() {
374
+ return defaultOptions;
375
+ }
376
+
377
+ /**
378
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
379
+ * They usually appear for dates that denote time before the timezones were introduced
380
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
381
+ * and GMT+01:00:00 after that date)
382
+ *
383
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
384
+ * which would lead to incorrect calculations.
385
+ *
386
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
387
+ */
388
+ function getTimezoneOffsetInMilliseconds(date) {
389
+ var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
390
+ utcDate.setUTCFullYear(date.getFullYear());
391
+ return date.getTime() - utcDate.getTime();
392
+ }
393
+
394
+ /**
395
+ * @name isDate
396
+ * @category Common Helpers
397
+ * @summary Is the given value a date?
398
+ *
399
+ * @description
400
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
401
+ *
402
+ * @param {*} value - the value to check
403
+ * @returns {boolean} true if the given value is a date
404
+ * @throws {TypeError} 1 arguments required
405
+ *
406
+ * @example
407
+ * // For a valid date:
408
+ * const result = isDate(new Date())
409
+ * //=> true
410
+ *
411
+ * @example
412
+ * // For an invalid date:
413
+ * const result = isDate(new Date(NaN))
414
+ * //=> true
415
+ *
416
+ * @example
417
+ * // For some value:
418
+ * const result = isDate('2014-02-31')
419
+ * //=> false
420
+ *
421
+ * @example
422
+ * // For an object:
423
+ * const result = isDate({})
424
+ * //=> false
425
+ */
426
+ function isDate(value) {
427
+ requiredArgs(1, arguments);
428
+ return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
429
+ }
430
+
431
+ /**
432
+ * @name isValid
433
+ * @category Common Helpers
434
+ * @summary Is the given date valid?
435
+ *
436
+ * @description
437
+ * Returns false if argument is Invalid Date and true otherwise.
438
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
439
+ * Invalid Date is a Date, whose time value is NaN.
440
+ *
441
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
442
+ *
443
+ * @param {*} date - the date to check
444
+ * @returns {Boolean} the date is valid
445
+ * @throws {TypeError} 1 argument required
446
+ *
447
+ * @example
448
+ * // For the valid date:
449
+ * const result = isValid(new Date(2014, 1, 31))
450
+ * //=> true
451
+ *
452
+ * @example
453
+ * // For the value, convertable into a date:
454
+ * const result = isValid(1393804800000)
455
+ * //=> true
456
+ *
457
+ * @example
458
+ * // For the invalid date:
459
+ * const result = isValid(new Date(''))
460
+ * //=> false
461
+ */
462
+ function isValid(dirtyDate) {
463
+ requiredArgs(1, arguments);
464
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
465
+ return false;
466
+ }
467
+ var date = toDate(dirtyDate);
468
+ return !isNaN(Number(date));
469
+ }
470
+
471
+ /**
472
+ * @name subMilliseconds
473
+ * @category Millisecond Helpers
474
+ * @summary Subtract the specified number of milliseconds from the given date.
475
+ *
476
+ * @description
477
+ * Subtract the specified number of milliseconds from the given date.
478
+ *
479
+ * @param {Date|Number} date - the date to be changed
480
+ * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
481
+ * @returns {Date} the new date with the milliseconds subtracted
482
+ * @throws {TypeError} 2 arguments required
483
+ *
484
+ * @example
485
+ * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
486
+ * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
487
+ * //=> Thu Jul 10 2014 12:45:29.250
488
+ */
489
+ function subMilliseconds(dirtyDate, dirtyAmount) {
490
+ requiredArgs(2, arguments);
491
+ var amount = toInteger(dirtyAmount);
492
+ return addMilliseconds(dirtyDate, -amount);
493
+ }
494
+
495
+ var MILLISECONDS_IN_DAY = 86400000;
496
+ function getUTCDayOfYear(dirtyDate) {
497
+ requiredArgs(1, arguments);
498
+ var date = toDate(dirtyDate);
499
+ var timestamp = date.getTime();
500
+ date.setUTCMonth(0, 1);
501
+ date.setUTCHours(0, 0, 0, 0);
502
+ var startOfYearTimestamp = date.getTime();
503
+ var difference = timestamp - startOfYearTimestamp;
504
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
505
+ }
506
+
507
+ function startOfUTCISOWeek(dirtyDate) {
508
+ requiredArgs(1, arguments);
509
+ var weekStartsOn = 1;
510
+ var date = toDate(dirtyDate);
511
+ var day = date.getUTCDay();
512
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
513
+ date.setUTCDate(date.getUTCDate() - diff);
514
+ date.setUTCHours(0, 0, 0, 0);
515
+ return date;
516
+ }
517
+
518
+ function getUTCISOWeekYear(dirtyDate) {
519
+ requiredArgs(1, arguments);
520
+ var date = toDate(dirtyDate);
521
+ var year = date.getUTCFullYear();
522
+ var fourthOfJanuaryOfNextYear = new Date(0);
523
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
524
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
525
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
526
+ var fourthOfJanuaryOfThisYear = new Date(0);
527
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
528
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
529
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
530
+ if (date.getTime() >= startOfNextYear.getTime()) {
531
+ return year + 1;
532
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
533
+ return year;
534
+ } else {
535
+ return year - 1;
536
+ }
537
+ }
538
+
539
+ function startOfUTCISOWeekYear(dirtyDate) {
540
+ requiredArgs(1, arguments);
541
+ var year = getUTCISOWeekYear(dirtyDate);
542
+ var fourthOfJanuary = new Date(0);
543
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
544
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
545
+ var date = startOfUTCISOWeek(fourthOfJanuary);
546
+ return date;
547
+ }
548
+
549
+ var MILLISECONDS_IN_WEEK$1 = 604800000;
550
+ function getUTCISOWeek(dirtyDate) {
551
+ requiredArgs(1, arguments);
552
+ var date = toDate(dirtyDate);
553
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
554
+
555
+ // Round the number of days to the nearest integer
556
+ // because the number of milliseconds in a week is not constant
557
+ // (e.g. it's different in the week of the daylight saving time clock shift)
558
+ return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
559
+ }
560
+
561
+ function startOfUTCWeek(dirtyDate, options) {
562
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
563
+ requiredArgs(1, arguments);
564
+ var defaultOptions = getDefaultOptions();
565
+ var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
566
+
567
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
568
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
569
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
570
+ }
571
+ var date = toDate(dirtyDate);
572
+ var day = date.getUTCDay();
573
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
574
+ date.setUTCDate(date.getUTCDate() - diff);
575
+ date.setUTCHours(0, 0, 0, 0);
576
+ return date;
577
+ }
578
+
579
+ function getUTCWeekYear(dirtyDate, options) {
580
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
581
+ requiredArgs(1, arguments);
582
+ var date = toDate(dirtyDate);
583
+ var year = date.getUTCFullYear();
584
+ var defaultOptions = getDefaultOptions();
585
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
586
+
587
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
588
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
589
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
590
+ }
591
+ var firstWeekOfNextYear = new Date(0);
592
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
593
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
594
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
595
+ var firstWeekOfThisYear = new Date(0);
596
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
597
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
598
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
599
+ if (date.getTime() >= startOfNextYear.getTime()) {
600
+ return year + 1;
601
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
602
+ return year;
603
+ } else {
604
+ return year - 1;
605
+ }
606
+ }
607
+
608
+ function startOfUTCWeekYear(dirtyDate, options) {
609
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
610
+ requiredArgs(1, arguments);
611
+ var defaultOptions = getDefaultOptions();
612
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
613
+ var year = getUTCWeekYear(dirtyDate, options);
614
+ var firstWeek = new Date(0);
615
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
616
+ firstWeek.setUTCHours(0, 0, 0, 0);
617
+ var date = startOfUTCWeek(firstWeek, options);
618
+ return date;
619
+ }
620
+
621
+ var MILLISECONDS_IN_WEEK = 604800000;
622
+ function getUTCWeek(dirtyDate, options) {
623
+ requiredArgs(1, arguments);
624
+ var date = toDate(dirtyDate);
625
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
626
+
627
+ // Round the number of days to the nearest integer
628
+ // because the number of milliseconds in a week is not constant
629
+ // (e.g. it's different in the week of the daylight saving time clock shift)
630
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
631
+ }
632
+
633
+ function addLeadingZeros(number, targetLength) {
634
+ var sign = number < 0 ? '-' : '';
635
+ var output = Math.abs(number).toString();
636
+ while (output.length < targetLength) {
637
+ output = '0' + output;
638
+ }
639
+ return sign + output;
640
+ }
641
+
642
+ /*
643
+ * | | Unit | | Unit |
644
+ * |-----|--------------------------------|-----|--------------------------------|
645
+ * | a | AM, PM | A* | |
646
+ * | d | Day of month | D | |
647
+ * | h | Hour [1-12] | H | Hour [0-23] |
648
+ * | m | Minute | M | Month |
649
+ * | s | Second | S | Fraction of second |
650
+ * | y | Year (abs) | Y | |
651
+ *
652
+ * Letters marked by * are not implemented but reserved by Unicode standard.
653
+ */
654
+ var formatters$2 = {
655
+ // Year
656
+ y: function y(date, token) {
657
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
658
+ // | Year | y | yy | yyy | yyyy | yyyyy |
659
+ // |----------|-------|----|-------|-------|-------|
660
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
661
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
662
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
663
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
664
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
665
+
666
+ var signedYear = date.getUTCFullYear();
667
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
668
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
669
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
670
+ },
671
+ // Month
672
+ M: function M(date, token) {
673
+ var month = date.getUTCMonth();
674
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
675
+ },
676
+ // Day of the month
677
+ d: function d(date, token) {
678
+ return addLeadingZeros(date.getUTCDate(), token.length);
679
+ },
680
+ // AM or PM
681
+ a: function a(date, token) {
682
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
683
+ switch (token) {
684
+ case 'a':
685
+ case 'aa':
686
+ return dayPeriodEnumValue.toUpperCase();
687
+ case 'aaa':
688
+ return dayPeriodEnumValue;
689
+ case 'aaaaa':
690
+ return dayPeriodEnumValue[0];
691
+ case 'aaaa':
692
+ default:
693
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
694
+ }
695
+ },
696
+ // Hour [1-12]
697
+ h: function h(date, token) {
698
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
699
+ },
700
+ // Hour [0-23]
701
+ H: function H(date, token) {
702
+ return addLeadingZeros(date.getUTCHours(), token.length);
703
+ },
704
+ // Minute
705
+ m: function m(date, token) {
706
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
707
+ },
708
+ // Second
709
+ s: function s(date, token) {
710
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
711
+ },
712
+ // Fraction of second
713
+ S: function S(date, token) {
714
+ var numberOfDigits = token.length;
715
+ var milliseconds = date.getUTCMilliseconds();
716
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
717
+ return addLeadingZeros(fractionalSeconds, token.length);
718
+ }
719
+ };
720
+ const formatters$3 = formatters$2;
721
+
722
+ var dayPeriodEnum = {
723
+ am: 'am',
724
+ pm: 'pm',
725
+ midnight: 'midnight',
726
+ noon: 'noon',
727
+ morning: 'morning',
728
+ afternoon: 'afternoon',
729
+ evening: 'evening',
730
+ night: 'night'
731
+ };
732
+ /*
733
+ * | | Unit | | Unit |
734
+ * |-----|--------------------------------|-----|--------------------------------|
735
+ * | a | AM, PM | A* | Milliseconds in day |
736
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
737
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
738
+ * | d | Day of month | D | Day of year |
739
+ * | e | Local day of week | E | Day of week |
740
+ * | f | | F* | Day of week in month |
741
+ * | g* | Modified Julian day | G | Era |
742
+ * | h | Hour [1-12] | H | Hour [0-23] |
743
+ * | i! | ISO day of week | I! | ISO week of year |
744
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
745
+ * | k | Hour [1-24] | K | Hour [0-11] |
746
+ * | l* | (deprecated) | L | Stand-alone month |
747
+ * | m | Minute | M | Month |
748
+ * | n | | N | |
749
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
750
+ * | p! | Long localized time | P! | Long localized date |
751
+ * | q | Stand-alone quarter | Q | Quarter |
752
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
753
+ * | s | Second | S | Fraction of second |
754
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
755
+ * | u | Extended year | U* | Cyclic year |
756
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
757
+ * | w | Local week of year | W* | Week of month |
758
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
759
+ * | y | Year (abs) | Y | Local week-numbering year |
760
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
761
+ *
762
+ * Letters marked by * are not implemented but reserved by Unicode standard.
763
+ *
764
+ * Letters marked by ! are non-standard, but implemented by date-fns:
765
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
766
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
767
+ * i.e. 7 for Sunday, 1 for Monday, etc.
768
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
769
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
770
+ * `R` is supposed to be used in conjunction with `I` and `i`
771
+ * for universal ISO week-numbering date, whereas
772
+ * `Y` is supposed to be used in conjunction with `w` and `e`
773
+ * for week-numbering date specific to the locale.
774
+ * - `P` is long localized date format
775
+ * - `p` is long localized time format
776
+ */
777
+
778
+ var formatters = {
779
+ // Era
780
+ G: function G(date, token, localize) {
781
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
782
+ switch (token) {
783
+ // AD, BC
784
+ case 'G':
785
+ case 'GG':
786
+ case 'GGG':
787
+ return localize.era(era, {
788
+ width: 'abbreviated'
789
+ });
790
+ // A, B
791
+ case 'GGGGG':
792
+ return localize.era(era, {
793
+ width: 'narrow'
794
+ });
795
+ // Anno Domini, Before Christ
796
+ case 'GGGG':
797
+ default:
798
+ return localize.era(era, {
799
+ width: 'wide'
800
+ });
801
+ }
802
+ },
803
+ // Year
804
+ y: function y(date, token, localize) {
805
+ // Ordinal number
806
+ if (token === 'yo') {
807
+ var signedYear = date.getUTCFullYear();
808
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
809
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
810
+ return localize.ordinalNumber(year, {
811
+ unit: 'year'
812
+ });
813
+ }
814
+ return formatters$3.y(date, token);
815
+ },
816
+ // Local week-numbering year
817
+ Y: function Y(date, token, localize, options) {
818
+ var signedWeekYear = getUTCWeekYear(date, options);
819
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
820
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
821
+
822
+ // Two digit year
823
+ if (token === 'YY') {
824
+ var twoDigitYear = weekYear % 100;
825
+ return addLeadingZeros(twoDigitYear, 2);
826
+ }
827
+
828
+ // Ordinal number
829
+ if (token === 'Yo') {
830
+ return localize.ordinalNumber(weekYear, {
831
+ unit: 'year'
832
+ });
833
+ }
834
+
835
+ // Padding
836
+ return addLeadingZeros(weekYear, token.length);
837
+ },
838
+ // ISO week-numbering year
839
+ R: function R(date, token) {
840
+ var isoWeekYear = getUTCISOWeekYear(date);
841
+
842
+ // Padding
843
+ return addLeadingZeros(isoWeekYear, token.length);
844
+ },
845
+ // Extended year. This is a single number designating the year of this calendar system.
846
+ // The main difference between `y` and `u` localizers are B.C. years:
847
+ // | Year | `y` | `u` |
848
+ // |------|-----|-----|
849
+ // | AC 1 | 1 | 1 |
850
+ // | BC 1 | 1 | 0 |
851
+ // | BC 2 | 2 | -1 |
852
+ // Also `yy` always returns the last two digits of a year,
853
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
854
+ u: function u(date, token) {
855
+ var year = date.getUTCFullYear();
856
+ return addLeadingZeros(year, token.length);
857
+ },
858
+ // Quarter
859
+ Q: function Q(date, token, localize) {
860
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
861
+ switch (token) {
862
+ // 1, 2, 3, 4
863
+ case 'Q':
864
+ return String(quarter);
865
+ // 01, 02, 03, 04
866
+ case 'QQ':
867
+ return addLeadingZeros(quarter, 2);
868
+ // 1st, 2nd, 3rd, 4th
869
+ case 'Qo':
870
+ return localize.ordinalNumber(quarter, {
871
+ unit: 'quarter'
872
+ });
873
+ // Q1, Q2, Q3, Q4
874
+ case 'QQQ':
875
+ return localize.quarter(quarter, {
876
+ width: 'abbreviated',
877
+ context: 'formatting'
878
+ });
879
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
880
+ case 'QQQQQ':
881
+ return localize.quarter(quarter, {
882
+ width: 'narrow',
883
+ context: 'formatting'
884
+ });
885
+ // 1st quarter, 2nd quarter, ...
886
+ case 'QQQQ':
887
+ default:
888
+ return localize.quarter(quarter, {
889
+ width: 'wide',
890
+ context: 'formatting'
891
+ });
892
+ }
893
+ },
894
+ // Stand-alone quarter
895
+ q: function q(date, token, localize) {
896
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
897
+ switch (token) {
898
+ // 1, 2, 3, 4
899
+ case 'q':
900
+ return String(quarter);
901
+ // 01, 02, 03, 04
902
+ case 'qq':
903
+ return addLeadingZeros(quarter, 2);
904
+ // 1st, 2nd, 3rd, 4th
905
+ case 'qo':
906
+ return localize.ordinalNumber(quarter, {
907
+ unit: 'quarter'
908
+ });
909
+ // Q1, Q2, Q3, Q4
910
+ case 'qqq':
911
+ return localize.quarter(quarter, {
912
+ width: 'abbreviated',
913
+ context: 'standalone'
914
+ });
915
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
916
+ case 'qqqqq':
917
+ return localize.quarter(quarter, {
918
+ width: 'narrow',
919
+ context: 'standalone'
920
+ });
921
+ // 1st quarter, 2nd quarter, ...
922
+ case 'qqqq':
923
+ default:
924
+ return localize.quarter(quarter, {
925
+ width: 'wide',
926
+ context: 'standalone'
927
+ });
928
+ }
929
+ },
930
+ // Month
931
+ M: function M(date, token, localize) {
932
+ var month = date.getUTCMonth();
933
+ switch (token) {
934
+ case 'M':
935
+ case 'MM':
936
+ return formatters$3.M(date, token);
937
+ // 1st, 2nd, ..., 12th
938
+ case 'Mo':
939
+ return localize.ordinalNumber(month + 1, {
940
+ unit: 'month'
941
+ });
942
+ // Jan, Feb, ..., Dec
943
+ case 'MMM':
944
+ return localize.month(month, {
945
+ width: 'abbreviated',
946
+ context: 'formatting'
947
+ });
948
+ // J, F, ..., D
949
+ case 'MMMMM':
950
+ return localize.month(month, {
951
+ width: 'narrow',
952
+ context: 'formatting'
953
+ });
954
+ // January, February, ..., December
955
+ case 'MMMM':
956
+ default:
957
+ return localize.month(month, {
958
+ width: 'wide',
959
+ context: 'formatting'
960
+ });
961
+ }
962
+ },
963
+ // Stand-alone month
964
+ L: function L(date, token, localize) {
965
+ var month = date.getUTCMonth();
966
+ switch (token) {
967
+ // 1, 2, ..., 12
968
+ case 'L':
969
+ return String(month + 1);
970
+ // 01, 02, ..., 12
971
+ case 'LL':
972
+ return addLeadingZeros(month + 1, 2);
973
+ // 1st, 2nd, ..., 12th
974
+ case 'Lo':
975
+ return localize.ordinalNumber(month + 1, {
976
+ unit: 'month'
977
+ });
978
+ // Jan, Feb, ..., Dec
979
+ case 'LLL':
980
+ return localize.month(month, {
981
+ width: 'abbreviated',
982
+ context: 'standalone'
983
+ });
984
+ // J, F, ..., D
985
+ case 'LLLLL':
986
+ return localize.month(month, {
987
+ width: 'narrow',
988
+ context: 'standalone'
989
+ });
990
+ // January, February, ..., December
991
+ case 'LLLL':
992
+ default:
993
+ return localize.month(month, {
994
+ width: 'wide',
995
+ context: 'standalone'
996
+ });
997
+ }
998
+ },
999
+ // Local week of year
1000
+ w: function w(date, token, localize, options) {
1001
+ var week = getUTCWeek(date, options);
1002
+ if (token === 'wo') {
1003
+ return localize.ordinalNumber(week, {
1004
+ unit: 'week'
1005
+ });
1006
+ }
1007
+ return addLeadingZeros(week, token.length);
1008
+ },
1009
+ // ISO week of year
1010
+ I: function I(date, token, localize) {
1011
+ var isoWeek = getUTCISOWeek(date);
1012
+ if (token === 'Io') {
1013
+ return localize.ordinalNumber(isoWeek, {
1014
+ unit: 'week'
1015
+ });
1016
+ }
1017
+ return addLeadingZeros(isoWeek, token.length);
1018
+ },
1019
+ // Day of the month
1020
+ d: function d(date, token, localize) {
1021
+ if (token === 'do') {
1022
+ return localize.ordinalNumber(date.getUTCDate(), {
1023
+ unit: 'date'
1024
+ });
1025
+ }
1026
+ return formatters$3.d(date, token);
1027
+ },
1028
+ // Day of year
1029
+ D: function D(date, token, localize) {
1030
+ var dayOfYear = getUTCDayOfYear(date);
1031
+ if (token === 'Do') {
1032
+ return localize.ordinalNumber(dayOfYear, {
1033
+ unit: 'dayOfYear'
1034
+ });
1035
+ }
1036
+ return addLeadingZeros(dayOfYear, token.length);
1037
+ },
1038
+ // Day of week
1039
+ E: function E(date, token, localize) {
1040
+ var dayOfWeek = date.getUTCDay();
1041
+ switch (token) {
1042
+ // Tue
1043
+ case 'E':
1044
+ case 'EE':
1045
+ case 'EEE':
1046
+ return localize.day(dayOfWeek, {
1047
+ width: 'abbreviated',
1048
+ context: 'formatting'
1049
+ });
1050
+ // T
1051
+ case 'EEEEE':
1052
+ return localize.day(dayOfWeek, {
1053
+ width: 'narrow',
1054
+ context: 'formatting'
1055
+ });
1056
+ // Tu
1057
+ case 'EEEEEE':
1058
+ return localize.day(dayOfWeek, {
1059
+ width: 'short',
1060
+ context: 'formatting'
1061
+ });
1062
+ // Tuesday
1063
+ case 'EEEE':
1064
+ default:
1065
+ return localize.day(dayOfWeek, {
1066
+ width: 'wide',
1067
+ context: 'formatting'
1068
+ });
1069
+ }
1070
+ },
1071
+ // Local day of week
1072
+ e: function e(date, token, localize, options) {
1073
+ var dayOfWeek = date.getUTCDay();
1074
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1075
+ switch (token) {
1076
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
1077
+ case 'e':
1078
+ return String(localDayOfWeek);
1079
+ // Padded numerical value
1080
+ case 'ee':
1081
+ return addLeadingZeros(localDayOfWeek, 2);
1082
+ // 1st, 2nd, ..., 7th
1083
+ case 'eo':
1084
+ return localize.ordinalNumber(localDayOfWeek, {
1085
+ unit: 'day'
1086
+ });
1087
+ case 'eee':
1088
+ return localize.day(dayOfWeek, {
1089
+ width: 'abbreviated',
1090
+ context: 'formatting'
1091
+ });
1092
+ // T
1093
+ case 'eeeee':
1094
+ return localize.day(dayOfWeek, {
1095
+ width: 'narrow',
1096
+ context: 'formatting'
1097
+ });
1098
+ // Tu
1099
+ case 'eeeeee':
1100
+ return localize.day(dayOfWeek, {
1101
+ width: 'short',
1102
+ context: 'formatting'
1103
+ });
1104
+ // Tuesday
1105
+ case 'eeee':
1106
+ default:
1107
+ return localize.day(dayOfWeek, {
1108
+ width: 'wide',
1109
+ context: 'formatting'
1110
+ });
1111
+ }
1112
+ },
1113
+ // Stand-alone local day of week
1114
+ c: function c(date, token, localize, options) {
1115
+ var dayOfWeek = date.getUTCDay();
1116
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
1117
+ switch (token) {
1118
+ // Numerical value (same as in `e`)
1119
+ case 'c':
1120
+ return String(localDayOfWeek);
1121
+ // Padded numerical value
1122
+ case 'cc':
1123
+ return addLeadingZeros(localDayOfWeek, token.length);
1124
+ // 1st, 2nd, ..., 7th
1125
+ case 'co':
1126
+ return localize.ordinalNumber(localDayOfWeek, {
1127
+ unit: 'day'
1128
+ });
1129
+ case 'ccc':
1130
+ return localize.day(dayOfWeek, {
1131
+ width: 'abbreviated',
1132
+ context: 'standalone'
1133
+ });
1134
+ // T
1135
+ case 'ccccc':
1136
+ return localize.day(dayOfWeek, {
1137
+ width: 'narrow',
1138
+ context: 'standalone'
1139
+ });
1140
+ // Tu
1141
+ case 'cccccc':
1142
+ return localize.day(dayOfWeek, {
1143
+ width: 'short',
1144
+ context: 'standalone'
1145
+ });
1146
+ // Tuesday
1147
+ case 'cccc':
1148
+ default:
1149
+ return localize.day(dayOfWeek, {
1150
+ width: 'wide',
1151
+ context: 'standalone'
1152
+ });
1153
+ }
1154
+ },
1155
+ // ISO day of week
1156
+ i: function i(date, token, localize) {
1157
+ var dayOfWeek = date.getUTCDay();
1158
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
1159
+ switch (token) {
1160
+ // 2
1161
+ case 'i':
1162
+ return String(isoDayOfWeek);
1163
+ // 02
1164
+ case 'ii':
1165
+ return addLeadingZeros(isoDayOfWeek, token.length);
1166
+ // 2nd
1167
+ case 'io':
1168
+ return localize.ordinalNumber(isoDayOfWeek, {
1169
+ unit: 'day'
1170
+ });
1171
+ // Tue
1172
+ case 'iii':
1173
+ return localize.day(dayOfWeek, {
1174
+ width: 'abbreviated',
1175
+ context: 'formatting'
1176
+ });
1177
+ // T
1178
+ case 'iiiii':
1179
+ return localize.day(dayOfWeek, {
1180
+ width: 'narrow',
1181
+ context: 'formatting'
1182
+ });
1183
+ // Tu
1184
+ case 'iiiiii':
1185
+ return localize.day(dayOfWeek, {
1186
+ width: 'short',
1187
+ context: 'formatting'
1188
+ });
1189
+ // Tuesday
1190
+ case 'iiii':
1191
+ default:
1192
+ return localize.day(dayOfWeek, {
1193
+ width: 'wide',
1194
+ context: 'formatting'
1195
+ });
1196
+ }
1197
+ },
1198
+ // AM or PM
1199
+ a: function a(date, token, localize) {
1200
+ var hours = date.getUTCHours();
1201
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1202
+ switch (token) {
1203
+ case 'a':
1204
+ case 'aa':
1205
+ return localize.dayPeriod(dayPeriodEnumValue, {
1206
+ width: 'abbreviated',
1207
+ context: 'formatting'
1208
+ });
1209
+ case 'aaa':
1210
+ return localize.dayPeriod(dayPeriodEnumValue, {
1211
+ width: 'abbreviated',
1212
+ context: 'formatting'
1213
+ }).toLowerCase();
1214
+ case 'aaaaa':
1215
+ return localize.dayPeriod(dayPeriodEnumValue, {
1216
+ width: 'narrow',
1217
+ context: 'formatting'
1218
+ });
1219
+ case 'aaaa':
1220
+ default:
1221
+ return localize.dayPeriod(dayPeriodEnumValue, {
1222
+ width: 'wide',
1223
+ context: 'formatting'
1224
+ });
1225
+ }
1226
+ },
1227
+ // AM, PM, midnight, noon
1228
+ b: function b(date, token, localize) {
1229
+ var hours = date.getUTCHours();
1230
+ var dayPeriodEnumValue;
1231
+ if (hours === 12) {
1232
+ dayPeriodEnumValue = dayPeriodEnum.noon;
1233
+ } else if (hours === 0) {
1234
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
1235
+ } else {
1236
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
1237
+ }
1238
+ switch (token) {
1239
+ case 'b':
1240
+ case 'bb':
1241
+ return localize.dayPeriod(dayPeriodEnumValue, {
1242
+ width: 'abbreviated',
1243
+ context: 'formatting'
1244
+ });
1245
+ case 'bbb':
1246
+ return localize.dayPeriod(dayPeriodEnumValue, {
1247
+ width: 'abbreviated',
1248
+ context: 'formatting'
1249
+ }).toLowerCase();
1250
+ case 'bbbbb':
1251
+ return localize.dayPeriod(dayPeriodEnumValue, {
1252
+ width: 'narrow',
1253
+ context: 'formatting'
1254
+ });
1255
+ case 'bbbb':
1256
+ default:
1257
+ return localize.dayPeriod(dayPeriodEnumValue, {
1258
+ width: 'wide',
1259
+ context: 'formatting'
1260
+ });
1261
+ }
1262
+ },
1263
+ // in the morning, in the afternoon, in the evening, at night
1264
+ B: function B(date, token, localize) {
1265
+ var hours = date.getUTCHours();
1266
+ var dayPeriodEnumValue;
1267
+ if (hours >= 17) {
1268
+ dayPeriodEnumValue = dayPeriodEnum.evening;
1269
+ } else if (hours >= 12) {
1270
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
1271
+ } else if (hours >= 4) {
1272
+ dayPeriodEnumValue = dayPeriodEnum.morning;
1273
+ } else {
1274
+ dayPeriodEnumValue = dayPeriodEnum.night;
1275
+ }
1276
+ switch (token) {
1277
+ case 'B':
1278
+ case 'BB':
1279
+ case 'BBB':
1280
+ return localize.dayPeriod(dayPeriodEnumValue, {
1281
+ width: 'abbreviated',
1282
+ context: 'formatting'
1283
+ });
1284
+ case 'BBBBB':
1285
+ return localize.dayPeriod(dayPeriodEnumValue, {
1286
+ width: 'narrow',
1287
+ context: 'formatting'
1288
+ });
1289
+ case 'BBBB':
1290
+ default:
1291
+ return localize.dayPeriod(dayPeriodEnumValue, {
1292
+ width: 'wide',
1293
+ context: 'formatting'
1294
+ });
1295
+ }
1296
+ },
1297
+ // Hour [1-12]
1298
+ h: function h(date, token, localize) {
1299
+ if (token === 'ho') {
1300
+ var hours = date.getUTCHours() % 12;
1301
+ if (hours === 0) hours = 12;
1302
+ return localize.ordinalNumber(hours, {
1303
+ unit: 'hour'
1304
+ });
1305
+ }
1306
+ return formatters$3.h(date, token);
1307
+ },
1308
+ // Hour [0-23]
1309
+ H: function H(date, token, localize) {
1310
+ if (token === 'Ho') {
1311
+ return localize.ordinalNumber(date.getUTCHours(), {
1312
+ unit: 'hour'
1313
+ });
1314
+ }
1315
+ return formatters$3.H(date, token);
1316
+ },
1317
+ // Hour [0-11]
1318
+ K: function K(date, token, localize) {
1319
+ var hours = date.getUTCHours() % 12;
1320
+ if (token === 'Ko') {
1321
+ return localize.ordinalNumber(hours, {
1322
+ unit: 'hour'
1323
+ });
1324
+ }
1325
+ return addLeadingZeros(hours, token.length);
1326
+ },
1327
+ // Hour [1-24]
1328
+ k: function k(date, token, localize) {
1329
+ var hours = date.getUTCHours();
1330
+ if (hours === 0) hours = 24;
1331
+ if (token === 'ko') {
1332
+ return localize.ordinalNumber(hours, {
1333
+ unit: 'hour'
1334
+ });
1335
+ }
1336
+ return addLeadingZeros(hours, token.length);
1337
+ },
1338
+ // Minute
1339
+ m: function m(date, token, localize) {
1340
+ if (token === 'mo') {
1341
+ return localize.ordinalNumber(date.getUTCMinutes(), {
1342
+ unit: 'minute'
1343
+ });
1344
+ }
1345
+ return formatters$3.m(date, token);
1346
+ },
1347
+ // Second
1348
+ s: function s(date, token, localize) {
1349
+ if (token === 'so') {
1350
+ return localize.ordinalNumber(date.getUTCSeconds(), {
1351
+ unit: 'second'
1352
+ });
1353
+ }
1354
+ return formatters$3.s(date, token);
1355
+ },
1356
+ // Fraction of second
1357
+ S: function S(date, token) {
1358
+ return formatters$3.S(date, token);
1359
+ },
1360
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1361
+ X: function X(date, token, _localize, options) {
1362
+ var originalDate = options._originalDate || date;
1363
+ var timezoneOffset = originalDate.getTimezoneOffset();
1364
+ if (timezoneOffset === 0) {
1365
+ return 'Z';
1366
+ }
1367
+ switch (token) {
1368
+ // Hours and optional minutes
1369
+ case 'X':
1370
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1371
+
1372
+ // Hours, minutes and optional seconds without `:` delimiter
1373
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1374
+ // so this token always has the same output as `XX`
1375
+ case 'XXXX':
1376
+ case 'XX':
1377
+ // Hours and minutes without `:` delimiter
1378
+ return formatTimezone(timezoneOffset);
1379
+
1380
+ // Hours, minutes and optional seconds with `:` delimiter
1381
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1382
+ // so this token always has the same output as `XXX`
1383
+ case 'XXXXX':
1384
+ case 'XXX': // Hours and minutes with `:` delimiter
1385
+ default:
1386
+ return formatTimezone(timezoneOffset, ':');
1387
+ }
1388
+ },
1389
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1390
+ x: function x(date, token, _localize, options) {
1391
+ var originalDate = options._originalDate || date;
1392
+ var timezoneOffset = originalDate.getTimezoneOffset();
1393
+ switch (token) {
1394
+ // Hours and optional minutes
1395
+ case 'x':
1396
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1397
+
1398
+ // Hours, minutes and optional seconds without `:` delimiter
1399
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1400
+ // so this token always has the same output as `xx`
1401
+ case 'xxxx':
1402
+ case 'xx':
1403
+ // Hours and minutes without `:` delimiter
1404
+ return formatTimezone(timezoneOffset);
1405
+
1406
+ // Hours, minutes and optional seconds with `:` delimiter
1407
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1408
+ // so this token always has the same output as `xxx`
1409
+ case 'xxxxx':
1410
+ case 'xxx': // Hours and minutes with `:` delimiter
1411
+ default:
1412
+ return formatTimezone(timezoneOffset, ':');
1413
+ }
1414
+ },
1415
+ // Timezone (GMT)
1416
+ O: function O(date, token, _localize, options) {
1417
+ var originalDate = options._originalDate || date;
1418
+ var timezoneOffset = originalDate.getTimezoneOffset();
1419
+ switch (token) {
1420
+ // Short
1421
+ case 'O':
1422
+ case 'OO':
1423
+ case 'OOO':
1424
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1425
+ // Long
1426
+ case 'OOOO':
1427
+ default:
1428
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1429
+ }
1430
+ },
1431
+ // Timezone (specific non-location)
1432
+ z: function z(date, token, _localize, options) {
1433
+ var originalDate = options._originalDate || date;
1434
+ var timezoneOffset = originalDate.getTimezoneOffset();
1435
+ switch (token) {
1436
+ // Short
1437
+ case 'z':
1438
+ case 'zz':
1439
+ case 'zzz':
1440
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1441
+ // Long
1442
+ case 'zzzz':
1443
+ default:
1444
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1445
+ }
1446
+ },
1447
+ // Seconds timestamp
1448
+ t: function t(date, token, _localize, options) {
1449
+ var originalDate = options._originalDate || date;
1450
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
1451
+ return addLeadingZeros(timestamp, token.length);
1452
+ },
1453
+ // Milliseconds timestamp
1454
+ T: function T(date, token, _localize, options) {
1455
+ var originalDate = options._originalDate || date;
1456
+ var timestamp = originalDate.getTime();
1457
+ return addLeadingZeros(timestamp, token.length);
1458
+ }
1459
+ };
1460
+ function formatTimezoneShort(offset, dirtyDelimiter) {
1461
+ var sign = offset > 0 ? '-' : '+';
1462
+ var absOffset = Math.abs(offset);
1463
+ var hours = Math.floor(absOffset / 60);
1464
+ var minutes = absOffset % 60;
1465
+ if (minutes === 0) {
1466
+ return sign + String(hours);
1467
+ }
1468
+ var delimiter = dirtyDelimiter || '';
1469
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1470
+ }
1471
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
1472
+ if (offset % 60 === 0) {
1473
+ var sign = offset > 0 ? '-' : '+';
1474
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1475
+ }
1476
+ return formatTimezone(offset, dirtyDelimiter);
1477
+ }
1478
+ function formatTimezone(offset, dirtyDelimiter) {
1479
+ var delimiter = dirtyDelimiter || '';
1480
+ var sign = offset > 0 ? '-' : '+';
1481
+ var absOffset = Math.abs(offset);
1482
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
1483
+ var minutes = addLeadingZeros(absOffset % 60, 2);
1484
+ return sign + hours + delimiter + minutes;
1485
+ }
1486
+ const formatters$1 = formatters;
1487
+
1488
+ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1489
+ switch (pattern) {
1490
+ case 'P':
1491
+ return formatLong.date({
1492
+ width: 'short'
1493
+ });
1494
+ case 'PP':
1495
+ return formatLong.date({
1496
+ width: 'medium'
1497
+ });
1498
+ case 'PPP':
1499
+ return formatLong.date({
1500
+ width: 'long'
1501
+ });
1502
+ case 'PPPP':
1503
+ default:
1504
+ return formatLong.date({
1505
+ width: 'full'
1506
+ });
1507
+ }
1508
+ };
1509
+ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
1510
+ switch (pattern) {
1511
+ case 'p':
1512
+ return formatLong.time({
1513
+ width: 'short'
1514
+ });
1515
+ case 'pp':
1516
+ return formatLong.time({
1517
+ width: 'medium'
1518
+ });
1519
+ case 'ppp':
1520
+ return formatLong.time({
1521
+ width: 'long'
1522
+ });
1523
+ case 'pppp':
1524
+ default:
1525
+ return formatLong.time({
1526
+ width: 'full'
1527
+ });
1528
+ }
1529
+ };
1530
+ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
1531
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
1532
+ var datePattern = matchResult[1];
1533
+ var timePattern = matchResult[2];
1534
+ if (!timePattern) {
1535
+ return dateLongFormatter(pattern, formatLong);
1536
+ }
1537
+ var dateTimeFormat;
1538
+ switch (datePattern) {
1539
+ case 'P':
1540
+ dateTimeFormat = formatLong.dateTime({
1541
+ width: 'short'
1542
+ });
1543
+ break;
1544
+ case 'PP':
1545
+ dateTimeFormat = formatLong.dateTime({
1546
+ width: 'medium'
1547
+ });
1548
+ break;
1549
+ case 'PPP':
1550
+ dateTimeFormat = formatLong.dateTime({
1551
+ width: 'long'
1552
+ });
1553
+ break;
1554
+ case 'PPPP':
1555
+ default:
1556
+ dateTimeFormat = formatLong.dateTime({
1557
+ width: 'full'
1558
+ });
1559
+ break;
1560
+ }
1561
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
1562
+ };
1563
+ var longFormatters = {
1564
+ p: timeLongFormatter,
1565
+ P: dateTimeLongFormatter
1566
+ };
1567
+ const longFormatters$1 = longFormatters;
1568
+
1569
+ var protectedDayOfYearTokens = ['D', 'DD'];
1570
+ var protectedWeekYearTokens = ['YY', 'YYYY'];
1571
+ function isProtectedDayOfYearToken(token) {
1572
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
1573
+ }
1574
+ function isProtectedWeekYearToken(token) {
1575
+ return protectedWeekYearTokens.indexOf(token) !== -1;
1576
+ }
1577
+ function throwProtectedError(token, format, input) {
1578
+ if (token === 'YYYY') {
1579
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1580
+ } else if (token === 'YY') {
1581
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1582
+ } else if (token === 'D') {
1583
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1584
+ } else if (token === 'DD') {
1585
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
1586
+ }
1587
+ }
1588
+
1589
+ var formatDistanceLocale = {
1590
+ lessThanXSeconds: {
1591
+ one: 'less than a second',
1592
+ other: 'less than {{count}} seconds'
1593
+ },
1594
+ xSeconds: {
1595
+ one: '1 second',
1596
+ other: '{{count}} seconds'
1597
+ },
1598
+ halfAMinute: 'half a minute',
1599
+ lessThanXMinutes: {
1600
+ one: 'less than a minute',
1601
+ other: 'less than {{count}} minutes'
1602
+ },
1603
+ xMinutes: {
1604
+ one: '1 minute',
1605
+ other: '{{count}} minutes'
1606
+ },
1607
+ aboutXHours: {
1608
+ one: 'about 1 hour',
1609
+ other: 'about {{count}} hours'
1610
+ },
1611
+ xHours: {
1612
+ one: '1 hour',
1613
+ other: '{{count}} hours'
1614
+ },
1615
+ xDays: {
1616
+ one: '1 day',
1617
+ other: '{{count}} days'
1618
+ },
1619
+ aboutXWeeks: {
1620
+ one: 'about 1 week',
1621
+ other: 'about {{count}} weeks'
1622
+ },
1623
+ xWeeks: {
1624
+ one: '1 week',
1625
+ other: '{{count}} weeks'
1626
+ },
1627
+ aboutXMonths: {
1628
+ one: 'about 1 month',
1629
+ other: 'about {{count}} months'
1630
+ },
1631
+ xMonths: {
1632
+ one: '1 month',
1633
+ other: '{{count}} months'
1634
+ },
1635
+ aboutXYears: {
1636
+ one: 'about 1 year',
1637
+ other: 'about {{count}} years'
1638
+ },
1639
+ xYears: {
1640
+ one: '1 year',
1641
+ other: '{{count}} years'
1642
+ },
1643
+ overXYears: {
1644
+ one: 'over 1 year',
1645
+ other: 'over {{count}} years'
1646
+ },
1647
+ almostXYears: {
1648
+ one: 'almost 1 year',
1649
+ other: 'almost {{count}} years'
1650
+ }
1651
+ };
1652
+ var formatDistance = function formatDistance(token, count, options) {
1653
+ var result;
1654
+ var tokenValue = formatDistanceLocale[token];
1655
+ if (typeof tokenValue === 'string') {
1656
+ result = tokenValue;
1657
+ } else if (count === 1) {
1658
+ result = tokenValue.one;
1659
+ } else {
1660
+ result = tokenValue.other.replace('{{count}}', count.toString());
1661
+ }
1662
+ if (options !== null && options !== void 0 && options.addSuffix) {
1663
+ if (options.comparison && options.comparison > 0) {
1664
+ return 'in ' + result;
1665
+ } else {
1666
+ return result + ' ago';
1667
+ }
1668
+ }
1669
+ return result;
1670
+ };
1671
+ const formatDistance$1 = formatDistance;
1672
+
1673
+ function buildFormatLongFn(args) {
1674
+ return function () {
1675
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1676
+ // TODO: Remove String()
1677
+ var width = options.width ? String(options.width) : args.defaultWidth;
1678
+ var format = args.formats[width] || args.formats[args.defaultWidth];
1679
+ return format;
1680
+ };
1681
+ }
1682
+
1683
+ var dateFormats = {
1684
+ full: 'EEEE, MMMM do, y',
1685
+ long: 'MMMM do, y',
1686
+ medium: 'MMM d, y',
1687
+ short: 'MM/dd/yyyy'
1688
+ };
1689
+ var timeFormats = {
1690
+ full: 'h:mm:ss a zzzz',
1691
+ long: 'h:mm:ss a z',
1692
+ medium: 'h:mm:ss a',
1693
+ short: 'h:mm a'
1694
+ };
1695
+ var dateTimeFormats = {
1696
+ full: "{{date}} 'at' {{time}}",
1697
+ long: "{{date}} 'at' {{time}}",
1698
+ medium: '{{date}}, {{time}}',
1699
+ short: '{{date}}, {{time}}'
1700
+ };
1701
+ var formatLong = {
1702
+ date: buildFormatLongFn({
1703
+ formats: dateFormats,
1704
+ defaultWidth: 'full'
1705
+ }),
1706
+ time: buildFormatLongFn({
1707
+ formats: timeFormats,
1708
+ defaultWidth: 'full'
1709
+ }),
1710
+ dateTime: buildFormatLongFn({
1711
+ formats: dateTimeFormats,
1712
+ defaultWidth: 'full'
1713
+ })
1714
+ };
1715
+ const formatLong$1 = formatLong;
1716
+
1717
+ var formatRelativeLocale = {
1718
+ lastWeek: "'last' eeee 'at' p",
1719
+ yesterday: "'yesterday at' p",
1720
+ today: "'today at' p",
1721
+ tomorrow: "'tomorrow at' p",
1722
+ nextWeek: "eeee 'at' p",
1723
+ other: 'P'
1724
+ };
1725
+ var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1726
+ return formatRelativeLocale[token];
1727
+ };
1728
+ const formatRelative$1 = formatRelative;
1729
+
1730
+ function buildLocalizeFn(args) {
1731
+ return function (dirtyIndex, options) {
1732
+ var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
1733
+ var valuesArray;
1734
+ if (context === 'formatting' && args.formattingValues) {
1735
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1736
+ var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
1737
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1738
+ } else {
1739
+ var _defaultWidth = args.defaultWidth;
1740
+ var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
1741
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
1742
+ }
1743
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
1744
+ // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
1745
+ return valuesArray[index];
1746
+ };
1747
+ }
1748
+
1749
+ var eraValues = {
1750
+ narrow: ['B', 'A'],
1751
+ abbreviated: ['BC', 'AD'],
1752
+ wide: ['Before Christ', 'Anno Domini']
1753
+ };
1754
+ var quarterValues = {
1755
+ narrow: ['1', '2', '3', '4'],
1756
+ abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
1757
+ wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
1758
+ };
1759
+
1760
+ // Note: in English, the names of days of the week and months are capitalized.
1761
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1762
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1763
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1764
+ var monthValues = {
1765
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
1766
+ abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
1767
+ wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
1768
+ };
1769
+ var dayValues = {
1770
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
1771
+ short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
1772
+ abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
1773
+ wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
1774
+ };
1775
+ var dayPeriodValues = {
1776
+ narrow: {
1777
+ am: 'a',
1778
+ pm: 'p',
1779
+ midnight: 'mi',
1780
+ noon: 'n',
1781
+ morning: 'morning',
1782
+ afternoon: 'afternoon',
1783
+ evening: 'evening',
1784
+ night: 'night'
1785
+ },
1786
+ abbreviated: {
1787
+ am: 'AM',
1788
+ pm: 'PM',
1789
+ midnight: 'midnight',
1790
+ noon: 'noon',
1791
+ morning: 'morning',
1792
+ afternoon: 'afternoon',
1793
+ evening: 'evening',
1794
+ night: 'night'
1795
+ },
1796
+ wide: {
1797
+ am: 'a.m.',
1798
+ pm: 'p.m.',
1799
+ midnight: 'midnight',
1800
+ noon: 'noon',
1801
+ morning: 'morning',
1802
+ afternoon: 'afternoon',
1803
+ evening: 'evening',
1804
+ night: 'night'
1805
+ }
1806
+ };
1807
+ var formattingDayPeriodValues = {
1808
+ narrow: {
1809
+ am: 'a',
1810
+ pm: 'p',
1811
+ midnight: 'mi',
1812
+ noon: 'n',
1813
+ morning: 'in the morning',
1814
+ afternoon: 'in the afternoon',
1815
+ evening: 'in the evening',
1816
+ night: 'at night'
1817
+ },
1818
+ abbreviated: {
1819
+ am: 'AM',
1820
+ pm: 'PM',
1821
+ midnight: 'midnight',
1822
+ noon: 'noon',
1823
+ morning: 'in the morning',
1824
+ afternoon: 'in the afternoon',
1825
+ evening: 'in the evening',
1826
+ night: 'at night'
1827
+ },
1828
+ wide: {
1829
+ am: 'a.m.',
1830
+ pm: 'p.m.',
1831
+ midnight: 'midnight',
1832
+ noon: 'noon',
1833
+ morning: 'in the morning',
1834
+ afternoon: 'in the afternoon',
1835
+ evening: 'in the evening',
1836
+ night: 'at night'
1837
+ }
1838
+ };
1839
+ var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
1840
+ var number = Number(dirtyNumber);
1841
+
1842
+ // If ordinal numbers depend on context, for example,
1843
+ // if they are different for different grammatical genders,
1844
+ // use `options.unit`.
1845
+ //
1846
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1847
+ // 'day', 'hour', 'minute', 'second'.
1848
+
1849
+ var rem100 = number % 100;
1850
+ if (rem100 > 20 || rem100 < 10) {
1851
+ switch (rem100 % 10) {
1852
+ case 1:
1853
+ return number + 'st';
1854
+ case 2:
1855
+ return number + 'nd';
1856
+ case 3:
1857
+ return number + 'rd';
1858
+ }
1859
+ }
1860
+ return number + 'th';
1861
+ };
1862
+ var localize = {
1863
+ ordinalNumber: ordinalNumber,
1864
+ era: buildLocalizeFn({
1865
+ values: eraValues,
1866
+ defaultWidth: 'wide'
1867
+ }),
1868
+ quarter: buildLocalizeFn({
1869
+ values: quarterValues,
1870
+ defaultWidth: 'wide',
1871
+ argumentCallback: function argumentCallback(quarter) {
1872
+ return quarter - 1;
1873
+ }
1874
+ }),
1875
+ month: buildLocalizeFn({
1876
+ values: monthValues,
1877
+ defaultWidth: 'wide'
1878
+ }),
1879
+ day: buildLocalizeFn({
1880
+ values: dayValues,
1881
+ defaultWidth: 'wide'
1882
+ }),
1883
+ dayPeriod: buildLocalizeFn({
1884
+ values: dayPeriodValues,
1885
+ defaultWidth: 'wide',
1886
+ formattingValues: formattingDayPeriodValues,
1887
+ defaultFormattingWidth: 'wide'
1888
+ })
1889
+ };
1890
+ const localize$1 = localize;
1891
+
1892
+ function buildMatchFn(args) {
1893
+ return function (string) {
1894
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1895
+ var width = options.width;
1896
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1897
+ var matchResult = string.match(matchPattern);
1898
+ if (!matchResult) {
1899
+ return null;
1900
+ }
1901
+ var matchedString = matchResult[0];
1902
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1903
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
1904
+ return pattern.test(matchedString);
1905
+ }) : findKey(parsePatterns, function (pattern) {
1906
+ return pattern.test(matchedString);
1907
+ });
1908
+ var value;
1909
+ value = args.valueCallback ? args.valueCallback(key) : key;
1910
+ value = options.valueCallback ? options.valueCallback(value) : value;
1911
+ var rest = string.slice(matchedString.length);
1912
+ return {
1913
+ value: value,
1914
+ rest: rest
1915
+ };
1916
+ };
1917
+ }
1918
+ function findKey(object, predicate) {
1919
+ for (var key in object) {
1920
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
1921
+ return key;
1922
+ }
1923
+ }
1924
+ return undefined;
1925
+ }
1926
+ function findIndex(array, predicate) {
1927
+ for (var key = 0; key < array.length; key++) {
1928
+ if (predicate(array[key])) {
1929
+ return key;
1930
+ }
1931
+ }
1932
+ return undefined;
1933
+ }
1934
+
1935
+ function buildMatchPatternFn(args) {
1936
+ return function (string) {
1937
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1938
+ var matchResult = string.match(args.matchPattern);
1939
+ if (!matchResult) return null;
1940
+ var matchedString = matchResult[0];
1941
+ var parseResult = string.match(args.parsePattern);
1942
+ if (!parseResult) return null;
1943
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1944
+ value = options.valueCallback ? options.valueCallback(value) : value;
1945
+ var rest = string.slice(matchedString.length);
1946
+ return {
1947
+ value: value,
1948
+ rest: rest
1949
+ };
1950
+ };
1951
+ }
1952
+
1953
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1954
+ var parseOrdinalNumberPattern = /\d+/i;
1955
+ var matchEraPatterns = {
1956
+ narrow: /^(b|a)/i,
1957
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1958
+ wide: /^(before christ|before common era|anno domini|common era)/i
1959
+ };
1960
+ var parseEraPatterns = {
1961
+ any: [/^b/i, /^(a|c)/i]
1962
+ };
1963
+ var matchQuarterPatterns = {
1964
+ narrow: /^[1234]/i,
1965
+ abbreviated: /^q[1234]/i,
1966
+ wide: /^[1234](th|st|nd|rd)? quarter/i
1967
+ };
1968
+ var parseQuarterPatterns = {
1969
+ any: [/1/i, /2/i, /3/i, /4/i]
1970
+ };
1971
+ var matchMonthPatterns = {
1972
+ narrow: /^[jfmasond]/i,
1973
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1974
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1975
+ };
1976
+ var parseMonthPatterns = {
1977
+ 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],
1978
+ 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]
1979
+ };
1980
+ var matchDayPatterns = {
1981
+ narrow: /^[smtwf]/i,
1982
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1983
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1984
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1985
+ };
1986
+ var parseDayPatterns = {
1987
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1988
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1989
+ };
1990
+ var matchDayPeriodPatterns = {
1991
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1992
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1993
+ };
1994
+ var parseDayPeriodPatterns = {
1995
+ any: {
1996
+ am: /^a/i,
1997
+ pm: /^p/i,
1998
+ midnight: /^mi/i,
1999
+ noon: /^no/i,
2000
+ morning: /morning/i,
2001
+ afternoon: /afternoon/i,
2002
+ evening: /evening/i,
2003
+ night: /night/i
2004
+ }
2005
+ };
2006
+ var match = {
2007
+ ordinalNumber: buildMatchPatternFn({
2008
+ matchPattern: matchOrdinalNumberPattern,
2009
+ parsePattern: parseOrdinalNumberPattern,
2010
+ valueCallback: function valueCallback(value) {
2011
+ return parseInt(value, 10);
2012
+ }
2013
+ }),
2014
+ era: buildMatchFn({
2015
+ matchPatterns: matchEraPatterns,
2016
+ defaultMatchWidth: 'wide',
2017
+ parsePatterns: parseEraPatterns,
2018
+ defaultParseWidth: 'any'
2019
+ }),
2020
+ quarter: buildMatchFn({
2021
+ matchPatterns: matchQuarterPatterns,
2022
+ defaultMatchWidth: 'wide',
2023
+ parsePatterns: parseQuarterPatterns,
2024
+ defaultParseWidth: 'any',
2025
+ valueCallback: function valueCallback(index) {
2026
+ return index + 1;
2027
+ }
2028
+ }),
2029
+ month: buildMatchFn({
2030
+ matchPatterns: matchMonthPatterns,
2031
+ defaultMatchWidth: 'wide',
2032
+ parsePatterns: parseMonthPatterns,
2033
+ defaultParseWidth: 'any'
2034
+ }),
2035
+ day: buildMatchFn({
2036
+ matchPatterns: matchDayPatterns,
2037
+ defaultMatchWidth: 'wide',
2038
+ parsePatterns: parseDayPatterns,
2039
+ defaultParseWidth: 'any'
2040
+ }),
2041
+ dayPeriod: buildMatchFn({
2042
+ matchPatterns: matchDayPeriodPatterns,
2043
+ defaultMatchWidth: 'any',
2044
+ parsePatterns: parseDayPeriodPatterns,
2045
+ defaultParseWidth: 'any'
2046
+ })
2047
+ };
2048
+ const match$1 = match;
2049
+
2050
+ /**
2051
+ * @type {Locale}
2052
+ * @category Locales
2053
+ * @summary English locale (United States).
2054
+ * @language English
2055
+ * @iso-639-2 eng
2056
+ * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
2057
+ * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
2058
+ */
2059
+ var locale = {
2060
+ code: 'en-US',
2061
+ formatDistance: formatDistance$1,
2062
+ formatLong: formatLong$1,
2063
+ formatRelative: formatRelative$1,
2064
+ localize: localize$1,
2065
+ match: match$1,
2066
+ options: {
2067
+ weekStartsOn: 0 /* Sunday */,
2068
+ firstWeekContainsDate: 1
2069
+ }
2070
+ };
2071
+ const defaultLocale = locale;
2072
+
2073
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
2074
+ // (one of the certain letters followed by `o`)
2075
+ // - (\w)\1* matches any sequences of the same letter
2076
+ // - '' matches two quote characters in a row
2077
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
2078
+ // except a single quote symbol, which ends the sequence.
2079
+ // Two quote characters do not end the sequence.
2080
+ // If there is no matching single quote
2081
+ // then the sequence will continue until the end of the string.
2082
+ // - . matches any single character unmatched by previous parts of the RegExps
2083
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
2084
+
2085
+ // This RegExp catches symbols escaped by quotes, and also
2086
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
2087
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
2088
+ var escapedStringRegExp = /^'([^]*?)'?$/;
2089
+ var doubleQuoteRegExp = /''/g;
2090
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
2091
+
2092
+ /**
2093
+ * @name format
2094
+ * @category Common Helpers
2095
+ * @summary Format the date.
2096
+ *
2097
+ * @description
2098
+ * Return the formatted date string in the given format. The result may vary by locale.
2099
+ *
2100
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
2101
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2102
+ *
2103
+ * The characters wrapped between two single quotes characters (') are escaped.
2104
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
2105
+ * (see the last example)
2106
+ *
2107
+ * Format of the string is based on Unicode Technical Standard #35:
2108
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
2109
+ * with a few additions (see note 7 below the table).
2110
+ *
2111
+ * Accepted patterns:
2112
+ * | Unit | Pattern | Result examples | Notes |
2113
+ * |---------------------------------|---------|-----------------------------------|-------|
2114
+ * | Era | G..GGG | AD, BC | |
2115
+ * | | GGGG | Anno Domini, Before Christ | 2 |
2116
+ * | | GGGGG | A, B | |
2117
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
2118
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
2119
+ * | | yy | 44, 01, 00, 17 | 5 |
2120
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
2121
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
2122
+ * | | yyyyy | ... | 3,5 |
2123
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
2124
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
2125
+ * | | YY | 44, 01, 00, 17 | 5,8 |
2126
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
2127
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
2128
+ * | | YYYYY | ... | 3,5 |
2129
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
2130
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
2131
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
2132
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
2133
+ * | | RRRRR | ... | 3,5,7 |
2134
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
2135
+ * | | uu | -43, 01, 1900, 2017 | 5 |
2136
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
2137
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
2138
+ * | | uuuuu | ... | 3,5 |
2139
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
2140
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
2141
+ * | | QQ | 01, 02, 03, 04 | |
2142
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
2143
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
2144
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
2145
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
2146
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
2147
+ * | | qq | 01, 02, 03, 04 | |
2148
+ * | | qqq | Q1, Q2, Q3, Q4 | |
2149
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
2150
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
2151
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
2152
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
2153
+ * | | MM | 01, 02, ..., 12 | |
2154
+ * | | MMM | Jan, Feb, ..., Dec | |
2155
+ * | | MMMM | January, February, ..., December | 2 |
2156
+ * | | MMMMM | J, F, ..., D | |
2157
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
2158
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
2159
+ * | | LL | 01, 02, ..., 12 | |
2160
+ * | | LLL | Jan, Feb, ..., Dec | |
2161
+ * | | LLLL | January, February, ..., December | 2 |
2162
+ * | | LLLLL | J, F, ..., D | |
2163
+ * | Local week of year | w | 1, 2, ..., 53 | |
2164
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
2165
+ * | | ww | 01, 02, ..., 53 | |
2166
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
2167
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
2168
+ * | | II | 01, 02, ..., 53 | 7 |
2169
+ * | Day of month | d | 1, 2, ..., 31 | |
2170
+ * | | do | 1st, 2nd, ..., 31st | 7 |
2171
+ * | | dd | 01, 02, ..., 31 | |
2172
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
2173
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
2174
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
2175
+ * | | DDD | 001, 002, ..., 365, 366 | |
2176
+ * | | DDDD | ... | 3 |
2177
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
2178
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
2179
+ * | | EEEEE | M, T, W, T, F, S, S | |
2180
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
2181
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
2182
+ * | | io | 1st, 2nd, ..., 7th | 7 |
2183
+ * | | ii | 01, 02, ..., 07 | 7 |
2184
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
2185
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
2186
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
2187
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
2188
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
2189
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
2190
+ * | | ee | 02, 03, ..., 01 | |
2191
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
2192
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
2193
+ * | | eeeee | M, T, W, T, F, S, S | |
2194
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
2195
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
2196
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
2197
+ * | | cc | 02, 03, ..., 01 | |
2198
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
2199
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
2200
+ * | | ccccc | M, T, W, T, F, S, S | |
2201
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
2202
+ * | AM, PM | a..aa | AM, PM | |
2203
+ * | | aaa | am, pm | |
2204
+ * | | aaaa | a.m., p.m. | 2 |
2205
+ * | | aaaaa | a, p | |
2206
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
2207
+ * | | bbb | am, pm, noon, midnight | |
2208
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
2209
+ * | | bbbbb | a, p, n, mi | |
2210
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
2211
+ * | | BBBB | at night, in the morning, ... | 2 |
2212
+ * | | BBBBB | at night, in the morning, ... | |
2213
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
2214
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
2215
+ * | | hh | 01, 02, ..., 11, 12 | |
2216
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
2217
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
2218
+ * | | HH | 00, 01, 02, ..., 23 | |
2219
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
2220
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
2221
+ * | | KK | 01, 02, ..., 11, 00 | |
2222
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
2223
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
2224
+ * | | kk | 24, 01, 02, ..., 23 | |
2225
+ * | Minute | m | 0, 1, ..., 59 | |
2226
+ * | | mo | 0th, 1st, ..., 59th | 7 |
2227
+ * | | mm | 00, 01, ..., 59 | |
2228
+ * | Second | s | 0, 1, ..., 59 | |
2229
+ * | | so | 0th, 1st, ..., 59th | 7 |
2230
+ * | | ss | 00, 01, ..., 59 | |
2231
+ * | Fraction of second | S | 0, 1, ..., 9 | |
2232
+ * | | SS | 00, 01, ..., 99 | |
2233
+ * | | SSS | 000, 001, ..., 999 | |
2234
+ * | | SSSS | ... | 3 |
2235
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
2236
+ * | | XX | -0800, +0530, Z | |
2237
+ * | | XXX | -08:00, +05:30, Z | |
2238
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
2239
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
2240
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
2241
+ * | | xx | -0800, +0530, +0000 | |
2242
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
2243
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
2244
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
2245
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
2246
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
2247
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
2248
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
2249
+ * | Seconds timestamp | t | 512969520 | 7 |
2250
+ * | | tt | ... | 3,7 |
2251
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
2252
+ * | | TT | ... | 3,7 |
2253
+ * | Long localized date | P | 04/29/1453 | 7 |
2254
+ * | | PP | Apr 29, 1453 | 7 |
2255
+ * | | PPP | April 29th, 1453 | 7 |
2256
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
2257
+ * | Long localized time | p | 12:00 AM | 7 |
2258
+ * | | pp | 12:00:00 AM | 7 |
2259
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
2260
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
2261
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
2262
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
2263
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
2264
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
2265
+ * Notes:
2266
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
2267
+ * are the same as "stand-alone" units, but are different in some languages.
2268
+ * "Formatting" units are declined according to the rules of the language
2269
+ * in the context of a date. "Stand-alone" units are always nominative singular:
2270
+ *
2271
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
2272
+ *
2273
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
2274
+ *
2275
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
2276
+ * the single quote characters (see below).
2277
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
2278
+ * the output will be the same as default pattern for this unit, usually
2279
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
2280
+ * are marked with "2" in the last column of the table.
2281
+ *
2282
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
2283
+ *
2284
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
2285
+ *
2286
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
2287
+ *
2288
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
2289
+ *
2290
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
2291
+ *
2292
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
2293
+ * The output will be padded with zeros to match the length of the pattern.
2294
+ *
2295
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
2296
+ *
2297
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
2298
+ * These tokens represent the shortest form of the quarter.
2299
+ *
2300
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
2301
+ *
2302
+ * | Year | `y` | `u` |
2303
+ * |------|-----|-----|
2304
+ * | AC 1 | 1 | 1 |
2305
+ * | BC 1 | 1 | 0 |
2306
+ * | BC 2 | 2 | -1 |
2307
+ *
2308
+ * Also `yy` always returns the last two digits of a year,
2309
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
2310
+ *
2311
+ * | Year | `yy` | `uu` |
2312
+ * |------|------|------|
2313
+ * | 1 | 01 | 01 |
2314
+ * | 14 | 14 | 14 |
2315
+ * | 376 | 76 | 376 |
2316
+ * | 1453 | 53 | 1453 |
2317
+ *
2318
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
2319
+ * except local week-numbering years are dependent on `options.weekStartsOn`
2320
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
2321
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
2322
+ *
2323
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
2324
+ * so right now these tokens fall back to GMT timezones.
2325
+ *
2326
+ * 7. These patterns are not in the Unicode Technical Standard #35:
2327
+ * - `i`: ISO day of week
2328
+ * - `I`: ISO week of year
2329
+ * - `R`: ISO week-numbering year
2330
+ * - `t`: seconds timestamp
2331
+ * - `T`: milliseconds timestamp
2332
+ * - `o`: ordinal number modifier
2333
+ * - `P`: long localized date
2334
+ * - `p`: long localized time
2335
+ *
2336
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
2337
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2338
+ *
2339
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
2340
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2341
+ *
2342
+ * @param {Date|Number} date - the original date
2343
+ * @param {String} format - the string of tokens
2344
+ * @param {Object} [options] - an object with options.
2345
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
2346
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
2347
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
2348
+ * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
2349
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2350
+ * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
2351
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2352
+ * @returns {String} the formatted date string
2353
+ * @throws {TypeError} 2 arguments required
2354
+ * @throws {RangeError} `date` must not be Invalid Date
2355
+ * @throws {RangeError} `options.locale` must contain `localize` property
2356
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
2357
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
2358
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
2359
+ * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2360
+ * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2361
+ * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2362
+ * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2363
+ * @throws {RangeError} format string contains an unescaped latin alphabet character
2364
+ *
2365
+ * @example
2366
+ * // Represent 11 February 2014 in middle-endian format:
2367
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
2368
+ * //=> '02/11/2014'
2369
+ *
2370
+ * @example
2371
+ * // Represent 2 July 2014 in Esperanto:
2372
+ * import { eoLocale } from 'date-fns/locale/eo'
2373
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
2374
+ * locale: eoLocale
2375
+ * })
2376
+ * //=> '2-a de julio 2014'
2377
+ *
2378
+ * @example
2379
+ * // Escape string by single quote characters:
2380
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
2381
+ * //=> "3 o'clock"
2382
+ */
2383
+
2384
+ function format(dirtyDate, dirtyFormatStr, options) {
2385
+ var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
2386
+ requiredArgs(2, arguments);
2387
+ var formatStr = String(dirtyFormatStr);
2388
+ var defaultOptions = getDefaultOptions();
2389
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
2390
+ var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
2391
+
2392
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
2393
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
2394
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
2395
+ }
2396
+ var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
2397
+
2398
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
2399
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2400
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2401
+ }
2402
+ if (!locale.localize) {
2403
+ throw new RangeError('locale must contain localize property');
2404
+ }
2405
+ if (!locale.formatLong) {
2406
+ throw new RangeError('locale must contain formatLong property');
2407
+ }
2408
+ var originalDate = toDate(dirtyDate);
2409
+ if (!isValid(originalDate)) {
2410
+ throw new RangeError('Invalid time value');
2411
+ }
2412
+
2413
+ // Convert the date in system timezone to the same date in UTC+00:00 timezone.
2414
+ // This ensures that when UTC functions will be implemented, locales will be compatible with them.
2415
+ // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
2416
+ var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
2417
+ var utcDate = subMilliseconds(originalDate, timezoneOffset);
2418
+ var formatterOptions = {
2419
+ firstWeekContainsDate: firstWeekContainsDate,
2420
+ weekStartsOn: weekStartsOn,
2421
+ locale: locale,
2422
+ _originalDate: originalDate
2423
+ };
2424
+ var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2425
+ var firstCharacter = substring[0];
2426
+ if (firstCharacter === 'p' || firstCharacter === 'P') {
2427
+ var longFormatter = longFormatters$1[firstCharacter];
2428
+ return longFormatter(substring, locale.formatLong);
2429
+ }
2430
+ return substring;
2431
+ }).join('').match(formattingTokensRegExp).map(function (substring) {
2432
+ // Replace two single quote characters with one single quote character
2433
+ if (substring === "''") {
2434
+ return "'";
2435
+ }
2436
+ var firstCharacter = substring[0];
2437
+ if (firstCharacter === "'") {
2438
+ return cleanEscapedString(substring);
2439
+ }
2440
+ var formatter = formatters$1[firstCharacter];
2441
+ if (formatter) {
2442
+ if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2443
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2444
+ }
2445
+ if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2446
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2447
+ }
2448
+ return formatter(utcDate, substring, locale.localize, formatterOptions);
2449
+ }
2450
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2451
+ throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
2452
+ }
2453
+ return substring;
2454
+ }).join('');
2455
+ return result;
2456
+ }
2457
+ function cleanEscapedString(input) {
2458
+ var matched = input.match(escapedStringRegExp);
2459
+ if (!matched) {
2460
+ return input;
2461
+ }
2462
+ return matched[1].replace(doubleQuoteRegExp, "'");
2463
+ }
2464
+
269
2465
  function getTimeLeft(endTime) {
270
2466
  const now = new Date();
271
2467
  const end = new Date(endTime);
@@ -284,13 +2480,8 @@ function getTimeLeft(endTime) {
284
2480
  return `${pad(days)} : ${pad(hours)} : ${pad(minutes)} : ${pad(seconds)}`;
285
2481
  }
286
2482
  function formatDate(dateToFormat) {
287
- const formatter = new Intl.DateTimeFormat('en-CA', {
288
- year: 'numeric',
289
- month: '2-digit',
290
- day: '2-digit'
291
- });
292
2483
  const date = new Date(dateToFormat);
293
- return formatter.format(date).replace(/-/g, '/');
2484
+ return format(date, 'dd/MM/yyyy');
294
2485
  }
295
2486
 
296
2487
  const giftSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzExODRfMTY4MSkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjMyMTUgMS41QzQuMTA3MjEgMS41IDMuOTg1NTMgMS41NTA0NSAzLjg5NDM5IDEuNjQzMjVDMy44MDI5NSAxLjczNjM1IDMuNzUgMS44NjQ1MSAzLjc1IDJDMy43NSAyLjEzNTQ5IDMuODAyOTUgMi4yNjM2NSAzLjg5NDM5IDIuMzU2NzVDMy45ODU1MyAyLjQ0OTU1IDQuMTA3MjEgMi41IDQuMjMyMTUgMi41SDUuMzE3MTNDNS4yODA5MyAyLjQxNDMzIDUuMjM5MjggMi4zMjU1OCA1LjE5MTc4IDIuMjM3NjRDNC45NDg4NCAxLjc4NzkgNC42MzY5OSAxLjUgNC4yMzIxNSAxLjVaTTUuNSAzLjVWNUwxLjggNUMxLjY1MTc0IDUgMS41NzA2MSA0Ljk5OTYxIDEuNTEyMzIgNC45OTQ4NUMxLjUxIDQuOTk0NjYgMS41MDc4IDQuOTk0NDcgMS41MDU3MyA0Ljk5NDI4QzEuNTA1NTQgNC45OTIyIDEuNTA1MzQgNC45OSAxLjUwNTE1IDQuOTg3NjhDMS41MDAzOSA0LjkyOTM5IDEuNSA0Ljg0ODI2IDEuNSA0LjdWMy44QzEuNSAzLjY1MTc0IDEuNTAwMzkgMy41NzA2MSAxLjUwNTE1IDMuNTEyMzJDMS41MDUzNCAzLjUxIDEuNTA1NTQgMy41MDc4IDEuNTA1NzMgMy41MDU3MkMxLjUwNzggMy41MDU1MyAxLjUxIDMuNTA1MzQgMS41MTIzMiAzLjUwNTE1QzEuNTcwNjEgMy41MDAzOSAxLjY1MTc0IDMuNSAxLjggMy41SDUuNVpNMi44MzQ3NiAyLjVDMi43NzkxMSAyLjM0MDY3IDIuNzUgMi4xNzE2OSAyLjc1IDJDMi43NSAxLjYwNTA1IDIuOTA0MDEgMS4yMjQ1MSAzLjE4MDk0IDAuOTQyNTM5QzMuNDU4MTcgMC42NjAyNjUgMy44MzYxMiAwLjUgNC4yMzIxNSAwLjVDNS4xMjk1IDAuNSA1LjY4NjI3IDEuMTA5MjMgNiAxLjYzNjEyQzYuMzEzNzQgMS4xMDkyMyA2Ljg3MDUxIDAuNSA3Ljc2Nzg2IDAuNUM4LjE2Mzg5IDAuNSA4LjU0MTgzIDAuNjYwMjY1IDguODE5MDYgMC45NDI1MzlDOS4wOTYgMS4yMjQ1MSA5LjI1IDEuNjA1MDUgOS4yNSAyQzkuMjUgMi4xNzE2OSA5LjIyMDkgMi4zNDA2NyA5LjE2NTI0IDIuNUwxMC4yMTYgMi41QzEwLjM0MjEgMi40OTk5OCAxMC40NjUgMi40OTk5NyAxMC41NjkxIDIuNTA4NDdDMTAuNjgzNCAyLjUxNzgxIDEwLjgxODMgMi41Mzk4NCAxMC45NTQgMi42MDg5OUMxMS4xNDIyIDIuNzA0ODcgMTEuMjk1MSAyLjg1Nzg1IDExLjM5MSAzLjA0NjAxQzExLjQ2MDIgMy4xODE3MiAxMS40ODIyIDMuMzE2NTkgMTEuNDkxNSAzLjQzMDg5QzExLjUgMy41MzQ5NiAxMS41IDMuNjU3ODUgMTEuNSAzLjc4NDA0VjQuNzE1OTZDMTEuNSA0Ljg0MjE1IDExLjUgNC45NjUwNCAxMS40OTE1IDUuMDY5MTJDMTEuNDgyMiA1LjE4MzQxIDExLjQ2MDIgNS4zMTgyOCAxMS4zOTEgNS40NTM5OUMxMS4yOTUxIDUuNjQyMTUgMTEuMTQyMiA1Ljc5NTEzIDEwLjk1NCA1Ljg5MTAxQzEwLjgxODMgNS45NjAxNiAxMC42ODM0IDUuOTgyMTkgMTAuNTY5MSA1Ljk5MTUzQzEwLjU0NjkgNS45OTMzNCAxMC41MjM4IDUuOTk0NzcgMTAuNSA1Ljk5NTg5VjkuNDE5MjhDMTAuNSA5LjY4Mjg1IDEwLjUgOS45MTAyMyAxMC40ODQ3IDEwLjA5NzVDMTAuNDY4NiAxMC4yOTUyIDEwLjQzMjkgMTAuNDkxOCAxMC4zMzY1IDEwLjY4MUMxMC4xOTI3IDEwLjk2MzIgOS45NjMyMyAxMS4xOTI3IDkuNjgwOTkgMTEuMzM2NUM5LjQ5MTggMTEuNDMyOSA5LjI5NTE5IDExLjQ2ODYgOS4wOTc1MiAxMS40ODQ3QzguOTEwMjMgMTEuNSA4LjY4Mjg2IDExLjUgOC40MTkyOSAxMS41SDYuMDAwN0M2LjAwMDQ3IDExLjUgNi4wMDAyNCAxMS41IDYgMTEuNUM1Ljk5OTc3IDExLjUgNS45OTk1NCAxMS41IDUuOTk5MyAxMS41SDMuNTgwNzJDMy4zMTcxNSAxMS41IDMuMDg5NzcgMTEuNSAyLjkwMjQ5IDExLjQ4NDdDMi43MDQ4MiAxMS40Njg2IDIuNTA4MjEgMTEuNDMyOSAyLjMxOTAyIDExLjMzNjVDMi4wMzY3NyAxMS4xOTI3IDEuODA3MyAxMC45NjMyIDEuNjYzNDkgMTAuNjgxQzEuNTY3MSAxMC40OTE4IDEuNTMxNDQgMTAuMjk1MiAxLjUxNTI5IDEwLjA5NzVDMS40OTk5OSA5LjkxMDIzIDEuNDk5OTkgOS42ODI4NSAxLjUgOS40MTkyN0wxLjUgNS45OTU4OUMxLjQ3NjIxIDUuOTk0NzcgMS40NTMxMiA1Ljk5MzM0IDEuNDMwODkgNS45OTE1M0MxLjMxNjU5IDUuOTgyMTkgMS4xODE3MiA1Ljk2MDE1IDEuMDQ2MDEgNS44OTEwMUMwLjg1Nzg1IDUuNzk1MTMgMC43MDQ4NyA1LjY0MjE1IDAuNjA4OTk2IDUuNDUzOTlDMC41Mzk4NDcgNS4zMTgyOCAwLjUxNzgxNCA1LjE4MzQxIDAuNTA4NDc1IDUuMDY5MTFDMC40OTk5NzIgNC45NjUwNCAwLjQ5OTk4NiA0Ljg0MjE0IDAuNTAwMDAxIDQuNzE1OTVMMC41MDAwMDMgMy44QzAuNTAwMDAzIDMuNzk0NjggMC41MDAwMDIgMy43ODkzNiAwLjUwMDAwMSAzLjc4NDA1QzAuNDk5OTg2IDMuNjU3ODYgMC40OTk5NzIgMy41MzQ5NiAwLjUwODQ3NSAzLjQzMDg5QzAuNTE3ODE0IDMuMzE2NTkgMC41Mzk4NDcgMy4xODE3MiAwLjYwODk5NiAzLjA0NjAxQzAuNzA0ODcgMi44NTc4NSAwLjg1Nzg1IDIuNzA0ODcgMS4wNDYwMSAyLjYwODk5QzEuMTgxNzIgMi41Mzk4NCAxLjMxNjU5IDIuNTE3ODEgMS40MzA4OSAyLjUwODQ3QzEuNTM0OTcgMi40OTk5NyAxLjY1Nzg2IDIuNDk5OTggMS43ODQwNSAyLjVDMS43ODkzNiAyLjUgMS43OTQ2OCAyLjUgMS44IDIuNUgyLjgzNDc2Wk0yLjUgNlY5LjRDMi41IDkuNjg4MjggMi41MDAzOSA5Ljg3NDQxIDIuNTExOTcgMTAuMDE2MUMyLjUyMzA2IDEwLjE1MTkgMi41NDE5IDEwLjIwMjMgMi41NTQ1IDEwLjIyN0MyLjYwMjQ0IDEwLjMyMTEgMi42Nzg5MyAxMC4zOTc2IDIuNzczMDEgMTAuNDQ1NUMyLjc5NzczIDEwLjQ1ODEgMi44NDgwOSAxMC40NzY5IDIuOTgzOTIgMTAuNDg4QzMuMTI1NTkgMTAuNDk5NiAzLjMxMTczIDEwLjUgMy42IDEwLjVINS41VjZIMi41Wk02LjUgNlYxMC41SDguNEM4LjY4ODI4IDEwLjUgOC44NzQ0MiAxMC40OTk2IDkuMDE2MDggMTAuNDg4QzkuMTUxOTIgMTAuNDc2OSA5LjIwMjI4IDEwLjQ1ODEgOS4yMjcgMTAuNDQ1NUM5LjMyMTA4IDEwLjM5NzYgOS4zOTc1NyAxMC4zMjExIDkuNDQ1NTEgMTAuMjI3QzkuNDU4MSAxMC4yMDIzIDkuNDc2OTQgMTAuMTUxOSA5LjQ4ODA0IDEwLjAxNjFDOS40OTk2MSA5Ljg3NDQxIDkuNSA5LjY4ODI4IDkuNSA5LjRWNkg2LjVaTTEwLjIgNUMxMC4zNDgzIDUgMTAuNDI5NCA0Ljk5OTYxIDEwLjQ4NzcgNC45OTQ4NUMxMC40OSA0Ljk5NDY2IDEwLjQ5MjIgNC45OTQ0NiAxMC40OTQzIDQuOTk0MjdDMTAuNDk0NSA0Ljk5MjIgMTAuNDk0NyA0Ljk5IDEwLjQ5NDkgNC45ODc2OEMxMC40OTk2IDQuOTI5MzkgMTAuNSA0Ljg0ODI2IDEwLjUgNC43VjMuOEMxMC41IDMuNjUxNzQgMTAuNDk5NiAzLjU3MDYxIDEwLjQ5NDkgMy41MTIzMkMxMC40OTQ3IDMuNTEgMTAuNDk0NSAzLjUwNzggMTAuNDk0MyAzLjUwNTcyQzEwLjQ5MjIgMy41MDU1MyAxMC40OSAzLjUwNTM0IDEwLjQ4NzcgMy41MDUxNUMxMC40Mjk0IDMuNTAwMzkgMTAuMzQ4MyAzLjUgMTAuMiAzLjVINi41VjVIMTAuMlpNNy43Njc4NiAyLjVDNy44OTI4IDIuNSA4LjAxNDQ3IDIuNDQ5NTUgOC4xMDU2MiAyLjM1Njc1QzguMTk3MDYgMi4yNjM2NSA4LjI1IDIuMTM1NDkgOC4yNSAyQzguMjUgMS44NjQ1MSA4LjE5NzA2IDEuNzM2MzUgOC4xMDU2MiAxLjY0MzI1QzguMDE0NDcgMS41NTA0NSA3Ljg5Mjc5IDEuNSA3Ljc2Nzg2IDEuNUM3LjM2MzAyIDEuNSA3LjA1MTE2IDEuNzg3OSA2LjgwODIzIDIuMjM3NjRDNi43NjA3MiAyLjMyNTU4IDYuNzE5MDcgMi40MTQzMyA2LjY4Mjg4IDIuNUg3Ljc2Nzg2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzExODRfMTY4MSkiLz4KPC9nPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzExODRfMTY4MSIgeDE9IjYiIHkxPSIwLjUiIHgyPSI2IiB5Mj0iMTEuNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRUE5MDE4Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0UwQTg0RSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzExODRfMTY4MSI+CjxyZWN0IHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K';
@@ -1434,7 +3625,7 @@ var EWalletTypes;
1434
3625
  EWalletTypes[EWalletTypes["Mixed"] = 2] = "Mixed";
1435
3626
  })(EWalletTypes || (EWalletTypes = {}));
1436
3627
 
1437
- const casinoChallengeDetailsCss = ".container {\n font-family: var(--emw--font-family-secondary, \"Montserrat\", sans-serif);\n background: var(--emw--color-background, #000);\n min-height: 100vh;\n padding-top: 16px;\n container-type: inline-size;\n container-name: challenges-details;\n min-width: 375px;\n width: 100%;\n margin: 0 auto;\n position: relative;\n}\n\n.challenges-header {\n display: none;\n}\n\n.back-button {\n display: flex;\n align-items: center;\n padding: 14px 0 14px 10px;\n outline: none;\n background: var(--emw--color-background-secondary, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n border: none;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n cursor: pointer;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.back-button__icon {\n margin: 0 4px;\n}\n.back-button__text {\n margin-left: 4px;\n}\n\n.details {\n min-width: 308px;\n box-sizing: border-box;\n position: relative;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n padding: 16px;\n min-width: 375px;\n width: 100%;\n}\n.details.grayed {\n opacity: 0.5;\n}\n.details__general-info {\n max-width: 344px;\n padding-bottom: 16px;\n}\n.details__general-info-image-container {\n position: relative;\n margin-bottom: 22px;\n}\n.details__general-info-image {\n display: block;\n width: 344px;\n height: 226px;\n border-radius: var(--emw--border-radius-medium, 16px);\n}\n.details__general-info-image.grayed {\n opacity: 0.5;\n}\n.details__general-info-timer-badge {\n position: absolute;\n background: var(--emw--color-white, #fff);\n top: 6px;\n right: 6px;\n border-radius: var(--emw--border-radius-large, 30px);\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(20px);\n}\n.details__general-info-timer-badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-gray-300, #083b17);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-title {\n margin: 0 0 4px;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-end-date_label {\n color: var(--emw--color-gray-150, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n margin: 0;\n}\n.details__general-info-end-date_value {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-action-button,\n.details .footer-action-button {\n width: 100%;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-medium, 16px);\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #083b17);\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n text-align: center;\n text-transform: uppercase;\n font-weight: var(--emw--font-weight-bold, 700);\n height: 51px;\n padding: 16px 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n gap: 10px;\n}\n.details__general-info-action-button:hover,\n.details .footer-action-button:hover {\n border-color: var(--emw--color-secondary, #083b17);\n cursor: pointer;\n}\n.details__general-info-action-button.filled,\n.details .footer-action-button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n color: var(--emw--color-white, #fff);\n border-color: var(--emw--color-gray-300, #083b17);\n}\n.details__general-info-action-button.filled:hover,\n.details .footer-action-button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n}\n.details__general-info-action-button.grayed,\n.details .footer-action-button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n background: var(--emw--color-black-150, #000000);\n border-color: var(--emw--button-disabled-border-color, #727672);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n.details__general-info-action-button.grayed:hover,\n.details .footer-action-button.grayed:hover {\n color: var(--emw--color-white, #fff);\n}\n.details__general-info-action-button:disabled, .details__general-info-action-button:disabled:hover,\n.details .footer-action-button:disabled,\n.details .footer-action-button:disabled:hover {\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n border: 2px solid var(--emw--button-disabled-border-color, #727672);\n opacity: 0.7;\n}\n.details .footer-action-button {\n height: 44px;\n padding: 14px 20px;\n font-size: var(--emw--font-size-sm, 14px);\n}\n.details__general-info-action-button {\n display: none;\n margin-top: 32px;\n}\n.details__tabs-container {\n flex-grow: 1;\n max-width: 100%;\n}\n.details__tabs {\n position: relative;\n display: flex;\n justify-content: flex-start;\n border-bottom: 1px solid var(--emw--border-warning-color, #ea9018);\n}\n.details__tab {\n padding: 10px 20px;\n cursor: pointer;\n position: relative;\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-gray-300, #555);\n display: flex;\n width: 33.3333333333%;\n padding: 12px 10px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n}\n.details__tab.active {\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n background: var(--emw--active-tab, linear-gradient(180deg, #ea9018 0%, #e0a84e 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.details__tab {\n color: var(--emw--color-gray-100, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n}\n.details__tab:nth-of-type(1).active ~ .active-tab-indicator {\n left: 0;\n width: 33.3333333333%;\n}\n.details__tab:nth-of-type(2).active ~ .active-tab-indicator {\n left: 33.3333333333%;\n width: 33.3333333333%;\n}\n.details__tab:nth-of-type(3).active ~ .active-tab-indicator {\n left: 66.6666666667%;\n width: 33.3333333333%;\n}\n.details .active-tab-indicator {\n position: absolute;\n bottom: -3px;\n height: 2px;\n background: var(--emw--active-tab-indicator, linear-gradient(180deg, rgba(234, 144, 24, 0.7) 0%, rgba(224, 168, 78, 0.7) 100%), #727672);\n transition: left 0.3s ease, width 0.3s ease;\n}\n.details .levels__tab {\n margin-top: 22px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .level {\n display: flex;\n padding: 20px;\n flex-direction: column;\n align-items: flex-start;\n border-radius: var(--emw--border-radius-small, 12px);\n background-color: var(--emw--color-background, rgba(114, 118, 114, 0.2));\n}\n.details .level.grayed {\n background: rgba(114, 118, 114, 0.15);\n}\n.details .level.active {\n background: linear-gradient(90deg, rgba(30, 101, 79, 0.2) 0%, rgba(28, 141, 86, 0.2) 100%);\n border: 2px solid var(--Gradient-Blue, #003e5c);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n.details .level.completed {\n background: linear-gradient(90deg, rgba(0, 62, 92, 0.3) 0.05%, rgba(17, 59, 33, 0.3) 87.69%);\n}\n.details .level__status {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n}\n.details .level__title {\n width: 100%;\n display: flex;\n justify-content: space-between;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n margin-bottom: 10px;\n}\n.details .level__title .completed, .details .level__title .in-progress {\n color: var(--emw--color-valid, #00b74f);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n text-align: right;\n line-height: 22px;\n}\n.details .level__title.grayed {\n color: var(--emw--disabled-color, #727672);\n}\n.details .level__progress {\n width: 100%;\n margin-bottom: 10px;\n}\n.details .level__icon {\n display: flex;\n margin: 5px 6px 5px 0;\n opacity: 1;\n}\n.details .level__icon img {\n display: block;\n width: 12px;\n height: 12px;\n}\n.details .level__icon img.grayed {\n opacity: 0.5;\n}\n.details .level__bonus, .details .level__target {\n display: flex;\n align-items: flex-start;\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n margin-bottom: 4px;\n}\n.details .level__value {\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n width: 100%;\n}\n.details .level__value.grayed {\n opacity: 0.5;\n}\n.details .games__tab {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n padding: 22px 0;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .games__tab .game {\n position: relative;\n width: 105px;\n height: 85px;\n cursor: pointer;\n}\n.details .games__tab .game img {\n width: 100%;\n height: 100%;\n border-radius: var(--emw--border-radius-medium, 16px);\n}\n.details .games__tab .game .contribution {\n position: absolute;\n top: 4px;\n right: 4px;\n color: var(--emw--color-white, #fff);\n border-radius: var(--emw--border-radius-small, 12px);\n border: 1px solid var(--Gradient-Blue, #003e5c);\n background: rgba(0, 0, 0, 0.5);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(5px);\n padding: 0 8px;\n font-size: var(--emw--font-size-2x-small, 8px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 22px;\n text-align: center;\n}\n.details .rules__tab {\n display: flex;\n flex-direction: column;\n padding: 22px 0;\n gap: 8px;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .rules__tab .rule {\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-small, 14px);\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n}\n.details .rules__tab .link {\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n padding: 14px 0;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.details .rules__tab .contributionType {\n margin: 24px 0;\n}\n.details .rules__tab .contributionRule {\n margin: 0;\n}\n.details .rules__tab .contribution__label {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-white, #fff);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n}\n.details .rules__tab .contribution__type__label {\n margin-right: 4px;\n}\n.details .rules__tab .contribution__value {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-gray-200, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n}\n.details .rules__tab .contribution__rule__value {\n margin-bottom: 8px;\n}\n.details__button {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex: 1 0 0;\n height: 42px;\n padding: 14px 20px;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #083b17);\n background-color: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n}\n\n.button__container {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n width: calc(100% - 32px);\n padding: 16px 16px 22px 16px;\n justify-content: center;\n align-items: center;\n gap: 4px;\n border-top: 1px solid var(--emw--color-blue, #003e5c);\n background: var(--emw--color-background, #000);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n\n.lds-dual-ring {\n display: block;\n width: 80px;\n height: 80px;\n margin: 80px auto 0 auto;\n}\n\n.lds-dual-ring:after {\n content: \" \";\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));\n border-color: var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));\n animation: lds-dual-ring 1.2s linear infinite;\n}\n\n@keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.notification {\n display: flex;\n align-items: flex-start;\n border-radius: var(--emw--border-radius-small, 12px);\n background: rgba(188, 252, 177, 0.1);\n display: flex;\n padding: 16px;\n align-items: flex-start;\n gap: 10px;\n margin: 16px 16px 22px 16px;\n}\n.notification__icon {\n margin-top: 2px;\n}\n.notification__message, .notification__title {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n}\n.notification__title {\n background: var(--emw--color-background-secondary, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.notification__column {\n display: flex;\n flex-direction: column;\n}\n\n@container challenges-details (min-width: 768px) {\n .button__container {\n display: none;\n }\n .details {\n gap: 36px;\n flex-wrap: nowrap;\n }\n .details__general-info-action-button {\n display: flex;\n }\n .details__general-info-image {\n width: 380px;\n min-height: 226px;\n height: auto;\n }\n .details__general-info {\n max-width: 380px;\n }\n .details__tabs__container {\n max-width: calc(100% - 380px);\n }\n .details .levels__tab {\n gap: 20px;\n height: 60vh;\n }\n .details .levels__tab .level__icon {\n width: 14px;\n height: 14px;\n margin: 4px 6px 4px 0px;\n }\n .details .levels__tab .level__icon img {\n width: 100%;\n height: 100%;\n }\n .details .levels__tab .level__title {\n font-size: var(--emw--font-size-medium, 16px);\n }\n .details .levels__tab .level__title .completed, .details .levels__tab .level__title .in-progress {\n font-size: var(--emw--font-size-sm, 14px);\n }\n .details .levels__tab .level__bonus, .details .levels__tab .level__target, .details .levels__tab .level__value {\n font-size: var(--emw--font-size-sm, 14px);\n }\n .details .games__tab, .details .rules__tab {\n height: 60vh;\n }\n .details .games__tab {\n gap: 20px;\n min-width: 340px;\n }\n .details .games__tab .game {\n width: 160px;\n height: 110px;\n }\n .details .games__tab .game .contribution {\n top: 8px;\n right: 8px;\n padding: 4px 10px;\n font-size: var(--emw--font-size-2x-small, 10px);\n line-height: 18px;\n }\n .challenges-header {\n margin: 0 0 32px;\n display: flex;\n justify-content: space-between;\n }\n .challenges-title {\n margin: 0;\n display: flex;\n gap: 10px;\n align-items: center;\n font-size: var(--emw--font-size-x-large, 24px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #ffffff);\n }\n .challenges-tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-200, #c8d6ce);\n background-color: var(--emw--color-background-secondary, #272727);\n }\n .challenges-tab {\n padding: 10px 16px;\n border-radius: 40px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n cursor: pointer;\n text-align: center;\n width: 95px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n }\n .challenges-tab.active {\n color: var(--emw--color-white, #ffffff);\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n }\n .challenges-tab:last-child {\n width: inherit;\n padding: 10px 16px;\n }\n}";
3628
+ const casinoChallengeDetailsCss = ".container {\n font-family: var(--emw--font-family-secondary, \"Montserrat\", sans-serif);\n background: var(--emw--color-background, #000);\n min-height: 100vh;\n padding-top: 16px;\n container-type: inline-size;\n container-name: challenges-details;\n min-width: 375px;\n width: 100%;\n margin: 0 auto;\n position: relative;\n}\n\n.challenges-header {\n display: none;\n}\n\n.back-button {\n display: flex;\n align-items: center;\n padding: 14px 0 14px 10px;\n outline: none;\n background: var(--emw--color-background-secondary, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n border: none;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n cursor: pointer;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.back-button__icon {\n margin: 0 4px;\n}\n.back-button__text {\n margin-left: 4px;\n}\n\n.details {\n min-width: 308px;\n box-sizing: border-box;\n position: relative;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n padding: 16px;\n min-width: 375px;\n width: 100%;\n}\n.details.grayed {\n opacity: 0.5;\n}\n.details__general-info {\n min-width: 344px;\n padding-bottom: 16px;\n width: 100%;\n}\n.details__general-info-image-container {\n position: relative;\n margin-bottom: 22px;\n}\n.details__general-info-image {\n display: block;\n min-width: 344px;\n height: 226px;\n border-radius: var(--emw--border-radius-medium, 16px);\n width: 100%;\n}\n.details__general-info-image.grayed {\n opacity: 0.5;\n}\n.details__general-info-timer-badge {\n position: absolute;\n background: var(--emw--color-white, #fff);\n top: 6px;\n right: 6px;\n border-radius: var(--emw--border-radius-large, 30px);\n padding: 2px 12px;\n line-height: 22px;\n font-weight: var(--emw--font-weight-medium, 500);\n font-size: var(--emw--font-size-x-small, 12px);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(20px);\n}\n.details__general-info-timer-badge span {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.expired {\n background: var(--emw--background-gray-color, rgba(250, 250, 250, 0.5019607843));\n border: 1px solid var(--emw--border-gray-color, #292c29);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.completed {\n background: var(--emw--background-success-color, #c9f0d7);\n border: 1px solid var(--emw--border-success-color, #00b74f);\n color: var(--emw--color-gray-300, #083b17);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.forfeited {\n background: var(--emw--background-errored-color, #ffe1df);\n border: 1px solid var(--emw--border-errored-color, #d6421e);\n color: var(--emw--errored-color, #850606);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-timer-badge.paused {\n background: var(--emw--background-warning-color, #f8e4ad);\n border: 1px solid var(--emw--border-warning-color, #ea9018);\n color: var(--emw--warning-color, #6d460a);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-title {\n margin: 0 0 4px;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-end-date_label {\n color: var(--emw--color-gray-150, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n margin: 0;\n}\n.details__general-info-end-date_value {\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.details__general-info-action-button,\n.details .footer-action-button {\n width: 100%;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-medium, 16px);\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #083b17);\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n text-align: center;\n text-transform: uppercase;\n font-weight: var(--emw--font-weight-bold, 700);\n height: 51px;\n padding: 16px 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n gap: 10px;\n}\n.details__general-info-action-button:hover,\n.details .footer-action-button:hover {\n border-color: var(--emw--color-secondary, #083b17);\n cursor: pointer;\n}\n.details__general-info-action-button.filled,\n.details .footer-action-button.filled {\n background-color: var(--emw--button-background-primary-color, #18ce51);\n color: var(--emw--color-white, #fff);\n border-color: var(--emw--color-gray-300, #083b17);\n}\n.details__general-info-action-button.filled:hover,\n.details .footer-action-button.filled:hover {\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n}\n.details__general-info-action-button.grayed,\n.details .footer-action-button.grayed {\n color: var(--emw--color-gray-50, #e2e2e2);\n background: var(--emw--color-black-150, #000000);\n border-color: var(--emw--button-disabled-border-color, #727672);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n.details__general-info-action-button.grayed:hover,\n.details .footer-action-button.grayed:hover {\n color: var(--emw--color-white, #fff);\n}\n.details__general-info-action-button:disabled, .details__general-info-action-button:disabled:hover,\n.details .footer-action-button:disabled,\n.details .footer-action-button:disabled:hover {\n color: var(--emw--color-gray-50, #e2e2e2);\n cursor: not-allowed;\n border: 2px solid var(--emw--button-disabled-border-color, #727672);\n opacity: 0.7;\n}\n.details .footer-action-button {\n height: 44px;\n padding: 14px 20px;\n font-size: var(--emw--font-size-sm, 14px);\n}\n.details__general-info-action-button {\n display: none;\n margin-top: 32px;\n}\n.details__tabs-container {\n flex-grow: 1;\n max-width: 100%;\n}\n.details__tabs {\n position: relative;\n display: flex;\n justify-content: flex-start;\n border-bottom: 1px solid var(--emw--border-warning-color, #ea9018);\n}\n.details__tab {\n padding: 10px 20px;\n cursor: pointer;\n position: relative;\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-gray-300, #555);\n display: flex;\n width: 33.3333333333%;\n padding: 12px 10px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n}\n.details__tab.active {\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n background: var(--emw--active-tab, linear-gradient(180deg, #ea9018 0%, #e0a84e 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.details__tab {\n color: var(--emw--color-gray-100, #727672);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n}\n.details__tab:nth-of-type(1).active ~ .active-tab-indicator {\n left: 0;\n width: 33.3333333333%;\n}\n.details__tab:nth-of-type(2).active ~ .active-tab-indicator {\n left: 33.3333333333%;\n width: 33.3333333333%;\n}\n.details__tab:nth-of-type(3).active ~ .active-tab-indicator {\n left: 66.6666666667%;\n width: 33.3333333333%;\n}\n.details .active-tab-indicator {\n position: absolute;\n bottom: -3px;\n height: 2px;\n background: var(--emw--active-tab-indicator, linear-gradient(180deg, rgba(234, 144, 24, 0.7) 0%, rgba(224, 168, 78, 0.7) 100%), #727672);\n transition: left 0.3s ease, width 0.3s ease;\n}\n.details .levels__tab {\n margin-top: 22px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .level {\n display: flex;\n padding: 20px;\n flex-direction: column;\n align-items: flex-start;\n border-radius: var(--emw--border-radius-small, 12px);\n background-color: var(--emw--color-background, rgba(114, 118, 114, 0.2));\n}\n.details .level.grayed {\n background: rgba(114, 118, 114, 0.15);\n}\n.details .level.active {\n background: linear-gradient(90deg, rgba(30, 101, 79, 0.2) 0%, rgba(28, 141, 86, 0.2) 100%);\n border: 2px solid var(--Gradient-Blue, #003e5c);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n.details .level.completed {\n background: linear-gradient(90deg, rgba(0, 62, 92, 0.3) 0.05%, rgba(17, 59, 33, 0.3) 87.69%);\n}\n.details .level__status {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n}\n.details .level__title {\n width: 100%;\n display: flex;\n justify-content: space-between;\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n margin-bottom: 10px;\n}\n.details .level__title .completed, .details .level__title .in-progress {\n color: var(--emw--color-valid, #00b74f);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n text-align: right;\n line-height: 22px;\n}\n.details .level__title.grayed {\n color: var(--emw--disabled-color, #727672);\n}\n.details .level__progress {\n width: 100%;\n margin-bottom: 10px;\n}\n.details .level__icon {\n display: flex;\n margin: 5px 6px 5px 0;\n opacity: 1;\n}\n.details .level__icon img {\n display: block;\n width: 12px;\n height: 12px;\n}\n.details .level__icon img.grayed {\n opacity: 0.5;\n}\n.details .level__bonus, .details .level__target {\n display: flex;\n align-items: flex-start;\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n margin-bottom: 4px;\n}\n.details .level__value {\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n width: 100%;\n}\n.details .level__value.grayed {\n opacity: 0.5;\n}\n.details .games__tab {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n padding: 22px 0;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .games__tab .game {\n position: relative;\n width: 105px;\n height: 85px;\n cursor: pointer;\n}\n.details .games__tab .game img {\n width: 100%;\n height: 100%;\n border-radius: var(--emw--border-radius-medium, 16px);\n}\n.details .games__tab .game .contribution {\n position: absolute;\n top: 4px;\n right: 4px;\n color: var(--emw--color-white, #fff);\n border-radius: var(--emw--border-radius-small, 12px);\n border: 1px solid var(--Gradient-Blue, #003e5c);\n background: rgba(0, 0, 0, 0.5);\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\n backdrop-filter: blur(5px);\n padding: 0 8px;\n font-size: var(--emw--font-size-2x-small, 8px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 22px;\n text-align: center;\n}\n.details .rules__tab {\n display: flex;\n flex-direction: column;\n padding: 22px 0;\n gap: 8px;\n overflow-y: auto;\n height: 300px;\n padding-bottom: 80px;\n}\n.details .rules__tab .rule {\n color: var(--emw--color-gray-200, #c8d6ce);\n font-size: var(--emw--font-size-small, 14px);\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n}\n.details .rules__tab .link {\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n background: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n padding: 14px 0;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.details .rules__tab .contributionType {\n margin: 24px 0;\n}\n.details .rules__tab .contributionRule {\n margin: 0;\n}\n.details .rules__tab .contribution__label {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-white, #fff);\n font-weight: var(--emw--font-weight-bold, 700);\n line-height: 18px;\n}\n.details .rules__tab .contribution__type__label {\n margin-right: 4px;\n}\n.details .rules__tab .contribution__value {\n font-size: var(--emw--font-size-small, 14px);\n color: var(--emw--color-gray-200, #c8d6ce);\n font-weight: var(--emw--font-weight-medium, 500);\n}\n.details .rules__tab .contribution__rule__value {\n margin-bottom: 8px;\n}\n.details__button {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex: 1 0 0;\n height: 42px;\n padding: 14px 20px;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #083b17);\n background-color: var(--emw--button-background-color, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n color: var(--emw--color-white, #fff);\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n text-transform: uppercase;\n}\n\n.button__container {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n width: calc(100% - 32px);\n padding: 16px 16px 22px 16px;\n justify-content: center;\n align-items: center;\n gap: 4px;\n border-top: 1px solid var(--emw--color-blue, #003e5c);\n background: var(--emw--color-background, #000);\n box-shadow: 0 0 20px 0 rgba(188, 252, 177, 0.2);\n}\n\n.lds-dual-ring {\n display: block;\n width: 80px;\n height: 80px;\n margin: 80px auto 0 auto;\n}\n\n.lds-dual-ring:after {\n content: \" \";\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));\n border-color: var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));\n animation: lds-dual-ring 1.2s linear infinite;\n}\n\n@keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.notification {\n display: flex;\n align-items: flex-start;\n border-radius: var(--emw--border-radius-small, 12px);\n background: rgba(188, 252, 177, 0.1);\n display: flex;\n padding: 16px;\n align-items: flex-start;\n gap: 10px;\n margin: 16px 16px 22px 16px;\n}\n.notification__icon {\n margin-top: 2px;\n}\n.notification__message, .notification__title {\n color: var(--emw--color-gray-50, #e2e2e2);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n}\n.notification__title {\n background: var(--emw--color-background-secondary, linear-gradient(180deg, #24b24e 0%, #18ce51 100%));\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n.notification__column {\n display: flex;\n flex-direction: column;\n}\n\n@container challenges-details (min-width: 768px) {\n .button__container {\n display: none;\n }\n .details {\n gap: 36px;\n flex-wrap: nowrap;\n }\n .details__general-info-action-button {\n display: flex;\n }\n .details__general-info-image {\n width: 380px;\n height: 248px;\n object-fit: cover;\n }\n .details__general-info {\n max-width: 380px;\n }\n .details__tabs__container {\n max-width: calc(100% - 380px);\n }\n .details .levels__tab {\n gap: 20px;\n height: 60vh;\n }\n .details .levels__tab .level__icon {\n width: 14px;\n height: 14px;\n margin: 4px 6px 4px 0px;\n }\n .details .levels__tab .level__icon img {\n width: 100%;\n height: 100%;\n }\n .details .levels__tab .level__title {\n font-size: var(--emw--font-size-medium, 16px);\n }\n .details .levels__tab .level__title .completed, .details .levels__tab .level__title .in-progress {\n font-size: var(--emw--font-size-sm, 14px);\n }\n .details .levels__tab .level__bonus, .details .levels__tab .level__target, .details .levels__tab .level__value {\n font-size: var(--emw--font-size-sm, 14px);\n }\n .details .games__tab, .details .rules__tab {\n height: 60vh;\n }\n .details .games__tab {\n gap: 20px;\n min-width: 340px;\n }\n .details .games__tab .game {\n width: 160px;\n height: 110px;\n }\n .details .games__tab .game .contribution {\n top: 8px;\n right: 8px;\n padding: 4px 10px;\n font-size: var(--emw--font-size-2x-small, 10px);\n line-height: 18px;\n }\n .challenges-header {\n margin: 0 0 32px;\n display: flex;\n justify-content: space-between;\n }\n .challenges-title {\n margin: 0;\n display: flex;\n gap: 10px;\n align-items: center;\n font-size: var(--emw--font-size-x-large, 24px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #ffffff);\n }\n .challenges-tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-200, #c8d6ce);\n background-color: var(--emw--color-background-secondary, #272727);\n }\n .challenges-tab {\n padding: 10px 16px;\n border-radius: 40px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n cursor: pointer;\n text-align: center;\n width: 95px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n }\n .challenges-tab.active {\n color: var(--emw--color-white, #ffffff);\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n }\n .challenges-tab:last-child {\n width: inherit;\n padding: 10px 16px;\n }\n}";
1438
3629
  const CasinoChallengeDetailsStyle0 = casinoChallengeDetailsCss;
1439
3630
 
1440
3631
  const CasinoChallengeDetails = class {
@@ -1455,18 +3646,21 @@ const CasinoChallengeDetails = class {
1455
3646
  var _a;
1456
3647
  if (!level)
1457
3648
  return '';
1458
- const minbet = ((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet)
1459
- ? `, ${translate('minBet', this.language)} ${currencySymbol + level.BetRange.MinBet}`
1460
- : '';
1461
3649
  switch (level.LevelTargetType) {
1462
- case EChallengeLevelTargetType.Accumulative:
3650
+ case EChallengeLevelTargetType.Accumulative: {
3651
+ const minbet = ((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet)
3652
+ ? `, ${translate('minBet', this.language)} ${currencySymbol + level.BetRange.MinBet}`
3653
+ : '';
1463
3654
  return `${translate('placeBetsOf', this.language)} ${currencySymbol + level.DisplayCurrencyTargetTurnover + minbet}`;
3655
+ }
1464
3656
  case EChallengeLevelTargetType.SingleBet:
1465
3657
  return `${translate('place', this.language)} ${currencySymbol + level.TargetTurnover} ${translate('bet', this.language)}`;
1466
- case EChallengeLevelTargetType.MultipleOneBetSize:
3658
+ case EChallengeLevelTargetType.MultipleOneBetSize: {
3659
+ const minbet = level.TargetTurnover
3660
+ ? `, ${translate('minBet', this.language)} ${currencySymbol + level.TargetTurnover}`
3661
+ : '';
1467
3662
  return `${translate('place', this.language)} ${level.TargetBetCount} ${translate('bets', this.language) + minbet}`;
1468
- default:
1469
- return '-';
3663
+ }
1470
3664
  }
1471
3665
  };
1472
3666
  this.getBadgeContent = () => {
@@ -2028,7 +4222,7 @@ const CasinoChallengeDetails = class {
2028
4222
  return (((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === 4 && (index.h("div", { class: "notification" }, index.h("img", { class: "notification__icon", src: infoCircleSvg }), index.h("span", { class: "notification__message" }, translate('expiredNotification', this.language)))));
2029
4223
  }
2030
4224
  render() {
2031
- return (index.h("div", { key: '3b40178d61dd13dbbfbc90958d0c8a60da819da9', ref: (el) => (this.stylingContainer = el), class: "container" }, this.pageHeader, this.loading ? (index.h("div", { class: "lds-dual-ring" })) : (index.h("div", null, index.h("button", { class: "back-button", onClick: this.goBack }, index.h("img", { class: "back-button__icon", src: backArrowSvg }), this.getBackButtonText()), this.forfeitedNofitication, this.completedNotification, this.expiredNotification, index.h("div", { class: "details" }, this.cardGeneralInfo, index.h("div", { class: "details__tabs-container" }, this.challengeTabs, this.activeTabIndex === 0 && this.levelsTab, this.activeTabIndex === 1 && this.gamesTab, this.activeTabIndex === 2 && this.rulesTab), this.footer())))));
4225
+ return (index.h("div", { key: 'dc740ffaf5c7d00513e2a18baa24f36b8e722358', ref: (el) => (this.stylingContainer = el), class: "container" }, this.pageHeader, this.loading ? (index.h("div", { class: "lds-dual-ring" })) : (index.h("div", null, index.h("button", { class: "back-button", onClick: this.goBack }, index.h("img", { class: "back-button__icon", src: backArrowSvg }), this.getBackButtonText()), this.forfeitedNofitication, this.completedNotification, this.expiredNotification, index.h("div", { class: "details" }, this.cardGeneralInfo, index.h("div", { class: "details__tabs-container" }, this.challengeTabs, this.activeTabIndex === 0 && this.levelsTab, this.activeTabIndex === 1 && this.gamesTab, this.activeTabIndex === 2 && this.rulesTab), this.footer())))));
2032
4226
  }
2033
4227
  static get watchers() { return {
2034
4228
  "clientStyling": ["handleClientStylingChange"],