@everymatrix/casino-challenge-details 0.8.12 → 0.8.14

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