indicator-ui 0.0.11 → 0.0.12
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.css +4 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +3759 -85
- package/dist/index.js.map +1 -1
- package/dist/scss/ui/InputFields/FlexField/styles/mixins/flexField.scss +1 -1
- package/dist/types/src/test/App.d.ts +2 -0
- package/dist/types/src/test/index.d.ts +1 -0
- package/dist/types/src/test/layout/PageLayout.d.ts +3 -0
- package/dist/types/src/test/layout/index.d.ts +1 -0
- package/dist/types/src/test/pages/ButtonsPage.d.ts +1 -0
- package/dist/types/src/test/pages/DatePickerPage.d.ts +1 -0
- package/dist/types/src/test/pages/FieldsPage.d.ts +1 -0
- package/dist/types/src/test/pages/FormBuilderPage.d.ts +1 -0
- package/dist/types/src/test/pages/HomePage.d.ts +1 -0
- package/dist/types/src/test/pages/MicroButtonsPage.d.ts +1 -0
- package/dist/types/src/test/pages/index.d.ts +5 -0
- package/dist/types/{ui → src/ui}/DatePicker/lib/index.d.ts +4 -2
- package/dist/types/{ui → src/ui}/DatePicker/types/DatePickerTypes.d.ts +4 -1
- package/dist/types/src/ui/DatePicker/ui/DatePicker.d.ts +2 -0
- package/dist/types/{ui → src/ui}/FormBuilder/schemes/index.d.ts +1 -1
- package/dist/types/{ui → src/ui}/FormBuilder/types/FormBuilderTypes.d.ts +1 -1
- package/dist/types/test-project/src/icons/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/ui/DatePicker/ui/DatePicker.d.ts +0 -2
- /package/dist/types/{assets → src/assets}/icons/index.d.ts +0 -0
- /package/dist/types/{assets → src/assets}/index.d.ts +0 -0
- /package/dist/types/{hooks → src/hooks}/index.d.ts +0 -0
- /package/dist/types/{hooks → src/hooks}/useFormData.d.ts +0 -0
- /package/dist/types/{hooks → src/hooks}/useIsErrorField.d.ts +0 -0
- /package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/types/{lib → src/lib}/array/getUniqueArray.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/array/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/array/isArray.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/array/isEqualArrays.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/dict/getDeepValue.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/dict/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/dict/isDict.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/dict/setDeepValue.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/reactComponents/handleScrollEnd.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/reactComponents/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/reactComponents/isCustomComponent.d.ts +0 -0
- /package/dist/types/{types → src/types}/DictDeepActionsTypes.d.ts +0 -0
- /package/dist/types/{types → src/types}/HelperType.d.ts +0 -0
- /package/dist/types/{types → src/types}/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/types/ButtonTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/ui/Button.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/Buttons/ui/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/const/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/CalendarDayTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/DateGridTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/DatePickerFooterTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/DatePickerHeaderTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/DatePickerMainTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/CalendarDay.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/DateGrid.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/DatePickerFooter.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/DatePickerHeader.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/DatePickerMain.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/DatePicker/ui/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/consts/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/arrayFieldComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/blockComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/blockWrapperComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/customFieldWrapperComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/formBuilder.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/formWrapperComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/inputFieldComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/lib/reactNodeComponent.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/ui/FormBuilder.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/FormBuilder/ui/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/FlexField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/FlexField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/FlexField/types/FlexFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/FlexField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/FlexField/ui/FlexField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputField/types/InputFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputField/ui/InputField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputFieldWrapper/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputFieldWrapper/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputFieldWrapper/types/InputFieldWrapperTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputFieldWrapper/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/InputFieldWrapper/ui/InputFieldWrapper.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/types/RadioFieldItemTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/types/RadioFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/ui/RadioField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/RadioField/ui/RadioFieldItem.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/config/ScrollConfig.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/config/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/lib/getStringValue.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/lib/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/lib/isActiveOption.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/types/SelectFieldOptionsItemTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/types/SelectFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/types/SelectModalWindowTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/ui/SelectField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/ui/SelectFieldOptionsItem.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SelectField/ui/SelectModalWindow.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SwitcherField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SwitcherField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SwitcherField/types/SwitcherFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SwitcherField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/SwitcherField/ui/SwitcherField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/TextareaField/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/TextareaField/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/TextareaField/types/TextareaFieldTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/TextareaField/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/TextareaField/ui/TextareaField.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/InputFields/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/styles/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/types/MicroButtonTypes.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/types/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/ui/MicroButton.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/MicroButton/ui/index.d.ts +0 -0
- /package/dist/types/{ui → src/ui}/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -6819,6 +6819,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6819
6819
|
/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/closestIndexTo.js");
|
|
6820
6820
|
/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/min.js");
|
|
6821
6821
|
/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/max.js");
|
|
6822
|
+
/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! date-fns */ "./node_modules/date-fns/parse.js");
|
|
6822
6823
|
/* harmony import */ var _const__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../const */ "./src/ui/DatePicker/const/index.ts");
|
|
6823
6824
|
|
|
6824
6825
|
|
|
@@ -6857,16 +6858,19 @@ const getNewInterval = (prevState, newDate) => {
|
|
|
6857
6858
|
return { start: newDate };
|
|
6858
6859
|
}
|
|
6859
6860
|
};
|
|
6860
|
-
const getInitChosenInterval = ({ start, end, multiple }) => {
|
|
6861
|
+
const getInitChosenInterval = ({ start, end, multiple, formatIn }) => {
|
|
6862
|
+
const formatStart = start ? (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.parse)(start, formatIn || 'yyyy-MM-dd', new Date()).toISOString() : undefined;
|
|
6863
|
+
const formatEnd = end ? (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.parse)(end, formatIn || 'yyyy-MM-dd', new Date()).toISOString() : undefined;
|
|
6861
6864
|
if (multiple) {
|
|
6862
|
-
return { start:
|
|
6865
|
+
return { start: formatStart, end: formatEnd };
|
|
6863
6866
|
}
|
|
6864
|
-
return { start:
|
|
6867
|
+
return { start: formatStart || formatEnd };
|
|
6865
6868
|
};
|
|
6866
|
-
const getInitTargetDate = ({ start, end }) => {
|
|
6869
|
+
const getInitTargetDate = ({ start, end, formatIn }) => {
|
|
6867
6870
|
const chosenDate = start || end;
|
|
6868
|
-
|
|
6869
|
-
|
|
6871
|
+
const formatDate = chosenDate ? (0,date_fns__WEBPACK_IMPORTED_MODULE_11__.parse)(chosenDate, formatIn || 'yyyy-MM-dd', new Date()).toISOString() : undefined;
|
|
6872
|
+
if (formatDate) {
|
|
6873
|
+
return formatDate;
|
|
6870
6874
|
}
|
|
6871
6875
|
return (new Date()).toISOString();
|
|
6872
6876
|
};
|
|
@@ -7134,12 +7138,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7134
7138
|
|
|
7135
7139
|
|
|
7136
7140
|
|
|
7137
|
-
function DatePicker({ chosenStart, chosenEnd, markFun, infoFun, onSubmit,
|
|
7138
|
-
const [targetDate, setTargetDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((0,_lib__WEBPACK_IMPORTED_MODULE_3__.getInitTargetDate)({
|
|
7141
|
+
function DatePicker({ chosenStart, chosenEnd, markFun, infoFun, onSubmit, formatOut, formatIn, onCancel, multiple = true }) {
|
|
7142
|
+
const [targetDate, setTargetDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((0,_lib__WEBPACK_IMPORTED_MODULE_3__.getInitTargetDate)({
|
|
7143
|
+
start: chosenStart,
|
|
7144
|
+
end: chosenEnd,
|
|
7145
|
+
formatIn: formatIn
|
|
7146
|
+
}));
|
|
7139
7147
|
const [chosenInterval, setChosenInterval] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((0,_lib__WEBPACK_IMPORTED_MODULE_3__.getInitChosenInterval)({
|
|
7140
7148
|
start: chosenStart,
|
|
7141
7149
|
end: chosenEnd,
|
|
7142
|
-
multiple: multiple
|
|
7150
|
+
multiple: multiple,
|
|
7151
|
+
formatIn: formatIn
|
|
7143
7152
|
}));
|
|
7144
7153
|
const onUpClick = () => {
|
|
7145
7154
|
setTargetDate(prevState => (0,date_fns__WEBPACK_IMPORTED_MODULE_7__.subMonths)(prevState, 1).toISOString());
|
|
@@ -7148,8 +7157,8 @@ function DatePicker({ chosenStart, chosenEnd, markFun, infoFun, onSubmit, format
|
|
|
7148
7157
|
setTargetDate(prevState => (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.addMonths)(prevState, 1).toISOString());
|
|
7149
7158
|
};
|
|
7150
7159
|
const handleSubmit = () => {
|
|
7151
|
-
const start = chosenInterval.start ? (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(chosenInterval.start,
|
|
7152
|
-
const end = chosenInterval.end ? (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(chosenInterval.end,
|
|
7160
|
+
const start = chosenInterval.start ? (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(chosenInterval.start, formatOut || 'yyyy-MM-dd') : undefined;
|
|
7161
|
+
const end = chosenInterval.end ? (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.format)(chosenInterval.end, formatOut || 'yyyy-MM-dd') : undefined;
|
|
7153
7162
|
onSubmit && onSubmit({ start: start, end: end });
|
|
7154
7163
|
};
|
|
7155
7164
|
const onClickDate = (date) => {
|
|
@@ -12158,6 +12167,106 @@ function getDayOfYear(date, options) {
|
|
|
12158
12167
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDayOfYear);
|
|
12159
12168
|
|
|
12160
12169
|
|
|
12170
|
+
/***/ }),
|
|
12171
|
+
|
|
12172
|
+
/***/ "./node_modules/date-fns/getDefaultOptions.js":
|
|
12173
|
+
/*!****************************************************!*\
|
|
12174
|
+
!*** ./node_modules/date-fns/getDefaultOptions.js ***!
|
|
12175
|
+
\****************************************************/
|
|
12176
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12177
|
+
|
|
12178
|
+
"use strict";
|
|
12179
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12180
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12181
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
12182
|
+
/* harmony export */ getDefaultOptions: () => (/* binding */ getDefaultOptions)
|
|
12183
|
+
/* harmony export */ });
|
|
12184
|
+
/* harmony import */ var _lib_defaultOptions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.js */ "./node_modules/date-fns/_lib/defaultOptions.js");
|
|
12185
|
+
|
|
12186
|
+
|
|
12187
|
+
/**
|
|
12188
|
+
* @name getDefaultOptions
|
|
12189
|
+
* @category Common Helpers
|
|
12190
|
+
* @summary Get default options.
|
|
12191
|
+
* @pure false
|
|
12192
|
+
*
|
|
12193
|
+
* @description
|
|
12194
|
+
* Returns an object that contains defaults for
|
|
12195
|
+
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
|
|
12196
|
+
* arguments for all functions.
|
|
12197
|
+
*
|
|
12198
|
+
* You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).
|
|
12199
|
+
*
|
|
12200
|
+
* @returns The default options
|
|
12201
|
+
*
|
|
12202
|
+
* @example
|
|
12203
|
+
* const result = getDefaultOptions()
|
|
12204
|
+
* //=> {}
|
|
12205
|
+
*
|
|
12206
|
+
* @example
|
|
12207
|
+
* setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })
|
|
12208
|
+
* const result = getDefaultOptions()
|
|
12209
|
+
* //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }
|
|
12210
|
+
*/
|
|
12211
|
+
function getDefaultOptions() {
|
|
12212
|
+
return Object.assign({}, (0,_lib_defaultOptions_js__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)());
|
|
12213
|
+
}
|
|
12214
|
+
|
|
12215
|
+
// Fallback for modularized imports:
|
|
12216
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDefaultOptions);
|
|
12217
|
+
|
|
12218
|
+
|
|
12219
|
+
/***/ }),
|
|
12220
|
+
|
|
12221
|
+
/***/ "./node_modules/date-fns/getISODay.js":
|
|
12222
|
+
/*!********************************************!*\
|
|
12223
|
+
!*** ./node_modules/date-fns/getISODay.js ***!
|
|
12224
|
+
\********************************************/
|
|
12225
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12226
|
+
|
|
12227
|
+
"use strict";
|
|
12228
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12229
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12230
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
12231
|
+
/* harmony export */ getISODay: () => (/* binding */ getISODay)
|
|
12232
|
+
/* harmony export */ });
|
|
12233
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
12234
|
+
|
|
12235
|
+
|
|
12236
|
+
/**
|
|
12237
|
+
* The {@link getISODay} function options.
|
|
12238
|
+
*/
|
|
12239
|
+
|
|
12240
|
+
/**
|
|
12241
|
+
* @name getISODay
|
|
12242
|
+
* @category Weekday Helpers
|
|
12243
|
+
* @summary Get the day of the ISO week of the given date.
|
|
12244
|
+
*
|
|
12245
|
+
* @description
|
|
12246
|
+
* Get the day of the ISO week of the given date,
|
|
12247
|
+
* which is 7 for Sunday, 1 for Monday etc.
|
|
12248
|
+
*
|
|
12249
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
12250
|
+
*
|
|
12251
|
+
* @param date - The given date
|
|
12252
|
+
* @param options - An object with options
|
|
12253
|
+
*
|
|
12254
|
+
* @returns The day of ISO week
|
|
12255
|
+
*
|
|
12256
|
+
* @example
|
|
12257
|
+
* // Which day of the ISO week is 26 February 2012?
|
|
12258
|
+
* const result = getISODay(new Date(2012, 1, 26))
|
|
12259
|
+
* //=> 7
|
|
12260
|
+
*/
|
|
12261
|
+
function getISODay(date, options) {
|
|
12262
|
+
const day = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in).getDay();
|
|
12263
|
+
return day === 0 ? 7 : day;
|
|
12264
|
+
}
|
|
12265
|
+
|
|
12266
|
+
// Fallback for modularized imports:
|
|
12267
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getISODay);
|
|
12268
|
+
|
|
12269
|
+
|
|
12161
12270
|
/***/ }),
|
|
12162
12271
|
|
|
12163
12272
|
/***/ "./node_modules/date-fns/getISOWeek.js":
|
|
@@ -14687,116 +14796,3611 @@ function min(dates, options) {
|
|
|
14687
14796
|
|
|
14688
14797
|
/***/ }),
|
|
14689
14798
|
|
|
14690
|
-
/***/ "./node_modules/date-fns/
|
|
14691
|
-
|
|
14692
|
-
!*** ./node_modules/date-fns/
|
|
14693
|
-
|
|
14799
|
+
/***/ "./node_modules/date-fns/parse.js":
|
|
14800
|
+
/*!****************************************!*\
|
|
14801
|
+
!*** ./node_modules/date-fns/parse.js ***!
|
|
14802
|
+
\****************************************/
|
|
14694
14803
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
14695
14804
|
|
|
14696
14805
|
"use strict";
|
|
14697
14806
|
__webpack_require__.r(__webpack_exports__);
|
|
14698
14807
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14699
14808
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
14700
|
-
/* harmony export */
|
|
14809
|
+
/* harmony export */ longFormatters: () => (/* reexport safe */ _lib_format_longFormatters_js__WEBPACK_IMPORTED_MODULE_0__.longFormatters),
|
|
14810
|
+
/* harmony export */ parse: () => (/* binding */ parse),
|
|
14811
|
+
/* harmony export */ parsers: () => (/* reexport safe */ _parse_lib_parsers_js__WEBPACK_IMPORTED_MODULE_1__.parsers)
|
|
14701
14812
|
/* harmony export */ });
|
|
14702
|
-
/* harmony import */ var
|
|
14813
|
+
/* harmony import */ var _lib_defaultLocale_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_lib/defaultLocale.js */ "./node_modules/date-fns/locale/en-US.js");
|
|
14814
|
+
/* harmony import */ var _lib_format_longFormatters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/format/longFormatters.js */ "./node_modules/date-fns/_lib/format/longFormatters.js");
|
|
14815
|
+
/* harmony import */ var _lib_protectedTokens_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./_lib/protectedTokens.js */ "./node_modules/date-fns/_lib/protectedTokens.js");
|
|
14816
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
14817
|
+
/* harmony import */ var _getDefaultOptions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getDefaultOptions.js */ "./node_modules/date-fns/getDefaultOptions.js");
|
|
14818
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
14819
|
+
/* harmony import */ var _parse_lib_Setter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parse/_lib/Setter.js */ "./node_modules/date-fns/parse/_lib/Setter.js");
|
|
14820
|
+
/* harmony import */ var _parse_lib_parsers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse/_lib/parsers.js */ "./node_modules/date-fns/parse/_lib/parsers.js");
|
|
14703
14821
|
|
|
14704
14822
|
|
|
14705
|
-
/**
|
|
14706
|
-
* The {@link startOfDay} function options.
|
|
14707
|
-
*/
|
|
14708
14823
|
|
|
14709
|
-
/**
|
|
14710
|
-
* @name startOfDay
|
|
14711
|
-
* @category Day Helpers
|
|
14712
|
-
* @summary Return the start of a day for the given date.
|
|
14713
|
-
*
|
|
14714
|
-
* @description
|
|
14715
|
-
* Return the start of a day for the given date.
|
|
14716
|
-
* The result will be in the local timezone.
|
|
14717
|
-
*
|
|
14718
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
14719
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
14720
|
-
*
|
|
14721
|
-
* @param date - The original date
|
|
14722
|
-
* @param options - The options
|
|
14723
|
-
*
|
|
14724
|
-
* @returns The start of a day
|
|
14725
|
-
*
|
|
14726
|
-
* @example
|
|
14727
|
-
* // The start of a day for 2 September 2014 11:55:00:
|
|
14728
|
-
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
14729
|
-
* //=> Tue Sep 02 2014 00:00:00
|
|
14730
|
-
*/
|
|
14731
|
-
function startOfDay(date, options) {
|
|
14732
|
-
const _date = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in);
|
|
14733
|
-
_date.setHours(0, 0, 0, 0);
|
|
14734
|
-
return _date;
|
|
14735
|
-
}
|
|
14736
14824
|
|
|
14737
|
-
// Fallback for modularized imports:
|
|
14738
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfDay);
|
|
14739
14825
|
|
|
14740
14826
|
|
|
14741
|
-
/***/ }),
|
|
14742
14827
|
|
|
14743
|
-
/***/ "./node_modules/date-fns/startOfISOWeek.js":
|
|
14744
|
-
/*!*************************************************!*\
|
|
14745
|
-
!*** ./node_modules/date-fns/startOfISOWeek.js ***!
|
|
14746
|
-
\*************************************************/
|
|
14747
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
14748
14828
|
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
/* harmony export */ startOfISOWeek: () => (/* binding */ startOfISOWeek)
|
|
14754
|
-
/* harmony export */ });
|
|
14755
|
-
/* harmony import */ var _startOfWeek_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./startOfWeek.js */ "./node_modules/date-fns/startOfWeek.js");
|
|
14829
|
+
|
|
14830
|
+
|
|
14831
|
+
// Rexports of internal for libraries to use.
|
|
14832
|
+
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
|
|
14756
14833
|
|
|
14757
14834
|
|
|
14758
14835
|
/**
|
|
14759
|
-
* The {@link
|
|
14836
|
+
* The {@link parse} function options.
|
|
14760
14837
|
*/
|
|
14761
14838
|
|
|
14839
|
+
// This RegExp consists of three parts separated by `|`:
|
|
14840
|
+
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
14841
|
+
// (one of the certain letters followed by `o`)
|
|
14842
|
+
// - (\w)\1* matches any sequences of the same letter
|
|
14843
|
+
// - '' matches two quote characters in a row
|
|
14844
|
+
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
|
|
14845
|
+
// except a single quote symbol, which ends the sequence.
|
|
14846
|
+
// Two quote characters do not end the sequence.
|
|
14847
|
+
// If there is no matching single quote
|
|
14848
|
+
// then the sequence will continue until the end of the string.
|
|
14849
|
+
// - . matches any single character unmatched by previous parts of the RegExps
|
|
14850
|
+
const formattingTokensRegExp =
|
|
14851
|
+
/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
14852
|
+
|
|
14853
|
+
// This RegExp catches symbols escaped by quotes, and also
|
|
14854
|
+
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
14855
|
+
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
14856
|
+
|
|
14857
|
+
const escapedStringRegExp = /^'([^]*?)'?$/;
|
|
14858
|
+
const doubleQuoteRegExp = /''/g;
|
|
14859
|
+
|
|
14860
|
+
const notWhitespaceRegExp = /\S/;
|
|
14861
|
+
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
14862
|
+
|
|
14762
14863
|
/**
|
|
14763
|
-
* @name
|
|
14764
|
-
* @category
|
|
14765
|
-
* @summary
|
|
14864
|
+
* @name parse
|
|
14865
|
+
* @category Common Helpers
|
|
14866
|
+
* @summary Parse the date.
|
|
14766
14867
|
*
|
|
14767
14868
|
* @description
|
|
14768
|
-
* Return the
|
|
14769
|
-
* The result will be in the local timezone.
|
|
14869
|
+
* Return the date parsed from string using the given format string.
|
|
14770
14870
|
*
|
|
14771
|
-
*
|
|
14871
|
+
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
|
|
14872
|
+
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
14873
|
+
*
|
|
14874
|
+
* The characters in the format string wrapped between two single quotes characters (') are escaped.
|
|
14875
|
+
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
|
|
14876
|
+
*
|
|
14877
|
+
* Format of the format string is based on Unicode Technical Standard #35:
|
|
14878
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
14879
|
+
* with a few additions (see note 5 below the table).
|
|
14880
|
+
*
|
|
14881
|
+
* Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
|
|
14882
|
+
* and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
|
|
14883
|
+
*
|
|
14884
|
+
* ```javascript
|
|
14885
|
+
* parse('23 AM', 'HH a', new Date())
|
|
14886
|
+
* //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
|
|
14887
|
+
* ```
|
|
14888
|
+
*
|
|
14889
|
+
* See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
|
|
14890
|
+
*
|
|
14891
|
+
* Accepted format string patterns:
|
|
14892
|
+
* | Unit |Prior| Pattern | Result examples | Notes |
|
|
14893
|
+
* |---------------------------------|-----|---------|-----------------------------------|-------|
|
|
14894
|
+
* | Era | 140 | G..GGG | AD, BC | |
|
|
14895
|
+
* | | | GGGG | Anno Domini, Before Christ | 2 |
|
|
14896
|
+
* | | | GGGGG | A, B | |
|
|
14897
|
+
* | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |
|
|
14898
|
+
* | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |
|
|
14899
|
+
* | | | yy | 44, 01, 00, 17 | 4 |
|
|
14900
|
+
* | | | yyy | 044, 001, 123, 999 | 4 |
|
|
14901
|
+
* | | | yyyy | 0044, 0001, 1900, 2017 | 4 |
|
|
14902
|
+
* | | | yyyyy | ... | 2,4 |
|
|
14903
|
+
* | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |
|
|
14904
|
+
* | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |
|
|
14905
|
+
* | | | YY | 44, 01, 00, 17 | 4,6 |
|
|
14906
|
+
* | | | YYY | 044, 001, 123, 999 | 4 |
|
|
14907
|
+
* | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |
|
|
14908
|
+
* | | | YYYYY | ... | 2,4 |
|
|
14909
|
+
* | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |
|
|
14910
|
+
* | | | RR | -43, 01, 00, 17 | 4,5 |
|
|
14911
|
+
* | | | RRR | -043, 001, 123, 999, -999 | 4,5 |
|
|
14912
|
+
* | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |
|
|
14913
|
+
* | | | RRRRR | ... | 2,4,5 |
|
|
14914
|
+
* | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |
|
|
14915
|
+
* | | | uu | -43, 01, 99, -99 | 4 |
|
|
14916
|
+
* | | | uuu | -043, 001, 123, 999, -999 | 4 |
|
|
14917
|
+
* | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |
|
|
14918
|
+
* | | | uuuuu | ... | 2,4 |
|
|
14919
|
+
* | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |
|
|
14920
|
+
* | | | Qo | 1st, 2nd, 3rd, 4th | 5 |
|
|
14921
|
+
* | | | QQ | 01, 02, 03, 04 | |
|
|
14922
|
+
* | | | QQQ | Q1, Q2, Q3, Q4 | |
|
|
14923
|
+
* | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
|
|
14924
|
+
* | | | QQQQQ | 1, 2, 3, 4 | 4 |
|
|
14925
|
+
* | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |
|
|
14926
|
+
* | | | qo | 1st, 2nd, 3rd, 4th | 5 |
|
|
14927
|
+
* | | | qq | 01, 02, 03, 04 | |
|
|
14928
|
+
* | | | qqq | Q1, Q2, Q3, Q4 | |
|
|
14929
|
+
* | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
|
|
14930
|
+
* | | | qqqqq | 1, 2, 3, 4 | 3 |
|
|
14931
|
+
* | Month (formatting) | 110 | M | 1, 2, ..., 12 | |
|
|
14932
|
+
* | | | Mo | 1st, 2nd, ..., 12th | 5 |
|
|
14933
|
+
* | | | MM | 01, 02, ..., 12 | |
|
|
14934
|
+
* | | | MMM | Jan, Feb, ..., Dec | |
|
|
14935
|
+
* | | | MMMM | January, February, ..., December | 2 |
|
|
14936
|
+
* | | | MMMMM | J, F, ..., D | |
|
|
14937
|
+
* | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |
|
|
14938
|
+
* | | | Lo | 1st, 2nd, ..., 12th | 5 |
|
|
14939
|
+
* | | | LL | 01, 02, ..., 12 | |
|
|
14940
|
+
* | | | LLL | Jan, Feb, ..., Dec | |
|
|
14941
|
+
* | | | LLLL | January, February, ..., December | 2 |
|
|
14942
|
+
* | | | LLLLL | J, F, ..., D | |
|
|
14943
|
+
* | Local week of year | 100 | w | 1, 2, ..., 53 | |
|
|
14944
|
+
* | | | wo | 1st, 2nd, ..., 53th | 5 |
|
|
14945
|
+
* | | | ww | 01, 02, ..., 53 | |
|
|
14946
|
+
* | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |
|
|
14947
|
+
* | | | Io | 1st, 2nd, ..., 53th | 5 |
|
|
14948
|
+
* | | | II | 01, 02, ..., 53 | 5 |
|
|
14949
|
+
* | Day of month | 90 | d | 1, 2, ..., 31 | |
|
|
14950
|
+
* | | | do | 1st, 2nd, ..., 31st | 5 |
|
|
14951
|
+
* | | | dd | 01, 02, ..., 31 | |
|
|
14952
|
+
* | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |
|
|
14953
|
+
* | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |
|
|
14954
|
+
* | | | DD | 01, 02, ..., 365, 366 | 7 |
|
|
14955
|
+
* | | | DDD | 001, 002, ..., 365, 366 | |
|
|
14956
|
+
* | | | DDDD | ... | 2 |
|
|
14957
|
+
* | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
14958
|
+
* | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
14959
|
+
* | | | EEEEE | M, T, W, T, F, S, S | |
|
|
14960
|
+
* | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
14961
|
+
* | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |
|
|
14962
|
+
* | | | io | 1st, 2nd, ..., 7th | 5 |
|
|
14963
|
+
* | | | ii | 01, 02, ..., 07 | 5 |
|
|
14964
|
+
* | | | iii | Mon, Tue, Wed, ..., Sun | 5 |
|
|
14965
|
+
* | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
|
|
14966
|
+
* | | | iiiii | M, T, W, T, F, S, S | 5 |
|
|
14967
|
+
* | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
|
|
14968
|
+
* | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
|
|
14969
|
+
* | | | eo | 2nd, 3rd, ..., 1st | 5 |
|
|
14970
|
+
* | | | ee | 02, 03, ..., 01 | |
|
|
14971
|
+
* | | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
14972
|
+
* | | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
14973
|
+
* | | | eeeee | M, T, W, T, F, S, S | |
|
|
14974
|
+
* | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
14975
|
+
* | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |
|
|
14976
|
+
* | | | co | 2nd, 3rd, ..., 1st | 5 |
|
|
14977
|
+
* | | | cc | 02, 03, ..., 01 | |
|
|
14978
|
+
* | | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
14979
|
+
* | | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
14980
|
+
* | | | ccccc | M, T, W, T, F, S, S | |
|
|
14981
|
+
* | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
14982
|
+
* | AM, PM | 80 | a..aaa | AM, PM | |
|
|
14983
|
+
* | | | aaaa | a.m., p.m. | 2 |
|
|
14984
|
+
* | | | aaaaa | a, p | |
|
|
14985
|
+
* | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |
|
|
14986
|
+
* | | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
14987
|
+
* | | | bbbbb | a, p, n, mi | |
|
|
14988
|
+
* | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |
|
|
14989
|
+
* | | | BBBB | at night, in the morning, ... | 2 |
|
|
14990
|
+
* | | | BBBBB | at night, in the morning, ... | |
|
|
14991
|
+
* | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |
|
|
14992
|
+
* | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |
|
|
14993
|
+
* | | | hh | 01, 02, ..., 11, 12 | |
|
|
14994
|
+
* | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |
|
|
14995
|
+
* | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |
|
|
14996
|
+
* | | | HH | 00, 01, 02, ..., 23 | |
|
|
14997
|
+
* | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |
|
|
14998
|
+
* | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |
|
|
14999
|
+
* | | | KK | 01, 02, ..., 11, 00 | |
|
|
15000
|
+
* | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |
|
|
15001
|
+
* | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |
|
|
15002
|
+
* | | | kk | 24, 01, 02, ..., 23 | |
|
|
15003
|
+
* | Minute | 60 | m | 0, 1, ..., 59 | |
|
|
15004
|
+
* | | | mo | 0th, 1st, ..., 59th | 5 |
|
|
15005
|
+
* | | | mm | 00, 01, ..., 59 | |
|
|
15006
|
+
* | Second | 50 | s | 0, 1, ..., 59 | |
|
|
15007
|
+
* | | | so | 0th, 1st, ..., 59th | 5 |
|
|
15008
|
+
* | | | ss | 00, 01, ..., 59 | |
|
|
15009
|
+
* | Seconds timestamp | 40 | t | 512969520 | |
|
|
15010
|
+
* | | | tt | ... | 2 |
|
|
15011
|
+
* | Fraction of second | 30 | S | 0, 1, ..., 9 | |
|
|
15012
|
+
* | | | SS | 00, 01, ..., 99 | |
|
|
15013
|
+
* | | | SSS | 000, 001, ..., 999 | |
|
|
15014
|
+
* | | | SSSS | ... | 2 |
|
|
15015
|
+
* | Milliseconds timestamp | 20 | T | 512969520900 | |
|
|
15016
|
+
* | | | TT | ... | 2 |
|
|
15017
|
+
* | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |
|
|
15018
|
+
* | | | XX | -0800, +0530, Z | |
|
|
15019
|
+
* | | | XXX | -08:00, +05:30, Z | |
|
|
15020
|
+
* | | | XXXX | -0800, +0530, Z, +123456 | 2 |
|
|
15021
|
+
* | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
|
|
15022
|
+
* | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |
|
|
15023
|
+
* | | | xx | -0800, +0530, +0000 | |
|
|
15024
|
+
* | | | xxx | -08:00, +05:30, +00:00 | 2 |
|
|
15025
|
+
* | | | xxxx | -0800, +0530, +0000, +123456 | |
|
|
15026
|
+
* | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
|
|
15027
|
+
* | Long localized date | NA | P | 05/29/1453 | 5,8 |
|
|
15028
|
+
* | | | PP | May 29, 1453 | |
|
|
15029
|
+
* | | | PPP | May 29th, 1453 | |
|
|
15030
|
+
* | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |
|
|
15031
|
+
* | Long localized time | NA | p | 12:00 AM | 5,8 |
|
|
15032
|
+
* | | | pp | 12:00:00 AM | |
|
|
15033
|
+
* | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |
|
|
15034
|
+
* | | | PPpp | May 29, 1453, 12:00:00 AM | |
|
|
15035
|
+
* | | | PPPpp | May 29th, 1453 at ... | |
|
|
15036
|
+
* | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |
|
|
15037
|
+
* Notes:
|
|
15038
|
+
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
15039
|
+
* are the same as "stand-alone" units, but are different in some languages.
|
|
15040
|
+
* "Formatting" units are declined according to the rules of the language
|
|
15041
|
+
* in the context of a date. "Stand-alone" units are always nominative singular.
|
|
15042
|
+
* In `format` function, they will produce different result:
|
|
15043
|
+
*
|
|
15044
|
+
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
|
|
15045
|
+
*
|
|
15046
|
+
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
|
|
15047
|
+
*
|
|
15048
|
+
* `parse` will try to match both formatting and stand-alone units interchangeably.
|
|
15049
|
+
*
|
|
15050
|
+
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
|
|
15051
|
+
* the single quote characters (see below).
|
|
15052
|
+
* If the sequence is longer than listed in table:
|
|
15053
|
+
* - for numerical units (`yyyyyyyy`) `parse` will try to match a number
|
|
15054
|
+
* as wide as the sequence
|
|
15055
|
+
* - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.
|
|
15056
|
+
* These variations are marked with "2" in the last column of the table.
|
|
15057
|
+
*
|
|
15058
|
+
* 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
|
|
15059
|
+
* These tokens represent the shortest form of the quarter.
|
|
15060
|
+
*
|
|
15061
|
+
* 4. The main difference between `y` and `u` patterns are B.C. years:
|
|
15062
|
+
*
|
|
15063
|
+
* | Year | `y` | `u` |
|
|
15064
|
+
* |------|-----|-----|
|
|
15065
|
+
* | AC 1 | 1 | 1 |
|
|
15066
|
+
* | BC 1 | 1 | 0 |
|
|
15067
|
+
* | BC 2 | 2 | -1 |
|
|
15068
|
+
*
|
|
15069
|
+
* Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:
|
|
15070
|
+
*
|
|
15071
|
+
* `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`
|
|
15072
|
+
*
|
|
15073
|
+
* `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`
|
|
15074
|
+
*
|
|
15075
|
+
* while `uu` will just assign the year as is:
|
|
15076
|
+
*
|
|
15077
|
+
* `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`
|
|
15078
|
+
*
|
|
15079
|
+
* `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`
|
|
15080
|
+
*
|
|
15081
|
+
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
15082
|
+
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
15083
|
+
* and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
|
|
15084
|
+
* and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
|
|
15085
|
+
*
|
|
15086
|
+
* 5. These patterns are not in the Unicode Technical Standard #35:
|
|
15087
|
+
* - `i`: ISO day of week
|
|
15088
|
+
* - `I`: ISO week of year
|
|
15089
|
+
* - `R`: ISO week-numbering year
|
|
15090
|
+
* - `o`: ordinal number modifier
|
|
15091
|
+
* - `P`: long localized date
|
|
15092
|
+
* - `p`: long localized time
|
|
15093
|
+
*
|
|
15094
|
+
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
|
|
15095
|
+
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15096
|
+
*
|
|
15097
|
+
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
|
|
15098
|
+
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15099
|
+
*
|
|
15100
|
+
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
|
|
15101
|
+
* on the given locale.
|
|
15102
|
+
*
|
|
15103
|
+
* using `en-US` locale: `P` => `MM/dd/yyyy`
|
|
15104
|
+
* using `en-US` locale: `p` => `hh:mm a`
|
|
15105
|
+
* using `pt-BR` locale: `P` => `dd/MM/yyyy`
|
|
15106
|
+
* using `pt-BR` locale: `p` => `HH:mm`
|
|
15107
|
+
*
|
|
15108
|
+
* Values will be assigned to the date in the descending order of its unit's priority.
|
|
15109
|
+
* Units of an equal priority overwrite each other in the order of appearance.
|
|
15110
|
+
*
|
|
15111
|
+
* If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),
|
|
15112
|
+
* the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.
|
|
15113
|
+
*
|
|
15114
|
+
* `referenceDate` must be passed for correct work of the function.
|
|
15115
|
+
* If you're not sure which `referenceDate` to supply, create a new instance of Date:
|
|
15116
|
+
* `parse('02/11/2014', 'MM/dd/yyyy', new Date())`
|
|
15117
|
+
* In this case parsing will be done in the context of the current date.
|
|
15118
|
+
* If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,
|
|
15119
|
+
* then `Invalid Date` will be returned.
|
|
15120
|
+
*
|
|
15121
|
+
* The result may vary by locale.
|
|
15122
|
+
*
|
|
15123
|
+
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
|
|
15124
|
+
*
|
|
15125
|
+
* If parsing failed, `Invalid Date` will be returned.
|
|
15126
|
+
* Invalid Date is a Date, whose time value is NaN.
|
|
15127
|
+
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
14772
15128
|
*
|
|
14773
15129
|
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
14774
15130
|
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
14775
15131
|
*
|
|
14776
|
-
* @param
|
|
14777
|
-
* @param
|
|
15132
|
+
* @param dateStr - The string to parse
|
|
15133
|
+
* @param formatStr - The string of tokens
|
|
15134
|
+
* @param referenceDate - defines values missing from the parsed dateString
|
|
15135
|
+
* @param options - An object with options.
|
|
15136
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15137
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
14778
15138
|
*
|
|
14779
|
-
* @returns The
|
|
15139
|
+
* @returns The parsed date
|
|
15140
|
+
*
|
|
15141
|
+
* @throws `options.locale` must contain `match` property
|
|
15142
|
+
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15143
|
+
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15144
|
+
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15145
|
+
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
15146
|
+
* @throws format string contains an unescaped latin alphabet character
|
|
14780
15147
|
*
|
|
14781
15148
|
* @example
|
|
14782
|
-
* //
|
|
14783
|
-
*
|
|
14784
|
-
* //=>
|
|
15149
|
+
* // Parse 11 February 2014 from middle-endian format:
|
|
15150
|
+
* var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())
|
|
15151
|
+
* //=> Tue Feb 11 2014 00:00:00
|
|
15152
|
+
*
|
|
15153
|
+
* @example
|
|
15154
|
+
* // Parse 28th of February in Esperanto locale in the context of 2010 year:
|
|
15155
|
+
* import eo from 'date-fns/locale/eo'
|
|
15156
|
+
* var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), {
|
|
15157
|
+
* locale: eo
|
|
15158
|
+
* })
|
|
15159
|
+
* //=> Sun Feb 28 2010 00:00:00
|
|
14785
15160
|
*/
|
|
14786
|
-
function
|
|
14787
|
-
|
|
14788
|
-
|
|
15161
|
+
function parse(dateStr, formatStr, referenceDate, options) {
|
|
15162
|
+
const invalidDate = () => (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(options?.in || referenceDate, NaN);
|
|
15163
|
+
const defaultOptions = (0,_getDefaultOptions_js__WEBPACK_IMPORTED_MODULE_3__.getDefaultOptions)();
|
|
15164
|
+
const locale = options?.locale ?? defaultOptions.locale ?? _lib_defaultLocale_js__WEBPACK_IMPORTED_MODULE_4__.enUS;
|
|
14789
15165
|
|
|
14790
|
-
|
|
14791
|
-
|
|
15166
|
+
const firstWeekContainsDate =
|
|
15167
|
+
options?.firstWeekContainsDate ??
|
|
15168
|
+
options?.locale?.options?.firstWeekContainsDate ??
|
|
15169
|
+
defaultOptions.firstWeekContainsDate ??
|
|
15170
|
+
defaultOptions.locale?.options?.firstWeekContainsDate ??
|
|
15171
|
+
1;
|
|
14792
15172
|
|
|
15173
|
+
const weekStartsOn =
|
|
15174
|
+
options?.weekStartsOn ??
|
|
15175
|
+
options?.locale?.options?.weekStartsOn ??
|
|
15176
|
+
defaultOptions.weekStartsOn ??
|
|
15177
|
+
defaultOptions.locale?.options?.weekStartsOn ??
|
|
15178
|
+
0;
|
|
14793
15179
|
|
|
14794
|
-
|
|
15180
|
+
if (!formatStr)
|
|
15181
|
+
return dateStr ? invalidDate() : (0,_toDate_js__WEBPACK_IMPORTED_MODULE_5__.toDate)(referenceDate, options?.in);
|
|
14795
15182
|
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
15183
|
+
const subFnOptions = {
|
|
15184
|
+
firstWeekContainsDate,
|
|
15185
|
+
weekStartsOn,
|
|
15186
|
+
locale,
|
|
15187
|
+
};
|
|
15188
|
+
|
|
15189
|
+
// If timezone isn't specified, it will try to use the context or
|
|
15190
|
+
// the reference date and fallback to the system time zone.
|
|
15191
|
+
const setters = [new _parse_lib_Setter_js__WEBPACK_IMPORTED_MODULE_6__.DateTimezoneSetter(options?.in, referenceDate)];
|
|
15192
|
+
|
|
15193
|
+
const tokens = formatStr
|
|
15194
|
+
.match(longFormattingTokensRegExp)
|
|
15195
|
+
.map((substring) => {
|
|
15196
|
+
const firstCharacter = substring[0];
|
|
15197
|
+
if (firstCharacter in _lib_format_longFormatters_js__WEBPACK_IMPORTED_MODULE_0__.longFormatters) {
|
|
15198
|
+
const longFormatter = _lib_format_longFormatters_js__WEBPACK_IMPORTED_MODULE_0__.longFormatters[firstCharacter];
|
|
15199
|
+
return longFormatter(substring, locale.formatLong);
|
|
15200
|
+
}
|
|
15201
|
+
return substring;
|
|
15202
|
+
})
|
|
15203
|
+
.join("")
|
|
15204
|
+
.match(formattingTokensRegExp);
|
|
15205
|
+
|
|
15206
|
+
const usedTokens = [];
|
|
15207
|
+
|
|
15208
|
+
for (let token of tokens) {
|
|
15209
|
+
if (
|
|
15210
|
+
!options?.useAdditionalWeekYearTokens &&
|
|
15211
|
+
(0,_lib_protectedTokens_js__WEBPACK_IMPORTED_MODULE_7__.isProtectedWeekYearToken)(token)
|
|
15212
|
+
) {
|
|
15213
|
+
(0,_lib_protectedTokens_js__WEBPACK_IMPORTED_MODULE_7__.warnOrThrowProtectedError)(token, formatStr, dateStr);
|
|
15214
|
+
}
|
|
15215
|
+
if (
|
|
15216
|
+
!options?.useAdditionalDayOfYearTokens &&
|
|
15217
|
+
(0,_lib_protectedTokens_js__WEBPACK_IMPORTED_MODULE_7__.isProtectedDayOfYearToken)(token)
|
|
15218
|
+
) {
|
|
15219
|
+
(0,_lib_protectedTokens_js__WEBPACK_IMPORTED_MODULE_7__.warnOrThrowProtectedError)(token, formatStr, dateStr);
|
|
15220
|
+
}
|
|
15221
|
+
|
|
15222
|
+
const firstCharacter = token[0];
|
|
15223
|
+
const parser = _parse_lib_parsers_js__WEBPACK_IMPORTED_MODULE_1__.parsers[firstCharacter];
|
|
15224
|
+
if (parser) {
|
|
15225
|
+
const { incompatibleTokens } = parser;
|
|
15226
|
+
if (Array.isArray(incompatibleTokens)) {
|
|
15227
|
+
const incompatibleToken = usedTokens.find(
|
|
15228
|
+
(usedToken) =>
|
|
15229
|
+
incompatibleTokens.includes(usedToken.token) ||
|
|
15230
|
+
usedToken.token === firstCharacter,
|
|
15231
|
+
);
|
|
15232
|
+
if (incompatibleToken) {
|
|
15233
|
+
throw new RangeError(
|
|
15234
|
+
`The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`,
|
|
15235
|
+
);
|
|
15236
|
+
}
|
|
15237
|
+
} else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) {
|
|
15238
|
+
throw new RangeError(
|
|
15239
|
+
`The format string mustn't contain \`${token}\` and any other token at the same time`,
|
|
15240
|
+
);
|
|
15241
|
+
}
|
|
15242
|
+
|
|
15243
|
+
usedTokens.push({ token: firstCharacter, fullToken: token });
|
|
15244
|
+
|
|
15245
|
+
const parseResult = parser.run(
|
|
15246
|
+
dateStr,
|
|
15247
|
+
token,
|
|
15248
|
+
locale.match,
|
|
15249
|
+
subFnOptions,
|
|
15250
|
+
);
|
|
15251
|
+
|
|
15252
|
+
if (!parseResult) {
|
|
15253
|
+
return invalidDate();
|
|
15254
|
+
}
|
|
15255
|
+
|
|
15256
|
+
setters.push(parseResult.setter);
|
|
15257
|
+
|
|
15258
|
+
dateStr = parseResult.rest;
|
|
15259
|
+
} else {
|
|
15260
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
15261
|
+
throw new RangeError(
|
|
15262
|
+
"Format string contains an unescaped latin alphabet character `" +
|
|
15263
|
+
firstCharacter +
|
|
15264
|
+
"`",
|
|
15265
|
+
);
|
|
15266
|
+
}
|
|
15267
|
+
|
|
15268
|
+
// Replace two single quote characters with one single quote character
|
|
15269
|
+
if (token === "''") {
|
|
15270
|
+
token = "'";
|
|
15271
|
+
} else if (firstCharacter === "'") {
|
|
15272
|
+
token = cleanEscapedString(token);
|
|
15273
|
+
}
|
|
15274
|
+
|
|
15275
|
+
// Cut token from string, or, if string doesn't match the token, return Invalid Date
|
|
15276
|
+
if (dateStr.indexOf(token) === 0) {
|
|
15277
|
+
dateStr = dateStr.slice(token.length);
|
|
15278
|
+
} else {
|
|
15279
|
+
return invalidDate();
|
|
15280
|
+
}
|
|
15281
|
+
}
|
|
15282
|
+
}
|
|
15283
|
+
|
|
15284
|
+
// Check if the remaining input contains something other than whitespace
|
|
15285
|
+
if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {
|
|
15286
|
+
return invalidDate();
|
|
15287
|
+
}
|
|
15288
|
+
|
|
15289
|
+
const uniquePrioritySetters = setters
|
|
15290
|
+
.map((setter) => setter.priority)
|
|
15291
|
+
.sort((a, b) => b - a)
|
|
15292
|
+
.filter((priority, index, array) => array.indexOf(priority) === index)
|
|
15293
|
+
.map((priority) =>
|
|
15294
|
+
setters
|
|
15295
|
+
.filter((setter) => setter.priority === priority)
|
|
15296
|
+
.sort((a, b) => b.subPriority - a.subPriority),
|
|
15297
|
+
)
|
|
15298
|
+
.map((setterArray) => setterArray[0]);
|
|
15299
|
+
|
|
15300
|
+
let date = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_5__.toDate)(referenceDate, options?.in);
|
|
15301
|
+
|
|
15302
|
+
if (isNaN(+date)) return invalidDate();
|
|
15303
|
+
|
|
15304
|
+
const flags = {};
|
|
15305
|
+
for (const setter of uniquePrioritySetters) {
|
|
15306
|
+
if (!setter.validate(date, subFnOptions)) {
|
|
15307
|
+
return invalidDate();
|
|
15308
|
+
}
|
|
15309
|
+
|
|
15310
|
+
const result = setter.set(date, flags, subFnOptions);
|
|
15311
|
+
// Result is tuple (date, flags)
|
|
15312
|
+
if (Array.isArray(result)) {
|
|
15313
|
+
date = result[0];
|
|
15314
|
+
Object.assign(flags, result[1]);
|
|
15315
|
+
// Result is date
|
|
15316
|
+
} else {
|
|
15317
|
+
date = result;
|
|
15318
|
+
}
|
|
15319
|
+
}
|
|
15320
|
+
|
|
15321
|
+
return date;
|
|
15322
|
+
}
|
|
15323
|
+
|
|
15324
|
+
function cleanEscapedString(input) {
|
|
15325
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
15326
|
+
}
|
|
15327
|
+
|
|
15328
|
+
// Fallback for modularized imports:
|
|
15329
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
|
|
15330
|
+
|
|
15331
|
+
|
|
15332
|
+
/***/ }),
|
|
15333
|
+
|
|
15334
|
+
/***/ "./node_modules/date-fns/parse/_lib/Parser.js":
|
|
15335
|
+
/*!****************************************************!*\
|
|
15336
|
+
!*** ./node_modules/date-fns/parse/_lib/Parser.js ***!
|
|
15337
|
+
\****************************************************/
|
|
15338
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15339
|
+
|
|
15340
|
+
"use strict";
|
|
15341
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15342
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15343
|
+
/* harmony export */ Parser: () => (/* binding */ Parser)
|
|
15344
|
+
/* harmony export */ });
|
|
15345
|
+
/* harmony import */ var _Setter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Setter.js */ "./node_modules/date-fns/parse/_lib/Setter.js");
|
|
15346
|
+
|
|
15347
|
+
|
|
15348
|
+
class Parser {
|
|
15349
|
+
run(dateString, token, match, options) {
|
|
15350
|
+
const result = this.parse(dateString, token, match, options);
|
|
15351
|
+
if (!result) {
|
|
15352
|
+
return null;
|
|
15353
|
+
}
|
|
15354
|
+
|
|
15355
|
+
return {
|
|
15356
|
+
setter: new _Setter_js__WEBPACK_IMPORTED_MODULE_0__.ValueSetter(
|
|
15357
|
+
result.value,
|
|
15358
|
+
this.validate,
|
|
15359
|
+
this.set,
|
|
15360
|
+
this.priority,
|
|
15361
|
+
this.subPriority,
|
|
15362
|
+
),
|
|
15363
|
+
rest: result.rest,
|
|
15364
|
+
};
|
|
15365
|
+
}
|
|
15366
|
+
|
|
15367
|
+
validate(_utcDate, _value, _options) {
|
|
15368
|
+
return true;
|
|
15369
|
+
}
|
|
15370
|
+
}
|
|
15371
|
+
|
|
15372
|
+
|
|
15373
|
+
/***/ }),
|
|
15374
|
+
|
|
15375
|
+
/***/ "./node_modules/date-fns/parse/_lib/Setter.js":
|
|
15376
|
+
/*!****************************************************!*\
|
|
15377
|
+
!*** ./node_modules/date-fns/parse/_lib/Setter.js ***!
|
|
15378
|
+
\****************************************************/
|
|
15379
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15380
|
+
|
|
15381
|
+
"use strict";
|
|
15382
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15383
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15384
|
+
/* harmony export */ DateTimezoneSetter: () => (/* binding */ DateTimezoneSetter),
|
|
15385
|
+
/* harmony export */ Setter: () => (/* binding */ Setter),
|
|
15386
|
+
/* harmony export */ ValueSetter: () => (/* binding */ ValueSetter)
|
|
15387
|
+
/* harmony export */ });
|
|
15388
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
15389
|
+
/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../transpose.js */ "./node_modules/date-fns/transpose.js");
|
|
15390
|
+
|
|
15391
|
+
|
|
15392
|
+
|
|
15393
|
+
const TIMEZONE_UNIT_PRIORITY = 10;
|
|
15394
|
+
|
|
15395
|
+
class Setter {
|
|
15396
|
+
subPriority = 0;
|
|
15397
|
+
|
|
15398
|
+
validate(_utcDate, _options) {
|
|
15399
|
+
return true;
|
|
15400
|
+
}
|
|
15401
|
+
}
|
|
15402
|
+
|
|
15403
|
+
class ValueSetter extends Setter {
|
|
15404
|
+
constructor(
|
|
15405
|
+
value,
|
|
15406
|
+
|
|
15407
|
+
validateValue,
|
|
15408
|
+
|
|
15409
|
+
setValue,
|
|
15410
|
+
|
|
15411
|
+
priority,
|
|
15412
|
+
subPriority,
|
|
15413
|
+
) {
|
|
15414
|
+
super();
|
|
15415
|
+
this.value = value;
|
|
15416
|
+
this.validateValue = validateValue;
|
|
15417
|
+
this.setValue = setValue;
|
|
15418
|
+
this.priority = priority;
|
|
15419
|
+
if (subPriority) {
|
|
15420
|
+
this.subPriority = subPriority;
|
|
15421
|
+
}
|
|
15422
|
+
}
|
|
15423
|
+
|
|
15424
|
+
validate(date, options) {
|
|
15425
|
+
return this.validateValue(date, this.value, options);
|
|
15426
|
+
}
|
|
15427
|
+
|
|
15428
|
+
set(date, flags, options) {
|
|
15429
|
+
return this.setValue(date, flags, this.value, options);
|
|
15430
|
+
}
|
|
15431
|
+
}
|
|
15432
|
+
|
|
15433
|
+
class DateTimezoneSetter extends Setter {
|
|
15434
|
+
priority = TIMEZONE_UNIT_PRIORITY;
|
|
15435
|
+
subPriority = -1;
|
|
15436
|
+
|
|
15437
|
+
constructor(context, reference) {
|
|
15438
|
+
super();
|
|
15439
|
+
this.context = context || ((date) => (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_0__.constructFrom)(reference, date));
|
|
15440
|
+
}
|
|
15441
|
+
|
|
15442
|
+
set(date, flags) {
|
|
15443
|
+
if (flags.timestampIsSet) return date;
|
|
15444
|
+
return (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_0__.constructFrom)(date, (0,_transpose_js__WEBPACK_IMPORTED_MODULE_1__.transpose)(date, this.context));
|
|
15445
|
+
}
|
|
15446
|
+
}
|
|
15447
|
+
|
|
15448
|
+
|
|
15449
|
+
/***/ }),
|
|
15450
|
+
|
|
15451
|
+
/***/ "./node_modules/date-fns/parse/_lib/constants.js":
|
|
15452
|
+
/*!*******************************************************!*\
|
|
15453
|
+
!*** ./node_modules/date-fns/parse/_lib/constants.js ***!
|
|
15454
|
+
\*******************************************************/
|
|
15455
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15456
|
+
|
|
15457
|
+
"use strict";
|
|
15458
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15459
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15460
|
+
/* harmony export */ numericPatterns: () => (/* binding */ numericPatterns),
|
|
15461
|
+
/* harmony export */ timezonePatterns: () => (/* binding */ timezonePatterns)
|
|
15462
|
+
/* harmony export */ });
|
|
15463
|
+
const numericPatterns = {
|
|
15464
|
+
month: /^(1[0-2]|0?\d)/, // 0 to 12
|
|
15465
|
+
date: /^(3[0-1]|[0-2]?\d)/, // 0 to 31
|
|
15466
|
+
dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, // 0 to 366
|
|
15467
|
+
week: /^(5[0-3]|[0-4]?\d)/, // 0 to 53
|
|
15468
|
+
hour23h: /^(2[0-3]|[0-1]?\d)/, // 0 to 23
|
|
15469
|
+
hour24h: /^(2[0-4]|[0-1]?\d)/, // 0 to 24
|
|
15470
|
+
hour11h: /^(1[0-1]|0?\d)/, // 0 to 11
|
|
15471
|
+
hour12h: /^(1[0-2]|0?\d)/, // 0 to 12
|
|
15472
|
+
minute: /^[0-5]?\d/, // 0 to 59
|
|
15473
|
+
second: /^[0-5]?\d/, // 0 to 59
|
|
15474
|
+
|
|
15475
|
+
singleDigit: /^\d/, // 0 to 9
|
|
15476
|
+
twoDigits: /^\d{1,2}/, // 0 to 99
|
|
15477
|
+
threeDigits: /^\d{1,3}/, // 0 to 999
|
|
15478
|
+
fourDigits: /^\d{1,4}/, // 0 to 9999
|
|
15479
|
+
|
|
15480
|
+
anyDigitsSigned: /^-?\d+/,
|
|
15481
|
+
singleDigitSigned: /^-?\d/, // 0 to 9, -0 to -9
|
|
15482
|
+
twoDigitsSigned: /^-?\d{1,2}/, // 0 to 99, -0 to -99
|
|
15483
|
+
threeDigitsSigned: /^-?\d{1,3}/, // 0 to 999, -0 to -999
|
|
15484
|
+
fourDigitsSigned: /^-?\d{1,4}/, // 0 to 9999, -0 to -9999
|
|
15485
|
+
};
|
|
15486
|
+
|
|
15487
|
+
const timezonePatterns = {
|
|
15488
|
+
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
15489
|
+
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
15490
|
+
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
15491
|
+
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
15492
|
+
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/,
|
|
15493
|
+
};
|
|
15494
|
+
|
|
15495
|
+
|
|
15496
|
+
/***/ }),
|
|
15497
|
+
|
|
15498
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers.js":
|
|
15499
|
+
/*!*****************************************************!*\
|
|
15500
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers.js ***!
|
|
15501
|
+
\*****************************************************/
|
|
15502
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15503
|
+
|
|
15504
|
+
"use strict";
|
|
15505
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15506
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15507
|
+
/* harmony export */ parsers: () => (/* binding */ parsers)
|
|
15508
|
+
/* harmony export */ });
|
|
15509
|
+
/* harmony import */ var _parsers_EraParser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parsers/EraParser.js */ "./node_modules/date-fns/parse/_lib/parsers/EraParser.js");
|
|
15510
|
+
/* harmony import */ var _parsers_YearParser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parsers/YearParser.js */ "./node_modules/date-fns/parse/_lib/parsers/YearParser.js");
|
|
15511
|
+
/* harmony import */ var _parsers_LocalWeekYearParser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parsers/LocalWeekYearParser.js */ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js");
|
|
15512
|
+
/* harmony import */ var _parsers_ISOWeekYearParser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parsers/ISOWeekYearParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js");
|
|
15513
|
+
/* harmony import */ var _parsers_ExtendedYearParser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./parsers/ExtendedYearParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js");
|
|
15514
|
+
/* harmony import */ var _parsers_QuarterParser_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parsers/QuarterParser.js */ "./node_modules/date-fns/parse/_lib/parsers/QuarterParser.js");
|
|
15515
|
+
/* harmony import */ var _parsers_StandAloneQuarterParser_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parsers/StandAloneQuarterParser.js */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js");
|
|
15516
|
+
/* harmony import */ var _parsers_MonthParser_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./parsers/MonthParser.js */ "./node_modules/date-fns/parse/_lib/parsers/MonthParser.js");
|
|
15517
|
+
/* harmony import */ var _parsers_StandAloneMonthParser_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./parsers/StandAloneMonthParser.js */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js");
|
|
15518
|
+
/* harmony import */ var _parsers_LocalWeekParser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./parsers/LocalWeekParser.js */ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js");
|
|
15519
|
+
/* harmony import */ var _parsers_ISOWeekParser_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./parsers/ISOWeekParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js");
|
|
15520
|
+
/* harmony import */ var _parsers_DateParser_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./parsers/DateParser.js */ "./node_modules/date-fns/parse/_lib/parsers/DateParser.js");
|
|
15521
|
+
/* harmony import */ var _parsers_DayOfYearParser_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./parsers/DayOfYearParser.js */ "./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js");
|
|
15522
|
+
/* harmony import */ var _parsers_DayParser_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./parsers/DayParser.js */ "./node_modules/date-fns/parse/_lib/parsers/DayParser.js");
|
|
15523
|
+
/* harmony import */ var _parsers_LocalDayParser_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./parsers/LocalDayParser.js */ "./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js");
|
|
15524
|
+
/* harmony import */ var _parsers_StandAloneLocalDayParser_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./parsers/StandAloneLocalDayParser.js */ "./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js");
|
|
15525
|
+
/* harmony import */ var _parsers_ISODayParser_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./parsers/ISODayParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ISODayParser.js");
|
|
15526
|
+
/* harmony import */ var _parsers_AMPMParser_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./parsers/AMPMParser.js */ "./node_modules/date-fns/parse/_lib/parsers/AMPMParser.js");
|
|
15527
|
+
/* harmony import */ var _parsers_AMPMMidnightParser_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./parsers/AMPMMidnightParser.js */ "./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js");
|
|
15528
|
+
/* harmony import */ var _parsers_DayPeriodParser_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./parsers/DayPeriodParser.js */ "./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js");
|
|
15529
|
+
/* harmony import */ var _parsers_Hour1to12Parser_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./parsers/Hour1to12Parser.js */ "./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js");
|
|
15530
|
+
/* harmony import */ var _parsers_Hour0to23Parser_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./parsers/Hour0to23Parser.js */ "./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js");
|
|
15531
|
+
/* harmony import */ var _parsers_Hour0To11Parser_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./parsers/Hour0To11Parser.js */ "./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js");
|
|
15532
|
+
/* harmony import */ var _parsers_Hour1To24Parser_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./parsers/Hour1To24Parser.js */ "./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js");
|
|
15533
|
+
/* harmony import */ var _parsers_MinuteParser_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./parsers/MinuteParser.js */ "./node_modules/date-fns/parse/_lib/parsers/MinuteParser.js");
|
|
15534
|
+
/* harmony import */ var _parsers_SecondParser_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./parsers/SecondParser.js */ "./node_modules/date-fns/parse/_lib/parsers/SecondParser.js");
|
|
15535
|
+
/* harmony import */ var _parsers_FractionOfSecondParser_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./parsers/FractionOfSecondParser.js */ "./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js");
|
|
15536
|
+
/* harmony import */ var _parsers_ISOTimezoneWithZParser_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./parsers/ISOTimezoneWithZParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js");
|
|
15537
|
+
/* harmony import */ var _parsers_ISOTimezoneParser_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./parsers/ISOTimezoneParser.js */ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js");
|
|
15538
|
+
/* harmony import */ var _parsers_TimestampSecondsParser_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./parsers/TimestampSecondsParser.js */ "./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js");
|
|
15539
|
+
/* harmony import */ var _parsers_TimestampMillisecondsParser_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./parsers/TimestampMillisecondsParser.js */ "./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js");
|
|
15540
|
+
|
|
15541
|
+
|
|
15542
|
+
|
|
15543
|
+
|
|
15544
|
+
|
|
15545
|
+
|
|
15546
|
+
|
|
15547
|
+
|
|
15548
|
+
|
|
15549
|
+
|
|
15550
|
+
|
|
15551
|
+
|
|
15552
|
+
|
|
15553
|
+
|
|
15554
|
+
|
|
15555
|
+
|
|
15556
|
+
|
|
15557
|
+
|
|
15558
|
+
|
|
15559
|
+
|
|
15560
|
+
|
|
15561
|
+
|
|
15562
|
+
|
|
15563
|
+
|
|
15564
|
+
|
|
15565
|
+
|
|
15566
|
+
|
|
15567
|
+
|
|
15568
|
+
|
|
15569
|
+
|
|
15570
|
+
|
|
15571
|
+
|
|
15572
|
+
/*
|
|
15573
|
+
* | | Unit | | Unit |
|
|
15574
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
15575
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
15576
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
15577
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
15578
|
+
* | d | Day of month | D | Day of year |
|
|
15579
|
+
* | e | Local day of week | E | Day of week |
|
|
15580
|
+
* | f | | F* | Day of week in month |
|
|
15581
|
+
* | g* | Modified Julian day | G | Era |
|
|
15582
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
15583
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
15584
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
15585
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
15586
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
15587
|
+
* | m | Minute | M | Month |
|
|
15588
|
+
* | n | | N | |
|
|
15589
|
+
* | o! | Ordinal number modifier | O* | Timezone (GMT) |
|
|
15590
|
+
* | p | | P | |
|
|
15591
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
15592
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
15593
|
+
* | s | Second | S | Fraction of second |
|
|
15594
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
15595
|
+
* | u | Extended year | U* | Cyclic year |
|
|
15596
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
15597
|
+
* | w | Local week of year | W* | Week of month |
|
|
15598
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
15599
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
15600
|
+
* | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
15601
|
+
*
|
|
15602
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
15603
|
+
*
|
|
15604
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
15605
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)
|
|
15606
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
15607
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
15608
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
15609
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
15610
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
15611
|
+
* for universal ISO week-numbering date, whereas
|
|
15612
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
15613
|
+
* for week-numbering date specific to the locale.
|
|
15614
|
+
*/
|
|
15615
|
+
const parsers = {
|
|
15616
|
+
G: new _parsers_EraParser_js__WEBPACK_IMPORTED_MODULE_0__.EraParser(),
|
|
15617
|
+
y: new _parsers_YearParser_js__WEBPACK_IMPORTED_MODULE_1__.YearParser(),
|
|
15618
|
+
Y: new _parsers_LocalWeekYearParser_js__WEBPACK_IMPORTED_MODULE_2__.LocalWeekYearParser(),
|
|
15619
|
+
R: new _parsers_ISOWeekYearParser_js__WEBPACK_IMPORTED_MODULE_3__.ISOWeekYearParser(),
|
|
15620
|
+
u: new _parsers_ExtendedYearParser_js__WEBPACK_IMPORTED_MODULE_4__.ExtendedYearParser(),
|
|
15621
|
+
Q: new _parsers_QuarterParser_js__WEBPACK_IMPORTED_MODULE_5__.QuarterParser(),
|
|
15622
|
+
q: new _parsers_StandAloneQuarterParser_js__WEBPACK_IMPORTED_MODULE_6__.StandAloneQuarterParser(),
|
|
15623
|
+
M: new _parsers_MonthParser_js__WEBPACK_IMPORTED_MODULE_7__.MonthParser(),
|
|
15624
|
+
L: new _parsers_StandAloneMonthParser_js__WEBPACK_IMPORTED_MODULE_8__.StandAloneMonthParser(),
|
|
15625
|
+
w: new _parsers_LocalWeekParser_js__WEBPACK_IMPORTED_MODULE_9__.LocalWeekParser(),
|
|
15626
|
+
I: new _parsers_ISOWeekParser_js__WEBPACK_IMPORTED_MODULE_10__.ISOWeekParser(),
|
|
15627
|
+
d: new _parsers_DateParser_js__WEBPACK_IMPORTED_MODULE_11__.DateParser(),
|
|
15628
|
+
D: new _parsers_DayOfYearParser_js__WEBPACK_IMPORTED_MODULE_12__.DayOfYearParser(),
|
|
15629
|
+
E: new _parsers_DayParser_js__WEBPACK_IMPORTED_MODULE_13__.DayParser(),
|
|
15630
|
+
e: new _parsers_LocalDayParser_js__WEBPACK_IMPORTED_MODULE_14__.LocalDayParser(),
|
|
15631
|
+
c: new _parsers_StandAloneLocalDayParser_js__WEBPACK_IMPORTED_MODULE_15__.StandAloneLocalDayParser(),
|
|
15632
|
+
i: new _parsers_ISODayParser_js__WEBPACK_IMPORTED_MODULE_16__.ISODayParser(),
|
|
15633
|
+
a: new _parsers_AMPMParser_js__WEBPACK_IMPORTED_MODULE_17__.AMPMParser(),
|
|
15634
|
+
b: new _parsers_AMPMMidnightParser_js__WEBPACK_IMPORTED_MODULE_18__.AMPMMidnightParser(),
|
|
15635
|
+
B: new _parsers_DayPeriodParser_js__WEBPACK_IMPORTED_MODULE_19__.DayPeriodParser(),
|
|
15636
|
+
h: new _parsers_Hour1to12Parser_js__WEBPACK_IMPORTED_MODULE_20__.Hour1to12Parser(),
|
|
15637
|
+
H: new _parsers_Hour0to23Parser_js__WEBPACK_IMPORTED_MODULE_21__.Hour0to23Parser(),
|
|
15638
|
+
K: new _parsers_Hour0To11Parser_js__WEBPACK_IMPORTED_MODULE_22__.Hour0To11Parser(),
|
|
15639
|
+
k: new _parsers_Hour1To24Parser_js__WEBPACK_IMPORTED_MODULE_23__.Hour1To24Parser(),
|
|
15640
|
+
m: new _parsers_MinuteParser_js__WEBPACK_IMPORTED_MODULE_24__.MinuteParser(),
|
|
15641
|
+
s: new _parsers_SecondParser_js__WEBPACK_IMPORTED_MODULE_25__.SecondParser(),
|
|
15642
|
+
S: new _parsers_FractionOfSecondParser_js__WEBPACK_IMPORTED_MODULE_26__.FractionOfSecondParser(),
|
|
15643
|
+
X: new _parsers_ISOTimezoneWithZParser_js__WEBPACK_IMPORTED_MODULE_27__.ISOTimezoneWithZParser(),
|
|
15644
|
+
x: new _parsers_ISOTimezoneParser_js__WEBPACK_IMPORTED_MODULE_28__.ISOTimezoneParser(),
|
|
15645
|
+
t: new _parsers_TimestampSecondsParser_js__WEBPACK_IMPORTED_MODULE_29__.TimestampSecondsParser(),
|
|
15646
|
+
T: new _parsers_TimestampMillisecondsParser_js__WEBPACK_IMPORTED_MODULE_30__.TimestampMillisecondsParser(),
|
|
15647
|
+
};
|
|
15648
|
+
|
|
15649
|
+
|
|
15650
|
+
/***/ }),
|
|
15651
|
+
|
|
15652
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js":
|
|
15653
|
+
/*!************************************************************************!*\
|
|
15654
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js ***!
|
|
15655
|
+
\************************************************************************/
|
|
15656
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15657
|
+
|
|
15658
|
+
"use strict";
|
|
15659
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15660
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15661
|
+
/* harmony export */ AMPMMidnightParser: () => (/* binding */ AMPMMidnightParser)
|
|
15662
|
+
/* harmony export */ });
|
|
15663
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
15664
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
15665
|
+
|
|
15666
|
+
|
|
15667
|
+
|
|
15668
|
+
|
|
15669
|
+
class AMPMMidnightParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
15670
|
+
priority = 80;
|
|
15671
|
+
|
|
15672
|
+
parse(dateString, token, match) {
|
|
15673
|
+
switch (token) {
|
|
15674
|
+
case "b":
|
|
15675
|
+
case "bb":
|
|
15676
|
+
case "bbb":
|
|
15677
|
+
return (
|
|
15678
|
+
match.dayPeriod(dateString, {
|
|
15679
|
+
width: "abbreviated",
|
|
15680
|
+
context: "formatting",
|
|
15681
|
+
}) ||
|
|
15682
|
+
match.dayPeriod(dateString, {
|
|
15683
|
+
width: "narrow",
|
|
15684
|
+
context: "formatting",
|
|
15685
|
+
})
|
|
15686
|
+
);
|
|
15687
|
+
|
|
15688
|
+
case "bbbbb":
|
|
15689
|
+
return match.dayPeriod(dateString, {
|
|
15690
|
+
width: "narrow",
|
|
15691
|
+
context: "formatting",
|
|
15692
|
+
});
|
|
15693
|
+
case "bbbb":
|
|
15694
|
+
default:
|
|
15695
|
+
return (
|
|
15696
|
+
match.dayPeriod(dateString, {
|
|
15697
|
+
width: "wide",
|
|
15698
|
+
context: "formatting",
|
|
15699
|
+
}) ||
|
|
15700
|
+
match.dayPeriod(dateString, {
|
|
15701
|
+
width: "abbreviated",
|
|
15702
|
+
context: "formatting",
|
|
15703
|
+
}) ||
|
|
15704
|
+
match.dayPeriod(dateString, {
|
|
15705
|
+
width: "narrow",
|
|
15706
|
+
context: "formatting",
|
|
15707
|
+
})
|
|
15708
|
+
);
|
|
15709
|
+
}
|
|
15710
|
+
}
|
|
15711
|
+
|
|
15712
|
+
set(date, _flags, value) {
|
|
15713
|
+
date.setHours((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0);
|
|
15714
|
+
return date;
|
|
15715
|
+
}
|
|
15716
|
+
|
|
15717
|
+
incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
|
|
15718
|
+
}
|
|
15719
|
+
|
|
15720
|
+
|
|
15721
|
+
/***/ }),
|
|
15722
|
+
|
|
15723
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/AMPMParser.js":
|
|
15724
|
+
/*!****************************************************************!*\
|
|
15725
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/AMPMParser.js ***!
|
|
15726
|
+
\****************************************************************/
|
|
15727
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15728
|
+
|
|
15729
|
+
"use strict";
|
|
15730
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15731
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15732
|
+
/* harmony export */ AMPMParser: () => (/* binding */ AMPMParser)
|
|
15733
|
+
/* harmony export */ });
|
|
15734
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
15735
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
15736
|
+
|
|
15737
|
+
|
|
15738
|
+
|
|
15739
|
+
|
|
15740
|
+
class AMPMParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
15741
|
+
priority = 80;
|
|
15742
|
+
|
|
15743
|
+
parse(dateString, token, match) {
|
|
15744
|
+
switch (token) {
|
|
15745
|
+
case "a":
|
|
15746
|
+
case "aa":
|
|
15747
|
+
case "aaa":
|
|
15748
|
+
return (
|
|
15749
|
+
match.dayPeriod(dateString, {
|
|
15750
|
+
width: "abbreviated",
|
|
15751
|
+
context: "formatting",
|
|
15752
|
+
}) ||
|
|
15753
|
+
match.dayPeriod(dateString, {
|
|
15754
|
+
width: "narrow",
|
|
15755
|
+
context: "formatting",
|
|
15756
|
+
})
|
|
15757
|
+
);
|
|
15758
|
+
|
|
15759
|
+
case "aaaaa":
|
|
15760
|
+
return match.dayPeriod(dateString, {
|
|
15761
|
+
width: "narrow",
|
|
15762
|
+
context: "formatting",
|
|
15763
|
+
});
|
|
15764
|
+
case "aaaa":
|
|
15765
|
+
default:
|
|
15766
|
+
return (
|
|
15767
|
+
match.dayPeriod(dateString, {
|
|
15768
|
+
width: "wide",
|
|
15769
|
+
context: "formatting",
|
|
15770
|
+
}) ||
|
|
15771
|
+
match.dayPeriod(dateString, {
|
|
15772
|
+
width: "abbreviated",
|
|
15773
|
+
context: "formatting",
|
|
15774
|
+
}) ||
|
|
15775
|
+
match.dayPeriod(dateString, {
|
|
15776
|
+
width: "narrow",
|
|
15777
|
+
context: "formatting",
|
|
15778
|
+
})
|
|
15779
|
+
);
|
|
15780
|
+
}
|
|
15781
|
+
}
|
|
15782
|
+
|
|
15783
|
+
set(date, _flags, value) {
|
|
15784
|
+
date.setHours((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0);
|
|
15785
|
+
return date;
|
|
15786
|
+
}
|
|
15787
|
+
|
|
15788
|
+
incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
|
|
15789
|
+
}
|
|
15790
|
+
|
|
15791
|
+
|
|
15792
|
+
/***/ }),
|
|
15793
|
+
|
|
15794
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/DateParser.js":
|
|
15795
|
+
/*!****************************************************************!*\
|
|
15796
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/DateParser.js ***!
|
|
15797
|
+
\****************************************************************/
|
|
15798
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15799
|
+
|
|
15800
|
+
"use strict";
|
|
15801
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15802
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15803
|
+
/* harmony export */ DateParser: () => (/* binding */ DateParser)
|
|
15804
|
+
/* harmony export */ });
|
|
15805
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
15806
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
15807
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
15808
|
+
|
|
15809
|
+
|
|
15810
|
+
|
|
15811
|
+
|
|
15812
|
+
|
|
15813
|
+
const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
15814
|
+
const DAYS_IN_MONTH_LEAP_YEAR = [
|
|
15815
|
+
31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,
|
|
15816
|
+
];
|
|
15817
|
+
|
|
15818
|
+
// Day of the month
|
|
15819
|
+
class DateParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
15820
|
+
priority = 90;
|
|
15821
|
+
subPriority = 1;
|
|
15822
|
+
|
|
15823
|
+
parse(dateString, token, match) {
|
|
15824
|
+
switch (token) {
|
|
15825
|
+
case "d":
|
|
15826
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.date, dateString);
|
|
15827
|
+
case "do":
|
|
15828
|
+
return match.ordinalNumber(dateString, { unit: "date" });
|
|
15829
|
+
default:
|
|
15830
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
15831
|
+
}
|
|
15832
|
+
}
|
|
15833
|
+
|
|
15834
|
+
validate(date, value) {
|
|
15835
|
+
const year = date.getFullYear();
|
|
15836
|
+
const isLeapYear = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isLeapYearIndex)(year);
|
|
15837
|
+
const month = date.getMonth();
|
|
15838
|
+
if (isLeapYear) {
|
|
15839
|
+
return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];
|
|
15840
|
+
} else {
|
|
15841
|
+
return value >= 1 && value <= DAYS_IN_MONTH[month];
|
|
15842
|
+
}
|
|
15843
|
+
}
|
|
15844
|
+
|
|
15845
|
+
set(date, _flags, value) {
|
|
15846
|
+
date.setDate(value);
|
|
15847
|
+
date.setHours(0, 0, 0, 0);
|
|
15848
|
+
return date;
|
|
15849
|
+
}
|
|
15850
|
+
|
|
15851
|
+
incompatibleTokens = [
|
|
15852
|
+
"Y",
|
|
15853
|
+
"R",
|
|
15854
|
+
"q",
|
|
15855
|
+
"Q",
|
|
15856
|
+
"w",
|
|
15857
|
+
"I",
|
|
15858
|
+
"D",
|
|
15859
|
+
"i",
|
|
15860
|
+
"e",
|
|
15861
|
+
"c",
|
|
15862
|
+
"t",
|
|
15863
|
+
"T",
|
|
15864
|
+
];
|
|
15865
|
+
}
|
|
15866
|
+
|
|
15867
|
+
|
|
15868
|
+
/***/ }),
|
|
15869
|
+
|
|
15870
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js":
|
|
15871
|
+
/*!*********************************************************************!*\
|
|
15872
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js ***!
|
|
15873
|
+
\*********************************************************************/
|
|
15874
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15875
|
+
|
|
15876
|
+
"use strict";
|
|
15877
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15878
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15879
|
+
/* harmony export */ DayOfYearParser: () => (/* binding */ DayOfYearParser)
|
|
15880
|
+
/* harmony export */ });
|
|
15881
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
15882
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
15883
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
15884
|
+
|
|
15885
|
+
|
|
15886
|
+
|
|
15887
|
+
|
|
15888
|
+
|
|
15889
|
+
class DayOfYearParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
15890
|
+
priority = 90;
|
|
15891
|
+
|
|
15892
|
+
subpriority = 1;
|
|
15893
|
+
|
|
15894
|
+
parse(dateString, token, match) {
|
|
15895
|
+
switch (token) {
|
|
15896
|
+
case "D":
|
|
15897
|
+
case "DD":
|
|
15898
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.dayOfYear, dateString);
|
|
15899
|
+
case "Do":
|
|
15900
|
+
return match.ordinalNumber(dateString, { unit: "date" });
|
|
15901
|
+
default:
|
|
15902
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
15903
|
+
}
|
|
15904
|
+
}
|
|
15905
|
+
|
|
15906
|
+
validate(date, value) {
|
|
15907
|
+
const year = date.getFullYear();
|
|
15908
|
+
const isLeapYear = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isLeapYearIndex)(year);
|
|
15909
|
+
if (isLeapYear) {
|
|
15910
|
+
return value >= 1 && value <= 366;
|
|
15911
|
+
} else {
|
|
15912
|
+
return value >= 1 && value <= 365;
|
|
15913
|
+
}
|
|
15914
|
+
}
|
|
15915
|
+
|
|
15916
|
+
set(date, _flags, value) {
|
|
15917
|
+
date.setMonth(0, value);
|
|
15918
|
+
date.setHours(0, 0, 0, 0);
|
|
15919
|
+
return date;
|
|
15920
|
+
}
|
|
15921
|
+
|
|
15922
|
+
incompatibleTokens = [
|
|
15923
|
+
"Y",
|
|
15924
|
+
"R",
|
|
15925
|
+
"q",
|
|
15926
|
+
"Q",
|
|
15927
|
+
"M",
|
|
15928
|
+
"L",
|
|
15929
|
+
"w",
|
|
15930
|
+
"I",
|
|
15931
|
+
"d",
|
|
15932
|
+
"E",
|
|
15933
|
+
"i",
|
|
15934
|
+
"e",
|
|
15935
|
+
"c",
|
|
15936
|
+
"t",
|
|
15937
|
+
"T",
|
|
15938
|
+
];
|
|
15939
|
+
}
|
|
15940
|
+
|
|
15941
|
+
|
|
15942
|
+
/***/ }),
|
|
15943
|
+
|
|
15944
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/DayParser.js":
|
|
15945
|
+
/*!***************************************************************!*\
|
|
15946
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/DayParser.js ***!
|
|
15947
|
+
\***************************************************************/
|
|
15948
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15949
|
+
|
|
15950
|
+
"use strict";
|
|
15951
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15952
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15953
|
+
/* harmony export */ DayParser: () => (/* binding */ DayParser)
|
|
15954
|
+
/* harmony export */ });
|
|
15955
|
+
/* harmony import */ var _setDay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../setDay.js */ "./node_modules/date-fns/setDay.js");
|
|
15956
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
15957
|
+
|
|
15958
|
+
|
|
15959
|
+
|
|
15960
|
+
// Day of week
|
|
15961
|
+
class DayParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
15962
|
+
priority = 90;
|
|
15963
|
+
|
|
15964
|
+
parse(dateString, token, match) {
|
|
15965
|
+
switch (token) {
|
|
15966
|
+
// Tue
|
|
15967
|
+
case "E":
|
|
15968
|
+
case "EE":
|
|
15969
|
+
case "EEE":
|
|
15970
|
+
return (
|
|
15971
|
+
match.day(dateString, {
|
|
15972
|
+
width: "abbreviated",
|
|
15973
|
+
context: "formatting",
|
|
15974
|
+
}) ||
|
|
15975
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
15976
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
15977
|
+
);
|
|
15978
|
+
|
|
15979
|
+
// T
|
|
15980
|
+
case "EEEEE":
|
|
15981
|
+
return match.day(dateString, {
|
|
15982
|
+
width: "narrow",
|
|
15983
|
+
context: "formatting",
|
|
15984
|
+
});
|
|
15985
|
+
// Tu
|
|
15986
|
+
case "EEEEEE":
|
|
15987
|
+
return (
|
|
15988
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
15989
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
15990
|
+
);
|
|
15991
|
+
|
|
15992
|
+
// Tuesday
|
|
15993
|
+
case "EEEE":
|
|
15994
|
+
default:
|
|
15995
|
+
return (
|
|
15996
|
+
match.day(dateString, { width: "wide", context: "formatting" }) ||
|
|
15997
|
+
match.day(dateString, {
|
|
15998
|
+
width: "abbreviated",
|
|
15999
|
+
context: "formatting",
|
|
16000
|
+
}) ||
|
|
16001
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
16002
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
16003
|
+
);
|
|
16004
|
+
}
|
|
16005
|
+
}
|
|
16006
|
+
|
|
16007
|
+
validate(_date, value) {
|
|
16008
|
+
return value >= 0 && value <= 6;
|
|
16009
|
+
}
|
|
16010
|
+
|
|
16011
|
+
set(date, _flags, value, options) {
|
|
16012
|
+
date = (0,_setDay_js__WEBPACK_IMPORTED_MODULE_1__.setDay)(date, value, options);
|
|
16013
|
+
date.setHours(0, 0, 0, 0);
|
|
16014
|
+
return date;
|
|
16015
|
+
}
|
|
16016
|
+
|
|
16017
|
+
incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
|
|
16018
|
+
}
|
|
16019
|
+
|
|
16020
|
+
|
|
16021
|
+
/***/ }),
|
|
16022
|
+
|
|
16023
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js":
|
|
16024
|
+
/*!*********************************************************************!*\
|
|
16025
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js ***!
|
|
16026
|
+
\*********************************************************************/
|
|
16027
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16028
|
+
|
|
16029
|
+
"use strict";
|
|
16030
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16031
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16032
|
+
/* harmony export */ DayPeriodParser: () => (/* binding */ DayPeriodParser)
|
|
16033
|
+
/* harmony export */ });
|
|
16034
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16035
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16036
|
+
|
|
16037
|
+
|
|
16038
|
+
|
|
16039
|
+
|
|
16040
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
16041
|
+
class DayPeriodParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16042
|
+
priority = 80;
|
|
16043
|
+
|
|
16044
|
+
parse(dateString, token, match) {
|
|
16045
|
+
switch (token) {
|
|
16046
|
+
case "B":
|
|
16047
|
+
case "BB":
|
|
16048
|
+
case "BBB":
|
|
16049
|
+
return (
|
|
16050
|
+
match.dayPeriod(dateString, {
|
|
16051
|
+
width: "abbreviated",
|
|
16052
|
+
context: "formatting",
|
|
16053
|
+
}) ||
|
|
16054
|
+
match.dayPeriod(dateString, {
|
|
16055
|
+
width: "narrow",
|
|
16056
|
+
context: "formatting",
|
|
16057
|
+
})
|
|
16058
|
+
);
|
|
16059
|
+
|
|
16060
|
+
case "BBBBB":
|
|
16061
|
+
return match.dayPeriod(dateString, {
|
|
16062
|
+
width: "narrow",
|
|
16063
|
+
context: "formatting",
|
|
16064
|
+
});
|
|
16065
|
+
case "BBBB":
|
|
16066
|
+
default:
|
|
16067
|
+
return (
|
|
16068
|
+
match.dayPeriod(dateString, {
|
|
16069
|
+
width: "wide",
|
|
16070
|
+
context: "formatting",
|
|
16071
|
+
}) ||
|
|
16072
|
+
match.dayPeriod(dateString, {
|
|
16073
|
+
width: "abbreviated",
|
|
16074
|
+
context: "formatting",
|
|
16075
|
+
}) ||
|
|
16076
|
+
match.dayPeriod(dateString, {
|
|
16077
|
+
width: "narrow",
|
|
16078
|
+
context: "formatting",
|
|
16079
|
+
})
|
|
16080
|
+
);
|
|
16081
|
+
}
|
|
16082
|
+
}
|
|
16083
|
+
|
|
16084
|
+
set(date, _flags, value) {
|
|
16085
|
+
date.setHours((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.dayPeriodEnumToHours)(value), 0, 0, 0);
|
|
16086
|
+
return date;
|
|
16087
|
+
}
|
|
16088
|
+
|
|
16089
|
+
incompatibleTokens = ["a", "b", "t", "T"];
|
|
16090
|
+
}
|
|
16091
|
+
|
|
16092
|
+
|
|
16093
|
+
/***/ }),
|
|
16094
|
+
|
|
16095
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/EraParser.js":
|
|
16096
|
+
/*!***************************************************************!*\
|
|
16097
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/EraParser.js ***!
|
|
16098
|
+
\***************************************************************/
|
|
16099
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16100
|
+
|
|
16101
|
+
"use strict";
|
|
16102
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16103
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16104
|
+
/* harmony export */ EraParser: () => (/* binding */ EraParser)
|
|
16105
|
+
/* harmony export */ });
|
|
16106
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16107
|
+
|
|
16108
|
+
|
|
16109
|
+
class EraParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16110
|
+
priority = 140;
|
|
16111
|
+
|
|
16112
|
+
parse(dateString, token, match) {
|
|
16113
|
+
switch (token) {
|
|
16114
|
+
// AD, BC
|
|
16115
|
+
case "G":
|
|
16116
|
+
case "GG":
|
|
16117
|
+
case "GGG":
|
|
16118
|
+
return (
|
|
16119
|
+
match.era(dateString, { width: "abbreviated" }) ||
|
|
16120
|
+
match.era(dateString, { width: "narrow" })
|
|
16121
|
+
);
|
|
16122
|
+
|
|
16123
|
+
// A, B
|
|
16124
|
+
case "GGGGG":
|
|
16125
|
+
return match.era(dateString, { width: "narrow" });
|
|
16126
|
+
// Anno Domini, Before Christ
|
|
16127
|
+
case "GGGG":
|
|
16128
|
+
default:
|
|
16129
|
+
return (
|
|
16130
|
+
match.era(dateString, { width: "wide" }) ||
|
|
16131
|
+
match.era(dateString, { width: "abbreviated" }) ||
|
|
16132
|
+
match.era(dateString, { width: "narrow" })
|
|
16133
|
+
);
|
|
16134
|
+
}
|
|
16135
|
+
}
|
|
16136
|
+
|
|
16137
|
+
set(date, flags, value) {
|
|
16138
|
+
flags.era = value;
|
|
16139
|
+
date.setFullYear(value, 0, 1);
|
|
16140
|
+
date.setHours(0, 0, 0, 0);
|
|
16141
|
+
return date;
|
|
16142
|
+
}
|
|
16143
|
+
|
|
16144
|
+
incompatibleTokens = ["R", "u", "t", "T"];
|
|
16145
|
+
}
|
|
16146
|
+
|
|
16147
|
+
|
|
16148
|
+
/***/ }),
|
|
16149
|
+
|
|
16150
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js":
|
|
16151
|
+
/*!************************************************************************!*\
|
|
16152
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js ***!
|
|
16153
|
+
\************************************************************************/
|
|
16154
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16155
|
+
|
|
16156
|
+
"use strict";
|
|
16157
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16158
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16159
|
+
/* harmony export */ ExtendedYearParser: () => (/* binding */ ExtendedYearParser)
|
|
16160
|
+
/* harmony export */ });
|
|
16161
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16162
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16163
|
+
|
|
16164
|
+
|
|
16165
|
+
|
|
16166
|
+
|
|
16167
|
+
class ExtendedYearParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16168
|
+
priority = 130;
|
|
16169
|
+
|
|
16170
|
+
parse(dateString, token) {
|
|
16171
|
+
if (token === "u") {
|
|
16172
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(4, dateString);
|
|
16173
|
+
}
|
|
16174
|
+
|
|
16175
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(token.length, dateString);
|
|
16176
|
+
}
|
|
16177
|
+
|
|
16178
|
+
set(date, _flags, value) {
|
|
16179
|
+
date.setFullYear(value, 0, 1);
|
|
16180
|
+
date.setHours(0, 0, 0, 0);
|
|
16181
|
+
return date;
|
|
16182
|
+
}
|
|
16183
|
+
|
|
16184
|
+
incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
|
|
16185
|
+
}
|
|
16186
|
+
|
|
16187
|
+
|
|
16188
|
+
/***/ }),
|
|
16189
|
+
|
|
16190
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js":
|
|
16191
|
+
/*!****************************************************************************!*\
|
|
16192
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js ***!
|
|
16193
|
+
\****************************************************************************/
|
|
16194
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16195
|
+
|
|
16196
|
+
"use strict";
|
|
16197
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16198
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16199
|
+
/* harmony export */ FractionOfSecondParser: () => (/* binding */ FractionOfSecondParser)
|
|
16200
|
+
/* harmony export */ });
|
|
16201
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16202
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16203
|
+
|
|
16204
|
+
|
|
16205
|
+
|
|
16206
|
+
|
|
16207
|
+
class FractionOfSecondParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16208
|
+
priority = 30;
|
|
16209
|
+
|
|
16210
|
+
parse(dateString, token) {
|
|
16211
|
+
const valueCallback = (value) =>
|
|
16212
|
+
Math.trunc(value * Math.pow(10, -token.length + 3));
|
|
16213
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback);
|
|
16214
|
+
}
|
|
16215
|
+
|
|
16216
|
+
set(date, _flags, value) {
|
|
16217
|
+
date.setMilliseconds(value);
|
|
16218
|
+
return date;
|
|
16219
|
+
}
|
|
16220
|
+
|
|
16221
|
+
incompatibleTokens = ["t", "T"];
|
|
16222
|
+
}
|
|
16223
|
+
|
|
16224
|
+
|
|
16225
|
+
/***/ }),
|
|
16226
|
+
|
|
16227
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js":
|
|
16228
|
+
/*!*********************************************************************!*\
|
|
16229
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js ***!
|
|
16230
|
+
\*********************************************************************/
|
|
16231
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16232
|
+
|
|
16233
|
+
"use strict";
|
|
16234
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16235
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16236
|
+
/* harmony export */ Hour0To11Parser: () => (/* binding */ Hour0To11Parser)
|
|
16237
|
+
/* harmony export */ });
|
|
16238
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16239
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16240
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16241
|
+
|
|
16242
|
+
|
|
16243
|
+
|
|
16244
|
+
|
|
16245
|
+
|
|
16246
|
+
class Hour0To11Parser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16247
|
+
priority = 70;
|
|
16248
|
+
|
|
16249
|
+
parse(dateString, token, match) {
|
|
16250
|
+
switch (token) {
|
|
16251
|
+
case "K":
|
|
16252
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour11h, dateString);
|
|
16253
|
+
case "Ko":
|
|
16254
|
+
return match.ordinalNumber(dateString, { unit: "hour" });
|
|
16255
|
+
default:
|
|
16256
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16257
|
+
}
|
|
16258
|
+
}
|
|
16259
|
+
|
|
16260
|
+
validate(_date, value) {
|
|
16261
|
+
return value >= 0 && value <= 11;
|
|
16262
|
+
}
|
|
16263
|
+
|
|
16264
|
+
set(date, _flags, value) {
|
|
16265
|
+
const isPM = date.getHours() >= 12;
|
|
16266
|
+
if (isPM && value < 12) {
|
|
16267
|
+
date.setHours(value + 12, 0, 0, 0);
|
|
16268
|
+
} else {
|
|
16269
|
+
date.setHours(value, 0, 0, 0);
|
|
16270
|
+
}
|
|
16271
|
+
return date;
|
|
16272
|
+
}
|
|
16273
|
+
|
|
16274
|
+
incompatibleTokens = ["h", "H", "k", "t", "T"];
|
|
16275
|
+
}
|
|
16276
|
+
|
|
16277
|
+
|
|
16278
|
+
/***/ }),
|
|
16279
|
+
|
|
16280
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js":
|
|
16281
|
+
/*!*********************************************************************!*\
|
|
16282
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js ***!
|
|
16283
|
+
\*********************************************************************/
|
|
16284
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16285
|
+
|
|
16286
|
+
"use strict";
|
|
16287
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16288
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16289
|
+
/* harmony export */ Hour0to23Parser: () => (/* binding */ Hour0to23Parser)
|
|
16290
|
+
/* harmony export */ });
|
|
16291
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16292
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16293
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16294
|
+
|
|
16295
|
+
|
|
16296
|
+
|
|
16297
|
+
|
|
16298
|
+
|
|
16299
|
+
class Hour0to23Parser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16300
|
+
priority = 70;
|
|
16301
|
+
|
|
16302
|
+
parse(dateString, token, match) {
|
|
16303
|
+
switch (token) {
|
|
16304
|
+
case "H":
|
|
16305
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour23h, dateString);
|
|
16306
|
+
case "Ho":
|
|
16307
|
+
return match.ordinalNumber(dateString, { unit: "hour" });
|
|
16308
|
+
default:
|
|
16309
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16310
|
+
}
|
|
16311
|
+
}
|
|
16312
|
+
|
|
16313
|
+
validate(_date, value) {
|
|
16314
|
+
return value >= 0 && value <= 23;
|
|
16315
|
+
}
|
|
16316
|
+
|
|
16317
|
+
set(date, _flags, value) {
|
|
16318
|
+
date.setHours(value, 0, 0, 0);
|
|
16319
|
+
return date;
|
|
16320
|
+
}
|
|
16321
|
+
|
|
16322
|
+
incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
|
|
16323
|
+
}
|
|
16324
|
+
|
|
16325
|
+
|
|
16326
|
+
/***/ }),
|
|
16327
|
+
|
|
16328
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js":
|
|
16329
|
+
/*!*********************************************************************!*\
|
|
16330
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js ***!
|
|
16331
|
+
\*********************************************************************/
|
|
16332
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16333
|
+
|
|
16334
|
+
"use strict";
|
|
16335
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16336
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16337
|
+
/* harmony export */ Hour1To24Parser: () => (/* binding */ Hour1To24Parser)
|
|
16338
|
+
/* harmony export */ });
|
|
16339
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16340
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16341
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16342
|
+
|
|
16343
|
+
|
|
16344
|
+
|
|
16345
|
+
|
|
16346
|
+
|
|
16347
|
+
class Hour1To24Parser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16348
|
+
priority = 70;
|
|
16349
|
+
|
|
16350
|
+
parse(dateString, token, match) {
|
|
16351
|
+
switch (token) {
|
|
16352
|
+
case "k":
|
|
16353
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour24h, dateString);
|
|
16354
|
+
case "ko":
|
|
16355
|
+
return match.ordinalNumber(dateString, { unit: "hour" });
|
|
16356
|
+
default:
|
|
16357
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16358
|
+
}
|
|
16359
|
+
}
|
|
16360
|
+
|
|
16361
|
+
validate(_date, value) {
|
|
16362
|
+
return value >= 1 && value <= 24;
|
|
16363
|
+
}
|
|
16364
|
+
|
|
16365
|
+
set(date, _flags, value) {
|
|
16366
|
+
const hours = value <= 24 ? value % 24 : value;
|
|
16367
|
+
date.setHours(hours, 0, 0, 0);
|
|
16368
|
+
return date;
|
|
16369
|
+
}
|
|
16370
|
+
|
|
16371
|
+
incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
|
|
16372
|
+
}
|
|
16373
|
+
|
|
16374
|
+
|
|
16375
|
+
/***/ }),
|
|
16376
|
+
|
|
16377
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js":
|
|
16378
|
+
/*!*********************************************************************!*\
|
|
16379
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js ***!
|
|
16380
|
+
\*********************************************************************/
|
|
16381
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16382
|
+
|
|
16383
|
+
"use strict";
|
|
16384
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16385
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16386
|
+
/* harmony export */ Hour1to12Parser: () => (/* binding */ Hour1to12Parser)
|
|
16387
|
+
/* harmony export */ });
|
|
16388
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16389
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16390
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16391
|
+
|
|
16392
|
+
|
|
16393
|
+
|
|
16394
|
+
|
|
16395
|
+
|
|
16396
|
+
class Hour1to12Parser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16397
|
+
priority = 70;
|
|
16398
|
+
|
|
16399
|
+
parse(dateString, token, match) {
|
|
16400
|
+
switch (token) {
|
|
16401
|
+
case "h":
|
|
16402
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.hour12h, dateString);
|
|
16403
|
+
case "ho":
|
|
16404
|
+
return match.ordinalNumber(dateString, { unit: "hour" });
|
|
16405
|
+
default:
|
|
16406
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16407
|
+
}
|
|
16408
|
+
}
|
|
16409
|
+
|
|
16410
|
+
validate(_date, value) {
|
|
16411
|
+
return value >= 1 && value <= 12;
|
|
16412
|
+
}
|
|
16413
|
+
|
|
16414
|
+
set(date, _flags, value) {
|
|
16415
|
+
const isPM = date.getHours() >= 12;
|
|
16416
|
+
if (isPM && value < 12) {
|
|
16417
|
+
date.setHours(value + 12, 0, 0, 0);
|
|
16418
|
+
} else if (!isPM && value === 12) {
|
|
16419
|
+
date.setHours(0, 0, 0, 0);
|
|
16420
|
+
} else {
|
|
16421
|
+
date.setHours(value, 0, 0, 0);
|
|
16422
|
+
}
|
|
16423
|
+
return date;
|
|
16424
|
+
}
|
|
16425
|
+
|
|
16426
|
+
incompatibleTokens = ["H", "K", "k", "t", "T"];
|
|
16427
|
+
}
|
|
16428
|
+
|
|
16429
|
+
|
|
16430
|
+
/***/ }),
|
|
16431
|
+
|
|
16432
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ISODayParser.js":
|
|
16433
|
+
/*!******************************************************************!*\
|
|
16434
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ISODayParser.js ***!
|
|
16435
|
+
\******************************************************************/
|
|
16436
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16437
|
+
|
|
16438
|
+
"use strict";
|
|
16439
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16440
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16441
|
+
/* harmony export */ ISODayParser: () => (/* binding */ ISODayParser)
|
|
16442
|
+
/* harmony export */ });
|
|
16443
|
+
/* harmony import */ var _setISODay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setISODay.js */ "./node_modules/date-fns/setISODay.js");
|
|
16444
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16445
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16446
|
+
|
|
16447
|
+
|
|
16448
|
+
|
|
16449
|
+
|
|
16450
|
+
|
|
16451
|
+
// ISO day of week
|
|
16452
|
+
class ISODayParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16453
|
+
priority = 90;
|
|
16454
|
+
|
|
16455
|
+
parse(dateString, token, match) {
|
|
16456
|
+
const valueCallback = (value) => {
|
|
16457
|
+
if (value === 0) {
|
|
16458
|
+
return 7;
|
|
16459
|
+
}
|
|
16460
|
+
return value;
|
|
16461
|
+
};
|
|
16462
|
+
|
|
16463
|
+
switch (token) {
|
|
16464
|
+
// 2
|
|
16465
|
+
case "i":
|
|
16466
|
+
case "ii": // 02
|
|
16467
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16468
|
+
// 2nd
|
|
16469
|
+
case "io":
|
|
16470
|
+
return match.ordinalNumber(dateString, { unit: "day" });
|
|
16471
|
+
// Tue
|
|
16472
|
+
case "iii":
|
|
16473
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
16474
|
+
match.day(dateString, {
|
|
16475
|
+
width: "abbreviated",
|
|
16476
|
+
context: "formatting",
|
|
16477
|
+
}) ||
|
|
16478
|
+
match.day(dateString, {
|
|
16479
|
+
width: "short",
|
|
16480
|
+
context: "formatting",
|
|
16481
|
+
}) ||
|
|
16482
|
+
match.day(dateString, {
|
|
16483
|
+
width: "narrow",
|
|
16484
|
+
context: "formatting",
|
|
16485
|
+
}),
|
|
16486
|
+
valueCallback,
|
|
16487
|
+
);
|
|
16488
|
+
// T
|
|
16489
|
+
case "iiiii":
|
|
16490
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
16491
|
+
match.day(dateString, {
|
|
16492
|
+
width: "narrow",
|
|
16493
|
+
context: "formatting",
|
|
16494
|
+
}),
|
|
16495
|
+
valueCallback,
|
|
16496
|
+
);
|
|
16497
|
+
// Tu
|
|
16498
|
+
case "iiiiii":
|
|
16499
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
16500
|
+
match.day(dateString, {
|
|
16501
|
+
width: "short",
|
|
16502
|
+
context: "formatting",
|
|
16503
|
+
}) ||
|
|
16504
|
+
match.day(dateString, {
|
|
16505
|
+
width: "narrow",
|
|
16506
|
+
context: "formatting",
|
|
16507
|
+
}),
|
|
16508
|
+
valueCallback,
|
|
16509
|
+
);
|
|
16510
|
+
// Tuesday
|
|
16511
|
+
case "iiii":
|
|
16512
|
+
default:
|
|
16513
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
16514
|
+
match.day(dateString, {
|
|
16515
|
+
width: "wide",
|
|
16516
|
+
context: "formatting",
|
|
16517
|
+
}) ||
|
|
16518
|
+
match.day(dateString, {
|
|
16519
|
+
width: "abbreviated",
|
|
16520
|
+
context: "formatting",
|
|
16521
|
+
}) ||
|
|
16522
|
+
match.day(dateString, {
|
|
16523
|
+
width: "short",
|
|
16524
|
+
context: "formatting",
|
|
16525
|
+
}) ||
|
|
16526
|
+
match.day(dateString, {
|
|
16527
|
+
width: "narrow",
|
|
16528
|
+
context: "formatting",
|
|
16529
|
+
}),
|
|
16530
|
+
valueCallback,
|
|
16531
|
+
);
|
|
16532
|
+
}
|
|
16533
|
+
}
|
|
16534
|
+
|
|
16535
|
+
validate(_date, value) {
|
|
16536
|
+
return value >= 1 && value <= 7;
|
|
16537
|
+
}
|
|
16538
|
+
|
|
16539
|
+
set(date, _flags, value) {
|
|
16540
|
+
date = (0,_setISODay_js__WEBPACK_IMPORTED_MODULE_2__.setISODay)(date, value);
|
|
16541
|
+
date.setHours(0, 0, 0, 0);
|
|
16542
|
+
return date;
|
|
16543
|
+
}
|
|
16544
|
+
|
|
16545
|
+
incompatibleTokens = [
|
|
16546
|
+
"y",
|
|
16547
|
+
"Y",
|
|
16548
|
+
"u",
|
|
16549
|
+
"q",
|
|
16550
|
+
"Q",
|
|
16551
|
+
"M",
|
|
16552
|
+
"L",
|
|
16553
|
+
"w",
|
|
16554
|
+
"d",
|
|
16555
|
+
"D",
|
|
16556
|
+
"E",
|
|
16557
|
+
"e",
|
|
16558
|
+
"c",
|
|
16559
|
+
"t",
|
|
16560
|
+
"T",
|
|
16561
|
+
];
|
|
16562
|
+
}
|
|
16563
|
+
|
|
16564
|
+
|
|
16565
|
+
/***/ }),
|
|
16566
|
+
|
|
16567
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js":
|
|
16568
|
+
/*!***********************************************************************!*\
|
|
16569
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js ***!
|
|
16570
|
+
\***********************************************************************/
|
|
16571
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16572
|
+
|
|
16573
|
+
"use strict";
|
|
16574
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16575
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16576
|
+
/* harmony export */ ISOTimezoneParser: () => (/* binding */ ISOTimezoneParser)
|
|
16577
|
+
/* harmony export */ });
|
|
16578
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
16579
|
+
/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.js */ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js");
|
|
16580
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16581
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16582
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16583
|
+
|
|
16584
|
+
|
|
16585
|
+
|
|
16586
|
+
|
|
16587
|
+
|
|
16588
|
+
|
|
16589
|
+
|
|
16590
|
+
// Timezone (ISO-8601)
|
|
16591
|
+
class ISOTimezoneParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16592
|
+
priority = 10;
|
|
16593
|
+
|
|
16594
|
+
parse(dateString, token) {
|
|
16595
|
+
switch (token) {
|
|
16596
|
+
case "x":
|
|
16597
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16598
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalMinutes,
|
|
16599
|
+
dateString,
|
|
16600
|
+
);
|
|
16601
|
+
case "xx":
|
|
16602
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basic, dateString);
|
|
16603
|
+
case "xxxx":
|
|
16604
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16605
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalSeconds,
|
|
16606
|
+
dateString,
|
|
16607
|
+
);
|
|
16608
|
+
case "xxxxx":
|
|
16609
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16610
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extendedOptionalSeconds,
|
|
16611
|
+
dateString,
|
|
16612
|
+
);
|
|
16613
|
+
case "xxx":
|
|
16614
|
+
default:
|
|
16615
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extended, dateString);
|
|
16616
|
+
}
|
|
16617
|
+
}
|
|
16618
|
+
|
|
16619
|
+
set(date, flags, value) {
|
|
16620
|
+
if (flags.timestampIsSet) return date;
|
|
16621
|
+
return (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_3__.constructFrom)(
|
|
16622
|
+
date,
|
|
16623
|
+
date.getTime() - (0,_lib_getTimezoneOffsetInMilliseconds_js__WEBPACK_IMPORTED_MODULE_4__.getTimezoneOffsetInMilliseconds)(date) - value,
|
|
16624
|
+
);
|
|
16625
|
+
}
|
|
16626
|
+
|
|
16627
|
+
incompatibleTokens = ["t", "T", "X"];
|
|
16628
|
+
}
|
|
16629
|
+
|
|
16630
|
+
|
|
16631
|
+
/***/ }),
|
|
16632
|
+
|
|
16633
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js":
|
|
16634
|
+
/*!****************************************************************************!*\
|
|
16635
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js ***!
|
|
16636
|
+
\****************************************************************************/
|
|
16637
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16638
|
+
|
|
16639
|
+
"use strict";
|
|
16640
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16641
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16642
|
+
/* harmony export */ ISOTimezoneWithZParser: () => (/* binding */ ISOTimezoneWithZParser)
|
|
16643
|
+
/* harmony export */ });
|
|
16644
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
16645
|
+
/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.js */ "./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js");
|
|
16646
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16647
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16648
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16649
|
+
|
|
16650
|
+
|
|
16651
|
+
|
|
16652
|
+
|
|
16653
|
+
|
|
16654
|
+
|
|
16655
|
+
|
|
16656
|
+
// Timezone (ISO-8601. +00:00 is `'Z'`)
|
|
16657
|
+
class ISOTimezoneWithZParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16658
|
+
priority = 10;
|
|
16659
|
+
|
|
16660
|
+
parse(dateString, token) {
|
|
16661
|
+
switch (token) {
|
|
16662
|
+
case "X":
|
|
16663
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16664
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalMinutes,
|
|
16665
|
+
dateString,
|
|
16666
|
+
);
|
|
16667
|
+
case "XX":
|
|
16668
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basic, dateString);
|
|
16669
|
+
case "XXXX":
|
|
16670
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16671
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.basicOptionalSeconds,
|
|
16672
|
+
dateString,
|
|
16673
|
+
);
|
|
16674
|
+
case "XXXXX":
|
|
16675
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(
|
|
16676
|
+
_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extendedOptionalSeconds,
|
|
16677
|
+
dateString,
|
|
16678
|
+
);
|
|
16679
|
+
case "XXX":
|
|
16680
|
+
default:
|
|
16681
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseTimezonePattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.timezonePatterns.extended, dateString);
|
|
16682
|
+
}
|
|
16683
|
+
}
|
|
16684
|
+
|
|
16685
|
+
set(date, flags, value) {
|
|
16686
|
+
if (flags.timestampIsSet) return date;
|
|
16687
|
+
return (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_3__.constructFrom)(
|
|
16688
|
+
date,
|
|
16689
|
+
date.getTime() - (0,_lib_getTimezoneOffsetInMilliseconds_js__WEBPACK_IMPORTED_MODULE_4__.getTimezoneOffsetInMilliseconds)(date) - value,
|
|
16690
|
+
);
|
|
16691
|
+
}
|
|
16692
|
+
|
|
16693
|
+
incompatibleTokens = ["t", "T", "x"];
|
|
16694
|
+
}
|
|
16695
|
+
|
|
16696
|
+
|
|
16697
|
+
/***/ }),
|
|
16698
|
+
|
|
16699
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js":
|
|
16700
|
+
/*!*******************************************************************!*\
|
|
16701
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js ***!
|
|
16702
|
+
\*******************************************************************/
|
|
16703
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16704
|
+
|
|
16705
|
+
"use strict";
|
|
16706
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16707
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16708
|
+
/* harmony export */ ISOWeekParser: () => (/* binding */ ISOWeekParser)
|
|
16709
|
+
/* harmony export */ });
|
|
16710
|
+
/* harmony import */ var _setISOWeek_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../setISOWeek.js */ "./node_modules/date-fns/setISOWeek.js");
|
|
16711
|
+
/* harmony import */ var _startOfISOWeek_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfISOWeek.js */ "./node_modules/date-fns/startOfISOWeek.js");
|
|
16712
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16713
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16714
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16715
|
+
|
|
16716
|
+
|
|
16717
|
+
|
|
16718
|
+
|
|
16719
|
+
|
|
16720
|
+
|
|
16721
|
+
|
|
16722
|
+
// ISO week of year
|
|
16723
|
+
class ISOWeekParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16724
|
+
priority = 100;
|
|
16725
|
+
|
|
16726
|
+
parse(dateString, token, match) {
|
|
16727
|
+
switch (token) {
|
|
16728
|
+
case "I":
|
|
16729
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.week, dateString);
|
|
16730
|
+
case "Io":
|
|
16731
|
+
return match.ordinalNumber(dateString, { unit: "week" });
|
|
16732
|
+
default:
|
|
16733
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16734
|
+
}
|
|
16735
|
+
}
|
|
16736
|
+
|
|
16737
|
+
validate(_date, value) {
|
|
16738
|
+
return value >= 1 && value <= 53;
|
|
16739
|
+
}
|
|
16740
|
+
|
|
16741
|
+
set(date, _flags, value) {
|
|
16742
|
+
return (0,_startOfISOWeek_js__WEBPACK_IMPORTED_MODULE_3__.startOfISOWeek)((0,_setISOWeek_js__WEBPACK_IMPORTED_MODULE_4__.setISOWeek)(date, value));
|
|
16743
|
+
}
|
|
16744
|
+
|
|
16745
|
+
incompatibleTokens = [
|
|
16746
|
+
"y",
|
|
16747
|
+
"Y",
|
|
16748
|
+
"u",
|
|
16749
|
+
"q",
|
|
16750
|
+
"Q",
|
|
16751
|
+
"M",
|
|
16752
|
+
"L",
|
|
16753
|
+
"w",
|
|
16754
|
+
"d",
|
|
16755
|
+
"D",
|
|
16756
|
+
"e",
|
|
16757
|
+
"c",
|
|
16758
|
+
"t",
|
|
16759
|
+
"T",
|
|
16760
|
+
];
|
|
16761
|
+
}
|
|
16762
|
+
|
|
16763
|
+
|
|
16764
|
+
/***/ }),
|
|
16765
|
+
|
|
16766
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js":
|
|
16767
|
+
/*!***********************************************************************!*\
|
|
16768
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js ***!
|
|
16769
|
+
\***********************************************************************/
|
|
16770
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16771
|
+
|
|
16772
|
+
"use strict";
|
|
16773
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16774
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16775
|
+
/* harmony export */ ISOWeekYearParser: () => (/* binding */ ISOWeekYearParser)
|
|
16776
|
+
/* harmony export */ });
|
|
16777
|
+
/* harmony import */ var _startOfISOWeek_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfISOWeek.js */ "./node_modules/date-fns/startOfISOWeek.js");
|
|
16778
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
16779
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16780
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16781
|
+
|
|
16782
|
+
|
|
16783
|
+
|
|
16784
|
+
|
|
16785
|
+
|
|
16786
|
+
|
|
16787
|
+
// ISO week-numbering year
|
|
16788
|
+
class ISOWeekYearParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16789
|
+
priority = 130;
|
|
16790
|
+
|
|
16791
|
+
parse(dateString, token) {
|
|
16792
|
+
if (token === "R") {
|
|
16793
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(4, dateString);
|
|
16794
|
+
}
|
|
16795
|
+
|
|
16796
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigitsSigned)(token.length, dateString);
|
|
16797
|
+
}
|
|
16798
|
+
|
|
16799
|
+
set(date, _flags, value) {
|
|
16800
|
+
const firstWeekOfYear = (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, 0);
|
|
16801
|
+
firstWeekOfYear.setFullYear(value, 0, 4);
|
|
16802
|
+
firstWeekOfYear.setHours(0, 0, 0, 0);
|
|
16803
|
+
return (0,_startOfISOWeek_js__WEBPACK_IMPORTED_MODULE_3__.startOfISOWeek)(firstWeekOfYear);
|
|
16804
|
+
}
|
|
16805
|
+
|
|
16806
|
+
incompatibleTokens = [
|
|
16807
|
+
"G",
|
|
16808
|
+
"y",
|
|
16809
|
+
"Y",
|
|
16810
|
+
"u",
|
|
16811
|
+
"Q",
|
|
16812
|
+
"q",
|
|
16813
|
+
"M",
|
|
16814
|
+
"L",
|
|
16815
|
+
"w",
|
|
16816
|
+
"d",
|
|
16817
|
+
"D",
|
|
16818
|
+
"e",
|
|
16819
|
+
"c",
|
|
16820
|
+
"t",
|
|
16821
|
+
"T",
|
|
16822
|
+
];
|
|
16823
|
+
}
|
|
16824
|
+
|
|
16825
|
+
|
|
16826
|
+
/***/ }),
|
|
16827
|
+
|
|
16828
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js":
|
|
16829
|
+
/*!********************************************************************!*\
|
|
16830
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js ***!
|
|
16831
|
+
\********************************************************************/
|
|
16832
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16833
|
+
|
|
16834
|
+
"use strict";
|
|
16835
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16836
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16837
|
+
/* harmony export */ LocalDayParser: () => (/* binding */ LocalDayParser)
|
|
16838
|
+
/* harmony export */ });
|
|
16839
|
+
/* harmony import */ var _setDay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setDay.js */ "./node_modules/date-fns/setDay.js");
|
|
16840
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16841
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16842
|
+
|
|
16843
|
+
|
|
16844
|
+
|
|
16845
|
+
|
|
16846
|
+
|
|
16847
|
+
// Local day of week
|
|
16848
|
+
class LocalDayParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16849
|
+
priority = 90;
|
|
16850
|
+
parse(dateString, token, match, options) {
|
|
16851
|
+
const valueCallback = (value) => {
|
|
16852
|
+
// We want here floor instead of trunc, so we get -7 for value 0 instead of 0
|
|
16853
|
+
const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
|
|
16854
|
+
return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;
|
|
16855
|
+
};
|
|
16856
|
+
|
|
16857
|
+
switch (token) {
|
|
16858
|
+
// 3
|
|
16859
|
+
case "e":
|
|
16860
|
+
case "ee": // 03
|
|
16861
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback);
|
|
16862
|
+
// 3rd
|
|
16863
|
+
case "eo":
|
|
16864
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
16865
|
+
match.ordinalNumber(dateString, {
|
|
16866
|
+
unit: "day",
|
|
16867
|
+
}),
|
|
16868
|
+
valueCallback,
|
|
16869
|
+
);
|
|
16870
|
+
// Tue
|
|
16871
|
+
case "eee":
|
|
16872
|
+
return (
|
|
16873
|
+
match.day(dateString, {
|
|
16874
|
+
width: "abbreviated",
|
|
16875
|
+
context: "formatting",
|
|
16876
|
+
}) ||
|
|
16877
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
16878
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
16879
|
+
);
|
|
16880
|
+
|
|
16881
|
+
// T
|
|
16882
|
+
case "eeeee":
|
|
16883
|
+
return match.day(dateString, {
|
|
16884
|
+
width: "narrow",
|
|
16885
|
+
context: "formatting",
|
|
16886
|
+
});
|
|
16887
|
+
// Tu
|
|
16888
|
+
case "eeeeee":
|
|
16889
|
+
return (
|
|
16890
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
16891
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
16892
|
+
);
|
|
16893
|
+
|
|
16894
|
+
// Tuesday
|
|
16895
|
+
case "eeee":
|
|
16896
|
+
default:
|
|
16897
|
+
return (
|
|
16898
|
+
match.day(dateString, { width: "wide", context: "formatting" }) ||
|
|
16899
|
+
match.day(dateString, {
|
|
16900
|
+
width: "abbreviated",
|
|
16901
|
+
context: "formatting",
|
|
16902
|
+
}) ||
|
|
16903
|
+
match.day(dateString, { width: "short", context: "formatting" }) ||
|
|
16904
|
+
match.day(dateString, { width: "narrow", context: "formatting" })
|
|
16905
|
+
);
|
|
16906
|
+
}
|
|
16907
|
+
}
|
|
16908
|
+
|
|
16909
|
+
validate(_date, value) {
|
|
16910
|
+
return value >= 0 && value <= 6;
|
|
16911
|
+
}
|
|
16912
|
+
|
|
16913
|
+
set(date, _flags, value, options) {
|
|
16914
|
+
date = (0,_setDay_js__WEBPACK_IMPORTED_MODULE_2__.setDay)(date, value, options);
|
|
16915
|
+
date.setHours(0, 0, 0, 0);
|
|
16916
|
+
return date;
|
|
16917
|
+
}
|
|
16918
|
+
|
|
16919
|
+
incompatibleTokens = [
|
|
16920
|
+
"y",
|
|
16921
|
+
"R",
|
|
16922
|
+
"u",
|
|
16923
|
+
"q",
|
|
16924
|
+
"Q",
|
|
16925
|
+
"M",
|
|
16926
|
+
"L",
|
|
16927
|
+
"I",
|
|
16928
|
+
"d",
|
|
16929
|
+
"D",
|
|
16930
|
+
"E",
|
|
16931
|
+
"i",
|
|
16932
|
+
"c",
|
|
16933
|
+
"t",
|
|
16934
|
+
"T",
|
|
16935
|
+
];
|
|
16936
|
+
}
|
|
16937
|
+
|
|
16938
|
+
|
|
16939
|
+
/***/ }),
|
|
16940
|
+
|
|
16941
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js":
|
|
16942
|
+
/*!*********************************************************************!*\
|
|
16943
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js ***!
|
|
16944
|
+
\*********************************************************************/
|
|
16945
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16946
|
+
|
|
16947
|
+
"use strict";
|
|
16948
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16949
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16950
|
+
/* harmony export */ LocalWeekParser: () => (/* binding */ LocalWeekParser)
|
|
16951
|
+
/* harmony export */ });
|
|
16952
|
+
/* harmony import */ var _setWeek_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../setWeek.js */ "./node_modules/date-fns/setWeek.js");
|
|
16953
|
+
/* harmony import */ var _startOfWeek_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfWeek.js */ "./node_modules/date-fns/startOfWeek.js");
|
|
16954
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
16955
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
16956
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
16957
|
+
|
|
16958
|
+
|
|
16959
|
+
|
|
16960
|
+
|
|
16961
|
+
|
|
16962
|
+
|
|
16963
|
+
|
|
16964
|
+
// Local week of year
|
|
16965
|
+
class LocalWeekParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
16966
|
+
priority = 100;
|
|
16967
|
+
|
|
16968
|
+
parse(dateString, token, match) {
|
|
16969
|
+
switch (token) {
|
|
16970
|
+
case "w":
|
|
16971
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.week, dateString);
|
|
16972
|
+
case "wo":
|
|
16973
|
+
return match.ordinalNumber(dateString, { unit: "week" });
|
|
16974
|
+
default:
|
|
16975
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
16976
|
+
}
|
|
16977
|
+
}
|
|
16978
|
+
|
|
16979
|
+
validate(_date, value) {
|
|
16980
|
+
return value >= 1 && value <= 53;
|
|
16981
|
+
}
|
|
16982
|
+
|
|
16983
|
+
set(date, _flags, value, options) {
|
|
16984
|
+
return (0,_startOfWeek_js__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)((0,_setWeek_js__WEBPACK_IMPORTED_MODULE_4__.setWeek)(date, value, options), options);
|
|
16985
|
+
}
|
|
16986
|
+
|
|
16987
|
+
incompatibleTokens = [
|
|
16988
|
+
"y",
|
|
16989
|
+
"R",
|
|
16990
|
+
"u",
|
|
16991
|
+
"q",
|
|
16992
|
+
"Q",
|
|
16993
|
+
"M",
|
|
16994
|
+
"L",
|
|
16995
|
+
"I",
|
|
16996
|
+
"d",
|
|
16997
|
+
"D",
|
|
16998
|
+
"i",
|
|
16999
|
+
"t",
|
|
17000
|
+
"T",
|
|
17001
|
+
];
|
|
17002
|
+
}
|
|
17003
|
+
|
|
17004
|
+
|
|
17005
|
+
/***/ }),
|
|
17006
|
+
|
|
17007
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js":
|
|
17008
|
+
/*!*************************************************************************!*\
|
|
17009
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js ***!
|
|
17010
|
+
\*************************************************************************/
|
|
17011
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17012
|
+
|
|
17013
|
+
"use strict";
|
|
17014
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17015
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17016
|
+
/* harmony export */ LocalWeekYearParser: () => (/* binding */ LocalWeekYearParser)
|
|
17017
|
+
/* harmony export */ });
|
|
17018
|
+
/* harmony import */ var _getWeekYear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../getWeekYear.js */ "./node_modules/date-fns/getWeekYear.js");
|
|
17019
|
+
/* harmony import */ var _startOfWeek_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../startOfWeek.js */ "./node_modules/date-fns/startOfWeek.js");
|
|
17020
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17021
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17022
|
+
|
|
17023
|
+
|
|
17024
|
+
|
|
17025
|
+
|
|
17026
|
+
|
|
17027
|
+
|
|
17028
|
+
|
|
17029
|
+
// Local week-numbering year
|
|
17030
|
+
class LocalWeekYearParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17031
|
+
priority = 130;
|
|
17032
|
+
|
|
17033
|
+
parse(dateString, token, match) {
|
|
17034
|
+
const valueCallback = (year) => ({
|
|
17035
|
+
year,
|
|
17036
|
+
isTwoDigitYear: token === "YY",
|
|
17037
|
+
});
|
|
17038
|
+
|
|
17039
|
+
switch (token) {
|
|
17040
|
+
case "Y":
|
|
17041
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(4, dateString), valueCallback);
|
|
17042
|
+
case "Yo":
|
|
17043
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17044
|
+
match.ordinalNumber(dateString, {
|
|
17045
|
+
unit: "year",
|
|
17046
|
+
}),
|
|
17047
|
+
valueCallback,
|
|
17048
|
+
);
|
|
17049
|
+
default:
|
|
17050
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback);
|
|
17051
|
+
}
|
|
17052
|
+
}
|
|
17053
|
+
|
|
17054
|
+
validate(_date, value) {
|
|
17055
|
+
return value.isTwoDigitYear || value.year > 0;
|
|
17056
|
+
}
|
|
17057
|
+
|
|
17058
|
+
set(date, flags, value, options) {
|
|
17059
|
+
const currentYear = (0,_getWeekYear_js__WEBPACK_IMPORTED_MODULE_2__.getWeekYear)(date, options);
|
|
17060
|
+
|
|
17061
|
+
if (value.isTwoDigitYear) {
|
|
17062
|
+
const normalizedTwoDigitYear = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalizeTwoDigitYear)(
|
|
17063
|
+
value.year,
|
|
17064
|
+
currentYear,
|
|
17065
|
+
);
|
|
17066
|
+
date.setFullYear(
|
|
17067
|
+
normalizedTwoDigitYear,
|
|
17068
|
+
0,
|
|
17069
|
+
options.firstWeekContainsDate,
|
|
17070
|
+
);
|
|
17071
|
+
date.setHours(0, 0, 0, 0);
|
|
17072
|
+
return (0,_startOfWeek_js__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(date, options);
|
|
17073
|
+
}
|
|
17074
|
+
|
|
17075
|
+
const year =
|
|
17076
|
+
!("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
|
|
17077
|
+
date.setFullYear(year, 0, options.firstWeekContainsDate);
|
|
17078
|
+
date.setHours(0, 0, 0, 0);
|
|
17079
|
+
return (0,_startOfWeek_js__WEBPACK_IMPORTED_MODULE_3__.startOfWeek)(date, options);
|
|
17080
|
+
}
|
|
17081
|
+
|
|
17082
|
+
incompatibleTokens = [
|
|
17083
|
+
"y",
|
|
17084
|
+
"R",
|
|
17085
|
+
"u",
|
|
17086
|
+
"Q",
|
|
17087
|
+
"q",
|
|
17088
|
+
"M",
|
|
17089
|
+
"L",
|
|
17090
|
+
"I",
|
|
17091
|
+
"d",
|
|
17092
|
+
"D",
|
|
17093
|
+
"i",
|
|
17094
|
+
"t",
|
|
17095
|
+
"T",
|
|
17096
|
+
];
|
|
17097
|
+
}
|
|
17098
|
+
|
|
17099
|
+
|
|
17100
|
+
/***/ }),
|
|
17101
|
+
|
|
17102
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/MinuteParser.js":
|
|
17103
|
+
/*!******************************************************************!*\
|
|
17104
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/MinuteParser.js ***!
|
|
17105
|
+
\******************************************************************/
|
|
17106
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17107
|
+
|
|
17108
|
+
"use strict";
|
|
17109
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17110
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17111
|
+
/* harmony export */ MinuteParser: () => (/* binding */ MinuteParser)
|
|
17112
|
+
/* harmony export */ });
|
|
17113
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
17114
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17115
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17116
|
+
|
|
17117
|
+
|
|
17118
|
+
|
|
17119
|
+
|
|
17120
|
+
|
|
17121
|
+
class MinuteParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17122
|
+
priority = 60;
|
|
17123
|
+
|
|
17124
|
+
parse(dateString, token, match) {
|
|
17125
|
+
switch (token) {
|
|
17126
|
+
case "m":
|
|
17127
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.minute, dateString);
|
|
17128
|
+
case "mo":
|
|
17129
|
+
return match.ordinalNumber(dateString, { unit: "minute" });
|
|
17130
|
+
default:
|
|
17131
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
17132
|
+
}
|
|
17133
|
+
}
|
|
17134
|
+
|
|
17135
|
+
validate(_date, value) {
|
|
17136
|
+
return value >= 0 && value <= 59;
|
|
17137
|
+
}
|
|
17138
|
+
|
|
17139
|
+
set(date, _flags, value) {
|
|
17140
|
+
date.setMinutes(value, 0, 0);
|
|
17141
|
+
return date;
|
|
17142
|
+
}
|
|
17143
|
+
|
|
17144
|
+
incompatibleTokens = ["t", "T"];
|
|
17145
|
+
}
|
|
17146
|
+
|
|
17147
|
+
|
|
17148
|
+
/***/ }),
|
|
17149
|
+
|
|
17150
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/MonthParser.js":
|
|
17151
|
+
/*!*****************************************************************!*\
|
|
17152
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/MonthParser.js ***!
|
|
17153
|
+
\*****************************************************************/
|
|
17154
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17155
|
+
|
|
17156
|
+
"use strict";
|
|
17157
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17158
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17159
|
+
/* harmony export */ MonthParser: () => (/* binding */ MonthParser)
|
|
17160
|
+
/* harmony export */ });
|
|
17161
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
17162
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17163
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17164
|
+
|
|
17165
|
+
|
|
17166
|
+
|
|
17167
|
+
|
|
17168
|
+
|
|
17169
|
+
class MonthParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17170
|
+
incompatibleTokens = [
|
|
17171
|
+
"Y",
|
|
17172
|
+
"R",
|
|
17173
|
+
"q",
|
|
17174
|
+
"Q",
|
|
17175
|
+
"L",
|
|
17176
|
+
"w",
|
|
17177
|
+
"I",
|
|
17178
|
+
"D",
|
|
17179
|
+
"i",
|
|
17180
|
+
"e",
|
|
17181
|
+
"c",
|
|
17182
|
+
"t",
|
|
17183
|
+
"T",
|
|
17184
|
+
];
|
|
17185
|
+
|
|
17186
|
+
priority = 110;
|
|
17187
|
+
|
|
17188
|
+
parse(dateString, token, match) {
|
|
17189
|
+
const valueCallback = (value) => value - 1;
|
|
17190
|
+
|
|
17191
|
+
switch (token) {
|
|
17192
|
+
// 1, 2, ..., 12
|
|
17193
|
+
case "M":
|
|
17194
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17195
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.month, dateString),
|
|
17196
|
+
valueCallback,
|
|
17197
|
+
);
|
|
17198
|
+
// 01, 02, ..., 12
|
|
17199
|
+
case "MM":
|
|
17200
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(2, dateString), valueCallback);
|
|
17201
|
+
// 1st, 2nd, ..., 12th
|
|
17202
|
+
case "Mo":
|
|
17203
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17204
|
+
match.ordinalNumber(dateString, {
|
|
17205
|
+
unit: "month",
|
|
17206
|
+
}),
|
|
17207
|
+
valueCallback,
|
|
17208
|
+
);
|
|
17209
|
+
// Jan, Feb, ..., Dec
|
|
17210
|
+
case "MMM":
|
|
17211
|
+
return (
|
|
17212
|
+
match.month(dateString, {
|
|
17213
|
+
width: "abbreviated",
|
|
17214
|
+
context: "formatting",
|
|
17215
|
+
}) ||
|
|
17216
|
+
match.month(dateString, { width: "narrow", context: "formatting" })
|
|
17217
|
+
);
|
|
17218
|
+
|
|
17219
|
+
// J, F, ..., D
|
|
17220
|
+
case "MMMMM":
|
|
17221
|
+
return match.month(dateString, {
|
|
17222
|
+
width: "narrow",
|
|
17223
|
+
context: "formatting",
|
|
17224
|
+
});
|
|
17225
|
+
// January, February, ..., December
|
|
17226
|
+
case "MMMM":
|
|
17227
|
+
default:
|
|
17228
|
+
return (
|
|
17229
|
+
match.month(dateString, { width: "wide", context: "formatting" }) ||
|
|
17230
|
+
match.month(dateString, {
|
|
17231
|
+
width: "abbreviated",
|
|
17232
|
+
context: "formatting",
|
|
17233
|
+
}) ||
|
|
17234
|
+
match.month(dateString, { width: "narrow", context: "formatting" })
|
|
17235
|
+
);
|
|
17236
|
+
}
|
|
17237
|
+
}
|
|
17238
|
+
|
|
17239
|
+
validate(_date, value) {
|
|
17240
|
+
return value >= 0 && value <= 11;
|
|
17241
|
+
}
|
|
17242
|
+
|
|
17243
|
+
set(date, _flags, value) {
|
|
17244
|
+
date.setMonth(value, 1);
|
|
17245
|
+
date.setHours(0, 0, 0, 0);
|
|
17246
|
+
return date;
|
|
17247
|
+
}
|
|
17248
|
+
}
|
|
17249
|
+
|
|
17250
|
+
|
|
17251
|
+
/***/ }),
|
|
17252
|
+
|
|
17253
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/QuarterParser.js":
|
|
17254
|
+
/*!*******************************************************************!*\
|
|
17255
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/QuarterParser.js ***!
|
|
17256
|
+
\*******************************************************************/
|
|
17257
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17258
|
+
|
|
17259
|
+
"use strict";
|
|
17260
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17261
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17262
|
+
/* harmony export */ QuarterParser: () => (/* binding */ QuarterParser)
|
|
17263
|
+
/* harmony export */ });
|
|
17264
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17265
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17266
|
+
|
|
17267
|
+
|
|
17268
|
+
|
|
17269
|
+
|
|
17270
|
+
class QuarterParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17271
|
+
priority = 120;
|
|
17272
|
+
|
|
17273
|
+
parse(dateString, token, match) {
|
|
17274
|
+
switch (token) {
|
|
17275
|
+
// 1, 2, 3, 4
|
|
17276
|
+
case "Q":
|
|
17277
|
+
case "QQ": // 01, 02, 03, 04
|
|
17278
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
17279
|
+
// 1st, 2nd, 3rd, 4th
|
|
17280
|
+
case "Qo":
|
|
17281
|
+
return match.ordinalNumber(dateString, { unit: "quarter" });
|
|
17282
|
+
// Q1, Q2, Q3, Q4
|
|
17283
|
+
case "QQQ":
|
|
17284
|
+
return (
|
|
17285
|
+
match.quarter(dateString, {
|
|
17286
|
+
width: "abbreviated",
|
|
17287
|
+
context: "formatting",
|
|
17288
|
+
}) ||
|
|
17289
|
+
match.quarter(dateString, {
|
|
17290
|
+
width: "narrow",
|
|
17291
|
+
context: "formatting",
|
|
17292
|
+
})
|
|
17293
|
+
);
|
|
17294
|
+
|
|
17295
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
17296
|
+
case "QQQQQ":
|
|
17297
|
+
return match.quarter(dateString, {
|
|
17298
|
+
width: "narrow",
|
|
17299
|
+
context: "formatting",
|
|
17300
|
+
});
|
|
17301
|
+
// 1st quarter, 2nd quarter, ...
|
|
17302
|
+
case "QQQQ":
|
|
17303
|
+
default:
|
|
17304
|
+
return (
|
|
17305
|
+
match.quarter(dateString, {
|
|
17306
|
+
width: "wide",
|
|
17307
|
+
context: "formatting",
|
|
17308
|
+
}) ||
|
|
17309
|
+
match.quarter(dateString, {
|
|
17310
|
+
width: "abbreviated",
|
|
17311
|
+
context: "formatting",
|
|
17312
|
+
}) ||
|
|
17313
|
+
match.quarter(dateString, {
|
|
17314
|
+
width: "narrow",
|
|
17315
|
+
context: "formatting",
|
|
17316
|
+
})
|
|
17317
|
+
);
|
|
17318
|
+
}
|
|
17319
|
+
}
|
|
17320
|
+
|
|
17321
|
+
validate(_date, value) {
|
|
17322
|
+
return value >= 1 && value <= 4;
|
|
17323
|
+
}
|
|
17324
|
+
|
|
17325
|
+
set(date, _flags, value) {
|
|
17326
|
+
date.setMonth((value - 1) * 3, 1);
|
|
17327
|
+
date.setHours(0, 0, 0, 0);
|
|
17328
|
+
return date;
|
|
17329
|
+
}
|
|
17330
|
+
|
|
17331
|
+
incompatibleTokens = [
|
|
17332
|
+
"Y",
|
|
17333
|
+
"R",
|
|
17334
|
+
"q",
|
|
17335
|
+
"M",
|
|
17336
|
+
"L",
|
|
17337
|
+
"w",
|
|
17338
|
+
"I",
|
|
17339
|
+
"d",
|
|
17340
|
+
"D",
|
|
17341
|
+
"i",
|
|
17342
|
+
"e",
|
|
17343
|
+
"c",
|
|
17344
|
+
"t",
|
|
17345
|
+
"T",
|
|
17346
|
+
];
|
|
17347
|
+
}
|
|
17348
|
+
|
|
17349
|
+
|
|
17350
|
+
/***/ }),
|
|
17351
|
+
|
|
17352
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/SecondParser.js":
|
|
17353
|
+
/*!******************************************************************!*\
|
|
17354
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/SecondParser.js ***!
|
|
17355
|
+
\******************************************************************/
|
|
17356
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17357
|
+
|
|
17358
|
+
"use strict";
|
|
17359
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17360
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17361
|
+
/* harmony export */ SecondParser: () => (/* binding */ SecondParser)
|
|
17362
|
+
/* harmony export */ });
|
|
17363
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
17364
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17365
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17366
|
+
|
|
17367
|
+
|
|
17368
|
+
|
|
17369
|
+
|
|
17370
|
+
|
|
17371
|
+
class SecondParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17372
|
+
priority = 50;
|
|
17373
|
+
|
|
17374
|
+
parse(dateString, token, match) {
|
|
17375
|
+
switch (token) {
|
|
17376
|
+
case "s":
|
|
17377
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.second, dateString);
|
|
17378
|
+
case "so":
|
|
17379
|
+
return match.ordinalNumber(dateString, { unit: "second" });
|
|
17380
|
+
default:
|
|
17381
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
17382
|
+
}
|
|
17383
|
+
}
|
|
17384
|
+
|
|
17385
|
+
validate(_date, value) {
|
|
17386
|
+
return value >= 0 && value <= 59;
|
|
17387
|
+
}
|
|
17388
|
+
|
|
17389
|
+
set(date, _flags, value) {
|
|
17390
|
+
date.setSeconds(value, 0);
|
|
17391
|
+
return date;
|
|
17392
|
+
}
|
|
17393
|
+
|
|
17394
|
+
incompatibleTokens = ["t", "T"];
|
|
17395
|
+
}
|
|
17396
|
+
|
|
17397
|
+
|
|
17398
|
+
/***/ }),
|
|
17399
|
+
|
|
17400
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js":
|
|
17401
|
+
/*!******************************************************************************!*\
|
|
17402
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js ***!
|
|
17403
|
+
\******************************************************************************/
|
|
17404
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17405
|
+
|
|
17406
|
+
"use strict";
|
|
17407
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17408
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17409
|
+
/* harmony export */ StandAloneLocalDayParser: () => (/* binding */ StandAloneLocalDayParser)
|
|
17410
|
+
/* harmony export */ });
|
|
17411
|
+
/* harmony import */ var _setDay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../setDay.js */ "./node_modules/date-fns/setDay.js");
|
|
17412
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17413
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17414
|
+
|
|
17415
|
+
|
|
17416
|
+
|
|
17417
|
+
|
|
17418
|
+
|
|
17419
|
+
// Stand-alone local day of week
|
|
17420
|
+
class StandAloneLocalDayParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17421
|
+
priority = 90;
|
|
17422
|
+
|
|
17423
|
+
parse(dateString, token, match, options) {
|
|
17424
|
+
const valueCallback = (value) => {
|
|
17425
|
+
// We want here floor instead of trunc, so we get -7 for value 0 instead of 0
|
|
17426
|
+
const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
|
|
17427
|
+
return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;
|
|
17428
|
+
};
|
|
17429
|
+
|
|
17430
|
+
switch (token) {
|
|
17431
|
+
// 3
|
|
17432
|
+
case "c":
|
|
17433
|
+
case "cc": // 03
|
|
17434
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback);
|
|
17435
|
+
// 3rd
|
|
17436
|
+
case "co":
|
|
17437
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17438
|
+
match.ordinalNumber(dateString, {
|
|
17439
|
+
unit: "day",
|
|
17440
|
+
}),
|
|
17441
|
+
valueCallback,
|
|
17442
|
+
);
|
|
17443
|
+
// Tue
|
|
17444
|
+
case "ccc":
|
|
17445
|
+
return (
|
|
17446
|
+
match.day(dateString, {
|
|
17447
|
+
width: "abbreviated",
|
|
17448
|
+
context: "standalone",
|
|
17449
|
+
}) ||
|
|
17450
|
+
match.day(dateString, { width: "short", context: "standalone" }) ||
|
|
17451
|
+
match.day(dateString, { width: "narrow", context: "standalone" })
|
|
17452
|
+
);
|
|
17453
|
+
|
|
17454
|
+
// T
|
|
17455
|
+
case "ccccc":
|
|
17456
|
+
return match.day(dateString, {
|
|
17457
|
+
width: "narrow",
|
|
17458
|
+
context: "standalone",
|
|
17459
|
+
});
|
|
17460
|
+
// Tu
|
|
17461
|
+
case "cccccc":
|
|
17462
|
+
return (
|
|
17463
|
+
match.day(dateString, { width: "short", context: "standalone" }) ||
|
|
17464
|
+
match.day(dateString, { width: "narrow", context: "standalone" })
|
|
17465
|
+
);
|
|
17466
|
+
|
|
17467
|
+
// Tuesday
|
|
17468
|
+
case "cccc":
|
|
17469
|
+
default:
|
|
17470
|
+
return (
|
|
17471
|
+
match.day(dateString, { width: "wide", context: "standalone" }) ||
|
|
17472
|
+
match.day(dateString, {
|
|
17473
|
+
width: "abbreviated",
|
|
17474
|
+
context: "standalone",
|
|
17475
|
+
}) ||
|
|
17476
|
+
match.day(dateString, { width: "short", context: "standalone" }) ||
|
|
17477
|
+
match.day(dateString, { width: "narrow", context: "standalone" })
|
|
17478
|
+
);
|
|
17479
|
+
}
|
|
17480
|
+
}
|
|
17481
|
+
|
|
17482
|
+
validate(_date, value) {
|
|
17483
|
+
return value >= 0 && value <= 6;
|
|
17484
|
+
}
|
|
17485
|
+
|
|
17486
|
+
set(date, _flags, value, options) {
|
|
17487
|
+
date = (0,_setDay_js__WEBPACK_IMPORTED_MODULE_2__.setDay)(date, value, options);
|
|
17488
|
+
date.setHours(0, 0, 0, 0);
|
|
17489
|
+
return date;
|
|
17490
|
+
}
|
|
17491
|
+
|
|
17492
|
+
incompatibleTokens = [
|
|
17493
|
+
"y",
|
|
17494
|
+
"R",
|
|
17495
|
+
"u",
|
|
17496
|
+
"q",
|
|
17497
|
+
"Q",
|
|
17498
|
+
"M",
|
|
17499
|
+
"L",
|
|
17500
|
+
"I",
|
|
17501
|
+
"d",
|
|
17502
|
+
"D",
|
|
17503
|
+
"E",
|
|
17504
|
+
"i",
|
|
17505
|
+
"e",
|
|
17506
|
+
"t",
|
|
17507
|
+
"T",
|
|
17508
|
+
];
|
|
17509
|
+
}
|
|
17510
|
+
|
|
17511
|
+
|
|
17512
|
+
/***/ }),
|
|
17513
|
+
|
|
17514
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js":
|
|
17515
|
+
/*!***************************************************************************!*\
|
|
17516
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js ***!
|
|
17517
|
+
\***************************************************************************/
|
|
17518
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17519
|
+
|
|
17520
|
+
"use strict";
|
|
17521
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17522
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17523
|
+
/* harmony export */ StandAloneMonthParser: () => (/* binding */ StandAloneMonthParser)
|
|
17524
|
+
/* harmony export */ });
|
|
17525
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
17526
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17527
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17528
|
+
|
|
17529
|
+
|
|
17530
|
+
|
|
17531
|
+
|
|
17532
|
+
|
|
17533
|
+
class StandAloneMonthParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17534
|
+
priority = 110;
|
|
17535
|
+
|
|
17536
|
+
parse(dateString, token, match) {
|
|
17537
|
+
const valueCallback = (value) => value - 1;
|
|
17538
|
+
|
|
17539
|
+
switch (token) {
|
|
17540
|
+
// 1, 2, ..., 12
|
|
17541
|
+
case "L":
|
|
17542
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17543
|
+
(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNumericPattern)(_constants_js__WEBPACK_IMPORTED_MODULE_2__.numericPatterns.month, dateString),
|
|
17544
|
+
valueCallback,
|
|
17545
|
+
);
|
|
17546
|
+
// 01, 02, ..., 12
|
|
17547
|
+
case "LL":
|
|
17548
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(2, dateString), valueCallback);
|
|
17549
|
+
// 1st, 2nd, ..., 12th
|
|
17550
|
+
case "Lo":
|
|
17551
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17552
|
+
match.ordinalNumber(dateString, {
|
|
17553
|
+
unit: "month",
|
|
17554
|
+
}),
|
|
17555
|
+
valueCallback,
|
|
17556
|
+
);
|
|
17557
|
+
// Jan, Feb, ..., Dec
|
|
17558
|
+
case "LLL":
|
|
17559
|
+
return (
|
|
17560
|
+
match.month(dateString, {
|
|
17561
|
+
width: "abbreviated",
|
|
17562
|
+
context: "standalone",
|
|
17563
|
+
}) ||
|
|
17564
|
+
match.month(dateString, { width: "narrow", context: "standalone" })
|
|
17565
|
+
);
|
|
17566
|
+
|
|
17567
|
+
// J, F, ..., D
|
|
17568
|
+
case "LLLLL":
|
|
17569
|
+
return match.month(dateString, {
|
|
17570
|
+
width: "narrow",
|
|
17571
|
+
context: "standalone",
|
|
17572
|
+
});
|
|
17573
|
+
// January, February, ..., December
|
|
17574
|
+
case "LLLL":
|
|
17575
|
+
default:
|
|
17576
|
+
return (
|
|
17577
|
+
match.month(dateString, { width: "wide", context: "standalone" }) ||
|
|
17578
|
+
match.month(dateString, {
|
|
17579
|
+
width: "abbreviated",
|
|
17580
|
+
context: "standalone",
|
|
17581
|
+
}) ||
|
|
17582
|
+
match.month(dateString, { width: "narrow", context: "standalone" })
|
|
17583
|
+
);
|
|
17584
|
+
}
|
|
17585
|
+
}
|
|
17586
|
+
|
|
17587
|
+
validate(_date, value) {
|
|
17588
|
+
return value >= 0 && value <= 11;
|
|
17589
|
+
}
|
|
17590
|
+
|
|
17591
|
+
set(date, _flags, value) {
|
|
17592
|
+
date.setMonth(value, 1);
|
|
17593
|
+
date.setHours(0, 0, 0, 0);
|
|
17594
|
+
return date;
|
|
17595
|
+
}
|
|
17596
|
+
|
|
17597
|
+
incompatibleTokens = [
|
|
17598
|
+
"Y",
|
|
17599
|
+
"R",
|
|
17600
|
+
"q",
|
|
17601
|
+
"Q",
|
|
17602
|
+
"M",
|
|
17603
|
+
"w",
|
|
17604
|
+
"I",
|
|
17605
|
+
"D",
|
|
17606
|
+
"i",
|
|
17607
|
+
"e",
|
|
17608
|
+
"c",
|
|
17609
|
+
"t",
|
|
17610
|
+
"T",
|
|
17611
|
+
];
|
|
17612
|
+
}
|
|
17613
|
+
|
|
17614
|
+
|
|
17615
|
+
/***/ }),
|
|
17616
|
+
|
|
17617
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js":
|
|
17618
|
+
/*!*****************************************************************************!*\
|
|
17619
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js ***!
|
|
17620
|
+
\*****************************************************************************/
|
|
17621
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17622
|
+
|
|
17623
|
+
"use strict";
|
|
17624
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17625
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17626
|
+
/* harmony export */ StandAloneQuarterParser: () => (/* binding */ StandAloneQuarterParser)
|
|
17627
|
+
/* harmony export */ });
|
|
17628
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17629
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17630
|
+
|
|
17631
|
+
|
|
17632
|
+
|
|
17633
|
+
|
|
17634
|
+
class StandAloneQuarterParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17635
|
+
priority = 120;
|
|
17636
|
+
|
|
17637
|
+
parse(dateString, token, match) {
|
|
17638
|
+
switch (token) {
|
|
17639
|
+
// 1, 2, 3, 4
|
|
17640
|
+
case "q":
|
|
17641
|
+
case "qq": // 01, 02, 03, 04
|
|
17642
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString);
|
|
17643
|
+
// 1st, 2nd, 3rd, 4th
|
|
17644
|
+
case "qo":
|
|
17645
|
+
return match.ordinalNumber(dateString, { unit: "quarter" });
|
|
17646
|
+
// Q1, Q2, Q3, Q4
|
|
17647
|
+
case "qqq":
|
|
17648
|
+
return (
|
|
17649
|
+
match.quarter(dateString, {
|
|
17650
|
+
width: "abbreviated",
|
|
17651
|
+
context: "standalone",
|
|
17652
|
+
}) ||
|
|
17653
|
+
match.quarter(dateString, {
|
|
17654
|
+
width: "narrow",
|
|
17655
|
+
context: "standalone",
|
|
17656
|
+
})
|
|
17657
|
+
);
|
|
17658
|
+
|
|
17659
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
17660
|
+
case "qqqqq":
|
|
17661
|
+
return match.quarter(dateString, {
|
|
17662
|
+
width: "narrow",
|
|
17663
|
+
context: "standalone",
|
|
17664
|
+
});
|
|
17665
|
+
// 1st quarter, 2nd quarter, ...
|
|
17666
|
+
case "qqqq":
|
|
17667
|
+
default:
|
|
17668
|
+
return (
|
|
17669
|
+
match.quarter(dateString, {
|
|
17670
|
+
width: "wide",
|
|
17671
|
+
context: "standalone",
|
|
17672
|
+
}) ||
|
|
17673
|
+
match.quarter(dateString, {
|
|
17674
|
+
width: "abbreviated",
|
|
17675
|
+
context: "standalone",
|
|
17676
|
+
}) ||
|
|
17677
|
+
match.quarter(dateString, {
|
|
17678
|
+
width: "narrow",
|
|
17679
|
+
context: "standalone",
|
|
17680
|
+
})
|
|
17681
|
+
);
|
|
17682
|
+
}
|
|
17683
|
+
}
|
|
17684
|
+
|
|
17685
|
+
validate(_date, value) {
|
|
17686
|
+
return value >= 1 && value <= 4;
|
|
17687
|
+
}
|
|
17688
|
+
|
|
17689
|
+
set(date, _flags, value) {
|
|
17690
|
+
date.setMonth((value - 1) * 3, 1);
|
|
17691
|
+
date.setHours(0, 0, 0, 0);
|
|
17692
|
+
return date;
|
|
17693
|
+
}
|
|
17694
|
+
|
|
17695
|
+
incompatibleTokens = [
|
|
17696
|
+
"Y",
|
|
17697
|
+
"R",
|
|
17698
|
+
"Q",
|
|
17699
|
+
"M",
|
|
17700
|
+
"L",
|
|
17701
|
+
"w",
|
|
17702
|
+
"I",
|
|
17703
|
+
"d",
|
|
17704
|
+
"D",
|
|
17705
|
+
"i",
|
|
17706
|
+
"e",
|
|
17707
|
+
"c",
|
|
17708
|
+
"t",
|
|
17709
|
+
"T",
|
|
17710
|
+
];
|
|
17711
|
+
}
|
|
17712
|
+
|
|
17713
|
+
|
|
17714
|
+
/***/ }),
|
|
17715
|
+
|
|
17716
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js":
|
|
17717
|
+
/*!*********************************************************************************!*\
|
|
17718
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js ***!
|
|
17719
|
+
\*********************************************************************************/
|
|
17720
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17721
|
+
|
|
17722
|
+
"use strict";
|
|
17723
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17724
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17725
|
+
/* harmony export */ TimestampMillisecondsParser: () => (/* binding */ TimestampMillisecondsParser)
|
|
17726
|
+
/* harmony export */ });
|
|
17727
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
17728
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17729
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17730
|
+
|
|
17731
|
+
|
|
17732
|
+
|
|
17733
|
+
|
|
17734
|
+
|
|
17735
|
+
class TimestampMillisecondsParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17736
|
+
priority = 20;
|
|
17737
|
+
|
|
17738
|
+
parse(dateString) {
|
|
17739
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseAnyDigitsSigned)(dateString);
|
|
17740
|
+
}
|
|
17741
|
+
|
|
17742
|
+
set(date, _flags, value) {
|
|
17743
|
+
return [(0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, value), { timestampIsSet: true }];
|
|
17744
|
+
}
|
|
17745
|
+
|
|
17746
|
+
incompatibleTokens = "*";
|
|
17747
|
+
}
|
|
17748
|
+
|
|
17749
|
+
|
|
17750
|
+
/***/ }),
|
|
17751
|
+
|
|
17752
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js":
|
|
17753
|
+
/*!****************************************************************************!*\
|
|
17754
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js ***!
|
|
17755
|
+
\****************************************************************************/
|
|
17756
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17757
|
+
|
|
17758
|
+
"use strict";
|
|
17759
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17760
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17761
|
+
/* harmony export */ TimestampSecondsParser: () => (/* binding */ TimestampSecondsParser)
|
|
17762
|
+
/* harmony export */ });
|
|
17763
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
17764
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17765
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17766
|
+
|
|
17767
|
+
|
|
17768
|
+
|
|
17769
|
+
|
|
17770
|
+
|
|
17771
|
+
class TimestampSecondsParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17772
|
+
priority = 40;
|
|
17773
|
+
|
|
17774
|
+
parse(dateString) {
|
|
17775
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseAnyDigitsSigned)(dateString);
|
|
17776
|
+
}
|
|
17777
|
+
|
|
17778
|
+
set(date, _flags, value) {
|
|
17779
|
+
return [(0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_2__.constructFrom)(date, value * 1000), { timestampIsSet: true }];
|
|
17780
|
+
}
|
|
17781
|
+
|
|
17782
|
+
incompatibleTokens = "*";
|
|
17783
|
+
}
|
|
17784
|
+
|
|
17785
|
+
|
|
17786
|
+
/***/ }),
|
|
17787
|
+
|
|
17788
|
+
/***/ "./node_modules/date-fns/parse/_lib/parsers/YearParser.js":
|
|
17789
|
+
/*!****************************************************************!*\
|
|
17790
|
+
!*** ./node_modules/date-fns/parse/_lib/parsers/YearParser.js ***!
|
|
17791
|
+
\****************************************************************/
|
|
17792
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17793
|
+
|
|
17794
|
+
"use strict";
|
|
17795
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17796
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17797
|
+
/* harmony export */ YearParser: () => (/* binding */ YearParser)
|
|
17798
|
+
/* harmony export */ });
|
|
17799
|
+
/* harmony import */ var _Parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Parser.js */ "./node_modules/date-fns/parse/_lib/Parser.js");
|
|
17800
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/date-fns/parse/_lib/utils.js");
|
|
17801
|
+
|
|
17802
|
+
|
|
17803
|
+
|
|
17804
|
+
|
|
17805
|
+
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns
|
|
17806
|
+
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
17807
|
+
// |----------|-------|----|-------|-------|-------|
|
|
17808
|
+
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
17809
|
+
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
17810
|
+
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
17811
|
+
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
17812
|
+
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
17813
|
+
class YearParser extends _Parser_js__WEBPACK_IMPORTED_MODULE_0__.Parser {
|
|
17814
|
+
priority = 130;
|
|
17815
|
+
incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"];
|
|
17816
|
+
|
|
17817
|
+
parse(dateString, token, match) {
|
|
17818
|
+
const valueCallback = (year) => ({
|
|
17819
|
+
year,
|
|
17820
|
+
isTwoDigitYear: token === "yy",
|
|
17821
|
+
});
|
|
17822
|
+
|
|
17823
|
+
switch (token) {
|
|
17824
|
+
case "y":
|
|
17825
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(4, dateString), valueCallback);
|
|
17826
|
+
case "yo":
|
|
17827
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)(
|
|
17828
|
+
match.ordinalNumber(dateString, {
|
|
17829
|
+
unit: "year",
|
|
17830
|
+
}),
|
|
17831
|
+
valueCallback,
|
|
17832
|
+
);
|
|
17833
|
+
default:
|
|
17834
|
+
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.mapValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.parseNDigits)(token.length, dateString), valueCallback);
|
|
17835
|
+
}
|
|
17836
|
+
}
|
|
17837
|
+
|
|
17838
|
+
validate(_date, value) {
|
|
17839
|
+
return value.isTwoDigitYear || value.year > 0;
|
|
17840
|
+
}
|
|
17841
|
+
|
|
17842
|
+
set(date, flags, value) {
|
|
17843
|
+
const currentYear = date.getFullYear();
|
|
17844
|
+
|
|
17845
|
+
if (value.isTwoDigitYear) {
|
|
17846
|
+
const normalizedTwoDigitYear = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.normalizeTwoDigitYear)(
|
|
17847
|
+
value.year,
|
|
17848
|
+
currentYear,
|
|
17849
|
+
);
|
|
17850
|
+
date.setFullYear(normalizedTwoDigitYear, 0, 1);
|
|
17851
|
+
date.setHours(0, 0, 0, 0);
|
|
17852
|
+
return date;
|
|
17853
|
+
}
|
|
17854
|
+
|
|
17855
|
+
const year =
|
|
17856
|
+
!("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
|
|
17857
|
+
date.setFullYear(year, 0, 1);
|
|
17858
|
+
date.setHours(0, 0, 0, 0);
|
|
17859
|
+
return date;
|
|
17860
|
+
}
|
|
17861
|
+
}
|
|
17862
|
+
|
|
17863
|
+
|
|
17864
|
+
/***/ }),
|
|
17865
|
+
|
|
17866
|
+
/***/ "./node_modules/date-fns/parse/_lib/utils.js":
|
|
17867
|
+
/*!***************************************************!*\
|
|
17868
|
+
!*** ./node_modules/date-fns/parse/_lib/utils.js ***!
|
|
17869
|
+
\***************************************************/
|
|
17870
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17871
|
+
|
|
17872
|
+
"use strict";
|
|
17873
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17874
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17875
|
+
/* harmony export */ dayPeriodEnumToHours: () => (/* binding */ dayPeriodEnumToHours),
|
|
17876
|
+
/* harmony export */ isLeapYearIndex: () => (/* binding */ isLeapYearIndex),
|
|
17877
|
+
/* harmony export */ mapValue: () => (/* binding */ mapValue),
|
|
17878
|
+
/* harmony export */ normalizeTwoDigitYear: () => (/* binding */ normalizeTwoDigitYear),
|
|
17879
|
+
/* harmony export */ parseAnyDigitsSigned: () => (/* binding */ parseAnyDigitsSigned),
|
|
17880
|
+
/* harmony export */ parseNDigits: () => (/* binding */ parseNDigits),
|
|
17881
|
+
/* harmony export */ parseNDigitsSigned: () => (/* binding */ parseNDigitsSigned),
|
|
17882
|
+
/* harmony export */ parseNumericPattern: () => (/* binding */ parseNumericPattern),
|
|
17883
|
+
/* harmony export */ parseTimezonePattern: () => (/* binding */ parseTimezonePattern)
|
|
17884
|
+
/* harmony export */ });
|
|
17885
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants.js */ "./node_modules/date-fns/constants.js");
|
|
17886
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.js */ "./node_modules/date-fns/parse/_lib/constants.js");
|
|
17887
|
+
|
|
17888
|
+
|
|
17889
|
+
|
|
17890
|
+
|
|
17891
|
+
function mapValue(parseFnResult, mapFn) {
|
|
17892
|
+
if (!parseFnResult) {
|
|
17893
|
+
return parseFnResult;
|
|
17894
|
+
}
|
|
17895
|
+
|
|
17896
|
+
return {
|
|
17897
|
+
value: mapFn(parseFnResult.value),
|
|
17898
|
+
rest: parseFnResult.rest,
|
|
17899
|
+
};
|
|
17900
|
+
}
|
|
17901
|
+
|
|
17902
|
+
function parseNumericPattern(pattern, dateString) {
|
|
17903
|
+
const matchResult = dateString.match(pattern);
|
|
17904
|
+
|
|
17905
|
+
if (!matchResult) {
|
|
17906
|
+
return null;
|
|
17907
|
+
}
|
|
17908
|
+
|
|
17909
|
+
return {
|
|
17910
|
+
value: parseInt(matchResult[0], 10),
|
|
17911
|
+
rest: dateString.slice(matchResult[0].length),
|
|
17912
|
+
};
|
|
17913
|
+
}
|
|
17914
|
+
|
|
17915
|
+
function parseTimezonePattern(pattern, dateString) {
|
|
17916
|
+
const matchResult = dateString.match(pattern);
|
|
17917
|
+
|
|
17918
|
+
if (!matchResult) {
|
|
17919
|
+
return null;
|
|
17920
|
+
}
|
|
17921
|
+
|
|
17922
|
+
// Input is 'Z'
|
|
17923
|
+
if (matchResult[0] === "Z") {
|
|
17924
|
+
return {
|
|
17925
|
+
value: 0,
|
|
17926
|
+
rest: dateString.slice(1),
|
|
17927
|
+
};
|
|
17928
|
+
}
|
|
17929
|
+
|
|
17930
|
+
const sign = matchResult[1] === "+" ? 1 : -1;
|
|
17931
|
+
const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;
|
|
17932
|
+
const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;
|
|
17933
|
+
const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;
|
|
17934
|
+
|
|
17935
|
+
return {
|
|
17936
|
+
value:
|
|
17937
|
+
sign *
|
|
17938
|
+
(hours * _constants_js__WEBPACK_IMPORTED_MODULE_0__.millisecondsInHour +
|
|
17939
|
+
minutes * _constants_js__WEBPACK_IMPORTED_MODULE_0__.millisecondsInMinute +
|
|
17940
|
+
seconds * _constants_js__WEBPACK_IMPORTED_MODULE_0__.millisecondsInSecond),
|
|
17941
|
+
rest: dateString.slice(matchResult[0].length),
|
|
17942
|
+
};
|
|
17943
|
+
}
|
|
17944
|
+
|
|
17945
|
+
function parseAnyDigitsSigned(dateString) {
|
|
17946
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.anyDigitsSigned, dateString);
|
|
17947
|
+
}
|
|
17948
|
+
|
|
17949
|
+
function parseNDigits(n, dateString) {
|
|
17950
|
+
switch (n) {
|
|
17951
|
+
case 1:
|
|
17952
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.singleDigit, dateString);
|
|
17953
|
+
case 2:
|
|
17954
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.twoDigits, dateString);
|
|
17955
|
+
case 3:
|
|
17956
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.threeDigits, dateString);
|
|
17957
|
+
case 4:
|
|
17958
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.fourDigits, dateString);
|
|
17959
|
+
default:
|
|
17960
|
+
return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), dateString);
|
|
17961
|
+
}
|
|
17962
|
+
}
|
|
17963
|
+
|
|
17964
|
+
function parseNDigitsSigned(n, dateString) {
|
|
17965
|
+
switch (n) {
|
|
17966
|
+
case 1:
|
|
17967
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.singleDigitSigned, dateString);
|
|
17968
|
+
case 2:
|
|
17969
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.twoDigitsSigned, dateString);
|
|
17970
|
+
case 3:
|
|
17971
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.threeDigitsSigned, dateString);
|
|
17972
|
+
case 4:
|
|
17973
|
+
return parseNumericPattern(_constants_js__WEBPACK_IMPORTED_MODULE_1__.numericPatterns.fourDigitsSigned, dateString);
|
|
17974
|
+
default:
|
|
17975
|
+
return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), dateString);
|
|
17976
|
+
}
|
|
17977
|
+
}
|
|
17978
|
+
|
|
17979
|
+
function dayPeriodEnumToHours(dayPeriod) {
|
|
17980
|
+
switch (dayPeriod) {
|
|
17981
|
+
case "morning":
|
|
17982
|
+
return 4;
|
|
17983
|
+
case "evening":
|
|
17984
|
+
return 17;
|
|
17985
|
+
case "pm":
|
|
17986
|
+
case "noon":
|
|
17987
|
+
case "afternoon":
|
|
17988
|
+
return 12;
|
|
17989
|
+
case "am":
|
|
17990
|
+
case "midnight":
|
|
17991
|
+
case "night":
|
|
17992
|
+
default:
|
|
17993
|
+
return 0;
|
|
17994
|
+
}
|
|
17995
|
+
}
|
|
17996
|
+
|
|
17997
|
+
function normalizeTwoDigitYear(twoDigitYear, currentYear) {
|
|
17998
|
+
const isCommonEra = currentYear > 0;
|
|
17999
|
+
// Absolute number of the current year:
|
|
18000
|
+
// 1 -> 1 AC
|
|
18001
|
+
// 0 -> 1 BC
|
|
18002
|
+
// -1 -> 2 BC
|
|
18003
|
+
const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;
|
|
18004
|
+
|
|
18005
|
+
let result;
|
|
18006
|
+
if (absCurrentYear <= 50) {
|
|
18007
|
+
result = twoDigitYear || 100;
|
|
18008
|
+
} else {
|
|
18009
|
+
const rangeEnd = absCurrentYear + 50;
|
|
18010
|
+
const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100;
|
|
18011
|
+
const isPreviousCentury = twoDigitYear >= rangeEnd % 100;
|
|
18012
|
+
result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);
|
|
18013
|
+
}
|
|
18014
|
+
|
|
18015
|
+
return isCommonEra ? result : 1 - result;
|
|
18016
|
+
}
|
|
18017
|
+
|
|
18018
|
+
function isLeapYearIndex(year) {
|
|
18019
|
+
return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);
|
|
18020
|
+
}
|
|
18021
|
+
|
|
18022
|
+
|
|
18023
|
+
/***/ }),
|
|
18024
|
+
|
|
18025
|
+
/***/ "./node_modules/date-fns/setDay.js":
|
|
18026
|
+
/*!*****************************************!*\
|
|
18027
|
+
!*** ./node_modules/date-fns/setDay.js ***!
|
|
18028
|
+
\*****************************************/
|
|
18029
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18030
|
+
|
|
18031
|
+
"use strict";
|
|
18032
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18033
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18034
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18035
|
+
/* harmony export */ setDay: () => (/* binding */ setDay)
|
|
18036
|
+
/* harmony export */ });
|
|
18037
|
+
/* harmony import */ var _lib_defaultOptions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/defaultOptions.js */ "./node_modules/date-fns/_lib/defaultOptions.js");
|
|
18038
|
+
/* harmony import */ var _addDays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addDays.js */ "./node_modules/date-fns/addDays.js");
|
|
18039
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
18040
|
+
|
|
18041
|
+
|
|
18042
|
+
|
|
18043
|
+
|
|
18044
|
+
/**
|
|
18045
|
+
* The {@link setDay} function options.
|
|
18046
|
+
*/
|
|
18047
|
+
|
|
18048
|
+
/**
|
|
18049
|
+
* @name setDay
|
|
18050
|
+
* @category Weekday Helpers
|
|
18051
|
+
* @summary Set the day of the week to the given date.
|
|
18052
|
+
*
|
|
18053
|
+
* @description
|
|
18054
|
+
* Set the day of the week to the given date.
|
|
18055
|
+
*
|
|
18056
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18057
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
18058
|
+
*
|
|
18059
|
+
* @param date - The date to be changed
|
|
18060
|
+
* @param day - The day of the week of the new date
|
|
18061
|
+
* @param options - An object with options.
|
|
18062
|
+
*
|
|
18063
|
+
* @returns The new date with the day of the week set
|
|
18064
|
+
*
|
|
18065
|
+
* @example
|
|
18066
|
+
* // Set week day to Sunday, with the default weekStartsOn of Sunday:
|
|
18067
|
+
* const result = setDay(new Date(2014, 8, 1), 0)
|
|
18068
|
+
* //=> Sun Aug 31 2014 00:00:00
|
|
18069
|
+
*
|
|
18070
|
+
* @example
|
|
18071
|
+
* // Set week day to Sunday, with a weekStartsOn of Monday:
|
|
18072
|
+
* const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })
|
|
18073
|
+
* //=> Sun Sep 07 2014 00:00:00
|
|
18074
|
+
*/
|
|
18075
|
+
function setDay(date, day, options) {
|
|
18076
|
+
const defaultOptions = (0,_lib_defaultOptions_js__WEBPACK_IMPORTED_MODULE_0__.getDefaultOptions)();
|
|
18077
|
+
const weekStartsOn =
|
|
18078
|
+
options?.weekStartsOn ??
|
|
18079
|
+
options?.locale?.options?.weekStartsOn ??
|
|
18080
|
+
defaultOptions.weekStartsOn ??
|
|
18081
|
+
defaultOptions.locale?.options?.weekStartsOn ??
|
|
18082
|
+
0;
|
|
18083
|
+
|
|
18084
|
+
const date_ = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_1__.toDate)(date, options?.in);
|
|
18085
|
+
const currentDay = date_.getDay();
|
|
18086
|
+
|
|
18087
|
+
const remainder = day % 7;
|
|
18088
|
+
const dayIndex = (remainder + 7) % 7;
|
|
18089
|
+
|
|
18090
|
+
const delta = 7 - weekStartsOn;
|
|
18091
|
+
const diff =
|
|
18092
|
+
day < 0 || day > 6
|
|
18093
|
+
? day - ((currentDay + delta) % 7)
|
|
18094
|
+
: ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);
|
|
18095
|
+
return (0,_addDays_js__WEBPACK_IMPORTED_MODULE_2__.addDays)(date_, diff, options);
|
|
18096
|
+
}
|
|
18097
|
+
|
|
18098
|
+
// Fallback for modularized imports:
|
|
18099
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setDay);
|
|
18100
|
+
|
|
18101
|
+
|
|
18102
|
+
/***/ }),
|
|
18103
|
+
|
|
18104
|
+
/***/ "./node_modules/date-fns/setISODay.js":
|
|
18105
|
+
/*!********************************************!*\
|
|
18106
|
+
!*** ./node_modules/date-fns/setISODay.js ***!
|
|
18107
|
+
\********************************************/
|
|
18108
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18109
|
+
|
|
18110
|
+
"use strict";
|
|
18111
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18112
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18113
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18114
|
+
/* harmony export */ setISODay: () => (/* binding */ setISODay)
|
|
18115
|
+
/* harmony export */ });
|
|
18116
|
+
/* harmony import */ var _addDays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addDays.js */ "./node_modules/date-fns/addDays.js");
|
|
18117
|
+
/* harmony import */ var _getISODay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getISODay.js */ "./node_modules/date-fns/getISODay.js");
|
|
18118
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
18119
|
+
|
|
18120
|
+
|
|
18121
|
+
|
|
18122
|
+
|
|
18123
|
+
/**
|
|
18124
|
+
* The {@link setISODay} function options.
|
|
18125
|
+
*/
|
|
18126
|
+
|
|
18127
|
+
/**
|
|
18128
|
+
* @name setISODay
|
|
18129
|
+
* @category Weekday Helpers
|
|
18130
|
+
* @summary Set the day of the ISO week to the given date.
|
|
18131
|
+
*
|
|
18132
|
+
* @description
|
|
18133
|
+
* Set the day of the ISO week to the given date.
|
|
18134
|
+
* ISO week starts with Monday.
|
|
18135
|
+
* 7 is the index of Sunday, 1 is the index of Monday, etc.
|
|
18136
|
+
*
|
|
18137
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18138
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
18139
|
+
*
|
|
18140
|
+
* @param date - The date to be changed
|
|
18141
|
+
* @param day - The day of the ISO week of the new date
|
|
18142
|
+
* @param options - An object with options
|
|
18143
|
+
*
|
|
18144
|
+
* @returns The new date with the day of the ISO week set
|
|
18145
|
+
*
|
|
18146
|
+
* @example
|
|
18147
|
+
* // Set Sunday to 1 September 2014:
|
|
18148
|
+
* const result = setISODay(new Date(2014, 8, 1), 7)
|
|
18149
|
+
* //=> Sun Sep 07 2014 00:00:00
|
|
18150
|
+
*/
|
|
18151
|
+
function setISODay(date, day, options) {
|
|
18152
|
+
const date_ = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in);
|
|
18153
|
+
const currentDay = (0,_getISODay_js__WEBPACK_IMPORTED_MODULE_1__.getISODay)(date_, options);
|
|
18154
|
+
const diff = day - currentDay;
|
|
18155
|
+
return (0,_addDays_js__WEBPACK_IMPORTED_MODULE_2__.addDays)(date_, diff, options);
|
|
18156
|
+
}
|
|
18157
|
+
|
|
18158
|
+
// Fallback for modularized imports:
|
|
18159
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setISODay);
|
|
18160
|
+
|
|
18161
|
+
|
|
18162
|
+
/***/ }),
|
|
18163
|
+
|
|
18164
|
+
/***/ "./node_modules/date-fns/setISOWeek.js":
|
|
18165
|
+
/*!*********************************************!*\
|
|
18166
|
+
!*** ./node_modules/date-fns/setISOWeek.js ***!
|
|
18167
|
+
\*********************************************/
|
|
18168
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18169
|
+
|
|
18170
|
+
"use strict";
|
|
18171
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18172
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18173
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18174
|
+
/* harmony export */ setISOWeek: () => (/* binding */ setISOWeek)
|
|
18175
|
+
/* harmony export */ });
|
|
18176
|
+
/* harmony import */ var _getISOWeek_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getISOWeek.js */ "./node_modules/date-fns/getISOWeek.js");
|
|
18177
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
18178
|
+
|
|
18179
|
+
|
|
18180
|
+
|
|
18181
|
+
/**
|
|
18182
|
+
* The {@link setISOWeek} function options.
|
|
18183
|
+
*/
|
|
18184
|
+
|
|
18185
|
+
/**
|
|
18186
|
+
* @name setISOWeek
|
|
18187
|
+
* @category ISO Week Helpers
|
|
18188
|
+
* @summary Set the ISO week to the given date.
|
|
18189
|
+
*
|
|
18190
|
+
* @description
|
|
18191
|
+
* Set the ISO week to the given date, saving the weekday number.
|
|
18192
|
+
*
|
|
18193
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
18194
|
+
*
|
|
18195
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18196
|
+
* @typeParam ResultDate - The `Date` type of the context function.
|
|
18197
|
+
*
|
|
18198
|
+
* @param date - The date to be changed
|
|
18199
|
+
* @param week - The ISO week of the new date
|
|
18200
|
+
* @param options - An object with options
|
|
18201
|
+
*
|
|
18202
|
+
* @returns The new date with the ISO week set
|
|
18203
|
+
*
|
|
18204
|
+
* @example
|
|
18205
|
+
* // Set the 53rd ISO week to 7 August 2004:
|
|
18206
|
+
* const result = setISOWeek(new Date(2004, 7, 7), 53)
|
|
18207
|
+
* //=> Sat Jan 01 2005 00:00:00
|
|
18208
|
+
*/
|
|
18209
|
+
function setISOWeek(date, week, options) {
|
|
18210
|
+
const _date = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in);
|
|
18211
|
+
const diff = (0,_getISOWeek_js__WEBPACK_IMPORTED_MODULE_1__.getISOWeek)(_date, options) - week;
|
|
18212
|
+
_date.setDate(_date.getDate() - diff * 7);
|
|
18213
|
+
return _date;
|
|
18214
|
+
}
|
|
18215
|
+
|
|
18216
|
+
// Fallback for modularized imports:
|
|
18217
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setISOWeek);
|
|
18218
|
+
|
|
18219
|
+
|
|
18220
|
+
/***/ }),
|
|
18221
|
+
|
|
18222
|
+
/***/ "./node_modules/date-fns/setWeek.js":
|
|
18223
|
+
/*!******************************************!*\
|
|
18224
|
+
!*** ./node_modules/date-fns/setWeek.js ***!
|
|
18225
|
+
\******************************************/
|
|
18226
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18227
|
+
|
|
18228
|
+
"use strict";
|
|
18229
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18230
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18231
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18232
|
+
/* harmony export */ setWeek: () => (/* binding */ setWeek)
|
|
18233
|
+
/* harmony export */ });
|
|
18234
|
+
/* harmony import */ var _getWeek_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getWeek.js */ "./node_modules/date-fns/getWeek.js");
|
|
18235
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
18236
|
+
|
|
18237
|
+
|
|
18238
|
+
|
|
18239
|
+
/**
|
|
18240
|
+
* The {@link setWeek} function options.
|
|
18241
|
+
*/
|
|
18242
|
+
|
|
18243
|
+
/**
|
|
18244
|
+
* @name setWeek
|
|
18245
|
+
* @category Week Helpers
|
|
18246
|
+
* @summary Set the local week to the given date.
|
|
18247
|
+
*
|
|
18248
|
+
* @description
|
|
18249
|
+
* Set the local week to the given date, saving the weekday number.
|
|
18250
|
+
* The exact calculation depends on the values of
|
|
18251
|
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
18252
|
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
18253
|
+
* the first week of the week-numbering year)
|
|
18254
|
+
*
|
|
18255
|
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
18256
|
+
*
|
|
18257
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18258
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
18259
|
+
*
|
|
18260
|
+
* @param date - The date to be changed
|
|
18261
|
+
* @param week - The week of the new date
|
|
18262
|
+
* @param options - An object with options
|
|
18263
|
+
*
|
|
18264
|
+
* @returns The new date with the local week set
|
|
18265
|
+
*
|
|
18266
|
+
* @example
|
|
18267
|
+
* // Set the 1st week to 2 January 2005 with default options:
|
|
18268
|
+
* const result = setWeek(new Date(2005, 0, 2), 1)
|
|
18269
|
+
* //=> Sun Dec 26 2004 00:00:00
|
|
18270
|
+
*
|
|
18271
|
+
* @example
|
|
18272
|
+
* // Set the 1st week to 2 January 2005,
|
|
18273
|
+
* // if Monday is the first day of the week,
|
|
18274
|
+
* // and the first week of the year always contains 4 January:
|
|
18275
|
+
* const result = setWeek(new Date(2005, 0, 2), 1, {
|
|
18276
|
+
* weekStartsOn: 1,
|
|
18277
|
+
* firstWeekContainsDate: 4
|
|
18278
|
+
* })
|
|
18279
|
+
* //=> Sun Jan 4 2004 00:00:00
|
|
18280
|
+
*/
|
|
18281
|
+
function setWeek(date, week, options) {
|
|
18282
|
+
const date_ = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in);
|
|
18283
|
+
const diff = (0,_getWeek_js__WEBPACK_IMPORTED_MODULE_1__.getWeek)(date_, options) - week;
|
|
18284
|
+
date_.setDate(date_.getDate() - diff * 7);
|
|
18285
|
+
return (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date_, options?.in);
|
|
18286
|
+
}
|
|
18287
|
+
|
|
18288
|
+
// Fallback for modularized imports:
|
|
18289
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setWeek);
|
|
18290
|
+
|
|
18291
|
+
|
|
18292
|
+
/***/ }),
|
|
18293
|
+
|
|
18294
|
+
/***/ "./node_modules/date-fns/startOfDay.js":
|
|
18295
|
+
/*!*********************************************!*\
|
|
18296
|
+
!*** ./node_modules/date-fns/startOfDay.js ***!
|
|
18297
|
+
\*********************************************/
|
|
18298
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18299
|
+
|
|
18300
|
+
"use strict";
|
|
18301
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18302
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18303
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18304
|
+
/* harmony export */ startOfDay: () => (/* binding */ startOfDay)
|
|
18305
|
+
/* harmony export */ });
|
|
18306
|
+
/* harmony import */ var _toDate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toDate.js */ "./node_modules/date-fns/toDate.js");
|
|
18307
|
+
|
|
18308
|
+
|
|
18309
|
+
/**
|
|
18310
|
+
* The {@link startOfDay} function options.
|
|
18311
|
+
*/
|
|
18312
|
+
|
|
18313
|
+
/**
|
|
18314
|
+
* @name startOfDay
|
|
18315
|
+
* @category Day Helpers
|
|
18316
|
+
* @summary Return the start of a day for the given date.
|
|
18317
|
+
*
|
|
18318
|
+
* @description
|
|
18319
|
+
* Return the start of a day for the given date.
|
|
18320
|
+
* The result will be in the local timezone.
|
|
18321
|
+
*
|
|
18322
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18323
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
18324
|
+
*
|
|
18325
|
+
* @param date - The original date
|
|
18326
|
+
* @param options - The options
|
|
18327
|
+
*
|
|
18328
|
+
* @returns The start of a day
|
|
18329
|
+
*
|
|
18330
|
+
* @example
|
|
18331
|
+
* // The start of a day for 2 September 2014 11:55:00:
|
|
18332
|
+
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
18333
|
+
* //=> Tue Sep 02 2014 00:00:00
|
|
18334
|
+
*/
|
|
18335
|
+
function startOfDay(date, options) {
|
|
18336
|
+
const _date = (0,_toDate_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(date, options?.in);
|
|
18337
|
+
_date.setHours(0, 0, 0, 0);
|
|
18338
|
+
return _date;
|
|
18339
|
+
}
|
|
18340
|
+
|
|
18341
|
+
// Fallback for modularized imports:
|
|
18342
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfDay);
|
|
18343
|
+
|
|
18344
|
+
|
|
18345
|
+
/***/ }),
|
|
18346
|
+
|
|
18347
|
+
/***/ "./node_modules/date-fns/startOfISOWeek.js":
|
|
18348
|
+
/*!*************************************************!*\
|
|
18349
|
+
!*** ./node_modules/date-fns/startOfISOWeek.js ***!
|
|
18350
|
+
\*************************************************/
|
|
18351
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18352
|
+
|
|
18353
|
+
"use strict";
|
|
18354
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18355
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18356
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18357
|
+
/* harmony export */ startOfISOWeek: () => (/* binding */ startOfISOWeek)
|
|
18358
|
+
/* harmony export */ });
|
|
18359
|
+
/* harmony import */ var _startOfWeek_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./startOfWeek.js */ "./node_modules/date-fns/startOfWeek.js");
|
|
18360
|
+
|
|
18361
|
+
|
|
18362
|
+
/**
|
|
18363
|
+
* The {@link startOfISOWeek} function options.
|
|
18364
|
+
*/
|
|
18365
|
+
|
|
18366
|
+
/**
|
|
18367
|
+
* @name startOfISOWeek
|
|
18368
|
+
* @category ISO Week Helpers
|
|
18369
|
+
* @summary Return the start of an ISO week for the given date.
|
|
18370
|
+
*
|
|
18371
|
+
* @description
|
|
18372
|
+
* Return the start of an ISO week for the given date.
|
|
18373
|
+
* The result will be in the local timezone.
|
|
18374
|
+
*
|
|
18375
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
18376
|
+
*
|
|
18377
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
18378
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
18379
|
+
*
|
|
18380
|
+
* @param date - The original date
|
|
18381
|
+
* @param options - An object with options
|
|
18382
|
+
*
|
|
18383
|
+
* @returns The start of an ISO week
|
|
18384
|
+
*
|
|
18385
|
+
* @example
|
|
18386
|
+
* // The start of an ISO week for 2 September 2014 11:55:00:
|
|
18387
|
+
* const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
18388
|
+
* //=> Mon Sep 01 2014 00:00:00
|
|
18389
|
+
*/
|
|
18390
|
+
function startOfISOWeek(date, options) {
|
|
18391
|
+
return (0,_startOfWeek_js__WEBPACK_IMPORTED_MODULE_0__.startOfWeek)(date, { ...options, weekStartsOn: 1 });
|
|
18392
|
+
}
|
|
18393
|
+
|
|
18394
|
+
// Fallback for modularized imports:
|
|
18395
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (startOfISOWeek);
|
|
18396
|
+
|
|
18397
|
+
|
|
18398
|
+
/***/ }),
|
|
18399
|
+
|
|
18400
|
+
/***/ "./node_modules/date-fns/startOfISOWeekYear.js":
|
|
18401
|
+
/*!*****************************************************!*\
|
|
18402
|
+
!*** ./node_modules/date-fns/startOfISOWeekYear.js ***!
|
|
18403
|
+
\*****************************************************/
|
|
14800
18404
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
14801
18405
|
|
|
14802
18406
|
"use strict";
|
|
@@ -15234,6 +18838,76 @@ function toDate(argument, context) {
|
|
|
15234
18838
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toDate);
|
|
15235
18839
|
|
|
15236
18840
|
|
|
18841
|
+
/***/ }),
|
|
18842
|
+
|
|
18843
|
+
/***/ "./node_modules/date-fns/transpose.js":
|
|
18844
|
+
/*!********************************************!*\
|
|
18845
|
+
!*** ./node_modules/date-fns/transpose.js ***!
|
|
18846
|
+
\********************************************/
|
|
18847
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
18848
|
+
|
|
18849
|
+
"use strict";
|
|
18850
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18851
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18852
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
18853
|
+
/* harmony export */ transpose: () => (/* binding */ transpose)
|
|
18854
|
+
/* harmony export */ });
|
|
18855
|
+
/* harmony import */ var _constructFrom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constructFrom.js */ "./node_modules/date-fns/constructFrom.js");
|
|
18856
|
+
|
|
18857
|
+
|
|
18858
|
+
/**
|
|
18859
|
+
* @name transpose
|
|
18860
|
+
* @category Generic Helpers
|
|
18861
|
+
* @summary Transpose the date to the given constructor.
|
|
18862
|
+
*
|
|
18863
|
+
* @description
|
|
18864
|
+
* The function transposes the date to the given constructor. It helps you
|
|
18865
|
+
* to transpose the date in the system time zone to say `UTCDate` or any other
|
|
18866
|
+
* date extension.
|
|
18867
|
+
*
|
|
18868
|
+
* @typeParam InputDate - The input `Date` type derived from the passed argument.
|
|
18869
|
+
* @typeParam ResultDate - The result `Date` type derived from the passed constructor.
|
|
18870
|
+
*
|
|
18871
|
+
* @param date - The date to use values from
|
|
18872
|
+
* @param constructor - The date constructor to use
|
|
18873
|
+
*
|
|
18874
|
+
* @returns Date transposed to the given constructor
|
|
18875
|
+
*
|
|
18876
|
+
* @example
|
|
18877
|
+
* // Create July 10, 2022 00:00 in locale time zone
|
|
18878
|
+
* const date = new Date(2022, 6, 10)
|
|
18879
|
+
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'
|
|
18880
|
+
*
|
|
18881
|
+
* @example
|
|
18882
|
+
* // Transpose the date to July 10, 2022 00:00 in UTC
|
|
18883
|
+
* transpose(date, UTCDate)
|
|
18884
|
+
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'
|
|
18885
|
+
*/
|
|
18886
|
+
function transpose(date, constructor) {
|
|
18887
|
+
const date_ = isConstructor(constructor)
|
|
18888
|
+
? new constructor(0)
|
|
18889
|
+
: (0,_constructFrom_js__WEBPACK_IMPORTED_MODULE_0__.constructFrom)(constructor, 0);
|
|
18890
|
+
date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
|
|
18891
|
+
date_.setHours(
|
|
18892
|
+
date.getHours(),
|
|
18893
|
+
date.getMinutes(),
|
|
18894
|
+
date.getSeconds(),
|
|
18895
|
+
date.getMilliseconds(),
|
|
18896
|
+
);
|
|
18897
|
+
return date_;
|
|
18898
|
+
}
|
|
18899
|
+
|
|
18900
|
+
function isConstructor(constructor) {
|
|
18901
|
+
return (
|
|
18902
|
+
typeof constructor === "function" &&
|
|
18903
|
+
constructor.prototype?.constructor === constructor
|
|
18904
|
+
);
|
|
18905
|
+
}
|
|
18906
|
+
|
|
18907
|
+
// Fallback for modularized imports:
|
|
18908
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (transpose);
|
|
18909
|
+
|
|
18910
|
+
|
|
15237
18911
|
/***/ }),
|
|
15238
18912
|
|
|
15239
18913
|
/***/ "./node_modules/imask/esm/controls/html-contenteditable-mask-element.js":
|