@konstructio/ui 0.1.2-alpha.52 → 0.1.2-alpha.53
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/CalendarPanel.css +1 -0
- package/dist/DayPicker-PUEUVAST.js +2793 -0
- package/dist/assets/icons/components/Accounts.d.ts +3 -0
- package/dist/assets/icons/components/Accounts.js +37 -0
- package/dist/assets/icons/components/AddChart.d.ts +3 -0
- package/dist/assets/icons/components/AddChart.js +28 -0
- package/dist/assets/icons/components/AppRepo.d.ts +3 -0
- package/dist/assets/icons/components/AppRepo.js +28 -0
- package/dist/assets/icons/components/Apps.d.ts +3 -0
- package/dist/assets/icons/components/Apps.js +28 -0
- package/dist/assets/icons/components/Archives.d.ts +3 -0
- package/dist/assets/icons/components/Archives.js +28 -0
- package/dist/assets/icons/components/ArrowDown.d.ts +3 -0
- package/dist/assets/icons/components/ArrowDown.js +28 -0
- package/dist/assets/icons/components/ArrowLeft.d.ts +3 -0
- package/dist/assets/icons/components/ArrowLeft.js +28 -0
- package/dist/assets/icons/components/ArrowRight.d.ts +3 -0
- package/dist/assets/icons/components/ArrowRight.js +28 -0
- package/dist/assets/icons/components/ArrowUp.d.ts +3 -0
- package/dist/assets/icons/components/ArrowUp.js +28 -0
- package/dist/assets/icons/components/BarChart.d.ts +3 -0
- package/dist/assets/icons/components/BarChart.js +38 -0
- package/dist/assets/icons/components/CalendarMonth.d.ts +3 -0
- package/dist/assets/icons/components/CalendarMonth.js +28 -0
- package/dist/assets/icons/components/Check.d.ts +3 -0
- package/dist/assets/icons/components/Check.js +28 -0
- package/dist/assets/icons/components/CheckCircle.d.ts +3 -0
- package/dist/assets/icons/components/CheckCircle.js +28 -0
- package/dist/assets/icons/components/ClockAlert.d.ts +3 -0
- package/dist/assets/icons/components/ClockAlert.js +28 -0
- package/dist/assets/icons/components/ClockOutline.d.ts +3 -0
- package/dist/assets/icons/components/ClockOutline.js +28 -0
- package/dist/assets/icons/components/Close.d.ts +3 -0
- package/dist/assets/icons/components/Close.js +28 -0
- package/dist/assets/icons/components/Cloud.d.ts +3 -0
- package/dist/assets/icons/components/Cloud.js +22 -0
- package/dist/assets/icons/components/Clusters.d.ts +3 -0
- package/dist/assets/icons/components/Clusters.js +44 -0
- package/dist/assets/icons/components/CogOutline.d.ts +3 -0
- package/dist/assets/icons/components/CogOutline.js +28 -0
- package/dist/assets/icons/components/Copy.d.ts +3 -0
- package/dist/assets/icons/components/Copy.js +28 -0
- package/dist/assets/icons/components/Cpu.d.ts +3 -0
- package/dist/assets/icons/components/Cpu.js +41 -0
- package/dist/assets/icons/components/Cube.d.ts +3 -0
- package/dist/assets/icons/components/Cube.js +28 -0
- package/dist/assets/icons/components/Datacenter.d.ts +3 -0
- package/dist/assets/icons/components/Datacenter.js +28 -0
- package/dist/assets/icons/components/Delete.d.ts +3 -0
- package/dist/assets/icons/components/Delete.js +28 -0
- package/dist/assets/icons/components/Download.d.ts +3 -0
- package/dist/assets/icons/components/Download.js +28 -0
- package/dist/assets/icons/components/Edit.d.ts +3 -0
- package/dist/assets/icons/components/Edit.js +28 -0
- package/dist/assets/icons/components/Ellipses.d.ts +3 -0
- package/dist/assets/icons/components/Ellipses.js +28 -0
- package/dist/assets/icons/components/Environments.d.ts +3 -0
- package/dist/assets/icons/components/Environments.js +30 -0
- package/dist/assets/icons/components/Error.d.ts +3 -0
- package/dist/assets/icons/components/Error.js +28 -0
- package/dist/assets/icons/components/ErrorOutline.d.ts +3 -0
- package/dist/assets/icons/components/ErrorOutline.js +28 -0
- package/dist/assets/icons/components/Exclamation.d.ts +3 -0
- package/dist/assets/icons/components/Exclamation.js +28 -0
- package/dist/assets/icons/components/Git.d.ts +3 -0
- package/dist/assets/icons/components/Git.js +28 -0
- package/dist/assets/icons/components/GitOpsCatalog.d.ts +3 -0
- package/dist/assets/icons/components/GitOpsCatalog.js +41 -0
- package/dist/assets/icons/components/GridView.d.ts +3 -0
- package/dist/assets/icons/components/GridView.js +22 -0
- package/dist/assets/icons/components/Help.d.ts +3 -0
- package/dist/assets/icons/components/Help.js +25 -0
- package/dist/assets/icons/components/HideOutline.d.ts +3 -0
- package/dist/assets/icons/components/HideOutline.js +37 -0
- package/dist/assets/icons/components/Home.d.ts +3 -0
- package/dist/assets/icons/components/Home.js +28 -0
- package/dist/assets/icons/components/Id.d.ts +3 -0
- package/dist/assets/icons/components/Id.js +28 -0
- package/dist/assets/icons/components/InformationOutline.d.ts +3 -0
- package/dist/assets/icons/components/InformationOutline.js +28 -0
- package/dist/assets/icons/components/InvoiceList.d.ts +3 -0
- package/dist/assets/icons/components/InvoiceList.js +28 -0
- package/dist/assets/icons/components/Key.d.ts +3 -0
- package/dist/assets/icons/components/Key.js +28 -0
- package/dist/assets/icons/components/Loader.d.ts +3 -0
- package/dist/assets/icons/components/Loader.js +28 -0
- package/dist/assets/icons/components/Network.d.ts +3 -0
- package/dist/assets/icons/components/Network.js +28 -0
- package/dist/assets/icons/components/PagesStack.d.ts +3 -0
- package/dist/assets/icons/components/PagesStack.js +25 -0
- package/dist/assets/icons/components/Pageview.d.ts +3 -0
- package/dist/assets/icons/components/Pageview.js +28 -0
- package/dist/assets/icons/components/People.d.ts +3 -0
- package/dist/assets/icons/components/People.js +28 -0
- package/dist/assets/icons/components/PhotoLibrary.d.ts +3 -0
- package/dist/assets/icons/components/PhotoLibrary.js +28 -0
- package/dist/assets/icons/components/Pipeline.d.ts +3 -0
- package/dist/assets/icons/components/Pipeline.js +30 -0
- package/dist/assets/icons/components/Plus.d.ts +3 -0
- package/dist/assets/icons/components/Plus.js +28 -0
- package/dist/assets/icons/components/PowerSettings.d.ts +3 -0
- package/dist/assets/icons/components/PowerSettings.js +28 -0
- package/dist/assets/icons/components/Preview.d.ts +3 -0
- package/dist/assets/icons/components/Preview.js +28 -0
- package/dist/assets/icons/components/ReceiptLong.d.ts +3 -0
- package/dist/assets/icons/components/ReceiptLong.js +22 -0
- package/dist/assets/icons/components/Refresh.d.ts +3 -0
- package/dist/assets/icons/components/Refresh.js +28 -0
- package/dist/assets/icons/components/ScatterPlot.d.ts +3 -0
- package/dist/assets/icons/components/ScatterPlot.js +22 -0
- package/dist/assets/icons/components/Search.d.ts +3 -0
- package/dist/assets/icons/components/Search.js +29 -23
- package/dist/assets/icons/components/Server.d.ts +3 -0
- package/dist/assets/icons/components/Server.js +28 -0
- package/dist/assets/icons/components/Start.d.ts +3 -0
- package/dist/assets/icons/components/Start.js +28 -0
- package/dist/assets/icons/components/TabNew.d.ts +3 -0
- package/dist/assets/icons/components/TabNew.js +50 -0
- package/dist/assets/icons/components/Teams.d.ts +3 -0
- package/dist/assets/icons/components/Teams.js +28 -0
- package/dist/assets/icons/components/Warning.d.ts +3 -0
- package/dist/assets/icons/components/Warning.js +24 -18
- package/dist/assets/icons/components/X.d.ts +3 -0
- package/dist/assets/icons/components/X.js +28 -0
- package/dist/assets/icons/components/index.d.ts +62 -0
- package/dist/assets/icons/components/index.js +122 -4
- package/dist/assets/icons/components/types.d.ts +5 -0
- package/dist/assets/icons/components/types.js +0 -0
- package/dist/assets/icons/index.d.ts +1 -0
- package/dist/assets/icons/index.js +122 -5
- package/dist/{chevron-down-DgT-uSF9.js → chevron-down-BBFYYzZq.js} +1 -1
- package/dist/{chevron-right-DYvXLeql.js → chevron-right-SUh6si0f.js} +1 -1
- package/dist/{chevron-up-DrQr2Fwd.js → chevron-up-IlDPxR7j.js} +1 -1
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.types.d.ts +26 -0
- package/dist/components/Alert/Alert.variants.d.ts +7 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +32 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +58 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +10 -0
- package/dist/components/AlertDialog/components/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +31 -0
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +48 -0
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -0
- package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +4 -0
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Badge/Badge.d.ts +34 -0
- package/dist/components/Badge/Badge.js +26 -20
- package/dist/components/Badge/Badge.types.d.ts +34 -0
- package/dist/components/Badge/Badge.variants.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +29 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +41 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +2 -0
- package/dist/components/Breadcrumb/components/Item/Item.d.ts +3 -0
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +6 -0
- package/dist/components/Breadcrumb/components/Item/Item.variants.d.ts +6 -0
- package/dist/components/Breadcrumb/components/index.d.ts +1 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.d.ts +33 -0
- package/dist/components/Button/Button.types.d.ts +24 -0
- package/dist/components/Button/Button.variants.d.ts +8 -0
- package/dist/components/Card/Card.d.ts +28 -0
- package/dist/components/Card/Card.types.d.ts +24 -0
- package/dist/components/Card/Card.variants.d.ts +8 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +36 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +5 -0
- package/dist/components/Command/Command.d.ts +27 -0
- package/dist/components/Command/Command.types.d.ts +31 -0
- package/dist/components/Command/Command.variants.d.ts +3 -0
- package/dist/components/Command/components/Command.d.ts +18 -0
- package/dist/components/Command/components/CommandEmpty.d.ts +8 -0
- package/dist/components/Command/components/CommandGroup.d.ts +12 -0
- package/dist/components/Command/components/CommandInput.d.ts +9 -0
- package/dist/components/Command/components/CommandItem.d.ts +14 -0
- package/dist/components/Command/components/CommandList.d.ts +10 -0
- package/dist/components/Command/components/CommandSeparator.d.ts +8 -0
- package/dist/components/Command/components/CommandShortcut.d.ts +6 -0
- package/dist/components/Command/components/DialogContent.d.ts +2 -0
- package/dist/components/Command/components/DialogOverlay.d.ts +2 -0
- package/dist/components/Command/components/index.d.ts +9 -0
- package/dist/components/Command/contexts/Command.context.d.ts +2 -0
- package/dist/components/Command/contexts/Command.provider.d.ts +2 -0
- package/dist/components/Command/contexts/Command.types.d.ts +5 -0
- package/dist/components/Command/contexts/index.d.ts +3 -0
- package/dist/components/Counter/Counter.d.ts +36 -0
- package/dist/components/Counter/Counter.types.d.ts +51 -0
- package/dist/components/Counter/Counter.variants.d.ts +7 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +31 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +163 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +123 -0
- package/dist/components/DateRangePicker/DateRangePicker.variants.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +25 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +120 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.types.d.ts +79 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.d.ts +8 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +56 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.types.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +60 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.types.d.ts +17 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +308 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.types.d.ts +34 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +40 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.types.d.ts +12 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.d.ts +3 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +136 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.types.d.ts +26 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/index.d.ts +5 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +12 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.d.ts +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +5 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.d.ts +8 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +149 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.d.ts +4 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +21 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.d.ts +24 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +142 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +22 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +93 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.d.ts +16 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +11 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +107 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +37 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.d.ts +5 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +30 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +92 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +23 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.d.ts +3 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +92 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +23 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.d.ts +2 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +6 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.d.ts +1 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +4 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +29 -0
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +186 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.d.ts +3 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +71 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.types.d.ts +31 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.d.ts +2 -0
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +24 -0
- package/dist/components/DateRangePicker/components/index.d.ts +3 -0
- package/dist/components/DateRangePicker/components/index.js +8 -0
- package/dist/components/DateRangePicker/constants/index.d.ts +1 -0
- package/dist/components/DateRangePicker/constants/index.js +4 -0
- package/dist/components/DateRangePicker/constants/presets.d.ts +6 -0
- package/dist/components/DateRangePicker/constants/presets.js +10 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.context.d.ts +81 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +5 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.d.ts +1 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +13 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.d.ts +24 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +176 -0
- package/dist/components/DateRangePicker/contexts/index.d.ts +4 -0
- package/dist/components/DateRangePicker/contexts/index.js +8 -0
- package/dist/components/DateRangePicker/utils/disabled-dates.d.ts +26 -0
- package/dist/components/DateRangePicker/utils/disabled-dates.js +47 -0
- package/dist/components/DateRangePicker/utils/index.d.ts +6 -0
- package/dist/components/DateRangePicker/utils/index.js +22 -0
- package/dist/components/DateRangePicker/utils/presets.d.ts +5 -0
- package/dist/components/DateRangePicker/utils/presets.js +36 -0
- package/dist/components/DateRangePicker/utils/validation.d.ts +43 -0
- package/dist/components/DateRangePicker/utils/validation.js +79 -0
- package/dist/components/Datepicker/DatePicker.d.ts +26 -0
- package/dist/components/Datepicker/DatePicker.js +42 -2829
- package/dist/components/Datepicker/DatePicker.types.d.ts +29 -0
- package/dist/components/Datepicker/DatePicker.variants.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +17 -0
- package/dist/components/Divider/Divider.variants.d.ts +3 -0
- package/dist/components/DropdownButton/DropdownButton.d.ts +20 -0
- package/dist/components/DropdownButton/DropdownButton.types.d.ts +36 -0
- package/dist/components/Filter/Filter.d.ts +26 -0
- package/dist/components/Filter/Filter.js +5 -2
- package/dist/components/Filter/Filter.types.d.ts +53 -0
- package/dist/components/Filter/Filter.variants.d.ts +3 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.d.ts +3 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +12 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +11 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.d.ts +3 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +12 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -28
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +27 -26
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.types.d.ts +7 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.d.ts +3 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +13 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +84 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +121 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +25 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.d.ts +3 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +5 -0
- package/dist/components/Filter/components/index.d.ts +8 -0
- package/dist/components/Filter/components/index.js +6 -4
- package/dist/components/Filter/events/index.d.ts +6 -0
- package/dist/components/Filter/utils/index.d.ts +1 -0
- package/dist/components/Filter/utils/index.js +2437 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +25 -0
- package/dist/components/ImageUpload/ImageUpload.js +66 -65
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +67 -0
- package/dist/components/ImageUpload/ImageUpload.variants.d.ts +13 -0
- package/dist/components/Input/Input.d.ts +35 -0
- package/dist/components/Input/Input.js +4 -4
- package/dist/components/Input/Input.types.d.ts +32 -0
- package/dist/components/Input/Input.variants.d.ts +3 -0
- package/dist/components/Loading/Loading.d.ts +24 -0
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Loading/Loading.types.d.ts +17 -0
- package/dist/components/Loading/Loading.variants.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +34 -0
- package/dist/components/Modal/Modal.types.d.ts +45 -0
- package/dist/components/Modal/components/Body/Body.d.ts +3 -0
- package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
- package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
- package/dist/components/Modal/components/Header/Header.d.ts +3 -0
- package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +11 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -0
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
- package/dist/components/Modal/contexts/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +23 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +74 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.types.d.ts +8 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/List/List.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/List/List.types.d.ts +4 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.d.ts +1 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +31 -25
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/MultiSelectDropdown/components/index.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.d.ts +1 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +31 -0
- package/dist/components/MultiSelectDropdown/contexts/index.d.ts +2 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.d.ts +4 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +21 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +49 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.d.ts +4 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.d.ts +2 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.types.d.ts +5 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.types.d.ts +8 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.types.d.ts +4 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.d.ts +3 -0
- package/dist/components/PhoneNumberInput/components/index.d.ts +2 -0
- package/dist/components/PhoneNumberInput/contexts/index.d.ts +3 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.d.ts +20 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.d.ts +2 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.d.ts +6 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1527 -1661
- package/dist/components/PhoneNumberInput/utils/index.d.ts +2 -0
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.d.ts +20 -0
- package/dist/components/PieChart/PieChart.types.d.ts +90 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +20 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +36 -0
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +4 -0
- package/dist/components/Radio/Radio.d.ts +22 -0
- package/dist/components/Radio/Radio.types.d.ts +44 -0
- package/dist/components/Radio/Radio.variants.d.ts +8 -0
- package/dist/components/RadioCard/RadioCard.d.ts +22 -0
- package/dist/components/RadioCard/RadioCard.types.d.ts +23 -0
- package/dist/components/RadioCard/RadioCard.variants.d.ts +1 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +23 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +30 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +34 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +42 -0
- package/dist/components/RadioGroup/RadioGroup.variants.d.ts +3 -0
- package/dist/components/Range/Range.d.ts +21 -0
- package/dist/components/Range/Range.types.d.ts +40 -0
- package/dist/components/Range/Range.variants.d.ts +8 -0
- package/dist/components/Select/Select.d.ts +36 -0
- package/dist/components/Select/Select.types.d.ts +119 -0
- package/dist/components/Select/Select.variants.d.ts +6 -0
- package/dist/components/Select/components/EmptyList.d.ts +2 -0
- package/dist/components/Select/components/List/List.d.ts +3 -0
- package/dist/components/Select/components/List/List.js +1 -1
- package/dist/components/Select/components/List/List.types.d.ts +14 -0
- package/dist/components/Select/components/List/List.variants.d.ts +1 -0
- package/dist/components/Select/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Select/components/ListItem/ListItem.types.d.ts +9 -0
- package/dist/components/Select/components/ListItem/ListItem.variants.d.ts +1 -0
- package/dist/components/Select/components/Wrapper.d.ts +3 -0
- package/dist/components/Select/components/Wrapper.js +44 -38
- package/dist/components/Select/components/index.d.ts +3 -0
- package/dist/components/Select/constants/index.d.ts +1 -0
- package/dist/components/Select/constants/pagination.d.ts +1 -0
- package/dist/components/Select/contexts/index.d.ts +2 -0
- package/dist/components/Select/contexts/select.context.d.ts +21 -0
- package/dist/components/Select/contexts/select.hook.d.ts +2 -0
- package/dist/components/Select/contexts/select.provider.d.ts +10 -0
- package/dist/components/Select/hooks/useNavigationList.d.ts +11 -0
- package/dist/components/Select/hooks/useSelect.d.ts +15 -0
- package/dist/components/Sidebar/Sidebar.d.ts +28 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +54 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +2 -0
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +4 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +4 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +1 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +4 -0
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Slider/Slider.d.ts +21 -0
- package/dist/components/Slider/Slider.types.d.ts +40 -0
- package/dist/components/Slider/Slider.variants.d.ts +7 -0
- package/dist/components/Stepper/Stepper.d.ts +51 -0
- package/dist/components/Stepper/Stepper.js +71 -0
- package/dist/components/Stepper/Stepper.types.d.ts +73 -0
- package/dist/components/Stepper/Stepper.variants.d.ts +40 -0
- package/dist/components/Stepper/Stepper.variants.js +278 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +3 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +195 -0
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.types.d.ts +1 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +3 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +28 -0
- package/dist/components/Stepper/components/StepConnector/StepConnector.types.d.ts +13 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +3 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +29 -0
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.types.d.ts +13 -0
- package/dist/components/Stepper/components/StepItem/StepItem.d.ts +3 -0
- package/dist/components/Stepper/components/StepItem/StepItem.js +7 -0
- package/dist/components/Stepper/components/StepItem/StepItem.types.d.ts +32 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +3 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +109 -0
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.types.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +29 -0
- package/dist/components/Switch/Switch.types.d.ts +41 -0
- package/dist/components/Switch/Switch.variants.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +38 -0
- package/dist/components/Table/Table.types.d.ts +57 -0
- package/dist/components/Table/Table.variants.d.ts +6 -0
- package/dist/components/Table/components/Body.d.ts +3 -0
- package/dist/components/Table/components/Filter.d.ts +3 -0
- package/dist/components/Table/components/Head.d.ts +3 -0
- package/dist/components/Table/components/Row.d.ts +3 -0
- package/dist/components/Table/components/index.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.types.d.ts +42 -0
- package/dist/components/Tabs/Tabs.variants.d.ts +12 -0
- package/dist/components/Tabs/components/Content.d.ts +4 -0
- package/dist/components/Tabs/components/List.d.ts +4 -0
- package/dist/components/Tabs/components/Trigger.d.ts +4 -0
- package/dist/components/Tabs/components/index.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts +16 -0
- package/dist/components/Tag/Tag.types.d.ts +33 -0
- package/dist/components/Tag/Tag.variants.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.d.ts +23 -0
- package/dist/components/TagSelect/TagSelect.types.d.ts +37 -0
- package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -0
- package/dist/components/TagSelect/components/Item/Item.d.ts +3 -0
- package/dist/components/TagSelect/components/Item/Item.types.d.ts +6 -0
- package/dist/components/TagSelect/components/Item/Item.variants.d.ts +3 -0
- package/dist/components/TagSelect/components/List/List.d.ts +3 -0
- package/dist/components/TagSelect/components/List/List.types.d.ts +4 -0
- package/dist/components/TagSelect/components/List/List.variants.d.ts +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/TagSelect/components/index.d.ts +3 -0
- package/dist/components/TagSelect/contexts/TagSelect.context.d.ts +2 -0
- package/dist/components/TagSelect/contexts/TagSelect.hook.d.ts +1 -0
- package/dist/components/TagSelect/contexts/TagSelect.provider.d.ts +3 -0
- package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +15 -0
- package/dist/components/TagSelect/contexts/index.d.ts +2 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +4 -0
- package/dist/components/TextArea/TextArea.d.ts +24 -0
- package/dist/components/TextArea/TextArea.types.d.ts +26 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +21 -0
- package/dist/components/TimePicker/TimePicker.js +12 -5
- package/dist/components/TimePicker/TimePicker.types.d.ts +53 -0
- package/dist/components/TimePicker/TimePicker.variants.d.ts +4 -0
- package/dist/components/TimePicker/TimePicker.variants.js +18 -20
- package/dist/components/TimePicker/components/HoursList/HoursList.d.ts +4 -0
- package/dist/components/TimePicker/components/HoursList/HoursList.js +104 -67
- package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +8 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.d.ts +4 -0
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +43 -29
- package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +7 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.d.ts +4 -0
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +82 -39
- package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +9 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +180 -62
- package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +6 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.d.ts +3 -0
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +42 -23
- package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +9 -0
- package/dist/components/TimePicker/components/index.d.ts +1 -0
- package/dist/components/TimePicker/contexts/index.d.ts +3 -0
- package/dist/components/TimePicker/contexts/time-picker.context.d.ts +15 -0
- package/dist/components/TimePicker/contexts/time-picker.context.js +8 -1
- package/dist/components/TimePicker/contexts/time-picker.hook.d.ts +2 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.d.ts +7 -0
- package/dist/components/TimePicker/contexts/time-picker.provider.js +51 -36
- package/dist/components/TimePicker/utils/index.d.ts +8 -0
- package/dist/components/TimePicker/utils/index.js +29 -4
- package/dist/components/Toast/Toast.d.ts +25 -0
- package/dist/components/Toast/Toast.types.d.ts +46 -0
- package/dist/components/Toast/Toast.variants.d.ts +5 -0
- package/dist/components/Tooltip/Tooltip.d.ts +27 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +28 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +6 -0
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/Typography/Typography.d.ts +18 -0
- package/dist/components/Typography/Typography.types.d.ts +29 -0
- package/dist/components/Typography/Typography.variants.d.ts +3 -0
- package/dist/components/Typography/Typography.variants.js +6 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +11 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +108 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.d.ts +1 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.d.ts +6 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.d.ts +6 -0
- package/dist/components/VirtualizedTable/assets/index.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +1 -1
- package/dist/components/VirtualizedTable/components/Actions/Actions.types.d.ts +24 -0
- package/dist/components/VirtualizedTable/components/Body/Body.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Body/Body.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +16 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/Header/Header.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Header/Header.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +9 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +2 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.d.ts +3 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.types.d.ts +6 -0
- package/dist/components/VirtualizedTable/components/index.d.ts +7 -0
- package/dist/components/VirtualizedTable/constants/index.d.ts +1 -0
- package/dist/components/VirtualizedTable/constants/pagination.d.ts +2 -0
- package/dist/components/VirtualizedTable/contexts/index.d.ts +3 -0
- package/dist/components/VirtualizedTable/contexts/table.context.d.ts +22 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.d.ts +3 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +17 -0
- package/dist/components/index.d.ts +48 -0
- package/dist/components/index.js +113 -96
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.provider.d.ts +38 -0
- package/dist/{createLucideIcon-D4r5Phnh.js → createLucideIcon-CP-mMPfa.js} +15 -10
- package/dist/debounce-DJveWHr_.js +114 -0
- package/dist/domain/theme.d.ts +1 -0
- package/dist/{ellipsis-vertical-BVPtjl5f.js → ellipsis-vertical-Cl3yNtOy.js} +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +24 -0
- package/dist/index.d.ts +4 -2995
- package/dist/index.js +131 -114
- package/dist/isObject-9XxUefZH.js +97 -0
- package/dist/{libphonenumber-FTwQ9nyV.js → libphonenumber-C9G59k5J.js} +721 -689
- package/dist/package.json +33 -16
- package/dist/proxy-Drz23HDt.js +4800 -0
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/useBreadcrumb-vSs0pRo3.js +1412 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/{x-BXShoIAM.js → x-B9bYxG31.js} +1 -1
- package/package.json +33 -16
- package/dist/debounce-BFejQm9P.js +0 -200
- package/dist/loader-juvMSJ9L.js +0 -5
- package/dist/useBreadcrumb-BAHbGQ_O.js +0 -1263
- /package/dist/{DatePicker.css → style.css} +0 -0
|
@@ -1,2828 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import { datePickerVariants as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const n = (Pn[e] ||= new Intl.DateTimeFormat("en-US", {
|
|
18
|
-
timeZone: e,
|
|
19
|
-
timeZoneName: "longOffset"
|
|
20
|
-
}).format)(t).split("GMT")[1];
|
|
21
|
-
return n in ge ? ge[n] : it(n, n.split(":"));
|
|
22
|
-
} catch {
|
|
23
|
-
if (e in ge) return ge[e];
|
|
24
|
-
const r = e?.match(En);
|
|
25
|
-
return r ? it(e, r.slice(1)) : NaN;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const En = /([+-]\d\d):?(\d\d)?/;
|
|
29
|
-
function it(e, t) {
|
|
30
|
-
const r = +(t[0] || 0), n = +(t[1] || 0), o = +(t[2] || 0) / 60;
|
|
31
|
-
return ge[e] = r * 60 + n > 0 ? r * 60 + n + o : r * 60 - n - o;
|
|
32
|
-
}
|
|
33
|
-
class J extends Date {
|
|
34
|
-
//#region static
|
|
35
|
-
constructor(...t) {
|
|
36
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ie(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), Mt(this), Qe(this)) : this.setTime(Date.now());
|
|
37
|
-
}
|
|
38
|
-
static tz(t, ...r) {
|
|
39
|
-
return r.length ? new J(...r, t) : new J(Date.now(), t);
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region time zone
|
|
43
|
-
withTimeZone(t) {
|
|
44
|
-
return new J(+this, t);
|
|
45
|
-
}
|
|
46
|
-
getTimezoneOffset() {
|
|
47
|
-
const t = -ie(this.timeZone, this);
|
|
48
|
-
return t > 0 ? Math.floor(t) : Math.ceil(t);
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region time
|
|
52
|
-
setTime(t) {
|
|
53
|
-
return Date.prototype.setTime.apply(this, arguments), Qe(this), +this;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region date-fns integration
|
|
57
|
-
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
58
|
-
return new J(+new Date(t), this.timeZone);
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
}
|
|
62
|
-
const ct = /^(get|set)(?!UTC)/;
|
|
63
|
-
Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
64
|
-
if (!ct.test(e)) return;
|
|
65
|
-
const t = e.replace(ct, "$1UTC");
|
|
66
|
-
J.prototype[t] && (e.startsWith("get") ? J.prototype[e] = function() {
|
|
67
|
-
return this.internal[t]();
|
|
68
|
-
} : (J.prototype[e] = function() {
|
|
69
|
-
return Date.prototype[t].apply(this.internal, arguments), _n(this), +this;
|
|
70
|
-
}, J.prototype[t] = function() {
|
|
71
|
-
return Date.prototype[t].apply(this, arguments), Qe(this), +this;
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
74
|
-
function Qe(e) {
|
|
75
|
-
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ie(e.timeZone, e) * 60));
|
|
76
|
-
}
|
|
77
|
-
function _n(e) {
|
|
78
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), Mt(e);
|
|
79
|
-
}
|
|
80
|
-
function Mt(e) {
|
|
81
|
-
const t = ie(e.timeZone, e), r = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
|
|
82
|
-
n.setUTCHours(n.getUTCHours() - 1);
|
|
83
|
-
const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), i = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = o - i, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
84
|
-
a && s && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
|
|
85
|
-
const c = o - r;
|
|
86
|
-
c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
|
|
87
|
-
const u = /* @__PURE__ */ new Date(+e);
|
|
88
|
-
u.setUTCSeconds(0);
|
|
89
|
-
const f = o > 0 ? u.getSeconds() : (u.getSeconds() - 60) % 60, l = Math.round(-(ie(e.timeZone, e) * 60)) % 60;
|
|
90
|
-
(l || f) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + l), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + l + f));
|
|
91
|
-
const d = ie(e.timeZone, e), w = d > 0 ? Math.floor(d) : Math.ceil(d), N = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, k = w !== r, v = N - c;
|
|
92
|
-
if (k && v) {
|
|
93
|
-
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v);
|
|
94
|
-
const Y = ie(e.timeZone, e), p = Y > 0 ? Math.floor(Y) : Math.ceil(Y), D = w - p;
|
|
95
|
-
D && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + D), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + D));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
class H extends J {
|
|
99
|
-
//#region static
|
|
100
|
-
static tz(t, ...r) {
|
|
101
|
-
return r.length ? new H(...r, t) : new H(Date.now(), t);
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region representation
|
|
105
|
-
toISOString() {
|
|
106
|
-
const [t, r, n] = this.tzComponents(), o = `${t}${r}:${n}`;
|
|
107
|
-
return this.internal.toISOString().slice(0, -1) + o;
|
|
108
|
-
}
|
|
109
|
-
toString() {
|
|
110
|
-
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
111
|
-
}
|
|
112
|
-
toDateString() {
|
|
113
|
-
const [t, r, n, o] = this.internal.toUTCString().split(" ");
|
|
114
|
-
return `${t?.slice(0, -1)} ${n} ${r} ${o}`;
|
|
115
|
-
}
|
|
116
|
-
toTimeString() {
|
|
117
|
-
const t = this.internal.toUTCString().split(" ")[4], [r, n, o] = this.tzComponents();
|
|
118
|
-
return `${t} GMT${r}${n}${o} (${Tn(this.timeZone, this)})`;
|
|
119
|
-
}
|
|
120
|
-
toLocaleString(t, r) {
|
|
121
|
-
return Date.prototype.toLocaleString.call(this, t, {
|
|
122
|
-
...r,
|
|
123
|
-
timeZone: r?.timeZone || this.timeZone
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
toLocaleDateString(t, r) {
|
|
127
|
-
return Date.prototype.toLocaleDateString.call(this, t, {
|
|
128
|
-
...r,
|
|
129
|
-
timeZone: r?.timeZone || this.timeZone
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
toLocaleTimeString(t, r) {
|
|
133
|
-
return Date.prototype.toLocaleTimeString.call(this, t, {
|
|
134
|
-
...r,
|
|
135
|
-
timeZone: r?.timeZone || this.timeZone
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region private
|
|
140
|
-
tzComponents() {
|
|
141
|
-
const t = this.getTimezoneOffset(), r = t > 0 ? "-" : "+", n = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), o = String(Math.abs(t) % 60).padStart(2, "0");
|
|
142
|
-
return [r, n, o];
|
|
143
|
-
}
|
|
144
|
-
//#endregion
|
|
145
|
-
withTimeZone(t) {
|
|
146
|
-
return new H(+this, t);
|
|
147
|
-
}
|
|
148
|
-
//#region date-fns integration
|
|
149
|
-
[/* @__PURE__ */ Symbol.for("constructDateFrom")](t) {
|
|
150
|
-
return new H(+new Date(t), this.timeZone);
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
}
|
|
154
|
-
const kt = 6048e5, Fn = 864e5, ut = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
155
|
-
function B(e, t) {
|
|
156
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" && ut in e ? e[ut](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
157
|
-
}
|
|
158
|
-
function P(e, t) {
|
|
159
|
-
return B(t || e, e);
|
|
160
|
-
}
|
|
161
|
-
function Dt(e, t, r) {
|
|
162
|
-
const n = P(e, r?.in);
|
|
163
|
-
return isNaN(t) ? B(e, NaN) : (t && n.setDate(n.getDate() + t), n);
|
|
164
|
-
}
|
|
165
|
-
function Ot(e, t, r) {
|
|
166
|
-
const n = P(e, r?.in);
|
|
167
|
-
if (isNaN(t)) return B(e, NaN);
|
|
168
|
-
if (!t)
|
|
169
|
-
return n;
|
|
170
|
-
const o = n.getDate(), i = B(e, n.getTime());
|
|
171
|
-
i.setMonth(n.getMonth() + t + 1, 0);
|
|
172
|
-
const a = i.getDate();
|
|
173
|
-
return o >= a ? i : (n.setFullYear(
|
|
174
|
-
i.getFullYear(),
|
|
175
|
-
i.getMonth(),
|
|
176
|
-
o
|
|
177
|
-
), n);
|
|
178
|
-
}
|
|
179
|
-
let Bn = {};
|
|
180
|
-
function Me() {
|
|
181
|
-
return Bn;
|
|
182
|
-
}
|
|
183
|
-
function de(e, t) {
|
|
184
|
-
const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? 7 : 0) + i - n;
|
|
185
|
-
return o.setDate(o.getDate() - a), o.setHours(0, 0, 0, 0), o;
|
|
186
|
-
}
|
|
187
|
-
function we(e, t) {
|
|
188
|
-
return de(e, { ...t, weekStartsOn: 1 });
|
|
189
|
-
}
|
|
190
|
-
function vt(e, t) {
|
|
191
|
-
const r = P(e, t?.in), n = r.getFullYear(), o = B(r, 0);
|
|
192
|
-
o.setFullYear(n + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
193
|
-
const i = we(o), a = B(r, 0);
|
|
194
|
-
a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
|
|
195
|
-
const s = we(a);
|
|
196
|
-
return r.getTime() >= i.getTime() ? n + 1 : r.getTime() >= s.getTime() ? n : n - 1;
|
|
197
|
-
}
|
|
198
|
-
function lt(e) {
|
|
199
|
-
const t = P(e), r = new Date(
|
|
200
|
-
Date.UTC(
|
|
201
|
-
t.getFullYear(),
|
|
202
|
-
t.getMonth(),
|
|
203
|
-
t.getDate(),
|
|
204
|
-
t.getHours(),
|
|
205
|
-
t.getMinutes(),
|
|
206
|
-
t.getSeconds(),
|
|
207
|
-
t.getMilliseconds()
|
|
208
|
-
)
|
|
209
|
-
);
|
|
210
|
-
return r.setUTCFullYear(t.getFullYear()), +e - +r;
|
|
211
|
-
}
|
|
212
|
-
function he(e, ...t) {
|
|
213
|
-
const r = B.bind(
|
|
214
|
-
null,
|
|
215
|
-
t.find((n) => typeof n == "object")
|
|
216
|
-
);
|
|
217
|
-
return t.map(r);
|
|
218
|
-
}
|
|
219
|
-
function pe(e, t) {
|
|
220
|
-
const r = P(e, t?.in);
|
|
221
|
-
return r.setHours(0, 0, 0, 0), r;
|
|
222
|
-
}
|
|
223
|
-
function Ve(e, t, r) {
|
|
224
|
-
const [n, o] = he(
|
|
225
|
-
r?.in,
|
|
226
|
-
e,
|
|
227
|
-
t
|
|
228
|
-
), i = pe(n), a = pe(o), s = +i - lt(i), c = +a - lt(a);
|
|
229
|
-
return Math.round((s - c) / Fn);
|
|
230
|
-
}
|
|
231
|
-
function In(e, t) {
|
|
232
|
-
const r = vt(e, t), n = B(e, 0);
|
|
233
|
-
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), we(n);
|
|
234
|
-
}
|
|
235
|
-
function Hn(e, t, r) {
|
|
236
|
-
return Dt(e, t * 7, r);
|
|
237
|
-
}
|
|
238
|
-
function An(e, t, r) {
|
|
239
|
-
return Ot(e, t * 12, r);
|
|
240
|
-
}
|
|
241
|
-
function qn(e, t) {
|
|
242
|
-
let r, n = t?.in;
|
|
243
|
-
return e.forEach((o) => {
|
|
244
|
-
!n && typeof o == "object" && (n = B.bind(null, o));
|
|
245
|
-
const i = P(o, n);
|
|
246
|
-
(!r || r < i || isNaN(+i)) && (r = i);
|
|
247
|
-
}), B(n, r || NaN);
|
|
248
|
-
}
|
|
249
|
-
function jn(e, t) {
|
|
250
|
-
let r, n = t?.in;
|
|
251
|
-
return e.forEach((o) => {
|
|
252
|
-
!n && typeof o == "object" && (n = B.bind(null, o));
|
|
253
|
-
const i = P(o, n);
|
|
254
|
-
(!r || r > i || isNaN(+i)) && (r = i);
|
|
255
|
-
}), B(n, r || NaN);
|
|
256
|
-
}
|
|
257
|
-
function Gn(e, t, r) {
|
|
258
|
-
const [n, o] = he(
|
|
259
|
-
r?.in,
|
|
260
|
-
e,
|
|
261
|
-
t
|
|
262
|
-
);
|
|
263
|
-
return +pe(n) == +pe(o);
|
|
264
|
-
}
|
|
265
|
-
function Wt(e) {
|
|
266
|
-
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
267
|
-
}
|
|
268
|
-
function $n(e) {
|
|
269
|
-
return !(!Wt(e) && typeof e != "number" || isNaN(+P(e)));
|
|
270
|
-
}
|
|
271
|
-
function St(e, t, r) {
|
|
272
|
-
const [n, o] = he(
|
|
273
|
-
r?.in,
|
|
274
|
-
e,
|
|
275
|
-
t
|
|
276
|
-
), i = n.getFullYear() - o.getFullYear(), a = n.getMonth() - o.getMonth();
|
|
277
|
-
return i * 12 + a;
|
|
278
|
-
}
|
|
279
|
-
function Rn(e, t) {
|
|
280
|
-
const r = P(e, t?.in), n = r.getMonth();
|
|
281
|
-
return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(23, 59, 59, 999), r;
|
|
282
|
-
}
|
|
283
|
-
function Nt(e, t) {
|
|
284
|
-
const [r, n] = he(e, t.start, t.end);
|
|
285
|
-
return { start: r, end: n };
|
|
286
|
-
}
|
|
287
|
-
function zn(e, t) {
|
|
288
|
-
const { start: r, end: n } = Nt(t?.in, e);
|
|
289
|
-
let o = +r > +n;
|
|
290
|
-
const i = o ? +r : +n, a = o ? n : r;
|
|
291
|
-
a.setHours(0, 0, 0, 0), a.setDate(1);
|
|
292
|
-
let s = 1;
|
|
293
|
-
const c = [];
|
|
294
|
-
for (; +a <= i; )
|
|
295
|
-
c.push(B(r, a)), a.setMonth(a.getMonth() + s);
|
|
296
|
-
return o ? c.reverse() : c;
|
|
297
|
-
}
|
|
298
|
-
function Qn(e, t) {
|
|
299
|
-
const r = P(e, t?.in);
|
|
300
|
-
return r.setDate(1), r.setHours(0, 0, 0, 0), r;
|
|
301
|
-
}
|
|
302
|
-
function Vn(e, t) {
|
|
303
|
-
const r = P(e, t?.in), n = r.getFullYear();
|
|
304
|
-
return r.setFullYear(n + 1, 0, 0), r.setHours(23, 59, 59, 999), r;
|
|
305
|
-
}
|
|
306
|
-
function Ct(e, t) {
|
|
307
|
-
const r = P(e, t?.in);
|
|
308
|
-
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
309
|
-
}
|
|
310
|
-
function Xn(e, t) {
|
|
311
|
-
const { start: r, end: n } = Nt(t?.in, e);
|
|
312
|
-
let o = +r > +n;
|
|
313
|
-
const i = o ? +r : +n, a = o ? n : r;
|
|
314
|
-
a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
|
|
315
|
-
let s = 1;
|
|
316
|
-
const c = [];
|
|
317
|
-
for (; +a <= i; )
|
|
318
|
-
c.push(B(r, a)), a.setFullYear(a.getFullYear() + s);
|
|
319
|
-
return o ? c.reverse() : c;
|
|
320
|
-
}
|
|
321
|
-
function xt(e, t) {
|
|
322
|
-
const r = Me(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = P(e, t?.in), i = o.getDay(), a = (i < n ? -7 : 0) + 6 - (i - n);
|
|
323
|
-
return o.setDate(o.getDate() + a), o.setHours(23, 59, 59, 999), o;
|
|
324
|
-
}
|
|
325
|
-
function Un(e, t) {
|
|
326
|
-
return xt(e, { ...t, weekStartsOn: 1 });
|
|
327
|
-
}
|
|
328
|
-
const Zn = {
|
|
329
|
-
lessThanXSeconds: {
|
|
330
|
-
one: "less than a second",
|
|
331
|
-
other: "less than {{count}} seconds"
|
|
332
|
-
},
|
|
333
|
-
xSeconds: {
|
|
334
|
-
one: "1 second",
|
|
335
|
-
other: "{{count}} seconds"
|
|
336
|
-
},
|
|
337
|
-
halfAMinute: "half a minute",
|
|
338
|
-
lessThanXMinutes: {
|
|
339
|
-
one: "less than a minute",
|
|
340
|
-
other: "less than {{count}} minutes"
|
|
341
|
-
},
|
|
342
|
-
xMinutes: {
|
|
343
|
-
one: "1 minute",
|
|
344
|
-
other: "{{count}} minutes"
|
|
345
|
-
},
|
|
346
|
-
aboutXHours: {
|
|
347
|
-
one: "about 1 hour",
|
|
348
|
-
other: "about {{count}} hours"
|
|
349
|
-
},
|
|
350
|
-
xHours: {
|
|
351
|
-
one: "1 hour",
|
|
352
|
-
other: "{{count}} hours"
|
|
353
|
-
},
|
|
354
|
-
xDays: {
|
|
355
|
-
one: "1 day",
|
|
356
|
-
other: "{{count}} days"
|
|
357
|
-
},
|
|
358
|
-
aboutXWeeks: {
|
|
359
|
-
one: "about 1 week",
|
|
360
|
-
other: "about {{count}} weeks"
|
|
361
|
-
},
|
|
362
|
-
xWeeks: {
|
|
363
|
-
one: "1 week",
|
|
364
|
-
other: "{{count}} weeks"
|
|
365
|
-
},
|
|
366
|
-
aboutXMonths: {
|
|
367
|
-
one: "about 1 month",
|
|
368
|
-
other: "about {{count}} months"
|
|
369
|
-
},
|
|
370
|
-
xMonths: {
|
|
371
|
-
one: "1 month",
|
|
372
|
-
other: "{{count}} months"
|
|
373
|
-
},
|
|
374
|
-
aboutXYears: {
|
|
375
|
-
one: "about 1 year",
|
|
376
|
-
other: "about {{count}} years"
|
|
377
|
-
},
|
|
378
|
-
xYears: {
|
|
379
|
-
one: "1 year",
|
|
380
|
-
other: "{{count}} years"
|
|
381
|
-
},
|
|
382
|
-
overXYears: {
|
|
383
|
-
one: "over 1 year",
|
|
384
|
-
other: "over {{count}} years"
|
|
385
|
-
},
|
|
386
|
-
almostXYears: {
|
|
387
|
-
one: "almost 1 year",
|
|
388
|
-
other: "almost {{count}} years"
|
|
389
|
-
}
|
|
390
|
-
}, Kn = (e, t, r) => {
|
|
391
|
-
let n;
|
|
392
|
-
const o = Zn[e];
|
|
393
|
-
return typeof o == "string" ? n = o : t === 1 ? n = o.one : n = o.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
394
|
-
};
|
|
395
|
-
function je(e) {
|
|
396
|
-
return (t = {}) => {
|
|
397
|
-
const r = t.width ? String(t.width) : e.defaultWidth;
|
|
398
|
-
return e.formats[r] || e.formats[e.defaultWidth];
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
const Jn = {
|
|
402
|
-
full: "EEEE, MMMM do, y",
|
|
403
|
-
long: "MMMM do, y",
|
|
404
|
-
medium: "MMM d, y",
|
|
405
|
-
short: "MM/dd/yyyy"
|
|
406
|
-
}, Ln = {
|
|
407
|
-
full: "h:mm:ss a zzzz",
|
|
408
|
-
long: "h:mm:ss a z",
|
|
409
|
-
medium: "h:mm:ss a",
|
|
410
|
-
short: "h:mm a"
|
|
411
|
-
}, er = {
|
|
412
|
-
full: "{{date}} 'at' {{time}}",
|
|
413
|
-
long: "{{date}} 'at' {{time}}",
|
|
414
|
-
medium: "{{date}}, {{time}}",
|
|
415
|
-
short: "{{date}}, {{time}}"
|
|
416
|
-
}, tr = {
|
|
417
|
-
date: je({
|
|
418
|
-
formats: Jn,
|
|
419
|
-
defaultWidth: "full"
|
|
420
|
-
}),
|
|
421
|
-
time: je({
|
|
422
|
-
formats: Ln,
|
|
423
|
-
defaultWidth: "full"
|
|
424
|
-
}),
|
|
425
|
-
dateTime: je({
|
|
426
|
-
formats: er,
|
|
427
|
-
defaultWidth: "full"
|
|
428
|
-
})
|
|
429
|
-
}, nr = {
|
|
430
|
-
lastWeek: "'last' eeee 'at' p",
|
|
431
|
-
yesterday: "'yesterday at' p",
|
|
432
|
-
today: "'today at' p",
|
|
433
|
-
tomorrow: "'tomorrow at' p",
|
|
434
|
-
nextWeek: "eeee 'at' p",
|
|
435
|
-
other: "P"
|
|
436
|
-
}, rr = (e, t, r, n) => nr[e];
|
|
437
|
-
function me(e) {
|
|
438
|
-
return (t, r) => {
|
|
439
|
-
const n = r?.context ? String(r.context) : "standalone";
|
|
440
|
-
let o;
|
|
441
|
-
if (n === "formatting" && e.formattingValues) {
|
|
442
|
-
const a = e.defaultFormattingWidth || e.defaultWidth, s = r?.width ? String(r.width) : a;
|
|
443
|
-
o = e.formattingValues[s] || e.formattingValues[a];
|
|
444
|
-
} else {
|
|
445
|
-
const a = e.defaultWidth, s = r?.width ? String(r.width) : e.defaultWidth;
|
|
446
|
-
o = e.values[s] || e.values[a];
|
|
447
|
-
}
|
|
448
|
-
const i = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
449
|
-
return o[i];
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
const or = {
|
|
453
|
-
narrow: ["B", "A"],
|
|
454
|
-
abbreviated: ["BC", "AD"],
|
|
455
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
456
|
-
}, sr = {
|
|
457
|
-
narrow: ["1", "2", "3", "4"],
|
|
458
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
459
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
460
|
-
}, ar = {
|
|
461
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
462
|
-
abbreviated: [
|
|
463
|
-
"Jan",
|
|
464
|
-
"Feb",
|
|
465
|
-
"Mar",
|
|
466
|
-
"Apr",
|
|
467
|
-
"May",
|
|
468
|
-
"Jun",
|
|
469
|
-
"Jul",
|
|
470
|
-
"Aug",
|
|
471
|
-
"Sep",
|
|
472
|
-
"Oct",
|
|
473
|
-
"Nov",
|
|
474
|
-
"Dec"
|
|
475
|
-
],
|
|
476
|
-
wide: [
|
|
477
|
-
"January",
|
|
478
|
-
"February",
|
|
479
|
-
"March",
|
|
480
|
-
"April",
|
|
481
|
-
"May",
|
|
482
|
-
"June",
|
|
483
|
-
"July",
|
|
484
|
-
"August",
|
|
485
|
-
"September",
|
|
486
|
-
"October",
|
|
487
|
-
"November",
|
|
488
|
-
"December"
|
|
489
|
-
]
|
|
490
|
-
}, ir = {
|
|
491
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
492
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
493
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
494
|
-
wide: [
|
|
495
|
-
"Sunday",
|
|
496
|
-
"Monday",
|
|
497
|
-
"Tuesday",
|
|
498
|
-
"Wednesday",
|
|
499
|
-
"Thursday",
|
|
500
|
-
"Friday",
|
|
501
|
-
"Saturday"
|
|
502
|
-
]
|
|
503
|
-
}, cr = {
|
|
504
|
-
narrow: {
|
|
505
|
-
am: "a",
|
|
506
|
-
pm: "p",
|
|
507
|
-
midnight: "mi",
|
|
508
|
-
noon: "n",
|
|
509
|
-
morning: "morning",
|
|
510
|
-
afternoon: "afternoon",
|
|
511
|
-
evening: "evening",
|
|
512
|
-
night: "night"
|
|
513
|
-
},
|
|
514
|
-
abbreviated: {
|
|
515
|
-
am: "AM",
|
|
516
|
-
pm: "PM",
|
|
517
|
-
midnight: "midnight",
|
|
518
|
-
noon: "noon",
|
|
519
|
-
morning: "morning",
|
|
520
|
-
afternoon: "afternoon",
|
|
521
|
-
evening: "evening",
|
|
522
|
-
night: "night"
|
|
523
|
-
},
|
|
524
|
-
wide: {
|
|
525
|
-
am: "a.m.",
|
|
526
|
-
pm: "p.m.",
|
|
527
|
-
midnight: "midnight",
|
|
528
|
-
noon: "noon",
|
|
529
|
-
morning: "morning",
|
|
530
|
-
afternoon: "afternoon",
|
|
531
|
-
evening: "evening",
|
|
532
|
-
night: "night"
|
|
533
|
-
}
|
|
534
|
-
}, ur = {
|
|
535
|
-
narrow: {
|
|
536
|
-
am: "a",
|
|
537
|
-
pm: "p",
|
|
538
|
-
midnight: "mi",
|
|
539
|
-
noon: "n",
|
|
540
|
-
morning: "in the morning",
|
|
541
|
-
afternoon: "in the afternoon",
|
|
542
|
-
evening: "in the evening",
|
|
543
|
-
night: "at night"
|
|
544
|
-
},
|
|
545
|
-
abbreviated: {
|
|
546
|
-
am: "AM",
|
|
547
|
-
pm: "PM",
|
|
548
|
-
midnight: "midnight",
|
|
549
|
-
noon: "noon",
|
|
550
|
-
morning: "in the morning",
|
|
551
|
-
afternoon: "in the afternoon",
|
|
552
|
-
evening: "in the evening",
|
|
553
|
-
night: "at night"
|
|
554
|
-
},
|
|
555
|
-
wide: {
|
|
556
|
-
am: "a.m.",
|
|
557
|
-
pm: "p.m.",
|
|
558
|
-
midnight: "midnight",
|
|
559
|
-
noon: "noon",
|
|
560
|
-
morning: "in the morning",
|
|
561
|
-
afternoon: "in the afternoon",
|
|
562
|
-
evening: "in the evening",
|
|
563
|
-
night: "at night"
|
|
564
|
-
}
|
|
565
|
-
}, lr = (e, t) => {
|
|
566
|
-
const r = Number(e), n = r % 100;
|
|
567
|
-
if (n > 20 || n < 10)
|
|
568
|
-
switch (n % 10) {
|
|
569
|
-
case 1:
|
|
570
|
-
return r + "st";
|
|
571
|
-
case 2:
|
|
572
|
-
return r + "nd";
|
|
573
|
-
case 3:
|
|
574
|
-
return r + "rd";
|
|
575
|
-
}
|
|
576
|
-
return r + "th";
|
|
577
|
-
}, fr = {
|
|
578
|
-
ordinalNumber: lr,
|
|
579
|
-
era: me({
|
|
580
|
-
values: or,
|
|
581
|
-
defaultWidth: "wide"
|
|
582
|
-
}),
|
|
583
|
-
quarter: me({
|
|
584
|
-
values: sr,
|
|
585
|
-
defaultWidth: "wide",
|
|
586
|
-
argumentCallback: (e) => e - 1
|
|
587
|
-
}),
|
|
588
|
-
month: me({
|
|
589
|
-
values: ar,
|
|
590
|
-
defaultWidth: "wide"
|
|
591
|
-
}),
|
|
592
|
-
day: me({
|
|
593
|
-
values: ir,
|
|
594
|
-
defaultWidth: "wide"
|
|
595
|
-
}),
|
|
596
|
-
dayPeriod: me({
|
|
597
|
-
values: cr,
|
|
598
|
-
defaultWidth: "wide",
|
|
599
|
-
formattingValues: ur,
|
|
600
|
-
defaultFormattingWidth: "wide"
|
|
601
|
-
})
|
|
602
|
-
};
|
|
603
|
-
function ye(e) {
|
|
604
|
-
return (t, r = {}) => {
|
|
605
|
-
const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
|
|
606
|
-
if (!i)
|
|
607
|
-
return null;
|
|
608
|
-
const a = i[0], s = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? hr(s, (l) => l.test(a)) : (
|
|
609
|
-
// [TODO] -- I challenge you to fix the type
|
|
610
|
-
dr(s, (l) => l.test(a))
|
|
611
|
-
);
|
|
612
|
-
let u;
|
|
613
|
-
u = e.valueCallback ? e.valueCallback(c) : c, u = r.valueCallback ? (
|
|
614
|
-
// [TODO] -- I challenge you to fix the type
|
|
615
|
-
r.valueCallback(u)
|
|
616
|
-
) : u;
|
|
617
|
-
const f = t.slice(a.length);
|
|
618
|
-
return { value: u, rest: f };
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
function dr(e, t) {
|
|
622
|
-
for (const r in e)
|
|
623
|
-
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
624
|
-
return r;
|
|
625
|
-
}
|
|
626
|
-
function hr(e, t) {
|
|
627
|
-
for (let r = 0; r < e.length; r++)
|
|
628
|
-
if (t(e[r]))
|
|
629
|
-
return r;
|
|
630
|
-
}
|
|
631
|
-
function mr(e) {
|
|
632
|
-
return (t, r = {}) => {
|
|
633
|
-
const n = t.match(e.matchPattern);
|
|
634
|
-
if (!n) return null;
|
|
635
|
-
const o = n[0], i = t.match(e.parsePattern);
|
|
636
|
-
if (!i) return null;
|
|
637
|
-
let a = e.valueCallback ? e.valueCallback(i[0]) : i[0];
|
|
638
|
-
a = r.valueCallback ? r.valueCallback(a) : a;
|
|
639
|
-
const s = t.slice(o.length);
|
|
640
|
-
return { value: a, rest: s };
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
const yr = /^(\d+)(th|st|nd|rd)?/i, gr = /\d+/i, br = {
|
|
644
|
-
narrow: /^(b|a)/i,
|
|
645
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
646
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
647
|
-
}, wr = {
|
|
648
|
-
any: [/^b/i, /^(a|c)/i]
|
|
649
|
-
}, pr = {
|
|
650
|
-
narrow: /^[1234]/i,
|
|
651
|
-
abbreviated: /^q[1234]/i,
|
|
652
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
653
|
-
}, Mr = {
|
|
654
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
655
|
-
}, kr = {
|
|
656
|
-
narrow: /^[jfmasond]/i,
|
|
657
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
658
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
659
|
-
}, Dr = {
|
|
660
|
-
narrow: [
|
|
661
|
-
/^j/i,
|
|
662
|
-
/^f/i,
|
|
663
|
-
/^m/i,
|
|
664
|
-
/^a/i,
|
|
665
|
-
/^m/i,
|
|
666
|
-
/^j/i,
|
|
667
|
-
/^j/i,
|
|
668
|
-
/^a/i,
|
|
669
|
-
/^s/i,
|
|
670
|
-
/^o/i,
|
|
671
|
-
/^n/i,
|
|
672
|
-
/^d/i
|
|
673
|
-
],
|
|
674
|
-
any: [
|
|
675
|
-
/^ja/i,
|
|
676
|
-
/^f/i,
|
|
677
|
-
/^mar/i,
|
|
678
|
-
/^ap/i,
|
|
679
|
-
/^may/i,
|
|
680
|
-
/^jun/i,
|
|
681
|
-
/^jul/i,
|
|
682
|
-
/^au/i,
|
|
683
|
-
/^s/i,
|
|
684
|
-
/^o/i,
|
|
685
|
-
/^n/i,
|
|
686
|
-
/^d/i
|
|
687
|
-
]
|
|
688
|
-
}, Or = {
|
|
689
|
-
narrow: /^[smtwf]/i,
|
|
690
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
691
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
692
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
693
|
-
}, vr = {
|
|
694
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
695
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
696
|
-
}, Wr = {
|
|
697
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
698
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
699
|
-
}, Sr = {
|
|
700
|
-
any: {
|
|
701
|
-
am: /^a/i,
|
|
702
|
-
pm: /^p/i,
|
|
703
|
-
midnight: /^mi/i,
|
|
704
|
-
noon: /^no/i,
|
|
705
|
-
morning: /morning/i,
|
|
706
|
-
afternoon: /afternoon/i,
|
|
707
|
-
evening: /evening/i,
|
|
708
|
-
night: /night/i
|
|
709
|
-
}
|
|
710
|
-
}, Nr = {
|
|
711
|
-
ordinalNumber: mr({
|
|
712
|
-
matchPattern: yr,
|
|
713
|
-
parsePattern: gr,
|
|
714
|
-
valueCallback: (e) => parseInt(e, 10)
|
|
715
|
-
}),
|
|
716
|
-
era: ye({
|
|
717
|
-
matchPatterns: br,
|
|
718
|
-
defaultMatchWidth: "wide",
|
|
719
|
-
parsePatterns: wr,
|
|
720
|
-
defaultParseWidth: "any"
|
|
721
|
-
}),
|
|
722
|
-
quarter: ye({
|
|
723
|
-
matchPatterns: pr,
|
|
724
|
-
defaultMatchWidth: "wide",
|
|
725
|
-
parsePatterns: Mr,
|
|
726
|
-
defaultParseWidth: "any",
|
|
727
|
-
valueCallback: (e) => e + 1
|
|
728
|
-
}),
|
|
729
|
-
month: ye({
|
|
730
|
-
matchPatterns: kr,
|
|
731
|
-
defaultMatchWidth: "wide",
|
|
732
|
-
parsePatterns: Dr,
|
|
733
|
-
defaultParseWidth: "any"
|
|
734
|
-
}),
|
|
735
|
-
day: ye({
|
|
736
|
-
matchPatterns: Or,
|
|
737
|
-
defaultMatchWidth: "wide",
|
|
738
|
-
parsePatterns: vr,
|
|
739
|
-
defaultParseWidth: "any"
|
|
740
|
-
}),
|
|
741
|
-
dayPeriod: ye({
|
|
742
|
-
matchPatterns: Wr,
|
|
743
|
-
defaultMatchWidth: "any",
|
|
744
|
-
parsePatterns: Sr,
|
|
745
|
-
defaultParseWidth: "any"
|
|
746
|
-
})
|
|
747
|
-
}, fe = {
|
|
748
|
-
code: "en-US",
|
|
749
|
-
formatDistance: Kn,
|
|
750
|
-
formatLong: tr,
|
|
751
|
-
formatRelative: rr,
|
|
752
|
-
localize: fr,
|
|
753
|
-
match: Nr,
|
|
754
|
-
options: {
|
|
755
|
-
weekStartsOn: 0,
|
|
756
|
-
firstWeekContainsDate: 1
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
function Cr(e, t) {
|
|
760
|
-
const r = P(e, t?.in);
|
|
761
|
-
return Ve(r, Ct(r)) + 1;
|
|
762
|
-
}
|
|
763
|
-
function Xe(e, t) {
|
|
764
|
-
const r = P(e, t?.in), n = +we(r) - +In(r);
|
|
765
|
-
return Math.round(n / kt) + 1;
|
|
766
|
-
}
|
|
767
|
-
function Yt(e, t) {
|
|
768
|
-
const r = P(e, t?.in), n = r.getFullYear(), o = Me(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = B(t?.in || e, 0);
|
|
769
|
-
a.setFullYear(n + 1, 0, i), a.setHours(0, 0, 0, 0);
|
|
770
|
-
const s = de(a, t), c = B(t?.in || e, 0);
|
|
771
|
-
c.setFullYear(n, 0, i), c.setHours(0, 0, 0, 0);
|
|
772
|
-
const u = de(c, t);
|
|
773
|
-
return +r >= +s ? n + 1 : +r >= +u ? n : n - 1;
|
|
774
|
-
}
|
|
775
|
-
function xr(e, t) {
|
|
776
|
-
const r = Me(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = Yt(e, t), i = B(t?.in || e, 0);
|
|
777
|
-
return i.setFullYear(o, 0, n), i.setHours(0, 0, 0, 0), de(i, t);
|
|
778
|
-
}
|
|
779
|
-
function Ue(e, t) {
|
|
780
|
-
const r = P(e, t?.in), n = +de(r, t) - +xr(r, t);
|
|
781
|
-
return Math.round(n / kt) + 1;
|
|
782
|
-
}
|
|
783
|
-
function T(e, t) {
|
|
784
|
-
const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
785
|
-
return r + n;
|
|
786
|
-
}
|
|
787
|
-
const se = {
|
|
788
|
-
// Year
|
|
789
|
-
y(e, t) {
|
|
790
|
-
const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
|
|
791
|
-
return T(t === "yy" ? n % 100 : n, t.length);
|
|
792
|
-
},
|
|
793
|
-
// Month
|
|
794
|
-
M(e, t) {
|
|
795
|
-
const r = e.getMonth();
|
|
796
|
-
return t === "M" ? String(r + 1) : T(r + 1, 2);
|
|
797
|
-
},
|
|
798
|
-
// Day of the month
|
|
799
|
-
d(e, t) {
|
|
800
|
-
return T(e.getDate(), t.length);
|
|
801
|
-
},
|
|
802
|
-
// AM or PM
|
|
803
|
-
a(e, t) {
|
|
804
|
-
const r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
805
|
-
switch (t) {
|
|
806
|
-
case "a":
|
|
807
|
-
case "aa":
|
|
808
|
-
return r.toUpperCase();
|
|
809
|
-
case "aaa":
|
|
810
|
-
return r;
|
|
811
|
-
case "aaaaa":
|
|
812
|
-
return r[0];
|
|
813
|
-
default:
|
|
814
|
-
return r === "am" ? "a.m." : "p.m.";
|
|
815
|
-
}
|
|
816
|
-
},
|
|
817
|
-
// Hour [1-12]
|
|
818
|
-
h(e, t) {
|
|
819
|
-
return T(e.getHours() % 12 || 12, t.length);
|
|
820
|
-
},
|
|
821
|
-
// Hour [0-23]
|
|
822
|
-
H(e, t) {
|
|
823
|
-
return T(e.getHours(), t.length);
|
|
824
|
-
},
|
|
825
|
-
// Minute
|
|
826
|
-
m(e, t) {
|
|
827
|
-
return T(e.getMinutes(), t.length);
|
|
828
|
-
},
|
|
829
|
-
// Second
|
|
830
|
-
s(e, t) {
|
|
831
|
-
return T(e.getSeconds(), t.length);
|
|
832
|
-
},
|
|
833
|
-
// Fraction of second
|
|
834
|
-
S(e, t) {
|
|
835
|
-
const r = t.length, n = e.getMilliseconds(), o = Math.trunc(
|
|
836
|
-
n * Math.pow(10, r - 3)
|
|
837
|
-
);
|
|
838
|
-
return T(o, t.length);
|
|
839
|
-
}
|
|
840
|
-
}, ue = {
|
|
841
|
-
midnight: "midnight",
|
|
842
|
-
noon: "noon",
|
|
843
|
-
morning: "morning",
|
|
844
|
-
afternoon: "afternoon",
|
|
845
|
-
evening: "evening",
|
|
846
|
-
night: "night"
|
|
847
|
-
}, ft = {
|
|
848
|
-
// Era
|
|
849
|
-
G: function(e, t, r) {
|
|
850
|
-
const n = e.getFullYear() > 0 ? 1 : 0;
|
|
851
|
-
switch (t) {
|
|
852
|
-
// AD, BC
|
|
853
|
-
case "G":
|
|
854
|
-
case "GG":
|
|
855
|
-
case "GGG":
|
|
856
|
-
return r.era(n, { width: "abbreviated" });
|
|
857
|
-
// A, B
|
|
858
|
-
case "GGGGG":
|
|
859
|
-
return r.era(n, { width: "narrow" });
|
|
860
|
-
default:
|
|
861
|
-
return r.era(n, { width: "wide" });
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
// Year
|
|
865
|
-
y: function(e, t, r) {
|
|
866
|
-
if (t === "yo") {
|
|
867
|
-
const n = e.getFullYear(), o = n > 0 ? n : 1 - n;
|
|
868
|
-
return r.ordinalNumber(o, { unit: "year" });
|
|
869
|
-
}
|
|
870
|
-
return se.y(e, t);
|
|
871
|
-
},
|
|
872
|
-
// Local week-numbering year
|
|
873
|
-
Y: function(e, t, r, n) {
|
|
874
|
-
const o = Yt(e, n), i = o > 0 ? o : 1 - o;
|
|
875
|
-
if (t === "YY") {
|
|
876
|
-
const a = i % 100;
|
|
877
|
-
return T(a, 2);
|
|
878
|
-
}
|
|
879
|
-
return t === "Yo" ? r.ordinalNumber(i, { unit: "year" }) : T(i, t.length);
|
|
880
|
-
},
|
|
881
|
-
// ISO week-numbering year
|
|
882
|
-
R: function(e, t) {
|
|
883
|
-
const r = vt(e);
|
|
884
|
-
return T(r, t.length);
|
|
885
|
-
},
|
|
886
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
887
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
888
|
-
// | Year | `y` | `u` |
|
|
889
|
-
// |------|-----|-----|
|
|
890
|
-
// | AC 1 | 1 | 1 |
|
|
891
|
-
// | BC 1 | 1 | 0 |
|
|
892
|
-
// | BC 2 | 2 | -1 |
|
|
893
|
-
// Also `yy` always returns the last two digits of a year,
|
|
894
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
895
|
-
u: function(e, t) {
|
|
896
|
-
const r = e.getFullYear();
|
|
897
|
-
return T(r, t.length);
|
|
898
|
-
},
|
|
899
|
-
// Quarter
|
|
900
|
-
Q: function(e, t, r) {
|
|
901
|
-
const n = Math.ceil((e.getMonth() + 1) / 3);
|
|
902
|
-
switch (t) {
|
|
903
|
-
// 1, 2, 3, 4
|
|
904
|
-
case "Q":
|
|
905
|
-
return String(n);
|
|
906
|
-
// 01, 02, 03, 04
|
|
907
|
-
case "QQ":
|
|
908
|
-
return T(n, 2);
|
|
909
|
-
// 1st, 2nd, 3rd, 4th
|
|
910
|
-
case "Qo":
|
|
911
|
-
return r.ordinalNumber(n, { unit: "quarter" });
|
|
912
|
-
// Q1, Q2, Q3, Q4
|
|
913
|
-
case "QQQ":
|
|
914
|
-
return r.quarter(n, {
|
|
915
|
-
width: "abbreviated",
|
|
916
|
-
context: "formatting"
|
|
917
|
-
});
|
|
918
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
919
|
-
case "QQQQQ":
|
|
920
|
-
return r.quarter(n, {
|
|
921
|
-
width: "narrow",
|
|
922
|
-
context: "formatting"
|
|
923
|
-
});
|
|
924
|
-
default:
|
|
925
|
-
return r.quarter(n, {
|
|
926
|
-
width: "wide",
|
|
927
|
-
context: "formatting"
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
},
|
|
931
|
-
// Stand-alone quarter
|
|
932
|
-
q: function(e, t, r) {
|
|
933
|
-
const n = Math.ceil((e.getMonth() + 1) / 3);
|
|
934
|
-
switch (t) {
|
|
935
|
-
// 1, 2, 3, 4
|
|
936
|
-
case "q":
|
|
937
|
-
return String(n);
|
|
938
|
-
// 01, 02, 03, 04
|
|
939
|
-
case "qq":
|
|
940
|
-
return T(n, 2);
|
|
941
|
-
// 1st, 2nd, 3rd, 4th
|
|
942
|
-
case "qo":
|
|
943
|
-
return r.ordinalNumber(n, { unit: "quarter" });
|
|
944
|
-
// Q1, Q2, Q3, Q4
|
|
945
|
-
case "qqq":
|
|
946
|
-
return r.quarter(n, {
|
|
947
|
-
width: "abbreviated",
|
|
948
|
-
context: "standalone"
|
|
949
|
-
});
|
|
950
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
951
|
-
case "qqqqq":
|
|
952
|
-
return r.quarter(n, {
|
|
953
|
-
width: "narrow",
|
|
954
|
-
context: "standalone"
|
|
955
|
-
});
|
|
956
|
-
default:
|
|
957
|
-
return r.quarter(n, {
|
|
958
|
-
width: "wide",
|
|
959
|
-
context: "standalone"
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
// Month
|
|
964
|
-
M: function(e, t, r) {
|
|
965
|
-
const n = e.getMonth();
|
|
966
|
-
switch (t) {
|
|
967
|
-
case "M":
|
|
968
|
-
case "MM":
|
|
969
|
-
return se.M(e, t);
|
|
970
|
-
// 1st, 2nd, ..., 12th
|
|
971
|
-
case "Mo":
|
|
972
|
-
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
973
|
-
// Jan, Feb, ..., Dec
|
|
974
|
-
case "MMM":
|
|
975
|
-
return r.month(n, {
|
|
976
|
-
width: "abbreviated",
|
|
977
|
-
context: "formatting"
|
|
978
|
-
});
|
|
979
|
-
// J, F, ..., D
|
|
980
|
-
case "MMMMM":
|
|
981
|
-
return r.month(n, {
|
|
982
|
-
width: "narrow",
|
|
983
|
-
context: "formatting"
|
|
984
|
-
});
|
|
985
|
-
default:
|
|
986
|
-
return r.month(n, { width: "wide", context: "formatting" });
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
// Stand-alone month
|
|
990
|
-
L: function(e, t, r) {
|
|
991
|
-
const n = e.getMonth();
|
|
992
|
-
switch (t) {
|
|
993
|
-
// 1, 2, ..., 12
|
|
994
|
-
case "L":
|
|
995
|
-
return String(n + 1);
|
|
996
|
-
// 01, 02, ..., 12
|
|
997
|
-
case "LL":
|
|
998
|
-
return T(n + 1, 2);
|
|
999
|
-
// 1st, 2nd, ..., 12th
|
|
1000
|
-
case "Lo":
|
|
1001
|
-
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
1002
|
-
// Jan, Feb, ..., Dec
|
|
1003
|
-
case "LLL":
|
|
1004
|
-
return r.month(n, {
|
|
1005
|
-
width: "abbreviated",
|
|
1006
|
-
context: "standalone"
|
|
1007
|
-
});
|
|
1008
|
-
// J, F, ..., D
|
|
1009
|
-
case "LLLLL":
|
|
1010
|
-
return r.month(n, {
|
|
1011
|
-
width: "narrow",
|
|
1012
|
-
context: "standalone"
|
|
1013
|
-
});
|
|
1014
|
-
default:
|
|
1015
|
-
return r.month(n, { width: "wide", context: "standalone" });
|
|
1016
|
-
}
|
|
1017
|
-
},
|
|
1018
|
-
// Local week of year
|
|
1019
|
-
w: function(e, t, r, n) {
|
|
1020
|
-
const o = Ue(e, n);
|
|
1021
|
-
return t === "wo" ? r.ordinalNumber(o, { unit: "week" }) : T(o, t.length);
|
|
1022
|
-
},
|
|
1023
|
-
// ISO week of year
|
|
1024
|
-
I: function(e, t, r) {
|
|
1025
|
-
const n = Xe(e);
|
|
1026
|
-
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : T(n, t.length);
|
|
1027
|
-
},
|
|
1028
|
-
// Day of the month
|
|
1029
|
-
d: function(e, t, r) {
|
|
1030
|
-
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : se.d(e, t);
|
|
1031
|
-
},
|
|
1032
|
-
// Day of year
|
|
1033
|
-
D: function(e, t, r) {
|
|
1034
|
-
const n = Cr(e);
|
|
1035
|
-
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : T(n, t.length);
|
|
1036
|
-
},
|
|
1037
|
-
// Day of week
|
|
1038
|
-
E: function(e, t, r) {
|
|
1039
|
-
const n = e.getDay();
|
|
1040
|
-
switch (t) {
|
|
1041
|
-
// Tue
|
|
1042
|
-
case "E":
|
|
1043
|
-
case "EE":
|
|
1044
|
-
case "EEE":
|
|
1045
|
-
return r.day(n, {
|
|
1046
|
-
width: "abbreviated",
|
|
1047
|
-
context: "formatting"
|
|
1048
|
-
});
|
|
1049
|
-
// T
|
|
1050
|
-
case "EEEEE":
|
|
1051
|
-
return r.day(n, {
|
|
1052
|
-
width: "narrow",
|
|
1053
|
-
context: "formatting"
|
|
1054
|
-
});
|
|
1055
|
-
// Tu
|
|
1056
|
-
case "EEEEEE":
|
|
1057
|
-
return r.day(n, {
|
|
1058
|
-
width: "short",
|
|
1059
|
-
context: "formatting"
|
|
1060
|
-
});
|
|
1061
|
-
default:
|
|
1062
|
-
return r.day(n, {
|
|
1063
|
-
width: "wide",
|
|
1064
|
-
context: "formatting"
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
// Local day of week
|
|
1069
|
-
e: function(e, t, r, n) {
|
|
1070
|
-
const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
|
|
1071
|
-
switch (t) {
|
|
1072
|
-
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1073
|
-
case "e":
|
|
1074
|
-
return String(i);
|
|
1075
|
-
// Padded numerical value
|
|
1076
|
-
case "ee":
|
|
1077
|
-
return T(i, 2);
|
|
1078
|
-
// 1st, 2nd, ..., 7th
|
|
1079
|
-
case "eo":
|
|
1080
|
-
return r.ordinalNumber(i, { unit: "day" });
|
|
1081
|
-
case "eee":
|
|
1082
|
-
return r.day(o, {
|
|
1083
|
-
width: "abbreviated",
|
|
1084
|
-
context: "formatting"
|
|
1085
|
-
});
|
|
1086
|
-
// T
|
|
1087
|
-
case "eeeee":
|
|
1088
|
-
return r.day(o, {
|
|
1089
|
-
width: "narrow",
|
|
1090
|
-
context: "formatting"
|
|
1091
|
-
});
|
|
1092
|
-
// Tu
|
|
1093
|
-
case "eeeeee":
|
|
1094
|
-
return r.day(o, {
|
|
1095
|
-
width: "short",
|
|
1096
|
-
context: "formatting"
|
|
1097
|
-
});
|
|
1098
|
-
default:
|
|
1099
|
-
return r.day(o, {
|
|
1100
|
-
width: "wide",
|
|
1101
|
-
context: "formatting"
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
},
|
|
1105
|
-
// Stand-alone local day of week
|
|
1106
|
-
c: function(e, t, r, n) {
|
|
1107
|
-
const o = e.getDay(), i = (o - n.weekStartsOn + 8) % 7 || 7;
|
|
1108
|
-
switch (t) {
|
|
1109
|
-
// Numerical value (same as in `e`)
|
|
1110
|
-
case "c":
|
|
1111
|
-
return String(i);
|
|
1112
|
-
// Padded numerical value
|
|
1113
|
-
case "cc":
|
|
1114
|
-
return T(i, t.length);
|
|
1115
|
-
// 1st, 2nd, ..., 7th
|
|
1116
|
-
case "co":
|
|
1117
|
-
return r.ordinalNumber(i, { unit: "day" });
|
|
1118
|
-
case "ccc":
|
|
1119
|
-
return r.day(o, {
|
|
1120
|
-
width: "abbreviated",
|
|
1121
|
-
context: "standalone"
|
|
1122
|
-
});
|
|
1123
|
-
// T
|
|
1124
|
-
case "ccccc":
|
|
1125
|
-
return r.day(o, {
|
|
1126
|
-
width: "narrow",
|
|
1127
|
-
context: "standalone"
|
|
1128
|
-
});
|
|
1129
|
-
// Tu
|
|
1130
|
-
case "cccccc":
|
|
1131
|
-
return r.day(o, {
|
|
1132
|
-
width: "short",
|
|
1133
|
-
context: "standalone"
|
|
1134
|
-
});
|
|
1135
|
-
default:
|
|
1136
|
-
return r.day(o, {
|
|
1137
|
-
width: "wide",
|
|
1138
|
-
context: "standalone"
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
},
|
|
1142
|
-
// ISO day of week
|
|
1143
|
-
i: function(e, t, r) {
|
|
1144
|
-
const n = e.getDay(), o = n === 0 ? 7 : n;
|
|
1145
|
-
switch (t) {
|
|
1146
|
-
// 2
|
|
1147
|
-
case "i":
|
|
1148
|
-
return String(o);
|
|
1149
|
-
// 02
|
|
1150
|
-
case "ii":
|
|
1151
|
-
return T(o, t.length);
|
|
1152
|
-
// 2nd
|
|
1153
|
-
case "io":
|
|
1154
|
-
return r.ordinalNumber(o, { unit: "day" });
|
|
1155
|
-
// Tue
|
|
1156
|
-
case "iii":
|
|
1157
|
-
return r.day(n, {
|
|
1158
|
-
width: "abbreviated",
|
|
1159
|
-
context: "formatting"
|
|
1160
|
-
});
|
|
1161
|
-
// T
|
|
1162
|
-
case "iiiii":
|
|
1163
|
-
return r.day(n, {
|
|
1164
|
-
width: "narrow",
|
|
1165
|
-
context: "formatting"
|
|
1166
|
-
});
|
|
1167
|
-
// Tu
|
|
1168
|
-
case "iiiiii":
|
|
1169
|
-
return r.day(n, {
|
|
1170
|
-
width: "short",
|
|
1171
|
-
context: "formatting"
|
|
1172
|
-
});
|
|
1173
|
-
default:
|
|
1174
|
-
return r.day(n, {
|
|
1175
|
-
width: "wide",
|
|
1176
|
-
context: "formatting"
|
|
1177
|
-
});
|
|
1178
|
-
}
|
|
1179
|
-
},
|
|
1180
|
-
// AM or PM
|
|
1181
|
-
a: function(e, t, r) {
|
|
1182
|
-
const o = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1183
|
-
switch (t) {
|
|
1184
|
-
case "a":
|
|
1185
|
-
case "aa":
|
|
1186
|
-
return r.dayPeriod(o, {
|
|
1187
|
-
width: "abbreviated",
|
|
1188
|
-
context: "formatting"
|
|
1189
|
-
});
|
|
1190
|
-
case "aaa":
|
|
1191
|
-
return r.dayPeriod(o, {
|
|
1192
|
-
width: "abbreviated",
|
|
1193
|
-
context: "formatting"
|
|
1194
|
-
}).toLowerCase();
|
|
1195
|
-
case "aaaaa":
|
|
1196
|
-
return r.dayPeriod(o, {
|
|
1197
|
-
width: "narrow",
|
|
1198
|
-
context: "formatting"
|
|
1199
|
-
});
|
|
1200
|
-
default:
|
|
1201
|
-
return r.dayPeriod(o, {
|
|
1202
|
-
width: "wide",
|
|
1203
|
-
context: "formatting"
|
|
1204
|
-
});
|
|
1205
|
-
}
|
|
1206
|
-
},
|
|
1207
|
-
// AM, PM, midnight, noon
|
|
1208
|
-
b: function(e, t, r) {
|
|
1209
|
-
const n = e.getHours();
|
|
1210
|
-
let o;
|
|
1211
|
-
switch (n === 12 ? o = ue.noon : n === 0 ? o = ue.midnight : o = n / 12 >= 1 ? "pm" : "am", t) {
|
|
1212
|
-
case "b":
|
|
1213
|
-
case "bb":
|
|
1214
|
-
return r.dayPeriod(o, {
|
|
1215
|
-
width: "abbreviated",
|
|
1216
|
-
context: "formatting"
|
|
1217
|
-
});
|
|
1218
|
-
case "bbb":
|
|
1219
|
-
return r.dayPeriod(o, {
|
|
1220
|
-
width: "abbreviated",
|
|
1221
|
-
context: "formatting"
|
|
1222
|
-
}).toLowerCase();
|
|
1223
|
-
case "bbbbb":
|
|
1224
|
-
return r.dayPeriod(o, {
|
|
1225
|
-
width: "narrow",
|
|
1226
|
-
context: "formatting"
|
|
1227
|
-
});
|
|
1228
|
-
default:
|
|
1229
|
-
return r.dayPeriod(o, {
|
|
1230
|
-
width: "wide",
|
|
1231
|
-
context: "formatting"
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
},
|
|
1235
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
1236
|
-
B: function(e, t, r) {
|
|
1237
|
-
const n = e.getHours();
|
|
1238
|
-
let o;
|
|
1239
|
-
switch (n >= 17 ? o = ue.evening : n >= 12 ? o = ue.afternoon : n >= 4 ? o = ue.morning : o = ue.night, t) {
|
|
1240
|
-
case "B":
|
|
1241
|
-
case "BB":
|
|
1242
|
-
case "BBB":
|
|
1243
|
-
return r.dayPeriod(o, {
|
|
1244
|
-
width: "abbreviated",
|
|
1245
|
-
context: "formatting"
|
|
1246
|
-
});
|
|
1247
|
-
case "BBBBB":
|
|
1248
|
-
return r.dayPeriod(o, {
|
|
1249
|
-
width: "narrow",
|
|
1250
|
-
context: "formatting"
|
|
1251
|
-
});
|
|
1252
|
-
default:
|
|
1253
|
-
return r.dayPeriod(o, {
|
|
1254
|
-
width: "wide",
|
|
1255
|
-
context: "formatting"
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
},
|
|
1259
|
-
// Hour [1-12]
|
|
1260
|
-
h: function(e, t, r) {
|
|
1261
|
-
if (t === "ho") {
|
|
1262
|
-
let n = e.getHours() % 12;
|
|
1263
|
-
return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
|
|
1264
|
-
}
|
|
1265
|
-
return se.h(e, t);
|
|
1266
|
-
},
|
|
1267
|
-
// Hour [0-23]
|
|
1268
|
-
H: function(e, t, r) {
|
|
1269
|
-
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : se.H(e, t);
|
|
1270
|
-
},
|
|
1271
|
-
// Hour [0-11]
|
|
1272
|
-
K: function(e, t, r) {
|
|
1273
|
-
const n = e.getHours() % 12;
|
|
1274
|
-
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : T(n, t.length);
|
|
1275
|
-
},
|
|
1276
|
-
// Hour [1-24]
|
|
1277
|
-
k: function(e, t, r) {
|
|
1278
|
-
let n = e.getHours();
|
|
1279
|
-
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : T(n, t.length);
|
|
1280
|
-
},
|
|
1281
|
-
// Minute
|
|
1282
|
-
m: function(e, t, r) {
|
|
1283
|
-
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : se.m(e, t);
|
|
1284
|
-
},
|
|
1285
|
-
// Second
|
|
1286
|
-
s: function(e, t, r) {
|
|
1287
|
-
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : se.s(e, t);
|
|
1288
|
-
},
|
|
1289
|
-
// Fraction of second
|
|
1290
|
-
S: function(e, t) {
|
|
1291
|
-
return se.S(e, t);
|
|
1292
|
-
},
|
|
1293
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1294
|
-
X: function(e, t, r) {
|
|
1295
|
-
const n = e.getTimezoneOffset();
|
|
1296
|
-
if (n === 0)
|
|
1297
|
-
return "Z";
|
|
1298
|
-
switch (t) {
|
|
1299
|
-
// Hours and optional minutes
|
|
1300
|
-
case "X":
|
|
1301
|
-
return ht(n);
|
|
1302
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1303
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1304
|
-
// so this token always has the same output as `XX`
|
|
1305
|
-
case "XXXX":
|
|
1306
|
-
case "XX":
|
|
1307
|
-
return ae(n);
|
|
1308
|
-
// Hours and minutes with `:` delimiter
|
|
1309
|
-
default:
|
|
1310
|
-
return ae(n, ":");
|
|
1311
|
-
}
|
|
1312
|
-
},
|
|
1313
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1314
|
-
x: function(e, t, r) {
|
|
1315
|
-
const n = e.getTimezoneOffset();
|
|
1316
|
-
switch (t) {
|
|
1317
|
-
// Hours and optional minutes
|
|
1318
|
-
case "x":
|
|
1319
|
-
return ht(n);
|
|
1320
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
1321
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1322
|
-
// so this token always has the same output as `xx`
|
|
1323
|
-
case "xxxx":
|
|
1324
|
-
case "xx":
|
|
1325
|
-
return ae(n);
|
|
1326
|
-
// Hours and minutes with `:` delimiter
|
|
1327
|
-
default:
|
|
1328
|
-
return ae(n, ":");
|
|
1329
|
-
}
|
|
1330
|
-
},
|
|
1331
|
-
// Timezone (GMT)
|
|
1332
|
-
O: function(e, t, r) {
|
|
1333
|
-
const n = e.getTimezoneOffset();
|
|
1334
|
-
switch (t) {
|
|
1335
|
-
// Short
|
|
1336
|
-
case "O":
|
|
1337
|
-
case "OO":
|
|
1338
|
-
case "OOO":
|
|
1339
|
-
return "GMT" + dt(n, ":");
|
|
1340
|
-
default:
|
|
1341
|
-
return "GMT" + ae(n, ":");
|
|
1342
|
-
}
|
|
1343
|
-
},
|
|
1344
|
-
// Timezone (specific non-location)
|
|
1345
|
-
z: function(e, t, r) {
|
|
1346
|
-
const n = e.getTimezoneOffset();
|
|
1347
|
-
switch (t) {
|
|
1348
|
-
// Short
|
|
1349
|
-
case "z":
|
|
1350
|
-
case "zz":
|
|
1351
|
-
case "zzz":
|
|
1352
|
-
return "GMT" + dt(n, ":");
|
|
1353
|
-
default:
|
|
1354
|
-
return "GMT" + ae(n, ":");
|
|
1355
|
-
}
|
|
1356
|
-
},
|
|
1357
|
-
// Seconds timestamp
|
|
1358
|
-
t: function(e, t, r) {
|
|
1359
|
-
const n = Math.trunc(+e / 1e3);
|
|
1360
|
-
return T(n, t.length);
|
|
1361
|
-
},
|
|
1362
|
-
// Milliseconds timestamp
|
|
1363
|
-
T: function(e, t, r) {
|
|
1364
|
-
return T(+e, t.length);
|
|
1365
|
-
}
|
|
1366
|
-
};
|
|
1367
|
-
function dt(e, t = "") {
|
|
1368
|
-
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), i = n % 60;
|
|
1369
|
-
return i === 0 ? r + String(o) : r + String(o) + t + T(i, 2);
|
|
1370
|
-
}
|
|
1371
|
-
function ht(e, t) {
|
|
1372
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + T(Math.abs(e) / 60, 2) : ae(e, t);
|
|
1373
|
-
}
|
|
1374
|
-
function ae(e, t = "") {
|
|
1375
|
-
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = T(Math.trunc(n / 60), 2), i = T(n % 60, 2);
|
|
1376
|
-
return r + o + t + i;
|
|
1377
|
-
}
|
|
1378
|
-
const mt = (e, t) => {
|
|
1379
|
-
switch (e) {
|
|
1380
|
-
case "P":
|
|
1381
|
-
return t.date({ width: "short" });
|
|
1382
|
-
case "PP":
|
|
1383
|
-
return t.date({ width: "medium" });
|
|
1384
|
-
case "PPP":
|
|
1385
|
-
return t.date({ width: "long" });
|
|
1386
|
-
default:
|
|
1387
|
-
return t.date({ width: "full" });
|
|
1388
|
-
}
|
|
1389
|
-
}, Tt = (e, t) => {
|
|
1390
|
-
switch (e) {
|
|
1391
|
-
case "p":
|
|
1392
|
-
return t.time({ width: "short" });
|
|
1393
|
-
case "pp":
|
|
1394
|
-
return t.time({ width: "medium" });
|
|
1395
|
-
case "ppp":
|
|
1396
|
-
return t.time({ width: "long" });
|
|
1397
|
-
default:
|
|
1398
|
-
return t.time({ width: "full" });
|
|
1399
|
-
}
|
|
1400
|
-
}, Yr = (e, t) => {
|
|
1401
|
-
const r = e.match(/(P+)(p+)?/) || [], n = r[1], o = r[2];
|
|
1402
|
-
if (!o)
|
|
1403
|
-
return mt(e, t);
|
|
1404
|
-
let i;
|
|
1405
|
-
switch (n) {
|
|
1406
|
-
case "P":
|
|
1407
|
-
i = t.dateTime({ width: "short" });
|
|
1408
|
-
break;
|
|
1409
|
-
case "PP":
|
|
1410
|
-
i = t.dateTime({ width: "medium" });
|
|
1411
|
-
break;
|
|
1412
|
-
case "PPP":
|
|
1413
|
-
i = t.dateTime({ width: "long" });
|
|
1414
|
-
break;
|
|
1415
|
-
default:
|
|
1416
|
-
i = t.dateTime({ width: "full" });
|
|
1417
|
-
break;
|
|
1418
|
-
}
|
|
1419
|
-
return i.replace("{{date}}", mt(n, t)).replace("{{time}}", Tt(o, t));
|
|
1420
|
-
}, Tr = {
|
|
1421
|
-
p: Tt,
|
|
1422
|
-
P: Yr
|
|
1423
|
-
}, Pr = /^D+$/, Er = /^Y+$/, _r = ["D", "DD", "YY", "YYYY"];
|
|
1424
|
-
function Fr(e) {
|
|
1425
|
-
return Pr.test(e);
|
|
1426
|
-
}
|
|
1427
|
-
function Br(e) {
|
|
1428
|
-
return Er.test(e);
|
|
1429
|
-
}
|
|
1430
|
-
function Ir(e, t, r) {
|
|
1431
|
-
const n = Hr(e, t, r);
|
|
1432
|
-
if (console.warn(n), _r.includes(e)) throw new RangeError(n);
|
|
1433
|
-
}
|
|
1434
|
-
function Hr(e, t, r) {
|
|
1435
|
-
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
1436
|
-
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1437
|
-
}
|
|
1438
|
-
const Ar = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, qr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, jr = /^'([^]*?)'?$/, Gr = /''/g, $r = /[a-zA-Z]/;
|
|
1439
|
-
function be(e, t, r) {
|
|
1440
|
-
const n = Me(), o = r?.locale ?? n.locale ?? fe, i = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = P(e, r?.in);
|
|
1441
|
-
if (!$n(s))
|
|
1442
|
-
throw new RangeError("Invalid time value");
|
|
1443
|
-
let c = t.match(qr).map((f) => {
|
|
1444
|
-
const l = f[0];
|
|
1445
|
-
if (l === "p" || l === "P") {
|
|
1446
|
-
const d = Tr[l];
|
|
1447
|
-
return d(f, o.formatLong);
|
|
1448
|
-
}
|
|
1449
|
-
return f;
|
|
1450
|
-
}).join("").match(Ar).map((f) => {
|
|
1451
|
-
if (f === "''")
|
|
1452
|
-
return { isToken: !1, value: "'" };
|
|
1453
|
-
const l = f[0];
|
|
1454
|
-
if (l === "'")
|
|
1455
|
-
return { isToken: !1, value: Rr(f) };
|
|
1456
|
-
if (ft[l])
|
|
1457
|
-
return { isToken: !0, value: f };
|
|
1458
|
-
if (l.match($r))
|
|
1459
|
-
throw new RangeError(
|
|
1460
|
-
"Format string contains an unescaped latin alphabet character `" + l + "`"
|
|
1461
|
-
);
|
|
1462
|
-
return { isToken: !1, value: f };
|
|
1463
|
-
});
|
|
1464
|
-
o.localize.preprocessor && (c = o.localize.preprocessor(s, c));
|
|
1465
|
-
const u = {
|
|
1466
|
-
firstWeekContainsDate: i,
|
|
1467
|
-
weekStartsOn: a,
|
|
1468
|
-
locale: o
|
|
1469
|
-
};
|
|
1470
|
-
return c.map((f) => {
|
|
1471
|
-
if (!f.isToken) return f.value;
|
|
1472
|
-
const l = f.value;
|
|
1473
|
-
(!r?.useAdditionalWeekYearTokens && Br(l) || !r?.useAdditionalDayOfYearTokens && Fr(l)) && Ir(l, t, String(e));
|
|
1474
|
-
const d = ft[l[0]];
|
|
1475
|
-
return d(s, l, o.localize, u);
|
|
1476
|
-
}).join("");
|
|
1477
|
-
}
|
|
1478
|
-
function Rr(e) {
|
|
1479
|
-
const t = e.match(jr);
|
|
1480
|
-
return t ? t[1].replace(Gr, "'") : e;
|
|
1481
|
-
}
|
|
1482
|
-
function zr(e, t) {
|
|
1483
|
-
const r = P(e, t?.in), n = r.getFullYear(), o = r.getMonth(), i = B(r, 0);
|
|
1484
|
-
return i.setFullYear(n, o + 1, 0), i.setHours(0, 0, 0, 0), i.getDate();
|
|
1485
|
-
}
|
|
1486
|
-
function Qr(e, t) {
|
|
1487
|
-
return P(e, t?.in).getMonth();
|
|
1488
|
-
}
|
|
1489
|
-
function Vr(e, t) {
|
|
1490
|
-
return P(e, t?.in).getFullYear();
|
|
1491
|
-
}
|
|
1492
|
-
function Xr(e, t) {
|
|
1493
|
-
return +P(e) > +P(t);
|
|
1494
|
-
}
|
|
1495
|
-
function Ur(e, t) {
|
|
1496
|
-
return +P(e) < +P(t);
|
|
1497
|
-
}
|
|
1498
|
-
function Zr(e, t, r) {
|
|
1499
|
-
const [n, o] = he(
|
|
1500
|
-
r?.in,
|
|
1501
|
-
e,
|
|
1502
|
-
t
|
|
1503
|
-
);
|
|
1504
|
-
return n.getFullYear() === o.getFullYear() && n.getMonth() === o.getMonth();
|
|
1505
|
-
}
|
|
1506
|
-
function Kr(e, t, r) {
|
|
1507
|
-
const [n, o] = he(
|
|
1508
|
-
r?.in,
|
|
1509
|
-
e,
|
|
1510
|
-
t
|
|
1511
|
-
);
|
|
1512
|
-
return n.getFullYear() === o.getFullYear();
|
|
1513
|
-
}
|
|
1514
|
-
function Jr(e, t, r) {
|
|
1515
|
-
const n = P(e, r?.in), o = n.getFullYear(), i = n.getDate(), a = B(e, 0);
|
|
1516
|
-
a.setFullYear(o, t, 15), a.setHours(0, 0, 0, 0);
|
|
1517
|
-
const s = zr(a);
|
|
1518
|
-
return n.setMonth(t, Math.min(i, s)), n;
|
|
1519
|
-
}
|
|
1520
|
-
function Lr(e, t, r) {
|
|
1521
|
-
const n = P(e, r?.in);
|
|
1522
|
-
return isNaN(+n) ? B(e, NaN) : (n.setFullYear(t), n);
|
|
1523
|
-
}
|
|
1524
|
-
const yt = 5, eo = 4;
|
|
1525
|
-
function to(e, t) {
|
|
1526
|
-
const r = t.startOfMonth(e), n = r.getDay() > 0 ? r.getDay() : 7, o = t.addDays(e, -n + 1), i = t.addDays(o, yt * 7 - 1);
|
|
1527
|
-
return t.getMonth(e) === t.getMonth(i) ? yt : eo;
|
|
1528
|
-
}
|
|
1529
|
-
function Pt(e, t) {
|
|
1530
|
-
const r = t.startOfMonth(e), n = r.getDay();
|
|
1531
|
-
return n === 1 ? r : n === 0 ? t.addDays(r, -6) : t.addDays(r, -1 * (n - 1));
|
|
1532
|
-
}
|
|
1533
|
-
function no(e, t) {
|
|
1534
|
-
const r = Pt(e, t), n = to(e, t);
|
|
1535
|
-
return t.addDays(r, n * 7 - 1);
|
|
1536
|
-
}
|
|
1537
|
-
const Et = {
|
|
1538
|
-
...fe,
|
|
1539
|
-
labels: {
|
|
1540
|
-
labelDayButton: (e, t, r, n) => {
|
|
1541
|
-
let o;
|
|
1542
|
-
n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => be(a, s, { locale: fe, ...r });
|
|
1543
|
-
let i = o(e, "PPPP");
|
|
1544
|
-
return t.today && (i = `Today, ${i}`), t.selected && (i = `${i}, selected`), i;
|
|
1545
|
-
},
|
|
1546
|
-
labelMonthDropdown: "Choose the Month",
|
|
1547
|
-
labelNext: "Go to the Next Month",
|
|
1548
|
-
labelPrevious: "Go to the Previous Month",
|
|
1549
|
-
labelWeekNumber: (e) => `Week ${e}`,
|
|
1550
|
-
labelYearDropdown: "Choose the Year",
|
|
1551
|
-
labelGrid: (e, t, r) => {
|
|
1552
|
-
let n;
|
|
1553
|
-
return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => be(o, i, { locale: fe, ...t }), n(e, "LLLL yyyy");
|
|
1554
|
-
},
|
|
1555
|
-
labelGridcell: (e, t, r, n) => {
|
|
1556
|
-
let o;
|
|
1557
|
-
n && typeof n.format == "function" ? o = n.format.bind(n) : o = (a, s) => be(a, s, { locale: fe, ...r });
|
|
1558
|
-
let i = o(e, "PPPP");
|
|
1559
|
-
return t?.today && (i = `Today, ${i}`), i;
|
|
1560
|
-
},
|
|
1561
|
-
labelNav: "Navigation bar",
|
|
1562
|
-
labelWeekNumberHeader: "Week Number",
|
|
1563
|
-
labelWeekday: (e, t, r) => {
|
|
1564
|
-
let n;
|
|
1565
|
-
return r && typeof r.format == "function" ? n = r.format.bind(r) : n = (o, i) => be(o, i, { locale: fe, ...t }), n(e, "cccc");
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
};
|
|
1569
|
-
class G {
|
|
1570
|
-
/**
|
|
1571
|
-
* Creates an instance of `DateLib`.
|
|
1572
|
-
*
|
|
1573
|
-
* @param options Configuration options for the date library.
|
|
1574
|
-
* @param overrides Custom overrides for the date library functions.
|
|
1575
|
-
*/
|
|
1576
|
-
constructor(t, r) {
|
|
1577
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? H.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, o, i) => this.overrides?.newDate ? this.overrides.newDate(n, o, i) : this.options.timeZone ? new H(n, o, i, this.options.timeZone) : new Date(n, o, i), this.addDays = (n, o) => this.overrides?.addDays ? this.overrides.addDays(n, o) : Dt(n, o), this.addMonths = (n, o) => this.overrides?.addMonths ? this.overrides.addMonths(n, o) : Ot(n, o), this.addWeeks = (n, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, o) : Hn(n, o), this.addYears = (n, o) => this.overrides?.addYears ? this.overrides.addYears(n, o) : An(n, o), this.differenceInCalendarDays = (n, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, o) : Ve(n, o), this.differenceInCalendarMonths = (n, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, o) : St(n, o), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : zn(n), this.eachYearOfInterval = (n) => {
|
|
1578
|
-
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : Xn(n), i = new Set(o.map((s) => this.getYear(s)));
|
|
1579
|
-
if (i.size === o.length)
|
|
1580
|
-
return o;
|
|
1581
|
-
const a = [];
|
|
1582
|
-
return i.forEach((s) => {
|
|
1583
|
-
a.push(new Date(s, 0, 1));
|
|
1584
|
-
}), a;
|
|
1585
|
-
}, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : no(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Un(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : Rn(n), this.endOfWeek = (n, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, o) : xt(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : Vn(n), this.format = (n, o, i) => {
|
|
1586
|
-
const a = this.overrides?.format ? this.overrides.format(n, o, this.options) : be(n, o, this.options);
|
|
1587
|
-
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
|
|
1588
|
-
}, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Xe(n), this.getMonth = (n, o) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : Qr(n, this.options), this.getYear = (n, o) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : Vr(n, this.options), this.getWeek = (n, o) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : Ue(n, this.options), this.isAfter = (n, o) => this.overrides?.isAfter ? this.overrides.isAfter(n, o) : Xr(n, o), this.isBefore = (n, o) => this.overrides?.isBefore ? this.overrides.isBefore(n, o) : Ur(n, o), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Wt(n), this.isSameDay = (n, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, o) : Gn(n, o), this.isSameMonth = (n, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, o) : Zr(n, o), this.isSameYear = (n, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, o) : Kr(n, o), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : qn(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : jn(n), this.setMonth = (n, o) => this.overrides?.setMonth ? this.overrides.setMonth(n, o) : Jr(n, o), this.setYear = (n, o) => this.overrides?.setYear ? this.overrides.setYear(n, o) : Lr(n, o), this.startOfBroadcastWeek = (n, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : Pt(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : pe(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : we(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : Qn(n), this.startOfWeek = (n, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : de(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : Ct(n), this.options = { locale: Et, ...t }, this.overrides = r;
|
|
1589
|
-
}
|
|
1590
|
-
/**
|
|
1591
|
-
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
1592
|
-
* digits.
|
|
1593
|
-
*
|
|
1594
|
-
* @since 9.5.0
|
|
1595
|
-
* @returns A record mapping Arabic digits to the target numerals.
|
|
1596
|
-
*/
|
|
1597
|
-
getDigitMap() {
|
|
1598
|
-
const { numerals: t = "latn" } = this.options, r = new Intl.NumberFormat("en-US", {
|
|
1599
|
-
numberingSystem: t
|
|
1600
|
-
}), n = {};
|
|
1601
|
-
for (let o = 0; o < 10; o++)
|
|
1602
|
-
n[o.toString()] = r.format(o);
|
|
1603
|
-
return n;
|
|
1604
|
-
}
|
|
1605
|
-
/**
|
|
1606
|
-
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
1607
|
-
*
|
|
1608
|
-
* @since 9.5.0
|
|
1609
|
-
* @param input The string containing Arabic digits.
|
|
1610
|
-
* @returns The string with digits replaced.
|
|
1611
|
-
*/
|
|
1612
|
-
replaceDigits(t) {
|
|
1613
|
-
const r = this.getDigitMap();
|
|
1614
|
-
return t.replace(/\d/g, (n) => r[n] || n);
|
|
1615
|
-
}
|
|
1616
|
-
/**
|
|
1617
|
-
* Formats a number using the configured numbering system.
|
|
1618
|
-
*
|
|
1619
|
-
* @since 9.5.0
|
|
1620
|
-
* @param value The number to format.
|
|
1621
|
-
* @returns The formatted number as a string.
|
|
1622
|
-
*/
|
|
1623
|
-
formatNumber(t) {
|
|
1624
|
-
return this.replaceDigits(t.toString());
|
|
1625
|
-
}
|
|
1626
|
-
/**
|
|
1627
|
-
* Returns the preferred ordering for month and year labels for the current
|
|
1628
|
-
* locale.
|
|
1629
|
-
*/
|
|
1630
|
-
getMonthYearOrder() {
|
|
1631
|
-
const t = this.options.locale?.code;
|
|
1632
|
-
return t && G.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1633
|
-
}
|
|
1634
|
-
/**
|
|
1635
|
-
* Formats the month/year pair respecting locale conventions.
|
|
1636
|
-
*
|
|
1637
|
-
* @since 9.11.0
|
|
1638
|
-
*/
|
|
1639
|
-
formatMonthYear(t) {
|
|
1640
|
-
const { locale: r, timeZone: n, numerals: o } = this.options, i = r?.code;
|
|
1641
|
-
if (i && G.yearFirstLocales.has(i))
|
|
1642
|
-
try {
|
|
1643
|
-
return new Intl.DateTimeFormat(i, {
|
|
1644
|
-
month: "long",
|
|
1645
|
-
year: "numeric",
|
|
1646
|
-
timeZone: n,
|
|
1647
|
-
numberingSystem: o
|
|
1648
|
-
}).format(t);
|
|
1649
|
-
} catch {
|
|
1650
|
-
}
|
|
1651
|
-
const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
1652
|
-
return this.format(t, a);
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
G.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
1656
|
-
"eu",
|
|
1657
|
-
"hu",
|
|
1658
|
-
"ja",
|
|
1659
|
-
"ja-Hira",
|
|
1660
|
-
"ja-JP",
|
|
1661
|
-
"ko",
|
|
1662
|
-
"ko-KR",
|
|
1663
|
-
"lt",
|
|
1664
|
-
"lt-LT",
|
|
1665
|
-
"lv",
|
|
1666
|
-
"lv-LV",
|
|
1667
|
-
"mn",
|
|
1668
|
-
"mn-MN",
|
|
1669
|
-
"zh",
|
|
1670
|
-
"zh-CN",
|
|
1671
|
-
"zh-HK",
|
|
1672
|
-
"zh-TW"
|
|
1673
|
-
]);
|
|
1674
|
-
const L = new G();
|
|
1675
|
-
class _t {
|
|
1676
|
-
constructor(t, r, n = L) {
|
|
1677
|
-
this.date = t, this.displayMonth = r, this.outside = !!(r && !n.isSameMonth(t, r)), this.dateLib = n, this.isoDate = n.format(t, "yyyy-MM-dd"), this.displayMonthId = n.format(r, "yyyy-MM"), this.dateMonthId = n.format(t, "yyyy-MM");
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
1681
|
-
* date and the displayed month.
|
|
1682
|
-
*
|
|
1683
|
-
* @param day The `CalendarDay` to compare with.
|
|
1684
|
-
* @returns `true` if the days are equal, otherwise `false`.
|
|
1685
|
-
*/
|
|
1686
|
-
isEqualTo(t) {
|
|
1687
|
-
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
class ro {
|
|
1691
|
-
constructor(t, r) {
|
|
1692
|
-
this.date = t, this.weeks = r;
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
class oo {
|
|
1696
|
-
constructor(t, r) {
|
|
1697
|
-
this.days = r, this.weekNumber = t;
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
function so(e) {
|
|
1701
|
-
return h.createElement("button", { ...e });
|
|
1702
|
-
}
|
|
1703
|
-
function ao(e) {
|
|
1704
|
-
return h.createElement("span", { ...e });
|
|
1705
|
-
}
|
|
1706
|
-
function io(e) {
|
|
1707
|
-
const { size: t = 24, orientation: r = "left", className: n } = e;
|
|
1708
|
-
return (
|
|
1709
|
-
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
1710
|
-
h.createElement(
|
|
1711
|
-
"svg",
|
|
1712
|
-
{ className: n, width: t, height: t, viewBox: "0 0 24 24" },
|
|
1713
|
-
r === "up" && h.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
1714
|
-
r === "down" && h.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
1715
|
-
r === "left" && h.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
1716
|
-
r === "right" && h.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
1717
|
-
)
|
|
1718
|
-
);
|
|
1719
|
-
}
|
|
1720
|
-
function co(e) {
|
|
1721
|
-
const { day: t, modifiers: r, ...n } = e;
|
|
1722
|
-
return h.createElement("td", { ...n });
|
|
1723
|
-
}
|
|
1724
|
-
function uo(e) {
|
|
1725
|
-
const { day: t, modifiers: r, ...n } = e, o = h.useRef(null);
|
|
1726
|
-
return h.useEffect(() => {
|
|
1727
|
-
r.focused && o.current?.focus();
|
|
1728
|
-
}, [r.focused]), h.createElement("button", { ref: o, ...n });
|
|
1729
|
-
}
|
|
1730
|
-
var y;
|
|
1731
|
-
(function(e) {
|
|
1732
|
-
e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
|
|
1733
|
-
})(y || (y = {}));
|
|
1734
|
-
var _;
|
|
1735
|
-
(function(e) {
|
|
1736
|
-
e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
|
|
1737
|
-
})(_ || (_ = {}));
|
|
1738
|
-
var U;
|
|
1739
|
-
(function(e) {
|
|
1740
|
-
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
1741
|
-
})(U || (U = {}));
|
|
1742
|
-
var j;
|
|
1743
|
-
(function(e) {
|
|
1744
|
-
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
1745
|
-
})(j || (j = {}));
|
|
1746
|
-
function lo(e) {
|
|
1747
|
-
const { options: t, className: r, components: n, classNames: o, ...i } = e, a = [o[y.Dropdown], r].join(" "), s = t?.find(({ value: c }) => c === i.value);
|
|
1748
|
-
return h.createElement(
|
|
1749
|
-
"span",
|
|
1750
|
-
{ "data-disabled": i.disabled, className: o[y.DropdownRoot] },
|
|
1751
|
-
h.createElement(n.Select, { className: a, ...i }, t?.map(({ value: c, label: u, disabled: f }) => h.createElement(n.Option, { key: c, value: c, disabled: f }, u))),
|
|
1752
|
-
h.createElement(
|
|
1753
|
-
"span",
|
|
1754
|
-
{ className: o[y.CaptionLabel], "aria-hidden": !0 },
|
|
1755
|
-
s?.label,
|
|
1756
|
-
h.createElement(n.Chevron, { orientation: "down", size: 18, className: o[y.Chevron] })
|
|
1757
|
-
)
|
|
1758
|
-
);
|
|
1759
|
-
}
|
|
1760
|
-
function fo(e) {
|
|
1761
|
-
return h.createElement("div", { ...e });
|
|
1762
|
-
}
|
|
1763
|
-
function ho(e) {
|
|
1764
|
-
return h.createElement("div", { ...e });
|
|
1765
|
-
}
|
|
1766
|
-
function mo(e) {
|
|
1767
|
-
const { calendarMonth: t, displayIndex: r, ...n } = e;
|
|
1768
|
-
return h.createElement("div", { ...n }, e.children);
|
|
1769
|
-
}
|
|
1770
|
-
function yo(e) {
|
|
1771
|
-
const { calendarMonth: t, displayIndex: r, ...n } = e;
|
|
1772
|
-
return h.createElement("div", { ...n });
|
|
1773
|
-
}
|
|
1774
|
-
function go(e) {
|
|
1775
|
-
return h.createElement("table", { ...e });
|
|
1776
|
-
}
|
|
1777
|
-
function bo(e) {
|
|
1778
|
-
return h.createElement("div", { ...e });
|
|
1779
|
-
}
|
|
1780
|
-
const Ft = vn(void 0);
|
|
1781
|
-
function ke() {
|
|
1782
|
-
const e = Wn(Ft);
|
|
1783
|
-
if (e === void 0)
|
|
1784
|
-
throw new Error("useDayPicker() must be used within a custom component.");
|
|
1785
|
-
return e;
|
|
1786
|
-
}
|
|
1787
|
-
function wo(e) {
|
|
1788
|
-
const { components: t } = ke();
|
|
1789
|
-
return h.createElement(t.Dropdown, { ...e });
|
|
1790
|
-
}
|
|
1791
|
-
function po(e) {
|
|
1792
|
-
const { onPreviousClick: t, onNextClick: r, previousMonth: n, nextMonth: o, ...i } = e, { components: a, classNames: s, labels: { labelPrevious: c, labelNext: u } } = ke(), f = q((d) => {
|
|
1793
|
-
o && r?.(d);
|
|
1794
|
-
}, [o, r]), l = q((d) => {
|
|
1795
|
-
n && t?.(d);
|
|
1796
|
-
}, [n, t]);
|
|
1797
|
-
return h.createElement(
|
|
1798
|
-
"nav",
|
|
1799
|
-
{ ...i },
|
|
1800
|
-
h.createElement(
|
|
1801
|
-
a.PreviousMonthButton,
|
|
1802
|
-
{ type: "button", className: s[y.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: l },
|
|
1803
|
-
h.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: s[y.Chevron], orientation: "left" })
|
|
1804
|
-
),
|
|
1805
|
-
h.createElement(
|
|
1806
|
-
a.NextMonthButton,
|
|
1807
|
-
{ type: "button", className: s[y.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": u(o), onClick: f },
|
|
1808
|
-
h.createElement(a.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[y.Chevron] })
|
|
1809
|
-
)
|
|
1810
|
-
);
|
|
1811
|
-
}
|
|
1812
|
-
function Mo(e) {
|
|
1813
|
-
const { components: t } = ke();
|
|
1814
|
-
return h.createElement(t.Button, { ...e });
|
|
1815
|
-
}
|
|
1816
|
-
function ko(e) {
|
|
1817
|
-
return h.createElement("option", { ...e });
|
|
1818
|
-
}
|
|
1819
|
-
function Do(e) {
|
|
1820
|
-
const { components: t } = ke();
|
|
1821
|
-
return h.createElement(t.Button, { ...e });
|
|
1822
|
-
}
|
|
1823
|
-
function Oo(e) {
|
|
1824
|
-
const { rootRef: t, ...r } = e;
|
|
1825
|
-
return h.createElement("div", { ...r, ref: t });
|
|
1826
|
-
}
|
|
1827
|
-
function vo(e) {
|
|
1828
|
-
return h.createElement("select", { ...e });
|
|
1829
|
-
}
|
|
1830
|
-
function Wo(e) {
|
|
1831
|
-
const { week: t, ...r } = e;
|
|
1832
|
-
return h.createElement("tr", { ...r });
|
|
1833
|
-
}
|
|
1834
|
-
function So(e) {
|
|
1835
|
-
return h.createElement("th", { ...e });
|
|
1836
|
-
}
|
|
1837
|
-
function No(e) {
|
|
1838
|
-
return h.createElement(
|
|
1839
|
-
"thead",
|
|
1840
|
-
{ "aria-hidden": !0 },
|
|
1841
|
-
h.createElement("tr", { ...e })
|
|
1842
|
-
);
|
|
1843
|
-
}
|
|
1844
|
-
function Co(e) {
|
|
1845
|
-
const { week: t, ...r } = e;
|
|
1846
|
-
return h.createElement("th", { ...r });
|
|
1847
|
-
}
|
|
1848
|
-
function xo(e) {
|
|
1849
|
-
return h.createElement("th", { ...e });
|
|
1850
|
-
}
|
|
1851
|
-
function Yo(e) {
|
|
1852
|
-
return h.createElement("tbody", { ...e });
|
|
1853
|
-
}
|
|
1854
|
-
function To(e) {
|
|
1855
|
-
const { components: t } = ke();
|
|
1856
|
-
return h.createElement(t.Dropdown, { ...e });
|
|
1857
|
-
}
|
|
1858
|
-
const Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: so, CaptionLabel: ao, Chevron: io, Day: co, DayButton: uo, Dropdown: lo, DropdownNav: fo, Footer: ho, Month: mo, MonthCaption: yo, MonthGrid: go, Months: bo, MonthsDropdown: wo, Nav: po, NextMonthButton: Mo, Option: ko, PreviousMonthButton: Do, Root: Oo, Select: vo, Week: Wo, WeekNumber: Co, WeekNumberHeader: xo, Weekday: So, Weekdays: No, Weeks: Yo, YearsDropdown: To }, Symbol.toStringTag, { value: "Module" }));
|
|
1859
|
-
function ne(e, t, r = !1, n = L) {
|
|
1860
|
-
let { from: o, to: i } = e;
|
|
1861
|
-
const { differenceInCalendarDays: a, isSameDay: s } = n;
|
|
1862
|
-
return o && i ? (a(i, o) < 0 && ([o, i] = [i, o]), a(t, o) >= (r ? 1 : 0) && a(i, t) >= (r ? 1 : 0)) : !r && i ? s(i, t) : !r && o ? s(o, t) : !1;
|
|
1863
|
-
}
|
|
1864
|
-
function Ze(e) {
|
|
1865
|
-
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1866
|
-
}
|
|
1867
|
-
function xe(e) {
|
|
1868
|
-
return !!(e && typeof e == "object" && "from" in e);
|
|
1869
|
-
}
|
|
1870
|
-
function Ke(e) {
|
|
1871
|
-
return !!(e && typeof e == "object" && "after" in e);
|
|
1872
|
-
}
|
|
1873
|
-
function Je(e) {
|
|
1874
|
-
return !!(e && typeof e == "object" && "before" in e);
|
|
1875
|
-
}
|
|
1876
|
-
function Bt(e) {
|
|
1877
|
-
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
1878
|
-
}
|
|
1879
|
-
function It(e, t) {
|
|
1880
|
-
return Array.isArray(e) && e.every(t.isDate);
|
|
1881
|
-
}
|
|
1882
|
-
function re(e, t, r = L) {
|
|
1883
|
-
const n = Array.isArray(t) ? t : [t], { isSameDay: o, differenceInCalendarDays: i, isAfter: a } = r;
|
|
1884
|
-
return n.some((s) => {
|
|
1885
|
-
if (typeof s == "boolean")
|
|
1886
|
-
return s;
|
|
1887
|
-
if (r.isDate(s))
|
|
1888
|
-
return o(e, s);
|
|
1889
|
-
if (It(s, r))
|
|
1890
|
-
return s.some((c) => o(e, c));
|
|
1891
|
-
if (xe(s))
|
|
1892
|
-
return ne(s, e, !1, r);
|
|
1893
|
-
if (Bt(s))
|
|
1894
|
-
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
|
|
1895
|
-
if (Ze(s)) {
|
|
1896
|
-
const c = i(s.before, e), u = i(s.after, e), f = c > 0, l = u < 0;
|
|
1897
|
-
return a(s.before, s.after) ? l && f : f || l;
|
|
1898
|
-
}
|
|
1899
|
-
return Ke(s) ? i(e, s.after) > 0 : Je(s) ? i(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
|
|
1900
|
-
});
|
|
1901
|
-
}
|
|
1902
|
-
function Eo(e, t, r, n, o) {
|
|
1903
|
-
const { disabled: i, hidden: a, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: f = o.today() } = t, { isSameDay: l, isSameMonth: d, startOfMonth: w, isBefore: O, endOfMonth: N, isAfter: k } = o, v = r && w(r), Y = n && N(n), p = {
|
|
1904
|
-
[_.focused]: [],
|
|
1905
|
-
[_.outside]: [],
|
|
1906
|
-
[_.disabled]: [],
|
|
1907
|
-
[_.hidden]: [],
|
|
1908
|
-
[_.today]: []
|
|
1909
|
-
}, D = {};
|
|
1910
|
-
for (const b of e) {
|
|
1911
|
-
const { date: m, displayMonth: W } = b, E = !!(W && !d(m, W)), I = !!(v && O(m, v)), F = !!(Y && k(m, Y)), Z = !!(i && re(m, i, o)), oe = !!(a && re(m, a, o)) || I || F || // Broadcast calendar will show outside days as default
|
|
1912
|
-
!u && !c && E || u && c === !1 && E, ee = l(m, f);
|
|
1913
|
-
E && p.outside.push(b), Z && p.disabled.push(b), oe && p.hidden.push(b), ee && p.today.push(b), s && Object.keys(s).forEach(($) => {
|
|
1914
|
-
const ce = s?.[$];
|
|
1915
|
-
ce && re(m, ce, o) && (D[$] ? D[$].push(b) : D[$] = [b]);
|
|
1916
|
-
});
|
|
1917
|
-
}
|
|
1918
|
-
return (b) => {
|
|
1919
|
-
const m = {
|
|
1920
|
-
[_.focused]: !1,
|
|
1921
|
-
[_.disabled]: !1,
|
|
1922
|
-
[_.hidden]: !1,
|
|
1923
|
-
[_.outside]: !1,
|
|
1924
|
-
[_.today]: !1
|
|
1925
|
-
}, W = {};
|
|
1926
|
-
for (const E in p) {
|
|
1927
|
-
const I = p[E];
|
|
1928
|
-
m[E] = I.some((F) => F === b);
|
|
1929
|
-
}
|
|
1930
|
-
for (const E in D)
|
|
1931
|
-
W[E] = D[E].some((I) => I === b);
|
|
1932
|
-
return {
|
|
1933
|
-
...m,
|
|
1934
|
-
// custom modifiers should override all the previous ones
|
|
1935
|
-
...W
|
|
1936
|
-
};
|
|
1937
|
-
};
|
|
1938
|
-
}
|
|
1939
|
-
function _o(e, t, r = {}) {
|
|
1940
|
-
return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [i]) => (r[i] ? o.push(r[i]) : t[_[i]] ? o.push(t[_[i]]) : t[U[i]] && o.push(t[U[i]]), o), [t[y.Day]]);
|
|
1941
|
-
}
|
|
1942
|
-
function Fo(e) {
|
|
1943
|
-
return {
|
|
1944
|
-
...Po,
|
|
1945
|
-
...e
|
|
1946
|
-
};
|
|
1947
|
-
}
|
|
1948
|
-
function Bo(e) {
|
|
1949
|
-
const t = {
|
|
1950
|
-
"data-mode": e.mode ?? void 0,
|
|
1951
|
-
"data-required": "required" in e ? e.required : void 0,
|
|
1952
|
-
"data-multiple-months": e.numberOfMonths && e.numberOfMonths > 1 || void 0,
|
|
1953
|
-
"data-week-numbers": e.showWeekNumber || void 0,
|
|
1954
|
-
"data-broadcast-calendar": e.broadcastCalendar || void 0,
|
|
1955
|
-
"data-nav-layout": e.navLayout || void 0
|
|
1956
|
-
};
|
|
1957
|
-
return Object.entries(e).forEach(([r, n]) => {
|
|
1958
|
-
r.startsWith("data-") && (t[r] = n);
|
|
1959
|
-
}), t;
|
|
1960
|
-
}
|
|
1961
|
-
function Io() {
|
|
1962
|
-
const e = {};
|
|
1963
|
-
for (const t in y)
|
|
1964
|
-
e[y[t]] = `rdp-${y[t]}`;
|
|
1965
|
-
for (const t in _)
|
|
1966
|
-
e[_[t]] = `rdp-${_[t]}`;
|
|
1967
|
-
for (const t in U)
|
|
1968
|
-
e[U[t]] = `rdp-${U[t]}`;
|
|
1969
|
-
for (const t in j)
|
|
1970
|
-
e[j[t]] = `rdp-${j[t]}`;
|
|
1971
|
-
return e;
|
|
1972
|
-
}
|
|
1973
|
-
function Ht(e, t, r) {
|
|
1974
|
-
return (r ?? new G(t)).formatMonthYear(e);
|
|
1975
|
-
}
|
|
1976
|
-
const Ho = Ht;
|
|
1977
|
-
function Ao(e, t, r) {
|
|
1978
|
-
return (r ?? new G(t)).format(e, "d");
|
|
1979
|
-
}
|
|
1980
|
-
function qo(e, t = L) {
|
|
1981
|
-
return t.format(e, "LLLL");
|
|
1982
|
-
}
|
|
1983
|
-
function jo(e, t, r) {
|
|
1984
|
-
return (r ?? new G(t)).format(e, "cccccc");
|
|
1985
|
-
}
|
|
1986
|
-
function Go(e, t = L) {
|
|
1987
|
-
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
1988
|
-
}
|
|
1989
|
-
function $o() {
|
|
1990
|
-
return "";
|
|
1991
|
-
}
|
|
1992
|
-
function At(e, t = L) {
|
|
1993
|
-
return t.format(e, "yyyy");
|
|
1994
|
-
}
|
|
1995
|
-
const Ro = At, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, formatCaption: Ht, formatDay: Ao, formatMonthCaption: Ho, formatMonthDropdown: qo, formatWeekNumber: Go, formatWeekNumberHeader: $o, formatWeekdayName: jo, formatYearCaption: Ro, formatYearDropdown: At }, Symbol.toStringTag, { value: "Module" }));
|
|
1996
|
-
function Qo(e) {
|
|
1997
|
-
return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
1998
|
-
...zo,
|
|
1999
|
-
...e
|
|
2000
|
-
};
|
|
2001
|
-
}
|
|
2002
|
-
function Le(e, t, r, n) {
|
|
2003
|
-
let o = (n ?? new G(r)).format(e, "PPPP");
|
|
2004
|
-
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
2005
|
-
}
|
|
2006
|
-
const Vo = Le;
|
|
2007
|
-
function et(e, t, r) {
|
|
2008
|
-
return (r ?? new G(t)).formatMonthYear(e);
|
|
2009
|
-
}
|
|
2010
|
-
const Xo = et;
|
|
2011
|
-
function qt(e, t, r, n) {
|
|
2012
|
-
let o = (n ?? new G(r)).format(e, "PPPP");
|
|
2013
|
-
return t?.today && (o = `Today, ${o}`), o;
|
|
2014
|
-
}
|
|
2015
|
-
function jt(e) {
|
|
2016
|
-
return "Choose the Month";
|
|
2017
|
-
}
|
|
2018
|
-
function Gt() {
|
|
2019
|
-
return "";
|
|
2020
|
-
}
|
|
2021
|
-
const Uo = "Go to the Next Month";
|
|
2022
|
-
function $t(e, t) {
|
|
2023
|
-
return Uo;
|
|
2024
|
-
}
|
|
2025
|
-
function Rt(e) {
|
|
2026
|
-
return "Go to the Previous Month";
|
|
2027
|
-
}
|
|
2028
|
-
function zt(e, t, r) {
|
|
2029
|
-
return (r ?? new G(t)).format(e, "cccc");
|
|
2030
|
-
}
|
|
2031
|
-
function Qt(e, t) {
|
|
2032
|
-
return `Week ${e}`;
|
|
2033
|
-
}
|
|
2034
|
-
function Vt(e) {
|
|
2035
|
-
return "Week Number";
|
|
2036
|
-
}
|
|
2037
|
-
function Xt(e) {
|
|
2038
|
-
return "Choose the Year";
|
|
2039
|
-
}
|
|
2040
|
-
const Zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Xo, labelDay: Vo, labelDayButton: Le, labelGrid: et, labelGridcell: qt, labelMonthDropdown: jt, labelNav: Gt, labelNext: $t, labelPrevious: Rt, labelWeekNumber: Qt, labelWeekNumberHeader: Vt, labelWeekday: zt, labelYearDropdown: Xt }, Symbol.toStringTag, { value: "Module" })), X = (e, t, r) => t || (r ? typeof r == "function" ? r : (...n) => r : e);
|
|
2041
|
-
function Ko(e, t) {
|
|
2042
|
-
const r = t.locale?.labels ?? {};
|
|
2043
|
-
return {
|
|
2044
|
-
...Zo,
|
|
2045
|
-
...e ?? {},
|
|
2046
|
-
labelDayButton: X(Le, e?.labelDayButton, r.labelDayButton),
|
|
2047
|
-
labelMonthDropdown: X(jt, e?.labelMonthDropdown, r.labelMonthDropdown),
|
|
2048
|
-
labelNext: X($t, e?.labelNext, r.labelNext),
|
|
2049
|
-
labelPrevious: X(Rt, e?.labelPrevious, r.labelPrevious),
|
|
2050
|
-
labelWeekNumber: X(Qt, e?.labelWeekNumber, r.labelWeekNumber),
|
|
2051
|
-
labelYearDropdown: X(Xt, e?.labelYearDropdown, r.labelYearDropdown),
|
|
2052
|
-
labelGrid: X(et, e?.labelGrid, r.labelGrid),
|
|
2053
|
-
labelGridcell: X(qt, e?.labelGridcell, r.labelGridcell),
|
|
2054
|
-
labelNav: X(Gt, e?.labelNav, r.labelNav),
|
|
2055
|
-
labelWeekNumberHeader: X(Vt, e?.labelWeekNumberHeader, r.labelWeekNumberHeader),
|
|
2056
|
-
labelWeekday: X(zt, e?.labelWeekday, r.labelWeekday)
|
|
2057
|
-
};
|
|
2058
|
-
}
|
|
2059
|
-
function Jo(e, t, r, n, o) {
|
|
2060
|
-
const { startOfMonth: i, startOfYear: a, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
|
|
2061
|
-
return c({
|
|
2062
|
-
start: a(e),
|
|
2063
|
-
end: s(e)
|
|
2064
|
-
}).map((d) => {
|
|
2065
|
-
const w = n.formatMonthDropdown(d, o), O = u(d), N = t && d < i(t) || r && d > i(r) || !1;
|
|
2066
|
-
return { value: O, label: w, disabled: N };
|
|
2067
|
-
});
|
|
2068
|
-
}
|
|
2069
|
-
function Lo(e, t = {}, r = {}) {
|
|
2070
|
-
let n = { ...t?.[y.Day] };
|
|
2071
|
-
return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
|
|
2072
|
-
n = {
|
|
2073
|
-
...n,
|
|
2074
|
-
...r?.[o]
|
|
2075
|
-
};
|
|
2076
|
-
}), n;
|
|
2077
|
-
}
|
|
2078
|
-
function es(e, t, r, n) {
|
|
2079
|
-
const o = n ?? e.today(), i = r ? e.startOfBroadcastWeek(o, e) : t ? e.startOfISOWeek(o) : e.startOfWeek(o), a = [];
|
|
2080
|
-
for (let s = 0; s < 7; s++) {
|
|
2081
|
-
const c = e.addDays(i, s);
|
|
2082
|
-
a.push(c);
|
|
2083
|
-
}
|
|
2084
|
-
return a;
|
|
2085
|
-
}
|
|
2086
|
-
function ts(e, t, r, n, o = !1) {
|
|
2087
|
-
if (!e || !t)
|
|
2088
|
-
return;
|
|
2089
|
-
const { startOfYear: i, endOfYear: a, eachYearOfInterval: s, getYear: c } = n, u = i(e), f = a(t), l = s({ start: u, end: f });
|
|
2090
|
-
return o && l.reverse(), l.map((d) => {
|
|
2091
|
-
const w = r.formatYearDropdown(d, n);
|
|
2092
|
-
return {
|
|
2093
|
-
value: c(d),
|
|
2094
|
-
label: w,
|
|
2095
|
-
disabled: !1
|
|
2096
|
-
};
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
function ns(e, t = {}) {
|
|
2100
|
-
const { weekStartsOn: r, locale: n } = t, o = r ?? n?.options?.weekStartsOn ?? 0, i = (s) => {
|
|
2101
|
-
const c = typeof s == "number" || typeof s == "string" ? new Date(s) : s;
|
|
2102
|
-
return new H(c.getFullYear(), c.getMonth(), c.getDate(), 12, 0, 0, e);
|
|
2103
|
-
}, a = (s) => {
|
|
2104
|
-
const c = i(s);
|
|
2105
|
-
return new Date(c.getFullYear(), c.getMonth(), c.getDate(), 0, 0, 0, 0);
|
|
2106
|
-
};
|
|
2107
|
-
return {
|
|
2108
|
-
today: () => i(H.tz(e)),
|
|
2109
|
-
newDate: (s, c, u) => new H(s, c, u, 12, 0, 0, e),
|
|
2110
|
-
startOfDay: (s) => i(s),
|
|
2111
|
-
startOfWeek: (s, c) => {
|
|
2112
|
-
const u = i(s), f = c?.weekStartsOn ?? o, l = (u.getDay() - f + 7) % 7;
|
|
2113
|
-
return u.setDate(u.getDate() - l), u;
|
|
2114
|
-
},
|
|
2115
|
-
startOfISOWeek: (s) => {
|
|
2116
|
-
const c = i(s), u = (c.getDay() - 1 + 7) % 7;
|
|
2117
|
-
return c.setDate(c.getDate() - u), c;
|
|
2118
|
-
},
|
|
2119
|
-
startOfMonth: (s) => {
|
|
2120
|
-
const c = i(s);
|
|
2121
|
-
return c.setDate(1), c;
|
|
2122
|
-
},
|
|
2123
|
-
startOfYear: (s) => {
|
|
2124
|
-
const c = i(s);
|
|
2125
|
-
return c.setMonth(0, 1), c;
|
|
2126
|
-
},
|
|
2127
|
-
endOfWeek: (s, c) => {
|
|
2128
|
-
const u = i(s), d = (((c?.weekStartsOn ?? o) + 6) % 7 - u.getDay() + 7) % 7;
|
|
2129
|
-
return u.setDate(u.getDate() + d), u;
|
|
2130
|
-
},
|
|
2131
|
-
endOfISOWeek: (s) => {
|
|
2132
|
-
const c = i(s), u = (7 - c.getDay()) % 7;
|
|
2133
|
-
return c.setDate(c.getDate() + u), c;
|
|
2134
|
-
},
|
|
2135
|
-
endOfMonth: (s) => {
|
|
2136
|
-
const c = i(s);
|
|
2137
|
-
return c.setMonth(c.getMonth() + 1, 0), c;
|
|
2138
|
-
},
|
|
2139
|
-
endOfYear: (s) => {
|
|
2140
|
-
const c = i(s);
|
|
2141
|
-
return c.setMonth(11, 31), c;
|
|
2142
|
-
},
|
|
2143
|
-
eachMonthOfInterval: (s) => {
|
|
2144
|
-
const c = i(s.start), u = i(s.end), f = [], l = new H(c.getFullYear(), c.getMonth(), 1, 12, 0, 0, e), d = u.getFullYear() * 12 + u.getMonth();
|
|
2145
|
-
for (; l.getFullYear() * 12 + l.getMonth() <= d; )
|
|
2146
|
-
f.push(new H(l, e)), l.setMonth(l.getMonth() + 1, 1);
|
|
2147
|
-
return f;
|
|
2148
|
-
},
|
|
2149
|
-
// Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
|
|
2150
|
-
// mutate the same TZDate, and return it.
|
|
2151
|
-
addDays: (s, c) => {
|
|
2152
|
-
const u = i(s);
|
|
2153
|
-
return u.setDate(u.getDate() + c), u;
|
|
2154
|
-
},
|
|
2155
|
-
addWeeks: (s, c) => {
|
|
2156
|
-
const u = i(s);
|
|
2157
|
-
return u.setDate(u.getDate() + c * 7), u;
|
|
2158
|
-
},
|
|
2159
|
-
addMonths: (s, c) => {
|
|
2160
|
-
const u = i(s);
|
|
2161
|
-
return u.setMonth(u.getMonth() + c), u;
|
|
2162
|
-
},
|
|
2163
|
-
addYears: (s, c) => {
|
|
2164
|
-
const u = i(s);
|
|
2165
|
-
return u.setFullYear(u.getFullYear() + c), u;
|
|
2166
|
-
},
|
|
2167
|
-
eachYearOfInterval: (s) => {
|
|
2168
|
-
const c = i(s.start), u = i(s.end), f = [], l = new H(c.getFullYear(), 0, 1, 12, 0, 0, e);
|
|
2169
|
-
for (; l.getFullYear() <= u.getFullYear(); )
|
|
2170
|
-
f.push(new H(l, e)), l.setFullYear(l.getFullYear() + 1, 0, 1);
|
|
2171
|
-
return f;
|
|
2172
|
-
},
|
|
2173
|
-
getWeek: (s, c) => {
|
|
2174
|
-
const u = a(s);
|
|
2175
|
-
return Ue(u, {
|
|
2176
|
-
weekStartsOn: c?.weekStartsOn ?? o,
|
|
2177
|
-
firstWeekContainsDate: c?.firstWeekContainsDate ?? n?.options?.firstWeekContainsDate ?? 1
|
|
2178
|
-
});
|
|
2179
|
-
},
|
|
2180
|
-
getISOWeek: (s) => {
|
|
2181
|
-
const c = a(s);
|
|
2182
|
-
return Xe(c);
|
|
2183
|
-
},
|
|
2184
|
-
differenceInCalendarDays: (s, c) => {
|
|
2185
|
-
const u = a(s), f = a(c);
|
|
2186
|
-
return Ve(u, f);
|
|
2187
|
-
},
|
|
2188
|
-
differenceInCalendarMonths: (s, c) => {
|
|
2189
|
-
const u = a(s), f = a(c);
|
|
2190
|
-
return St(u, f);
|
|
2191
|
-
}
|
|
2192
|
-
};
|
|
2193
|
-
}
|
|
2194
|
-
const De = (e) => e instanceof HTMLElement ? e : null, Ge = (e) => [
|
|
2195
|
-
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
2196
|
-
], rs = (e) => De(e.querySelector("[data-animated-month]")), $e = (e) => De(e.querySelector("[data-animated-caption]")), Re = (e) => De(e.querySelector("[data-animated-weeks]")), os = (e) => De(e.querySelector("[data-animated-nav]")), ss = (e) => De(e.querySelector("[data-animated-weekdays]"));
|
|
2197
|
-
function as(e, t, { classNames: r, months: n, focused: o, dateLib: i }) {
|
|
2198
|
-
const a = Se(null), s = Se(n), c = Se(!1);
|
|
2199
|
-
Sn(() => {
|
|
2200
|
-
const u = s.current;
|
|
2201
|
-
if (s.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
|
|
2202
|
-
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2203
|
-
n.length === 0 || u.length === 0 || n.length !== u.length)
|
|
2204
|
-
return;
|
|
2205
|
-
const f = i.isSameMonth(n[0].date, u[0].date), l = i.isAfter(n[0].date, u[0].date), d = l ? r[j.caption_after_enter] : r[j.caption_before_enter], w = l ? r[j.weeks_after_enter] : r[j.weeks_before_enter], O = a.current, N = e.current.cloneNode(!0);
|
|
2206
|
-
if (N instanceof HTMLElement ? (Ge(N).forEach((p) => {
|
|
2207
|
-
if (!(p instanceof HTMLElement))
|
|
2208
|
-
return;
|
|
2209
|
-
const D = rs(p);
|
|
2210
|
-
D && p.contains(D) && p.removeChild(D);
|
|
2211
|
-
const b = $e(p);
|
|
2212
|
-
b && b.classList.remove(d);
|
|
2213
|
-
const m = Re(p);
|
|
2214
|
-
m && m.classList.remove(w);
|
|
2215
|
-
}), a.current = N) : a.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2216
|
-
o)
|
|
2217
|
-
return;
|
|
2218
|
-
const k = O instanceof HTMLElement ? Ge(O) : [], v = Ge(e.current);
|
|
2219
|
-
if (v?.every((Y) => Y instanceof HTMLElement) && k && k.every((Y) => Y instanceof HTMLElement)) {
|
|
2220
|
-
c.current = !0, e.current.style.isolation = "isolate";
|
|
2221
|
-
const Y = os(e.current);
|
|
2222
|
-
Y && (Y.style.zIndex = "1"), v.forEach((p, D) => {
|
|
2223
|
-
const b = k[D];
|
|
2224
|
-
if (!b)
|
|
2225
|
-
return;
|
|
2226
|
-
p.style.position = "relative", p.style.overflow = "hidden";
|
|
2227
|
-
const m = $e(p);
|
|
2228
|
-
m && m.classList.add(d);
|
|
2229
|
-
const W = Re(p);
|
|
2230
|
-
W && W.classList.add(w);
|
|
2231
|
-
const E = () => {
|
|
2232
|
-
c.current = !1, e.current && (e.current.style.isolation = ""), Y && (Y.style.zIndex = ""), m && m.classList.remove(d), W && W.classList.remove(w), p.style.position = "", p.style.overflow = "", p.contains(b) && p.removeChild(b);
|
|
2233
|
-
};
|
|
2234
|
-
b.style.pointerEvents = "none", b.style.position = "absolute", b.style.overflow = "hidden", b.setAttribute("aria-hidden", "true");
|
|
2235
|
-
const I = ss(b);
|
|
2236
|
-
I && (I.style.opacity = "0");
|
|
2237
|
-
const F = $e(b);
|
|
2238
|
-
F && (F.classList.add(l ? r[j.caption_before_exit] : r[j.caption_after_exit]), F.addEventListener("animationend", E));
|
|
2239
|
-
const Z = Re(b);
|
|
2240
|
-
Z && Z.classList.add(l ? r[j.weeks_before_exit] : r[j.weeks_after_exit]), p.insertBefore(b, p.firstChild);
|
|
2241
|
-
});
|
|
2242
|
-
}
|
|
2243
|
-
});
|
|
2244
|
-
}
|
|
2245
|
-
function is(e, t, r, n) {
|
|
2246
|
-
const o = e[0], i = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: c } = r ?? {}, { addDays: u, differenceInCalendarDays: f, differenceInCalendarMonths: l, endOfBroadcastWeek: d, endOfISOWeek: w, endOfMonth: O, endOfWeek: N, isAfter: k, startOfBroadcastWeek: v, startOfISOWeek: Y, startOfWeek: p } = n, D = c ? v(o, n) : a ? Y(o) : p(o), b = c ? d(i) : a ? w(O(i)) : N(O(i)), m = t && (c ? d(t) : a ? w(t) : N(t)), W = m && k(b, m) ? m : b, E = f(W, D), I = l(i, o) + 1, F = [];
|
|
2247
|
-
for (let ee = 0; ee <= E; ee++) {
|
|
2248
|
-
const $ = u(D, ee);
|
|
2249
|
-
F.push($);
|
|
2250
|
-
}
|
|
2251
|
-
const oe = (c ? 35 : 42) * I;
|
|
2252
|
-
if (s && F.length < oe) {
|
|
2253
|
-
const ee = oe - F.length;
|
|
2254
|
-
for (let $ = 0; $ < ee; $++) {
|
|
2255
|
-
const ce = u(F[F.length - 1], 1);
|
|
2256
|
-
F.push(ce);
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
return F;
|
|
2260
|
-
}
|
|
2261
|
-
function cs(e) {
|
|
2262
|
-
const t = [];
|
|
2263
|
-
return e.reduce((r, n) => {
|
|
2264
|
-
const o = n.weeks.reduce((i, a) => i.concat(a.days.slice()), t.slice());
|
|
2265
|
-
return r.concat(o.slice());
|
|
2266
|
-
}, t.slice());
|
|
2267
|
-
}
|
|
2268
|
-
function us(e, t, r, n) {
|
|
2269
|
-
const { numberOfMonths: o = 1 } = r, i = [];
|
|
2270
|
-
for (let a = 0; a < o; a++) {
|
|
2271
|
-
const s = n.addMonths(e, a);
|
|
2272
|
-
if (t && s > t)
|
|
2273
|
-
break;
|
|
2274
|
-
i.push(s);
|
|
2275
|
-
}
|
|
2276
|
-
return i;
|
|
2277
|
-
}
|
|
2278
|
-
function gt(e, t, r, n) {
|
|
2279
|
-
const { month: o, defaultMonth: i, today: a = n.today(), numberOfMonths: s = 1 } = e;
|
|
2280
|
-
let c = o || i || a;
|
|
2281
|
-
const { differenceInCalendarMonths: u, addMonths: f, startOfMonth: l } = n;
|
|
2282
|
-
if (r && u(r, c) < s - 1) {
|
|
2283
|
-
const d = -1 * (s - 1);
|
|
2284
|
-
c = f(r, d);
|
|
2285
|
-
}
|
|
2286
|
-
return t && u(c, t) < 0 && (c = t), l(c);
|
|
2287
|
-
}
|
|
2288
|
-
function ls(e, t, r, n) {
|
|
2289
|
-
const { addDays: o, endOfBroadcastWeek: i, endOfISOWeek: a, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: f, startOfBroadcastWeek: l, startOfISOWeek: d, startOfWeek: w } = n, O = e.reduce((N, k) => {
|
|
2290
|
-
const v = r.broadcastCalendar ? l(k, n) : r.ISOWeek ? d(k) : w(k), Y = r.broadcastCalendar ? i(k) : r.ISOWeek ? a(s(k)) : c(s(k)), p = t.filter((W) => W >= v && W <= Y), D = r.broadcastCalendar ? 35 : 42;
|
|
2291
|
-
if (r.fixedWeeks && p.length < D) {
|
|
2292
|
-
const W = t.filter((E) => {
|
|
2293
|
-
const I = D - p.length;
|
|
2294
|
-
return E > Y && E <= o(Y, I);
|
|
2295
|
-
});
|
|
2296
|
-
p.push(...W);
|
|
2297
|
-
}
|
|
2298
|
-
const b = p.reduce((W, E) => {
|
|
2299
|
-
const I = r.ISOWeek ? u(E) : f(E), F = W.find((oe) => oe.weekNumber === I), Z = new _t(E, k, n);
|
|
2300
|
-
return F ? F.days.push(Z) : W.push(new oo(I, [Z])), W;
|
|
2301
|
-
}, []), m = new ro(k, b);
|
|
2302
|
-
return N.push(m), N;
|
|
2303
|
-
}, []);
|
|
2304
|
-
return r.reverseMonths ? O.reverse() : O;
|
|
2305
|
-
}
|
|
2306
|
-
function fs(e, t) {
|
|
2307
|
-
let { startMonth: r, endMonth: n } = e;
|
|
2308
|
-
const { startOfYear: o, startOfDay: i, startOfMonth: a, endOfMonth: s, addYears: c, endOfYear: u, newDate: f, today: l } = t, { fromYear: d, toYear: w, fromMonth: O, toMonth: N } = e;
|
|
2309
|
-
!r && O && (r = O), !r && d && (r = t.newDate(d, 0, 1)), !n && N && (n = N), !n && w && (n = f(w, 11, 31));
|
|
2310
|
-
const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2311
|
-
return r ? r = a(r) : d ? r = f(d, 0, 1) : !r && k && (r = o(c(e.today ?? l(), -100))), n ? n = s(n) : w ? n = f(w, 11, 31) : !n && k && (n = u(e.today ?? l())), [
|
|
2312
|
-
r && i(r),
|
|
2313
|
-
n && i(n)
|
|
2314
|
-
];
|
|
2315
|
-
}
|
|
2316
|
-
function ds(e, t, r, n) {
|
|
2317
|
-
if (r.disableNavigation)
|
|
2318
|
-
return;
|
|
2319
|
-
const { pagedNavigation: o, numberOfMonths: i = 1 } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i : 1, f = a(e);
|
|
2320
|
-
if (!t)
|
|
2321
|
-
return s(f, u);
|
|
2322
|
-
if (!(c(t, e) < i))
|
|
2323
|
-
return s(f, u);
|
|
2324
|
-
}
|
|
2325
|
-
function hs(e, t, r, n) {
|
|
2326
|
-
if (r.disableNavigation)
|
|
2327
|
-
return;
|
|
2328
|
-
const { pagedNavigation: o, numberOfMonths: i } = r, { startOfMonth: a, addMonths: s, differenceInCalendarMonths: c } = n, u = o ? i ?? 1 : 1, f = a(e);
|
|
2329
|
-
if (!t)
|
|
2330
|
-
return s(f, -u);
|
|
2331
|
-
if (!(c(f, t) <= 0))
|
|
2332
|
-
return s(f, -u);
|
|
2333
|
-
}
|
|
2334
|
-
function ms(e) {
|
|
2335
|
-
const t = [];
|
|
2336
|
-
return e.reduce((r, n) => r.concat(n.weeks.slice()), t.slice());
|
|
2337
|
-
}
|
|
2338
|
-
function Ye(e, t) {
|
|
2339
|
-
const [r, n] = Ce(e);
|
|
2340
|
-
return [t === void 0 ? r : t, n];
|
|
2341
|
-
}
|
|
2342
|
-
function ys(e, t) {
|
|
2343
|
-
const [r, n] = fs(e, t), { startOfMonth: o, endOfMonth: i } = t, a = gt(e, r, n, t), [s, c] = Ye(
|
|
2344
|
-
a,
|
|
2345
|
-
// initialMonth is always computed from props.month if provided
|
|
2346
|
-
e.month ? a : void 0
|
|
2347
|
-
);
|
|
2348
|
-
Nn(() => {
|
|
2349
|
-
const D = gt(e, r, n, t);
|
|
2350
|
-
c(D);
|
|
2351
|
-
}, [e.timeZone]);
|
|
2352
|
-
const { months: u, weeks: f, days: l, previousMonth: d, nextMonth: w } = Ne(() => {
|
|
2353
|
-
const D = us(s, n, { numberOfMonths: e.numberOfMonths }, t), b = is(D, e.endMonth ? i(e.endMonth) : void 0, {
|
|
2354
|
-
ISOWeek: e.ISOWeek,
|
|
2355
|
-
fixedWeeks: e.fixedWeeks,
|
|
2356
|
-
broadcastCalendar: e.broadcastCalendar
|
|
2357
|
-
}, t), m = ls(D, b, {
|
|
2358
|
-
broadcastCalendar: e.broadcastCalendar,
|
|
2359
|
-
fixedWeeks: e.fixedWeeks,
|
|
2360
|
-
ISOWeek: e.ISOWeek,
|
|
2361
|
-
reverseMonths: e.reverseMonths
|
|
2362
|
-
}, t), W = ms(m), E = cs(m), I = hs(s, r, e, t), F = ds(s, n, e, t);
|
|
2363
|
-
return {
|
|
2364
|
-
months: m,
|
|
2365
|
-
weeks: W,
|
|
2366
|
-
days: E,
|
|
2367
|
-
previousMonth: I,
|
|
2368
|
-
nextMonth: F
|
|
2369
|
-
};
|
|
2370
|
-
}, [
|
|
2371
|
-
t,
|
|
2372
|
-
s.getTime(),
|
|
2373
|
-
n?.getTime(),
|
|
2374
|
-
r?.getTime(),
|
|
2375
|
-
e.disableNavigation,
|
|
2376
|
-
e.broadcastCalendar,
|
|
2377
|
-
e.endMonth?.getTime(),
|
|
2378
|
-
e.fixedWeeks,
|
|
2379
|
-
e.ISOWeek,
|
|
2380
|
-
e.numberOfMonths,
|
|
2381
|
-
e.pagedNavigation,
|
|
2382
|
-
e.reverseMonths
|
|
2383
|
-
]), { disableNavigation: O, onMonthChange: N } = e, k = (D) => f.some((b) => b.days.some((m) => m.isEqualTo(D))), v = (D) => {
|
|
2384
|
-
if (O)
|
|
2385
|
-
return;
|
|
2386
|
-
let b = o(D);
|
|
2387
|
-
r && b < o(r) && (b = o(r)), n && b > o(n) && (b = o(n)), c(b), N?.(b);
|
|
2388
|
-
};
|
|
2389
|
-
return {
|
|
2390
|
-
months: u,
|
|
2391
|
-
weeks: f,
|
|
2392
|
-
days: l,
|
|
2393
|
-
navStart: r,
|
|
2394
|
-
navEnd: n,
|
|
2395
|
-
previousMonth: d,
|
|
2396
|
-
nextMonth: w,
|
|
2397
|
-
goToMonth: v,
|
|
2398
|
-
goToDay: (D) => {
|
|
2399
|
-
k(D) || v(D.date);
|
|
2400
|
-
}
|
|
2401
|
-
};
|
|
2402
|
-
}
|
|
2403
|
-
var K;
|
|
2404
|
-
(function(e) {
|
|
2405
|
-
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
2406
|
-
})(K || (K = {}));
|
|
2407
|
-
function bt(e) {
|
|
2408
|
-
return !e[_.disabled] && !e[_.hidden] && !e[_.outside];
|
|
2409
|
-
}
|
|
2410
|
-
function gs(e, t, r, n) {
|
|
2411
|
-
let o, i = -1;
|
|
2412
|
-
for (const a of e) {
|
|
2413
|
-
const s = t(a);
|
|
2414
|
-
bt(s) && (s[_.focused] && i < K.FocusedModifier ? (o = a, i = K.FocusedModifier) : n?.isEqualTo(a) && i < K.LastFocused ? (o = a, i = K.LastFocused) : r(a.date) && i < K.Selected ? (o = a, i = K.Selected) : s[_.today] && i < K.Today && (o = a, i = K.Today));
|
|
2415
|
-
}
|
|
2416
|
-
return o || (o = e.find((a) => bt(t(a)))), o;
|
|
2417
|
-
}
|
|
2418
|
-
function bs(e, t, r, n, o, i, a) {
|
|
2419
|
-
const { ISOWeek: s, broadcastCalendar: c } = i, { addDays: u, addMonths: f, addWeeks: l, addYears: d, endOfBroadcastWeek: w, endOfISOWeek: O, endOfWeek: N, max: k, min: v, startOfBroadcastWeek: Y, startOfISOWeek: p, startOfWeek: D } = a;
|
|
2420
|
-
let m = {
|
|
2421
|
-
day: u,
|
|
2422
|
-
week: l,
|
|
2423
|
-
month: f,
|
|
2424
|
-
year: d,
|
|
2425
|
-
startOfWeek: (W) => c ? Y(W, a) : s ? p(W) : D(W),
|
|
2426
|
-
endOfWeek: (W) => c ? w(W) : s ? O(W) : N(W)
|
|
2427
|
-
}[e](r, t === "after" ? 1 : -1);
|
|
2428
|
-
return t === "before" && n ? m = k([n, m]) : t === "after" && o && (m = v([o, m])), m;
|
|
2429
|
-
}
|
|
2430
|
-
function Ut(e, t, r, n, o, i, a, s = 0) {
|
|
2431
|
-
if (s > 365)
|
|
2432
|
-
return;
|
|
2433
|
-
const c = bs(e, t, r.date, n, o, i, a), u = !!(i.disabled && re(c, i.disabled, a)), f = !!(i.hidden && re(c, i.hidden, a)), l = c, d = new _t(c, l, a);
|
|
2434
|
-
return !u && !f ? d : Ut(e, t, d, n, o, i, a, s + 1);
|
|
2435
|
-
}
|
|
2436
|
-
function ws(e, t, r, n, o) {
|
|
2437
|
-
const { autoFocus: i } = e, [a, s] = Ce(), c = gs(t.days, r, n || (() => !1), a), [u, f] = Ce(i ? c : void 0);
|
|
2438
|
-
return {
|
|
2439
|
-
isFocusTarget: (N) => !!c?.isEqualTo(N),
|
|
2440
|
-
setFocused: f,
|
|
2441
|
-
focused: u,
|
|
2442
|
-
blur: () => {
|
|
2443
|
-
s(u), f(void 0);
|
|
2444
|
-
},
|
|
2445
|
-
moveFocus: (N, k) => {
|
|
2446
|
-
if (!u)
|
|
2447
|
-
return;
|
|
2448
|
-
const v = Ut(N, k, u, t.navStart, t.navEnd, e, o);
|
|
2449
|
-
v && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(v)) || (t.goToDay(v), f(v)));
|
|
2450
|
-
}
|
|
2451
|
-
};
|
|
2452
|
-
}
|
|
2453
|
-
function ps(e, t) {
|
|
2454
|
-
const { selected: r, required: n, onSelect: o } = e, [i, a] = Ye(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t, u = (w) => s?.some((O) => c(O, w)) ?? !1, { min: f, max: l } = e;
|
|
2455
|
-
return {
|
|
2456
|
-
selected: s,
|
|
2457
|
-
select: (w, O, N) => {
|
|
2458
|
-
let k = [...s ?? []];
|
|
2459
|
-
if (u(w)) {
|
|
2460
|
-
if (s?.length === f || n && s?.length === 1)
|
|
2461
|
-
return;
|
|
2462
|
-
k = s?.filter((v) => !c(v, w));
|
|
2463
|
-
} else
|
|
2464
|
-
s?.length === l ? k = [w] : k = [...k, w];
|
|
2465
|
-
return o || a(k), o?.(k, w, O, N), k;
|
|
2466
|
-
},
|
|
2467
|
-
isSelected: u
|
|
2468
|
-
};
|
|
2469
|
-
}
|
|
2470
|
-
function Ms(e, t, r = 0, n = 0, o = !1, i = L) {
|
|
2471
|
-
const { from: a, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: f } = i;
|
|
2472
|
-
let l;
|
|
2473
|
-
if (!a && !s)
|
|
2474
|
-
l = { from: e, to: r > 0 ? void 0 : e };
|
|
2475
|
-
else if (a && !s)
|
|
2476
|
-
c(a, e) ? r === 0 ? l = { from: a, to: e } : o ? l = { from: a, to: void 0 } : l = void 0 : f(e, a) ? l = { from: e, to: a } : l = { from: a, to: e };
|
|
2477
|
-
else if (a && s)
|
|
2478
|
-
if (c(a, e) && c(s, e))
|
|
2479
|
-
o ? l = { from: a, to: s } : l = void 0;
|
|
2480
|
-
else if (c(a, e))
|
|
2481
|
-
l = { from: a, to: r > 0 ? void 0 : e };
|
|
2482
|
-
else if (c(s, e))
|
|
2483
|
-
l = { from: e, to: r > 0 ? void 0 : e };
|
|
2484
|
-
else if (f(e, a))
|
|
2485
|
-
l = { from: e, to: s };
|
|
2486
|
-
else if (u(e, a))
|
|
2487
|
-
l = { from: a, to: e };
|
|
2488
|
-
else if (u(e, s))
|
|
2489
|
-
l = { from: a, to: e };
|
|
2490
|
-
else
|
|
2491
|
-
throw new Error("Invalid range");
|
|
2492
|
-
if (l?.from && l?.to) {
|
|
2493
|
-
const d = i.differenceInCalendarDays(l.to, l.from);
|
|
2494
|
-
n > 0 && d > n ? l = { from: e, to: void 0 } : r > 1 && d < r && (l = { from: e, to: void 0 });
|
|
2495
|
-
}
|
|
2496
|
-
return l;
|
|
2497
|
-
}
|
|
2498
|
-
function ks(e, t, r = L) {
|
|
2499
|
-
const n = Array.isArray(t) ? t : [t];
|
|
2500
|
-
let o = e.from;
|
|
2501
|
-
const i = r.differenceInCalendarDays(e.to, e.from), a = Math.min(i, 6);
|
|
2502
|
-
for (let s = 0; s <= a; s++) {
|
|
2503
|
-
if (n.includes(o.getDay()))
|
|
2504
|
-
return !0;
|
|
2505
|
-
o = r.addDays(o, 1);
|
|
2506
|
-
}
|
|
2507
|
-
return !1;
|
|
2508
|
-
}
|
|
2509
|
-
function wt(e, t, r = L) {
|
|
2510
|
-
return ne(e, t.from, !1, r) || ne(e, t.to, !1, r) || ne(t, e.from, !1, r) || ne(t, e.to, !1, r);
|
|
2511
|
-
}
|
|
2512
|
-
function Ds(e, t, r = L) {
|
|
2513
|
-
const n = Array.isArray(t) ? t : [t];
|
|
2514
|
-
if (n.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : r.isDate(s) ? ne(e, s, !1, r) : It(s, r) ? s.some((c) => ne(e, c, !1, r)) : xe(s) ? s.from && s.to ? wt(e, { from: s.from, to: s.to }, r) : !1 : Bt(s) ? ks(e, s.dayOfWeek, r) : Ze(s) ? r.isAfter(s.before, s.after) ? wt(e, {
|
|
2515
|
-
from: r.addDays(s.after, 1),
|
|
2516
|
-
to: r.addDays(s.before, -1)
|
|
2517
|
-
}, r) : re(e.from, s, r) || re(e.to, s, r) : Ke(s) || Je(s) ? re(e.from, s, r) || re(e.to, s, r) : !1))
|
|
2518
|
-
return !0;
|
|
2519
|
-
const a = n.filter((s) => typeof s == "function");
|
|
2520
|
-
if (a.length) {
|
|
2521
|
-
let s = e.from;
|
|
2522
|
-
const c = r.differenceInCalendarDays(e.to, e.from);
|
|
2523
|
-
for (let u = 0; u <= c; u++) {
|
|
2524
|
-
if (a.some((f) => f(s)))
|
|
2525
|
-
return !0;
|
|
2526
|
-
s = r.addDays(s, 1);
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
return !1;
|
|
2530
|
-
}
|
|
2531
|
-
function Os(e, t) {
|
|
2532
|
-
const { disabled: r, excludeDisabled: n, selected: o, required: i, onSelect: a } = e, [s, c] = Ye(o, a ? o : void 0), u = a ? o : s;
|
|
2533
|
-
return {
|
|
2534
|
-
selected: u,
|
|
2535
|
-
select: (d, w, O) => {
|
|
2536
|
-
const { min: N, max: k } = e, v = d ? Ms(d, u, N, k, i, t) : void 0;
|
|
2537
|
-
return n && r && v?.from && v.to && Ds({ from: v.from, to: v.to }, r, t) && (v.from = d, v.to = void 0), a || c(v), a?.(v, d, w, O), v;
|
|
2538
|
-
},
|
|
2539
|
-
isSelected: (d) => u && ne(u, d, !1, t)
|
|
2540
|
-
};
|
|
2541
|
-
}
|
|
2542
|
-
function vs(e, t) {
|
|
2543
|
-
const { selected: r, required: n, onSelect: o } = e, [i, a] = Ye(r, o ? r : void 0), s = o ? r : i, { isSameDay: c } = t;
|
|
2544
|
-
return {
|
|
2545
|
-
selected: s,
|
|
2546
|
-
select: (l, d, w) => {
|
|
2547
|
-
let O = l;
|
|
2548
|
-
return !n && s && s && c(l, s) && (O = void 0), o || a(O), o?.(O, l, d, w), O;
|
|
2549
|
-
},
|
|
2550
|
-
isSelected: (l) => s ? c(s, l) : !1
|
|
2551
|
-
};
|
|
2552
|
-
}
|
|
2553
|
-
function Ws(e, t) {
|
|
2554
|
-
const r = vs(e, t), n = ps(e, t), o = Os(e, t);
|
|
2555
|
-
switch (e.mode) {
|
|
2556
|
-
case "single":
|
|
2557
|
-
return r;
|
|
2558
|
-
case "multiple":
|
|
2559
|
-
return n;
|
|
2560
|
-
case "range":
|
|
2561
|
-
return o;
|
|
2562
|
-
default:
|
|
2563
|
-
return;
|
|
2564
|
-
}
|
|
2565
|
-
}
|
|
2566
|
-
function R(e, t) {
|
|
2567
|
-
return e instanceof H && e.timeZone === t ? e : new H(e, t);
|
|
2568
|
-
}
|
|
2569
|
-
function le(e, t, r) {
|
|
2570
|
-
return R(e, t);
|
|
2571
|
-
}
|
|
2572
|
-
function pt(e, t, r) {
|
|
2573
|
-
return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? le(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? le(n, t) : n) : xe(e) ? {
|
|
2574
|
-
...e,
|
|
2575
|
-
from: e.from ? R(e.from, t) : e.from,
|
|
2576
|
-
to: e.to ? R(e.to, t) : e.to
|
|
2577
|
-
} : Ze(e) ? {
|
|
2578
|
-
before: le(e.before, t),
|
|
2579
|
-
after: le(e.after, t)
|
|
2580
|
-
} : Ke(e) ? {
|
|
2581
|
-
after: le(e.after, t)
|
|
2582
|
-
} : Je(e) ? {
|
|
2583
|
-
before: le(e.before, t)
|
|
2584
|
-
} : e;
|
|
2585
|
-
}
|
|
2586
|
-
function ze(e, t, r) {
|
|
2587
|
-
return e && (Array.isArray(e) ? e.map((n) => pt(n, t)) : pt(e, t));
|
|
2588
|
-
}
|
|
2589
|
-
function Ss(e) {
|
|
2590
|
-
let t = e;
|
|
2591
|
-
const r = t.timeZone;
|
|
2592
|
-
if (r && (t = {
|
|
2593
|
-
...e,
|
|
2594
|
-
timeZone: r
|
|
2595
|
-
}, t.today && (t.today = R(t.today, r)), t.month && (t.month = R(t.month, r)), t.defaultMonth && (t.defaultMonth = R(t.defaultMonth, r)), t.startMonth && (t.startMonth = R(t.startMonth, r)), t.endMonth && (t.endMonth = R(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = R(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((M) => R(M, r)) : t.mode === "range" && t.selected && (t.selected = {
|
|
2596
|
-
from: t.selected.from ? R(t.selected.from, r) : t.selected.from,
|
|
2597
|
-
to: t.selected.to ? R(t.selected.to, r) : t.selected.to
|
|
2598
|
-
}), t.disabled !== void 0 && (t.disabled = ze(t.disabled, r)), t.hidden !== void 0 && (t.hidden = ze(t.hidden, r)), t.modifiers)) {
|
|
2599
|
-
const M = {};
|
|
2600
|
-
Object.keys(t.modifiers).forEach((x) => {
|
|
2601
|
-
M[x] = ze(t.modifiers?.[x], r);
|
|
2602
|
-
}), t.modifiers = M;
|
|
2603
|
-
}
|
|
2604
|
-
const { components: n, formatters: o, labels: i, dateLib: a, locale: s, classNames: c } = Ne(() => {
|
|
2605
|
-
const M = { ...Et, ...t.locale }, x = t.broadcastCalendar ? 1 : t.weekStartsOn, g = t.noonSafe && t.timeZone ? ns(t.timeZone, {
|
|
2606
|
-
weekStartsOn: x,
|
|
2607
|
-
locale: M
|
|
2608
|
-
}) : void 0, C = t.dateLib && g ? { ...g, ...t.dateLib } : t.dateLib ?? g, A = new G({
|
|
2609
|
-
locale: M,
|
|
2610
|
-
weekStartsOn: x,
|
|
2611
|
-
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
2612
|
-
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
2613
|
-
useAdditionalDayOfYearTokens: t.useAdditionalDayOfYearTokens,
|
|
2614
|
-
timeZone: t.timeZone,
|
|
2615
|
-
numerals: t.numerals
|
|
2616
|
-
}, C);
|
|
2617
|
-
return {
|
|
2618
|
-
dateLib: A,
|
|
2619
|
-
components: Fo(t.components),
|
|
2620
|
-
formatters: Qo(t.formatters),
|
|
2621
|
-
labels: Ko(t.labels, A.options),
|
|
2622
|
-
locale: M,
|
|
2623
|
-
classNames: { ...Io(), ...t.classNames }
|
|
2624
|
-
};
|
|
2625
|
-
}, [
|
|
2626
|
-
t.locale,
|
|
2627
|
-
t.broadcastCalendar,
|
|
2628
|
-
t.weekStartsOn,
|
|
2629
|
-
t.firstWeekContainsDate,
|
|
2630
|
-
t.useAdditionalWeekYearTokens,
|
|
2631
|
-
t.useAdditionalDayOfYearTokens,
|
|
2632
|
-
t.timeZone,
|
|
2633
|
-
t.numerals,
|
|
2634
|
-
t.dateLib,
|
|
2635
|
-
t.noonSafe,
|
|
2636
|
-
t.components,
|
|
2637
|
-
t.formatters,
|
|
2638
|
-
t.labels,
|
|
2639
|
-
t.classNames
|
|
2640
|
-
]);
|
|
2641
|
-
t.today || (t = { ...t, today: a.today() });
|
|
2642
|
-
const { captionLayout: u, mode: f, navLayout: l, numberOfMonths: d = 1, onDayBlur: w, onDayClick: O, onDayFocus: N, onDayKeyDown: k, onDayMouseEnter: v, onDayMouseLeave: Y, onNextClick: p, onPrevClick: D, showWeekNumber: b, styles: m } = t, { formatCaption: W, formatDay: E, formatMonthDropdown: I, formatWeekNumber: F, formatWeekNumberHeader: Z, formatWeekdayName: oe, formatYearDropdown: ee } = o, $ = ys(t, a), { days: ce, months: Oe, navStart: Te, navEnd: Pe, previousMonth: z, nextMonth: Q, goToMonth: te } = $, Ee = Eo(ce, t, Te, Pe, a), { isSelected: _e, select: Fe, selected: ve } = Ws(t, a) ?? {}, { blur: tt, focused: nt, isFocusTarget: Zt, moveFocus: rt, setFocused: We } = ws(t, $, Ee, _e ?? (() => !1), a), { labelDayButton: Kt, labelGridcell: Jt, labelGrid: Lt, labelMonthDropdown: en, labelNav: ot, labelPrevious: tn, labelNext: nn, labelWeekday: rn, labelWeekNumber: on, labelWeekNumberHeader: sn, labelYearDropdown: an } = i, cn = Ne(() => es(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), st = f !== void 0 || O !== void 0, Be = q(() => {
|
|
2643
|
-
z && (te(z), D?.(z));
|
|
2644
|
-
}, [z, te, D]), Ie = q(() => {
|
|
2645
|
-
Q && (te(Q), p?.(Q));
|
|
2646
|
-
}, [te, Q, p]), un = q((M, x) => (g) => {
|
|
2647
|
-
g.preventDefault(), g.stopPropagation(), We(M), !x.disabled && (Fe?.(M.date, x, g), O?.(M.date, x, g));
|
|
2648
|
-
}, [Fe, O, We]), ln = q((M, x) => (g) => {
|
|
2649
|
-
We(M), N?.(M.date, x, g);
|
|
2650
|
-
}, [N, We]), fn = q((M, x) => (g) => {
|
|
2651
|
-
tt(), w?.(M.date, x, g);
|
|
2652
|
-
}, [tt, w]), dn = q((M, x) => (g) => {
|
|
2653
|
-
const C = {
|
|
2654
|
-
ArrowLeft: [
|
|
2655
|
-
g.shiftKey ? "month" : "day",
|
|
2656
|
-
t.dir === "rtl" ? "after" : "before"
|
|
2657
|
-
],
|
|
2658
|
-
ArrowRight: [
|
|
2659
|
-
g.shiftKey ? "month" : "day",
|
|
2660
|
-
t.dir === "rtl" ? "before" : "after"
|
|
2661
|
-
],
|
|
2662
|
-
ArrowDown: [g.shiftKey ? "year" : "week", "after"],
|
|
2663
|
-
ArrowUp: [g.shiftKey ? "year" : "week", "before"],
|
|
2664
|
-
PageUp: [g.shiftKey ? "year" : "month", "before"],
|
|
2665
|
-
PageDown: [g.shiftKey ? "year" : "month", "after"],
|
|
2666
|
-
Home: ["startOfWeek", "before"],
|
|
2667
|
-
End: ["endOfWeek", "after"]
|
|
2668
|
-
};
|
|
2669
|
-
if (C[g.key]) {
|
|
2670
|
-
g.preventDefault(), g.stopPropagation();
|
|
2671
|
-
const [A, S] = C[g.key];
|
|
2672
|
-
rt(A, S);
|
|
2673
|
-
}
|
|
2674
|
-
k?.(M.date, x, g);
|
|
2675
|
-
}, [rt, k, t.dir]), hn = q((M, x) => (g) => {
|
|
2676
|
-
v?.(M.date, x, g);
|
|
2677
|
-
}, [v]), mn = q((M, x) => (g) => {
|
|
2678
|
-
Y?.(M.date, x, g);
|
|
2679
|
-
}, [Y]), yn = q((M) => (x) => {
|
|
2680
|
-
const g = Number(x.target.value), C = a.setMonth(a.startOfMonth(M), g);
|
|
2681
|
-
te(C);
|
|
2682
|
-
}, [a, te]), gn = q((M) => (x) => {
|
|
2683
|
-
const g = Number(x.target.value), C = a.setYear(a.startOfMonth(M), g);
|
|
2684
|
-
te(C);
|
|
2685
|
-
}, [a, te]), { className: bn, style: wn } = Ne(() => ({
|
|
2686
|
-
className: [c[y.Root], t.className].filter(Boolean).join(" "),
|
|
2687
|
-
style: { ...m?.[y.Root], ...t.style }
|
|
2688
|
-
}), [c, t.className, t.style, m]), pn = Bo(t), at = Se(null);
|
|
2689
|
-
as(at, !!t.animate, {
|
|
2690
|
-
classNames: c,
|
|
2691
|
-
months: Oe,
|
|
2692
|
-
focused: nt,
|
|
2693
|
-
dateLib: a
|
|
2694
|
-
});
|
|
2695
|
-
const Mn = {
|
|
2696
|
-
dayPickerProps: t,
|
|
2697
|
-
selected: ve,
|
|
2698
|
-
select: Fe,
|
|
2699
|
-
isSelected: _e,
|
|
2700
|
-
months: Oe,
|
|
2701
|
-
nextMonth: Q,
|
|
2702
|
-
previousMonth: z,
|
|
2703
|
-
goToMonth: te,
|
|
2704
|
-
getModifiers: Ee,
|
|
2705
|
-
components: n,
|
|
2706
|
-
classNames: c,
|
|
2707
|
-
styles: m,
|
|
2708
|
-
labels: i,
|
|
2709
|
-
formatters: o
|
|
2710
|
-
};
|
|
2711
|
-
return h.createElement(
|
|
2712
|
-
Ft.Provider,
|
|
2713
|
-
{ value: Mn },
|
|
2714
|
-
h.createElement(
|
|
2715
|
-
n.Root,
|
|
2716
|
-
{ rootRef: t.animate ? at : void 0, className: bn, style: wn, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...pn },
|
|
2717
|
-
h.createElement(
|
|
2718
|
-
n.Months,
|
|
2719
|
-
{ className: c[y.Months], style: m?.[y.Months] },
|
|
2720
|
-
!t.hideNavigation && !l && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": ot(), onPreviousClick: Be, onNextClick: Ie, previousMonth: z, nextMonth: Q }),
|
|
2721
|
-
Oe.map((M, x) => h.createElement(
|
|
2722
|
-
n.Month,
|
|
2723
|
-
{
|
|
2724
|
-
"data-animated-month": t.animate ? "true" : void 0,
|
|
2725
|
-
className: c[y.Month],
|
|
2726
|
-
style: m?.[y.Month],
|
|
2727
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
2728
|
-
key: x,
|
|
2729
|
-
displayIndex: x,
|
|
2730
|
-
calendarMonth: M
|
|
2731
|
-
},
|
|
2732
|
-
l === "around" && !t.hideNavigation && x === 0 && h.createElement(
|
|
2733
|
-
n.PreviousMonthButton,
|
|
2734
|
-
{ type: "button", className: c[y.PreviousMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": tn(z), onClick: Be, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2735
|
-
h.createElement(n.Chevron, { disabled: z ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2736
|
-
),
|
|
2737
|
-
h.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[y.MonthCaption], style: m?.[y.MonthCaption], calendarMonth: M, displayIndex: x }, u?.startsWith("dropdown") ? h.createElement(
|
|
2738
|
-
n.DropdownNav,
|
|
2739
|
-
{ className: c[y.Dropdowns], style: m?.[y.Dropdowns] },
|
|
2740
|
-
(() => {
|
|
2741
|
-
const g = u === "dropdown" || u === "dropdown-months" ? h.createElement(n.MonthsDropdown, { key: "month", className: c[y.MonthsDropdown], "aria-label": en(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: yn(M.date), options: Jo(M.date, Te, Pe, o, a), style: m?.[y.Dropdown], value: a.getMonth(M.date) }) : h.createElement("span", { key: "month" }, I(M.date, a)), C = u === "dropdown" || u === "dropdown-years" ? h.createElement(n.YearsDropdown, { key: "year", className: c[y.YearsDropdown], "aria-label": an(a.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: gn(M.date), options: ts(Te, Pe, o, a, !!t.reverseYears), style: m?.[y.Dropdown], value: a.getYear(M.date) }) : h.createElement("span", { key: "year" }, ee(M.date, a));
|
|
2742
|
-
return a.getMonthYearOrder() === "year-first" ? [C, g] : [g, C];
|
|
2743
|
-
})(),
|
|
2744
|
-
h.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2745
|
-
border: 0,
|
|
2746
|
-
clip: "rect(0 0 0 0)",
|
|
2747
|
-
height: "1px",
|
|
2748
|
-
margin: "-1px",
|
|
2749
|
-
overflow: "hidden",
|
|
2750
|
-
padding: 0,
|
|
2751
|
-
position: "absolute",
|
|
2752
|
-
width: "1px",
|
|
2753
|
-
whiteSpace: "nowrap",
|
|
2754
|
-
wordWrap: "normal"
|
|
2755
|
-
} }, W(M.date, a.options, a))
|
|
2756
|
-
) : h.createElement(n.CaptionLabel, { className: c[y.CaptionLabel], role: "status", "aria-live": "polite" }, W(M.date, a.options, a))),
|
|
2757
|
-
l === "around" && !t.hideNavigation && x === d - 1 && h.createElement(
|
|
2758
|
-
n.NextMonthButton,
|
|
2759
|
-
{ type: "button", className: c[y.NextMonthButton], tabIndex: Q ? void 0 : -1, "aria-disabled": Q ? void 0 : !0, "aria-label": nn(Q), onClick: Ie, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2760
|
-
h.createElement(n.Chevron, { disabled: Q ? void 0 : !0, className: c[y.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2761
|
-
),
|
|
2762
|
-
x === d - 1 && l === "after" && !t.hideNavigation && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[y.Nav], style: m?.[y.Nav], "aria-label": ot(), onPreviousClick: Be, onNextClick: Ie, previousMonth: z, nextMonth: Q }),
|
|
2763
|
-
h.createElement(
|
|
2764
|
-
n.MonthGrid,
|
|
2765
|
-
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Lt(M.date, a.options, a) || void 0, className: c[y.MonthGrid], style: m?.[y.MonthGrid] },
|
|
2766
|
-
!t.hideWeekdays && h.createElement(
|
|
2767
|
-
n.Weekdays,
|
|
2768
|
-
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: c[y.Weekdays], style: m?.[y.Weekdays] },
|
|
2769
|
-
b && h.createElement(n.WeekNumberHeader, { "aria-label": sn(a.options), className: c[y.WeekNumberHeader], style: m?.[y.WeekNumberHeader], scope: "col" }, Z()),
|
|
2770
|
-
cn.map((g) => h.createElement(n.Weekday, { "aria-label": rn(g, a.options, a), className: c[y.Weekday], key: String(g), style: m?.[y.Weekday], scope: "col" }, oe(g, a.options, a)))
|
|
2771
|
-
),
|
|
2772
|
-
h.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[y.Weeks], style: m?.[y.Weeks] }, M.weeks.map((g) => h.createElement(
|
|
2773
|
-
n.Week,
|
|
2774
|
-
{ className: c[y.Week], key: g.weekNumber, style: m?.[y.Week], week: g },
|
|
2775
|
-
b && h.createElement(n.WeekNumber, { week: g, style: m?.[y.WeekNumber], "aria-label": on(g.weekNumber, {
|
|
2776
|
-
locale: s
|
|
2777
|
-
}), className: c[y.WeekNumber], scope: "row", role: "rowheader" }, F(g.weekNumber, a)),
|
|
2778
|
-
g.days.map((C) => {
|
|
2779
|
-
const { date: A } = C, S = Ee(C);
|
|
2780
|
-
if (S[_.focused] = !S.hidden && !!nt?.isEqualTo(C), S[U.selected] = _e?.(A) || S.selected, xe(ve)) {
|
|
2781
|
-
const { from: He, to: Ae } = ve;
|
|
2782
|
-
S[U.range_start] = !!(He && Ae && a.isSameDay(A, He)), S[U.range_end] = !!(He && Ae && a.isSameDay(A, Ae)), S[U.range_middle] = ne(ve, A, !0, a);
|
|
2783
|
-
}
|
|
2784
|
-
const kn = Lo(S, m, t.modifiersStyles), Dn = _o(S, c, t.modifiersClassNames), On = !st && !S.hidden ? Jt(A, S, a.options, a) : void 0;
|
|
2785
|
-
return h.createElement(n.Day, { key: `${C.isoDate}_${C.displayMonthId}`, day: C, modifiers: S, className: Dn.join(" "), style: kn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": On, "data-day": C.isoDate, "data-month": C.outside ? C.dateMonthId : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": C.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && st ? h.createElement(n.DayButton, { className: c[y.DayButton], style: m?.[y.DayButton], type: "button", day: C, modifiers: S, disabled: !S.focused && S.disabled || void 0, "aria-disabled": S.focused && S.disabled || void 0, tabIndex: Zt(C) ? 0 : -1, "aria-label": Kt(A, S, a.options, a), onClick: un(C, S), onBlur: fn(C, S), onFocus: ln(C, S), onKeyDown: dn(C, S), onMouseEnter: hn(C, S), onMouseLeave: mn(C, S) }, E(A, a.options, a)) : !S.hidden && E(C.date, a.options, a));
|
|
2786
|
-
})
|
|
2787
|
-
)))
|
|
2788
|
-
)
|
|
2789
|
-
))
|
|
2790
|
-
),
|
|
2791
|
-
t.footer && h.createElement(n.Footer, { className: c[y.Footer], style: m?.[y.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
2792
|
-
)
|
|
2793
|
-
);
|
|
2794
|
-
}
|
|
2795
|
-
const Ns = ({
|
|
2796
|
-
className: e,
|
|
2797
|
-
showOutsideDays: t = !0,
|
|
2798
|
-
animate: r = !0,
|
|
2799
|
-
arrowClassName: n,
|
|
2800
|
-
monthsClassName: o,
|
|
2801
|
-
defaultSelected: i,
|
|
2802
|
-
onSelect: a,
|
|
2803
|
-
...s
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useCallback as f } from "react";
|
|
3
|
+
import { cn as t } from "../../utils/index.js";
|
|
4
|
+
import { datePickerVariants as p } from "./DatePicker.variants.js";
|
|
5
|
+
import '../../style.css';/* empty css */
|
|
6
|
+
import { D as k } from "../../DayPicker-PUEUVAST.js";
|
|
7
|
+
import { C as g, a as w } from "../../chevron-right-SUh6si0f.js";
|
|
8
|
+
const y = ({
|
|
9
|
+
className: l,
|
|
10
|
+
showOutsideDays: n = !0,
|
|
11
|
+
animate: d = !0,
|
|
12
|
+
arrowClassName: s,
|
|
13
|
+
monthsClassName: i,
|
|
14
|
+
defaultSelected: u,
|
|
15
|
+
onSelect: o,
|
|
16
|
+
...m
|
|
2804
17
|
}) => {
|
|
2805
|
-
const [c,
|
|
2806
|
-
() =>
|
|
2807
|
-
),
|
|
2808
|
-
(
|
|
2809
|
-
|
|
18
|
+
const [c, x] = h(
|
|
19
|
+
() => u
|
|
20
|
+
), b = f(
|
|
21
|
+
(e) => {
|
|
22
|
+
e && (x(e), o?.(e));
|
|
2810
23
|
},
|
|
2811
|
-
[
|
|
24
|
+
[o]
|
|
2812
25
|
);
|
|
2813
|
-
return /* @__PURE__ */
|
|
2814
|
-
|
|
26
|
+
return /* @__PURE__ */ a(
|
|
27
|
+
k,
|
|
2815
28
|
{
|
|
2816
|
-
className:
|
|
2817
|
-
animate:
|
|
29
|
+
className: t(p({ className: l })),
|
|
30
|
+
animate: d,
|
|
2818
31
|
mode: "single",
|
|
2819
32
|
selected: c,
|
|
2820
|
-
onSelect:
|
|
2821
|
-
showOutsideDays:
|
|
33
|
+
onSelect: b,
|
|
34
|
+
showOutsideDays: n,
|
|
2822
35
|
role: "dialog",
|
|
2823
36
|
"aria-label": "Datepicker",
|
|
2824
37
|
classNames: {
|
|
2825
|
-
chevron:
|
|
38
|
+
chevron: t(
|
|
2826
39
|
"cursor-pointer",
|
|
2827
40
|
"text-slate-500",
|
|
2828
41
|
"w-5",
|
|
@@ -2832,7 +45,7 @@ const Ns = ({
|
|
|
2832
45
|
"h-4",
|
|
2833
46
|
"dark:text-metal-200"
|
|
2834
47
|
),
|
|
2835
|
-
day_button:
|
|
48
|
+
day_button: t(
|
|
2836
49
|
"h-[30px]",
|
|
2837
50
|
"aria-selected:opacity-100",
|
|
2838
51
|
"font-semibold",
|
|
@@ -2842,7 +55,7 @@ const Ns = ({
|
|
|
2842
55
|
"w-[30px]"
|
|
2843
56
|
),
|
|
2844
57
|
day: "text-center text-sm leading-5",
|
|
2845
|
-
month_caption:
|
|
58
|
+
month_caption: t(
|
|
2846
59
|
"text-slate-700",
|
|
2847
60
|
"font-semibold",
|
|
2848
61
|
"text-sm",
|
|
@@ -2852,7 +65,7 @@ const Ns = ({
|
|
|
2852
65
|
"items-center",
|
|
2853
66
|
"dark:text-white"
|
|
2854
67
|
),
|
|
2855
|
-
months:
|
|
68
|
+
months: t(
|
|
2856
69
|
"flex",
|
|
2857
70
|
"flex-col",
|
|
2858
71
|
"relative",
|
|
@@ -2869,10 +82,10 @@ const Ns = ({
|
|
|
2869
82
|
"border-transparent",
|
|
2870
83
|
"dark:bg-metal-800",
|
|
2871
84
|
"dark:border-metal-700",
|
|
2872
|
-
|
|
85
|
+
i
|
|
2873
86
|
),
|
|
2874
87
|
month: "flex flex-col gap-4",
|
|
2875
|
-
nav:
|
|
88
|
+
nav: t(
|
|
2876
89
|
"absolute",
|
|
2877
90
|
"right-4",
|
|
2878
91
|
"top-3.5",
|
|
@@ -2880,10 +93,10 @@ const Ns = ({
|
|
|
2880
93
|
"justify-center",
|
|
2881
94
|
"items-center",
|
|
2882
95
|
"gap-1",
|
|
2883
|
-
|
|
96
|
+
s
|
|
2884
97
|
),
|
|
2885
98
|
outside: "text-slate-400 dark:text-metal-500",
|
|
2886
|
-
selected:
|
|
99
|
+
selected: t(
|
|
2887
100
|
"[&>button]:bg-blue-600",
|
|
2888
101
|
"[&>button]:text-white",
|
|
2889
102
|
"[&>button]:hover:bg-blue-700",
|
|
@@ -2896,7 +109,7 @@ const Ns = ({
|
|
|
2896
109
|
),
|
|
2897
110
|
table: "w-full",
|
|
2898
111
|
weekdays: "text-slate-500 dark:text-metal-300",
|
|
2899
|
-
weeks:
|
|
112
|
+
weeks: t(
|
|
2900
113
|
"text-slate-700",
|
|
2901
114
|
"[&>tr>td]:border-transparent",
|
|
2902
115
|
"[&>tr>td]:border-r-[8px]",
|
|
@@ -2905,7 +118,7 @@ const Ns = ({
|
|
|
2905
118
|
),
|
|
2906
119
|
weekday: "font-semibold text-sm uppercase text-sm",
|
|
2907
120
|
today: "text-blue-600 dark:text-aurora-500 data-[selected=true]:text-white",
|
|
2908
|
-
month_grid:
|
|
121
|
+
month_grid: t(
|
|
2909
122
|
"[&>thead]:table-header-group",
|
|
2910
123
|
"[&>thead]:relative",
|
|
2911
124
|
"[&>thead]:after:block",
|
|
@@ -2914,13 +127,13 @@ const Ns = ({
|
|
|
2914
127
|
)
|
|
2915
128
|
},
|
|
2916
129
|
components: {
|
|
2917
|
-
Chevron: ({ className:
|
|
130
|
+
Chevron: ({ className: e, ...r }) => r.orientation === "left" ? /* @__PURE__ */ a(g, { className: t(e), ...r }) : /* @__PURE__ */ a(w, { className: t(e), ...r })
|
|
2918
131
|
},
|
|
2919
|
-
...
|
|
132
|
+
...m
|
|
2920
133
|
}
|
|
2921
134
|
);
|
|
2922
135
|
};
|
|
2923
|
-
|
|
136
|
+
y.displayName = "KonstructDatePicker";
|
|
2924
137
|
export {
|
|
2925
|
-
|
|
138
|
+
y as DatePicker
|
|
2926
139
|
};
|