@konstructio/ui 0.1.2-alpha.84 → 0.1.2-alpha.85
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/{AdditionalOptions-Cx9wU01w.js → AdditionalOptions-UEegkZqG.js} +2 -2
- package/dist/{AlertDialogTrigger-C-NMEoDd.js → AlertDialogTrigger-C2GlLI2j.js} +4 -4
- package/dist/{Breadcrumb-C95aOsYk.js → Breadcrumb-BYO5PNVF.js} +3 -3
- package/dist/{Checkbox-Cn0UWlk8.js → Checkbox-BvRmHWxk.js} +8 -8
- package/dist/{CommandInput-BKv-EZ7T.js → CommandInput-C45ylYPm.js} +4 -4
- package/dist/{Counter-DtQu_T-D.js → Counter-Qqu8PU85.js} +4 -4
- package/dist/{DayPicker-CrrmX-H8.js → DayPicker-BQlzb5kH.js} +1 -1
- package/dist/{DropdownButton-B2XkEqPt.js → DropdownButton-CWwjA3zI.js} +3 -3
- package/dist/{FlagSelectorList-C17nmEBM.js → FlagSelectorList-NMlHNF7N.js} +122 -118
- package/dist/HamburgerTrigger-BzCfBWzH.js +85 -0
- package/dist/{ImageUpload-BzXjGZ2w.js → ImageUpload-DebL0hwF.js} +2 -2
- package/dist/{Input-GBMxM3Z7.js → Input-BZG7N8m1.js} +3 -3
- package/dist/{Loading-DKqxR-oV.js → Loading-DNlO4qxs.js} +2 -2
- package/dist/{Modal-DbTe8PVX.js → Modal-IyDr5vIx.js} +5 -5
- package/dist/{Spinner-CyuXAaC8.js → Spinner-BB1muhcJ.js} +2 -2
- package/dist/{StepIndicatorContent-D5z1Ziqg.js → StepIndicatorContent-87ASgJsX.js} +2 -2
- package/dist/{Switch-DjbC0A8y.js → Switch-CT2R9JgM.js} +5 -5
- package/dist/{Toast-D7GhS4fm.js → Toast-CWyLcmNX.js} +10 -10
- package/dist/{Wrapper-DEJ-hyar.js → Wrapper-DimnwFZe.js} +3 -3
- package/dist/{Wrapper-CjUokv72.js → Wrapper-F9NmImqw.js} +4 -4
- package/dist/{Wrapper-BYC8shQP.js → Wrapper-TuoyTFqo.js} +3 -3
- package/dist/{chevron-down-DgssmYWu.js → chevron-down-T3Rx8Nc7.js} +1 -1
- package/dist/{chevron-left-DRJXef9g.js → chevron-left-CeJrJR0U.js} +1 -1
- package/dist/{chevron-right-BooB_b7g.js → chevron-right-BFOnP164.js} +1 -1
- package/dist/{chevron-up-DuS9MUNr.js → chevron-up-BKlxfVX9.js} +1 -1
- package/dist/{chunk-D1xtDmiO.js → chunk-cI0lbGMq.js} +7 -7
- package/dist/components/Alert/Alert.js +3 -3
- package/dist/components/Alert/Alert.variants.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.variants.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +1 -1
- package/dist/components/Autocomplete/components/List/List.variants.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +1 -1
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/Badge.variants.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Card/Card.variants.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.variants.js +1 -1
- package/dist/components/Command/Command.js +3 -3
- package/dist/components/Command/Command.variants.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +2 -2
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +2 -2
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +2 -2
- package/dist/components/Command/components/CommandShortcut.js +1 -1
- package/dist/components/Command/components/DialogContent.js +3 -3
- package/dist/components/Command/components/DialogOverlay.js +2 -2
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/Counter/Counter.variants.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +2 -2
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +2 -2
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +4 -4
- package/dist/components/Datepicker/DatePicker.variants.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Drawer/Drawer.js +4 -4
- package/dist/components/Drawer/Drawer.variants.js +1 -1
- package/dist/components/Drawer/components/Body/Body.js +1 -1
- package/dist/components/Drawer/components/Footer/Footer.js +1 -1
- package/dist/components/Drawer/components/Header/Header.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/Filter.variants.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +3 -3
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +2 -2
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +2 -2
- package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +3 -3
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +2 -2
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.variants.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -1
- package/dist/components/LineChart/LineChart.js +2 -2
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Loading/Loading.variants.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +2 -2
- package/dist/components/Modal/components/Footer/Footer.js +2 -2
- package/dist/components/Modal/components/Header/Header.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Radio/Radio.variants.js +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioCard/RadioCard.variants.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
- package/dist/components/Range/Range.js +2 -2
- package/dist/components/Range/Range.variants.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/Select.variants.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
- package/dist/components/Select/components/List/List.js +5 -5
- package/dist/components/Select/components/List/List.variants.js +1 -1
- package/dist/components/Select/components/ListItem/ListItem.js +1 -1
- package/dist/components/Select/components/ListItem/ListItem.variants.js +1 -1
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Sidebar/Sidebar.js +15 -12
- package/dist/components/Sidebar/Sidebar.variants.js +12 -8
- package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +4 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js +22 -0
- package/dist/components/Sidebar/components/Label/Label.js +20 -0
- package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +5 -5
- package/dist/components/Sidebar/components/Navigation/Navigation.js +29 -16
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +15 -11
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +24 -14
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -4
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +7 -6
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +99 -33
- package/dist/components/Sidebar/components/index.js +18 -14
- package/dist/components/Sidebar/contexts/SidebarContext.js +11 -0
- package/dist/components/Sidebar/contexts/index.js +5 -0
- package/dist/components/Sidebar/hooks/index.js +6 -0
- package/dist/components/Sidebar/hooks/useSidebarMode.js +10 -0
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.variants.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/Spinner.variants.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/Stepper.variants.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
- package/dist/components/Stepper/hooks/useStepItemLogic.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.variants.js +1 -1
- package/dist/components/Table/components/Body.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Table/components/Head.js +1 -1
- package/dist/components/Table/components/Row.js +1 -1
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- package/dist/components/Tabs/components/Content.js +2 -2
- package/dist/components/Tabs/components/List.js +2 -2
- package/dist/components/Tabs/components/Trigger.js +2 -2
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/Tag/Tag.variants.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.variants.js +1 -1
- package/dist/components/TagSelect/components/List/List.js +1 -1
- package/dist/components/TagSelect/components/List/List.variants.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextArea/TextArea.variants.js +1 -1
- package/dist/components/TimePicker/TimePicker.variants.js +1 -1
- package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.variants.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.variants.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +1 -1
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +3 -3
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +4 -4
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +80 -78
- package/dist/{components-DNFycJGm.js → components-C_LekSz_.js} +3 -3
- package/dist/{constants-D96yCePL.js → constants-CLe3ZLC_.js} +1 -1
- package/dist/contexts/index.js +1 -1
- package/dist/contexts/theme.provider.js +1 -1
- package/dist/{debounce-CzFlgg9h.js → debounce-B55BpO1u.js} +2 -2
- package/dist/{dist-DXXHfL7M.js → dist-AZfrfAUz.js} +3 -3
- package/dist/{dist-COY3FRYC.js → dist-B5WmTRxj.js} +7 -7
- package/dist/{dist-DtEbXv47.js → dist-Bcn6lMQe.js} +1 -1
- package/dist/{dist-CSP6X06u.js → dist-BeLV4B_x.js} +7 -7
- package/dist/{dist-BL8l9uRy.js → dist-BfrkYZKI.js} +6 -6
- package/dist/{dist-B5SlrgYz.js → dist-Br5jSLr2.js} +7 -7
- package/dist/{dist-DXJSck4j.js → dist-CMPkuWNy.js} +1 -1
- package/dist/{dist-DNSmoWJp.js → dist-CPK4FXV9.js} +4 -4
- package/dist/{dist-DZcOdXgW.js → dist-CQfmhKEs.js} +1 -1
- package/dist/{dist-DZNdbzbm.js → dist-CZChgJLY.js} +2 -2
- package/dist/{dist-DpqiA4Yn.js → dist-DF7Yi2EK.js} +2 -2
- package/dist/{dist-uVUx9i0a.js → dist-D_9sBzad.js} +1 -1
- package/dist/{dist-CBnErrr1.js → dist-EV-1XXQr.js} +1 -1
- package/dist/{dist-DeVdyMHW2.js → dist-X40eHC8j2.js} +1 -1
- package/dist/{ellipsis-vertical-My0S9QY5.js → ellipsis-vertical-Cm9A6Zu8.js} +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useMediaQuery.js +17 -0
- package/dist/index.js +139 -135
- package/dist/{isObject--aYwGuhx.js → isObject-CGNJbB5a.js} +1 -1
- package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +46 -5
- package/dist/lib/components/Sidebar/Sidebar.variants.d.ts +3 -1
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +7 -0
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.d.ts +1 -0
- package/dist/lib/components/Sidebar/components/Label/Label.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +9 -0
- package/dist/lib/components/Sidebar/components/Wrapper/Wrapper.d.ts +2 -2
- package/dist/lib/components/Sidebar/components/index.d.ts +4 -0
- package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +10 -0
- package/dist/lib/components/Sidebar/contexts/index.d.ts +1 -0
- package/dist/lib/components/Sidebar/hooks/index.d.ts +1 -0
- package/dist/lib/components/Sidebar/hooks/useSidebarMode.d.ts +5 -0
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useMediaQuery.d.ts +1 -0
- package/dist/{libphonenumber-7uXgv7U8.js → libphonenumber-Dy3Kac9j.js} +1 -1
- package/dist/package.json +19 -18
- package/dist/{phone-number.provider-B9BWYAqH.js → phone-number.provider-CdPQAKnl.js} +584 -560
- package/dist/{prop-types-DTnODft1.js → prop-types-CE0Kfmwk.js} +1 -1
- package/dist/{proxy-uLtw-ZML.js → proxy-Cx8v8fok.js} +85 -85
- package/dist/styles.css +1 -1
- package/dist/{table.provider-4OQNqxH3.js → table.provider-BBlJgEJf.js} +3 -3
- package/dist/{theme.provider-BgxXUOMP.js → theme.provider-ps3SkwAo.js} +1 -1
- package/dist/{useBreadcrumb-nYudTOOA.js → useBreadcrumb-mrkCWjS0.js} +292 -292
- package/dist/utils/index.js +1 -1
- package/dist/{utils-DHuiYnx1.js → utils-COaoD3PI.js} +1 -1
- package/dist/{utils-2zv-ysvP.js → utils-Cc9GhtYC.js} +4 -3
- package/dist/{x-a0ouxoIM.js → x-DBIZFfaM.js} +1 -1
- package/dist/{x-BwIi6Wii.js → x-KjMYhcCb.js} +2 -2
- package/package.json +19 -18
- /package/dist/{Combination-DUTBK_qM.js → Combination-DFcElBFt.js} +0 -0
- /package/dist/{clsx-kDhLfUq2.js → clsx-Dzz4NoNN.js} +0 -0
- /package/dist/{createLucideIcon-BVGkzDZC.js → createLucideIcon-CL4htJAF.js} +0 -0
- /package/dist/{dist-DRmqW28Z2.js → dist-BHslNQd82.js} +0 -0
- /package/dist/{dist-ByyYBtbL.js → dist-C4El7dZ5.js} +0 -0
- /package/dist/{dist-DstQl8xY.js → dist-Cf-pDuuw.js} +0 -0
- /package/dist/{dist-C8r5DW7s.js → dist-D6dB-_Oy.js} +0 -0
- /package/dist/{dist-BL-H4bEw2.js → dist-DxDE5irg2.js} +0 -0
|
@@ -11,7 +11,7 @@ function C(e, t) {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ie({ pathname: e = "/", search: t = "", hash: r = "" }) {
|
|
15
15
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
|
|
16
16
|
}
|
|
17
17
|
function W(e) {
|
|
@@ -24,24 +24,24 @@ function W(e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
return
|
|
27
|
+
var qe;
|
|
28
|
+
qe = /* @__PURE__ */ new WeakMap();
|
|
29
|
+
function de(e, t, r = "/") {
|
|
30
|
+
return Xe(e, t, r, !1);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Xe(e, t, r, n) {
|
|
33
33
|
let a = _((typeof t == "string" ? W(t) : t).pathname || "/", r);
|
|
34
34
|
if (a == null) return null;
|
|
35
|
-
let o =
|
|
36
|
-
|
|
35
|
+
let o = $e(e);
|
|
36
|
+
Qe(o);
|
|
37
37
|
let i = null;
|
|
38
38
|
for (let s = 0; i == null && s < o.length; ++s) {
|
|
39
|
-
let u =
|
|
40
|
-
i =
|
|
39
|
+
let u = ut(a);
|
|
40
|
+
i = it(o[s], u, n);
|
|
41
41
|
}
|
|
42
42
|
return i;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Ke(e, t) {
|
|
45
45
|
let { route: r, pathname: n, params: a } = e;
|
|
46
46
|
return {
|
|
47
47
|
id: r.id,
|
|
@@ -52,7 +52,7 @@ function qe(e, t) {
|
|
|
52
52
|
handle: r.handle
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function $e(e, t = [], r = [], n = "", a = !1) {
|
|
56
56
|
let o = (i, s, u = a, c) => {
|
|
57
57
|
let f = {
|
|
58
58
|
relativePath: c === void 0 ? i.path || "" : c,
|
|
@@ -65,37 +65,37 @@ function Ce(e, t = [], r = [], n = "", a = !1) {
|
|
|
65
65
|
S(f.relativePath.startsWith(n), `Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), f.relativePath = f.relativePath.slice(n.length);
|
|
66
66
|
}
|
|
67
67
|
let d = k([n, f.relativePath]), h = r.concat(f);
|
|
68
|
-
i.children && i.children.length > 0 && (S(i.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${d}".`),
|
|
68
|
+
i.children && i.children.length > 0 && (S(i.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${d}".`), $e(i.children, t, h, d, u)), !(i.path == null && !i.index) && t.push({
|
|
69
69
|
path: d,
|
|
70
|
-
score:
|
|
70
|
+
score: ot(d, i.index),
|
|
71
71
|
routesMeta: h
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
74
|
return e.forEach((i, s) => {
|
|
75
75
|
if (i.path === "" || !i.path?.includes("?")) o(i, s);
|
|
76
|
-
else for (let u of
|
|
76
|
+
else for (let u of Pe(i.path)) o(i, s, !0, u);
|
|
77
77
|
}), t;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Pe(e) {
|
|
80
80
|
let t = e.split("/");
|
|
81
81
|
if (t.length === 0) return [];
|
|
82
82
|
let [r, ...n] = t, a = r.endsWith("?"), o = r.replace(/\?$/, "");
|
|
83
83
|
if (n.length === 0) return a ? [o, ""] : [o];
|
|
84
|
-
let i =
|
|
84
|
+
let i = Pe(n.join("/")), s = [];
|
|
85
85
|
return s.push(...i.map((u) => u === "" ? o : [o, u].join("/"))), a && s.push(...i), s.map((u) => e.startsWith("/") && u === "" ? "/" : u);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
e.sort((t, r) => t.score !== r.score ? r.score - t.score :
|
|
87
|
+
function Qe(e) {
|
|
88
|
+
e.sort((t, r) => t.score !== r.score ? r.score - t.score : lt(t.routesMeta.map((n) => n.childrenIndex), r.routesMeta.map((n) => n.childrenIndex)));
|
|
89
89
|
}
|
|
90
|
-
var
|
|
91
|
-
function
|
|
90
|
+
var Ze = /^:[\w-]+$/, et = 3, tt = 2, rt = 1, nt = 10, at = -2, Re = (e) => e === "*";
|
|
91
|
+
function ot(e, t) {
|
|
92
92
|
let r = e.split("/"), n = r.length;
|
|
93
|
-
return r.some(
|
|
93
|
+
return r.some(Re) && (n += at), t && (n += tt), r.filter((a) => !Re(a)).reduce((a, o) => a + (Ze.test(o) ? et : o === "" ? rt : nt), n);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function lt(e, t) {
|
|
96
96
|
return e.length === t.length && e.slice(0, -1).every((r, n) => r === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function it(e, t, r = !1) {
|
|
99
99
|
let { routesMeta: n } = e, a = {}, o = "/", i = [];
|
|
100
100
|
for (let s = 0; s < n.length; ++s) {
|
|
101
101
|
let u = n[s], c = s === n.length - 1, f = o === "/" ? t : t.slice(o.length) || "/", d = K({
|
|
@@ -111,7 +111,7 @@ function ot(e, t, r = !1) {
|
|
|
111
111
|
Object.assign(a, d.params), i.push({
|
|
112
112
|
params: a,
|
|
113
113
|
pathname: k([o, d.pathname]),
|
|
114
|
-
pathnameBase:
|
|
114
|
+
pathnameBase: mt(k([o, d.pathnameBase])),
|
|
115
115
|
route: h
|
|
116
116
|
}), d.pathnameBase !== "/" && (o = k([o, d.pathnameBase]));
|
|
117
117
|
}
|
|
@@ -123,7 +123,7 @@ function K(e, t) {
|
|
|
123
123
|
caseSensitive: !1,
|
|
124
124
|
end: !0
|
|
125
125
|
});
|
|
126
|
-
let [r, n] =
|
|
126
|
+
let [r, n] = st(e.path, e.caseSensitive, e.end), a = t.match(r);
|
|
127
127
|
if (!a) return null;
|
|
128
128
|
let o = a[0], i = o.replace(/(.)\/+$/, "$1"), s = a.slice(1);
|
|
129
129
|
return {
|
|
@@ -140,7 +140,7 @@ function K(e, t) {
|
|
|
140
140
|
pattern: e
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function st(e, t = !1, r = !0) {
|
|
144
144
|
C(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
145
145
|
let n = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (o, i, s, u, c) => {
|
|
146
146
|
if (n.push({
|
|
@@ -154,7 +154,7 @@ function lt(e, t = !1, r = !0) {
|
|
|
154
154
|
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
155
155
|
return e.endsWith("*") ? (n.push({ paramName: "*" }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), n];
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function ut(e) {
|
|
158
158
|
try {
|
|
159
159
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
160
160
|
} catch (t) {
|
|
@@ -167,34 +167,34 @@ function _(e, t) {
|
|
|
167
167
|
let r = t.endsWith("/") ? t.length - 1 : t.length, n = e.charAt(r);
|
|
168
168
|
return n && n !== "/" ? null : e.slice(r) || "/";
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
170
|
+
var ct = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
171
|
+
function dt(e, t = "/") {
|
|
172
172
|
let { pathname: r, search: n = "", hash: a = "" } = typeof e == "string" ? W(e) : e, o;
|
|
173
|
-
return r ? (r = r
|
|
173
|
+
return r ? (r = ke(r), r.startsWith("/") ? o = we(r.substring(1), "/") : o = we(r, t)) : o = t, {
|
|
174
174
|
pathname: o,
|
|
175
|
-
search:
|
|
176
|
-
hash:
|
|
175
|
+
search: ht(n),
|
|
176
|
+
hash: pt(a)
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
function
|
|
180
|
-
let r = t
|
|
179
|
+
function we(e, t) {
|
|
180
|
+
let r = Q(t).split("/");
|
|
181
181
|
return e.split("/").forEach((n) => {
|
|
182
182
|
n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
|
|
183
183
|
}), r.length > 1 ? r.join("/") : "/";
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function ae(e, t, r, n) {
|
|
186
186
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function ft(e) {
|
|
189
189
|
return e.filter((t, r) => r === 0 || t.route.path && t.route.path.length > 0);
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
let t =
|
|
191
|
+
function Le(e) {
|
|
192
|
+
let t = ft(e);
|
|
193
193
|
return t.map((r, n) => n === t.length - 1 ? r.pathname : r.pathnameBase);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function fe(e, t, r, n = !1) {
|
|
196
196
|
let a;
|
|
197
|
-
typeof e == "string" ? a = W(e) : (a = { ...e }, S(!a.pathname || !a.pathname.includes("?"),
|
|
197
|
+
typeof e == "string" ? a = W(e) : (a = { ...e }, S(!a.pathname || !a.pathname.includes("?"), ae("?", "pathname", "search", a)), S(!a.pathname || !a.pathname.includes("#"), ae("#", "pathname", "hash", a)), S(!a.search || !a.search.includes("#"), ae("#", "search", "hash", a)));
|
|
198
198
|
let o = e === "" || a.pathname === "", i = o ? "/" : a.pathname, s;
|
|
199
199
|
if (i == null) s = r;
|
|
200
200
|
else {
|
|
@@ -207,30 +207,30 @@ function de(e, t, r, n = !1) {
|
|
|
207
207
|
}
|
|
208
208
|
s = d >= 0 ? t[d] : "/";
|
|
209
209
|
}
|
|
210
|
-
let u =
|
|
210
|
+
let u = dt(a, s), c = i && i !== "/" && i.endsWith("/"), f = (o || i === ".") && r.endsWith("/");
|
|
211
211
|
return !u.pathname.endsWith("/") && (c || f) && (u.pathname += "/"), u;
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var ke = (e) => e.replace(/\/\/+/g, "/"), k = (e) => ke(e.join("/")), Q = (e) => e.replace(/\/+$/, ""), mt = (e) => Q(e).replace(/^\/*/, "/"), ht = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, pt = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, yt = class {
|
|
214
214
|
constructor(e, t, r, n = !1) {
|
|
215
215
|
this.status = e, this.statusText = t || "", this.internal = n, r instanceof Error ? (this.data = r.toString(), this.error = r) : this.data = r;
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
function
|
|
218
|
+
function _e(e) {
|
|
219
219
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return e.map((t) => t.route.path).filter(Boolean)
|
|
221
|
+
function gt(e) {
|
|
222
|
+
return k(e.map((t) => t.route.path).filter(Boolean)) || "/";
|
|
223
223
|
}
|
|
224
|
-
var
|
|
225
|
-
function
|
|
224
|
+
var Oe = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
225
|
+
function Te(e, t) {
|
|
226
226
|
let r = e;
|
|
227
|
-
if (typeof r != "string" || !
|
|
227
|
+
if (typeof r != "string" || !ct.test(r)) return {
|
|
228
228
|
absoluteURL: void 0,
|
|
229
229
|
isExternal: !1,
|
|
230
230
|
to: r
|
|
231
231
|
};
|
|
232
232
|
let n = r, a = !1;
|
|
233
|
-
if (
|
|
233
|
+
if (Oe) try {
|
|
234
234
|
let o = new URL(window.location.href), i = r.startsWith("//") ? new URL(o.protocol + r) : new URL(r), s = _(i.pathname, t);
|
|
235
235
|
i.origin === o.origin && s != null ? r = s + i.search + i.hash : a = !0;
|
|
236
236
|
} catch {
|
|
@@ -242,25 +242,25 @@ function _e(e, t) {
|
|
|
242
242
|
to: r
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Tr = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"), Me = [
|
|
246
246
|
"POST",
|
|
247
247
|
"PUT",
|
|
248
248
|
"PATCH",
|
|
249
249
|
"DELETE"
|
|
250
|
-
],
|
|
250
|
+
], Mr = new Set(Me), vt = ["GET", ...Me], Nr = new Set(vt), F = l.createContext(null);
|
|
251
251
|
F.displayName = "DataRouter";
|
|
252
252
|
var B = l.createContext(null);
|
|
253
253
|
B.displayName = "DataRouterState";
|
|
254
|
-
var
|
|
255
|
-
function
|
|
256
|
-
return l.useContext(
|
|
257
|
-
}
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
var
|
|
263
|
-
|
|
254
|
+
var Ne = l.createContext(!1);
|
|
255
|
+
function Ie() {
|
|
256
|
+
return l.useContext(Ne);
|
|
257
|
+
}
|
|
258
|
+
var De = l.createContext({ isTransitioning: !1 });
|
|
259
|
+
De.displayName = "ViewTransition";
|
|
260
|
+
var Rt = l.createContext(/* @__PURE__ */ new Map());
|
|
261
|
+
Rt.displayName = "Fetchers";
|
|
262
|
+
var se = l.createContext(null);
|
|
263
|
+
se.displayName = "Await";
|
|
264
264
|
var b = l.createContext(null);
|
|
265
265
|
b.displayName = "Navigation";
|
|
266
266
|
var U = l.createContext(null);
|
|
@@ -271,24 +271,24 @@ var T = l.createContext({
|
|
|
271
271
|
isDataRoute: !1
|
|
272
272
|
});
|
|
273
273
|
T.displayName = "Route";
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
if (e.startsWith(`${
|
|
274
|
+
var me = l.createContext(null);
|
|
275
|
+
me.displayName = "RouteError";
|
|
276
|
+
var Fe = "REACT_ROUTER_ERROR", wt = "REDIRECT", Et = "ROUTE_ERROR_RESPONSE";
|
|
277
|
+
function St(e) {
|
|
278
|
+
if (e.startsWith(`${Fe}:${wt}:{`)) try {
|
|
279
279
|
let t = JSON.parse(e.slice(28));
|
|
280
280
|
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
281
281
|
} catch {
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
if (e.startsWith(`${
|
|
284
|
+
function bt(e) {
|
|
285
|
+
if (e.startsWith(`${Fe}:${Et}:{`)) try {
|
|
286
286
|
let t = JSON.parse(e.slice(40));
|
|
287
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new
|
|
287
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new yt(t.status, t.statusText, t.data);
|
|
288
288
|
} catch {
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function xt(e, { relative: t } = {}) {
|
|
292
292
|
S(j(), "useHref() may be used only in the context of a <Router> component.");
|
|
293
293
|
let { basename: r, navigator: n } = l.useContext(b), { hash: a, pathname: o, search: i } = J(e, { relative: t }), s = o;
|
|
294
294
|
return r !== "/" && (s = o === "/" ? r : k([r, o])), n.createHref({
|
|
@@ -303,26 +303,26 @@ function j() {
|
|
|
303
303
|
function $() {
|
|
304
304
|
return S(j(), "useLocation() may be used only in the context of a <Router> component."), l.useContext(U).location;
|
|
305
305
|
}
|
|
306
|
-
var
|
|
307
|
-
function
|
|
306
|
+
var Ae = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
307
|
+
function He(e) {
|
|
308
308
|
l.useContext(b).static || l.useLayoutEffect(e);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Ct() {
|
|
311
311
|
let { isDataRoute: e } = l.useContext(T);
|
|
312
|
-
return e ?
|
|
312
|
+
return e ? At() : $t();
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function $t() {
|
|
315
315
|
S(j(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
316
|
-
let e = l.useContext(F), { basename: t, navigator: r } = l.useContext(b), { matches: n } = l.useContext(T), { pathname: a } = $(), o = JSON.stringify(
|
|
317
|
-
return
|
|
316
|
+
let e = l.useContext(F), { basename: t, navigator: r } = l.useContext(b), { matches: n } = l.useContext(T), { pathname: a } = $(), o = JSON.stringify(Le(n)), i = l.useRef(!1);
|
|
317
|
+
return He(() => {
|
|
318
318
|
i.current = !0;
|
|
319
319
|
}), l.useCallback((s, u = {}) => {
|
|
320
|
-
if (C(i.current,
|
|
320
|
+
if (C(i.current, Ae), !i.current) return;
|
|
321
321
|
if (typeof s == "number") {
|
|
322
322
|
r.go(s);
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
-
let c =
|
|
325
|
+
let c = fe(s, JSON.parse(o), a, u.relative === "path");
|
|
326
326
|
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : k([t, c.pathname])), (u.replace ? r.replace : r.push)(c, u.state, u);
|
|
327
327
|
}, [
|
|
328
328
|
t,
|
|
@@ -332,22 +332,22 @@ function xt() {
|
|
|
332
332
|
e
|
|
333
333
|
]);
|
|
334
334
|
}
|
|
335
|
-
var
|
|
335
|
+
var Ir = l.createContext(null);
|
|
336
336
|
function J(e, { relative: t } = {}) {
|
|
337
|
-
let { matches: r } = l.useContext(T), { pathname: n } = $(), a = JSON.stringify(
|
|
338
|
-
return l.useMemo(() =>
|
|
337
|
+
let { matches: r } = l.useContext(T), { pathname: n } = $(), a = JSON.stringify(Le(r));
|
|
338
|
+
return l.useMemo(() => fe(e, JSON.parse(a), n, t === "path"), [
|
|
339
339
|
e,
|
|
340
340
|
a,
|
|
341
341
|
n,
|
|
342
342
|
t
|
|
343
343
|
]);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Pt(e, t, r) {
|
|
346
346
|
S(j(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
347
347
|
let { navigator: n } = l.useContext(b), { matches: a } = l.useContext(T), o = a[a.length - 1], i = o ? o.params : {}, s = o ? o.pathname : "/", u = o ? o.pathnameBase : "/", c = o && o.route;
|
|
348
348
|
{
|
|
349
349
|
let m = c && c.path || "";
|
|
350
|
-
|
|
350
|
+
Ue(s, !c || m.endsWith("*") || m.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
351
351
|
|
|
352
352
|
Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" : `${m}/*`}">.`);
|
|
353
353
|
}
|
|
@@ -361,9 +361,9 @@ Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" :
|
|
|
361
361
|
let m = u.replace(/^\//, "").split("/");
|
|
362
362
|
y = "/" + h.replace(/^\//, "").split("/").slice(m.length).join("/");
|
|
363
363
|
}
|
|
364
|
-
let g =
|
|
364
|
+
let g = de(e, { pathname: y });
|
|
365
365
|
C(c || g != null, `No routes matched location "${d.pathname}${d.search}${d.hash}" `), C(g == null || g[g.length - 1].route.element !== void 0 || g[g.length - 1].route.Component !== void 0 || g[g.length - 1].route.lazy !== void 0, `Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
366
|
-
let p =
|
|
366
|
+
let p = Tt(g && g.map((m) => Object.assign({}, m, {
|
|
367
367
|
params: Object.assign({}, i, m.params),
|
|
368
368
|
pathname: k([u, n.encodeLocation ? n.encodeLocation(m.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : m.pathname]),
|
|
369
369
|
pathnameBase: m.pathnameBase === "/" ? u : k([u, n.encodeLocation ? n.encodeLocation(m.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : m.pathnameBase])
|
|
@@ -381,8 +381,8 @@ Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" :
|
|
|
381
381
|
navigationType: "POP"
|
|
382
382
|
} }, p) : p;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
let e =
|
|
384
|
+
function Lt() {
|
|
385
|
+
let e = Ft(), t = _e(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", a = {
|
|
386
386
|
padding: "0.5rem",
|
|
387
387
|
backgroundColor: n
|
|
388
388
|
}, o = {
|
|
@@ -391,7 +391,7 @@ function $t() {
|
|
|
391
391
|
}, i = null;
|
|
392
392
|
return console.error("Error handled by React Router default ErrorBoundary:", e), i = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ l.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ l.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ l.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ l.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ l.createElement("pre", { style: a }, r) : null, i);
|
|
393
393
|
}
|
|
394
|
-
var
|
|
394
|
+
var kt = /* @__PURE__ */ l.createElement(Lt, null), We = class extends l.Component {
|
|
395
395
|
constructor(e) {
|
|
396
396
|
super(e), this.state = {
|
|
397
397
|
location: e.location,
|
|
@@ -419,30 +419,30 @@ var Pt = /* @__PURE__ */ l.createElement($t, null), Ae = class extends l.Compone
|
|
|
419
419
|
render() {
|
|
420
420
|
let e = this.state.error;
|
|
421
421
|
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
422
|
-
const r =
|
|
422
|
+
const r = bt(e.digest);
|
|
423
423
|
r && (e = r);
|
|
424
424
|
}
|
|
425
|
-
let t = e !== void 0 ? /* @__PURE__ */ l.createElement(T.Provider, { value: this.props.routeContext }, /* @__PURE__ */ l.createElement(
|
|
425
|
+
let t = e !== void 0 ? /* @__PURE__ */ l.createElement(T.Provider, { value: this.props.routeContext }, /* @__PURE__ */ l.createElement(me.Provider, {
|
|
426
426
|
value: e,
|
|
427
427
|
children: this.props.component
|
|
428
428
|
})) : this.props.children;
|
|
429
|
-
return this.context ? /* @__PURE__ */ l.createElement(
|
|
429
|
+
return this.context ? /* @__PURE__ */ l.createElement(_t, { error: e }, t) : t;
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
|
-
|
|
433
|
-
var
|
|
434
|
-
function
|
|
432
|
+
We.contextType = Ne;
|
|
433
|
+
var oe = /* @__PURE__ */ new WeakMap();
|
|
434
|
+
function _t({ children: e, error: t }) {
|
|
435
435
|
let { basename: r } = l.useContext(b);
|
|
436
436
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
437
|
-
let n =
|
|
437
|
+
let n = St(t.digest);
|
|
438
438
|
if (n) {
|
|
439
|
-
let a =
|
|
439
|
+
let a = oe.get(t);
|
|
440
440
|
if (a) throw a;
|
|
441
|
-
let o =
|
|
442
|
-
if (
|
|
441
|
+
let o = Te(n.location, r);
|
|
442
|
+
if (Oe && !oe.get(t)) if (o.isExternal || n.reloadDocument) window.location.href = o.absoluteURL || o.to;
|
|
443
443
|
else {
|
|
444
444
|
const i = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(o.to, { replace: n.replace }));
|
|
445
|
-
throw
|
|
445
|
+
throw oe.set(t, i), i;
|
|
446
446
|
}
|
|
447
447
|
return /* @__PURE__ */ l.createElement("meta", {
|
|
448
448
|
httpEquiv: "refresh",
|
|
@@ -452,11 +452,11 @@ function Lt({ children: e, error: t }) {
|
|
|
452
452
|
}
|
|
453
453
|
return e;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ot({ routeContext: e, match: t, children: r }) {
|
|
456
456
|
let n = l.useContext(F);
|
|
457
457
|
return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ l.createElement(T.Provider, { value: e }, r);
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Tt(e, t = [], r) {
|
|
460
460
|
let n = r?.state;
|
|
461
461
|
if (e == null) {
|
|
462
462
|
if (!n) return null;
|
|
@@ -487,16 +487,16 @@ function _t(e, t = [], r) {
|
|
|
487
487
|
u(f, {
|
|
488
488
|
location: n.location,
|
|
489
489
|
params: n.matches?.[0]?.params ?? {},
|
|
490
|
-
unstable_pattern:
|
|
490
|
+
unstable_pattern: gt(n.matches),
|
|
491
491
|
errorInfo: d
|
|
492
492
|
});
|
|
493
493
|
} : void 0;
|
|
494
494
|
return a.reduceRight((f, d, h) => {
|
|
495
495
|
let y, g = !1, p = null, m = null;
|
|
496
|
-
n && (y = o && d.route.id ? o[d.route.id] : void 0, p = d.route.errorElement ||
|
|
496
|
+
n && (y = o && d.route.id ? o[d.route.id] : void 0, p = d.route.errorElement || kt, i && (s < 0 && h === 0 ? (Ue("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), g = !0, m = null) : s === h && (g = !0, m = d.route.hydrateFallbackElement || null)));
|
|
497
497
|
let R = t.concat(a.slice(0, h + 1)), w = () => {
|
|
498
498
|
let v;
|
|
499
|
-
return y ? v = p : g ? v = m : d.route.Component ? v = /* @__PURE__ */ l.createElement(d.route.Component, null) : d.route.element ? v = d.route.element : v = f, /* @__PURE__ */ l.createElement(
|
|
499
|
+
return y ? v = p : g ? v = m : d.route.Component ? v = /* @__PURE__ */ l.createElement(d.route.Component, null) : d.route.element ? v = d.route.element : v = f, /* @__PURE__ */ l.createElement(Ot, {
|
|
500
500
|
match: d,
|
|
501
501
|
routeContext: {
|
|
502
502
|
outlet: f,
|
|
@@ -506,7 +506,7 @@ function _t(e, t = [], r) {
|
|
|
506
506
|
children: v
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
|
-
return n && (d.route.ErrorBoundary || d.route.errorElement || h === 0) ? /* @__PURE__ */ l.createElement(
|
|
509
|
+
return n && (d.route.ErrorBoundary || d.route.errorElement || h === 0) ? /* @__PURE__ */ l.createElement(We, {
|
|
510
510
|
location: n.location,
|
|
511
511
|
revalidation: n.revalidation,
|
|
512
512
|
component: p,
|
|
@@ -521,68 +521,68 @@ function _t(e, t = [], r) {
|
|
|
521
521
|
}) : w();
|
|
522
522
|
}, null);
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function he(e) {
|
|
525
525
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function Mt(e) {
|
|
528
528
|
let t = l.useContext(F);
|
|
529
|
-
return S(t,
|
|
529
|
+
return S(t, he(e)), t;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function pe(e) {
|
|
532
532
|
let t = l.useContext(B);
|
|
533
|
-
return S(t,
|
|
533
|
+
return S(t, he(e)), t;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Nt(e) {
|
|
536
536
|
let t = l.useContext(T);
|
|
537
|
-
return S(t,
|
|
537
|
+
return S(t, he(e)), t;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
let t =
|
|
539
|
+
function ye(e) {
|
|
540
|
+
let t = Nt(e), r = t.matches[t.matches.length - 1];
|
|
541
541
|
return S(r.route.id, `${e} can only be used on routes that contain a unique "id"`), r.route.id;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
543
|
+
function It() {
|
|
544
|
+
return ye("useRouteId");
|
|
545
545
|
}
|
|
546
|
-
function
|
|
547
|
-
return
|
|
546
|
+
function Dt() {
|
|
547
|
+
return pe("useNavigation").navigation;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
let { matches: e, loaderData: t } =
|
|
551
|
-
return l.useMemo(() => e.map((r) =>
|
|
549
|
+
function Be() {
|
|
550
|
+
let { matches: e, loaderData: t } = pe("useMatches");
|
|
551
|
+
return l.useMemo(() => e.map((r) => Ke(r, t)), [e, t]);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
let e = l.useContext(
|
|
553
|
+
function Ft() {
|
|
554
|
+
let e = l.useContext(me), t = pe("useRouteError"), r = ye("useRouteError");
|
|
555
555
|
return e !== void 0 ? e : t.errors?.[r];
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
let { router: e } =
|
|
559
|
-
return
|
|
557
|
+
function At() {
|
|
558
|
+
let { router: e } = Mt("useNavigate"), t = ye("useNavigate"), r = l.useRef(!1);
|
|
559
|
+
return He(() => {
|
|
560
560
|
r.current = !0;
|
|
561
561
|
}), l.useCallback(async (n, a = {}) => {
|
|
562
|
-
C(r.current,
|
|
562
|
+
C(r.current, Ae), r.current && (typeof n == "number" ? await e.navigate(n) : await e.navigate(n, {
|
|
563
563
|
fromRouteId: t,
|
|
564
564
|
...a
|
|
565
565
|
}));
|
|
566
566
|
}, [e, t]);
|
|
567
567
|
}
|
|
568
|
-
var we = {};
|
|
569
|
-
function We(e, t, r) {
|
|
570
|
-
!t && !we[e] && (we[e] = !0, C(!1, r));
|
|
571
|
-
}
|
|
572
568
|
var Ee = {};
|
|
573
|
-
function
|
|
574
|
-
!
|
|
569
|
+
function Ue(e, t, r) {
|
|
570
|
+
!t && !Ee[e] && (Ee[e] = !0, C(!1, r));
|
|
571
|
+
}
|
|
572
|
+
var Se = {};
|
|
573
|
+
function Ht(e, t) {
|
|
574
|
+
!e && !Se[t] && (Se[t] = !0, console.warn(t));
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
578
|
-
return
|
|
576
|
+
var Dr = l.memo(Wt);
|
|
577
|
+
function Wt({ routes: e, future: t, state: r, isStatic: n, onError: a }) {
|
|
578
|
+
return Pt(e, void 0, {
|
|
579
579
|
state: r,
|
|
580
580
|
isStatic: n,
|
|
581
581
|
onError: a,
|
|
582
582
|
future: t
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function Bt({ basename: e = "/", children: t = null, location: r, navigationType: n = "POP", navigator: a, static: o = !1, unstable_useTransitions: i }) {
|
|
586
586
|
S(!j(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
|
|
587
587
|
let s = e.replace(/^\/*/, "/"), u = l.useMemo(() => ({
|
|
588
588
|
basename: s,
|
|
@@ -625,7 +625,7 @@ function Ht({ basename: e = "/", children: t = null, location: r, navigationType
|
|
|
625
625
|
value: p
|
|
626
626
|
}));
|
|
627
627
|
}
|
|
628
|
-
var
|
|
628
|
+
var Fr = class extends l.Component {
|
|
629
629
|
constructor(e) {
|
|
630
630
|
super(e), this.state = { error: null };
|
|
631
631
|
}
|
|
@@ -648,37 +648,37 @@ var Dr = class extends l.Component {
|
|
|
648
648
|
this.props.onError?.(o), Object.defineProperty(r, "_error", { get: () => o });
|
|
649
649
|
}));
|
|
650
650
|
if (a === 2 && !t) throw n._error;
|
|
651
|
-
if (a === 2) return /* @__PURE__ */ l.createElement(
|
|
651
|
+
if (a === 2) return /* @__PURE__ */ l.createElement(se.Provider, {
|
|
652
652
|
value: n,
|
|
653
653
|
children: t
|
|
654
654
|
});
|
|
655
|
-
if (a === 1) return /* @__PURE__ */ l.createElement(
|
|
655
|
+
if (a === 1) return /* @__PURE__ */ l.createElement(se.Provider, {
|
|
656
656
|
value: n,
|
|
657
657
|
children: e
|
|
658
658
|
});
|
|
659
659
|
throw n;
|
|
660
660
|
}
|
|
661
661
|
}, q = "get", X = "application/x-www-form-urlencoded";
|
|
662
|
-
function
|
|
662
|
+
function ee(e) {
|
|
663
663
|
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
664
664
|
}
|
|
665
|
-
function Wt(e) {
|
|
666
|
-
return Z(e) && e.tagName.toLowerCase() === "button";
|
|
667
|
-
}
|
|
668
|
-
function Bt(e) {
|
|
669
|
-
return Z(e) && e.tagName.toLowerCase() === "form";
|
|
670
|
-
}
|
|
671
665
|
function Ut(e) {
|
|
672
|
-
return
|
|
666
|
+
return ee(e) && e.tagName.toLowerCase() === "button";
|
|
673
667
|
}
|
|
674
668
|
function jt(e) {
|
|
669
|
+
return ee(e) && e.tagName.toLowerCase() === "form";
|
|
670
|
+
}
|
|
671
|
+
function Jt(e) {
|
|
672
|
+
return ee(e) && e.tagName.toLowerCase() === "input";
|
|
673
|
+
}
|
|
674
|
+
function zt(e) {
|
|
675
675
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
return e.button === 0 && (!t || t === "_self") && !
|
|
677
|
+
function Vt(e, t) {
|
|
678
|
+
return e.button === 0 && (!t || t === "_self") && !zt(e);
|
|
679
679
|
}
|
|
680
680
|
var Y = null;
|
|
681
|
-
function
|
|
681
|
+
function Yt() {
|
|
682
682
|
if (Y === null) try {
|
|
683
683
|
new FormData(document.createElement("form"), 0), Y = !1;
|
|
684
684
|
} catch {
|
|
@@ -686,24 +686,24 @@ function zt() {
|
|
|
686
686
|
}
|
|
687
687
|
return Y;
|
|
688
688
|
}
|
|
689
|
-
var
|
|
689
|
+
var Gt = /* @__PURE__ */ new Set([
|
|
690
690
|
"application/x-www-form-urlencoded",
|
|
691
691
|
"multipart/form-data",
|
|
692
692
|
"text/plain"
|
|
693
693
|
]);
|
|
694
|
-
function
|
|
695
|
-
return e != null && !
|
|
694
|
+
function le(e) {
|
|
695
|
+
return e != null && !Gt.has(e) ? (C(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${X}"`), null) : e;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function qt(e, t) {
|
|
698
698
|
let r, n, a, o, i;
|
|
699
|
-
if (
|
|
699
|
+
if (jt(e)) {
|
|
700
700
|
let s = e.getAttribute("action");
|
|
701
|
-
n = s ? _(s, t) : null, r = e.getAttribute("method") || q, a =
|
|
702
|
-
} else if (
|
|
701
|
+
n = s ? _(s, t) : null, r = e.getAttribute("method") || q, a = le(e.getAttribute("enctype")) || X, o = new FormData(e);
|
|
702
|
+
} else if (Ut(e) || Jt(e) && (e.type === "submit" || e.type === "image")) {
|
|
703
703
|
let s = e.form;
|
|
704
704
|
if (s == null) throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
705
705
|
let u = e.getAttribute("formaction") || s.getAttribute("action");
|
|
706
|
-
if (n = u ? _(u, t) : null, r = e.getAttribute("formmethod") || s.getAttribute("method") || q, a =
|
|
706
|
+
if (n = u ? _(u, t) : null, r = e.getAttribute("formmethod") || s.getAttribute("method") || q, a = le(e.getAttribute("formenctype")) || le(s.getAttribute("enctype")) || X, o = new FormData(s, e), !Yt()) {
|
|
707
707
|
let { name: c, type: f, value: d } = e;
|
|
708
708
|
if (f === "image") {
|
|
709
709
|
let h = c ? `${c}.` : "";
|
|
@@ -711,7 +711,7 @@ function Yt(e, t) {
|
|
|
711
711
|
} else c && o.append(c, d);
|
|
712
712
|
}
|
|
713
713
|
} else {
|
|
714
|
-
if (
|
|
714
|
+
if (ee(e)) throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
715
715
|
r = q, n = null, a = X, i = e;
|
|
716
716
|
}
|
|
717
717
|
return o && a === "text/plain" && (i = o, o = void 0), {
|
|
@@ -722,24 +722,24 @@ function Yt(e, t) {
|
|
|
722
722
|
body: i
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
var
|
|
725
|
+
var Ar = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"), Xt = {
|
|
726
726
|
"&": "\\u0026",
|
|
727
727
|
">": "\\u003e",
|
|
728
728
|
"<": "\\u003c",
|
|
729
729
|
"\u2028": "\\u2028",
|
|
730
730
|
"\u2029": "\\u2029"
|
|
731
|
-
},
|
|
732
|
-
function
|
|
733
|
-
return e.replace(
|
|
731
|
+
}, Kt = /[&><\u2028\u2029]/g;
|
|
732
|
+
function be(e) {
|
|
733
|
+
return e.replace(Kt, (t) => Xt[t]);
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function te(e, t) {
|
|
736
736
|
if (e === !1 || e === null || typeof e > "u") throw new Error(t);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function je(e, t, r, n) {
|
|
739
739
|
let a = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
740
|
-
return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${n}` : a.pathname = `${a.pathname}.${n}` : a.pathname === "/" ? a.pathname = `_root.${n}` : t && _(a.pathname, t) === "/" ? a.pathname = `${t
|
|
740
|
+
return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${n}` : a.pathname = `${a.pathname}.${n}` : a.pathname === "/" ? a.pathname = `_root.${n}` : t && _(a.pathname, t) === "/" ? a.pathname = `${Q(t)}/_root.${n}` : a.pathname = `${Q(a.pathname)}.${n}`, a;
|
|
741
741
|
}
|
|
742
|
-
async function
|
|
742
|
+
async function Qt(e, t) {
|
|
743
743
|
if (e.id in t) return t[e.id];
|
|
744
744
|
try {
|
|
745
745
|
let r = await import(
|
|
@@ -753,21 +753,21 @@ async function Xt(e, t) {
|
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Zt(e) {
|
|
757
757
|
return e != null && typeof e.page == "string";
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function er(e) {
|
|
760
760
|
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
761
761
|
}
|
|
762
|
-
async function
|
|
763
|
-
return
|
|
762
|
+
async function tr(e, t, r) {
|
|
763
|
+
return ar((await Promise.all(e.map(async (n) => {
|
|
764
764
|
let a = t.routes[n.route.id];
|
|
765
765
|
if (a) {
|
|
766
|
-
let o = await
|
|
766
|
+
let o = await Qt(a, r);
|
|
767
767
|
return o.links ? o.links() : [];
|
|
768
768
|
}
|
|
769
769
|
return [];
|
|
770
|
-
}))).flat(1).filter(
|
|
770
|
+
}))).flat(1).filter(er).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map((n) => n.rel === "stylesheet" ? {
|
|
771
771
|
...n,
|
|
772
772
|
rel: "prefetch",
|
|
773
773
|
as: "style"
|
|
@@ -776,7 +776,7 @@ async function Zt(e, t, r) {
|
|
|
776
776
|
rel: "prefetch"
|
|
777
777
|
}));
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function xe(e, t, r, n, a, o) {
|
|
780
780
|
let i = (u, c) => r[c] ? u.route.id !== r[c].route.id : !0, s = (u, c) => r[c].pathname !== u.pathname || r[c].route.path?.endsWith("*") && r[c].params["*"] !== u.params["*"];
|
|
781
781
|
return o === "assets" ? t.filter((u, c) => i(u, c) || s(u, c)) : o === "data" ? t.filter((u, c) => {
|
|
782
782
|
let f = n.routes[u.route.id];
|
|
@@ -795,42 +795,42 @@ function be(e, t, r, n, a, o) {
|
|
|
795
795
|
return !0;
|
|
796
796
|
}) : [];
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
return
|
|
798
|
+
function Je(e, t, { includeHydrateFallback: r } = {}) {
|
|
799
|
+
return rr(e.map((n) => {
|
|
800
800
|
let a = t.routes[n.route.id];
|
|
801
801
|
if (!a) return [];
|
|
802
802
|
let o = [a.module];
|
|
803
803
|
return a.clientActionModule && (o = o.concat(a.clientActionModule)), a.clientLoaderModule && (o = o.concat(a.clientLoaderModule)), r && a.hydrateFallbackModule && (o = o.concat(a.hydrateFallbackModule)), a.imports && (o = o.concat(a.imports)), o;
|
|
804
804
|
}).flat(1));
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function rr(e) {
|
|
807
807
|
return [...new Set(e)];
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function nr(e) {
|
|
810
810
|
let t = {}, r = Object.keys(e).sort();
|
|
811
811
|
for (let n of r) t[n] = e[n];
|
|
812
812
|
return t;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function ar(e, t) {
|
|
815
815
|
let r = /* @__PURE__ */ new Set(), n = new Set(t);
|
|
816
816
|
return e.reduce((a, o) => {
|
|
817
|
-
if (t && !
|
|
818
|
-
let i = JSON.stringify(
|
|
817
|
+
if (t && !Zt(o) && o.as === "script" && o.href && n.has(o.href)) return a;
|
|
818
|
+
let i = JSON.stringify(nr(o));
|
|
819
819
|
return r.has(i) || (r.add(i), a.push({
|
|
820
820
|
key: i,
|
|
821
821
|
link: o
|
|
822
822
|
})), a;
|
|
823
823
|
}, []);
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function or(e, t) {
|
|
826
826
|
return e.mode === "lazy" && t === !0;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function lr({ sri: e, ...t }, r) {
|
|
829
829
|
let n = new Set(r.state.matches.map((s) => s.route.id)), a = r.state.location.pathname.split("/").filter(Boolean), o = ["/"];
|
|
830
830
|
for (a.pop(); a.length > 0; )
|
|
831
831
|
o.push(`/${a.join("/")}`), a.pop();
|
|
832
832
|
o.forEach((s) => {
|
|
833
|
-
let u =
|
|
833
|
+
let u = de(r.routes, s, r.basename);
|
|
834
834
|
u && u.forEach((c) => n.add(c.route.id));
|
|
835
835
|
});
|
|
836
836
|
let i = [...n].reduce((s, u) => Object.assign(s, { [u]: t.routes[u] }), {});
|
|
@@ -840,22 +840,22 @@ function ar({ sri: e, ...t }, r) {
|
|
|
840
840
|
sri: e ? !0 : void 0
|
|
841
841
|
};
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function re() {
|
|
844
844
|
let e = l.useContext(F);
|
|
845
|
-
return
|
|
845
|
+
return te(e, "You must render this element inside a <DataRouterContext.Provider> element"), e;
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function ze() {
|
|
848
848
|
let e = l.useContext(B);
|
|
849
|
-
return
|
|
849
|
+
return te(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
850
850
|
}
|
|
851
|
-
var
|
|
852
|
-
|
|
851
|
+
var ne = l.createContext(void 0);
|
|
852
|
+
ne.displayName = "FrameworkContext";
|
|
853
853
|
function z() {
|
|
854
|
-
let e = l.useContext(
|
|
855
|
-
return
|
|
854
|
+
let e = l.useContext(ne);
|
|
855
|
+
return te(e, "You must render this element inside a <HydratedRouter> element"), e;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
let r = l.useContext(
|
|
857
|
+
function ir(e, t) {
|
|
858
|
+
let r = l.useContext(ne), [n, a] = l.useState(!1), [o, i] = l.useState(!1), { onFocus: s, onBlur: u, onMouseEnter: c, onMouseLeave: f, onTouchStart: d } = t, h = l.useRef(null);
|
|
859
859
|
l.useEffect(() => {
|
|
860
860
|
if (e === "render" && i(!0), e === "viewport") {
|
|
861
861
|
let p = (R) => {
|
|
@@ -907,35 +907,35 @@ function H(e, t) {
|
|
|
907
907
|
e && e(r), r.defaultPrevented || t(r);
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
if (r && !
|
|
910
|
+
function sr(e, t, r) {
|
|
911
|
+
if (r && !Z) return [e[0]];
|
|
912
912
|
if (t) {
|
|
913
913
|
let n = e.findIndex((a) => t[a.route.id] !== void 0);
|
|
914
914
|
return e.slice(0, n + 1);
|
|
915
915
|
}
|
|
916
916
|
return e;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
let r =
|
|
918
|
+
function ur({ page: e, ...t }) {
|
|
919
|
+
let r = Ie(), { router: n } = re(), a = l.useMemo(() => de(n.routes, e, n.basename), [
|
|
920
920
|
n.routes,
|
|
921
921
|
e,
|
|
922
922
|
n.basename
|
|
923
923
|
]);
|
|
924
|
-
return a ? r ? /* @__PURE__ */ l.createElement(
|
|
924
|
+
return a ? r ? /* @__PURE__ */ l.createElement(dr, {
|
|
925
925
|
page: e,
|
|
926
926
|
matches: a,
|
|
927
927
|
...t
|
|
928
|
-
}) : /* @__PURE__ */ l.createElement(
|
|
928
|
+
}) : /* @__PURE__ */ l.createElement(fr, {
|
|
929
929
|
page: e,
|
|
930
930
|
matches: a,
|
|
931
931
|
...t
|
|
932
932
|
}) : null;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function cr(e) {
|
|
935
935
|
let { manifest: t, routeModules: r } = z(), [n, a] = l.useState([]);
|
|
936
936
|
return l.useEffect(() => {
|
|
937
937
|
let o = !1;
|
|
938
|
-
return
|
|
938
|
+
return tr(e, t, r).then((i) => {
|
|
939
939
|
o || a(i);
|
|
940
940
|
}), () => {
|
|
941
941
|
o = !0;
|
|
@@ -946,10 +946,10 @@ function sr(e) {
|
|
|
946
946
|
r
|
|
947
947
|
]), n;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
let n = $(), { future: a } = z(), { basename: o } =
|
|
949
|
+
function dr({ page: e, matches: t, ...r }) {
|
|
950
|
+
let n = $(), { future: a } = z(), { basename: o } = re(), i = l.useMemo(() => {
|
|
951
951
|
if (e === n.pathname + n.search + n.hash) return [];
|
|
952
|
-
let s =
|
|
952
|
+
let s = je(e, o, a.unstable_trailingSlashAwareDataRequests, "rsc"), u = !1, c = [];
|
|
953
953
|
for (let f of t) typeof f.route.shouldRevalidate == "function" ? u = !0 : c.push(f.route.id);
|
|
954
954
|
return u && c.length > 0 && s.searchParams.set("_routes", c.join(",")), [s.pathname + s.search];
|
|
955
955
|
}, [
|
|
@@ -967,14 +967,14 @@ function ur({ page: e, matches: t, ...r }) {
|
|
|
967
967
|
...r
|
|
968
968
|
})));
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
let n = $(), { future: a, manifest: o, routeModules: i } = z(), { basename: s } =
|
|
970
|
+
function fr({ page: e, matches: t, ...r }) {
|
|
971
|
+
let n = $(), { future: a, manifest: o, routeModules: i } = z(), { basename: s } = re(), { loaderData: u, matches: c } = ze(), f = l.useMemo(() => xe(e, t, c, o, n, "data"), [
|
|
972
972
|
e,
|
|
973
973
|
t,
|
|
974
974
|
c,
|
|
975
975
|
o,
|
|
976
976
|
n
|
|
977
|
-
]), d = l.useMemo(() =>
|
|
977
|
+
]), d = l.useMemo(() => xe(e, t, c, o, n, "assets"), [
|
|
978
978
|
e,
|
|
979
979
|
t,
|
|
980
980
|
c,
|
|
@@ -987,7 +987,7 @@ function cr({ page: e, matches: t, ...r }) {
|
|
|
987
987
|
let v = o.routes[w.route.id];
|
|
988
988
|
!v || !v.hasLoader || (!f.some((x) => x.route.id === w.route.id) && w.route.id in u && i[w.route.id]?.shouldRevalidate || v.hasClientLoader ? m = !0 : p.add(w.route.id));
|
|
989
989
|
}), p.size === 0) return [];
|
|
990
|
-
let R =
|
|
990
|
+
let R = je(e, s, a.unstable_trailingSlashAwareDataRequests, "data");
|
|
991
991
|
return m && p.size > 0 && R.searchParams.set("_routes", t.filter((w) => p.has(w.route.id)).map((w) => w.route.id).join(",")), [R.pathname + R.search];
|
|
992
992
|
}, [
|
|
993
993
|
s,
|
|
@@ -999,7 +999,7 @@ function cr({ page: e, matches: t, ...r }) {
|
|
|
999
999
|
t,
|
|
1000
1000
|
e,
|
|
1001
1001
|
i
|
|
1002
|
-
]), y = l.useMemo(() =>
|
|
1002
|
+
]), y = l.useMemo(() => Je(d, o), [d, o]), g = cr(d);
|
|
1003
1003
|
return /* @__PURE__ */ l.createElement(l.Fragment, null, h.map((p) => /* @__PURE__ */ l.createElement("link", {
|
|
1004
1004
|
key: p,
|
|
1005
1005
|
rel: "prefetch",
|
|
@@ -1018,23 +1018,23 @@ function cr({ page: e, matches: t, ...r }) {
|
|
|
1018
1018
|
crossOrigin: m.crossOrigin ?? r.crossOrigin
|
|
1019
1019
|
})));
|
|
1020
1020
|
}
|
|
1021
|
-
var
|
|
1022
|
-
function
|
|
1023
|
-
|
|
1021
|
+
var Z = !1;
|
|
1022
|
+
function mr() {
|
|
1023
|
+
Z = !0;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1026
|
-
let { manifest: t, serverHandoffString: r, isSpaMode: n, renderMeta: a, routeDiscovery: o, ssr: i } = z(), { router: s, static: u, staticContext: c } =
|
|
1025
|
+
function hr(e) {
|
|
1026
|
+
let { manifest: t, serverHandoffString: r, isSpaMode: n, renderMeta: a, routeDiscovery: o, ssr: i } = z(), { router: s, static: u, staticContext: c } = re(), { matches: f } = ze(), d = Ie(), h = or(o, i);
|
|
1027
1027
|
a && (a.didRenderScripts = !0);
|
|
1028
|
-
let y =
|
|
1028
|
+
let y = sr(f, null, n);
|
|
1029
1029
|
l.useEffect(() => {
|
|
1030
|
-
|
|
1030
|
+
mr();
|
|
1031
1031
|
}, []);
|
|
1032
1032
|
let g = l.useMemo(() => {
|
|
1033
1033
|
if (d) return null;
|
|
1034
1034
|
let R = c ? `window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());` : " ", w = u ? `${t.hmr?.runtime ? `import ${JSON.stringify(t.hmr.runtime)};` : ""}${h ? "" : `import ${JSON.stringify(t.url)}`};
|
|
1035
1035
|
${y.map((v, x) => {
|
|
1036
1036
|
let E = `route${x}`, P = t.routes[v.route.id];
|
|
1037
|
-
|
|
1037
|
+
te(P, `Route ${v.route.id} not found in manifest`);
|
|
1038
1038
|
let { clientActionModule: L, clientLoaderModule: O, clientMiddlewareModule: M, hydrateFallbackModule: D, module: V } = P, A = [
|
|
1039
1039
|
...L ? [{
|
|
1040
1040
|
module: L,
|
|
@@ -1062,7 +1062,7 @@ ${y.map((v, x) => {
|
|
|
1062
1062
|
`);
|
|
1063
1063
|
}).join(`
|
|
1064
1064
|
`)}
|
|
1065
|
-
${h ? `window.__reactRouterManifest = ${JSON.stringify(
|
|
1065
|
+
${h ? `window.__reactRouterManifest = ${JSON.stringify(lr(t, s), null, 2)};` : ""}
|
|
1066
1066
|
window.__reactRouterRouteModules = {${y.map((v, x) => `${JSON.stringify(v.route.id)}:route${x}`).join(",")}};
|
|
1067
1067
|
|
|
1068
1068
|
import(${JSON.stringify(t.entry.module)});` : " ";
|
|
@@ -1078,8 +1078,8 @@ import(${JSON.stringify(t.entry.module)});` : " ";
|
|
|
1078
1078
|
type: "module",
|
|
1079
1079
|
async: !0
|
|
1080
1080
|
}));
|
|
1081
|
-
}, []), p =
|
|
1082
|
-
return
|
|
1081
|
+
}, []), p = Z || d ? [] : pr(t.entry.imports.concat(Je(y, t, { includeHydrateFallback: !0 }))), m = typeof t.sri == "object" ? t.sri : {};
|
|
1082
|
+
return Ht(!d, "The <Scripts /> element is a no-op when using RSC and can be safely removed."), Z || d ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, typeof t.sri == "object" ? /* @__PURE__ */ l.createElement("script", {
|
|
1083
1083
|
...e,
|
|
1084
1084
|
"rr-importmap": "",
|
|
1085
1085
|
type: "importmap",
|
|
@@ -1106,17 +1106,17 @@ import(${JSON.stringify(t.entry.module)});` : " ";
|
|
|
1106
1106
|
suppressHydrationWarning: !0
|
|
1107
1107
|
})), g);
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function pr(e) {
|
|
1110
1110
|
return [...new Set(e)];
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function yr(...e) {
|
|
1113
1113
|
return (t) => {
|
|
1114
1114
|
e.forEach((r) => {
|
|
1115
1115
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1116
1116
|
});
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var Hr = class extends l.Component {
|
|
1120
1120
|
constructor(e) {
|
|
1121
1121
|
super(e), this.state = {
|
|
1122
1122
|
error: e.error || null,
|
|
@@ -1136,27 +1136,27 @@ var Ar = class extends l.Component {
|
|
|
1136
1136
|
};
|
|
1137
1137
|
}
|
|
1138
1138
|
render() {
|
|
1139
|
-
return this.state.error ? /* @__PURE__ */ l.createElement(
|
|
1139
|
+
return this.state.error ? /* @__PURE__ */ l.createElement(gr, {
|
|
1140
1140
|
error: this.state.error,
|
|
1141
1141
|
isOutsideRemixApp: !0
|
|
1142
1142
|
}) : this.props.children;
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1145
|
+
function gr({ error: e, isOutsideRemixApp: t }) {
|
|
1146
1146
|
console.error(e);
|
|
1147
1147
|
let r = /* @__PURE__ */ l.createElement("script", { dangerouslySetInnerHTML: { __html: `
|
|
1148
1148
|
console.log(
|
|
1149
1149
|
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
1150
1150
|
);
|
|
1151
1151
|
` } });
|
|
1152
|
-
if (
|
|
1152
|
+
if (_e(e)) return /* @__PURE__ */ l.createElement(Ce, { title: "Unhandled Thrown Response!" }, /* @__PURE__ */ l.createElement("h1", { style: { fontSize: "24px" } }, e.status, " ", e.statusText), r);
|
|
1153
1153
|
let n;
|
|
1154
1154
|
if (e instanceof Error) n = e;
|
|
1155
1155
|
else {
|
|
1156
1156
|
let a = e == null ? "Unknown Error" : typeof e == "object" && "toString" in e ? e.toString() : JSON.stringify(e);
|
|
1157
1157
|
n = new Error(a);
|
|
1158
1158
|
}
|
|
1159
|
-
return /* @__PURE__ */ l.createElement(
|
|
1159
|
+
return /* @__PURE__ */ l.createElement(Ce, {
|
|
1160
1160
|
title: "Application Error!",
|
|
1161
1161
|
isOutsideRemixApp: t
|
|
1162
1162
|
}, /* @__PURE__ */ l.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ l.createElement("pre", { style: {
|
|
@@ -1166,7 +1166,7 @@ function pr({ error: e, isOutsideRemixApp: t }) {
|
|
|
1166
1166
|
overflow: "auto"
|
|
1167
1167
|
} }, n.stack), r);
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function Ce({ title: e, renderScripts: t, isOutsideRemixApp: r, children: n }) {
|
|
1170
1170
|
let { routeModules: a } = z();
|
|
1171
1171
|
return a.root?.Layout && !r ? n : /* @__PURE__ */ l.createElement("html", { lang: "en" }, /* @__PURE__ */ l.createElement("head", null, /* @__PURE__ */ l.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ l.createElement("meta", {
|
|
1172
1172
|
name: "viewport",
|
|
@@ -1174,21 +1174,21 @@ function xe({ title: e, renderScripts: t, isOutsideRemixApp: r, children: n }) {
|
|
|
1174
1174
|
}), /* @__PURE__ */ l.createElement("title", null, e)), /* @__PURE__ */ l.createElement("body", null, /* @__PURE__ */ l.createElement("main", { style: {
|
|
1175
1175
|
fontFamily: "system-ui, sans-serif",
|
|
1176
1176
|
padding: "2rem"
|
|
1177
|
-
} }, n, t ? /* @__PURE__ */ l.createElement(
|
|
1177
|
+
} }, n, t ? /* @__PURE__ */ l.createElement(hr, null) : null)));
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1179
|
+
var vr = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1180
1180
|
try {
|
|
1181
|
-
|
|
1181
|
+
vr && (window.__reactRouterVersion = "7.14.2");
|
|
1182
1182
|
} catch {
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Rr({ basename: e, children: t, history: r, unstable_useTransitions: n }) {
|
|
1185
1185
|
let [a, o] = l.useState({
|
|
1186
1186
|
action: r.action,
|
|
1187
1187
|
location: r.location
|
|
1188
1188
|
}), i = l.useCallback((s) => {
|
|
1189
1189
|
n === !1 ? o(s) : l.startTransition(() => o(s));
|
|
1190
1190
|
}, [n]);
|
|
1191
|
-
return l.useLayoutEffect(() => r.listen(i), [r, i]), /* @__PURE__ */ l.createElement(
|
|
1191
|
+
return l.useLayoutEffect(() => r.listen(i), [r, i]), /* @__PURE__ */ l.createElement(Bt, {
|
|
1192
1192
|
basename: e,
|
|
1193
1193
|
children: t,
|
|
1194
1194
|
location: a.location,
|
|
@@ -1197,16 +1197,16 @@ function gr({ basename: e, children: t, history: r, unstable_useTransitions: n }
|
|
|
1197
1197
|
unstable_useTransitions: n
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
1200
|
-
|
|
1201
|
-
var
|
|
1202
|
-
let { basename: m, navigator: R, unstable_useTransitions: w } = l.useContext(b), v = typeof f == "string" &&
|
|
1200
|
+
Rr.displayName = "unstable_HistoryRouter";
|
|
1201
|
+
var Ve = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye = l.forwardRef(function({ onClick: t, discover: r = "render", prefetch: n = "none", relative: a, reloadDocument: o, replace: i, unstable_mask: s, state: u, target: c, to: f, preventScrollReset: d, viewTransition: h, unstable_defaultShouldRevalidate: y, ...g }, p) {
|
|
1202
|
+
let { basename: m, navigator: R, unstable_useTransitions: w } = l.useContext(b), v = typeof f == "string" && Ve.test(f), x = Te(f, m);
|
|
1203
1203
|
f = x.to;
|
|
1204
|
-
let E =
|
|
1204
|
+
let E = xt(f, { relative: a }), P = $(), L = null;
|
|
1205
1205
|
if (s) {
|
|
1206
|
-
let N =
|
|
1206
|
+
let N = fe(s, [], P.unstable_mask ? P.unstable_mask.pathname : "/", !0);
|
|
1207
1207
|
m !== "/" && (N.pathname = N.pathname === "/" ? m : k([m, N.pathname])), L = R.createHref(N);
|
|
1208
1208
|
}
|
|
1209
|
-
let [O, M, D] =
|
|
1209
|
+
let [O, M, D] = ir(n, g), V = xr(f, {
|
|
1210
1210
|
replace: i,
|
|
1211
1211
|
unstable_mask: s,
|
|
1212
1212
|
state: u,
|
|
@@ -1220,20 +1220,20 @@ var Je = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ze = l.forwardRef(function({ onClick:
|
|
|
1220
1220
|
function A(N) {
|
|
1221
1221
|
t && t(N), N.defaultPrevented || V(N);
|
|
1222
1222
|
}
|
|
1223
|
-
let I = !(x.isExternal || o),
|
|
1223
|
+
let I = !(x.isExternal || o), ve = /* @__PURE__ */ l.createElement("a", {
|
|
1224
1224
|
...g,
|
|
1225
1225
|
...D,
|
|
1226
1226
|
href: (I ? L : void 0) || x.absoluteURL || E,
|
|
1227
1227
|
onClick: I ? A : t,
|
|
1228
|
-
ref:
|
|
1228
|
+
ref: yr(p, M),
|
|
1229
1229
|
target: c,
|
|
1230
1230
|
"data-discover": !v && r === "render" ? "true" : void 0
|
|
1231
1231
|
});
|
|
1232
|
-
return O && !v ? /* @__PURE__ */ l.createElement(l.Fragment, null,
|
|
1232
|
+
return O && !v ? /* @__PURE__ */ l.createElement(l.Fragment, null, ve, /* @__PURE__ */ l.createElement(ur, { page: E })) : ve;
|
|
1233
1233
|
});
|
|
1234
|
-
|
|
1235
|
-
var
|
|
1236
|
-
let d = J(i, { relative: c.relative }), h = $(), y = l.useContext(B), { navigator: g, basename: p } = l.useContext(b), m = y != null &&
|
|
1234
|
+
Ye.displayName = "Link";
|
|
1235
|
+
var wr = l.forwardRef(function({ "aria-current": t = "page", caseSensitive: r = !1, className: n = "", end: a = !1, style: o, to: i, viewTransition: s, children: u, ...c }, f) {
|
|
1236
|
+
let d = J(i, { relative: c.relative }), h = $(), y = l.useContext(B), { navigator: g, basename: p } = l.useContext(b), m = y != null && Or(d) && s === !0, R = g.encodeLocation ? g.encodeLocation(d).pathname : d.pathname, w = h.pathname, v = y && y.navigation && y.navigation.location ? y.navigation.location.pathname : null;
|
|
1237
1237
|
r || (w = w.toLowerCase(), v = v ? v.toLowerCase() : null, R = R.toLowerCase()), v && p && (v = _(v, p) || v);
|
|
1238
1238
|
const x = R !== "/" && R.endsWith("/") ? R.length - 1 : R.length;
|
|
1239
1239
|
let E = w === R || !a && w.startsWith(R) && w.charAt(x) === "/", P = v != null && (v === R || !a && v.startsWith(R) && v.charAt(R.length) === "/"), L = {
|
|
@@ -1248,7 +1248,7 @@ var vr = l.forwardRef(function({ "aria-current": t = "page", caseSensitive: r =
|
|
|
1248
1248
|
m ? "transitioning" : null
|
|
1249
1249
|
].filter(Boolean).join(" ");
|
|
1250
1250
|
let D = typeof o == "function" ? o(L) : o;
|
|
1251
|
-
return /* @__PURE__ */ l.createElement(
|
|
1251
|
+
return /* @__PURE__ */ l.createElement(Ye, {
|
|
1252
1252
|
...c,
|
|
1253
1253
|
"aria-current": O,
|
|
1254
1254
|
className: M,
|
|
@@ -1258,9 +1258,9 @@ var vr = l.forwardRef(function({ "aria-current": t = "page", caseSensitive: r =
|
|
|
1258
1258
|
viewTransition: s
|
|
1259
1259
|
}, typeof u == "function" ? u(L) : u);
|
|
1260
1260
|
});
|
|
1261
|
-
|
|
1262
|
-
var
|
|
1263
|
-
let { unstable_useTransitions: p } = l.useContext(b), m =
|
|
1261
|
+
wr.displayName = "NavLink";
|
|
1262
|
+
var Er = l.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: r, reloadDocument: n, replace: a, state: o, method: i = q, action: s, onSubmit: u, relative: c, preventScrollReset: f, viewTransition: d, unstable_defaultShouldRevalidate: h, ...y }, g) => {
|
|
1263
|
+
let { unstable_useTransitions: p } = l.useContext(b), m = Pr(), R = Lr(s, { relative: c }), w = i.toLowerCase() === "get" ? "get" : "post", v = typeof s == "string" && Ve.test(s), x = (E) => {
|
|
1264
1264
|
if (u && u(E), E.defaultPrevented) return;
|
|
1265
1265
|
E.preventDefault();
|
|
1266
1266
|
let P = E.nativeEvent.submitter, L = P?.getAttribute("formmethod") || i, O = () => m(P || E.currentTarget, {
|
|
@@ -1285,16 +1285,16 @@ var Rr = l.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: r, rel
|
|
|
1285
1285
|
"data-discover": !v && e === "render" ? "true" : void 0
|
|
1286
1286
|
});
|
|
1287
1287
|
});
|
|
1288
|
-
|
|
1289
|
-
function
|
|
1290
|
-
let n = l.useContext(
|
|
1291
|
-
|
|
1288
|
+
Er.displayName = "Form";
|
|
1289
|
+
function Sr({ getKey: e, storageKey: t, ...r }) {
|
|
1290
|
+
let n = l.useContext(ne), { basename: a } = l.useContext(b), o = $(), i = Be();
|
|
1291
|
+
kr({
|
|
1292
1292
|
getKey: e,
|
|
1293
1293
|
storageKey: t
|
|
1294
1294
|
});
|
|
1295
1295
|
let s = l.useMemo(() => {
|
|
1296
1296
|
if (!n || !e) return null;
|
|
1297
|
-
let c =
|
|
1297
|
+
let c = ce(o, i, a, e);
|
|
1298
1298
|
return c !== o.key ? c : null;
|
|
1299
1299
|
}, []);
|
|
1300
1300
|
if (!n || n.isSpaMode) return null;
|
|
@@ -1313,27 +1313,27 @@ function wr({ getKey: e, storageKey: t, ...r }) {
|
|
|
1313
1313
|
return /* @__PURE__ */ l.createElement("script", {
|
|
1314
1314
|
...r,
|
|
1315
1315
|
suppressHydrationWarning: !0,
|
|
1316
|
-
dangerouslySetInnerHTML: { __html: `(${u})(${
|
|
1316
|
+
dangerouslySetInnerHTML: { __html: `(${u})(${be(JSON.stringify(t || ue))}, ${be(JSON.stringify(s))})` }
|
|
1317
1317
|
});
|
|
1318
1318
|
}
|
|
1319
|
-
|
|
1320
|
-
function
|
|
1319
|
+
Sr.displayName = "ScrollRestoration";
|
|
1320
|
+
function Ge(e) {
|
|
1321
1321
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function ge(e) {
|
|
1324
1324
|
let t = l.useContext(F);
|
|
1325
|
-
return S(t,
|
|
1325
|
+
return S(t, Ge(e)), t;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function br(e) {
|
|
1328
1328
|
let t = l.useContext(B);
|
|
1329
|
-
return S(t,
|
|
1329
|
+
return S(t, Ge(e)), t;
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
let f =
|
|
1331
|
+
function xr(e, { target: t, replace: r, unstable_mask: n, state: a, preventScrollReset: o, relative: i, viewTransition: s, unstable_defaultShouldRevalidate: u, unstable_useTransitions: c } = {}) {
|
|
1332
|
+
let f = Ct(), d = $(), h = J(e, { relative: i });
|
|
1333
1333
|
return l.useCallback((y) => {
|
|
1334
|
-
if (
|
|
1334
|
+
if (Vt(y, t)) {
|
|
1335
1335
|
y.preventDefault();
|
|
1336
|
-
let g = r !== void 0 ? r :
|
|
1336
|
+
let g = r !== void 0 ? r : ie(d) === ie(h), p = () => f(e, {
|
|
1337
1337
|
replace: g,
|
|
1338
1338
|
unstable_mask: n,
|
|
1339
1339
|
state: a,
|
|
@@ -1360,12 +1360,12 @@ function Sr(e, { target: t, replace: r, unstable_mask: n, state: a, preventScrol
|
|
|
1360
1360
|
c
|
|
1361
1361
|
]);
|
|
1362
1362
|
}
|
|
1363
|
-
var
|
|
1364
|
-
function
|
|
1365
|
-
let { router: e } =
|
|
1363
|
+
var Cr = 0, $r = () => `__${String(++Cr)}__`;
|
|
1364
|
+
function Pr() {
|
|
1365
|
+
let { router: e } = ge("useSubmit"), { basename: t } = l.useContext(b), r = It(), n = e.fetch, a = e.navigate;
|
|
1366
1366
|
return l.useCallback(async (o, i = {}) => {
|
|
1367
|
-
let { action: s, method: u, encType: c, formData: f, body: d } =
|
|
1368
|
-
i.navigate === !1 ? await n(i.fetcherKey ||
|
|
1367
|
+
let { action: s, method: u, encType: c, formData: f, body: d } = qt(o, t);
|
|
1368
|
+
i.navigate === !1 ? await n(i.fetcherKey || $r(), r, i.action || s, {
|
|
1369
1369
|
unstable_defaultShouldRevalidate: i.unstable_defaultShouldRevalidate,
|
|
1370
1370
|
preventScrollReset: i.preventScrollReset,
|
|
1371
1371
|
formData: f,
|
|
@@ -1393,7 +1393,7 @@ function Cr() {
|
|
|
1393
1393
|
r
|
|
1394
1394
|
]);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function Lr(e, { relative: t } = {}) {
|
|
1397
1397
|
let { basename: r } = l.useContext(b), n = l.useContext(T);
|
|
1398
1398
|
S(n, "useFormAction must be used inside a RouteContext");
|
|
1399
1399
|
let [a] = n.matches.slice(-1), o = { ...J(e || ".", { relative: t }) }, i = $();
|
|
@@ -1406,27 +1406,27 @@ function $r(e, { relative: t } = {}) {
|
|
|
1406
1406
|
o.search = c ? `?${c}` : "";
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : k([r, o.pathname])),
|
|
1409
|
+
return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : k([r, o.pathname])), ie(o);
|
|
1410
1410
|
}
|
|
1411
|
-
var
|
|
1412
|
-
function
|
|
1411
|
+
var ue = "react-router-scroll-positions", G = {};
|
|
1412
|
+
function ce(e, t, r, n) {
|
|
1413
1413
|
let a = null;
|
|
1414
1414
|
return n && (r !== "/" ? a = n({
|
|
1415
1415
|
...e,
|
|
1416
1416
|
pathname: _(e.pathname, r) || e.pathname
|
|
1417
1417
|
}, t) : a = n(e, t)), a == null && (a = e.key), a;
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1420
|
-
let { router: r } =
|
|
1419
|
+
function kr({ getKey: e, storageKey: t } = {}) {
|
|
1420
|
+
let { router: r } = ge("useScrollRestoration"), { restoreScrollPosition: n, preventScrollReset: a } = br("useScrollRestoration"), { basename: o } = l.useContext(b), i = $(), s = Be(), u = Dt();
|
|
1421
1421
|
l.useEffect(() => (window.history.scrollRestoration = "manual", () => {
|
|
1422
1422
|
window.history.scrollRestoration = "auto";
|
|
1423
|
-
}), []),
|
|
1423
|
+
}), []), _r(l.useCallback(() => {
|
|
1424
1424
|
if (u.state === "idle") {
|
|
1425
|
-
let c =
|
|
1425
|
+
let c = ce(i, s, o, e);
|
|
1426
1426
|
G[c] = window.scrollY;
|
|
1427
1427
|
}
|
|
1428
1428
|
try {
|
|
1429
|
-
sessionStorage.setItem(t ||
|
|
1429
|
+
sessionStorage.setItem(t || ue, JSON.stringify(G));
|
|
1430
1430
|
} catch (c) {
|
|
1431
1431
|
C(!1, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${c}).`);
|
|
1432
1432
|
}
|
|
@@ -1440,12 +1440,12 @@ function Pr({ getKey: e, storageKey: t } = {}) {
|
|
|
1440
1440
|
t
|
|
1441
1441
|
])), typeof document < "u" && (l.useLayoutEffect(() => {
|
|
1442
1442
|
try {
|
|
1443
|
-
let c = sessionStorage.getItem(t ||
|
|
1443
|
+
let c = sessionStorage.getItem(t || ue);
|
|
1444
1444
|
c && (G = JSON.parse(c));
|
|
1445
1445
|
} catch {
|
|
1446
1446
|
}
|
|
1447
1447
|
}, [t]), l.useLayoutEffect(() => {
|
|
1448
|
-
let c = r?.enableScrollRestoration(G, () => window.scrollY, e ? (f, d) =>
|
|
1448
|
+
let c = r?.enableScrollRestoration(G, () => window.scrollY, e ? (f, d) => ce(f, d, o, e) : void 0);
|
|
1449
1449
|
return () => c && c();
|
|
1450
1450
|
}, [
|
|
1451
1451
|
r,
|
|
@@ -1476,7 +1476,7 @@ function Pr({ getKey: e, storageKey: t } = {}) {
|
|
|
1476
1476
|
a
|
|
1477
1477
|
]));
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function _r(e, t) {
|
|
1480
1480
|
let { capture: r } = t || {};
|
|
1481
1481
|
l.useEffect(() => {
|
|
1482
1482
|
let n = r != null ? { capture: r } : void 0;
|
|
@@ -1485,15 +1485,15 @@ function Lr(e, t) {
|
|
|
1485
1485
|
};
|
|
1486
1486
|
}, [e, r]);
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1489
|
-
let r = l.useContext(
|
|
1488
|
+
function Or(e, { relative: t } = {}) {
|
|
1489
|
+
let r = l.useContext(De);
|
|
1490
1490
|
S(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
1491
|
-
let { basename: n } =
|
|
1491
|
+
let { basename: n } = ge("useViewTransitionState"), a = J(e, { relative: t });
|
|
1492
1492
|
if (!r.isTransitioning) return !1;
|
|
1493
1493
|
let o = _(r.currentLocation.pathname, n) || r.currentLocation.pathname, i = _(r.nextLocation.pathname, n) || r.nextLocation.pathname;
|
|
1494
1494
|
return K(a.pathname, i) != null || K(a.pathname, o) != null;
|
|
1495
1495
|
}
|
|
1496
|
-
var
|
|
1496
|
+
var Wr = () => {
|
|
1497
1497
|
try {
|
|
1498
1498
|
return $(), { isInsideRouter: !0 };
|
|
1499
1499
|
} catch {
|
|
@@ -1501,6 +1501,6 @@ var Hr = () => {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
};
|
|
1503
1503
|
export {
|
|
1504
|
-
|
|
1505
|
-
|
|
1504
|
+
Ye as n,
|
|
1505
|
+
Wr as t
|
|
1506
1506
|
};
|