@everymatrix/casino-game-thumb-view 1.56.0 → 1.56.2

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 (55) 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-600af885.entry.js → p-0f03c743.entry.js} +1 -1
  3. package/dist/casino-game-thumb-view/p-358a4af8.entry.js +7 -0
  4. package/dist/casino-game-thumb-view/p-4ece4698.js +8 -0
  5. package/dist/casino-game-thumb-view/p-74a4ae4a.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-a0c26052.entry.js +1 -0
  7. package/dist/casino-game-thumb-view/p-b5a64db5.js +2 -0
  8. package/dist/casino-game-thumb-view/p-d6ec6d6a.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-fd38189d.entry.js +1 -0
  10. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +5 -1
  11. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +6 -1
  12. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +4 -4
  13. package/dist/cjs/casino-game-thumb-view.cjs.js +2 -2
  14. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +41 -52
  15. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +8 -3
  16. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +2 -1
  17. package/dist/cjs/{index-b36c6933.js → index-81c5b70d.js} +136 -289
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/cjs/{utils-c4ed3adc.js → utils-21e506f8.js} +365 -368
  20. package/dist/collection/collection-manifest.json +2 -2
  21. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +4 -4
  22. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +7 -2
  23. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +3 -5
  24. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +33 -99
  25. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +3 -5
  26. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +4 -3
  27. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +6 -27
  28. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +3 -2
  29. package/dist/esm/casino-extrainfo-baccarat.entry.js +5 -1
  30. package/dist/esm/casino-extrainfo-blackjack.entry.js +6 -1
  31. package/dist/esm/casino-extrainfo-roulette.entry.js +4 -4
  32. package/dist/esm/casino-game-thumb-view.js +3 -3
  33. package/dist/esm/casino-game-thumb-view_2.entry.js +41 -52
  34. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +8 -3
  35. package/dist/esm/casino-normal-game-thumbnail.entry.js +2 -1
  36. package/dist/esm/{index-23b4a4c5.js → index-8058a16f.js} +136 -289
  37. package/dist/esm/loader.js +2 -2
  38. package/dist/esm/{utils-090ac2e9.js → utils-d11d0845.js} +365 -368
  39. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  40. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  41. package/dist/types/stencil-public-runtime.d.ts +0 -6
  42. package/package.json +1 -1
  43. package/dist/casino-game-thumb-view/p-13741d4d.js +0 -2
  44. package/dist/casino-game-thumb-view/p-53ba085b.entry.js +0 -1
  45. package/dist/casino-game-thumb-view/p-b13b5c25.entry.js +0 -1
  46. package/dist/casino-game-thumb-view/p-c6ee2783.entry.js +0 -1
  47. package/dist/casino-game-thumb-view/p-d2580653.js +0 -8
  48. package/dist/casino-game-thumb-view/p-dd797f50.entry.js +0 -7
  49. package/dist/casino-game-thumb-view/p-ee2bdcce.entry.js +0 -1
  50. 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 +0 -2
  51. 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 +0 -2
  52. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/index.d.ts +0 -0
  53. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  54. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  55. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  //! moment.js
4
- //! version : 2.30.1
4
+ //! version : 2.29.4
5
5
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
6
6
  //! license : MIT
7
7
  //! momentjs.com
@@ -151,25 +151,24 @@ if (Array.prototype.some) {
151
151
  }
152
152
 
153
153
  function isValid(m) {
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));
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
+
173
172
  if (m._strict) {
174
173
  isNowValid =
175
174
  isNowValid &&
@@ -177,11 +176,12 @@ function isValid(m) {
177
176
  flags.unusedTokens.length === 0 &&
178
177
  flags.bigHour === undefined;
179
178
  }
180
- }
181
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
182
- m._isValid = isNowValid;
183
- } else {
184
- return isNowValid;
179
+
180
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
181
+ m._isValid = isNowValid;
182
+ } else {
183
+ return isNowValid;
184
+ }
185
185
  }
186
186
  return m._isValid;
187
187
  }
@@ -626,56 +626,12 @@ function pastFuture(diff, output) {
626
626
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
627
627
  }
628
628
 
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
- };
629
+ var aliases = {};
630
+
631
+ function addUnitAlias(unit, shorthand) {
632
+ var lowerCase = unit.toLowerCase();
633
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
634
+ }
679
635
 
680
636
  function normalizeUnits(units) {
681
637
  return typeof units === 'string'
@@ -700,24 +656,11 @@ function normalizeObjectUnits(inputObject) {
700
656
  return normalizedInput;
701
657
  }
702
658
 
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
- };
659
+ var priorities = {};
660
+
661
+ function addUnitPriority(unit, priority) {
662
+ priorities[unit] = priority;
663
+ }
721
664
 
722
665
  function getPrioritizedUnits(unitsObj) {
723
666
  var units = [],
@@ -733,6 +676,96 @@ function getPrioritizedUnits(unitsObj) {
733
676
  return units;
734
677
  }
735
678
 
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
+
736
769
  var match1 = /\d/, // 0 - 9
737
770
  match2 = /\d\d/, // 00 - 99
738
771
  match3 = /\d{3}/, // 000 - 999
@@ -753,8 +786,6 @@ var match1 = /\d/, // 0 - 9
753
786
  // includes scottish gaelic two word and hyphenated months
754
787
  matchWord =
755
788
  /[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
758
789
  regexes;
759
790
 
760
791
  regexes = {};
@@ -793,26 +824,6 @@ function regexEscape(s) {
793
824
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
794
825
  }
795
826
 
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
-
816
827
  var tokens = {};
817
828
 
818
829
  function addParseToken(token, callback) {
@@ -846,10 +857,6 @@ function addTimeToArrayFromToken(token, input, config) {
846
857
  }
847
858
  }
848
859
 
849
- function isLeapYear(year) {
850
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
851
- }
852
-
853
860
  var YEAR = 0,
854
861
  MONTH = 1,
855
862
  DATE = 2,
@@ -860,173 +867,6 @@ var YEAR = 0,
860
867
  WEEK = 7,
861
868
  WEEKDAY = 8;
862
869
 
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
-
1030
870
  function mod(n, x) {
1031
871
  return ((n % x) + x) % x;
1032
872
  }
@@ -1075,9 +915,17 @@ addFormatToken('MMMM', 0, 0, function (format) {
1075
915
  return this.localeData().months(this, format);
1076
916
  });
1077
917
 
918
+ // ALIASES
919
+
920
+ addUnitAlias('month', 'M');
921
+
922
+ // PRIORITY
923
+
924
+ addUnitPriority('month', 8);
925
+
1078
926
  // PARSING
1079
927
 
1080
- addRegexToken('M', match1to2, match1to2NoLeadingZero);
928
+ addRegexToken('M', match1to2);
1081
929
  addRegexToken('MM', match1to2, match2);
1082
930
  addRegexToken('MMM', function (isStrict, locale) {
1083
931
  return locale.monthsShortRegex(isStrict);
@@ -1243,6 +1091,8 @@ function localeMonthsParse(monthName, format, strict) {
1243
1091
  // MOMENTS
1244
1092
 
1245
1093
  function setMonth(mom, value) {
1094
+ var dayOfMonth;
1095
+
1246
1096
  if (!mom.isValid()) {
1247
1097
  // No op
1248
1098
  return mom;
@@ -1260,13 +1110,8 @@ function setMonth(mom, value) {
1260
1110
  }
1261
1111
  }
1262
1112
 
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));
1113
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1114
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1270
1115
  return mom;
1271
1116
  }
1272
1117
 
@@ -1333,24 +1178,27 @@ function computeMonthsParse() {
1333
1178
  longPieces = [],
1334
1179
  mixedPieces = [],
1335
1180
  i,
1336
- mom,
1337
- shortP,
1338
- longP;
1181
+ mom;
1339
1182
  for (i = 0; i < 12; i++) {
1340
1183
  // make the regex if we don't have it already
1341
1184
  mom = createUTC([2000, i]);
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);
1185
+ shortPieces.push(this.monthsShort(mom, ''));
1186
+ longPieces.push(this.months(mom, ''));
1187
+ mixedPieces.push(this.months(mom, ''));
1188
+ mixedPieces.push(this.monthsShort(mom, ''));
1348
1189
  }
1349
1190
  // Sorting makes sure if one month (or abbr) is a prefix of another it
1350
1191
  // will match the longer piece.
1351
1192
  shortPieces.sort(cmpLenRev);
1352
1193
  longPieces.sort(cmpLenRev);
1353
1194
  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
+ }
1354
1202
 
1355
1203
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1356
1204
  this._monthsShortRegex = this._monthsRegex;
@@ -1364,6 +1212,69 @@ function computeMonthsParse() {
1364
1212
  );
1365
1213
  }
1366
1214
 
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
+
1367
1278
  function createDate(y, m, d, h, M, s, ms) {
1368
1279
  // can't just apply() to create a date:
1369
1280
  // https://stackoverflow.com/q/181348
@@ -1469,11 +1380,21 @@ function weeksInYear(year, dow, doy) {
1469
1380
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1470
1381
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1471
1382
 
1383
+ // ALIASES
1384
+
1385
+ addUnitAlias('week', 'w');
1386
+ addUnitAlias('isoWeek', 'W');
1387
+
1388
+ // PRIORITIES
1389
+
1390
+ addUnitPriority('week', 5);
1391
+ addUnitPriority('isoWeek', 5);
1392
+
1472
1393
  // PARSING
1473
1394
 
1474
- addRegexToken('w', match1to2, match1to2NoLeadingZero);
1395
+ addRegexToken('w', match1to2);
1475
1396
  addRegexToken('ww', match1to2, match2);
1476
- addRegexToken('W', match1to2, match1to2NoLeadingZero);
1397
+ addRegexToken('W', match1to2);
1477
1398
  addRegexToken('WW', match1to2, match2);
1478
1399
 
1479
1400
  addWeekParseToken(
@@ -1535,6 +1456,17 @@ addFormatToken('dddd', 0, 0, function (format) {
1535
1456
  addFormatToken('e', 0, 0, 'weekday');
1536
1457
  addFormatToken('E', 0, 0, 'isoWeekday');
1537
1458
 
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
+
1538
1470
  // PARSING
1539
1471
 
1540
1472
  addRegexToken('d', match1to2);
@@ -1614,24 +1546,24 @@ function localeWeekdays(m, format) {
1614
1546
  return m === true
1615
1547
  ? shiftWeekdays(weekdays, this._week.dow)
1616
1548
  : m
1617
- ? weekdays[m.day()]
1618
- : weekdays;
1549
+ ? weekdays[m.day()]
1550
+ : weekdays;
1619
1551
  }
1620
1552
 
1621
1553
  function localeWeekdaysShort(m) {
1622
1554
  return m === true
1623
1555
  ? shiftWeekdays(this._weekdaysShort, this._week.dow)
1624
1556
  : m
1625
- ? this._weekdaysShort[m.day()]
1626
- : this._weekdaysShort;
1557
+ ? this._weekdaysShort[m.day()]
1558
+ : this._weekdaysShort;
1627
1559
  }
1628
1560
 
1629
1561
  function localeWeekdaysMin(m) {
1630
1562
  return m === true
1631
1563
  ? shiftWeekdays(this._weekdaysMin, this._week.dow)
1632
1564
  : m
1633
- ? this._weekdaysMin[m.day()]
1634
- : this._weekdaysMin;
1565
+ ? this._weekdaysMin[m.day()]
1566
+ : this._weekdaysMin;
1635
1567
  }
1636
1568
 
1637
1569
  function handleStrictParse$1(weekdayName, format, strict) {
@@ -1780,8 +1712,7 @@ function getSetDayOfWeek(input) {
1780
1712
  if (!this.isValid()) {
1781
1713
  return input != null ? this : NaN;
1782
1714
  }
1783
-
1784
- var day = get(this, 'Day');
1715
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1785
1716
  if (input != null) {
1786
1717
  input = parseWeekday(input, this.localeData());
1787
1718
  return this.add(input - day, 'd');
@@ -1980,6 +1911,13 @@ function meridiem(token, lowercase) {
1980
1911
  meridiem('a', true);
1981
1912
  meridiem('A', false);
1982
1913
 
1914
+ // ALIASES
1915
+
1916
+ addUnitAlias('hour', 'h');
1917
+
1918
+ // PRIORITY
1919
+ addUnitPriority('hour', 13);
1920
+
1983
1921
  // PARSING
1984
1922
 
1985
1923
  function matchMeridiem(isStrict, locale) {
@@ -1988,9 +1926,9 @@ function matchMeridiem(isStrict, locale) {
1988
1926
 
1989
1927
  addRegexToken('a', matchMeridiem);
1990
1928
  addRegexToken('A', matchMeridiem);
1991
- addRegexToken('H', match1to2, match1to2HasZero);
1992
- addRegexToken('h', match1to2, match1to2NoLeadingZero);
1993
- addRegexToken('k', match1to2, match1to2NoLeadingZero);
1929
+ addRegexToken('H', match1to2);
1930
+ addRegexToken('h', match1to2);
1931
+ addRegexToken('k', match1to2);
1994
1932
  addRegexToken('HH', match1to2, match2);
1995
1933
  addRegexToken('hh', match1to2, match2);
1996
1934
  addRegexToken('kk', match1to2, match2);
@@ -2140,8 +2078,7 @@ function chooseLocale(names) {
2140
2078
 
2141
2079
  function isLocaleNameSane(name) {
2142
2080
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2143
- // Ensure name is available and function returns boolean
2144
- return !!(name && name.match('^[^/\\\\]*$'));
2081
+ return name.match('^[^/\\\\]*$') != null;
2145
2082
  }
2146
2083
 
2147
2084
  function loadLocale(name) {
@@ -2333,21 +2270,21 @@ function checkOverflow(m) {
2333
2270
  a[MONTH] < 0 || a[MONTH] > 11
2334
2271
  ? MONTH
2335
2272
  : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
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;
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;
2351
2288
 
2352
2289
  if (
2353
2290
  getParsingFlags(m)._overflowDayOfYear &&
@@ -3788,16 +3725,16 @@ function getCalendarFormat(myMoment, now) {
3788
3725
  return diff < -6
3789
3726
  ? 'sameElse'
3790
3727
  : diff < -1
3791
- ? 'lastWeek'
3792
- : diff < 0
3793
- ? 'lastDay'
3794
- : diff < 1
3795
- ? 'sameDay'
3796
- : diff < 2
3797
- ? 'nextDay'
3798
- : diff < 7
3799
- ? 'nextWeek'
3800
- : 'sameElse';
3728
+ ? 'lastWeek'
3729
+ : diff < 0
3730
+ ? 'lastDay'
3731
+ : diff < 1
3732
+ ? 'sameDay'
3733
+ : diff < 2
3734
+ ? 'nextDay'
3735
+ : diff < 7
3736
+ ? 'nextWeek'
3737
+ : 'sameElse';
3801
3738
  }
3802
3739
 
3803
3740
  function calendar$1(time, formats) {
@@ -4605,22 +4542,16 @@ function computeErasParse() {
4605
4542
  mixedPieces = [],
4606
4543
  i,
4607
4544
  l,
4608
- erasName,
4609
- erasAbbr,
4610
- erasNarrow,
4611
4545
  eras = this.eras();
4612
4546
 
4613
4547
  for (i = 0, l = eras.length; i < l; ++i) {
4614
- erasName = regexEscape(eras[i].name);
4615
- erasAbbr = regexEscape(eras[i].abbr);
4616
- erasNarrow = regexEscape(eras[i].narrow);
4548
+ namePieces.push(regexEscape(eras[i].name));
4549
+ abbrPieces.push(regexEscape(eras[i].abbr));
4550
+ narrowPieces.push(regexEscape(eras[i].narrow));
4617
4551
 
4618
- namePieces.push(erasName);
4619
- abbrPieces.push(erasAbbr);
4620
- narrowPieces.push(erasNarrow);
4621
- mixedPieces.push(erasName);
4622
- mixedPieces.push(erasAbbr);
4623
- mixedPieces.push(erasNarrow);
4552
+ mixedPieces.push(regexEscape(eras[i].name));
4553
+ mixedPieces.push(regexEscape(eras[i].abbr));
4554
+ mixedPieces.push(regexEscape(eras[i].narrow));
4624
4555
  }
4625
4556
 
4626
4557
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4653,6 +4584,14 @@ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
4653
4584
 
4654
4585
  // ALIASES
4655
4586
 
4587
+ addUnitAlias('weekYear', 'gg');
4588
+ addUnitAlias('isoWeekYear', 'GG');
4589
+
4590
+ // PRIORITY
4591
+
4592
+ addUnitPriority('weekYear', 1);
4593
+ addUnitPriority('isoWeekYear', 1);
4594
+
4656
4595
  // PARSING
4657
4596
 
4658
4597
  addRegexToken('G', matchSigned);
@@ -4682,7 +4621,7 @@ function getSetWeekYear(input) {
4682
4621
  this,
4683
4622
  input,
4684
4623
  this.week(),
4685
- this.weekday() + this.localeData()._week.dow,
4624
+ this.weekday(),
4686
4625
  this.localeData()._week.dow,
4687
4626
  this.localeData()._week.doy
4688
4627
  );
@@ -4744,6 +4683,14 @@ function setWeekAll(weekYear, week, weekday, dow, doy) {
4744
4683
 
4745
4684
  addFormatToken('Q', 0, 'Qo', 'quarter');
4746
4685
 
4686
+ // ALIASES
4687
+
4688
+ addUnitAlias('quarter', 'Q');
4689
+
4690
+ // PRIORITY
4691
+
4692
+ addUnitPriority('quarter', 7);
4693
+
4747
4694
  // PARSING
4748
4695
 
4749
4696
  addRegexToken('Q', match1);
@@ -4763,9 +4710,16 @@ function getSetQuarter(input) {
4763
4710
 
4764
4711
  addFormatToken('D', ['DD', 2], 'Do', 'date');
4765
4712
 
4713
+ // ALIASES
4714
+
4715
+ addUnitAlias('date', 'D');
4716
+
4717
+ // PRIORITY
4718
+ addUnitPriority('date', 9);
4719
+
4766
4720
  // PARSING
4767
4721
 
4768
- addRegexToken('D', match1to2, match1to2NoLeadingZero);
4722
+ addRegexToken('D', match1to2);
4769
4723
  addRegexToken('DD', match1to2, match2);
4770
4724
  addRegexToken('Do', function (isStrict, locale) {
4771
4725
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -4787,6 +4741,13 @@ var getSetDayOfMonth = makeGetSet('Date', true);
4787
4741
 
4788
4742
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
4789
4743
 
4744
+ // ALIASES
4745
+
4746
+ addUnitAlias('dayOfYear', 'DDD');
4747
+
4748
+ // PRIORITY
4749
+ addUnitPriority('dayOfYear', 4);
4750
+
4790
4751
  // PARSING
4791
4752
 
4792
4753
  addRegexToken('DDD', match1to3);
@@ -4811,9 +4772,17 @@ function getSetDayOfYear(input) {
4811
4772
 
4812
4773
  addFormatToken('m', ['mm', 2], 0, 'minute');
4813
4774
 
4775
+ // ALIASES
4776
+
4777
+ addUnitAlias('minute', 'm');
4778
+
4779
+ // PRIORITY
4780
+
4781
+ addUnitPriority('minute', 14);
4782
+
4814
4783
  // PARSING
4815
4784
 
4816
- addRegexToken('m', match1to2, match1to2HasZero);
4785
+ addRegexToken('m', match1to2);
4817
4786
  addRegexToken('mm', match1to2, match2);
4818
4787
  addParseToken(['m', 'mm'], MINUTE);
4819
4788
 
@@ -4825,9 +4794,17 @@ var getSetMinute = makeGetSet('Minutes', false);
4825
4794
 
4826
4795
  addFormatToken('s', ['ss', 2], 0, 'second');
4827
4796
 
4797
+ // ALIASES
4798
+
4799
+ addUnitAlias('second', 's');
4800
+
4801
+ // PRIORITY
4802
+
4803
+ addUnitPriority('second', 15);
4804
+
4828
4805
  // PARSING
4829
4806
 
4830
- addRegexToken('s', match1to2, match1to2HasZero);
4807
+ addRegexToken('s', match1to2);
4831
4808
  addRegexToken('ss', match1to2, match2);
4832
4809
  addParseToken(['s', 'ss'], SECOND);
4833
4810
 
@@ -4865,6 +4842,14 @@ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
4865
4842
  return this.millisecond() * 1000000;
4866
4843
  });
4867
4844
 
4845
+ // ALIASES
4846
+
4847
+ addUnitAlias('millisecond', 'ms');
4848
+
4849
+ // PRIORITY
4850
+
4851
+ addUnitPriority('millisecond', 16);
4852
+
4868
4853
  // PARSING
4869
4854
 
4870
4855
  addRegexToken('S', match1to3, match1);
@@ -5172,12 +5157,12 @@ getSetGlobalLocale('en', {
5172
5157
  toInt((number % 100) / 10) === 1
5173
5158
  ? 'th'
5174
5159
  : b === 1
5175
- ? 'st'
5176
- : b === 2
5177
- ? 'nd'
5178
- : b === 3
5179
- ? 'rd'
5180
- : 'th';
5160
+ ? 'st'
5161
+ : b === 2
5162
+ ? 'nd'
5163
+ : b === 3
5164
+ ? 'rd'
5165
+ : 'th';
5181
5166
  return number + output;
5182
5167
  },
5183
5168
  });
@@ -5350,6 +5335,19 @@ function as(units) {
5350
5335
  }
5351
5336
  }
5352
5337
 
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
+
5353
5351
  function makeAs(alias) {
5354
5352
  return function () {
5355
5353
  return this.as(alias);
@@ -5364,8 +5362,7 @@ var asMilliseconds = makeAs('ms'),
5364
5362
  asWeeks = makeAs('w'),
5365
5363
  asMonths = makeAs('M'),
5366
5364
  asQuarters = makeAs('Q'),
5367
- asYears = makeAs('y'),
5368
- valueOf$1 = asMilliseconds;
5365
+ asYears = makeAs('y');
5369
5366
 
5370
5367
  function clone$1() {
5371
5368
  return createDuration(this);
@@ -5634,7 +5631,7 @@ addParseToken('x', function (input, array, config) {
5634
5631
 
5635
5632
  //! moment.js
5636
5633
 
5637
- hooks.version = '2.30.1';
5634
+ hooks.version = '2.29.4';
5638
5635
 
5639
5636
  setHookCallback(createLocal);
5640
5637