testeranto 0.202.0 → 0.203.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/UX/chache/index.md +11 -0
- package/dist/prebuild/App.css +78 -0
- package/dist/prebuild/App.js +4828 -2814
- package/dist/prebuild/testeranto.mjs +2650 -1037
- package/example/Calculator.go +63 -0
- package/example/Calculator.golingvu.adapter.go +81 -0
- package/example/Calculator.golingvu.go +67 -0
- package/example/Calculator.golingvu.implementation.go +95 -0
- package/example/Calculator.golingvu.specification.go +68 -0
- package/example/Calculator.pitono.adapter.py +68 -0
- package/example/Calculator.pitono.implementation.py +30 -0
- package/example/Calculator.pitono.specification.py +154 -0
- package/example/Calculator.pitono.test.py +47 -0
- package/example/Calculator.py +93 -0
- package/example/Calculator.test.adapter.ts +86 -0
- package/example/Calculator.test.implementation.ts +82 -0
- package/example/Calculator.test.specification.ts +213 -0
- package/example/Calculator.test.ts +13 -0
- package/example/Calculator.test.types.ts +50 -0
- package/example/Calculator.ts +130 -0
- package/example/README.md +1 -0
- package/example/base_suite_test.go +51 -0
- package/example/cmd/main.go +16 -0
- package/example/go.mod +9 -0
- package/example/main +0 -0
- package/example/test_example.py +143 -74
- package/{testeranto → example/testeranto}/bundles/golang/core/Calculator.golingvu.go +1 -1
- package/example/testeranto/metafiles/golang/core.json +198 -0
- package/go.mod +3 -1
- package/golingvu.tmp.txt +68 -0
- package/log.txt +85 -0
- package/package.json +50 -41
- package/scripts/build-example.ts +245 -0
- package/src/App.tsx +94 -44
- package/src/Helpo.tsx +89 -0
- package/src/PM/PM_WithBuild.ts +32 -20
- package/src/PM/PM_WithGit.ts +60 -13
- package/src/PM/PM_WithHelpo.ts +341 -0
- package/src/PM/PM_WithProcesses.ts +484 -223
- package/src/PM/PM_WithWebSocket.ts +210 -2
- package/src/PM/golingvuBuild.ts +56 -0
- package/src/PM/main.ts +570 -438
- package/src/PM/pitonoBuild.ts +56 -0
- package/src/PM/utils.ts +7 -1
- package/src/app.scss +102 -0
- package/src/components/pure/AppFrame.tsx +259 -149
- package/src/components/pure/GitIntegrationView.tsx +527 -238
- package/src/components/pure/HelpoChatDrawer.tsx +222 -0
- package/src/components/pure/MagicRobotModal.tsx +136 -0
- package/src/components/pure/ProcessDetails.tsx +99 -0
- package/src/components/pure/ProcessInput.tsx +67 -0
- package/src/components/pure/ProcessList.tsx +89 -0
- package/src/components/pure/ProcessLogs.tsx +54 -0
- package/src/components/pure/ProcessManager.tsx +37 -46
- package/src/components/pure/ProcessManagerView.tsx +42 -367
- package/src/components/pure/ProcessManagerViewTypes.ts +10 -0
- package/src/components/pure/ProcessSidebar.tsx +88 -0
- package/src/components/pure/ProcessTerminal.tsx +51 -0
- package/src/components/pure/SingleProcessView.tsx +140 -231
- package/src/components/pure/TerminalInput.tsx +73 -0
- package/src/components/pure/TerminalLogs.tsx +80 -0
- package/src/components/pure/TestPageView.tsx +21 -116
- package/src/components/pure/TestPageView_utils.tsx +2 -0
- package/src/components/stateful/DratoPage.tsx +457 -0
- package/src/components/stateful/GenericXMLEditor/AttributeEditor.tsx +87 -0
- package/src/components/stateful/GenericXMLEditor/Drawer.tsx +174 -0
- package/src/components/stateful/GenericXMLEditor/GenericPreview.tsx +160 -0
- package/src/components/stateful/GenericXMLEditor/GenericTextEditor.tsx +104 -0
- package/src/components/stateful/GenericXMLEditor/GenericTree.tsx +104 -0
- package/src/components/stateful/GenericXMLEditorPage.tsx +346 -0
- package/src/components/stateful/GitIntegrationPage.tsx +258 -3
- package/src/components/stateful/GrafeoPage.tsx +563 -0
- package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +26 -8
- package/src/components/stateful/SVGEditor/SVGPreview.tsx +4 -2
- package/src/components/stateful/SVGEditorPage.tsx +195 -181
- package/src/components/stateful/SingleProcessPage.tsx +133 -131
- package/src/components/stateful/SkriboPage.tsx +765 -0
- package/src/components/stateful/TestPage.tsx +3 -2
- package/src/esbuildConfigs/node.ts +1 -1
- package/src/example/go.mod +9 -0
- package/src/example/main.go +61 -0
- package/src/golingvu/PM/golang_test.go +103 -0
- package/src/golingvu/README.md +186 -2
- package/src/golingvu/base_given.go +89 -2
- package/src/golingvu/base_suite.go +48 -2
- package/src/golingvu/go.mod +6 -0
- package/src/golingvu/golingvu.go +703 -29
- package/src/golingvu/types.go +0 -14
- package/src/helpo/directives.md +5 -0
- package/src/helpo/prompt.txt +38 -0
- package/src/hooks/useTerminalWebSocket.ts +49 -0
- package/src/lib/BaseGiven.ts +126 -28
- package/src/lib/BaseSuite.test/test.ts +97 -180
- package/src/lib/BaseSuite.ts +52 -10
- package/src/lib/BaseThen.ts +34 -38
- package/src/lib/BaseWhen.ts +9 -2
- package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +9 -8
- package/src/lib/Tiposkripto.ts +41 -11
- package/src/lib/pmProxy.ts +55 -18
- package/src/pitono/PM/python.py +165 -0
- package/src/pitono/Pitono.py +298 -0
- package/src/pitono/PitonoTest.py +25 -0
- package/src/pitono/README.md +21 -0
- package/src/pitono/__init__.py +6 -0
- package/{pitono → src/pitono}/base_given.py +42 -20
- package/{pitono → src/pitono}/base_suite.py +55 -2
- package/{pitono → src/pitono}/base_then.py +15 -1
- package/{pitono → src/pitono}/base_when.py +15 -1
- package/{pitono → src/pitono}/pitono.egg-info/PKG-INFO +25 -0
- package/{pitono → src/pitono}/pitono.egg-info/SOURCES.txt +1 -0
- package/src/pitono/types.py +87 -0
- package/src/services/FileService.ts +146 -11
- package/src/testeranto.ts +115 -149
- package/src/utils/golingvuMetafile.ts +822 -118
- package/src/utils/golingvuWatcher.ts +285 -0
- package/src/utils/logFiles.ts +10 -2
- package/src/utils/makePrompt.ts +12 -1
- package/src/utils/pitonoMetafile.ts +326 -54
- package/src/utils/pitonoWatcher.ts +157 -0
- package/testeranto/App.css +78 -0
- package/testeranto/App.js +4828 -2814
- package/testeranto/bundles/node/core/{chunk-RIM6RECA.mjs → chunk-MJTSYIAQ.mjs} +179 -250
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +110 -62
- package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +135 -137
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +4317 -4
- package/testeranto/bundles/pure/core/{chunk-XYOCRDEQ.mjs → chunk-6HR24P27.mjs} +96 -173
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +1 -1
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +110 -62
- package/testeranto/bundles/web/core/{chunk-JMDLMADH.mjs → chunk-AZZHJNSU.mjs} +2473 -191
- package/testeranto/bundles/web/core/{chunk-LQMU5NCG.mjs → chunk-ME6I6FJZ.mjs} +96 -173
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.html +15 -0
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +3 -5
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +0 -78
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.html +15 -0
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +6476 -69
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.html +15 -0
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +110 -62
- package/testeranto/helpo_chat_history.json +1 -0
- package/testeranto/metafiles/golang/core.json +42 -47
- package/testeranto/metafiles/node/core.json +263 -247
- package/testeranto/metafiles/pure/core.json +23 -38
- package/testeranto/metafiles/python/core.json +85 -9
- package/testeranto/metafiles/web/core.json +966 -460
- package/testeranto/reports/core/config.json +30 -6
- package/testeranto/reports/core/example/Calculator.golingvu/golang/exit.log +1 -0
- package/testeranto/reports/core/example/Calculator.golingvu/golang/stderr.log +2 -0
- package/testeranto/reports/core/example/Calculator.golingvu/golang/stdout.log +1 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/exit.log +1 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/stderr.log +11 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/stdout.log +1 -0
- package/testeranto/reports/core/example/Calculator.test/node/exit.log +1 -0
- package/testeranto/reports/core/example/Calculator.test/node/lint_errors.txt +2 -0
- package/testeranto/reports/core/example/Calculator.test/node/message.txt +16 -0
- package/testeranto/reports/core/example/Calculator.test/node/prompt.txt +13 -0
- package/testeranto/reports/core/example/Calculator.test/node/stderr.log +33 -0
- package/testeranto/reports/core/example/Calculator.test/node/stdout.log +1076 -0
- package/testeranto/reports/core/example/Calculator.test/node/tests.json +1109 -0
- package/testeranto/reports/core/example/Calculator.test/node/type_errors.txt +34 -0
- package/testeranto/reports/core/example/test_example/python/exit.log +1 -0
- package/testeranto/reports/core/example/test_example/python/stderr.log +24 -0
- package/testeranto/reports/core/src/Pure.test/pure/message.txt +1 -2
- package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +4 -5
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +16 -3
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +0 -91
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/exit.log +0 -1
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/message.txt +17 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +26 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +69 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/lint_errors.txt +16 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/message.txt +17 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/prompt.txt +27 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/type_errors.txt +42 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +0 -30
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/exit.log +0 -1
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +30 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +17 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +30 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +58 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +1 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +9 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stderr.log +1 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +4 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +98 -7
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +44 -28
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +1 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +4 -6
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +44 -28
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/message.txt +17 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +25 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +69 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -1
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +1 -2
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +4 -8
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +68 -35
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +336 -6
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/tests.json +166 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +20 -13
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -1
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +9 -1
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +0 -20
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +1 -3
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +31 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +16 -3
- package/testeranto/reports/core/summary.json +46 -19
- package/testeranto.config.ts +18 -30
- package/dist/cjs-shim.js +0 -12
- package/dist/common/design-editor/DesignEditor.js +0 -77
- package/dist/common/design-editor/index.js +0 -18
- package/dist/common/design-editor/server.js +0 -98
- package/dist/common/design-editor/types.js +0 -2
- package/dist/common/package.json +0 -3
- package/dist/common/src/App.js +0 -219
- package/dist/common/src/CoreTypes.js +0 -2
- package/dist/common/src/Init.js +0 -48
- package/dist/common/src/Node.js +0 -40
- package/dist/common/src/NodeSidecar.js +0 -15
- package/dist/common/src/PM/PM_WithBuild.js +0 -135
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +0 -204
- package/dist/common/src/PM/PM_WithGit.js +0 -517
- package/dist/common/src/PM/PM_WithProcesses.js +0 -519
- package/dist/common/src/PM/PM_WithWebSocket.js +0 -535
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +0 -108
- package/dist/common/src/PM/__tests__/pureSidecar.testeranto.js +0 -93
- package/dist/common/src/PM/__tests__/webSidecar.testeranto.js +0 -93
- package/dist/common/src/PM/base.js +0 -319
- package/dist/common/src/PM/index.js +0 -6
- package/dist/common/src/PM/main.js +0 -672
- package/dist/common/src/PM/metafileOutputs.js +0 -78
- package/dist/common/src/PM/node.js +0 -179
- package/dist/common/src/PM/nodeSidecar.js +0 -65
- package/dist/common/src/PM/pitonoRunner.js +0 -54
- package/dist/common/src/PM/pure.js +0 -103
- package/dist/common/src/PM/pureSidecar.js +0 -48
- package/dist/common/src/PM/sidecar.js +0 -11
- package/dist/common/src/PM/types.js +0 -2
- package/dist/common/src/PM/utils.js +0 -210
- package/dist/common/src/PM/web.js +0 -106
- package/dist/common/src/PM/webSidecar.js +0 -47
- package/dist/common/src/Pure.js +0 -52
- package/dist/common/src/Pure.test.js +0 -180
- package/dist/common/src/PureSidecar.js +0 -13
- package/dist/common/src/ReportServer.js +0 -1
- package/dist/common/src/ReportServer.test.ts/index.js +0 -78
- package/dist/common/src/ReportServerLib.js +0 -1
- package/dist/common/src/Types.js +0 -2
- package/dist/common/src/Web.js +0 -61
- package/dist/common/src/WebSidecar.js +0 -14
- package/dist/common/src/components/DesignEditorPage.js +0 -205
- package/dist/common/src/components/SunriseAnimation.js +0 -291
- package/dist/common/src/components/SunriseAnimation.test/implementation.js +0 -1
- package/dist/common/src/components/SunriseAnimation.test/index.js +0 -1
- package/dist/common/src/components/SunriseAnimation.test/interface.js +0 -68
- package/dist/common/src/components/SunriseAnimation.test/specification.js +0 -1
- package/dist/common/src/components/SunriseAnimation.test/types.js +0 -2
- package/dist/common/src/components/TestStatusBadge.js +0 -35
- package/dist/common/src/components/pure/AppFrame.js +0 -81
- package/dist/common/src/components/pure/AppFrame.test/implementation.js +0 -63
- package/dist/common/src/components/pure/AppFrame.test/index.js +0 -14
- package/dist/common/src/components/pure/AppFrame.test/specification.js +0 -25
- package/dist/common/src/components/pure/AppFrame.test/types.js +0 -3
- package/dist/common/src/components/pure/ArtifactTree.js +0 -80
- package/dist/common/src/components/pure/BuildLogViewer.js +0 -106
- package/dist/common/src/components/pure/DebugEnv.js +0 -30
- package/dist/common/src/components/pure/FeaturesReporterView.js +0 -23
- package/dist/common/src/components/pure/FeaturesReporterView.test/implementation.js +0 -84
- package/dist/common/src/components/pure/FeaturesReporterView.test/index.js +0 -14
- package/dist/common/src/components/pure/FeaturesReporterView.test/specification.js +0 -27
- package/dist/common/src/components/pure/FeaturesReporterView.test/types.js +0 -2
- package/dist/common/src/components/pure/FileTree.js +0 -34
- package/dist/common/src/components/pure/FileTreeItem.js +0 -29
- package/dist/common/src/components/pure/GitHubLoginButton.js +0 -18
- package/dist/common/src/components/pure/GitIntegrationView.js +0 -342
- package/dist/common/src/components/pure/ModalContent.js +0 -86
- package/dist/common/src/components/pure/ModalContent.test/implementation.js +0 -35
- package/dist/common/src/components/pure/ModalContent.test/index.js +0 -58
- package/dist/common/src/components/pure/ModalContent.test/specification.js +0 -19
- package/dist/common/src/components/pure/ModalContent.test/types.js +0 -4
- package/dist/common/src/components/pure/NavBar.js +0 -44
- package/dist/common/src/components/pure/ProcessManager.js +0 -113
- package/dist/common/src/components/pure/ProcessManagerView.js +0 -236
- package/dist/common/src/components/pure/ProjectPageView.js +0 -68
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +0 -184
- package/dist/common/src/components/pure/ProjectPageView.test/index.js +0 -14
- package/dist/common/src/components/pure/ProjectPageView.test/specification.js +0 -32
- package/dist/common/src/components/pure/ProjectPageView.test/types.js +0 -4
- package/dist/common/src/components/pure/ProjectsPageView.js +0 -72
- package/dist/common/src/components/pure/Settings.js +0 -121
- package/dist/common/src/components/pure/Settings.test.js +0 -34
- package/dist/common/src/components/pure/SettingsButton.js +0 -13
- package/dist/common/src/components/pure/SignIn.js +0 -22
- package/dist/common/src/components/pure/SingleProcessView.js +0 -167
- package/dist/common/src/components/pure/TestPageView.js +0 -373
- package/dist/common/src/components/pure/TestPageView.test/implementation.js +0 -157
- package/dist/common/src/components/pure/TestPageView.test/index.js +0 -15
- package/dist/common/src/components/pure/TestPageView.test/specification.js +0 -26
- package/dist/common/src/components/pure/TestPageView.test/types.js +0 -4
- package/dist/common/src/components/pure/TestPageView_utils.js +0 -117
- package/dist/common/src/components/pure/TestTable.js +0 -33
- package/dist/common/src/components/pure/ThemeCard.js +0 -15
- package/dist/common/src/components/pure/ToastNotification.js +0 -14
- package/dist/common/src/components/pure/UserProfile.js +0 -27
- package/dist/common/src/components/stateful/AuthCallbackPage.js +0 -51
- package/dist/common/src/components/stateful/FeaturesReporter.js +0 -60
- package/dist/common/src/components/stateful/FileTree.js +0 -59
- package/dist/common/src/components/stateful/GitIntegrationPage.js +0 -12
- package/dist/common/src/components/stateful/ProcessManagerPage.js +0 -110
- package/dist/common/src/components/stateful/ProjectPage.js +0 -102
- package/dist/common/src/components/stateful/ProjectsPage.js +0 -116
- package/dist/common/src/components/stateful/SettingsPage.js +0 -72
- package/dist/common/src/components/stateful/SingleProcessPage.js +0 -137
- package/dist/common/src/components/stateful/TestPage.js +0 -270
- package/dist/common/src/components/stateful/TextEditorPage.js +0 -154
- package/dist/common/src/defaultConfig.js +0 -19
- package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +0 -38
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -21
- package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
- package/dist/common/src/esbuildConfigs/index.js +0 -21
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -30
- package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -24
- package/dist/common/src/esbuildConfigs/node.js +0 -24
- package/dist/common/src/esbuildConfigs/pure.js +0 -42
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +0 -19
- package/dist/common/src/esbuildConfigs/web.js +0 -48
- package/dist/common/src/hooks/useGitMode.js +0 -21
- package/dist/common/src/init-docs.js +0 -9
- package/dist/common/src/lib/BaseGiven.js +0 -99
- package/dist/common/src/lib/BaseSuite.js +0 -91
- package/dist/common/src/lib/BaseSuite.test/mock.js +0 -68
- package/dist/common/src/lib/BaseSuite.test/node.test.js +0 -10
- package/dist/common/src/lib/BaseSuite.test/pure.test.js +0 -10
- package/dist/common/src/lib/BaseSuite.test/test.js +0 -229
- package/dist/common/src/lib/BaseSuite.test/web.test.js +0 -10
- package/dist/common/src/lib/BaseThen.js +0 -64
- package/dist/common/src/lib/BaseWhen.js +0 -45
- package/dist/common/src/lib/Sidecar.js +0 -7
- package/dist/common/src/lib/Tiposkripto.js +0 -173
- package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -180
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -29
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -213
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.js +0 -11
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -50
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -2
- package/dist/common/src/lib/abstractBase.test/MockGiven.js +0 -24
- package/dist/common/src/lib/abstractBase.test/MockThen.js +0 -16
- package/dist/common/src/lib/abstractBase.test/MockWhen.js +0 -20
- package/dist/common/src/lib/abstractBase.test/adapter.js +0 -24
- package/dist/common/src/lib/abstractBase.test/implementation.js +0 -38
- package/dist/common/src/lib/abstractBase.test/index.js +0 -18
- package/dist/common/src/lib/abstractBase.test/specification.js +0 -19
- package/dist/common/src/lib/abstractBase.test/types.js +0 -2
- package/dist/common/src/lib/index.js +0 -31
- package/dist/common/src/lib/pmProxy.js +0 -293
- package/dist/common/src/lib/pmProxy.test/adapter.js +0 -54
- package/dist/common/src/lib/pmProxy.test/implementation.js +0 -137
- package/dist/common/src/lib/pmProxy.test/index.js +0 -15
- package/dist/common/src/lib/pmProxy.test/mockPM.js +0 -34
- package/dist/common/src/lib/pmProxy.test/mockPMBase.js +0 -131
- package/dist/common/src/lib/pmProxy.test/specification.js +0 -179
- package/dist/common/src/lib/pmProxy.test/types.js +0 -2
- package/dist/common/src/lib/types.js +0 -3
- package/dist/common/src/mothership/index.js +0 -21
- package/dist/common/src/mothership/test.js +0 -83
- package/dist/common/src/run.js +0 -49
- package/dist/common/src/services/FileService.js +0 -505
- package/dist/common/src/services/GitHubAuthService.js +0 -184
- package/dist/common/src/testeranto.js +0 -224
- package/dist/common/src/types/features.js +0 -34
- package/dist/common/src/utils/api.js +0 -93
- package/dist/common/src/utils/buildTemplates.js +0 -37
- package/dist/common/src/utils/featureUtils.js +0 -29
- package/dist/common/src/utils/gitTest.js +0 -27
- package/dist/common/src/utils/golingvuMetafile.js +0 -116
- package/dist/common/src/utils/logFiles.js +0 -52
- package/dist/common/src/utils/makePrompt.js +0 -116
- package/dist/common/src/utils/pitonoMetafile.js +0 -67
- package/dist/common/src/utils/queue.js +0 -36
- package/dist/common/src/utils.js +0 -143
- package/dist/common/src/web.html.js +0 -18
- package/dist/common/testeranto.config.js +0 -102
- package/dist/common/tsconfig.common.tsbuildinfo +0 -1
- package/dist/module/design-editor/DesignEditor.js +0 -40
- package/dist/module/design-editor/index.js +0 -2
- package/dist/module/design-editor/server.js +0 -92
- package/dist/module/design-editor/types.js +0 -1
- package/dist/module/package.json +0 -3
- package/dist/module/src/App.js +0 -176
- package/dist/module/src/CoreTypes.js +0 -1
- package/dist/module/src/Init.js +0 -43
- package/dist/module/src/Node.js +0 -33
- package/dist/module/src/NodeSidecar.js +0 -11
- package/dist/module/src/PM/PM_WithBuild.js +0 -128
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +0 -197
- package/dist/module/src/PM/PM_WithGit.js +0 -477
- package/dist/module/src/PM/PM_WithProcesses.js +0 -479
- package/dist/module/src/PM/PM_WithWebSocket.js +0 -528
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +0 -103
- package/dist/module/src/PM/__tests__/pureSidecar.testeranto.js +0 -88
- package/dist/module/src/PM/__tests__/webSidecar.testeranto.js +0 -88
- package/dist/module/src/PM/base.js +0 -312
- package/dist/module/src/PM/index.js +0 -2
- package/dist/module/src/PM/main.js +0 -632
- package/dist/module/src/PM/metafileOutputs.js +0 -78
- package/dist/module/src/PM/node.js +0 -172
- package/dist/module/src/PM/nodeSidecar.js +0 -58
- package/dist/module/src/PM/pitonoRunner.js +0 -47
- package/dist/module/src/PM/pure.js +0 -99
- package/dist/module/src/PM/pureSidecar.js +0 -41
- package/dist/module/src/PM/sidecar.js +0 -7
- package/dist/module/src/PM/types.js +0 -1
- package/dist/module/src/PM/utils.js +0 -196
- package/dist/module/src/PM/web.js +0 -102
- package/dist/module/src/PM/webSidecar.js +0 -40
- package/dist/module/src/Pure.js +0 -45
- package/dist/module/src/Pure.test.js +0 -175
- package/dist/module/src/PureSidecar.js +0 -9
- package/dist/module/src/ReportServer.js +0 -1
- package/dist/module/src/ReportServer.test.ts/index.js +0 -73
- package/dist/module/src/ReportServerLib.js +0 -1
- package/dist/module/src/Types.js +0 -1
- package/dist/module/src/Web.js +0 -54
- package/dist/module/src/WebSidecar.js +0 -10
- package/dist/module/src/components/DesignEditorPage.js +0 -168
- package/dist/module/src/components/SunriseAnimation.js +0 -256
- package/dist/module/src/components/SunriseAnimation.test/implementation.js +0 -1
- package/dist/module/src/components/SunriseAnimation.test/index.js +0 -1
- package/dist/module/src/components/SunriseAnimation.test/interface.js +0 -32
- package/dist/module/src/components/SunriseAnimation.test/specification.js +0 -1
- package/dist/module/src/components/SunriseAnimation.test/types.js +0 -1
- package/dist/module/src/components/TestStatusBadge.js +0 -28
- package/dist/module/src/components/pure/AppFrame.js +0 -74
- package/dist/module/src/components/pure/AppFrame.test/implementation.js +0 -57
- package/dist/module/src/components/pure/AppFrame.test/index.js +0 -9
- package/dist/module/src/components/pure/AppFrame.test/specification.js +0 -21
- package/dist/module/src/components/pure/AppFrame.test/types.js +0 -2
- package/dist/module/src/components/pure/ArtifactTree.js +0 -80
- package/dist/module/src/components/pure/BuildLogViewer.js +0 -99
- package/dist/module/src/components/pure/DebugEnv.js +0 -23
- package/dist/module/src/components/pure/FeaturesReporterView.js +0 -16
- package/dist/module/src/components/pure/FeaturesReporterView.test/implementation.js +0 -81
- package/dist/module/src/components/pure/FeaturesReporterView.test/index.js +0 -9
- package/dist/module/src/components/pure/FeaturesReporterView.test/specification.js +0 -23
- package/dist/module/src/components/pure/FeaturesReporterView.test/types.js +0 -1
- package/dist/module/src/components/pure/FileTree.js +0 -27
- package/dist/module/src/components/pure/FileTreeItem.js +0 -22
- package/dist/module/src/components/pure/GitHubLoginButton.js +0 -11
- package/dist/module/src/components/pure/GitIntegrationView.js +0 -305
- package/dist/module/src/components/pure/ModalContent.js +0 -79
- package/dist/module/src/components/pure/ModalContent.test/implementation.js +0 -32
- package/dist/module/src/components/pure/ModalContent.test/index.js +0 -53
- package/dist/module/src/components/pure/ModalContent.test/specification.js +0 -15
- package/dist/module/src/components/pure/ModalContent.test/types.js +0 -3
- package/dist/module/src/components/pure/NavBar.js +0 -37
- package/dist/module/src/components/pure/ProcessManager.js +0 -76
- package/dist/module/src/components/pure/ProcessManagerView.js +0 -199
- package/dist/module/src/components/pure/ProjectPageView.js +0 -61
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +0 -181
- package/dist/module/src/components/pure/ProjectPageView.test/index.js +0 -9
- package/dist/module/src/components/pure/ProjectPageView.test/specification.js +0 -28
- package/dist/module/src/components/pure/ProjectPageView.test/types.js +0 -3
- package/dist/module/src/components/pure/ProjectsPageView.js +0 -65
- package/dist/module/src/components/pure/Settings.js +0 -84
- package/dist/module/src/components/pure/Settings.test.js +0 -29
- package/dist/module/src/components/pure/SettingsButton.js +0 -6
- package/dist/module/src/components/pure/SignIn.js +0 -15
- package/dist/module/src/components/pure/SingleProcessView.js +0 -130
- package/dist/module/src/components/pure/TestPageView.js +0 -336
- package/dist/module/src/components/pure/TestPageView.test/implementation.js +0 -121
- package/dist/module/src/components/pure/TestPageView.test/index.js +0 -10
- package/dist/module/src/components/pure/TestPageView.test/specification.js +0 -22
- package/dist/module/src/components/pure/TestPageView.test/types.js +0 -3
- package/dist/module/src/components/pure/TestPageView_utils.js +0 -109
- package/dist/module/src/components/pure/TestTable.js +0 -26
- package/dist/module/src/components/pure/ThemeCard.js +0 -8
- package/dist/module/src/components/pure/ToastNotification.js +0 -7
- package/dist/module/src/components/pure/UserProfile.js +0 -20
- package/dist/module/src/components/stateful/AuthCallbackPage.js +0 -14
- package/dist/module/src/components/stateful/FeaturesReporter.js +0 -23
- package/dist/module/src/components/stateful/FileTree.js +0 -59
- package/dist/module/src/components/stateful/GitIntegrationPage.js +0 -5
- package/dist/module/src/components/stateful/ProcessManagerPage.js +0 -73
- package/dist/module/src/components/stateful/ProjectPage.js +0 -65
- package/dist/module/src/components/stateful/ProjectsPage.js +0 -79
- package/dist/module/src/components/stateful/SettingsPage.js +0 -35
- package/dist/module/src/components/stateful/SingleProcessPage.js +0 -100
- package/dist/module/src/components/stateful/TestPage.js +0 -233
- package/dist/module/src/components/stateful/TextEditorPage.js +0 -117
- package/dist/module/src/defaultConfig.js +0 -17
- package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +0 -32
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -18
- package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
- package/dist/module/src/esbuildConfigs/index.js +0 -19
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -25
- package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -21
- package/dist/module/src/esbuildConfigs/node.js +0 -19
- package/dist/module/src/esbuildConfigs/pure.js +0 -37
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +0 -14
- package/dist/module/src/esbuildConfigs/web.js +0 -43
- package/dist/module/src/hooks/useGitMode.js +0 -17
- package/dist/module/src/init-docs.js +0 -4
- package/dist/module/src/lib/BaseGiven.js +0 -95
- package/dist/module/src/lib/BaseSuite.js +0 -87
- package/dist/module/src/lib/BaseSuite.test/mock.js +0 -61
- package/dist/module/src/lib/BaseSuite.test/node.test.js +0 -5
- package/dist/module/src/lib/BaseSuite.test/pure.test.js +0 -5
- package/dist/module/src/lib/BaseSuite.test/test.js +0 -225
- package/dist/module/src/lib/BaseSuite.test/web.test.js +0 -5
- package/dist/module/src/lib/BaseThen.js +0 -60
- package/dist/module/src/lib/BaseWhen.js +0 -41
- package/dist/module/src/lib/Sidecar.js +0 -3
- package/dist/module/src/lib/Tiposkripto.js +0 -170
- package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +0 -173
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +0 -26
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +0 -210
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.js +0 -6
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +0 -46
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.types.js +0 -1
- package/dist/module/src/lib/abstractBase.test/MockGiven.js +0 -20
- package/dist/module/src/lib/abstractBase.test/MockThen.js +0 -12
- package/dist/module/src/lib/abstractBase.test/MockWhen.js +0 -16
- package/dist/module/src/lib/abstractBase.test/adapter.js +0 -21
- package/dist/module/src/lib/abstractBase.test/implementation.js +0 -35
- package/dist/module/src/lib/abstractBase.test/index.js +0 -13
- package/dist/module/src/lib/abstractBase.test/specification.js +0 -15
- package/dist/module/src/lib/abstractBase.test/types.js +0 -1
- package/dist/module/src/lib/index.js +0 -26
- package/dist/module/src/lib/pmProxy.js +0 -284
- package/dist/module/src/lib/pmProxy.test/adapter.js +0 -51
- package/dist/module/src/lib/pmProxy.test/implementation.js +0 -134
- package/dist/module/src/lib/pmProxy.test/index.js +0 -10
- package/dist/module/src/lib/pmProxy.test/mockPM.js +0 -30
- package/dist/module/src/lib/pmProxy.test/mockPMBase.js +0 -127
- package/dist/module/src/lib/pmProxy.test/specification.js +0 -175
- package/dist/module/src/lib/pmProxy.test/types.js +0 -1
- package/dist/module/src/lib/types.js +0 -2
- package/dist/module/src/mothership/index.js +0 -16
- package/dist/module/src/mothership/test.js +0 -78
- package/dist/module/src/run.js +0 -49
- package/dist/module/src/services/FileService.js +0 -468
- package/dist/module/src/services/GitHubAuthService.js +0 -180
- package/dist/module/src/testeranto.js +0 -186
- package/dist/module/src/types/features.js +0 -31
- package/dist/module/src/utils/api.js +0 -87
- package/dist/module/src/utils/buildTemplates.js +0 -33
- package/dist/module/src/utils/featureUtils.js +0 -24
- package/dist/module/src/utils/gitTest.js +0 -23
- package/dist/module/src/utils/golingvuMetafile.js +0 -109
- package/dist/module/src/utils/logFiles.js +0 -47
- package/dist/module/src/utils/makePrompt.js +0 -109
- package/dist/module/src/utils/pitonoMetafile.js +0 -60
- package/dist/module/src/utils/queue.js +0 -32
- package/dist/module/src/utils.js +0 -130
- package/dist/module/src/web.html.js +0 -16
- package/dist/module/testeranto.config.js +0 -100
- package/dist/module/tsconfig.module.tsbuildinfo +0 -1
- package/dist/types/design-editor/DesignEditor.d.ts +0 -1
- package/dist/types/src/App.d.ts +0 -19
- package/dist/types/src/CoreTypes.d.ts +0 -52
- package/dist/types/src/Init.d.ts +0 -2
- package/dist/types/src/Node.d.ts +0 -9
- package/dist/types/src/NodeSidecar.d.ts +0 -6
- package/dist/types/src/PM/PM_WithBuild.d.ts +0 -13
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +0 -22
- package/dist/types/src/PM/PM_WithGit.d.ts +0 -27
- package/dist/types/src/PM/PM_WithProcesses.d.ts +0 -29
- package/dist/types/src/PM/PM_WithWebSocket.d.ts +0 -108
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +0 -2
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +0 -2
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +0 -2
- package/dist/types/src/PM/base.d.ts +0 -35
- package/dist/types/src/PM/index.d.ts +0 -35
- package/dist/types/src/PM/main.d.ts +0 -8
- package/dist/types/src/PM/node.d.ts +0 -38
- package/dist/types/src/PM/nodeSidecar.d.ts +0 -13
- package/dist/types/src/PM/pitonoRunner.d.ts +0 -7
- package/dist/types/src/PM/pure.d.ts +0 -41
- package/dist/types/src/PM/pureSidecar.d.ts +0 -11
- package/dist/types/src/PM/sidecar.d.ts +0 -8
- package/dist/types/src/PM/types.d.ts +0 -118
- package/dist/types/src/PM/utils.d.ts +0 -35
- package/dist/types/src/PM/web.d.ts +0 -41
- package/dist/types/src/PM/webSidecar.d.ts +0 -11
- package/dist/types/src/Pure.d.ts +0 -14
- package/dist/types/src/Pure.test.d.ts +0 -2
- package/dist/types/src/PureSidecar.d.ts +0 -8
- package/dist/types/src/ReportServer.test.ts/index.d.ts +0 -2
- package/dist/types/src/Types.d.ts +0 -119
- package/dist/types/src/Web.d.ts +0 -9
- package/dist/types/src/WebSidecar.d.ts +0 -8
- package/dist/types/src/components/DesignEditorPage.d.ts +0 -1
- package/dist/types/src/components/SunriseAnimation.d.ts +0 -5
- package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -11
- package/dist/types/src/components/SunriseAnimation.test/types.d.ts +0 -39
- package/dist/types/src/components/TestStatusBadge.d.ts +0 -15
- package/dist/types/src/components/pure/AppFrame.d.ts +0 -11
- package/dist/types/src/components/pure/AppFrame.test/implementation.d.ts +0 -3
- package/dist/types/src/components/pure/AppFrame.test/index.d.ts +0 -3
- package/dist/types/src/components/pure/AppFrame.test/specification.d.ts +0 -3
- package/dist/types/src/components/pure/AppFrame.test/types.d.ts +0 -33
- package/dist/types/src/components/pure/BuildLogViewer.d.ts +0 -7
- package/dist/types/src/components/pure/DebugEnv.d.ts +0 -2
- package/dist/types/src/components/pure/FeaturesReporterView.d.ts +0 -7
- package/dist/types/src/components/pure/FeaturesReporterView.test/implementation.d.ts +0 -3
- package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/FeaturesReporterView.test/specification.d.ts +0 -3
- package/dist/types/src/components/pure/FeaturesReporterView.test/types.d.ts +0 -54
- package/dist/types/src/components/pure/FileTree.d.ts +0 -6
- package/dist/types/src/components/pure/FileTreeItem.d.ts +0 -8
- package/dist/types/src/components/pure/GitHubLoginButton.d.ts +0 -8
- package/dist/types/src/components/pure/GitIntegrationView.d.ts +0 -1
- package/dist/types/src/components/pure/ModalContent.d.ts +0 -7
- package/dist/types/src/components/pure/ModalContent.test/implementation.d.ts +0 -3
- package/dist/types/src/components/pure/ModalContent.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/ModalContent.test/specification.d.ts +0 -3
- package/dist/types/src/components/pure/ModalContent.test/types.d.ts +0 -45
- package/dist/types/src/components/pure/NavBar.d.ts +0 -23
- package/dist/types/src/components/pure/ProcessManager.d.ts +0 -8
- package/dist/types/src/components/pure/ProcessManagerView.d.ts +0 -20
- package/dist/types/src/components/pure/ProjectPageView.d.ts +0 -14
- package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +0 -3
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +0 -3
- package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +0 -57
- package/dist/types/src/components/pure/ProjectsPageView.d.ts +0 -29
- package/dist/types/src/components/pure/Settings.d.ts +0 -1
- package/dist/types/src/components/pure/Settings.test.d.ts +0 -1
- package/dist/types/src/components/pure/SettingsButton.d.ts +0 -2
- package/dist/types/src/components/pure/SignIn.d.ts +0 -1
- package/dist/types/src/components/pure/SingleProcessView.d.ts +0 -10
- package/dist/types/src/components/pure/TestPageView.d.ts +0 -16
- package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +0 -12
- package/dist/types/src/components/pure/TestPageView.test/index.d.ts +0 -3
- package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +0 -11
- package/dist/types/src/components/pure/TestPageView.test/types.d.ts +0 -65
- package/dist/types/src/components/pure/TestPageView_utils.d.ts +0 -23
- package/dist/types/src/components/pure/TestTable.d.ts +0 -16
- package/dist/types/src/components/pure/ThemeCard.d.ts +0 -9
- package/dist/types/src/components/pure/ToastNotification.d.ts +0 -6
- package/dist/types/src/components/pure/UserProfile.d.ts +0 -2
- package/dist/types/src/components/stateful/AuthCallbackPage.d.ts +0 -2
- package/dist/types/src/components/stateful/FeaturesReporter.d.ts +0 -2
- package/dist/types/src/components/stateful/GitIntegrationPage.d.ts +0 -1
- package/dist/types/src/components/stateful/ProcessManagerPage.d.ts +0 -2
- package/dist/types/src/components/stateful/ProjectPage.d.ts +0 -1
- package/dist/types/src/components/stateful/ProjectsPage.d.ts +0 -1
- package/dist/types/src/components/stateful/SettingsPage.d.ts +0 -2
- package/dist/types/src/components/stateful/SingleProcessPage.d.ts +0 -2
- package/dist/types/src/components/stateful/TestPage.d.ts +0 -1
- package/dist/types/src/components/stateful/TextEditorPage.d.ts +0 -1
- package/dist/types/src/defaultConfig.d.ts +0 -3
- package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
- package/dist/types/src/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
- package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +0 -2
- package/dist/types/src/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/pure.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +0 -6
- package/dist/types/src/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/src/hooks/useGitMode.d.ts +0 -7
- package/dist/types/src/init-docs.d.ts +0 -1
- package/dist/types/src/lib/BaseGiven.d.ts +0 -44
- package/dist/types/src/lib/BaseSuite.d.ts +0 -46
- package/dist/types/src/lib/BaseSuite.test/mock.d.ts +0 -21
- package/dist/types/src/lib/BaseSuite.test/node.test.d.ts +0 -2
- package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +0 -2
- package/dist/types/src/lib/BaseSuite.test/test.d.ts +0 -37
- package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +0 -2
- package/dist/types/src/lib/BaseThen.d.ts +0 -27
- package/dist/types/src/lib/BaseWhen.d.ts +0 -27
- package/dist/types/src/lib/Sidecar.d.ts +0 -5
- package/dist/types/src/lib/Tiposkripto.d.ts +0 -37
- package/dist/types/src/lib/Tiposkripto.test/MockTiposkripto.d.ts +0 -18
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.adapter.d.ts +0 -3
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.d.ts +0 -2
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.implementation.d.ts +0 -3
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.specification.d.ts +0 -3
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.types.d.ts +0 -58
- package/dist/types/src/lib/abstractBase.test/MockGiven.d.ts +0 -9
- package/dist/types/src/lib/abstractBase.test/MockThen.d.ts +0 -6
- package/dist/types/src/lib/abstractBase.test/MockWhen.d.ts +0 -6
- package/dist/types/src/lib/abstractBase.test/adapter.d.ts +0 -3
- package/dist/types/src/lib/abstractBase.test/implementation.d.ts +0 -3
- package/dist/types/src/lib/abstractBase.test/index.d.ts +0 -2
- package/dist/types/src/lib/abstractBase.test/specification.d.ts +0 -3
- package/dist/types/src/lib/abstractBase.test/types.d.ts +0 -39
- package/dist/types/src/lib/index.d.ts +0 -73
- package/dist/types/src/lib/pmProxy.d.ts +0 -12
- package/dist/types/src/lib/pmProxy.test/adapter.d.ts +0 -3
- package/dist/types/src/lib/pmProxy.test/implementation.d.ts +0 -3
- package/dist/types/src/lib/pmProxy.test/index.d.ts +0 -6
- package/dist/types/src/lib/pmProxy.test/mockPM.d.ts +0 -10
- package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +0 -40
- package/dist/types/src/lib/pmProxy.test/specification.d.ts +0 -3
- package/dist/types/src/lib/pmProxy.test/types.d.ts +0 -42
- package/dist/types/src/lib/types.d.ts +0 -24
- package/dist/types/src/mothership/index.d.ts +0 -2
- package/dist/types/src/mothership/test.d.ts +0 -2
- package/dist/types/src/services/FileService.d.ts +0 -34
- package/dist/types/src/services/GitHubAuthService.d.ts +0 -32
- package/dist/types/src/testeranto.d.ts +0 -1
- package/dist/types/src/types/features.d.ts +0 -7
- package/dist/types/src/utils/api.d.ts +0 -10
- package/dist/types/src/utils/buildTemplates.d.ts +0 -1
- package/dist/types/src/utils/featureUtils.d.ts +0 -6
- package/dist/types/src/utils/gitTest.d.ts +0 -11
- package/dist/types/src/utils/golingvuMetafile.d.ts +0 -19
- package/dist/types/src/utils/logFiles.d.ts +0 -75
- package/dist/types/src/utils/makePrompt.d.ts +0 -2
- package/dist/types/src/utils/pitonoMetafile.d.ts +0 -7
- package/dist/types/src/utils/queue.d.ts +0 -11
- package/dist/types/src/utils.d.ts +0 -20
- package/dist/types/src/web.html.d.ts +0 -2
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- package/example/__pycache__/Calculator.cpython-313.pyc +0 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/README.md +0 -187
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_given.go +0 -163
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_suite.go +0 -85
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_then.go +0 -21
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_when.go +0 -21
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/golingvu.go +0 -554
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/test_adapter.go +0 -33
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/types.go +0 -72
- package/example/vendor/modules.txt +0 -5
- package/pitono/__init__.py +0 -54
- package/pitono/types.py +0 -78
- package/src/PM/metafileOutputs.ts +0 -90
- package/src/golingvu/base_suite_test.go +0 -197
- package/src/pitono/PM/__pycache__/python.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/Pitono.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_given.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_suite.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_then.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_when.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/core_generator.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/simple_adapter.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/types.cpython-313.pyc +0 -0
- package/src/templates/frontpage.html +0 -340
- package/src/templates/frontpage.md +0 -79
- package/testeranto/bundles/golang/core/Calculator.golingvu.golingvu.go +0 -53
- package/testeranto/bundles/node/core/chunk-VXVF7WFO.mjs +0 -4321
- package/testeranto/bundles/node/core/example/Calculator.test.mjs +0 -503
- package/testeranto/bundles/python/core/Calculator.pitono.test.py +0 -24
- package/testeranto/bundles/python/core/test_example.py +0 -24
- package/testeranto/bundles/web/core/chunk-DFRN4SYZ.mjs +0 -2297
- package/testeranto/bundles/web/core/chunk-Q5TONB2Z.mjs +0 -6874
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +0 -11697
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +0 -336
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +0 -68
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -88
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -29
- /package/{pitono → src/pitono}/core_generator.py +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/dependency_links.txt +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/entry_points.txt +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/top_level.txt +0 -0
- /package/{pitono → src/pitono}/pyproject.toml +0 -0
- /package/{pitono → src/pitono}/setup.py +0 -0
- /package/{pitono → src/pitono}/simple_adapter.py +0 -0
- /package/{dist/types/src/PM/metafileOutputs.d.ts → testeranto/helpo_chat_message.txt} +0 -0
- /package/{dist/types/src/ReportServer.d.ts → testeranto/reports/core/example/test_example/python/stdout.log} +0 -0
- /package/{dist/types/src/ReportServerLib.d.ts → testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/lint_errors.txt} +0 -0
- /package/{dist/types/src/components/SunriseAnimation.test/implementation.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/debug.log} +0 -0
- /package/{dist/types/src/components/SunriseAnimation.test/index.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/error.log} +0 -0
- /package/{dist/types/src/components/SunriseAnimation.test/specification.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/exit.log} +0 -0
- /package/{dist/types/src/components/pure/ArtifactTree.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/info.log} +0 -0
- /package/{dist/types/src/components/stateful/FileTree.d.ts → testeranto/reports/core/src/components/pure/ModalContent.test/index/web/warn.log} +0 -0
- /package/{dist/types/src/run.d.ts → testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/lint_errors.txt} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
init_buffer,
|
|
7
7
|
init_dirname,
|
|
8
8
|
init_process
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ME6I6FJZ.mjs";
|
|
10
10
|
|
|
11
11
|
// node_modules/react/cjs/react.development.js
|
|
12
12
|
var require_react_development = __commonJS({
|
|
@@ -224,20 +224,20 @@ var require_react_development = __commonJS({
|
|
|
224
224
|
{
|
|
225
225
|
Object.freeze(emptyObject);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Component5(props, context, updater) {
|
|
228
228
|
this.props = props;
|
|
229
229
|
this.context = context;
|
|
230
230
|
this.refs = emptyObject;
|
|
231
231
|
this.updater = updater || ReactNoopUpdateQueue;
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
Component5.prototype.isReactComponent = {};
|
|
234
|
+
Component5.prototype.setState = function(partialState, callback) {
|
|
235
235
|
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
|
|
236
236
|
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
237
237
|
}
|
|
238
238
|
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
239
239
|
};
|
|
240
|
-
|
|
240
|
+
Component5.prototype.forceUpdate = function(callback) {
|
|
241
241
|
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
242
242
|
};
|
|
243
243
|
{
|
|
@@ -246,7 +246,7 @@ var require_react_development = __commonJS({
|
|
|
246
246
|
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
247
247
|
};
|
|
248
248
|
var defineDeprecationWarning = function(methodName, info) {
|
|
249
|
-
Object.defineProperty(
|
|
249
|
+
Object.defineProperty(Component5.prototype, methodName, {
|
|
250
250
|
get: function() {
|
|
251
251
|
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
252
252
|
return void 0;
|
|
@@ -261,7 +261,7 @@ var require_react_development = __commonJS({
|
|
|
261
261
|
}
|
|
262
262
|
function ComponentDummy() {
|
|
263
263
|
}
|
|
264
|
-
ComponentDummy.prototype =
|
|
264
|
+
ComponentDummy.prototype = Component5.prototype;
|
|
265
265
|
function PureComponent(props, context, updater) {
|
|
266
266
|
this.props = props;
|
|
267
267
|
this.context = context;
|
|
@@ -270,7 +270,7 @@ var require_react_development = __commonJS({
|
|
|
270
270
|
}
|
|
271
271
|
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
272
272
|
pureComponentPrototype.constructor = PureComponent;
|
|
273
|
-
assign(pureComponentPrototype,
|
|
273
|
+
assign(pureComponentPrototype, Component5.prototype);
|
|
274
274
|
pureComponentPrototype.isPureReactComponent = true;
|
|
275
275
|
function createRef() {
|
|
276
276
|
var refObject = {
|
|
@@ -496,7 +496,7 @@ var require_react_development = __commonJS({
|
|
|
496
496
|
}
|
|
497
497
|
return element;
|
|
498
498
|
};
|
|
499
|
-
function
|
|
499
|
+
function createElement11(type3, config2, children) {
|
|
500
500
|
var propName;
|
|
501
501
|
var props = {};
|
|
502
502
|
var key = null;
|
|
@@ -564,7 +564,7 @@ var require_react_development = __commonJS({
|
|
|
564
564
|
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
565
565
|
return newElement;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function cloneElement2(element, config2, children) {
|
|
568
568
|
if (element === null || element === void 0) {
|
|
569
569
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
570
570
|
}
|
|
@@ -612,7 +612,7 @@ var require_react_development = __commonJS({
|
|
|
612
612
|
}
|
|
613
613
|
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function isValidElement2(object) {
|
|
616
616
|
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
617
617
|
}
|
|
618
618
|
var SEPARATOR = ".";
|
|
@@ -677,7 +677,7 @@ var require_react_development = __commonJS({
|
|
|
677
677
|
return c;
|
|
678
678
|
});
|
|
679
679
|
} else if (mappedChild != null) {
|
|
680
|
-
if (
|
|
680
|
+
if (isValidElement2(mappedChild)) {
|
|
681
681
|
{
|
|
682
682
|
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
|
683
683
|
checkKeyStringCoercion(mappedChild.key);
|
|
@@ -765,12 +765,12 @@ var require_react_development = __commonJS({
|
|
|
765
765
|
}) || [];
|
|
766
766
|
}
|
|
767
767
|
function onlyChild(children) {
|
|
768
|
-
if (!
|
|
768
|
+
if (!isValidElement2(children)) {
|
|
769
769
|
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
770
770
|
}
|
|
771
771
|
return children;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function createContext4(defaultValue) {
|
|
774
774
|
var context = {
|
|
775
775
|
$$typeof: REACT_CONTEXT_TYPE,
|
|
776
776
|
// As a workaround to support multiple concurrent renderers, we categorize
|
|
@@ -957,7 +957,7 @@ var require_react_development = __commonJS({
|
|
|
957
957
|
}
|
|
958
958
|
return lazyType;
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function forwardRef2(render) {
|
|
961
961
|
{
|
|
962
962
|
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
963
963
|
error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
|
|
@@ -1018,7 +1018,7 @@ var require_react_development = __commonJS({
|
|
|
1018
1018
|
}
|
|
1019
1019
|
return false;
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function memo2(type3, compare) {
|
|
1022
1022
|
{
|
|
1023
1023
|
if (!isValidElementType(type3)) {
|
|
1024
1024
|
error("memo: The first argument must be a component. Instead received: %s", type3 === null ? "null" : typeof type3);
|
|
@@ -1056,7 +1056,7 @@ var require_react_development = __commonJS({
|
|
|
1056
1056
|
}
|
|
1057
1057
|
return dispatcher;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function useContext6(Context) {
|
|
1060
1060
|
var dispatcher = resolveDispatcher();
|
|
1061
1061
|
{
|
|
1062
1062
|
if (Context._context !== void 0) {
|
|
@@ -1070,7 +1070,7 @@ var require_react_development = __commonJS({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
return dispatcher.useContext(Context);
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function useState5(initialState) {
|
|
1074
1074
|
var dispatcher = resolveDispatcher();
|
|
1075
1075
|
return dispatcher.useState(initialState);
|
|
1076
1076
|
}
|
|
@@ -1078,11 +1078,11 @@ var require_react_development = __commonJS({
|
|
|
1078
1078
|
var dispatcher = resolveDispatcher();
|
|
1079
1079
|
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function useRef5(initialValue) {
|
|
1082
1082
|
var dispatcher = resolveDispatcher();
|
|
1083
1083
|
return dispatcher.useRef(initialValue);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function useEffect6(create, deps) {
|
|
1086
1086
|
var dispatcher = resolveDispatcher();
|
|
1087
1087
|
return dispatcher.useEffect(create, deps);
|
|
1088
1088
|
}
|
|
@@ -1090,15 +1090,15 @@ var require_react_development = __commonJS({
|
|
|
1090
1090
|
var dispatcher = resolveDispatcher();
|
|
1091
1091
|
return dispatcher.useInsertionEffect(create, deps);
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function useLayoutEffect4(create, deps) {
|
|
1094
1094
|
var dispatcher = resolveDispatcher();
|
|
1095
1095
|
return dispatcher.useLayoutEffect(create, deps);
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function useCallback4(callback, deps) {
|
|
1098
1098
|
var dispatcher = resolveDispatcher();
|
|
1099
1099
|
return dispatcher.useCallback(callback, deps);
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function useMemo5(create, deps) {
|
|
1102
1102
|
var dispatcher = resolveDispatcher();
|
|
1103
1103
|
return dispatcher.useMemo(create, deps);
|
|
1104
1104
|
}
|
|
@@ -1120,7 +1120,7 @@ var require_react_development = __commonJS({
|
|
|
1120
1120
|
var dispatcher = resolveDispatcher();
|
|
1121
1121
|
return dispatcher.useDeferredValue(value);
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function useId2() {
|
|
1124
1124
|
var dispatcher = resolveDispatcher();
|
|
1125
1125
|
return dispatcher.useId();
|
|
1126
1126
|
}
|
|
@@ -1335,8 +1335,8 @@ var require_react_development = __commonJS({
|
|
|
1335
1335
|
return describeNativeComponentFrame(fn, false);
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
function shouldConstruct(
|
|
1339
|
-
var prototype =
|
|
1338
|
+
function shouldConstruct(Component6) {
|
|
1339
|
+
var prototype = Component6.prototype;
|
|
1340
1340
|
return !!(prototype && prototype.isReactComponent);
|
|
1341
1341
|
}
|
|
1342
1342
|
function describeUnknownElementTypeFrameInDEV(type3, source, ownerFn) {
|
|
@@ -1496,11 +1496,11 @@ var require_react_development = __commonJS({
|
|
|
1496
1496
|
if (isArray(node)) {
|
|
1497
1497
|
for (var i = 0; i < node.length; i++) {
|
|
1498
1498
|
var child = node[i];
|
|
1499
|
-
if (
|
|
1499
|
+
if (isValidElement2(child)) {
|
|
1500
1500
|
validateExplicitKey(child, parentType);
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
} else if (
|
|
1503
|
+
} else if (isValidElement2(node)) {
|
|
1504
1504
|
if (node._store) {
|
|
1505
1505
|
node._store.validated = true;
|
|
1506
1506
|
}
|
|
@@ -1511,7 +1511,7 @@ var require_react_development = __commonJS({
|
|
|
1511
1511
|
var iterator = iteratorFn.call(node);
|
|
1512
1512
|
var step;
|
|
1513
1513
|
while (!(step = iterator.next()).done) {
|
|
1514
|
-
if (
|
|
1514
|
+
if (isValidElement2(step.value)) {
|
|
1515
1515
|
validateExplicitKey(step.value, parentType);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
@@ -1595,7 +1595,7 @@ var require_react_development = __commonJS({
|
|
|
1595
1595
|
error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
|
-
var element =
|
|
1598
|
+
var element = createElement11.apply(this, arguments);
|
|
1599
1599
|
if (element == null) {
|
|
1600
1600
|
return element;
|
|
1601
1601
|
}
|
|
@@ -1634,14 +1634,14 @@ var require_react_development = __commonJS({
|
|
|
1634
1634
|
return validatedFactory;
|
|
1635
1635
|
}
|
|
1636
1636
|
function cloneElementWithValidation(element, props, children) {
|
|
1637
|
-
var newElement =
|
|
1637
|
+
var newElement = cloneElement2.apply(this, arguments);
|
|
1638
1638
|
for (var i = 2; i < arguments.length; i++) {
|
|
1639
1639
|
validateChildKeys(arguments[i], newElement.type);
|
|
1640
1640
|
}
|
|
1641
1641
|
validatePropTypes(newElement);
|
|
1642
1642
|
return newElement;
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function startTransition3(scope, options) {
|
|
1645
1645
|
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
1646
1646
|
ReactCurrentBatchConfig.transition = {};
|
|
1647
1647
|
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
@@ -1834,15 +1834,15 @@ var require_react_development = __commonJS({
|
|
|
1834
1834
|
var createElement$1 = createElementWithValidation;
|
|
1835
1835
|
var cloneElement$1 = cloneElementWithValidation;
|
|
1836
1836
|
var createFactory = createFactoryWithValidation;
|
|
1837
|
-
var
|
|
1837
|
+
var Children2 = {
|
|
1838
1838
|
map: mapChildren,
|
|
1839
1839
|
forEach: forEachChildren,
|
|
1840
1840
|
count: countChildren,
|
|
1841
1841
|
toArray,
|
|
1842
1842
|
only: onlyChild
|
|
1843
1843
|
};
|
|
1844
|
-
exports.Children =
|
|
1845
|
-
exports.Component =
|
|
1844
|
+
exports.Children = Children2;
|
|
1845
|
+
exports.Component = Component5;
|
|
1846
1846
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1847
1847
|
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1848
1848
|
exports.PureComponent = PureComponent;
|
|
@@ -1850,29 +1850,29 @@ var require_react_development = __commonJS({
|
|
|
1850
1850
|
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1851
1851
|
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
1852
1852
|
exports.cloneElement = cloneElement$1;
|
|
1853
|
-
exports.createContext =
|
|
1853
|
+
exports.createContext = createContext4;
|
|
1854
1854
|
exports.createElement = createElement$1;
|
|
1855
1855
|
exports.createFactory = createFactory;
|
|
1856
1856
|
exports.createRef = createRef;
|
|
1857
|
-
exports.forwardRef =
|
|
1858
|
-
exports.isValidElement =
|
|
1857
|
+
exports.forwardRef = forwardRef2;
|
|
1858
|
+
exports.isValidElement = isValidElement2;
|
|
1859
1859
|
exports.lazy = lazy;
|
|
1860
|
-
exports.memo =
|
|
1861
|
-
exports.startTransition =
|
|
1860
|
+
exports.memo = memo2;
|
|
1861
|
+
exports.startTransition = startTransition3;
|
|
1862
1862
|
exports.unstable_act = act;
|
|
1863
|
-
exports.useCallback =
|
|
1864
|
-
exports.useContext =
|
|
1863
|
+
exports.useCallback = useCallback4;
|
|
1864
|
+
exports.useContext = useContext6;
|
|
1865
1865
|
exports.useDebugValue = useDebugValue;
|
|
1866
1866
|
exports.useDeferredValue = useDeferredValue;
|
|
1867
|
-
exports.useEffect =
|
|
1868
|
-
exports.useId =
|
|
1867
|
+
exports.useEffect = useEffect6;
|
|
1868
|
+
exports.useId = useId2;
|
|
1869
1869
|
exports.useImperativeHandle = useImperativeHandle;
|
|
1870
1870
|
exports.useInsertionEffect = useInsertionEffect;
|
|
1871
|
-
exports.useLayoutEffect =
|
|
1872
|
-
exports.useMemo =
|
|
1871
|
+
exports.useLayoutEffect = useLayoutEffect4;
|
|
1872
|
+
exports.useMemo = useMemo5;
|
|
1873
1873
|
exports.useReducer = useReducer;
|
|
1874
|
-
exports.useRef =
|
|
1875
|
-
exports.useState =
|
|
1874
|
+
exports.useRef = useRef5;
|
|
1875
|
+
exports.useState = useState5;
|
|
1876
1876
|
exports.useSyncExternalStore = useSyncExternalStore;
|
|
1877
1877
|
exports.useTransition = useTransition;
|
|
1878
1878
|
exports.version = ReactVersion;
|
|
@@ -2380,9 +2380,9 @@ var require_react_dom_development = __commonJS({
|
|
|
2380
2380
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
2381
2381
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
2382
2382
|
}
|
|
2383
|
-
var
|
|
2383
|
+
var React12 = require_react();
|
|
2384
2384
|
var Scheduler = require_scheduler();
|
|
2385
|
-
var ReactSharedInternals =
|
|
2385
|
+
var ReactSharedInternals = React12.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2386
2386
|
var suppressWarning = false;
|
|
2387
2387
|
function setSuppressWarning(newSuppressWarning) {
|
|
2388
2388
|
{
|
|
@@ -2431,7 +2431,7 @@ var require_react_dom_development = __commonJS({
|
|
|
2431
2431
|
var HostPortal = 4;
|
|
2432
2432
|
var HostComponent = 5;
|
|
2433
2433
|
var HostText = 6;
|
|
2434
|
-
var
|
|
2434
|
+
var Fragment7 = 7;
|
|
2435
2435
|
var Mode = 8;
|
|
2436
2436
|
var ContextConsumer = 9;
|
|
2437
2437
|
var ContextProvider = 10;
|
|
@@ -3417,8 +3417,8 @@ var require_react_dom_development = __commonJS({
|
|
|
3417
3417
|
return describeNativeComponentFrame(fn, false);
|
|
3418
3418
|
}
|
|
3419
3419
|
}
|
|
3420
|
-
function shouldConstruct(
|
|
3421
|
-
var prototype =
|
|
3420
|
+
function shouldConstruct(Component5) {
|
|
3421
|
+
var prototype = Component5.prototype;
|
|
3422
3422
|
return !!(prototype && prototype.isReactComponent);
|
|
3423
3423
|
}
|
|
3424
3424
|
function describeUnknownElementTypeFrameInDEV(type3, source, ownerFn) {
|
|
@@ -3587,7 +3587,7 @@ var require_react_dom_development = __commonJS({
|
|
|
3587
3587
|
return "DehydratedFragment";
|
|
3588
3588
|
case ForwardRef:
|
|
3589
3589
|
return getWrappedName$1(type3, type3.render, "ForwardRef");
|
|
3590
|
-
case
|
|
3590
|
+
case Fragment7:
|
|
3591
3591
|
return "Fragment";
|
|
3592
3592
|
case HostComponent:
|
|
3593
3593
|
return type3;
|
|
@@ -3987,7 +3987,7 @@ var require_react_dom_development = __commonJS({
|
|
|
3987
3987
|
{
|
|
3988
3988
|
if (props.value == null) {
|
|
3989
3989
|
if (typeof props.children === "object" && props.children !== null) {
|
|
3990
|
-
|
|
3990
|
+
React12.Children.forEach(props.children, function(child) {
|
|
3991
3991
|
if (child == null) {
|
|
3992
3992
|
return;
|
|
3993
3993
|
}
|
|
@@ -9386,7 +9386,7 @@ var require_react_dom_development = __commonJS({
|
|
|
9386
9386
|
}
|
|
9387
9387
|
}
|
|
9388
9388
|
}
|
|
9389
|
-
function
|
|
9389
|
+
function createElement11(type3, props, rootContainerElement, parentNamespace) {
|
|
9390
9390
|
var isCustomComponentTag;
|
|
9391
9391
|
var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
|
|
9392
9392
|
var domElement;
|
|
@@ -10247,7 +10247,7 @@ var require_react_dom_development = __commonJS({
|
|
|
10247
10247
|
}
|
|
10248
10248
|
parentNamespace = hostContextDev.namespace;
|
|
10249
10249
|
}
|
|
10250
|
-
var domElement =
|
|
10250
|
+
var domElement = createElement11(type3, props, rootContainerInstance, parentNamespace);
|
|
10251
10251
|
precacheFiberNode(internalInstanceHandle, domElement);
|
|
10252
10252
|
updateFiberProps(domElement, props);
|
|
10253
10253
|
return domElement;
|
|
@@ -10383,8 +10383,8 @@ var require_react_dom_development = __commonJS({
|
|
|
10383
10383
|
var nextNode = node.nextSibling;
|
|
10384
10384
|
parentInstance.removeChild(node);
|
|
10385
10385
|
if (nextNode && nextNode.nodeType === COMMENT_NODE) {
|
|
10386
|
-
var
|
|
10387
|
-
if (
|
|
10386
|
+
var data2 = nextNode.data;
|
|
10387
|
+
if (data2 === SUSPENSE_END_DATA) {
|
|
10388
10388
|
if (depth === 0) {
|
|
10389
10389
|
parentInstance.removeChild(nextNode);
|
|
10390
10390
|
retryIfBlockedOn(suspenseInstance);
|
|
@@ -10392,7 +10392,7 @@ var require_react_dom_development = __commonJS({
|
|
|
10392
10392
|
} else {
|
|
10393
10393
|
depth--;
|
|
10394
10394
|
}
|
|
10395
|
-
} else if (
|
|
10395
|
+
} else if (data2 === SUSPENSE_START_DATA || data2 === SUSPENSE_PENDING_START_DATA || data2 === SUSPENSE_FALLBACK_START_DATA) {
|
|
10396
10396
|
depth++;
|
|
10397
10397
|
}
|
|
10398
10398
|
}
|
|
@@ -10537,14 +10537,14 @@ var require_react_dom_development = __commonJS({
|
|
|
10537
10537
|
var depth = 0;
|
|
10538
10538
|
while (node) {
|
|
10539
10539
|
if (node.nodeType === COMMENT_NODE) {
|
|
10540
|
-
var
|
|
10541
|
-
if (
|
|
10540
|
+
var data2 = node.data;
|
|
10541
|
+
if (data2 === SUSPENSE_END_DATA) {
|
|
10542
10542
|
if (depth === 0) {
|
|
10543
10543
|
return getNextHydratableSibling(node);
|
|
10544
10544
|
} else {
|
|
10545
10545
|
depth--;
|
|
10546
10546
|
}
|
|
10547
|
-
} else if (
|
|
10547
|
+
} else if (data2 === SUSPENSE_START_DATA || data2 === SUSPENSE_FALLBACK_START_DATA || data2 === SUSPENSE_PENDING_START_DATA) {
|
|
10548
10548
|
depth++;
|
|
10549
10549
|
}
|
|
10550
10550
|
}
|
|
@@ -10557,14 +10557,14 @@ var require_react_dom_development = __commonJS({
|
|
|
10557
10557
|
var depth = 0;
|
|
10558
10558
|
while (node) {
|
|
10559
10559
|
if (node.nodeType === COMMENT_NODE) {
|
|
10560
|
-
var
|
|
10561
|
-
if (
|
|
10560
|
+
var data2 = node.data;
|
|
10561
|
+
if (data2 === SUSPENSE_START_DATA || data2 === SUSPENSE_FALLBACK_START_DATA || data2 === SUSPENSE_PENDING_START_DATA) {
|
|
10562
10562
|
if (depth === 0) {
|
|
10563
10563
|
return node;
|
|
10564
10564
|
} else {
|
|
10565
10565
|
depth--;
|
|
10566
10566
|
}
|
|
10567
|
-
} else if (
|
|
10567
|
+
} else if (data2 === SUSPENSE_END_DATA) {
|
|
10568
10568
|
depth++;
|
|
10569
10569
|
}
|
|
10570
10570
|
}
|
|
@@ -10851,9 +10851,9 @@ var require_react_dom_development = __commonJS({
|
|
|
10851
10851
|
var contextStackCursor = createCursor(emptyContextObject);
|
|
10852
10852
|
var didPerformWorkStackCursor = createCursor(false);
|
|
10853
10853
|
var previousContext = emptyContextObject;
|
|
10854
|
-
function getUnmaskedContext(workInProgress2,
|
|
10854
|
+
function getUnmaskedContext(workInProgress2, Component5, didPushOwnContextIfProvider) {
|
|
10855
10855
|
{
|
|
10856
|
-
if (didPushOwnContextIfProvider && isContextProvider(
|
|
10856
|
+
if (didPushOwnContextIfProvider && isContextProvider(Component5)) {
|
|
10857
10857
|
return previousContext;
|
|
10858
10858
|
}
|
|
10859
10859
|
return contextStackCursor.current;
|
|
@@ -10990,8 +10990,8 @@ var require_react_dom_development = __commonJS({
|
|
|
10990
10990
|
case HostRoot:
|
|
10991
10991
|
return node.stateNode.context;
|
|
10992
10992
|
case ClassComponent: {
|
|
10993
|
-
var
|
|
10994
|
-
if (isContextProvider(
|
|
10993
|
+
var Component5 = node.type;
|
|
10994
|
+
if (isContextProvider(Component5)) {
|
|
10995
10995
|
return node.stateNode.__reactInternalMemoizedMergedChildContext;
|
|
10996
10996
|
}
|
|
10997
10997
|
break;
|
|
@@ -11753,10 +11753,10 @@ var require_react_dom_development = __commonJS({
|
|
|
11753
11753
|
pendingLegacyContextWarning = /* @__PURE__ */ new Map();
|
|
11754
11754
|
};
|
|
11755
11755
|
}
|
|
11756
|
-
function resolveDefaultProps(
|
|
11757
|
-
if (
|
|
11756
|
+
function resolveDefaultProps(Component5, baseProps) {
|
|
11757
|
+
if (Component5 && Component5.defaultProps) {
|
|
11758
11758
|
var props = assign({}, baseProps);
|
|
11759
|
-
var defaultProps =
|
|
11759
|
+
var defaultProps = Component5.defaultProps;
|
|
11760
11760
|
for (var propName in defaultProps) {
|
|
11761
11761
|
if (props[propName] === void 0) {
|
|
11762
11762
|
props[propName] = defaultProps[propName];
|
|
@@ -12434,7 +12434,7 @@ var require_react_dom_development = __commonJS({
|
|
|
12434
12434
|
}
|
|
12435
12435
|
}
|
|
12436
12436
|
var fakeInternalInstance = {};
|
|
12437
|
-
var emptyRefsObject = new
|
|
12437
|
+
var emptyRefsObject = new React12.Component().refs;
|
|
12438
12438
|
var didWarnAboutStateAssignmentForComponent;
|
|
12439
12439
|
var didWarnAboutUninitializedState;
|
|
12440
12440
|
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
|
|
@@ -13258,7 +13258,7 @@ var require_react_dom_development = __commonJS({
|
|
|
13258
13258
|
}
|
|
13259
13259
|
}
|
|
13260
13260
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
13261
|
-
if (current2 === null || current2.tag !==
|
|
13261
|
+
if (current2 === null || current2.tag !== Fragment7) {
|
|
13262
13262
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
13263
13263
|
created.return = returnFiber;
|
|
13264
13264
|
return created;
|
|
@@ -13661,7 +13661,7 @@ var require_react_dom_development = __commonJS({
|
|
|
13661
13661
|
if (child.key === key) {
|
|
13662
13662
|
var elementType = element.type;
|
|
13663
13663
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
13664
|
-
if (child.tag ===
|
|
13664
|
+
if (child.tag === Fragment7) {
|
|
13665
13665
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
13666
13666
|
var existing = useFiber(child, element.props.children);
|
|
13667
13667
|
existing.return = returnFiber;
|
|
@@ -14051,7 +14051,7 @@ var require_react_dom_development = __commonJS({
|
|
|
14051
14051
|
}
|
|
14052
14052
|
return true;
|
|
14053
14053
|
}
|
|
14054
|
-
function renderWithHooks(current2, workInProgress2,
|
|
14054
|
+
function renderWithHooks(current2, workInProgress2, Component5, props, secondArg, nextRenderLanes) {
|
|
14055
14055
|
renderLanes = nextRenderLanes;
|
|
14056
14056
|
currentlyRenderingFiber$1 = workInProgress2;
|
|
14057
14057
|
{
|
|
@@ -14071,7 +14071,7 @@ var require_react_dom_development = __commonJS({
|
|
|
14071
14071
|
ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
|
|
14072
14072
|
}
|
|
14073
14073
|
}
|
|
14074
|
-
var children =
|
|
14074
|
+
var children = Component5(props, secondArg);
|
|
14075
14075
|
if (didScheduleRenderPhaseUpdateDuringThisPass) {
|
|
14076
14076
|
var numberOfReRenders = 0;
|
|
14077
14077
|
do {
|
|
@@ -14091,7 +14091,7 @@ var require_react_dom_development = __commonJS({
|
|
|
14091
14091
|
hookTypesUpdateIndexDev = -1;
|
|
14092
14092
|
}
|
|
14093
14093
|
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV;
|
|
14094
|
-
children =
|
|
14094
|
+
children = Component5(props, secondArg);
|
|
14095
14095
|
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
|
14096
14096
|
}
|
|
14097
14097
|
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
|
@@ -14777,7 +14777,7 @@ var require_react_dom_development = __commonJS({
|
|
|
14777
14777
|
return value;
|
|
14778
14778
|
}
|
|
14779
14779
|
}
|
|
14780
|
-
function
|
|
14780
|
+
function startTransition3(setPending, callback, options2) {
|
|
14781
14781
|
var previousPriority = getCurrentUpdatePriority();
|
|
14782
14782
|
setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));
|
|
14783
14783
|
setPending(true);
|
|
@@ -14806,7 +14806,7 @@ var require_react_dom_development = __commonJS({
|
|
|
14806
14806
|
}
|
|
14807
14807
|
function mountTransition() {
|
|
14808
14808
|
var _mountState = mountState(false), isPending = _mountState[0], setPending = _mountState[1];
|
|
14809
|
-
var start =
|
|
14809
|
+
var start = startTransition3.bind(null, setPending);
|
|
14810
14810
|
var hook = mountWorkInProgressHook();
|
|
14811
14811
|
hook.memoizedState = start;
|
|
14812
14812
|
return [isPending, start];
|
|
@@ -16201,22 +16201,22 @@ var require_react_dom_development = __commonJS({
|
|
|
16201
16201
|
workInProgress2.child = reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
|
|
16202
16202
|
workInProgress2.child = reconcileChildFibers(workInProgress2, null, nextChildren, renderLanes2);
|
|
16203
16203
|
}
|
|
16204
|
-
function updateForwardRef(current2, workInProgress2,
|
|
16204
|
+
function updateForwardRef(current2, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16205
16205
|
{
|
|
16206
16206
|
if (workInProgress2.type !== workInProgress2.elementType) {
|
|
16207
|
-
var innerPropTypes =
|
|
16207
|
+
var innerPropTypes = Component5.propTypes;
|
|
16208
16208
|
if (innerPropTypes) {
|
|
16209
16209
|
checkPropTypes(
|
|
16210
16210
|
innerPropTypes,
|
|
16211
16211
|
nextProps,
|
|
16212
16212
|
// Resolved props
|
|
16213
16213
|
"prop",
|
|
16214
|
-
getComponentNameFromType(
|
|
16214
|
+
getComponentNameFromType(Component5)
|
|
16215
16215
|
);
|
|
16216
16216
|
}
|
|
16217
16217
|
}
|
|
16218
16218
|
}
|
|
16219
|
-
var render2 =
|
|
16219
|
+
var render2 = Component5.render;
|
|
16220
16220
|
var ref = workInProgress2.ref;
|
|
16221
16221
|
var nextChildren;
|
|
16222
16222
|
var hasId;
|
|
@@ -16254,11 +16254,11 @@ var require_react_dom_development = __commonJS({
|
|
|
16254
16254
|
reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
|
|
16255
16255
|
return workInProgress2.child;
|
|
16256
16256
|
}
|
|
16257
|
-
function updateMemoComponent(current2, workInProgress2,
|
|
16257
|
+
function updateMemoComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16258
16258
|
if (current2 === null) {
|
|
16259
|
-
var type3 =
|
|
16260
|
-
if (isSimpleFunctionComponent(type3) &&
|
|
16261
|
-
|
|
16259
|
+
var type3 = Component5.type;
|
|
16260
|
+
if (isSimpleFunctionComponent(type3) && Component5.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
|
|
16261
|
+
Component5.defaultProps === void 0) {
|
|
16262
16262
|
var resolvedType = type3;
|
|
16263
16263
|
{
|
|
16264
16264
|
resolvedType = resolveFunctionForHotReloading(type3);
|
|
@@ -16282,14 +16282,14 @@ var require_react_dom_development = __commonJS({
|
|
|
16282
16282
|
);
|
|
16283
16283
|
}
|
|
16284
16284
|
}
|
|
16285
|
-
var child = createFiberFromTypeAndProps(
|
|
16285
|
+
var child = createFiberFromTypeAndProps(Component5.type, null, nextProps, workInProgress2, workInProgress2.mode, renderLanes2);
|
|
16286
16286
|
child.ref = workInProgress2.ref;
|
|
16287
16287
|
child.return = workInProgress2;
|
|
16288
16288
|
workInProgress2.child = child;
|
|
16289
16289
|
return child;
|
|
16290
16290
|
}
|
|
16291
16291
|
{
|
|
16292
|
-
var _type =
|
|
16292
|
+
var _type = Component5.type;
|
|
16293
16293
|
var _innerPropTypes = _type.propTypes;
|
|
16294
16294
|
if (_innerPropTypes) {
|
|
16295
16295
|
checkPropTypes(
|
|
@@ -16305,7 +16305,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16305
16305
|
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current2, renderLanes2);
|
|
16306
16306
|
if (!hasScheduledUpdateOrContext) {
|
|
16307
16307
|
var prevProps = currentChild.memoizedProps;
|
|
16308
|
-
var compare =
|
|
16308
|
+
var compare = Component5.compare;
|
|
16309
16309
|
compare = compare !== null ? compare : shallowEqual;
|
|
16310
16310
|
if (compare(prevProps, nextProps) && current2.ref === workInProgress2.ref) {
|
|
16311
16311
|
return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
|
|
@@ -16318,7 +16318,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16318
16318
|
workInProgress2.child = newChild;
|
|
16319
16319
|
return newChild;
|
|
16320
16320
|
}
|
|
16321
|
-
function updateSimpleMemoComponent(current2, workInProgress2,
|
|
16321
|
+
function updateSimpleMemoComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16322
16322
|
{
|
|
16323
16323
|
if (workInProgress2.type !== workInProgress2.elementType) {
|
|
16324
16324
|
var outerMemoType = workInProgress2.elementType;
|
|
@@ -16358,7 +16358,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16358
16358
|
}
|
|
16359
16359
|
}
|
|
16360
16360
|
}
|
|
16361
|
-
return updateFunctionComponent(current2, workInProgress2,
|
|
16361
|
+
return updateFunctionComponent(current2, workInProgress2, Component5, nextProps, renderLanes2);
|
|
16362
16362
|
}
|
|
16363
16363
|
function updateOffscreenComponent(current2, workInProgress2, renderLanes2) {
|
|
16364
16364
|
var nextProps = workInProgress2.pendingProps;
|
|
@@ -16448,24 +16448,24 @@ var require_react_dom_development = __commonJS({
|
|
|
16448
16448
|
}
|
|
16449
16449
|
}
|
|
16450
16450
|
}
|
|
16451
|
-
function updateFunctionComponent(current2, workInProgress2,
|
|
16451
|
+
function updateFunctionComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16452
16452
|
{
|
|
16453
16453
|
if (workInProgress2.type !== workInProgress2.elementType) {
|
|
16454
|
-
var innerPropTypes =
|
|
16454
|
+
var innerPropTypes = Component5.propTypes;
|
|
16455
16455
|
if (innerPropTypes) {
|
|
16456
16456
|
checkPropTypes(
|
|
16457
16457
|
innerPropTypes,
|
|
16458
16458
|
nextProps,
|
|
16459
16459
|
// Resolved props
|
|
16460
16460
|
"prop",
|
|
16461
|
-
getComponentNameFromType(
|
|
16461
|
+
getComponentNameFromType(Component5)
|
|
16462
16462
|
);
|
|
16463
16463
|
}
|
|
16464
16464
|
}
|
|
16465
16465
|
}
|
|
16466
16466
|
var context;
|
|
16467
16467
|
{
|
|
16468
|
-
var unmaskedContext = getUnmaskedContext(workInProgress2,
|
|
16468
|
+
var unmaskedContext = getUnmaskedContext(workInProgress2, Component5, true);
|
|
16469
16469
|
context = getMaskedContext(workInProgress2, unmaskedContext);
|
|
16470
16470
|
}
|
|
16471
16471
|
var nextChildren;
|
|
@@ -16477,12 +16477,12 @@ var require_react_dom_development = __commonJS({
|
|
|
16477
16477
|
{
|
|
16478
16478
|
ReactCurrentOwner$1.current = workInProgress2;
|
|
16479
16479
|
setIsRendering(true);
|
|
16480
|
-
nextChildren = renderWithHooks(current2, workInProgress2,
|
|
16480
|
+
nextChildren = renderWithHooks(current2, workInProgress2, Component5, nextProps, context, renderLanes2);
|
|
16481
16481
|
hasId = checkDidRenderIdHook();
|
|
16482
16482
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
16483
16483
|
setIsStrictModeForDevtools(true);
|
|
16484
16484
|
try {
|
|
16485
|
-
nextChildren = renderWithHooks(current2, workInProgress2,
|
|
16485
|
+
nextChildren = renderWithHooks(current2, workInProgress2, Component5, nextProps, context, renderLanes2);
|
|
16486
16486
|
hasId = checkDidRenderIdHook();
|
|
16487
16487
|
} finally {
|
|
16488
16488
|
setIsStrictModeForDevtools(false);
|
|
@@ -16504,7 +16504,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16504
16504
|
reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
|
|
16505
16505
|
return workInProgress2.child;
|
|
16506
16506
|
}
|
|
16507
|
-
function updateClassComponent(current2, workInProgress2,
|
|
16507
|
+
function updateClassComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16508
16508
|
{
|
|
16509
16509
|
switch (shouldError(workInProgress2)) {
|
|
16510
16510
|
case false: {
|
|
@@ -16527,20 +16527,20 @@ var require_react_dom_development = __commonJS({
|
|
|
16527
16527
|
}
|
|
16528
16528
|
}
|
|
16529
16529
|
if (workInProgress2.type !== workInProgress2.elementType) {
|
|
16530
|
-
var innerPropTypes =
|
|
16530
|
+
var innerPropTypes = Component5.propTypes;
|
|
16531
16531
|
if (innerPropTypes) {
|
|
16532
16532
|
checkPropTypes(
|
|
16533
16533
|
innerPropTypes,
|
|
16534
16534
|
nextProps,
|
|
16535
16535
|
// Resolved props
|
|
16536
16536
|
"prop",
|
|
16537
|
-
getComponentNameFromType(
|
|
16537
|
+
getComponentNameFromType(Component5)
|
|
16538
16538
|
);
|
|
16539
16539
|
}
|
|
16540
16540
|
}
|
|
16541
16541
|
}
|
|
16542
16542
|
var hasContext;
|
|
16543
|
-
if (isContextProvider(
|
|
16543
|
+
if (isContextProvider(Component5)) {
|
|
16544
16544
|
hasContext = true;
|
|
16545
16545
|
pushContextProvider(workInProgress2);
|
|
16546
16546
|
} else {
|
|
@@ -16551,15 +16551,15 @@ var require_react_dom_development = __commonJS({
|
|
|
16551
16551
|
var shouldUpdate;
|
|
16552
16552
|
if (instance === null) {
|
|
16553
16553
|
resetSuspendedCurrentOnMountInLegacyMode(current2, workInProgress2);
|
|
16554
|
-
constructClassInstance(workInProgress2,
|
|
16555
|
-
mountClassInstance(workInProgress2,
|
|
16554
|
+
constructClassInstance(workInProgress2, Component5, nextProps);
|
|
16555
|
+
mountClassInstance(workInProgress2, Component5, nextProps, renderLanes2);
|
|
16556
16556
|
shouldUpdate = true;
|
|
16557
16557
|
} else if (current2 === null) {
|
|
16558
|
-
shouldUpdate = resumeMountClassInstance(workInProgress2,
|
|
16558
|
+
shouldUpdate = resumeMountClassInstance(workInProgress2, Component5, nextProps, renderLanes2);
|
|
16559
16559
|
} else {
|
|
16560
|
-
shouldUpdate = updateClassInstance(current2, workInProgress2,
|
|
16560
|
+
shouldUpdate = updateClassInstance(current2, workInProgress2, Component5, nextProps, renderLanes2);
|
|
16561
16561
|
}
|
|
16562
|
-
var nextUnitOfWork = finishClassComponent(current2, workInProgress2,
|
|
16562
|
+
var nextUnitOfWork = finishClassComponent(current2, workInProgress2, Component5, shouldUpdate, hasContext, renderLanes2);
|
|
16563
16563
|
{
|
|
16564
16564
|
var inst = workInProgress2.stateNode;
|
|
16565
16565
|
if (shouldUpdate && inst.props !== nextProps) {
|
|
@@ -16571,19 +16571,19 @@ var require_react_dom_development = __commonJS({
|
|
|
16571
16571
|
}
|
|
16572
16572
|
return nextUnitOfWork;
|
|
16573
16573
|
}
|
|
16574
|
-
function finishClassComponent(current2, workInProgress2,
|
|
16574
|
+
function finishClassComponent(current2, workInProgress2, Component5, shouldUpdate, hasContext, renderLanes2) {
|
|
16575
16575
|
markRef(current2, workInProgress2);
|
|
16576
16576
|
var didCaptureError = (workInProgress2.flags & DidCapture) !== NoFlags;
|
|
16577
16577
|
if (!shouldUpdate && !didCaptureError) {
|
|
16578
16578
|
if (hasContext) {
|
|
16579
|
-
invalidateContextProvider(workInProgress2,
|
|
16579
|
+
invalidateContextProvider(workInProgress2, Component5, false);
|
|
16580
16580
|
}
|
|
16581
16581
|
return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
|
|
16582
16582
|
}
|
|
16583
16583
|
var instance = workInProgress2.stateNode;
|
|
16584
16584
|
ReactCurrentOwner$1.current = workInProgress2;
|
|
16585
16585
|
var nextChildren;
|
|
16586
|
-
if (didCaptureError && typeof
|
|
16586
|
+
if (didCaptureError && typeof Component5.getDerivedStateFromError !== "function") {
|
|
16587
16587
|
nextChildren = null;
|
|
16588
16588
|
{
|
|
16589
16589
|
stopProfilerTimerIfRunning();
|
|
@@ -16617,7 +16617,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16617
16617
|
}
|
|
16618
16618
|
workInProgress2.memoizedState = instance.state;
|
|
16619
16619
|
if (hasContext) {
|
|
16620
|
-
invalidateContextProvider(workInProgress2,
|
|
16620
|
+
invalidateContextProvider(workInProgress2, Component5, true);
|
|
16621
16621
|
}
|
|
16622
16622
|
return workInProgress2.child;
|
|
16623
16623
|
}
|
|
@@ -16717,45 +16717,45 @@ var require_react_dom_development = __commonJS({
|
|
|
16717
16717
|
var lazyComponent = elementType;
|
|
16718
16718
|
var payload = lazyComponent._payload;
|
|
16719
16719
|
var init = lazyComponent._init;
|
|
16720
|
-
var
|
|
16721
|
-
workInProgress2.type =
|
|
16722
|
-
var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(
|
|
16723
|
-
var resolvedProps = resolveDefaultProps(
|
|
16720
|
+
var Component5 = init(payload);
|
|
16721
|
+
workInProgress2.type = Component5;
|
|
16722
|
+
var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component5);
|
|
16723
|
+
var resolvedProps = resolveDefaultProps(Component5, props);
|
|
16724
16724
|
var child;
|
|
16725
16725
|
switch (resolvedTag) {
|
|
16726
16726
|
case FunctionComponent: {
|
|
16727
16727
|
{
|
|
16728
|
-
validateFunctionComponentInDev(workInProgress2,
|
|
16729
|
-
workInProgress2.type =
|
|
16728
|
+
validateFunctionComponentInDev(workInProgress2, Component5);
|
|
16729
|
+
workInProgress2.type = Component5 = resolveFunctionForHotReloading(Component5);
|
|
16730
16730
|
}
|
|
16731
|
-
child = updateFunctionComponent(null, workInProgress2,
|
|
16731
|
+
child = updateFunctionComponent(null, workInProgress2, Component5, resolvedProps, renderLanes2);
|
|
16732
16732
|
return child;
|
|
16733
16733
|
}
|
|
16734
16734
|
case ClassComponent: {
|
|
16735
16735
|
{
|
|
16736
|
-
workInProgress2.type =
|
|
16736
|
+
workInProgress2.type = Component5 = resolveClassForHotReloading(Component5);
|
|
16737
16737
|
}
|
|
16738
|
-
child = updateClassComponent(null, workInProgress2,
|
|
16738
|
+
child = updateClassComponent(null, workInProgress2, Component5, resolvedProps, renderLanes2);
|
|
16739
16739
|
return child;
|
|
16740
16740
|
}
|
|
16741
16741
|
case ForwardRef: {
|
|
16742
16742
|
{
|
|
16743
|
-
workInProgress2.type =
|
|
16743
|
+
workInProgress2.type = Component5 = resolveForwardRefForHotReloading(Component5);
|
|
16744
16744
|
}
|
|
16745
|
-
child = updateForwardRef(null, workInProgress2,
|
|
16745
|
+
child = updateForwardRef(null, workInProgress2, Component5, resolvedProps, renderLanes2);
|
|
16746
16746
|
return child;
|
|
16747
16747
|
}
|
|
16748
16748
|
case MemoComponent: {
|
|
16749
16749
|
{
|
|
16750
16750
|
if (workInProgress2.type !== workInProgress2.elementType) {
|
|
16751
|
-
var outerPropTypes =
|
|
16751
|
+
var outerPropTypes = Component5.propTypes;
|
|
16752
16752
|
if (outerPropTypes) {
|
|
16753
16753
|
checkPropTypes(
|
|
16754
16754
|
outerPropTypes,
|
|
16755
16755
|
resolvedProps,
|
|
16756
16756
|
// Resolved for outer only
|
|
16757
16757
|
"prop",
|
|
16758
|
-
getComponentNameFromType(
|
|
16758
|
+
getComponentNameFromType(Component5)
|
|
16759
16759
|
);
|
|
16760
16760
|
}
|
|
16761
16761
|
}
|
|
@@ -16763,8 +16763,8 @@ var require_react_dom_development = __commonJS({
|
|
|
16763
16763
|
child = updateMemoComponent(
|
|
16764
16764
|
null,
|
|
16765
16765
|
workInProgress2,
|
|
16766
|
-
|
|
16767
|
-
resolveDefaultProps(
|
|
16766
|
+
Component5,
|
|
16767
|
+
resolveDefaultProps(Component5.type, resolvedProps),
|
|
16768
16768
|
// The inner type can have defaults too
|
|
16769
16769
|
renderLanes2
|
|
16770
16770
|
);
|
|
@@ -16773,33 +16773,33 @@ var require_react_dom_development = __commonJS({
|
|
|
16773
16773
|
}
|
|
16774
16774
|
var hint = "";
|
|
16775
16775
|
{
|
|
16776
|
-
if (
|
|
16776
|
+
if (Component5 !== null && typeof Component5 === "object" && Component5.$$typeof === REACT_LAZY_TYPE) {
|
|
16777
16777
|
hint = " Did you wrap a component in React.lazy() more than once?";
|
|
16778
16778
|
}
|
|
16779
16779
|
}
|
|
16780
|
-
throw new Error("Element type is invalid. Received a promise that resolves to: " +
|
|
16780
|
+
throw new Error("Element type is invalid. Received a promise that resolves to: " + Component5 + ". " + ("Lazy element type must resolve to a class or function." + hint));
|
|
16781
16781
|
}
|
|
16782
|
-
function mountIncompleteClassComponent(_current, workInProgress2,
|
|
16782
|
+
function mountIncompleteClassComponent(_current, workInProgress2, Component5, nextProps, renderLanes2) {
|
|
16783
16783
|
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress2);
|
|
16784
16784
|
workInProgress2.tag = ClassComponent;
|
|
16785
16785
|
var hasContext;
|
|
16786
|
-
if (isContextProvider(
|
|
16786
|
+
if (isContextProvider(Component5)) {
|
|
16787
16787
|
hasContext = true;
|
|
16788
16788
|
pushContextProvider(workInProgress2);
|
|
16789
16789
|
} else {
|
|
16790
16790
|
hasContext = false;
|
|
16791
16791
|
}
|
|
16792
16792
|
prepareToReadContext(workInProgress2, renderLanes2);
|
|
16793
|
-
constructClassInstance(workInProgress2,
|
|
16794
|
-
mountClassInstance(workInProgress2,
|
|
16795
|
-
return finishClassComponent(null, workInProgress2,
|
|
16793
|
+
constructClassInstance(workInProgress2, Component5, nextProps);
|
|
16794
|
+
mountClassInstance(workInProgress2, Component5, nextProps, renderLanes2);
|
|
16795
|
+
return finishClassComponent(null, workInProgress2, Component5, true, hasContext, renderLanes2);
|
|
16796
16796
|
}
|
|
16797
|
-
function mountIndeterminateComponent(_current, workInProgress2,
|
|
16797
|
+
function mountIndeterminateComponent(_current, workInProgress2, Component5, renderLanes2) {
|
|
16798
16798
|
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress2);
|
|
16799
16799
|
var props = workInProgress2.pendingProps;
|
|
16800
16800
|
var context;
|
|
16801
16801
|
{
|
|
16802
|
-
var unmaskedContext = getUnmaskedContext(workInProgress2,
|
|
16802
|
+
var unmaskedContext = getUnmaskedContext(workInProgress2, Component5, false);
|
|
16803
16803
|
context = getMaskedContext(workInProgress2, unmaskedContext);
|
|
16804
16804
|
}
|
|
16805
16805
|
prepareToReadContext(workInProgress2, renderLanes2);
|
|
@@ -16809,8 +16809,8 @@ var require_react_dom_development = __commonJS({
|
|
|
16809
16809
|
markComponentRenderStarted(workInProgress2);
|
|
16810
16810
|
}
|
|
16811
16811
|
{
|
|
16812
|
-
if (
|
|
16813
|
-
var componentName = getComponentNameFromType(
|
|
16812
|
+
if (Component5.prototype && typeof Component5.prototype.render === "function") {
|
|
16813
|
+
var componentName = getComponentNameFromType(Component5) || "Unknown";
|
|
16814
16814
|
if (!didWarnAboutBadClass[componentName]) {
|
|
16815
16815
|
error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName);
|
|
16816
16816
|
didWarnAboutBadClass[componentName] = true;
|
|
@@ -16821,7 +16821,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16821
16821
|
}
|
|
16822
16822
|
setIsRendering(true);
|
|
16823
16823
|
ReactCurrentOwner$1.current = workInProgress2;
|
|
16824
|
-
value = renderWithHooks(null, workInProgress2,
|
|
16824
|
+
value = renderWithHooks(null, workInProgress2, Component5, props, context, renderLanes2);
|
|
16825
16825
|
hasId = checkDidRenderIdHook();
|
|
16826
16826
|
setIsRendering(false);
|
|
16827
16827
|
}
|
|
@@ -16831,7 +16831,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16831
16831
|
workInProgress2.flags |= PerformedWork;
|
|
16832
16832
|
{
|
|
16833
16833
|
if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) {
|
|
16834
|
-
var _componentName = getComponentNameFromType(
|
|
16834
|
+
var _componentName = getComponentNameFromType(Component5) || "Unknown";
|
|
16835
16835
|
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
|
16836
16836
|
error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName, _componentName, _componentName);
|
|
16837
16837
|
didWarnAboutModulePatternComponent[_componentName] = true;
|
|
@@ -16844,7 +16844,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16844
16844
|
typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0
|
|
16845
16845
|
) {
|
|
16846
16846
|
{
|
|
16847
|
-
var _componentName2 = getComponentNameFromType(
|
|
16847
|
+
var _componentName2 = getComponentNameFromType(Component5) || "Unknown";
|
|
16848
16848
|
if (!didWarnAboutModulePatternComponent[_componentName2]) {
|
|
16849
16849
|
error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName2, _componentName2, _componentName2);
|
|
16850
16850
|
didWarnAboutModulePatternComponent[_componentName2] = true;
|
|
@@ -16854,7 +16854,7 @@ var require_react_dom_development = __commonJS({
|
|
|
16854
16854
|
workInProgress2.memoizedState = null;
|
|
16855
16855
|
workInProgress2.updateQueue = null;
|
|
16856
16856
|
var hasContext = false;
|
|
16857
|
-
if (isContextProvider(
|
|
16857
|
+
if (isContextProvider(Component5)) {
|
|
16858
16858
|
hasContext = true;
|
|
16859
16859
|
pushContextProvider(workInProgress2);
|
|
16860
16860
|
} else {
|
|
@@ -16863,15 +16863,15 @@ var require_react_dom_development = __commonJS({
|
|
|
16863
16863
|
workInProgress2.memoizedState = value.state !== null && value.state !== void 0 ? value.state : null;
|
|
16864
16864
|
initializeUpdateQueue(workInProgress2);
|
|
16865
16865
|
adoptClassInstance(workInProgress2, value);
|
|
16866
|
-
mountClassInstance(workInProgress2,
|
|
16867
|
-
return finishClassComponent(null, workInProgress2,
|
|
16866
|
+
mountClassInstance(workInProgress2, Component5, props, renderLanes2);
|
|
16867
|
+
return finishClassComponent(null, workInProgress2, Component5, true, hasContext, renderLanes2);
|
|
16868
16868
|
} else {
|
|
16869
16869
|
workInProgress2.tag = FunctionComponent;
|
|
16870
16870
|
{
|
|
16871
16871
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
16872
16872
|
setIsStrictModeForDevtools(true);
|
|
16873
16873
|
try {
|
|
16874
|
-
value = renderWithHooks(null, workInProgress2,
|
|
16874
|
+
value = renderWithHooks(null, workInProgress2, Component5, props, context, renderLanes2);
|
|
16875
16875
|
hasId = checkDidRenderIdHook();
|
|
16876
16876
|
} finally {
|
|
16877
16877
|
setIsStrictModeForDevtools(false);
|
|
@@ -16883,16 +16883,16 @@ var require_react_dom_development = __commonJS({
|
|
|
16883
16883
|
}
|
|
16884
16884
|
reconcileChildren(null, workInProgress2, value, renderLanes2);
|
|
16885
16885
|
{
|
|
16886
|
-
validateFunctionComponentInDev(workInProgress2,
|
|
16886
|
+
validateFunctionComponentInDev(workInProgress2, Component5);
|
|
16887
16887
|
}
|
|
16888
16888
|
return workInProgress2.child;
|
|
16889
16889
|
}
|
|
16890
16890
|
}
|
|
16891
|
-
function validateFunctionComponentInDev(workInProgress2,
|
|
16891
|
+
function validateFunctionComponentInDev(workInProgress2, Component5) {
|
|
16892
16892
|
{
|
|
16893
|
-
if (
|
|
16894
|
-
if (
|
|
16895
|
-
error("%s(...): childContextTypes cannot be defined on a function component.",
|
|
16893
|
+
if (Component5) {
|
|
16894
|
+
if (Component5.childContextTypes) {
|
|
16895
|
+
error("%s(...): childContextTypes cannot be defined on a function component.", Component5.displayName || Component5.name || "Component");
|
|
16896
16896
|
}
|
|
16897
16897
|
}
|
|
16898
16898
|
if (workInProgress2.ref !== null) {
|
|
@@ -16911,15 +16911,15 @@ var require_react_dom_development = __commonJS({
|
|
|
16911
16911
|
error("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s", info);
|
|
16912
16912
|
}
|
|
16913
16913
|
}
|
|
16914
|
-
if (typeof
|
|
16915
|
-
var _componentName3 = getComponentNameFromType(
|
|
16914
|
+
if (typeof Component5.getDerivedStateFromProps === "function") {
|
|
16915
|
+
var _componentName3 = getComponentNameFromType(Component5) || "Unknown";
|
|
16916
16916
|
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
|
|
16917
16917
|
error("%s: Function components do not support getDerivedStateFromProps.", _componentName3);
|
|
16918
16918
|
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
|
|
16919
16919
|
}
|
|
16920
16920
|
}
|
|
16921
|
-
if (typeof
|
|
16922
|
-
var _componentName4 = getComponentNameFromType(
|
|
16921
|
+
if (typeof Component5.contextType === "object" && Component5.contextType !== null) {
|
|
16922
|
+
var _componentName4 = getComponentNameFromType(Component5) || "Unknown";
|
|
16923
16923
|
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
|
16924
16924
|
error("%s: Function components do not support contextType.", _componentName4);
|
|
16925
16925
|
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
|
@@ -17681,8 +17681,8 @@ var require_react_dom_development = __commonJS({
|
|
|
17681
17681
|
pushHostContext(workInProgress2);
|
|
17682
17682
|
break;
|
|
17683
17683
|
case ClassComponent: {
|
|
17684
|
-
var
|
|
17685
|
-
if (isContextProvider(
|
|
17684
|
+
var Component5 = workInProgress2.type;
|
|
17685
|
+
if (isContextProvider(Component5)) {
|
|
17686
17686
|
pushContextProvider(workInProgress2);
|
|
17687
17687
|
}
|
|
17688
17688
|
break;
|
|
@@ -17809,10 +17809,10 @@ var require_react_dom_development = __commonJS({
|
|
|
17809
17809
|
return mountLazyComponent(current2, workInProgress2, elementType, renderLanes2);
|
|
17810
17810
|
}
|
|
17811
17811
|
case FunctionComponent: {
|
|
17812
|
-
var
|
|
17812
|
+
var Component5 = workInProgress2.type;
|
|
17813
17813
|
var unresolvedProps = workInProgress2.pendingProps;
|
|
17814
|
-
var resolvedProps = workInProgress2.elementType ===
|
|
17815
|
-
return updateFunctionComponent(current2, workInProgress2,
|
|
17814
|
+
var resolvedProps = workInProgress2.elementType === Component5 ? unresolvedProps : resolveDefaultProps(Component5, unresolvedProps);
|
|
17815
|
+
return updateFunctionComponent(current2, workInProgress2, Component5, resolvedProps, renderLanes2);
|
|
17816
17816
|
}
|
|
17817
17817
|
case ClassComponent: {
|
|
17818
17818
|
var _Component = workInProgress2.type;
|
|
@@ -17836,7 +17836,7 @@ var require_react_dom_development = __commonJS({
|
|
|
17836
17836
|
var _resolvedProps2 = workInProgress2.elementType === type3 ? _unresolvedProps2 : resolveDefaultProps(type3, _unresolvedProps2);
|
|
17837
17837
|
return updateForwardRef(current2, workInProgress2, type3, _resolvedProps2, renderLanes2);
|
|
17838
17838
|
}
|
|
17839
|
-
case
|
|
17839
|
+
case Fragment7:
|
|
17840
17840
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
17841
17841
|
case Mode:
|
|
17842
17842
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -18109,7 +18109,7 @@ var require_react_dom_development = __commonJS({
|
|
|
18109
18109
|
case SimpleMemoComponent:
|
|
18110
18110
|
case FunctionComponent:
|
|
18111
18111
|
case ForwardRef:
|
|
18112
|
-
case
|
|
18112
|
+
case Fragment7:
|
|
18113
18113
|
case Mode:
|
|
18114
18114
|
case Profiler:
|
|
18115
18115
|
case ContextConsumer:
|
|
@@ -18117,8 +18117,8 @@ var require_react_dom_development = __commonJS({
|
|
|
18117
18117
|
bubbleProperties(workInProgress2);
|
|
18118
18118
|
return null;
|
|
18119
18119
|
case ClassComponent: {
|
|
18120
|
-
var
|
|
18121
|
-
if (isContextProvider(
|
|
18120
|
+
var Component5 = workInProgress2.type;
|
|
18121
|
+
if (isContextProvider(Component5)) {
|
|
18122
18122
|
popContext(workInProgress2);
|
|
18123
18123
|
}
|
|
18124
18124
|
bubbleProperties(workInProgress2);
|
|
@@ -18436,8 +18436,8 @@ var require_react_dom_development = __commonJS({
|
|
|
18436
18436
|
popTreeContext(workInProgress2);
|
|
18437
18437
|
switch (workInProgress2.tag) {
|
|
18438
18438
|
case ClassComponent: {
|
|
18439
|
-
var
|
|
18440
|
-
if (isContextProvider(
|
|
18439
|
+
var Component5 = workInProgress2.type;
|
|
18440
|
+
if (isContextProvider(Component5)) {
|
|
18441
18441
|
popContext(workInProgress2);
|
|
18442
18442
|
}
|
|
18443
18443
|
var flags = workInProgress2.flags;
|
|
@@ -22124,18 +22124,18 @@ var require_react_dom_development = __commonJS({
|
|
|
22124
22124
|
var createFiber = function(tag, pendingProps, key, mode) {
|
|
22125
22125
|
return new FiberNode(tag, pendingProps, key, mode);
|
|
22126
22126
|
};
|
|
22127
|
-
function shouldConstruct$1(
|
|
22128
|
-
var prototype =
|
|
22127
|
+
function shouldConstruct$1(Component5) {
|
|
22128
|
+
var prototype = Component5.prototype;
|
|
22129
22129
|
return !!(prototype && prototype.isReactComponent);
|
|
22130
22130
|
}
|
|
22131
22131
|
function isSimpleFunctionComponent(type3) {
|
|
22132
22132
|
return typeof type3 === "function" && !shouldConstruct$1(type3) && type3.defaultProps === void 0;
|
|
22133
22133
|
}
|
|
22134
|
-
function resolveLazyComponentTag(
|
|
22135
|
-
if (typeof
|
|
22136
|
-
return shouldConstruct$1(
|
|
22137
|
-
} else if (
|
|
22138
|
-
var $$typeof =
|
|
22134
|
+
function resolveLazyComponentTag(Component5) {
|
|
22135
|
+
if (typeof Component5 === "function") {
|
|
22136
|
+
return shouldConstruct$1(Component5) ? ClassComponent : FunctionComponent;
|
|
22137
|
+
} else if (Component5 !== void 0 && Component5 !== null) {
|
|
22138
|
+
var $$typeof = Component5.$$typeof;
|
|
22139
22139
|
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
|
22140
22140
|
return ForwardRef;
|
|
22141
22141
|
}
|
|
@@ -22368,7 +22368,7 @@ var require_react_dom_development = __commonJS({
|
|
|
22368
22368
|
return fiber;
|
|
22369
22369
|
}
|
|
22370
22370
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
|
22371
|
-
var fiber = createFiber(
|
|
22371
|
+
var fiber = createFiber(Fragment7, elements, key, mode);
|
|
22372
22372
|
fiber.lanes = lanes;
|
|
22373
22373
|
return fiber;
|
|
22374
22374
|
}
|
|
@@ -22572,9 +22572,9 @@ var require_react_dom_development = __commonJS({
|
|
|
22572
22572
|
var fiber = get2(parentComponent);
|
|
22573
22573
|
var parentContext = findCurrentUnmaskedContext(fiber);
|
|
22574
22574
|
if (fiber.tag === ClassComponent) {
|
|
22575
|
-
var
|
|
22576
|
-
if (isContextProvider(
|
|
22577
|
-
return processChildContext(fiber,
|
|
22575
|
+
var Component5 = fiber.type;
|
|
22576
|
+
if (isContextProvider(Component5)) {
|
|
22577
|
+
return processChildContext(fiber, Component5, parentContext);
|
|
22578
22578
|
}
|
|
22579
22579
|
}
|
|
22580
22580
|
return parentContext;
|
|
@@ -23622,6 +23622,2262 @@ var web_default = (testImplementations, testSpecifications, testInput) => {
|
|
|
23622
23622
|
return t;
|
|
23623
23623
|
};
|
|
23624
23624
|
|
|
23625
|
+
// node_modules/react-router/dist/development/chunk-PVWAREVJ.mjs
|
|
23626
|
+
init_dirname();
|
|
23627
|
+
init_buffer();
|
|
23628
|
+
init_process();
|
|
23629
|
+
var React2 = __toESM(require_react(), 1);
|
|
23630
|
+
var React22 = __toESM(require_react(), 1);
|
|
23631
|
+
var React3 = __toESM(require_react(), 1);
|
|
23632
|
+
var React4 = __toESM(require_react(), 1);
|
|
23633
|
+
var React9 = __toESM(require_react(), 1);
|
|
23634
|
+
var React8 = __toESM(require_react(), 1);
|
|
23635
|
+
var React7 = __toESM(require_react(), 1);
|
|
23636
|
+
var React6 = __toESM(require_react(), 1);
|
|
23637
|
+
var React5 = __toESM(require_react(), 1);
|
|
23638
|
+
var React10 = __toESM(require_react(), 1);
|
|
23639
|
+
var React11 = __toESM(require_react(), 1);
|
|
23640
|
+
function createMemoryHistory(options = {}) {
|
|
23641
|
+
let { initialEntries = ["/"], initialIndex, v5Compat = false } = options;
|
|
23642
|
+
let entries;
|
|
23643
|
+
entries = initialEntries.map(
|
|
23644
|
+
(entry, index2) => createMemoryLocation(
|
|
23645
|
+
entry,
|
|
23646
|
+
typeof entry === "string" ? null : entry.state,
|
|
23647
|
+
index2 === 0 ? "default" : void 0
|
|
23648
|
+
)
|
|
23649
|
+
);
|
|
23650
|
+
let index = clampIndex(
|
|
23651
|
+
initialIndex == null ? entries.length - 1 : initialIndex
|
|
23652
|
+
);
|
|
23653
|
+
let action = "POP";
|
|
23654
|
+
let listener = null;
|
|
23655
|
+
function clampIndex(n) {
|
|
23656
|
+
return Math.min(Math.max(n, 0), entries.length - 1);
|
|
23657
|
+
}
|
|
23658
|
+
function getCurrentLocation() {
|
|
23659
|
+
return entries[index];
|
|
23660
|
+
}
|
|
23661
|
+
function createMemoryLocation(to, state = null, key) {
|
|
23662
|
+
let location = createLocation(
|
|
23663
|
+
entries ? getCurrentLocation().pathname : "/",
|
|
23664
|
+
to,
|
|
23665
|
+
state,
|
|
23666
|
+
key
|
|
23667
|
+
);
|
|
23668
|
+
warning(
|
|
23669
|
+
location.pathname.charAt(0) === "/",
|
|
23670
|
+
`relative pathnames are not supported in memory history: ${JSON.stringify(
|
|
23671
|
+
to
|
|
23672
|
+
)}`
|
|
23673
|
+
);
|
|
23674
|
+
return location;
|
|
23675
|
+
}
|
|
23676
|
+
function createHref2(to) {
|
|
23677
|
+
return typeof to === "string" ? to : createPath(to);
|
|
23678
|
+
}
|
|
23679
|
+
let history = {
|
|
23680
|
+
get index() {
|
|
23681
|
+
return index;
|
|
23682
|
+
},
|
|
23683
|
+
get action() {
|
|
23684
|
+
return action;
|
|
23685
|
+
},
|
|
23686
|
+
get location() {
|
|
23687
|
+
return getCurrentLocation();
|
|
23688
|
+
},
|
|
23689
|
+
createHref: createHref2,
|
|
23690
|
+
createURL(to) {
|
|
23691
|
+
return new URL(createHref2(to), "http://localhost");
|
|
23692
|
+
},
|
|
23693
|
+
encodeLocation(to) {
|
|
23694
|
+
let path = typeof to === "string" ? parsePath(to) : to;
|
|
23695
|
+
return {
|
|
23696
|
+
pathname: path.pathname || "",
|
|
23697
|
+
search: path.search || "",
|
|
23698
|
+
hash: path.hash || ""
|
|
23699
|
+
};
|
|
23700
|
+
},
|
|
23701
|
+
push(to, state) {
|
|
23702
|
+
action = "PUSH";
|
|
23703
|
+
let nextLocation = createMemoryLocation(to, state);
|
|
23704
|
+
index += 1;
|
|
23705
|
+
entries.splice(index, entries.length, nextLocation);
|
|
23706
|
+
if (v5Compat && listener) {
|
|
23707
|
+
listener({ action, location: nextLocation, delta: 1 });
|
|
23708
|
+
}
|
|
23709
|
+
},
|
|
23710
|
+
replace(to, state) {
|
|
23711
|
+
action = "REPLACE";
|
|
23712
|
+
let nextLocation = createMemoryLocation(to, state);
|
|
23713
|
+
entries[index] = nextLocation;
|
|
23714
|
+
if (v5Compat && listener) {
|
|
23715
|
+
listener({ action, location: nextLocation, delta: 0 });
|
|
23716
|
+
}
|
|
23717
|
+
},
|
|
23718
|
+
go(delta) {
|
|
23719
|
+
action = "POP";
|
|
23720
|
+
let nextIndex = clampIndex(index + delta);
|
|
23721
|
+
let nextLocation = entries[nextIndex];
|
|
23722
|
+
index = nextIndex;
|
|
23723
|
+
if (listener) {
|
|
23724
|
+
listener({ action, location: nextLocation, delta });
|
|
23725
|
+
}
|
|
23726
|
+
},
|
|
23727
|
+
listen(fn) {
|
|
23728
|
+
listener = fn;
|
|
23729
|
+
return () => {
|
|
23730
|
+
listener = null;
|
|
23731
|
+
};
|
|
23732
|
+
}
|
|
23733
|
+
};
|
|
23734
|
+
return history;
|
|
23735
|
+
}
|
|
23736
|
+
function invariant(value, message) {
|
|
23737
|
+
if (value === false || value === null || typeof value === "undefined") {
|
|
23738
|
+
throw new Error(message);
|
|
23739
|
+
}
|
|
23740
|
+
}
|
|
23741
|
+
function warning(cond, message) {
|
|
23742
|
+
if (!cond) {
|
|
23743
|
+
if (typeof console !== "undefined")
|
|
23744
|
+
console.warn(message);
|
|
23745
|
+
try {
|
|
23746
|
+
throw new Error(message);
|
|
23747
|
+
} catch (e) {
|
|
23748
|
+
}
|
|
23749
|
+
}
|
|
23750
|
+
}
|
|
23751
|
+
function createKey() {
|
|
23752
|
+
return Math.random().toString(36).substring(2, 10);
|
|
23753
|
+
}
|
|
23754
|
+
function createLocation(current, to, state = null, key) {
|
|
23755
|
+
let location = {
|
|
23756
|
+
pathname: typeof current === "string" ? current : current.pathname,
|
|
23757
|
+
search: "",
|
|
23758
|
+
hash: "",
|
|
23759
|
+
...typeof to === "string" ? parsePath(to) : to,
|
|
23760
|
+
state,
|
|
23761
|
+
// TODO: This could be cleaned up. push/replace should probably just take
|
|
23762
|
+
// full Locations now and avoid the need to run through this flow at all
|
|
23763
|
+
// But that's a pretty big refactor to the current test suite so going to
|
|
23764
|
+
// keep as is for the time being and just let any incoming keys take precedence
|
|
23765
|
+
key: to && to.key || key || createKey()
|
|
23766
|
+
};
|
|
23767
|
+
return location;
|
|
23768
|
+
}
|
|
23769
|
+
function createPath({
|
|
23770
|
+
pathname = "/",
|
|
23771
|
+
search = "",
|
|
23772
|
+
hash = ""
|
|
23773
|
+
}) {
|
|
23774
|
+
if (search && search !== "?")
|
|
23775
|
+
pathname += search.charAt(0) === "?" ? search : "?" + search;
|
|
23776
|
+
if (hash && hash !== "#")
|
|
23777
|
+
pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
23778
|
+
return pathname;
|
|
23779
|
+
}
|
|
23780
|
+
function parsePath(path) {
|
|
23781
|
+
let parsedPath = {};
|
|
23782
|
+
if (path) {
|
|
23783
|
+
let hashIndex = path.indexOf("#");
|
|
23784
|
+
if (hashIndex >= 0) {
|
|
23785
|
+
parsedPath.hash = path.substring(hashIndex);
|
|
23786
|
+
path = path.substring(0, hashIndex);
|
|
23787
|
+
}
|
|
23788
|
+
let searchIndex = path.indexOf("?");
|
|
23789
|
+
if (searchIndex >= 0) {
|
|
23790
|
+
parsedPath.search = path.substring(searchIndex);
|
|
23791
|
+
path = path.substring(0, searchIndex);
|
|
23792
|
+
}
|
|
23793
|
+
if (path) {
|
|
23794
|
+
parsedPath.pathname = path;
|
|
23795
|
+
}
|
|
23796
|
+
}
|
|
23797
|
+
return parsedPath;
|
|
23798
|
+
}
|
|
23799
|
+
var _map;
|
|
23800
|
+
_map = /* @__PURE__ */ new WeakMap();
|
|
23801
|
+
function matchRoutes(routes, locationArg, basename = "/") {
|
|
23802
|
+
return matchRoutesImpl(routes, locationArg, basename, false);
|
|
23803
|
+
}
|
|
23804
|
+
function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
|
|
23805
|
+
let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
|
|
23806
|
+
let pathname = stripBasename(location.pathname || "/", basename);
|
|
23807
|
+
if (pathname == null) {
|
|
23808
|
+
return null;
|
|
23809
|
+
}
|
|
23810
|
+
let branches = flattenRoutes(routes);
|
|
23811
|
+
rankRouteBranches(branches);
|
|
23812
|
+
let matches = null;
|
|
23813
|
+
for (let i = 0; matches == null && i < branches.length; ++i) {
|
|
23814
|
+
let decoded = decodePath(pathname);
|
|
23815
|
+
matches = matchRouteBranch(
|
|
23816
|
+
branches[i],
|
|
23817
|
+
decoded,
|
|
23818
|
+
allowPartial
|
|
23819
|
+
);
|
|
23820
|
+
}
|
|
23821
|
+
return matches;
|
|
23822
|
+
}
|
|
23823
|
+
function convertRouteMatchToUiMatch(match, loaderData) {
|
|
23824
|
+
let { route, pathname, params } = match;
|
|
23825
|
+
return {
|
|
23826
|
+
id: route.id,
|
|
23827
|
+
pathname,
|
|
23828
|
+
params,
|
|
23829
|
+
data: loaderData[route.id],
|
|
23830
|
+
loaderData: loaderData[route.id],
|
|
23831
|
+
handle: route.handle
|
|
23832
|
+
};
|
|
23833
|
+
}
|
|
23834
|
+
function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
|
|
23835
|
+
let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
|
|
23836
|
+
let meta = {
|
|
23837
|
+
relativePath: relativePath === void 0 ? route.path || "" : relativePath,
|
|
23838
|
+
caseSensitive: route.caseSensitive === true,
|
|
23839
|
+
childrenIndex: index,
|
|
23840
|
+
route
|
|
23841
|
+
};
|
|
23842
|
+
if (meta.relativePath.startsWith("/")) {
|
|
23843
|
+
if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {
|
|
23844
|
+
return;
|
|
23845
|
+
}
|
|
23846
|
+
invariant(
|
|
23847
|
+
meta.relativePath.startsWith(parentPath),
|
|
23848
|
+
`Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
23849
|
+
);
|
|
23850
|
+
meta.relativePath = meta.relativePath.slice(parentPath.length);
|
|
23851
|
+
}
|
|
23852
|
+
let path = joinPaths([parentPath, meta.relativePath]);
|
|
23853
|
+
let routesMeta = parentsMeta.concat(meta);
|
|
23854
|
+
if (route.children && route.children.length > 0) {
|
|
23855
|
+
invariant(
|
|
23856
|
+
// Our types know better, but runtime JS may not!
|
|
23857
|
+
// @ts-expect-error
|
|
23858
|
+
route.index !== true,
|
|
23859
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${path}".`
|
|
23860
|
+
);
|
|
23861
|
+
flattenRoutes(
|
|
23862
|
+
route.children,
|
|
23863
|
+
branches,
|
|
23864
|
+
routesMeta,
|
|
23865
|
+
path,
|
|
23866
|
+
hasParentOptionalSegments
|
|
23867
|
+
);
|
|
23868
|
+
}
|
|
23869
|
+
if (route.path == null && !route.index) {
|
|
23870
|
+
return;
|
|
23871
|
+
}
|
|
23872
|
+
branches.push({
|
|
23873
|
+
path,
|
|
23874
|
+
score: computeScore(path, route.index),
|
|
23875
|
+
routesMeta
|
|
23876
|
+
});
|
|
23877
|
+
};
|
|
23878
|
+
routes.forEach((route, index) => {
|
|
23879
|
+
if (route.path === "" || !route.path?.includes("?")) {
|
|
23880
|
+
flattenRoute(route, index);
|
|
23881
|
+
} else {
|
|
23882
|
+
for (let exploded of explodeOptionalSegments(route.path)) {
|
|
23883
|
+
flattenRoute(route, index, true, exploded);
|
|
23884
|
+
}
|
|
23885
|
+
}
|
|
23886
|
+
});
|
|
23887
|
+
return branches;
|
|
23888
|
+
}
|
|
23889
|
+
function explodeOptionalSegments(path) {
|
|
23890
|
+
let segments = path.split("/");
|
|
23891
|
+
if (segments.length === 0)
|
|
23892
|
+
return [];
|
|
23893
|
+
let [first, ...rest] = segments;
|
|
23894
|
+
let isOptional = first.endsWith("?");
|
|
23895
|
+
let required = first.replace(/\?$/, "");
|
|
23896
|
+
if (rest.length === 0) {
|
|
23897
|
+
return isOptional ? [required, ""] : [required];
|
|
23898
|
+
}
|
|
23899
|
+
let restExploded = explodeOptionalSegments(rest.join("/"));
|
|
23900
|
+
let result = [];
|
|
23901
|
+
result.push(
|
|
23902
|
+
...restExploded.map(
|
|
23903
|
+
(subpath) => subpath === "" ? required : [required, subpath].join("/")
|
|
23904
|
+
)
|
|
23905
|
+
);
|
|
23906
|
+
if (isOptional) {
|
|
23907
|
+
result.push(...restExploded);
|
|
23908
|
+
}
|
|
23909
|
+
return result.map(
|
|
23910
|
+
(exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded
|
|
23911
|
+
);
|
|
23912
|
+
}
|
|
23913
|
+
function rankRouteBranches(branches) {
|
|
23914
|
+
branches.sort(
|
|
23915
|
+
(a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(
|
|
23916
|
+
a.routesMeta.map((meta) => meta.childrenIndex),
|
|
23917
|
+
b.routesMeta.map((meta) => meta.childrenIndex)
|
|
23918
|
+
)
|
|
23919
|
+
);
|
|
23920
|
+
}
|
|
23921
|
+
var paramRe = /^:[\w-]+$/;
|
|
23922
|
+
var dynamicSegmentValue = 3;
|
|
23923
|
+
var indexRouteValue = 2;
|
|
23924
|
+
var emptySegmentValue = 1;
|
|
23925
|
+
var staticSegmentValue = 10;
|
|
23926
|
+
var splatPenalty = -2;
|
|
23927
|
+
var isSplat = (s) => s === "*";
|
|
23928
|
+
function computeScore(path, index) {
|
|
23929
|
+
let segments = path.split("/");
|
|
23930
|
+
let initialScore = segments.length;
|
|
23931
|
+
if (segments.some(isSplat)) {
|
|
23932
|
+
initialScore += splatPenalty;
|
|
23933
|
+
}
|
|
23934
|
+
if (index) {
|
|
23935
|
+
initialScore += indexRouteValue;
|
|
23936
|
+
}
|
|
23937
|
+
return segments.filter((s) => !isSplat(s)).reduce(
|
|
23938
|
+
(score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue),
|
|
23939
|
+
initialScore
|
|
23940
|
+
);
|
|
23941
|
+
}
|
|
23942
|
+
function compareIndexes(a, b) {
|
|
23943
|
+
let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
|
|
23944
|
+
return siblings ? (
|
|
23945
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
23946
|
+
// first. This allows people to have fine-grained control over the matching
|
|
23947
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
23948
|
+
// want them tried.
|
|
23949
|
+
a[a.length - 1] - b[b.length - 1]
|
|
23950
|
+
) : (
|
|
23951
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
23952
|
+
// so they sort equally.
|
|
23953
|
+
0
|
|
23954
|
+
);
|
|
23955
|
+
}
|
|
23956
|
+
function matchRouteBranch(branch, pathname, allowPartial = false) {
|
|
23957
|
+
let { routesMeta } = branch;
|
|
23958
|
+
let matchedParams = {};
|
|
23959
|
+
let matchedPathname = "/";
|
|
23960
|
+
let matches = [];
|
|
23961
|
+
for (let i = 0; i < routesMeta.length; ++i) {
|
|
23962
|
+
let meta = routesMeta[i];
|
|
23963
|
+
let end = i === routesMeta.length - 1;
|
|
23964
|
+
let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
|
|
23965
|
+
let match = matchPath(
|
|
23966
|
+
{ path: meta.relativePath, caseSensitive: meta.caseSensitive, end },
|
|
23967
|
+
remainingPathname
|
|
23968
|
+
);
|
|
23969
|
+
let route = meta.route;
|
|
23970
|
+
if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {
|
|
23971
|
+
match = matchPath(
|
|
23972
|
+
{
|
|
23973
|
+
path: meta.relativePath,
|
|
23974
|
+
caseSensitive: meta.caseSensitive,
|
|
23975
|
+
end: false
|
|
23976
|
+
},
|
|
23977
|
+
remainingPathname
|
|
23978
|
+
);
|
|
23979
|
+
}
|
|
23980
|
+
if (!match) {
|
|
23981
|
+
return null;
|
|
23982
|
+
}
|
|
23983
|
+
Object.assign(matchedParams, match.params);
|
|
23984
|
+
matches.push({
|
|
23985
|
+
// TODO: Can this as be avoided?
|
|
23986
|
+
params: matchedParams,
|
|
23987
|
+
pathname: joinPaths([matchedPathname, match.pathname]),
|
|
23988
|
+
pathnameBase: normalizePathname(
|
|
23989
|
+
joinPaths([matchedPathname, match.pathnameBase])
|
|
23990
|
+
),
|
|
23991
|
+
route
|
|
23992
|
+
});
|
|
23993
|
+
if (match.pathnameBase !== "/") {
|
|
23994
|
+
matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
|
|
23995
|
+
}
|
|
23996
|
+
}
|
|
23997
|
+
return matches;
|
|
23998
|
+
}
|
|
23999
|
+
function matchPath(pattern, pathname) {
|
|
24000
|
+
if (typeof pattern === "string") {
|
|
24001
|
+
pattern = { path: pattern, caseSensitive: false, end: true };
|
|
24002
|
+
}
|
|
24003
|
+
let [matcher, compiledParams] = compilePath(
|
|
24004
|
+
pattern.path,
|
|
24005
|
+
pattern.caseSensitive,
|
|
24006
|
+
pattern.end
|
|
24007
|
+
);
|
|
24008
|
+
let match = pathname.match(matcher);
|
|
24009
|
+
if (!match)
|
|
24010
|
+
return null;
|
|
24011
|
+
let matchedPathname = match[0];
|
|
24012
|
+
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
24013
|
+
let captureGroups = match.slice(1);
|
|
24014
|
+
let params = compiledParams.reduce(
|
|
24015
|
+
(memo2, { paramName, isOptional }, index) => {
|
|
24016
|
+
if (paramName === "*") {
|
|
24017
|
+
let splatValue = captureGroups[index] || "";
|
|
24018
|
+
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
|
24019
|
+
}
|
|
24020
|
+
const value = captureGroups[index];
|
|
24021
|
+
if (isOptional && !value) {
|
|
24022
|
+
memo2[paramName] = void 0;
|
|
24023
|
+
} else {
|
|
24024
|
+
memo2[paramName] = (value || "").replace(/%2F/g, "/");
|
|
24025
|
+
}
|
|
24026
|
+
return memo2;
|
|
24027
|
+
},
|
|
24028
|
+
{}
|
|
24029
|
+
);
|
|
24030
|
+
return {
|
|
24031
|
+
params,
|
|
24032
|
+
pathname: matchedPathname,
|
|
24033
|
+
pathnameBase,
|
|
24034
|
+
pattern
|
|
24035
|
+
};
|
|
24036
|
+
}
|
|
24037
|
+
function compilePath(path, caseSensitive = false, end = true) {
|
|
24038
|
+
warning(
|
|
24039
|
+
path === "*" || !path.endsWith("*") || path.endsWith("/*"),
|
|
24040
|
+
`Route path "${path}" will be treated as if it were "${path.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${path.replace(/\*$/, "/*")}".`
|
|
24041
|
+
);
|
|
24042
|
+
let params = [];
|
|
24043
|
+
let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
24044
|
+
/\/:([\w-]+)(\?)?/g,
|
|
24045
|
+
(_, paramName, isOptional) => {
|
|
24046
|
+
params.push({ paramName, isOptional: isOptional != null });
|
|
24047
|
+
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
|
|
24048
|
+
}
|
|
24049
|
+
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
24050
|
+
if (path.endsWith("*")) {
|
|
24051
|
+
params.push({ paramName: "*" });
|
|
24052
|
+
regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
|
|
24053
|
+
} else if (end) {
|
|
24054
|
+
regexpSource += "\\/*$";
|
|
24055
|
+
} else if (path !== "" && path !== "/") {
|
|
24056
|
+
regexpSource += "(?:(?=\\/|$))";
|
|
24057
|
+
} else {
|
|
24058
|
+
}
|
|
24059
|
+
let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : "i");
|
|
24060
|
+
return [matcher, params];
|
|
24061
|
+
}
|
|
24062
|
+
function decodePath(value) {
|
|
24063
|
+
try {
|
|
24064
|
+
return value.split("/").map((v) => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
|
|
24065
|
+
} catch (error) {
|
|
24066
|
+
warning(
|
|
24067
|
+
false,
|
|
24068
|
+
`The URL path "${value}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`
|
|
24069
|
+
);
|
|
24070
|
+
return value;
|
|
24071
|
+
}
|
|
24072
|
+
}
|
|
24073
|
+
function stripBasename(pathname, basename) {
|
|
24074
|
+
if (basename === "/")
|
|
24075
|
+
return pathname;
|
|
24076
|
+
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
24077
|
+
return null;
|
|
24078
|
+
}
|
|
24079
|
+
let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
|
|
24080
|
+
let nextChar = pathname.charAt(startIndex);
|
|
24081
|
+
if (nextChar && nextChar !== "/") {
|
|
24082
|
+
return null;
|
|
24083
|
+
}
|
|
24084
|
+
return pathname.slice(startIndex) || "/";
|
|
24085
|
+
}
|
|
24086
|
+
function resolvePath(to, fromPathname = "/") {
|
|
24087
|
+
let {
|
|
24088
|
+
pathname: toPathname,
|
|
24089
|
+
search = "",
|
|
24090
|
+
hash = ""
|
|
24091
|
+
} = typeof to === "string" ? parsePath(to) : to;
|
|
24092
|
+
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
|
24093
|
+
return {
|
|
24094
|
+
pathname,
|
|
24095
|
+
search: normalizeSearch(search),
|
|
24096
|
+
hash: normalizeHash(hash)
|
|
24097
|
+
};
|
|
24098
|
+
}
|
|
24099
|
+
function resolvePathname(relativePath, fromPathname) {
|
|
24100
|
+
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
|
24101
|
+
let relativeSegments = relativePath.split("/");
|
|
24102
|
+
relativeSegments.forEach((segment) => {
|
|
24103
|
+
if (segment === "..") {
|
|
24104
|
+
if (segments.length > 1)
|
|
24105
|
+
segments.pop();
|
|
24106
|
+
} else if (segment !== ".") {
|
|
24107
|
+
segments.push(segment);
|
|
24108
|
+
}
|
|
24109
|
+
});
|
|
24110
|
+
return segments.length > 1 ? segments.join("/") : "/";
|
|
24111
|
+
}
|
|
24112
|
+
function getInvalidPathError(char, field, dest, path) {
|
|
24113
|
+
return `Cannot include a '${char}' character in a manually specified \`to.${field}\` field [${JSON.stringify(
|
|
24114
|
+
path
|
|
24115
|
+
)}]. Please separate it out to the \`to.${dest}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
24116
|
+
}
|
|
24117
|
+
function getPathContributingMatches(matches) {
|
|
24118
|
+
return matches.filter(
|
|
24119
|
+
(match, index) => index === 0 || match.route.path && match.route.path.length > 0
|
|
24120
|
+
);
|
|
24121
|
+
}
|
|
24122
|
+
function getResolveToMatches(matches) {
|
|
24123
|
+
let pathMatches = getPathContributingMatches(matches);
|
|
24124
|
+
return pathMatches.map(
|
|
24125
|
+
(match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase
|
|
24126
|
+
);
|
|
24127
|
+
}
|
|
24128
|
+
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {
|
|
24129
|
+
let to;
|
|
24130
|
+
if (typeof toArg === "string") {
|
|
24131
|
+
to = parsePath(toArg);
|
|
24132
|
+
} else {
|
|
24133
|
+
to = { ...toArg };
|
|
24134
|
+
invariant(
|
|
24135
|
+
!to.pathname || !to.pathname.includes("?"),
|
|
24136
|
+
getInvalidPathError("?", "pathname", "search", to)
|
|
24137
|
+
);
|
|
24138
|
+
invariant(
|
|
24139
|
+
!to.pathname || !to.pathname.includes("#"),
|
|
24140
|
+
getInvalidPathError("#", "pathname", "hash", to)
|
|
24141
|
+
);
|
|
24142
|
+
invariant(
|
|
24143
|
+
!to.search || !to.search.includes("#"),
|
|
24144
|
+
getInvalidPathError("#", "search", "hash", to)
|
|
24145
|
+
);
|
|
24146
|
+
}
|
|
24147
|
+
let isEmptyPath = toArg === "" || to.pathname === "";
|
|
24148
|
+
let toPathname = isEmptyPath ? "/" : to.pathname;
|
|
24149
|
+
let from;
|
|
24150
|
+
if (toPathname == null) {
|
|
24151
|
+
from = locationPathname;
|
|
24152
|
+
} else {
|
|
24153
|
+
let routePathnameIndex = routePathnames.length - 1;
|
|
24154
|
+
if (!isPathRelative && toPathname.startsWith("..")) {
|
|
24155
|
+
let toSegments = toPathname.split("/");
|
|
24156
|
+
while (toSegments[0] === "..") {
|
|
24157
|
+
toSegments.shift();
|
|
24158
|
+
routePathnameIndex -= 1;
|
|
24159
|
+
}
|
|
24160
|
+
to.pathname = toSegments.join("/");
|
|
24161
|
+
}
|
|
24162
|
+
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
|
24163
|
+
}
|
|
24164
|
+
let path = resolvePath(to, from);
|
|
24165
|
+
let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
|
|
24166
|
+
let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
|
|
24167
|
+
if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
|
|
24168
|
+
path.pathname += "/";
|
|
24169
|
+
}
|
|
24170
|
+
return path;
|
|
24171
|
+
}
|
|
24172
|
+
var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
|
|
24173
|
+
var normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
|
|
24174
|
+
var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
24175
|
+
var normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
24176
|
+
function isRouteErrorResponse(error) {
|
|
24177
|
+
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
24178
|
+
}
|
|
24179
|
+
var validMutationMethodsArr = [
|
|
24180
|
+
"POST",
|
|
24181
|
+
"PUT",
|
|
24182
|
+
"PATCH",
|
|
24183
|
+
"DELETE"
|
|
24184
|
+
];
|
|
24185
|
+
var validMutationMethods = new Set(
|
|
24186
|
+
validMutationMethodsArr
|
|
24187
|
+
);
|
|
24188
|
+
var validRequestMethodsArr = [
|
|
24189
|
+
"GET",
|
|
24190
|
+
...validMutationMethodsArr
|
|
24191
|
+
];
|
|
24192
|
+
var validRequestMethods = new Set(validRequestMethodsArr);
|
|
24193
|
+
var ResetLoaderDataSymbol = Symbol("ResetLoaderData");
|
|
24194
|
+
var DataRouterContext = React2.createContext(null);
|
|
24195
|
+
DataRouterContext.displayName = "DataRouter";
|
|
24196
|
+
var DataRouterStateContext = React2.createContext(null);
|
|
24197
|
+
DataRouterStateContext.displayName = "DataRouterState";
|
|
24198
|
+
var RSCRouterContext = React2.createContext(false);
|
|
24199
|
+
var ViewTransitionContext = React2.createContext({
|
|
24200
|
+
isTransitioning: false
|
|
24201
|
+
});
|
|
24202
|
+
ViewTransitionContext.displayName = "ViewTransition";
|
|
24203
|
+
var FetchersContext = React2.createContext(
|
|
24204
|
+
/* @__PURE__ */ new Map()
|
|
24205
|
+
);
|
|
24206
|
+
FetchersContext.displayName = "Fetchers";
|
|
24207
|
+
var AwaitContext = React2.createContext(null);
|
|
24208
|
+
AwaitContext.displayName = "Await";
|
|
24209
|
+
var NavigationContext = React2.createContext(
|
|
24210
|
+
null
|
|
24211
|
+
);
|
|
24212
|
+
NavigationContext.displayName = "Navigation";
|
|
24213
|
+
var LocationContext = React2.createContext(
|
|
24214
|
+
null
|
|
24215
|
+
);
|
|
24216
|
+
LocationContext.displayName = "Location";
|
|
24217
|
+
var RouteContext = React2.createContext({
|
|
24218
|
+
outlet: null,
|
|
24219
|
+
matches: [],
|
|
24220
|
+
isDataRoute: false
|
|
24221
|
+
});
|
|
24222
|
+
RouteContext.displayName = "Route";
|
|
24223
|
+
var RouteErrorContext = React2.createContext(null);
|
|
24224
|
+
RouteErrorContext.displayName = "RouteError";
|
|
24225
|
+
var ENABLE_DEV_WARNINGS = true;
|
|
24226
|
+
function useHref(to, { relative } = {}) {
|
|
24227
|
+
invariant(
|
|
24228
|
+
useInRouterContext(),
|
|
24229
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
24230
|
+
// router loaded. We can help them understand how to avoid that.
|
|
24231
|
+
`useHref() may be used only in the context of a <Router> component.`
|
|
24232
|
+
);
|
|
24233
|
+
let { basename, navigator: navigator2 } = React22.useContext(NavigationContext);
|
|
24234
|
+
let { hash, pathname, search } = useResolvedPath(to, { relative });
|
|
24235
|
+
let joinedPathname = pathname;
|
|
24236
|
+
if (basename !== "/") {
|
|
24237
|
+
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
24238
|
+
}
|
|
24239
|
+
return navigator2.createHref({ pathname: joinedPathname, search, hash });
|
|
24240
|
+
}
|
|
24241
|
+
function useInRouterContext() {
|
|
24242
|
+
return React22.useContext(LocationContext) != null;
|
|
24243
|
+
}
|
|
24244
|
+
function useLocation() {
|
|
24245
|
+
invariant(
|
|
24246
|
+
useInRouterContext(),
|
|
24247
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
24248
|
+
// router loaded. We can help them understand how to avoid that.
|
|
24249
|
+
`useLocation() may be used only in the context of a <Router> component.`
|
|
24250
|
+
);
|
|
24251
|
+
return React22.useContext(LocationContext).location;
|
|
24252
|
+
}
|
|
24253
|
+
var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;
|
|
24254
|
+
function useIsomorphicLayoutEffect(cb) {
|
|
24255
|
+
let isStatic = React22.useContext(NavigationContext).static;
|
|
24256
|
+
if (!isStatic) {
|
|
24257
|
+
React22.useLayoutEffect(cb);
|
|
24258
|
+
}
|
|
24259
|
+
}
|
|
24260
|
+
function useNavigate() {
|
|
24261
|
+
let { isDataRoute } = React22.useContext(RouteContext);
|
|
24262
|
+
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
24263
|
+
}
|
|
24264
|
+
function useNavigateUnstable() {
|
|
24265
|
+
invariant(
|
|
24266
|
+
useInRouterContext(),
|
|
24267
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
24268
|
+
// router loaded. We can help them understand how to avoid that.
|
|
24269
|
+
`useNavigate() may be used only in the context of a <Router> component.`
|
|
24270
|
+
);
|
|
24271
|
+
let dataRouterContext = React22.useContext(DataRouterContext);
|
|
24272
|
+
let { basename, navigator: navigator2 } = React22.useContext(NavigationContext);
|
|
24273
|
+
let { matches } = React22.useContext(RouteContext);
|
|
24274
|
+
let { pathname: locationPathname } = useLocation();
|
|
24275
|
+
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
|
|
24276
|
+
let activeRef = React22.useRef(false);
|
|
24277
|
+
useIsomorphicLayoutEffect(() => {
|
|
24278
|
+
activeRef.current = true;
|
|
24279
|
+
});
|
|
24280
|
+
let navigate = React22.useCallback(
|
|
24281
|
+
(to, options = {}) => {
|
|
24282
|
+
warning(activeRef.current, navigateEffectWarning);
|
|
24283
|
+
if (!activeRef.current)
|
|
24284
|
+
return;
|
|
24285
|
+
if (typeof to === "number") {
|
|
24286
|
+
navigator2.go(to);
|
|
24287
|
+
return;
|
|
24288
|
+
}
|
|
24289
|
+
let path = resolveTo(
|
|
24290
|
+
to,
|
|
24291
|
+
JSON.parse(routePathnamesJson),
|
|
24292
|
+
locationPathname,
|
|
24293
|
+
options.relative === "path"
|
|
24294
|
+
);
|
|
24295
|
+
if (dataRouterContext == null && basename !== "/") {
|
|
24296
|
+
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
24297
|
+
}
|
|
24298
|
+
(!!options.replace ? navigator2.replace : navigator2.push)(
|
|
24299
|
+
path,
|
|
24300
|
+
options.state,
|
|
24301
|
+
options
|
|
24302
|
+
);
|
|
24303
|
+
},
|
|
24304
|
+
[
|
|
24305
|
+
basename,
|
|
24306
|
+
navigator2,
|
|
24307
|
+
routePathnamesJson,
|
|
24308
|
+
locationPathname,
|
|
24309
|
+
dataRouterContext
|
|
24310
|
+
]
|
|
24311
|
+
);
|
|
24312
|
+
return navigate;
|
|
24313
|
+
}
|
|
24314
|
+
var OutletContext = React22.createContext(null);
|
|
24315
|
+
function useResolvedPath(to, { relative } = {}) {
|
|
24316
|
+
let { matches } = React22.useContext(RouteContext);
|
|
24317
|
+
let { pathname: locationPathname } = useLocation();
|
|
24318
|
+
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
|
|
24319
|
+
return React22.useMemo(
|
|
24320
|
+
() => resolveTo(
|
|
24321
|
+
to,
|
|
24322
|
+
JSON.parse(routePathnamesJson),
|
|
24323
|
+
locationPathname,
|
|
24324
|
+
relative === "path"
|
|
24325
|
+
),
|
|
24326
|
+
[to, routePathnamesJson, locationPathname, relative]
|
|
24327
|
+
);
|
|
24328
|
+
}
|
|
24329
|
+
function useRoutesImpl(routes, locationArg, dataRouterState, unstable_onError, future) {
|
|
24330
|
+
invariant(
|
|
24331
|
+
useInRouterContext(),
|
|
24332
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
24333
|
+
// router loaded. We can help them understand how to avoid that.
|
|
24334
|
+
`useRoutes() may be used only in the context of a <Router> component.`
|
|
24335
|
+
);
|
|
24336
|
+
let { navigator: navigator2 } = React22.useContext(NavigationContext);
|
|
24337
|
+
let { matches: parentMatches } = React22.useContext(RouteContext);
|
|
24338
|
+
let routeMatch = parentMatches[parentMatches.length - 1];
|
|
24339
|
+
let parentParams = routeMatch ? routeMatch.params : {};
|
|
24340
|
+
let parentPathname = routeMatch ? routeMatch.pathname : "/";
|
|
24341
|
+
let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";
|
|
24342
|
+
let parentRoute = routeMatch && routeMatch.route;
|
|
24343
|
+
if (ENABLE_DEV_WARNINGS) {
|
|
24344
|
+
let parentPath = parentRoute && parentRoute.path || "";
|
|
24345
|
+
warningOnce(
|
|
24346
|
+
parentPathname,
|
|
24347
|
+
!parentRoute || parentPath.endsWith("*") || parentPath.endsWith("*?"),
|
|
24348
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${parentPathname}" (under <Route path="${parentPath}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
24349
|
+
|
|
24350
|
+
Please change the parent <Route path="${parentPath}"> to <Route path="${parentPath === "/" ? "*" : `${parentPath}/*`}">.`
|
|
24351
|
+
);
|
|
24352
|
+
}
|
|
24353
|
+
let locationFromContext = useLocation();
|
|
24354
|
+
let location;
|
|
24355
|
+
if (locationArg) {
|
|
24356
|
+
let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
|
|
24357
|
+
invariant(
|
|
24358
|
+
parentPathnameBase === "/" || parsedLocationArg.pathname?.startsWith(parentPathnameBase),
|
|
24359
|
+
`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
|
|
24360
|
+
);
|
|
24361
|
+
location = parsedLocationArg;
|
|
24362
|
+
} else {
|
|
24363
|
+
location = locationFromContext;
|
|
24364
|
+
}
|
|
24365
|
+
let pathname = location.pathname || "/";
|
|
24366
|
+
let remainingPathname = pathname;
|
|
24367
|
+
if (parentPathnameBase !== "/") {
|
|
24368
|
+
let parentSegments = parentPathnameBase.replace(/^\//, "").split("/");
|
|
24369
|
+
let segments = pathname.replace(/^\//, "").split("/");
|
|
24370
|
+
remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
|
|
24371
|
+
}
|
|
24372
|
+
let matches = matchRoutes(routes, { pathname: remainingPathname });
|
|
24373
|
+
if (ENABLE_DEV_WARNINGS) {
|
|
24374
|
+
warning(
|
|
24375
|
+
parentRoute || matches != null,
|
|
24376
|
+
`No routes matched location "${location.pathname}${location.search}${location.hash}" `
|
|
24377
|
+
);
|
|
24378
|
+
warning(
|
|
24379
|
+
matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,
|
|
24380
|
+
`Matched leaf route at location "${location.pathname}${location.search}${location.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
24381
|
+
);
|
|
24382
|
+
}
|
|
24383
|
+
let renderedMatches = _renderMatches(
|
|
24384
|
+
matches && matches.map(
|
|
24385
|
+
(match) => Object.assign({}, match, {
|
|
24386
|
+
params: Object.assign({}, parentParams, match.params),
|
|
24387
|
+
pathname: joinPaths([
|
|
24388
|
+
parentPathnameBase,
|
|
24389
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
24390
|
+
navigator2.encodeLocation ? navigator2.encodeLocation(match.pathname).pathname : match.pathname
|
|
24391
|
+
]),
|
|
24392
|
+
pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
|
|
24393
|
+
parentPathnameBase,
|
|
24394
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
24395
|
+
navigator2.encodeLocation ? navigator2.encodeLocation(match.pathnameBase).pathname : match.pathnameBase
|
|
24396
|
+
])
|
|
24397
|
+
})
|
|
24398
|
+
),
|
|
24399
|
+
parentMatches,
|
|
24400
|
+
dataRouterState,
|
|
24401
|
+
unstable_onError,
|
|
24402
|
+
future
|
|
24403
|
+
);
|
|
24404
|
+
if (locationArg && renderedMatches) {
|
|
24405
|
+
return /* @__PURE__ */ React22.createElement(
|
|
24406
|
+
LocationContext.Provider,
|
|
24407
|
+
{
|
|
24408
|
+
value: {
|
|
24409
|
+
location: {
|
|
24410
|
+
pathname: "/",
|
|
24411
|
+
search: "",
|
|
24412
|
+
hash: "",
|
|
24413
|
+
state: null,
|
|
24414
|
+
key: "default",
|
|
24415
|
+
...location
|
|
24416
|
+
},
|
|
24417
|
+
navigationType: "POP"
|
|
24418
|
+
/* Pop */
|
|
24419
|
+
}
|
|
24420
|
+
},
|
|
24421
|
+
renderedMatches
|
|
24422
|
+
);
|
|
24423
|
+
}
|
|
24424
|
+
return renderedMatches;
|
|
24425
|
+
}
|
|
24426
|
+
function DefaultErrorComponent() {
|
|
24427
|
+
let error = useRouteError();
|
|
24428
|
+
let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);
|
|
24429
|
+
let stack = error instanceof Error ? error.stack : null;
|
|
24430
|
+
let lightgrey = "rgba(200,200,200, 0.5)";
|
|
24431
|
+
let preStyles = { padding: "0.5rem", backgroundColor: lightgrey };
|
|
24432
|
+
let codeStyles = { padding: "2px 4px", backgroundColor: lightgrey };
|
|
24433
|
+
let devInfo = null;
|
|
24434
|
+
if (ENABLE_DEV_WARNINGS) {
|
|
24435
|
+
console.error(
|
|
24436
|
+
"Error handled by React Router default ErrorBoundary:",
|
|
24437
|
+
error
|
|
24438
|
+
);
|
|
24439
|
+
devInfo = /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("p", null, "\u{1F4BF} Hey developer \u{1F44B}"), /* @__PURE__ */ React22.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React22.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React22.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
|
|
24440
|
+
}
|
|
24441
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React22.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React22.createElement("pre", { style: preStyles }, stack) : null, devInfo);
|
|
24442
|
+
}
|
|
24443
|
+
var defaultErrorElement = /* @__PURE__ */ React22.createElement(DefaultErrorComponent, null);
|
|
24444
|
+
var RenderErrorBoundary = class extends React22.Component {
|
|
24445
|
+
constructor(props) {
|
|
24446
|
+
super(props);
|
|
24447
|
+
this.state = {
|
|
24448
|
+
location: props.location,
|
|
24449
|
+
revalidation: props.revalidation,
|
|
24450
|
+
error: props.error
|
|
24451
|
+
};
|
|
24452
|
+
}
|
|
24453
|
+
static getDerivedStateFromError(error) {
|
|
24454
|
+
return { error };
|
|
24455
|
+
}
|
|
24456
|
+
static getDerivedStateFromProps(props, state) {
|
|
24457
|
+
if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") {
|
|
24458
|
+
return {
|
|
24459
|
+
error: props.error,
|
|
24460
|
+
location: props.location,
|
|
24461
|
+
revalidation: props.revalidation
|
|
24462
|
+
};
|
|
24463
|
+
}
|
|
24464
|
+
return {
|
|
24465
|
+
error: props.error !== void 0 ? props.error : state.error,
|
|
24466
|
+
location: state.location,
|
|
24467
|
+
revalidation: props.revalidation || state.revalidation
|
|
24468
|
+
};
|
|
24469
|
+
}
|
|
24470
|
+
componentDidCatch(error, errorInfo) {
|
|
24471
|
+
if (this.props.unstable_onError) {
|
|
24472
|
+
this.props.unstable_onError(error, errorInfo);
|
|
24473
|
+
} else {
|
|
24474
|
+
console.error(
|
|
24475
|
+
"React Router caught the following error during render",
|
|
24476
|
+
error
|
|
24477
|
+
);
|
|
24478
|
+
}
|
|
24479
|
+
}
|
|
24480
|
+
render() {
|
|
24481
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ React22.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React22.createElement(
|
|
24482
|
+
RouteErrorContext.Provider,
|
|
24483
|
+
{
|
|
24484
|
+
value: this.state.error,
|
|
24485
|
+
children: this.props.component
|
|
24486
|
+
}
|
|
24487
|
+
)) : this.props.children;
|
|
24488
|
+
}
|
|
24489
|
+
};
|
|
24490
|
+
function RenderedRoute({ routeContext, match, children }) {
|
|
24491
|
+
let dataRouterContext = React22.useContext(DataRouterContext);
|
|
24492
|
+
if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {
|
|
24493
|
+
dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
|
|
24494
|
+
}
|
|
24495
|
+
return /* @__PURE__ */ React22.createElement(RouteContext.Provider, { value: routeContext }, children);
|
|
24496
|
+
}
|
|
24497
|
+
function _renderMatches(matches, parentMatches = [], dataRouterState = null, unstable_onError = null, future = null) {
|
|
24498
|
+
if (matches == null) {
|
|
24499
|
+
if (!dataRouterState) {
|
|
24500
|
+
return null;
|
|
24501
|
+
}
|
|
24502
|
+
if (dataRouterState.errors) {
|
|
24503
|
+
matches = dataRouterState.matches;
|
|
24504
|
+
} else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {
|
|
24505
|
+
matches = dataRouterState.matches;
|
|
24506
|
+
} else {
|
|
24507
|
+
return null;
|
|
24508
|
+
}
|
|
24509
|
+
}
|
|
24510
|
+
let renderedMatches = matches;
|
|
24511
|
+
let errors = dataRouterState?.errors;
|
|
24512
|
+
if (errors != null) {
|
|
24513
|
+
let errorIndex = renderedMatches.findIndex(
|
|
24514
|
+
(m) => m.route.id && errors?.[m.route.id] !== void 0
|
|
24515
|
+
);
|
|
24516
|
+
invariant(
|
|
24517
|
+
errorIndex >= 0,
|
|
24518
|
+
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
24519
|
+
errors
|
|
24520
|
+
).join(",")}`
|
|
24521
|
+
);
|
|
24522
|
+
renderedMatches = renderedMatches.slice(
|
|
24523
|
+
0,
|
|
24524
|
+
Math.min(renderedMatches.length, errorIndex + 1)
|
|
24525
|
+
);
|
|
24526
|
+
}
|
|
24527
|
+
let renderFallback = false;
|
|
24528
|
+
let fallbackIndex = -1;
|
|
24529
|
+
if (dataRouterState) {
|
|
24530
|
+
for (let i = 0; i < renderedMatches.length; i++) {
|
|
24531
|
+
let match = renderedMatches[i];
|
|
24532
|
+
if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {
|
|
24533
|
+
fallbackIndex = i;
|
|
24534
|
+
}
|
|
24535
|
+
if (match.route.id) {
|
|
24536
|
+
let { loaderData, errors: errors2 } = dataRouterState;
|
|
24537
|
+
let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);
|
|
24538
|
+
if (match.route.lazy || needsToRunLoader) {
|
|
24539
|
+
renderFallback = true;
|
|
24540
|
+
if (fallbackIndex >= 0) {
|
|
24541
|
+
renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);
|
|
24542
|
+
} else {
|
|
24543
|
+
renderedMatches = [renderedMatches[0]];
|
|
24544
|
+
}
|
|
24545
|
+
break;
|
|
24546
|
+
}
|
|
24547
|
+
}
|
|
24548
|
+
}
|
|
24549
|
+
}
|
|
24550
|
+
return renderedMatches.reduceRight(
|
|
24551
|
+
(outlet, match, index) => {
|
|
24552
|
+
let error;
|
|
24553
|
+
let shouldRenderHydrateFallback = false;
|
|
24554
|
+
let errorElement = null;
|
|
24555
|
+
let hydrateFallbackElement = null;
|
|
24556
|
+
if (dataRouterState) {
|
|
24557
|
+
error = errors && match.route.id ? errors[match.route.id] : void 0;
|
|
24558
|
+
errorElement = match.route.errorElement || defaultErrorElement;
|
|
24559
|
+
if (renderFallback) {
|
|
24560
|
+
if (fallbackIndex < 0 && index === 0) {
|
|
24561
|
+
warningOnce(
|
|
24562
|
+
"route-fallback",
|
|
24563
|
+
false,
|
|
24564
|
+
"No `HydrateFallback` element provided to render during initial hydration"
|
|
24565
|
+
);
|
|
24566
|
+
shouldRenderHydrateFallback = true;
|
|
24567
|
+
hydrateFallbackElement = null;
|
|
24568
|
+
} else if (fallbackIndex === index) {
|
|
24569
|
+
shouldRenderHydrateFallback = true;
|
|
24570
|
+
hydrateFallbackElement = match.route.hydrateFallbackElement || null;
|
|
24571
|
+
}
|
|
24572
|
+
}
|
|
24573
|
+
}
|
|
24574
|
+
let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));
|
|
24575
|
+
let getChildren = () => {
|
|
24576
|
+
let children;
|
|
24577
|
+
if (error) {
|
|
24578
|
+
children = errorElement;
|
|
24579
|
+
} else if (shouldRenderHydrateFallback) {
|
|
24580
|
+
children = hydrateFallbackElement;
|
|
24581
|
+
} else if (match.route.Component) {
|
|
24582
|
+
children = /* @__PURE__ */ React22.createElement(match.route.Component, null);
|
|
24583
|
+
} else if (match.route.element) {
|
|
24584
|
+
children = match.route.element;
|
|
24585
|
+
} else {
|
|
24586
|
+
children = outlet;
|
|
24587
|
+
}
|
|
24588
|
+
return /* @__PURE__ */ React22.createElement(
|
|
24589
|
+
RenderedRoute,
|
|
24590
|
+
{
|
|
24591
|
+
match,
|
|
24592
|
+
routeContext: {
|
|
24593
|
+
outlet,
|
|
24594
|
+
matches: matches2,
|
|
24595
|
+
isDataRoute: dataRouterState != null
|
|
24596
|
+
},
|
|
24597
|
+
children
|
|
24598
|
+
}
|
|
24599
|
+
);
|
|
24600
|
+
};
|
|
24601
|
+
return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React22.createElement(
|
|
24602
|
+
RenderErrorBoundary,
|
|
24603
|
+
{
|
|
24604
|
+
location: dataRouterState.location,
|
|
24605
|
+
revalidation: dataRouterState.revalidation,
|
|
24606
|
+
component: errorElement,
|
|
24607
|
+
error,
|
|
24608
|
+
children: getChildren(),
|
|
24609
|
+
routeContext: { outlet: null, matches: matches2, isDataRoute: true },
|
|
24610
|
+
unstable_onError
|
|
24611
|
+
}
|
|
24612
|
+
) : getChildren();
|
|
24613
|
+
},
|
|
24614
|
+
null
|
|
24615
|
+
);
|
|
24616
|
+
}
|
|
24617
|
+
function getDataRouterConsoleError(hookName) {
|
|
24618
|
+
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
24619
|
+
}
|
|
24620
|
+
function useDataRouterContext(hookName) {
|
|
24621
|
+
let ctx = React22.useContext(DataRouterContext);
|
|
24622
|
+
invariant(ctx, getDataRouterConsoleError(hookName));
|
|
24623
|
+
return ctx;
|
|
24624
|
+
}
|
|
24625
|
+
function useDataRouterState(hookName) {
|
|
24626
|
+
let state = React22.useContext(DataRouterStateContext);
|
|
24627
|
+
invariant(state, getDataRouterConsoleError(hookName));
|
|
24628
|
+
return state;
|
|
24629
|
+
}
|
|
24630
|
+
function useRouteContext(hookName) {
|
|
24631
|
+
let route = React22.useContext(RouteContext);
|
|
24632
|
+
invariant(route, getDataRouterConsoleError(hookName));
|
|
24633
|
+
return route;
|
|
24634
|
+
}
|
|
24635
|
+
function useCurrentRouteId(hookName) {
|
|
24636
|
+
let route = useRouteContext(hookName);
|
|
24637
|
+
let thisRoute = route.matches[route.matches.length - 1];
|
|
24638
|
+
invariant(
|
|
24639
|
+
thisRoute.route.id,
|
|
24640
|
+
`${hookName} can only be used on routes that contain a unique "id"`
|
|
24641
|
+
);
|
|
24642
|
+
return thisRoute.route.id;
|
|
24643
|
+
}
|
|
24644
|
+
function useRouteId() {
|
|
24645
|
+
return useCurrentRouteId(
|
|
24646
|
+
"useRouteId"
|
|
24647
|
+
/* UseRouteId */
|
|
24648
|
+
);
|
|
24649
|
+
}
|
|
24650
|
+
function useNavigation() {
|
|
24651
|
+
let state = useDataRouterState(
|
|
24652
|
+
"useNavigation"
|
|
24653
|
+
/* UseNavigation */
|
|
24654
|
+
);
|
|
24655
|
+
return state.navigation;
|
|
24656
|
+
}
|
|
24657
|
+
function useMatches() {
|
|
24658
|
+
let { matches, loaderData } = useDataRouterState(
|
|
24659
|
+
"useMatches"
|
|
24660
|
+
/* UseMatches */
|
|
24661
|
+
);
|
|
24662
|
+
return React22.useMemo(
|
|
24663
|
+
() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),
|
|
24664
|
+
[matches, loaderData]
|
|
24665
|
+
);
|
|
24666
|
+
}
|
|
24667
|
+
function useRouteError() {
|
|
24668
|
+
let error = React22.useContext(RouteErrorContext);
|
|
24669
|
+
let state = useDataRouterState(
|
|
24670
|
+
"useRouteError"
|
|
24671
|
+
/* UseRouteError */
|
|
24672
|
+
);
|
|
24673
|
+
let routeId = useCurrentRouteId(
|
|
24674
|
+
"useRouteError"
|
|
24675
|
+
/* UseRouteError */
|
|
24676
|
+
);
|
|
24677
|
+
if (error !== void 0) {
|
|
24678
|
+
return error;
|
|
24679
|
+
}
|
|
24680
|
+
return state.errors?.[routeId];
|
|
24681
|
+
}
|
|
24682
|
+
function useNavigateStable() {
|
|
24683
|
+
let { router } = useDataRouterContext(
|
|
24684
|
+
"useNavigate"
|
|
24685
|
+
/* UseNavigateStable */
|
|
24686
|
+
);
|
|
24687
|
+
let id = useCurrentRouteId(
|
|
24688
|
+
"useNavigate"
|
|
24689
|
+
/* UseNavigateStable */
|
|
24690
|
+
);
|
|
24691
|
+
let activeRef = React22.useRef(false);
|
|
24692
|
+
useIsomorphicLayoutEffect(() => {
|
|
24693
|
+
activeRef.current = true;
|
|
24694
|
+
});
|
|
24695
|
+
let navigate = React22.useCallback(
|
|
24696
|
+
async (to, options = {}) => {
|
|
24697
|
+
warning(activeRef.current, navigateEffectWarning);
|
|
24698
|
+
if (!activeRef.current)
|
|
24699
|
+
return;
|
|
24700
|
+
if (typeof to === "number") {
|
|
24701
|
+
router.navigate(to);
|
|
24702
|
+
} else {
|
|
24703
|
+
await router.navigate(to, { fromRouteId: id, ...options });
|
|
24704
|
+
}
|
|
24705
|
+
},
|
|
24706
|
+
[router, id]
|
|
24707
|
+
);
|
|
24708
|
+
return navigate;
|
|
24709
|
+
}
|
|
24710
|
+
var alreadyWarned = {};
|
|
24711
|
+
function warningOnce(key, cond, message) {
|
|
24712
|
+
if (!cond && !alreadyWarned[key]) {
|
|
24713
|
+
alreadyWarned[key] = true;
|
|
24714
|
+
warning(false, message);
|
|
24715
|
+
}
|
|
24716
|
+
}
|
|
24717
|
+
var MemoizedDataRoutes = React3.memo(DataRoutes);
|
|
24718
|
+
function DataRoutes({
|
|
24719
|
+
routes,
|
|
24720
|
+
future,
|
|
24721
|
+
state,
|
|
24722
|
+
unstable_onError
|
|
24723
|
+
}) {
|
|
24724
|
+
return useRoutesImpl(routes, void 0, state, unstable_onError, future);
|
|
24725
|
+
}
|
|
24726
|
+
function MemoryRouter({
|
|
24727
|
+
basename,
|
|
24728
|
+
children,
|
|
24729
|
+
initialEntries,
|
|
24730
|
+
initialIndex
|
|
24731
|
+
}) {
|
|
24732
|
+
let historyRef = React3.useRef();
|
|
24733
|
+
if (historyRef.current == null) {
|
|
24734
|
+
historyRef.current = createMemoryHistory({
|
|
24735
|
+
initialEntries,
|
|
24736
|
+
initialIndex,
|
|
24737
|
+
v5Compat: true
|
|
24738
|
+
});
|
|
24739
|
+
}
|
|
24740
|
+
let history = historyRef.current;
|
|
24741
|
+
let [state, setStateImpl] = React3.useState({
|
|
24742
|
+
action: history.action,
|
|
24743
|
+
location: history.location
|
|
24744
|
+
});
|
|
24745
|
+
let setState = React3.useCallback(
|
|
24746
|
+
(newState) => {
|
|
24747
|
+
React3.startTransition(() => setStateImpl(newState));
|
|
24748
|
+
},
|
|
24749
|
+
[setStateImpl]
|
|
24750
|
+
);
|
|
24751
|
+
React3.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
24752
|
+
return /* @__PURE__ */ React3.createElement(
|
|
24753
|
+
Router,
|
|
24754
|
+
{
|
|
24755
|
+
basename,
|
|
24756
|
+
children,
|
|
24757
|
+
location: state.location,
|
|
24758
|
+
navigationType: state.action,
|
|
24759
|
+
navigator: history
|
|
24760
|
+
}
|
|
24761
|
+
);
|
|
24762
|
+
}
|
|
24763
|
+
function Router({
|
|
24764
|
+
basename: basenameProp = "/",
|
|
24765
|
+
children = null,
|
|
24766
|
+
location: locationProp,
|
|
24767
|
+
navigationType = "POP",
|
|
24768
|
+
navigator: navigator2,
|
|
24769
|
+
static: staticProp = false
|
|
24770
|
+
}) {
|
|
24771
|
+
invariant(
|
|
24772
|
+
!useInRouterContext(),
|
|
24773
|
+
`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`
|
|
24774
|
+
);
|
|
24775
|
+
let basename = basenameProp.replace(/^\/*/, "/");
|
|
24776
|
+
let navigationContext = React3.useMemo(
|
|
24777
|
+
() => ({
|
|
24778
|
+
basename,
|
|
24779
|
+
navigator: navigator2,
|
|
24780
|
+
static: staticProp,
|
|
24781
|
+
future: {}
|
|
24782
|
+
}),
|
|
24783
|
+
[basename, navigator2, staticProp]
|
|
24784
|
+
);
|
|
24785
|
+
if (typeof locationProp === "string") {
|
|
24786
|
+
locationProp = parsePath(locationProp);
|
|
24787
|
+
}
|
|
24788
|
+
let {
|
|
24789
|
+
pathname = "/",
|
|
24790
|
+
search = "",
|
|
24791
|
+
hash = "",
|
|
24792
|
+
state = null,
|
|
24793
|
+
key = "default"
|
|
24794
|
+
} = locationProp;
|
|
24795
|
+
let locationContext = React3.useMemo(() => {
|
|
24796
|
+
let trailingPathname = stripBasename(pathname, basename);
|
|
24797
|
+
if (trailingPathname == null) {
|
|
24798
|
+
return null;
|
|
24799
|
+
}
|
|
24800
|
+
return {
|
|
24801
|
+
location: {
|
|
24802
|
+
pathname: trailingPathname,
|
|
24803
|
+
search,
|
|
24804
|
+
hash,
|
|
24805
|
+
state,
|
|
24806
|
+
key
|
|
24807
|
+
},
|
|
24808
|
+
navigationType
|
|
24809
|
+
};
|
|
24810
|
+
}, [basename, pathname, search, hash, state, key, navigationType]);
|
|
24811
|
+
warning(
|
|
24812
|
+
locationContext != null,
|
|
24813
|
+
`<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
24814
|
+
);
|
|
24815
|
+
if (locationContext == null) {
|
|
24816
|
+
return null;
|
|
24817
|
+
}
|
|
24818
|
+
return /* @__PURE__ */ React3.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3.createElement(LocationContext.Provider, { children, value: locationContext }));
|
|
24819
|
+
}
|
|
24820
|
+
var defaultMethod = "get";
|
|
24821
|
+
var defaultEncType = "application/x-www-form-urlencoded";
|
|
24822
|
+
function isHtmlElement(object) {
|
|
24823
|
+
return object != null && typeof object.tagName === "string";
|
|
24824
|
+
}
|
|
24825
|
+
function isButtonElement(object) {
|
|
24826
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
|
|
24827
|
+
}
|
|
24828
|
+
function isFormElement(object) {
|
|
24829
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
|
|
24830
|
+
}
|
|
24831
|
+
function isInputElement(object) {
|
|
24832
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
|
|
24833
|
+
}
|
|
24834
|
+
function isModifiedEvent(event) {
|
|
24835
|
+
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
24836
|
+
}
|
|
24837
|
+
function shouldProcessLinkClick(event, target) {
|
|
24838
|
+
return event.button === 0 && // Ignore everything but left clicks
|
|
24839
|
+
(!target || target === "_self") && // Let browser handle "target=_blank" etc.
|
|
24840
|
+
!isModifiedEvent(event);
|
|
24841
|
+
}
|
|
24842
|
+
var _formDataSupportsSubmitter = null;
|
|
24843
|
+
function isFormDataSubmitterSupported() {
|
|
24844
|
+
if (_formDataSupportsSubmitter === null) {
|
|
24845
|
+
try {
|
|
24846
|
+
new FormData(
|
|
24847
|
+
document.createElement("form"),
|
|
24848
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
24849
|
+
0
|
|
24850
|
+
);
|
|
24851
|
+
_formDataSupportsSubmitter = false;
|
|
24852
|
+
} catch (e) {
|
|
24853
|
+
_formDataSupportsSubmitter = true;
|
|
24854
|
+
}
|
|
24855
|
+
}
|
|
24856
|
+
return _formDataSupportsSubmitter;
|
|
24857
|
+
}
|
|
24858
|
+
var supportedFormEncTypes = /* @__PURE__ */ new Set([
|
|
24859
|
+
"application/x-www-form-urlencoded",
|
|
24860
|
+
"multipart/form-data",
|
|
24861
|
+
"text/plain"
|
|
24862
|
+
]);
|
|
24863
|
+
function getFormEncType(encType) {
|
|
24864
|
+
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
24865
|
+
warning(
|
|
24866
|
+
false,
|
|
24867
|
+
`"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
|
|
24868
|
+
);
|
|
24869
|
+
return null;
|
|
24870
|
+
}
|
|
24871
|
+
return encType;
|
|
24872
|
+
}
|
|
24873
|
+
function getFormSubmissionInfo(target, basename) {
|
|
24874
|
+
let method;
|
|
24875
|
+
let action;
|
|
24876
|
+
let encType;
|
|
24877
|
+
let formData;
|
|
24878
|
+
let body;
|
|
24879
|
+
if (isFormElement(target)) {
|
|
24880
|
+
let attr = target.getAttribute("action");
|
|
24881
|
+
action = attr ? stripBasename(attr, basename) : null;
|
|
24882
|
+
method = target.getAttribute("method") || defaultMethod;
|
|
24883
|
+
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
24884
|
+
formData = new FormData(target);
|
|
24885
|
+
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
24886
|
+
let form = target.form;
|
|
24887
|
+
if (form == null) {
|
|
24888
|
+
throw new Error(
|
|
24889
|
+
`Cannot submit a <button> or <input type="submit"> without a <form>`
|
|
24890
|
+
);
|
|
24891
|
+
}
|
|
24892
|
+
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
24893
|
+
action = attr ? stripBasename(attr, basename) : null;
|
|
24894
|
+
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
24895
|
+
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
24896
|
+
formData = new FormData(form, target);
|
|
24897
|
+
if (!isFormDataSubmitterSupported()) {
|
|
24898
|
+
let { name, type: type3, value } = target;
|
|
24899
|
+
if (type3 === "image") {
|
|
24900
|
+
let prefix = name ? `${name}.` : "";
|
|
24901
|
+
formData.append(`${prefix}x`, "0");
|
|
24902
|
+
formData.append(`${prefix}y`, "0");
|
|
24903
|
+
} else if (name) {
|
|
24904
|
+
formData.append(name, value);
|
|
24905
|
+
}
|
|
24906
|
+
}
|
|
24907
|
+
} else if (isHtmlElement(target)) {
|
|
24908
|
+
throw new Error(
|
|
24909
|
+
`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`
|
|
24910
|
+
);
|
|
24911
|
+
} else {
|
|
24912
|
+
method = defaultMethod;
|
|
24913
|
+
action = null;
|
|
24914
|
+
encType = defaultEncType;
|
|
24915
|
+
body = target;
|
|
24916
|
+
}
|
|
24917
|
+
if (formData && encType === "text/plain") {
|
|
24918
|
+
body = formData;
|
|
24919
|
+
formData = void 0;
|
|
24920
|
+
}
|
|
24921
|
+
return { action, method: method.toLowerCase(), encType, formData, body };
|
|
24922
|
+
}
|
|
24923
|
+
var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
24924
|
+
function invariant2(value, message) {
|
|
24925
|
+
if (value === false || value === null || typeof value === "undefined") {
|
|
24926
|
+
throw new Error(message);
|
|
24927
|
+
}
|
|
24928
|
+
}
|
|
24929
|
+
var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
|
|
24930
|
+
function singleFetchUrl(reqUrl, basename, extension) {
|
|
24931
|
+
let url = typeof reqUrl === "string" ? new URL(
|
|
24932
|
+
reqUrl,
|
|
24933
|
+
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
24934
|
+
// don't assume window is available
|
|
24935
|
+
typeof window === "undefined" ? "server://singlefetch/" : window.location.origin
|
|
24936
|
+
) : reqUrl;
|
|
24937
|
+
if (url.pathname === "/") {
|
|
24938
|
+
url.pathname = `_root.${extension}`;
|
|
24939
|
+
} else if (basename && stripBasename(url.pathname, basename) === "/") {
|
|
24940
|
+
url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
|
|
24941
|
+
} else {
|
|
24942
|
+
url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
|
|
24943
|
+
}
|
|
24944
|
+
return url;
|
|
24945
|
+
}
|
|
24946
|
+
async function loadRouteModule(route, routeModulesCache) {
|
|
24947
|
+
if (route.id in routeModulesCache) {
|
|
24948
|
+
return routeModulesCache[route.id];
|
|
24949
|
+
}
|
|
24950
|
+
try {
|
|
24951
|
+
let routeModule = await import(
|
|
24952
|
+
/* @vite-ignore */
|
|
24953
|
+
/* webpackIgnore: true */
|
|
24954
|
+
route.module
|
|
24955
|
+
);
|
|
24956
|
+
routeModulesCache[route.id] = routeModule;
|
|
24957
|
+
return routeModule;
|
|
24958
|
+
} catch (error) {
|
|
24959
|
+
console.error(
|
|
24960
|
+
`Error loading route module \`${route.module}\`, reloading page...`
|
|
24961
|
+
);
|
|
24962
|
+
console.error(error);
|
|
24963
|
+
if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error
|
|
24964
|
+
import.meta.hot) {
|
|
24965
|
+
throw error;
|
|
24966
|
+
}
|
|
24967
|
+
window.location.reload();
|
|
24968
|
+
return new Promise(() => {
|
|
24969
|
+
});
|
|
24970
|
+
}
|
|
24971
|
+
}
|
|
24972
|
+
function isPageLinkDescriptor(object) {
|
|
24973
|
+
return object != null && typeof object.page === "string";
|
|
24974
|
+
}
|
|
24975
|
+
function isHtmlLinkDescriptor(object) {
|
|
24976
|
+
if (object == null) {
|
|
24977
|
+
return false;
|
|
24978
|
+
}
|
|
24979
|
+
if (object.href == null) {
|
|
24980
|
+
return object.rel === "preload" && typeof object.imageSrcSet === "string" && typeof object.imageSizes === "string";
|
|
24981
|
+
}
|
|
24982
|
+
return typeof object.rel === "string" && typeof object.href === "string";
|
|
24983
|
+
}
|
|
24984
|
+
async function getKeyedPrefetchLinks(matches, manifest, routeModules) {
|
|
24985
|
+
let links = await Promise.all(
|
|
24986
|
+
matches.map(async (match) => {
|
|
24987
|
+
let route = manifest.routes[match.route.id];
|
|
24988
|
+
if (route) {
|
|
24989
|
+
let mod = await loadRouteModule(route, routeModules);
|
|
24990
|
+
return mod.links ? mod.links() : [];
|
|
24991
|
+
}
|
|
24992
|
+
return [];
|
|
24993
|
+
})
|
|
24994
|
+
);
|
|
24995
|
+
return dedupeLinkDescriptors(
|
|
24996
|
+
links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === "stylesheet" || link.rel === "preload").map(
|
|
24997
|
+
(link) => link.rel === "stylesheet" ? { ...link, rel: "prefetch", as: "style" } : { ...link, rel: "prefetch" }
|
|
24998
|
+
)
|
|
24999
|
+
);
|
|
25000
|
+
}
|
|
25001
|
+
function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {
|
|
25002
|
+
let isNew = (match, index) => {
|
|
25003
|
+
if (!currentMatches[index])
|
|
25004
|
+
return true;
|
|
25005
|
+
return match.route.id !== currentMatches[index].route.id;
|
|
25006
|
+
};
|
|
25007
|
+
let matchPathChanged = (match, index) => {
|
|
25008
|
+
return (
|
|
25009
|
+
// param change, /users/123 -> /users/456
|
|
25010
|
+
currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
|
|
25011
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
25012
|
+
currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"]
|
|
25013
|
+
);
|
|
25014
|
+
};
|
|
25015
|
+
if (mode === "assets") {
|
|
25016
|
+
return nextMatches.filter(
|
|
25017
|
+
(match, index) => isNew(match, index) || matchPathChanged(match, index)
|
|
25018
|
+
);
|
|
25019
|
+
}
|
|
25020
|
+
if (mode === "data") {
|
|
25021
|
+
return nextMatches.filter((match, index) => {
|
|
25022
|
+
let manifestRoute = manifest.routes[match.route.id];
|
|
25023
|
+
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
25024
|
+
return false;
|
|
25025
|
+
}
|
|
25026
|
+
if (isNew(match, index) || matchPathChanged(match, index)) {
|
|
25027
|
+
return true;
|
|
25028
|
+
}
|
|
25029
|
+
if (match.route.shouldRevalidate) {
|
|
25030
|
+
let routeChoice = match.route.shouldRevalidate({
|
|
25031
|
+
currentUrl: new URL(
|
|
25032
|
+
location.pathname + location.search + location.hash,
|
|
25033
|
+
window.origin
|
|
25034
|
+
),
|
|
25035
|
+
currentParams: currentMatches[0]?.params || {},
|
|
25036
|
+
nextUrl: new URL(page, window.origin),
|
|
25037
|
+
nextParams: match.params,
|
|
25038
|
+
defaultShouldRevalidate: true
|
|
25039
|
+
});
|
|
25040
|
+
if (typeof routeChoice === "boolean") {
|
|
25041
|
+
return routeChoice;
|
|
25042
|
+
}
|
|
25043
|
+
}
|
|
25044
|
+
return true;
|
|
25045
|
+
});
|
|
25046
|
+
}
|
|
25047
|
+
return [];
|
|
25048
|
+
}
|
|
25049
|
+
function getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {
|
|
25050
|
+
return dedupeHrefs(
|
|
25051
|
+
matches.map((match) => {
|
|
25052
|
+
let route = manifest.routes[match.route.id];
|
|
25053
|
+
if (!route)
|
|
25054
|
+
return [];
|
|
25055
|
+
let hrefs = [route.module];
|
|
25056
|
+
if (route.clientActionModule) {
|
|
25057
|
+
hrefs = hrefs.concat(route.clientActionModule);
|
|
25058
|
+
}
|
|
25059
|
+
if (route.clientLoaderModule) {
|
|
25060
|
+
hrefs = hrefs.concat(route.clientLoaderModule);
|
|
25061
|
+
}
|
|
25062
|
+
if (includeHydrateFallback && route.hydrateFallbackModule) {
|
|
25063
|
+
hrefs = hrefs.concat(route.hydrateFallbackModule);
|
|
25064
|
+
}
|
|
25065
|
+
if (route.imports) {
|
|
25066
|
+
hrefs = hrefs.concat(route.imports);
|
|
25067
|
+
}
|
|
25068
|
+
return hrefs;
|
|
25069
|
+
}).flat(1)
|
|
25070
|
+
);
|
|
25071
|
+
}
|
|
25072
|
+
function dedupeHrefs(hrefs) {
|
|
25073
|
+
return [...new Set(hrefs)];
|
|
25074
|
+
}
|
|
25075
|
+
function sortKeys(obj) {
|
|
25076
|
+
let sorted = {};
|
|
25077
|
+
let keys = Object.keys(obj).sort();
|
|
25078
|
+
for (let key of keys) {
|
|
25079
|
+
sorted[key] = obj[key];
|
|
25080
|
+
}
|
|
25081
|
+
return sorted;
|
|
25082
|
+
}
|
|
25083
|
+
function dedupeLinkDescriptors(descriptors, preloads) {
|
|
25084
|
+
let set2 = /* @__PURE__ */ new Set();
|
|
25085
|
+
let preloadsSet = new Set(preloads);
|
|
25086
|
+
return descriptors.reduce((deduped, descriptor) => {
|
|
25087
|
+
let alreadyModulePreload = preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === "script" && descriptor.href && preloadsSet.has(descriptor.href);
|
|
25088
|
+
if (alreadyModulePreload) {
|
|
25089
|
+
return deduped;
|
|
25090
|
+
}
|
|
25091
|
+
let key = JSON.stringify(sortKeys(descriptor));
|
|
25092
|
+
if (!set2.has(key)) {
|
|
25093
|
+
set2.add(key);
|
|
25094
|
+
deduped.push({ key, link: descriptor });
|
|
25095
|
+
}
|
|
25096
|
+
return deduped;
|
|
25097
|
+
}, []);
|
|
25098
|
+
}
|
|
25099
|
+
function useDataRouterContext2() {
|
|
25100
|
+
let context = React8.useContext(DataRouterContext);
|
|
25101
|
+
invariant2(
|
|
25102
|
+
context,
|
|
25103
|
+
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
25104
|
+
);
|
|
25105
|
+
return context;
|
|
25106
|
+
}
|
|
25107
|
+
function useDataRouterStateContext() {
|
|
25108
|
+
let context = React8.useContext(DataRouterStateContext);
|
|
25109
|
+
invariant2(
|
|
25110
|
+
context,
|
|
25111
|
+
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
25112
|
+
);
|
|
25113
|
+
return context;
|
|
25114
|
+
}
|
|
25115
|
+
var FrameworkContext = React8.createContext(void 0);
|
|
25116
|
+
FrameworkContext.displayName = "FrameworkContext";
|
|
25117
|
+
function useFrameworkContext() {
|
|
25118
|
+
let context = React8.useContext(FrameworkContext);
|
|
25119
|
+
invariant2(
|
|
25120
|
+
context,
|
|
25121
|
+
"You must render this element inside a <HydratedRouter> element"
|
|
25122
|
+
);
|
|
25123
|
+
return context;
|
|
25124
|
+
}
|
|
25125
|
+
function usePrefetchBehavior(prefetch, theirElementProps) {
|
|
25126
|
+
let frameworkContext = React8.useContext(FrameworkContext);
|
|
25127
|
+
let [maybePrefetch, setMaybePrefetch] = React8.useState(false);
|
|
25128
|
+
let [shouldPrefetch, setShouldPrefetch] = React8.useState(false);
|
|
25129
|
+
let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
|
|
25130
|
+
let ref = React8.useRef(null);
|
|
25131
|
+
React8.useEffect(() => {
|
|
25132
|
+
if (prefetch === "render") {
|
|
25133
|
+
setShouldPrefetch(true);
|
|
25134
|
+
}
|
|
25135
|
+
if (prefetch === "viewport") {
|
|
25136
|
+
let callback = (entries) => {
|
|
25137
|
+
entries.forEach((entry) => {
|
|
25138
|
+
setShouldPrefetch(entry.isIntersecting);
|
|
25139
|
+
});
|
|
25140
|
+
};
|
|
25141
|
+
let observer = new IntersectionObserver(callback, { threshold: 0.5 });
|
|
25142
|
+
if (ref.current)
|
|
25143
|
+
observer.observe(ref.current);
|
|
25144
|
+
return () => {
|
|
25145
|
+
observer.disconnect();
|
|
25146
|
+
};
|
|
25147
|
+
}
|
|
25148
|
+
}, [prefetch]);
|
|
25149
|
+
React8.useEffect(() => {
|
|
25150
|
+
if (maybePrefetch) {
|
|
25151
|
+
let id = setTimeout(() => {
|
|
25152
|
+
setShouldPrefetch(true);
|
|
25153
|
+
}, 100);
|
|
25154
|
+
return () => {
|
|
25155
|
+
clearTimeout(id);
|
|
25156
|
+
};
|
|
25157
|
+
}
|
|
25158
|
+
}, [maybePrefetch]);
|
|
25159
|
+
let setIntent = () => {
|
|
25160
|
+
setMaybePrefetch(true);
|
|
25161
|
+
};
|
|
25162
|
+
let cancelIntent = () => {
|
|
25163
|
+
setMaybePrefetch(false);
|
|
25164
|
+
setShouldPrefetch(false);
|
|
25165
|
+
};
|
|
25166
|
+
if (!frameworkContext) {
|
|
25167
|
+
return [false, ref, {}];
|
|
25168
|
+
}
|
|
25169
|
+
if (prefetch !== "intent") {
|
|
25170
|
+
return [shouldPrefetch, ref, {}];
|
|
25171
|
+
}
|
|
25172
|
+
return [
|
|
25173
|
+
shouldPrefetch,
|
|
25174
|
+
ref,
|
|
25175
|
+
{
|
|
25176
|
+
onFocus: composeEventHandlers(onFocus, setIntent),
|
|
25177
|
+
onBlur: composeEventHandlers(onBlur, cancelIntent),
|
|
25178
|
+
onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),
|
|
25179
|
+
onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),
|
|
25180
|
+
onTouchStart: composeEventHandlers(onTouchStart, setIntent)
|
|
25181
|
+
}
|
|
25182
|
+
];
|
|
25183
|
+
}
|
|
25184
|
+
function composeEventHandlers(theirHandler, ourHandler) {
|
|
25185
|
+
return (event) => {
|
|
25186
|
+
theirHandler && theirHandler(event);
|
|
25187
|
+
if (!event.defaultPrevented) {
|
|
25188
|
+
ourHandler(event);
|
|
25189
|
+
}
|
|
25190
|
+
};
|
|
25191
|
+
}
|
|
25192
|
+
function PrefetchPageLinks({ page, ...linkProps }) {
|
|
25193
|
+
let { router } = useDataRouterContext2();
|
|
25194
|
+
let matches = React8.useMemo(
|
|
25195
|
+
() => matchRoutes(router.routes, page, router.basename),
|
|
25196
|
+
[router.routes, page, router.basename]
|
|
25197
|
+
);
|
|
25198
|
+
if (!matches) {
|
|
25199
|
+
return null;
|
|
25200
|
+
}
|
|
25201
|
+
return /* @__PURE__ */ React8.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps });
|
|
25202
|
+
}
|
|
25203
|
+
function useKeyedPrefetchLinks(matches) {
|
|
25204
|
+
let { manifest, routeModules } = useFrameworkContext();
|
|
25205
|
+
let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React8.useState([]);
|
|
25206
|
+
React8.useEffect(() => {
|
|
25207
|
+
let interrupted = false;
|
|
25208
|
+
void getKeyedPrefetchLinks(matches, manifest, routeModules).then(
|
|
25209
|
+
(links) => {
|
|
25210
|
+
if (!interrupted) {
|
|
25211
|
+
setKeyedPrefetchLinks(links);
|
|
25212
|
+
}
|
|
25213
|
+
}
|
|
25214
|
+
);
|
|
25215
|
+
return () => {
|
|
25216
|
+
interrupted = true;
|
|
25217
|
+
};
|
|
25218
|
+
}, [matches, manifest, routeModules]);
|
|
25219
|
+
return keyedPrefetchLinks;
|
|
25220
|
+
}
|
|
25221
|
+
function PrefetchPageLinksImpl({
|
|
25222
|
+
page,
|
|
25223
|
+
matches: nextMatches,
|
|
25224
|
+
...linkProps
|
|
25225
|
+
}) {
|
|
25226
|
+
let location = useLocation();
|
|
25227
|
+
let { manifest, routeModules } = useFrameworkContext();
|
|
25228
|
+
let { basename } = useDataRouterContext2();
|
|
25229
|
+
let { loaderData, matches } = useDataRouterStateContext();
|
|
25230
|
+
let newMatchesForData = React8.useMemo(
|
|
25231
|
+
() => getNewMatchesForLinks(
|
|
25232
|
+
page,
|
|
25233
|
+
nextMatches,
|
|
25234
|
+
matches,
|
|
25235
|
+
manifest,
|
|
25236
|
+
location,
|
|
25237
|
+
"data"
|
|
25238
|
+
),
|
|
25239
|
+
[page, nextMatches, matches, manifest, location]
|
|
25240
|
+
);
|
|
25241
|
+
let newMatchesForAssets = React8.useMemo(
|
|
25242
|
+
() => getNewMatchesForLinks(
|
|
25243
|
+
page,
|
|
25244
|
+
nextMatches,
|
|
25245
|
+
matches,
|
|
25246
|
+
manifest,
|
|
25247
|
+
location,
|
|
25248
|
+
"assets"
|
|
25249
|
+
),
|
|
25250
|
+
[page, nextMatches, matches, manifest, location]
|
|
25251
|
+
);
|
|
25252
|
+
let dataHrefs = React8.useMemo(() => {
|
|
25253
|
+
if (page === location.pathname + location.search + location.hash) {
|
|
25254
|
+
return [];
|
|
25255
|
+
}
|
|
25256
|
+
let routesParams = /* @__PURE__ */ new Set();
|
|
25257
|
+
let foundOptOutRoute = false;
|
|
25258
|
+
nextMatches.forEach((m) => {
|
|
25259
|
+
let manifestRoute = manifest.routes[m.route.id];
|
|
25260
|
+
if (!manifestRoute || !manifestRoute.hasLoader) {
|
|
25261
|
+
return;
|
|
25262
|
+
}
|
|
25263
|
+
if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {
|
|
25264
|
+
foundOptOutRoute = true;
|
|
25265
|
+
} else if (manifestRoute.hasClientLoader) {
|
|
25266
|
+
foundOptOutRoute = true;
|
|
25267
|
+
} else {
|
|
25268
|
+
routesParams.add(m.route.id);
|
|
25269
|
+
}
|
|
25270
|
+
});
|
|
25271
|
+
if (routesParams.size === 0) {
|
|
25272
|
+
return [];
|
|
25273
|
+
}
|
|
25274
|
+
let url = singleFetchUrl(page, basename, "data");
|
|
25275
|
+
if (foundOptOutRoute && routesParams.size > 0) {
|
|
25276
|
+
url.searchParams.set(
|
|
25277
|
+
"_routes",
|
|
25278
|
+
nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(",")
|
|
25279
|
+
);
|
|
25280
|
+
}
|
|
25281
|
+
return [url.pathname + url.search];
|
|
25282
|
+
}, [
|
|
25283
|
+
basename,
|
|
25284
|
+
loaderData,
|
|
25285
|
+
location,
|
|
25286
|
+
manifest,
|
|
25287
|
+
newMatchesForData,
|
|
25288
|
+
nextMatches,
|
|
25289
|
+
page,
|
|
25290
|
+
routeModules
|
|
25291
|
+
]);
|
|
25292
|
+
let moduleHrefs = React8.useMemo(
|
|
25293
|
+
() => getModuleLinkHrefs(newMatchesForAssets, manifest),
|
|
25294
|
+
[newMatchesForAssets, manifest]
|
|
25295
|
+
);
|
|
25296
|
+
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
25297
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React8.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
|
|
25298
|
+
// these don't spread `linkProps` because they are full link descriptors
|
|
25299
|
+
// already with their own props
|
|
25300
|
+
/* @__PURE__ */ React8.createElement("link", { key, nonce: linkProps.nonce, ...link })
|
|
25301
|
+
)));
|
|
25302
|
+
}
|
|
25303
|
+
function mergeRefs(...refs) {
|
|
25304
|
+
return (value) => {
|
|
25305
|
+
refs.forEach((ref) => {
|
|
25306
|
+
if (typeof ref === "function") {
|
|
25307
|
+
ref(value);
|
|
25308
|
+
} else if (ref != null) {
|
|
25309
|
+
ref.current = value;
|
|
25310
|
+
}
|
|
25311
|
+
});
|
|
25312
|
+
};
|
|
25313
|
+
}
|
|
25314
|
+
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
25315
|
+
try {
|
|
25316
|
+
if (isBrowser) {
|
|
25317
|
+
window.__reactRouterVersion = // @ts-expect-error
|
|
25318
|
+
"7.8.2";
|
|
25319
|
+
}
|
|
25320
|
+
} catch (e) {
|
|
25321
|
+
}
|
|
25322
|
+
function HistoryRouter({
|
|
25323
|
+
basename,
|
|
25324
|
+
children,
|
|
25325
|
+
history
|
|
25326
|
+
}) {
|
|
25327
|
+
let [state, setStateImpl] = React10.useState({
|
|
25328
|
+
action: history.action,
|
|
25329
|
+
location: history.location
|
|
25330
|
+
});
|
|
25331
|
+
let setState = React10.useCallback(
|
|
25332
|
+
(newState) => {
|
|
25333
|
+
React10.startTransition(() => setStateImpl(newState));
|
|
25334
|
+
},
|
|
25335
|
+
[setStateImpl]
|
|
25336
|
+
);
|
|
25337
|
+
React10.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
25338
|
+
return /* @__PURE__ */ React10.createElement(
|
|
25339
|
+
Router,
|
|
25340
|
+
{
|
|
25341
|
+
basename,
|
|
25342
|
+
children,
|
|
25343
|
+
location: state.location,
|
|
25344
|
+
navigationType: state.action,
|
|
25345
|
+
navigator: history
|
|
25346
|
+
}
|
|
25347
|
+
);
|
|
25348
|
+
}
|
|
25349
|
+
HistoryRouter.displayName = "unstable_HistoryRouter";
|
|
25350
|
+
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
25351
|
+
var Link = React10.forwardRef(
|
|
25352
|
+
function LinkWithRef({
|
|
25353
|
+
onClick,
|
|
25354
|
+
discover = "render",
|
|
25355
|
+
prefetch = "none",
|
|
25356
|
+
relative,
|
|
25357
|
+
reloadDocument,
|
|
25358
|
+
replace: replace2,
|
|
25359
|
+
state,
|
|
25360
|
+
target,
|
|
25361
|
+
to,
|
|
25362
|
+
preventScrollReset,
|
|
25363
|
+
viewTransition,
|
|
25364
|
+
...rest
|
|
25365
|
+
}, forwardedRef) {
|
|
25366
|
+
let { basename } = React10.useContext(NavigationContext);
|
|
25367
|
+
let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
|
|
25368
|
+
let absoluteHref;
|
|
25369
|
+
let isExternal = false;
|
|
25370
|
+
if (typeof to === "string" && isAbsolute) {
|
|
25371
|
+
absoluteHref = to;
|
|
25372
|
+
if (isBrowser) {
|
|
25373
|
+
try {
|
|
25374
|
+
let currentUrl = new URL(window.location.href);
|
|
25375
|
+
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
25376
|
+
let path = stripBasename(targetUrl.pathname, basename);
|
|
25377
|
+
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
25378
|
+
to = path + targetUrl.search + targetUrl.hash;
|
|
25379
|
+
} else {
|
|
25380
|
+
isExternal = true;
|
|
25381
|
+
}
|
|
25382
|
+
} catch (e) {
|
|
25383
|
+
warning(
|
|
25384
|
+
false,
|
|
25385
|
+
`<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
25386
|
+
);
|
|
25387
|
+
}
|
|
25388
|
+
}
|
|
25389
|
+
}
|
|
25390
|
+
let href = useHref(to, { relative });
|
|
25391
|
+
let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
|
|
25392
|
+
prefetch,
|
|
25393
|
+
rest
|
|
25394
|
+
);
|
|
25395
|
+
let internalOnClick = useLinkClickHandler(to, {
|
|
25396
|
+
replace: replace2,
|
|
25397
|
+
state,
|
|
25398
|
+
target,
|
|
25399
|
+
preventScrollReset,
|
|
25400
|
+
relative,
|
|
25401
|
+
viewTransition
|
|
25402
|
+
});
|
|
25403
|
+
function handleClick(event) {
|
|
25404
|
+
if (onClick)
|
|
25405
|
+
onClick(event);
|
|
25406
|
+
if (!event.defaultPrevented) {
|
|
25407
|
+
internalOnClick(event);
|
|
25408
|
+
}
|
|
25409
|
+
}
|
|
25410
|
+
let link = (
|
|
25411
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
25412
|
+
/* @__PURE__ */ React10.createElement(
|
|
25413
|
+
"a",
|
|
25414
|
+
{
|
|
25415
|
+
...rest,
|
|
25416
|
+
...prefetchHandlers,
|
|
25417
|
+
href: absoluteHref || href,
|
|
25418
|
+
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
25419
|
+
ref: mergeRefs(forwardedRef, prefetchRef),
|
|
25420
|
+
target,
|
|
25421
|
+
"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
|
|
25422
|
+
}
|
|
25423
|
+
)
|
|
25424
|
+
);
|
|
25425
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href })) : link;
|
|
25426
|
+
}
|
|
25427
|
+
);
|
|
25428
|
+
Link.displayName = "Link";
|
|
25429
|
+
var NavLink = React10.forwardRef(
|
|
25430
|
+
function NavLinkWithRef({
|
|
25431
|
+
"aria-current": ariaCurrentProp = "page",
|
|
25432
|
+
caseSensitive = false,
|
|
25433
|
+
className: classNameProp = "",
|
|
25434
|
+
end = false,
|
|
25435
|
+
style: styleProp,
|
|
25436
|
+
to,
|
|
25437
|
+
viewTransition,
|
|
25438
|
+
children,
|
|
25439
|
+
...rest
|
|
25440
|
+
}, ref) {
|
|
25441
|
+
let path = useResolvedPath(to, { relative: rest.relative });
|
|
25442
|
+
let location = useLocation();
|
|
25443
|
+
let routerState = React10.useContext(DataRouterStateContext);
|
|
25444
|
+
let { navigator: navigator2, basename } = React10.useContext(NavigationContext);
|
|
25445
|
+
let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
|
|
25446
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
25447
|
+
useViewTransitionState(path) && viewTransition === true;
|
|
25448
|
+
let toPathname = navigator2.encodeLocation ? navigator2.encodeLocation(path).pathname : path.pathname;
|
|
25449
|
+
let locationPathname = location.pathname;
|
|
25450
|
+
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
25451
|
+
if (!caseSensitive) {
|
|
25452
|
+
locationPathname = locationPathname.toLowerCase();
|
|
25453
|
+
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
25454
|
+
toPathname = toPathname.toLowerCase();
|
|
25455
|
+
}
|
|
25456
|
+
if (nextLocationPathname && basename) {
|
|
25457
|
+
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
25458
|
+
}
|
|
25459
|
+
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
25460
|
+
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
25461
|
+
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
25462
|
+
let renderProps = {
|
|
25463
|
+
isActive,
|
|
25464
|
+
isPending,
|
|
25465
|
+
isTransitioning
|
|
25466
|
+
};
|
|
25467
|
+
let ariaCurrent = isActive ? ariaCurrentProp : void 0;
|
|
25468
|
+
let className;
|
|
25469
|
+
if (typeof classNameProp === "function") {
|
|
25470
|
+
className = classNameProp(renderProps);
|
|
25471
|
+
} else {
|
|
25472
|
+
className = [
|
|
25473
|
+
classNameProp,
|
|
25474
|
+
isActive ? "active" : null,
|
|
25475
|
+
isPending ? "pending" : null,
|
|
25476
|
+
isTransitioning ? "transitioning" : null
|
|
25477
|
+
].filter(Boolean).join(" ");
|
|
25478
|
+
}
|
|
25479
|
+
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
25480
|
+
return /* @__PURE__ */ React10.createElement(
|
|
25481
|
+
Link,
|
|
25482
|
+
{
|
|
25483
|
+
...rest,
|
|
25484
|
+
"aria-current": ariaCurrent,
|
|
25485
|
+
className,
|
|
25486
|
+
ref,
|
|
25487
|
+
style,
|
|
25488
|
+
to,
|
|
25489
|
+
viewTransition
|
|
25490
|
+
},
|
|
25491
|
+
typeof children === "function" ? children(renderProps) : children
|
|
25492
|
+
);
|
|
25493
|
+
}
|
|
25494
|
+
);
|
|
25495
|
+
NavLink.displayName = "NavLink";
|
|
25496
|
+
var Form = React10.forwardRef(
|
|
25497
|
+
({
|
|
25498
|
+
discover = "render",
|
|
25499
|
+
fetcherKey,
|
|
25500
|
+
navigate,
|
|
25501
|
+
reloadDocument,
|
|
25502
|
+
replace: replace2,
|
|
25503
|
+
state,
|
|
25504
|
+
method = defaultMethod,
|
|
25505
|
+
action,
|
|
25506
|
+
onSubmit,
|
|
25507
|
+
relative,
|
|
25508
|
+
preventScrollReset,
|
|
25509
|
+
viewTransition,
|
|
25510
|
+
...props
|
|
25511
|
+
}, forwardedRef) => {
|
|
25512
|
+
let submit = useSubmit();
|
|
25513
|
+
let formAction = useFormAction(action, { relative });
|
|
25514
|
+
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
25515
|
+
let isAbsolute = typeof action === "string" && ABSOLUTE_URL_REGEX2.test(action);
|
|
25516
|
+
let submitHandler = (event) => {
|
|
25517
|
+
onSubmit && onSubmit(event);
|
|
25518
|
+
if (event.defaultPrevented)
|
|
25519
|
+
return;
|
|
25520
|
+
event.preventDefault();
|
|
25521
|
+
let submitter = event.nativeEvent.submitter;
|
|
25522
|
+
let submitMethod = submitter?.getAttribute("formmethod") || method;
|
|
25523
|
+
submit(submitter || event.currentTarget, {
|
|
25524
|
+
fetcherKey,
|
|
25525
|
+
method: submitMethod,
|
|
25526
|
+
navigate,
|
|
25527
|
+
replace: replace2,
|
|
25528
|
+
state,
|
|
25529
|
+
relative,
|
|
25530
|
+
preventScrollReset,
|
|
25531
|
+
viewTransition
|
|
25532
|
+
});
|
|
25533
|
+
};
|
|
25534
|
+
return /* @__PURE__ */ React10.createElement(
|
|
25535
|
+
"form",
|
|
25536
|
+
{
|
|
25537
|
+
ref: forwardedRef,
|
|
25538
|
+
method: formMethod,
|
|
25539
|
+
action: formAction,
|
|
25540
|
+
onSubmit: reloadDocument ? onSubmit : submitHandler,
|
|
25541
|
+
...props,
|
|
25542
|
+
"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
|
|
25543
|
+
}
|
|
25544
|
+
);
|
|
25545
|
+
}
|
|
25546
|
+
);
|
|
25547
|
+
Form.displayName = "Form";
|
|
25548
|
+
function ScrollRestoration({
|
|
25549
|
+
getKey,
|
|
25550
|
+
storageKey,
|
|
25551
|
+
...props
|
|
25552
|
+
}) {
|
|
25553
|
+
let remixContext = React10.useContext(FrameworkContext);
|
|
25554
|
+
let { basename } = React10.useContext(NavigationContext);
|
|
25555
|
+
let location = useLocation();
|
|
25556
|
+
let matches = useMatches();
|
|
25557
|
+
useScrollRestoration({ getKey, storageKey });
|
|
25558
|
+
let ssrKey = React10.useMemo(
|
|
25559
|
+
() => {
|
|
25560
|
+
if (!remixContext || !getKey)
|
|
25561
|
+
return null;
|
|
25562
|
+
let userKey = getScrollRestorationKey(
|
|
25563
|
+
location,
|
|
25564
|
+
matches,
|
|
25565
|
+
basename,
|
|
25566
|
+
getKey
|
|
25567
|
+
);
|
|
25568
|
+
return userKey !== location.key ? userKey : null;
|
|
25569
|
+
},
|
|
25570
|
+
// Nah, we only need this the first time for the SSR render
|
|
25571
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25572
|
+
[]
|
|
25573
|
+
);
|
|
25574
|
+
if (!remixContext || remixContext.isSpaMode) {
|
|
25575
|
+
return null;
|
|
25576
|
+
}
|
|
25577
|
+
let restoreScroll = ((storageKey2, restoreKey) => {
|
|
25578
|
+
if (!window.history.state || !window.history.state.key) {
|
|
25579
|
+
let key = Math.random().toString(32).slice(2);
|
|
25580
|
+
window.history.replaceState({ key }, "");
|
|
25581
|
+
}
|
|
25582
|
+
try {
|
|
25583
|
+
let positions = JSON.parse(sessionStorage.getItem(storageKey2) || "{}");
|
|
25584
|
+
let storedY = positions[restoreKey || window.history.state.key];
|
|
25585
|
+
if (typeof storedY === "number") {
|
|
25586
|
+
window.scrollTo(0, storedY);
|
|
25587
|
+
}
|
|
25588
|
+
} catch (error) {
|
|
25589
|
+
console.error(error);
|
|
25590
|
+
sessionStorage.removeItem(storageKey2);
|
|
25591
|
+
}
|
|
25592
|
+
}).toString();
|
|
25593
|
+
return /* @__PURE__ */ React10.createElement(
|
|
25594
|
+
"script",
|
|
25595
|
+
{
|
|
25596
|
+
...props,
|
|
25597
|
+
suppressHydrationWarning: true,
|
|
25598
|
+
dangerouslySetInnerHTML: {
|
|
25599
|
+
__html: `(${restoreScroll})(${JSON.stringify(
|
|
25600
|
+
storageKey || SCROLL_RESTORATION_STORAGE_KEY
|
|
25601
|
+
)}, ${JSON.stringify(ssrKey)})`
|
|
25602
|
+
}
|
|
25603
|
+
}
|
|
25604
|
+
);
|
|
25605
|
+
}
|
|
25606
|
+
ScrollRestoration.displayName = "ScrollRestoration";
|
|
25607
|
+
function getDataRouterConsoleError2(hookName) {
|
|
25608
|
+
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
25609
|
+
}
|
|
25610
|
+
function useDataRouterContext3(hookName) {
|
|
25611
|
+
let ctx = React10.useContext(DataRouterContext);
|
|
25612
|
+
invariant(ctx, getDataRouterConsoleError2(hookName));
|
|
25613
|
+
return ctx;
|
|
25614
|
+
}
|
|
25615
|
+
function useDataRouterState2(hookName) {
|
|
25616
|
+
let state = React10.useContext(DataRouterStateContext);
|
|
25617
|
+
invariant(state, getDataRouterConsoleError2(hookName));
|
|
25618
|
+
return state;
|
|
25619
|
+
}
|
|
25620
|
+
function useLinkClickHandler(to, {
|
|
25621
|
+
target,
|
|
25622
|
+
replace: replaceProp,
|
|
25623
|
+
state,
|
|
25624
|
+
preventScrollReset,
|
|
25625
|
+
relative,
|
|
25626
|
+
viewTransition
|
|
25627
|
+
} = {}) {
|
|
25628
|
+
let navigate = useNavigate();
|
|
25629
|
+
let location = useLocation();
|
|
25630
|
+
let path = useResolvedPath(to, { relative });
|
|
25631
|
+
return React10.useCallback(
|
|
25632
|
+
(event) => {
|
|
25633
|
+
if (shouldProcessLinkClick(event, target)) {
|
|
25634
|
+
event.preventDefault();
|
|
25635
|
+
let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
|
|
25636
|
+
navigate(to, {
|
|
25637
|
+
replace: replace2,
|
|
25638
|
+
state,
|
|
25639
|
+
preventScrollReset,
|
|
25640
|
+
relative,
|
|
25641
|
+
viewTransition
|
|
25642
|
+
});
|
|
25643
|
+
}
|
|
25644
|
+
},
|
|
25645
|
+
[
|
|
25646
|
+
location,
|
|
25647
|
+
navigate,
|
|
25648
|
+
path,
|
|
25649
|
+
replaceProp,
|
|
25650
|
+
state,
|
|
25651
|
+
target,
|
|
25652
|
+
to,
|
|
25653
|
+
preventScrollReset,
|
|
25654
|
+
relative,
|
|
25655
|
+
viewTransition
|
|
25656
|
+
]
|
|
25657
|
+
);
|
|
25658
|
+
}
|
|
25659
|
+
var fetcherId = 0;
|
|
25660
|
+
var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
|
|
25661
|
+
function useSubmit() {
|
|
25662
|
+
let { router } = useDataRouterContext3(
|
|
25663
|
+
"useSubmit"
|
|
25664
|
+
/* UseSubmit */
|
|
25665
|
+
);
|
|
25666
|
+
let { basename } = React10.useContext(NavigationContext);
|
|
25667
|
+
let currentRouteId = useRouteId();
|
|
25668
|
+
return React10.useCallback(
|
|
25669
|
+
async (target, options = {}) => {
|
|
25670
|
+
let { action, method, encType, formData, body } = getFormSubmissionInfo(
|
|
25671
|
+
target,
|
|
25672
|
+
basename
|
|
25673
|
+
);
|
|
25674
|
+
if (options.navigate === false) {
|
|
25675
|
+
let key = options.fetcherKey || getUniqueFetcherId();
|
|
25676
|
+
await router.fetch(key, currentRouteId, options.action || action, {
|
|
25677
|
+
preventScrollReset: options.preventScrollReset,
|
|
25678
|
+
formData,
|
|
25679
|
+
body,
|
|
25680
|
+
formMethod: options.method || method,
|
|
25681
|
+
formEncType: options.encType || encType,
|
|
25682
|
+
flushSync: options.flushSync
|
|
25683
|
+
});
|
|
25684
|
+
} else {
|
|
25685
|
+
await router.navigate(options.action || action, {
|
|
25686
|
+
preventScrollReset: options.preventScrollReset,
|
|
25687
|
+
formData,
|
|
25688
|
+
body,
|
|
25689
|
+
formMethod: options.method || method,
|
|
25690
|
+
formEncType: options.encType || encType,
|
|
25691
|
+
replace: options.replace,
|
|
25692
|
+
state: options.state,
|
|
25693
|
+
fromRouteId: currentRouteId,
|
|
25694
|
+
flushSync: options.flushSync,
|
|
25695
|
+
viewTransition: options.viewTransition
|
|
25696
|
+
});
|
|
25697
|
+
}
|
|
25698
|
+
},
|
|
25699
|
+
[router, basename, currentRouteId]
|
|
25700
|
+
);
|
|
25701
|
+
}
|
|
25702
|
+
function useFormAction(action, { relative } = {}) {
|
|
25703
|
+
let { basename } = React10.useContext(NavigationContext);
|
|
25704
|
+
let routeContext = React10.useContext(RouteContext);
|
|
25705
|
+
invariant(routeContext, "useFormAction must be used inside a RouteContext");
|
|
25706
|
+
let [match] = routeContext.matches.slice(-1);
|
|
25707
|
+
let path = { ...useResolvedPath(action ? action : ".", { relative }) };
|
|
25708
|
+
let location = useLocation();
|
|
25709
|
+
if (action == null) {
|
|
25710
|
+
path.search = location.search;
|
|
25711
|
+
let params = new URLSearchParams(path.search);
|
|
25712
|
+
let indexValues = params.getAll("index");
|
|
25713
|
+
let hasNakedIndexParam = indexValues.some((v) => v === "");
|
|
25714
|
+
if (hasNakedIndexParam) {
|
|
25715
|
+
params.delete("index");
|
|
25716
|
+
indexValues.filter((v) => v).forEach((v) => params.append("index", v));
|
|
25717
|
+
let qs = params.toString();
|
|
25718
|
+
path.search = qs ? `?${qs}` : "";
|
|
25719
|
+
}
|
|
25720
|
+
}
|
|
25721
|
+
if ((!action || action === ".") && match.route.index) {
|
|
25722
|
+
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
25723
|
+
}
|
|
25724
|
+
if (basename !== "/") {
|
|
25725
|
+
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
25726
|
+
}
|
|
25727
|
+
return createPath(path);
|
|
25728
|
+
}
|
|
25729
|
+
var SCROLL_RESTORATION_STORAGE_KEY = "react-router-scroll-positions";
|
|
25730
|
+
var savedScrollPositions = {};
|
|
25731
|
+
function getScrollRestorationKey(location, matches, basename, getKey) {
|
|
25732
|
+
let key = null;
|
|
25733
|
+
if (getKey) {
|
|
25734
|
+
if (basename !== "/") {
|
|
25735
|
+
key = getKey(
|
|
25736
|
+
{
|
|
25737
|
+
...location,
|
|
25738
|
+
pathname: stripBasename(location.pathname, basename) || location.pathname
|
|
25739
|
+
},
|
|
25740
|
+
matches
|
|
25741
|
+
);
|
|
25742
|
+
} else {
|
|
25743
|
+
key = getKey(location, matches);
|
|
25744
|
+
}
|
|
25745
|
+
}
|
|
25746
|
+
if (key == null) {
|
|
25747
|
+
key = location.key;
|
|
25748
|
+
}
|
|
25749
|
+
return key;
|
|
25750
|
+
}
|
|
25751
|
+
function useScrollRestoration({
|
|
25752
|
+
getKey,
|
|
25753
|
+
storageKey
|
|
25754
|
+
} = {}) {
|
|
25755
|
+
let { router } = useDataRouterContext3(
|
|
25756
|
+
"useScrollRestoration"
|
|
25757
|
+
/* UseScrollRestoration */
|
|
25758
|
+
);
|
|
25759
|
+
let { restoreScrollPosition, preventScrollReset } = useDataRouterState2(
|
|
25760
|
+
"useScrollRestoration"
|
|
25761
|
+
/* UseScrollRestoration */
|
|
25762
|
+
);
|
|
25763
|
+
let { basename } = React10.useContext(NavigationContext);
|
|
25764
|
+
let location = useLocation();
|
|
25765
|
+
let matches = useMatches();
|
|
25766
|
+
let navigation = useNavigation();
|
|
25767
|
+
React10.useEffect(() => {
|
|
25768
|
+
window.history.scrollRestoration = "manual";
|
|
25769
|
+
return () => {
|
|
25770
|
+
window.history.scrollRestoration = "auto";
|
|
25771
|
+
};
|
|
25772
|
+
}, []);
|
|
25773
|
+
usePageHide(
|
|
25774
|
+
React10.useCallback(() => {
|
|
25775
|
+
if (navigation.state === "idle") {
|
|
25776
|
+
let key = getScrollRestorationKey(location, matches, basename, getKey);
|
|
25777
|
+
savedScrollPositions[key] = window.scrollY;
|
|
25778
|
+
}
|
|
25779
|
+
try {
|
|
25780
|
+
sessionStorage.setItem(
|
|
25781
|
+
storageKey || SCROLL_RESTORATION_STORAGE_KEY,
|
|
25782
|
+
JSON.stringify(savedScrollPositions)
|
|
25783
|
+
);
|
|
25784
|
+
} catch (error) {
|
|
25785
|
+
warning(
|
|
25786
|
+
false,
|
|
25787
|
+
`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
|
|
25788
|
+
);
|
|
25789
|
+
}
|
|
25790
|
+
window.history.scrollRestoration = "auto";
|
|
25791
|
+
}, [navigation.state, getKey, basename, location, matches, storageKey])
|
|
25792
|
+
);
|
|
25793
|
+
if (typeof document !== "undefined") {
|
|
25794
|
+
React10.useLayoutEffect(() => {
|
|
25795
|
+
try {
|
|
25796
|
+
let sessionPositions = sessionStorage.getItem(
|
|
25797
|
+
storageKey || SCROLL_RESTORATION_STORAGE_KEY
|
|
25798
|
+
);
|
|
25799
|
+
if (sessionPositions) {
|
|
25800
|
+
savedScrollPositions = JSON.parse(sessionPositions);
|
|
25801
|
+
}
|
|
25802
|
+
} catch (e) {
|
|
25803
|
+
}
|
|
25804
|
+
}, [storageKey]);
|
|
25805
|
+
React10.useLayoutEffect(() => {
|
|
25806
|
+
let disableScrollRestoration = router?.enableScrollRestoration(
|
|
25807
|
+
savedScrollPositions,
|
|
25808
|
+
() => window.scrollY,
|
|
25809
|
+
getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0
|
|
25810
|
+
);
|
|
25811
|
+
return () => disableScrollRestoration && disableScrollRestoration();
|
|
25812
|
+
}, [router, basename, getKey]);
|
|
25813
|
+
React10.useLayoutEffect(() => {
|
|
25814
|
+
if (restoreScrollPosition === false) {
|
|
25815
|
+
return;
|
|
25816
|
+
}
|
|
25817
|
+
if (typeof restoreScrollPosition === "number") {
|
|
25818
|
+
window.scrollTo(0, restoreScrollPosition);
|
|
25819
|
+
return;
|
|
25820
|
+
}
|
|
25821
|
+
try {
|
|
25822
|
+
if (location.hash) {
|
|
25823
|
+
let el = document.getElementById(
|
|
25824
|
+
decodeURIComponent(location.hash.slice(1))
|
|
25825
|
+
);
|
|
25826
|
+
if (el) {
|
|
25827
|
+
el.scrollIntoView();
|
|
25828
|
+
return;
|
|
25829
|
+
}
|
|
25830
|
+
}
|
|
25831
|
+
} catch {
|
|
25832
|
+
warning(
|
|
25833
|
+
false,
|
|
25834
|
+
`"${location.hash.slice(
|
|
25835
|
+
1
|
|
25836
|
+
)}" is not a decodable element ID. The view will not scroll to it.`
|
|
25837
|
+
);
|
|
25838
|
+
}
|
|
25839
|
+
if (preventScrollReset === true) {
|
|
25840
|
+
return;
|
|
25841
|
+
}
|
|
25842
|
+
window.scrollTo(0, 0);
|
|
25843
|
+
}, [location, restoreScrollPosition, preventScrollReset]);
|
|
25844
|
+
}
|
|
25845
|
+
}
|
|
25846
|
+
function usePageHide(callback, options) {
|
|
25847
|
+
let { capture } = options || {};
|
|
25848
|
+
React10.useEffect(() => {
|
|
25849
|
+
let opts = capture != null ? { capture } : void 0;
|
|
25850
|
+
window.addEventListener("pagehide", callback, opts);
|
|
25851
|
+
return () => {
|
|
25852
|
+
window.removeEventListener("pagehide", callback, opts);
|
|
25853
|
+
};
|
|
25854
|
+
}, [callback, capture]);
|
|
25855
|
+
}
|
|
25856
|
+
function useViewTransitionState(to, { relative } = {}) {
|
|
25857
|
+
let vtContext = React10.useContext(ViewTransitionContext);
|
|
25858
|
+
invariant(
|
|
25859
|
+
vtContext != null,
|
|
25860
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
25861
|
+
);
|
|
25862
|
+
let { basename } = useDataRouterContext3(
|
|
25863
|
+
"useViewTransitionState"
|
|
25864
|
+
/* useViewTransitionState */
|
|
25865
|
+
);
|
|
25866
|
+
let path = useResolvedPath(to, { relative });
|
|
25867
|
+
if (!vtContext.isTransitioning) {
|
|
25868
|
+
return false;
|
|
25869
|
+
}
|
|
25870
|
+
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
25871
|
+
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
25872
|
+
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
25873
|
+
}
|
|
25874
|
+
|
|
25875
|
+
// node_modules/react-router/dist/development/index.mjs
|
|
25876
|
+
init_dirname();
|
|
25877
|
+
init_buffer();
|
|
25878
|
+
init_process();
|
|
25879
|
+
"use client";
|
|
25880
|
+
|
|
23625
25881
|
// node_modules/chai/index.js
|
|
23626
25882
|
init_dirname();
|
|
23627
25883
|
init_buffer();
|
|
@@ -24869,7 +27125,7 @@ function hasProperty(obj, name) {
|
|
|
24869
27125
|
return name in Object(obj);
|
|
24870
27126
|
}
|
|
24871
27127
|
__name(hasProperty, "hasProperty");
|
|
24872
|
-
function
|
|
27128
|
+
function parsePath2(path) {
|
|
24873
27129
|
const str = path.replace(/([^\\])\[/g, "$1.[");
|
|
24874
27130
|
const parts = str.match(/(\\\.|[^.]+?)+/g);
|
|
24875
27131
|
return parts.map((value) => {
|
|
@@ -24887,7 +27143,7 @@ function parsePath(path) {
|
|
|
24887
27143
|
return parsed;
|
|
24888
27144
|
});
|
|
24889
27145
|
}
|
|
24890
|
-
__name(
|
|
27146
|
+
__name(parsePath2, "parsePath");
|
|
24891
27147
|
function internalGetPathValue(obj, parsed, pathDepth) {
|
|
24892
27148
|
let temporaryValue = obj;
|
|
24893
27149
|
let res = null;
|
|
@@ -24909,7 +27165,7 @@ function internalGetPathValue(obj, parsed, pathDepth) {
|
|
|
24909
27165
|
}
|
|
24910
27166
|
__name(internalGetPathValue, "internalGetPathValue");
|
|
24911
27167
|
function getPathInfo(obj, path) {
|
|
24912
|
-
const parsed =
|
|
27168
|
+
const parsed = parsePath2(path);
|
|
24913
27169
|
const last = parsed[parsed.length - 1];
|
|
24914
27170
|
const info = {
|
|
24915
27171
|
parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,
|
|
@@ -25206,29 +27462,29 @@ function stringDistanceCapped(strA, strB, cap) {
|
|
|
25206
27462
|
if (Math.abs(strA.length - strB.length) >= cap) {
|
|
25207
27463
|
return cap;
|
|
25208
27464
|
}
|
|
25209
|
-
let
|
|
27465
|
+
let memo2 = [];
|
|
25210
27466
|
for (let i = 0; i <= strA.length; i++) {
|
|
25211
|
-
|
|
25212
|
-
|
|
27467
|
+
memo2[i] = Array(strB.length + 1).fill(0);
|
|
27468
|
+
memo2[i][0] = i;
|
|
25213
27469
|
}
|
|
25214
27470
|
for (let j = 0; j < strB.length; j++) {
|
|
25215
|
-
|
|
27471
|
+
memo2[0][j] = j;
|
|
25216
27472
|
}
|
|
25217
27473
|
for (let i = 1; i <= strA.length; i++) {
|
|
25218
27474
|
let ch = strA.charCodeAt(i - 1);
|
|
25219
27475
|
for (let j = 1; j <= strB.length; j++) {
|
|
25220
27476
|
if (Math.abs(i - j) >= cap) {
|
|
25221
|
-
|
|
27477
|
+
memo2[i][j] = cap;
|
|
25222
27478
|
continue;
|
|
25223
27479
|
}
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
27480
|
+
memo2[i][j] = Math.min(
|
|
27481
|
+
memo2[i - 1][j] + 1,
|
|
27482
|
+
memo2[i][j - 1] + 1,
|
|
27483
|
+
memo2[i - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
|
|
25228
27484
|
);
|
|
25229
27485
|
}
|
|
25230
27486
|
}
|
|
25231
|
-
return
|
|
27487
|
+
return memo2[strA.length][strB.length];
|
|
25232
27488
|
}
|
|
25233
27489
|
__name(stringDistanceCapped, "stringDistanceCapped");
|
|
25234
27490
|
function addMethod(ctx, name, method) {
|
|
@@ -27700,8 +29956,10 @@ __name(use, "use");
|
|
|
27700
29956
|
export {
|
|
27701
29957
|
require_react,
|
|
27702
29958
|
require_react_dom,
|
|
27703
|
-
require_client,
|
|
27704
29959
|
web_default,
|
|
29960
|
+
useLocation,
|
|
29961
|
+
MemoryRouter,
|
|
29962
|
+
Link,
|
|
27705
29963
|
assert
|
|
27706
29964
|
};
|
|
27707
29965
|
/*! Bundled license information:
|
|
@@ -27752,6 +30010,30 @@ react-dom/cjs/react-dom.development.js:
|
|
|
27752
30010
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
27753
30011
|
*)
|
|
27754
30012
|
|
|
30013
|
+
react-router/dist/development/chunk-PVWAREVJ.mjs:
|
|
30014
|
+
(**
|
|
30015
|
+
* react-router v7.8.2
|
|
30016
|
+
*
|
|
30017
|
+
* Copyright (c) Remix Software Inc.
|
|
30018
|
+
*
|
|
30019
|
+
* This source code is licensed under the MIT license found in the
|
|
30020
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
30021
|
+
*
|
|
30022
|
+
* @license MIT
|
|
30023
|
+
*)
|
|
30024
|
+
|
|
30025
|
+
react-router/dist/development/index.mjs:
|
|
30026
|
+
(**
|
|
30027
|
+
* react-router v7.8.2
|
|
30028
|
+
*
|
|
30029
|
+
* Copyright (c) Remix Software Inc.
|
|
30030
|
+
*
|
|
30031
|
+
* This source code is licensed under the MIT license found in the
|
|
30032
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
30033
|
+
*
|
|
30034
|
+
* @license MIT
|
|
30035
|
+
*)
|
|
30036
|
+
|
|
27755
30037
|
chai/index.js:
|
|
27756
30038
|
(*!
|
|
27757
30039
|
* Chai - flag utility
|