@everymatrix/casino-game-thumb-view 1.43.4 → 1.45.0

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 (131) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/p-2207062c.entry.js +1 -0
  3. package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
  4. package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
  5. package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
  7. package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
  8. package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
  10. package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
  11. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  12. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
  13. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
  14. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -34
  15. package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
  16. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -519
  17. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +258 -251
  18. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
  19. package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
  20. package/dist/cjs/index-48d13981.js +1709 -0
  21. package/dist/cjs/loader.cjs.js +7 -13
  22. package/dist/cjs/locale.utils-53bf703a.js +132 -0
  23. package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
  24. package/dist/collection/collection-manifest.json +10 -10
  25. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
  26. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
  27. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -119
  28. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
  29. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1027
  30. package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
  31. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
  32. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +153 -150
  33. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -206
  34. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
  35. package/dist/collection/constants/game-thumbnail.js +66 -66
  36. package/dist/collection/models/casino-game-thumb-view.js +6 -6
  37. package/dist/collection/models/currency-symbols.js +170 -170
  38. package/dist/collection/utils/baccarat-board-svg.js +225 -225
  39. package/dist/collection/utils/locale.utils.js +122 -122
  40. package/dist/collection/utils/utils.js +41 -41
  41. package/dist/esm/app-globals-0f993ce5.js +3 -0
  42. package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
  43. package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
  44. package/dist/esm/casino-extrainfo-roulette.entry.js +35 -34
  45. package/dist/esm/casino-game-thumb-view.js +14 -11
  46. package/dist/esm/casino-game-thumb-view_2.entry.js +469 -519
  47. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +258 -251
  48. package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
  49. package/dist/esm/game-thumbnail-035e97e2.js +72 -0
  50. package/dist/esm/index-8c9a8030.js +1681 -0
  51. package/dist/esm/loader.js +7 -13
  52. package/dist/esm/locale.utils-0c514ca8.js +130 -0
  53. package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
  54. package/dist/stencil.config.dev.js +17 -0
  55. package/dist/stencil.config.js +12 -35
  56. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  57. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  58. package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
  59. package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
  60. package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
  61. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
  62. package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
  63. package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
  64. package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
  65. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -28
  66. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
  67. package/dist/types/components.d.ts +33 -2
  68. package/dist/types/constants/game-thumbnail.d.ts +66 -66
  69. package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
  70. package/dist/types/models/currency-symbols.d.ts +170 -170
  71. package/dist/types/stencil-public-runtime.d.ts +142 -33
  72. package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
  73. package/loader/cdn.js +1 -3
  74. package/loader/index.cjs.js +1 -3
  75. package/loader/index.d.ts +13 -1
  76. package/loader/index.es2017.js +1 -3
  77. package/loader/index.js +1 -3
  78. package/loader/package.json +1 -0
  79. package/package.json +8 -8
  80. package/dist/assets/baccarat.svg +0 -43
  81. package/dist/assets/fav.svg +0 -9
  82. package/dist/assets/favorite.svg +0 -12
  83. package/dist/assets/seat.svg +0 -6
  84. package/dist/assets/unfav.svg +0 -20
  85. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
  86. package/dist/casino-game-thumb-view/p-42bf2034.entry.js +0 -1
  87. package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
  88. package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
  89. package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +0 -1
  90. package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +0 -1
  91. package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
  92. package/dist/casino-game-thumb-view/p-db43bb56.entry.js +0 -7
  93. package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
  94. package/dist/cjs/index-65a1d768.js +0 -1796
  95. package/dist/cjs/locale.utils-aa160787.js +0 -132
  96. package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
  97. package/dist/components/casino-extrainfo-baccarat.js +0 -400
  98. package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
  99. package/dist/components/casino-extrainfo-blackjack.js +0 -92
  100. package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
  101. package/dist/components/casino-extrainfo-roulette.js +0 -78
  102. package/dist/components/casino-game-thumb-view.d.ts +0 -11
  103. package/dist/components/casino-game-thumb-view.js +0 -1625
  104. package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
  105. package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
  106. package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
  107. package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
  108. package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
  109. package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -96
  110. package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
  111. package/dist/components/casino-game-thumbnail-overlay.js +0 -6
  112. package/dist/components/casino-game-thumbnail-overlay2.js +0 -69
  113. package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
  114. package/dist/components/casino-normal-game-thumbnail.js +0 -52
  115. package/dist/components/game-thumbnail.js +0 -72
  116. package/dist/components/index.d.ts +0 -26
  117. package/dist/components/index.js +0 -1
  118. package/dist/components/locale.utils.js +0 -130
  119. package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
  120. package/dist/esm/index-1e44dd9f.js +0 -1769
  121. package/dist/esm/locale.utils-e0cf897e.js +0 -130
  122. package/dist/esm/polyfills/core-js.js +0 -11
  123. package/dist/esm/polyfills/css-shim.js +0 -1
  124. package/dist/esm/polyfills/dom.js +0 -79
  125. package/dist/esm/polyfills/es5-html-element.js +0 -1
  126. package/dist/esm/polyfills/index.js +0 -34
  127. package/dist/esm/polyfills/system.js +0 -6
  128. package/dist/esm/utils-e9314132.js +0 -5739
  129. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
  130. /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
  131. /package/dist/casino-game-thumb-view/{p-1e63a1ab.js → p-59ceeaaa.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  //! moment.js
4
- //! version : 2.29.4
4
+ //! version : 2.30.1
5
5
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
6
6
  //! license : MIT
7
7
  //! momentjs.com
@@ -151,24 +151,25 @@ if (Array.prototype.some) {
151
151
  }
152
152
 
153
153
  function isValid(m) {
154
- if (m._isValid == null) {
155
- var flags = getParsingFlags(m),
156
- parsedParts = some.call(flags.parsedDateParts, function (i) {
157
- return i != null;
158
- }),
159
- isNowValid =
160
- !isNaN(m._d.getTime()) &&
161
- flags.overflow < 0 &&
162
- !flags.empty &&
163
- !flags.invalidEra &&
164
- !flags.invalidMonth &&
165
- !flags.invalidWeekday &&
166
- !flags.weekdayMismatch &&
167
- !flags.nullInput &&
168
- !flags.invalidFormat &&
169
- !flags.userInvalidated &&
170
- (!flags.meridiem || (flags.meridiem && parsedParts));
171
-
154
+ var flags = null,
155
+ parsedParts = false,
156
+ isNowValid = m._d && !isNaN(m._d.getTime());
157
+ if (isNowValid) {
158
+ flags = getParsingFlags(m);
159
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
160
+ return i != null;
161
+ });
162
+ isNowValid =
163
+ flags.overflow < 0 &&
164
+ !flags.empty &&
165
+ !flags.invalidEra &&
166
+ !flags.invalidMonth &&
167
+ !flags.invalidWeekday &&
168
+ !flags.weekdayMismatch &&
169
+ !flags.nullInput &&
170
+ !flags.invalidFormat &&
171
+ !flags.userInvalidated &&
172
+ (!flags.meridiem || (flags.meridiem && parsedParts));
172
173
  if (m._strict) {
173
174
  isNowValid =
174
175
  isNowValid &&
@@ -176,12 +177,11 @@ function isValid(m) {
176
177
  flags.unusedTokens.length === 0 &&
177
178
  flags.bigHour === undefined;
178
179
  }
179
-
180
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
181
- m._isValid = isNowValid;
182
- } else {
183
- return isNowValid;
184
- }
180
+ }
181
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
182
+ m._isValid = isNowValid;
183
+ } else {
184
+ return isNowValid;
185
185
  }
186
186
  return m._isValid;
187
187
  }
@@ -626,12 +626,56 @@ function pastFuture(diff, output) {
626
626
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
627
627
  }
628
628
 
629
- var aliases = {};
630
-
631
- function addUnitAlias(unit, shorthand) {
632
- var lowerCase = unit.toLowerCase();
633
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
634
- }
629
+ var aliases = {
630
+ D: 'date',
631
+ dates: 'date',
632
+ date: 'date',
633
+ d: 'day',
634
+ days: 'day',
635
+ day: 'day',
636
+ e: 'weekday',
637
+ weekdays: 'weekday',
638
+ weekday: 'weekday',
639
+ E: 'isoWeekday',
640
+ isoweekdays: 'isoWeekday',
641
+ isoweekday: 'isoWeekday',
642
+ DDD: 'dayOfYear',
643
+ dayofyears: 'dayOfYear',
644
+ dayofyear: 'dayOfYear',
645
+ h: 'hour',
646
+ hours: 'hour',
647
+ hour: 'hour',
648
+ ms: 'millisecond',
649
+ milliseconds: 'millisecond',
650
+ millisecond: 'millisecond',
651
+ m: 'minute',
652
+ minutes: 'minute',
653
+ minute: 'minute',
654
+ M: 'month',
655
+ months: 'month',
656
+ month: 'month',
657
+ Q: 'quarter',
658
+ quarters: 'quarter',
659
+ quarter: 'quarter',
660
+ s: 'second',
661
+ seconds: 'second',
662
+ second: 'second',
663
+ gg: 'weekYear',
664
+ weekyears: 'weekYear',
665
+ weekyear: 'weekYear',
666
+ GG: 'isoWeekYear',
667
+ isoweekyears: 'isoWeekYear',
668
+ isoweekyear: 'isoWeekYear',
669
+ w: 'week',
670
+ weeks: 'week',
671
+ week: 'week',
672
+ W: 'isoWeek',
673
+ isoweeks: 'isoWeek',
674
+ isoweek: 'isoWeek',
675
+ y: 'year',
676
+ years: 'year',
677
+ year: 'year',
678
+ };
635
679
 
636
680
  function normalizeUnits(units) {
637
681
  return typeof units === 'string'
@@ -656,11 +700,24 @@ function normalizeObjectUnits(inputObject) {
656
700
  return normalizedInput;
657
701
  }
658
702
 
659
- var priorities = {};
660
-
661
- function addUnitPriority(unit, priority) {
662
- priorities[unit] = priority;
663
- }
703
+ var priorities = {
704
+ date: 9,
705
+ day: 11,
706
+ weekday: 11,
707
+ isoWeekday: 11,
708
+ dayOfYear: 4,
709
+ hour: 13,
710
+ millisecond: 16,
711
+ minute: 14,
712
+ month: 8,
713
+ quarter: 7,
714
+ second: 15,
715
+ weekYear: 1,
716
+ isoWeekYear: 1,
717
+ week: 5,
718
+ isoWeek: 5,
719
+ year: 1,
720
+ };
664
721
 
665
722
  function getPrioritizedUnits(unitsObj) {
666
723
  var units = [],
@@ -676,96 +733,6 @@ function getPrioritizedUnits(unitsObj) {
676
733
  return units;
677
734
  }
678
735
 
679
- function isLeapYear(year) {
680
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
681
- }
682
-
683
- function absFloor(number) {
684
- if (number < 0) {
685
- // -0 -> 0
686
- return Math.ceil(number) || 0;
687
- } else {
688
- return Math.floor(number);
689
- }
690
- }
691
-
692
- function toInt(argumentForCoercion) {
693
- var coercedNumber = +argumentForCoercion,
694
- value = 0;
695
-
696
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
697
- value = absFloor(coercedNumber);
698
- }
699
-
700
- return value;
701
- }
702
-
703
- function makeGetSet(unit, keepTime) {
704
- return function (value) {
705
- if (value != null) {
706
- set$1(this, unit, value);
707
- hooks.updateOffset(this, keepTime);
708
- return this;
709
- } else {
710
- return get(this, unit);
711
- }
712
- };
713
- }
714
-
715
- function get(mom, unit) {
716
- return mom.isValid()
717
- ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
718
- : NaN;
719
- }
720
-
721
- function set$1(mom, unit, value) {
722
- if (mom.isValid() && !isNaN(value)) {
723
- if (
724
- unit === 'FullYear' &&
725
- isLeapYear(mom.year()) &&
726
- mom.month() === 1 &&
727
- mom.date() === 29
728
- ) {
729
- value = toInt(value);
730
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
731
- value,
732
- mom.month(),
733
- daysInMonth(value, mom.month())
734
- );
735
- } else {
736
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
737
- }
738
- }
739
- }
740
-
741
- // MOMENTS
742
-
743
- function stringGet(units) {
744
- units = normalizeUnits(units);
745
- if (isFunction(this[units])) {
746
- return this[units]();
747
- }
748
- return this;
749
- }
750
-
751
- function stringSet(units, value) {
752
- if (typeof units === 'object') {
753
- units = normalizeObjectUnits(units);
754
- var prioritized = getPrioritizedUnits(units),
755
- i,
756
- prioritizedLen = prioritized.length;
757
- for (i = 0; i < prioritizedLen; i++) {
758
- this[prioritized[i].unit](units[prioritized[i].unit]);
759
- }
760
- } else {
761
- units = normalizeUnits(units);
762
- if (isFunction(this[units])) {
763
- return this[units](value);
764
- }
765
- }
766
- return this;
767
- }
768
-
769
736
  var match1 = /\d/, // 0 - 9
770
737
  match2 = /\d\d/, // 00 - 99
771
738
  match3 = /\d{3}/, // 000 - 999
@@ -786,6 +753,8 @@ var match1 = /\d/, // 0 - 9
786
753
  // includes scottish gaelic two word and hyphenated months
787
754
  matchWord =
788
755
  /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
756
+ match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
757
+ match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
789
758
  regexes;
790
759
 
791
760
  regexes = {};
@@ -824,6 +793,26 @@ function regexEscape(s) {
824
793
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
825
794
  }
826
795
 
796
+ function absFloor(number) {
797
+ if (number < 0) {
798
+ // -0 -> 0
799
+ return Math.ceil(number) || 0;
800
+ } else {
801
+ return Math.floor(number);
802
+ }
803
+ }
804
+
805
+ function toInt(argumentForCoercion) {
806
+ var coercedNumber = +argumentForCoercion,
807
+ value = 0;
808
+
809
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
810
+ value = absFloor(coercedNumber);
811
+ }
812
+
813
+ return value;
814
+ }
815
+
827
816
  var tokens = {};
828
817
 
829
818
  function addParseToken(token, callback) {
@@ -857,6 +846,10 @@ function addTimeToArrayFromToken(token, input, config) {
857
846
  }
858
847
  }
859
848
 
849
+ function isLeapYear(year) {
850
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
851
+ }
852
+
860
853
  var YEAR = 0,
861
854
  MONTH = 1,
862
855
  DATE = 2,
@@ -867,6 +860,173 @@ var YEAR = 0,
867
860
  WEEK = 7,
868
861
  WEEKDAY = 8;
869
862
 
863
+ // FORMATTING
864
+
865
+ addFormatToken('Y', 0, 0, function () {
866
+ var y = this.year();
867
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
868
+ });
869
+
870
+ addFormatToken(0, ['YY', 2], 0, function () {
871
+ return this.year() % 100;
872
+ });
873
+
874
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
875
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
876
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
877
+
878
+ // PARSING
879
+
880
+ addRegexToken('Y', matchSigned);
881
+ addRegexToken('YY', match1to2, match2);
882
+ addRegexToken('YYYY', match1to4, match4);
883
+ addRegexToken('YYYYY', match1to6, match6);
884
+ addRegexToken('YYYYYY', match1to6, match6);
885
+
886
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
887
+ addParseToken('YYYY', function (input, array) {
888
+ array[YEAR] =
889
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
890
+ });
891
+ addParseToken('YY', function (input, array) {
892
+ array[YEAR] = hooks.parseTwoDigitYear(input);
893
+ });
894
+ addParseToken('Y', function (input, array) {
895
+ array[YEAR] = parseInt(input, 10);
896
+ });
897
+
898
+ // HELPERS
899
+
900
+ function daysInYear(year) {
901
+ return isLeapYear(year) ? 366 : 365;
902
+ }
903
+
904
+ // HOOKS
905
+
906
+ hooks.parseTwoDigitYear = function (input) {
907
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
908
+ };
909
+
910
+ // MOMENTS
911
+
912
+ var getSetYear = makeGetSet('FullYear', true);
913
+
914
+ function getIsLeapYear() {
915
+ return isLeapYear(this.year());
916
+ }
917
+
918
+ function makeGetSet(unit, keepTime) {
919
+ return function (value) {
920
+ if (value != null) {
921
+ set$1(this, unit, value);
922
+ hooks.updateOffset(this, keepTime);
923
+ return this;
924
+ } else {
925
+ return get(this, unit);
926
+ }
927
+ };
928
+ }
929
+
930
+ function get(mom, unit) {
931
+ if (!mom.isValid()) {
932
+ return NaN;
933
+ }
934
+
935
+ var d = mom._d,
936
+ isUTC = mom._isUTC;
937
+
938
+ switch (unit) {
939
+ case 'Milliseconds':
940
+ return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
941
+ case 'Seconds':
942
+ return isUTC ? d.getUTCSeconds() : d.getSeconds();
943
+ case 'Minutes':
944
+ return isUTC ? d.getUTCMinutes() : d.getMinutes();
945
+ case 'Hours':
946
+ return isUTC ? d.getUTCHours() : d.getHours();
947
+ case 'Date':
948
+ return isUTC ? d.getUTCDate() : d.getDate();
949
+ case 'Day':
950
+ return isUTC ? d.getUTCDay() : d.getDay();
951
+ case 'Month':
952
+ return isUTC ? d.getUTCMonth() : d.getMonth();
953
+ case 'FullYear':
954
+ return isUTC ? d.getUTCFullYear() : d.getFullYear();
955
+ default:
956
+ return NaN; // Just in case
957
+ }
958
+ }
959
+
960
+ function set$1(mom, unit, value) {
961
+ var d, isUTC, year, month, date;
962
+
963
+ if (!mom.isValid() || isNaN(value)) {
964
+ return;
965
+ }
966
+
967
+ d = mom._d;
968
+ isUTC = mom._isUTC;
969
+
970
+ switch (unit) {
971
+ case 'Milliseconds':
972
+ return void (isUTC
973
+ ? d.setUTCMilliseconds(value)
974
+ : d.setMilliseconds(value));
975
+ case 'Seconds':
976
+ return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
977
+ case 'Minutes':
978
+ return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
979
+ case 'Hours':
980
+ return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
981
+ case 'Date':
982
+ return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
983
+ // case 'Day': // Not real
984
+ // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
985
+ // case 'Month': // Not used because we need to pass two variables
986
+ // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
987
+ case 'FullYear':
988
+ break; // See below ...
989
+ default:
990
+ return; // Just in case
991
+ }
992
+
993
+ year = value;
994
+ month = mom.month();
995
+ date = mom.date();
996
+ date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
997
+ void (isUTC
998
+ ? d.setUTCFullYear(year, month, date)
999
+ : d.setFullYear(year, month, date));
1000
+ }
1001
+
1002
+ // MOMENTS
1003
+
1004
+ function stringGet(units) {
1005
+ units = normalizeUnits(units);
1006
+ if (isFunction(this[units])) {
1007
+ return this[units]();
1008
+ }
1009
+ return this;
1010
+ }
1011
+
1012
+ function stringSet(units, value) {
1013
+ if (typeof units === 'object') {
1014
+ units = normalizeObjectUnits(units);
1015
+ var prioritized = getPrioritizedUnits(units),
1016
+ i,
1017
+ prioritizedLen = prioritized.length;
1018
+ for (i = 0; i < prioritizedLen; i++) {
1019
+ this[prioritized[i].unit](units[prioritized[i].unit]);
1020
+ }
1021
+ } else {
1022
+ units = normalizeUnits(units);
1023
+ if (isFunction(this[units])) {
1024
+ return this[units](value);
1025
+ }
1026
+ }
1027
+ return this;
1028
+ }
1029
+
870
1030
  function mod(n, x) {
871
1031
  return ((n % x) + x) % x;
872
1032
  }
@@ -915,17 +1075,9 @@ addFormatToken('MMMM', 0, 0, function (format) {
915
1075
  return this.localeData().months(this, format);
916
1076
  });
917
1077
 
918
- // ALIASES
919
-
920
- addUnitAlias('month', 'M');
921
-
922
- // PRIORITY
923
-
924
- addUnitPriority('month', 8);
925
-
926
1078
  // PARSING
927
1079
 
928
- addRegexToken('M', match1to2);
1080
+ addRegexToken('M', match1to2, match1to2NoLeadingZero);
929
1081
  addRegexToken('MM', match1to2, match2);
930
1082
  addRegexToken('MMM', function (isStrict, locale) {
931
1083
  return locale.monthsShortRegex(isStrict);
@@ -1091,8 +1243,6 @@ function localeMonthsParse(monthName, format, strict) {
1091
1243
  // MOMENTS
1092
1244
 
1093
1245
  function setMonth(mom, value) {
1094
- var dayOfMonth;
1095
-
1096
1246
  if (!mom.isValid()) {
1097
1247
  // No op
1098
1248
  return mom;
@@ -1110,8 +1260,13 @@ function setMonth(mom, value) {
1110
1260
  }
1111
1261
  }
1112
1262
 
1113
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1114
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1263
+ var month = value,
1264
+ date = mom.date();
1265
+
1266
+ date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
1267
+ void (mom._isUTC
1268
+ ? mom._d.setUTCMonth(month, date)
1269
+ : mom._d.setMonth(month, date));
1115
1270
  return mom;
1116
1271
  }
1117
1272
 
@@ -1178,27 +1333,24 @@ function computeMonthsParse() {
1178
1333
  longPieces = [],
1179
1334
  mixedPieces = [],
1180
1335
  i,
1181
- mom;
1336
+ mom,
1337
+ shortP,
1338
+ longP;
1182
1339
  for (i = 0; i < 12; i++) {
1183
1340
  // make the regex if we don't have it already
1184
1341
  mom = createUTC([2000, i]);
1185
- shortPieces.push(this.monthsShort(mom, ''));
1186
- longPieces.push(this.months(mom, ''));
1187
- mixedPieces.push(this.months(mom, ''));
1188
- mixedPieces.push(this.monthsShort(mom, ''));
1342
+ shortP = regexEscape(this.monthsShort(mom, ''));
1343
+ longP = regexEscape(this.months(mom, ''));
1344
+ shortPieces.push(shortP);
1345
+ longPieces.push(longP);
1346
+ mixedPieces.push(longP);
1347
+ mixedPieces.push(shortP);
1189
1348
  }
1190
1349
  // Sorting makes sure if one month (or abbr) is a prefix of another it
1191
1350
  // will match the longer piece.
1192
1351
  shortPieces.sort(cmpLenRev);
1193
1352
  longPieces.sort(cmpLenRev);
1194
1353
  mixedPieces.sort(cmpLenRev);
1195
- for (i = 0; i < 12; i++) {
1196
- shortPieces[i] = regexEscape(shortPieces[i]);
1197
- longPieces[i] = regexEscape(longPieces[i]);
1198
- }
1199
- for (i = 0; i < 24; i++) {
1200
- mixedPieces[i] = regexEscape(mixedPieces[i]);
1201
- }
1202
1354
 
1203
1355
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1204
1356
  this._monthsShortRegex = this._monthsRegex;
@@ -1212,69 +1364,6 @@ function computeMonthsParse() {
1212
1364
  );
1213
1365
  }
1214
1366
 
1215
- // FORMATTING
1216
-
1217
- addFormatToken('Y', 0, 0, function () {
1218
- var y = this.year();
1219
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
1220
- });
1221
-
1222
- addFormatToken(0, ['YY', 2], 0, function () {
1223
- return this.year() % 100;
1224
- });
1225
-
1226
- addFormatToken(0, ['YYYY', 4], 0, 'year');
1227
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
1228
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1229
-
1230
- // ALIASES
1231
-
1232
- addUnitAlias('year', 'y');
1233
-
1234
- // PRIORITIES
1235
-
1236
- addUnitPriority('year', 1);
1237
-
1238
- // PARSING
1239
-
1240
- addRegexToken('Y', matchSigned);
1241
- addRegexToken('YY', match1to2, match2);
1242
- addRegexToken('YYYY', match1to4, match4);
1243
- addRegexToken('YYYYY', match1to6, match6);
1244
- addRegexToken('YYYYYY', match1to6, match6);
1245
-
1246
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1247
- addParseToken('YYYY', function (input, array) {
1248
- array[YEAR] =
1249
- input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1250
- });
1251
- addParseToken('YY', function (input, array) {
1252
- array[YEAR] = hooks.parseTwoDigitYear(input);
1253
- });
1254
- addParseToken('Y', function (input, array) {
1255
- array[YEAR] = parseInt(input, 10);
1256
- });
1257
-
1258
- // HELPERS
1259
-
1260
- function daysInYear(year) {
1261
- return isLeapYear(year) ? 366 : 365;
1262
- }
1263
-
1264
- // HOOKS
1265
-
1266
- hooks.parseTwoDigitYear = function (input) {
1267
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1268
- };
1269
-
1270
- // MOMENTS
1271
-
1272
- var getSetYear = makeGetSet('FullYear', true);
1273
-
1274
- function getIsLeapYear() {
1275
- return isLeapYear(this.year());
1276
- }
1277
-
1278
1367
  function createDate(y, m, d, h, M, s, ms) {
1279
1368
  // can't just apply() to create a date:
1280
1369
  // https://stackoverflow.com/q/181348
@@ -1380,21 +1469,11 @@ function weeksInYear(year, dow, doy) {
1380
1469
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1381
1470
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1382
1471
 
1383
- // ALIASES
1384
-
1385
- addUnitAlias('week', 'w');
1386
- addUnitAlias('isoWeek', 'W');
1387
-
1388
- // PRIORITIES
1389
-
1390
- addUnitPriority('week', 5);
1391
- addUnitPriority('isoWeek', 5);
1392
-
1393
1472
  // PARSING
1394
1473
 
1395
- addRegexToken('w', match1to2);
1474
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
1396
1475
  addRegexToken('ww', match1to2, match2);
1397
- addRegexToken('W', match1to2);
1476
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
1398
1477
  addRegexToken('WW', match1to2, match2);
1399
1478
 
1400
1479
  addWeekParseToken(
@@ -1456,17 +1535,6 @@ addFormatToken('dddd', 0, 0, function (format) {
1456
1535
  addFormatToken('e', 0, 0, 'weekday');
1457
1536
  addFormatToken('E', 0, 0, 'isoWeekday');
1458
1537
 
1459
- // ALIASES
1460
-
1461
- addUnitAlias('day', 'd');
1462
- addUnitAlias('weekday', 'e');
1463
- addUnitAlias('isoWeekday', 'E');
1464
-
1465
- // PRIORITY
1466
- addUnitPriority('day', 11);
1467
- addUnitPriority('weekday', 11);
1468
- addUnitPriority('isoWeekday', 11);
1469
-
1470
1538
  // PARSING
1471
1539
 
1472
1540
  addRegexToken('d', match1to2);
@@ -1546,24 +1614,24 @@ function localeWeekdays(m, format) {
1546
1614
  return m === true
1547
1615
  ? shiftWeekdays(weekdays, this._week.dow)
1548
1616
  : m
1549
- ? weekdays[m.day()]
1550
- : weekdays;
1617
+ ? weekdays[m.day()]
1618
+ : weekdays;
1551
1619
  }
1552
1620
 
1553
1621
  function localeWeekdaysShort(m) {
1554
1622
  return m === true
1555
1623
  ? shiftWeekdays(this._weekdaysShort, this._week.dow)
1556
1624
  : m
1557
- ? this._weekdaysShort[m.day()]
1558
- : this._weekdaysShort;
1625
+ ? this._weekdaysShort[m.day()]
1626
+ : this._weekdaysShort;
1559
1627
  }
1560
1628
 
1561
1629
  function localeWeekdaysMin(m) {
1562
1630
  return m === true
1563
1631
  ? shiftWeekdays(this._weekdaysMin, this._week.dow)
1564
1632
  : m
1565
- ? this._weekdaysMin[m.day()]
1566
- : this._weekdaysMin;
1633
+ ? this._weekdaysMin[m.day()]
1634
+ : this._weekdaysMin;
1567
1635
  }
1568
1636
 
1569
1637
  function handleStrictParse$1(weekdayName, format, strict) {
@@ -1712,7 +1780,8 @@ function getSetDayOfWeek(input) {
1712
1780
  if (!this.isValid()) {
1713
1781
  return input != null ? this : NaN;
1714
1782
  }
1715
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1783
+
1784
+ var day = get(this, 'Day');
1716
1785
  if (input != null) {
1717
1786
  input = parseWeekday(input, this.localeData());
1718
1787
  return this.add(input - day, 'd');
@@ -1911,13 +1980,6 @@ function meridiem(token, lowercase) {
1911
1980
  meridiem('a', true);
1912
1981
  meridiem('A', false);
1913
1982
 
1914
- // ALIASES
1915
-
1916
- addUnitAlias('hour', 'h');
1917
-
1918
- // PRIORITY
1919
- addUnitPriority('hour', 13);
1920
-
1921
1983
  // PARSING
1922
1984
 
1923
1985
  function matchMeridiem(isStrict, locale) {
@@ -1926,9 +1988,9 @@ function matchMeridiem(isStrict, locale) {
1926
1988
 
1927
1989
  addRegexToken('a', matchMeridiem);
1928
1990
  addRegexToken('A', matchMeridiem);
1929
- addRegexToken('H', match1to2);
1930
- addRegexToken('h', match1to2);
1931
- addRegexToken('k', match1to2);
1991
+ addRegexToken('H', match1to2, match1to2HasZero);
1992
+ addRegexToken('h', match1to2, match1to2NoLeadingZero);
1993
+ addRegexToken('k', match1to2, match1to2NoLeadingZero);
1932
1994
  addRegexToken('HH', match1to2, match2);
1933
1995
  addRegexToken('hh', match1to2, match2);
1934
1996
  addRegexToken('kk', match1to2, match2);
@@ -2078,7 +2140,8 @@ function chooseLocale(names) {
2078
2140
 
2079
2141
  function isLocaleNameSane(name) {
2080
2142
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2081
- return name.match('^[^/\\\\]*$') != null;
2143
+ // Ensure name is available and function returns boolean
2144
+ return !!(name && name.match('^[^/\\\\]*$'));
2082
2145
  }
2083
2146
 
2084
2147
  function loadLocale(name) {
@@ -2270,21 +2333,21 @@ function checkOverflow(m) {
2270
2333
  a[MONTH] < 0 || a[MONTH] > 11
2271
2334
  ? MONTH
2272
2335
  : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
2273
- ? DATE
2274
- : a[HOUR] < 0 ||
2275
- a[HOUR] > 24 ||
2276
- (a[HOUR] === 24 &&
2277
- (a[MINUTE] !== 0 ||
2278
- a[SECOND] !== 0 ||
2279
- a[MILLISECOND] !== 0))
2280
- ? HOUR
2281
- : a[MINUTE] < 0 || a[MINUTE] > 59
2282
- ? MINUTE
2283
- : a[SECOND] < 0 || a[SECOND] > 59
2284
- ? SECOND
2285
- : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
2286
- ? MILLISECOND
2287
- : -1;
2336
+ ? DATE
2337
+ : a[HOUR] < 0 ||
2338
+ a[HOUR] > 24 ||
2339
+ (a[HOUR] === 24 &&
2340
+ (a[MINUTE] !== 0 ||
2341
+ a[SECOND] !== 0 ||
2342
+ a[MILLISECOND] !== 0))
2343
+ ? HOUR
2344
+ : a[MINUTE] < 0 || a[MINUTE] > 59
2345
+ ? MINUTE
2346
+ : a[SECOND] < 0 || a[SECOND] > 59
2347
+ ? SECOND
2348
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
2349
+ ? MILLISECOND
2350
+ : -1;
2288
2351
 
2289
2352
  if (
2290
2353
  getParsingFlags(m)._overflowDayOfYear &&
@@ -3725,16 +3788,16 @@ function getCalendarFormat(myMoment, now) {
3725
3788
  return diff < -6
3726
3789
  ? 'sameElse'
3727
3790
  : diff < -1
3728
- ? 'lastWeek'
3729
- : diff < 0
3730
- ? 'lastDay'
3731
- : diff < 1
3732
- ? 'sameDay'
3733
- : diff < 2
3734
- ? 'nextDay'
3735
- : diff < 7
3736
- ? 'nextWeek'
3737
- : 'sameElse';
3791
+ ? 'lastWeek'
3792
+ : diff < 0
3793
+ ? 'lastDay'
3794
+ : diff < 1
3795
+ ? 'sameDay'
3796
+ : diff < 2
3797
+ ? 'nextDay'
3798
+ : diff < 7
3799
+ ? 'nextWeek'
3800
+ : 'sameElse';
3738
3801
  }
3739
3802
 
3740
3803
  function calendar$1(time, formats) {
@@ -4542,16 +4605,22 @@ function computeErasParse() {
4542
4605
  mixedPieces = [],
4543
4606
  i,
4544
4607
  l,
4608
+ erasName,
4609
+ erasAbbr,
4610
+ erasNarrow,
4545
4611
  eras = this.eras();
4546
4612
 
4547
4613
  for (i = 0, l = eras.length; i < l; ++i) {
4548
- namePieces.push(regexEscape(eras[i].name));
4549
- abbrPieces.push(regexEscape(eras[i].abbr));
4550
- narrowPieces.push(regexEscape(eras[i].narrow));
4614
+ erasName = regexEscape(eras[i].name);
4615
+ erasAbbr = regexEscape(eras[i].abbr);
4616
+ erasNarrow = regexEscape(eras[i].narrow);
4551
4617
 
4552
- mixedPieces.push(regexEscape(eras[i].name));
4553
- mixedPieces.push(regexEscape(eras[i].abbr));
4554
- mixedPieces.push(regexEscape(eras[i].narrow));
4618
+ namePieces.push(erasName);
4619
+ abbrPieces.push(erasAbbr);
4620
+ narrowPieces.push(erasNarrow);
4621
+ mixedPieces.push(erasName);
4622
+ mixedPieces.push(erasAbbr);
4623
+ mixedPieces.push(erasNarrow);
4555
4624
  }
4556
4625
 
4557
4626
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4584,14 +4653,6 @@ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
4584
4653
 
4585
4654
  // ALIASES
4586
4655
 
4587
- addUnitAlias('weekYear', 'gg');
4588
- addUnitAlias('isoWeekYear', 'GG');
4589
-
4590
- // PRIORITY
4591
-
4592
- addUnitPriority('weekYear', 1);
4593
- addUnitPriority('isoWeekYear', 1);
4594
-
4595
4656
  // PARSING
4596
4657
 
4597
4658
  addRegexToken('G', matchSigned);
@@ -4621,7 +4682,7 @@ function getSetWeekYear(input) {
4621
4682
  this,
4622
4683
  input,
4623
4684
  this.week(),
4624
- this.weekday(),
4685
+ this.weekday() + this.localeData()._week.dow,
4625
4686
  this.localeData()._week.dow,
4626
4687
  this.localeData()._week.doy
4627
4688
  );
@@ -4683,14 +4744,6 @@ function setWeekAll(weekYear, week, weekday, dow, doy) {
4683
4744
 
4684
4745
  addFormatToken('Q', 0, 'Qo', 'quarter');
4685
4746
 
4686
- // ALIASES
4687
-
4688
- addUnitAlias('quarter', 'Q');
4689
-
4690
- // PRIORITY
4691
-
4692
- addUnitPriority('quarter', 7);
4693
-
4694
4747
  // PARSING
4695
4748
 
4696
4749
  addRegexToken('Q', match1);
@@ -4710,16 +4763,9 @@ function getSetQuarter(input) {
4710
4763
 
4711
4764
  addFormatToken('D', ['DD', 2], 'Do', 'date');
4712
4765
 
4713
- // ALIASES
4714
-
4715
- addUnitAlias('date', 'D');
4716
-
4717
- // PRIORITY
4718
- addUnitPriority('date', 9);
4719
-
4720
4766
  // PARSING
4721
4767
 
4722
- addRegexToken('D', match1to2);
4768
+ addRegexToken('D', match1to2, match1to2NoLeadingZero);
4723
4769
  addRegexToken('DD', match1to2, match2);
4724
4770
  addRegexToken('Do', function (isStrict, locale) {
4725
4771
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -4741,13 +4787,6 @@ var getSetDayOfMonth = makeGetSet('Date', true);
4741
4787
 
4742
4788
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
4743
4789
 
4744
- // ALIASES
4745
-
4746
- addUnitAlias('dayOfYear', 'DDD');
4747
-
4748
- // PRIORITY
4749
- addUnitPriority('dayOfYear', 4);
4750
-
4751
4790
  // PARSING
4752
4791
 
4753
4792
  addRegexToken('DDD', match1to3);
@@ -4772,17 +4811,9 @@ function getSetDayOfYear(input) {
4772
4811
 
4773
4812
  addFormatToken('m', ['mm', 2], 0, 'minute');
4774
4813
 
4775
- // ALIASES
4776
-
4777
- addUnitAlias('minute', 'm');
4778
-
4779
- // PRIORITY
4780
-
4781
- addUnitPriority('minute', 14);
4782
-
4783
4814
  // PARSING
4784
4815
 
4785
- addRegexToken('m', match1to2);
4816
+ addRegexToken('m', match1to2, match1to2HasZero);
4786
4817
  addRegexToken('mm', match1to2, match2);
4787
4818
  addParseToken(['m', 'mm'], MINUTE);
4788
4819
 
@@ -4794,17 +4825,9 @@ var getSetMinute = makeGetSet('Minutes', false);
4794
4825
 
4795
4826
  addFormatToken('s', ['ss', 2], 0, 'second');
4796
4827
 
4797
- // ALIASES
4798
-
4799
- addUnitAlias('second', 's');
4800
-
4801
- // PRIORITY
4802
-
4803
- addUnitPriority('second', 15);
4804
-
4805
4828
  // PARSING
4806
4829
 
4807
- addRegexToken('s', match1to2);
4830
+ addRegexToken('s', match1to2, match1to2HasZero);
4808
4831
  addRegexToken('ss', match1to2, match2);
4809
4832
  addParseToken(['s', 'ss'], SECOND);
4810
4833
 
@@ -4842,14 +4865,6 @@ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
4842
4865
  return this.millisecond() * 1000000;
4843
4866
  });
4844
4867
 
4845
- // ALIASES
4846
-
4847
- addUnitAlias('millisecond', 'ms');
4848
-
4849
- // PRIORITY
4850
-
4851
- addUnitPriority('millisecond', 16);
4852
-
4853
4868
  // PARSING
4854
4869
 
4855
4870
  addRegexToken('S', match1to3, match1);
@@ -5157,12 +5172,12 @@ getSetGlobalLocale('en', {
5157
5172
  toInt((number % 100) / 10) === 1
5158
5173
  ? 'th'
5159
5174
  : b === 1
5160
- ? 'st'
5161
- : b === 2
5162
- ? 'nd'
5163
- : b === 3
5164
- ? 'rd'
5165
- : 'th';
5175
+ ? 'st'
5176
+ : b === 2
5177
+ ? 'nd'
5178
+ : b === 3
5179
+ ? 'rd'
5180
+ : 'th';
5166
5181
  return number + output;
5167
5182
  },
5168
5183
  });
@@ -5335,19 +5350,6 @@ function as(units) {
5335
5350
  }
5336
5351
  }
5337
5352
 
5338
- // TODO: Use this.as('ms')?
5339
- function valueOf$1() {
5340
- if (!this.isValid()) {
5341
- return NaN;
5342
- }
5343
- return (
5344
- this._milliseconds +
5345
- this._days * 864e5 +
5346
- (this._months % 12) * 2592e6 +
5347
- toInt(this._months / 12) * 31536e6
5348
- );
5349
- }
5350
-
5351
5353
  function makeAs(alias) {
5352
5354
  return function () {
5353
5355
  return this.as(alias);
@@ -5362,7 +5364,8 @@ var asMilliseconds = makeAs('ms'),
5362
5364
  asWeeks = makeAs('w'),
5363
5365
  asMonths = makeAs('M'),
5364
5366
  asQuarters = makeAs('Q'),
5365
- asYears = makeAs('y');
5367
+ asYears = makeAs('y'),
5368
+ valueOf$1 = asMilliseconds;
5366
5369
 
5367
5370
  function clone$1() {
5368
5371
  return createDuration(this);
@@ -5631,7 +5634,7 @@ addParseToken('x', function (input, array, config) {
5631
5634
 
5632
5635
  //! moment.js
5633
5636
 
5634
- hooks.version = '2.29.4';
5637
+ hooks.version = '2.30.1';
5635
5638
 
5636
5639
  setHookCallback(createLocal);
5637
5640
 
@@ -5685,10 +5688,10 @@ const DEFAULT_AMOUNT_SEPARATOR = ',';
5685
5688
  * @returns {String} formated value
5686
5689
  */
5687
5690
  const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
5688
- if (value !== undefined && value !== null) {
5689
- return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
5690
- }
5691
- return '';
5691
+ if (value !== undefined && value !== null) {
5692
+ return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
5693
+ }
5694
+ return '';
5692
5695
  };
5693
5696
  /**
5694
5697
  * @name isMobile
@@ -5697,45 +5700,45 @@ const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
5697
5700
  * @returns {Boolean} true or false
5698
5701
  */
5699
5702
  const isMobile = (userAgent) => {
5700
- return !!(userAgent.toLowerCase().match(/android/i) ||
5701
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
5702
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
5703
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
5703
+ return !!(userAgent.toLowerCase().match(/android/i) ||
5704
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
5705
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
5706
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
5704
5707
  };
5705
5708
  const addGameTag = (tags) => {
5706
- if ((tags === null || tags === void 0 ? void 0 : tags.length) === 0)
5707
- return '';
5708
- let tagName;
5709
- let differenceOfTime = 99999999999;
5710
- let firstToExpire;
5711
- const currentDate = new Date(Date.now());
5712
- tags.forEach((tag, index) => {
5713
- const startDateOfTag = new Date(tag.schedules[0].startTime);
5714
- const endDateOfTag = new Date(tag.schedules[0].endTime);
5715
- if (hooks(endDateOfTag).diff(currentDate) < differenceOfTime) {
5716
- differenceOfTime = hooks(endDateOfTag).diff(currentDate);
5717
- firstToExpire = index;
5718
- }
5719
- if (hooks(currentDate).isAfter(startDateOfTag) && hooks(currentDate).isBefore(endDateOfTag)) {
5720
- tagName = tags[firstToExpire].name;
5721
- }
5722
- });
5723
- return tagName;
5709
+ if ((tags === null || tags === void 0 ? void 0 : tags.length) === 0)
5710
+ return '';
5711
+ let tagName;
5712
+ let differenceOfTime = 99999999999;
5713
+ let firstToExpire;
5714
+ const currentDate = new Date(Date.now());
5715
+ tags.forEach((tag, index) => {
5716
+ const startDateOfTag = new Date(tag.schedules[0].startTime);
5717
+ const endDateOfTag = new Date(tag.schedules[0].endTime);
5718
+ if (hooks(endDateOfTag).diff(currentDate) < differenceOfTime) {
5719
+ differenceOfTime = hooks(endDateOfTag).diff(currentDate);
5720
+ firstToExpire = index;
5721
+ }
5722
+ if (hooks(currentDate).isAfter(startDateOfTag) && hooks(currentDate).isBefore(endDateOfTag)) {
5723
+ tagName = tags[firstToExpire].name;
5724
+ }
5725
+ });
5726
+ return tagName;
5724
5727
  };
5725
5728
  const convertGicBaccaratUpdateItem = (oriItem) => {
5726
- var _a, _b;
5727
- return {
5728
- winner: oriItem.Winner,
5729
- color: oriItem.Color,
5730
- location: {
5731
- column: (_a = oriItem.Location) === null || _a === void 0 ? void 0 : _a.Column,
5732
- row: (_b = oriItem.Location) === null || _b === void 0 ? void 0 : _b.Row
5733
- },
5734
- ties: (oriItem.Ties) | 0,
5735
- score: oriItem.Score,
5736
- playerPair: oriItem.PlayerPair,
5737
- bankerPair: oriItem.BankerPair
5738
- };
5729
+ var _a, _b;
5730
+ return {
5731
+ winner: oriItem.Winner,
5732
+ color: oriItem.Color,
5733
+ location: {
5734
+ column: (_a = oriItem.Location) === null || _a === void 0 ? void 0 : _a.Column,
5735
+ row: (_b = oriItem.Location) === null || _b === void 0 ? void 0 : _b.Row
5736
+ },
5737
+ ties: (oriItem.Ties) | 0,
5738
+ score: oriItem.Score,
5739
+ playerPair: oriItem.PlayerPair,
5740
+ bankerPair: oriItem.BankerPair
5741
+ };
5739
5742
  };
5740
5743
 
5741
5744
  exports.addGameTag = addGameTag;