@js-joda/locale 4.2.0 → 4.5.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 (60) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/README.md +8 -8
  3. package/dist/js-joda-locale.js +1090 -1296
  4. package/dist/js-joda-locale.js.map +1 -1
  5. package/dist/js-joda-locale.min.js +9 -36
  6. package/dist/prebuilt/de/index.js +1100 -1306
  7. package/dist/prebuilt/de/index.js.map +1 -1
  8. package/dist/prebuilt/de-de/index.js +1100 -1306
  9. package/dist/prebuilt/de-de/index.js.map +1 -1
  10. package/dist/prebuilt/en/index.js +1101 -1307
  11. package/dist/prebuilt/en/index.js.map +1 -1
  12. package/dist/prebuilt/en-us/index.js +1100 -1306
  13. package/dist/prebuilt/en-us/index.js.map +1 -1
  14. package/dist/prebuilt/es/index.js +1101 -1307
  15. package/dist/prebuilt/es/index.js.map +1 -1
  16. package/dist/prebuilt/fr/index.js +1101 -1307
  17. package/dist/prebuilt/fr/index.js.map +1 -1
  18. package/dist/prebuilt/fr-fr/index.js +1100 -1306
  19. package/dist/prebuilt/fr-fr/index.js.map +1 -1
  20. package/dist/prebuilt/hi/index.js +1100 -1306
  21. package/dist/prebuilt/hi/index.js.map +1 -1
  22. package/dist/prebuilt/it/index.js +1100 -1306
  23. package/dist/prebuilt/it/index.js.map +1 -1
  24. package/dist/prebuilt/it-it/index.js +1100 -1306
  25. package/dist/prebuilt/it-it/index.js.map +1 -1
  26. package/dist/prebuilt/ja/index.js +1100 -1306
  27. package/dist/prebuilt/ja/index.js.map +1 -1
  28. package/dist/prebuilt/ja-jp/index.js +1100 -1306
  29. package/dist/prebuilt/ja-jp/index.js.map +1 -1
  30. package/dist/prebuilt/ko/index.js +1100 -1306
  31. package/dist/prebuilt/ko/index.js.map +1 -1
  32. package/dist/prebuilt/ro/index.js +1100 -1306
  33. package/dist/prebuilt/ro/index.js.map +1 -1
  34. package/dist/prebuilt/ru/index.js +4031 -0
  35. package/dist/prebuilt/ru/index.js.map +1 -0
  36. package/dist/prebuilt/sv/index.js +1100 -1306
  37. package/dist/prebuilt/sv/index.js.map +1 -1
  38. package/dist/prebuilt/sv-se/index.js +1100 -1306
  39. package/dist/prebuilt/sv-se/index.js.map +1 -1
  40. package/dist/prebuilt/zh/index.js +1100 -1306
  41. package/dist/prebuilt/zh/index.js.map +1 -1
  42. package/package.json +24 -17
  43. package/src/Locale.js +8 -0
  44. package/{dist → typings}/js-joda-locale.d.ts +12 -0
  45. package/.babelrc +0 -24
  46. package/build_package.default.json +0 -14
  47. package/build_package.prebuilt.json +0 -66
  48. package/examples/usage_browser.html +0 -111
  49. package/examples/usage_browser_build.html +0 -72
  50. package/examples/usage_es6.js +0 -15
  51. package/examples/usage_node.js +0 -38
  52. package/examples/usage_node_build.js +0 -48
  53. package/utils/CldrDataIgnorePlugin.js +0 -57
  54. package/utils/README_package.template.md +0 -13
  55. package/utils/buildWebpackConfig.js +0 -28
  56. package/utils/build_package.js +0 -170
  57. package/utils/create_packages.js +0 -136
  58. package/utils/load_cldrData.prebuilt.js +0 -18
  59. package/utils/publish_release.js +0 -151
  60. package/webpack.config.js +0 -88
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/locale - 4.2.0
1
+ //! @version @js-joda/locale - 4.5.0
2
2
  //! @copyright (c) 2015-2016, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
3
3
  //! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
4
  //! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
@@ -1867,12 +1867,6 @@ __webpack_require__.r(__webpack_exports__);
1867
1867
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Locale; });
1868
1868
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_init", function() { return _init; });
1869
1869
  /* harmony import */ var _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/cldr/CldrDateTimeTextProvider */ "./src/format/cldr/CldrDateTimeTextProvider.js");
1870
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1871
-
1872
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1873
-
1874
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1875
-
1876
1870
  /*
1877
1871
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
1878
1872
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -1880,64 +1874,61 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
1880
1874
 
1881
1875
 
1882
1876
  var Locale = function () {
1883
- function Locale(language) {
1884
- var country = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
1885
- var localeString = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1877
+ Locale.getAvailableLocales = function getAvailableLocales() {
1878
+ return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
1879
+ };
1886
1880
 
1887
- _classCallCheck(this, Locale);
1881
+ function Locale(language, country, localeString) {
1882
+ if (country === void 0) {
1883
+ country = '';
1884
+ }
1885
+
1886
+ if (localeString === void 0) {
1887
+ localeString = '';
1888
+ }
1888
1889
 
1889
1890
  this._language = language;
1890
1891
  this._country = country;
1891
1892
  this._localeString = localeString;
1892
1893
  }
1893
1894
 
1894
- _createClass(Locale, [{
1895
- key: "language",
1896
- value: function language() {
1897
- return this._language;
1898
- }
1899
- }, {
1900
- key: "country",
1901
- value: function country() {
1902
- return this._country;
1903
- }
1904
- }, {
1905
- key: "localeString",
1906
- value: function localeString() {
1907
- if (this._localeString.length > 0) {
1908
- return this._localeString;
1909
- }
1895
+ var _proto = Locale.prototype;
1910
1896
 
1911
- if (this._country.length > 0) {
1912
- return "".concat(this._language, "-").concat(this._country);
1913
- } else {
1914
- return this._language;
1915
- }
1897
+ _proto.language = function language() {
1898
+ return this._language;
1899
+ };
1900
+
1901
+ _proto.country = function country() {
1902
+ return this._country;
1903
+ };
1904
+
1905
+ _proto.localeString = function localeString() {
1906
+ if (this._localeString.length > 0) {
1907
+ return this._localeString;
1916
1908
  }
1917
- }, {
1918
- key: "toString",
1919
- value: function toString() {
1920
- return "Locale[".concat(this.localeString(), "]");
1909
+
1910
+ if (this._country.length > 0) {
1911
+ return this._language + "-" + this._country;
1912
+ } else {
1913
+ return this._language;
1921
1914
  }
1922
- }, {
1923
- key: "equals",
1924
- value: function equals(other) {
1925
- if (!other) {
1926
- return false;
1927
- }
1915
+ };
1928
1916
 
1929
- if (!(other instanceof Locale)) {
1930
- return false;
1931
- }
1917
+ _proto.toString = function toString() {
1918
+ return "Locale[" + this.localeString() + "]";
1919
+ };
1932
1920
 
1933
- return this.localeString() === other.localeString();
1921
+ _proto.equals = function equals(other) {
1922
+ if (!other) {
1923
+ return false;
1934
1924
  }
1935
- }], [{
1936
- key: "getAvailableLocales",
1937
- value: function getAvailableLocales() {
1938
- return new _format_cldr_CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_0__["default"]().getAvailableLocales();
1925
+
1926
+ if (!(other instanceof Locale)) {
1927
+ return false;
1939
1928
  }
1940
- }]);
1929
+
1930
+ return this.localeString() === other.localeString();
1931
+ };
1941
1932
 
1942
1933
  return Locale;
1943
1934
  }();
@@ -1955,6 +1946,14 @@ function _init() {
1955
1946
  Locale.KOREAN = new Locale('ko');
1956
1947
  Locale.JAPANESE = new Locale('ja', 'JP');
1957
1948
  Locale.JAPAN = new Locale('ja', 'JP', 'ja');
1949
+ Locale.ITALIAN = new Locale('it');
1950
+ Locale.ITALY = new Locale('it', 'IT', 'it');
1951
+ Locale.CHINESE = new Locale('zh');
1952
+ Locale.ROMANIAN = new Locale('ro');
1953
+ Locale.SWEDISH = new Locale('sv');
1954
+ Locale.SWEDEN = new Locale('sv', 'SE', 'sv');
1955
+ Locale.HINDI = new Locale('hi');
1956
+ Locale.RUSSIAN = new Locale('ru');
1958
1957
  }
1959
1958
 
1960
1959
  /***/ }),
@@ -2010,28 +2009,10 @@ __webpack_require__.r(__webpack_exports__);
2010
2009
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2011
2010
  /* harmony import */ var _Locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locale */ "./src/Locale.js");
2012
2011
  /* harmony import */ var _cldr_CldrDateTimeFormatterBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cldr/CldrDateTimeFormatterBuilder */ "./src/format/cldr/CldrDateTimeFormatterBuilder.js");
2013
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2014
-
2015
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2016
-
2017
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2018
-
2019
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2020
-
2021
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
2012
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2022
2013
 
2023
2014
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2024
2015
 
2025
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2026
-
2027
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
2028
-
2029
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2030
-
2031
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2032
-
2033
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2034
-
2035
2016
  /*
2036
2017
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2037
2018
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2042,28 +2023,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
2042
2023
  var requireNonNull = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].assert.requireNonNull;
2043
2024
 
2044
2025
  var LocaleDateTimeFormatter = function (_DateTimeFormatter) {
2045
- _inherits(LocaleDateTimeFormatter, _DateTimeFormatter);
2046
-
2047
- var _super = _createSuper(LocaleDateTimeFormatter);
2026
+ _inheritsLoose(LocaleDateTimeFormatter, _DateTimeFormatter);
2048
2027
 
2049
2028
  function LocaleDateTimeFormatter() {
2050
- _classCallCheck(this, LocaleDateTimeFormatter);
2051
-
2052
- return _super.apply(this, arguments);
2029
+ return _DateTimeFormatter.apply(this, arguments) || this;
2053
2030
  }
2054
2031
 
2055
- _createClass(LocaleDateTimeFormatter, [{
2056
- key: "withLocale",
2057
- value: function withLocale(locale) {
2058
- requireNonNull(locale, 'locale');
2032
+ var _proto = LocaleDateTimeFormatter.prototype;
2059
2033
 
2060
- if (locale.equals(this._locale)) {
2061
- return this;
2062
- }
2034
+ _proto.withLocale = function withLocale(locale) {
2035
+ requireNonNull(locale, 'locale');
2063
2036
 
2064
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
2037
+ if (locale.equals(this._locale)) {
2038
+ return this;
2065
2039
  }
2066
- }]);
2040
+
2041
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"](this._printerParser, locale, this._decimalStyle, this._resolverStyle, this._resolverFields, this._chrono, this._zone);
2042
+ };
2067
2043
 
2068
2044
  return LocaleDateTimeFormatter;
2069
2045
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatter"]);
@@ -2109,12 +2085,6 @@ function _init() {
2109
2085
  __webpack_require__.r(__webpack_exports__);
2110
2086
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEntry", function() { return createEntry; });
2111
2087
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocaleStore", function() { return LocaleStore; });
2112
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2113
-
2114
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2115
-
2116
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2117
-
2118
2088
  /*
2119
2089
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2120
2090
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2124,7 +2094,7 @@ var createEntry = function createEntry(text, field) {
2124
2094
  key: text,
2125
2095
  value: field,
2126
2096
  toString: function toString() {
2127
- return "".concat(text, "->").concat(field);
2097
+ return text + "->" + field;
2128
2098
  }
2129
2099
  };
2130
2100
  };
@@ -2135,8 +2105,6 @@ var _comparator = function _comparator(obj1, obj2) {
2135
2105
 
2136
2106
  var LocaleStore = function () {
2137
2107
  function LocaleStore(valueTextMap) {
2138
- _classCallCheck(this, LocaleStore);
2139
-
2140
2108
  this._valueTextMap = valueTextMap;
2141
2109
  var map = {};
2142
2110
  var allList = [];
@@ -2160,19 +2128,17 @@ var LocaleStore = function () {
2160
2128
  this._parsable = map;
2161
2129
  }
2162
2130
 
2163
- _createClass(LocaleStore, [{
2164
- key: "getText",
2165
- value: function getText(value, style) {
2166
- var map = this._valueTextMap[style];
2167
- return map != null ? map[value] : null;
2168
- }
2169
- }, {
2170
- key: "getTextIterator",
2171
- value: function getTextIterator(style) {
2172
- var list = this._parsable[style];
2173
- return list != null ? list[Symbol.iterator]() : null;
2174
- }
2175
- }]);
2131
+ var _proto = LocaleStore.prototype;
2132
+
2133
+ _proto.getText = function getText(value, style) {
2134
+ var map = this._valueTextMap[style];
2135
+ return map != null ? map[value] : null;
2136
+ };
2137
+
2138
+ _proto.getTextIterator = function getTextIterator(style) {
2139
+ var list = this._parsable[style];
2140
+ return list != null ? list[Symbol.iterator]() : null;
2141
+ };
2176
2142
 
2177
2143
  return LocaleStore;
2178
2144
  }();
@@ -2255,28 +2221,10 @@ __webpack_require__.r(__webpack_exports__);
2255
2221
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
2256
2222
  /* harmony import */ var _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser/LocalizedOffsetPrinterParser */ "./src/format/parser/LocalizedOffsetPrinterParser.js");
2257
2223
  /* harmony import */ var _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../parser/WeekFieldsPrinterParser */ "./src/format/parser/WeekFieldsPrinterParser.js");
2258
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2259
-
2260
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2261
-
2262
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2263
-
2264
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2265
-
2266
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
2224
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2267
2225
 
2268
2226
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2269
2227
 
2270
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2271
-
2272
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
2273
-
2274
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2275
-
2276
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2277
-
2278
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2279
-
2280
2228
  /**
2281
2229
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2282
2230
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -2294,98 +2242,87 @@ var _jodaInternal$assert = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].asser
2294
2242
  requireInstance = _jodaInternal$assert.requireInstance;
2295
2243
 
2296
2244
  var CldrDateTimeFormatterBuilder = function (_DateTimeFormatterBui) {
2297
- _inherits(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2298
-
2299
- var _super = _createSuper(CldrDateTimeFormatterBuilder);
2245
+ _inheritsLoose(CldrDateTimeFormatterBuilder, _DateTimeFormatterBui);
2300
2246
 
2301
2247
  function CldrDateTimeFormatterBuilder() {
2302
- _classCallCheck(this, CldrDateTimeFormatterBuilder);
2303
-
2304
- return _super.apply(this, arguments);
2248
+ return _DateTimeFormatterBui.apply(this, arguments) || this;
2305
2249
  }
2306
2250
 
2307
- _createClass(CldrDateTimeFormatterBuilder, [{
2308
- key: "appendText",
2309
- value: function appendText(field, styleOrMap) {
2310
- if (styleOrMap === undefined) {
2311
- return this.appendTextField(field);
2312
- } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2313
- return this.appendTextFieldStyle(field, styleOrMap);
2314
- } else {
2315
- return this.appendTextFieldMap(field, styleOrMap);
2316
- }
2317
- }
2318
- }, {
2319
- key: "appendTextField",
2320
- value: function appendTextField(field) {
2321
- return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2251
+ var _proto = CldrDateTimeFormatterBuilder.prototype;
2252
+
2253
+ _proto.appendText = function appendText(field, styleOrMap) {
2254
+ if (styleOrMap === undefined) {
2255
+ return this.appendTextField(field);
2256
+ } else if (styleOrMap instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"]) {
2257
+ return this.appendTextFieldStyle(field, styleOrMap);
2258
+ } else {
2259
+ return this.appendTextFieldMap(field, styleOrMap);
2322
2260
  }
2323
- }, {
2324
- key: "appendTextFieldStyle",
2325
- value: function appendTextFieldStyle(field, textStyle) {
2326
- requireNonNull(field, 'field');
2327
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2328
- requireNonNull(textStyle, 'textStyle');
2329
- requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2261
+ };
2330
2262
 
2331
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2263
+ _proto.appendTextField = function appendTextField(field) {
2264
+ return this.appendTextFieldStyle(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL);
2265
+ };
2332
2266
 
2333
- return this;
2334
- }
2335
- }, {
2336
- key: "appendTextFieldMap",
2337
- value: function appendTextFieldMap(field, textLookup) {
2338
- requireNonNull(field, 'field');
2339
- requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2340
- requireNonNull(textLookup, 'textLookup');
2341
- var copy = Object.assign({}, textLookup);
2342
- var map = {};
2343
- map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2344
- var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2345
- var provider = {
2346
- getText: function getText(field, value, style) {
2347
- return store.getText(value, style);
2348
- },
2349
- getTextIterator: function getTextIterator(field, style) {
2350
- return store.getTextIterator(style);
2351
- }
2352
- };
2267
+ _proto.appendTextFieldStyle = function appendTextFieldStyle(field, textStyle) {
2268
+ requireNonNull(field, 'field');
2269
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalField"], 'field');
2270
+ requireNonNull(textStyle, 'textStyle');
2271
+ requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2353
2272
 
2354
- this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2273
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, textStyle, new _CldrDateTimeTextProvider__WEBPACK_IMPORTED_MODULE_2__["default"]()));
2355
2274
 
2356
- return this;
2357
- }
2358
- }, {
2359
- key: "appendWeekField",
2360
- value: function appendWeekField(field, count) {
2361
- requireNonNull(field, 'field');
2362
- requireNonNull(count, 'count');
2275
+ return this;
2276
+ };
2277
+
2278
+ _proto.appendTextFieldMap = function appendTextFieldMap(field, textLookup) {
2279
+ requireNonNull(field, 'field');
2280
+ requireInstance(field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"], 'field');
2281
+ requireNonNull(textLookup, 'textLookup');
2282
+ var copy = Object.assign({}, textLookup);
2283
+ var map = {};
2284
+ map[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = copy;
2285
+ var store = new _LocaleStore__WEBPACK_IMPORTED_MODULE_4__["LocaleStore"](map);
2286
+ var provider = {
2287
+ getText: function getText(field, value, style) {
2288
+ return store.getText(value, style);
2289
+ },
2290
+ getTextIterator: function getTextIterator(field, style) {
2291
+ return store.getTextIterator(style);
2292
+ }
2293
+ };
2363
2294
 
2364
- this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2295
+ this._appendInternal(new _parser_TextPrinterParser__WEBPACK_IMPORTED_MODULE_1__["default"](field, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL, provider));
2365
2296
 
2366
- return this;
2367
- }
2368
- }, {
2369
- key: "appendZoneText",
2370
- value: function appendZoneText(textStyle) {
2371
- this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2297
+ return this;
2298
+ };
2372
2299
 
2373
- return this;
2374
- }
2375
- }, {
2376
- key: "appendLocalizedOffset",
2377
- value: function appendLocalizedOffset(textStyle) {
2378
- requireNonNull(textStyle, 'textStyle');
2300
+ _proto.appendWeekField = function appendWeekField(field, count) {
2301
+ requireNonNull(field, 'field');
2302
+ requireNonNull(count, 'count');
2379
2303
 
2380
- if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2381
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2382
- }
2304
+ this._appendInternal(new _parser_WeekFieldsPrinterParser__WEBPACK_IMPORTED_MODULE_6__["default"](field, count));
2305
+
2306
+ return this;
2307
+ };
2383
2308
 
2384
- this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2309
+ _proto.appendZoneText = function appendZoneText(textStyle) {
2310
+ this._appendInternal(new _CldrZoneTextPrinterParser__WEBPACK_IMPORTED_MODULE_3__["default"](textStyle));
2385
2311
 
2386
- return this;
2312
+ return this;
2313
+ };
2314
+
2315
+ _proto.appendLocalizedOffset = function appendLocalizedOffset(textStyle) {
2316
+ requireNonNull(textStyle, 'textStyle');
2317
+
2318
+ if (textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL && textStyle !== _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT) {
2319
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]('Style must be either full or short');
2387
2320
  }
2388
- }]);
2321
+
2322
+ this._appendInternal(new _parser_LocalizedOffsetPrinterParser__WEBPACK_IMPORTED_MODULE_5__["default"](textStyle));
2323
+
2324
+ return this;
2325
+ };
2389
2326
 
2390
2327
  return CldrDateTimeFormatterBuilder;
2391
2328
  }(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"]);
@@ -2410,12 +2347,6 @@ __webpack_require__.r(__webpack_exports__);
2410
2347
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
2411
2348
  /* harmony import */ var _LocaleStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocaleStore */ "./src/format/LocaleStore.js");
2412
2349
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
2413
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2414
-
2415
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2416
-
2417
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2418
-
2419
2350
  /*
2420
2351
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2421
2352
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2427,218 +2358,210 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
2427
2358
 
2428
2359
  var CldrDateTimeTextProvider = function () {
2429
2360
  function CldrDateTimeTextProvider() {
2430
- _classCallCheck(this, CldrDateTimeTextProvider);
2431
-
2432
2361
  this._cache = {};
2433
2362
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])('supplemental/likelySubtags.json');
2434
2363
  }
2435
2364
 
2436
- _createClass(CldrDateTimeTextProvider, [{
2437
- key: "getAvailableLocales",
2438
- value: function getAvailableLocales() {
2439
- if (true) {
2440
- return ["sv.*"];
2441
- }
2365
+ var _proto = CldrDateTimeTextProvider.prototype;
2442
2366
 
2443
- return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2367
+ _proto.getAvailableLocales = function getAvailableLocales() {
2368
+ if (true) {
2369
+ return ["sv.*"];
2444
2370
  }
2445
- }, {
2446
- key: "getText",
2447
- value: function getText(field, value, style, locale) {
2448
- var store = this._findStore(field, locale);
2449
2371
 
2450
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2451
- return store.getText(value, style);
2452
- }
2372
+ return cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('availableLocales.json').availableLocales;
2373
+ };
2453
2374
 
2454
- return null;
2375
+ _proto.getText = function getText(field, value, style, locale) {
2376
+ var store = this._findStore(field, locale);
2377
+
2378
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2379
+ return store.getText(value, style);
2455
2380
  }
2456
- }, {
2457
- key: "getTextIterator",
2458
- value: function getTextIterator(field, style, locale) {
2459
- var store = this._findStore(field, locale);
2460
2381
 
2461
- if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2462
- return store.getTextIterator(style);
2463
- }
2382
+ return null;
2383
+ };
2464
2384
 
2465
- return null;
2466
- }
2467
- }, {
2468
- key: "_findStore",
2469
- value: function _findStore(field, locale) {
2470
- var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
2471
- var store = this._cache[key];
2472
-
2473
- if (store === undefined) {
2474
- store = this._createStore(field, locale);
2475
- this._cache[key] = store;
2476
- }
2385
+ _proto.getTextIterator = function getTextIterator(field, style, locale) {
2386
+ var store = this._findStore(field, locale);
2477
2387
 
2478
- return store;
2388
+ if (store instanceof _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"]) {
2389
+ return store.getTextIterator(style);
2479
2390
  }
2480
- }, {
2481
- key: "_createStore",
2482
- value: function _createStore(field, locale) {
2483
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/".concat(locale.localeString(), "/ca-gregorian.json"));
2484
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
2485
-
2486
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
2487
- var monthsData = cldr.main('dates/calendars/gregorian/months/format');
2488
- var styleMap = {};
2489
- var data = {};
2490
- data[1] = monthsData.wide[1];
2491
- data[2] = monthsData.wide[2];
2492
- data[3] = monthsData.wide[3];
2493
- data[4] = monthsData.wide[4];
2494
- data[5] = monthsData.wide[5];
2495
- data[6] = monthsData.wide[6];
2496
- data[7] = monthsData.wide[7];
2497
- data[8] = monthsData.wide[8];
2498
- data[9] = monthsData.wide[9];
2499
- data[10] = monthsData.wide[10];
2500
- data[11] = monthsData.wide[11];
2501
- data[12] = monthsData.wide[12];
2502
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
2503
- data = {};
2504
- data[1] = monthsData.narrow[1];
2505
- data[2] = monthsData.narrow[2];
2506
- data[3] = monthsData.narrow[3];
2507
- data[4] = monthsData.narrow[4];
2508
- data[5] = monthsData.narrow[5];
2509
- data[6] = monthsData.narrow[6];
2510
- data[7] = monthsData.narrow[7];
2511
- data[8] = monthsData.narrow[8];
2512
- data[9] = monthsData.narrow[9];
2513
- data[10] = monthsData.narrow[10];
2514
- data[11] = monthsData.narrow[11];
2515
- data[12] = monthsData.narrow[12];
2516
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
2517
- data = {};
2518
- data[1] = monthsData.abbreviated[1];
2519
- data[2] = monthsData.abbreviated[2];
2520
- data[3] = monthsData.abbreviated[3];
2521
- data[4] = monthsData.abbreviated[4];
2522
- data[5] = monthsData.abbreviated[5];
2523
- data[6] = monthsData.abbreviated[6];
2524
- data[7] = monthsData.abbreviated[7];
2525
- data[8] = monthsData.abbreviated[8];
2526
- data[9] = monthsData.abbreviated[9];
2527
- data[10] = monthsData.abbreviated[10];
2528
- data[11] = monthsData.abbreviated[11];
2529
- data[12] = monthsData.abbreviated[12];
2530
- styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
2531
- return this._createLocaleStore(styleMap);
2532
- }
2533
2391
 
2534
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
2535
- var daysData = cldr.main('dates/calendars/gregorian/days/format');
2536
- var _styleMap = {};
2537
- var _data = {};
2538
- _data[1] = daysData.wide.mon;
2539
- _data[2] = daysData.wide.tue;
2540
- _data[3] = daysData.wide.wed;
2541
- _data[4] = daysData.wide.thu;
2542
- _data[5] = daysData.wide.fri;
2543
- _data[6] = daysData.wide.sat;
2544
- _data[7] = daysData.wide.sun;
2545
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
2546
- _data = {};
2547
- _data[1] = daysData.narrow.mon;
2548
- _data[2] = daysData.narrow.tue;
2549
- _data[3] = daysData.narrow.wed;
2550
- _data[4] = daysData.narrow.thu;
2551
- _data[5] = daysData.narrow.fri;
2552
- _data[6] = daysData.narrow.sat;
2553
- _data[7] = daysData.narrow.sun;
2554
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
2555
- _data = {};
2556
- _data[1] = daysData.abbreviated.mon;
2557
- _data[2] = daysData.abbreviated.tue;
2558
- _data[3] = daysData.abbreviated.wed;
2559
- _data[4] = daysData.abbreviated.thu;
2560
- _data[5] = daysData.abbreviated.fri;
2561
- _data[6] = daysData.abbreviated.sat;
2562
- _data[7] = daysData.abbreviated.sun;
2563
- _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
2564
- return this._createLocaleStore(_styleMap);
2565
- }
2392
+ return null;
2393
+ };
2566
2394
 
2567
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
2568
- var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
2569
- var _styleMap2 = {};
2570
- var _data2 = {};
2571
- _data2[0] = dayPeriodsData.wide.am;
2572
- _data2[1] = dayPeriodsData.wide.pm;
2573
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
2574
- _data2 = {};
2575
- _data2[0] = dayPeriodsData.narrow.am;
2576
- _data2[1] = dayPeriodsData.narrow.pm;
2577
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
2578
- _data2 = {};
2579
- _data2[0] = dayPeriodsData.abbreviated.am;
2580
- _data2[1] = dayPeriodsData.abbreviated.pm;
2581
- _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
2582
- return this._createLocaleStore(_styleMap2);
2583
- }
2395
+ _proto._findStore = function _findStore(field, locale) {
2396
+ var key = Object(_LocaleStore__WEBPACK_IMPORTED_MODULE_2__["createEntry"])(field, locale);
2397
+ var store = this._cache[key];
2584
2398
 
2585
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
2586
- var erasData = cldr.main('dates/calendars/gregorian/eras');
2587
- var _styleMap3 = {};
2588
- var _data3 = {};
2589
- _data3[0] = erasData.eraNames['0'];
2590
- _data3[1] = erasData.eraNames['1'];
2591
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
2592
- _data3 = {};
2593
- _data3[0] = erasData.eraNarrow['0'];
2594
- _data3[1] = erasData.eraNarrow['1'];
2595
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
2596
- _data3 = {};
2597
- _data3[0] = erasData.eraAbbr['0'];
2598
- _data3[1] = erasData.eraAbbr['1'];
2599
- _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
2600
- return this._createLocaleStore(_styleMap3);
2601
- }
2399
+ if (store === undefined) {
2400
+ store = this._createStore(field, locale);
2401
+ this._cache[key] = store;
2402
+ }
2602
2403
 
2603
- if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
2604
- var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
2605
- var _styleMap4 = {};
2606
- var _data4 = {};
2607
- _data4[1] = quartersData.wide['1'];
2608
- _data4[2] = quartersData.wide['2'];
2609
- _data4[3] = quartersData.wide['3'];
2610
- _data4[4] = quartersData.wide['4'];
2611
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
2612
- _data4 = {};
2613
- _data4[1] = quartersData.narrow['1'];
2614
- _data4[2] = quartersData.narrow['2'];
2615
- _data4[3] = quartersData.narrow['3'];
2616
- _data4[4] = quartersData.narrow['4'];
2617
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
2618
- _data4 = {};
2619
- _data4[1] = quartersData.abbreviated['1'];
2620
- _data4[2] = quartersData.abbreviated['2'];
2621
- _data4[3] = quartersData.abbreviated['3'];
2622
- _data4[4] = quartersData.abbreviated['4'];
2623
- _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
2624
- return this._createLocaleStore(_styleMap4);
2625
- }
2404
+ return store;
2405
+ };
2626
2406
 
2627
- return null;
2628
- }
2629
- }, {
2630
- key: "_createLocaleStore",
2631
- value: function _createLocaleStore(valueTextMap) {
2632
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
2633
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
2634
-
2635
- if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
2636
- valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
2637
- }
2407
+ _proto._createStore = function _createStore(field, locale) {
2408
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["loadCldrData"])("main/" + locale.localeString() + "/ca-gregorian.json");
2409
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_3__["getOrCreateCldrInstance"])(locale.localeString());
2410
+
2411
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) {
2412
+ var monthsData = cldr.main('dates/calendars/gregorian/months/format');
2413
+ var styleMap = {};
2414
+ var data = {};
2415
+ data[1] = monthsData.wide[1];
2416
+ data[2] = monthsData.wide[2];
2417
+ data[3] = monthsData.wide[3];
2418
+ data[4] = monthsData.wide[4];
2419
+ data[5] = monthsData.wide[5];
2420
+ data[6] = monthsData.wide[6];
2421
+ data[7] = monthsData.wide[7];
2422
+ data[8] = monthsData.wide[8];
2423
+ data[9] = monthsData.wide[9];
2424
+ data[10] = monthsData.wide[10];
2425
+ data[11] = monthsData.wide[11];
2426
+ data[12] = monthsData.wide[12];
2427
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = data;
2428
+ data = {};
2429
+ data[1] = monthsData.narrow[1];
2430
+ data[2] = monthsData.narrow[2];
2431
+ data[3] = monthsData.narrow[3];
2432
+ data[4] = monthsData.narrow[4];
2433
+ data[5] = monthsData.narrow[5];
2434
+ data[6] = monthsData.narrow[6];
2435
+ data[7] = monthsData.narrow[7];
2436
+ data[8] = monthsData.narrow[8];
2437
+ data[9] = monthsData.narrow[9];
2438
+ data[10] = monthsData.narrow[10];
2439
+ data[11] = monthsData.narrow[11];
2440
+ data[12] = monthsData.narrow[12];
2441
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = data;
2442
+ data = {};
2443
+ data[1] = monthsData.abbreviated[1];
2444
+ data[2] = monthsData.abbreviated[2];
2445
+ data[3] = monthsData.abbreviated[3];
2446
+ data[4] = monthsData.abbreviated[4];
2447
+ data[5] = monthsData.abbreviated[5];
2448
+ data[6] = monthsData.abbreviated[6];
2449
+ data[7] = monthsData.abbreviated[7];
2450
+ data[8] = monthsData.abbreviated[8];
2451
+ data[9] = monthsData.abbreviated[9];
2452
+ data[10] = monthsData.abbreviated[10];
2453
+ data[11] = monthsData.abbreviated[11];
2454
+ data[12] = monthsData.abbreviated[12];
2455
+ styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = data;
2456
+ return this._createLocaleStore(styleMap);
2457
+ }
2458
+
2459
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) {
2460
+ var daysData = cldr.main('dates/calendars/gregorian/days/format');
2461
+ var _styleMap = {};
2462
+ var _data = {};
2463
+ _data[1] = daysData.wide.mon;
2464
+ _data[2] = daysData.wide.tue;
2465
+ _data[3] = daysData.wide.wed;
2466
+ _data[4] = daysData.wide.thu;
2467
+ _data[5] = daysData.wide.fri;
2468
+ _data[6] = daysData.wide.sat;
2469
+ _data[7] = daysData.wide.sun;
2470
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data;
2471
+ _data = {};
2472
+ _data[1] = daysData.narrow.mon;
2473
+ _data[2] = daysData.narrow.tue;
2474
+ _data[3] = daysData.narrow.wed;
2475
+ _data[4] = daysData.narrow.thu;
2476
+ _data[5] = daysData.narrow.fri;
2477
+ _data[6] = daysData.narrow.sat;
2478
+ _data[7] = daysData.narrow.sun;
2479
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data;
2480
+ _data = {};
2481
+ _data[1] = daysData.abbreviated.mon;
2482
+ _data[2] = daysData.abbreviated.tue;
2483
+ _data[3] = daysData.abbreviated.wed;
2484
+ _data[4] = daysData.abbreviated.thu;
2485
+ _data[5] = daysData.abbreviated.fri;
2486
+ _data[6] = daysData.abbreviated.sat;
2487
+ _data[7] = daysData.abbreviated.sun;
2488
+ _styleMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data;
2489
+ return this._createLocaleStore(_styleMap);
2490
+ }
2491
+
2492
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].AMPM_OF_DAY) {
2493
+ var dayPeriodsData = cldr.main('dates/calendars/gregorian/dayPeriods/format');
2494
+ var _styleMap2 = {};
2495
+ var _data2 = {};
2496
+ _data2[0] = dayPeriodsData.wide.am;
2497
+ _data2[1] = dayPeriodsData.wide.pm;
2498
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data2;
2499
+ _data2 = {};
2500
+ _data2[0] = dayPeriodsData.narrow.am;
2501
+ _data2[1] = dayPeriodsData.narrow.pm;
2502
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data2;
2503
+ _data2 = {};
2504
+ _data2[0] = dayPeriodsData.abbreviated.am;
2505
+ _data2[1] = dayPeriodsData.abbreviated.pm;
2506
+ _styleMap2[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data2;
2507
+ return this._createLocaleStore(_styleMap2);
2508
+ }
2509
+
2510
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].ERA) {
2511
+ var erasData = cldr.main('dates/calendars/gregorian/eras');
2512
+ var _styleMap3 = {};
2513
+ var _data3 = {};
2514
+ _data3[0] = erasData.eraNames['0'];
2515
+ _data3[1] = erasData.eraNames['1'];
2516
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data3;
2517
+ _data3 = {};
2518
+ _data3[0] = erasData.eraNarrow['0'];
2519
+ _data3[1] = erasData.eraNarrow['1'];
2520
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data3;
2521
+ _data3 = {};
2522
+ _data3[0] = erasData.eraAbbr['0'];
2523
+ _data3[1] = erasData.eraAbbr['1'];
2524
+ _styleMap3[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data3;
2525
+ return this._createLocaleStore(_styleMap3);
2526
+ }
2527
+
2528
+ if (field === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].QUARTER_OF_YEAR) {
2529
+ var quartersData = cldr.main('dates/calendars/gregorian/quarters/format');
2530
+ var _styleMap4 = {};
2531
+ var _data4 = {};
2532
+ _data4[1] = quartersData.wide['1'];
2533
+ _data4[2] = quartersData.wide['2'];
2534
+ _data4[3] = quartersData.wide['3'];
2535
+ _data4[4] = quartersData.wide['4'];
2536
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL] = _data4;
2537
+ _data4 = {};
2538
+ _data4[1] = quartersData.narrow['1'];
2539
+ _data4[2] = quartersData.narrow['2'];
2540
+ _data4[3] = quartersData.narrow['3'];
2541
+ _data4[4] = quartersData.narrow['4'];
2542
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW] = _data4;
2543
+ _data4 = {};
2544
+ _data4[1] = quartersData.abbreviated['1'];
2545
+ _data4[2] = quartersData.abbreviated['2'];
2546
+ _data4[3] = quartersData.abbreviated['3'];
2547
+ _data4[4] = quartersData.abbreviated['4'];
2548
+ _styleMap4[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT] = _data4;
2549
+ return this._createLocaleStore(_styleMap4);
2550
+ }
2551
+
2552
+ return null;
2553
+ };
2554
+
2555
+ _proto._createLocaleStore = function _createLocaleStore(valueTextMap) {
2556
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL];
2557
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].SHORT];
2638
2558
 
2639
- return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
2559
+ if (Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW) > -1 && Object.keys(valueTextMap).indexOf(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE) === -1) {
2560
+ valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW_STANDALONE] = valueTextMap[_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].NARROW];
2640
2561
  }
2641
- }]);
2562
+
2563
+ return new _LocaleStore__WEBPACK_IMPORTED_MODULE_2__["LocaleStore"](valueTextMap);
2564
+ };
2642
2565
 
2643
2566
  return CldrDateTimeTextProvider;
2644
2567
  }();
@@ -2660,18 +2583,12 @@ __webpack_require__.r(__webpack_exports__);
2660
2583
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
2661
2584
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2662
2585
  /* harmony import */ var _CldrCache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CldrCache */ "./src/format/cldr/CldrCache.js");
2663
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2586
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2664
2587
 
2665
2588
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2666
2589
 
2667
2590
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2668
2591
 
2669
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2670
-
2671
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2672
-
2673
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2674
-
2675
2592
  /*
2676
2593
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
2677
2594
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -2696,8 +2613,6 @@ var resolveZoneIdTextCache = {};
2696
2613
 
2697
2614
  var CldrZoneTextPrinterParser = function () {
2698
2615
  function CldrZoneTextPrinterParser(textStyle) {
2699
- _classCallCheck(this, CldrZoneTextPrinterParser);
2700
-
2701
2616
  requireNonNull(textStyle, 'textStyle');
2702
2617
  requireInstance(textStyle, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"], 'textStyle');
2703
2618
  this._textStyle = textStyle;
@@ -2706,202 +2621,178 @@ var CldrZoneTextPrinterParser = function () {
2706
2621
  Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])('supplemental/metaZones.json');
2707
2622
  }
2708
2623
 
2709
- _createClass(CldrZoneTextPrinterParser, [{
2710
- key: "_cachedResolveZoneIdText",
2711
- value: function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
2712
- if (resolveZoneIdTextCache[cldr.locale] == null) {
2713
- resolveZoneIdTextCache[cldr.locale] = {};
2714
- }
2624
+ var _proto = CldrZoneTextPrinterParser.prototype;
2715
2625
 
2716
- var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
2626
+ _proto._cachedResolveZoneIdText = function _cachedResolveZoneIdText(cldr, zoneId, style, type) {
2627
+ if (resolveZoneIdTextCache[cldr.locale] == null) {
2628
+ resolveZoneIdTextCache[cldr.locale] = {};
2629
+ }
2717
2630
 
2718
- if (zoneIdToStyle[zoneId] == null) {
2719
- zoneIdToStyle[zoneId] = {};
2720
- }
2631
+ var zoneIdToStyle = resolveZoneIdTextCache[cldr.locale];
2721
2632
 
2722
- var styleToType = zoneIdToStyle[zoneId];
2633
+ if (zoneIdToStyle[zoneId] == null) {
2634
+ zoneIdToStyle[zoneId] = {};
2635
+ }
2723
2636
 
2724
- if (styleToType[style] == null) {
2725
- styleToType[style] = {};
2726
- }
2637
+ var styleToType = zoneIdToStyle[zoneId];
2727
2638
 
2728
- var typeToResolvedZoneIdText = styleToType[style];
2639
+ if (styleToType[style] == null) {
2640
+ styleToType[style] = {};
2641
+ }
2729
2642
 
2730
- if (typeToResolvedZoneIdText[type] == null) {
2731
- typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
2732
- }
2643
+ var typeToResolvedZoneIdText = styleToType[style];
2733
2644
 
2734
- return typeToResolvedZoneIdText[type];
2645
+ if (typeToResolvedZoneIdText[type] == null) {
2646
+ typeToResolvedZoneIdText[type] = this._resolveZoneIdText(cldr, zoneId, style, type);
2735
2647
  }
2736
- }, {
2737
- key: "_resolveZoneIdText",
2738
- value: function _resolveZoneIdText(cldr, zoneId, style, type) {
2739
- var zoneData = cldr.main("dates/timeZoneNames/zone/".concat(zoneId, "/").concat(style, "/").concat(type));
2740
2648
 
2741
- if (zoneData) {
2742
- return zoneData;
2743
- } else {
2744
- var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/".concat(zoneId));
2649
+ return typeToResolvedZoneIdText[type];
2650
+ };
2651
+
2652
+ _proto._resolveZoneIdText = function _resolveZoneIdText(cldr, zoneId, style, type) {
2653
+ var zoneData = cldr.main("dates/timeZoneNames/zone/" + zoneId + "/" + style + "/" + type);
2745
2654
 
2746
- if (metazoneInfo) {
2747
- var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
2748
- var metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/").concat(type));
2655
+ if (zoneData) {
2656
+ return zoneData;
2657
+ } else {
2658
+ var metazoneInfo = cldr.get("supplemental/metaZones/metazoneInfo/timezone/" + zoneId);
2659
+
2660
+ if (metazoneInfo) {
2661
+ var metazone = metazoneInfo[metazoneInfo.length - 1]['usesMetazone']['_mzone'];
2662
+ var metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/" + type);
2663
+
2664
+ if (metaZoneData) {
2665
+ return metaZoneData;
2666
+ } else {
2667
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/generic");
2668
+
2669
+ if (!metaZoneData) {
2670
+ metaZoneData = cldr.main("dates/timeZoneNames/metazone/" + metazone + "/" + style + "/standard");
2671
+ }
2749
2672
 
2750
2673
  if (metaZoneData) {
2751
2674
  return metaZoneData;
2752
2675
  } else {
2753
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/generic"));
2754
-
2755
- if (!metaZoneData) {
2756
- metaZoneData = cldr.main("dates/timeZoneNames/metazone/".concat(metazone, "/").concat(style, "/standard"));
2757
- }
2676
+ var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
2677
+ var preferredZone = mapZones[metazone][cldr.attributes.territory];
2758
2678
 
2759
- if (metaZoneData) {
2760
- return metaZoneData;
2679
+ if (preferredZone) {
2680
+ if (preferredZone !== zoneId) {
2681
+ return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
2682
+ }
2761
2683
  } else {
2762
- var mapZones = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateMapZones"])(cldr);
2763
- var preferredZone = mapZones[metazone][cldr.attributes.territory];
2764
-
2765
- if (preferredZone) {
2766
- if (preferredZone !== zoneId) {
2767
- return this._cachedResolveZoneIdText(cldr, preferredZone, style, type);
2768
- }
2769
- } else {
2770
- var goldenZone = mapZones[metazone]['001'];
2771
-
2772
- if (goldenZone !== zoneId) {
2773
- return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
2774
- }
2684
+ var goldenZone = mapZones[metazone]['001'];
2685
+
2686
+ if (goldenZone !== zoneId) {
2687
+ return this._cachedResolveZoneIdText(cldr, goldenZone, style, type);
2775
2688
  }
2776
2689
  }
2777
2690
  }
2778
2691
  }
2779
2692
  }
2780
2693
  }
2781
- }, {
2782
- key: "print",
2783
- value: function print(context, buf) {
2784
- var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
2785
-
2786
- if (zone == null) {
2787
- return false;
2788
- }
2789
-
2790
- if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
2791
- buf.append(zone.id());
2792
- return true;
2793
- }
2794
-
2795
- var daylight = false;
2796
- var hasDaylightSupport = false;
2797
- var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
2798
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2799
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(context.locale().localeString(), "/timeZoneNames.json"));
2800
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
2694
+ };
2801
2695
 
2802
- var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
2696
+ _proto.print = function print(context, buf) {
2697
+ var zone = context.getValueQuery(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TemporalQueries"].zoneId());
2803
2698
 
2804
- if (text) {
2805
- buf.append(text);
2806
- } else {
2807
- buf.append(zone.id());
2808
- }
2699
+ if (zone == null) {
2700
+ return false;
2701
+ }
2809
2702
 
2703
+ if (zone.normalized() instanceof _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneOffset"]) {
2704
+ buf.append(zone.id());
2810
2705
  return true;
2811
2706
  }
2812
- }, {
2813
- key: "_resolveZoneIds",
2814
- value: function _resolveZoneIds(localString) {
2815
- if (this._zoneIdsLocales[localString] != null) {
2816
- return this._zoneIdsLocales[localString];
2817
- }
2818
2707
 
2819
- var ids = {};
2820
- Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/".concat(localString, "/timeZoneNames.json"));
2821
- var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
2708
+ var daylight = false;
2709
+ var hasDaylightSupport = false;
2710
+ var tzType = hasDaylightSupport ? daylight ? 'daylight' : 'standard' : 'generic';
2711
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2712
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + context.locale().localeString() + "/timeZoneNames.json");
2713
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(context.locale().localeString());
2822
2714
 
2823
- var _iterator = _createForOfIteratorHelper(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()),
2824
- _step;
2715
+ var text = this._cachedResolveZoneIdText(cldr, zone.id(), tzstyle, tzType);
2825
2716
 
2826
- try {
2827
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2828
- var id = _step.value;
2829
- ids[id] = id;
2830
- var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2717
+ if (text) {
2718
+ buf.append(text);
2719
+ } else {
2720
+ buf.append(zone.id());
2721
+ }
2831
2722
 
2832
- var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
2723
+ return true;
2724
+ };
2833
2725
 
2834
- if (genericText) {
2835
- ids[genericText] = id;
2836
- }
2726
+ _proto._resolveZoneIds = function _resolveZoneIds(localString) {
2727
+ if (this._zoneIdsLocales[localString] != null) {
2728
+ return this._zoneIdsLocales[localString];
2729
+ }
2837
2730
 
2838
- var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
2731
+ var ids = {};
2732
+ Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["loadCldrData"])("main/" + localString + "/timeZoneNames.json");
2733
+ var cldr = Object(_CldrCache__WEBPACK_IMPORTED_MODULE_1__["getOrCreateCldrInstance"])(localString);
2839
2734
 
2840
- if (standardText) {
2841
- ids[standardText] = id;
2842
- }
2735
+ for (var _iterator = _createForOfIteratorHelperLoose(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneRulesProvider"].getAvailableZoneIds()), _step; !(_step = _iterator()).done;) {
2736
+ var id = _step.value;
2737
+ ids[id] = id;
2738
+ var tzstyle = this._textStyle.asNormal() === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL ? 'long' : 'short';
2843
2739
 
2844
- var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
2740
+ var genericText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'generic');
2845
2741
 
2846
- if (daylightText) {
2847
- ids[daylightText] = id;
2848
- }
2849
- }
2850
- } catch (err) {
2851
- _iterator.e(err);
2852
- } finally {
2853
- _iterator.f();
2742
+ if (genericText) {
2743
+ ids[genericText] = id;
2854
2744
  }
2855
2745
 
2856
- var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
2857
- this._zoneIdsLocales[localString] = {
2858
- ids: ids,
2859
- sortedKeys: sortedKeys
2860
- };
2861
- return this._zoneIdsLocales[localString];
2862
- }
2863
- }, {
2864
- key: "parse",
2865
- value: function parse(context, text, position) {
2866
- for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
2867
- var name = _arr[_i];
2868
-
2869
- if (context.subSequenceEquals(text, position, name, 0, name.length)) {
2870
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
2871
- return position + name.length;
2872
- }
2746
+ var standardText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'standard');
2747
+
2748
+ if (standardText) {
2749
+ ids[standardText] = id;
2873
2750
  }
2874
2751
 
2875
- var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
2876
- ids = _this$_resolveZoneIds.ids,
2877
- sortedKeys = _this$_resolveZoneIds.sortedKeys;
2752
+ var daylightText = this._cachedResolveZoneIdText(cldr, id, tzstyle, 'daylight');
2878
2753
 
2879
- var _iterator2 = _createForOfIteratorHelper(sortedKeys),
2880
- _step2;
2754
+ if (daylightText) {
2755
+ ids[daylightText] = id;
2756
+ }
2757
+ }
2881
2758
 
2882
- try {
2883
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2884
- var _name = _step2.value;
2759
+ var sortedKeys = Object.keys(ids).sort(LENGTH_COMPARATOR);
2760
+ this._zoneIdsLocales[localString] = {
2761
+ ids: ids,
2762
+ sortedKeys: sortedKeys
2763
+ };
2764
+ return this._zoneIdsLocales[localString];
2765
+ };
2885
2766
 
2886
- if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
2887
- context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
2888
- return position + _name.length;
2889
- }
2890
- }
2891
- } catch (err) {
2892
- _iterator2.e(err);
2893
- } finally {
2894
- _iterator2.f();
2895
- }
2767
+ _proto.parse = function parse(context, text, position) {
2768
+ for (var _i = 0, _arr = ['UTC', 'GMT']; _i < _arr.length; _i++) {
2769
+ var name = _arr[_i];
2896
2770
 
2897
- return ~position;
2771
+ if (context.subSequenceEquals(text, position, name, 0, name.length)) {
2772
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(name));
2773
+ return position + name.length;
2774
+ }
2898
2775
  }
2899
- }, {
2900
- key: "toString",
2901
- value: function toString() {
2902
- return "ZoneText(".concat(this._textStyle, ")");
2776
+
2777
+ var _this$_resolveZoneIds = this._resolveZoneIds(context.locale().localeString()),
2778
+ ids = _this$_resolveZoneIds.ids,
2779
+ sortedKeys = _this$_resolveZoneIds.sortedKeys;
2780
+
2781
+ for (var _iterator2 = _createForOfIteratorHelperLoose(sortedKeys), _step2; !(_step2 = _iterator2()).done;) {
2782
+ var _name = _step2.value;
2783
+
2784
+ if (context.subSequenceEquals(text, position, _name, 0, _name.length)) {
2785
+ context.setParsedZone(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ZoneId"].of(ids[_name]));
2786
+ return position + _name.length;
2787
+ }
2903
2788
  }
2904
- }]);
2789
+
2790
+ return ~position;
2791
+ };
2792
+
2793
+ _proto.toString = function toString() {
2794
+ return "ZoneText(" + this._textStyle + ")";
2795
+ };
2905
2796
 
2906
2797
  return CldrZoneTextPrinterParser;
2907
2798
  }();
@@ -2922,12 +2813,6 @@ __webpack_require__.r(__webpack_exports__);
2922
2813
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return LocalizedOffsetPrinterParser; });
2923
2814
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
2924
2815
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
2925
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2926
-
2927
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2928
-
2929
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2930
-
2931
2816
  /**
2932
2817
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
2933
2818
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -2938,180 +2823,174 @@ var MathUtil = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].MathUtil;
2938
2823
 
2939
2824
  var LocalizedOffsetPrinterParser = function () {
2940
2825
  function LocalizedOffsetPrinterParser(textStyle) {
2941
- _classCallCheck(this, LocalizedOffsetPrinterParser);
2942
-
2943
2826
  this._textStyle = textStyle;
2944
2827
  }
2945
2828
 
2946
- _createClass(LocalizedOffsetPrinterParser, [{
2947
- key: "textStyle",
2948
- value: function textStyle() {
2949
- return this._textStyle;
2950
- }
2951
- }, {
2952
- key: "print",
2953
- value: function print(context, buf) {
2954
- var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
2829
+ var _proto = LocalizedOffsetPrinterParser.prototype;
2955
2830
 
2956
- if (offsetSecs == null) {
2957
- return false;
2958
- }
2831
+ _proto.textStyle = function textStyle() {
2832
+ return this._textStyle;
2833
+ };
2959
2834
 
2960
- buf.append('GMT');
2835
+ _proto.print = function print(context, buf) {
2836
+ var offsetSecs = context.getValue(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS);
2961
2837
 
2962
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2963
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
2964
- }
2838
+ if (offsetSecs == null) {
2839
+ return false;
2840
+ }
2965
2841
 
2966
- var totalSecs = MathUtil.safeToInt(offsetSecs);
2842
+ buf.append('GMT');
2967
2843
 
2968
- if (totalSecs !== 0) {
2969
- var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
2970
- var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
2971
- var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
2972
- buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
2844
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2845
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').print(context, buf);
2846
+ }
2973
2847
 
2974
- if (absMinutes > 0 || absSeconds > 0) {
2975
- buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
2848
+ var totalSecs = MathUtil.safeToInt(offsetSecs);
2976
2849
 
2977
- if (absSeconds > 0) {
2978
- buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
2979
- }
2850
+ if (totalSecs !== 0) {
2851
+ var absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100));
2852
+ var absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));
2853
+ var absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));
2854
+ buf.append(totalSecs < 0 ? '-' : '+').append(absHours);
2855
+
2856
+ if (absMinutes > 0 || absSeconds > 0) {
2857
+ buf.append(':').append(MathUtil.intDiv(absMinutes, 10)).append(MathUtil.intMod(absMinutes, 10));
2858
+
2859
+ if (absSeconds > 0) {
2860
+ buf.append(':').append(MathUtil.intDiv(absSeconds, 10)).append(MathUtil.intMod(absSeconds, 10));
2980
2861
  }
2981
2862
  }
2982
-
2983
- return true;
2984
2863
  }
2985
- }, {
2986
- key: "parse",
2987
- value: function parse(context, text, position) {
2988
- if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
2989
- return ~position;
2990
- }
2991
2864
 
2992
- position += 3;
2865
+ return true;
2866
+ };
2993
2867
 
2994
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2995
- return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
2996
- }
2868
+ _proto.parse = function parse(context, text, position) {
2869
+ if (context.subSequenceEquals(text, position, 'GMT', 0, 3) === false) {
2870
+ return ~position;
2871
+ }
2997
2872
 
2998
- var end = text.length;
2873
+ position += 3;
2999
2874
 
3000
- if (position === end) {
3001
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3002
- }
2875
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
2876
+ return new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].OffsetIdPrinterParser('', '+HH:MM:ss').parse(context, text, position);
2877
+ }
3003
2878
 
3004
- var sign = text.charAt(position);
2879
+ var end = text.length;
3005
2880
 
3006
- if (sign !== '+' && sign !== '-') {
3007
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
3008
- }
2881
+ if (position === end) {
2882
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2883
+ }
3009
2884
 
3010
- var negative = sign === '-' ? -1 : 1;
2885
+ var sign = text.charAt(position);
3011
2886
 
3012
- if (position === end) {
3013
- return ~position;
3014
- }
2887
+ if (sign !== '+' && sign !== '-') {
2888
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, 0, position, position);
2889
+ }
3015
2890
 
3016
- position++;
3017
- var ch = text.charAt(position);
2891
+ var negative = sign === '-' ? -1 : 1;
3018
2892
 
3019
- if (ch < '0' || ch > '9') {
3020
- return ~position;
3021
- }
2893
+ if (position === end) {
2894
+ return ~position;
2895
+ }
3022
2896
 
3023
- position++;
3024
- var hour = MathUtil.parseInt(ch);
2897
+ position++;
2898
+ var ch = text.charAt(position);
3025
2899
 
3026
- if (position !== end) {
3027
- ch = text.charAt(position);
2900
+ if (ch < '0' || ch > '9') {
2901
+ return ~position;
2902
+ }
3028
2903
 
3029
- if (ch >= '0' && ch <= '9') {
3030
- hour = hour * 10 + MathUtil.parseInt(ch);
2904
+ position++;
2905
+ var hour = MathUtil.parseInt(ch);
3031
2906
 
3032
- if (hour > 23) {
3033
- return ~position;
3034
- }
2907
+ if (position !== end) {
2908
+ ch = text.charAt(position);
3035
2909
 
3036
- position++;
3037
- }
3038
- }
2910
+ if (ch >= '0' && ch <= '9') {
2911
+ hour = hour * 10 + MathUtil.parseInt(ch);
3039
2912
 
3040
- if (position === end || text.charAt(position) !== ':') {
3041
- var _offset = negative * 3600 * hour;
2913
+ if (hour > 23) {
2914
+ return ~position;
2915
+ }
3042
2916
 
3043
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
2917
+ position++;
3044
2918
  }
2919
+ }
3045
2920
 
3046
- position++;
2921
+ if (position === end || text.charAt(position) !== ':') {
2922
+ var _offset = negative * 3600 * hour;
3047
2923
 
3048
- if (position > end - 2) {
3049
- return ~position;
3050
- }
2924
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset, position, position);
2925
+ }
3051
2926
 
3052
- ch = text.charAt(position);
2927
+ position++;
3053
2928
 
3054
- if (ch < '0' || ch > '9') {
3055
- return ~position;
3056
- }
2929
+ if (position > end - 2) {
2930
+ return ~position;
2931
+ }
3057
2932
 
3058
- position++;
3059
- var min = MathUtil.parseInt(ch);
3060
- ch = text.charAt(position);
2933
+ ch = text.charAt(position);
3061
2934
 
3062
- if (ch < '0' || ch > '9') {
3063
- return ~position;
3064
- }
2935
+ if (ch < '0' || ch > '9') {
2936
+ return ~position;
2937
+ }
3065
2938
 
3066
- position++;
3067
- min = min * 10 + MathUtil.parseInt(ch);
2939
+ position++;
2940
+ var min = MathUtil.parseInt(ch);
2941
+ ch = text.charAt(position);
3068
2942
 
3069
- if (min > 59) {
3070
- return ~position;
3071
- }
2943
+ if (ch < '0' || ch > '9') {
2944
+ return ~position;
2945
+ }
3072
2946
 
3073
- if (position === end || text.charAt(position) !== ':') {
3074
- var _offset2 = negative * (3600 * hour + 60 * min);
2947
+ position++;
2948
+ min = min * 10 + MathUtil.parseInt(ch);
3075
2949
 
3076
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
3077
- }
3078
-
3079
- position++;
2950
+ if (min > 59) {
2951
+ return ~position;
2952
+ }
3080
2953
 
3081
- if (position > end - 2) {
3082
- return ~position;
3083
- }
2954
+ if (position === end || text.charAt(position) !== ':') {
2955
+ var _offset2 = negative * (3600 * hour + 60 * min);
3084
2956
 
3085
- ch = text.charAt(position);
2957
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, _offset2, position, position);
2958
+ }
3086
2959
 
3087
- if (ch < '0' || ch > '9') {
3088
- return ~position;
3089
- }
2960
+ position++;
3090
2961
 
3091
- position++;
3092
- var sec = MathUtil.parseInt(ch);
3093
- ch = text.charAt(position);
2962
+ if (position > end - 2) {
2963
+ return ~position;
2964
+ }
3094
2965
 
3095
- if (ch < '0' || ch > '9') {
3096
- return ~position;
3097
- }
2966
+ ch = text.charAt(position);
3098
2967
 
3099
- position++;
3100
- sec = sec * 10 + MathUtil.parseInt(ch);
2968
+ if (ch < '0' || ch > '9') {
2969
+ return ~position;
2970
+ }
3101
2971
 
3102
- if (sec > 59) {
3103
- return ~position;
3104
- }
2972
+ position++;
2973
+ var sec = MathUtil.parseInt(ch);
2974
+ ch = text.charAt(position);
3105
2975
 
3106
- var offset = negative * (3600 * hour + 60 * min + sec);
3107
- return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
2976
+ if (ch < '0' || ch > '9') {
2977
+ return ~position;
3108
2978
  }
3109
- }, {
3110
- key: "toString",
3111
- value: function toString() {
3112
- return "LocalizedOffset(".concat(this._textStyle, ")");
2979
+
2980
+ position++;
2981
+ sec = sec * 10 + MathUtil.parseInt(ch);
2982
+
2983
+ if (sec > 59) {
2984
+ return ~position;
3113
2985
  }
3114
- }]);
2986
+
2987
+ var offset = negative * (3600 * hour + 60 * min + sec);
2988
+ return context.setParsedField(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].OFFSET_SECONDS, offset, position, position);
2989
+ };
2990
+
2991
+ _proto.toString = function toString() {
2992
+ return "LocalizedOffset(" + this._textStyle + ")";
2993
+ };
3115
2994
 
3116
2995
  return LocalizedOffsetPrinterParser;
3117
2996
  }();
@@ -3132,18 +3011,12 @@ __webpack_require__.r(__webpack_exports__);
3132
3011
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPrinterParser; });
3133
3012
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3134
3013
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3135
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3014
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3136
3015
 
3137
3016
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3138
3017
 
3139
3018
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
3140
3019
 
3141
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3142
-
3143
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3144
-
3145
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3146
-
3147
3020
  /**
3148
3021
  * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3149
3022
  * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
@@ -3153,104 +3026,86 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
3153
3026
 
3154
3027
  var TextPrinterParser = function () {
3155
3028
  function TextPrinterParser(field, textStyle, provider) {
3156
- _classCallCheck(this, TextPrinterParser);
3157
-
3158
3029
  this._field = field;
3159
3030
  this._textStyle = textStyle;
3160
3031
  this._provider = provider;
3161
3032
  }
3162
3033
 
3163
- _createClass(TextPrinterParser, [{
3164
- key: "field",
3165
- value: function field() {
3166
- return this._field;
3167
- }
3168
- }, {
3169
- key: "textStyle",
3170
- value: function textStyle() {
3171
- return this._textStyle;
3172
- }
3173
- }, {
3174
- key: "provider",
3175
- value: function provider() {
3176
- return this._provider;
3177
- }
3178
- }, {
3179
- key: "print",
3180
- value: function print(context, buf) {
3181
- var value = context.getValue(this._field);
3034
+ var _proto = TextPrinterParser.prototype;
3182
3035
 
3183
- if (value === null) {
3184
- return false;
3185
- }
3036
+ _proto.field = function field() {
3037
+ return this._field;
3038
+ };
3186
3039
 
3187
- var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
3040
+ _proto.textStyle = function textStyle() {
3041
+ return this._textStyle;
3042
+ };
3188
3043
 
3189
- if (text === null) {
3190
- return this._numberPrinterParser().print(context, buf);
3191
- }
3044
+ _proto.provider = function provider() {
3045
+ return this._provider;
3046
+ };
3192
3047
 
3193
- buf.append(text);
3194
- return true;
3048
+ _proto.print = function print(context, buf) {
3049
+ var value = context.getValue(this._field);
3050
+
3051
+ if (value === null) {
3052
+ return false;
3195
3053
  }
3196
- }, {
3197
- key: "parse",
3198
- value: function parse(context, parseText, position) {
3199
- var length = parseText.length;
3200
3054
 
3201
- if (position < 0 || position > length) {
3202
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: ".concat(position));
3203
- }
3055
+ var text = this._provider.getText(this._field, value, this._textStyle, context.locale());
3204
3056
 
3205
- var style = context.isStrict() ? this._textStyle : null;
3057
+ if (text === null) {
3058
+ return this._numberPrinterParser().print(context, buf);
3059
+ }
3206
3060
 
3207
- var it = this._provider.getTextIterator(this._field, style, context.locale());
3061
+ buf.append(text);
3062
+ return true;
3063
+ };
3208
3064
 
3209
- if (it != null) {
3210
- var _iterator = _createForOfIteratorHelper(it),
3211
- _step;
3065
+ _proto.parse = function parse(context, parseText, position) {
3066
+ var length = parseText.length;
3212
3067
 
3213
- try {
3214
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
3215
- var entry = _step.value;
3216
- var itText = entry.key;
3068
+ if (position < 0 || position > length) {
3069
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalArgumentException"]("The position is invalid: " + position);
3070
+ }
3217
3071
 
3218
- if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3219
- return context.setParsedField(this._field, entry.value, position, position + itText.length);
3220
- }
3221
- }
3222
- } catch (err) {
3223
- _iterator.e(err);
3224
- } finally {
3225
- _iterator.f();
3226
- }
3072
+ var style = context.isStrict() ? this._textStyle : null;
3227
3073
 
3228
- if (context.isStrict()) {
3229
- return ~position;
3074
+ var it = this._provider.getTextIterator(this._field, style, context.locale());
3075
+
3076
+ if (it != null) {
3077
+ for (var _iterator = _createForOfIteratorHelperLoose(it), _step; !(_step = _iterator()).done;) {
3078
+ var entry = _step.value;
3079
+ var itText = entry.key;
3080
+
3081
+ if (context.subSequenceEquals(itText, 0, parseText, position, itText.length)) {
3082
+ return context.setParsedField(this._field, entry.value, position, position + itText.length);
3230
3083
  }
3231
3084
  }
3232
3085
 
3233
- return this._numberPrinterParser().parse(context, parseText, position);
3234
- }
3235
- }, {
3236
- key: "_numberPrinterParser",
3237
- value: function _numberPrinterParser() {
3238
- if (this._currentNumberPrinterParser == null) {
3239
- this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
3086
+ if (context.isStrict()) {
3087
+ return ~position;
3240
3088
  }
3089
+ }
3090
+
3091
+ return this._numberPrinterParser().parse(context, parseText, position);
3092
+ };
3241
3093
 
3242
- return this._currentNumberPrinterParser;
3094
+ _proto._numberPrinterParser = function _numberPrinterParser() {
3095
+ if (this._currentNumberPrinterParser == null) {
3096
+ this._currentNumberPrinterParser = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(this._field, 1, 19, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL);
3243
3097
  }
3244
- }, {
3245
- key: "toString",
3246
- value: function toString() {
3247
- if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3248
- return "Text(".concat(this._field, ")");
3249
- }
3250
3098
 
3251
- return "Text(".concat(this._field, ",").concat(this._textStyle, ")");
3099
+ return this._currentNumberPrinterParser;
3100
+ };
3101
+
3102
+ _proto.toString = function toString() {
3103
+ if (this._textStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["TextStyle"].FULL) {
3104
+ return "Text(" + this._field + ")";
3252
3105
  }
3253
- }]);
3106
+
3107
+ return "Text(" + this._field + "," + this._textStyle + ")";
3108
+ };
3254
3109
 
3255
3110
  return TextPrinterParser;
3256
3111
  }();
@@ -3272,12 +3127,6 @@ __webpack_require__.r(__webpack_exports__);
3272
3127
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @js-joda/core */ "@js-joda/core");
3273
3128
  /* harmony import */ var _js_joda_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__);
3274
3129
  /* harmony import */ var _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../temporal/WeekFields */ "./src/temporal/WeekFields.js");
3275
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3276
-
3277
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3278
-
3279
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3280
-
3281
3130
  /*
3282
3131
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3283
3132
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3288,95 +3137,89 @@ var StringBuilder = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["_"].StringBuilde
3288
3137
 
3289
3138
  var WeekFieldsPrinterParser = function () {
3290
3139
  function WeekFieldsPrinterParser(letter, count) {
3291
- _classCallCheck(this, WeekFieldsPrinterParser);
3292
-
3293
3140
  this._letter = letter;
3294
3141
  this._count = count;
3295
3142
  }
3296
3143
 
3297
- _createClass(WeekFieldsPrinterParser, [{
3298
- key: "print",
3299
- value: function print(context, buf) {
3300
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3144
+ var _proto = WeekFieldsPrinterParser.prototype;
3301
3145
 
3302
- var pp = this._evaluate(weekFields);
3146
+ _proto.print = function print(context, buf) {
3147
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3303
3148
 
3304
- return pp.print(context, buf);
3305
- }
3306
- }, {
3307
- key: "parse",
3308
- value: function parse(context, text, position) {
3309
- var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3149
+ var pp = this._evaluate(weekFields);
3310
3150
 
3311
- var pp = this._evaluate(weekFields);
3151
+ return pp.print(context, buf);
3152
+ };
3312
3153
 
3313
- return pp.parse(context, text, position);
3314
- }
3315
- }, {
3316
- key: "_evaluate",
3317
- value: function _evaluate(weekFields) {
3318
- var pp = null;
3319
-
3320
- switch (this._letter) {
3321
- case 'e':
3322
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3323
- break;
3324
-
3325
- case 'c':
3326
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3327
- break;
3328
-
3329
- case 'w':
3330
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3331
- break;
3332
-
3333
- case 'W':
3334
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3335
- break;
3336
-
3337
- case 'Y':
3338
- if (this._count === 2) {
3339
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
3340
- } else {
3341
- pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
3342
- }
3154
+ _proto.parse = function parse(context, text, position) {
3155
+ var weekFields = _temporal_WeekFields__WEBPACK_IMPORTED_MODULE_1__["WeekFields"].of(context.locale());
3343
3156
 
3344
- break;
3345
- }
3157
+ var pp = this._evaluate(weekFields);
3346
3158
 
3347
- return pp;
3348
- }
3349
- }, {
3350
- key: "toString",
3351
- value: function toString() {
3352
- var sb = new StringBuilder(30);
3353
- sb.append('Localized(');
3354
-
3355
- if (this._letter === 'Y') {
3356
- if (this._count === 1) {
3357
- sb.append('WeekBasedYear');
3358
- } else if (this._count === 2) {
3359
- sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3159
+ return pp.parse(context, text, position);
3160
+ };
3161
+
3162
+ _proto._evaluate = function _evaluate(weekFields) {
3163
+ var pp = null;
3164
+
3165
+ switch (this._letter) {
3166
+ case 'e':
3167
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3168
+ break;
3169
+
3170
+ case 'c':
3171
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.dayOfWeek(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3172
+ break;
3173
+
3174
+ case 'w':
3175
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfWeekBasedYear(), this._count, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3176
+ break;
3177
+
3178
+ case 'W':
3179
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekOfMonth(), 1, 2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NOT_NEGATIVE);
3180
+ break;
3181
+
3182
+ case 'Y':
3183
+ if (this._count === 2) {
3184
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser(weekFields.weekBasedYear(), 2, 2, 0, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].ReducedPrinterParser.BASE_DATE);
3360
3185
  } else {
3361
- sb.append('WeekBasedYear,').append(this._count).append(',').append(19).append(',').append(this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD);
3362
- }
3363
- } else {
3364
- if (this._letter === 'c' || this._letter === 'e') {
3365
- sb.append('DayOfWeek');
3366
- } else if (this._letter === 'w') {
3367
- sb.append('WeekOfWeekBasedYear');
3368
- } else if (this._letter === 'W') {
3369
- sb.append('WeekOfMonth');
3186
+ pp = new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeFormatterBuilder"].NumberPrinterParser(weekFields.weekBasedYear(), this._count, 19, this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD, -1);
3370
3187
  }
3371
3188
 
3372
- sb.append(',');
3373
- sb.append(this._count);
3189
+ break;
3190
+ }
3191
+
3192
+ return pp;
3193
+ };
3194
+
3195
+ _proto.toString = function toString() {
3196
+ var sb = new StringBuilder(30);
3197
+ sb.append('Localized(');
3198
+
3199
+ if (this._letter === 'Y') {
3200
+ if (this._count === 1) {
3201
+ sb.append('WeekBasedYear');
3202
+ } else if (this._count === 2) {
3203
+ sb.append('ReducedValue(WeekBasedYear,2,2,2000-01-01)');
3204
+ } else {
3205
+ sb.append('WeekBasedYear,').append(this._count).append(',').append(19).append(',').append(this._count < 4 ? _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].NORMAL : _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["SignStyle"].EXCEEDS_PAD);
3206
+ }
3207
+ } else {
3208
+ if (this._letter === 'c' || this._letter === 'e') {
3209
+ sb.append('DayOfWeek');
3210
+ } else if (this._letter === 'w') {
3211
+ sb.append('WeekOfWeekBasedYear');
3212
+ } else if (this._letter === 'W') {
3213
+ sb.append('WeekOfMonth');
3374
3214
  }
3375
3215
 
3376
- sb.append(')');
3377
- return sb.toString();
3216
+ sb.append(',');
3217
+ sb.append(this._count);
3378
3218
  }
3379
- }]);
3219
+
3220
+ sb.append(')');
3221
+ return sb.toString();
3222
+ };
3380
3223
 
3381
3224
  return WeekFieldsPrinterParser;
3382
3225
  }();
@@ -3465,12 +3308,6 @@ __webpack_require__.r(__webpack_exports__);
3465
3308
  /* harmony import */ var cldr_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cldr_data__WEBPACK_IMPORTED_MODULE_1__);
3466
3309
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cldrjs */ "./node_modules/cldrjs/dist/node_main.js");
3467
3310
  /* harmony import */ var cldrjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cldrjs__WEBPACK_IMPORTED_MODULE_2__);
3468
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3469
-
3470
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3471
-
3472
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3473
-
3474
3311
  /*
3475
3312
  * @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
3476
3313
  * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
@@ -3497,9 +3334,27 @@ var _weekDayMap = {
3497
3334
  'sun': _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"].SUNDAY
3498
3335
  };
3499
3336
  var ComputedDayOfField = function () {
3500
- function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
3501
- _classCallCheck(this, ComputedDayOfField);
3337
+ ComputedDayOfField.ofDayOfWeekField = function ofDayOfWeekField(weekDef) {
3338
+ return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
3339
+ };
3340
+
3341
+ ComputedDayOfField.ofWeekOfMonthField = function ofWeekOfMonthField(weekDef) {
3342
+ return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
3343
+ };
3502
3344
 
3345
+ ComputedDayOfField.ofWeekOfYearField = function ofWeekOfYearField(weekDef) {
3346
+ return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
3347
+ };
3348
+
3349
+ ComputedDayOfField.ofWeekOfWeekBasedYearField = function ofWeekOfWeekBasedYearField(weekDef) {
3350
+ return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
3351
+ };
3352
+
3353
+ ComputedDayOfField.ofWeekBasedYearField = function ofWeekBasedYearField(weekDef) {
3354
+ return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
3355
+ };
3356
+
3357
+ function ComputedDayOfField(name, weekDef, baseUnit, rangeUnit, range) {
3503
3358
  this._name = name;
3504
3359
  this._weekDef = weekDef;
3505
3360
  this._baseUnit = baseUnit;
@@ -3507,484 +3362,482 @@ var ComputedDayOfField = function () {
3507
3362
  this._range = range;
3508
3363
  }
3509
3364
 
3510
- _createClass(ComputedDayOfField, [{
3511
- key: "getFrom",
3512
- value: function getFrom(temporal) {
3513
- var sow = this._weekDef.firstDayOfWeek().value();
3514
-
3515
- var dow = this._localizedDayOfWeek(temporal, sow);
3516
-
3517
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3518
- return dow;
3519
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3520
- return this._localizedWeekOfMonth(temporal, dow);
3521
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3522
- return this._localizedWeekOfYear(temporal, dow);
3523
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3524
- return this._localizedWOWBY(temporal);
3525
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3526
- return this._localizedWBY(temporal);
3527
- } else {
3528
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3529
- }
3530
- }
3531
- }, {
3532
- key: "_localizedDayOfWeek",
3533
- value: function _localizedDayOfWeek(temporal, sow) {
3534
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3535
- return MathUtil.floorMod(isoDow - sow, 7) + 1;
3536
- }
3537
- }, {
3538
- key: "_localizedWeekOfMonth",
3539
- value: function _localizedWeekOfMonth(temporal, dow) {
3540
- var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3541
-
3542
- var offset = this._startOfWeekOffset(dom, dow);
3365
+ var _proto = ComputedDayOfField.prototype;
3543
3366
 
3544
- return ComputedDayOfField._computeWeek(offset, dom);
3545
- }
3546
- }, {
3547
- key: "_localizedWeekOfYear",
3548
- value: function _localizedWeekOfYear(temporal, dow) {
3549
- var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3367
+ _proto.getFrom = function getFrom(temporal) {
3368
+ var sow = this._weekDef.firstDayOfWeek().value();
3550
3369
 
3551
- var offset = this._startOfWeekOffset(doy, dow);
3370
+ var dow = this._localizedDayOfWeek(temporal, sow);
3552
3371
 
3553
- return ComputedDayOfField._computeWeek(offset, doy);
3372
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3373
+ return dow;
3374
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3375
+ return this._localizedWeekOfMonth(temporal, dow);
3376
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3377
+ return this._localizedWeekOfYear(temporal, dow);
3378
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3379
+ return this._localizedWOWBY(temporal);
3380
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3381
+ return this._localizedWBY(temporal);
3382
+ } else {
3383
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3554
3384
  }
3555
- }, {
3556
- key: "_localizedWOWBY",
3557
- value: function _localizedWOWBY(temporal) {
3558
- var sow = this._weekDef.firstDayOfWeek().value();
3385
+ };
3559
3386
 
3560
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3561
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3387
+ _proto._localizedDayOfWeek = function _localizedDayOfWeek(temporal, sow) {
3388
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3389
+ return MathUtil.floorMod(isoDow - sow, 7) + 1;
3390
+ };
3562
3391
 
3563
- var woy = this._localizedWeekOfYear(temporal, dow);
3392
+ _proto._localizedWeekOfMonth = function _localizedWeekOfMonth(temporal, dow) {
3393
+ var dom = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3564
3394
 
3565
- if (woy === 0) {
3566
- var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3567
- return this._localizedWeekOfYear(previous, dow) + 1;
3568
- } else if (woy >= 53) {
3569
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3395
+ var offset = this._startOfWeekOffset(dom, dow);
3570
3396
 
3571
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3572
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3397
+ return ComputedDayOfField._computeWeek(offset, dom);
3398
+ };
3573
3399
 
3574
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3400
+ _proto._localizedWeekOfYear = function _localizedWeekOfYear(temporal, dow) {
3401
+ var doy = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3575
3402
 
3576
- if (woy >= weekIndexOfFirstWeekNextYear) {
3577
- return woy - (weekIndexOfFirstWeekNextYear - 1);
3578
- }
3579
- }
3403
+ var offset = this._startOfWeekOffset(doy, dow);
3580
3404
 
3581
- return woy;
3582
- }
3583
- }, {
3584
- key: "_localizedWBY",
3585
- value: function _localizedWBY(temporal) {
3586
- var sow = this._weekDef.firstDayOfWeek().value();
3405
+ return ComputedDayOfField._computeWeek(offset, doy);
3406
+ };
3587
3407
 
3588
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3589
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3590
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3408
+ _proto._localizedWOWBY = function _localizedWOWBY(temporal) {
3409
+ var sow = this._weekDef.firstDayOfWeek().value();
3591
3410
 
3592
- var woy = this._localizedWeekOfYear(temporal, dow);
3411
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3412
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3593
3413
 
3594
- if (woy === 0) {
3595
- return year - 1;
3596
- } else if (woy < 53) {
3597
- return year;
3598
- }
3414
+ var woy = this._localizedWeekOfYear(temporal, dow);
3599
3415
 
3416
+ if (woy === 0) {
3417
+ var previous = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].from(temporal).minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3418
+ return this._localizedWeekOfYear(previous, dow) + 1;
3419
+ } else if (woy >= 53) {
3600
3420
  var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3601
3421
 
3422
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3602
3423
  var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3603
3424
 
3604
3425
  var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3605
3426
 
3606
3427
  if (woy >= weekIndexOfFirstWeekNextYear) {
3607
- return year + 1;
3428
+ return woy - (weekIndexOfFirstWeekNextYear - 1);
3608
3429
  }
3430
+ }
3431
+
3432
+ return woy;
3433
+ };
3434
+
3435
+ _proto._localizedWBY = function _localizedWBY(temporal) {
3436
+ var sow = this._weekDef.firstDayOfWeek().value();
3609
3437
 
3438
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3439
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3440
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3441
+
3442
+ var woy = this._localizedWeekOfYear(temporal, dow);
3443
+
3444
+ if (woy === 0) {
3445
+ return year - 1;
3446
+ } else if (woy < 53) {
3610
3447
  return year;
3611
3448
  }
3612
- }, {
3613
- key: "_startOfWeekOffset",
3614
- value: function _startOfWeekOffset(day, dow) {
3615
- var weekStart = MathUtil.floorMod(day - dow, 7);
3616
- var offset = -weekStart;
3617
-
3618
- if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
3619
- offset = 7 - weekStart;
3620
- }
3621
3449
 
3622
- return offset;
3450
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3451
+
3452
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3453
+
3454
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3455
+
3456
+ if (woy >= weekIndexOfFirstWeekNextYear) {
3457
+ return year + 1;
3623
3458
  }
3624
- }, {
3625
- key: "adjustInto",
3626
- value: function adjustInto(temporal, newValue) {
3627
- var newVal = this._range.checkValidIntValue(newValue, this);
3628
3459
 
3629
- var currentVal = temporal.get(this);
3460
+ return year;
3461
+ };
3630
3462
 
3631
- if (newVal === currentVal) {
3632
- return temporal;
3633
- }
3463
+ _proto._startOfWeekOffset = function _startOfWeekOffset(day, dow) {
3464
+ var weekStart = MathUtil.floorMod(day - dow, 7);
3465
+ var offset = -weekStart;
3634
3466
 
3635
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3636
- var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
3637
- var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
3638
- var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3467
+ if (weekStart + 1 > this._weekDef.minimalDaysInFirstWeek()) {
3468
+ offset = 7 - weekStart;
3469
+ }
3639
3470
 
3640
- if (result.get(this) > newVal) {
3641
- var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3642
- result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3643
- } else {
3644
- if (result.get(this) < newVal) {
3645
- result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3646
- }
3471
+ return offset;
3472
+ };
3647
3473
 
3648
- var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3474
+ ComputedDayOfField._computeWeek = function _computeWeek(offset, day) {
3475
+ return MathUtil.intDiv(7 + offset + (day - 1), 7);
3476
+ };
3649
3477
 
3650
- result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3478
+ _proto.adjustInto = function adjustInto(temporal, newValue) {
3479
+ var newVal = this._range.checkValidIntValue(newValue, this);
3651
3480
 
3652
- if (result.get(this) > newVal) {
3653
- result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3654
- }
3481
+ var currentVal = temporal.get(this);
3482
+
3483
+ if (newVal === currentVal) {
3484
+ return temporal;
3485
+ }
3486
+
3487
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3488
+ var baseWowby = temporal.get(this._weekDef.weekOfWeekBasedYear());
3489
+ var diffWeeks = MathUtil.roundDown((newValue - currentVal) * 52.1775);
3490
+ var result = temporal.plus(diffWeeks, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3491
+
3492
+ if (result.get(this) > newVal) {
3493
+ var newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3494
+ result = result.minus(newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3495
+ } else {
3496
+ if (result.get(this) < newVal) {
3497
+ result = result.plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3655
3498
  }
3656
3499
 
3657
- return result;
3500
+ var _newWowby = result.get(this._weekDef.weekOfWeekBasedYear());
3501
+
3502
+ result = result.plus(baseWowby - _newWowby, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3503
+
3504
+ if (result.get(this) > newVal) {
3505
+ result = result.minus(1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS);
3506
+ }
3658
3507
  }
3659
3508
 
3660
- var delta = newVal - currentVal;
3661
- return temporal.plus(delta, this._baseUnit);
3509
+ return result;
3662
3510
  }
3663
- }, {
3664
- key: "resolve",
3665
- value: function resolve(fieldValues, partialTemporal, resolverStyle) {
3666
- var sow = this._weekDef.firstDayOfWeek().value();
3667
3511
 
3668
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3669
- var value = fieldValues.remove(this);
3512
+ var delta = newVal - currentVal;
3513
+ return temporal.plus(delta, this._baseUnit);
3514
+ };
3670
3515
 
3671
- var localDow = this._range.checkValidIntValue(value, this);
3516
+ _proto.resolve = function resolve(fieldValues, partialTemporal, resolverStyle) {
3517
+ var sow = this._weekDef.firstDayOfWeek().value();
3672
3518
 
3673
- var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
3519
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3520
+ var value = fieldValues.remove(this);
3674
3521
 
3675
- fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
3676
- return null;
3677
- }
3522
+ var localDow = this._range.checkValidIntValue(value, this);
3523
+
3524
+ var _isoDow = MathUtil.floorMod(sow - 1 + (localDow - 1), 7) + 1;
3525
+
3526
+ fieldValues.put(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK, _isoDow);
3527
+ return null;
3528
+ }
3529
+
3530
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
3531
+ return null;
3532
+ }
3678
3533
 
3679
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK) === false) {
3534
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3535
+ if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
3680
3536
  return null;
3681
3537
  }
3682
3538
 
3683
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3684
- if (fieldValues.containsKey(this._weekDef.weekOfWeekBasedYear()) === false) {
3685
- return null;
3686
- }
3539
+ var _isoDow2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
3687
3540
 
3688
- var _isoDow2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
3541
+ var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
3689
3542
 
3690
- var _dow = MathUtil.floorMod(_isoDow2 - sow, 7) + 1;
3543
+ var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
3544
+ var date;
3545
+ var days;
3691
3546
 
3692
- var wby = this.range().checkValidIntValue(fieldValues.get(this), this);
3693
- var date;
3694
- var days;
3547
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3548
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3549
+ var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
3695
3550
 
3696
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3697
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3698
- var wowby = fieldValues.get(this._weekDef.weekOfWeekBasedYear());
3551
+ var dateDow = this._localizedDayOfWeek(date, sow);
3699
3552
 
3700
- var dateDow = this._localizedDayOfWeek(date, sow);
3553
+ var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
3701
3554
 
3702
- var weeks = wowby - this._localizedWeekOfYear(date, dateDow);
3555
+ days = weeks * 7 + (_dow - dateDow);
3556
+ } else {
3557
+ date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3703
3558
 
3704
- days = weeks * 7 + (_dow - dateDow);
3705
- } else {
3706
- date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(wby, 1, this._weekDef.minimalDaysInFirstWeek());
3559
+ var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
3560
+
3561
+ var _dateDow = this._localizedDayOfWeek(date, sow);
3707
3562
 
3708
- var _wowby = this._weekDef.weekOfWeekBasedYear().range().checkValidIntValue(fieldValues.get(this._weekDef.weekOfWeekBasedYear()), this._weekDef.weekOfWeekBasedYear);
3563
+ var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
3709
3564
 
3710
- var _dateDow = this._localizedDayOfWeek(date, sow);
3565
+ days = _weeks * 7 + (_dow - _dateDow);
3566
+ }
3711
3567
 
3712
- var _weeks = _wowby - this._localizedWeekOfYear(date, _dateDow);
3568
+ date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3713
3569
 
3714
- days = _weeks * 7 + (_dow - _dateDow);
3570
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3571
+ if (date.getLong(this) !== fieldValues.get(this)) {
3572
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3715
3573
  }
3574
+ }
3716
3575
 
3717
- date = date.plus(days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3576
+ fieldValues.remove(this);
3577
+ fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
3578
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3579
+ return date;
3580
+ }
3718
3581
 
3719
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3720
- if (date.getLong(this) !== fieldValues.get(this)) {
3721
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3722
- }
3723
- }
3582
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
3583
+ return null;
3584
+ }
3724
3585
 
3725
- fieldValues.remove(this);
3726
- fieldValues.remove(this._weekDef.weekOfWeekBasedYear());
3727
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3728
- return date;
3729
- }
3586
+ var isoDow = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
3587
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3588
+ var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
3730
3589
 
3731
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) === false) {
3590
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3591
+ if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
3732
3592
  return null;
3733
3593
  }
3734
3594
 
3735
- var isoDow = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK));
3736
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3737
- var year = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR));
3595
+ var _value = fieldValues.remove(this);
3738
3596
 
3739
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3740
- if (fieldValues.containsKey(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) === false) {
3741
- return null;
3742
- }
3597
+ var _date;
3743
3598
 
3744
- var _value = fieldValues.remove(this);
3599
+ var _days;
3745
3600
 
3746
- var _date;
3601
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3602
+ var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3603
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3604
+ _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
3747
3605
 
3748
- var _days;
3606
+ var _dateDow2 = this._localizedDayOfWeek(_date, sow);
3749
3607
 
3750
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3751
- var month = fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3752
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3753
- _date = _date.plus(month - 1, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS);
3608
+ var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
3754
3609
 
3755
- var _dateDow2 = this._localizedDayOfWeek(_date, sow);
3610
+ _days = _weeks2 * 7 + (dow - _dateDow2);
3611
+ } else {
3612
+ var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
3756
3613
 
3757
- var _weeks2 = _value - this._localizedWeekOfMonth(_date, _dateDow2);
3614
+ _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
3758
3615
 
3759
- _days = _weeks2 * 7 + (dow - _dateDow2);
3760
- } else {
3761
- var _month = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR.checkValidIntValue(fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR));
3616
+ var _dateDow3 = this._localizedDayOfWeek(_date, sow);
3762
3617
 
3763
- _date = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, _month, 8);
3618
+ var wom = this._range.checkValidIntValue(_value, this);
3764
3619
 
3765
- var _dateDow3 = this._localizedDayOfWeek(_date, sow);
3620
+ var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
3766
3621
 
3767
- var wom = this._range.checkValidIntValue(_value, this);
3622
+ _days = _weeks3 * 7 + (dow - _dateDow3);
3623
+ }
3768
3624
 
3769
- var _weeks3 = wom - this._localizedWeekOfMonth(_date, _dateDow3);
3625
+ _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3770
3626
 
3771
- _days = _weeks3 * 7 + (dow - _dateDow3);
3627
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3628
+ if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
3629
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
3772
3630
  }
3631
+ }
3773
3632
 
3774
- _date = _date.plus(_days, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3633
+ fieldValues.remove(this);
3634
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3635
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3636
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3637
+ return _date;
3638
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3639
+ var _value2 = fieldValues.remove(this);
3775
3640
 
3776
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3777
- if (_date.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR)) {
3778
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different month');
3779
- }
3780
- }
3641
+ var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3781
3642
 
3782
- fieldValues.remove(this);
3783
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3784
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].MONTH_OF_YEAR);
3785
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3786
- return _date;
3787
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3788
- var _value2 = fieldValues.remove(this);
3643
+ var _days2;
3789
3644
 
3790
- var _date2 = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["LocalDate"].of(year, 1, 1);
3645
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3646
+ var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
3791
3647
 
3792
- var _days2;
3648
+ var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
3793
3649
 
3794
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].LENIENT) {
3795
- var _dateDow4 = this._localizedDayOfWeek(_date2, sow);
3650
+ _days2 = _weeks4 * 7 + (dow - _dateDow4);
3651
+ } else {
3652
+ var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
3796
3653
 
3797
- var _weeks4 = _value2 - this._localizedWeekOfYear(_date2, _dateDow4);
3654
+ var woy = this._range.checkValidIntValue(_value2, this);
3798
3655
 
3799
- _days2 = _weeks4 * 7 + (dow - _dateDow4);
3800
- } else {
3801
- var _dateDow5 = this._localizedDayOfWeek(_date2, sow);
3656
+ var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
3802
3657
 
3803
- var woy = this._range.checkValidIntValue(_value2, this);
3658
+ _days2 = _weeks5 * 7 + (dow - _dateDow5);
3659
+ }
3804
3660
 
3805
- var _weeks5 = woy - this._localizedWeekOfYear(_date2, _dateDow5);
3661
+ _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3806
3662
 
3807
- _days2 = _weeks5 * 7 + (dow - _dateDow5);
3663
+ if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3664
+ if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
3665
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3808
3666
  }
3667
+ }
3809
3668
 
3810
- _date2 = _date2.plus(_days2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS);
3669
+ fieldValues.remove(this);
3670
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3671
+ fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3672
+ return _date2;
3673
+ } else {
3674
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3675
+ }
3676
+ };
3811
3677
 
3812
- if (resolverStyle === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ResolverStyle"].STRICT) {
3813
- if (_date2.getLong(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR) !== fieldValues.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR)) {
3814
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DateTimeException"]('Strict mode rejected date parsed to a different year');
3815
- }
3816
- }
3678
+ _proto.name = function name() {
3679
+ return this._name;
3680
+ };
3817
3681
 
3818
- fieldValues.remove(this);
3819
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3820
- fieldValues.remove(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3821
- return _date2;
3822
- } else {
3823
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3824
- }
3825
- }
3826
- }, {
3827
- key: "name",
3828
- value: function name() {
3829
- return this._name;
3830
- }
3831
- }, {
3832
- key: "baseUnit",
3833
- value: function baseUnit() {
3834
- return this._baseUnit;
3835
- }
3836
- }, {
3837
- key: "rangeUnit",
3838
- value: function rangeUnit() {
3839
- return this._rangeUnit;
3840
- }
3841
- }, {
3842
- key: "range",
3843
- value: function range() {
3844
- return this._range;
3845
- }
3846
- }, {
3847
- key: "isDateBased",
3848
- value: function isDateBased() {
3849
- return true;
3850
- }
3851
- }, {
3852
- key: "isTimeBased",
3853
- value: function isTimeBased() {
3854
- return false;
3855
- }
3856
- }, {
3857
- key: "isSupportedBy",
3858
- value: function isSupportedBy(temporal) {
3859
- if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
3860
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3861
- return true;
3862
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3863
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3864
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3865
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3866
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3867
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3868
- } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3869
- return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3870
- }
3871
- }
3682
+ _proto.baseUnit = function baseUnit() {
3683
+ return this._baseUnit;
3684
+ };
3872
3685
 
3873
- return false;
3874
- }
3875
- }, {
3876
- key: "rangeRefinedBy",
3877
- value: function rangeRefinedBy(temporal) {
3878
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3879
- return this._range;
3880
- }
3686
+ _proto.rangeUnit = function rangeUnit() {
3687
+ return this._rangeUnit;
3688
+ };
3689
+
3690
+ _proto.range = function range() {
3691
+ return this._range;
3692
+ };
3693
+
3694
+ _proto.isDateBased = function isDateBased() {
3695
+ return true;
3696
+ };
3881
3697
 
3882
- var field = null;
3698
+ _proto.isTimeBased = function isTimeBased() {
3699
+ return false;
3700
+ };
3883
3701
 
3884
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3885
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
3702
+ _proto.isSupportedBy = function isSupportedBy(temporal) {
3703
+ if (temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK)) {
3704
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3705
+ return true;
3706
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3707
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH);
3886
3708
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3887
- field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
3709
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR);
3888
3710
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3889
- return this._rangeWOWBY(temporal);
3711
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3890
3712
  } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3891
- return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3892
- } else {
3893
- throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3713
+ return temporal.isSupported(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].EPOCH_DAY);
3894
3714
  }
3715
+ }
3895
3716
 
3896
- var sow = this._weekDef.firstDayOfWeek().value();
3717
+ return false;
3718
+ };
3897
3719
 
3898
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3899
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3720
+ _proto.rangeRefinedBy = function rangeRefinedBy(temporal) {
3721
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS) {
3722
+ return this._range;
3723
+ }
3900
3724
 
3901
- var offset = this._startOfWeekOffset(temporal.get(field), dow);
3725
+ var field = null;
3902
3726
 
3903
- var fieldRange = temporal.range(field);
3904
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
3727
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS) {
3728
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_MONTH;
3729
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3730
+ field = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR;
3731
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS) {
3732
+ return this._rangeWOWBY(temporal);
3733
+ } else if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER) {
3734
+ return temporal.range(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3735
+ } else {
3736
+ throw new _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IllegalStateException"]('unreachable');
3905
3737
  }
3906
- }, {
3907
- key: "_rangeWOWBY",
3908
- value: function _rangeWOWBY(temporal) {
3909
- var sow = this._weekDef.firstDayOfWeek().value();
3910
3738
 
3911
- var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3912
- var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3739
+ var sow = this._weekDef.firstDayOfWeek().value();
3913
3740
 
3914
- var woy = this._localizedWeekOfYear(temporal, dow);
3741
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3742
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3915
3743
 
3916
- if (woy === 0) {
3917
- return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
3918
- }
3744
+ var offset = this._startOfWeekOffset(temporal.get(field), dow);
3919
3745
 
3920
- var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3746
+ var fieldRange = temporal.range(field);
3747
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(ComputedDayOfField._computeWeek(offset, fieldRange.minimum()), ComputedDayOfField._computeWeek(offset, fieldRange.maximum()));
3748
+ };
3921
3749
 
3922
- var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3923
- var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3750
+ _proto._rangeWOWBY = function _rangeWOWBY(temporal) {
3751
+ var sow = this._weekDef.firstDayOfWeek().value();
3924
3752
 
3925
- var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3753
+ var isoDow = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_WEEK);
3754
+ var dow = MathUtil.floorMod(isoDow - sow, 7) + 1;
3926
3755
 
3927
- if (woy >= weekIndexOfFirstWeekNextYear) {
3928
- return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
3929
- }
3756
+ var woy = this._localizedWeekOfYear(temporal, dow);
3930
3757
 
3931
- return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
3758
+ if (woy === 0) {
3759
+ return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).minus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
3932
3760
  }
3933
- }, {
3934
- key: "displayName",
3935
- value: function displayName(locale) {
3936
- requireNonNull(locale, 'locale');
3937
3761
 
3938
- if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3939
- return 'Week';
3940
- }
3762
+ var offset = this._startOfWeekOffset(temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].DAY_OF_YEAR), dow);
3941
3763
 
3942
- return this.toString();
3943
- }
3944
- }, {
3945
- key: "toString",
3946
- value: function toString() {
3947
- return "".concat(this._name, "[").concat(this._weekDef.toString(), "]");
3948
- }
3949
- }], [{
3950
- key: "ofDayOfWeekField",
3951
- value: function ofDayOfWeekField(weekDef) {
3952
- return new ComputedDayOfField('DayOfWeek', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].DAYS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, DAY_OF_WEEK_RANGE);
3953
- }
3954
- }, {
3955
- key: "ofWeekOfMonthField",
3956
- value: function ofWeekOfMonthField(weekDef) {
3957
- return new ComputedDayOfField('WeekOfMonth', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].MONTHS, WEEK_OF_MONTH_RANGE);
3958
- }
3959
- }, {
3960
- key: "ofWeekOfYearField",
3961
- value: function ofWeekOfYearField(weekDef) {
3962
- return new ComputedDayOfField('WeekOfYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS, WEEK_OF_YEAR_RANGE);
3963
- }
3964
- }, {
3965
- key: "ofWeekOfWeekBasedYearField",
3966
- value: function ofWeekOfWeekBasedYearField(weekDef) {
3967
- return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
3968
- }
3969
- }, {
3970
- key: "ofWeekBasedYearField",
3971
- value: function ofWeekBasedYearField(weekDef) {
3972
- return new ComputedDayOfField('WeekBasedYear', weekDef, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoFields"].WEEK_BASED_YEARS, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].FOREVER, WEEK_BASED_YEAR_RANGE);
3764
+ var year = temporal.get(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoField"].YEAR);
3765
+ var yearLen = _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["Year"].isLeap(year) ? 366 : 365;
3766
+
3767
+ var weekIndexOfFirstWeekNextYear = ComputedDayOfField._computeWeek(offset, yearLen + this._weekDef.minimalDaysInFirstWeek());
3768
+
3769
+ if (woy >= weekIndexOfFirstWeekNextYear) {
3770
+ return this._rangeWOWBY(_js_joda_core__WEBPACK_IMPORTED_MODULE_0__["IsoChronology"].INSTANCE.date(temporal).plus(2, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].WEEKS));
3973
3771
  }
3974
- }, {
3975
- key: "_computeWeek",
3976
- value: function _computeWeek(offset, day) {
3977
- return MathUtil.intDiv(7 + offset + (day - 1), 7);
3772
+
3773
+ return _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ValueRange"].of(1, weekIndexOfFirstWeekNextYear - 1);
3774
+ };
3775
+
3776
+ _proto.displayName = function displayName(locale) {
3777
+ requireNonNull(locale, 'locale');
3778
+
3779
+ if (this._rangeUnit === _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["ChronoUnit"].YEARS) {
3780
+ return 'Week';
3978
3781
  }
3979
- }]);
3782
+
3783
+ return this.toString();
3784
+ };
3785
+
3786
+ _proto.toString = function toString() {
3787
+ return this._name + "[" + this._weekDef.toString() + "]";
3788
+ };
3980
3789
 
3981
3790
  return ComputedDayOfField;
3982
3791
  }();
3983
3792
  var WeekFieldsCache = new Map();
3984
3793
  var WeekFields = function () {
3985
- function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
3986
- _classCallCheck(this, WeekFields);
3794
+ WeekFields.of = function of(firstDayOrLocale, minDays) {
3795
+ if (minDays === undefined) {
3796
+ return WeekFields.ofLocale(firstDayOrLocale);
3797
+ } else {
3798
+ return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
3799
+ }
3800
+ };
3801
+
3802
+ WeekFields.ofLocale = function ofLocale(locale) {
3803
+ requireNonNull(locale, 'locale');
3804
+ cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
3805
+ var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
3806
+ var worldRegion = '001';
3807
+ var weekData = cldr.get('supplemental/weekData');
3808
+
3809
+ var dow = _weekDayMap[weekData.firstDay[locale.country()]];
3810
+
3811
+ if (!dow) {
3812
+ dow = _weekDayMap[weekData.firstDay[worldRegion]];
3813
+ }
3814
+
3815
+ var minDays = weekData.minDays[locale.country()];
3816
+
3817
+ if (!minDays) {
3818
+ minDays = weekData.minDays[worldRegion];
3819
+ }
3820
+
3821
+ return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
3822
+ };
3823
+
3824
+ WeekFields.ofFirstDayOfWeekMinDays = function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
3825
+ requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
3826
+ requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
3827
+ requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
3828
+ var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
3829
+ var rules = WeekFieldsCache.get(key);
3830
+
3831
+ if (rules == null) {
3832
+ rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
3833
+ WeekFieldsCache.set(key, rules);
3834
+ rules = WeekFieldsCache.get(key);
3835
+ }
3836
+
3837
+ return rules;
3838
+ };
3987
3839
 
3840
+ function WeekFields(firstDayOfWeek, minimalDaysInFirstWeek) {
3988
3841
  requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
3989
3842
  requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
3990
3843
  requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
@@ -4003,114 +3856,55 @@ var WeekFields = function () {
4003
3856
  cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/likelySubtags.json'));
4004
3857
  }
4005
3858
 
4006
- _createClass(WeekFields, [{
4007
- key: "firstDayOfWeek",
4008
- value: function firstDayOfWeek() {
4009
- return this._firstDayOfWeek;
4010
- }
4011
- }, {
4012
- key: "minimalDaysInFirstWeek",
4013
- value: function minimalDaysInFirstWeek() {
4014
- return this._minimalDays;
4015
- }
4016
- }, {
4017
- key: "dayOfWeek",
4018
- value: function dayOfWeek() {
4019
- return this._dayOfWeek;
4020
- }
4021
- }, {
4022
- key: "weekOfMonth",
4023
- value: function weekOfMonth() {
4024
- return this._weekOfMonth;
4025
- }
4026
- }, {
4027
- key: "weekOfYear",
4028
- value: function weekOfYear() {
4029
- return this._weekOfYear;
4030
- }
4031
- }, {
4032
- key: "weekOfWeekBasedYear",
4033
- value: function weekOfWeekBasedYear() {
4034
- return this._weekOfWeekBasedYear;
4035
- }
4036
- }, {
4037
- key: "weekBasedYear",
4038
- value: function weekBasedYear() {
4039
- return this._weekBasedYear;
4040
- }
4041
- }, {
4042
- key: "equals",
4043
- value: function equals(other) {
4044
- if (this === other) {
4045
- return true;
4046
- }
3859
+ var _proto2 = WeekFields.prototype;
4047
3860
 
4048
- if (other instanceof WeekFields) {
4049
- return this.hashCode() === other.hashCode();
4050
- }
3861
+ _proto2.firstDayOfWeek = function firstDayOfWeek() {
3862
+ return this._firstDayOfWeek;
3863
+ };
4051
3864
 
4052
- return false;
4053
- }
4054
- }, {
4055
- key: "hashCode",
4056
- value: function hashCode() {
4057
- return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
4058
- }
4059
- }, {
4060
- key: "toString",
4061
- value: function toString() {
4062
- return "WeekFields[".concat(this._firstDayOfWeek, ",").concat(this._minimalDays, "]");
4063
- }
4064
- }], [{
4065
- key: "of",
4066
- value: function of(firstDayOrLocale, minDays) {
4067
- if (minDays === undefined) {
4068
- return WeekFields.ofLocale(firstDayOrLocale);
4069
- } else {
4070
- return WeekFields.ofFirstDayOfWeekMinDays(firstDayOrLocale, minDays);
4071
- }
4072
- }
4073
- }, {
4074
- key: "ofLocale",
4075
- value: function ofLocale(locale) {
4076
- requireNonNull(locale, 'locale');
4077
- cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a.load(cldr_data__WEBPACK_IMPORTED_MODULE_1___default()('supplemental/weekData.json'));
4078
- var cldr = new cldrjs__WEBPACK_IMPORTED_MODULE_2___default.a(locale.localeString());
4079
- var worldRegion = '001';
4080
- var weekData = cldr.get('supplemental/weekData');
4081
-
4082
- var dow = _weekDayMap[weekData.firstDay[locale.country()]];
4083
-
4084
- if (!dow) {
4085
- dow = _weekDayMap[weekData.firstDay[worldRegion]];
4086
- }
3865
+ _proto2.minimalDaysInFirstWeek = function minimalDaysInFirstWeek() {
3866
+ return this._minimalDays;
3867
+ };
4087
3868
 
4088
- var minDays = weekData.minDays[locale.country()];
3869
+ _proto2.dayOfWeek = function dayOfWeek() {
3870
+ return this._dayOfWeek;
3871
+ };
4089
3872
 
4090
- if (!minDays) {
4091
- minDays = weekData.minDays[worldRegion];
4092
- }
3873
+ _proto2.weekOfMonth = function weekOfMonth() {
3874
+ return this._weekOfMonth;
3875
+ };
4093
3876
 
4094
- return WeekFields.ofFirstDayOfWeekMinDays(dow, minDays);
3877
+ _proto2.weekOfYear = function weekOfYear() {
3878
+ return this._weekOfYear;
3879
+ };
3880
+
3881
+ _proto2.weekOfWeekBasedYear = function weekOfWeekBasedYear() {
3882
+ return this._weekOfWeekBasedYear;
3883
+ };
3884
+
3885
+ _proto2.weekBasedYear = function weekBasedYear() {
3886
+ return this._weekBasedYear;
3887
+ };
3888
+
3889
+ _proto2.equals = function equals(other) {
3890
+ if (this === other) {
3891
+ return true;
4095
3892
  }
4096
- }, {
4097
- key: "ofFirstDayOfWeekMinDays",
4098
- value: function ofFirstDayOfWeekMinDays(firstDayOfWeek, minimalDaysInFirstWeek) {
4099
- requireNonNull(firstDayOfWeek, 'firstDayOfWeek');
4100
- requireInstance(firstDayOfWeek, _js_joda_core__WEBPACK_IMPORTED_MODULE_0__["DayOfWeek"], 'firstDayOfWeek');
4101
- requireNonNull(minimalDaysInFirstWeek, 'minimalDaysInFirstWeek');
4102
- var key = firstDayOfWeek.toString() + minimalDaysInFirstWeek;
4103
- var rules = WeekFieldsCache.get(key);
4104
-
4105
- if (rules == null) {
4106
- rules = new WeekFields(firstDayOfWeek, minimalDaysInFirstWeek);
4107
- WeekFieldsCache.set(key, rules);
4108
- rules = WeekFieldsCache.get(key);
4109
- }
4110
3893
 
4111
- return rules;
3894
+ if (other instanceof WeekFields) {
3895
+ return this.hashCode() === other.hashCode();
4112
3896
  }
4113
- }]);
3897
+
3898
+ return false;
3899
+ };
3900
+
3901
+ _proto2.hashCode = function hashCode() {
3902
+ return this._firstDayOfWeek.ordinal() * 7 + this._minimalDays;
3903
+ };
3904
+
3905
+ _proto2.toString = function toString() {
3906
+ return "WeekFields[" + this._firstDayOfWeek + "," + this._minimalDays + "]";
3907
+ };
4114
3908
 
4115
3909
  return WeekFields;
4116
3910
  }();