zudoku 0.0.0-e614aaa → 0.0.0-e6d1d34
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 +1 -1
- package/dist/app/entry.server.d.ts +8 -6
- package/dist/app/entry.server.js +12 -8
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +2 -0
- package/dist/app/main.js.map +1 -1
- package/dist/app/tailwind.js +14 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.js +2 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.js +2 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/preview/handler.js +13 -15
- package/dist/cli/preview/handler.js.map +1 -1
- package/dist/config/common.d.ts +0 -1
- package/dist/config/config.d.ts +13 -8
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/loader.js +14 -25
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +2773 -597
- package/dist/config/validators/common.js +81 -4
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1013 -257
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +11 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +19 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -0
- package/dist/lib/authentication/providers/openid.js +20 -8
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +4 -0
- package/dist/lib/authentication/providers/supabase.js +117 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +0 -26
- package/dist/lib/authentication/state.js +1 -16
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +5 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +2 -1
- package/dist/lib/components/Bootstrap.js +3 -2
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Footer.d.ts +1 -0
- package/dist/lib/components/Footer.js +32 -0
- package/dist/lib/components/Footer.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +2 -9
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +8 -29
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.d.ts +2 -0
- package/dist/lib/components/Main.js +17 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +6 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.d.ts +11 -0
- package/dist/lib/components/Pagination.js +10 -0
- package/dist/lib/components/Pagination.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +3 -2
- package/dist/lib/components/TopNavigation.js +26 -13
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +9 -3
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +7 -0
- package/dist/lib/components/cache.js +7 -0
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
- package/dist/lib/components/context/ZudokuContext.js +13 -7
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +5 -2
- package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -12
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +10 -6
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
- package/dist/lib/components/navigation/SidebarItem.js +17 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
- package/dist/lib/components/navigation/Toc.js.map +1 -0
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
- package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
- package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +10 -3
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +23 -7
- package/dist/lib/core/ZudokuContext.js +12 -5
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +9 -7
- package/dist/lib/errors/ErrorAlert.js +6 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +1 -1
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +17 -4
- package/dist/lib/oas/graphql/index.js +148 -38
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -0
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +5 -3
- package/dist/lib/oas/parser/index.js +0 -22
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.js +19 -17
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -9
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +63 -19
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +6 -12
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
- package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
- package/dist/lib/plugins/openapi/SchemaList.js +52 -0
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +38 -9
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
- package/dist/lib/plugins/openapi/graphql/gql.js +5 -4
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
- package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +6 -11
- package/dist/lib/plugins/openapi/index.js +41 -60
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +3 -1
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +25 -0
- package/dist/lib/plugins/openapi/state.js +18 -0
- package/dist/lib/plugins/openapi/state.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +23 -10
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +19 -17
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +8 -1
- package/dist/lib/plugins/search-pagefind/get-results.js +9 -4
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +2 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +2 -1
- package/dist/lib/ui/Callout.js +3 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +0 -1
- package/dist/lib/ui/Stepper.js +1 -1
- package/dist/lib/ui/Stepper.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +21 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +3 -2
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinPath.d.ts +3 -0
- package/dist/lib/util/joinPath.js +3 -0
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +2 -8
- package/dist/lib/util/traverse.js +2 -2
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/types.d.ts +7 -0
- package/dist/lib/util/types.js +2 -0
- package/dist/lib/util/types.js.map +1 -0
- package/dist/lib/util/useOnScreen.d.ts +3 -2
- package/dist/lib/util/useOnScreen.js +3 -3
- package/dist/lib/util/useOnScreen.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +20 -12
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +1 -1
- package/dist/vite/api/schema-codegen.js +35 -12
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +66 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +1 -4
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +7 -9
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/create-pagefind-index.d.ts +4 -0
- package/dist/vite/create-pagefind-index.js +12 -0
- package/dist/vite/create-pagefind-index.js.map +1 -0
- package/dist/vite/dev-server.js +4 -4
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api.js +36 -29
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +3 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +1 -1
- package/dist/vite/plugin-docs.js +18 -1
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
- package/dist/vite/prerender/FileWritingResponse.js +5 -5
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
- package/dist/vite/prerender/InMemoryResponse.js +32 -0
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
- package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
- package/dist/vite/prerender/PrerenderResponse.js +2 -0
- package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +1 -0
- package/dist/vite/prerender/prerender.js +32 -8
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.js +41 -14
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +4 -0
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-CiO1FM6Q.js → AuthenticationPlugin-foqdvvkf.js} +3 -3
- package/lib/{AuthenticationPlugin-CiO1FM6Q.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
- package/lib/Button-Fp19CMUr.js +49 -0
- package/lib/Button-Fp19CMUr.js.map +1 -0
- package/lib/Callout-B2vsR09t.js +229 -0
- package/lib/Callout-B2vsR09t.js.map +1 -0
- package/lib/{Dialog-DIKGQxQc.js → Dialog-sbgekbjb.js} +47 -32
- package/lib/{Dialog-DIKGQxQc.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/Drawer-kDAfOq_2.js +1133 -0
- package/lib/Drawer-kDAfOq_2.js.map +1 -0
- package/lib/{Markdown-DePfm7oQ.js → Markdown-aF5FdsNi.js} +6268 -4572
- package/lib/Markdown-aF5FdsNi.js.map +1 -0
- package/lib/MdxPage-Vw_dc9Yz.js +85 -0
- package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
- package/lib/{OasProvider-BSuptFK-.js → OasProvider-C5paEivQ.js} +4 -4
- package/lib/{OasProvider-BSuptFK-.js.map → OasProvider-C5paEivQ.js.map} +1 -1
- package/lib/OperationList-Ds9Izgkn.js +5069 -0
- package/lib/OperationList-Ds9Izgkn.js.map +1 -0
- package/lib/Pagination-SdlocK96.js +48 -0
- package/lib/Pagination-SdlocK96.js.map +1 -0
- package/lib/{index.esm-CQHE3GEU.js → RouteGuard-CqZPoZYJ.js} +192 -139
- package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
- package/lib/SchemaList-NZbDXAV5.js +148 -0
- package/lib/SchemaList-NZbDXAV5.js.map +1 -0
- package/lib/SchemaView-B3fOPR4V.js +357 -0
- package/lib/SchemaView-B3fOPR4V.js.map +1 -0
- package/lib/{Select-Dqtcn53H.js → Select-DVFRKf1R.js} +9 -9
- package/lib/{Select-Dqtcn53H.js.map → Select-DVFRKf1R.js.map} +1 -1
- package/lib/SlotletProvider-DXvc0aY6.js +338 -0
- package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
- package/lib/Spinner-CE68iCm0.js +7 -0
- package/lib/Spinner-CE68iCm0.js.map +1 -0
- package/lib/SyntaxHighlight-BEoSoPEo.js +2890 -0
- package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
- package/lib/Toc-YBsgI72s.js +92 -0
- package/lib/Toc-YBsgI72s.js.map +1 -0
- package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-HA7DTUK3-C4gP41vD.js} +278 -278
- package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
- package/lib/{circular-v7K6lDDh.js → circular-ByJI6Mci.js} +4887 -4419
- package/lib/circular-ByJI6Mci.js.map +1 -0
- package/lib/{createServer-DmusVVsi.js → createServer-mYvGvmc0.js} +4150 -4424
- package/lib/createServer-mYvGvmc0.js.map +1 -0
- package/lib/{hook-CN__aZIt.js → hook-CqpVYDqN.js} +398 -379
- package/lib/hook-CqpVYDqN.js.map +1 -0
- package/lib/index-D48iOQvJ.js +1973 -0
- package/lib/index-D48iOQvJ.js.map +1 -0
- package/lib/index-PGJOZ6R-.js +2227 -0
- package/lib/index-PGJOZ6R-.js.map +1 -0
- package/lib/{mutation-EclmI0is.js → mutation-8LjrN7uz.js} +2 -2
- package/lib/{mutation-EclmI0is.js.map → mutation-8LjrN7uz.js.map} +1 -1
- package/lib/post-processors/traverse.js +2 -2
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
- package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
- package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
- package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
- package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/ActionButton.js +11 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Button.js +13 -12
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +39 -21
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Drawer.js +14 -1129
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +8 -2902
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-B9qXJedG.js} +2 -2
- package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +59 -41
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +341 -337
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +32 -1395
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +94 -98
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +233 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +32 -24
- package/src/app/entry.server.tsx +23 -13
- package/src/app/main.css +98 -57
- package/src/app/main.tsx +2 -0
- package/src/app/tailwind.ts +14 -0
- package/src/lib/authentication/authentication.ts +2 -0
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/clerk.tsx +22 -2
- package/src/lib/authentication/providers/openid.tsx +23 -10
- package/src/lib/authentication/providers/supabase.tsx +157 -0
- package/src/lib/authentication/state.ts +1 -35
- package/src/lib/components/AnchorLink.tsx +9 -7
- package/src/lib/components/Bootstrap.tsx +13 -6
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Header.tsx +11 -7
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +22 -68
- package/src/lib/components/Main.tsx +50 -0
- package/src/lib/components/MobileTopNavigation.tsx +27 -18
- package/src/lib/components/Pagination.tsx +50 -0
- package/src/lib/components/TopNavigation.tsx +40 -17
- package/src/lib/components/Zudoku.tsx +12 -3
- package/src/lib/components/cache.ts +8 -0
- package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
- package/src/lib/components/context/ZudokuContext.ts +17 -8
- package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
- package/src/lib/components/navigation/Sidebar.tsx +30 -44
- package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
- package/src/lib/components/navigation/SidebarItem.tsx +21 -29
- package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
- package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
- package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
- package/src/lib/core/RouteGuard.tsx +27 -4
- package/src/lib/core/ZudokuContext.ts +35 -15
- package/src/lib/core/plugins.ts +8 -8
- package/src/lib/errors/ErrorAlert.tsx +24 -17
- package/src/lib/hooks/useEvent.test.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +202 -54
- package/src/lib/oas/parser/dereference/index.ts +2 -0
- package/src/lib/oas/parser/index.ts +7 -29
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -4
- package/src/lib/plugins/api-catalog/index.tsx +40 -35
- package/src/lib/plugins/markdown/MdxPage.tsx +11 -47
- package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +162 -84
- package/src/lib/plugins/openapi/OperationListItem.tsx +116 -110
- package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +47 -11
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
- package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
- package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +29 -20
- package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
- package/src/lib/plugins/openapi/index.tsx +55 -87
- package/src/lib/plugins/openapi/interfaces.ts +44 -15
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +175 -88
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
- package/src/lib/plugins/openapi/schema/utils.ts +7 -1
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
- package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +39 -14
- package/src/lib/plugins/search-pagefind/ResultList.tsx +60 -53
- package/src/lib/plugins/search-pagefind/get-results.tsx +31 -10
- package/src/lib/ui/Button.tsx +4 -2
- package/src/lib/ui/Callout.tsx +28 -10
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/Stepper.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +96 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/traverse.ts +4 -8
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +22 -12
- package/dist/lib/components/context/PluginSystem.d.ts +0 -1
- package/dist/lib/components/context/PluginSystem.js +0 -2
- package/dist/lib/components/context/PluginSystem.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/dist/vite/pagefind.d.ts +0 -4
- package/dist/vite/pagefind.js +0 -15
- package/dist/vite/pagefind.js.map +0 -1
- package/lib/Markdown-DePfm7oQ.js.map +0 -1
- package/lib/MdxPage-BN6l6zXL.js +0 -201
- package/lib/MdxPage-BN6l6zXL.js.map +0 -1
- package/lib/OperationList-DOcfDmJP.js +0 -5217
- package/lib/OperationList-DOcfDmJP.js.map +0 -1
- package/lib/SlotletProvider-DdtIOUi6.js +0 -221
- package/lib/SlotletProvider-DdtIOUi6.js.map +0 -1
- package/lib/Spinner-1KrEmx1V.js +0 -51
- package/lib/Spinner-1KrEmx1V.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +0 -1
- package/lib/circular-v7K6lDDh.js.map +0 -1
- package/lib/createServer-DmusVVsi.js.map +0 -1
- package/lib/hook-CN__aZIt.js.map +0 -1
- package/lib/index-BTbP6Lgf.js +0 -2103
- package/lib/index-BTbP6Lgf.js.map +0 -1
- package/lib/index.esm-CQHE3GEU.js.map +0 -1
- package/lib/joinUrl-10po2Jdj.js +0 -20
- package/lib/joinUrl-10po2Jdj.js.map +0 -1
- package/lib/useScrollToAnchor-RyqO3lj4.js +0 -290
- package/lib/useScrollToAnchor-RyqO3lj4.js.map +0 -1
- package/lib/zudoku.css +0 -1
- package/src/lib/components/context/PluginSystem.ts +0 -0
- package/src/lib/ui/Stepper.css +0 -43
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $e = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var me = (t, e, s) => e.has(t) ||
|
|
5
|
-
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ?
|
|
4
|
+
var me = (t, e, s) => e.has(t) || $e("Cannot " + s);
|
|
5
|
+
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ? $e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
|
|
6
6
|
import * as j from "react";
|
|
7
|
-
import
|
|
8
|
-
import { j as
|
|
9
|
-
import { u as ve, m as ze } from "./chunk-
|
|
7
|
+
import Ge, { createContext as Et, useContext as Ct } from "react";
|
|
8
|
+
import { j as Ot } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
+
import { u as ve, m as ze } from "./chunk-HA7DTUK3-C4gP41vD.js";
|
|
10
10
|
var qe = class {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -26,35 +26,35 @@ var qe = class {
|
|
|
26
26
|
}, V = typeof window > "u" || "Deno" in globalThis;
|
|
27
27
|
function Se() {
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function bs(t, e) {
|
|
30
30
|
return typeof t == "function" ? t(e) : t;
|
|
31
31
|
}
|
|
32
32
|
function we(t) {
|
|
33
33
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function ot(t, e) {
|
|
36
36
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
37
37
|
}
|
|
38
38
|
function ye(t, e) {
|
|
39
39
|
return typeof t == "function" ? t(e) : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function x(t, e) {
|
|
42
42
|
return typeof t == "function" ? t(e) : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ms(t, e) {
|
|
45
45
|
const {
|
|
46
46
|
type: s = "all",
|
|
47
47
|
exact: r,
|
|
48
48
|
fetchStatus: i,
|
|
49
49
|
predicate: a,
|
|
50
|
-
queryKey:
|
|
51
|
-
stale:
|
|
50
|
+
queryKey: u,
|
|
51
|
+
stale: o
|
|
52
52
|
} = t;
|
|
53
|
-
if (
|
|
53
|
+
if (u) {
|
|
54
54
|
if (r) {
|
|
55
|
-
if (e.queryHash !==
|
|
55
|
+
if (e.queryHash !== It(u, e.options))
|
|
56
56
|
return !1;
|
|
57
|
-
} else if (!Le(e.queryKey,
|
|
57
|
+
} else if (!Le(e.queryKey, u))
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
if (s !== "all") {
|
|
@@ -62,9 +62,9 @@ function ys(t, e) {
|
|
|
62
62
|
if (s === "active" && !l || s === "inactive" && l)
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
|
-
return !(typeof
|
|
65
|
+
return !(typeof o == "boolean" && e.isStale() !== o || i && i !== e.state.fetchStatus || a && !a(e));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function gs(t, e) {
|
|
68
68
|
const { exact: s, status: r, predicate: i, mutationKey: a } = t;
|
|
69
69
|
if (a) {
|
|
70
70
|
if (!e.options.mutationKey)
|
|
@@ -77,7 +77,7 @@ function ps(t, e) {
|
|
|
77
77
|
}
|
|
78
78
|
return !(r && e.state.status !== r || i && !i(e));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function It(t, e) {
|
|
81
81
|
return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
|
|
82
82
|
}
|
|
83
83
|
function Re(t) {
|
|
@@ -89,22 +89,22 @@ function Re(t) {
|
|
|
89
89
|
function Le(t, e) {
|
|
90
90
|
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Le(t[s], e[s])) : !1;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Ee(t, e) {
|
|
93
93
|
if (t === e)
|
|
94
94
|
return t;
|
|
95
95
|
const s = Je(t) && Je(e);
|
|
96
96
|
if (s || Oe(t) && Oe(e)) {
|
|
97
|
-
const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e),
|
|
97
|
+
const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), u = a.length, o = s ? [] : {};
|
|
98
98
|
let l = 0;
|
|
99
|
-
for (let f = 0; f <
|
|
99
|
+
for (let f = 0; f < u; f++) {
|
|
100
100
|
const m = s ? f : a[f];
|
|
101
|
-
(!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (
|
|
101
|
+
(!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (o[m] = void 0, l++) : (o[m] = Ee(t[m], e[m]), o[m] === t[m] && t[m] !== void 0 && l++);
|
|
102
102
|
}
|
|
103
|
-
return i ===
|
|
103
|
+
return i === u && l === i ? t : o;
|
|
104
104
|
}
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ce(t, e) {
|
|
108
108
|
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
109
109
|
return !1;
|
|
110
110
|
for (const s in t)
|
|
@@ -127,7 +127,7 @@ function Oe(t) {
|
|
|
127
127
|
function Ve(t) {
|
|
128
128
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ft(t) {
|
|
131
131
|
return new Promise((e) => {
|
|
132
132
|
setTimeout(e, t);
|
|
133
133
|
});
|
|
@@ -138,37 +138,40 @@ function Ie(t, e, s) {
|
|
|
138
138
|
if (s.structuralSharing !== !1) {
|
|
139
139
|
if (process.env.NODE_ENV !== "production")
|
|
140
140
|
try {
|
|
141
|
-
return
|
|
141
|
+
return Ee(t, e);
|
|
142
142
|
} catch (r) {
|
|
143
143
|
console.error(
|
|
144
144
|
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
|
-
return
|
|
147
|
+
return Ee(t, e);
|
|
148
148
|
}
|
|
149
149
|
return e;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Ss(t) {
|
|
152
|
+
return t;
|
|
153
|
+
}
|
|
154
|
+
function ws(t, e, s = 0) {
|
|
152
155
|
const r = [...t, e];
|
|
153
156
|
return s && r.length > s ? r.slice(1) : r;
|
|
154
157
|
}
|
|
155
|
-
function
|
|
158
|
+
function Rs(t, e, s = 0) {
|
|
156
159
|
const r = [e, ...t];
|
|
157
160
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
158
161
|
}
|
|
159
162
|
var pe = Symbol();
|
|
160
|
-
function
|
|
163
|
+
function Pt(t, e) {
|
|
161
164
|
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error(
|
|
162
165
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
163
166
|
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
164
167
|
}
|
|
165
|
-
var H, L,
|
|
168
|
+
var H, L, X, st, Tt = (st = class extends qe {
|
|
166
169
|
constructor() {
|
|
167
170
|
super();
|
|
168
171
|
g(this, H);
|
|
169
172
|
g(this, L);
|
|
170
|
-
g(this,
|
|
171
|
-
d(this,
|
|
173
|
+
g(this, X);
|
|
174
|
+
d(this, X, (e) => {
|
|
172
175
|
if (!V && window.addEventListener) {
|
|
173
176
|
const s = () => e();
|
|
174
177
|
return window.addEventListener("visibilitychange", s, !1), () => {
|
|
@@ -178,7 +181,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
|
|
|
178
181
|
});
|
|
179
182
|
}
|
|
180
183
|
onSubscribe() {
|
|
181
|
-
n(this, L) || this.setEventListener(n(this,
|
|
184
|
+
n(this, L) || this.setEventListener(n(this, X));
|
|
182
185
|
}
|
|
183
186
|
onUnsubscribe() {
|
|
184
187
|
var e;
|
|
@@ -186,7 +189,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
|
|
|
186
189
|
}
|
|
187
190
|
setEventListener(e) {
|
|
188
191
|
var s;
|
|
189
|
-
d(this,
|
|
192
|
+
d(this, X, e), (s = n(this, L)) == null || s.call(this), d(this, L, e((r) => {
|
|
190
193
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
191
194
|
}));
|
|
192
195
|
}
|
|
@@ -203,13 +206,13 @@ var H, L, ee, tt, jt = (tt = class extends qe {
|
|
|
203
206
|
var e;
|
|
204
207
|
return typeof n(this, H) == "boolean" ? n(this, H) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
205
208
|
}
|
|
206
|
-
}, H = new WeakMap(), L = new WeakMap(),
|
|
209
|
+
}, H = new WeakMap(), L = new WeakMap(), X = new WeakMap(), st), ut = new Tt(), ee, M, te, rt, Dt = (rt = class extends qe {
|
|
207
210
|
constructor() {
|
|
208
211
|
super();
|
|
209
|
-
g(this,
|
|
212
|
+
g(this, ee, !0);
|
|
210
213
|
g(this, M);
|
|
211
|
-
g(this,
|
|
212
|
-
d(this,
|
|
214
|
+
g(this, te);
|
|
215
|
+
d(this, te, (e) => {
|
|
213
216
|
if (!V && window.addEventListener) {
|
|
214
217
|
const s = () => e(!0), r = () => e(!1);
|
|
215
218
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
@@ -219,7 +222,7 @@ var H, L, ee, tt, jt = (tt = class extends qe {
|
|
|
219
222
|
});
|
|
220
223
|
}
|
|
221
224
|
onSubscribe() {
|
|
222
|
-
n(this, M) || this.setEventListener(n(this,
|
|
225
|
+
n(this, M) || this.setEventListener(n(this, te));
|
|
223
226
|
}
|
|
224
227
|
onUnsubscribe() {
|
|
225
228
|
var e;
|
|
@@ -227,17 +230,17 @@ var H, L, ee, tt, jt = (tt = class extends qe {
|
|
|
227
230
|
}
|
|
228
231
|
setEventListener(e) {
|
|
229
232
|
var s;
|
|
230
|
-
d(this,
|
|
233
|
+
d(this, te, e), (s = n(this, M)) == null || s.call(this), d(this, M, e(this.setOnline.bind(this)));
|
|
231
234
|
}
|
|
232
235
|
setOnline(e) {
|
|
233
|
-
n(this,
|
|
236
|
+
n(this, ee) !== e && (d(this, ee, e), this.listeners.forEach((r) => {
|
|
234
237
|
r(e);
|
|
235
238
|
}));
|
|
236
239
|
}
|
|
237
240
|
isOnline() {
|
|
238
|
-
return n(this,
|
|
241
|
+
return n(this, ee);
|
|
239
242
|
}
|
|
240
|
-
},
|
|
243
|
+
}, ee = new WeakMap(), M = new WeakMap(), te = new WeakMap(), rt), ct = new Dt();
|
|
241
244
|
function Fe() {
|
|
242
245
|
let t, e;
|
|
243
246
|
const s = new Promise((i, a) => {
|
|
@@ -260,30 +263,30 @@ function Fe() {
|
|
|
260
263
|
}), e(i);
|
|
261
264
|
}, s;
|
|
262
265
|
}
|
|
263
|
-
function
|
|
266
|
+
function jt(t) {
|
|
264
267
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
265
268
|
}
|
|
266
|
-
function
|
|
267
|
-
return (t ?? "online") === "online" ?
|
|
269
|
+
function ht(t) {
|
|
270
|
+
return (t ?? "online") === "online" ? ct.isOnline() : !0;
|
|
268
271
|
}
|
|
269
|
-
var
|
|
272
|
+
var lt = class extends Error {
|
|
270
273
|
constructor(t) {
|
|
271
274
|
super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
272
275
|
}
|
|
273
276
|
};
|
|
274
277
|
function ge(t) {
|
|
275
|
-
return t instanceof
|
|
278
|
+
return t instanceof lt;
|
|
276
279
|
}
|
|
277
|
-
function
|
|
280
|
+
function At(t) {
|
|
278
281
|
let e = !1, s = 0, r = !1, i;
|
|
279
|
-
const a = Fe(),
|
|
282
|
+
const a = Fe(), u = (h) => {
|
|
280
283
|
var v;
|
|
281
|
-
r || (p(new
|
|
282
|
-
},
|
|
284
|
+
r || (p(new lt(h)), (v = t.abort) == null || v.call(t));
|
|
285
|
+
}, o = () => {
|
|
283
286
|
e = !0;
|
|
284
287
|
}, l = () => {
|
|
285
288
|
e = !1;
|
|
286
|
-
}, f = () =>
|
|
289
|
+
}, f = () => ut.isFocused() && (t.networkMode === "always" || ct.isOnline()) && t.canRun(), m = () => ht(t.networkMode) && t.canRun(), c = (h) => {
|
|
287
290
|
var v;
|
|
288
291
|
r || (r = !0, (v = t.onSuccess) == null || v.call(t, h), i == null || i(), a.resolve(h));
|
|
289
292
|
}, p = (h) => {
|
|
@@ -291,83 +294,83 @@ function xt(t) {
|
|
|
291
294
|
r || (r = !0, (v = t.onError) == null || v.call(t, h), i == null || i(), a.reject(h));
|
|
292
295
|
}, y = () => new Promise((h) => {
|
|
293
296
|
var v;
|
|
294
|
-
i = (
|
|
295
|
-
(r || f()) && h(
|
|
297
|
+
i = (E) => {
|
|
298
|
+
(r || f()) && h(E);
|
|
296
299
|
}, (v = t.onPause) == null || v.call(t);
|
|
297
300
|
}).then(() => {
|
|
298
301
|
var h;
|
|
299
302
|
i = void 0, r || (h = t.onContinue) == null || h.call(t);
|
|
300
|
-
}),
|
|
303
|
+
}), C = () => {
|
|
301
304
|
if (r)
|
|
302
305
|
return;
|
|
303
306
|
let h;
|
|
304
307
|
const v = s === 0 ? t.initialPromise : void 0;
|
|
305
308
|
try {
|
|
306
309
|
h = v ?? t.fn();
|
|
307
|
-
} catch (
|
|
308
|
-
h = Promise.reject(
|
|
310
|
+
} catch (E) {
|
|
311
|
+
h = Promise.reject(E);
|
|
309
312
|
}
|
|
310
|
-
Promise.resolve(h).then(c).catch((
|
|
313
|
+
Promise.resolve(h).then(c).catch((E) => {
|
|
311
314
|
var be;
|
|
312
315
|
if (r)
|
|
313
316
|
return;
|
|
314
|
-
const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ??
|
|
315
|
-
if (e || !
|
|
316
|
-
p(
|
|
317
|
+
const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? jt, q = typeof O == "function" ? O(s, E) : O, Z = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, E);
|
|
318
|
+
if (e || !Z) {
|
|
319
|
+
p(E);
|
|
317
320
|
return;
|
|
318
321
|
}
|
|
319
|
-
s++, (be = t.onFail) == null || be.call(t, s,
|
|
320
|
-
e ? p(
|
|
322
|
+
s++, (be = t.onFail) == null || be.call(t, s, E), Ft(q).then(() => f() ? void 0 : y()).then(() => {
|
|
323
|
+
e ? p(E) : C();
|
|
321
324
|
});
|
|
322
325
|
});
|
|
323
326
|
};
|
|
324
327
|
return {
|
|
325
328
|
promise: a,
|
|
326
|
-
cancel:
|
|
329
|
+
cancel: u,
|
|
327
330
|
continue: () => (i == null || i(), a),
|
|
328
|
-
cancelRetry:
|
|
331
|
+
cancelRetry: o,
|
|
329
332
|
continueRetry: l,
|
|
330
333
|
canStart: m,
|
|
331
|
-
start: () => (m() ?
|
|
334
|
+
start: () => (m() ? C() : y().then(C), a)
|
|
332
335
|
};
|
|
333
336
|
}
|
|
334
|
-
function
|
|
335
|
-
let t = [], e = 0, s = (
|
|
336
|
-
|
|
337
|
-
}, r = (
|
|
338
|
-
|
|
339
|
-
}, i = (
|
|
340
|
-
const a = (
|
|
341
|
-
e ? t.push(
|
|
342
|
-
s(
|
|
337
|
+
function xt() {
|
|
338
|
+
let t = [], e = 0, s = (o) => {
|
|
339
|
+
o();
|
|
340
|
+
}, r = (o) => {
|
|
341
|
+
o();
|
|
342
|
+
}, i = (o) => setTimeout(o, 0);
|
|
343
|
+
const a = (o) => {
|
|
344
|
+
e ? t.push(o) : i(() => {
|
|
345
|
+
s(o);
|
|
343
346
|
});
|
|
344
|
-
},
|
|
345
|
-
const
|
|
346
|
-
t = [],
|
|
347
|
+
}, u = () => {
|
|
348
|
+
const o = t;
|
|
349
|
+
t = [], o.length && i(() => {
|
|
347
350
|
r(() => {
|
|
348
|
-
|
|
351
|
+
o.forEach((l) => {
|
|
349
352
|
s(l);
|
|
350
353
|
});
|
|
351
354
|
});
|
|
352
355
|
});
|
|
353
356
|
};
|
|
354
357
|
return {
|
|
355
|
-
batch: (
|
|
358
|
+
batch: (o) => {
|
|
356
359
|
let l;
|
|
357
360
|
e++;
|
|
358
361
|
try {
|
|
359
|
-
l =
|
|
362
|
+
l = o();
|
|
360
363
|
} finally {
|
|
361
|
-
e--, e ||
|
|
364
|
+
e--, e || u();
|
|
362
365
|
}
|
|
363
366
|
return l;
|
|
364
367
|
},
|
|
365
368
|
/**
|
|
366
369
|
* All calls to the wrapped function will be batched.
|
|
367
370
|
*/
|
|
368
|
-
batchCalls: (
|
|
371
|
+
batchCalls: (o) => (...l) => {
|
|
369
372
|
a(() => {
|
|
370
|
-
|
|
373
|
+
o(...l);
|
|
371
374
|
});
|
|
372
375
|
},
|
|
373
376
|
schedule: a,
|
|
@@ -375,22 +378,22 @@ function Qt() {
|
|
|
375
378
|
* Use this method to set a custom notify function.
|
|
376
379
|
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
377
380
|
*/
|
|
378
|
-
setNotifyFunction: (
|
|
379
|
-
s =
|
|
381
|
+
setNotifyFunction: (o) => {
|
|
382
|
+
s = o;
|
|
380
383
|
},
|
|
381
384
|
/**
|
|
382
385
|
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
383
386
|
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
384
387
|
*/
|
|
385
|
-
setBatchNotifyFunction: (
|
|
386
|
-
r =
|
|
388
|
+
setBatchNotifyFunction: (o) => {
|
|
389
|
+
r = o;
|
|
387
390
|
},
|
|
388
|
-
setScheduler: (
|
|
389
|
-
i =
|
|
391
|
+
setScheduler: (o) => {
|
|
392
|
+
i = o;
|
|
390
393
|
}
|
|
391
394
|
};
|
|
392
395
|
}
|
|
393
|
-
var Me =
|
|
396
|
+
var Me = xt(), K, nt, kt = (nt = class {
|
|
394
397
|
constructor() {
|
|
395
398
|
g(this, K);
|
|
396
399
|
}
|
|
@@ -411,18 +414,18 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
411
414
|
clearGcTimeout() {
|
|
412
415
|
n(this, K) && (clearTimeout(n(this, K)), d(this, K, void 0));
|
|
413
416
|
}
|
|
414
|
-
}, K = new WeakMap(),
|
|
417
|
+
}, K = new WeakMap(), nt), se, re, D, B, I, he, $, A, Q, it, Es = (it = class extends kt {
|
|
415
418
|
constructor(e) {
|
|
416
419
|
super();
|
|
417
420
|
g(this, A);
|
|
421
|
+
g(this, se);
|
|
418
422
|
g(this, re);
|
|
419
|
-
g(this, ne);
|
|
420
423
|
g(this, D);
|
|
421
424
|
g(this, B);
|
|
422
425
|
g(this, I);
|
|
423
426
|
g(this, he);
|
|
424
|
-
g(this,
|
|
425
|
-
d(this,
|
|
427
|
+
g(this, $);
|
|
428
|
+
d(this, $, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, se, Ut(this.options)), this.state = e.state ?? n(this, se), this.scheduleGc();
|
|
426
429
|
}
|
|
427
430
|
get meta() {
|
|
428
431
|
return this.options.meta;
|
|
@@ -439,7 +442,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
439
442
|
}
|
|
440
443
|
setData(e, s) {
|
|
441
444
|
const r = Ie(this.state.data, e, this.options);
|
|
442
|
-
return w(this, A,
|
|
445
|
+
return w(this, A, Q).call(this, {
|
|
443
446
|
data: r,
|
|
444
447
|
type: "success",
|
|
445
448
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
@@ -447,7 +450,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
447
450
|
}), r;
|
|
448
451
|
}
|
|
449
452
|
setState(e, s) {
|
|
450
|
-
w(this, A,
|
|
453
|
+
w(this, A, Q).call(this, { type: "setState", state: e, setStateOptions: s });
|
|
451
454
|
}
|
|
452
455
|
cancel(e) {
|
|
453
456
|
var r, i;
|
|
@@ -458,11 +461,11 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
458
461
|
super.destroy(), this.cancel({ silent: !0 });
|
|
459
462
|
}
|
|
460
463
|
reset() {
|
|
461
|
-
this.destroy(), this.setState(n(this,
|
|
464
|
+
this.destroy(), this.setState(n(this, se));
|
|
462
465
|
}
|
|
463
466
|
isActive() {
|
|
464
467
|
return this.observers.some(
|
|
465
|
-
(e) =>
|
|
468
|
+
(e) => x(e.options.enabled, this) !== !1
|
|
466
469
|
);
|
|
467
470
|
}
|
|
468
471
|
isDisabled() {
|
|
@@ -474,7 +477,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
474
477
|
) : this.state.data === void 0;
|
|
475
478
|
}
|
|
476
479
|
isStaleByTime(e = 0) {
|
|
477
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
480
|
+
return this.state.isInvalidated || this.state.data === void 0 || !ot(this.state.dataUpdatedAt, e);
|
|
478
481
|
}
|
|
479
482
|
onFocus() {
|
|
480
483
|
var s;
|
|
@@ -490,13 +493,13 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
490
493
|
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, D).notify({ type: "observerAdded", query: this, observer: e }));
|
|
491
494
|
}
|
|
492
495
|
removeObserver(e) {
|
|
493
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this,
|
|
496
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, $) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
494
497
|
}
|
|
495
498
|
getObserversCount() {
|
|
496
499
|
return this.observers.length;
|
|
497
500
|
}
|
|
498
501
|
invalidate() {
|
|
499
|
-
this.state.isInvalidated || w(this, A,
|
|
502
|
+
this.state.isInvalidated || w(this, A, Q).call(this, { type: "invalidate" });
|
|
500
503
|
}
|
|
501
504
|
fetch(e, s) {
|
|
502
505
|
var l, f, m;
|
|
@@ -516,20 +519,20 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
516
519
|
const r = new AbortController(), i = (c) => {
|
|
517
520
|
Object.defineProperty(c, "signal", {
|
|
518
521
|
enumerable: !0,
|
|
519
|
-
get: () => (d(this,
|
|
522
|
+
get: () => (d(this, $, !0), r.signal)
|
|
520
523
|
});
|
|
521
524
|
}, a = () => {
|
|
522
|
-
const c =
|
|
525
|
+
const c = Pt(this.options, s), p = {
|
|
523
526
|
client: n(this, B),
|
|
524
527
|
queryKey: this.queryKey,
|
|
525
528
|
meta: this.meta
|
|
526
529
|
};
|
|
527
|
-
return i(p), d(this,
|
|
530
|
+
return i(p), d(this, $, !1), this.options.persister ? this.options.persister(
|
|
528
531
|
c,
|
|
529
532
|
p,
|
|
530
533
|
this
|
|
531
534
|
) : c(p);
|
|
532
|
-
},
|
|
535
|
+
}, u = {
|
|
533
536
|
fetchOptions: s,
|
|
534
537
|
options: this.options,
|
|
535
538
|
queryKey: this.queryKey,
|
|
@@ -537,68 +540,68 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
537
540
|
state: this.state,
|
|
538
541
|
fetchFn: a
|
|
539
542
|
};
|
|
540
|
-
i(
|
|
541
|
-
|
|
543
|
+
i(u), (l = this.options.behavior) == null || l.onFetch(
|
|
544
|
+
u,
|
|
542
545
|
this
|
|
543
|
-
), d(this,
|
|
544
|
-
const
|
|
545
|
-
var p, y,
|
|
546
|
-
ge(c) && c.silent || w(this, A,
|
|
546
|
+
), d(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = u.fetchOptions) == null ? void 0 : f.meta)) && w(this, A, Q).call(this, { type: "fetch", meta: (m = u.fetchOptions) == null ? void 0 : m.meta });
|
|
547
|
+
const o = (c) => {
|
|
548
|
+
var p, y, C, h;
|
|
549
|
+
ge(c) && c.silent || w(this, A, Q).call(this, {
|
|
547
550
|
type: "error",
|
|
548
551
|
error: c
|
|
549
552
|
}), ge(c) || ((y = (p = n(this, D).config).onError) == null || y.call(
|
|
550
553
|
p,
|
|
551
554
|
c,
|
|
552
555
|
this
|
|
553
|
-
), (h = (
|
|
554
|
-
|
|
556
|
+
), (h = (C = n(this, D).config).onSettled) == null || h.call(
|
|
557
|
+
C,
|
|
555
558
|
this.state.data,
|
|
556
559
|
c,
|
|
557
560
|
this
|
|
558
561
|
)), this.scheduleGc();
|
|
559
562
|
};
|
|
560
|
-
return d(this, I,
|
|
563
|
+
return d(this, I, At({
|
|
561
564
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
562
|
-
fn:
|
|
565
|
+
fn: u.fetchFn,
|
|
563
566
|
abort: r.abort.bind(r),
|
|
564
567
|
onSuccess: (c) => {
|
|
565
|
-
var p, y,
|
|
568
|
+
var p, y, C, h;
|
|
566
569
|
if (c === void 0) {
|
|
567
570
|
process.env.NODE_ENV !== "production" && console.error(
|
|
568
571
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
569
|
-
),
|
|
572
|
+
), o(new Error(`${this.queryHash} data is undefined`));
|
|
570
573
|
return;
|
|
571
574
|
}
|
|
572
575
|
try {
|
|
573
576
|
this.setData(c);
|
|
574
577
|
} catch (v) {
|
|
575
|
-
|
|
578
|
+
o(v);
|
|
576
579
|
return;
|
|
577
580
|
}
|
|
578
|
-
(y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (
|
|
579
|
-
|
|
581
|
+
(y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (C = n(this, D).config).onSettled) == null || h.call(
|
|
582
|
+
C,
|
|
580
583
|
c,
|
|
581
584
|
this.state.error,
|
|
582
585
|
this
|
|
583
586
|
), this.scheduleGc();
|
|
584
587
|
},
|
|
585
|
-
onError:
|
|
588
|
+
onError: o,
|
|
586
589
|
onFail: (c, p) => {
|
|
587
|
-
w(this, A,
|
|
590
|
+
w(this, A, Q).call(this, { type: "failed", failureCount: c, error: p });
|
|
588
591
|
},
|
|
589
592
|
onPause: () => {
|
|
590
|
-
w(this, A,
|
|
593
|
+
w(this, A, Q).call(this, { type: "pause" });
|
|
591
594
|
},
|
|
592
595
|
onContinue: () => {
|
|
593
|
-
w(this, A,
|
|
596
|
+
w(this, A, Q).call(this, { type: "continue" });
|
|
594
597
|
},
|
|
595
|
-
retry:
|
|
596
|
-
retryDelay:
|
|
597
|
-
networkMode:
|
|
598
|
+
retry: u.options.retry,
|
|
599
|
+
retryDelay: u.options.retryDelay,
|
|
600
|
+
networkMode: u.options.networkMode,
|
|
598
601
|
canRun: () => !0
|
|
599
602
|
})), n(this, I).start();
|
|
600
603
|
}
|
|
601
|
-
},
|
|
604
|
+
}, se = new WeakMap(), re = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), $ = new WeakMap(), A = new WeakSet(), Q = function(e) {
|
|
602
605
|
const s = (r) => {
|
|
603
606
|
switch (e.type) {
|
|
604
607
|
case "failed":
|
|
@@ -620,7 +623,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
620
623
|
case "fetch":
|
|
621
624
|
return {
|
|
622
625
|
...r,
|
|
623
|
-
...
|
|
626
|
+
...dt(r.data, this.options),
|
|
624
627
|
fetchMeta: e.meta ?? null
|
|
625
628
|
};
|
|
626
629
|
case "success":
|
|
@@ -640,7 +643,7 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
640
643
|
};
|
|
641
644
|
case "error":
|
|
642
645
|
const i = e.error;
|
|
643
|
-
return ge(i) && i.revert && n(this,
|
|
646
|
+
return ge(i) && i.revert && n(this, re) ? { ...n(this, re), fetchStatus: "idle" } : {
|
|
644
647
|
...r,
|
|
645
648
|
error: i,
|
|
646
649
|
errorUpdateCount: r.errorUpdateCount + 1,
|
|
@@ -667,19 +670,19 @@ var Me = Qt(), K, rt, Ut = (rt = class {
|
|
|
667
670
|
r.onQueryUpdate();
|
|
668
671
|
}), n(this, D).notify({ query: this, type: "updated", action: e });
|
|
669
672
|
});
|
|
670
|
-
},
|
|
671
|
-
function
|
|
673
|
+
}, it);
|
|
674
|
+
function dt(t, e) {
|
|
672
675
|
return {
|
|
673
676
|
fetchFailureCount: 0,
|
|
674
677
|
fetchFailureReason: null,
|
|
675
|
-
fetchStatus:
|
|
678
|
+
fetchStatus: ht(e.networkMode) ? "fetching" : "paused",
|
|
676
679
|
...t === void 0 && {
|
|
677
680
|
error: null,
|
|
678
681
|
status: "pending"
|
|
679
682
|
}
|
|
680
683
|
};
|
|
681
684
|
}
|
|
682
|
-
function
|
|
685
|
+
function Ut(t) {
|
|
683
686
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
684
687
|
return {
|
|
685
688
|
data: e,
|
|
@@ -696,7 +699,7 @@ function qt(t) {
|
|
|
696
699
|
fetchStatus: "idle"
|
|
697
700
|
};
|
|
698
701
|
}
|
|
699
|
-
var T, b, le, P,
|
|
702
|
+
var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae, xe, ke, yt, at, ft = (at = class extends qe {
|
|
700
703
|
constructor(e, s) {
|
|
701
704
|
super();
|
|
702
705
|
g(this, S);
|
|
@@ -704,20 +707,20 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
704
707
|
g(this, b);
|
|
705
708
|
g(this, le);
|
|
706
709
|
g(this, P);
|
|
707
|
-
g(this,
|
|
708
|
-
g(this,
|
|
710
|
+
g(this, G);
|
|
711
|
+
g(this, ne);
|
|
709
712
|
g(this, N);
|
|
710
|
-
g(this,
|
|
713
|
+
g(this, U);
|
|
711
714
|
g(this, de);
|
|
712
|
-
g(this,
|
|
715
|
+
g(this, ie);
|
|
713
716
|
// This property keeps track of the last query with defined data.
|
|
714
717
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
715
|
-
g(this,
|
|
718
|
+
g(this, ae);
|
|
716
719
|
g(this, z);
|
|
717
720
|
g(this, J);
|
|
718
721
|
g(this, _);
|
|
719
|
-
g(this,
|
|
720
|
-
this.options = s, d(this, T, e), d(this,
|
|
722
|
+
g(this, oe, /* @__PURE__ */ new Set());
|
|
723
|
+
this.options = s, d(this, T, e), d(this, U, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
|
|
721
724
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
722
725
|
), this.bindMethods(), this.setOptions(s);
|
|
723
726
|
}
|
|
@@ -725,35 +728,35 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
725
728
|
this.refetch = this.refetch.bind(this);
|
|
726
729
|
}
|
|
727
730
|
onSubscribe() {
|
|
728
|
-
this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S,
|
|
731
|
+
this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ue).call(this) : this.updateResult(), w(this, S, je).call(this));
|
|
729
732
|
}
|
|
730
733
|
onUnsubscribe() {
|
|
731
734
|
this.hasListeners() || this.destroy();
|
|
732
735
|
}
|
|
733
736
|
shouldFetchOnReconnect() {
|
|
734
|
-
return
|
|
737
|
+
return Ue(
|
|
735
738
|
n(this, b),
|
|
736
739
|
this.options,
|
|
737
740
|
this.options.refetchOnReconnect
|
|
738
741
|
);
|
|
739
742
|
}
|
|
740
743
|
shouldFetchOnWindowFocus() {
|
|
741
|
-
return
|
|
744
|
+
return Ue(
|
|
742
745
|
n(this, b),
|
|
743
746
|
this.options,
|
|
744
747
|
this.options.refetchOnWindowFocus
|
|
745
748
|
);
|
|
746
749
|
}
|
|
747
750
|
destroy() {
|
|
748
|
-
this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S,
|
|
751
|
+
this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, xe).call(this), n(this, b).removeObserver(this);
|
|
749
752
|
}
|
|
750
753
|
setOptions(e, s) {
|
|
751
754
|
const r = this.options, i = n(this, b);
|
|
752
|
-
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
755
|
+
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, b)) != "boolean")
|
|
753
756
|
throw new Error(
|
|
754
757
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
755
758
|
);
|
|
756
|
-
w(this, S,
|
|
759
|
+
w(this, S, ke).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ce(this.options, r) && n(this, T).getQueryCache().notify({
|
|
757
760
|
type: "observerOptionsUpdated",
|
|
758
761
|
query: n(this, b),
|
|
759
762
|
observer: this
|
|
@@ -764,13 +767,13 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
764
767
|
i,
|
|
765
768
|
this.options,
|
|
766
769
|
r
|
|
767
|
-
) && w(this, S,
|
|
768
|
-
const
|
|
769
|
-
a && (n(this, b) !== i ||
|
|
770
|
+
) && w(this, S, ue).call(this), this.updateResult(s), a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
|
|
771
|
+
const u = w(this, S, Te).call(this);
|
|
772
|
+
a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || u !== n(this, _)) && w(this, S, De).call(this, u);
|
|
770
773
|
}
|
|
771
774
|
getOptimisticResult(e) {
|
|
772
775
|
const s = n(this, T).getQueryCache().build(n(this, T), e), r = this.createResult(s, e);
|
|
773
|
-
return
|
|
776
|
+
return qt(this, r) && (d(this, P, r), d(this, ne, this.options), d(this, G, n(this, b).state)), r;
|
|
774
777
|
}
|
|
775
778
|
getCurrentResult() {
|
|
776
779
|
return n(this, P);
|
|
@@ -786,7 +789,7 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
786
789
|
}), r;
|
|
787
790
|
}
|
|
788
791
|
trackProp(e) {
|
|
789
|
-
n(this,
|
|
792
|
+
n(this, oe).add(e);
|
|
790
793
|
}
|
|
791
794
|
getCurrentQuery() {
|
|
792
795
|
return n(this, b);
|
|
@@ -801,46 +804,46 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
801
804
|
return r.fetch().then(() => this.createResult(r, s));
|
|
802
805
|
}
|
|
803
806
|
fetch(e) {
|
|
804
|
-
return w(this, S,
|
|
807
|
+
return w(this, S, ue).call(this, {
|
|
805
808
|
...e,
|
|
806
809
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
807
810
|
}).then(() => (this.updateResult(), n(this, P)));
|
|
808
811
|
}
|
|
809
812
|
createResult(e, s) {
|
|
810
813
|
var Be;
|
|
811
|
-
const r = n(this, b), i = this.options, a = n(this, P),
|
|
814
|
+
const r = n(this, b), i = this.options, a = n(this, P), u = n(this, G), o = n(this, ne), f = e !== r ? e.state : n(this, le), { state: m } = e;
|
|
812
815
|
let c = { ...m }, p = !1, y;
|
|
813
816
|
if (s._optimisticResults) {
|
|
814
|
-
const F = this.hasListeners(),
|
|
815
|
-
(
|
|
817
|
+
const F = this.hasListeners(), W = !F && Ze(e, s), Y = F && We(e, r, s, i);
|
|
818
|
+
(W || Y) && (c = {
|
|
816
819
|
...c,
|
|
817
|
-
...
|
|
820
|
+
...dt(m.data, e.options)
|
|
818
821
|
}), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
819
822
|
}
|
|
820
|
-
let { error:
|
|
823
|
+
let { error: C, errorUpdatedAt: h, status: v } = c;
|
|
821
824
|
if (s.select && c.data !== void 0)
|
|
822
|
-
if (a && c.data === (
|
|
823
|
-
y = n(this,
|
|
825
|
+
if (a && c.data === (u == null ? void 0 : u.data) && s.select === n(this, de))
|
|
826
|
+
y = n(this, ie);
|
|
824
827
|
else
|
|
825
828
|
try {
|
|
826
|
-
d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this,
|
|
829
|
+
d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ie, y), d(this, U, null);
|
|
827
830
|
} catch (F) {
|
|
828
|
-
d(this,
|
|
831
|
+
d(this, U, F);
|
|
829
832
|
}
|
|
830
833
|
else
|
|
831
834
|
y = c.data;
|
|
832
835
|
if (s.placeholderData !== void 0 && y === void 0 && v === "pending") {
|
|
833
836
|
let F;
|
|
834
|
-
if (a != null && a.isPlaceholderData && s.placeholderData === (
|
|
837
|
+
if (a != null && a.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
|
|
835
838
|
F = a.data;
|
|
836
839
|
else if (F = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
837
|
-
(Be = n(this,
|
|
838
|
-
n(this,
|
|
840
|
+
(Be = n(this, ae)) == null ? void 0 : Be.state.data,
|
|
841
|
+
n(this, ae)
|
|
839
842
|
) : s.placeholderData, s.select && F !== void 0)
|
|
840
843
|
try {
|
|
841
|
-
F = s.select(F), d(this,
|
|
842
|
-
} catch (
|
|
843
|
-
d(this,
|
|
844
|
+
F = s.select(F), d(this, U, null);
|
|
845
|
+
} catch (W) {
|
|
846
|
+
d(this, U, W);
|
|
844
847
|
}
|
|
845
848
|
F !== void 0 && (v = "success", y = Ie(
|
|
846
849
|
a == null ? void 0 : a.data,
|
|
@@ -848,8 +851,8 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
848
851
|
s
|
|
849
852
|
), p = !0);
|
|
850
853
|
}
|
|
851
|
-
n(this,
|
|
852
|
-
const
|
|
854
|
+
n(this, U) && (C = n(this, U), y = n(this, ie), h = Date.now(), v = "error");
|
|
855
|
+
const E = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && E, Z = y !== void 0, k = {
|
|
853
856
|
status: v,
|
|
854
857
|
fetchStatus: c.fetchStatus,
|
|
855
858
|
isPending: R,
|
|
@@ -859,70 +862,70 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
859
862
|
isLoading: q,
|
|
860
863
|
data: y,
|
|
861
864
|
dataUpdatedAt: c.dataUpdatedAt,
|
|
862
|
-
error:
|
|
865
|
+
error: C,
|
|
863
866
|
errorUpdatedAt: h,
|
|
864
867
|
failureCount: c.fetchFailureCount,
|
|
865
868
|
failureReason: c.fetchFailureReason,
|
|
866
869
|
errorUpdateCount: c.errorUpdateCount,
|
|
867
870
|
isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
|
|
868
871
|
isFetchedAfterMount: c.dataUpdateCount > f.dataUpdateCount || c.errorUpdateCount > f.errorUpdateCount,
|
|
869
|
-
isFetching:
|
|
870
|
-
isRefetching:
|
|
871
|
-
isLoadingError: O && !
|
|
872
|
+
isFetching: E,
|
|
873
|
+
isRefetching: E && !R,
|
|
874
|
+
isLoadingError: O && !Z,
|
|
872
875
|
isPaused: c.fetchStatus === "paused",
|
|
873
876
|
isPlaceholderData: p,
|
|
874
|
-
isRefetchError: O &&
|
|
877
|
+
isRefetchError: O && Z,
|
|
875
878
|
isStale: Ne(e, s),
|
|
876
879
|
refetch: this.refetch,
|
|
877
880
|
promise: n(this, N)
|
|
878
881
|
};
|
|
879
882
|
if (this.options.experimental_prefetchInRender) {
|
|
880
883
|
const F = (fe) => {
|
|
881
|
-
|
|
882
|
-
},
|
|
883
|
-
const fe = d(this, N,
|
|
884
|
+
k.status === "error" ? fe.reject(k.error) : k.data !== void 0 && fe.resolve(k.data);
|
|
885
|
+
}, W = () => {
|
|
886
|
+
const fe = d(this, N, k.promise = Fe());
|
|
884
887
|
F(fe);
|
|
885
|
-
},
|
|
886
|
-
switch (
|
|
888
|
+
}, Y = n(this, N);
|
|
889
|
+
switch (Y.status) {
|
|
887
890
|
case "pending":
|
|
888
|
-
e.queryHash === r.queryHash && F(
|
|
891
|
+
e.queryHash === r.queryHash && F(Y);
|
|
889
892
|
break;
|
|
890
893
|
case "fulfilled":
|
|
891
|
-
(
|
|
894
|
+
(k.status === "error" || k.data !== Y.value) && W();
|
|
892
895
|
break;
|
|
893
896
|
case "rejected":
|
|
894
|
-
(
|
|
897
|
+
(k.status !== "error" || k.error !== Y.reason) && W();
|
|
895
898
|
break;
|
|
896
899
|
}
|
|
897
900
|
}
|
|
898
|
-
return
|
|
901
|
+
return k;
|
|
899
902
|
}
|
|
900
903
|
updateResult(e) {
|
|
901
904
|
const s = n(this, P), r = this.createResult(n(this, b), this.options);
|
|
902
|
-
if (d(this,
|
|
905
|
+
if (d(this, G, n(this, b).state), d(this, ne, this.options), n(this, G).data !== void 0 && d(this, ae, n(this, b)), Ce(r, s))
|
|
903
906
|
return;
|
|
904
907
|
d(this, P, r);
|
|
905
908
|
const i = {}, a = () => {
|
|
906
909
|
if (!s)
|
|
907
910
|
return !0;
|
|
908
|
-
const { notifyOnChangeProps:
|
|
909
|
-
if (
|
|
911
|
+
const { notifyOnChangeProps: u } = this.options, o = typeof u == "function" ? u() : u;
|
|
912
|
+
if (o === "all" || !o && !n(this, oe).size)
|
|
910
913
|
return !0;
|
|
911
914
|
const l = new Set(
|
|
912
|
-
|
|
915
|
+
o ?? n(this, oe)
|
|
913
916
|
);
|
|
914
917
|
return this.options.throwOnError && l.add("error"), Object.keys(n(this, P)).some((f) => {
|
|
915
918
|
const m = f;
|
|
916
919
|
return n(this, P)[m] !== s[m] && l.has(m);
|
|
917
920
|
});
|
|
918
921
|
};
|
|
919
|
-
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S,
|
|
922
|
+
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, yt).call(this, { ...i, ...e });
|
|
920
923
|
}
|
|
921
924
|
onQueryUpdate() {
|
|
922
925
|
this.updateResult(), this.hasListeners() && w(this, S, je).call(this);
|
|
923
926
|
}
|
|
924
|
-
}, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(),
|
|
925
|
-
w(this, S,
|
|
927
|
+
}, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), G = new WeakMap(), ne = new WeakMap(), N = new WeakMap(), U = new WeakMap(), de = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), oe = new WeakMap(), S = new WeakSet(), ue = function(e) {
|
|
928
|
+
w(this, S, ke).call(this);
|
|
926
929
|
let s = n(this, b).fetch(
|
|
927
930
|
this.options,
|
|
928
931
|
e
|
|
@@ -936,29 +939,29 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
936
939
|
);
|
|
937
940
|
if (V || n(this, P).isStale || !we(e))
|
|
938
941
|
return;
|
|
939
|
-
const r =
|
|
942
|
+
const r = ot(n(this, P).dataUpdatedAt, e) + 1;
|
|
940
943
|
d(this, z, setTimeout(() => {
|
|
941
944
|
n(this, P).isStale || this.updateResult();
|
|
942
945
|
}, r));
|
|
943
946
|
}, Te = function() {
|
|
944
947
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, b)) : this.options.refetchInterval) ?? !1;
|
|
945
948
|
}, De = function(e) {
|
|
946
|
-
w(this, S,
|
|
947
|
-
(this.options.refetchIntervalInBackground ||
|
|
949
|
+
w(this, S, xe).call(this), d(this, _, e), !(V || x(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
|
|
950
|
+
(this.options.refetchIntervalInBackground || ut.isFocused()) && w(this, S, ue).call(this);
|
|
948
951
|
}, n(this, _)));
|
|
949
952
|
}, je = function() {
|
|
950
953
|
w(this, S, Pe).call(this), w(this, S, De).call(this, w(this, S, Te).call(this));
|
|
951
954
|
}, Ae = function() {
|
|
952
955
|
n(this, z) && (clearTimeout(n(this, z)), d(this, z, void 0));
|
|
953
|
-
}, ke = function() {
|
|
954
|
-
n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
|
|
955
956
|
}, xe = function() {
|
|
957
|
+
n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
|
|
958
|
+
}, ke = function() {
|
|
956
959
|
const e = n(this, T).getQueryCache().build(n(this, T), this.options);
|
|
957
960
|
if (e === n(this, b))
|
|
958
961
|
return;
|
|
959
962
|
const s = n(this, b);
|
|
960
963
|
d(this, b, e), d(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
|
|
961
|
-
},
|
|
964
|
+
}, yt = function(e) {
|
|
962
965
|
Me.batch(() => {
|
|
963
966
|
e.listeners && this.listeners.forEach((s) => {
|
|
964
967
|
s(n(this, P));
|
|
@@ -967,46 +970,46 @@ var T, b, le, P, $, ie, N, Q, de, ae, oe, z, J, _, ue, S, ce, Pe, Te, De, je, Ae
|
|
|
967
970
|
type: "observerResultsUpdated"
|
|
968
971
|
});
|
|
969
972
|
});
|
|
970
|
-
},
|
|
971
|
-
function
|
|
972
|
-
return
|
|
973
|
+
}, at);
|
|
974
|
+
function Qt(t, e) {
|
|
975
|
+
return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
973
976
|
}
|
|
974
977
|
function Ze(t, e) {
|
|
975
|
-
return
|
|
978
|
+
return Qt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
|
|
976
979
|
}
|
|
977
|
-
function
|
|
978
|
-
if (
|
|
980
|
+
function Ue(t, e, s) {
|
|
981
|
+
if (x(e.enabled, t) !== !1) {
|
|
979
982
|
const r = typeof s == "function" ? s(t) : s;
|
|
980
983
|
return r === "always" || r !== !1 && Ne(t, e);
|
|
981
984
|
}
|
|
982
985
|
return !1;
|
|
983
986
|
}
|
|
984
987
|
function We(t, e, s, r) {
|
|
985
|
-
return (t !== e ||
|
|
988
|
+
return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
|
|
986
989
|
}
|
|
987
990
|
function Ne(t, e) {
|
|
988
|
-
return
|
|
991
|
+
return x(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
|
|
989
992
|
}
|
|
990
|
-
function
|
|
991
|
-
return !
|
|
993
|
+
function qt(t, e) {
|
|
994
|
+
return !Ce(t.getCurrentResult(), e);
|
|
992
995
|
}
|
|
993
|
-
var
|
|
996
|
+
var pt = j.createContext(
|
|
994
997
|
void 0
|
|
995
|
-
),
|
|
996
|
-
const e = j.useContext(
|
|
998
|
+
), vt = (t) => {
|
|
999
|
+
const e = j.useContext(pt);
|
|
997
1000
|
if (t)
|
|
998
1001
|
return t;
|
|
999
1002
|
if (!e)
|
|
1000
1003
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1001
1004
|
return e;
|
|
1002
|
-
},
|
|
1005
|
+
}, Cs = ({
|
|
1003
1006
|
client: t,
|
|
1004
1007
|
children: e
|
|
1005
1008
|
}) => (j.useEffect(() => (t.mount(), () => {
|
|
1006
1009
|
t.unmount();
|
|
1007
|
-
}), [t]), /* @__PURE__ */
|
|
1008
|
-
|
|
1009
|
-
function
|
|
1010
|
+
}), [t]), /* @__PURE__ */ Ot.jsx(pt.Provider, { value: t, children: e })), bt = j.createContext(!1), Lt = () => j.useContext(bt);
|
|
1011
|
+
bt.Provider;
|
|
1012
|
+
function Mt() {
|
|
1010
1013
|
let t = !1;
|
|
1011
1014
|
return {
|
|
1012
1015
|
clearReset: () => {
|
|
@@ -1018,115 +1021,130 @@ function _t() {
|
|
|
1018
1021
|
isReset: () => t
|
|
1019
1022
|
};
|
|
1020
1023
|
}
|
|
1021
|
-
var
|
|
1022
|
-
function
|
|
1024
|
+
var Nt = j.createContext(Mt()), _t = () => j.useContext(Nt);
|
|
1025
|
+
function Ht(t, e) {
|
|
1023
1026
|
return typeof t == "function" ? t(...e) : !!t;
|
|
1024
1027
|
}
|
|
1025
1028
|
function Ye() {
|
|
1026
1029
|
}
|
|
1027
|
-
var
|
|
1030
|
+
var Kt = (t, e) => {
|
|
1028
1031
|
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
1029
|
-
},
|
|
1032
|
+
}, Bt = (t) => {
|
|
1030
1033
|
j.useEffect(() => {
|
|
1031
1034
|
t.clearReset();
|
|
1032
1035
|
}, [t]);
|
|
1033
|
-
},
|
|
1036
|
+
}, $t = ({
|
|
1034
1037
|
result: t,
|
|
1035
1038
|
errorResetBoundary: e,
|
|
1036
1039
|
throwOnError: s,
|
|
1037
1040
|
query: r,
|
|
1038
1041
|
suspense: i
|
|
1039
|
-
}) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 ||
|
|
1042
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Ht(s, [t.error, r])), Gt = (t, e) => e.state.data === void 0, zt = (t) => {
|
|
1040
1043
|
const e = t.staleTime;
|
|
1041
1044
|
t.suspense && (t.staleTime = typeof e == "function" ? (...s) => Math.max(e(...s), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
|
|
1042
|
-
},
|
|
1045
|
+
}, Jt = (t, e) => t.isLoading && t.isFetching && !e, Vt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1043
1046
|
s.clearReset();
|
|
1044
1047
|
});
|
|
1045
|
-
function
|
|
1046
|
-
var c, p, y,
|
|
1048
|
+
function mt(t, e, s) {
|
|
1049
|
+
var c, p, y, C, h;
|
|
1047
1050
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
1048
1051
|
throw new Error(
|
|
1049
1052
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1050
1053
|
);
|
|
1051
|
-
const r =
|
|
1054
|
+
const r = vt(s), i = Lt(), a = _t(), u = r.defaultQueryOptions(t);
|
|
1052
1055
|
(p = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || p.call(
|
|
1053
1056
|
c,
|
|
1054
|
-
|
|
1055
|
-
),
|
|
1056
|
-
const
|
|
1057
|
+
u
|
|
1058
|
+
), u._optimisticResults = i ? "isRestoring" : "optimistic", zt(u), Kt(u, a), Bt(a);
|
|
1059
|
+
const o = !r.getQueryCache().get(u.queryHash), [l] = j.useState(
|
|
1057
1060
|
() => new e(
|
|
1058
1061
|
r,
|
|
1059
|
-
|
|
1062
|
+
u
|
|
1060
1063
|
)
|
|
1061
|
-
), f = l.getOptimisticResult(
|
|
1064
|
+
), f = l.getOptimisticResult(u), m = !i && t.subscribed !== !1;
|
|
1062
1065
|
if (j.useSyncExternalStore(
|
|
1063
1066
|
j.useCallback(
|
|
1064
1067
|
(v) => {
|
|
1065
|
-
const
|
|
1066
|
-
return l.updateResult(),
|
|
1068
|
+
const E = m ? l.subscribe(Me.batchCalls(v)) : Ye;
|
|
1069
|
+
return l.updateResult(), E;
|
|
1067
1070
|
},
|
|
1068
1071
|
[l, m]
|
|
1069
1072
|
),
|
|
1070
1073
|
() => l.getCurrentResult(),
|
|
1071
1074
|
() => l.getCurrentResult()
|
|
1072
1075
|
), j.useEffect(() => {
|
|
1073
|
-
l.setOptions(
|
|
1074
|
-
}, [
|
|
1075
|
-
throw Xe(
|
|
1076
|
-
if (
|
|
1076
|
+
l.setOptions(u, { listeners: !1 });
|
|
1077
|
+
}, [u, l]), Vt(u, f))
|
|
1078
|
+
throw Xe(u, l, a);
|
|
1079
|
+
if ($t({
|
|
1077
1080
|
result: f,
|
|
1078
1081
|
errorResetBoundary: a,
|
|
1079
|
-
throwOnError:
|
|
1080
|
-
query: r.getQueryCache().get(
|
|
1081
|
-
suspense:
|
|
1082
|
+
throwOnError: u.throwOnError,
|
|
1083
|
+
query: r.getQueryCache().get(u.queryHash),
|
|
1084
|
+
suspense: u.suspense
|
|
1082
1085
|
}))
|
|
1083
1086
|
throw f.error;
|
|
1084
|
-
if ((
|
|
1087
|
+
if ((C = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || C.call(
|
|
1085
1088
|
y,
|
|
1086
|
-
|
|
1089
|
+
u,
|
|
1087
1090
|
f
|
|
1088
|
-
),
|
|
1089
|
-
const v =
|
|
1091
|
+
), u.experimental_prefetchInRender && !V && Jt(f, i)) {
|
|
1092
|
+
const v = o ? (
|
|
1090
1093
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1091
|
-
Xe(
|
|
1094
|
+
Xe(u, l, a)
|
|
1092
1095
|
) : (
|
|
1093
1096
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1094
|
-
(h = r.getQueryCache().get(
|
|
1097
|
+
(h = r.getQueryCache().get(u.queryHash)) == null ? void 0 : h.promise
|
|
1095
1098
|
);
|
|
1096
1099
|
v == null || v.catch(Ye).finally(() => {
|
|
1097
1100
|
l.updateResult();
|
|
1098
1101
|
});
|
|
1099
1102
|
}
|
|
1100
|
-
return
|
|
1103
|
+
return u.notifyOnChangeProps ? f : l.trackResult(f);
|
|
1101
1104
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1105
|
+
function Zt(t, e) {
|
|
1106
|
+
return mt(t, ft, e);
|
|
1104
1107
|
}
|
|
1105
|
-
function
|
|
1106
|
-
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"),
|
|
1108
|
+
function Wt(t, e) {
|
|
1109
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), mt(
|
|
1107
1110
|
{
|
|
1108
1111
|
...t,
|
|
1109
1112
|
enabled: !0,
|
|
1110
1113
|
suspense: !0,
|
|
1111
|
-
throwOnError:
|
|
1114
|
+
throwOnError: Gt,
|
|
1112
1115
|
placeholderData: void 0
|
|
1113
1116
|
},
|
|
1114
|
-
|
|
1117
|
+
ft,
|
|
1115
1118
|
e
|
|
1116
1119
|
);
|
|
1117
1120
|
}
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1121
|
+
const Yt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, Xt = (t) => t.filter(
|
|
1122
|
+
(e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
|
|
1123
|
+
).map((e) => `${e}`).filter((e) => e), es = (t) => {
|
|
1124
|
+
const e = t.join("/"), [, s = "", r = ""] = e.match(Yt) ?? [];
|
|
1125
|
+
return {
|
|
1126
|
+
prefix: s,
|
|
1127
|
+
pathname: r.split("/").filter((i) => i !== "")
|
|
1128
|
+
};
|
|
1129
|
+
}, ts = (t) => {
|
|
1130
|
+
const { prefix: e, pathname: s } = t;
|
|
1131
|
+
let r = e;
|
|
1132
|
+
return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
|
|
1133
|
+
}, et = (...t) => {
|
|
1134
|
+
const e = Xt(t), s = es(e);
|
|
1135
|
+
return ts(s);
|
|
1136
|
+
}, gt = Object.freeze({
|
|
1122
1137
|
API_IDENTITIES: ["api-identities"]
|
|
1123
|
-
}),
|
|
1124
|
-
const t =
|
|
1138
|
+
}), Os = () => {
|
|
1139
|
+
const t = vt();
|
|
1125
1140
|
return {
|
|
1126
1141
|
invalidateCache: async (e) => {
|
|
1127
|
-
await t.invalidateQueries({ queryKey:
|
|
1142
|
+
await t.invalidateQueries({ queryKey: gt[e] });
|
|
1128
1143
|
}
|
|
1129
1144
|
};
|
|
1145
|
+
}, ss = "no-dehydrate", ce = (...t) => {
|
|
1146
|
+
const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
1147
|
+
return e ? `/${e}` : "/";
|
|
1130
1148
|
}, _e = (t, e) => {
|
|
1131
1149
|
for (const s of t) {
|
|
1132
1150
|
const r = He(s, e);
|
|
@@ -1143,58 +1161,63 @@ const Z = (...t) => {
|
|
|
1143
1161
|
]);
|
|
1144
1162
|
if (a !== void 0) return a;
|
|
1145
1163
|
}
|
|
1146
|
-
},
|
|
1147
|
-
const t = ve(), s =
|
|
1164
|
+
}, Is = () => {
|
|
1165
|
+
const t = ve(), s = St().sidebar;
|
|
1148
1166
|
return _e(s, (r) => {
|
|
1149
|
-
if (r.type === "doc" &&
|
|
1167
|
+
if (r.type === "doc" && ce(r.id) === t.pathname)
|
|
1150
1168
|
return r;
|
|
1151
1169
|
});
|
|
1152
|
-
},
|
|
1170
|
+
}, Fs = (t) => {
|
|
1153
1171
|
const e = ve();
|
|
1154
1172
|
return He(t, (s) => {
|
|
1155
|
-
if (s.type === "category" && s.link &&
|
|
1173
|
+
if (s.type === "category" && s.link && ce(s.link.id) === e.pathname || s.type === "doc" && ce(s.id) === e.pathname)
|
|
1156
1174
|
return !0;
|
|
1157
1175
|
});
|
|
1158
|
-
},
|
|
1159
|
-
const t = ve().pathname, s =
|
|
1176
|
+
}, Ps = () => {
|
|
1177
|
+
const t = ve().pathname, s = St().sidebar;
|
|
1160
1178
|
let r, i, a = !1;
|
|
1161
|
-
return _e(s, (
|
|
1162
|
-
const
|
|
1163
|
-
if (
|
|
1179
|
+
return _e(s, (u) => {
|
|
1180
|
+
const o = u.type === "doc" ? ce(u.id) : u.type === "category" && u.link ? ce(u.link.id) : void 0;
|
|
1181
|
+
if (o) {
|
|
1164
1182
|
if (a)
|
|
1165
|
-
return i = { label:
|
|
1166
|
-
t ===
|
|
1183
|
+
return i = { label: u.label, id: o }, !0;
|
|
1184
|
+
t === o ? a = !0 : r = { label: u.label, id: o };
|
|
1167
1185
|
}
|
|
1168
1186
|
}), { prev: r, next: i };
|
|
1169
|
-
},
|
|
1187
|
+
}, rs = Et(
|
|
1170
1188
|
void 0
|
|
1171
1189
|
), Ke = () => {
|
|
1172
|
-
const t =
|
|
1190
|
+
const t = Ct(rs);
|
|
1173
1191
|
if (!t)
|
|
1174
1192
|
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1175
1193
|
return t;
|
|
1176
|
-
},
|
|
1194
|
+
}, Ts = () => {
|
|
1177
1195
|
const { getApiIdentities: t } = Ke();
|
|
1178
|
-
return
|
|
1196
|
+
return Zt({
|
|
1179
1197
|
queryFn: t,
|
|
1180
|
-
queryKey:
|
|
1198
|
+
queryKey: gt.API_IDENTITIES
|
|
1181
1199
|
});
|
|
1182
|
-
},
|
|
1200
|
+
}, St = () => {
|
|
1183
1201
|
var c;
|
|
1184
|
-
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a =
|
|
1202
|
+
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = ds(), u = (c = r.protectedRoutes) == null ? void 0 : c.some(
|
|
1185
1203
|
(p) => ze(p, i.pathname)
|
|
1186
|
-
)
|
|
1187
|
-
|
|
1204
|
+
);
|
|
1205
|
+
let o = Object.entries(e).find(([, p]) => _e(p, (y) => {
|
|
1206
|
+
if ((y.type === "doc" ? et(y.id) : y.type === "category" && y.link ? et(y.link.id) : void 0) === i.pathname)
|
|
1188
1207
|
return y;
|
|
1189
|
-
}))
|
|
1208
|
+
}));
|
|
1209
|
+
const l = s.find((p) => p.id === (o == null ? void 0 : o[0])) ?? s.find((p) => ze(p.id, i.pathname));
|
|
1210
|
+
l && !o && l.id in e && (o = ["", e[l.id]]);
|
|
1211
|
+
const { data: f } = Wt({
|
|
1190
1212
|
queryFn: () => t(i.pathname),
|
|
1191
|
-
|
|
1213
|
+
// We just want to suspend here and don't store in SSR dehydrated state
|
|
1214
|
+
queryKey: ["plugin-sidebar", ss, i.pathname]
|
|
1192
1215
|
});
|
|
1193
1216
|
return {
|
|
1194
|
-
sidebar: a.isAuthEnabled && !a.isAuthenticated &&
|
|
1217
|
+
sidebar: a.isAuthEnabled && !a.isAuthenticated && u ? [] : [...o ? o[1] : [], ...f],
|
|
1195
1218
|
topNavItem: l
|
|
1196
1219
|
};
|
|
1197
|
-
},
|
|
1220
|
+
}, tt = (t) => {
|
|
1198
1221
|
let e;
|
|
1199
1222
|
const s = /* @__PURE__ */ new Set(), r = (f, m) => {
|
|
1200
1223
|
const c = typeof f == "function" ? f(e) : f;
|
|
@@ -1202,21 +1225,21 @@ const Z = (...t) => {
|
|
|
1202
1225
|
const p = e;
|
|
1203
1226
|
e = m ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((y) => y(e, p));
|
|
1204
1227
|
}
|
|
1205
|
-
}, i = () => e,
|
|
1206
|
-
return
|
|
1207
|
-
},
|
|
1208
|
-
function
|
|
1209
|
-
const s =
|
|
1228
|
+
}, i = () => e, o = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, o);
|
|
1229
|
+
return o;
|
|
1230
|
+
}, ns = (t) => t ? tt(t) : tt, is = (t) => t;
|
|
1231
|
+
function as(t, e = is) {
|
|
1232
|
+
const s = Ge.useSyncExternalStore(
|
|
1210
1233
|
t.subscribe,
|
|
1211
1234
|
() => e(t.getState()),
|
|
1212
1235
|
() => e(t.getInitialState())
|
|
1213
1236
|
);
|
|
1214
|
-
return
|
|
1237
|
+
return Ge.useDebugValue(s), s;
|
|
1215
1238
|
}
|
|
1216
|
-
const
|
|
1217
|
-
const e =
|
|
1239
|
+
const os = (t) => {
|
|
1240
|
+
const e = ns(t), s = (r) => as(e, r);
|
|
1218
1241
|
return Object.assign(s, e), s;
|
|
1219
|
-
},
|
|
1242
|
+
}, us = (t) => os;
|
|
1220
1243
|
function wt(t, e) {
|
|
1221
1244
|
let s;
|
|
1222
1245
|
try {
|
|
@@ -1227,8 +1250,8 @@ function wt(t, e) {
|
|
|
1227
1250
|
return {
|
|
1228
1251
|
getItem: (i) => {
|
|
1229
1252
|
var a;
|
|
1230
|
-
const
|
|
1231
|
-
return
|
|
1253
|
+
const u = (l) => l === null ? null : JSON.parse(l, void 0), o = (a = s.getItem(i)) != null ? a : null;
|
|
1254
|
+
return o instanceof Promise ? o.then(u) : u(o);
|
|
1232
1255
|
},
|
|
1233
1256
|
setItem: (i, a) => s.setItem(
|
|
1234
1257
|
i,
|
|
@@ -1237,12 +1260,12 @@ function wt(t, e) {
|
|
|
1237
1260
|
removeItem: (i) => s.removeItem(i)
|
|
1238
1261
|
};
|
|
1239
1262
|
}
|
|
1240
|
-
const
|
|
1263
|
+
const Qe = (t) => (e) => {
|
|
1241
1264
|
try {
|
|
1242
1265
|
const s = t(e);
|
|
1243
1266
|
return s instanceof Promise ? s : {
|
|
1244
1267
|
then(r) {
|
|
1245
|
-
return
|
|
1268
|
+
return Qe(r)(s);
|
|
1246
1269
|
},
|
|
1247
1270
|
catch(r) {
|
|
1248
1271
|
return this;
|
|
@@ -1254,11 +1277,11 @@ const Ue = (t) => (e) => {
|
|
|
1254
1277
|
return this;
|
|
1255
1278
|
},
|
|
1256
1279
|
catch(r) {
|
|
1257
|
-
return
|
|
1280
|
+
return Qe(r)(s);
|
|
1258
1281
|
}
|
|
1259
1282
|
};
|
|
1260
1283
|
}
|
|
1261
|
-
},
|
|
1284
|
+
}, cs = (t, e) => (s, r, i) => {
|
|
1262
1285
|
let a = {
|
|
1263
1286
|
storage: wt(() => localStorage),
|
|
1264
1287
|
partialize: (h) => h,
|
|
@@ -1268,8 +1291,8 @@ const Ue = (t) => (e) => {
|
|
|
1268
1291
|
...h
|
|
1269
1292
|
}),
|
|
1270
1293
|
...e
|
|
1271
|
-
},
|
|
1272
|
-
const
|
|
1294
|
+
}, u = !1;
|
|
1295
|
+
const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
1273
1296
|
let f = a.storage;
|
|
1274
1297
|
if (!f)
|
|
1275
1298
|
return t(
|
|
@@ -1300,15 +1323,15 @@ const Ue = (t) => (e) => {
|
|
|
1300
1323
|
);
|
|
1301
1324
|
i.getInitialState = () => p;
|
|
1302
1325
|
let y;
|
|
1303
|
-
const
|
|
1326
|
+
const C = () => {
|
|
1304
1327
|
var h, v;
|
|
1305
1328
|
if (!f) return;
|
|
1306
|
-
|
|
1329
|
+
u = !1, o.forEach((R) => {
|
|
1307
1330
|
var O;
|
|
1308
1331
|
return R((O = r()) != null ? O : p);
|
|
1309
1332
|
});
|
|
1310
|
-
const
|
|
1311
|
-
return
|
|
1333
|
+
const E = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
|
|
1334
|
+
return Qe(f.getItem.bind(f))(a.name).then((R) => {
|
|
1312
1335
|
if (R)
|
|
1313
1336
|
if (typeof R.version == "number" && R.version !== a.version) {
|
|
1314
1337
|
if (a.migrate) {
|
|
@@ -1326,16 +1349,16 @@ const Ue = (t) => (e) => {
|
|
|
1326
1349
|
return [!1, void 0];
|
|
1327
1350
|
}).then((R) => {
|
|
1328
1351
|
var O;
|
|
1329
|
-
const [q,
|
|
1352
|
+
const [q, Z] = R;
|
|
1330
1353
|
if (y = a.merge(
|
|
1331
|
-
|
|
1354
|
+
Z,
|
|
1332
1355
|
(O = r()) != null ? O : p
|
|
1333
1356
|
), s(y, !0), q)
|
|
1334
1357
|
return m();
|
|
1335
1358
|
}).then(() => {
|
|
1336
|
-
|
|
1359
|
+
E == null || E(y, void 0), y = r(), u = !0, l.forEach((R) => R(y));
|
|
1337
1360
|
}).catch((R) => {
|
|
1338
|
-
|
|
1361
|
+
E == null || E(void 0, R);
|
|
1339
1362
|
});
|
|
1340
1363
|
};
|
|
1341
1364
|
return i.persist = {
|
|
@@ -1349,24 +1372,24 @@ const Ue = (t) => (e) => {
|
|
|
1349
1372
|
f == null || f.removeItem(a.name);
|
|
1350
1373
|
},
|
|
1351
1374
|
getOptions: () => a,
|
|
1352
|
-
rehydrate: () =>
|
|
1353
|
-
hasHydrated: () =>
|
|
1354
|
-
onHydrate: (h) => (
|
|
1355
|
-
|
|
1375
|
+
rehydrate: () => C(),
|
|
1376
|
+
hasHydrated: () => u,
|
|
1377
|
+
onHydrate: (h) => (o.add(h), () => {
|
|
1378
|
+
o.delete(h);
|
|
1356
1379
|
}),
|
|
1357
1380
|
onFinishHydration: (h) => (l.add(h), () => {
|
|
1358
1381
|
l.delete(h);
|
|
1359
1382
|
})
|
|
1360
|
-
}, a.skipHydration ||
|
|
1361
|
-
},
|
|
1383
|
+
}, a.skipHydration || C(), y || p;
|
|
1384
|
+
}, hs = cs, ls = (t) => {
|
|
1362
1385
|
const e = (s) => {
|
|
1363
1386
|
s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
|
|
1364
1387
|
};
|
|
1365
1388
|
return window.addEventListener("storage", e), () => {
|
|
1366
1389
|
window.removeEventListener("storage", e);
|
|
1367
1390
|
};
|
|
1368
|
-
},
|
|
1369
|
-
|
|
1391
|
+
}, Rt = us()(
|
|
1392
|
+
hs(
|
|
1370
1393
|
(t) => ({
|
|
1371
1394
|
isAuthenticated: !1,
|
|
1372
1395
|
isPending: !0,
|
|
@@ -1384,81 +1407,77 @@ const Ue = (t) => (e) => {
|
|
|
1384
1407
|
}
|
|
1385
1408
|
)
|
|
1386
1409
|
);
|
|
1387
|
-
typeof window < "u" &&
|
|
1388
|
-
const
|
|
1389
|
-
Rt(
|
|
1390
|
-
(t) => ({
|
|
1391
|
-
selectedServer: void 0,
|
|
1392
|
-
setSelectedServer: (e) => t({ selectedServer: e })
|
|
1393
|
-
}),
|
|
1394
|
-
{ name: "zudoku-selected-server" }
|
|
1395
|
-
)
|
|
1396
|
-
), Os = (t) => {
|
|
1397
|
-
const { selectedServer: e, setSelectedServer: s } = os();
|
|
1398
|
-
return { selectedServer: It(
|
|
1399
|
-
() => {
|
|
1400
|
-
var i;
|
|
1401
|
-
return e && t.some((a) => a.url === e) ? e : ((i = t.at(0)) == null ? void 0 : i.url) ?? "";
|
|
1402
|
-
},
|
|
1403
|
-
[e, t]
|
|
1404
|
-
), setSelectedServer: s };
|
|
1405
|
-
}, us = () => {
|
|
1406
|
-
const { authentication: t } = Ke(), e = Ct(), s = typeof t < "u";
|
|
1410
|
+
typeof window < "u" && ls(Rt);
|
|
1411
|
+
const ds = () => {
|
|
1412
|
+
const { authentication: t } = Ke(), e = Rt(), s = typeof t < "u";
|
|
1407
1413
|
return {
|
|
1408
1414
|
isAuthEnabled: s,
|
|
1409
1415
|
...e,
|
|
1410
1416
|
login: async () => {
|
|
1411
1417
|
if (!s)
|
|
1412
1418
|
throw new Error("Authentication is not enabled.");
|
|
1413
|
-
await t.signIn(
|
|
1419
|
+
await t.signIn({
|
|
1420
|
+
redirectTo: window.location.href
|
|
1421
|
+
});
|
|
1414
1422
|
},
|
|
1415
1423
|
logout: async () => {
|
|
1416
1424
|
if (!s)
|
|
1417
1425
|
throw new Error("Authentication is not enabled.");
|
|
1418
1426
|
await t.signOut(), window.location.href = "/";
|
|
1427
|
+
},
|
|
1428
|
+
signup: async () => {
|
|
1429
|
+
if (!s)
|
|
1430
|
+
throw new Error("Authentication is not enabled.");
|
|
1431
|
+
await t.signUp({
|
|
1432
|
+
redirectTo: window.location.href
|
|
1433
|
+
});
|
|
1419
1434
|
}
|
|
1420
1435
|
};
|
|
1421
1436
|
};
|
|
1422
1437
|
export {
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1438
|
+
Rs as A,
|
|
1439
|
+
ws as B,
|
|
1440
|
+
ut as C,
|
|
1441
|
+
ct as D,
|
|
1442
|
+
ye as E,
|
|
1443
|
+
bs as F,
|
|
1444
|
+
Le as G,
|
|
1445
|
+
pe as H,
|
|
1446
|
+
Cs as I,
|
|
1447
|
+
St as J,
|
|
1448
|
+
_e as K,
|
|
1449
|
+
Os as L,
|
|
1450
|
+
gt as M,
|
|
1451
|
+
Fs as N,
|
|
1452
|
+
Es as Q,
|
|
1453
|
+
kt as R,
|
|
1435
1454
|
qe as S,
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1455
|
+
rs as Z,
|
|
1456
|
+
Is as a,
|
|
1457
|
+
Ps as b,
|
|
1458
|
+
At as c,
|
|
1459
|
+
Wt as d,
|
|
1460
|
+
Ke as e,
|
|
1461
|
+
et as f,
|
|
1462
|
+
vt as g,
|
|
1444
1463
|
Re as h,
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1464
|
+
Ye as i,
|
|
1465
|
+
ce as j,
|
|
1466
|
+
Ht as k,
|
|
1467
|
+
ds as l,
|
|
1468
|
+
Zt as m,
|
|
1450
1469
|
Me as n,
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1470
|
+
Ss as o,
|
|
1471
|
+
us as p,
|
|
1472
|
+
hs as q,
|
|
1473
|
+
wt as r,
|
|
1474
|
+
Ce as s,
|
|
1475
|
+
Ts as t,
|
|
1476
|
+
Rt as u,
|
|
1477
|
+
It as v,
|
|
1478
|
+
ms as w,
|
|
1479
|
+
gs as x,
|
|
1480
|
+
Se as y,
|
|
1481
|
+
Pt as z
|
|
1463
1482
|
};
|
|
1464
|
-
//# sourceMappingURL=hook-
|
|
1483
|
+
//# sourceMappingURL=hook-CqpVYDqN.js.map
|