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