indicator-ui 0.0.121 → 0.0.123

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.
package/dist/index.js CHANGED
@@ -6922,15 +6922,33 @@ __webpack_require__.r(__webpack_exports__);
6922
6922
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6923
6923
  /* harmony export */ saveFormatDate: () => (/* binding */ saveFormatDate)
6924
6924
  /* harmony export */ });
6925
- /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/format.js");
6926
6925
  /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
6926
+ /* harmony import */ var date_fns_tz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns-tz */ "./node_modules/date-fns-tz/dist/esm/index.js");
6927
6927
 
6928
- function saveFormatDate(date, { from, to, errorNull = false, locale }) {
6928
+
6929
+ function saveFormatDate(date, { from, to, errorNull = false, locale, toTimeZone, fromTimeZone }) {
6929
6930
  try {
6930
- if (from != null && typeof date === 'string') {
6931
- return (0,date_fns__WEBPACK_IMPORTED_MODULE_0__.format)((0,date_fns__WEBPACK_IMPORTED_MODULE_1__.parse)(date, from, new Date()), to, { locale: locale });
6931
+ let parsedDate;
6932
+ if (typeof date === "string") {
6933
+ if (from) {
6934
+ parsedDate = (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.parse)(date, from, new Date());
6935
+ }
6936
+ else {
6937
+ parsedDate = new Date(date);
6938
+ }
6939
+ }
6940
+ else {
6941
+ parsedDate = date;
6942
+ }
6943
+ // Применяем fromTimeZone, если указан
6944
+ if (fromTimeZone) {
6945
+ parsedDate = (0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.fromZonedTime)(parsedDate, fromTimeZone);
6946
+ }
6947
+ // Переводим в целевую timeZone, если указана
6948
+ if (toTimeZone) {
6949
+ parsedDate = (0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.toZonedTime)(parsedDate, toTimeZone);
6932
6950
  }
6933
- return (0,date_fns__WEBPACK_IMPORTED_MODULE_0__.format)(date, to);
6951
+ return (0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.format)(parsedDate, to, { locale: locale });
6934
6952
  }
6935
6953
  catch (e) {
6936
6954
  console.warn(e);
@@ -6952,11 +6970,18 @@ __webpack_require__.r(__webpack_exports__);
6952
6970
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6953
6971
  /* harmony export */ saveParseDate: () => (/* binding */ saveParseDate)
6954
6972
  /* harmony export */ });
6955
- /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
6973
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
6974
+ /* harmony import */ var date_fns_tz__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns-tz */ "./node_modules/date-fns-tz/dist/esm/index.js");
6975
+
6956
6976
 
6957
- function saveParseDate(date, { from, locale }) {
6977
+ function saveParseDate(date, { from, locale, fromTimeZone }) {
6958
6978
  try {
6959
- return (0,date_fns__WEBPACK_IMPORTED_MODULE_0__.parse)(date, from, new Date(), { locale: locale });
6979
+ let parsedDate = (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.parse)(date, from, new Date(), { locale: locale });
6980
+ // Применяем fromTimeZone, если указан
6981
+ if (fromTimeZone) {
6982
+ parsedDate = (0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.fromZonedTime)(parsedDate, fromTimeZone);
6983
+ }
6984
+ return parsedDate;
6960
6985
  }
6961
6986
  catch (e) {
6962
6987
  console.warn(e);
@@ -9120,7 +9145,7 @@ __webpack_require__.r(__webpack_exports__);
9120
9145
 
9121
9146
 
9122
9147
 
9123
- function DateField({ value, disabled, required, isError, onChange, onFocus, dateFormat = 'dd.MM.yyyy', onBlur, minYear = 1000, maxYear = 9999, additionStyles, }) {
9148
+ function DateField({ value, disabled, required, isError, onChange, onFocus, dateFormat = 'dd.MM.yyyy', onBlur, minYear = 1000, maxYear = 9999, additionStyles, timeZone, placeholder, }) {
9124
9149
  const [dateValue, setDateValue] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value);
9125
9150
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
9126
9151
  if (value !== dateValue)
@@ -9128,12 +9153,21 @@ function DateField({ value, disabled, required, isError, onChange, onFocus, date
9128
9153
  }, [value]);
9129
9154
  const handleChange = (newDate) => {
9130
9155
  setDateValue(newDate);
9131
- const formatDate = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newDate, { from: dateFormat, to: dateFormat, errorNull: true });
9156
+ const formatDate = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newDate, {
9157
+ from: dateFormat,
9158
+ to: dateFormat,
9159
+ errorNull: true,
9160
+ fromTimeZone: timeZone,
9161
+ toTimeZone: timeZone,
9162
+ });
9132
9163
  if (newDate.length === dateFormat.length && formatDate !== null && onChange) {
9133
9164
  onChange(formatDate);
9134
9165
  }
9166
+ else if (newDate.length === 0) {
9167
+ onChange('');
9168
+ }
9135
9169
  };
9136
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_4__.FlexField, { value: dateValue, onChange: handleChange, disabled: disabled, isError: isError, onFocus: onFocus, onBlur: onBlur, mask: dateFormat, blocks: {
9170
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_4__.FlexField, { value: dateValue, placeholder: placeholder, onChange: handleChange, disabled: disabled, isError: isError, onFocus: onFocus, onBlur: onBlur, mask: dateFormat, blocks: {
9137
9171
  YYYY: {
9138
9172
  mask: react_imask__WEBPACK_IMPORTED_MODULE_2__.IMask.MaskedRange,
9139
9173
  from: minYear, // минимальный год
@@ -9175,7 +9209,6 @@ __webpack_require__.r(__webpack_exports__);
9175
9209
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
9176
9210
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
9177
9211
  /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
9178
- /* harmony import */ var date_fns_locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! date-fns/locale */ "./node_modules/date-fns/locale/ru.js");
9179
9212
  /* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/lib */ "./src/lib/index.ts");
9180
9213
  /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styles */ "./src/ui/InputFields/DateTimeField/styles/index.ts");
9181
9214
  /* harmony import */ var _TimeField__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TimeField */ "./src/ui/InputFields/DateTimeField/ui/TimeField.tsx");
@@ -9187,83 +9220,101 @@ __webpack_require__.r(__webpack_exports__);
9187
9220
 
9188
9221
 
9189
9222
 
9190
-
9191
- function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat = 'dd.MM.yyyy', timeFormat = 'HH:mm', outFormat = 'iso-8601', additionStyle, ...props }) {
9192
- const isInputDate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value != undefined);
9193
- const isInputTime = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value != undefined);
9223
+ function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat = 'dd.MM.yyyy', timeFormat = 'HH:mm', outFormat = 'iso-8601', additionStyle, datePlaceholder, timePlaceholder, timeZone = 'Z', ...props }) {
9194
9224
  const getDateValue = () => {
9195
9225
  if (value === undefined)
9196
9226
  return undefined;
9197
9227
  if (outFormat === 'iso-8601') {
9198
9228
  return new Date(value);
9199
9229
  }
9200
- return (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(value, { from: outFormat });
9230
+ return (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(value, { from: outFormat, fromTimeZone: timeZone });
9231
+ };
9232
+ const initDate = () => {
9233
+ if (fieldConfig === 'time' || value === undefined)
9234
+ return undefined;
9235
+ const curDate = getDateValue();
9236
+ return (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(curDate, { to: dateFormat, errorNull: true, toTimeZone: timeZone }) ?? undefined;
9237
+ };
9238
+ const initTime = () => {
9239
+ if (fieldConfig === 'date' || value === undefined)
9240
+ return undefined;
9241
+ const curDate = getDateValue();
9242
+ return (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(curDate, { to: timeFormat, errorNull: true, toTimeZone: timeZone }) ?? undefined;
9243
+ };
9244
+ const setTimeInDate = (res, newTime) => {
9245
+ const dateTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(newTime, { from: timeFormat, fromTimeZone: timeZone });
9246
+ if (dateTime != null) {
9247
+ res.setHours(dateTime.getHours());
9248
+ res.setMinutes(dateTime.getMinutes());
9249
+ res.setSeconds(dateTime.getSeconds());
9250
+ res.setMilliseconds(dateTime.getMilliseconds());
9251
+ }
9252
+ };
9253
+ const setDateInDate = (res, newDate) => {
9254
+ const dateTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(newDate, { from: dateFormat, fromTimeZone: timeZone });
9255
+ if (dateTime != null) {
9256
+ res.setFullYear(dateTime.getFullYear());
9257
+ res.setMonth(dateTime.getMonth());
9258
+ res.setDate(dateTime.getDate());
9259
+ }
9201
9260
  };
9202
9261
  const setDateValue = (newValue) => {
9203
- if (onChange) {
9262
+ if (onChange && newValue) {
9263
+ let dateFormat = '';
9204
9264
  if (outFormat === 'iso-8601') {
9205
- onChange(newValue.toISOString());
9265
+ dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
9206
9266
  }
9207
9267
  else {
9208
- const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newValue, { to: outFormat });
9209
- if (res != null && typeof res === 'string') {
9210
- onChange(res);
9211
- }
9268
+ dateFormat = outFormat;
9269
+ }
9270
+ const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newValue, {
9271
+ to: dateFormat,
9272
+ toTimeZone: timeZone,
9273
+ fromTimeZone: timeZone
9274
+ });
9275
+ if (res != null && typeof res === 'string') {
9276
+ onChange(res);
9212
9277
  }
9213
9278
  }
9214
9279
  };
9280
+ const [time, setTime] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initTime());
9281
+ const [date, setDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initDate());
9282
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
9283
+ if (time === '' && date === '') {
9284
+ onChange('');
9285
+ }
9286
+ else if (time || date) {
9287
+ const resDate = new Date();
9288
+ switch (fieldConfig) {
9289
+ case 'datetime':
9290
+ if (time && date) {
9291
+ setDateInDate(resDate, date);
9292
+ setTimeInDate(resDate, time);
9293
+ }
9294
+ break;
9295
+ case 'date':
9296
+ if (date) {
9297
+ setDateInDate(resDate, date);
9298
+ }
9299
+ break;
9300
+ case 'time':
9301
+ if (time) {
9302
+ setTimeInDate(resDate, time);
9303
+ }
9304
+ break;
9305
+ }
9306
+ setDateValue(resDate);
9307
+ }
9308
+ }, [time, date]);
9215
9309
  const getTimeContent = () => {
9216
9310
  if (fieldConfig == 'date')
9217
9311
  return undefined;
9218
- const handleChange = (newTime) => {
9219
- const dateValue = getDateValue();
9220
- let res = new Date();
9221
- const dateTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(newTime, { from: timeFormat });
9222
- if (dateValue != null) {
9223
- res = dateValue;
9224
- }
9225
- if (dateTime != null) {
9226
- res.setHours(dateTime.getHours());
9227
- res.setMinutes(dateTime.getMinutes());
9228
- res.setSeconds(dateTime.getSeconds());
9229
- res.setMilliseconds(dateTime.getMilliseconds());
9230
- setDateValue(res);
9231
- }
9232
- };
9233
- const getTime = () => {
9234
- if (value === undefined)
9235
- return undefined;
9236
- const dateValue = getDateValue();
9237
- const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(dateValue, { to: timeFormat, locale: date_fns_locale__WEBPACK_IMPORTED_MODULE_7__.ru });
9238
- return typeof res === 'string' ? res : undefined;
9239
- };
9240
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.DateTimeFieldStyle.item, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_TimeField__WEBPACK_IMPORTED_MODULE_5__.TimeField, { ...props, onChange: handleChange, value: getTime(), timeFormat: timeFormat }) }));
9312
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.DateTimeFieldStyle.item, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_TimeField__WEBPACK_IMPORTED_MODULE_5__.TimeField, { ...props, onChange: setTime, timeZone: timeZone, value: time, timeFormat: timeFormat }) }));
9241
9313
  };
9242
9314
  const getDateContent = () => {
9243
9315
  if (fieldConfig == 'time')
9244
9316
  return undefined;
9245
- const handleChange = (newDate) => {
9246
- const dateValue = getDateValue();
9247
- let res = new Date();
9248
- const dateTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveParseDate)(newDate, { from: dateFormat });
9249
- if (dateValue != null) {
9250
- res = dateValue;
9251
- }
9252
- if (dateTime != null) {
9253
- res.setFullYear(dateTime.getFullYear());
9254
- res.setMonth(dateTime.getMonth());
9255
- res.setDate(dateTime.getDate());
9256
- setDateValue(res);
9257
- }
9258
- };
9259
- const getDate = () => {
9260
- if (value === undefined)
9261
- return undefined;
9262
- const dateValue = getDateValue();
9263
- const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(dateValue, { to: dateFormat, locale: date_fns_locale__WEBPACK_IMPORTED_MODULE_7__.ru });
9264
- return typeof res === 'string' ? res : undefined;
9265
- };
9266
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.DateTimeFieldStyle.item, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DateField__WEBPACK_IMPORTED_MODULE_6__.DateField, { ...props, value: getDate(), onChange: handleChange, dateFormat: dateFormat }) }));
9317
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: _styles__WEBPACK_IMPORTED_MODULE_4__.DateTimeFieldStyle.item, children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DateField__WEBPACK_IMPORTED_MODULE_6__.DateField, { ...props, value: date, timeZone: timeZone, onChange: setDate, dateFormat: dateFormat }) }));
9267
9318
  };
9268
9319
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_styles__WEBPACK_IMPORTED_MODULE_4__.DateTimeFieldStyle.DateTimeField, additionStyle), children: [getDateContent(), getTimeContent()] }));
9269
9320
  }
@@ -9293,7 +9344,7 @@ __webpack_require__.r(__webpack_exports__);
9293
9344
 
9294
9345
 
9295
9346
 
9296
- function TimeField({ value, disabled, required, isError, onChange, onFocus, timeFormat = 'HH:mm', onBlur, additionStyles, }) {
9347
+ function TimeField({ value, disabled, required, isError, onChange, onFocus, timeFormat = 'HH:mm', onBlur, placeholder, additionStyles, timeZone, }) {
9297
9348
  const [timeValue, setTimeValue] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value);
9298
9349
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
9299
9350
  if (value !== timeValue)
@@ -9301,12 +9352,21 @@ function TimeField({ value, disabled, required, isError, onChange, onFocus, time
9301
9352
  }, [value]);
9302
9353
  const handleChange = (newTime) => {
9303
9354
  setTimeValue(newTime);
9304
- const formatTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newTime, { from: timeFormat, to: timeFormat, errorNull: true });
9355
+ const formatTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newTime, {
9356
+ from: timeFormat,
9357
+ to: timeFormat,
9358
+ errorNull: true,
9359
+ fromTimeZone: timeZone,
9360
+ toTimeZone: timeZone,
9361
+ });
9305
9362
  if (newTime.length === timeFormat.length && formatTime !== null && onChange) {
9306
9363
  onChange(formatTime);
9307
9364
  }
9365
+ else if (newTime.length === 0) {
9366
+ onChange('');
9367
+ }
9308
9368
  };
9309
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_4__.FlexField, { value: timeValue, onChange: handleChange, disabled: disabled, isError: isError, onFocus: onFocus, onBlur: onBlur, mask: timeFormat, blocks: {
9369
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_4__.FlexField, { value: timeValue, placeholder: placeholder, onChange: handleChange, disabled: disabled, isError: isError, onFocus: onFocus, onBlur: onBlur, mask: timeFormat, blocks: {
9310
9370
  HH: {
9311
9371
  mask: react_imask__WEBPACK_IMPORTED_MODULE_2__.IMask.MaskedRange,
9312
9372
  from: 0,
@@ -12153,6 +12213,1470 @@ __webpack_require__.r(__webpack_exports__);
12153
12213
  /* harmony export */ });
12154
12214
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
12155
12215
 
12216
+ /***/ }),
12217
+
12218
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js":
12219
+ /*!*****************************************************************************************!*\
12220
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js ***!
12221
+ \*****************************************************************************************/
12222
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12223
+
12224
+ "use strict";
12225
+ __webpack_require__.r(__webpack_exports__);
12226
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12227
+ /* harmony export */ getTimezoneOffsetInMilliseconds: () => (/* binding */ getTimezoneOffsetInMilliseconds)
12228
+ /* harmony export */ });
12229
+ /**
12230
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
12231
+ * They usually appear for dates that denote time before the timezones were introduced
12232
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
12233
+ * and GMT+01:00:00 after that date)
12234
+ *
12235
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
12236
+ * which would lead to incorrect calculations.
12237
+ *
12238
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
12239
+ */
12240
+ function getTimezoneOffsetInMilliseconds(date) {
12241
+ const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
12242
+ utcDate.setUTCFullYear(date.getFullYear());
12243
+ return +date - +utcDate;
12244
+ }
12245
+
12246
+
12247
+ /***/ }),
12248
+
12249
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js":
12250
+ /*!********************************************************************!*\
12251
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js ***!
12252
+ \********************************************************************/
12253
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12254
+
12255
+ "use strict";
12256
+ __webpack_require__.r(__webpack_exports__);
12257
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12258
+ /* harmony export */ newDateUTC: () => (/* binding */ newDateUTC)
12259
+ /* harmony export */ });
12260
+ /**
12261
+ * Use instead of `new Date(Date.UTC(...))` to support years below 100 which doesn't work
12262
+ * otherwise due to the nature of the
12263
+ * [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years.
12264
+ *
12265
+ * For `Date.UTC(...)`, use `newDateUTC(...).getTime()`.
12266
+ */
12267
+ function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {
12268
+ const utcDate = new Date(0);
12269
+ utcDate.setUTCFullYear(fullYear, month, day);
12270
+ utcDate.setUTCHours(hour, minute, second, millisecond);
12271
+ return utcDate;
12272
+ }
12273
+
12274
+
12275
+ /***/ }),
12276
+
12277
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js":
12278
+ /*!****************************************************************************!*\
12279
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js ***!
12280
+ \****************************************************************************/
12281
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12282
+
12283
+ "use strict";
12284
+ __webpack_require__.r(__webpack_exports__);
12285
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12286
+ /* harmony export */ tzIntlTimeZoneName: () => (/* binding */ tzIntlTimeZoneName)
12287
+ /* harmony export */ });
12288
+ /* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/getDefaultOptions.js");
12289
+
12290
+ /**
12291
+ * Returns the formatted time zone name of the provided `timeZone` or the current
12292
+ * system time zone if omitted, accounting for DST according to the UTC value of
12293
+ * the date.
12294
+ */
12295
+ function tzIntlTimeZoneName(length, date, options) {
12296
+ const defaultOptions = (0,date_fns__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)();
12297
+ const dtf = getDTF(length, options.timeZone, options.locale ?? defaultOptions.locale);
12298
+ return 'formatToParts' in dtf ? partsTimeZone(dtf, date) : hackyTimeZone(dtf, date);
12299
+ }
12300
+ function partsTimeZone(dtf, date) {
12301
+ const formatted = dtf.formatToParts(date);
12302
+ for (let i = formatted.length - 1; i >= 0; --i) {
12303
+ if (formatted[i].type === 'timeZoneName') {
12304
+ return formatted[i].value;
12305
+ }
12306
+ }
12307
+ return undefined;
12308
+ }
12309
+ function hackyTimeZone(dtf, date) {
12310
+ const formatted = dtf.format(date).replace(/\u200E/g, '');
12311
+ const tzNameMatch = / [\w-+ ]+$/.exec(formatted);
12312
+ return tzNameMatch ? tzNameMatch[0].substr(1) : '';
12313
+ }
12314
+ // If a locale has been provided `en-US` is used as a fallback in case it is an
12315
+ // invalid locale, otherwise the locale is left undefined to use the system locale.
12316
+ function getDTF(length, timeZone, locale) {
12317
+ return new Intl.DateTimeFormat(locale ? [locale.code, 'en-US'] : undefined, {
12318
+ timeZone: timeZone,
12319
+ timeZoneName: length,
12320
+ });
12321
+ }
12322
+
12323
+
12324
+ /***/ }),
12325
+
12326
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js":
12327
+ /*!*************************************************************************!*\
12328
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js ***!
12329
+ \*************************************************************************/
12330
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12331
+
12332
+ "use strict";
12333
+ __webpack_require__.r(__webpack_exports__);
12334
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12335
+ /* harmony export */ tzParseTimezone: () => (/* binding */ tzParseTimezone)
12336
+ /* harmony export */ });
12337
+ /* harmony import */ var _tzTokenizeDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tzTokenizeDate/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js");
12338
+ /* harmony import */ var _newDateUTC_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../newDateUTC/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js");
12339
+
12340
+
12341
+ const MILLISECONDS_IN_HOUR = 3600000;
12342
+ const MILLISECONDS_IN_MINUTE = 60000;
12343
+ const patterns = {
12344
+ timezone: /([Z+-].*)$/,
12345
+ timezoneZ: /^(Z)$/,
12346
+ timezoneHH: /^([+-]\d{2})$/,
12347
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/,
12348
+ };
12349
+ // Parse constious time zone offset formats to an offset in milliseconds
12350
+ function tzParseTimezone(timezoneString, date, isUtcDate) {
12351
+ // Empty string
12352
+ if (!timezoneString) {
12353
+ return 0;
12354
+ }
12355
+ // Z
12356
+ let token = patterns.timezoneZ.exec(timezoneString);
12357
+ if (token) {
12358
+ return 0;
12359
+ }
12360
+ let hours;
12361
+ let absoluteOffset;
12362
+ // ±hh
12363
+ token = patterns.timezoneHH.exec(timezoneString);
12364
+ if (token) {
12365
+ hours = parseInt(token[1], 10);
12366
+ if (!validateTimezone(hours)) {
12367
+ return NaN;
12368
+ }
12369
+ return -(hours * MILLISECONDS_IN_HOUR);
12370
+ }
12371
+ // ±hh:mm or ±hhmm
12372
+ token = patterns.timezoneHHMM.exec(timezoneString);
12373
+ if (token) {
12374
+ hours = parseInt(token[2], 10);
12375
+ const minutes = parseInt(token[3], 10);
12376
+ if (!validateTimezone(hours, minutes)) {
12377
+ return NaN;
12378
+ }
12379
+ absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;
12380
+ return token[1] === '+' ? -absoluteOffset : absoluteOffset;
12381
+ }
12382
+ // IANA time zone
12383
+ if (isValidTimezoneIANAString(timezoneString)) {
12384
+ date = new Date(date || Date.now());
12385
+ const utcDate = isUtcDate ? date : toUtcDate(date);
12386
+ const offset = calcOffset(utcDate, timezoneString);
12387
+ const fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);
12388
+ return -fixedOffset;
12389
+ }
12390
+ return NaN;
12391
+ }
12392
+ function toUtcDate(date) {
12393
+ return (0,_newDateUTC_index_js__WEBPACK_IMPORTED_MODULE_1__.newDateUTC)(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
12394
+ }
12395
+ function calcOffset(date, timezoneString) {
12396
+ const tokens = (0,_tzTokenizeDate_index_js__WEBPACK_IMPORTED_MODULE_0__.tzTokenizeDate)(date, timezoneString);
12397
+ // ms dropped because it's not provided by tzTokenizeDate
12398
+ const asUTC = (0,_newDateUTC_index_js__WEBPACK_IMPORTED_MODULE_1__.newDateUTC)(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();
12399
+ let asTS = date.getTime();
12400
+ const over = asTS % 1000;
12401
+ asTS -= over >= 0 ? over : 1000 + over;
12402
+ return asUTC - asTS;
12403
+ }
12404
+ function fixOffset(date, offset, timezoneString) {
12405
+ const localTS = date.getTime();
12406
+ // Our UTC time is just a guess because our offset is just a guess
12407
+ let utcGuess = localTS - offset;
12408
+ // Test whether the zone matches the offset for this ts
12409
+ const o2 = calcOffset(new Date(utcGuess), timezoneString);
12410
+ // If so, offset didn't change, and we're done
12411
+ if (offset === o2) {
12412
+ return offset;
12413
+ }
12414
+ // If not, change the ts by the difference in the offset
12415
+ utcGuess -= o2 - offset;
12416
+ // If that gives us the local time we want, we're done
12417
+ const o3 = calcOffset(new Date(utcGuess), timezoneString);
12418
+ if (o2 === o3) {
12419
+ return o2;
12420
+ }
12421
+ // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time
12422
+ return Math.max(o2, o3);
12423
+ }
12424
+ function validateTimezone(hours, minutes) {
12425
+ return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));
12426
+ }
12427
+ const validIANATimezoneCache = {};
12428
+ function isValidTimezoneIANAString(timeZoneString) {
12429
+ if (validIANATimezoneCache[timeZoneString])
12430
+ return true;
12431
+ try {
12432
+ new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });
12433
+ validIANATimezoneCache[timeZoneString] = true;
12434
+ return true;
12435
+ }
12436
+ catch (error) {
12437
+ return false;
12438
+ }
12439
+ }
12440
+
12441
+
12442
+ /***/ }),
12443
+
12444
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js":
12445
+ /*!*******************************************************************!*\
12446
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js ***!
12447
+ \*******************************************************************/
12448
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12449
+
12450
+ "use strict";
12451
+ __webpack_require__.r(__webpack_exports__);
12452
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12453
+ /* harmony export */ tzPattern: () => (/* binding */ tzPattern)
12454
+ /* harmony export */ });
12455
+ /** Regex to identify the presence of a time zone specifier in a date string */
12456
+ const tzPattern = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;
12457
+
12458
+
12459
+ /***/ }),
12460
+
12461
+ /***/ "./node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js":
12462
+ /*!************************************************************************!*\
12463
+ !*** ./node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js ***!
12464
+ \************************************************************************/
12465
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12466
+
12467
+ "use strict";
12468
+ __webpack_require__.r(__webpack_exports__);
12469
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12470
+ /* harmony export */ tzTokenizeDate: () => (/* binding */ tzTokenizeDate)
12471
+ /* harmony export */ });
12472
+ /**
12473
+ * Returns the [year, month, day, hour, minute, seconds] tokens of the provided
12474
+ * `date` as it will be rendered in the `timeZone`.
12475
+ */
12476
+ function tzTokenizeDate(date, timeZone) {
12477
+ const dtf = getDateTimeFormat(timeZone);
12478
+ return 'formatToParts' in dtf ? partsOffset(dtf, date) : hackyOffset(dtf, date);
12479
+ }
12480
+ const typeToPos = {
12481
+ year: 0,
12482
+ month: 1,
12483
+ day: 2,
12484
+ hour: 3,
12485
+ minute: 4,
12486
+ second: 5,
12487
+ };
12488
+ function partsOffset(dtf, date) {
12489
+ try {
12490
+ const formatted = dtf.formatToParts(date);
12491
+ const filled = [];
12492
+ for (let i = 0; i < formatted.length; i++) {
12493
+ const pos = typeToPos[formatted[i].type];
12494
+ if (pos !== undefined) {
12495
+ filled[pos] = parseInt(formatted[i].value, 10);
12496
+ }
12497
+ }
12498
+ return filled;
12499
+ }
12500
+ catch (error) {
12501
+ if (error instanceof RangeError) {
12502
+ return [NaN];
12503
+ }
12504
+ throw error;
12505
+ }
12506
+ }
12507
+ function hackyOffset(dtf, date) {
12508
+ const formatted = dtf.format(date);
12509
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12510
+ const parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted);
12511
+ // const [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed
12512
+ // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]
12513
+ return [
12514
+ parseInt(parsed[3], 10),
12515
+ parseInt(parsed[1], 10),
12516
+ parseInt(parsed[2], 10),
12517
+ parseInt(parsed[4], 10),
12518
+ parseInt(parsed[5], 10),
12519
+ parseInt(parsed[6], 10),
12520
+ ];
12521
+ }
12522
+ // Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used
12523
+ // to get deterministic local date/time output according to the `en-US` locale which
12524
+ // can be used to extract local time parts as necessary.
12525
+ const dtfCache = {};
12526
+ // New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`
12527
+ const testDateFormatted = new Intl.DateTimeFormat('en-US', {
12528
+ hourCycle: 'h23',
12529
+ timeZone: 'America/New_York',
12530
+ year: 'numeric',
12531
+ month: '2-digit',
12532
+ day: '2-digit',
12533
+ hour: '2-digit',
12534
+ minute: '2-digit',
12535
+ second: '2-digit',
12536
+ }).format(new Date('2014-06-25T04:00:00.123Z'));
12537
+ const hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||
12538
+ testDateFormatted === '‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00';
12539
+ function getDateTimeFormat(timeZone) {
12540
+ if (!dtfCache[timeZone]) {
12541
+ dtfCache[timeZone] = hourCycleSupported
12542
+ ? new Intl.DateTimeFormat('en-US', {
12543
+ hourCycle: 'h23',
12544
+ timeZone: timeZone,
12545
+ year: 'numeric',
12546
+ month: 'numeric',
12547
+ day: '2-digit',
12548
+ hour: '2-digit',
12549
+ minute: '2-digit',
12550
+ second: '2-digit',
12551
+ })
12552
+ : new Intl.DateTimeFormat('en-US', {
12553
+ hour12: false,
12554
+ timeZone: timeZone,
12555
+ year: 'numeric',
12556
+ month: 'numeric',
12557
+ day: '2-digit',
12558
+ hour: '2-digit',
12559
+ minute: '2-digit',
12560
+ second: '2-digit',
12561
+ });
12562
+ }
12563
+ return dtfCache[timeZone];
12564
+ }
12565
+
12566
+
12567
+ /***/ }),
12568
+
12569
+ /***/ "./node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js":
12570
+ /*!*********************************************************************!*\
12571
+ !*** ./node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js ***!
12572
+ \*********************************************************************/
12573
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12574
+
12575
+ "use strict";
12576
+ __webpack_require__.r(__webpack_exports__);
12577
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12578
+ /* harmony export */ formatInTimeZone: () => (/* binding */ formatInTimeZone)
12579
+ /* harmony export */ });
12580
+ /* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/index.js */ "./node_modules/date-fns-tz/dist/esm/format/index.js");
12581
+ /* harmony import */ var _toZonedTime_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toZonedTime/index.js */ "./node_modules/date-fns-tz/dist/esm/toZonedTime/index.js");
12582
+
12583
+
12584
+ /**
12585
+ * @name formatInTimeZone
12586
+ * @category Time Zone Helpers
12587
+ * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)
12588
+ *
12589
+ * @param date the date representing the local time / real UTC time
12590
+ * @param timeZone the time zone this date should be formatted for; can be an offset or IANA time zone
12591
+ * @param formatStr the string of tokens
12592
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
12593
+ * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link
12594
+ * https://date-fns.org/docs/toDate}
12595
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
12596
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
12597
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See
12598
+ * [Locale]{@link https://date-fns.org/docs/Locale}
12599
+ * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:
12600
+ * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).
12601
+ * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens
12602
+ * (`yy`, `yyyy`). See: https://git.io/fxCyr
12603
+ * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.
12604
+ */
12605
+ function formatInTimeZone(date, timeZone, formatStr, options) {
12606
+ options = {
12607
+ ...options,
12608
+ timeZone,
12609
+ originalDate: date,
12610
+ };
12611
+ return (0,_format_index_js__WEBPACK_IMPORTED_MODULE_0__.format)((0,_toZonedTime_index_js__WEBPACK_IMPORTED_MODULE_1__.toZonedTime)(date, timeZone, { timeZone: options.timeZone }), formatStr, options);
12612
+ }
12613
+
12614
+
12615
+ /***/ }),
12616
+
12617
+ /***/ "./node_modules/date-fns-tz/dist/esm/format/formatters/index.js":
12618
+ /*!**********************************************************************!*\
12619
+ !*** ./node_modules/date-fns-tz/dist/esm/format/formatters/index.js ***!
12620
+ \**********************************************************************/
12621
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12622
+
12623
+ "use strict";
12624
+ __webpack_require__.r(__webpack_exports__);
12625
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12626
+ /* harmony export */ formatters: () => (/* binding */ formatters)
12627
+ /* harmony export */ });
12628
+ /* harmony import */ var _lib_tzIntlTimeZoneName_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../_lib/tzIntlTimeZoneName/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js");
12629
+ /* harmony import */ var _lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_lib/tzParseTimezone/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js");
12630
+
12631
+
12632
+ const MILLISECONDS_IN_MINUTE = 60 * 1000;
12633
+ const formatters = {
12634
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
12635
+ X: function (date, token, options) {
12636
+ const timezoneOffset = getTimeZoneOffset(options.timeZone, date);
12637
+ if (timezoneOffset === 0) {
12638
+ return 'Z';
12639
+ }
12640
+ switch (token) {
12641
+ // Hours and optional minutes
12642
+ case 'X':
12643
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
12644
+ // Hours, minutes and optional seconds without `:` delimeter
12645
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
12646
+ // so this token always has the same output as `XX`
12647
+ case 'XXXX':
12648
+ case 'XX': // Hours and minutes without `:` delimeter
12649
+ return formatTimezone(timezoneOffset);
12650
+ // Hours, minutes and optional seconds with `:` delimeter
12651
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
12652
+ // so this token always has the same output as `XXX`
12653
+ case 'XXXXX':
12654
+ case 'XXX': // Hours and minutes with `:` delimeter
12655
+ default:
12656
+ return formatTimezone(timezoneOffset, ':');
12657
+ }
12658
+ },
12659
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
12660
+ x: function (date, token, options) {
12661
+ const timezoneOffset = getTimeZoneOffset(options.timeZone, date);
12662
+ switch (token) {
12663
+ // Hours and optional minutes
12664
+ case 'x':
12665
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
12666
+ // Hours, minutes and optional seconds without `:` delimeter
12667
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
12668
+ // so this token always has the same output as `xx`
12669
+ case 'xxxx':
12670
+ case 'xx': // Hours and minutes without `:` delimeter
12671
+ return formatTimezone(timezoneOffset);
12672
+ // Hours, minutes and optional seconds with `:` delimeter
12673
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
12674
+ // so this token always has the same output as `xxx`
12675
+ case 'xxxxx':
12676
+ case 'xxx': // Hours and minutes with `:` delimeter
12677
+ default:
12678
+ return formatTimezone(timezoneOffset, ':');
12679
+ }
12680
+ },
12681
+ // Timezone (GMT)
12682
+ O: function (date, token, options) {
12683
+ const timezoneOffset = getTimeZoneOffset(options.timeZone, date);
12684
+ switch (token) {
12685
+ // Short
12686
+ case 'O':
12687
+ case 'OO':
12688
+ case 'OOO':
12689
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
12690
+ // Long
12691
+ case 'OOOO':
12692
+ default:
12693
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
12694
+ }
12695
+ },
12696
+ // Timezone (specific non-location)
12697
+ z: function (date, token, options) {
12698
+ switch (token) {
12699
+ // Short
12700
+ case 'z':
12701
+ case 'zz':
12702
+ case 'zzz':
12703
+ return (0,_lib_tzIntlTimeZoneName_index_js__WEBPACK_IMPORTED_MODULE_0__.tzIntlTimeZoneName)('short', date, options);
12704
+ // Long
12705
+ case 'zzzz':
12706
+ default:
12707
+ return (0,_lib_tzIntlTimeZoneName_index_js__WEBPACK_IMPORTED_MODULE_0__.tzIntlTimeZoneName)('long', date, options);
12708
+ }
12709
+ },
12710
+ };
12711
+ function getTimeZoneOffset(timeZone, originalDate) {
12712
+ const timeZoneOffset = timeZone
12713
+ ? (0,_lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_1__.tzParseTimezone)(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE
12714
+ : originalDate?.getTimezoneOffset() ?? 0;
12715
+ if (Number.isNaN(timeZoneOffset)) {
12716
+ throw new RangeError('Invalid time zone specified: ' + timeZone);
12717
+ }
12718
+ return timeZoneOffset;
12719
+ }
12720
+ function addLeadingZeros(number, targetLength) {
12721
+ const sign = number < 0 ? '-' : '';
12722
+ let output = Math.abs(number).toString();
12723
+ while (output.length < targetLength) {
12724
+ output = '0' + output;
12725
+ }
12726
+ return sign + output;
12727
+ }
12728
+ function formatTimezone(offset, delimiter = '') {
12729
+ const sign = offset > 0 ? '-' : '+';
12730
+ const absOffset = Math.abs(offset);
12731
+ const hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
12732
+ const minutes = addLeadingZeros(Math.floor(absOffset % 60), 2);
12733
+ return sign + hours + delimiter + minutes;
12734
+ }
12735
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
12736
+ if (offset % 60 === 0) {
12737
+ const sign = offset > 0 ? '-' : '+';
12738
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
12739
+ }
12740
+ return formatTimezone(offset, delimiter);
12741
+ }
12742
+ function formatTimezoneShort(offset, delimiter = '') {
12743
+ const sign = offset > 0 ? '-' : '+';
12744
+ const absOffset = Math.abs(offset);
12745
+ const hours = Math.floor(absOffset / 60);
12746
+ const minutes = absOffset % 60;
12747
+ if (minutes === 0) {
12748
+ return sign + String(hours);
12749
+ }
12750
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
12751
+ }
12752
+
12753
+
12754
+ /***/ }),
12755
+
12756
+ /***/ "./node_modules/date-fns-tz/dist/esm/format/index.js":
12757
+ /*!***********************************************************!*\
12758
+ !*** ./node_modules/date-fns-tz/dist/esm/format/index.js ***!
12759
+ \***********************************************************/
12760
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12761
+
12762
+ "use strict";
12763
+ __webpack_require__.r(__webpack_exports__);
12764
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12765
+ /* harmony export */ format: () => (/* binding */ format)
12766
+ /* harmony export */ });
12767
+ /* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns/format */ "./node_modules/date-fns/format.js");
12768
+ /* harmony import */ var _formatters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatters/index.js */ "./node_modules/date-fns-tz/dist/esm/format/formatters/index.js");
12769
+ /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ "./node_modules/date-fns-tz/dist/esm/toDate/index.js");
12770
+
12771
+
12772
+
12773
+ const tzFormattingTokensRegExp = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
12774
+ /**
12775
+ * @name format
12776
+ * @category Common Helpers
12777
+ * @summary Format the date.
12778
+ *
12779
+ * @description
12780
+ * Return the formatted date string in the given format. The result may consty by locale.
12781
+ *
12782
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
12783
+ * > See: https://git.io/fxCyr
12784
+ *
12785
+ * The characters wrapped between two single quotes characters (') are escaped.
12786
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
12787
+ * (see the last example)
12788
+ *
12789
+ * Format of the string is based on Unicode Technical Standard #35:
12790
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
12791
+ * with a few additions (see note 7 below the table).
12792
+ *
12793
+ * Accepted patterns:
12794
+ * | Unit | Pattern | Result examples | Notes |
12795
+ * |---------------------------------|---------|-----------------------------------|-------|
12796
+ * | Era | G..GGG | AD, BC | |
12797
+ * | | GGGG | Anno Domini, Before Christ | 2 |
12798
+ * | | GGGGG | A, B | |
12799
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
12800
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
12801
+ * | | yy | 44, 01, 00, 17 | 5 |
12802
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
12803
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
12804
+ * | | yyyyy | ... | 3,5 |
12805
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
12806
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
12807
+ * | | YY | 44, 01, 00, 17 | 5,8 |
12808
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
12809
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
12810
+ * | | YYYYY | ... | 3,5 |
12811
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
12812
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
12813
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
12814
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
12815
+ * | | RRRRR | ... | 3,5,7 |
12816
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
12817
+ * | | uu | -43, 01, 1900, 2017 | 5 |
12818
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
12819
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
12820
+ * | | uuuuu | ... | 3,5 |
12821
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
12822
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
12823
+ * | | QQ | 01, 02, 03, 04 | |
12824
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
12825
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
12826
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
12827
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
12828
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
12829
+ * | | qq | 01, 02, 03, 04 | |
12830
+ * | | qqq | Q1, Q2, Q3, Q4 | |
12831
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
12832
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
12833
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
12834
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
12835
+ * | | MM | 01, 02, ..., 12 | |
12836
+ * | | MMM | Jan, Feb, ..., Dec | |
12837
+ * | | MMMM | January, February, ..., December | 2 |
12838
+ * | | MMMMM | J, F, ..., D | |
12839
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
12840
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
12841
+ * | | LL | 01, 02, ..., 12 | |
12842
+ * | | LLL | Jan, Feb, ..., Dec | |
12843
+ * | | LLLL | January, February, ..., December | 2 |
12844
+ * | | LLLLL | J, F, ..., D | |
12845
+ * | Local week of year | w | 1, 2, ..., 53 | |
12846
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
12847
+ * | | ww | 01, 02, ..., 53 | |
12848
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
12849
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
12850
+ * | | II | 01, 02, ..., 53 | 7 |
12851
+ * | Day of month | d | 1, 2, ..., 31 | |
12852
+ * | | do | 1st, 2nd, ..., 31st | 7 |
12853
+ * | | dd | 01, 02, ..., 31 | |
12854
+ * | Day of year | D | 1, 2, ..., 365, 366 | 8 |
12855
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
12856
+ * | | DD | 01, 02, ..., 365, 366 | 8 |
12857
+ * | | DDD | 001, 002, ..., 365, 366 | |
12858
+ * | | DDDD | ... | 3 |
12859
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | |
12860
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
12861
+ * | | EEEEE | M, T, W, T, F, S, S | |
12862
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |
12863
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
12864
+ * | | io | 1st, 2nd, ..., 7th | 7 |
12865
+ * | | ii | 01, 02, ..., 07 | 7 |
12866
+ * | | iii | Mon, Tue, Wed, ..., Su | 7 |
12867
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
12868
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
12869
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |
12870
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
12871
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
12872
+ * | | ee | 02, 03, ..., 01 | |
12873
+ * | | eee | Mon, Tue, Wed, ..., Su | |
12874
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
12875
+ * | | eeeee | M, T, W, T, F, S, S | |
12876
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |
12877
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
12878
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
12879
+ * | | cc | 02, 03, ..., 01 | |
12880
+ * | | ccc | Mon, Tue, Wed, ..., Su | |
12881
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
12882
+ * | | ccccc | M, T, W, T, F, S, S | |
12883
+ * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |
12884
+ * | AM, PM | a..aaa | AM, PM | |
12885
+ * | | aaaa | a.m., p.m. | 2 |
12886
+ * | | aaaaa | a, p | |
12887
+ * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | |
12888
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
12889
+ * | | bbbbb | a, p, n, mi | |
12890
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
12891
+ * | | BBBB | at night, in the morning, ... | 2 |
12892
+ * | | BBBBB | at night, in the morning, ... | |
12893
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
12894
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
12895
+ * | | hh | 01, 02, ..., 11, 12 | |
12896
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
12897
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
12898
+ * | | HH | 00, 01, 02, ..., 23 | |
12899
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
12900
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
12901
+ * | | KK | 1, 2, ..., 11, 0 | |
12902
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
12903
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
12904
+ * | | kk | 24, 01, 02, ..., 23 | |
12905
+ * | Minute | m | 0, 1, ..., 59 | |
12906
+ * | | mo | 0th, 1st, ..., 59th | 7 |
12907
+ * | | mm | 00, 01, ..., 59 | |
12908
+ * | Second | s | 0, 1, ..., 59 | |
12909
+ * | | so | 0th, 1st, ..., 59th | 7 |
12910
+ * | | ss | 00, 01, ..., 59 | |
12911
+ * | Fraction of second | S | 0, 1, ..., 9 | |
12912
+ * | | SS | 00, 01, ..., 99 | |
12913
+ * | | SSS | 000, 0001, ..., 999 | |
12914
+ * | | SSSS | ... | 3 |
12915
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
12916
+ * | | XX | -0800, +0530, Z | |
12917
+ * | | XXX | -08:00, +05:30, Z | |
12918
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
12919
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
12920
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
12921
+ * | | xx | -0800, +0530, +0000 | |
12922
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
12923
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
12924
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
12925
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
12926
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
12927
+ * | Timezone (specific non-locat.) | z...zzz | PDT, EST, CEST | 6 |
12928
+ * | | zzzz | Pacific Daylight Time | 2,6 |
12929
+ * | Seconds timestamp | t | 512969520 | 7 |
12930
+ * | | tt | ... | 3,7 |
12931
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
12932
+ * | | TT | ... | 3,7 |
12933
+ * | Long localized date | P | 05/29/1453 | 7 |
12934
+ * | | PP | May 29, 1453 | 7 |
12935
+ * | | PPP | May 29th, 1453 | 7 |
12936
+ * | | PPPP | Sunday, May 29th, 1453 | 2,7 |
12937
+ * | Long localized time | p | 12:00 AM | 7 |
12938
+ * | | pp | 12:00:00 AM | 7 |
12939
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
12940
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
12941
+ * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 |
12942
+ * | | PPpp | May 29, 1453, 12:00:00 AM | 7 |
12943
+ * | | PPPppp | May 29th, 1453 at ... | 7 |
12944
+ * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 |
12945
+ * Notes:
12946
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
12947
+ * are the same as "stand-alone" units, but are different in some languages.
12948
+ * "Formatting" units are declined according to the rules of the language
12949
+ * in the context of a date. "Stand-alone" units are always nominative singular:
12950
+ *
12951
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
12952
+ *
12953
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
12954
+ *
12955
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
12956
+ * the single quote characters (see below).
12957
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
12958
+ * the output will be the same as default pattern for this unit, usually
12959
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
12960
+ * are marked with "2" in the last column of the table.
12961
+ *
12962
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
12963
+ *
12964
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
12965
+ *
12966
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
12967
+ *
12968
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
12969
+ *
12970
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
12971
+ *
12972
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
12973
+ * The output will be padded with zeros to match the length of the pattern.
12974
+ *
12975
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
12976
+ *
12977
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
12978
+ * These tokens represent the shortest form of the quarter.
12979
+ *
12980
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
12981
+ *
12982
+ * | Year | `y` | `u` |
12983
+ * |------|-----|-----|
12984
+ * | AC 1 | 1 | 1 |
12985
+ * | BC 1 | 1 | 0 |
12986
+ * | BC 2 | 2 | -1 |
12987
+ *
12988
+ * Also `yy` always returns the last two digits of a year,
12989
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
12990
+ *
12991
+ * | Year | `yy` | `uu` |
12992
+ * |------|------|------|
12993
+ * | 1 | 01 | 01 |
12994
+ * | 14 | 14 | 14 |
12995
+ * | 376 | 76 | 376 |
12996
+ * | 1453 | 53 | 1453 |
12997
+ *
12998
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
12999
+ * except local week-numbering years are dependent on `options.weekStartsOn`
13000
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
13001
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
13002
+ *
13003
+ * 6. Specific non-location timezones are created using the Intl browser API. The output is determined by the
13004
+ * preferred standard of the current locale (en-US by default) which may not always give the expected result.
13005
+ * For this reason it is recommended to supply a `locale` in the format options when formatting a time zone name.
13006
+ *
13007
+ * 7. These patterns are not in the Unicode Technical Standard #35:
13008
+ * - `i`: ISO day of week
13009
+ * - `I`: ISO week of year
13010
+ * - `R`: ISO week-numbering year
13011
+ * - `t`: seconds timestamp
13012
+ * - `T`: milliseconds timestamp
13013
+ * - `o`: ordinal number modifier
13014
+ * - `P`: long localized date
13015
+ * - `p`: long localized time
13016
+ *
13017
+ * 8. These tokens are often confused with others. See: https://git.io/fxCyr
13018
+ *
13019
+ *
13020
+ * ### v2.0.0 breaking changes:
13021
+ *
13022
+ * - [Changes that are common for the whole
13023
+ * library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
13024
+ *
13025
+ * - The second argument is now required for the sake of explicitness.
13026
+ *
13027
+ * ```javascript
13028
+ * // Before v2.0.0
13029
+ * format(new Date(2016, 0, 1))
13030
+ *
13031
+ * // v2.0.0 onward
13032
+ * format(new Date(2016, 0, 1), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
13033
+ * ```
13034
+ *
13035
+ * - New format string API for `format` function
13036
+ * which is based on [Unicode Technical Standard
13037
+ * #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). See [this
13038
+ * post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.
13039
+ *
13040
+ * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.
13041
+ *
13042
+ * @param date the original date
13043
+ * @param formatStr the string of tokens
13044
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
13045
+ * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link
13046
+ * https://date-fns.org/docs/toDate}
13047
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
13048
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
13049
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See
13050
+ * [Locale]{@link https://date-fns.org/docs/Locale}
13051
+ * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:
13052
+ * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).
13053
+ * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens
13054
+ * (`yy`, `yyyy`). See: https://git.io/fxCyr
13055
+ * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.
13056
+ * @param {Date|Number} [options.originalDate] - can be used to pass the original unmodified date to `format` to
13057
+ * improve correctness of the replaced timezone token close to the DST threshold.
13058
+ * @throws {TypeError} 2 arguments required
13059
+ * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
13060
+ * @throws {RangeError} `options.locale` must contain `localize` property
13061
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
13062
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
13063
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
13064
+ * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see:
13065
+ * https://git.io/fxCyr
13066
+ *
13067
+ * @example
13068
+ * // Represent 11 February 2014 in middle-endian format:
13069
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
13070
+ * //=> '02/11/2014'
13071
+ *
13072
+ * @example
13073
+ * // Represent 2 July 2014 in Esperanto:
13074
+ * import { eoLocale } from 'date-fns/locale/eo'
13075
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
13076
+ * locale: eoLocale
13077
+ * })
13078
+ * //=> '2-a de julio 2014'
13079
+ *
13080
+ * @example
13081
+ * // Escape string by single quote characters:
13082
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
13083
+ * //=> "3 o'clock"
13084
+ */
13085
+ function format(date, formatStr, options = {}) {
13086
+ formatStr = String(formatStr);
13087
+ const matches = formatStr.match(tzFormattingTokensRegExp);
13088
+ if (matches) {
13089
+ const d = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.toDate)(options.originalDate || date, options);
13090
+ // Work through each match and replace the tz token in the format string with the quoted
13091
+ // formatted time zone so the remaining tokens can be filled in by date-fns#format.
13092
+ formatStr = matches.reduce(function (result, token) {
13093
+ if (token[0] === "'") {
13094
+ return result; // This is a quoted portion, matched only to ensure we don't match inside it
13095
+ }
13096
+ const pos = result.indexOf(token);
13097
+ const precededByQuotedSection = result[pos - 1] === "'";
13098
+ const replaced = result.replace(token, "'" + _formatters_index_js__WEBPACK_IMPORTED_MODULE_0__.formatters[token[0]](d, token, options) + "'");
13099
+ // If the replacement results in two adjoining quoted strings, the back to back quotes
13100
+ // are removed, so it doesn't look like an escaped quote.
13101
+ return precededByQuotedSection
13102
+ ? replaced.substring(0, pos - 1) + replaced.substring(pos + 1)
13103
+ : replaced;
13104
+ }, formatStr);
13105
+ }
13106
+ return (0,date_fns_format__WEBPACK_IMPORTED_MODULE_2__.format)(date, formatStr, options);
13107
+ }
13108
+
13109
+
13110
+ /***/ }),
13111
+
13112
+ /***/ "./node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js":
13113
+ /*!******************************************************************!*\
13114
+ !*** ./node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js ***!
13115
+ \******************************************************************/
13116
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13117
+
13118
+ "use strict";
13119
+ __webpack_require__.r(__webpack_exports__);
13120
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13121
+ /* harmony export */ fromZonedTime: () => (/* binding */ fromZonedTime)
13122
+ /* harmony export */ });
13123
+ /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../toDate/index.js */ "./node_modules/date-fns-tz/dist/esm/toDate/index.js");
13124
+ /* harmony import */ var _lib_tzPattern_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/tzPattern/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js");
13125
+ /* harmony import */ var _lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/tzParseTimezone/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js");
13126
+ /* harmony import */ var _lib_newDateUTC_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_lib/newDateUTC/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js");
13127
+
13128
+
13129
+
13130
+
13131
+ /**
13132
+ * @name fromZonedTime
13133
+ * @category Time Zone Helpers
13134
+ * @summary Get the UTC date/time from a date representing local time in a given time zone
13135
+ *
13136
+ * @description
13137
+ * Returns a date instance with the UTC time of the provided date of which the values
13138
+ * represented the local time in the time zone specified. In other words, if the input
13139
+ * date represented local time in time zone, the timestamp of the output date will
13140
+ * give the equivalent UTC of that local time regardless of the current system time zone.
13141
+ *
13142
+ * @param date the date with values representing the local time
13143
+ * @param timeZone the time zone of this local time, can be an offset or IANA time zone
13144
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
13145
+ * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
13146
+ * @throws {TypeError} 2 arguments required
13147
+ * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
13148
+ *
13149
+ * @example
13150
+ * // In June 10am in Los Angeles is 5pm UTC
13151
+ * const result = fromZonedTime(new Date(2014, 5, 25, 10, 0, 0), 'America/Los_Angeles')
13152
+ * //=> 2014-06-25T17:00:00.000Z
13153
+ */
13154
+ function fromZonedTime(date, timeZone, options) {
13155
+ if (typeof date === 'string' && !date.match(_lib_tzPattern_index_js__WEBPACK_IMPORTED_MODULE_1__.tzPattern)) {
13156
+ return (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, { ...options, timeZone });
13157
+ }
13158
+ date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options);
13159
+ const utc = (0,_lib_newDateUTC_index_js__WEBPACK_IMPORTED_MODULE_3__.newDateUTC)(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).getTime();
13160
+ const offsetMilliseconds = (0,_lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_2__.tzParseTimezone)(timeZone, new Date(utc));
13161
+ return new Date(utc + offsetMilliseconds);
13162
+ }
13163
+
13164
+
13165
+ /***/ }),
13166
+
13167
+ /***/ "./node_modules/date-fns-tz/dist/esm/getTimezoneOffset/index.js":
13168
+ /*!**********************************************************************!*\
13169
+ !*** ./node_modules/date-fns-tz/dist/esm/getTimezoneOffset/index.js ***!
13170
+ \**********************************************************************/
13171
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13172
+
13173
+ "use strict";
13174
+ __webpack_require__.r(__webpack_exports__);
13175
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13176
+ /* harmony export */ getTimezoneOffset: () => (/* binding */ getTimezoneOffset)
13177
+ /* harmony export */ });
13178
+ /* harmony import */ var _lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/tzParseTimezone/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js");
13179
+
13180
+ /**
13181
+ * @name getTimezoneOffset
13182
+ * @category Time Zone Helpers
13183
+ * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)
13184
+ *
13185
+ * @description
13186
+ * Returns the time zone offset from UTC time in milliseconds for IANA time zones as well
13187
+ * as other time zone offset string formats.
13188
+ *
13189
+ * For time zones where daylight savings time is applicable a `Date` should be passed on
13190
+ * the second parameter to ensure the offset correctly accounts for DST at that time of
13191
+ * year. When omitted, the current date is used.
13192
+ *
13193
+ * @param timeZone the time zone of this local time, can be an offset or IANA time zone
13194
+ * @param date the date with values representing the local time
13195
+ *
13196
+ * @example
13197
+ * const result = getTimezoneOffset('-07:00')
13198
+ * //=> -18000000 (-7 * 60 * 60 * 1000)
13199
+ * const result = getTimezoneOffset('Africa/Johannesburg')
13200
+ * //=> 7200000 (2 * 60 * 60 * 1000)
13201
+ * const result = getTimezoneOffset('America/New_York', new Date(2016, 0, 1))
13202
+ * //=> -18000000 (-5 * 60 * 60 * 1000)
13203
+ * const result = getTimezoneOffset('America/New_York', new Date(2016, 6, 1))
13204
+ * //=> -14400000 (-4 * 60 * 60 * 1000)
13205
+ */
13206
+ function getTimezoneOffset(timeZone, date) {
13207
+ return -(0,_lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_0__.tzParseTimezone)(timeZone, date);
13208
+ }
13209
+
13210
+
13211
+ /***/ }),
13212
+
13213
+ /***/ "./node_modules/date-fns-tz/dist/esm/index.js":
13214
+ /*!****************************************************!*\
13215
+ !*** ./node_modules/date-fns-tz/dist/esm/index.js ***!
13216
+ \****************************************************/
13217
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13218
+
13219
+ "use strict";
13220
+ __webpack_require__.r(__webpack_exports__);
13221
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13222
+ /* harmony export */ format: () => (/* reexport safe */ _format_index_js__WEBPACK_IMPORTED_MODULE_0__.format),
13223
+ /* harmony export */ formatInTimeZone: () => (/* reexport safe */ _formatInTimeZone_index_js__WEBPACK_IMPORTED_MODULE_1__.formatInTimeZone),
13224
+ /* harmony export */ fromZonedTime: () => (/* reexport safe */ _fromZonedTime_index_js__WEBPACK_IMPORTED_MODULE_2__.fromZonedTime),
13225
+ /* harmony export */ getTimezoneOffset: () => (/* reexport safe */ _getTimezoneOffset_index_js__WEBPACK_IMPORTED_MODULE_4__.getTimezoneOffset),
13226
+ /* harmony export */ toDate: () => (/* reexport safe */ _toDate_index_js__WEBPACK_IMPORTED_MODULE_5__.toDate),
13227
+ /* harmony export */ toZonedTime: () => (/* reexport safe */ _toZonedTime_index_js__WEBPACK_IMPORTED_MODULE_3__.toZonedTime)
13228
+ /* harmony export */ });
13229
+ /* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format/index.js */ "./node_modules/date-fns-tz/dist/esm/format/index.js");
13230
+ /* harmony import */ var _formatInTimeZone_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatInTimeZone/index.js */ "./node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js");
13231
+ /* harmony import */ var _fromZonedTime_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fromZonedTime/index.js */ "./node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js");
13232
+ /* harmony import */ var _toZonedTime_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toZonedTime/index.js */ "./node_modules/date-fns-tz/dist/esm/toZonedTime/index.js");
13233
+ /* harmony import */ var _getTimezoneOffset_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getTimezoneOffset/index.js */ "./node_modules/date-fns-tz/dist/esm/getTimezoneOffset/index.js");
13234
+ /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toDate/index.js */ "./node_modules/date-fns-tz/dist/esm/toDate/index.js");
13235
+
13236
+
13237
+
13238
+
13239
+
13240
+
13241
+
13242
+
13243
+ /***/ }),
13244
+
13245
+ /***/ "./node_modules/date-fns-tz/dist/esm/toDate/index.js":
13246
+ /*!***********************************************************!*\
13247
+ !*** ./node_modules/date-fns-tz/dist/esm/toDate/index.js ***!
13248
+ \***********************************************************/
13249
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13250
+
13251
+ "use strict";
13252
+ __webpack_require__.r(__webpack_exports__);
13253
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13254
+ /* harmony export */ toDate: () => (/* binding */ toDate)
13255
+ /* harmony export */ });
13256
+ /* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/getTimezoneOffsetInMilliseconds/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js");
13257
+ /* harmony import */ var _lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/tzParseTimezone/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js");
13258
+ /* harmony import */ var _lib_tzPattern_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/tzPattern/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js");
13259
+
13260
+
13261
+
13262
+ const MILLISECONDS_IN_HOUR = 3600000;
13263
+ const MILLISECONDS_IN_MINUTE = 60000;
13264
+ const DEFAULT_ADDITIONAL_DIGITS = 2;
13265
+ const patterns = {
13266
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
13267
+ datePattern: /^([0-9W+-]+)(.*)/,
13268
+ plainTime: /:/,
13269
+ // year tokens
13270
+ YY: /^(\d{2})$/,
13271
+ YYY: [
13272
+ /^([+-]\d{2})$/, // 0 additional digits
13273
+ /^([+-]\d{3})$/, // 1 additional digit
13274
+ /^([+-]\d{4})$/, // 2 additional digits
13275
+ ],
13276
+ YYYY: /^(\d{4})/,
13277
+ YYYYY: [
13278
+ /^([+-]\d{4})/, // 0 additional digits
13279
+ /^([+-]\d{5})/, // 1 additional digit
13280
+ /^([+-]\d{6})/, // 2 additional digits
13281
+ ],
13282
+ // date tokens
13283
+ MM: /^-(\d{2})$/,
13284
+ DDD: /^-?(\d{3})$/,
13285
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
13286
+ Www: /^-?W(\d{2})$/,
13287
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
13288
+ HH: /^(\d{2}([.,]\d*)?)$/,
13289
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
13290
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
13291
+ // time zone tokens (to identify the presence of a tz)
13292
+ timeZone: _lib_tzPattern_index_js__WEBPACK_IMPORTED_MODULE_2__.tzPattern,
13293
+ };
13294
+ /**
13295
+ * @name toDate
13296
+ * @category Common Helpers
13297
+ * @summary Convert the given argument to an instance of Date.
13298
+ *
13299
+ * @description
13300
+ * Convert the given argument to an instance of Date.
13301
+ *
13302
+ * If the argument is an instance of Date, the function returns its clone.
13303
+ *
13304
+ * If the argument is a number, it is treated as a timestamp.
13305
+ *
13306
+ * If an argument is a string, the function tries to parse it.
13307
+ * Function accepts complete ISO 8601 formats as well as partial implementations.
13308
+ * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
13309
+ * If the function cannot parse the string or the values are invalid, it returns Invalid Date.
13310
+ *
13311
+ * If the argument is none of the above, the function returns Invalid Date.
13312
+ *
13313
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
13314
+ * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.
13315
+ *
13316
+ * @param argument the value to convert
13317
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
13318
+ * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format
13319
+ * @param {string} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.
13320
+ *
13321
+ * @returns the parsed date in the local time zone
13322
+ * @throws {TypeError} 1 argument required
13323
+ * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
13324
+ *
13325
+ * @example
13326
+ * // Convert string '2014-02-11T11:30:30' to date:
13327
+ * const result = toDate('2014-02-11T11:30:30')
13328
+ * //=> Tue Feb 11 2014 11:30:30
13329
+ *
13330
+ * @example
13331
+ * // Convert string '+02014101' to date,
13332
+ * // if the additional number of digits in the extended year format is 1:
13333
+ * const result = toDate('+02014101', {additionalDigits: 1})
13334
+ * //=> Fri Apr 11 2014 00:00:00
13335
+ */
13336
+ function toDate(argument, options = {}) {
13337
+ if (arguments.length < 1) {
13338
+ throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
13339
+ }
13340
+ if (argument === null) {
13341
+ return new Date(NaN);
13342
+ }
13343
+ const additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);
13344
+ if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {
13345
+ throw new RangeError('additionalDigits must be 0, 1 or 2');
13346
+ }
13347
+ // Clone the date
13348
+ if (argument instanceof Date ||
13349
+ (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')) {
13350
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
13351
+ return new Date(argument.getTime());
13352
+ }
13353
+ else if (typeof argument === 'number' ||
13354
+ Object.prototype.toString.call(argument) === '[object Number]') {
13355
+ return new Date(argument);
13356
+ }
13357
+ else if (!(Object.prototype.toString.call(argument) === '[object String]')) {
13358
+ return new Date(NaN);
13359
+ }
13360
+ const dateStrings = splitDateString(argument);
13361
+ const { year, restDateString } = parseYear(dateStrings.date, additionalDigits);
13362
+ const date = parseDate(restDateString, year);
13363
+ if (date === null || isNaN(date.getTime())) {
13364
+ return new Date(NaN);
13365
+ }
13366
+ if (date) {
13367
+ const timestamp = date.getTime();
13368
+ let time = 0;
13369
+ let offset;
13370
+ if (dateStrings.time) {
13371
+ time = parseTime(dateStrings.time);
13372
+ if (time === null || isNaN(time)) {
13373
+ return new Date(NaN);
13374
+ }
13375
+ }
13376
+ if (dateStrings.timeZone || options.timeZone) {
13377
+ offset = (0,_lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_1__.tzParseTimezone)(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));
13378
+ if (isNaN(offset)) {
13379
+ return new Date(NaN);
13380
+ }
13381
+ }
13382
+ else {
13383
+ // get offset accurate to hour in time zones that change offset
13384
+ offset = (0,_lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time));
13385
+ offset = (0,_lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time + offset));
13386
+ }
13387
+ return new Date(timestamp + time + offset);
13388
+ }
13389
+ else {
13390
+ return new Date(NaN);
13391
+ }
13392
+ }
13393
+ function splitDateString(dateString) {
13394
+ const dateStrings = {};
13395
+ let parts = patterns.dateTimePattern.exec(dateString);
13396
+ let timeString;
13397
+ if (!parts) {
13398
+ parts = patterns.datePattern.exec(dateString);
13399
+ if (parts) {
13400
+ dateStrings.date = parts[1];
13401
+ timeString = parts[2];
13402
+ }
13403
+ else {
13404
+ dateStrings.date = null;
13405
+ timeString = dateString;
13406
+ }
13407
+ }
13408
+ else {
13409
+ dateStrings.date = parts[1];
13410
+ timeString = parts[3];
13411
+ }
13412
+ if (timeString) {
13413
+ const token = patterns.timeZone.exec(timeString);
13414
+ if (token) {
13415
+ dateStrings.time = timeString.replace(token[1], '');
13416
+ dateStrings.timeZone = token[1].trim();
13417
+ }
13418
+ else {
13419
+ dateStrings.time = timeString;
13420
+ }
13421
+ }
13422
+ return dateStrings;
13423
+ }
13424
+ function parseYear(dateString, additionalDigits) {
13425
+ if (dateString) {
13426
+ const patternYYY = patterns.YYY[additionalDigits];
13427
+ const patternYYYYY = patterns.YYYYY[additionalDigits];
13428
+ // YYYY or ±YYYYY
13429
+ let token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);
13430
+ if (token) {
13431
+ const yearString = token[1];
13432
+ return {
13433
+ year: parseInt(yearString, 10),
13434
+ restDateString: dateString.slice(yearString.length),
13435
+ };
13436
+ }
13437
+ // YY or ±YYY
13438
+ token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);
13439
+ if (token) {
13440
+ const centuryString = token[1];
13441
+ return {
13442
+ year: parseInt(centuryString, 10) * 100,
13443
+ restDateString: dateString.slice(centuryString.length),
13444
+ };
13445
+ }
13446
+ }
13447
+ // Invalid ISO-formatted year
13448
+ return {
13449
+ year: null,
13450
+ };
13451
+ }
13452
+ function parseDate(dateString, year) {
13453
+ // Invalid ISO-formatted year
13454
+ if (year === null) {
13455
+ return null;
13456
+ }
13457
+ let date;
13458
+ let month;
13459
+ let week;
13460
+ // YYYY
13461
+ if (!dateString || !dateString.length) {
13462
+ date = new Date(0);
13463
+ date.setUTCFullYear(year);
13464
+ return date;
13465
+ }
13466
+ // YYYY-MM
13467
+ let token = patterns.MM.exec(dateString);
13468
+ if (token) {
13469
+ date = new Date(0);
13470
+ month = parseInt(token[1], 10) - 1;
13471
+ if (!validateDate(year, month)) {
13472
+ return new Date(NaN);
13473
+ }
13474
+ date.setUTCFullYear(year, month);
13475
+ return date;
13476
+ }
13477
+ // YYYY-DDD or YYYYDDD
13478
+ token = patterns.DDD.exec(dateString);
13479
+ if (token) {
13480
+ date = new Date(0);
13481
+ const dayOfYear = parseInt(token[1], 10);
13482
+ if (!validateDayOfYearDate(year, dayOfYear)) {
13483
+ return new Date(NaN);
13484
+ }
13485
+ date.setUTCFullYear(year, 0, dayOfYear);
13486
+ return date;
13487
+ }
13488
+ // yyyy-MM-dd or YYYYMMDD
13489
+ token = patterns.MMDD.exec(dateString);
13490
+ if (token) {
13491
+ date = new Date(0);
13492
+ month = parseInt(token[1], 10) - 1;
13493
+ const day = parseInt(token[2], 10);
13494
+ if (!validateDate(year, month, day)) {
13495
+ return new Date(NaN);
13496
+ }
13497
+ date.setUTCFullYear(year, month, day);
13498
+ return date;
13499
+ }
13500
+ // YYYY-Www or YYYYWww
13501
+ token = patterns.Www.exec(dateString);
13502
+ if (token) {
13503
+ week = parseInt(token[1], 10) - 1;
13504
+ if (!validateWeekDate(week)) {
13505
+ return new Date(NaN);
13506
+ }
13507
+ return dayOfISOWeekYear(year, week);
13508
+ }
13509
+ // YYYY-Www-D or YYYYWwwD
13510
+ token = patterns.WwwD.exec(dateString);
13511
+ if (token) {
13512
+ week = parseInt(token[1], 10) - 1;
13513
+ const dayOfWeek = parseInt(token[2], 10) - 1;
13514
+ if (!validateWeekDate(week, dayOfWeek)) {
13515
+ return new Date(NaN);
13516
+ }
13517
+ return dayOfISOWeekYear(year, week, dayOfWeek);
13518
+ }
13519
+ // Invalid ISO-formatted date
13520
+ return null;
13521
+ }
13522
+ function parseTime(timeString) {
13523
+ let hours;
13524
+ let minutes;
13525
+ // hh
13526
+ let token = patterns.HH.exec(timeString);
13527
+ if (token) {
13528
+ hours = parseFloat(token[1].replace(',', '.'));
13529
+ if (!validateTime(hours)) {
13530
+ return NaN;
13531
+ }
13532
+ return (hours % 24) * MILLISECONDS_IN_HOUR;
13533
+ }
13534
+ // hh:mm or hhmm
13535
+ token = patterns.HHMM.exec(timeString);
13536
+ if (token) {
13537
+ hours = parseInt(token[1], 10);
13538
+ minutes = parseFloat(token[2].replace(',', '.'));
13539
+ if (!validateTime(hours, minutes)) {
13540
+ return NaN;
13541
+ }
13542
+ return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;
13543
+ }
13544
+ // hh:mm:ss or hhmmss
13545
+ token = patterns.HHMMSS.exec(timeString);
13546
+ if (token) {
13547
+ hours = parseInt(token[1], 10);
13548
+ minutes = parseInt(token[2], 10);
13549
+ const seconds = parseFloat(token[3].replace(',', '.'));
13550
+ if (!validateTime(hours, minutes, seconds)) {
13551
+ return NaN;
13552
+ }
13553
+ return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;
13554
+ }
13555
+ // Invalid ISO-formatted time
13556
+ return null;
13557
+ }
13558
+ function dayOfISOWeekYear(isoWeekYear, week, day) {
13559
+ week = week || 0;
13560
+ day = day || 0;
13561
+ const date = new Date(0);
13562
+ date.setUTCFullYear(isoWeekYear, 0, 4);
13563
+ const fourthOfJanuaryDay = date.getUTCDay() || 7;
13564
+ const diff = week * 7 + day + 1 - fourthOfJanuaryDay;
13565
+ date.setUTCDate(date.getUTCDate() + diff);
13566
+ return date;
13567
+ }
13568
+ // Validation functions
13569
+ const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
13570
+ const DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
13571
+ function isLeapYearIndex(year) {
13572
+ return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);
13573
+ }
13574
+ function validateDate(year, month, date) {
13575
+ if (month < 0 || month > 11) {
13576
+ return false;
13577
+ }
13578
+ if (date != null) {
13579
+ if (date < 1) {
13580
+ return false;
13581
+ }
13582
+ const isLeapYear = isLeapYearIndex(year);
13583
+ if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {
13584
+ return false;
13585
+ }
13586
+ if (!isLeapYear && date > DAYS_IN_MONTH[month]) {
13587
+ return false;
13588
+ }
13589
+ }
13590
+ return true;
13591
+ }
13592
+ function validateDayOfYearDate(year, dayOfYear) {
13593
+ if (dayOfYear < 1) {
13594
+ return false;
13595
+ }
13596
+ const isLeapYear = isLeapYearIndex(year);
13597
+ if (isLeapYear && dayOfYear > 366) {
13598
+ return false;
13599
+ }
13600
+ if (!isLeapYear && dayOfYear > 365) {
13601
+ return false;
13602
+ }
13603
+ return true;
13604
+ }
13605
+ function validateWeekDate(week, day) {
13606
+ if (week < 0 || week > 52) {
13607
+ return false;
13608
+ }
13609
+ if (day != null && (day < 0 || day > 6)) {
13610
+ return false;
13611
+ }
13612
+ return true;
13613
+ }
13614
+ function validateTime(hours, minutes, seconds) {
13615
+ if (hours < 0 || hours >= 25) {
13616
+ return false;
13617
+ }
13618
+ if (minutes != null && (minutes < 0 || minutes >= 60)) {
13619
+ return false;
13620
+ }
13621
+ if (seconds != null && (seconds < 0 || seconds >= 60)) {
13622
+ return false;
13623
+ }
13624
+ return true;
13625
+ }
13626
+
13627
+
13628
+ /***/ }),
13629
+
13630
+ /***/ "./node_modules/date-fns-tz/dist/esm/toZonedTime/index.js":
13631
+ /*!****************************************************************!*\
13632
+ !*** ./node_modules/date-fns-tz/dist/esm/toZonedTime/index.js ***!
13633
+ \****************************************************************/
13634
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13635
+
13636
+ "use strict";
13637
+ __webpack_require__.r(__webpack_exports__);
13638
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13639
+ /* harmony export */ toZonedTime: () => (/* binding */ toZonedTime)
13640
+ /* harmony export */ });
13641
+ /* harmony import */ var _lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/tzParseTimezone/index.js */ "./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js");
13642
+ /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ "./node_modules/date-fns-tz/dist/esm/toDate/index.js");
13643
+
13644
+
13645
+ /**
13646
+ * @name toZonedTime
13647
+ * @category Time Zone Helpers
13648
+ * @summary Get a date/time representing local time in a given time zone from the UTC date
13649
+ *
13650
+ * @description
13651
+ * Returns a date instance with values representing the local time in the time zone
13652
+ * specified of the UTC time from the date provided. In other words, when the new date
13653
+ * is formatted it will show the equivalent hours in the target time zone regardless
13654
+ * of the current system time zone.
13655
+ *
13656
+ * @param date the date with the relevant UTC time
13657
+ * @param timeZone the time zone to get local time for, can be an offset or IANA time zone
13658
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
13659
+ * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
13660
+ *
13661
+ * @throws {TypeError} 2 arguments required
13662
+ * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
13663
+ *
13664
+ * @example
13665
+ * // In June 10am UTC is 6am in New York (-04:00)
13666
+ * const result = toZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')
13667
+ * //=> Jun 25 2014 06:00:00
13668
+ */
13669
+ function toZonedTime(date, timeZone, options) {
13670
+ date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.toDate)(date, options);
13671
+ const offsetMilliseconds = (0,_lib_tzParseTimezone_index_js__WEBPACK_IMPORTED_MODULE_0__.tzParseTimezone)(timeZone, date, true);
13672
+ const d = new Date(date.getTime() - offsetMilliseconds);
13673
+ const resultDate = new Date(0);
13674
+ resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
13675
+ resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());
13676
+ return resultDate;
13677
+ }
13678
+
13679
+
12156
13680
  /***/ }),
12157
13681
 
12158
13682
  /***/ "./node_modules/date-fns/_lib/addLeadingZeros.js":