ecars-web-lib 1.0.0
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/README.md +50 -0
- package/dist/PaginationComponent-BM_GD3t6.cjs +2 -0
- package/dist/PaginationComponent-BM_GD3t6.cjs.map +1 -0
- package/dist/PaginationComponent-_iwGlFdM.js +65 -0
- package/dist/PaginationComponent-_iwGlFdM.js.map +1 -0
- package/dist/SelectComponent-CGBwJBns.cjs +2 -0
- package/dist/SelectComponent-CGBwJBns.cjs.map +1 -0
- package/dist/SelectComponent-DJi5yeVI.js +98 -0
- package/dist/SelectComponent-DJi5yeVI.js.map +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/chunk-KNED5TY2-9zjBD6gF.js +1659 -0
- package/dist/chunk-KNED5TY2-9zjBD6gF.js.map +1 -0
- package/dist/chunk-KNED5TY2-BcFuRn3Q.cjs +13 -0
- package/dist/chunk-KNED5TY2-BcFuRn3Q.cjs.map +1 -0
- package/dist/components/Accordion/AccordionComponent.d.ts +9 -0
- package/dist/components/Accordion/AccordionComponent.js +6 -0
- package/dist/components/Accordion/AccordionComponent.js.map +1 -0
- package/dist/components/Accordion/AccordionComponent.test.d.ts +1 -0
- package/dist/components/Accordion/AccordionComponent.test.js +32 -0
- package/dist/components/Accordion/AccordionComponent.test.js.map +1 -0
- package/dist/components/Accordion/components/AccordionArrow.d.ts +2 -0
- package/dist/components/Accordion/components/AccordionArrow.js +7 -0
- package/dist/components/Accordion/components/AccordionArrow.js.map +1 -0
- package/dist/components/Accordion/components/AccordionBlock.d.ts +6 -0
- package/dist/components/Accordion/components/AccordionBlock.js +6 -0
- package/dist/components/Accordion/components/AccordionBlock.js.map +1 -0
- package/dist/components/Accordion/components/AccordionButton.d.ts +6 -0
- package/dist/components/Accordion/components/AccordionButton.js +14 -0
- package/dist/components/Accordion/components/AccordionButton.js.map +1 -0
- package/dist/components/Accordion/components/AccordionContent.d.ts +6 -0
- package/dist/components/Accordion/components/AccordionContent.js +24 -0
- package/dist/components/Accordion/components/AccordionContent.js.map +1 -0
- package/dist/components/Accordion/components/AccordionLayout.d.ts +7 -0
- package/dist/components/Accordion/components/AccordionLayout.js +17 -0
- package/dist/components/Accordion/components/AccordionLayout.js.map +1 -0
- package/dist/components/Accordion/components/AccordionTitle.d.ts +5 -0
- package/dist/components/Accordion/components/AccordionTitle.js +6 -0
- package/dist/components/Accordion/components/AccordionTitle.js.map +1 -0
- package/dist/components/Accordion/constants.d.ts +1 -0
- package/dist/components/Accordion/constants.js +5 -0
- package/dist/components/Accordion/constants.js.map +1 -0
- package/dist/components/Accordion/index.d.ts +8 -0
- package/dist/components/Accordion/index.js +10 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.js +34 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/Button.test.js +101 -0
- package/dist/components/Button/Button.test.js.map +1 -0
- package/dist/components/Button/constants.d.ts +15 -0
- package/dist/components/Button/constants.js +15 -0
- package/dist/components/Button/constants.js.map +1 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.d.ts +13 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.js +37 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.js.map +1 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.d.ts +1 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.js +55 -0
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.js.map +1 -0
- package/dist/components/ButtonWithIcon/constants.d.ts +2 -0
- package/dist/components/ButtonWithIcon/constants.js +6 -0
- package/dist/components/ButtonWithIcon/constants.js.map +1 -0
- package/dist/components/Category/Category.d.ts +8 -0
- package/dist/components/Category/Category.js +18 -0
- package/dist/components/Category/Category.js.map +1 -0
- package/dist/components/Category/Category.test.d.ts +1 -0
- package/dist/components/Category/Category.test.js +14 -0
- package/dist/components/Category/Category.test.js.map +1 -0
- package/dist/components/Category/constants.d.ts +7 -0
- package/dist/components/Category/constants.js +10 -0
- package/dist/components/Category/constants.js.map +1 -0
- package/dist/components/Checkbox/CheckboxComponent.d.ts +3 -0
- package/dist/components/Checkbox/CheckboxComponent.js +6 -0
- package/dist/components/Checkbox/CheckboxComponent.js.map +1 -0
- package/dist/components/Checkbox/CheckboxComponent.test.d.ts +1 -0
- package/dist/components/Checkbox/CheckboxComponent.test.js +31 -0
- package/dist/components/Checkbox/CheckboxComponent.test.js.map +1 -0
- package/dist/components/Checkbox/components/CheckboxBlock.d.ts +7 -0
- package/dist/components/Checkbox/components/CheckboxBlock.js +19 -0
- package/dist/components/Checkbox/components/CheckboxBlock.js.map +1 -0
- package/dist/components/Checkbox/components/CheckboxIndicator.d.ts +2 -0
- package/dist/components/Checkbox/components/CheckboxIndicator.js +7 -0
- package/dist/components/Checkbox/components/CheckboxIndicator.js.map +1 -0
- package/dist/components/Checkbox/components/CheckboxInput.d.ts +3 -0
- package/dist/components/Checkbox/components/CheckboxInput.js +34 -0
- package/dist/components/Checkbox/components/CheckboxInput.js.map +1 -0
- package/dist/components/Checkbox/constants.d.ts +11 -0
- package/dist/components/Checkbox/constants.js +6 -0
- package/dist/components/Checkbox/constants.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +5 -0
- package/dist/components/Checkbox/index.js +8 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Dropdown/Dropdown.test.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.test.js +57 -0
- package/dist/components/Dropdown/Dropdown.test.js.map +1 -0
- package/dist/components/Dropdown/DropdownComponent.d.ts +9 -0
- package/dist/components/Dropdown/DropdownComponent.js +9 -0
- package/dist/components/Dropdown/DropdownComponent.js.map +1 -0
- package/dist/components/Dropdown/components/DropdownBlock.d.ts +5 -0
- package/dist/components/Dropdown/components/DropdownBlock.js +6 -0
- package/dist/components/Dropdown/components/DropdownBlock.js.map +1 -0
- package/dist/components/Dropdown/components/DropdownCategory.d.ts +7 -0
- package/dist/components/Dropdown/components/DropdownCategory.js +18 -0
- package/dist/components/Dropdown/components/DropdownCategory.js.map +1 -0
- package/dist/components/Dropdown/components/DropdownList.d.ts +3 -0
- package/dist/components/Dropdown/components/DropdownList.js +6 -0
- package/dist/components/Dropdown/components/DropdownList.js.map +1 -0
- package/dist/components/Dropdown/components/DropdownOption.d.ts +8 -0
- package/dist/components/Dropdown/components/DropdownOption.js +22 -0
- package/dist/components/Dropdown/components/DropdownOption.js.map +1 -0
- package/dist/components/Dropdown/constants.d.ts +11 -0
- package/dist/components/Dropdown/constants.js +5 -0
- package/dist/components/Dropdown/constants.js.map +1 -0
- package/dist/components/Dropdown/index.d.ts +6 -0
- package/dist/components/Dropdown/index.js +8 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/FavButton/FavButton.d.ts +11 -0
- package/dist/components/FavButton/FavButton.js +30 -0
- package/dist/components/FavButton/FavButton.js.map +1 -0
- package/dist/components/FavButton/FavButton.test.d.ts +1 -0
- package/dist/components/FavButton/FavButton.test.js +81 -0
- package/dist/components/FavButton/FavButton.test.js.map +1 -0
- package/dist/components/FavButton/constants.d.ts +6 -0
- package/dist/components/FavButton/constants.js +9 -0
- package/dist/components/FavButton/constants.js.map +1 -0
- package/dist/components/Field/FieldComponent.d.ts +9 -0
- package/dist/components/Field/FieldComponent.js +9 -0
- package/dist/components/Field/FieldComponent.js.map +1 -0
- package/dist/components/Field/FieldComponent.test.d.ts +1 -0
- package/dist/components/Field/FieldComponent.test.js +31 -0
- package/dist/components/Field/FieldComponent.test.js.map +1 -0
- package/dist/components/Field/components/FieldError.d.ts +5 -0
- package/dist/components/Field/components/FieldError.js +6 -0
- package/dist/components/Field/components/FieldError.js.map +1 -0
- package/dist/components/Field/components/FieldLabel.d.ts +6 -0
- package/dist/components/Field/components/FieldLabel.js +15 -0
- package/dist/components/Field/components/FieldLabel.js.map +1 -0
- package/dist/components/Field/constants.d.ts +2 -0
- package/dist/components/Field/constants.js +6 -0
- package/dist/components/Field/constants.js.map +1 -0
- package/dist/components/Field/index.d.ts +4 -0
- package/dist/components/Field/index.js +7 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.d.ts +9 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.js +7 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.js.map +1 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.d.ts +1 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.js +34 -0
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.js.map +1 -0
- package/dist/components/FilterAccordion/components/FilterAccordionArrow.d.ts +5 -0
- package/dist/components/FilterAccordion/components/FilterAccordionArrow.js +14 -0
- package/dist/components/FilterAccordion/components/FilterAccordionArrow.js.map +1 -0
- package/dist/components/FilterAccordion/components/FilterAccordionBlock.d.ts +5 -0
- package/dist/components/FilterAccordion/components/FilterAccordionBlock.js +6 -0
- package/dist/components/FilterAccordion/components/FilterAccordionBlock.js.map +1 -0
- package/dist/components/FilterAccordion/components/FilterAccordionContent.d.ts +6 -0
- package/dist/components/FilterAccordion/components/FilterAccordionContent.js +18 -0
- package/dist/components/FilterAccordion/components/FilterAccordionContent.js.map +1 -0
- package/dist/components/FilterAccordion/components/FilterAccordionLayout.d.ts +7 -0
- package/dist/components/FilterAccordion/components/FilterAccordionLayout.js +17 -0
- package/dist/components/FilterAccordion/components/FilterAccordionLayout.js.map +1 -0
- package/dist/components/FilterAccordion/components/FilterAccordionReset.d.ts +3 -0
- package/dist/components/FilterAccordion/components/FilterAccordionReset.js +16 -0
- package/dist/components/FilterAccordion/components/FilterAccordionReset.js.map +1 -0
- package/dist/components/FilterAccordion/constants.d.ts +3 -0
- package/dist/components/FilterAccordion/constants.js +9 -0
- package/dist/components/FilterAccordion/constants.js.map +1 -0
- package/dist/components/FilterAccordion/index.d.ts +7 -0
- package/dist/components/FilterAccordion/index.js +10 -0
- package/dist/components/FilterAccordion/index.js.map +1 -0
- package/dist/components/FilterButton/FilterButton.d.ts +8 -0
- package/dist/components/FilterButton/FilterButton.js +20 -0
- package/dist/components/FilterButton/FilterButton.js.map +1 -0
- package/dist/components/FilterButton/FilterButton.test.d.ts +1 -0
- package/dist/components/FilterButton/FilterButton.test.js +18 -0
- package/dist/components/FilterButton/FilterButton.test.js.map +1 -0
- package/dist/components/Gallery/Gallery.d.ts +8 -0
- package/dist/components/Gallery/Gallery.js +1094 -0
- package/dist/components/Gallery/Gallery.js.map +1 -0
- package/dist/components/Gallery/Gallery.test.d.ts +0 -0
- package/dist/components/Gallery/Gallery.test.js +25 -0
- package/dist/components/Gallery/Gallery.test.js.map +1 -0
- package/dist/components/Gallery/constants.d.ts +1 -0
- package/dist/components/Gallery/constants.js +5 -0
- package/dist/components/Gallery/constants.js.map +1 -0
- package/dist/components/Input/Input.d.ts +15 -0
- package/dist/components/Input/Input.js +43 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Input/Input.test.js +46 -0
- package/dist/components/Input/Input.test.js.map +1 -0
- package/dist/components/Input/constants.d.ts +1 -0
- package/dist/components/Input/constants.js +5 -0
- package/dist/components/Input/constants.js.map +1 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.d.ts +9 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.js +19 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.js.map +1 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.test.d.ts +1 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.test.js +55 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.test.js.map +1 -0
- package/dist/components/LinkWithIcon/constants.d.ts +2 -0
- package/dist/components/LinkWithIcon/constants.js +6 -0
- package/dist/components/LinkWithIcon/constants.js.map +1 -0
- package/dist/components/NavLink/NavLink.d.ts +8 -0
- package/dist/components/NavLink/NavLink.js +20 -0
- package/dist/components/NavLink/NavLink.js.map +1 -0
- package/dist/components/NavLink/NavLink.test.d.ts +1 -0
- package/dist/components/NavLink/NavLink.test.js +30 -0
- package/dist/components/NavLink/NavLink.test.js.map +1 -0
- package/dist/components/NavLink/constants.d.ts +1 -0
- package/dist/components/NavLink/constants.js +5 -0
- package/dist/components/NavLink/constants.js.map +1 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.test.js +79 -0
- package/dist/components/Pagination/Pagination.test.js.map +1 -0
- package/dist/components/Pagination/PaginationComponent.d.ts +6 -0
- package/dist/components/Pagination/PaginationComponent.js +8 -0
- package/dist/components/Pagination/PaginationComponent.js.map +1 -0
- package/dist/components/Pagination/components/PaginationArrow.d.ts +8 -0
- package/dist/components/Pagination/components/PaginationArrow.js +29 -0
- package/dist/components/Pagination/components/PaginationArrow.js.map +1 -0
- package/dist/components/Pagination/components/PaginationBody.d.ts +3 -0
- package/dist/components/Pagination/components/PaginationBody.js +6 -0
- package/dist/components/Pagination/components/PaginationBody.js.map +1 -0
- package/dist/components/Pagination/components/PaginationPage.d.ts +8 -0
- package/dist/components/Pagination/components/PaginationPage.js +17 -0
- package/dist/components/Pagination/components/PaginationPage.js.map +1 -0
- package/dist/components/Pagination/constants.d.ts +16 -0
- package/dist/components/Pagination/constants.js +11 -0
- package/dist/components/Pagination/constants.js.map +1 -0
- package/dist/components/Pagination/index.d.ts +5 -0
- package/dist/components/Pagination/index.js +7 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/RangeSlider/RangeSlider.d.ts +7 -0
- package/dist/components/RangeSlider/RangeSlider.js +1072 -0
- package/dist/components/RangeSlider/RangeSlider.js.map +1 -0
- package/dist/components/RangeSlider/RangeSlider.test.d.ts +1 -0
- package/dist/components/RangeSlider/RangeSlider.test.js +15 -0
- package/dist/components/RangeSlider/RangeSlider.test.js.map +1 -0
- package/dist/components/RouterLink/RouterLink.d.ts +11 -0
- package/dist/components/RouterLink/RouterLink.js +32 -0
- package/dist/components/RouterLink/RouterLink.js.map +1 -0
- package/dist/components/RouterLink/RouterLink.test.d.ts +1 -0
- package/dist/components/RouterLink/RouterLink.test.js +68 -0
- package/dist/components/RouterLink/RouterLink.test.js.map +1 -0
- package/dist/components/RouterLink/constants.d.ts +8 -0
- package/dist/components/RouterLink/constants.js +11 -0
- package/dist/components/RouterLink/constants.js.map +1 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +100 -0
- package/dist/components/Select/Select.test.js.map +1 -0
- package/dist/components/Select/SelectComponent.d.ts +13 -0
- package/dist/components/Select/SelectComponent.js +7 -0
- package/dist/components/Select/SelectComponent.js.map +1 -0
- package/dist/components/Select/components/SelectArrow.d.ts +2 -0
- package/dist/components/Select/components/SelectArrow.js +7 -0
- package/dist/components/Select/components/SelectArrow.js.map +1 -0
- package/dist/components/Select/components/SelectBlock.d.ts +6 -0
- package/dist/components/Select/components/SelectBlock.js +13 -0
- package/dist/components/Select/components/SelectBlock.js.map +1 -0
- package/dist/components/Select/components/SelectInput.d.ts +6 -0
- package/dist/components/Select/components/SelectInput.js +15 -0
- package/dist/components/Select/components/SelectInput.js.map +1 -0
- package/dist/components/Select/components/SelectList.d.ts +7 -0
- package/dist/components/Select/components/SelectList.js +6 -0
- package/dist/components/Select/components/SelectList.js.map +1 -0
- package/dist/components/Select/components/SelectOption.d.ts +7 -0
- package/dist/components/Select/components/SelectOption.js +16 -0
- package/dist/components/Select/components/SelectOption.js.map +1 -0
- package/dist/components/Select/components/SelectWrapper.d.ts +9 -0
- package/dist/components/Select/components/SelectWrapper.js +23 -0
- package/dist/components/Select/components/SelectWrapper.js.map +1 -0
- package/dist/components/Select/constants.d.ts +2 -0
- package/dist/components/Select/constants.js +8 -0
- package/dist/components/Select/constants.js.map +1 -0
- package/dist/components/Select/index.d.ts +8 -0
- package/dist/components/Select/index.js +10 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Slider/SliderComponent.d.ts +16 -0
- package/dist/components/Slider/SliderComponent.js +7 -0
- package/dist/components/Slider/SliderComponent.js.map +1 -0
- package/dist/components/Slider/constants.d.ts +4 -0
- package/dist/components/Slider/constants.js +2803 -0
- package/dist/components/Slider/constants.js.map +1 -0
- package/dist/components/SliderNavigate/SliderNavigate.d.ts +2 -0
- package/dist/components/SliderNavigate/SliderNavigate.js +21 -0
- package/dist/components/SliderNavigate/SliderNavigate.js.map +1 -0
- package/dist/components/SliderNavigate/SliderNavigate.test.d.ts +1 -0
- package/dist/components/SliderNavigate/SliderNavigate.test.js +24 -0
- package/dist/components/SliderNavigate/SliderNavigate.test.js.map +1 -0
- package/dist/components/SliderNavigate/components/NavigateButton.d.ts +7 -0
- package/dist/components/SliderNavigate/components/NavigateButton.js +19 -0
- package/dist/components/SliderNavigate/components/NavigateButton.js.map +1 -0
- package/dist/components/SliderNavigate/constants.d.ts +7 -0
- package/dist/components/SliderNavigate/constants.js +10 -0
- package/dist/components/SliderNavigate/constants.js.map +1 -0
- package/dist/iconBase-C4boY5mo.cjs +2 -0
- package/dist/iconBase-C4boY5mo.cjs.map +1 -0
- package/dist/iconBase-DSKTHwal.js +113 -0
- package/dist/iconBase-DSKTHwal.js.map +1 -0
- package/dist/index-6k1-qYX7.cjs +2 -0
- package/dist/index-6k1-qYX7.cjs.map +1 -0
- package/dist/index-BHJQkg-z.js +39 -0
- package/dist/index-BHJQkg-z.js.map +1 -0
- package/dist/index-BeUY6TnM.js +68 -0
- package/dist/index-BeUY6TnM.js.map +1 -0
- package/dist/index-C55-7-85.cjs +2 -0
- package/dist/index-C55-7-85.cjs.map +1 -0
- package/dist/index-C9UV8B4g.cjs +2 -0
- package/dist/index-C9UV8B4g.cjs.map +1 -0
- package/dist/index-CGl3Xo_k.js +19135 -0
- package/dist/index-CGl3Xo_k.js.map +1 -0
- package/dist/index-D9bMq-6v.cjs +2 -0
- package/dist/index-D9bMq-6v.cjs.map +1 -0
- package/dist/index-DgPeknFG.cjs +2 -0
- package/dist/index-DgPeknFG.cjs.map +1 -0
- package/dist/index-DpGIQZJ3.js +35 -0
- package/dist/index-DpGIQZJ3.js.map +1 -0
- package/dist/index-DtO1atyA.js +30 -0
- package/dist/index-DtO1atyA.js.map +1 -0
- package/dist/index-YTr4A0AR.js +25 -0
- package/dist/index-YTr4A0AR.js.map +1 -0
- package/dist/index-vOj_CXk2.cjs +175 -0
- package/dist/index-vOj_CXk2.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/react.esm-C2dSWZxI.cjs +91 -0
- package/dist/react.esm-C2dSWZxI.cjs.map +1 -0
- package/dist/react.esm-DeOc63_l.js +11455 -0
- package/dist/react.esm-DeOc63_l.js.map +1 -0
- package/dist/services/helpers.d.ts +2 -0
- package/dist/services/helpers.js +21 -0
- package/dist/services/helpers.js.map +1 -0
- package/dist/services/hoc/withBlockClass.d.ts +7 -0
- package/dist/services/hoc/withBlockClass.js +22 -0
- package/dist/services/hoc/withBlockClass.js.map +1 -0
- package/dist/services/hooks/useAccordionHeight.d.ts +9 -0
- package/dist/services/hooks/useAccordionHeight.js +17 -0
- package/dist/services/hooks/useAccordionHeight.js.map +1 -0
- package/dist/services/hooks/useClickOutside.d.ts +5 -0
- package/dist/services/hooks/useClickOutside.js +17 -0
- package/dist/services/hooks/useClickOutside.js.map +1 -0
- package/dist/services/hooks/useMatchMedia.d.ts +1 -0
- package/dist/services/hooks/useMatchMedia.js +18 -0
- package/dist/services/hooks/useMatchMedia.js.map +1 -0
- package/dist/services/icons.d.ts +7 -0
- package/dist/services/icons.js +27 -0
- package/dist/services/icons.js.map +1 -0
- package/dist/services/mocks.d.ts +12 -0
- package/dist/services/mocks.js +21 -0
- package/dist/services/mocks.js.map +1 -0
- package/dist/services/types.d.ts +7 -0
- package/dist/services/types.js +2 -0
- package/dist/services/types.js.map +1 -0
- package/dist/setupTests.d.ts +0 -0
- package/dist/setupTests.js +10217 -0
- package/dist/setupTests.js.map +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,1659 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
var O = {}, ae;
|
|
3
|
+
function Pe() {
|
|
4
|
+
if (ae) return O;
|
|
5
|
+
ae = 1, Object.defineProperty(O, "__esModule", { value: !0 }), O.parse = s, O.serialize = u;
|
|
6
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, o = /* @__PURE__ */ (() => {
|
|
7
|
+
const m = function() {
|
|
8
|
+
};
|
|
9
|
+
return m.prototype = /* @__PURE__ */ Object.create(null), m;
|
|
10
|
+
})();
|
|
11
|
+
function s(m, d) {
|
|
12
|
+
const f = new o(), g = m.length;
|
|
13
|
+
if (g < 2)
|
|
14
|
+
return f;
|
|
15
|
+
const x = (d == null ? void 0 : d.decode) || h;
|
|
16
|
+
let p = 0;
|
|
17
|
+
do {
|
|
18
|
+
const w = m.indexOf("=", p);
|
|
19
|
+
if (w === -1)
|
|
20
|
+
break;
|
|
21
|
+
const v = m.indexOf(";", p), R = v === -1 ? g : v;
|
|
22
|
+
if (w > R) {
|
|
23
|
+
p = m.lastIndexOf(";", w - 1) + 1;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const P = c(m, p, w), D = i(m, w, P), I = m.slice(P, D);
|
|
27
|
+
if (f[I] === void 0) {
|
|
28
|
+
let T = c(m, w + 1, R), C = i(m, R, T);
|
|
29
|
+
const F = x(m.slice(T, C));
|
|
30
|
+
f[I] = F;
|
|
31
|
+
}
|
|
32
|
+
p = R + 1;
|
|
33
|
+
} while (p < g);
|
|
34
|
+
return f;
|
|
35
|
+
}
|
|
36
|
+
function c(m, d, f) {
|
|
37
|
+
do {
|
|
38
|
+
const g = m.charCodeAt(d);
|
|
39
|
+
if (g !== 32 && g !== 9)
|
|
40
|
+
return d;
|
|
41
|
+
} while (++d < f);
|
|
42
|
+
return f;
|
|
43
|
+
}
|
|
44
|
+
function i(m, d, f) {
|
|
45
|
+
for (; d > f; ) {
|
|
46
|
+
const g = m.charCodeAt(--d);
|
|
47
|
+
if (g !== 32 && g !== 9)
|
|
48
|
+
return d + 1;
|
|
49
|
+
}
|
|
50
|
+
return f;
|
|
51
|
+
}
|
|
52
|
+
function u(m, d, f) {
|
|
53
|
+
const g = (f == null ? void 0 : f.encode) || encodeURIComponent;
|
|
54
|
+
if (!e.test(m))
|
|
55
|
+
throw new TypeError(`argument name is invalid: ${m}`);
|
|
56
|
+
const x = g(d);
|
|
57
|
+
if (!t.test(x))
|
|
58
|
+
throw new TypeError(`argument val is invalid: ${d}`);
|
|
59
|
+
let p = m + "=" + x;
|
|
60
|
+
if (!f)
|
|
61
|
+
return p;
|
|
62
|
+
if (f.maxAge !== void 0) {
|
|
63
|
+
if (!Number.isInteger(f.maxAge))
|
|
64
|
+
throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);
|
|
65
|
+
p += "; Max-Age=" + f.maxAge;
|
|
66
|
+
}
|
|
67
|
+
if (f.domain) {
|
|
68
|
+
if (!r.test(f.domain))
|
|
69
|
+
throw new TypeError(`option domain is invalid: ${f.domain}`);
|
|
70
|
+
p += "; Domain=" + f.domain;
|
|
71
|
+
}
|
|
72
|
+
if (f.path) {
|
|
73
|
+
if (!a.test(f.path))
|
|
74
|
+
throw new TypeError(`option path is invalid: ${f.path}`);
|
|
75
|
+
p += "; Path=" + f.path;
|
|
76
|
+
}
|
|
77
|
+
if (f.expires) {
|
|
78
|
+
if (!y(f.expires) || !Number.isFinite(f.expires.valueOf()))
|
|
79
|
+
throw new TypeError(`option expires is invalid: ${f.expires}`);
|
|
80
|
+
p += "; Expires=" + f.expires.toUTCString();
|
|
81
|
+
}
|
|
82
|
+
if (f.httpOnly && (p += "; HttpOnly"), f.secure && (p += "; Secure"), f.partitioned && (p += "; Partitioned"), f.priority)
|
|
83
|
+
switch (typeof f.priority == "string" ? f.priority.toLowerCase() : void 0) {
|
|
84
|
+
case "low":
|
|
85
|
+
p += "; Priority=Low";
|
|
86
|
+
break;
|
|
87
|
+
case "medium":
|
|
88
|
+
p += "; Priority=Medium";
|
|
89
|
+
break;
|
|
90
|
+
case "high":
|
|
91
|
+
p += "; Priority=High";
|
|
92
|
+
break;
|
|
93
|
+
default:
|
|
94
|
+
throw new TypeError(`option priority is invalid: ${f.priority}`);
|
|
95
|
+
}
|
|
96
|
+
if (f.sameSite)
|
|
97
|
+
switch (typeof f.sameSite == "string" ? f.sameSite.toLowerCase() : f.sameSite) {
|
|
98
|
+
case !0:
|
|
99
|
+
case "strict":
|
|
100
|
+
p += "; SameSite=Strict";
|
|
101
|
+
break;
|
|
102
|
+
case "lax":
|
|
103
|
+
p += "; SameSite=Lax";
|
|
104
|
+
break;
|
|
105
|
+
case "none":
|
|
106
|
+
p += "; SameSite=None";
|
|
107
|
+
break;
|
|
108
|
+
default:
|
|
109
|
+
throw new TypeError(`option sameSite is invalid: ${f.sameSite}`);
|
|
110
|
+
}
|
|
111
|
+
return p;
|
|
112
|
+
}
|
|
113
|
+
function h(m) {
|
|
114
|
+
if (m.indexOf("%") === -1)
|
|
115
|
+
return m;
|
|
116
|
+
try {
|
|
117
|
+
return decodeURIComponent(m);
|
|
118
|
+
} catch {
|
|
119
|
+
return m;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function y(m) {
|
|
123
|
+
return n.call(m) === "[object Date]";
|
|
124
|
+
}
|
|
125
|
+
return O;
|
|
126
|
+
}
|
|
127
|
+
Pe();
|
|
128
|
+
/**
|
|
129
|
+
* react-router v7.5.0
|
|
130
|
+
*
|
|
131
|
+
* Copyright (c) Remix Software Inc.
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the MIT license found in the
|
|
134
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
135
|
+
*
|
|
136
|
+
* @license MIT
|
|
137
|
+
*/
|
|
138
|
+
function Se(e = {}) {
|
|
139
|
+
let { initialEntries: t = ["/"], initialIndex: r, v5Compat: a = !1 } = e, n;
|
|
140
|
+
n = t.map(
|
|
141
|
+
(d, f) => h(
|
|
142
|
+
d,
|
|
143
|
+
typeof d == "string" ? null : d.state,
|
|
144
|
+
f === 0 ? "default" : void 0
|
|
145
|
+
)
|
|
146
|
+
);
|
|
147
|
+
let o = i(
|
|
148
|
+
r ?? n.length - 1
|
|
149
|
+
), s = "POP", c = null;
|
|
150
|
+
function i(d) {
|
|
151
|
+
return Math.min(Math.max(d, 0), n.length - 1);
|
|
152
|
+
}
|
|
153
|
+
function u() {
|
|
154
|
+
return n[o];
|
|
155
|
+
}
|
|
156
|
+
function h(d, f = null, g) {
|
|
157
|
+
let x = Le(
|
|
158
|
+
n ? u().pathname : "/",
|
|
159
|
+
d,
|
|
160
|
+
f,
|
|
161
|
+
g
|
|
162
|
+
);
|
|
163
|
+
return b(
|
|
164
|
+
x.pathname.charAt(0) === "/",
|
|
165
|
+
`relative pathnames are not supported in memory history: ${JSON.stringify(
|
|
166
|
+
d
|
|
167
|
+
)}`
|
|
168
|
+
), x;
|
|
169
|
+
}
|
|
170
|
+
function y(d) {
|
|
171
|
+
return typeof d == "string" ? d : j(d);
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
get index() {
|
|
175
|
+
return o;
|
|
176
|
+
},
|
|
177
|
+
get action() {
|
|
178
|
+
return s;
|
|
179
|
+
},
|
|
180
|
+
get location() {
|
|
181
|
+
return u();
|
|
182
|
+
},
|
|
183
|
+
createHref: y,
|
|
184
|
+
createURL(d) {
|
|
185
|
+
return new URL(y(d), "http://localhost");
|
|
186
|
+
},
|
|
187
|
+
encodeLocation(d) {
|
|
188
|
+
let f = typeof d == "string" ? M(d) : d;
|
|
189
|
+
return {
|
|
190
|
+
pathname: f.pathname || "",
|
|
191
|
+
search: f.search || "",
|
|
192
|
+
hash: f.hash || ""
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
push(d, f) {
|
|
196
|
+
s = "PUSH";
|
|
197
|
+
let g = h(d, f);
|
|
198
|
+
o += 1, n.splice(o, n.length, g), a && c && c({ action: s, location: g, delta: 1 });
|
|
199
|
+
},
|
|
200
|
+
replace(d, f) {
|
|
201
|
+
s = "REPLACE";
|
|
202
|
+
let g = h(d, f);
|
|
203
|
+
n[o] = g, a && c && c({ action: s, location: g, delta: 0 });
|
|
204
|
+
},
|
|
205
|
+
go(d) {
|
|
206
|
+
s = "POP";
|
|
207
|
+
let f = i(o + d), g = n[f];
|
|
208
|
+
o = f, c && c({ action: s, location: g, delta: d });
|
|
209
|
+
},
|
|
210
|
+
listen(d) {
|
|
211
|
+
return c = d, () => {
|
|
212
|
+
c = null;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function E(e, t) {
|
|
218
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
219
|
+
throw new Error(t);
|
|
220
|
+
}
|
|
221
|
+
function b(e, t) {
|
|
222
|
+
if (!e) {
|
|
223
|
+
typeof console < "u" && console.warn(t);
|
|
224
|
+
try {
|
|
225
|
+
throw new Error(t);
|
|
226
|
+
} catch {
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function ke() {
|
|
231
|
+
return Math.random().toString(36).substring(2, 10);
|
|
232
|
+
}
|
|
233
|
+
function Le(e, t, r = null, a) {
|
|
234
|
+
return {
|
|
235
|
+
pathname: typeof e == "string" ? e : e.pathname,
|
|
236
|
+
search: "",
|
|
237
|
+
hash: "",
|
|
238
|
+
...typeof t == "string" ? M(t) : t,
|
|
239
|
+
state: r,
|
|
240
|
+
// TODO: This could be cleaned up. push/replace should probably just take
|
|
241
|
+
// full Locations now and avoid the need to run through this flow at all
|
|
242
|
+
// But that's a pretty big refactor to the current test suite so going to
|
|
243
|
+
// keep as is for the time being and just let any incoming keys take precedence
|
|
244
|
+
key: t && t.key || a || ke()
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function j({
|
|
248
|
+
pathname: e = "/",
|
|
249
|
+
search: t = "",
|
|
250
|
+
hash: r = ""
|
|
251
|
+
}) {
|
|
252
|
+
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
|
|
253
|
+
}
|
|
254
|
+
function M(e) {
|
|
255
|
+
let t = {};
|
|
256
|
+
if (e) {
|
|
257
|
+
let r = e.indexOf("#");
|
|
258
|
+
r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
|
|
259
|
+
let a = e.indexOf("?");
|
|
260
|
+
a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
|
|
261
|
+
}
|
|
262
|
+
return t;
|
|
263
|
+
}
|
|
264
|
+
function ue(e, t, r = "/") {
|
|
265
|
+
return $e(e, t, r, !1);
|
|
266
|
+
}
|
|
267
|
+
function $e(e, t, r, a) {
|
|
268
|
+
let n = typeof t == "string" ? M(t) : t, o = L(n.pathname || "/", r);
|
|
269
|
+
if (o == null)
|
|
270
|
+
return null;
|
|
271
|
+
let s = se(e);
|
|
272
|
+
Ie(s);
|
|
273
|
+
let c = null;
|
|
274
|
+
for (let i = 0; c == null && i < s.length; ++i) {
|
|
275
|
+
let u = He(o);
|
|
276
|
+
c = Ue(
|
|
277
|
+
s[i],
|
|
278
|
+
u,
|
|
279
|
+
a
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
return c;
|
|
283
|
+
}
|
|
284
|
+
function se(e, t = [], r = [], a = "") {
|
|
285
|
+
let n = (o, s, c) => {
|
|
286
|
+
let i = {
|
|
287
|
+
relativePath: c === void 0 ? o.path || "" : c,
|
|
288
|
+
caseSensitive: o.caseSensitive === !0,
|
|
289
|
+
childrenIndex: s,
|
|
290
|
+
route: o
|
|
291
|
+
};
|
|
292
|
+
i.relativePath.startsWith("/") && (E(
|
|
293
|
+
i.relativePath.startsWith(a),
|
|
294
|
+
`Absolute route path "${i.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
295
|
+
), i.relativePath = i.relativePath.slice(a.length));
|
|
296
|
+
let u = k([a, i.relativePath]), h = r.concat(i);
|
|
297
|
+
o.children && o.children.length > 0 && (E(
|
|
298
|
+
// Our types know better, but runtime JS may not!
|
|
299
|
+
// @ts-expect-error
|
|
300
|
+
o.index !== !0,
|
|
301
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${u}".`
|
|
302
|
+
), se(o.children, t, h, u)), !(o.path == null && !o.index) && t.push({
|
|
303
|
+
path: u,
|
|
304
|
+
score: Oe(u, o.index),
|
|
305
|
+
routesMeta: h
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
return e.forEach((o, s) => {
|
|
309
|
+
var c;
|
|
310
|
+
if (o.path === "" || !((c = o.path) != null && c.includes("?")))
|
|
311
|
+
n(o, s);
|
|
312
|
+
else
|
|
313
|
+
for (let i of ce(o.path))
|
|
314
|
+
n(o, s, i);
|
|
315
|
+
}), t;
|
|
316
|
+
}
|
|
317
|
+
function ce(e) {
|
|
318
|
+
let t = e.split("/");
|
|
319
|
+
if (t.length === 0) return [];
|
|
320
|
+
let [r, ...a] = t, n = r.endsWith("?"), o = r.replace(/\?$/, "");
|
|
321
|
+
if (a.length === 0)
|
|
322
|
+
return n ? [o, ""] : [o];
|
|
323
|
+
let s = ce(a.join("/")), c = [];
|
|
324
|
+
return c.push(
|
|
325
|
+
...s.map(
|
|
326
|
+
(i) => i === "" ? o : [o, i].join("/")
|
|
327
|
+
)
|
|
328
|
+
), n && c.push(...s), c.map(
|
|
329
|
+
(i) => e.startsWith("/") && i === "" ? "/" : i
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
function Ie(e) {
|
|
333
|
+
e.sort(
|
|
334
|
+
(t, r) => t.score !== r.score ? r.score - t.score : Be(
|
|
335
|
+
t.routesMeta.map((a) => a.childrenIndex),
|
|
336
|
+
r.routesMeta.map((a) => a.childrenIndex)
|
|
337
|
+
)
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
var Fe = /^:[\w-]+$/, Te = 3, Me = 2, Ne = 1, De = 10, Ae = -2, oe = (e) => e === "*";
|
|
341
|
+
function Oe(e, t) {
|
|
342
|
+
let r = e.split("/"), a = r.length;
|
|
343
|
+
return r.some(oe) && (a += Ae), t && (a += Me), r.filter((n) => !oe(n)).reduce(
|
|
344
|
+
(n, o) => n + (Fe.test(o) ? Te : o === "" ? Ne : De),
|
|
345
|
+
a
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
function Be(e, t) {
|
|
349
|
+
return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
|
|
350
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
351
|
+
// first. This allows people to have fine-grained control over the matching
|
|
352
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
353
|
+
// want them tried.
|
|
354
|
+
e[e.length - 1] - t[t.length - 1]
|
|
355
|
+
) : (
|
|
356
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
357
|
+
// so they sort equally.
|
|
358
|
+
0
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
function Ue(e, t, r = !1) {
|
|
362
|
+
let { routesMeta: a } = e, n = {}, o = "/", s = [];
|
|
363
|
+
for (let c = 0; c < a.length; ++c) {
|
|
364
|
+
let i = a[c], u = c === a.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", y = J(
|
|
365
|
+
{ path: i.relativePath, caseSensitive: i.caseSensitive, end: u },
|
|
366
|
+
h
|
|
367
|
+
), m = i.route;
|
|
368
|
+
if (!y && u && r && !a[a.length - 1].route.index && (y = J(
|
|
369
|
+
{
|
|
370
|
+
path: i.relativePath,
|
|
371
|
+
caseSensitive: i.caseSensitive,
|
|
372
|
+
end: !1
|
|
373
|
+
},
|
|
374
|
+
h
|
|
375
|
+
)), !y)
|
|
376
|
+
return null;
|
|
377
|
+
Object.assign(n, y.params), s.push({
|
|
378
|
+
// TODO: Can this as be avoided?
|
|
379
|
+
params: n,
|
|
380
|
+
pathname: k([o, y.pathname]),
|
|
381
|
+
pathnameBase: je(
|
|
382
|
+
k([o, y.pathnameBase])
|
|
383
|
+
),
|
|
384
|
+
route: m
|
|
385
|
+
}), y.pathnameBase !== "/" && (o = k([o, y.pathnameBase]));
|
|
386
|
+
}
|
|
387
|
+
return s;
|
|
388
|
+
}
|
|
389
|
+
function J(e, t) {
|
|
390
|
+
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
391
|
+
let [r, a] = We(
|
|
392
|
+
e.path,
|
|
393
|
+
e.caseSensitive,
|
|
394
|
+
e.end
|
|
395
|
+
), n = t.match(r);
|
|
396
|
+
if (!n) return null;
|
|
397
|
+
let o = n[0], s = o.replace(/(.)\/+$/, "$1"), c = n.slice(1);
|
|
398
|
+
return {
|
|
399
|
+
params: a.reduce(
|
|
400
|
+
(u, { paramName: h, isOptional: y }, m) => {
|
|
401
|
+
if (h === "*") {
|
|
402
|
+
let f = c[m] || "";
|
|
403
|
+
s = o.slice(0, o.length - f.length).replace(/(.)\/+$/, "$1");
|
|
404
|
+
}
|
|
405
|
+
const d = c[m];
|
|
406
|
+
return y && !d ? u[h] = void 0 : u[h] = (d || "").replace(/%2F/g, "/"), u;
|
|
407
|
+
},
|
|
408
|
+
{}
|
|
409
|
+
),
|
|
410
|
+
pathname: o,
|
|
411
|
+
pathnameBase: s,
|
|
412
|
+
pattern: e
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function We(e, t = !1, r = !0) {
|
|
416
|
+
b(
|
|
417
|
+
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
418
|
+
`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(/\*$/, "/*")}".`
|
|
419
|
+
);
|
|
420
|
+
let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
421
|
+
/\/:([\w-]+)(\?)?/g,
|
|
422
|
+
(s, c, i) => (a.push({ paramName: c, isOptional: i != null }), i ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
423
|
+
);
|
|
424
|
+
return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
|
|
425
|
+
}
|
|
426
|
+
function He(e) {
|
|
427
|
+
try {
|
|
428
|
+
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
429
|
+
} catch (t) {
|
|
430
|
+
return b(
|
|
431
|
+
!1,
|
|
432
|
+
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
433
|
+
), e;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
function L(e, t) {
|
|
437
|
+
if (t === "/") return e;
|
|
438
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
439
|
+
return null;
|
|
440
|
+
let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
|
|
441
|
+
return a && a !== "/" ? null : e.slice(r) || "/";
|
|
442
|
+
}
|
|
443
|
+
function _e(e, t = "/") {
|
|
444
|
+
let {
|
|
445
|
+
pathname: r,
|
|
446
|
+
search: a = "",
|
|
447
|
+
hash: n = ""
|
|
448
|
+
} = typeof e == "string" ? M(e) : e;
|
|
449
|
+
return {
|
|
450
|
+
pathname: r ? r.startsWith("/") ? r : ze(r, t) : t,
|
|
451
|
+
search: Je(a),
|
|
452
|
+
hash: Ke(n)
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
function ze(e, t) {
|
|
456
|
+
let r = t.replace(/\/+$/, "").split("/");
|
|
457
|
+
return e.split("/").forEach((n) => {
|
|
458
|
+
n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
|
|
459
|
+
}), r.length > 1 ? r.join("/") : "/";
|
|
460
|
+
}
|
|
461
|
+
function q(e, t, r, a) {
|
|
462
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
463
|
+
a
|
|
464
|
+
)}]. 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.`;
|
|
465
|
+
}
|
|
466
|
+
function Ve(e) {
|
|
467
|
+
return e.filter(
|
|
468
|
+
(t, r) => r === 0 || t.route.path && t.route.path.length > 0
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
function fe(e) {
|
|
472
|
+
let t = Ve(e);
|
|
473
|
+
return t.map(
|
|
474
|
+
(r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
function de(e, t, r, a = !1) {
|
|
478
|
+
let n;
|
|
479
|
+
typeof e == "string" ? n = M(e) : (n = { ...e }, E(
|
|
480
|
+
!n.pathname || !n.pathname.includes("?"),
|
|
481
|
+
q("?", "pathname", "search", n)
|
|
482
|
+
), E(
|
|
483
|
+
!n.pathname || !n.pathname.includes("#"),
|
|
484
|
+
q("#", "pathname", "hash", n)
|
|
485
|
+
), E(
|
|
486
|
+
!n.search || !n.search.includes("#"),
|
|
487
|
+
q("#", "search", "hash", n)
|
|
488
|
+
));
|
|
489
|
+
let o = e === "" || n.pathname === "", s = o ? "/" : n.pathname, c;
|
|
490
|
+
if (s == null)
|
|
491
|
+
c = r;
|
|
492
|
+
else {
|
|
493
|
+
let y = t.length - 1;
|
|
494
|
+
if (!a && s.startsWith("..")) {
|
|
495
|
+
let m = s.split("/");
|
|
496
|
+
for (; m[0] === ".."; )
|
|
497
|
+
m.shift(), y -= 1;
|
|
498
|
+
n.pathname = m.join("/");
|
|
499
|
+
}
|
|
500
|
+
c = y >= 0 ? t[y] : "/";
|
|
501
|
+
}
|
|
502
|
+
let i = _e(n, c), u = s && s !== "/" && s.endsWith("/"), h = (o || s === ".") && r.endsWith("/");
|
|
503
|
+
return !i.pathname.endsWith("/") && (u || h) && (i.pathname += "/"), i;
|
|
504
|
+
}
|
|
505
|
+
var k = (e) => e.join("/").replace(/\/\/+/g, "/"), je = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Je = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ke = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
506
|
+
function Ye(e) {
|
|
507
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
508
|
+
}
|
|
509
|
+
var he = [
|
|
510
|
+
"POST",
|
|
511
|
+
"PUT",
|
|
512
|
+
"PATCH",
|
|
513
|
+
"DELETE"
|
|
514
|
+
];
|
|
515
|
+
new Set(
|
|
516
|
+
he
|
|
517
|
+
);
|
|
518
|
+
var qe = [
|
|
519
|
+
"GET",
|
|
520
|
+
...he
|
|
521
|
+
];
|
|
522
|
+
new Set(qe);
|
|
523
|
+
var A = l.createContext(null);
|
|
524
|
+
A.displayName = "DataRouter";
|
|
525
|
+
var K = l.createContext(null);
|
|
526
|
+
K.displayName = "DataRouterState";
|
|
527
|
+
var me = l.createContext({
|
|
528
|
+
isTransitioning: !1
|
|
529
|
+
});
|
|
530
|
+
me.displayName = "ViewTransition";
|
|
531
|
+
var Ge = l.createContext(
|
|
532
|
+
/* @__PURE__ */ new Map()
|
|
533
|
+
);
|
|
534
|
+
Ge.displayName = "Fetchers";
|
|
535
|
+
var Xe = l.createContext(null);
|
|
536
|
+
Xe.displayName = "Await";
|
|
537
|
+
var S = l.createContext(
|
|
538
|
+
null
|
|
539
|
+
);
|
|
540
|
+
S.displayName = "Navigation";
|
|
541
|
+
var U = l.createContext(
|
|
542
|
+
null
|
|
543
|
+
);
|
|
544
|
+
U.displayName = "Location";
|
|
545
|
+
var $ = l.createContext({
|
|
546
|
+
outlet: null,
|
|
547
|
+
matches: [],
|
|
548
|
+
isDataRoute: !1
|
|
549
|
+
});
|
|
550
|
+
$.displayName = "Route";
|
|
551
|
+
var Q = l.createContext(null);
|
|
552
|
+
Q.displayName = "RouteError";
|
|
553
|
+
function Qe(e, { relative: t } = {}) {
|
|
554
|
+
E(
|
|
555
|
+
W(),
|
|
556
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
557
|
+
// router loaded. We can help them understand how to avoid that.
|
|
558
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
559
|
+
);
|
|
560
|
+
let { basename: r, navigator: a } = l.useContext(S), { hash: n, pathname: o, search: s } = H(e, { relative: t }), c = o;
|
|
561
|
+
return r !== "/" && (c = o === "/" ? r : k([r, o])), a.createHref({ pathname: c, search: s, hash: n });
|
|
562
|
+
}
|
|
563
|
+
function W() {
|
|
564
|
+
return l.useContext(U) != null;
|
|
565
|
+
}
|
|
566
|
+
function N() {
|
|
567
|
+
return E(
|
|
568
|
+
W(),
|
|
569
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
570
|
+
// router loaded. We can help them understand how to avoid that.
|
|
571
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
572
|
+
), l.useContext(U).location;
|
|
573
|
+
}
|
|
574
|
+
var pe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
575
|
+
function ye(e) {
|
|
576
|
+
l.useContext(S).static || l.useLayoutEffect(e);
|
|
577
|
+
}
|
|
578
|
+
function Ze() {
|
|
579
|
+
let { isDataRoute: e } = l.useContext($);
|
|
580
|
+
return e ? dt() : et();
|
|
581
|
+
}
|
|
582
|
+
function et() {
|
|
583
|
+
E(
|
|
584
|
+
W(),
|
|
585
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
586
|
+
// router loaded. We can help them understand how to avoid that.
|
|
587
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
588
|
+
);
|
|
589
|
+
let e = l.useContext(A), { basename: t, navigator: r } = l.useContext(S), { matches: a } = l.useContext($), { pathname: n } = N(), o = JSON.stringify(fe(a)), s = l.useRef(!1);
|
|
590
|
+
return ye(() => {
|
|
591
|
+
s.current = !0;
|
|
592
|
+
}), l.useCallback(
|
|
593
|
+
(i, u = {}) => {
|
|
594
|
+
if (b(s.current, pe), !s.current) return;
|
|
595
|
+
if (typeof i == "number") {
|
|
596
|
+
r.go(i);
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
let h = de(
|
|
600
|
+
i,
|
|
601
|
+
JSON.parse(o),
|
|
602
|
+
n,
|
|
603
|
+
u.relative === "path"
|
|
604
|
+
);
|
|
605
|
+
e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : k([t, h.pathname])), (u.replace ? r.replace : r.push)(
|
|
606
|
+
h,
|
|
607
|
+
u.state,
|
|
608
|
+
u
|
|
609
|
+
);
|
|
610
|
+
},
|
|
611
|
+
[
|
|
612
|
+
t,
|
|
613
|
+
r,
|
|
614
|
+
o,
|
|
615
|
+
n,
|
|
616
|
+
e
|
|
617
|
+
]
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
l.createContext(null);
|
|
621
|
+
function H(e, { relative: t } = {}) {
|
|
622
|
+
let { matches: r } = l.useContext($), { pathname: a } = N(), n = JSON.stringify(fe(r));
|
|
623
|
+
return l.useMemo(
|
|
624
|
+
() => de(
|
|
625
|
+
e,
|
|
626
|
+
JSON.parse(n),
|
|
627
|
+
a,
|
|
628
|
+
t === "path"
|
|
629
|
+
),
|
|
630
|
+
[e, n, a, t]
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
function tt(e, t) {
|
|
634
|
+
return ge(e, t);
|
|
635
|
+
}
|
|
636
|
+
function ge(e, t, r, a) {
|
|
637
|
+
var w;
|
|
638
|
+
E(
|
|
639
|
+
W(),
|
|
640
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
641
|
+
// router loaded. We can help them understand how to avoid that.
|
|
642
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
643
|
+
);
|
|
644
|
+
let { navigator: n, static: o } = l.useContext(S), { matches: s } = l.useContext($), c = s[s.length - 1], i = c ? c.params : {}, u = c ? c.pathname : "/", h = c ? c.pathnameBase : "/", y = c && c.route;
|
|
645
|
+
{
|
|
646
|
+
let v = y && y.path || "";
|
|
647
|
+
ve(
|
|
648
|
+
u,
|
|
649
|
+
!y || v.endsWith("*") || v.endsWith("*?"),
|
|
650
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${v}">) 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.
|
|
651
|
+
|
|
652
|
+
Please change the parent <Route path="${v}"> to <Route path="${v === "/" ? "*" : `${v}/*`}">.`
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
let m = N(), d;
|
|
656
|
+
if (t) {
|
|
657
|
+
let v = typeof t == "string" ? M(t) : t;
|
|
658
|
+
E(
|
|
659
|
+
h === "/" || ((w = v.pathname) == null ? void 0 : w.startsWith(h)),
|
|
660
|
+
`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${v.pathname}" was given in the \`location\` prop.`
|
|
661
|
+
), d = v;
|
|
662
|
+
} else
|
|
663
|
+
d = m;
|
|
664
|
+
let f = d.pathname || "/", g = f;
|
|
665
|
+
if (h !== "/") {
|
|
666
|
+
let v = h.replace(/^\//, "").split("/");
|
|
667
|
+
g = "/" + f.replace(/^\//, "").split("/").slice(v.length).join("/");
|
|
668
|
+
}
|
|
669
|
+
let x = !o && r && r.matches && r.matches.length > 0 ? r.matches : ue(e, { pathname: g });
|
|
670
|
+
b(
|
|
671
|
+
y || x != null,
|
|
672
|
+
`No routes matched location "${d.pathname}${d.search}${d.hash}" `
|
|
673
|
+
), b(
|
|
674
|
+
x == null || x[x.length - 1].route.element !== void 0 || x[x.length - 1].route.Component !== void 0 || x[x.length - 1].route.lazy !== void 0,
|
|
675
|
+
`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.`
|
|
676
|
+
);
|
|
677
|
+
let p = it(
|
|
678
|
+
x && x.map(
|
|
679
|
+
(v) => Object.assign({}, v, {
|
|
680
|
+
params: Object.assign({}, i, v.params),
|
|
681
|
+
pathname: k([
|
|
682
|
+
h,
|
|
683
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
684
|
+
n.encodeLocation ? n.encodeLocation(v.pathname).pathname : v.pathname
|
|
685
|
+
]),
|
|
686
|
+
pathnameBase: v.pathnameBase === "/" ? h : k([
|
|
687
|
+
h,
|
|
688
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
689
|
+
n.encodeLocation ? n.encodeLocation(v.pathnameBase).pathname : v.pathnameBase
|
|
690
|
+
])
|
|
691
|
+
})
|
|
692
|
+
),
|
|
693
|
+
s,
|
|
694
|
+
r,
|
|
695
|
+
a
|
|
696
|
+
);
|
|
697
|
+
return t && p ? /* @__PURE__ */ l.createElement(
|
|
698
|
+
U.Provider,
|
|
699
|
+
{
|
|
700
|
+
value: {
|
|
701
|
+
location: {
|
|
702
|
+
pathname: "/",
|
|
703
|
+
search: "",
|
|
704
|
+
hash: "",
|
|
705
|
+
state: null,
|
|
706
|
+
key: "default",
|
|
707
|
+
...d
|
|
708
|
+
},
|
|
709
|
+
navigationType: "POP"
|
|
710
|
+
/* Pop */
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
p
|
|
714
|
+
) : p;
|
|
715
|
+
}
|
|
716
|
+
function rt() {
|
|
717
|
+
let e = ft(), t = Ye(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, s = null;
|
|
718
|
+
return console.error(
|
|
719
|
+
"Error handled by React Router default ErrorBoundary:",
|
|
720
|
+
e
|
|
721
|
+
), s = /* @__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: n }, r) : null, s);
|
|
722
|
+
}
|
|
723
|
+
var nt = /* @__PURE__ */ l.createElement(rt, null), at = class extends l.Component {
|
|
724
|
+
constructor(e) {
|
|
725
|
+
super(e), this.state = {
|
|
726
|
+
location: e.location,
|
|
727
|
+
revalidation: e.revalidation,
|
|
728
|
+
error: e.error
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
static getDerivedStateFromError(e) {
|
|
732
|
+
return { error: e };
|
|
733
|
+
}
|
|
734
|
+
static getDerivedStateFromProps(e, t) {
|
|
735
|
+
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
736
|
+
error: e.error,
|
|
737
|
+
location: e.location,
|
|
738
|
+
revalidation: e.revalidation
|
|
739
|
+
} : {
|
|
740
|
+
error: e.error !== void 0 ? e.error : t.error,
|
|
741
|
+
location: t.location,
|
|
742
|
+
revalidation: e.revalidation || t.revalidation
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
componentDidCatch(e, t) {
|
|
746
|
+
console.error(
|
|
747
|
+
"React Router caught the following error during render",
|
|
748
|
+
e,
|
|
749
|
+
t
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
render() {
|
|
753
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ l.createElement($.Provider, { value: this.props.routeContext }, /* @__PURE__ */ l.createElement(
|
|
754
|
+
Q.Provider,
|
|
755
|
+
{
|
|
756
|
+
value: this.state.error,
|
|
757
|
+
children: this.props.component
|
|
758
|
+
}
|
|
759
|
+
)) : this.props.children;
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
function ot({ routeContext: e, match: t, children: r }) {
|
|
763
|
+
let a = l.useContext(A);
|
|
764
|
+
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ l.createElement($.Provider, { value: e }, r);
|
|
765
|
+
}
|
|
766
|
+
function it(e, t = [], r = null, a = null) {
|
|
767
|
+
if (e == null) {
|
|
768
|
+
if (!r)
|
|
769
|
+
return null;
|
|
770
|
+
if (r.errors)
|
|
771
|
+
e = r.matches;
|
|
772
|
+
else if (t.length === 0 && !r.initialized && r.matches.length > 0)
|
|
773
|
+
e = r.matches;
|
|
774
|
+
else
|
|
775
|
+
return null;
|
|
776
|
+
}
|
|
777
|
+
let n = e, o = r == null ? void 0 : r.errors;
|
|
778
|
+
if (o != null) {
|
|
779
|
+
let i = n.findIndex(
|
|
780
|
+
(u) => u.route.id && (o == null ? void 0 : o[u.route.id]) !== void 0
|
|
781
|
+
);
|
|
782
|
+
E(
|
|
783
|
+
i >= 0,
|
|
784
|
+
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
785
|
+
o
|
|
786
|
+
).join(",")}`
|
|
787
|
+
), n = n.slice(
|
|
788
|
+
0,
|
|
789
|
+
Math.min(n.length, i + 1)
|
|
790
|
+
);
|
|
791
|
+
}
|
|
792
|
+
let s = !1, c = -1;
|
|
793
|
+
if (r)
|
|
794
|
+
for (let i = 0; i < n.length; i++) {
|
|
795
|
+
let u = n[i];
|
|
796
|
+
if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (c = i), u.route.id) {
|
|
797
|
+
let { loaderData: h, errors: y } = r, m = u.route.loader && !h.hasOwnProperty(u.route.id) && (!y || y[u.route.id] === void 0);
|
|
798
|
+
if (u.route.lazy || m) {
|
|
799
|
+
s = !0, c >= 0 ? n = n.slice(0, c + 1) : n = [n[0]];
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return n.reduceRight((i, u, h) => {
|
|
805
|
+
let y, m = !1, d = null, f = null;
|
|
806
|
+
r && (y = o && u.route.id ? o[u.route.id] : void 0, d = u.route.errorElement || nt, s && (c < 0 && h === 0 ? (ve(
|
|
807
|
+
"route-fallback",
|
|
808
|
+
!1,
|
|
809
|
+
"No `HydrateFallback` element provided to render during initial hydration"
|
|
810
|
+
), m = !0, f = null) : c === h && (m = !0, f = u.route.hydrateFallbackElement || null)));
|
|
811
|
+
let g = t.concat(n.slice(0, h + 1)), x = () => {
|
|
812
|
+
let p;
|
|
813
|
+
return y ? p = d : m ? p = f : u.route.Component ? p = /* @__PURE__ */ l.createElement(u.route.Component, null) : u.route.element ? p = u.route.element : p = i, /* @__PURE__ */ l.createElement(
|
|
814
|
+
ot,
|
|
815
|
+
{
|
|
816
|
+
match: u,
|
|
817
|
+
routeContext: {
|
|
818
|
+
outlet: i,
|
|
819
|
+
matches: g,
|
|
820
|
+
isDataRoute: r != null
|
|
821
|
+
},
|
|
822
|
+
children: p
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
};
|
|
826
|
+
return r && (u.route.ErrorBoundary || u.route.errorElement || h === 0) ? /* @__PURE__ */ l.createElement(
|
|
827
|
+
at,
|
|
828
|
+
{
|
|
829
|
+
location: r.location,
|
|
830
|
+
revalidation: r.revalidation,
|
|
831
|
+
component: d,
|
|
832
|
+
error: y,
|
|
833
|
+
children: x(),
|
|
834
|
+
routeContext: { outlet: null, matches: g, isDataRoute: !0 }
|
|
835
|
+
}
|
|
836
|
+
) : x();
|
|
837
|
+
}, null);
|
|
838
|
+
}
|
|
839
|
+
function Z(e) {
|
|
840
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
841
|
+
}
|
|
842
|
+
function lt(e) {
|
|
843
|
+
let t = l.useContext(A);
|
|
844
|
+
return E(t, Z(e)), t;
|
|
845
|
+
}
|
|
846
|
+
function ut(e) {
|
|
847
|
+
let t = l.useContext(K);
|
|
848
|
+
return E(t, Z(e)), t;
|
|
849
|
+
}
|
|
850
|
+
function st(e) {
|
|
851
|
+
let t = l.useContext($);
|
|
852
|
+
return E(t, Z(e)), t;
|
|
853
|
+
}
|
|
854
|
+
function ee(e) {
|
|
855
|
+
let t = st(e), r = t.matches[t.matches.length - 1];
|
|
856
|
+
return E(
|
|
857
|
+
r.route.id,
|
|
858
|
+
`${e} can only be used on routes that contain a unique "id"`
|
|
859
|
+
), r.route.id;
|
|
860
|
+
}
|
|
861
|
+
function ct() {
|
|
862
|
+
return ee(
|
|
863
|
+
"useRouteId"
|
|
864
|
+
/* UseRouteId */
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
function ft() {
|
|
868
|
+
var a;
|
|
869
|
+
let e = l.useContext(Q), t = ut(
|
|
870
|
+
"useRouteError"
|
|
871
|
+
/* UseRouteError */
|
|
872
|
+
), r = ee(
|
|
873
|
+
"useRouteError"
|
|
874
|
+
/* UseRouteError */
|
|
875
|
+
);
|
|
876
|
+
return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[r];
|
|
877
|
+
}
|
|
878
|
+
function dt() {
|
|
879
|
+
let { router: e } = lt(
|
|
880
|
+
"useNavigate"
|
|
881
|
+
/* UseNavigateStable */
|
|
882
|
+
), t = ee(
|
|
883
|
+
"useNavigate"
|
|
884
|
+
/* UseNavigateStable */
|
|
885
|
+
), r = l.useRef(!1);
|
|
886
|
+
return ye(() => {
|
|
887
|
+
r.current = !0;
|
|
888
|
+
}), l.useCallback(
|
|
889
|
+
async (n, o = {}) => {
|
|
890
|
+
b(r.current, pe), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...o }));
|
|
891
|
+
},
|
|
892
|
+
[e, t]
|
|
893
|
+
);
|
|
894
|
+
}
|
|
895
|
+
var ie = {};
|
|
896
|
+
function ve(e, t, r) {
|
|
897
|
+
!t && !ie[e] && (ie[e] = !0, b(!1, r));
|
|
898
|
+
}
|
|
899
|
+
l.memo(ht);
|
|
900
|
+
function ht({
|
|
901
|
+
routes: e,
|
|
902
|
+
future: t,
|
|
903
|
+
state: r
|
|
904
|
+
}) {
|
|
905
|
+
return ge(e, void 0, r, t);
|
|
906
|
+
}
|
|
907
|
+
function Kt({
|
|
908
|
+
basename: e,
|
|
909
|
+
children: t,
|
|
910
|
+
initialEntries: r,
|
|
911
|
+
initialIndex: a
|
|
912
|
+
}) {
|
|
913
|
+
let n = l.useRef();
|
|
914
|
+
n.current == null && (n.current = Se({
|
|
915
|
+
initialEntries: r,
|
|
916
|
+
initialIndex: a,
|
|
917
|
+
v5Compat: !0
|
|
918
|
+
}));
|
|
919
|
+
let o = n.current, [s, c] = l.useState({
|
|
920
|
+
action: o.action,
|
|
921
|
+
location: o.location
|
|
922
|
+
}), i = l.useCallback(
|
|
923
|
+
(u) => {
|
|
924
|
+
l.startTransition(() => c(u));
|
|
925
|
+
},
|
|
926
|
+
[c]
|
|
927
|
+
);
|
|
928
|
+
return l.useLayoutEffect(() => o.listen(i), [o, i]), /* @__PURE__ */ l.createElement(
|
|
929
|
+
pt,
|
|
930
|
+
{
|
|
931
|
+
basename: e,
|
|
932
|
+
children: t,
|
|
933
|
+
location: s.location,
|
|
934
|
+
navigationType: s.action,
|
|
935
|
+
navigator: o
|
|
936
|
+
}
|
|
937
|
+
);
|
|
938
|
+
}
|
|
939
|
+
function mt(e) {
|
|
940
|
+
E(
|
|
941
|
+
!1,
|
|
942
|
+
"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
function pt({
|
|
946
|
+
basename: e = "/",
|
|
947
|
+
children: t = null,
|
|
948
|
+
location: r,
|
|
949
|
+
navigationType: a = "POP",
|
|
950
|
+
navigator: n,
|
|
951
|
+
static: o = !1
|
|
952
|
+
}) {
|
|
953
|
+
E(
|
|
954
|
+
!W(),
|
|
955
|
+
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
956
|
+
);
|
|
957
|
+
let s = e.replace(/^\/*/, "/"), c = l.useMemo(
|
|
958
|
+
() => ({
|
|
959
|
+
basename: s,
|
|
960
|
+
navigator: n,
|
|
961
|
+
static: o,
|
|
962
|
+
future: {}
|
|
963
|
+
}),
|
|
964
|
+
[s, n, o]
|
|
965
|
+
);
|
|
966
|
+
typeof r == "string" && (r = M(r));
|
|
967
|
+
let {
|
|
968
|
+
pathname: i = "/",
|
|
969
|
+
search: u = "",
|
|
970
|
+
hash: h = "",
|
|
971
|
+
state: y = null,
|
|
972
|
+
key: m = "default"
|
|
973
|
+
} = r, d = l.useMemo(() => {
|
|
974
|
+
let f = L(i, s);
|
|
975
|
+
return f == null ? null : {
|
|
976
|
+
location: {
|
|
977
|
+
pathname: f,
|
|
978
|
+
search: u,
|
|
979
|
+
hash: h,
|
|
980
|
+
state: y,
|
|
981
|
+
key: m
|
|
982
|
+
},
|
|
983
|
+
navigationType: a
|
|
984
|
+
};
|
|
985
|
+
}, [s, i, u, h, y, m, a]);
|
|
986
|
+
return b(
|
|
987
|
+
d != null,
|
|
988
|
+
`<Router basename="${s}"> is not able to match the URL "${i}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
989
|
+
), d == null ? null : /* @__PURE__ */ l.createElement(S.Provider, { value: c }, /* @__PURE__ */ l.createElement(U.Provider, { children: t, value: d }));
|
|
990
|
+
}
|
|
991
|
+
function Yt({
|
|
992
|
+
children: e,
|
|
993
|
+
location: t
|
|
994
|
+
}) {
|
|
995
|
+
return tt(X(e), t);
|
|
996
|
+
}
|
|
997
|
+
function X(e, t = []) {
|
|
998
|
+
let r = [];
|
|
999
|
+
return l.Children.forEach(e, (a, n) => {
|
|
1000
|
+
if (!l.isValidElement(a))
|
|
1001
|
+
return;
|
|
1002
|
+
let o = [...t, n];
|
|
1003
|
+
if (a.type === l.Fragment) {
|
|
1004
|
+
r.push.apply(
|
|
1005
|
+
r,
|
|
1006
|
+
X(a.props.children, o)
|
|
1007
|
+
);
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
E(
|
|
1011
|
+
a.type === mt,
|
|
1012
|
+
`[${typeof a.type == "string" ? a.type : a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`
|
|
1013
|
+
), E(
|
|
1014
|
+
!a.props.index || !a.props.children,
|
|
1015
|
+
"An index route cannot have child routes."
|
|
1016
|
+
);
|
|
1017
|
+
let s = {
|
|
1018
|
+
id: a.props.id || o.join("-"),
|
|
1019
|
+
caseSensitive: a.props.caseSensitive,
|
|
1020
|
+
element: a.props.element,
|
|
1021
|
+
Component: a.props.Component,
|
|
1022
|
+
index: a.props.index,
|
|
1023
|
+
path: a.props.path,
|
|
1024
|
+
loader: a.props.loader,
|
|
1025
|
+
action: a.props.action,
|
|
1026
|
+
hydrateFallbackElement: a.props.hydrateFallbackElement,
|
|
1027
|
+
HydrateFallback: a.props.HydrateFallback,
|
|
1028
|
+
errorElement: a.props.errorElement,
|
|
1029
|
+
ErrorBoundary: a.props.ErrorBoundary,
|
|
1030
|
+
hasErrorBoundary: a.props.hasErrorBoundary === !0 || a.props.ErrorBoundary != null || a.props.errorElement != null,
|
|
1031
|
+
shouldRevalidate: a.props.shouldRevalidate,
|
|
1032
|
+
handle: a.props.handle,
|
|
1033
|
+
lazy: a.props.lazy
|
|
1034
|
+
};
|
|
1035
|
+
a.props.children && (s.children = X(
|
|
1036
|
+
a.props.children,
|
|
1037
|
+
o
|
|
1038
|
+
)), r.push(s);
|
|
1039
|
+
}), r;
|
|
1040
|
+
}
|
|
1041
|
+
var z = "get", V = "application/x-www-form-urlencoded";
|
|
1042
|
+
function Y(e) {
|
|
1043
|
+
return e != null && typeof e.tagName == "string";
|
|
1044
|
+
}
|
|
1045
|
+
function yt(e) {
|
|
1046
|
+
return Y(e) && e.tagName.toLowerCase() === "button";
|
|
1047
|
+
}
|
|
1048
|
+
function gt(e) {
|
|
1049
|
+
return Y(e) && e.tagName.toLowerCase() === "form";
|
|
1050
|
+
}
|
|
1051
|
+
function vt(e) {
|
|
1052
|
+
return Y(e) && e.tagName.toLowerCase() === "input";
|
|
1053
|
+
}
|
|
1054
|
+
function xt(e) {
|
|
1055
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1056
|
+
}
|
|
1057
|
+
function wt(e, t) {
|
|
1058
|
+
return e.button === 0 && // Ignore everything but left clicks
|
|
1059
|
+
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1060
|
+
!xt(e);
|
|
1061
|
+
}
|
|
1062
|
+
var _ = null;
|
|
1063
|
+
function Et() {
|
|
1064
|
+
if (_ === null)
|
|
1065
|
+
try {
|
|
1066
|
+
new FormData(
|
|
1067
|
+
document.createElement("form"),
|
|
1068
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1069
|
+
0
|
|
1070
|
+
), _ = !1;
|
|
1071
|
+
} catch {
|
|
1072
|
+
_ = !0;
|
|
1073
|
+
}
|
|
1074
|
+
return _;
|
|
1075
|
+
}
|
|
1076
|
+
var Rt = /* @__PURE__ */ new Set([
|
|
1077
|
+
"application/x-www-form-urlencoded",
|
|
1078
|
+
"multipart/form-data",
|
|
1079
|
+
"text/plain"
|
|
1080
|
+
]);
|
|
1081
|
+
function G(e) {
|
|
1082
|
+
return e != null && !Rt.has(e) ? (b(
|
|
1083
|
+
!1,
|
|
1084
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`
|
|
1085
|
+
), null) : e;
|
|
1086
|
+
}
|
|
1087
|
+
function Ct(e, t) {
|
|
1088
|
+
let r, a, n, o, s;
|
|
1089
|
+
if (gt(e)) {
|
|
1090
|
+
let c = e.getAttribute("action");
|
|
1091
|
+
a = c ? L(c, t) : null, r = e.getAttribute("method") || z, n = G(e.getAttribute("enctype")) || V, o = new FormData(e);
|
|
1092
|
+
} else if (yt(e) || vt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1093
|
+
let c = e.form;
|
|
1094
|
+
if (c == null)
|
|
1095
|
+
throw new Error(
|
|
1096
|
+
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1097
|
+
);
|
|
1098
|
+
let i = e.getAttribute("formaction") || c.getAttribute("action");
|
|
1099
|
+
if (a = i ? L(i, t) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || z, n = G(e.getAttribute("formenctype")) || G(c.getAttribute("enctype")) || V, o = new FormData(c, e), !Et()) {
|
|
1100
|
+
let { name: u, type: h, value: y } = e;
|
|
1101
|
+
if (h === "image") {
|
|
1102
|
+
let m = u ? `${u}.` : "";
|
|
1103
|
+
o.append(`${m}x`, "0"), o.append(`${m}y`, "0");
|
|
1104
|
+
} else u && o.append(u, y);
|
|
1105
|
+
}
|
|
1106
|
+
} else {
|
|
1107
|
+
if (Y(e))
|
|
1108
|
+
throw new Error(
|
|
1109
|
+
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1110
|
+
);
|
|
1111
|
+
r = z, a = null, n = V, s = e;
|
|
1112
|
+
}
|
|
1113
|
+
return o && n === "text/plain" && (s = o, o = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: o, body: s };
|
|
1114
|
+
}
|
|
1115
|
+
function te(e, t) {
|
|
1116
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
1117
|
+
throw new Error(t);
|
|
1118
|
+
}
|
|
1119
|
+
async function bt(e, t) {
|
|
1120
|
+
if (e.id in t)
|
|
1121
|
+
return t[e.id];
|
|
1122
|
+
try {
|
|
1123
|
+
let r = await import(
|
|
1124
|
+
/* @vite-ignore */
|
|
1125
|
+
/* webpackIgnore: true */
|
|
1126
|
+
e.module
|
|
1127
|
+
);
|
|
1128
|
+
return t[e.id] = r, r;
|
|
1129
|
+
} catch (r) {
|
|
1130
|
+
return console.error(
|
|
1131
|
+
`Error loading route module \`${e.module}\`, reloading page...`
|
|
1132
|
+
), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
function Pt(e) {
|
|
1137
|
+
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";
|
|
1138
|
+
}
|
|
1139
|
+
async function St(e, t, r) {
|
|
1140
|
+
let a = await Promise.all(
|
|
1141
|
+
e.map(async (n) => {
|
|
1142
|
+
let o = t.routes[n.route.id];
|
|
1143
|
+
if (o) {
|
|
1144
|
+
let s = await bt(o, r);
|
|
1145
|
+
return s.links ? s.links() : [];
|
|
1146
|
+
}
|
|
1147
|
+
return [];
|
|
1148
|
+
})
|
|
1149
|
+
);
|
|
1150
|
+
return It(
|
|
1151
|
+
a.flat(1).filter(Pt).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
|
|
1152
|
+
(n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
|
|
1153
|
+
)
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
function le(e, t, r, a, n, o) {
|
|
1157
|
+
let s = (i, u) => r[u] ? i.route.id !== r[u].route.id : !0, c = (i, u) => {
|
|
1158
|
+
var h;
|
|
1159
|
+
return (
|
|
1160
|
+
// param change, /users/123 -> /users/456
|
|
1161
|
+
r[u].pathname !== i.pathname || // splat param changed, which is not present in match.path
|
|
1162
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1163
|
+
((h = r[u].route.path) == null ? void 0 : h.endsWith("*")) && r[u].params["*"] !== i.params["*"]
|
|
1164
|
+
);
|
|
1165
|
+
};
|
|
1166
|
+
return o === "assets" ? t.filter(
|
|
1167
|
+
(i, u) => s(i, u) || c(i, u)
|
|
1168
|
+
) : o === "data" ? t.filter((i, u) => {
|
|
1169
|
+
var y;
|
|
1170
|
+
let h = a.routes[i.route.id];
|
|
1171
|
+
if (!h || !h.hasLoader)
|
|
1172
|
+
return !1;
|
|
1173
|
+
if (s(i, u) || c(i, u))
|
|
1174
|
+
return !0;
|
|
1175
|
+
if (i.route.shouldRevalidate) {
|
|
1176
|
+
let m = i.route.shouldRevalidate({
|
|
1177
|
+
currentUrl: new URL(
|
|
1178
|
+
n.pathname + n.search + n.hash,
|
|
1179
|
+
window.origin
|
|
1180
|
+
),
|
|
1181
|
+
currentParams: ((y = r[0]) == null ? void 0 : y.params) || {},
|
|
1182
|
+
nextUrl: new URL(e, window.origin),
|
|
1183
|
+
nextParams: i.params,
|
|
1184
|
+
defaultShouldRevalidate: !0
|
|
1185
|
+
});
|
|
1186
|
+
if (typeof m == "boolean")
|
|
1187
|
+
return m;
|
|
1188
|
+
}
|
|
1189
|
+
return !0;
|
|
1190
|
+
}) : [];
|
|
1191
|
+
}
|
|
1192
|
+
function kt(e, t, { includeHydrateFallback: r } = {}) {
|
|
1193
|
+
return Lt(
|
|
1194
|
+
e.map((a) => {
|
|
1195
|
+
let n = t.routes[a.route.id];
|
|
1196
|
+
if (!n) return [];
|
|
1197
|
+
let o = [n.module];
|
|
1198
|
+
return n.clientActionModule && (o = o.concat(n.clientActionModule)), n.clientLoaderModule && (o = o.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (o = o.concat(n.hydrateFallbackModule)), n.imports && (o = o.concat(n.imports)), o;
|
|
1199
|
+
}).flat(1)
|
|
1200
|
+
);
|
|
1201
|
+
}
|
|
1202
|
+
function Lt(e) {
|
|
1203
|
+
return [...new Set(e)];
|
|
1204
|
+
}
|
|
1205
|
+
function $t(e) {
|
|
1206
|
+
let t = {}, r = Object.keys(e).sort();
|
|
1207
|
+
for (let a of r)
|
|
1208
|
+
t[a] = e[a];
|
|
1209
|
+
return t;
|
|
1210
|
+
}
|
|
1211
|
+
function It(e, t) {
|
|
1212
|
+
let r = /* @__PURE__ */ new Set();
|
|
1213
|
+
return new Set(t), e.reduce((a, n) => {
|
|
1214
|
+
let o = JSON.stringify($t(n));
|
|
1215
|
+
return r.has(o) || (r.add(o), a.push({ key: o, link: n })), a;
|
|
1216
|
+
}, []);
|
|
1217
|
+
}
|
|
1218
|
+
function Ft(e, t) {
|
|
1219
|
+
let r = typeof e == "string" ? new URL(
|
|
1220
|
+
e,
|
|
1221
|
+
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1222
|
+
// don't assume window is available
|
|
1223
|
+
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1224
|
+
) : e;
|
|
1225
|
+
return r.pathname === "/" ? r.pathname = "_root.data" : t && L(r.pathname, t) === "/" ? r.pathname = `${t.replace(/\/$/, "")}/_root.data` : r.pathname = `${r.pathname.replace(/\/$/, "")}.data`, r;
|
|
1226
|
+
}
|
|
1227
|
+
function xe() {
|
|
1228
|
+
let e = l.useContext(A);
|
|
1229
|
+
return te(
|
|
1230
|
+
e,
|
|
1231
|
+
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1232
|
+
), e;
|
|
1233
|
+
}
|
|
1234
|
+
function Tt() {
|
|
1235
|
+
let e = l.useContext(K);
|
|
1236
|
+
return te(
|
|
1237
|
+
e,
|
|
1238
|
+
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1239
|
+
), e;
|
|
1240
|
+
}
|
|
1241
|
+
var re = l.createContext(void 0);
|
|
1242
|
+
re.displayName = "FrameworkContext";
|
|
1243
|
+
function we() {
|
|
1244
|
+
let e = l.useContext(re);
|
|
1245
|
+
return te(
|
|
1246
|
+
e,
|
|
1247
|
+
"You must render this element inside a <HydratedRouter> element"
|
|
1248
|
+
), e;
|
|
1249
|
+
}
|
|
1250
|
+
function Mt(e, t) {
|
|
1251
|
+
let r = l.useContext(re), [a, n] = l.useState(!1), [o, s] = l.useState(!1), { onFocus: c, onBlur: i, onMouseEnter: u, onMouseLeave: h, onTouchStart: y } = t, m = l.useRef(null);
|
|
1252
|
+
l.useEffect(() => {
|
|
1253
|
+
if (e === "render" && s(!0), e === "viewport") {
|
|
1254
|
+
let g = (p) => {
|
|
1255
|
+
p.forEach((w) => {
|
|
1256
|
+
s(w.isIntersecting);
|
|
1257
|
+
});
|
|
1258
|
+
}, x = new IntersectionObserver(g, { threshold: 0.5 });
|
|
1259
|
+
return m.current && x.observe(m.current), () => {
|
|
1260
|
+
x.disconnect();
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
}, [e]), l.useEffect(() => {
|
|
1264
|
+
if (a) {
|
|
1265
|
+
let g = setTimeout(() => {
|
|
1266
|
+
s(!0);
|
|
1267
|
+
}, 100);
|
|
1268
|
+
return () => {
|
|
1269
|
+
clearTimeout(g);
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
}, [a]);
|
|
1273
|
+
let d = () => {
|
|
1274
|
+
n(!0);
|
|
1275
|
+
}, f = () => {
|
|
1276
|
+
n(!1), s(!1);
|
|
1277
|
+
};
|
|
1278
|
+
return r ? e !== "intent" ? [o, m, {}] : [
|
|
1279
|
+
o,
|
|
1280
|
+
m,
|
|
1281
|
+
{
|
|
1282
|
+
onFocus: B(c, d),
|
|
1283
|
+
onBlur: B(i, f),
|
|
1284
|
+
onMouseEnter: B(u, d),
|
|
1285
|
+
onMouseLeave: B(h, f),
|
|
1286
|
+
onTouchStart: B(y, d)
|
|
1287
|
+
}
|
|
1288
|
+
] : [!1, m, {}];
|
|
1289
|
+
}
|
|
1290
|
+
function B(e, t) {
|
|
1291
|
+
return (r) => {
|
|
1292
|
+
e && e(r), r.defaultPrevented || t(r);
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
function Nt({
|
|
1296
|
+
page: e,
|
|
1297
|
+
...t
|
|
1298
|
+
}) {
|
|
1299
|
+
let { router: r } = xe(), a = l.useMemo(
|
|
1300
|
+
() => ue(r.routes, e, r.basename),
|
|
1301
|
+
[r.routes, e, r.basename]
|
|
1302
|
+
);
|
|
1303
|
+
return a ? /* @__PURE__ */ l.createElement(At, { page: e, matches: a, ...t }) : null;
|
|
1304
|
+
}
|
|
1305
|
+
function Dt(e) {
|
|
1306
|
+
let { manifest: t, routeModules: r } = we(), [a, n] = l.useState([]);
|
|
1307
|
+
return l.useEffect(() => {
|
|
1308
|
+
let o = !1;
|
|
1309
|
+
return St(e, t, r).then(
|
|
1310
|
+
(s) => {
|
|
1311
|
+
o || n(s);
|
|
1312
|
+
}
|
|
1313
|
+
), () => {
|
|
1314
|
+
o = !0;
|
|
1315
|
+
};
|
|
1316
|
+
}, [e, t, r]), a;
|
|
1317
|
+
}
|
|
1318
|
+
function At({
|
|
1319
|
+
page: e,
|
|
1320
|
+
matches: t,
|
|
1321
|
+
...r
|
|
1322
|
+
}) {
|
|
1323
|
+
let a = N(), { manifest: n, routeModules: o } = we(), { basename: s } = xe(), { loaderData: c, matches: i } = Tt(), u = l.useMemo(
|
|
1324
|
+
() => le(
|
|
1325
|
+
e,
|
|
1326
|
+
t,
|
|
1327
|
+
i,
|
|
1328
|
+
n,
|
|
1329
|
+
a,
|
|
1330
|
+
"data"
|
|
1331
|
+
),
|
|
1332
|
+
[e, t, i, n, a]
|
|
1333
|
+
), h = l.useMemo(
|
|
1334
|
+
() => le(
|
|
1335
|
+
e,
|
|
1336
|
+
t,
|
|
1337
|
+
i,
|
|
1338
|
+
n,
|
|
1339
|
+
a,
|
|
1340
|
+
"assets"
|
|
1341
|
+
),
|
|
1342
|
+
[e, t, i, n, a]
|
|
1343
|
+
), y = l.useMemo(() => {
|
|
1344
|
+
if (e === a.pathname + a.search + a.hash)
|
|
1345
|
+
return [];
|
|
1346
|
+
let f = /* @__PURE__ */ new Set(), g = !1;
|
|
1347
|
+
if (t.forEach((p) => {
|
|
1348
|
+
var v;
|
|
1349
|
+
let w = n.routes[p.route.id];
|
|
1350
|
+
!w || !w.hasLoader || (!u.some((R) => R.route.id === p.route.id) && p.route.id in c && ((v = o[p.route.id]) != null && v.shouldRevalidate) || w.hasClientLoader ? g = !0 : f.add(p.route.id));
|
|
1351
|
+
}), f.size === 0)
|
|
1352
|
+
return [];
|
|
1353
|
+
let x = Ft(e, s);
|
|
1354
|
+
return g && f.size > 0 && x.searchParams.set(
|
|
1355
|
+
"_routes",
|
|
1356
|
+
t.filter((p) => f.has(p.route.id)).map((p) => p.route.id).join(",")
|
|
1357
|
+
), [x.pathname + x.search];
|
|
1358
|
+
}, [
|
|
1359
|
+
s,
|
|
1360
|
+
c,
|
|
1361
|
+
a,
|
|
1362
|
+
n,
|
|
1363
|
+
u,
|
|
1364
|
+
t,
|
|
1365
|
+
e,
|
|
1366
|
+
o
|
|
1367
|
+
]), m = l.useMemo(
|
|
1368
|
+
() => kt(h, n),
|
|
1369
|
+
[h, n]
|
|
1370
|
+
), d = Dt(h);
|
|
1371
|
+
return /* @__PURE__ */ l.createElement(l.Fragment, null, y.map((f) => /* @__PURE__ */ l.createElement("link", { key: f, rel: "prefetch", as: "fetch", href: f, ...r })), m.map((f) => /* @__PURE__ */ l.createElement("link", { key: f, rel: "modulepreload", href: f, ...r })), d.map(({ key: f, link: g }) => (
|
|
1372
|
+
// these don't spread `linkProps` because they are full link descriptors
|
|
1373
|
+
// already with their own props
|
|
1374
|
+
/* @__PURE__ */ l.createElement("link", { key: f, ...g })
|
|
1375
|
+
)));
|
|
1376
|
+
}
|
|
1377
|
+
function Ot(...e) {
|
|
1378
|
+
return (t) => {
|
|
1379
|
+
e.forEach((r) => {
|
|
1380
|
+
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1381
|
+
});
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
var Ee = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1385
|
+
try {
|
|
1386
|
+
Ee && (window.__reactRouterVersion = "7.5.0");
|
|
1387
|
+
} catch {
|
|
1388
|
+
}
|
|
1389
|
+
var Re = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ce = l.forwardRef(
|
|
1390
|
+
function({
|
|
1391
|
+
onClick: t,
|
|
1392
|
+
discover: r = "render",
|
|
1393
|
+
prefetch: a = "none",
|
|
1394
|
+
relative: n,
|
|
1395
|
+
reloadDocument: o,
|
|
1396
|
+
replace: s,
|
|
1397
|
+
state: c,
|
|
1398
|
+
target: i,
|
|
1399
|
+
to: u,
|
|
1400
|
+
preventScrollReset: h,
|
|
1401
|
+
viewTransition: y,
|
|
1402
|
+
...m
|
|
1403
|
+
}, d) {
|
|
1404
|
+
let { basename: f } = l.useContext(S), g = typeof u == "string" && Re.test(u), x, p = !1;
|
|
1405
|
+
if (typeof u == "string" && g && (x = u, Ee))
|
|
1406
|
+
try {
|
|
1407
|
+
let C = new URL(window.location.href), F = u.startsWith("//") ? new URL(C.protocol + u) : new URL(u), ne = L(F.pathname, f);
|
|
1408
|
+
F.origin === C.origin && ne != null ? u = ne + F.search + F.hash : p = !0;
|
|
1409
|
+
} catch {
|
|
1410
|
+
b(
|
|
1411
|
+
!1,
|
|
1412
|
+
`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
let w = Qe(u, { relative: n }), [v, R, P] = Mt(
|
|
1416
|
+
a,
|
|
1417
|
+
m
|
|
1418
|
+
), D = Ht(u, {
|
|
1419
|
+
replace: s,
|
|
1420
|
+
state: c,
|
|
1421
|
+
target: i,
|
|
1422
|
+
preventScrollReset: h,
|
|
1423
|
+
relative: n,
|
|
1424
|
+
viewTransition: y
|
|
1425
|
+
});
|
|
1426
|
+
function I(C) {
|
|
1427
|
+
t && t(C), C.defaultPrevented || D(C);
|
|
1428
|
+
}
|
|
1429
|
+
let T = (
|
|
1430
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1431
|
+
/* @__PURE__ */ l.createElement(
|
|
1432
|
+
"a",
|
|
1433
|
+
{
|
|
1434
|
+
...m,
|
|
1435
|
+
...P,
|
|
1436
|
+
href: x || w,
|
|
1437
|
+
onClick: p || o ? t : I,
|
|
1438
|
+
ref: Ot(d, R),
|
|
1439
|
+
target: i,
|
|
1440
|
+
"data-discover": !g && r === "render" ? "true" : void 0
|
|
1441
|
+
}
|
|
1442
|
+
)
|
|
1443
|
+
);
|
|
1444
|
+
return v && !g ? /* @__PURE__ */ l.createElement(l.Fragment, null, T, /* @__PURE__ */ l.createElement(Nt, { page: w })) : T;
|
|
1445
|
+
}
|
|
1446
|
+
);
|
|
1447
|
+
Ce.displayName = "Link";
|
|
1448
|
+
var Bt = l.forwardRef(
|
|
1449
|
+
function({
|
|
1450
|
+
"aria-current": t = "page",
|
|
1451
|
+
caseSensitive: r = !1,
|
|
1452
|
+
className: a = "",
|
|
1453
|
+
end: n = !1,
|
|
1454
|
+
style: o,
|
|
1455
|
+
to: s,
|
|
1456
|
+
viewTransition: c,
|
|
1457
|
+
children: i,
|
|
1458
|
+
...u
|
|
1459
|
+
}, h) {
|
|
1460
|
+
let y = H(s, { relative: u.relative }), m = N(), d = l.useContext(K), { navigator: f, basename: g } = l.useContext(S), x = d != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1461
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1462
|
+
Jt(y) && c === !0, p = f.encodeLocation ? f.encodeLocation(y).pathname : y.pathname, w = m.pathname, v = d && d.navigation && d.navigation.location ? d.navigation.location.pathname : null;
|
|
1463
|
+
r || (w = w.toLowerCase(), v = v ? v.toLowerCase() : null, p = p.toLowerCase()), v && g && (v = L(v, g) || v);
|
|
1464
|
+
const R = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
|
|
1465
|
+
let P = w === p || !n && w.startsWith(p) && w.charAt(R) === "/", D = v != null && (v === p || !n && v.startsWith(p) && v.charAt(p.length) === "/"), I = {
|
|
1466
|
+
isActive: P,
|
|
1467
|
+
isPending: D,
|
|
1468
|
+
isTransitioning: x
|
|
1469
|
+
}, T = P ? t : void 0, C;
|
|
1470
|
+
typeof a == "function" ? C = a(I) : C = [
|
|
1471
|
+
a,
|
|
1472
|
+
P ? "active" : null,
|
|
1473
|
+
D ? "pending" : null,
|
|
1474
|
+
x ? "transitioning" : null
|
|
1475
|
+
].filter(Boolean).join(" ");
|
|
1476
|
+
let F = typeof o == "function" ? o(I) : o;
|
|
1477
|
+
return /* @__PURE__ */ l.createElement(
|
|
1478
|
+
Ce,
|
|
1479
|
+
{
|
|
1480
|
+
...u,
|
|
1481
|
+
"aria-current": T,
|
|
1482
|
+
className: C,
|
|
1483
|
+
ref: h,
|
|
1484
|
+
style: F,
|
|
1485
|
+
to: s,
|
|
1486
|
+
viewTransition: c
|
|
1487
|
+
},
|
|
1488
|
+
typeof i == "function" ? i(I) : i
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
Bt.displayName = "NavLink";
|
|
1493
|
+
var Ut = l.forwardRef(
|
|
1494
|
+
({
|
|
1495
|
+
discover: e = "render",
|
|
1496
|
+
fetcherKey: t,
|
|
1497
|
+
navigate: r,
|
|
1498
|
+
reloadDocument: a,
|
|
1499
|
+
replace: n,
|
|
1500
|
+
state: o,
|
|
1501
|
+
method: s = z,
|
|
1502
|
+
action: c,
|
|
1503
|
+
onSubmit: i,
|
|
1504
|
+
relative: u,
|
|
1505
|
+
preventScrollReset: h,
|
|
1506
|
+
viewTransition: y,
|
|
1507
|
+
...m
|
|
1508
|
+
}, d) => {
|
|
1509
|
+
let f = Vt(), g = jt(c, { relative: u }), x = s.toLowerCase() === "get" ? "get" : "post", p = typeof c == "string" && Re.test(c), w = (v) => {
|
|
1510
|
+
if (i && i(v), v.defaultPrevented) return;
|
|
1511
|
+
v.preventDefault();
|
|
1512
|
+
let R = v.nativeEvent.submitter, P = (R == null ? void 0 : R.getAttribute("formmethod")) || s;
|
|
1513
|
+
f(R || v.currentTarget, {
|
|
1514
|
+
fetcherKey: t,
|
|
1515
|
+
method: P,
|
|
1516
|
+
navigate: r,
|
|
1517
|
+
replace: n,
|
|
1518
|
+
state: o,
|
|
1519
|
+
relative: u,
|
|
1520
|
+
preventScrollReset: h,
|
|
1521
|
+
viewTransition: y
|
|
1522
|
+
});
|
|
1523
|
+
};
|
|
1524
|
+
return /* @__PURE__ */ l.createElement(
|
|
1525
|
+
"form",
|
|
1526
|
+
{
|
|
1527
|
+
ref: d,
|
|
1528
|
+
method: x,
|
|
1529
|
+
action: g,
|
|
1530
|
+
onSubmit: a ? i : w,
|
|
1531
|
+
...m,
|
|
1532
|
+
"data-discover": !p && e === "render" ? "true" : void 0
|
|
1533
|
+
}
|
|
1534
|
+
);
|
|
1535
|
+
}
|
|
1536
|
+
);
|
|
1537
|
+
Ut.displayName = "Form";
|
|
1538
|
+
function Wt(e) {
|
|
1539
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1540
|
+
}
|
|
1541
|
+
function be(e) {
|
|
1542
|
+
let t = l.useContext(A);
|
|
1543
|
+
return E(t, Wt(e)), t;
|
|
1544
|
+
}
|
|
1545
|
+
function Ht(e, {
|
|
1546
|
+
target: t,
|
|
1547
|
+
replace: r,
|
|
1548
|
+
state: a,
|
|
1549
|
+
preventScrollReset: n,
|
|
1550
|
+
relative: o,
|
|
1551
|
+
viewTransition: s
|
|
1552
|
+
} = {}) {
|
|
1553
|
+
let c = Ze(), i = N(), u = H(e, { relative: o });
|
|
1554
|
+
return l.useCallback(
|
|
1555
|
+
(h) => {
|
|
1556
|
+
if (wt(h, t)) {
|
|
1557
|
+
h.preventDefault();
|
|
1558
|
+
let y = r !== void 0 ? r : j(i) === j(u);
|
|
1559
|
+
c(e, {
|
|
1560
|
+
replace: y,
|
|
1561
|
+
state: a,
|
|
1562
|
+
preventScrollReset: n,
|
|
1563
|
+
relative: o,
|
|
1564
|
+
viewTransition: s
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
[
|
|
1569
|
+
i,
|
|
1570
|
+
c,
|
|
1571
|
+
u,
|
|
1572
|
+
r,
|
|
1573
|
+
a,
|
|
1574
|
+
t,
|
|
1575
|
+
e,
|
|
1576
|
+
n,
|
|
1577
|
+
o,
|
|
1578
|
+
s
|
|
1579
|
+
]
|
|
1580
|
+
);
|
|
1581
|
+
}
|
|
1582
|
+
var _t = 0, zt = () => `__${String(++_t)}__`;
|
|
1583
|
+
function Vt() {
|
|
1584
|
+
let { router: e } = be(
|
|
1585
|
+
"useSubmit"
|
|
1586
|
+
/* UseSubmit */
|
|
1587
|
+
), { basename: t } = l.useContext(S), r = ct();
|
|
1588
|
+
return l.useCallback(
|
|
1589
|
+
async (a, n = {}) => {
|
|
1590
|
+
let { action: o, method: s, encType: c, formData: i, body: u } = Ct(
|
|
1591
|
+
a,
|
|
1592
|
+
t
|
|
1593
|
+
);
|
|
1594
|
+
if (n.navigate === !1) {
|
|
1595
|
+
let h = n.fetcherKey || zt();
|
|
1596
|
+
await e.fetch(h, r, n.action || o, {
|
|
1597
|
+
preventScrollReset: n.preventScrollReset,
|
|
1598
|
+
formData: i,
|
|
1599
|
+
body: u,
|
|
1600
|
+
formMethod: n.method || s,
|
|
1601
|
+
formEncType: n.encType || c,
|
|
1602
|
+
flushSync: n.flushSync
|
|
1603
|
+
});
|
|
1604
|
+
} else
|
|
1605
|
+
await e.navigate(n.action || o, {
|
|
1606
|
+
preventScrollReset: n.preventScrollReset,
|
|
1607
|
+
formData: i,
|
|
1608
|
+
body: u,
|
|
1609
|
+
formMethod: n.method || s,
|
|
1610
|
+
formEncType: n.encType || c,
|
|
1611
|
+
replace: n.replace,
|
|
1612
|
+
state: n.state,
|
|
1613
|
+
fromRouteId: r,
|
|
1614
|
+
flushSync: n.flushSync,
|
|
1615
|
+
viewTransition: n.viewTransition
|
|
1616
|
+
});
|
|
1617
|
+
},
|
|
1618
|
+
[e, t, r]
|
|
1619
|
+
);
|
|
1620
|
+
}
|
|
1621
|
+
function jt(e, { relative: t } = {}) {
|
|
1622
|
+
let { basename: r } = l.useContext(S), a = l.useContext($);
|
|
1623
|
+
E(a, "useFormAction must be used inside a RouteContext");
|
|
1624
|
+
let [n] = a.matches.slice(-1), o = { ...H(e || ".", { relative: t }) }, s = N();
|
|
1625
|
+
if (e == null) {
|
|
1626
|
+
o.search = s.search;
|
|
1627
|
+
let c = new URLSearchParams(o.search), i = c.getAll("index");
|
|
1628
|
+
if (i.some((h) => h === "")) {
|
|
1629
|
+
c.delete("index"), i.filter((y) => y).forEach((y) => c.append("index", y));
|
|
1630
|
+
let h = c.toString();
|
|
1631
|
+
o.search = h ? `?${h}` : "";
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : k([r, o.pathname])), j(o);
|
|
1635
|
+
}
|
|
1636
|
+
function Jt(e, t = {}) {
|
|
1637
|
+
let r = l.useContext(me);
|
|
1638
|
+
E(
|
|
1639
|
+
r != null,
|
|
1640
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1641
|
+
);
|
|
1642
|
+
let { basename: a } = be(
|
|
1643
|
+
"useViewTransitionState"
|
|
1644
|
+
/* useViewTransitionState */
|
|
1645
|
+
), n = H(e, { relative: t.relative });
|
|
1646
|
+
if (!r.isTransitioning)
|
|
1647
|
+
return !1;
|
|
1648
|
+
let o = L(r.currentLocation.pathname, a) || r.currentLocation.pathname, s = L(r.nextLocation.pathname, a) || r.nextLocation.pathname;
|
|
1649
|
+
return J(n.pathname, s) != null || J(n.pathname, o) != null;
|
|
1650
|
+
}
|
|
1651
|
+
new TextEncoder();
|
|
1652
|
+
export {
|
|
1653
|
+
Ce as L,
|
|
1654
|
+
Kt as M,
|
|
1655
|
+
Bt as N,
|
|
1656
|
+
Yt as R,
|
|
1657
|
+
mt as a
|
|
1658
|
+
};
|
|
1659
|
+
//# sourceMappingURL=chunk-KNED5TY2-9zjBD6gF.js.map
|