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