zudoku 0.44.1 → 0.45.1
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/cli.js +8 -2
- package/dist/app/entry.client.js +34 -21
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/main.js +7 -0
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/common.d.ts +420 -288
- package/dist/config/validators/common.js +10 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +161 -108
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Footer.js +2 -2
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +3 -1
- package/dist/lib/components/Markdown.js +8 -14
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.d.ts +8 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +23 -18
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +3 -0
- package/dist/lib/oas/parser/index.js +6 -1
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +3 -1
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -3
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +4 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +11 -12
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +5 -1
- package/dist/lib/plugins/openapi/schema/utils.js +9 -5
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +4 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/shiki.d.ts +35 -0
- package/dist/lib/shiki.js +103 -0
- package/dist/lib/shiki.js.map +1 -0
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +16 -0
- package/dist/lib/ui/CodeBlock.js +18 -0
- package/dist/lib/ui/CodeBlock.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +10 -15
- package/dist/lib/ui/SyntaxHighlight.js +12 -60
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +9 -3
- package/dist/lib/util/MdxComponents.js +9 -10
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +2 -0
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/config.js +34 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +4 -11
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +3 -0
- package/dist/vite/plugin-shiki-register.js +38 -0
- package/dist/vite/plugin-shiki-register.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/AuthenticationPlugin-BTJ37DKg.js +90 -0
- package/lib/{AuthenticationPlugin-BlJsiGuX.js.map → AuthenticationPlugin-BTJ37DKg.js.map} +1 -1
- package/lib/{Button-BBNrKpQd.js → Button-Bdk_Ij3U.js} +3 -3
- package/lib/{Button-BBNrKpQd.js.map → Button-Bdk_Ij3U.js.map} +1 -1
- package/lib/{Callout-D3Ja4OPX.js → Callout-XadUe37J.js} +12 -12
- package/lib/{Callout-D3Ja4OPX.js.map → Callout-XadUe37J.js.map} +1 -1
- package/lib/{Card-BtheiD7j.js → Card-BlCYNw5W.js} +2 -2
- package/lib/{Card-BtheiD7j.js.map → Card-BlCYNw5W.js.map} +1 -1
- package/lib/{CategoryHeading-D06WK_Wo.js → CategoryHeading-DZi-Szor.js} +2 -2
- package/lib/{CategoryHeading-D06WK_Wo.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
- package/lib/{Dialog-ByYz4ABw.js → Dialog-CNf2oWXG.js} +2 -2
- package/lib/{Dialog-ByYz4ABw.js.map → Dialog-CNf2oWXG.js.map} +1 -1
- package/lib/{Drawer-CEwbkLDb.js → Drawer-BPBxzel2.js} +25 -25
- package/lib/{Drawer-CEwbkLDb.js.map → Drawer-BPBxzel2.js.map} +1 -1
- package/lib/Markdown-D96AphCL.js +7691 -0
- package/lib/Markdown-D96AphCL.js.map +1 -0
- package/lib/MdxPage-tTTaDsLc.js +84 -0
- package/lib/{MdxPage-DlJaCSPf.js.map → MdxPage-tTTaDsLc.js.map} +1 -1
- package/lib/{OasProvider-CsUksaAo.js → OasProvider-DalHQixM.js} +4 -4
- package/lib/{OasProvider-CsUksaAo.js.map → OasProvider-DalHQixM.js.map} +1 -1
- package/lib/{OperationList-BlUBNsw2.js → OperationList-BB09ENaq.js} +1896 -1932
- package/lib/{OperationList-BlUBNsw2.js.map → OperationList-BB09ENaq.js.map} +1 -1
- package/lib/{Pagination-C5Fi7z_v.js → Pagination-CtmnJOJi.js} +4 -4
- package/lib/{Pagination-C5Fi7z_v.js.map → Pagination-CtmnJOJi.js.map} +1 -1
- package/lib/RouteGuard-lkdEJoDV.js +732 -0
- package/lib/{RouteGuard-D2gX29iI.js.map → RouteGuard-lkdEJoDV.js.map} +1 -1
- package/lib/{SchemaList-BQiBukIP.js → SchemaList-BH9bgMRw.js} +40 -41
- package/lib/{SchemaList-BQiBukIP.js.map → SchemaList-BH9bgMRw.js.map} +1 -1
- package/lib/{SchemaView-Bt95NiyQ.js → SchemaView-BsB7EFRl.js} +120 -115
- package/lib/SchemaView-BsB7EFRl.js.map +1 -0
- package/lib/Select-HTio1oSE.js +211 -0
- package/lib/{Select-CYaEBIYK.js.map → Select-HTio1oSE.js.map} +1 -1
- package/lib/SlotletProvider-CTgIBRWg.js +257 -0
- package/lib/SlotletProvider-CTgIBRWg.js.map +1 -0
- package/lib/SyntaxHighlight-UxOF1xNb.js +9107 -0
- package/lib/SyntaxHighlight-UxOF1xNb.js.map +1 -0
- package/lib/{Toc-BnN4zBb3.js → Toc-Ax54Pw8S.js} +3 -3
- package/lib/{Toc-BnN4zBb3.js.map → Toc-Ax54Pw8S.js.map} +1 -1
- package/lib/{chunk-BAXFHI7N-BLTsN6tl.js → chunk-BAXFHI7N-C9WnHsLV.js} +510 -517
- package/lib/{chunk-BAXFHI7N-BLTsN6tl.js.map → chunk-BAXFHI7N-C9WnHsLV.js.map} +1 -1
- package/lib/{circular-tOWjsgLZ.js → circular-CZaZtOBs.js} +1636 -1633
- package/lib/{circular-tOWjsgLZ.js.map → circular-CZaZtOBs.js.map} +1 -1
- package/lib/{cn-qaFjX9_3.js → cn-CwJPJKOE.js} +28 -29
- package/lib/{cn-qaFjX9_3.js.map → cn-CwJPJKOE.js.map} +1 -1
- package/lib/{createServer-XtO-PVox.js → createServer-DmqFeMgf.js} +3980 -3832
- package/lib/createServer-DmqFeMgf.js.map +1 -0
- package/lib/hook-BwOB_iZo.js +1442 -0
- package/lib/hook-BwOB_iZo.js.map +1 -0
- package/lib/{index-DwT-v3zK.js → index--oeBayMa.js} +2 -2
- package/lib/{index-DwT-v3zK.js.map → index--oeBayMa.js.map} +1 -1
- package/lib/index-BnT4-Efz.js +4975 -0
- package/lib/index-BnT4-Efz.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
- package/lib/{index-CuBIgTKC.js → index-CrcNWbel.js} +9 -9
- package/lib/{index-CuBIgTKC.js.map → index-CrcNWbel.js.map} +1 -1
- package/lib/{index-CPNSgwSb.js → index-Z13x6tPX.js} +5 -5
- package/lib/{index-CPNSgwSb.js.map → index-Z13x6tPX.js.map} +1 -1
- package/lib/{index-CZnufgn5.js → index-sS7O9W-R.js} +899 -949
- package/lib/index-sS7O9W-R.js.map +1 -0
- package/lib/{index-DcHeSvkE.js → index-zddirpDj.js} +581 -609
- package/lib/{index-DcHeSvkE.js.map → index-zddirpDj.js.map} +1 -1
- package/lib/invariant-DAFpPywt.js +48 -0
- package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
- package/lib/mutation-CL2MCRQL.js +196 -0
- package/lib/{mutation-Bq5bn7Hf.js.map → mutation-CL2MCRQL.js.map} +1 -1
- package/lib/processors/removeParameters.js +27 -28
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js +17 -17
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +7 -7
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +175 -175
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +83 -0
- package/lib/ui/CodeBlock.js.map +1 -0
- package/lib/ui/Command.js +58 -58
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +5 -6
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-DmTJxEXG.js → useExposedProps-DG8J6ewJ.js} +2 -2
- package/lib/{useExposedProps-DmTJxEXG.js.map → useExposedProps-DG8J6ewJ.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +28 -31
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +64 -70
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +373 -382
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +45 -45
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +25 -28
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +26 -27
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +107 -110
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +39 -29
- package/src/app/entry.client.tsx +40 -25
- package/src/app/main.css +54 -3
- package/src/app/main.tsx +8 -0
- package/src/lib/components/Footer.tsx +3 -6
- package/src/lib/components/Header.tsx +1 -1
- package/src/lib/components/Markdown.tsx +29 -24
- package/src/lib/components/context/ZudokuContext.ts +2 -3
- package/src/lib/core/ZudokuContext.ts +5 -0
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/oas/graphql/circular.ts +27 -19
- package/src/lib/oas/parser/index.ts +6 -1
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -2
- package/src/lib/plugins/openapi/ParamInfos.tsx +3 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +22 -35
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +5 -2
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +23 -17
- package/src/lib/plugins/openapi/schema/utils.ts +18 -6
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +6 -1
- package/src/lib/shiki.ts +133 -0
- package/src/lib/ui/Callout.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +102 -0
- package/src/lib/ui/SyntaxHighlight.tsx +23 -182
- package/src/lib/util/MdxComponents.tsx +27 -14
- package/src/shiki/langs/abap.js +1 -0
- package/src/shiki/langs/actionscript-3.js +1 -0
- package/src/shiki/langs/ada.js +1 -0
- package/src/shiki/langs/angular-expression.js +1 -0
- package/src/shiki/langs/angular-html.js +1 -0
- package/src/shiki/langs/angular-inline-style.js +1 -0
- package/src/shiki/langs/angular-inline-template.js +1 -0
- package/src/shiki/langs/angular-let-declaration.js +1 -0
- package/src/shiki/langs/angular-template-blocks.js +1 -0
- package/src/shiki/langs/angular-template.js +1 -0
- package/src/shiki/langs/angular-ts.js +1 -0
- package/src/shiki/langs/apache.js +1 -0
- package/src/shiki/langs/apex.js +1 -0
- package/src/shiki/langs/apl.js +1 -0
- package/src/shiki/langs/applescript.js +1 -0
- package/src/shiki/langs/ara.js +1 -0
- package/src/shiki/langs/asciidoc.js +1 -0
- package/src/shiki/langs/asm.js +1 -0
- package/src/shiki/langs/astro.js +1 -0
- package/src/shiki/langs/awk.js +1 -0
- package/src/shiki/langs/ballerina.js +1 -0
- package/src/shiki/langs/bat.js +1 -0
- package/src/shiki/langs/beancount.js +1 -0
- package/src/shiki/langs/berry.js +1 -0
- package/src/shiki/langs/bibtex.js +1 -0
- package/src/shiki/langs/bicep.js +1 -0
- package/src/shiki/langs/blade.js +1 -0
- package/src/shiki/langs/bsl.js +1 -0
- package/src/shiki/langs/c.js +1 -0
- package/src/shiki/langs/cadence.js +1 -0
- package/src/shiki/langs/cairo.js +1 -0
- package/src/shiki/langs/clarity.js +1 -0
- package/src/shiki/langs/clojure.js +1 -0
- package/src/shiki/langs/cmake.js +1 -0
- package/src/shiki/langs/cobol.js +1 -0
- package/src/shiki/langs/codeowners.js +1 -0
- package/src/shiki/langs/codeql.js +1 -0
- package/src/shiki/langs/coffee.js +1 -0
- package/src/shiki/langs/common-lisp.js +1 -0
- package/src/shiki/langs/coq.js +1 -0
- package/src/shiki/langs/cpp-macro.js +1 -0
- package/src/shiki/langs/cpp.js +1 -0
- package/src/shiki/langs/crystal.js +1 -0
- package/src/shiki/langs/csharp.js +1 -0
- package/src/shiki/langs/css.js +1 -0
- package/src/shiki/langs/csv.js +1 -0
- package/src/shiki/langs/cue.js +1 -0
- package/src/shiki/langs/cypher.js +1 -0
- package/src/shiki/langs/d.js +1 -0
- package/src/shiki/langs/dart.js +1 -0
- package/src/shiki/langs/dax.js +1 -0
- package/src/shiki/langs/desktop.js +1 -0
- package/src/shiki/langs/diff.js +1 -0
- package/src/shiki/langs/docker.js +1 -0
- package/src/shiki/langs/dotenv.js +1 -0
- package/src/shiki/langs/dream-maker.js +1 -0
- package/src/shiki/langs/edge.js +1 -0
- package/src/shiki/langs/elixir.js +1 -0
- package/src/shiki/langs/elm.js +1 -0
- package/src/shiki/langs/emacs-lisp.js +1 -0
- package/src/shiki/langs/erb.js +1 -0
- package/src/shiki/langs/erlang.js +1 -0
- package/src/shiki/langs/es-tag-css.js +1 -0
- package/src/shiki/langs/es-tag-glsl.js +1 -0
- package/src/shiki/langs/es-tag-html.js +1 -0
- package/src/shiki/langs/es-tag-sql.js +1 -0
- package/src/shiki/langs/es-tag-xml.js +1 -0
- package/src/shiki/langs/fennel.js +1 -0
- package/src/shiki/langs/fish.js +1 -0
- package/src/shiki/langs/fluent.js +1 -0
- package/src/shiki/langs/fortran-fixed-form.js +1 -0
- package/src/shiki/langs/fortran-free-form.js +1 -0
- package/src/shiki/langs/fsharp.js +1 -0
- package/src/shiki/langs/gdresource.js +1 -0
- package/src/shiki/langs/gdscript.js +1 -0
- package/src/shiki/langs/gdshader.js +1 -0
- package/src/shiki/langs/genie.js +1 -0
- package/src/shiki/langs/gherkin.js +1 -0
- package/src/shiki/langs/git-commit.js +1 -0
- package/src/shiki/langs/git-rebase.js +1 -0
- package/src/shiki/langs/gleam.js +1 -0
- package/src/shiki/langs/glimmer-js.js +1 -0
- package/src/shiki/langs/glimmer-ts.js +1 -0
- package/src/shiki/langs/glsl.js +1 -0
- package/src/shiki/langs/gnuplot.js +1 -0
- package/src/shiki/langs/go.js +1 -0
- package/src/shiki/langs/graphql.js +1 -0
- package/src/shiki/langs/groovy.js +1 -0
- package/src/shiki/langs/hack.js +1 -0
- package/src/shiki/langs/haml.js +1 -0
- package/src/shiki/langs/handlebars.js +1 -0
- package/src/shiki/langs/haskell.js +1 -0
- package/src/shiki/langs/haxe.js +1 -0
- package/src/shiki/langs/hcl.js +1 -0
- package/src/shiki/langs/hjson.js +1 -0
- package/src/shiki/langs/hlsl.js +1 -0
- package/src/shiki/langs/html-derivative.js +1 -0
- package/src/shiki/langs/html.js +1 -0
- package/src/shiki/langs/http.js +1 -0
- package/src/shiki/langs/hxml.js +1 -0
- package/src/shiki/langs/hy.js +1 -0
- package/src/shiki/langs/imba.js +1 -0
- package/src/shiki/langs/ini.js +1 -0
- package/src/shiki/langs/java.js +1 -0
- package/src/shiki/langs/javascript.js +1 -0
- package/src/shiki/langs/jinja-html.js +1 -0
- package/src/shiki/langs/jinja.js +1 -0
- package/src/shiki/langs/jison.js +1 -0
- package/src/shiki/langs/json.js +1 -0
- package/src/shiki/langs/json5.js +1 -0
- package/src/shiki/langs/jsonc.js +1 -0
- package/src/shiki/langs/jsonl.js +1 -0
- package/src/shiki/langs/jsonnet.js +1 -0
- package/src/shiki/langs/jssm.js +1 -0
- package/src/shiki/langs/jsx.js +1 -0
- package/src/shiki/langs/julia.js +1 -0
- package/src/shiki/langs/kotlin.js +1 -0
- package/src/shiki/langs/kusto.js +1 -0
- package/src/shiki/langs/latex.js +1 -0
- package/src/shiki/langs/lean.js +1 -0
- package/src/shiki/langs/less.js +1 -0
- package/src/shiki/langs/liquid.js +1 -0
- package/src/shiki/langs/llvm.js +1 -0
- package/src/shiki/langs/log.js +1 -0
- package/src/shiki/langs/logo.js +1 -0
- package/src/shiki/langs/lua.js +1 -0
- package/src/shiki/langs/luau.js +1 -0
- package/src/shiki/langs/make.js +1 -0
- package/src/shiki/langs/markdown-vue.js +1 -0
- package/src/shiki/langs/markdown.js +1 -0
- package/src/shiki/langs/marko.js +1 -0
- package/src/shiki/langs/matlab.js +1 -0
- package/src/shiki/langs/mdc.js +1 -0
- package/src/shiki/langs/mdx.js +1 -0
- package/src/shiki/langs/mermaid.js +1 -0
- package/src/shiki/langs/mipsasm.js +1 -0
- package/src/shiki/langs/mojo.js +1 -0
- package/src/shiki/langs/move.js +1 -0
- package/src/shiki/langs/narrat.js +1 -0
- package/src/shiki/langs/nextflow.js +1 -0
- package/src/shiki/langs/nginx.js +1 -0
- package/src/shiki/langs/nim.js +1 -0
- package/src/shiki/langs/nix.js +1 -0
- package/src/shiki/langs/nushell.js +1 -0
- package/src/shiki/langs/objective-c.js +1 -0
- package/src/shiki/langs/objective-cpp.js +1 -0
- package/src/shiki/langs/ocaml.js +1 -0
- package/src/shiki/langs/pascal.js +1 -0
- package/src/shiki/langs/perl.js +1 -0
- package/src/shiki/langs/php.js +1 -0
- package/src/shiki/langs/plsql.js +1 -0
- package/src/shiki/langs/po.js +1 -0
- package/src/shiki/langs/polar.js +1 -0
- package/src/shiki/langs/postcss.js +1 -0
- package/src/shiki/langs/powerquery.js +1 -0
- package/src/shiki/langs/powershell.js +1 -0
- package/src/shiki/langs/prisma.js +1 -0
- package/src/shiki/langs/prolog.js +1 -0
- package/src/shiki/langs/proto.js +1 -0
- package/src/shiki/langs/pug.js +1 -0
- package/src/shiki/langs/puppet.js +1 -0
- package/src/shiki/langs/purescript.js +1 -0
- package/src/shiki/langs/python.js +1 -0
- package/src/shiki/langs/qml.js +1 -0
- package/src/shiki/langs/qmldir.js +1 -0
- package/src/shiki/langs/qss.js +1 -0
- package/src/shiki/langs/r.js +1 -0
- package/src/shiki/langs/racket.js +1 -0
- package/src/shiki/langs/raku.js +1 -0
- package/src/shiki/langs/razor.js +1 -0
- package/src/shiki/langs/reg.js +1 -0
- package/src/shiki/langs/regexp.js +1 -0
- package/src/shiki/langs/rel.js +1 -0
- package/src/shiki/langs/riscv.js +1 -0
- package/src/shiki/langs/rst.js +1 -0
- package/src/shiki/langs/ruby.js +1 -0
- package/src/shiki/langs/rust.js +1 -0
- package/src/shiki/langs/sas.js +1 -0
- package/src/shiki/langs/sass.js +1 -0
- package/src/shiki/langs/scala.js +1 -0
- package/src/shiki/langs/scheme.js +1 -0
- package/src/shiki/langs/scss.js +1 -0
- package/src/shiki/langs/sdbl.js +1 -0
- package/src/shiki/langs/shaderlab.js +1 -0
- package/src/shiki/langs/shellscript.js +1 -0
- package/src/shiki/langs/shellsession.js +1 -0
- package/src/shiki/langs/smalltalk.js +1 -0
- package/src/shiki/langs/solidity.js +1 -0
- package/src/shiki/langs/soy.js +1 -0
- package/src/shiki/langs/sparql.js +1 -0
- package/src/shiki/langs/splunk.js +1 -0
- package/src/shiki/langs/sql.js +1 -0
- package/src/shiki/langs/ssh-config.js +1 -0
- package/src/shiki/langs/stata.js +1 -0
- package/src/shiki/langs/stylus.js +1 -0
- package/src/shiki/langs/svelte.js +1 -0
- package/src/shiki/langs/swift.js +1 -0
- package/src/shiki/langs/system-verilog.js +1 -0
- package/src/shiki/langs/systemd.js +1 -0
- package/src/shiki/langs/talonscript.js +1 -0
- package/src/shiki/langs/tasl.js +1 -0
- package/src/shiki/langs/tcl.js +1 -0
- package/src/shiki/langs/templ.js +1 -0
- package/src/shiki/langs/terraform.js +1 -0
- package/src/shiki/langs/tex.js +1 -0
- package/src/shiki/langs/toml.js +1 -0
- package/src/shiki/langs/ts-tags.js +1 -0
- package/src/shiki/langs/tsv.js +1 -0
- package/src/shiki/langs/tsx.js +1 -0
- package/src/shiki/langs/turtle.js +1 -0
- package/src/shiki/langs/twig.js +1 -0
- package/src/shiki/langs/typescript.js +1 -0
- package/src/shiki/langs/typespec.js +1 -0
- package/src/shiki/langs/typst.js +1 -0
- package/src/shiki/langs/v.js +1 -0
- package/src/shiki/langs/vala.js +1 -0
- package/src/shiki/langs/vb.js +1 -0
- package/src/shiki/langs/verilog.js +1 -0
- package/src/shiki/langs/vhdl.js +1 -0
- package/src/shiki/langs/viml.js +1 -0
- package/src/shiki/langs/vue-directives.js +1 -0
- package/src/shiki/langs/vue-html.js +1 -0
- package/src/shiki/langs/vue-interpolations.js +1 -0
- package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
- package/src/shiki/langs/vue.js +1 -0
- package/src/shiki/langs/vyper.js +1 -0
- package/src/shiki/langs/wasm.js +1 -0
- package/src/shiki/langs/wenyan.js +1 -0
- package/src/shiki/langs/wgsl.js +1 -0
- package/src/shiki/langs/wikitext.js +1 -0
- package/src/shiki/langs/wit.js +1 -0
- package/src/shiki/langs/wolfram.js +1 -0
- package/src/shiki/langs/xml.js +1 -0
- package/src/shiki/langs/xsl.js +1 -0
- package/src/shiki/langs/yaml.js +1 -0
- package/src/shiki/langs/zenscript.js +1 -0
- package/src/shiki/langs/zig.js +1 -0
- package/src/shiki/themes/andromeeda.js +1 -0
- package/src/shiki/themes/aurora-x.js +1 -0
- package/src/shiki/themes/ayu-dark.js +1 -0
- package/src/shiki/themes/catppuccin-frappe.js +1 -0
- package/src/shiki/themes/catppuccin-latte.js +1 -0
- package/src/shiki/themes/catppuccin-macchiato.js +1 -0
- package/src/shiki/themes/catppuccin-mocha.js +1 -0
- package/src/shiki/themes/dark-plus.js +1 -0
- package/src/shiki/themes/dracula-soft.js +1 -0
- package/src/shiki/themes/dracula.js +1 -0
- package/src/shiki/themes/everforest-dark.js +1 -0
- package/src/shiki/themes/everforest-light.js +1 -0
- package/src/shiki/themes/github-dark-default.js +1 -0
- package/src/shiki/themes/github-dark-dimmed.js +1 -0
- package/src/shiki/themes/github-dark-high-contrast.js +1 -0
- package/src/shiki/themes/github-dark.js +1 -0
- package/src/shiki/themes/github-light-default.js +1 -0
- package/src/shiki/themes/github-light-high-contrast.js +1 -0
- package/src/shiki/themes/github-light.js +1 -0
- package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
- package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
- package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
- package/src/shiki/themes/gruvbox-light-hard.js +1 -0
- package/src/shiki/themes/gruvbox-light-medium.js +1 -0
- package/src/shiki/themes/gruvbox-light-soft.js +1 -0
- package/src/shiki/themes/houston.js +1 -0
- package/src/shiki/themes/kanagawa-dragon.js +1 -0
- package/src/shiki/themes/kanagawa-lotus.js +1 -0
- package/src/shiki/themes/kanagawa-wave.js +1 -0
- package/src/shiki/themes/laserwave.js +1 -0
- package/src/shiki/themes/light-plus.js +1 -0
- package/src/shiki/themes/material-theme-darker.js +1 -0
- package/src/shiki/themes/material-theme-lighter.js +1 -0
- package/src/shiki/themes/material-theme-ocean.js +1 -0
- package/src/shiki/themes/material-theme-palenight.js +1 -0
- package/src/shiki/themes/material-theme.js +1 -0
- package/src/shiki/themes/min-dark.js +1 -0
- package/src/shiki/themes/min-light.js +1 -0
- package/src/shiki/themes/monokai.js +1 -0
- package/src/shiki/themes/night-owl.js +1 -0
- package/src/shiki/themes/nord.js +1 -0
- package/src/shiki/themes/one-dark-pro.js +1 -0
- package/src/shiki/themes/one-light.js +1 -0
- package/src/shiki/themes/plastic.js +1 -0
- package/src/shiki/themes/poimandres.js +1 -0
- package/src/shiki/themes/red.js +1 -0
- package/src/shiki/themes/rose-pine-dawn.js +1 -0
- package/src/shiki/themes/rose-pine-moon.js +1 -0
- package/src/shiki/themes/rose-pine.js +1 -0
- package/src/shiki/themes/slack-dark.js +1 -0
- package/src/shiki/themes/slack-ochin.js +1 -0
- package/src/shiki/themes/snazzy-light.js +1 -0
- package/src/shiki/themes/solarized-dark.js +1 -0
- package/src/shiki/themes/solarized-light.js +1 -0
- package/src/shiki/themes/synthwave-84.js +1 -0
- package/src/shiki/themes/tokyo-night.js +1 -0
- package/src/shiki/themes/vesper.js +1 -0
- package/src/shiki/themes/vitesse-black.js +1 -0
- package/src/shiki/themes/vitesse-dark.js +1 -0
- package/src/shiki/themes/vitesse-light.js +1 -0
- package/lib/AuthenticationPlugin-BlJsiGuX.js +0 -99
- package/lib/Markdown-DvdVn1O7.js +0 -17128
- package/lib/Markdown-DvdVn1O7.js.map +0 -1
- package/lib/MdxPage-DlJaCSPf.js +0 -85
- package/lib/RouteGuard-D2gX29iI.js +0 -744
- package/lib/SchemaView-Bt95NiyQ.js.map +0 -1
- package/lib/Select-CYaEBIYK.js +0 -223
- package/lib/SlotletProvider-wWbHYqWf.js +0 -340
- package/lib/SlotletProvider-wWbHYqWf.js.map +0 -1
- package/lib/SyntaxHighlight-o7q0acut.js +0 -2890
- package/lib/SyntaxHighlight-o7q0acut.js.map +0 -1
- package/lib/_commonjsHelpers-B4e78b8K.js +0 -29
- package/lib/_commonjsHelpers-B4e78b8K.js.map +0 -1
- package/lib/createServer-XtO-PVox.js.map +0 -1
- package/lib/hook-8GM2HXNM.js +0 -1478
- package/lib/hook-8GM2HXNM.js.map +0 -1
- package/lib/index-CZnufgn5.js.map +0 -1
- package/lib/index-CzUOM_vE.js +0 -5039
- package/lib/index-CzUOM_vE.js.map +0 -1
- package/lib/invariant-Caa8-XvF.js +0 -26
- package/lib/mutation-Bq5bn7Hf.js +0 -211
- package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
- package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
- package/lib/prism-csharp.min-C43x1RY2.js +0 -63
- package/lib/prism-csharp.min-C43x1RY2.js.map +0 -1
- package/lib/prism-java.min-CQzr40NQ.js +0 -35
- package/lib/prism-java.min-CQzr40NQ.js.map +0 -1
- package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
- package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
- package/lib/prism-json.min-B1GJqK1k.js +0 -2
- package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
- package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
- package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
- package/lib/prism-markup-BNGj0Tvm.js +0 -174
- package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
- package/lib/prism-ruby.min-L9OdQ6tU.js +0 -38
- package/lib/prism-ruby.min-L9OdQ6tU.js.map +0 -1
- package/lib/prism-typescript.min-qTySPvCh.js +0 -34
- package/lib/prism-typescript.min-qTySPvCh.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i from "react";
|
|
2
2
|
var F = {}, ue;
|
|
3
3
|
function Ae() {
|
|
4
4
|
if (ue) return F;
|
|
5
5
|
ue = 1, Object.defineProperty(F, "__esModule", { value: !0 }), F.parse = s, F.serialize = u;
|
|
6
|
-
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/,
|
|
6
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[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]*$/, r = Object.prototype.toString, o = /* @__PURE__ */ (() => {
|
|
7
7
|
const d = function() {
|
|
8
8
|
};
|
|
9
9
|
return d.prototype = /* @__PURE__ */ Object.create(null), d;
|
|
10
10
|
})();
|
|
11
11
|
function s(d, g) {
|
|
12
|
-
const f = new
|
|
12
|
+
const f = new o(), w = d.length;
|
|
13
13
|
if (w < 2)
|
|
14
14
|
return f;
|
|
15
|
-
const E =
|
|
15
|
+
const E = g?.decode || h;
|
|
16
16
|
let p = 0;
|
|
17
17
|
do {
|
|
18
18
|
const v = d.indexOf("=", p);
|
|
@@ -23,7 +23,7 @@ function Ae() {
|
|
|
23
23
|
p = d.lastIndexOf(";", v - 1) + 1;
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const R = c(d, p, v), C = l(d, v, R), $ = d.slice(R, C);
|
|
27
27
|
if (f[$] === void 0) {
|
|
28
28
|
let S = c(d, v + 1, b), P = l(d, b, S);
|
|
29
29
|
const D = E(d.slice(S, P));
|
|
@@ -50,11 +50,11 @@ function Ae() {
|
|
|
50
50
|
return f;
|
|
51
51
|
}
|
|
52
52
|
function u(d, g, f) {
|
|
53
|
-
const w =
|
|
53
|
+
const w = f?.encode || encodeURIComponent;
|
|
54
54
|
if (!e.test(d))
|
|
55
55
|
throw new TypeError(`argument name is invalid: ${d}`);
|
|
56
56
|
const E = w(g);
|
|
57
|
-
if (!
|
|
57
|
+
if (!t.test(E))
|
|
58
58
|
throw new TypeError(`argument val is invalid: ${g}`);
|
|
59
59
|
let p = d + "=" + E;
|
|
60
60
|
if (!f)
|
|
@@ -65,7 +65,7 @@ function Ae() {
|
|
|
65
65
|
p += "; Max-Age=" + f.maxAge;
|
|
66
66
|
}
|
|
67
67
|
if (f.domain) {
|
|
68
|
-
if (!
|
|
68
|
+
if (!n.test(f.domain))
|
|
69
69
|
throw new TypeError(`option domain is invalid: ${f.domain}`);
|
|
70
70
|
p += "; Domain=" + f.domain;
|
|
71
71
|
}
|
|
@@ -135,48 +135,48 @@ Ae();
|
|
|
135
135
|
*
|
|
136
136
|
* @license MIT
|
|
137
137
|
*/
|
|
138
|
-
function
|
|
138
|
+
function x(e, t) {
|
|
139
139
|
if (e === !1 || e === null || typeof e > "u")
|
|
140
|
-
throw new Error(
|
|
140
|
+
throw new Error(t);
|
|
141
141
|
}
|
|
142
|
-
function L(e,
|
|
142
|
+
function L(e, t) {
|
|
143
143
|
if (!e) {
|
|
144
|
-
typeof console < "u" && console.warn(
|
|
144
|
+
typeof console < "u" && console.warn(t);
|
|
145
145
|
try {
|
|
146
|
-
throw new Error(
|
|
146
|
+
throw new Error(t);
|
|
147
147
|
} catch {
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
function W({
|
|
152
152
|
pathname: e = "/",
|
|
153
|
-
search:
|
|
154
|
-
hash:
|
|
153
|
+
search: t = "",
|
|
154
|
+
hash: n = ""
|
|
155
155
|
}) {
|
|
156
|
-
return
|
|
156
|
+
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
157
157
|
}
|
|
158
158
|
function Y(e) {
|
|
159
|
-
let
|
|
159
|
+
let t = {};
|
|
160
160
|
if (e) {
|
|
161
|
-
let
|
|
162
|
-
|
|
161
|
+
let n = e.indexOf("#");
|
|
162
|
+
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
163
163
|
let a = e.indexOf("?");
|
|
164
|
-
a >= 0 && (
|
|
164
|
+
a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return t;
|
|
167
167
|
}
|
|
168
|
-
function pe(e,
|
|
169
|
-
return De(e,
|
|
168
|
+
function pe(e, t, n = "/") {
|
|
169
|
+
return De(e, t, n, !1);
|
|
170
170
|
}
|
|
171
|
-
function De(e,
|
|
172
|
-
let r = typeof
|
|
173
|
-
if (
|
|
171
|
+
function De(e, t, n, a) {
|
|
172
|
+
let r = typeof t == "string" ? Y(t) : t, o = A(r.pathname || "/", n);
|
|
173
|
+
if (o == null)
|
|
174
174
|
return null;
|
|
175
175
|
let s = ge(e);
|
|
176
176
|
Oe(s);
|
|
177
177
|
let c = null;
|
|
178
178
|
for (let l = 0; c == null && l < s.length; ++l) {
|
|
179
|
-
let u = ye(
|
|
179
|
+
let u = ye(o);
|
|
180
180
|
c = je(
|
|
181
181
|
s[l],
|
|
182
182
|
u,
|
|
@@ -185,49 +185,48 @@ function De(e, n, t, a) {
|
|
|
185
185
|
}
|
|
186
186
|
return c;
|
|
187
187
|
}
|
|
188
|
-
function ge(e,
|
|
189
|
-
let r = (
|
|
188
|
+
function ge(e, t = [], n = [], a = "") {
|
|
189
|
+
let r = (o, s, c) => {
|
|
190
190
|
let l = {
|
|
191
|
-
relativePath: c === void 0 ?
|
|
192
|
-
caseSensitive:
|
|
191
|
+
relativePath: c === void 0 ? o.path || "" : c,
|
|
192
|
+
caseSensitive: o.caseSensitive === !0,
|
|
193
193
|
childrenIndex: s,
|
|
194
|
-
route:
|
|
194
|
+
route: o
|
|
195
195
|
};
|
|
196
|
-
l.relativePath.startsWith("/") && (
|
|
196
|
+
l.relativePath.startsWith("/") && (x(
|
|
197
197
|
l.relativePath.startsWith(a),
|
|
198
198
|
`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
199
199
|
), l.relativePath = l.relativePath.slice(a.length));
|
|
200
|
-
let u = M([a, l.relativePath]), h =
|
|
201
|
-
|
|
200
|
+
let u = M([a, l.relativePath]), h = n.concat(l);
|
|
201
|
+
o.children && o.children.length > 0 && (x(
|
|
202
202
|
// Our types know better, but runtime JS may not!
|
|
203
203
|
// @ts-expect-error
|
|
204
|
-
|
|
204
|
+
o.index !== !0,
|
|
205
205
|
`Index routes must not have child routes. Please remove all child routes from route path "${u}".`
|
|
206
|
-
), ge(
|
|
206
|
+
), ge(o.children, t, h, u)), !(o.path == null && !o.index) && t.push({
|
|
207
207
|
path: u,
|
|
208
|
-
score: He(u,
|
|
208
|
+
score: He(u, o.index),
|
|
209
209
|
routesMeta: h
|
|
210
210
|
});
|
|
211
211
|
};
|
|
212
|
-
return e.forEach((
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
r(i, s);
|
|
212
|
+
return e.forEach((o, s) => {
|
|
213
|
+
if (o.path === "" || !o.path?.includes("?"))
|
|
214
|
+
r(o, s);
|
|
216
215
|
else
|
|
217
|
-
for (let
|
|
218
|
-
r(
|
|
219
|
-
}),
|
|
216
|
+
for (let c of ve(o.path))
|
|
217
|
+
r(o, s, c);
|
|
218
|
+
}), t;
|
|
220
219
|
}
|
|
221
220
|
function ve(e) {
|
|
222
|
-
let
|
|
223
|
-
if (
|
|
224
|
-
let [
|
|
221
|
+
let t = e.split("/");
|
|
222
|
+
if (t.length === 0) return [];
|
|
223
|
+
let [n, ...a] = t, r = n.endsWith("?"), o = n.replace(/\?$/, "");
|
|
225
224
|
if (a.length === 0)
|
|
226
|
-
return r ? [
|
|
225
|
+
return r ? [o, ""] : [o];
|
|
227
226
|
let s = ve(a.join("/")), c = [];
|
|
228
227
|
return c.push(
|
|
229
228
|
...s.map(
|
|
230
|
-
(l) => l === "" ?
|
|
229
|
+
(l) => l === "" ? o : [o, l].join("/")
|
|
231
230
|
)
|
|
232
231
|
), r && c.push(...s), c.map(
|
|
233
232
|
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
@@ -235,41 +234,41 @@ function ve(e) {
|
|
|
235
234
|
}
|
|
236
235
|
function Oe(e) {
|
|
237
236
|
e.sort(
|
|
238
|
-
(
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
(t, n) => t.score !== n.score ? n.score - t.score : ze(
|
|
238
|
+
t.routesMeta.map((a) => a.childrenIndex),
|
|
239
|
+
n.routesMeta.map((a) => a.childrenIndex)
|
|
241
240
|
)
|
|
242
241
|
);
|
|
243
242
|
}
|
|
244
243
|
var Ie = /^:[\w-]+$/, _e = 3, Fe = 2, Ue = 1, We = 10, Be = -2, ce = (e) => e === "*";
|
|
245
|
-
function He(e,
|
|
246
|
-
let
|
|
247
|
-
return
|
|
248
|
-
(r,
|
|
244
|
+
function He(e, t) {
|
|
245
|
+
let n = e.split("/"), a = n.length;
|
|
246
|
+
return n.some(ce) && (a += Be), t && (a += Fe), n.filter((r) => !ce(r)).reduce(
|
|
247
|
+
(r, o) => r + (Ie.test(o) ? _e : o === "" ? Ue : We),
|
|
249
248
|
a
|
|
250
249
|
);
|
|
251
250
|
}
|
|
252
|
-
function ze(e,
|
|
253
|
-
return e.length ===
|
|
251
|
+
function ze(e, t) {
|
|
252
|
+
return e.length === t.length && e.slice(0, -1).every((a, r) => a === t[r]) ? (
|
|
254
253
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
255
254
|
// first. This allows people to have fine-grained control over the matching
|
|
256
255
|
// behavior by simply putting routes with identical paths in the order they
|
|
257
256
|
// want them tried.
|
|
258
|
-
e[e.length - 1] -
|
|
257
|
+
e[e.length - 1] - t[t.length - 1]
|
|
259
258
|
) : (
|
|
260
259
|
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
261
260
|
// so they sort equally.
|
|
262
261
|
0
|
|
263
262
|
);
|
|
264
263
|
}
|
|
265
|
-
function je(e,
|
|
266
|
-
let { routesMeta: a } = e, r = {},
|
|
264
|
+
function je(e, t, n = !1) {
|
|
265
|
+
let { routesMeta: a } = e, r = {}, o = "/", s = [];
|
|
267
266
|
for (let c = 0; c < a.length; ++c) {
|
|
268
|
-
let l = a[c], u = c === a.length - 1, h =
|
|
267
|
+
let l = a[c], u = c === a.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", m = B(
|
|
269
268
|
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: u },
|
|
270
269
|
h
|
|
271
270
|
), d = l.route;
|
|
272
|
-
if (!m && u &&
|
|
271
|
+
if (!m && u && n && !a[a.length - 1].route.index && (m = B(
|
|
273
272
|
{
|
|
274
273
|
path: l.relativePath,
|
|
275
274
|
caseSensitive: l.caseSensitive,
|
|
@@ -281,61 +280,61 @@ function je(e, n, t = !1) {
|
|
|
281
280
|
Object.assign(r, m.params), s.push({
|
|
282
281
|
// TODO: Can this as be avoided?
|
|
283
282
|
params: r,
|
|
284
|
-
pathname: M([
|
|
283
|
+
pathname: M([o, m.pathname]),
|
|
285
284
|
pathnameBase: qe(
|
|
286
|
-
M([
|
|
285
|
+
M([o, m.pathnameBase])
|
|
287
286
|
),
|
|
288
287
|
route: d
|
|
289
|
-
}), m.pathnameBase !== "/" && (
|
|
288
|
+
}), m.pathnameBase !== "/" && (o = M([o, m.pathnameBase]));
|
|
290
289
|
}
|
|
291
290
|
return s;
|
|
292
291
|
}
|
|
293
|
-
function on(e,
|
|
294
|
-
let
|
|
295
|
-
|
|
292
|
+
function on(e, t = {}) {
|
|
293
|
+
let n = e;
|
|
294
|
+
n.endsWith("*") && n !== "*" && !n.endsWith("/*") && (L(
|
|
296
295
|
!1,
|
|
297
|
-
`Route path "${
|
|
298
|
-
),
|
|
299
|
-
const a =
|
|
296
|
+
`Route path "${n}" will be treated as if it were "${n.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/, "/*")}".`
|
|
297
|
+
), n = n.replace(/\*$/, "/*"));
|
|
298
|
+
const a = n.startsWith("/") ? "/" : "", r = (s) => s == null ? "" : typeof s == "string" ? s : String(s), o = n.split(/\/+/).map((s, c, l) => {
|
|
300
299
|
if (c === l.length - 1 && s === "*")
|
|
301
|
-
return r(
|
|
300
|
+
return r(t["*"]);
|
|
302
301
|
const h = s.match(/^:([\w-]+)(\??)$/);
|
|
303
302
|
if (h) {
|
|
304
303
|
const [, m, d] = h;
|
|
305
|
-
let g =
|
|
306
|
-
return
|
|
304
|
+
let g = t[m];
|
|
305
|
+
return x(d === "?" || g != null, `Missing ":${m}" param`), r(g);
|
|
307
306
|
}
|
|
308
307
|
return s.replace(/\?$/g, "");
|
|
309
308
|
}).filter((s) => !!s);
|
|
310
|
-
return a +
|
|
309
|
+
return a + o.join("/");
|
|
311
310
|
}
|
|
312
|
-
function B(e,
|
|
311
|
+
function B(e, t) {
|
|
313
312
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
314
|
-
let [
|
|
313
|
+
let [n, a] = Ve(
|
|
315
314
|
e.path,
|
|
316
315
|
e.caseSensitive,
|
|
317
316
|
e.end
|
|
318
|
-
), r =
|
|
317
|
+
), r = t.match(n);
|
|
319
318
|
if (!r) return null;
|
|
320
|
-
let
|
|
319
|
+
let o = r[0], s = o.replace(/(.)\/+$/, "$1"), c = r.slice(1);
|
|
321
320
|
return {
|
|
322
321
|
params: a.reduce(
|
|
323
322
|
(u, { paramName: h, isOptional: m }, d) => {
|
|
324
323
|
if (h === "*") {
|
|
325
324
|
let f = c[d] || "";
|
|
326
|
-
s =
|
|
325
|
+
s = o.slice(0, o.length - f.length).replace(/(.)\/+$/, "$1");
|
|
327
326
|
}
|
|
328
327
|
const g = c[d];
|
|
329
328
|
return m && !g ? u[h] = void 0 : u[h] = (g || "").replace(/%2F/g, "/"), u;
|
|
330
329
|
},
|
|
331
330
|
{}
|
|
332
331
|
),
|
|
333
|
-
pathname:
|
|
332
|
+
pathname: o,
|
|
334
333
|
pathnameBase: s,
|
|
335
334
|
pattern: e
|
|
336
335
|
};
|
|
337
336
|
}
|
|
338
|
-
function Ve(e,
|
|
337
|
+
function Ve(e, t = !1, n = !0) {
|
|
339
338
|
L(
|
|
340
339
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
341
340
|
`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(/\*$/, "/*")}".`
|
|
@@ -344,92 +343,92 @@ function Ve(e, n = !1, t = !0) {
|
|
|
344
343
|
/\/:([\w-]+)(\?)?/g,
|
|
345
344
|
(s, c, l) => (a.push({ paramName: c, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
346
345
|
);
|
|
347
|
-
return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") :
|
|
346
|
+
return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
|
|
348
347
|
}
|
|
349
348
|
function ye(e) {
|
|
350
349
|
try {
|
|
351
|
-
return e.split("/").map((
|
|
352
|
-
} catch (
|
|
350
|
+
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
351
|
+
} catch (t) {
|
|
353
352
|
return L(
|
|
354
353
|
!1,
|
|
355
|
-
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${
|
|
354
|
+
`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}).`
|
|
356
355
|
), e;
|
|
357
356
|
}
|
|
358
357
|
}
|
|
359
|
-
function A(e,
|
|
360
|
-
if (
|
|
361
|
-
if (!e.toLowerCase().startsWith(
|
|
358
|
+
function A(e, t) {
|
|
359
|
+
if (t === "/") return e;
|
|
360
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
362
361
|
return null;
|
|
363
|
-
let
|
|
364
|
-
return a && a !== "/" ? null : e.slice(
|
|
362
|
+
let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
|
|
363
|
+
return a && a !== "/" ? null : e.slice(n) || "/";
|
|
365
364
|
}
|
|
366
|
-
function Ye(e,
|
|
365
|
+
function Ye(e, t = "/") {
|
|
367
366
|
let {
|
|
368
|
-
pathname:
|
|
367
|
+
pathname: n,
|
|
369
368
|
search: a = "",
|
|
370
369
|
hash: r = ""
|
|
371
370
|
} = typeof e == "string" ? Y(e) : e;
|
|
372
371
|
return {
|
|
373
|
-
pathname:
|
|
372
|
+
pathname: n ? n.startsWith("/") ? n : Je(n, t) : t,
|
|
374
373
|
search: Ge(a),
|
|
375
374
|
hash: Xe(r)
|
|
376
375
|
};
|
|
377
376
|
}
|
|
378
|
-
function Je(e,
|
|
379
|
-
let
|
|
377
|
+
function Je(e, t) {
|
|
378
|
+
let n = t.replace(/\/+$/, "").split("/");
|
|
380
379
|
return e.split("/").forEach((r) => {
|
|
381
|
-
r === ".." ?
|
|
382
|
-
}),
|
|
380
|
+
r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
|
|
381
|
+
}), n.length > 1 ? n.join("/") : "/";
|
|
383
382
|
}
|
|
384
|
-
function G(e,
|
|
385
|
-
return `Cannot include a '${e}' character in a manually specified \`to.${
|
|
383
|
+
function G(e, t, n, a) {
|
|
384
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
386
385
|
a
|
|
387
|
-
)}]. Please separate it out to the \`to.${
|
|
386
|
+
)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
388
387
|
}
|
|
389
388
|
function Ke(e) {
|
|
390
389
|
return e.filter(
|
|
391
|
-
(
|
|
390
|
+
(t, n) => n === 0 || t.route.path && t.route.path.length > 0
|
|
392
391
|
);
|
|
393
392
|
}
|
|
394
393
|
function Z(e) {
|
|
395
|
-
let
|
|
396
|
-
return
|
|
397
|
-
(
|
|
394
|
+
let t = Ke(e);
|
|
395
|
+
return t.map(
|
|
396
|
+
(n, a) => a === t.length - 1 ? n.pathname : n.pathnameBase
|
|
398
397
|
);
|
|
399
398
|
}
|
|
400
|
-
function ee(e,
|
|
399
|
+
function ee(e, t, n, a = !1) {
|
|
401
400
|
let r;
|
|
402
|
-
typeof e == "string" ? r = Y(e) : (r = { ...e },
|
|
401
|
+
typeof e == "string" ? r = Y(e) : (r = { ...e }, x(
|
|
403
402
|
!r.pathname || !r.pathname.includes("?"),
|
|
404
403
|
G("?", "pathname", "search", r)
|
|
405
|
-
),
|
|
404
|
+
), x(
|
|
406
405
|
!r.pathname || !r.pathname.includes("#"),
|
|
407
406
|
G("#", "pathname", "hash", r)
|
|
408
|
-
),
|
|
407
|
+
), x(
|
|
409
408
|
!r.search || !r.search.includes("#"),
|
|
410
409
|
G("#", "search", "hash", r)
|
|
411
410
|
));
|
|
412
|
-
let
|
|
411
|
+
let o = e === "" || r.pathname === "", s = o ? "/" : r.pathname, c;
|
|
413
412
|
if (s == null)
|
|
414
|
-
c =
|
|
413
|
+
c = n;
|
|
415
414
|
else {
|
|
416
|
-
let m =
|
|
415
|
+
let m = t.length - 1;
|
|
417
416
|
if (!a && s.startsWith("..")) {
|
|
418
417
|
let d = s.split("/");
|
|
419
418
|
for (; d[0] === ".."; )
|
|
420
419
|
d.shift(), m -= 1;
|
|
421
420
|
r.pathname = d.join("/");
|
|
422
421
|
}
|
|
423
|
-
c = m >= 0 ?
|
|
422
|
+
c = m >= 0 ? t[m] : "/";
|
|
424
423
|
}
|
|
425
|
-
let l = Ye(r, c), u = s && s !== "/" && s.endsWith("/"), h = (
|
|
424
|
+
let l = Ye(r, c), u = s && s !== "/" && s.endsWith("/"), h = (o || s === ".") && n.endsWith("/");
|
|
426
425
|
return !l.pathname.endsWith("/") && (u || h) && (l.pathname += "/"), l;
|
|
427
426
|
}
|
|
428
|
-
var M = (e) => e.join("/").replace(/\/\/+/g, "/"), qe = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ge = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Xe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ln = (e,
|
|
429
|
-
let
|
|
430
|
-
typeof
|
|
431
|
-
let a = new Headers(
|
|
432
|
-
return a.set("Location", e), new Response(null, { ...
|
|
427
|
+
var M = (e) => e.join("/").replace(/\/\/+/g, "/"), qe = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ge = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Xe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ln = (e, t = 302) => {
|
|
428
|
+
let n = t;
|
|
429
|
+
typeof n == "number" ? n = { status: n } : typeof n.status > "u" && (n.status = 302);
|
|
430
|
+
let a = new Headers(n.headers);
|
|
431
|
+
return a.set("Location", e), new Response(null, { ...n, headers: a });
|
|
433
432
|
};
|
|
434
433
|
function we(e) {
|
|
435
434
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
@@ -448,145 +447,145 @@ var Qe = [
|
|
|
448
447
|
...Ee
|
|
449
448
|
];
|
|
450
449
|
new Set(Qe);
|
|
451
|
-
var O =
|
|
450
|
+
var O = i.createContext(null);
|
|
452
451
|
O.displayName = "DataRouter";
|
|
453
|
-
var _ =
|
|
452
|
+
var _ = i.createContext(null);
|
|
454
453
|
_.displayName = "DataRouterState";
|
|
455
|
-
var J =
|
|
454
|
+
var J = i.createContext({
|
|
456
455
|
isTransitioning: !1
|
|
457
456
|
});
|
|
458
457
|
J.displayName = "ViewTransition";
|
|
459
|
-
var te =
|
|
458
|
+
var te = i.createContext(
|
|
460
459
|
/* @__PURE__ */ new Map()
|
|
461
460
|
);
|
|
462
461
|
te.displayName = "Fetchers";
|
|
463
|
-
var Ze =
|
|
462
|
+
var Ze = i.createContext(null);
|
|
464
463
|
Ze.displayName = "Await";
|
|
465
|
-
var T =
|
|
464
|
+
var T = i.createContext(
|
|
466
465
|
null
|
|
467
466
|
);
|
|
468
467
|
T.displayName = "Navigation";
|
|
469
|
-
var K =
|
|
468
|
+
var K = i.createContext(
|
|
470
469
|
null
|
|
471
470
|
);
|
|
472
471
|
K.displayName = "Location";
|
|
473
|
-
var k =
|
|
472
|
+
var k = i.createContext({
|
|
474
473
|
outlet: null,
|
|
475
474
|
matches: [],
|
|
476
475
|
isDataRoute: !1
|
|
477
476
|
});
|
|
478
477
|
k.displayName = "Route";
|
|
479
|
-
var ne =
|
|
478
|
+
var ne = i.createContext(null);
|
|
480
479
|
ne.displayName = "RouteError";
|
|
481
|
-
function et(e, { relative:
|
|
482
|
-
|
|
480
|
+
function et(e, { relative: t } = {}) {
|
|
481
|
+
x(
|
|
483
482
|
I(),
|
|
484
483
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
485
484
|
// router loaded. We can help them understand how to avoid that.
|
|
486
485
|
"useHref() may be used only in the context of a <Router> component."
|
|
487
486
|
);
|
|
488
|
-
let { basename:
|
|
489
|
-
return
|
|
487
|
+
let { basename: n, navigator: a } = i.useContext(T), { hash: r, pathname: o, search: s } = H(e, { relative: t }), c = o;
|
|
488
|
+
return n !== "/" && (c = o === "/" ? n : M([n, o])), a.createHref({ pathname: c, search: s, hash: r });
|
|
490
489
|
}
|
|
491
490
|
function I() {
|
|
492
|
-
return
|
|
491
|
+
return i.useContext(K) != null;
|
|
493
492
|
}
|
|
494
493
|
function N() {
|
|
495
|
-
return
|
|
494
|
+
return x(
|
|
496
495
|
I(),
|
|
497
496
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
498
497
|
// router loaded. We can help them understand how to avoid that.
|
|
499
498
|
"useLocation() may be used only in the context of a <Router> component."
|
|
500
|
-
),
|
|
499
|
+
), i.useContext(K).location;
|
|
501
500
|
}
|
|
502
501
|
function sn(e) {
|
|
503
|
-
|
|
502
|
+
x(
|
|
504
503
|
I(),
|
|
505
504
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
506
505
|
// router loaded. We can help them understand how to avoid that.
|
|
507
506
|
"useMatch() may be used only in the context of a <Router> component."
|
|
508
507
|
);
|
|
509
|
-
let { pathname:
|
|
510
|
-
return
|
|
511
|
-
() => B(e, ye(
|
|
512
|
-
[
|
|
508
|
+
let { pathname: t } = N();
|
|
509
|
+
return i.useMemo(
|
|
510
|
+
() => B(e, ye(t)),
|
|
511
|
+
[t, e]
|
|
513
512
|
);
|
|
514
513
|
}
|
|
515
514
|
var xe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
516
|
-
function
|
|
517
|
-
|
|
515
|
+
function Re(e) {
|
|
516
|
+
i.useContext(T).static || i.useLayoutEffect(e);
|
|
518
517
|
}
|
|
519
518
|
function re() {
|
|
520
|
-
let { isDataRoute: e } =
|
|
519
|
+
let { isDataRoute: e } = i.useContext(k);
|
|
521
520
|
return e ? ht() : tt();
|
|
522
521
|
}
|
|
523
522
|
function tt() {
|
|
524
|
-
|
|
523
|
+
x(
|
|
525
524
|
I(),
|
|
526
525
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
527
526
|
// router loaded. We can help them understand how to avoid that.
|
|
528
527
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
529
528
|
);
|
|
530
|
-
let e =
|
|
531
|
-
return
|
|
529
|
+
let e = i.useContext(O), { basename: t, navigator: n } = i.useContext(T), { matches: a } = i.useContext(k), { pathname: r } = N(), o = JSON.stringify(Z(a)), s = i.useRef(!1);
|
|
530
|
+
return Re(() => {
|
|
532
531
|
s.current = !0;
|
|
533
|
-
}),
|
|
532
|
+
}), i.useCallback(
|
|
534
533
|
(l, u = {}) => {
|
|
535
534
|
if (L(s.current, xe), !s.current) return;
|
|
536
535
|
if (typeof l == "number") {
|
|
537
|
-
|
|
536
|
+
n.go(l);
|
|
538
537
|
return;
|
|
539
538
|
}
|
|
540
539
|
let h = ee(
|
|
541
540
|
l,
|
|
542
|
-
JSON.parse(
|
|
541
|
+
JSON.parse(o),
|
|
543
542
|
r,
|
|
544
543
|
u.relative === "path"
|
|
545
544
|
);
|
|
546
|
-
e == null &&
|
|
545
|
+
e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : M([t, h.pathname])), (u.replace ? n.replace : n.push)(
|
|
547
546
|
h,
|
|
548
547
|
u.state,
|
|
549
548
|
u
|
|
550
549
|
);
|
|
551
550
|
},
|
|
552
551
|
[
|
|
553
|
-
n,
|
|
554
552
|
t,
|
|
555
|
-
|
|
553
|
+
n,
|
|
554
|
+
o,
|
|
556
555
|
r,
|
|
557
556
|
e
|
|
558
557
|
]
|
|
559
558
|
);
|
|
560
559
|
}
|
|
561
|
-
var nt =
|
|
560
|
+
var nt = i.createContext(null);
|
|
562
561
|
function rt(e) {
|
|
563
|
-
let
|
|
564
|
-
return
|
|
562
|
+
let t = i.useContext(k).outlet;
|
|
563
|
+
return t && /* @__PURE__ */ i.createElement(nt.Provider, { value: e }, t);
|
|
565
564
|
}
|
|
566
565
|
function un() {
|
|
567
|
-
let { matches: e } =
|
|
568
|
-
return
|
|
566
|
+
let { matches: e } = i.useContext(k), t = e[e.length - 1];
|
|
567
|
+
return t ? t.params : {};
|
|
569
568
|
}
|
|
570
|
-
function H(e, { relative:
|
|
571
|
-
let { matches:
|
|
572
|
-
return
|
|
569
|
+
function H(e, { relative: t } = {}) {
|
|
570
|
+
let { matches: n } = i.useContext(k), { pathname: a } = N(), r = JSON.stringify(Z(n));
|
|
571
|
+
return i.useMemo(
|
|
573
572
|
() => ee(
|
|
574
573
|
e,
|
|
575
574
|
JSON.parse(r),
|
|
576
575
|
a,
|
|
577
|
-
|
|
576
|
+
t === "path"
|
|
578
577
|
),
|
|
579
|
-
[e, r, a,
|
|
578
|
+
[e, r, a, t]
|
|
580
579
|
);
|
|
581
580
|
}
|
|
582
|
-
function
|
|
583
|
-
|
|
581
|
+
function be(e, t, n, a) {
|
|
582
|
+
x(
|
|
584
583
|
I(),
|
|
585
584
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
586
585
|
// router loaded. We can help them understand how to avoid that.
|
|
587
586
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
588
587
|
);
|
|
589
|
-
let { navigator: r, static:
|
|
588
|
+
let { navigator: r, static: o } = i.useContext(T), { matches: s } = i.useContext(k), c = s[s.length - 1], l = c ? c.params : {}, u = c ? c.pathname : "/", h = c ? c.pathnameBase : "/", m = c && c.route;
|
|
590
589
|
{
|
|
591
590
|
let v = m && m.path || "";
|
|
592
591
|
Se(
|
|
@@ -604,7 +603,7 @@ Please change the parent <Route path="${v}"> to <Route path="${v === "/" ? "*" :
|
|
|
604
603
|
let v = h.replace(/^\//, "").split("/");
|
|
605
604
|
w = "/" + f.replace(/^\//, "").split("/").slice(v.length).join("/");
|
|
606
605
|
}
|
|
607
|
-
let E = !
|
|
606
|
+
let E = !o && n && n.matches && n.matches.length > 0 ? n.matches : pe(e, { pathname: w });
|
|
608
607
|
return L(
|
|
609
608
|
m || E != null,
|
|
610
609
|
`No routes matched location "${g.pathname}${g.search}${g.hash}" `
|
|
@@ -628,18 +627,18 @@ Please change the parent <Route path="${v}"> to <Route path="${v === "/" ? "*" :
|
|
|
628
627
|
})
|
|
629
628
|
),
|
|
630
629
|
s,
|
|
631
|
-
|
|
630
|
+
n,
|
|
632
631
|
a
|
|
633
632
|
);
|
|
634
633
|
}
|
|
635
634
|
function at() {
|
|
636
|
-
let e = dt(),
|
|
635
|
+
let e = dt(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, s = null;
|
|
637
636
|
return console.error(
|
|
638
637
|
"Error handled by React Router default ErrorBoundary:",
|
|
639
638
|
e
|
|
640
|
-
), s = /* @__PURE__ */
|
|
639
|
+
), s = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ i.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ i.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ i.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ i.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ i.createElement("pre", { style: r }, n) : null, s);
|
|
641
640
|
}
|
|
642
|
-
var
|
|
641
|
+
var ot = /* @__PURE__ */ i.createElement(at, null), it = class extends i.Component {
|
|
643
642
|
constructor(e) {
|
|
644
643
|
super(e), this.state = {
|
|
645
644
|
location: e.location,
|
|
@@ -650,26 +649,26 @@ var it = /* @__PURE__ */ o.createElement(at, null), ot = class extends o.Compone
|
|
|
650
649
|
static getDerivedStateFromError(e) {
|
|
651
650
|
return { error: e };
|
|
652
651
|
}
|
|
653
|
-
static getDerivedStateFromProps(e,
|
|
654
|
-
return
|
|
652
|
+
static getDerivedStateFromProps(e, t) {
|
|
653
|
+
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
655
654
|
error: e.error,
|
|
656
655
|
location: e.location,
|
|
657
656
|
revalidation: e.revalidation
|
|
658
657
|
} : {
|
|
659
|
-
error: e.error !== void 0 ? e.error :
|
|
660
|
-
location:
|
|
661
|
-
revalidation: e.revalidation ||
|
|
658
|
+
error: e.error !== void 0 ? e.error : t.error,
|
|
659
|
+
location: t.location,
|
|
660
|
+
revalidation: e.revalidation || t.revalidation
|
|
662
661
|
};
|
|
663
662
|
}
|
|
664
|
-
componentDidCatch(e,
|
|
663
|
+
componentDidCatch(e, t) {
|
|
665
664
|
console.error(
|
|
666
665
|
"React Router caught the following error during render",
|
|
667
666
|
e,
|
|
668
|
-
|
|
667
|
+
t
|
|
669
668
|
);
|
|
670
669
|
}
|
|
671
670
|
render() {
|
|
672
|
-
return this.state.error !== void 0 ? /* @__PURE__ */
|
|
671
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ i.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ i.createElement(
|
|
673
672
|
ne.Provider,
|
|
674
673
|
{
|
|
675
674
|
value: this.state.error,
|
|
@@ -678,30 +677,30 @@ var it = /* @__PURE__ */ o.createElement(at, null), ot = class extends o.Compone
|
|
|
678
677
|
)) : this.props.children;
|
|
679
678
|
}
|
|
680
679
|
};
|
|
681
|
-
function lt({ routeContext: e, match:
|
|
682
|
-
let a =
|
|
683
|
-
return a && a.static && a.staticContext && (
|
|
680
|
+
function lt({ routeContext: e, match: t, children: n }) {
|
|
681
|
+
let a = i.useContext(O);
|
|
682
|
+
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ i.createElement(k.Provider, { value: e }, n);
|
|
684
683
|
}
|
|
685
|
-
function st(e,
|
|
684
|
+
function st(e, t = [], n = null, a = null) {
|
|
686
685
|
if (e == null) {
|
|
687
|
-
if (!
|
|
686
|
+
if (!n)
|
|
688
687
|
return null;
|
|
689
|
-
if (
|
|
690
|
-
e =
|
|
691
|
-
else if (
|
|
692
|
-
e =
|
|
688
|
+
if (n.errors)
|
|
689
|
+
e = n.matches;
|
|
690
|
+
else if (t.length === 0 && !n.initialized && n.matches.length > 0)
|
|
691
|
+
e = n.matches;
|
|
693
692
|
else
|
|
694
693
|
return null;
|
|
695
694
|
}
|
|
696
|
-
let r = e,
|
|
697
|
-
if (
|
|
695
|
+
let r = e, o = n?.errors;
|
|
696
|
+
if (o != null) {
|
|
698
697
|
let l = r.findIndex(
|
|
699
|
-
(u) => u.route.id &&
|
|
698
|
+
(u) => u.route.id && o?.[u.route.id] !== void 0
|
|
700
699
|
);
|
|
701
|
-
|
|
700
|
+
x(
|
|
702
701
|
l >= 0,
|
|
703
702
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
704
|
-
|
|
703
|
+
o
|
|
705
704
|
).join(",")}`
|
|
706
705
|
), r = r.slice(
|
|
707
706
|
0,
|
|
@@ -709,11 +708,11 @@ function st(e, n = [], t = null, a = null) {
|
|
|
709
708
|
);
|
|
710
709
|
}
|
|
711
710
|
let s = !1, c = -1;
|
|
712
|
-
if (
|
|
711
|
+
if (n)
|
|
713
712
|
for (let l = 0; l < r.length; l++) {
|
|
714
713
|
let u = r[l];
|
|
715
714
|
if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (c = l), u.route.id) {
|
|
716
|
-
let { loaderData: h, errors: m } =
|
|
715
|
+
let { loaderData: h, errors: m } = n, d = u.route.loader && !h.hasOwnProperty(u.route.id) && (!m || m[u.route.id] === void 0);
|
|
717
716
|
if (u.route.lazy || d) {
|
|
718
717
|
s = !0, c >= 0 ? r = r.slice(0, c + 1) : r = [r[0]];
|
|
719
718
|
break;
|
|
@@ -722,31 +721,31 @@ function st(e, n = [], t = null, a = null) {
|
|
|
722
721
|
}
|
|
723
722
|
return r.reduceRight((l, u, h) => {
|
|
724
723
|
let m, d = !1, g = null, f = null;
|
|
725
|
-
|
|
724
|
+
n && (m = o && u.route.id ? o[u.route.id] : void 0, g = u.route.errorElement || ot, s && (c < 0 && h === 0 ? (Se(
|
|
726
725
|
"route-fallback",
|
|
727
726
|
!1,
|
|
728
727
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
729
728
|
), d = !0, f = null) : c === h && (d = !0, f = u.route.hydrateFallbackElement || null)));
|
|
730
|
-
let w =
|
|
729
|
+
let w = t.concat(r.slice(0, h + 1)), E = () => {
|
|
731
730
|
let p;
|
|
732
|
-
return m ? p = g : d ? p = f : u.route.Component ? p = /* @__PURE__ */
|
|
731
|
+
return m ? p = g : d ? p = f : u.route.Component ? p = /* @__PURE__ */ i.createElement(u.route.Component, null) : u.route.element ? p = u.route.element : p = l, /* @__PURE__ */ i.createElement(
|
|
733
732
|
lt,
|
|
734
733
|
{
|
|
735
734
|
match: u,
|
|
736
735
|
routeContext: {
|
|
737
736
|
outlet: l,
|
|
738
737
|
matches: w,
|
|
739
|
-
isDataRoute:
|
|
738
|
+
isDataRoute: n != null
|
|
740
739
|
},
|
|
741
740
|
children: p
|
|
742
741
|
}
|
|
743
742
|
);
|
|
744
743
|
};
|
|
745
|
-
return
|
|
746
|
-
|
|
744
|
+
return n && (u.route.ErrorBoundary || u.route.errorElement || h === 0) ? /* @__PURE__ */ i.createElement(
|
|
745
|
+
it,
|
|
747
746
|
{
|
|
748
|
-
location:
|
|
749
|
-
revalidation:
|
|
747
|
+
location: n.location,
|
|
748
|
+
revalidation: n.revalidation,
|
|
750
749
|
component: g,
|
|
751
750
|
error: m,
|
|
752
751
|
children: E(),
|
|
@@ -759,26 +758,26 @@ function ae(e) {
|
|
|
759
758
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
760
759
|
}
|
|
761
760
|
function ut(e) {
|
|
762
|
-
let
|
|
763
|
-
return
|
|
761
|
+
let t = i.useContext(O);
|
|
762
|
+
return x(t, ae(e)), t;
|
|
764
763
|
}
|
|
765
764
|
function Ce(e) {
|
|
766
|
-
let
|
|
767
|
-
return
|
|
765
|
+
let t = i.useContext(_);
|
|
766
|
+
return x(t, ae(e)), t;
|
|
768
767
|
}
|
|
769
768
|
function ct(e) {
|
|
770
|
-
let
|
|
771
|
-
return
|
|
769
|
+
let t = i.useContext(k);
|
|
770
|
+
return x(t, ae(e)), t;
|
|
772
771
|
}
|
|
773
|
-
function
|
|
774
|
-
let
|
|
775
|
-
return
|
|
776
|
-
|
|
772
|
+
function oe(e) {
|
|
773
|
+
let t = ct(e), n = t.matches[t.matches.length - 1];
|
|
774
|
+
return x(
|
|
775
|
+
n.route.id,
|
|
777
776
|
`${e} can only be used on routes that contain a unique "id"`
|
|
778
|
-
),
|
|
777
|
+
), n.route.id;
|
|
779
778
|
}
|
|
780
779
|
function ft() {
|
|
781
|
-
return
|
|
780
|
+
return oe(
|
|
782
781
|
"useRouteId"
|
|
783
782
|
/* UseRouteId */
|
|
784
783
|
);
|
|
@@ -790,64 +789,63 @@ function cn() {
|
|
|
790
789
|
).navigation;
|
|
791
790
|
}
|
|
792
791
|
function dt() {
|
|
793
|
-
|
|
794
|
-
let e = o.useContext(ne), n = Ce(
|
|
792
|
+
let e = i.useContext(ne), t = Ce(
|
|
795
793
|
"useRouteError"
|
|
796
794
|
/* UseRouteError */
|
|
797
|
-
),
|
|
795
|
+
), n = oe(
|
|
798
796
|
"useRouteError"
|
|
799
797
|
/* UseRouteError */
|
|
800
798
|
);
|
|
801
|
-
return e !== void 0 ? e :
|
|
799
|
+
return e !== void 0 ? e : t.errors?.[n];
|
|
802
800
|
}
|
|
803
801
|
function ht() {
|
|
804
802
|
let { router: e } = ut(
|
|
805
803
|
"useNavigate"
|
|
806
804
|
/* UseNavigateStable */
|
|
807
|
-
),
|
|
805
|
+
), t = oe(
|
|
808
806
|
"useNavigate"
|
|
809
807
|
/* UseNavigateStable */
|
|
810
|
-
),
|
|
811
|
-
return
|
|
812
|
-
|
|
813
|
-
}),
|
|
814
|
-
async (r,
|
|
815
|
-
L(
|
|
808
|
+
), n = i.useRef(!1);
|
|
809
|
+
return Re(() => {
|
|
810
|
+
n.current = !0;
|
|
811
|
+
}), i.useCallback(
|
|
812
|
+
async (r, o = {}) => {
|
|
813
|
+
L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...o }));
|
|
816
814
|
},
|
|
817
|
-
[e,
|
|
815
|
+
[e, t]
|
|
818
816
|
);
|
|
819
817
|
}
|
|
820
818
|
var fe = {};
|
|
821
|
-
function Se(e,
|
|
822
|
-
!
|
|
819
|
+
function Se(e, t, n) {
|
|
820
|
+
!t && !fe[e] && (fe[e] = !0, L(!1, n));
|
|
823
821
|
}
|
|
824
822
|
var de = {};
|
|
825
|
-
function he(e,
|
|
826
|
-
!e && !de[
|
|
823
|
+
function he(e, t) {
|
|
824
|
+
!e && !de[t] && (de[t] = !0, console.warn(t));
|
|
827
825
|
}
|
|
828
826
|
var mt = class {
|
|
829
827
|
constructor() {
|
|
830
|
-
this.status = "pending", this.promise = new Promise((e,
|
|
831
|
-
this.resolve = (
|
|
832
|
-
this.status === "pending" && (this.status = "resolved", e(
|
|
833
|
-
}, this.reject = (
|
|
834
|
-
this.status === "pending" && (this.status = "rejected", n
|
|
828
|
+
this.status = "pending", this.promise = new Promise((e, t) => {
|
|
829
|
+
this.resolve = (n) => {
|
|
830
|
+
this.status === "pending" && (this.status = "resolved", e(n));
|
|
831
|
+
}, this.reject = (n) => {
|
|
832
|
+
this.status === "pending" && (this.status = "rejected", t(n));
|
|
835
833
|
};
|
|
836
834
|
});
|
|
837
835
|
}
|
|
838
836
|
};
|
|
839
837
|
function fn({
|
|
840
838
|
router: e,
|
|
841
|
-
flushSync:
|
|
839
|
+
flushSync: t
|
|
842
840
|
}) {
|
|
843
|
-
let [
|
|
841
|
+
let [n, a] = i.useState(e.state), [r, o] = i.useState(), [s, c] = i.useState({
|
|
844
842
|
isTransitioning: !1
|
|
845
|
-
}), [l, u] =
|
|
846
|
-
(y, { deletedFetchers: b, flushSync:
|
|
843
|
+
}), [l, u] = i.useState(), [h, m] = i.useState(), [d, g] = i.useState(), f = i.useRef(/* @__PURE__ */ new Map()), w = i.useCallback(
|
|
844
|
+
(y, { deletedFetchers: b, flushSync: R, viewTransitionOpts: C }) => {
|
|
847
845
|
y.fetchers.forEach((S, P) => {
|
|
848
846
|
S.data !== void 0 && f.current.set(P, S.data);
|
|
849
847
|
}), b.forEach((S) => f.current.delete(S)), he(
|
|
850
|
-
|
|
848
|
+
R === !1 || t != null,
|
|
851
849
|
'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
|
|
852
850
|
);
|
|
853
851
|
let $ = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
|
|
@@ -855,11 +853,11 @@ function fn({
|
|
|
855
853
|
C == null || $,
|
|
856
854
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
857
855
|
), !C || !$) {
|
|
858
|
-
|
|
856
|
+
t && R ? t(() => a(y)) : i.startTransition(() => a(y));
|
|
859
857
|
return;
|
|
860
858
|
}
|
|
861
|
-
if (
|
|
862
|
-
|
|
859
|
+
if (t && R) {
|
|
860
|
+
t(() => {
|
|
863
861
|
h && (l && l.resolve(), h.skipTransition()), c({
|
|
864
862
|
isTransitioning: !0,
|
|
865
863
|
flushSync: !0,
|
|
@@ -868,63 +866,63 @@ function fn({
|
|
|
868
866
|
});
|
|
869
867
|
});
|
|
870
868
|
let S = e.window.document.startViewTransition(() => {
|
|
871
|
-
|
|
869
|
+
t(() => a(y));
|
|
872
870
|
});
|
|
873
871
|
S.finished.finally(() => {
|
|
874
|
-
|
|
875
|
-
u(void 0), m(void 0),
|
|
872
|
+
t(() => {
|
|
873
|
+
u(void 0), m(void 0), o(void 0), c({ isTransitioning: !1 });
|
|
876
874
|
});
|
|
877
|
-
}),
|
|
875
|
+
}), t(() => m(S));
|
|
878
876
|
return;
|
|
879
877
|
}
|
|
880
878
|
h ? (l && l.resolve(), h.skipTransition(), g({
|
|
881
879
|
state: y,
|
|
882
880
|
currentLocation: C.currentLocation,
|
|
883
881
|
nextLocation: C.nextLocation
|
|
884
|
-
})) : (
|
|
882
|
+
})) : (o(y), c({
|
|
885
883
|
isTransitioning: !0,
|
|
886
884
|
flushSync: !1,
|
|
887
885
|
currentLocation: C.currentLocation,
|
|
888
886
|
nextLocation: C.nextLocation
|
|
889
887
|
}));
|
|
890
888
|
},
|
|
891
|
-
[e.window,
|
|
889
|
+
[e.window, t, h, l]
|
|
892
890
|
);
|
|
893
|
-
|
|
891
|
+
i.useLayoutEffect(() => e.subscribe(w), [e, w]), i.useEffect(() => {
|
|
894
892
|
s.isTransitioning && !s.flushSync && u(new mt());
|
|
895
|
-
}, [s]),
|
|
893
|
+
}, [s]), i.useEffect(() => {
|
|
896
894
|
if (l && r && e.window) {
|
|
897
|
-
let y = r, b = l.promise,
|
|
898
|
-
|
|
895
|
+
let y = r, b = l.promise, R = e.window.document.startViewTransition(async () => {
|
|
896
|
+
i.startTransition(() => a(y)), await b;
|
|
899
897
|
});
|
|
900
|
-
|
|
901
|
-
u(void 0), m(void 0),
|
|
902
|
-
}), m(
|
|
898
|
+
R.finished.finally(() => {
|
|
899
|
+
u(void 0), m(void 0), o(void 0), c({ isTransitioning: !1 });
|
|
900
|
+
}), m(R);
|
|
903
901
|
}
|
|
904
|
-
}, [r, l, e.window]),
|
|
905
|
-
l && r &&
|
|
906
|
-
}, [l, h,
|
|
907
|
-
!s.isTransitioning && d && (
|
|
902
|
+
}, [r, l, e.window]), i.useEffect(() => {
|
|
903
|
+
l && r && n.location.key === r.location.key && l.resolve();
|
|
904
|
+
}, [l, h, n.location, r]), i.useEffect(() => {
|
|
905
|
+
!s.isTransitioning && d && (o(d.state), c({
|
|
908
906
|
isTransitioning: !0,
|
|
909
907
|
flushSync: !1,
|
|
910
908
|
currentLocation: d.currentLocation,
|
|
911
909
|
nextLocation: d.nextLocation
|
|
912
910
|
}), g(void 0));
|
|
913
911
|
}, [s.isTransitioning, d]);
|
|
914
|
-
let E =
|
|
912
|
+
let E = i.useMemo(() => ({
|
|
915
913
|
createHref: e.createHref,
|
|
916
914
|
encodeLocation: e.encodeLocation,
|
|
917
915
|
go: (y) => e.navigate(y),
|
|
918
|
-
push: (y, b,
|
|
916
|
+
push: (y, b, R) => e.navigate(y, {
|
|
919
917
|
state: b,
|
|
920
|
-
preventScrollReset:
|
|
918
|
+
preventScrollReset: R?.preventScrollReset
|
|
921
919
|
}),
|
|
922
|
-
replace: (y, b,
|
|
920
|
+
replace: (y, b, R) => e.navigate(y, {
|
|
923
921
|
replace: !0,
|
|
924
922
|
state: b,
|
|
925
|
-
preventScrollReset:
|
|
923
|
+
preventScrollReset: R?.preventScrollReset
|
|
926
924
|
})
|
|
927
|
-
}), [e]), p = e.basename || "/", v =
|
|
925
|
+
}), [e]), p = e.basename || "/", v = i.useMemo(
|
|
928
926
|
() => ({
|
|
929
927
|
router: e,
|
|
930
928
|
navigator: E,
|
|
@@ -933,91 +931,91 @@ function fn({
|
|
|
933
931
|
}),
|
|
934
932
|
[e, E, p]
|
|
935
933
|
);
|
|
936
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(O.Provider, { value: v }, /* @__PURE__ */ i.createElement(_.Provider, { value: n }, /* @__PURE__ */ i.createElement(te.Provider, { value: f.current }, /* @__PURE__ */ i.createElement(J.Provider, { value: s }, /* @__PURE__ */ i.createElement(
|
|
937
935
|
Pe,
|
|
938
936
|
{
|
|
939
937
|
basename: p,
|
|
940
|
-
location:
|
|
941
|
-
navigationType:
|
|
938
|
+
location: n.location,
|
|
939
|
+
navigationType: n.historyAction,
|
|
942
940
|
navigator: E
|
|
943
941
|
},
|
|
944
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ i.createElement(
|
|
945
943
|
pt,
|
|
946
944
|
{
|
|
947
945
|
routes: e.routes,
|
|
948
946
|
future: e.future,
|
|
949
|
-
state:
|
|
947
|
+
state: n
|
|
950
948
|
}
|
|
951
949
|
)
|
|
952
950
|
))))), null);
|
|
953
951
|
}
|
|
954
|
-
var pt =
|
|
952
|
+
var pt = i.memo(gt);
|
|
955
953
|
function gt({
|
|
956
954
|
routes: e,
|
|
957
|
-
future:
|
|
958
|
-
state:
|
|
955
|
+
future: t,
|
|
956
|
+
state: n
|
|
959
957
|
}) {
|
|
960
|
-
return
|
|
958
|
+
return be(e, void 0, n, t);
|
|
961
959
|
}
|
|
962
960
|
function dn({
|
|
963
961
|
to: e,
|
|
964
|
-
replace:
|
|
965
|
-
state:
|
|
962
|
+
replace: t,
|
|
963
|
+
state: n,
|
|
966
964
|
relative: a
|
|
967
965
|
}) {
|
|
968
|
-
|
|
966
|
+
x(
|
|
969
967
|
I(),
|
|
970
968
|
// TODO: This error is probably because they somehow have 2 versions of
|
|
971
969
|
// the router loaded. We can help them understand how to avoid that.
|
|
972
970
|
"<Navigate> may be used only in the context of a <Router> component."
|
|
973
971
|
);
|
|
974
|
-
let { static: r } =
|
|
972
|
+
let { static: r } = i.useContext(T);
|
|
975
973
|
L(
|
|
976
974
|
!r,
|
|
977
975
|
"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
|
|
978
976
|
);
|
|
979
|
-
let { matches:
|
|
977
|
+
let { matches: o } = i.useContext(k), { pathname: s } = N(), c = re(), l = ee(
|
|
980
978
|
e,
|
|
981
|
-
Z(
|
|
979
|
+
Z(o),
|
|
982
980
|
s,
|
|
983
981
|
a === "path"
|
|
984
982
|
), u = JSON.stringify(l);
|
|
985
|
-
return
|
|
986
|
-
c(JSON.parse(u), { replace:
|
|
987
|
-
}, [c, u, a,
|
|
983
|
+
return i.useEffect(() => {
|
|
984
|
+
c(JSON.parse(u), { replace: t, state: n, relative: a });
|
|
985
|
+
}, [c, u, a, t, n]), null;
|
|
988
986
|
}
|
|
989
987
|
function hn(e) {
|
|
990
988
|
return rt(e.context);
|
|
991
989
|
}
|
|
992
990
|
function Pe({
|
|
993
991
|
basename: e = "/",
|
|
994
|
-
children:
|
|
995
|
-
location:
|
|
992
|
+
children: t = null,
|
|
993
|
+
location: n,
|
|
996
994
|
navigationType: a = "POP",
|
|
997
995
|
navigator: r,
|
|
998
|
-
static:
|
|
996
|
+
static: o = !1
|
|
999
997
|
}) {
|
|
1000
|
-
|
|
998
|
+
x(
|
|
1001
999
|
!I(),
|
|
1002
1000
|
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
1003
1001
|
);
|
|
1004
|
-
let s = e.replace(/^\/*/, "/"), c =
|
|
1002
|
+
let s = e.replace(/^\/*/, "/"), c = i.useMemo(
|
|
1005
1003
|
() => ({
|
|
1006
1004
|
basename: s,
|
|
1007
1005
|
navigator: r,
|
|
1008
|
-
static:
|
|
1006
|
+
static: o,
|
|
1009
1007
|
future: {}
|
|
1010
1008
|
}),
|
|
1011
|
-
[s, r,
|
|
1009
|
+
[s, r, o]
|
|
1012
1010
|
);
|
|
1013
|
-
typeof
|
|
1011
|
+
typeof n == "string" && (n = Y(n));
|
|
1014
1012
|
let {
|
|
1015
1013
|
pathname: l = "/",
|
|
1016
1014
|
search: u = "",
|
|
1017
1015
|
hash: h = "",
|
|
1018
1016
|
state: m = null,
|
|
1019
1017
|
key: d = "default"
|
|
1020
|
-
} =
|
|
1018
|
+
} = n, g = i.useMemo(() => {
|
|
1021
1019
|
let f = A(l, s);
|
|
1022
1020
|
return f == null ? null : {
|
|
1023
1021
|
location: {
|
|
@@ -1033,7 +1031,7 @@ function Pe({
|
|
|
1033
1031
|
return L(
|
|
1034
1032
|
g != null,
|
|
1035
1033
|
`<Router basename="${s}"> is not able to match the URL "${l}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1036
|
-
), g == null ? null : /* @__PURE__ */
|
|
1034
|
+
), g == null ? null : /* @__PURE__ */ i.createElement(T.Provider, { value: c }, /* @__PURE__ */ i.createElement(K.Provider, { children: t, value: g }));
|
|
1037
1035
|
}
|
|
1038
1036
|
var j = "get", V = "application/x-www-form-urlencoded";
|
|
1039
1037
|
function q(e) {
|
|
@@ -1051,31 +1049,31 @@ function wt(e) {
|
|
|
1051
1049
|
function Et(e) {
|
|
1052
1050
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1053
1051
|
}
|
|
1054
|
-
function xt(e,
|
|
1052
|
+
function xt(e, t) {
|
|
1055
1053
|
return e.button === 0 && // Ignore everything but left clicks
|
|
1056
|
-
(!
|
|
1054
|
+
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1057
1055
|
!Et(e);
|
|
1058
1056
|
}
|
|
1059
1057
|
function Q(e = "") {
|
|
1060
1058
|
return new URLSearchParams(
|
|
1061
|
-
typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((
|
|
1062
|
-
let a = e[
|
|
1063
|
-
return
|
|
1064
|
-
Array.isArray(a) ? a.map((r) => [
|
|
1059
|
+
typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
|
|
1060
|
+
let a = e[n];
|
|
1061
|
+
return t.concat(
|
|
1062
|
+
Array.isArray(a) ? a.map((r) => [n, r]) : [[n, a]]
|
|
1065
1063
|
);
|
|
1066
1064
|
}, [])
|
|
1067
1065
|
);
|
|
1068
1066
|
}
|
|
1069
|
-
function
|
|
1070
|
-
let
|
|
1071
|
-
return
|
|
1072
|
-
|
|
1073
|
-
|
|
1067
|
+
function Rt(e, t) {
|
|
1068
|
+
let n = Q(e);
|
|
1069
|
+
return t && t.forEach((a, r) => {
|
|
1070
|
+
n.has(r) || t.getAll(r).forEach((o) => {
|
|
1071
|
+
n.append(r, o);
|
|
1074
1072
|
});
|
|
1075
|
-
}),
|
|
1073
|
+
}), n;
|
|
1076
1074
|
}
|
|
1077
1075
|
var z = null;
|
|
1078
|
-
function
|
|
1076
|
+
function bt() {
|
|
1079
1077
|
if (z === null)
|
|
1080
1078
|
try {
|
|
1081
1079
|
new FormData(
|
|
@@ -1099,11 +1097,11 @@ function X(e) {
|
|
|
1099
1097
|
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`
|
|
1100
1098
|
), null) : e;
|
|
1101
1099
|
}
|
|
1102
|
-
function St(e,
|
|
1103
|
-
let
|
|
1100
|
+
function St(e, t) {
|
|
1101
|
+
let n, a, r, o, s;
|
|
1104
1102
|
if (yt(e)) {
|
|
1105
1103
|
let c = e.getAttribute("action");
|
|
1106
|
-
a = c ? A(c,
|
|
1104
|
+
a = c ? A(c, t) : null, n = e.getAttribute("method") || j, r = X(e.getAttribute("enctype")) || V, o = new FormData(e);
|
|
1107
1105
|
} else if (vt(e) || wt(e) && (e.type === "submit" || e.type === "image")) {
|
|
1108
1106
|
let c = e.form;
|
|
1109
1107
|
if (c == null)
|
|
@@ -1111,52 +1109,52 @@ function St(e, n) {
|
|
|
1111
1109
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1112
1110
|
);
|
|
1113
1111
|
let l = e.getAttribute("formaction") || c.getAttribute("action");
|
|
1114
|
-
if (a = l ? A(l,
|
|
1112
|
+
if (a = l ? A(l, t) : null, n = e.getAttribute("formmethod") || c.getAttribute("method") || j, r = X(e.getAttribute("formenctype")) || X(c.getAttribute("enctype")) || V, o = new FormData(c, e), !bt()) {
|
|
1115
1113
|
let { name: u, type: h, value: m } = e;
|
|
1116
1114
|
if (h === "image") {
|
|
1117
1115
|
let d = u ? `${u}.` : "";
|
|
1118
|
-
|
|
1119
|
-
} else u &&
|
|
1116
|
+
o.append(`${d}x`, "0"), o.append(`${d}y`, "0");
|
|
1117
|
+
} else u && o.append(u, m);
|
|
1120
1118
|
}
|
|
1121
1119
|
} else {
|
|
1122
1120
|
if (q(e))
|
|
1123
1121
|
throw new Error(
|
|
1124
1122
|
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1125
1123
|
);
|
|
1126
|
-
|
|
1124
|
+
n = j, a = null, r = V, s = e;
|
|
1127
1125
|
}
|
|
1128
|
-
return
|
|
1126
|
+
return o && r === "text/plain" && (s = o, o = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: o, body: s };
|
|
1129
1127
|
}
|
|
1130
|
-
function
|
|
1128
|
+
function ie(e, t) {
|
|
1131
1129
|
if (e === !1 || e === null || typeof e > "u")
|
|
1132
|
-
throw new Error(
|
|
1130
|
+
throw new Error(t);
|
|
1133
1131
|
}
|
|
1134
|
-
async function Pt(e,
|
|
1135
|
-
if (e.id in
|
|
1136
|
-
return
|
|
1132
|
+
async function Pt(e, t) {
|
|
1133
|
+
if (e.id in t)
|
|
1134
|
+
return t[e.id];
|
|
1137
1135
|
try {
|
|
1138
|
-
let
|
|
1136
|
+
let n = await import(
|
|
1139
1137
|
/* @vite-ignore */
|
|
1140
1138
|
/* webpackIgnore: true */
|
|
1141
1139
|
e.module
|
|
1142
1140
|
);
|
|
1143
|
-
return
|
|
1144
|
-
} catch (
|
|
1141
|
+
return t[e.id] = n, n;
|
|
1142
|
+
} catch (n) {
|
|
1145
1143
|
return console.error(
|
|
1146
1144
|
`Error loading route module \`${e.module}\`, reloading page...`
|
|
1147
|
-
), console.error(
|
|
1145
|
+
), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
1148
1146
|
});
|
|
1149
1147
|
}
|
|
1150
1148
|
}
|
|
1151
1149
|
function Lt(e) {
|
|
1152
1150
|
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";
|
|
1153
1151
|
}
|
|
1154
|
-
async function kt(e,
|
|
1152
|
+
async function kt(e, t, n) {
|
|
1155
1153
|
let a = await Promise.all(
|
|
1156
1154
|
e.map(async (r) => {
|
|
1157
|
-
let
|
|
1158
|
-
if (
|
|
1159
|
-
let s = await Pt(
|
|
1155
|
+
let o = t.routes[r.route.id];
|
|
1156
|
+
if (o) {
|
|
1157
|
+
let s = await Pt(o, n);
|
|
1160
1158
|
return s.links ? s.links() : [];
|
|
1161
1159
|
}
|
|
1162
1160
|
return [];
|
|
@@ -1168,49 +1166,45 @@ async function kt(e, n, t) {
|
|
|
1168
1166
|
)
|
|
1169
1167
|
);
|
|
1170
1168
|
}
|
|
1171
|
-
function me(e,
|
|
1172
|
-
let s = (l, u) =>
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
);
|
|
1180
|
-
};
|
|
1181
|
-
return i === "assets" ? n.filter(
|
|
1169
|
+
function me(e, t, n, a, r, o) {
|
|
1170
|
+
let s = (l, u) => n[u] ? l.route.id !== n[u].route.id : !0, c = (l, u) => (
|
|
1171
|
+
// param change, /users/123 -> /users/456
|
|
1172
|
+
n[u].pathname !== l.pathname || // splat param changed, which is not present in match.path
|
|
1173
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1174
|
+
n[u].route.path?.endsWith("*") && n[u].params["*"] !== l.params["*"]
|
|
1175
|
+
);
|
|
1176
|
+
return o === "assets" ? t.filter(
|
|
1182
1177
|
(l, u) => s(l, u) || c(l, u)
|
|
1183
|
-
) :
|
|
1184
|
-
var m;
|
|
1178
|
+
) : o === "data" ? t.filter((l, u) => {
|
|
1185
1179
|
let h = a.routes[l.route.id];
|
|
1186
1180
|
if (!h || !h.hasLoader)
|
|
1187
1181
|
return !1;
|
|
1188
1182
|
if (s(l, u) || c(l, u))
|
|
1189
1183
|
return !0;
|
|
1190
1184
|
if (l.route.shouldRevalidate) {
|
|
1191
|
-
let
|
|
1185
|
+
let m = l.route.shouldRevalidate({
|
|
1192
1186
|
currentUrl: new URL(
|
|
1193
1187
|
r.pathname + r.search + r.hash,
|
|
1194
1188
|
window.origin
|
|
1195
1189
|
),
|
|
1196
|
-
currentParams:
|
|
1190
|
+
currentParams: n[0]?.params || {},
|
|
1197
1191
|
nextUrl: new URL(e, window.origin),
|
|
1198
1192
|
nextParams: l.params,
|
|
1199
1193
|
defaultShouldRevalidate: !0
|
|
1200
1194
|
});
|
|
1201
|
-
if (typeof
|
|
1202
|
-
return
|
|
1195
|
+
if (typeof m == "boolean")
|
|
1196
|
+
return m;
|
|
1203
1197
|
}
|
|
1204
1198
|
return !0;
|
|
1205
1199
|
}) : [];
|
|
1206
1200
|
}
|
|
1207
|
-
function $t(e,
|
|
1201
|
+
function $t(e, t, { includeHydrateFallback: n } = {}) {
|
|
1208
1202
|
return Tt(
|
|
1209
1203
|
e.map((a) => {
|
|
1210
|
-
let r =
|
|
1204
|
+
let r = t.routes[a.route.id];
|
|
1211
1205
|
if (!r) return [];
|
|
1212
|
-
let
|
|
1213
|
-
return r.clientActionModule && (
|
|
1206
|
+
let o = [r.module];
|
|
1207
|
+
return r.clientActionModule && (o = o.concat(r.clientActionModule)), r.clientLoaderModule && (o = o.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (o = o.concat(r.hydrateFallbackModule)), r.imports && (o = o.concat(r.imports)), o;
|
|
1214
1208
|
}).flat(1)
|
|
1215
1209
|
);
|
|
1216
1210
|
}
|
|
@@ -1218,54 +1212,54 @@ function Tt(e) {
|
|
|
1218
1212
|
return [...new Set(e)];
|
|
1219
1213
|
}
|
|
1220
1214
|
function Nt(e) {
|
|
1221
|
-
let
|
|
1222
|
-
for (let a of
|
|
1223
|
-
|
|
1224
|
-
return
|
|
1215
|
+
let t = {}, n = Object.keys(e).sort();
|
|
1216
|
+
for (let a of n)
|
|
1217
|
+
t[a] = e[a];
|
|
1218
|
+
return t;
|
|
1225
1219
|
}
|
|
1226
|
-
function Mt(e,
|
|
1227
|
-
let
|
|
1228
|
-
return new Set(
|
|
1229
|
-
let
|
|
1230
|
-
return
|
|
1220
|
+
function Mt(e, t) {
|
|
1221
|
+
let n = /* @__PURE__ */ new Set();
|
|
1222
|
+
return new Set(t), e.reduce((a, r) => {
|
|
1223
|
+
let o = JSON.stringify(Nt(r));
|
|
1224
|
+
return n.has(o) || (n.add(o), a.push({ key: o, link: r })), a;
|
|
1231
1225
|
}, []);
|
|
1232
1226
|
}
|
|
1233
1227
|
var At = /* @__PURE__ */ new Set([100, 101, 204, 205]);
|
|
1234
|
-
function Dt(e,
|
|
1235
|
-
let
|
|
1228
|
+
function Dt(e, t) {
|
|
1229
|
+
let n = typeof e == "string" ? new URL(
|
|
1236
1230
|
e,
|
|
1237
1231
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1238
1232
|
// don't assume window is available
|
|
1239
1233
|
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1240
1234
|
) : e;
|
|
1241
|
-
return
|
|
1235
|
+
return n.pathname === "/" ? n.pathname = "_root.data" : t && A(n.pathname, t) === "/" ? n.pathname = `${t.replace(/\/$/, "")}/_root.data` : n.pathname = `${n.pathname.replace(/\/$/, "")}.data`, n;
|
|
1242
1236
|
}
|
|
1243
1237
|
function Le() {
|
|
1244
|
-
let e =
|
|
1245
|
-
return
|
|
1238
|
+
let e = i.useContext(O);
|
|
1239
|
+
return ie(
|
|
1246
1240
|
e,
|
|
1247
1241
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1248
1242
|
), e;
|
|
1249
1243
|
}
|
|
1250
1244
|
function Ot() {
|
|
1251
|
-
let e =
|
|
1252
|
-
return
|
|
1245
|
+
let e = i.useContext(_);
|
|
1246
|
+
return ie(
|
|
1253
1247
|
e,
|
|
1254
1248
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1255
1249
|
), e;
|
|
1256
1250
|
}
|
|
1257
|
-
var le =
|
|
1251
|
+
var le = i.createContext(void 0);
|
|
1258
1252
|
le.displayName = "FrameworkContext";
|
|
1259
1253
|
function ke() {
|
|
1260
|
-
let e =
|
|
1261
|
-
return
|
|
1254
|
+
let e = i.useContext(le);
|
|
1255
|
+
return ie(
|
|
1262
1256
|
e,
|
|
1263
1257
|
"You must render this element inside a <HydratedRouter> element"
|
|
1264
1258
|
), e;
|
|
1265
1259
|
}
|
|
1266
|
-
function It(e,
|
|
1267
|
-
let
|
|
1268
|
-
|
|
1260
|
+
function It(e, t) {
|
|
1261
|
+
let n = i.useContext(le), [a, r] = i.useState(!1), [o, s] = i.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: h, onTouchStart: m } = t, d = i.useRef(null);
|
|
1262
|
+
i.useEffect(() => {
|
|
1269
1263
|
if (e === "render" && s(!0), e === "viewport") {
|
|
1270
1264
|
let w = (p) => {
|
|
1271
1265
|
p.forEach((v) => {
|
|
@@ -1276,7 +1270,7 @@ function It(e, n) {
|
|
|
1276
1270
|
E.disconnect();
|
|
1277
1271
|
};
|
|
1278
1272
|
}
|
|
1279
|
-
}, [e]),
|
|
1273
|
+
}, [e]), i.useEffect(() => {
|
|
1280
1274
|
if (a) {
|
|
1281
1275
|
let w = setTimeout(() => {
|
|
1282
1276
|
s(!0);
|
|
@@ -1291,8 +1285,8 @@ function It(e, n) {
|
|
|
1291
1285
|
}, f = () => {
|
|
1292
1286
|
r(!1), s(!1);
|
|
1293
1287
|
};
|
|
1294
|
-
return
|
|
1295
|
-
|
|
1288
|
+
return n ? e !== "intent" ? [o, d, {}] : [
|
|
1289
|
+
o,
|
|
1296
1290
|
d,
|
|
1297
1291
|
{
|
|
1298
1292
|
onFocus: U(c, g),
|
|
@@ -1303,73 +1297,72 @@ function It(e, n) {
|
|
|
1303
1297
|
}
|
|
1304
1298
|
] : [!1, d, {}];
|
|
1305
1299
|
}
|
|
1306
|
-
function U(e,
|
|
1307
|
-
return (
|
|
1308
|
-
e && e(
|
|
1300
|
+
function U(e, t) {
|
|
1301
|
+
return (n) => {
|
|
1302
|
+
e && e(n), n.defaultPrevented || t(n);
|
|
1309
1303
|
};
|
|
1310
1304
|
}
|
|
1311
1305
|
function _t({
|
|
1312
1306
|
page: e,
|
|
1313
|
-
...
|
|
1307
|
+
...t
|
|
1314
1308
|
}) {
|
|
1315
|
-
let { router:
|
|
1316
|
-
() => pe(
|
|
1317
|
-
[
|
|
1309
|
+
let { router: n } = Le(), a = i.useMemo(
|
|
1310
|
+
() => pe(n.routes, e, n.basename),
|
|
1311
|
+
[n.routes, e, n.basename]
|
|
1318
1312
|
);
|
|
1319
|
-
return a ? /* @__PURE__ */
|
|
1313
|
+
return a ? /* @__PURE__ */ i.createElement(Ut, { page: e, matches: a, ...t }) : null;
|
|
1320
1314
|
}
|
|
1321
1315
|
function Ft(e) {
|
|
1322
|
-
let { manifest:
|
|
1323
|
-
return
|
|
1324
|
-
let
|
|
1325
|
-
return kt(e,
|
|
1316
|
+
let { manifest: t, routeModules: n } = ke(), [a, r] = i.useState([]);
|
|
1317
|
+
return i.useEffect(() => {
|
|
1318
|
+
let o = !1;
|
|
1319
|
+
return kt(e, t, n).then(
|
|
1326
1320
|
(s) => {
|
|
1327
|
-
|
|
1321
|
+
o || r(s);
|
|
1328
1322
|
}
|
|
1329
1323
|
), () => {
|
|
1330
|
-
|
|
1324
|
+
o = !0;
|
|
1331
1325
|
};
|
|
1332
|
-
}, [e,
|
|
1326
|
+
}, [e, t, n]), a;
|
|
1333
1327
|
}
|
|
1334
1328
|
function Ut({
|
|
1335
1329
|
page: e,
|
|
1336
|
-
matches:
|
|
1337
|
-
...
|
|
1330
|
+
matches: t,
|
|
1331
|
+
...n
|
|
1338
1332
|
}) {
|
|
1339
|
-
let a = N(), { manifest: r, routeModules:
|
|
1333
|
+
let a = N(), { manifest: r, routeModules: o } = ke(), { basename: s } = Le(), { loaderData: c, matches: l } = Ot(), u = i.useMemo(
|
|
1340
1334
|
() => me(
|
|
1341
1335
|
e,
|
|
1342
|
-
|
|
1336
|
+
t,
|
|
1343
1337
|
l,
|
|
1344
1338
|
r,
|
|
1345
1339
|
a,
|
|
1346
1340
|
"data"
|
|
1347
1341
|
),
|
|
1348
|
-
[e,
|
|
1349
|
-
), h =
|
|
1342
|
+
[e, t, l, r, a]
|
|
1343
|
+
), h = i.useMemo(
|
|
1350
1344
|
() => me(
|
|
1351
1345
|
e,
|
|
1352
|
-
|
|
1346
|
+
t,
|
|
1353
1347
|
l,
|
|
1354
1348
|
r,
|
|
1355
1349
|
a,
|
|
1356
1350
|
"assets"
|
|
1357
1351
|
),
|
|
1358
|
-
[e,
|
|
1359
|
-
), m =
|
|
1352
|
+
[e, t, l, r, a]
|
|
1353
|
+
), m = i.useMemo(() => {
|
|
1360
1354
|
if (e === a.pathname + a.search + a.hash)
|
|
1361
1355
|
return [];
|
|
1362
1356
|
let f = /* @__PURE__ */ new Set(), w = !1;
|
|
1363
|
-
if (
|
|
1364
|
-
var y;
|
|
1357
|
+
if (t.forEach((p) => {
|
|
1365
1358
|
let v = r.routes[p.route.id];
|
|
1366
|
-
!v || !v.hasLoader || (!u.some((
|
|
1359
|
+
!v || !v.hasLoader || (!u.some((y) => y.route.id === p.route.id) && p.route.id in c && o[p.route.id]?.shouldRevalidate || v.hasClientLoader ? w = !0 : f.add(p.route.id));
|
|
1367
1360
|
}), f.size === 0)
|
|
1368
1361
|
return [];
|
|
1369
1362
|
let E = Dt(e, s);
|
|
1370
1363
|
return w && f.size > 0 && E.searchParams.set(
|
|
1371
1364
|
"_routes",
|
|
1372
|
-
|
|
1365
|
+
t.filter((p) => f.has(p.route.id)).map((p) => p.route.id).join(",")
|
|
1373
1366
|
), [E.pathname + E.search];
|
|
1374
1367
|
}, [
|
|
1375
1368
|
s,
|
|
@@ -1377,23 +1370,23 @@ function Ut({
|
|
|
1377
1370
|
a,
|
|
1378
1371
|
r,
|
|
1379
1372
|
u,
|
|
1380
|
-
|
|
1373
|
+
t,
|
|
1381
1374
|
e,
|
|
1382
|
-
|
|
1383
|
-
]), d =
|
|
1375
|
+
o
|
|
1376
|
+
]), d = i.useMemo(
|
|
1384
1377
|
() => $t(h, r),
|
|
1385
1378
|
[h, r]
|
|
1386
1379
|
), g = Ft(h);
|
|
1387
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, m.map((f) => /* @__PURE__ */ i.createElement("link", { key: f, rel: "prefetch", as: "fetch", href: f, ...n })), d.map((f) => /* @__PURE__ */ i.createElement("link", { key: f, rel: "modulepreload", href: f, ...n })), g.map(({ key: f, link: w }) => (
|
|
1388
1381
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1389
1382
|
// already with their own props
|
|
1390
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ i.createElement("link", { key: f, ...w })
|
|
1391
1384
|
)));
|
|
1392
1385
|
}
|
|
1393
1386
|
function Wt(...e) {
|
|
1394
|
-
return (
|
|
1395
|
-
e.forEach((
|
|
1396
|
-
typeof
|
|
1387
|
+
return (t) => {
|
|
1388
|
+
e.forEach((n) => {
|
|
1389
|
+
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
1397
1390
|
});
|
|
1398
1391
|
};
|
|
1399
1392
|
}
|
|
@@ -1402,13 +1395,13 @@ try {
|
|
|
1402
1395
|
$e && (window.__reactRouterVersion = "7.5.2");
|
|
1403
1396
|
} catch {
|
|
1404
1397
|
}
|
|
1405
|
-
var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne =
|
|
1398
|
+
var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = i.forwardRef(
|
|
1406
1399
|
function({
|
|
1407
|
-
onClick:
|
|
1408
|
-
discover:
|
|
1400
|
+
onClick: t,
|
|
1401
|
+
discover: n = "render",
|
|
1409
1402
|
prefetch: a = "none",
|
|
1410
1403
|
relative: r,
|
|
1411
|
-
reloadDocument:
|
|
1404
|
+
reloadDocument: o,
|
|
1412
1405
|
replace: s,
|
|
1413
1406
|
state: c,
|
|
1414
1407
|
target: l,
|
|
@@ -1417,7 +1410,7 @@ var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = o.forwardRef(
|
|
|
1417
1410
|
viewTransition: m,
|
|
1418
1411
|
...d
|
|
1419
1412
|
}, g) {
|
|
1420
|
-
let { basename: f } =
|
|
1413
|
+
let { basename: f } = i.useContext(T), w = typeof u == "string" && Te.test(u), E, p = !1;
|
|
1421
1414
|
if (typeof u == "string" && w && (E = u, $e))
|
|
1422
1415
|
try {
|
|
1423
1416
|
let P = new URL(window.location.href), D = u.startsWith("//") ? new URL(P.protocol + u) : new URL(u), se = A(D.pathname, f);
|
|
@@ -1428,7 +1421,7 @@ var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = o.forwardRef(
|
|
|
1428
1421
|
`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1429
1422
|
);
|
|
1430
1423
|
}
|
|
1431
|
-
let v = et(u, { relative: r }), [y, b,
|
|
1424
|
+
let v = et(u, { relative: r }), [y, b, R] = It(
|
|
1432
1425
|
a,
|
|
1433
1426
|
d
|
|
1434
1427
|
), C = jt(u, {
|
|
@@ -1440,57 +1433,57 @@ var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = o.forwardRef(
|
|
|
1440
1433
|
viewTransition: m
|
|
1441
1434
|
});
|
|
1442
1435
|
function $(P) {
|
|
1443
|
-
|
|
1436
|
+
t && t(P), P.defaultPrevented || C(P);
|
|
1444
1437
|
}
|
|
1445
1438
|
let S = (
|
|
1446
1439
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1447
|
-
/* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ i.createElement(
|
|
1448
1441
|
"a",
|
|
1449
1442
|
{
|
|
1450
1443
|
...d,
|
|
1451
|
-
...
|
|
1444
|
+
...R,
|
|
1452
1445
|
href: E || v,
|
|
1453
|
-
onClick: p ||
|
|
1446
|
+
onClick: p || o ? t : $,
|
|
1454
1447
|
ref: Wt(g, b),
|
|
1455
1448
|
target: l,
|
|
1456
|
-
"data-discover": !w &&
|
|
1449
|
+
"data-discover": !w && n === "render" ? "true" : void 0
|
|
1457
1450
|
}
|
|
1458
1451
|
)
|
|
1459
1452
|
);
|
|
1460
|
-
return y && !w ? /* @__PURE__ */
|
|
1453
|
+
return y && !w ? /* @__PURE__ */ i.createElement(i.Fragment, null, S, /* @__PURE__ */ i.createElement(_t, { page: v })) : S;
|
|
1461
1454
|
}
|
|
1462
1455
|
);
|
|
1463
1456
|
Ne.displayName = "Link";
|
|
1464
|
-
var Bt =
|
|
1457
|
+
var Bt = i.forwardRef(
|
|
1465
1458
|
function({
|
|
1466
|
-
"aria-current":
|
|
1467
|
-
caseSensitive:
|
|
1459
|
+
"aria-current": t = "page",
|
|
1460
|
+
caseSensitive: n = !1,
|
|
1468
1461
|
className: a = "",
|
|
1469
1462
|
end: r = !1,
|
|
1470
|
-
style:
|
|
1463
|
+
style: o,
|
|
1471
1464
|
to: s,
|
|
1472
1465
|
viewTransition: c,
|
|
1473
1466
|
children: l,
|
|
1474
1467
|
...u
|
|
1475
1468
|
}, h) {
|
|
1476
|
-
let m = H(s, { relative: u.relative }), d = N(), g =
|
|
1469
|
+
let m = H(s, { relative: u.relative }), d = N(), g = i.useContext(_), { navigator: f, basename: w } = i.useContext(T), E = g != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1477
1470
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1478
1471
|
qt(m) && c === !0, p = f.encodeLocation ? f.encodeLocation(m).pathname : m.pathname, v = d.pathname, y = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
|
|
1479
|
-
|
|
1472
|
+
n || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, p = p.toLowerCase()), y && w && (y = A(y, w) || y);
|
|
1480
1473
|
const b = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
|
|
1481
|
-
let
|
|
1482
|
-
isActive:
|
|
1474
|
+
let R = v === p || !r && v.startsWith(p) && v.charAt(b) === "/", C = y != null && (y === p || !r && y.startsWith(p) && y.charAt(p.length) === "/"), $ = {
|
|
1475
|
+
isActive: R,
|
|
1483
1476
|
isPending: C,
|
|
1484
1477
|
isTransitioning: E
|
|
1485
|
-
}, S =
|
|
1478
|
+
}, S = R ? t : void 0, P;
|
|
1486
1479
|
typeof a == "function" ? P = a($) : P = [
|
|
1487
1480
|
a,
|
|
1488
|
-
|
|
1481
|
+
R ? "active" : null,
|
|
1489
1482
|
C ? "pending" : null,
|
|
1490
1483
|
E ? "transitioning" : null
|
|
1491
1484
|
].filter(Boolean).join(" ");
|
|
1492
|
-
let D = typeof
|
|
1493
|
-
return /* @__PURE__ */
|
|
1485
|
+
let D = typeof o == "function" ? o($) : o;
|
|
1486
|
+
return /* @__PURE__ */ i.createElement(
|
|
1494
1487
|
Ne,
|
|
1495
1488
|
{
|
|
1496
1489
|
...u,
|
|
@@ -1506,14 +1499,14 @@ var Bt = o.forwardRef(
|
|
|
1506
1499
|
}
|
|
1507
1500
|
);
|
|
1508
1501
|
Bt.displayName = "NavLink";
|
|
1509
|
-
var Ht =
|
|
1502
|
+
var Ht = i.forwardRef(
|
|
1510
1503
|
({
|
|
1511
1504
|
discover: e = "render",
|
|
1512
|
-
fetcherKey:
|
|
1513
|
-
navigate:
|
|
1505
|
+
fetcherKey: t,
|
|
1506
|
+
navigate: n,
|
|
1514
1507
|
reloadDocument: a,
|
|
1515
1508
|
replace: r,
|
|
1516
|
-
state:
|
|
1509
|
+
state: o,
|
|
1517
1510
|
method: s = j,
|
|
1518
1511
|
action: c,
|
|
1519
1512
|
onSubmit: l,
|
|
@@ -1525,19 +1518,19 @@ var Ht = o.forwardRef(
|
|
|
1525
1518
|
let f = Jt(), w = Kt(c, { relative: u }), E = s.toLowerCase() === "get" ? "get" : "post", p = typeof c == "string" && Te.test(c), v = (y) => {
|
|
1526
1519
|
if (l && l(y), y.defaultPrevented) return;
|
|
1527
1520
|
y.preventDefault();
|
|
1528
|
-
let b = y.nativeEvent.submitter,
|
|
1521
|
+
let b = y.nativeEvent.submitter, R = b?.getAttribute("formmethod") || s;
|
|
1529
1522
|
f(b || y.currentTarget, {
|
|
1530
|
-
fetcherKey:
|
|
1531
|
-
method:
|
|
1532
|
-
navigate:
|
|
1523
|
+
fetcherKey: t,
|
|
1524
|
+
method: R,
|
|
1525
|
+
navigate: n,
|
|
1533
1526
|
replace: r,
|
|
1534
|
-
state:
|
|
1527
|
+
state: o,
|
|
1535
1528
|
relative: u,
|
|
1536
1529
|
preventScrollReset: h,
|
|
1537
1530
|
viewTransition: m
|
|
1538
1531
|
});
|
|
1539
1532
|
};
|
|
1540
|
-
return /* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ i.createElement(
|
|
1541
1534
|
"form",
|
|
1542
1535
|
{
|
|
1543
1536
|
ref: g,
|
|
@@ -1555,28 +1548,28 @@ function zt(e) {
|
|
|
1555
1548
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1556
1549
|
}
|
|
1557
1550
|
function Me(e) {
|
|
1558
|
-
let
|
|
1559
|
-
return
|
|
1551
|
+
let t = i.useContext(O);
|
|
1552
|
+
return x(t, zt(e)), t;
|
|
1560
1553
|
}
|
|
1561
1554
|
function jt(e, {
|
|
1562
|
-
target:
|
|
1563
|
-
replace:
|
|
1555
|
+
target: t,
|
|
1556
|
+
replace: n,
|
|
1564
1557
|
state: a,
|
|
1565
1558
|
preventScrollReset: r,
|
|
1566
|
-
relative:
|
|
1559
|
+
relative: o,
|
|
1567
1560
|
viewTransition: s
|
|
1568
1561
|
} = {}) {
|
|
1569
|
-
let c = re(), l = N(), u = H(e, { relative:
|
|
1570
|
-
return
|
|
1562
|
+
let c = re(), l = N(), u = H(e, { relative: o });
|
|
1563
|
+
return i.useCallback(
|
|
1571
1564
|
(h) => {
|
|
1572
|
-
if (xt(h,
|
|
1565
|
+
if (xt(h, t)) {
|
|
1573
1566
|
h.preventDefault();
|
|
1574
|
-
let m =
|
|
1567
|
+
let m = n !== void 0 ? n : W(l) === W(u);
|
|
1575
1568
|
c(e, {
|
|
1576
1569
|
replace: m,
|
|
1577
1570
|
state: a,
|
|
1578
1571
|
preventScrollReset: r,
|
|
1579
|
-
relative:
|
|
1572
|
+
relative: o,
|
|
1580
1573
|
viewTransition: s
|
|
1581
1574
|
});
|
|
1582
1575
|
}
|
|
@@ -1585,12 +1578,12 @@ function jt(e, {
|
|
|
1585
1578
|
l,
|
|
1586
1579
|
c,
|
|
1587
1580
|
u,
|
|
1588
|
-
t,
|
|
1589
|
-
a,
|
|
1590
1581
|
n,
|
|
1582
|
+
a,
|
|
1583
|
+
t,
|
|
1591
1584
|
e,
|
|
1592
1585
|
r,
|
|
1593
|
-
|
|
1586
|
+
o,
|
|
1594
1587
|
s
|
|
1595
1588
|
]
|
|
1596
1589
|
);
|
|
@@ -1600,25 +1593,25 @@ function mn(e) {
|
|
|
1600
1593
|
typeof URLSearchParams < "u",
|
|
1601
1594
|
"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
|
|
1602
1595
|
);
|
|
1603
|
-
let
|
|
1596
|
+
let t = i.useRef(Q(e)), n = i.useRef(!1), a = N(), r = i.useMemo(
|
|
1604
1597
|
() => (
|
|
1605
1598
|
// Only merge in the defaults if we haven't yet called setSearchParams.
|
|
1606
1599
|
// Once we call that we want those to take precedence, otherwise you can't
|
|
1607
1600
|
// remove a param with setSearchParams({}) if it has an initial value
|
|
1608
|
-
|
|
1601
|
+
Rt(
|
|
1609
1602
|
a.search,
|
|
1610
|
-
|
|
1603
|
+
n.current ? null : t.current
|
|
1611
1604
|
)
|
|
1612
1605
|
),
|
|
1613
1606
|
[a.search]
|
|
1614
|
-
),
|
|
1607
|
+
), o = re(), s = i.useCallback(
|
|
1615
1608
|
(c, l) => {
|
|
1616
1609
|
const u = Q(
|
|
1617
1610
|
typeof c == "function" ? c(r) : c
|
|
1618
1611
|
);
|
|
1619
|
-
|
|
1612
|
+
n.current = !0, o("?" + u, l);
|
|
1620
1613
|
},
|
|
1621
|
-
[
|
|
1614
|
+
[o, r]
|
|
1622
1615
|
);
|
|
1623
1616
|
return [r, s];
|
|
1624
1617
|
}
|
|
@@ -1627,16 +1620,16 @@ function Jt() {
|
|
|
1627
1620
|
let { router: e } = Me(
|
|
1628
1621
|
"useSubmit"
|
|
1629
1622
|
/* UseSubmit */
|
|
1630
|
-
), { basename:
|
|
1631
|
-
return
|
|
1623
|
+
), { basename: t } = i.useContext(T), n = ft();
|
|
1624
|
+
return i.useCallback(
|
|
1632
1625
|
async (a, r = {}) => {
|
|
1633
|
-
let { action:
|
|
1626
|
+
let { action: o, method: s, encType: c, formData: l, body: u } = St(
|
|
1634
1627
|
a,
|
|
1635
|
-
|
|
1628
|
+
t
|
|
1636
1629
|
);
|
|
1637
1630
|
if (r.navigate === !1) {
|
|
1638
1631
|
let h = r.fetcherKey || Yt();
|
|
1639
|
-
await e.fetch(h,
|
|
1632
|
+
await e.fetch(h, n, r.action || o, {
|
|
1640
1633
|
preventScrollReset: r.preventScrollReset,
|
|
1641
1634
|
formData: l,
|
|
1642
1635
|
body: u,
|
|
@@ -1645,7 +1638,7 @@ function Jt() {
|
|
|
1645
1638
|
flushSync: r.flushSync
|
|
1646
1639
|
});
|
|
1647
1640
|
} else
|
|
1648
|
-
await e.navigate(r.action ||
|
|
1641
|
+
await e.navigate(r.action || o, {
|
|
1649
1642
|
preventScrollReset: r.preventScrollReset,
|
|
1650
1643
|
formData: l,
|
|
1651
1644
|
body: u,
|
|
@@ -1653,62 +1646,62 @@ function Jt() {
|
|
|
1653
1646
|
formEncType: r.encType || c,
|
|
1654
1647
|
replace: r.replace,
|
|
1655
1648
|
state: r.state,
|
|
1656
|
-
fromRouteId:
|
|
1649
|
+
fromRouteId: n,
|
|
1657
1650
|
flushSync: r.flushSync,
|
|
1658
1651
|
viewTransition: r.viewTransition
|
|
1659
1652
|
});
|
|
1660
1653
|
},
|
|
1661
|
-
[e,
|
|
1654
|
+
[e, t, n]
|
|
1662
1655
|
);
|
|
1663
1656
|
}
|
|
1664
|
-
function Kt(e, { relative:
|
|
1665
|
-
let { basename:
|
|
1666
|
-
|
|
1667
|
-
let [r] = a.matches.slice(-1),
|
|
1657
|
+
function Kt(e, { relative: t } = {}) {
|
|
1658
|
+
let { basename: n } = i.useContext(T), a = i.useContext(k);
|
|
1659
|
+
x(a, "useFormAction must be used inside a RouteContext");
|
|
1660
|
+
let [r] = a.matches.slice(-1), o = { ...H(e || ".", { relative: t }) }, s = N();
|
|
1668
1661
|
if (e == null) {
|
|
1669
|
-
|
|
1670
|
-
let c = new URLSearchParams(
|
|
1662
|
+
o.search = s.search;
|
|
1663
|
+
let c = new URLSearchParams(o.search), l = c.getAll("index");
|
|
1671
1664
|
if (l.some((h) => h === "")) {
|
|
1672
1665
|
c.delete("index"), l.filter((m) => m).forEach((m) => c.append("index", m));
|
|
1673
1666
|
let h = c.toString();
|
|
1674
|
-
|
|
1667
|
+
o.search = h ? `?${h}` : "";
|
|
1675
1668
|
}
|
|
1676
1669
|
}
|
|
1677
|
-
return (!e || e === ".") && r.route.index && (
|
|
1670
|
+
return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (o.pathname = o.pathname === "/" ? n : M([n, o.pathname])), W(o);
|
|
1678
1671
|
}
|
|
1679
|
-
function qt(e,
|
|
1680
|
-
let
|
|
1681
|
-
|
|
1682
|
-
|
|
1672
|
+
function qt(e, t = {}) {
|
|
1673
|
+
let n = i.useContext(J);
|
|
1674
|
+
x(
|
|
1675
|
+
n != null,
|
|
1683
1676
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1684
1677
|
);
|
|
1685
1678
|
let { basename: a } = Me(
|
|
1686
1679
|
"useViewTransitionState"
|
|
1687
1680
|
/* useViewTransitionState */
|
|
1688
|
-
), r = H(e, { relative:
|
|
1689
|
-
if (!
|
|
1681
|
+
), r = H(e, { relative: t.relative });
|
|
1682
|
+
if (!n.isTransitioning)
|
|
1690
1683
|
return !1;
|
|
1691
|
-
let
|
|
1692
|
-
return B(r.pathname, s) != null || B(r.pathname,
|
|
1684
|
+
let o = A(n.currentLocation.pathname, a) || n.currentLocation.pathname, s = A(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
1685
|
+
return B(r.pathname, s) != null || B(r.pathname, o) != null;
|
|
1693
1686
|
}
|
|
1694
1687
|
function pn({
|
|
1695
1688
|
context: e,
|
|
1696
|
-
router:
|
|
1697
|
-
hydrate:
|
|
1689
|
+
router: t,
|
|
1690
|
+
hydrate: n = !0,
|
|
1698
1691
|
nonce: a
|
|
1699
1692
|
}) {
|
|
1700
|
-
|
|
1701
|
-
|
|
1693
|
+
x(
|
|
1694
|
+
t && e,
|
|
1702
1695
|
"You must provide `router` and `context` to <StaticRouterProvider>"
|
|
1703
1696
|
);
|
|
1704
1697
|
let r = {
|
|
1705
|
-
router:
|
|
1698
|
+
router: t,
|
|
1706
1699
|
navigator: Qt(),
|
|
1707
1700
|
static: !0,
|
|
1708
1701
|
staticContext: e,
|
|
1709
1702
|
basename: e.basename || "/"
|
|
1710
|
-
},
|
|
1711
|
-
if (
|
|
1703
|
+
}, o = /* @__PURE__ */ new Map(), s = "";
|
|
1704
|
+
if (n !== !1) {
|
|
1712
1705
|
let l = {
|
|
1713
1706
|
loaderData: e.loaderData,
|
|
1714
1707
|
actionData: e.actionData,
|
|
@@ -1717,7 +1710,7 @@ function pn({
|
|
|
1717
1710
|
s = `window.__staticRouterHydrationData = JSON.parse(${an(JSON.stringify(JSON.stringify(l)))});`;
|
|
1718
1711
|
}
|
|
1719
1712
|
let { state: c } = r.router;
|
|
1720
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(O.Provider, { value: r }, /* @__PURE__ */ i.createElement(_.Provider, { value: c }, /* @__PURE__ */ i.createElement(te.Provider, { value: o }, /* @__PURE__ */ i.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ i.createElement(
|
|
1721
1714
|
Pe,
|
|
1722
1715
|
{
|
|
1723
1716
|
basename: r.basename,
|
|
@@ -1726,15 +1719,15 @@ function pn({
|
|
|
1726
1719
|
navigator: r.navigator,
|
|
1727
1720
|
static: r.static
|
|
1728
1721
|
},
|
|
1729
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ i.createElement(
|
|
1730
1723
|
Gt,
|
|
1731
1724
|
{
|
|
1732
|
-
routes:
|
|
1733
|
-
future:
|
|
1725
|
+
routes: t.routes,
|
|
1726
|
+
future: t.future,
|
|
1734
1727
|
state: c
|
|
1735
1728
|
}
|
|
1736
1729
|
)
|
|
1737
|
-
))))), s ? /* @__PURE__ */
|
|
1730
|
+
))))), s ? /* @__PURE__ */ i.createElement(
|
|
1738
1731
|
"script",
|
|
1739
1732
|
{
|
|
1740
1733
|
suppressHydrationWarning: !0,
|
|
@@ -1745,16 +1738,16 @@ function pn({
|
|
|
1745
1738
|
}
|
|
1746
1739
|
function Gt({
|
|
1747
1740
|
routes: e,
|
|
1748
|
-
future:
|
|
1749
|
-
state:
|
|
1741
|
+
future: t,
|
|
1742
|
+
state: n
|
|
1750
1743
|
}) {
|
|
1751
|
-
return
|
|
1744
|
+
return be(e, void 0, n, t);
|
|
1752
1745
|
}
|
|
1753
1746
|
function Xt(e) {
|
|
1754
1747
|
if (!e) return null;
|
|
1755
|
-
let
|
|
1756
|
-
for (let [a, r] of
|
|
1757
|
-
we(r) ?
|
|
1748
|
+
let t = Object.entries(e), n = {};
|
|
1749
|
+
for (let [a, r] of t)
|
|
1750
|
+
we(r) ? n[a] = { ...r, __type: "RouteErrorResponse" } : r instanceof Error ? n[a] = {
|
|
1758
1751
|
message: r.message,
|
|
1759
1752
|
__type: "Error",
|
|
1760
1753
|
// If this is a subclass (i.e., ReferenceError), send up the type so we
|
|
@@ -1762,8 +1755,8 @@ function Xt(e) {
|
|
|
1762
1755
|
...r.name !== "Error" ? {
|
|
1763
1756
|
__subType: r.name
|
|
1764
1757
|
} : {}
|
|
1765
|
-
} :
|
|
1766
|
-
return
|
|
1758
|
+
} : n[a] = r;
|
|
1759
|
+
return n;
|
|
1767
1760
|
}
|
|
1768
1761
|
function Qt() {
|
|
1769
1762
|
return {
|
|
@@ -1800,13 +1793,13 @@ function Zt(e) {
|
|
|
1800
1793
|
return typeof e == "string" ? e : W(e);
|
|
1801
1794
|
}
|
|
1802
1795
|
function en(e) {
|
|
1803
|
-
let
|
|
1804
|
-
|
|
1805
|
-
let
|
|
1796
|
+
let t = typeof e == "string" ? e : W(e);
|
|
1797
|
+
t = t.replace(/ $/, "%20");
|
|
1798
|
+
let n = tn.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
1806
1799
|
return {
|
|
1807
|
-
pathname:
|
|
1808
|
-
search:
|
|
1809
|
-
hash:
|
|
1800
|
+
pathname: n.pathname,
|
|
1801
|
+
search: n.search,
|
|
1802
|
+
hash: n.hash
|
|
1810
1803
|
};
|
|
1811
1804
|
}
|
|
1812
1805
|
var tn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, nn = {
|
|
@@ -1817,7 +1810,7 @@ var tn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, nn = {
|
|
|
1817
1810
|
"\u2029": "\\u2029"
|
|
1818
1811
|
}, rn = /[&><\u2028\u2029]/g;
|
|
1819
1812
|
function an(e) {
|
|
1820
|
-
return e.replace(rn, (
|
|
1813
|
+
return e.replace(rn, (t) => nn[t]);
|
|
1821
1814
|
}
|
|
1822
1815
|
new TextEncoder();
|
|
1823
1816
|
[
|
|
@@ -1843,4 +1836,4 @@ export {
|
|
|
1843
1836
|
ln as r,
|
|
1844
1837
|
N as u
|
|
1845
1838
|
};
|
|
1846
|
-
//# sourceMappingURL=chunk-BAXFHI7N-
|
|
1839
|
+
//# sourceMappingURL=chunk-BAXFHI7N-C9WnHsLV.js.map
|