@quidgest/ui 0.17.2 → 0.17.3
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/json/api.json +1 -1
- package/dist/ui.esm.js +980 -9022
- package/dist/ui.js +971 -45
- package/dist/ui.min.js +792 -875
- package/dist/ui.scss +1 -1
- package/esm/_virtual/_plugin-vue_export-helper.js +7 -8
- package/esm/_virtual/_rolldown/runtime.js +11 -0
- package/esm/components/QAccordion/QAccordion.vue.js +45 -43
- package/esm/components/QAccordion/QAccordion2.vue.js +5 -0
- package/esm/components/QAccordion/QAccordionItem.vue.js +33 -39
- package/esm/components/QAccordion/QAccordionItem2.vue.js +5 -0
- package/esm/components/QAccordion/index.js +7 -8
- package/esm/components/QAvatar/QAvatar.vue.js +41 -48
- package/esm/components/QAvatar/QAvatar2.vue.js +5 -0
- package/esm/components/QAvatar/index.js +6 -6
- package/esm/components/QBadge/QBadge.vue.js +98 -142
- package/esm/components/QBadge/QBadge2.vue.js +5 -0
- package/esm/components/QBadge/constants.js +4 -11
- package/esm/components/QBadge/index.js +6 -6
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +38 -49
- package/esm/components/QBadgeIndicator/QBadgeIndicator2.vue.js +5 -0
- package/esm/components/QBadgeIndicator/index.js +6 -6
- package/esm/components/QButton/QButton.vue.js +73 -84
- package/esm/components/QButton/QButton2.vue.js +5 -0
- package/esm/components/QButton/index.js +6 -6
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +33 -37
- package/esm/components/QButtonGroup/QButtonGroup2.vue.js +5 -0
- package/esm/components/QButtonGroup/index.js +6 -6
- package/esm/components/QCard/QCard.vue.js +91 -133
- package/esm/components/QCard/QCard2.vue.js +5 -0
- package/esm/components/QCard/index.js +6 -6
- package/esm/components/QCarousel/QCarousel.vue.js +247 -354
- package/esm/components/QCarousel/QCarousel2.vue.js +5 -0
- package/esm/components/QCarousel/constants.js +10 -15
- package/esm/components/QCarousel/index.js +6 -6
- package/esm/components/QCheckbox/QCheckbox.vue.js +133 -143
- package/esm/components/QCheckbox/QCheckbox2.vue.js +5 -0
- package/esm/components/QCheckbox/QCheckboxLabel.vue.js +31 -32
- package/esm/components/QCheckbox/QCheckboxLabel2.vue.js +5 -0
- package/esm/components/QCheckbox/constants.js +6 -10
- package/esm/components/QCheckbox/index.js +7 -8
- package/esm/components/QCollapsible/QCollapsible.vue.js +90 -136
- package/esm/components/QCollapsible/QCollapsible2.vue.js +5 -0
- package/esm/components/QCollapsible/constants.js +5 -7
- package/esm/components/QCollapsible/index.js +6 -6
- package/esm/components/QColorPicker/QColorPicker.vue.js +96 -100
- package/esm/components/QColorPicker/QColorPicker2.vue.js +5 -0
- package/esm/components/QColorPicker/constants.js +4 -6
- package/esm/components/QColorPicker/index.js +6 -6
- package/esm/components/QCombobox/QCombobox.vue.js +316 -364
- package/esm/components/QCombobox/QCombobox2.vue.js +5 -0
- package/esm/components/QCombobox/constants.js +12 -13
- package/esm/components/QCombobox/index.js +6 -6
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +1119 -1449
- package/esm/components/QDateTimePicker/QDateTimePicker2.vue.js +5 -0
- package/esm/components/QDateTimePicker/constants.js +72 -91
- package/esm/components/QDateTimePicker/index.js +6 -6
- package/esm/components/QDefaultsProvider/QDefaultsProvider.vue.js +15 -15
- package/esm/components/QDefaultsProvider/QDefaultsProvider2.vue.js +5 -0
- package/esm/components/QDefaultsProvider/index.js +6 -6
- package/esm/components/QDialog/QDialog.vue.js +175 -226
- package/esm/components/QDialog/QDialog2.vue.js +5 -0
- package/esm/components/QDialog/QDialogProvider.vue.js +26 -35
- package/esm/components/QDialog/QDialogProvider2.vue.js +5 -0
- package/esm/components/QDialog/constants.js +11 -23
- package/esm/components/QDialog/index.js +7 -8
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +63 -69
- package/esm/components/QDismissibleLayer/QDismissibleLayer2.vue.js +5 -0
- package/esm/components/QDismissibleLayer/index.js +6 -6
- package/esm/components/QDivider/QDivider.vue.js +39 -62
- package/esm/components/QDivider/QDivider2.vue.js +5 -0
- package/esm/components/QDivider/index.js +6 -6
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +54 -64
- package/esm/components/QDropdownMenu/QDropdownMenu2.vue.js +5 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +196 -215
- package/esm/components/QDropdownMenu/QDropdownMenuContent2.vue.js +5 -0
- package/esm/components/QDropdownMenu/constants.js +4 -8
- package/esm/components/QDropdownMenu/index.js +6 -6
- package/esm/components/QField/QField.vue.js +74 -90
- package/esm/components/QField/QField2.vue.js +5 -0
- package/esm/components/QField/index.js +6 -6
- package/esm/components/QFileUpload/QFileUpload.vue.js +156 -241
- package/esm/components/QFileUpload/QFileUpload2.vue.js +5 -0
- package/esm/components/QFileUpload/constants.js +16 -27
- package/esm/components/QFileUpload/index.js +6 -6
- package/esm/components/QFocusWrap/QFocusWrap.vue.js +89 -118
- package/esm/components/QFocusWrap/QFocusWrap2.vue.js +5 -0
- package/esm/components/QFocusWrap/index.js +6 -6
- package/esm/components/QGrid/QCol.vue.js +33 -48
- package/esm/components/QGrid/QCol2.vue.js +5 -0
- package/esm/components/QGrid/QContainer.vue.js +11 -23
- package/esm/components/QGrid/QContainer2.vue.js +5 -0
- package/esm/components/QGrid/QRow.vue.js +24 -35
- package/esm/components/QGrid/QRow2.vue.js +5 -0
- package/esm/components/QGrid/QSpacer.vue.js +9 -9
- package/esm/components/QGrid/index.js +9 -12
- package/esm/components/QGroupBox/QGroupBox.vue.js +32 -43
- package/esm/components/QGroupBox/QGroupBox2.vue.js +5 -0
- package/esm/components/QGroupBox/index.js +6 -6
- package/esm/components/QIcon/InlineSvg.js +92 -129
- package/esm/components/QIcon/QIcon.vue.js +40 -42
- package/esm/components/QIcon/QIcon2.vue.js +5 -0
- package/esm/components/QIcon/QIconFont.vue.js +26 -20
- package/esm/components/QIcon/QIconFont2.vue.js +5 -0
- package/esm/components/QIcon/QIconImg.vue.js +23 -19
- package/esm/components/QIcon/QIconImg2.vue.js +5 -0
- package/esm/components/QIcon/QIconSvg.vue.js +40 -31
- package/esm/components/QIcon/QIconSvg2.vue.js +5 -0
- package/esm/components/QIcon/index.js +9 -12
- package/esm/components/QInputGroup/QInputGroup.vue.js +62 -89
- package/esm/components/QInputGroup/QInputGroup2.vue.js +5 -0
- package/esm/components/QInputGroup/index.js +6 -6
- package/esm/components/QLabel/QLabel.vue.js +33 -43
- package/esm/components/QLabel/QLabel2.vue.js +5 -0
- package/esm/components/QLabel/index.js +6 -6
- package/esm/components/QLineLoader/QLineLoader.vue.js +26 -26
- package/esm/components/QLineLoader/QLineLoader2.vue.js +5 -0
- package/esm/components/QLineLoader/index.js +6 -6
- package/esm/components/QList/QList.vue.js +229 -241
- package/esm/components/QList/QList2.vue.js +5 -0
- package/esm/components/QList/QListItem.vue.js +84 -118
- package/esm/components/QList/QListItem2.vue.js +5 -0
- package/esm/components/QList/QListItemGroup.vue.js +25 -28
- package/esm/components/QList/QListItemGroup2.vue.js +5 -0
- package/esm/components/QList/constants.js +6 -10
- package/esm/components/QList/index.js +8 -10
- package/esm/components/QMeter/QMeter.vue.js +39 -61
- package/esm/components/QMeter/QMeter2.vue.js +5 -0
- package/esm/components/QMeter/index.js +6 -6
- package/esm/components/QOverlay/QOverlay.vue.js +282 -322
- package/esm/components/QOverlay/QOverlay2.vue.js +5 -0
- package/esm/components/QOverlay/index.js +6 -6
- package/esm/components/QPasswordField/QPasswordField.vue.js +142 -163
- package/esm/components/QPasswordField/QPasswordField2.vue.js +5 -0
- package/esm/components/QPasswordField/QPasswordFieldMessages.vue.js +11 -27
- package/esm/components/QPasswordField/QPasswordFieldMessages2.vue.js +5 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +82 -103
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay2.vue.js +5 -0
- package/esm/components/QPasswordField/constants.js +6 -10
- package/esm/components/QPasswordField/index.js +6 -6
- package/esm/components/QPopover/QPopover.vue.js +74 -95
- package/esm/components/QPopover/QPopover2.vue.js +5 -0
- package/esm/components/QPopover/index.js +6 -6
- package/esm/components/QPropertyList/QPropertyList.vue.js +109 -154
- package/esm/components/QPropertyList/QPropertyList2.vue.js +5 -0
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +46 -68
- package/esm/components/QPropertyList/QPropertyListGroup2.vue.js +5 -0
- package/esm/components/QPropertyList/QPropertyListPanel.vue.js +24 -47
- package/esm/components/QPropertyList/QPropertyListPanel2.vue.js +5 -0
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +60 -80
- package/esm/components/QPropertyList/QPropertyListRow2.vue.js +5 -0
- package/esm/components/QPropertyList/constants.js +6 -13
- package/esm/components/QPropertyList/index.js +9 -12
- package/esm/components/QRadioGroup/QRadioButton.vue.js +99 -96
- package/esm/components/QRadioGroup/QRadioButton2.vue.js +5 -0
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +79 -87
- package/esm/components/QRadioGroup/QRadioGroup2.vue.js +5 -0
- package/esm/components/QRadioGroup/index.js +7 -8
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue.js +49 -51
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar2.vue.js +5 -0
- package/esm/components/QRemoveScrollBar/constants.js +4 -8
- package/esm/components/QRemoveScrollBar/index.js +6 -6
- package/esm/components/QRemoveScrollBar/utils/gap.js +24 -22
- package/esm/components/QRemoveScrollBar/utils/stylesheet.js +19 -20
- package/esm/components/QSelect/QSelect.vue.js +399 -583
- package/esm/components/QSelect/QSelect2.vue.js +5 -0
- package/esm/components/QSelect/constants.js +14 -15
- package/esm/components/QSelect/index.js +6 -6
- package/esm/components/QSidebar/QSidebar.vue.js +133 -157
- package/esm/components/QSidebar/QSidebar2.vue.js +5 -0
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +79 -110
- package/esm/components/QSidebar/QSidebarAnchor2.vue.js +5 -0
- package/esm/components/QSidebar/QSidebarPanel.vue.js +68 -88
- package/esm/components/QSidebar/QSidebarPanel2.vue.js +5 -0
- package/esm/components/QSidebar/index.js +6 -6
- package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +28 -35
- package/esm/components/QSkeletonLoader/QSkeletonLoader2.vue.js +5 -0
- package/esm/components/QSkeletonLoader/index.js +6 -6
- package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +19 -21
- package/esm/components/QSpinnerLoader/QSpinnerLoader2.vue.js +5 -0
- package/esm/components/QSpinnerLoader/index.js +6 -6
- package/esm/components/QSwitch/QSwitch.vue.js +83 -124
- package/esm/components/QSwitch/QSwitch2.vue.js +5 -0
- package/esm/components/QSwitch/index.js +6 -6
- package/esm/components/QTextArea/QTextArea.vue.js +113 -110
- package/esm/components/QTextArea/QTextArea2.vue.js +5 -0
- package/esm/components/QTextArea/index.js +6 -6
- package/esm/components/QTextField/QTextField.vue.js +115 -118
- package/esm/components/QTextField/QTextField2.vue.js +5 -0
- package/esm/components/QTextField/index.js +7 -6
- package/esm/components/QTextField/types.js +5 -7
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +31 -33
- package/esm/components/QThemeProvider/QThemeProvider2.vue.js +5 -0
- package/esm/components/QThemeProvider/index.js +6 -6
- package/esm/components/QToast/QToast.vue.js +140 -213
- package/esm/components/QToast/QToast2.vue.js +5 -0
- package/esm/components/QToast/QToaster.vue.js +38 -47
- package/esm/components/QToast/QToaster2.vue.js +5 -0
- package/esm/components/QToast/constants.js +4 -8
- package/esm/components/QToast/index.js +7 -8
- package/esm/components/QToggle/QToggle.vue.js +39 -42
- package/esm/components/QToggle/QToggle2.vue.js +5 -0
- package/esm/components/QToggle/index.js +6 -6
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +55 -49
- package/esm/components/QToggleGroup/QToggleGroup2.vue.js +5 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +33 -43
- package/esm/components/QToggleGroup/QToggleGroupItem2.vue.js +5 -0
- package/esm/components/QToggleGroup/index.js +7 -8
- package/esm/components/QTooltip/QTooltip.vue.js +93 -113
- package/esm/components/QTooltip/QTooltip2.vue.js +5 -0
- package/esm/components/QTooltip/index.js +6 -6
- package/esm/components/__internal__/QChevron/QChevron.vue.js +28 -30
- package/esm/components/__internal__/QChevron/QChevron2.vue.js +5 -0
- package/esm/components/__internal__/QChevron/constants.js +4 -8
- package/esm/components/__internal__/QChevron/index.js +6 -6
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +39 -44
- package/esm/components/__internal__/QClearButton/QClearButton2.vue.js +5 -0
- package/esm/components/__internal__/QClearButton/constants.js +4 -11
- package/esm/components/__internal__/QClearButton/index.js +6 -6
- package/esm/components/index.js +117 -113
- package/esm/composables/defaults.js +22 -27
- package/esm/composables/overlay.js +125 -135
- package/esm/composables/theme.js +13 -20
- package/esm/composables/uid.js +7 -8
- package/esm/composables/useColor/index.js +41 -42
- package/esm/composables/useDialog/index.js +28 -27
- package/esm/composables/useDismissibleLayerStack/index.js +31 -30
- package/esm/composables/useDropZone/index.js +43 -61
- package/esm/composables/useGroup/index.js +33 -39
- package/esm/composables/useInputMask/index.d.ts.map +1 -1
- package/esm/composables/useInputMask/index.js +384 -396
- package/esm/composables/useTextareaAutosize/index.js +18 -21
- package/esm/composables/useToast/index.js +30 -32
- package/esm/composables/useToast/types.js +4 -4
- package/esm/framework.js +56 -59
- package/esm/index.js +14 -18
- package/esm/symbols/dismissibleLayer.js +4 -4
- package/esm/templates/index.js +9 -5
- package/esm/templates/theme.js +109 -110
- package/esm/utils/color/contrast.js +10 -11
- package/esm/utils/color/conversion.js +44 -54
- package/esm/utils/color/manipulate.js +14 -19
- package/esm/utils/color/merge.js +43 -48
- package/esm/utils/color/parse.js +23 -23
- package/esm/utils/date.js +456 -463
- package/esm/utils/download.js +14 -15
- package/esm/utils/getElement.js +5 -5
- package/esm/utils/index.js +48 -44
- package/esm/utils/isEmpty.js +5 -5
- package/esm/utils/isObject.js +5 -5
- package/esm/utils/merge.js +12 -16
- package/esm/utils/setupPropsProxy.js +21 -28
- package/esm/utils/string.js +7 -7
- package/esm/utils/theme.js +41 -57
- package/esm/vendors/uuid/dist/native.js +3 -4
- package/esm/vendors/uuid/dist/rng.js +10 -12
- package/esm/vendors/uuid/dist/stringify.js +7 -8
- package/esm/vendors/uuid/dist/v4.js +18 -15
- package/package.json +12 -12
- package/esm/components/QAccordion/QAccordion.vue2.js +0 -4
- package/esm/components/QAccordion/QAccordionItem.vue2.js +0 -4
- package/esm/components/QAvatar/QAvatar.vue2.js +0 -4
- package/esm/components/QBadge/QBadge.vue2.js +0 -4
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue2.js +0 -4
- package/esm/components/QButton/QButton.vue2.js +0 -4
- package/esm/components/QButtonGroup/QButtonGroup.vue2.js +0 -4
- package/esm/components/QCard/QCard.vue2.js +0 -4
- package/esm/components/QCarousel/QCarousel.vue2.js +0 -4
- package/esm/components/QCheckbox/QCheckbox.vue2.js +0 -4
- package/esm/components/QCheckbox/QCheckboxLabel.vue2.js +0 -4
- package/esm/components/QCollapsible/QCollapsible.vue2.js +0 -4
- package/esm/components/QColorPicker/QColorPicker.vue2.js +0 -4
- package/esm/components/QCombobox/QCombobox.vue2.js +0 -4
- package/esm/components/QDateTimePicker/QDateTimePicker.vue2.js +0 -4
- package/esm/components/QDefaultsProvider/QDefaultsProvider.vue2.js +0 -4
- package/esm/components/QDialog/QDialog.vue2.js +0 -4
- package/esm/components/QDialog/QDialogProvider.vue2.js +0 -4
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue2.js +0 -4
- package/esm/components/QDivider/QDivider.vue2.js +0 -4
- package/esm/components/QDropdownMenu/QDropdownMenu.vue2.js +0 -4
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue2.js +0 -4
- package/esm/components/QField/QField.vue2.js +0 -4
- package/esm/components/QFileUpload/QFileUpload.vue2.js +0 -4
- package/esm/components/QFocusWrap/QFocusWrap.vue2.js +0 -4
- package/esm/components/QGrid/QCol.vue2.js +0 -4
- package/esm/components/QGrid/QContainer.vue2.js +0 -4
- package/esm/components/QGrid/QRow.vue2.js +0 -4
- package/esm/components/QGroupBox/QGroupBox.vue2.js +0 -4
- package/esm/components/QIcon/QIcon.vue2.js +0 -4
- package/esm/components/QIcon/QIconFont.vue2.js +0 -4
- package/esm/components/QIcon/QIconImg.vue2.js +0 -4
- package/esm/components/QIcon/QIconSvg.vue2.js +0 -4
- package/esm/components/QInputGroup/QInputGroup.vue2.js +0 -4
- package/esm/components/QLabel/QLabel.vue2.js +0 -4
- package/esm/components/QLineLoader/QLineLoader.vue2.js +0 -4
- package/esm/components/QList/QList.vue2.js +0 -4
- package/esm/components/QList/QListItem.vue2.js +0 -4
- package/esm/components/QList/QListItemGroup.vue2.js +0 -4
- package/esm/components/QMeter/QMeter.vue2.js +0 -4
- package/esm/components/QOverlay/QOverlay.vue2.js +0 -4
- package/esm/components/QPasswordField/QPasswordField.vue2.js +0 -4
- package/esm/components/QPasswordField/QPasswordFieldMessages.vue2.js +0 -4
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue2.js +0 -4
- package/esm/components/QPopover/QPopover.vue2.js +0 -4
- package/esm/components/QPropertyList/QPropertyList.vue2.js +0 -4
- package/esm/components/QPropertyList/QPropertyListGroup.vue2.js +0 -4
- package/esm/components/QPropertyList/QPropertyListPanel.vue2.js +0 -4
- package/esm/components/QPropertyList/QPropertyListRow.vue2.js +0 -4
- package/esm/components/QRadioGroup/QRadioButton.vue2.js +0 -4
- package/esm/components/QRadioGroup/QRadioGroup.vue2.js +0 -4
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue2.js +0 -4
- package/esm/components/QSelect/QSelect.vue2.js +0 -4
- package/esm/components/QSidebar/QSidebar.vue2.js +0 -4
- package/esm/components/QSidebar/QSidebarAnchor.vue2.js +0 -4
- package/esm/components/QSidebar/QSidebarPanel.vue2.js +0 -4
- package/esm/components/QSkeletonLoader/QSkeletonLoader.vue2.js +0 -4
- package/esm/components/QSpinnerLoader/QSpinnerLoader.vue2.js +0 -4
- package/esm/components/QSwitch/QSwitch.vue2.js +0 -4
- package/esm/components/QTextArea/QTextArea.vue2.js +0 -4
- package/esm/components/QTextField/QTextField.vue2.js +0 -4
- package/esm/components/QThemeProvider/QThemeProvider.vue2.js +0 -4
- package/esm/components/QToast/QToast.vue2.js +0 -4
- package/esm/components/QToast/QToaster.vue2.js +0 -4
- package/esm/components/QToggle/QToggle.vue2.js +0 -4
- package/esm/components/QToggleGroup/QToggleGroup.vue2.js +0 -4
- package/esm/components/QToggleGroup/QToggleGroupItem.vue2.js +0 -4
- package/esm/components/QTooltip/QTooltip.vue2.js +0 -4
- package/esm/components/__internal__/QChevron/QChevron.vue2.js +0 -4
- package/esm/components/__internal__/QClearButton/QClearButton.vue2.js +0 -4
package/esm/utils/date.js
CHANGED
|
@@ -1,487 +1,480 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
//#region src/utils/date.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = "", n = 0, r = !1;
|
|
4
|
+
for (; n < e.length;) {
|
|
5
|
+
let i = e[n];
|
|
6
|
+
if (i === "'") {
|
|
7
|
+
if (e[n + 1] === "'") {
|
|
8
|
+
t += "!'", n += 2;
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
r = !r, n++;
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
if (r) {
|
|
15
|
+
t += `!${i}`, n++;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (!/[A-Za-z]/.test(i)) {
|
|
19
|
+
t += i, n++;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
let a = 1;
|
|
23
|
+
for (; n + a < e.length && e[n + a] === i;) a++;
|
|
24
|
+
i === "d" ? t += a === 1 ? "#n" : "##" : i === "M" ? a <= 1 ? t += "#n" : a === 2 ? t += "##" : a === 3 ? t += "Aaa" : t += "W" : i === "y" ? t += a <= 2 ? "##" : "####" : i === "H" || i === "h" || i === "m" || i === "s" ? t += a === 1 ? "#n" : "#".repeat(Math.min(a, 2)) : i === "a" ? t += "p" : i === "E" ? t += a >= 4 ? "W" : "Aaa" : i === "S" ? t += "#".repeat(a) : i === "X" ? a === 1 ? t += "Z" : a === 2 ? t += "+####" : t += "-##:##" : t += i.repeat(a), n += a;
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
28
|
+
function t(e) {
|
|
29
|
+
return /[Hh]|m|s|a/.test(e);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
31
|
+
function n(e) {
|
|
32
|
+
return /s/.test(e);
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
34
|
+
function r(e) {
|
|
35
|
+
return /h|a/.test(e);
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
37
|
+
function i(e) {
|
|
38
|
+
return /^[^dMy]*$/.test(e) && t(e);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
40
|
+
function a(e, t = 2) {
|
|
41
|
+
return String(e).padStart(t, "0");
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
var o = /^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}(?::?\d{2})?)?)?$/;
|
|
44
|
+
function s(e) {
|
|
45
|
+
let t = e.trim();
|
|
46
|
+
if (!t || !o.test(t)) return null;
|
|
47
|
+
let n = new Date(t);
|
|
48
|
+
return Number.isNaN(n.getTime()) ? null : n;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
50
|
+
var c = /yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g, l = /* @__PURE__ */ new Set([
|
|
51
|
+
"HH",
|
|
52
|
+
"H",
|
|
53
|
+
"hh",
|
|
54
|
+
"h",
|
|
55
|
+
"mm",
|
|
56
|
+
"m",
|
|
57
|
+
"ss",
|
|
58
|
+
"s",
|
|
59
|
+
"SSS",
|
|
60
|
+
"S",
|
|
61
|
+
"a"
|
|
62
|
+
]);
|
|
63
|
+
function u(e) {
|
|
64
|
+
switch (e) {
|
|
65
|
+
case "yyyy": return {
|
|
66
|
+
min: 4,
|
|
67
|
+
max: 4
|
|
68
|
+
};
|
|
69
|
+
case "yy": return {
|
|
70
|
+
min: 2,
|
|
71
|
+
max: 2
|
|
72
|
+
};
|
|
73
|
+
case "MM":
|
|
74
|
+
case "dd":
|
|
75
|
+
case "HH":
|
|
76
|
+
case "hh":
|
|
77
|
+
case "mm":
|
|
78
|
+
case "ss": return {
|
|
79
|
+
min: 2,
|
|
80
|
+
max: 2
|
|
81
|
+
};
|
|
82
|
+
case "M":
|
|
83
|
+
case "d":
|
|
84
|
+
case "H":
|
|
85
|
+
case "h":
|
|
86
|
+
case "m":
|
|
87
|
+
case "s": return {
|
|
88
|
+
min: 1,
|
|
89
|
+
max: 2
|
|
90
|
+
};
|
|
91
|
+
case "SSS": return {
|
|
92
|
+
min: 3,
|
|
93
|
+
max: 3
|
|
94
|
+
};
|
|
95
|
+
case "S": return {
|
|
96
|
+
min: 1,
|
|
97
|
+
max: 1
|
|
98
|
+
};
|
|
99
|
+
default: return null;
|
|
100
|
+
}
|
|
77
101
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
return n.slice(r).trim() || i === n ? null : i;
|
|
102
|
+
function d(e, t) {
|
|
103
|
+
if (!e.trim()) return null;
|
|
104
|
+
let n = t.match(c) ?? [], r = 0, i = "", a = !1, o = (t) => {
|
|
105
|
+
let n = "";
|
|
106
|
+
for (; n.length < t && r < e.length;) {
|
|
107
|
+
let t = e[r];
|
|
108
|
+
if (!/\d/.test(t)) break;
|
|
109
|
+
n += t, r += 1;
|
|
110
|
+
}
|
|
111
|
+
return n;
|
|
112
|
+
};
|
|
113
|
+
for (let t of n) {
|
|
114
|
+
if (t.startsWith("'")) {
|
|
115
|
+
let n = t.slice(1, -1).replace(/''/g, "'");
|
|
116
|
+
if (e.slice(r, r + n.length) === n) {
|
|
117
|
+
i += n, r += n.length;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (r >= e.length) {
|
|
121
|
+
a = !0, i += n;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
let n = u(t);
|
|
127
|
+
if (n) {
|
|
128
|
+
if (a || r >= e.length) {
|
|
129
|
+
a = !0, i += "0".repeat(n.max);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
let s = o(n.max);
|
|
133
|
+
if (!s) return null;
|
|
134
|
+
if (s.length < n.max) {
|
|
135
|
+
if (!l.has(t)) return null;
|
|
136
|
+
a = !0, i += s.padEnd(n.max, "0");
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
i += s;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (t === "MMMM" || t === "MMM" || t === "EEEE" || t === "EEE") {
|
|
143
|
+
if (r >= e.length) return null;
|
|
144
|
+
let t = e.slice(r).match(/^[\p{L}\s.'-]+/u)?.[0] ?? "";
|
|
145
|
+
if (!t) return null;
|
|
146
|
+
i += t, r += t.length;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (t === "a") {
|
|
150
|
+
if (r >= e.length) {
|
|
151
|
+
a = !0, i += "AM";
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
let t = e.slice(r, r + 2).toUpperCase();
|
|
155
|
+
if (t !== "AM" && t !== "PM") return null;
|
|
156
|
+
i += t, r += 2;
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (e.slice(r, r + t.length) === t) {
|
|
160
|
+
i += t, r += t.length;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (r >= e.length) {
|
|
164
|
+
a = !0, i += t;
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return e.slice(r).trim() || i === e ? null : i;
|
|
149
170
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
r += o.length;
|
|
192
|
-
}
|
|
193
|
-
return !1;
|
|
171
|
+
function f(e, n) {
|
|
172
|
+
if (!t(n)) return !1;
|
|
173
|
+
let r = n.match(c) ?? [], i = 0, a = !1, o = (t) => {
|
|
174
|
+
let n = "";
|
|
175
|
+
for (; n.length < t && i < e.length;) {
|
|
176
|
+
let t = e[i];
|
|
177
|
+
if (!/\d/.test(t)) break;
|
|
178
|
+
n += t, i += 1;
|
|
179
|
+
}
|
|
180
|
+
return n;
|
|
181
|
+
};
|
|
182
|
+
for (let t of r) {
|
|
183
|
+
if (l.has(t) && (a = !0), t.startsWith("'")) {
|
|
184
|
+
let n = t.slice(1, -1).replace(/''/g, "'");
|
|
185
|
+
if (e.slice(i, i + n.length) !== n) break;
|
|
186
|
+
i += n.length;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
let n = u(t);
|
|
190
|
+
if (n) {
|
|
191
|
+
let e = o(n.max);
|
|
192
|
+
if (a && e.length > 0) return !0;
|
|
193
|
+
if (!e) break;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (t === "MMMM" || t === "MMM" || t === "EEEE" || t === "EEE") {
|
|
197
|
+
let t = e.slice(i).match(/^[\p{L}\s.'-]+/u)?.[0] ?? "";
|
|
198
|
+
if (!t) break;
|
|
199
|
+
i += t.length;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (t === "a") {
|
|
203
|
+
if (!a) continue;
|
|
204
|
+
let t = e.slice(i, i + 2).toUpperCase();
|
|
205
|
+
if (t === "AM" || t === "PM") return !0;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
if (e.slice(i, i + t.length) !== t) break;
|
|
209
|
+
i += t.length;
|
|
210
|
+
}
|
|
211
|
+
return !1;
|
|
194
212
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
213
|
+
function p(e, t, n) {
|
|
214
|
+
let r = b(e, t, n);
|
|
215
|
+
if (r) return r;
|
|
216
|
+
let i = d(e, t);
|
|
217
|
+
return i ? b(i, t, n) : null;
|
|
200
218
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
219
|
+
function m(e) {
|
|
220
|
+
return e % 4 == 0 && e % 100 != 0 || e % 400 == 0;
|
|
203
221
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
206
|
-
|
|
222
|
+
function h(e, t) {
|
|
223
|
+
return e === 1 && m(t) ? 29 : [
|
|
224
|
+
31,
|
|
225
|
+
28,
|
|
226
|
+
31,
|
|
227
|
+
30,
|
|
228
|
+
31,
|
|
229
|
+
30,
|
|
230
|
+
31,
|
|
231
|
+
31,
|
|
232
|
+
30,
|
|
233
|
+
31,
|
|
234
|
+
30,
|
|
235
|
+
31
|
|
236
|
+
][e];
|
|
207
237
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
238
|
+
function g(e) {
|
|
239
|
+
return e.getDay();
|
|
210
240
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
241
|
+
function _(e, t) {
|
|
242
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
213
243
|
}
|
|
214
|
-
function
|
|
215
|
-
|
|
244
|
+
function v(e, t, n) {
|
|
245
|
+
return e > t && e < n;
|
|
216
246
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
+
function y(e, t, n) {
|
|
248
|
+
let r = e.getFullYear(), i = e.getMonth() + 1, o = e.getDate(), s = e.getDay(), c = e.getHours(), l = e.getMinutes(), u = e.getSeconds(), d = c % 12 || 12, f = c >= 12, p = [
|
|
249
|
+
"January",
|
|
250
|
+
"February",
|
|
251
|
+
"March",
|
|
252
|
+
"April",
|
|
253
|
+
"May",
|
|
254
|
+
"June",
|
|
255
|
+
"July",
|
|
256
|
+
"August",
|
|
257
|
+
"September",
|
|
258
|
+
"October",
|
|
259
|
+
"November",
|
|
260
|
+
"December"
|
|
261
|
+
], m = [
|
|
262
|
+
"Sunday",
|
|
263
|
+
"Monday",
|
|
264
|
+
"Tuesday",
|
|
265
|
+
"Wednesday",
|
|
266
|
+
"Thursday",
|
|
267
|
+
"Friday",
|
|
268
|
+
"Saturday"
|
|
269
|
+
], h = n?.getMonthName ?? ((e, t) => {
|
|
270
|
+
let n = p[e];
|
|
271
|
+
return t ? n.substring(0, 3) : n;
|
|
272
|
+
}), g = n?.getWeekdayName ?? ((e, t) => {
|
|
273
|
+
let n = m[e];
|
|
274
|
+
return t ? n.substring(0, 3) : n;
|
|
275
|
+
});
|
|
276
|
+
return t.replace(/(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g, (e) => e.startsWith("'") ? e.slice(1, -1).replace(/''/g, "'") : e === "yyyy" ? String(r) : e === "yy" ? String(r).slice(-2) : e === "MMMM" ? h(i - 1, !1) : e === "MMM" ? h(i - 1, !0) : e === "MM" ? a(i) : e === "M" ? String(i) : e === "dd" ? a(o) : e === "d" ? String(o) : e === "EEEE" ? g(s, !1) : e === "EEE" ? g(s, !0) : e === "HH" ? a(c) : e === "H" ? String(c) : e === "hh" ? a(d) : e === "h" ? String(d) : e === "mm" ? a(l) : e === "m" ? String(l) : e === "ss" ? a(u) : e === "s" ? String(u) : e === "a" ? f ? "PM" : "AM" : e);
|
|
247
277
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
const c = /* @__PURE__ */ new Date();
|
|
427
|
-
return new Date(
|
|
428
|
-
c.getFullYear(),
|
|
429
|
-
c.getMonth(),
|
|
430
|
-
c.getDate(),
|
|
431
|
-
y,
|
|
432
|
-
E,
|
|
433
|
-
p,
|
|
434
|
-
N
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
if (g === null || l === null || h === null) return null;
|
|
438
|
-
const H = new Date(g, l, h, y, E, p, N);
|
|
439
|
-
return H.getFullYear() !== g || H.getMonth() !== l || H.getDate() !== h || H.getHours() !== y || H.getMinutes() !== E || H.getSeconds() !== p ? null : H;
|
|
278
|
+
function b(e, t, n) {
|
|
279
|
+
if (!e) return null;
|
|
280
|
+
let r = [
|
|
281
|
+
"January",
|
|
282
|
+
"February",
|
|
283
|
+
"March",
|
|
284
|
+
"April",
|
|
285
|
+
"May",
|
|
286
|
+
"June",
|
|
287
|
+
"July",
|
|
288
|
+
"August",
|
|
289
|
+
"September",
|
|
290
|
+
"October",
|
|
291
|
+
"November",
|
|
292
|
+
"December"
|
|
293
|
+
], i = [
|
|
294
|
+
"Sunday",
|
|
295
|
+
"Monday",
|
|
296
|
+
"Tuesday",
|
|
297
|
+
"Wednesday",
|
|
298
|
+
"Thursday",
|
|
299
|
+
"Friday",
|
|
300
|
+
"Saturday"
|
|
301
|
+
], a = t.match(c) ?? [], o = a.includes("a"), s = 0, l = null, u = null, d = null, f = null, p = null, m = null, h = 0, g = 0, _ = 0, v = (t, n) => {
|
|
302
|
+
let r = "";
|
|
303
|
+
for (let t = 0; t < n && s + t < e.length; t++) {
|
|
304
|
+
let n = e[s + t];
|
|
305
|
+
if (!/\d/.test(n)) break;
|
|
306
|
+
r += n;
|
|
307
|
+
}
|
|
308
|
+
return r.length < t ? null : (s += r.length, Number.parseInt(r, 10));
|
|
309
|
+
}, y = (t) => {
|
|
310
|
+
let n = [...t].sort((e, t) => t.length - e.length), r = e.slice(s).toLowerCase();
|
|
311
|
+
for (let e of n) if (r.startsWith(e.toLowerCase())) return s += e.length, e;
|
|
312
|
+
return null;
|
|
313
|
+
};
|
|
314
|
+
for (let t of a) {
|
|
315
|
+
if (t.startsWith("'")) {
|
|
316
|
+
let n = t.slice(1, -1).replace(/''/g, "'");
|
|
317
|
+
if (!e.slice(s).startsWith(n)) return null;
|
|
318
|
+
s += n.length;
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
if (t === "yyyy") {
|
|
322
|
+
let e = v(4, 4);
|
|
323
|
+
if (e === null) return null;
|
|
324
|
+
l = e;
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
if (t === "yy") {
|
|
328
|
+
let e = v(2, 2);
|
|
329
|
+
if (e === null) return null;
|
|
330
|
+
l = e < 50 ? 2e3 + e : 1900 + e;
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
if (t === "MMMM" || t === "MMM") {
|
|
334
|
+
let e = t === "MMM", i = e ? r.map((e) => e.slice(0, 3)) : r, a = y(i);
|
|
335
|
+
if (!a || (u = n?.getMonthIndex?.(a, e) ?? i.findIndex((e) => e.toLowerCase() === a.toLowerCase()), u < 0)) return null;
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
if (t === "MM") {
|
|
339
|
+
let e = v(2, 2);
|
|
340
|
+
if (e === null) return null;
|
|
341
|
+
u = e - 1;
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (t === "M") {
|
|
345
|
+
let e = v(1, 2);
|
|
346
|
+
if (e === null) return null;
|
|
347
|
+
u = e - 1;
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
if (t === "dd") {
|
|
351
|
+
let e = v(2, 2);
|
|
352
|
+
if (e === null) return null;
|
|
353
|
+
d = e;
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
if (t === "d") {
|
|
357
|
+
let e = v(1, 2);
|
|
358
|
+
if (e === null) return null;
|
|
359
|
+
d = e;
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
if (t === "EEEE" || t === "EEE") {
|
|
363
|
+
let e = t === "EEE", r = e ? i.map((e) => e.slice(0, 3)) : i, a = y(r);
|
|
364
|
+
if (!a || (n?.getWeekdayIndex?.(a, e) ?? r.findIndex((e) => e.toLowerCase() === a.toLowerCase())) < 0) return null;
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
if (t === "HH") {
|
|
368
|
+
let e = v(2, 2);
|
|
369
|
+
if (e === null) return null;
|
|
370
|
+
f = e;
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
if (t === "H") {
|
|
374
|
+
let e = v(1, 2);
|
|
375
|
+
if (e === null) return null;
|
|
376
|
+
f = e;
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
if (t === "hh") {
|
|
380
|
+
let e = v(2, 2);
|
|
381
|
+
if (e === null) return null;
|
|
382
|
+
p = e;
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
if (t === "h") {
|
|
386
|
+
let e = v(1, 2);
|
|
387
|
+
if (e === null) return null;
|
|
388
|
+
p = e;
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
if (t === "mm") {
|
|
392
|
+
let e = v(2, 2);
|
|
393
|
+
if (e === null) return null;
|
|
394
|
+
h = e;
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
if (t === "m") {
|
|
398
|
+
let e = v(1, 2);
|
|
399
|
+
if (e === null) return null;
|
|
400
|
+
h = e;
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
if (t === "ss") {
|
|
404
|
+
let e = v(2, 2);
|
|
405
|
+
if (e === null) return null;
|
|
406
|
+
g = e;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (t === "s") {
|
|
410
|
+
let e = v(1, 2);
|
|
411
|
+
if (e === null) return null;
|
|
412
|
+
g = e;
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
if (t === "SSS") {
|
|
416
|
+
let e = v(3, 3);
|
|
417
|
+
if (e === null) return null;
|
|
418
|
+
_ = e;
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (t === "S") {
|
|
422
|
+
let e = v(1, 1);
|
|
423
|
+
if (e === null) return null;
|
|
424
|
+
_ = e;
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (t === "a") {
|
|
428
|
+
let t = e.slice(s, s + 2).toUpperCase();
|
|
429
|
+
if (t !== "AM" && t !== "PM") return null;
|
|
430
|
+
m = t, s += 2;
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
if (!e.slice(s).startsWith(t)) return null;
|
|
434
|
+
s += t.length;
|
|
435
|
+
}
|
|
436
|
+
if (s !== e.length || h < 0 || h > 59 || g < 0 || g > 59) return null;
|
|
437
|
+
let b = 0;
|
|
438
|
+
if (f !== null) {
|
|
439
|
+
if (f < 0 || f > 23) return null;
|
|
440
|
+
b = f;
|
|
441
|
+
} else if (p !== null) {
|
|
442
|
+
if (p < 1 || p > 12) return null;
|
|
443
|
+
if (!o) b = p;
|
|
444
|
+
else {
|
|
445
|
+
if (m === null) return null;
|
|
446
|
+
b = m === "PM" ? p === 12 ? 12 : p + 12 : p === 12 ? 0 : p;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (l === null && u === null && d === null && (f !== null || p !== null)) {
|
|
450
|
+
let e = /* @__PURE__ */ new Date();
|
|
451
|
+
return new Date(e.getFullYear(), e.getMonth(), e.getDate(), b, h, g, _);
|
|
452
|
+
}
|
|
453
|
+
if (l === null || u === null || d === null) return null;
|
|
454
|
+
let x = new Date(l, u, d, b, h, g, _);
|
|
455
|
+
return x.getFullYear() !== l || x.getMonth() !== u || x.getDate() !== d || x.getHours() !== b || x.getMinutes() !== h || x.getSeconds() !== g ? null : x;
|
|
440
456
|
}
|
|
441
|
-
function
|
|
442
|
-
|
|
443
|
-
|
|
457
|
+
function x(e) {
|
|
458
|
+
let t = new Date(e);
|
|
459
|
+
return t.setHours(0, 0, 0, 0), t;
|
|
444
460
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
447
|
-
|
|
461
|
+
function S(e) {
|
|
462
|
+
let t = new Date(e);
|
|
463
|
+
return t.setHours(23, 59, 59, 999), t;
|
|
448
464
|
}
|
|
449
|
-
function
|
|
450
|
-
|
|
451
|
-
|
|
465
|
+
function C(e, t) {
|
|
466
|
+
let n = new Date(e);
|
|
467
|
+
return n.setDate(n.getDate() + t), n;
|
|
452
468
|
}
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
|
|
469
|
+
function w(e, t) {
|
|
470
|
+
let n = new Date(e);
|
|
471
|
+
return n.setMonth(n.getMonth() + t), n;
|
|
456
472
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
473
|
+
function T(e) {
|
|
474
|
+
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
459
475
|
}
|
|
460
|
-
function
|
|
461
|
-
|
|
476
|
+
function E(e) {
|
|
477
|
+
return new Date(e.getFullYear(), e.getMonth() + 1, 0);
|
|
462
478
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
b as addMonths,
|
|
466
|
-
P as completePartialDateInput,
|
|
467
|
-
_ as convertDatePatternToMask,
|
|
468
|
-
j as formatDate,
|
|
469
|
-
J as formatUsesSeconds,
|
|
470
|
-
L as formatUsesTime,
|
|
471
|
-
$ as getDaysInMonth,
|
|
472
|
-
Q as getEndOfDay,
|
|
473
|
-
nn as getFirstDayOfMonth,
|
|
474
|
-
G as getFirstDayOfWeek,
|
|
475
|
-
en as getLastDayOfMonth,
|
|
476
|
-
q as getStartOfDay,
|
|
477
|
-
X as inputIncludesTimePortion,
|
|
478
|
-
z as isBetween,
|
|
479
|
-
Y as isLeapYear,
|
|
480
|
-
K as isSameDay,
|
|
481
|
-
U as isTimeOnlyFormat,
|
|
482
|
-
T as padNumber,
|
|
483
|
-
A as parseDate,
|
|
484
|
-
Z as parseDateWithCompletion,
|
|
485
|
-
B as parseIsoDate,
|
|
486
|
-
R as uses12HourFormat
|
|
487
|
-
};
|
|
479
|
+
//#endregion
|
|
480
|
+
export { C as addDays, w as addMonths, d as completePartialDateInput, e as convertDatePatternToMask, y as formatDate, n as formatUsesSeconds, t as formatUsesTime, h as getDaysInMonth, S as getEndOfDay, T as getFirstDayOfMonth, g as getFirstDayOfWeek, E as getLastDayOfMonth, x as getStartOfDay, f as inputIncludesTimePortion, v as isBetween, m as isLeapYear, _ as isSameDay, i as isTimeOnlyFormat, a as padNumber, b as parseDate, p as parseDateWithCompletion, s as parseIsoDate, r as uses12HourFormat };
|