zudoku 0.0.0-f01b653 → 0.0.0-f06d326
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/cli.js +3 -0
- package/dist/app/demo.js +0 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +5 -0
- package/dist/app/entry.client.js +1 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +5 -4
- package/dist/app/entry.server.js +11 -7
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +21 -9
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +0 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/app/tailwind.js +20 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/dev.js +12 -1
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/ports.d.ts +1 -1
- package/dist/cli/common/utils/ports.js +16 -15
- package/dist/cli/common/utils/ports.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +14 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/dev/pagefind-command.d.ts +3 -0
- package/dist/cli/dev/pagefind-command.js +59 -0
- package/dist/cli/dev/pagefind-command.js.map +1 -0
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +35 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -3
- package/dist/config/config.d.ts +16 -15
- package/dist/config/loader.d.ts +6 -6
- package/dist/config/loader.js +20 -25
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +32 -17
- package/dist/config/validators/InputSidebarSchema.js +11 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +2472 -534
- package/dist/config/validators/common.js +106 -18
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +979 -254
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +2 -0
- package/dist/lib/MissingIcon.js +7 -0
- package/dist/lib/MissingIcon.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- 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/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +2 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +54 -12
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +12 -3
- package/dist/lib/authentication/providers/openid.js +37 -17
- 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 -17
- package/dist/lib/authentication/state.js +9 -7
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +9 -5
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +13 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Header.js +15 -15
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- 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 +7 -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/Markdown.d.ts +2 -2
- package/dist/lib/components/Markdown.js +3 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.d.ts +10 -0
- package/dist/lib/components/Pagination.js +10 -0
- package/dist/lib/components/Pagination.js.map +1 -0
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +28 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +8 -5
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +2 -2
- package/dist/lib/components/TopNavigation.js +29 -15
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +12 -8
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +13 -0
- package/dist/lib/components/cache.js +20 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +21 -14
- 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 +21 -8
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +32 -13
- package/dist/lib/components/index.js +16 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +8 -5
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
- package/dist/lib/components/navigation/SidebarBadge.js +13 -11
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +25 -19
- 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 -10
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +8 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -2
- 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/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +46 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +32 -7
- package/dist/lib/core/ZudokuContext.js +37 -12
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +17 -7
- package/dist/lib/core/plugins.js +3 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +6 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/icons.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +38 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +25 -1
- package/dist/lib/oas/graphql/index.js +209 -65
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +8 -3
- 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/oas/parser/upgrade/index.js +19 -4
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -5
- package/dist/lib/plugins/api-catalog/Catalog.js +23 -26
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +9 -1
- package/dist/lib/plugins/api-catalog/index.js +37 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +1 -0
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js +18 -7
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +8 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
- package/dist/lib/plugins/openapi/OasProvider.js +29 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +5 -2
- package/dist/lib/plugins/openapi/OperationList.js +85 -51
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
- 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/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +8 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +12 -3
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +7 -13
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.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 +53 -36
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js +68 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
- 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 +2 -2
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +23 -94
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
- package/dist/lib/plugins/openapi/client/createServer.js +5 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -7
- 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/context.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +11 -3
- package/dist/lib/plugins/openapi/graphql/gql.js +5 -14
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +112 -22
- package/dist/lib/plugins/openapi/graphql/graphql.js +54 -11
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +10 -6
- package/dist/lib/plugins/openapi/index.js +63 -82
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +56 -3
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +8 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
- 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/ParamsGrid.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +37 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +131 -69
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
- 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/SubmitButton.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.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/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +101 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +17 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +39 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +14 -7
- 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 +2 -0
- 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.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +23 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +80 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/search-inkeep/index.js +21 -7
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +75 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +38 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +2 -1
- package/dist/lib/ui/Badge.js.map +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/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/Checkbox.js +1 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +16 -2
- package/dist/lib/ui/Command.js +7 -3
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Select.js +3 -3
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +3 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +15 -0
- package/dist/lib/ui/SyntaxHighlight.js +62 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +5 -2
- package/dist/lib/util/MdxComponents.js +8 -5
- 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/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +3 -2
- package/dist/lib/util/traverse.js +9 -5
- 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/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.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.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +41 -36
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +6 -4
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +12 -0
- package/dist/vite/api/schema-codegen.js +81 -0
- package/dist/vite/api/schema-codegen.js.map +1 -0
- package/dist/vite/api/schema-codegen.test.d.ts +1 -0
- package/dist/vite/api/schema-codegen.test.js +313 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -0
- package/dist/vite/build.js +46 -25
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +63 -64
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +5 -1
- package/dist/vite/config.test.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/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +5 -2
- package/dist/vite/dev-server.js +49 -12
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +1 -1
- package/dist/vite/error-handler.js +1 -1
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/output.d.ts +14 -2
- package/dist/vite/output.js +12 -14
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +5 -5
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +179 -59
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +7 -4
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +7 -3
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -5
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +9 -5
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +3 -3
- package/dist/vite/plugin-docs.js +23 -6
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +34 -18
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +5 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +13 -4
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js +57 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +8 -9
- package/dist/vite/prerender/FileWritingResponse.js +51 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +14 -0
- package/dist/vite/prerender/prerender.js +90 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +13 -0
- package/dist/vite/prerender/worker.js +31 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -1
- package/dist/zuplo/with-zuplo.js +7 -26
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AuthenticationPlugin-foqdvvkf.js +58 -0
- package/lib/AuthenticationPlugin-foqdvvkf.js.map +1 -0
- package/lib/{Button-DeAoTouo.js → Button-Fp19CMUr.js} +14 -13
- package/lib/Button-Fp19CMUr.js.map +1 -0
- package/lib/Callout-D5frCCJ0.js +229 -0
- package/lib/Callout-D5frCCJ0.js.map +1 -0
- package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-DpB47wvk.js} +2 -2
- package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/Dialog-Dv6WG8RN.js +98 -0
- package/lib/{Dialog-Bxv1yEIg.js.map → Dialog-Dv6WG8RN.js.map} +1 -1
- package/lib/Drawer-kDAfOq_2.js +1133 -0
- package/lib/Drawer-kDAfOq_2.js.map +1 -0
- package/lib/{Markdown-CZDLNOFc.js → Markdown-D-vLL3rw.js} +8177 -6419
- package/lib/Markdown-D-vLL3rw.js.map +1 -0
- package/lib/MdxPage-BY6tJN4Q.js +83 -0
- package/lib/MdxPage-BY6tJN4Q.js.map +1 -0
- package/lib/OasProvider-5ej8C_s6.js +34 -0
- package/lib/OasProvider-5ej8C_s6.js.map +1 -0
- package/lib/OperationList-CHuBrSD5.js +5060 -0
- package/lib/OperationList-CHuBrSD5.js.map +1 -0
- package/lib/Pagination-DALsKi79.js +46 -0
- package/lib/Pagination-DALsKi79.js.map +1 -0
- package/lib/SchemaList-BH1kPaT4.js +148 -0
- package/lib/SchemaList-BH1kPaT4.js.map +1 -0
- package/lib/SchemaView-6_qdGR_9.js +356 -0
- package/lib/SchemaView-6_qdGR_9.js.map +1 -0
- package/lib/{Select-Bb_Hqc70.js → Select-DVFRKf1R.js} +52 -52
- package/lib/Select-DVFRKf1R.js.map +1 -0
- package/lib/SlotletProvider-BPQNhW3Y.js +338 -0
- package/lib/SlotletProvider-BPQNhW3Y.js.map +1 -0
- package/lib/{Spinner-DuxJLLNE.js → Spinner-CE68iCm0.js} +2 -2
- package/lib/{Spinner-DuxJLLNE.js.map → Spinner-CE68iCm0.js.map} +1 -1
- package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-BEoSoPEo.js} +551 -640
- package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
- package/lib/Toc-COKWpWOX.js +92 -0
- package/lib/Toc-COKWpWOX.js.map +1 -0
- package/lib/chunk-HA7DTUK3-C4gP41vD.js +1821 -0
- package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
- package/lib/circular-ByJI6Mci.js +15877 -0
- package/lib/circular-ByJI6Mci.js.map +1 -0
- package/lib/cn-qaFjX9_3.js.map +1 -1
- package/lib/{context-h_UkBLvr.js → context-DLCwaMXN.js} +2 -2
- package/lib/context-DLCwaMXN.js.map +1 -0
- package/lib/createServer-mMau3eV_.js +12428 -0
- package/lib/createServer-mMau3eV_.js.map +1 -0
- package/lib/hook-CqpVYDqN.js +1483 -0
- package/lib/hook-CqpVYDqN.js.map +1 -0
- package/lib/index-CFrxHpoy.js +2514 -0
- package/lib/index-CFrxHpoy.js.map +1 -0
- package/lib/index-DGMVODgw.js +2226 -0
- package/lib/index-DGMVODgw.js.map +1 -0
- package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
- package/lib/index-Dl3Yl0yb.js.map +1 -0
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/index-gQD2h1wX.js +447 -0
- package/lib/index-gQD2h1wX.js.map +1 -0
- package/lib/index.esm--gIChbWs.js +1207 -0
- package/lib/index.esm--gIChbWs.js.map +1 -0
- package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-CYK1ROHF.js} +95 -95
- package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{hook-DMHiUaIV.js → mutation-8LjrN7uz.js} +39 -58
- package/lib/mutation-8LjrN7uz.js.map +1 -0
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/post-processors/traverse.js +11 -8
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
- package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
- package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
- package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
- package/lib/{prism-java.min-BtgBR4yd.js.map → 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-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
- package/lib/{prism-markdown.min-F3U-vPBi.js.map → 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-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
- package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +3 -3
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -2
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +4 -4
- 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/Card.js +8 -8
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +3 -3
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +14 -13
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +114 -511
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +14 -1150
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Pagination.js +4 -4
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +4 -4
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +11 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-B9qXJedG.js} +2 -2
- package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +19 -20
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +101 -55
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +349 -378
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +31 -1395
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +10 -0
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +107 -109
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +108 -106
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +23 -44
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +34 -26
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +238 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js +14 -0
- package/lib/zudoku.plugins.js.map +1 -0
- package/package.json +102 -79
- package/src/app/demo-cdn.html +31 -31
- package/src/app/demo.tsx +0 -1
- package/src/app/entry.client.tsx +8 -0
- package/src/app/entry.server.tsx +18 -11
- package/src/app/main.css +94 -39
- package/src/app/main.tsx +34 -9
- package/src/app/standalone.tsx +0 -1
- package/src/app/tailwind.ts +20 -0
- package/src/lib/MissingIcon.tsx +22 -0
- package/src/lib/authentication/authentication.ts +2 -0
- package/src/lib/authentication/components/SignOut.tsx +2 -1
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/auth0.tsx +4 -6
- package/src/lib/authentication/providers/clerk.tsx +70 -15
- package/src/lib/authentication/providers/openid.tsx +55 -25
- package/src/lib/authentication/providers/supabase.tsx +157 -0
- package/src/lib/authentication/state.ts +9 -19
- package/src/lib/components/AnchorLink.tsx +13 -8
- package/src/lib/components/Autocomplete.tsx +113 -0
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Header.tsx +22 -14
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +20 -67
- package/src/lib/components/Main.tsx +49 -0
- package/src/lib/components/Markdown.tsx +14 -15
- package/src/lib/components/MobileTopNavigation.tsx +1 -1
- package/src/lib/components/Pagination.tsx +47 -0
- package/src/lib/components/PathRenderer.tsx +61 -0
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/ThemeSwitch.tsx +29 -9
- package/src/lib/components/TopNavigation.tsx +52 -25
- package/src/lib/components/Zudoku.tsx +18 -7
- package/src/lib/components/cache.ts +23 -0
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +26 -21
- package/src/lib/components/context/ZudokuContext.ts +31 -9
- package/src/lib/components/index.ts +21 -4
- package/src/lib/components/navigation/Sidebar.tsx +14 -10
- package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
- package/src/lib/components/navigation/SidebarCategory.tsx +54 -52
- package/src/lib/components/navigation/SidebarItem.tsx +22 -28
- package/src/lib/components/navigation/SidebarWrapper.tsx +13 -14
- package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
- package/src/lib/core/RouteGuard.tsx +74 -0
- package/src/lib/core/ZudokuContext.ts +66 -20
- package/src/lib/core/plugins.ts +29 -7
- package/src/lib/errors/ErrorAlert.tsx +24 -17
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/icons.ts +1 -0
- package/src/lib/oas/graphql/circular.ts +50 -0
- package/src/lib/oas/graphql/index.ts +291 -100
- package/src/lib/oas/parser/dereference/index.ts +10 -4
- package/src/lib/oas/parser/index.ts +7 -29
- package/src/lib/oas/parser/upgrade/index.ts +21 -5
- package/src/lib/plugins/api-catalog/Catalog.tsx +62 -110
- package/src/lib/plugins/api-catalog/index.tsx +69 -9
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -3
- package/src/lib/plugins/api-keys/index.tsx +3 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +14 -39
- package/src/lib/plugins/markdown/resolver.ts +0 -33
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
- package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
- package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
- package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
- package/src/lib/plugins/openapi/OperationList.tsx +207 -89
- package/src/lib/plugins/openapi/OperationListItem.tsx +131 -88
- package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +33 -24
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +21 -2
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +46 -63
- package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -64
- package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
- package/src/lib/plugins/openapi/SidecarExamples.tsx +162 -0
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +29 -121
- package/src/lib/plugins/openapi/client/createServer.ts +6 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -8
- 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/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +36 -11
- package/src/lib/plugins/openapi/graphql/graphql.ts +170 -37
- package/src/lib/plugins/openapi/index.tsx +99 -98
- package/src/lib/plugins/openapi/interfaces.ts +57 -3
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +52 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
- 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/ParamsGrid.tsx +13 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -65
- package/src/lib/plugins/openapi/playground/Playground.tsx +384 -244
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +86 -88
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +230 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +123 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +52 -29
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +52 -36
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +37 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
- package/src/lib/plugins/openapi/util/getRoutes.tsx +126 -0
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/search-inkeep/index.tsx +27 -8
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +157 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +116 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Badge.tsx +2 -1
- package/src/lib/ui/Button.tsx +4 -2
- package/src/lib/ui/Callout.tsx +28 -10
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +2 -1
- package/src/lib/ui/Command.tsx +45 -3
- package/src/lib/ui/Input.tsx +1 -2
- package/src/lib/ui/Select.tsx +2 -2
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/ui/SyntaxHighlight.tsx +186 -0
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +9 -5
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/traverse.ts +15 -9
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +47 -38
- package/src/lib/util/useScrollToTop.ts +8 -3
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
- package/dist/lib/components/SyntaxHighlight.js +0 -53
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/dist/lib/plugins/openapi/Route.d.ts +0 -6
- package/dist/lib/plugins/openapi/Route.js +0 -6
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
- package/dist/lib/plugins/openapi/client/worker.js +0 -29
- package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/dist/lib/plugins/openapi-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi-worker.js +0 -8
- package/dist/lib/plugins/openapi-worker.js.map +0 -1
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/AnchorLink-DFZZbmvr.js +0 -34
- package/lib/AnchorLink-DFZZbmvr.js.map +0 -1
- package/lib/AuthenticationPlugin-DQy635W9.js +0 -58
- package/lib/AuthenticationPlugin-DQy635W9.js.map +0 -1
- package/lib/Button-DeAoTouo.js.map +0 -1
- package/lib/Dialog-Bxv1yEIg.js +0 -67
- package/lib/Markdown-CZDLNOFc.js.map +0 -1
- package/lib/MdxPage-CBa4X6L5.js +0 -188
- package/lib/MdxPage-CBa4X6L5.js.map +0 -1
- package/lib/OperationList-Bj-6EKhp.js +0 -4889
- package/lib/OperationList-Bj-6EKhp.js.map +0 -1
- package/lib/Route-C9cYcP-j.js +0 -11
- package/lib/Route-C9cYcP-j.js.map +0 -1
- package/lib/Select-Bb_Hqc70.js.map +0 -1
- package/lib/SidebarBadge-Bm793GDY.js +0 -51
- package/lib/SidebarBadge-Bm793GDY.js.map +0 -1
- package/lib/SlotletProvider-pfc9oejW.js +0 -221
- package/lib/SlotletProvider-pfc9oejW.js.map +0 -1
- package/lib/SyntaxHighlight-Bz-lOJtH.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/assets/index-C7jnHK4b.js +0 -4841
- package/lib/assets/index-C7jnHK4b.js.map +0 -1
- package/lib/assets/worker-BmEAZjUP.js +0 -18527
- package/lib/assets/worker-BmEAZjUP.js.map +0 -1
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js +0 -1823
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
- package/lib/context-h_UkBLvr.js.map +0 -1
- package/lib/createServer-BVFp6Bl3.js +0 -15628
- package/lib/createServer-BVFp6Bl3.js.map +0 -1
- package/lib/hook-DMHiUaIV.js.map +0 -1
- package/lib/index-B6rTMjdI.js +0 -1279
- package/lib/index-B6rTMjdI.js.map +0 -1
- package/lib/index-CBXSgjaE.js.map +0 -1
- package/lib/index.esm-BSV1C092.js +0 -692
- package/lib/index.esm-BSV1C092.js.map +0 -1
- package/lib/index.esm-BnnBRKJX.js +0 -1214
- package/lib/index.esm-BnnBRKJX.js.map +0 -1
- package/lib/object_hash-BNWPnMN9.js +0 -787
- package/lib/object_hash-BNWPnMN9.js.map +0 -1
- package/lib/state-CFQsUZUP.js +0 -202
- package/lib/state-CFQsUZUP.js.map +0 -1
- package/lib/utils-R0j3Raw1.js +0 -1217
- package/lib/utils-R0j3Raw1.js.map +0 -1
- package/lib/zudoku.openapi-worker.js +0 -15
- package/lib/zudoku.openapi-worker.js.map +0 -1
- package/src/lib/components/SyntaxHighlight.tsx +0 -157
- package/src/lib/plugins/openapi/Route.tsx +0 -19
- package/src/lib/plugins/openapi/client/worker.ts +0 -44
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
- package/src/lib/plugins/openapi-worker.ts +0 -11
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (t, e, n) =>
|
|
4
|
-
import { j as
|
|
5
|
-
import { g as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return
|
|
1
|
+
var Le = Object.defineProperty;
|
|
2
|
+
var xe = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var b = (t, e, n) => xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { j as B } from "./jsx-runtime-CYK1ROHF.js";
|
|
5
|
+
import { g as Ce } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
6
|
+
import { C as Ie } from "./ClientOnly-E7hGysn1.js";
|
|
7
|
+
import { d as je, f as ie, u as x } from "./hook-CqpVYDqN.js";
|
|
8
|
+
import { A as Je } from "./AuthenticationPlugin-foqdvvkf.js";
|
|
9
|
+
import { N as Oe } from "./chunk-HA7DTUK3-C4gP41vD.js";
|
|
10
|
+
import { Z as ze } from "./invariant-Caa8-XvF.js";
|
|
11
|
+
var D = { exports: {} }, De = D.exports, ae;
|
|
12
|
+
function Ne() {
|
|
13
|
+
return ae || (ae = 1, function(t) {
|
|
14
14
|
(function(e, n) {
|
|
15
15
|
t.exports ? t.exports = n() : e.log = n();
|
|
16
|
-
})(
|
|
16
|
+
})(De, function() {
|
|
17
17
|
var e = function() {
|
|
18
18
|
}, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
|
|
19
19
|
"trace",
|
|
@@ -22,8 +22,8 @@ function He() {
|
|
|
22
22
|
"warn",
|
|
23
23
|
"error"
|
|
24
24
|
], r = {}, i = null;
|
|
25
|
-
function c(l,
|
|
26
|
-
var u = l[
|
|
25
|
+
function c(l, m) {
|
|
26
|
+
var u = l[m];
|
|
27
27
|
if (typeof u.bind == "function")
|
|
28
28
|
return u.bind(l);
|
|
29
29
|
try {
|
|
@@ -37,76 +37,76 @@ function He() {
|
|
|
37
37
|
function p() {
|
|
38
38
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function w(l) {
|
|
41
41
|
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
42
42
|
}
|
|
43
43
|
function f() {
|
|
44
|
-
for (var l = this.getLevel(),
|
|
45
|
-
var u = a[
|
|
46
|
-
this[u] =
|
|
44
|
+
for (var l = this.getLevel(), m = 0; m < a.length; m++) {
|
|
45
|
+
var u = a[m];
|
|
46
|
+
this[u] = m < l ? e : this.methodFactory(u, l, this.name);
|
|
47
47
|
}
|
|
48
48
|
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
49
49
|
return "No console available for logging";
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function v(l) {
|
|
52
52
|
return function() {
|
|
53
53
|
typeof console !== n && (f.call(this), this[l].apply(this, arguments));
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function _(l, m, u) {
|
|
57
|
+
return w(l) || v.apply(this, arguments);
|
|
58
58
|
}
|
|
59
|
-
function h(l,
|
|
60
|
-
var u = this,
|
|
61
|
-
typeof l == "string" ?
|
|
62
|
-
function
|
|
63
|
-
var
|
|
64
|
-
if (!(typeof window === n || !
|
|
59
|
+
function h(l, m) {
|
|
60
|
+
var u = this, J, $, U, S = "loglevel";
|
|
61
|
+
typeof l == "string" ? S += ":" + l : typeof l == "symbol" && (S = void 0);
|
|
62
|
+
function Re(d) {
|
|
63
|
+
var y = (a[d] || "silent").toUpperCase();
|
|
64
|
+
if (!(typeof window === n || !S)) {
|
|
65
65
|
try {
|
|
66
|
-
window.localStorage[
|
|
66
|
+
window.localStorage[S] = y;
|
|
67
67
|
return;
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
|
-
window.document.cookie = encodeURIComponent(
|
|
71
|
+
window.document.cookie = encodeURIComponent(S) + "=" + y + ";";
|
|
72
72
|
} catch {
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
function ne() {
|
|
77
77
|
var d;
|
|
78
|
-
if (!(typeof window === n || !
|
|
78
|
+
if (!(typeof window === n || !S)) {
|
|
79
79
|
try {
|
|
80
|
-
d = window.localStorage[
|
|
80
|
+
d = window.localStorage[S];
|
|
81
81
|
} catch {
|
|
82
82
|
}
|
|
83
83
|
if (typeof d === n)
|
|
84
84
|
try {
|
|
85
|
-
var
|
|
85
|
+
var y = window.document.cookie, O = encodeURIComponent(S), oe = y.indexOf(O + "=");
|
|
86
86
|
oe !== -1 && (d = /^([^;]+)/.exec(
|
|
87
|
-
|
|
87
|
+
y.slice(oe + O.length + 1)
|
|
88
88
|
)[1]);
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
return u.levels[d] === void 0 && (d = void 0), d;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
if (!(typeof window === n || !
|
|
94
|
+
function Pe() {
|
|
95
|
+
if (!(typeof window === n || !S)) {
|
|
96
96
|
try {
|
|
97
|
-
window.localStorage.removeItem(
|
|
97
|
+
window.localStorage.removeItem(S);
|
|
98
98
|
} catch {
|
|
99
99
|
}
|
|
100
100
|
try {
|
|
101
|
-
window.document.cookie = encodeURIComponent(
|
|
101
|
+
window.document.cookie = encodeURIComponent(S) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
102
102
|
} catch {
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
var
|
|
108
|
-
if (typeof
|
|
109
|
-
return
|
|
106
|
+
function L(d) {
|
|
107
|
+
var y = d;
|
|
108
|
+
if (typeof y == "string" && u.levels[y.toUpperCase()] !== void 0 && (y = u.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= u.levels.SILENT)
|
|
109
|
+
return y;
|
|
110
110
|
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
111
111
|
}
|
|
112
112
|
u.name = l, u.levels = {
|
|
@@ -116,51 +116,51 @@ function He() {
|
|
|
116
116
|
WARN: 3,
|
|
117
117
|
ERROR: 4,
|
|
118
118
|
SILENT: 5
|
|
119
|
-
}, u.methodFactory =
|
|
120
|
-
return
|
|
121
|
-
}, u.setLevel = function(d,
|
|
122
|
-
return
|
|
119
|
+
}, u.methodFactory = m || _, u.getLevel = function() {
|
|
120
|
+
return U ?? $ ?? J;
|
|
121
|
+
}, u.setLevel = function(d, y) {
|
|
122
|
+
return U = L(d), y !== !1 && Re(U), f.call(u);
|
|
123
123
|
}, u.setDefaultLevel = function(d) {
|
|
124
|
-
|
|
124
|
+
$ = L(d), ne() || u.setLevel(d, !1);
|
|
125
125
|
}, u.resetLevel = function() {
|
|
126
|
-
|
|
126
|
+
U = null, Pe(), f.call(u);
|
|
127
127
|
}, u.enableAll = function(d) {
|
|
128
128
|
u.setLevel(u.levels.TRACE, d);
|
|
129
129
|
}, u.disableAll = function(d) {
|
|
130
130
|
u.setLevel(u.levels.SILENT, d);
|
|
131
131
|
}, u.rebuild = function() {
|
|
132
|
-
if (i !== u && (
|
|
132
|
+
if (i !== u && (J = L(i.getLevel())), f.call(u), i === u)
|
|
133
133
|
for (var d in r)
|
|
134
134
|
r[d].rebuild();
|
|
135
|
-
},
|
|
135
|
+
}, J = L(
|
|
136
136
|
i ? i.getLevel() : "WARN"
|
|
137
137
|
);
|
|
138
138
|
var re = ne();
|
|
139
|
-
re != null && (
|
|
139
|
+
re != null && (U = L(re)), f.call(u);
|
|
140
140
|
}
|
|
141
|
-
i = new h(), i.getLogger = function(
|
|
142
|
-
if (typeof
|
|
141
|
+
i = new h(), i.getLogger = function(m) {
|
|
142
|
+
if (typeof m != "symbol" && typeof m != "string" || m === "")
|
|
143
143
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
144
|
-
var u = r[
|
|
145
|
-
return u || (u = r[
|
|
146
|
-
|
|
144
|
+
var u = r[m];
|
|
145
|
+
return u || (u = r[m] = new h(
|
|
146
|
+
m,
|
|
147
147
|
i.methodFactory
|
|
148
148
|
)), u;
|
|
149
149
|
};
|
|
150
|
-
var
|
|
150
|
+
var P = typeof window !== n ? window.log : void 0;
|
|
151
151
|
return i.noConflict = function() {
|
|
152
|
-
return typeof window !== n && window.log === i && (window.log =
|
|
152
|
+
return typeof window !== n && window.log === i && (window.log = P), i;
|
|
153
153
|
}, i.getLoggers = function() {
|
|
154
154
|
return r;
|
|
155
155
|
}, i.default = i, i;
|
|
156
156
|
});
|
|
157
|
-
}(
|
|
157
|
+
}(D)), D.exports;
|
|
158
158
|
}
|
|
159
|
-
var
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
var
|
|
163
|
-
(typeof navigator > "u" || !((
|
|
159
|
+
var We = Ne();
|
|
160
|
+
const se = /* @__PURE__ */ Ce(We);
|
|
161
|
+
let V;
|
|
162
|
+
var z, we;
|
|
163
|
+
(typeof navigator > "u" || !((we = (z = navigator.userAgent) == null ? void 0 : z.startsWith) != null && we.call(z, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
|
|
164
164
|
function Y(t, e) {
|
|
165
165
|
if (t == null)
|
|
166
166
|
return !1;
|
|
@@ -170,19 +170,19 @@ function Y(t, e) {
|
|
|
170
170
|
return !1;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const W = Symbol(),
|
|
173
|
+
const W = Symbol(), Ke = Symbol(), Z = Symbol(), He = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), qe = new TextDecoder();
|
|
174
174
|
function E(t) {
|
|
175
|
-
return typeof t == "string" ?
|
|
175
|
+
return typeof t == "string" ? Me.encode(t) : qe.decode(t);
|
|
176
176
|
}
|
|
177
|
-
const
|
|
178
|
-
function
|
|
177
|
+
const ce = 32768;
|
|
178
|
+
function Be(t) {
|
|
179
179
|
t instanceof ArrayBuffer && (t = new Uint8Array(t));
|
|
180
180
|
const e = [];
|
|
181
|
-
for (let n = 0; n < t.byteLength; n +=
|
|
182
|
-
e.push(String.fromCharCode.apply(null, t.subarray(n, n +
|
|
181
|
+
for (let n = 0; n < t.byteLength; n += ce)
|
|
182
|
+
e.push(String.fromCharCode.apply(null, t.subarray(n, n + ce)));
|
|
183
183
|
return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Ve(t) {
|
|
186
186
|
try {
|
|
187
187
|
const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
|
|
188
188
|
for (let o = 0; o < e.length; o++)
|
|
@@ -192,10 +192,10 @@ function Ze(t) {
|
|
|
192
192
|
throw new s("The input to be decoded is not correctly encoded.", { cause: e });
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return typeof t == "string" ?
|
|
195
|
+
function k(t) {
|
|
196
|
+
return typeof t == "string" ? Ve(t) : Be(t);
|
|
197
197
|
}
|
|
198
|
-
class
|
|
198
|
+
class Ge {
|
|
199
199
|
constructor(e) {
|
|
200
200
|
this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
|
|
201
201
|
}
|
|
@@ -219,49 +219,49 @@ class Ye {
|
|
|
219
219
|
this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
class
|
|
222
|
+
class T extends Error {
|
|
223
223
|
constructor(e) {
|
|
224
224
|
var n;
|
|
225
225
|
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
class
|
|
228
|
+
class Ye extends Error {
|
|
229
229
|
constructor(e, n) {
|
|
230
230
|
var o;
|
|
231
231
|
super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
const s =
|
|
235
|
-
function
|
|
234
|
+
const s = Ye, ge = new Ge(100);
|
|
235
|
+
function me(t) {
|
|
236
236
|
return t instanceof CryptoKey;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
238
|
+
function Ze(t) {
|
|
239
|
+
return me(t) && t.type === "private";
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
241
|
+
function Qe(t) {
|
|
242
|
+
return me(t) && t.type === "public";
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Q(t) {
|
|
245
245
|
try {
|
|
246
246
|
const e = t.headers.get("dpop-nonce");
|
|
247
|
-
e &&
|
|
247
|
+
e && ge.set(new URL(t.url).origin, e);
|
|
248
248
|
} catch {
|
|
249
249
|
}
|
|
250
250
|
return t;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function C(t) {
|
|
253
253
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function K(t) {
|
|
256
256
|
Y(t, Headers) && (t = Object.fromEntries(t.entries()));
|
|
257
257
|
const e = new Headers(t);
|
|
258
|
-
if (
|
|
258
|
+
if (V && !e.has("user-agent") && e.set("user-agent", V), e.has("authorization"))
|
|
259
259
|
throw new TypeError('"options.headers" must not include the "authorization" header name');
|
|
260
260
|
if (e.has("dpop"))
|
|
261
261
|
throw new TypeError('"options.headers" must not include the "dpop" header name');
|
|
262
262
|
return e;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Xe(t) {
|
|
265
265
|
if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
|
|
266
266
|
throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
|
|
267
267
|
return t;
|
|
@@ -283,15 +283,15 @@ async function et(t, e) {
|
|
|
283
283
|
default:
|
|
284
284
|
throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
|
|
285
285
|
}
|
|
286
|
-
const o =
|
|
287
|
-
return o.set("accept", "application/json"), ((e == null ? void 0 : e[
|
|
286
|
+
const o = K(e == null ? void 0 : e.headers);
|
|
287
|
+
return o.set("accept", "application/json"), ((e == null ? void 0 : e[Z]) || fetch)(n.href, {
|
|
288
288
|
headers: Object.fromEntries(o.entries()),
|
|
289
289
|
method: "GET",
|
|
290
290
|
redirect: "manual",
|
|
291
|
-
signal:
|
|
292
|
-
}).then(
|
|
291
|
+
signal: null
|
|
292
|
+
}).then(Q);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function g(t) {
|
|
295
295
|
return typeof t == "string" && t.length !== 0;
|
|
296
296
|
}
|
|
297
297
|
async function tt(t, e) {
|
|
@@ -308,49 +308,36 @@ async function tt(t, e) {
|
|
|
308
308
|
} catch (o) {
|
|
309
309
|
throw new s('failed to parse "response" body as JSON', { cause: o });
|
|
310
310
|
}
|
|
311
|
-
if (!
|
|
311
|
+
if (!C(n))
|
|
312
312
|
throw new s('"response" body must be a top level object');
|
|
313
|
-
if (!
|
|
313
|
+
if (!g(n.issuer))
|
|
314
314
|
throw new s('"response" body "issuer" property must be a non-empty string');
|
|
315
315
|
if (new URL(n.issuer).href !== t.href)
|
|
316
316
|
throw new s('"response" body "issuer" does not match "expectedIssuer"');
|
|
317
317
|
return n;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function X() {
|
|
320
|
+
return k(crypto.getRandomValues(new Uint8Array(32)));
|
|
321
321
|
}
|
|
322
322
|
function nt() {
|
|
323
|
-
return
|
|
323
|
+
return X();
|
|
324
324
|
}
|
|
325
325
|
function rt() {
|
|
326
|
-
return
|
|
326
|
+
return X();
|
|
327
327
|
}
|
|
328
328
|
async function ot(t) {
|
|
329
|
-
if (!
|
|
329
|
+
if (!g(t))
|
|
330
330
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
331
|
-
return
|
|
332
|
-
}
|
|
333
|
-
function it(t) {
|
|
334
|
-
if (t instanceof CryptoKey)
|
|
335
|
-
return { key: t };
|
|
336
|
-
if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
|
|
337
|
-
return {};
|
|
338
|
-
if (t.kid !== void 0 && !w(t.kid))
|
|
339
|
-
throw new TypeError('"kid" must be a non-empty string');
|
|
340
|
-
return {
|
|
341
|
-
key: t.key,
|
|
342
|
-
kid: t.kid,
|
|
343
|
-
modifyAssertion: t[ge]
|
|
344
|
-
};
|
|
331
|
+
return k(await crypto.subtle.digest("SHA-256", E(t)));
|
|
345
332
|
}
|
|
346
|
-
function
|
|
333
|
+
function ue(t) {
|
|
347
334
|
return encodeURIComponent(t).replace(/%20/g, "+");
|
|
348
335
|
}
|
|
349
|
-
function
|
|
350
|
-
const n =
|
|
336
|
+
function it(t, e) {
|
|
337
|
+
const n = ue(t), o = ue(e);
|
|
351
338
|
return `Basic ${btoa(`${n}:${o}`)}`;
|
|
352
339
|
}
|
|
353
|
-
function
|
|
340
|
+
function at(t) {
|
|
354
341
|
switch (t.algorithm.hash.name) {
|
|
355
342
|
case "SHA-256":
|
|
356
343
|
return "PS256";
|
|
@@ -359,10 +346,10 @@ function st(t) {
|
|
|
359
346
|
case "SHA-512":
|
|
360
347
|
return "PS512";
|
|
361
348
|
default:
|
|
362
|
-
throw new
|
|
349
|
+
throw new T("unsupported RsaHashedKeyAlgorithm hash name");
|
|
363
350
|
}
|
|
364
351
|
}
|
|
365
|
-
function
|
|
352
|
+
function st(t) {
|
|
366
353
|
switch (t.algorithm.hash.name) {
|
|
367
354
|
case "SHA-256":
|
|
368
355
|
return "RS256";
|
|
@@ -371,10 +358,10 @@ function ct(t) {
|
|
|
371
358
|
case "SHA-512":
|
|
372
359
|
return "RS512";
|
|
373
360
|
default:
|
|
374
|
-
throw new
|
|
361
|
+
throw new T("unsupported RsaHashedKeyAlgorithm hash name");
|
|
375
362
|
}
|
|
376
363
|
}
|
|
377
|
-
function
|
|
364
|
+
function ct(t) {
|
|
378
365
|
switch (t.algorithm.namedCurve) {
|
|
379
366
|
case "P-256":
|
|
380
367
|
return "ES256";
|
|
@@ -383,219 +370,192 @@ function ut(t) {
|
|
|
383
370
|
case "P-521":
|
|
384
371
|
return "ES512";
|
|
385
372
|
default:
|
|
386
|
-
throw new
|
|
373
|
+
throw new T("unsupported EcKeyAlgorithm namedCurve");
|
|
387
374
|
}
|
|
388
375
|
}
|
|
389
|
-
function
|
|
376
|
+
function ut(t) {
|
|
390
377
|
switch (t.algorithm.name) {
|
|
391
378
|
case "RSA-PSS":
|
|
392
|
-
return
|
|
379
|
+
return at(t);
|
|
393
380
|
case "RSASSA-PKCS1-v1_5":
|
|
394
|
-
return
|
|
381
|
+
return st(t);
|
|
395
382
|
case "ECDSA":
|
|
396
|
-
return
|
|
383
|
+
return ct(t);
|
|
397
384
|
case "Ed25519":
|
|
398
385
|
case "Ed448":
|
|
399
386
|
return "EdDSA";
|
|
400
387
|
default:
|
|
401
|
-
throw new
|
|
388
|
+
throw new T("unsupported CryptoKey algorithm name");
|
|
402
389
|
}
|
|
403
390
|
}
|
|
404
|
-
function
|
|
391
|
+
function H(t) {
|
|
405
392
|
const e = t == null ? void 0 : t[W];
|
|
406
393
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
407
394
|
}
|
|
408
|
-
function
|
|
409
|
-
const e = t == null ? void 0 : t[
|
|
395
|
+
function ye(t) {
|
|
396
|
+
const e = t == null ? void 0 : t[Ke];
|
|
410
397
|
return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
|
|
411
398
|
}
|
|
412
|
-
function
|
|
399
|
+
function ee() {
|
|
413
400
|
return Math.floor(Date.now() / 1e3);
|
|
414
401
|
}
|
|
415
|
-
function lt(t, e) {
|
|
416
|
-
const n = F() + C(e);
|
|
417
|
-
return {
|
|
418
|
-
jti: $(),
|
|
419
|
-
aud: [t.issuer, t.token_endpoint],
|
|
420
|
-
exp: n + 60,
|
|
421
|
-
iat: n,
|
|
422
|
-
nbf: n,
|
|
423
|
-
iss: e.client_id,
|
|
424
|
-
sub: e.client_id
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
async function dt(t, e, n, o, a) {
|
|
428
|
-
const r = { alg: _e(n), kid: o }, i = lt(t, e);
|
|
429
|
-
return a == null || a(r, i), Se(r, i, n);
|
|
430
|
-
}
|
|
431
402
|
function I(t) {
|
|
432
403
|
if (typeof t != "object" || t === null)
|
|
433
404
|
throw new TypeError('"as" must be an object');
|
|
434
|
-
if (!
|
|
405
|
+
if (!g(t.issuer))
|
|
435
406
|
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
436
407
|
return !0;
|
|
437
408
|
}
|
|
438
409
|
function j(t) {
|
|
439
410
|
if (typeof t != "object" || t === null)
|
|
440
411
|
throw new TypeError('"client" must be an object');
|
|
441
|
-
if (!
|
|
412
|
+
if (!g(t.client_id))
|
|
442
413
|
throw new TypeError('"client.client_id" property must be a non-empty string');
|
|
443
414
|
return !0;
|
|
444
415
|
}
|
|
445
|
-
function
|
|
446
|
-
if (!
|
|
416
|
+
function le(t) {
|
|
417
|
+
if (!g(t))
|
|
447
418
|
throw new TypeError('"client.client_secret" property must be a non-empty string');
|
|
448
419
|
return t;
|
|
449
420
|
}
|
|
450
|
-
function
|
|
451
|
-
if (e !== void 0)
|
|
452
|
-
throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
|
|
453
|
-
}
|
|
454
|
-
function le(t, e) {
|
|
421
|
+
function de(t, e) {
|
|
455
422
|
if (e !== void 0)
|
|
456
423
|
throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
|
|
457
424
|
}
|
|
458
|
-
async function
|
|
425
|
+
async function lt(t, e, n, o, a) {
|
|
459
426
|
switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
|
|
460
427
|
case void 0:
|
|
461
428
|
case "client_secret_basic": {
|
|
462
|
-
|
|
429
|
+
o.set("authorization", it(e.client_id, le(e.client_secret)));
|
|
463
430
|
break;
|
|
464
431
|
}
|
|
465
432
|
case "client_secret_post": {
|
|
466
|
-
|
|
467
|
-
break;
|
|
468
|
-
}
|
|
469
|
-
case "private_key_jwt": {
|
|
470
|
-
if (le("private_key_jwt", e.client_secret), a === void 0)
|
|
471
|
-
throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
472
|
-
const { key: r, kid: i, modifyAssertion: c } = it(a);
|
|
473
|
-
if (!be(r))
|
|
474
|
-
throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
|
|
475
|
-
n.set("client_id", e.client_id), n.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.set("client_assertion", await dt(t, e, r, i, c));
|
|
433
|
+
n.set("client_id", e.client_id), n.set("client_secret", le(e.client_secret));
|
|
476
434
|
break;
|
|
477
435
|
}
|
|
436
|
+
case "private_key_jwt":
|
|
437
|
+
throw de("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
|
|
478
438
|
case "tls_client_auth":
|
|
479
439
|
case "self_signed_tls_client_auth":
|
|
480
440
|
case "none": {
|
|
481
|
-
|
|
441
|
+
de(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
|
|
482
442
|
break;
|
|
483
443
|
}
|
|
484
444
|
default:
|
|
485
|
-
throw new
|
|
445
|
+
throw new T("unsupported client token_endpoint_auth_method");
|
|
486
446
|
}
|
|
487
447
|
}
|
|
488
|
-
async function
|
|
448
|
+
async function dt(t, e, n) {
|
|
489
449
|
if (!n.usages.includes("sign"))
|
|
490
450
|
throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
|
|
491
|
-
const o = `${
|
|
451
|
+
const o = `${k(E(JSON.stringify(t)))}.${k(E(JSON.stringify(e)))}`, a = k(await crypto.subtle.sign(ke(n), n, E(o)));
|
|
492
452
|
return `${o}.${a}`;
|
|
493
453
|
}
|
|
494
|
-
async function
|
|
495
|
-
var
|
|
496
|
-
const { privateKey: i, publicKey: c, nonce: p =
|
|
497
|
-
if (!
|
|
454
|
+
async function ht(t, e, n, o, a, r) {
|
|
455
|
+
var _;
|
|
456
|
+
const { privateKey: i, publicKey: c, nonce: p = ge.get(n.origin) } = e;
|
|
457
|
+
if (!Ze(i))
|
|
498
458
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
499
|
-
if (!
|
|
459
|
+
if (!Qe(c))
|
|
500
460
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
501
|
-
if (p !== void 0 && !
|
|
461
|
+
if (p !== void 0 && !g(p))
|
|
502
462
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
503
463
|
if (!c.extractable)
|
|
504
464
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
505
|
-
const
|
|
506
|
-
alg:
|
|
465
|
+
const w = ee() + a, f = {
|
|
466
|
+
alg: ut(i),
|
|
507
467
|
typ: "dpop+jwt",
|
|
508
|
-
jwk: await
|
|
509
|
-
},
|
|
510
|
-
iat:
|
|
511
|
-
jti:
|
|
468
|
+
jwk: await pt(c)
|
|
469
|
+
}, v = {
|
|
470
|
+
iat: w,
|
|
471
|
+
jti: X(),
|
|
512
472
|
htm: o,
|
|
513
473
|
nonce: p,
|
|
514
474
|
htu: `${n.origin}${n.pathname}`,
|
|
515
|
-
ath: r ?
|
|
475
|
+
ath: r ? k(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
516
476
|
};
|
|
517
|
-
(
|
|
477
|
+
(_ = e[He]) == null || _.call(e, f, v), t.set("dpop", await dt(f, v, i));
|
|
518
478
|
}
|
|
519
|
-
let
|
|
520
|
-
async function
|
|
479
|
+
let N;
|
|
480
|
+
async function ft(t) {
|
|
521
481
|
const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
|
|
522
|
-
return
|
|
482
|
+
return N.set(t, c), c;
|
|
523
483
|
}
|
|
524
|
-
async function
|
|
525
|
-
return
|
|
484
|
+
async function pt(t) {
|
|
485
|
+
return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ft(t);
|
|
526
486
|
}
|
|
527
|
-
function
|
|
487
|
+
function he(t, e, n) {
|
|
528
488
|
if (typeof t != "string")
|
|
529
489
|
throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
|
|
530
490
|
return new URL(t);
|
|
531
491
|
}
|
|
532
|
-
function
|
|
533
|
-
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ?
|
|
492
|
+
function be(t, e, n = !1) {
|
|
493
|
+
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? he(t.mtls_endpoint_aliases[e], e, n) : he(t[e], e, n);
|
|
534
494
|
}
|
|
535
|
-
function
|
|
536
|
-
return !!(t.use_mtls_endpoint_aliases || e != null && e[
|
|
495
|
+
function _e(t, e) {
|
|
496
|
+
return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
|
|
537
497
|
}
|
|
538
|
-
function
|
|
498
|
+
function G(t) {
|
|
539
499
|
const e = t;
|
|
540
500
|
return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
|
|
541
501
|
}
|
|
542
|
-
async function
|
|
543
|
-
if (!
|
|
502
|
+
async function wt(t, e, n, o, a, r) {
|
|
503
|
+
if (!g(t))
|
|
544
504
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
545
505
|
if (!(n instanceof URL))
|
|
546
506
|
throw new TypeError('"url" must be an instance of URL');
|
|
547
|
-
return o =
|
|
507
|
+
return o = K(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ht(o, r.DPoP, n, e.toUpperCase(), H({ [W]: r == null ? void 0 : r[W] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Z]) || fetch)(n.href, {
|
|
548
508
|
body: a,
|
|
549
509
|
headers: Object.fromEntries(o.entries()),
|
|
550
510
|
method: e,
|
|
551
511
|
redirect: "manual",
|
|
552
|
-
signal: r != null && r.signal ?
|
|
553
|
-
}).then(
|
|
512
|
+
signal: r != null && r.signal ? Xe(r.signal) : null
|
|
513
|
+
}).then(Q);
|
|
554
514
|
}
|
|
555
|
-
async function
|
|
515
|
+
async function gt(t, e, n, o) {
|
|
556
516
|
I(t), j(e);
|
|
557
|
-
const a =
|
|
558
|
-
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")),
|
|
517
|
+
const a = be(t, "userinfo_endpoint", _e(e, o)), r = K(o == null ? void 0 : o.headers);
|
|
518
|
+
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), wt(n, "GET", a, r, null, {
|
|
559
519
|
...o,
|
|
560
|
-
[W]:
|
|
520
|
+
[W]: H(e)
|
|
561
521
|
});
|
|
562
522
|
}
|
|
563
|
-
async function
|
|
564
|
-
return await
|
|
523
|
+
async function mt(t, e, n, o, a, r, i) {
|
|
524
|
+
return await lt(t, e, a, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Z]) || fetch)(o.href, {
|
|
565
525
|
body: a,
|
|
566
526
|
headers: Object.fromEntries(r.entries()),
|
|
567
527
|
method: n,
|
|
568
528
|
redirect: "manual",
|
|
569
|
-
signal:
|
|
570
|
-
}).then(
|
|
529
|
+
signal: null
|
|
530
|
+
}).then(Q);
|
|
571
531
|
}
|
|
572
|
-
async function
|
|
573
|
-
const r =
|
|
532
|
+
async function ve(t, e, n, o, a) {
|
|
533
|
+
const r = be(t, "token_endpoint", _e(e, a));
|
|
574
534
|
o.set("grant_type", n);
|
|
575
|
-
const i =
|
|
576
|
-
return i.set("accept", "application/json"),
|
|
535
|
+
const i = K(a == null ? void 0 : a.headers);
|
|
536
|
+
return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
|
|
577
537
|
}
|
|
578
|
-
async function
|
|
579
|
-
if (I(t), j(e), !
|
|
538
|
+
async function yt(t, e, n, o) {
|
|
539
|
+
if (I(t), j(e), !g(n))
|
|
580
540
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
581
541
|
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
582
|
-
return a.set("refresh_token", n),
|
|
542
|
+
return a.set("refresh_token", n), ve(t, e, "refresh_token", a, o);
|
|
583
543
|
}
|
|
584
|
-
const
|
|
585
|
-
function
|
|
544
|
+
const Se = /* @__PURE__ */ new WeakMap();
|
|
545
|
+
function bt(t) {
|
|
586
546
|
if (!t.id_token)
|
|
587
547
|
return;
|
|
588
|
-
const e =
|
|
548
|
+
const e = Se.get(t);
|
|
589
549
|
if (!e)
|
|
590
550
|
throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
|
|
591
551
|
return e[0];
|
|
592
552
|
}
|
|
593
|
-
async function
|
|
553
|
+
async function Te(t, e, n, o = !1, a = !1) {
|
|
594
554
|
if (I(t), j(e), !Y(n, Response))
|
|
595
555
|
throw new TypeError('"response" must be an instance of Response');
|
|
596
556
|
if (n.status !== 200) {
|
|
597
557
|
let i;
|
|
598
|
-
if (i = await
|
|
558
|
+
if (i = await Ut(n))
|
|
599
559
|
return i;
|
|
600
560
|
throw new s('"response" is not a conform Token Endpoint response');
|
|
601
561
|
}
|
|
@@ -606,25 +566,25 @@ async function Re(t, e, n, o = !1, a = !1) {
|
|
|
606
566
|
} catch (i) {
|
|
607
567
|
throw new s('failed to parse "response" body as JSON', { cause: i });
|
|
608
568
|
}
|
|
609
|
-
if (!
|
|
569
|
+
if (!C(r))
|
|
610
570
|
throw new s('"response" body must be a top level object');
|
|
611
|
-
if (!
|
|
571
|
+
if (!g(r.access_token))
|
|
612
572
|
throw new s('"response" body "access_token" property must be a non-empty string');
|
|
613
|
-
if (!
|
|
573
|
+
if (!g(r.token_type))
|
|
614
574
|
throw new s('"response" body "token_type" property must be a non-empty string');
|
|
615
575
|
if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
|
|
616
|
-
throw new
|
|
576
|
+
throw new T("unsupported `token_type` value");
|
|
617
577
|
if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
|
|
618
578
|
throw new s('"response" body "expires_in" property must be a positive number');
|
|
619
|
-
if (!a && r.refresh_token !== void 0 && !
|
|
579
|
+
if (!a && r.refresh_token !== void 0 && !g(r.refresh_token))
|
|
620
580
|
throw new s('"response" body "refresh_token" property must be a non-empty string');
|
|
621
581
|
if (r.scope !== void 0 && typeof r.scope != "string")
|
|
622
582
|
throw new s('"response" body "scope" property must be a string');
|
|
623
583
|
if (!o) {
|
|
624
|
-
if (r.id_token !== void 0 && !
|
|
584
|
+
if (r.id_token !== void 0 && !g(r.id_token))
|
|
625
585
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
626
586
|
if (r.id_token) {
|
|
627
|
-
const { claims: i, jwt: c } = await
|
|
587
|
+
const { claims: i, jwt: c } = await Ct(r.id_token, It.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ee, H(e), ye(e), e[$e]).then(Et.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(St.bind(void 0, t.issuer)).then(vt.bind(void 0, e.client_id));
|
|
628
588
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
629
589
|
if (i.azp === void 0)
|
|
630
590
|
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -633,15 +593,15 @@ async function Re(t, e, n, o = !1, a = !1) {
|
|
|
633
593
|
}
|
|
634
594
|
if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
|
|
635
595
|
throw new s('ID Token "auth_time" (authentication time) must be a positive number');
|
|
636
|
-
|
|
596
|
+
Se.set(r, [i, c]);
|
|
637
597
|
}
|
|
638
598
|
}
|
|
639
599
|
return r;
|
|
640
600
|
}
|
|
641
|
-
async function
|
|
642
|
-
return
|
|
601
|
+
async function _t(t, e, n) {
|
|
602
|
+
return Te(t, e, n);
|
|
643
603
|
}
|
|
644
|
-
function
|
|
604
|
+
function vt(t, e) {
|
|
645
605
|
if (Array.isArray(e.claims.aud)) {
|
|
646
606
|
if (!e.claims.aud.includes(t))
|
|
647
607
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
@@ -649,29 +609,29 @@ function St(t, e) {
|
|
|
649
609
|
throw new s('unexpected JWT "aud" (audience) claim value');
|
|
650
610
|
return e;
|
|
651
611
|
}
|
|
652
|
-
function
|
|
612
|
+
function St(t, e) {
|
|
653
613
|
if (e.claims.iss !== t)
|
|
654
614
|
throw new s('unexpected JWT "iss" (issuer) claim value');
|
|
655
615
|
return e;
|
|
656
616
|
}
|
|
657
|
-
const
|
|
658
|
-
function
|
|
659
|
-
return
|
|
617
|
+
const Ae = /* @__PURE__ */ new WeakSet();
|
|
618
|
+
function Tt(t) {
|
|
619
|
+
return Ae.add(t), t;
|
|
660
620
|
}
|
|
661
621
|
async function At(t, e, n, o, a, r) {
|
|
662
|
-
if (I(t), j(e), !
|
|
622
|
+
if (I(t), j(e), !Ae.has(n))
|
|
663
623
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
664
|
-
if (!
|
|
624
|
+
if (!g(o))
|
|
665
625
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
666
|
-
if (!
|
|
626
|
+
if (!g(a))
|
|
667
627
|
throw new TypeError('"codeVerifier" must be a non-empty string');
|
|
668
|
-
const i =
|
|
628
|
+
const i = A(n, "code");
|
|
669
629
|
if (!i)
|
|
670
630
|
throw new s('no authorization code in "callbackParameters"');
|
|
671
631
|
const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
|
|
672
|
-
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i),
|
|
632
|
+
return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), ve(t, e, "authorization_code", c, r);
|
|
673
633
|
}
|
|
674
|
-
const
|
|
634
|
+
const kt = {
|
|
675
635
|
aud: "audience",
|
|
676
636
|
c_hash: "code hash",
|
|
677
637
|
client_id: "client id",
|
|
@@ -687,38 +647,38 @@ const Et = {
|
|
|
687
647
|
htu: "http uri",
|
|
688
648
|
cnf: "confirmation"
|
|
689
649
|
};
|
|
690
|
-
function
|
|
650
|
+
function Et(t, e) {
|
|
691
651
|
for (const n of t)
|
|
692
652
|
if (e.claims[n] === void 0)
|
|
693
|
-
throw new s(`JWT "${n}" (${
|
|
653
|
+
throw new s(`JWT "${n}" (${kt[n]}) claim missing`);
|
|
694
654
|
return e;
|
|
695
655
|
}
|
|
696
|
-
const
|
|
697
|
-
async function
|
|
698
|
-
const r = await
|
|
699
|
-
if (
|
|
656
|
+
const Rt = Symbol(), F = Symbol();
|
|
657
|
+
async function Pt(t, e, n, o, a) {
|
|
658
|
+
const r = await Te(t, e, n);
|
|
659
|
+
if (G(r))
|
|
700
660
|
return r;
|
|
701
|
-
if (!
|
|
661
|
+
if (!g(r.id_token))
|
|
702
662
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
703
|
-
a ?? (a = e.default_max_age ??
|
|
704
|
-
const i =
|
|
705
|
-
if ((e.require_auth_time || a !==
|
|
663
|
+
a ?? (a = e.default_max_age ?? F);
|
|
664
|
+
const i = bt(r);
|
|
665
|
+
if ((e.require_auth_time || a !== F) && i.auth_time === void 0)
|
|
706
666
|
throw new s('ID Token "auth_time" (authentication time) claim missing');
|
|
707
|
-
if (a !==
|
|
667
|
+
if (a !== F) {
|
|
708
668
|
if (typeof a != "number" || a < 0)
|
|
709
669
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
710
|
-
const c =
|
|
670
|
+
const c = ee() + H(e), p = ye(e);
|
|
711
671
|
if (i.auth_time + a < c - p)
|
|
712
672
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
713
673
|
}
|
|
714
674
|
switch (o) {
|
|
715
675
|
case void 0:
|
|
716
|
-
case
|
|
676
|
+
case Rt:
|
|
717
677
|
if (i.nonce !== void 0)
|
|
718
678
|
throw new s('unexpected ID Token "nonce" claim value');
|
|
719
679
|
break;
|
|
720
680
|
default:
|
|
721
|
-
if (!
|
|
681
|
+
if (!g(o))
|
|
722
682
|
throw new TypeError('"expectedNonce" must be a non-empty string');
|
|
723
683
|
if (i.nonce === void 0)
|
|
724
684
|
throw new s('ID Token "nonce" claim missing');
|
|
@@ -731,22 +691,22 @@ function te(t) {
|
|
|
731
691
|
if (t.bodyUsed)
|
|
732
692
|
throw new TypeError('"response" body has been used already');
|
|
733
693
|
}
|
|
734
|
-
async function
|
|
694
|
+
async function Ut(t) {
|
|
735
695
|
if (t.status > 399 && t.status < 500) {
|
|
736
696
|
te(t);
|
|
737
697
|
try {
|
|
738
698
|
const e = await t.json();
|
|
739
|
-
if (
|
|
699
|
+
if (C(e) && typeof e.error == "string" && e.error.length)
|
|
740
700
|
return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
|
|
741
701
|
} catch {
|
|
742
702
|
}
|
|
743
703
|
}
|
|
744
704
|
}
|
|
745
|
-
function
|
|
705
|
+
function fe(t) {
|
|
746
706
|
if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
|
|
747
707
|
throw new s(`${t.name} modulusLength must be at least 2048 bits`);
|
|
748
708
|
}
|
|
749
|
-
function
|
|
709
|
+
function Lt(t) {
|
|
750
710
|
switch (t) {
|
|
751
711
|
case "P-256":
|
|
752
712
|
return "SHA-256";
|
|
@@ -755,18 +715,18 @@ function xt(t) {
|
|
|
755
715
|
case "P-521":
|
|
756
716
|
return "SHA-512";
|
|
757
717
|
default:
|
|
758
|
-
throw new
|
|
718
|
+
throw new T();
|
|
759
719
|
}
|
|
760
720
|
}
|
|
761
|
-
function
|
|
721
|
+
function ke(t) {
|
|
762
722
|
switch (t.algorithm.name) {
|
|
763
723
|
case "ECDSA":
|
|
764
724
|
return {
|
|
765
725
|
name: t.algorithm.name,
|
|
766
|
-
hash:
|
|
726
|
+
hash: Lt(t.algorithm.namedCurve)
|
|
767
727
|
};
|
|
768
728
|
case "RSA-PSS":
|
|
769
|
-
switch (
|
|
729
|
+
switch (fe(t.algorithm), t.algorithm.hash.name) {
|
|
770
730
|
case "SHA-256":
|
|
771
731
|
case "SHA-384":
|
|
772
732
|
case "SHA-512":
|
|
@@ -775,57 +735,57 @@ function Ue(t) {
|
|
|
775
735
|
saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
|
|
776
736
|
};
|
|
777
737
|
default:
|
|
778
|
-
throw new
|
|
738
|
+
throw new T();
|
|
779
739
|
}
|
|
780
740
|
case "RSASSA-PKCS1-v1_5":
|
|
781
|
-
return
|
|
741
|
+
return fe(t.algorithm), t.algorithm.name;
|
|
782
742
|
case "Ed448":
|
|
783
743
|
case "Ed25519":
|
|
784
744
|
return t.algorithm.name;
|
|
785
745
|
}
|
|
786
|
-
throw new
|
|
746
|
+
throw new T();
|
|
787
747
|
}
|
|
788
|
-
const
|
|
789
|
-
async function
|
|
748
|
+
const Ee = Symbol();
|
|
749
|
+
async function xt(t, e, n, o) {
|
|
790
750
|
const a = `${t}.${e}`;
|
|
791
|
-
if (!await crypto.subtle.verify(
|
|
751
|
+
if (!await crypto.subtle.verify(ke(n), n, o, E(a)))
|
|
792
752
|
throw new s("JWT signature verification failed");
|
|
793
753
|
}
|
|
794
|
-
async function
|
|
795
|
-
let { 0: i, 1: c, 2: p, length:
|
|
796
|
-
if (
|
|
754
|
+
async function Ct(t, e, n, o, a, r) {
|
|
755
|
+
let { 0: i, 1: c, 2: p, length: w } = t.split(".");
|
|
756
|
+
if (w === 5)
|
|
797
757
|
if (r !== void 0)
|
|
798
|
-
t = await r(t), { 0: i, 1: c, 2: p, length:
|
|
758
|
+
t = await r(t), { 0: i, 1: c, 2: p, length: w } = t.split(".");
|
|
799
759
|
else
|
|
800
|
-
throw new
|
|
801
|
-
if (
|
|
760
|
+
throw new T("JWE structure JWTs are not supported");
|
|
761
|
+
if (w !== 3)
|
|
802
762
|
throw new s("Invalid JWT");
|
|
803
763
|
let f;
|
|
804
764
|
try {
|
|
805
|
-
f = JSON.parse(E(
|
|
765
|
+
f = JSON.parse(E(k(i)));
|
|
806
766
|
} catch (l) {
|
|
807
767
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
808
768
|
}
|
|
809
|
-
if (!
|
|
769
|
+
if (!C(f))
|
|
810
770
|
throw new s("JWT Header must be a top level object");
|
|
811
771
|
if (e(f), f.crit !== void 0)
|
|
812
772
|
throw new s('unexpected JWT "crit" header parameter');
|
|
813
|
-
const
|
|
814
|
-
let
|
|
815
|
-
n !==
|
|
773
|
+
const v = k(p);
|
|
774
|
+
let _;
|
|
775
|
+
n !== Ee && (_ = await n(f), await xt(i, c, _, v));
|
|
816
776
|
let h;
|
|
817
777
|
try {
|
|
818
|
-
h = JSON.parse(E(
|
|
778
|
+
h = JSON.parse(E(k(c)));
|
|
819
779
|
} catch (l) {
|
|
820
780
|
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
821
781
|
}
|
|
822
|
-
if (!
|
|
782
|
+
if (!C(h))
|
|
823
783
|
throw new s("JWT Payload must be a top level object");
|
|
824
|
-
const
|
|
784
|
+
const P = ee() + o;
|
|
825
785
|
if (h.exp !== void 0) {
|
|
826
786
|
if (typeof h.exp != "number")
|
|
827
787
|
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
828
|
-
if (h.exp <=
|
|
788
|
+
if (h.exp <= P - a)
|
|
829
789
|
throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
830
790
|
}
|
|
831
791
|
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
@@ -835,14 +795,14 @@ async function It(t, e, n, o, a, r) {
|
|
|
835
795
|
if (h.nbf !== void 0) {
|
|
836
796
|
if (typeof h.nbf != "number")
|
|
837
797
|
throw new s('unexpected JWT "nbf" (not before) claim type');
|
|
838
|
-
if (h.nbf >
|
|
798
|
+
if (h.nbf > P + a)
|
|
839
799
|
throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
840
800
|
}
|
|
841
801
|
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
842
802
|
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
843
|
-
return { header: f, claims: h, signature:
|
|
803
|
+
return { header: f, claims: h, signature: v, key: _, jwt: t };
|
|
844
804
|
}
|
|
845
|
-
function
|
|
805
|
+
function It(t, e, n) {
|
|
846
806
|
if (t !== void 0) {
|
|
847
807
|
if (n.alg !== t)
|
|
848
808
|
throw new s('unexpected JWT "alg" header parameter');
|
|
@@ -856,62 +816,62 @@ function jt(t, e, n) {
|
|
|
856
816
|
if (n.alg !== "RS256")
|
|
857
817
|
throw new s('unexpected JWT "alg" header parameter');
|
|
858
818
|
}
|
|
859
|
-
function
|
|
819
|
+
function A(t, e) {
|
|
860
820
|
const { 0: n, length: o } = t.getAll(e);
|
|
861
821
|
if (o > 1)
|
|
862
822
|
throw new s(`"${e}" parameter must be provided only once`);
|
|
863
823
|
return n;
|
|
864
824
|
}
|
|
865
|
-
const
|
|
866
|
-
function
|
|
825
|
+
const jt = Symbol(), Jt = Symbol();
|
|
826
|
+
function Ot(t, e, n, o) {
|
|
867
827
|
if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
868
828
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
869
|
-
if (
|
|
829
|
+
if (A(n, "response"))
|
|
870
830
|
throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
871
|
-
const a =
|
|
831
|
+
const a = A(n, "iss"), r = A(n, "state");
|
|
872
832
|
if (!a && t.authorization_response_iss_parameter_supported)
|
|
873
833
|
throw new s('response parameter "iss" (issuer) missing');
|
|
874
834
|
if (a && a !== t.issuer)
|
|
875
835
|
throw new s('unexpected "iss" (issuer) response parameter value');
|
|
876
836
|
switch (o) {
|
|
877
837
|
case void 0:
|
|
878
|
-
case
|
|
838
|
+
case Jt:
|
|
879
839
|
if (r !== void 0)
|
|
880
840
|
throw new s('unexpected "state" response parameter encountered');
|
|
881
841
|
break;
|
|
882
|
-
case
|
|
842
|
+
case jt:
|
|
883
843
|
break;
|
|
884
844
|
default:
|
|
885
|
-
if (!
|
|
845
|
+
if (!g(o))
|
|
886
846
|
throw new s('"expectedState" must be a non-empty string');
|
|
887
847
|
if (r === void 0)
|
|
888
848
|
throw new s('response parameter "state" missing');
|
|
889
849
|
if (r !== o)
|
|
890
850
|
throw new s('unexpected "state" response parameter value');
|
|
891
851
|
}
|
|
892
|
-
const i =
|
|
852
|
+
const i = A(n, "error");
|
|
893
853
|
if (i)
|
|
894
854
|
return {
|
|
895
855
|
error: i,
|
|
896
|
-
error_description:
|
|
897
|
-
error_uri:
|
|
856
|
+
error_description: A(n, "error_description"),
|
|
857
|
+
error_uri: A(n, "error_uri")
|
|
898
858
|
};
|
|
899
|
-
const c =
|
|
859
|
+
const c = A(n, "id_token"), p = A(n, "token");
|
|
900
860
|
if (c !== void 0 || p !== void 0)
|
|
901
|
-
throw new
|
|
902
|
-
return
|
|
861
|
+
throw new T("implicit and hybrid flows are not supported");
|
|
862
|
+
return Tt(new URLSearchParams(n));
|
|
903
863
|
}
|
|
904
|
-
function
|
|
864
|
+
function zt({
|
|
905
865
|
handleCallback: t
|
|
906
866
|
}) {
|
|
907
|
-
const e =
|
|
867
|
+
const e = je({
|
|
908
868
|
retry: !1,
|
|
909
869
|
queryKey: ["oauth-callback"],
|
|
910
870
|
queryFn: async () => {
|
|
911
871
|
try {
|
|
912
872
|
return await t();
|
|
913
873
|
} catch (n) {
|
|
914
|
-
throw new
|
|
874
|
+
throw new ze("Could not validate user", {
|
|
915
875
|
cause: n,
|
|
916
876
|
title: "Authentication Error",
|
|
917
877
|
developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
|
|
@@ -919,17 +879,17 @@ function Dt({
|
|
|
919
879
|
}
|
|
920
880
|
}
|
|
921
881
|
});
|
|
922
|
-
return /* @__PURE__ */
|
|
882
|
+
return /* @__PURE__ */ B.jsx(Oe, { to: e.data });
|
|
923
883
|
}
|
|
924
|
-
class
|
|
884
|
+
class R extends Error {
|
|
925
885
|
}
|
|
926
|
-
class
|
|
886
|
+
class pe extends R {
|
|
927
887
|
constructor(e, n, o) {
|
|
928
888
|
super(e, o), this.error = n;
|
|
929
889
|
}
|
|
930
890
|
}
|
|
931
|
-
const
|
|
932
|
-
class
|
|
891
|
+
const M = "code-verifier", q = "oauth-state";
|
|
892
|
+
class Dt extends Je {
|
|
933
893
|
constructor(e, n) {
|
|
934
894
|
super(), this.callbackUrlPath = e, this.handleCallback = n;
|
|
935
895
|
}
|
|
@@ -938,32 +898,39 @@ class Nt extends ze {
|
|
|
938
898
|
...super.getRoutes(),
|
|
939
899
|
{
|
|
940
900
|
path: this.callbackUrlPath,
|
|
941
|
-
element: /* @__PURE__ */
|
|
901
|
+
element: /* @__PURE__ */ B.jsx(Ie, { children: /* @__PURE__ */ B.jsx(zt, { handleCallback: this.handleCallback }) })
|
|
942
902
|
}
|
|
943
903
|
];
|
|
944
904
|
}
|
|
945
905
|
}
|
|
946
|
-
class
|
|
906
|
+
class Nt {
|
|
947
907
|
constructor({
|
|
948
908
|
issuer: e,
|
|
949
909
|
audience: n,
|
|
950
910
|
clientId: o,
|
|
951
911
|
redirectToAfterSignUp: a,
|
|
952
912
|
redirectToAfterSignIn: r,
|
|
953
|
-
redirectToAfterSignOut: i
|
|
913
|
+
redirectToAfterSignOut: i,
|
|
914
|
+
basePath: c,
|
|
915
|
+
scopes: p
|
|
954
916
|
}) {
|
|
955
917
|
b(this, "client");
|
|
956
918
|
b(this, "issuer");
|
|
957
919
|
b(this, "authorizationServer");
|
|
958
|
-
b(this, "callbackUrlPath"
|
|
959
|
-
b(this, "logoutRedirectUrlPath"
|
|
920
|
+
b(this, "callbackUrlPath");
|
|
921
|
+
b(this, "logoutRedirectUrlPath");
|
|
960
922
|
b(this, "onAuthorizationUrl");
|
|
961
923
|
b(this, "redirectToAfterSignUp");
|
|
962
924
|
b(this, "redirectToAfterSignIn");
|
|
963
925
|
b(this, "redirectToAfterSignOut");
|
|
964
926
|
b(this, "audience");
|
|
927
|
+
b(this, "scopes");
|
|
928
|
+
b(this, "signRequest", async (e) => {
|
|
929
|
+
const n = await this.getAccessToken();
|
|
930
|
+
return e.headers.set("Authorization", `Bearer ${n}`), e;
|
|
931
|
+
});
|
|
965
932
|
b(this, "signOut", async () => {
|
|
966
|
-
|
|
933
|
+
x.setState({
|
|
967
934
|
isAuthenticated: !1,
|
|
968
935
|
isPending: !1,
|
|
969
936
|
profile: void 0,
|
|
@@ -980,57 +947,62 @@ class Kt {
|
|
|
980
947
|
)) : o = n;
|
|
981
948
|
});
|
|
982
949
|
b(this, "handleCallback", async () => {
|
|
983
|
-
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(
|
|
984
|
-
if (sessionStorage.removeItem(
|
|
985
|
-
throw new
|
|
986
|
-
const a =
|
|
987
|
-
|
|
950
|
+
const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(q);
|
|
951
|
+
if (sessionStorage.removeItem(q), n !== o)
|
|
952
|
+
throw new R("Invalid state parameter");
|
|
953
|
+
const a = sessionStorage.getItem(M);
|
|
954
|
+
if (sessionStorage.removeItem(M), !a)
|
|
955
|
+
throw new R("No code verifier found in state.");
|
|
956
|
+
const r = await this.getAuthServer(), i = Ot(
|
|
957
|
+
r,
|
|
988
958
|
this.client,
|
|
989
959
|
e.searchParams,
|
|
990
960
|
n ?? void 0
|
|
991
961
|
);
|
|
992
|
-
if (
|
|
993
|
-
throw
|
|
962
|
+
if (G(i))
|
|
963
|
+
throw se.error("Error validating OAuth response", i), new pe(
|
|
994
964
|
"Error validating OAuth response",
|
|
995
|
-
|
|
965
|
+
i
|
|
996
966
|
);
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
|
|
967
|
+
const c = new URL(e);
|
|
968
|
+
c.pathname = this.callbackUrlPath, c.search = "";
|
|
969
|
+
const p = await At(
|
|
970
|
+
r,
|
|
1001
971
|
this.client,
|
|
972
|
+
i,
|
|
973
|
+
c.toString(),
|
|
974
|
+
a
|
|
975
|
+
), w = await Pt(
|
|
1002
976
|
r,
|
|
1003
|
-
i.toString(),
|
|
1004
|
-
o
|
|
1005
|
-
), p = await Ut(
|
|
1006
|
-
a,
|
|
1007
977
|
this.client,
|
|
1008
|
-
|
|
978
|
+
p
|
|
1009
979
|
);
|
|
1010
|
-
this.setTokensFromResponse(
|
|
1011
|
-
const
|
|
1012
|
-
|
|
980
|
+
this.setTokensFromResponse(w);
|
|
981
|
+
const f = await this.getAccessToken(), _ = await (await gt(
|
|
982
|
+
r,
|
|
1013
983
|
this.client,
|
|
1014
|
-
|
|
1015
|
-
)).json(),
|
|
1016
|
-
sub:
|
|
1017
|
-
email:
|
|
1018
|
-
name:
|
|
1019
|
-
emailVerified:
|
|
1020
|
-
pictureUrl:
|
|
984
|
+
f
|
|
985
|
+
)).json(), h = {
|
|
986
|
+
sub: _.sub,
|
|
987
|
+
email: _.email,
|
|
988
|
+
name: _.name,
|
|
989
|
+
emailVerified: _.email_verified ?? !1,
|
|
990
|
+
pictureUrl: _.picture
|
|
1021
991
|
};
|
|
1022
|
-
|
|
992
|
+
x.setState({
|
|
1023
993
|
isAuthenticated: !0,
|
|
1024
994
|
isPending: !1,
|
|
1025
|
-
profile:
|
|
995
|
+
profile: h
|
|
1026
996
|
});
|
|
1027
|
-
const
|
|
1028
|
-
return sessionStorage.removeItem("redirect-to"),
|
|
997
|
+
const P = sessionStorage.getItem("redirect-to") ?? "/";
|
|
998
|
+
return sessionStorage.removeItem("redirect-to"), P;
|
|
1029
999
|
});
|
|
1030
1000
|
this.client = {
|
|
1031
1001
|
client_id: o,
|
|
1032
1002
|
token_endpoint_auth_method: "none"
|
|
1033
|
-
}, this.audience = n, this.issuer = e, this.
|
|
1003
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = ie(c, "/oauth/callback"), this.scopes = p ?? ["openid", "profile", "email"];
|
|
1004
|
+
const w = ie(c, "/");
|
|
1005
|
+
this.logoutRedirectUrlPath = w, this.redirectToAfterSignUp = a ?? w, this.redirectToAfterSignIn = r ?? w, this.redirectToAfterSignOut = i ?? w;
|
|
1034
1006
|
}
|
|
1035
1007
|
async getAuthServer() {
|
|
1036
1008
|
if (!this.authorizationServer) {
|
|
@@ -1047,17 +1019,18 @@ class Kt {
|
|
|
1047
1019
|
* @param response
|
|
1048
1020
|
*/
|
|
1049
1021
|
setTokensFromResponse(e) {
|
|
1050
|
-
if (
|
|
1051
|
-
throw
|
|
1022
|
+
if (G(e))
|
|
1023
|
+
throw se.error("Bad Token Response", e), new pe("Bad Token Response", e);
|
|
1052
1024
|
if (!e.expires_in)
|
|
1053
|
-
throw new
|
|
1025
|
+
throw new R("No expires_in in response");
|
|
1054
1026
|
const n = {
|
|
1055
1027
|
accessToken: e.access_token,
|
|
1056
1028
|
refreshToken: e.refresh_token,
|
|
1029
|
+
idToken: e.id_token,
|
|
1057
1030
|
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
1058
1031
|
tokenType: e.token_type
|
|
1059
1032
|
};
|
|
1060
|
-
|
|
1033
|
+
x.setState({
|
|
1061
1034
|
providerData: n
|
|
1062
1035
|
});
|
|
1063
1036
|
}
|
|
@@ -1076,64 +1049,62 @@ class Kt {
|
|
|
1076
1049
|
redirectTo: e,
|
|
1077
1050
|
isSignUp: n = !1
|
|
1078
1051
|
}) {
|
|
1079
|
-
var
|
|
1052
|
+
var v;
|
|
1080
1053
|
const o = "S256", a = await this.getAuthServer();
|
|
1081
1054
|
if (!a.authorization_endpoint)
|
|
1082
|
-
throw new
|
|
1055
|
+
throw new R("No authorization endpoint");
|
|
1083
1056
|
const r = nt(), i = await ot(r);
|
|
1084
|
-
sessionStorage.setItem(
|
|
1057
|
+
sessionStorage.setItem(M, r);
|
|
1085
1058
|
const c = new URL(
|
|
1086
1059
|
a.authorization_endpoint
|
|
1087
|
-
);
|
|
1088
|
-
sessionStorage.setItem("redirect-to",
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1060
|
+
), p = e.startsWith(window.location.origin) ? e.slice(window.location.origin.length) : e;
|
|
1061
|
+
sessionStorage.setItem("redirect-to", p);
|
|
1062
|
+
const w = new URL(window.location.origin);
|
|
1063
|
+
w.pathname = this.callbackUrlPath, w.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", w.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
|
|
1091
1064
|
"code_challenge_method",
|
|
1092
1065
|
o
|
|
1093
|
-
), this.audience && c.searchParams.set("audience", this.audience), (
|
|
1066
|
+
), this.audience && c.searchParams.set("audience", this.audience), (v = this.onAuthorizationUrl) == null || v.call(this, c, {
|
|
1094
1067
|
isSignIn: !n,
|
|
1095
1068
|
isSignUp: n
|
|
1096
|
-
})
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}
|
|
1100
|
-
location.href = c.href;
|
|
1069
|
+
});
|
|
1070
|
+
const f = rt();
|
|
1071
|
+
sessionStorage.setItem(q, f), c.searchParams.set("state", f), location.href = c.href;
|
|
1101
1072
|
}
|
|
1102
1073
|
async getAccessToken() {
|
|
1103
|
-
const e = await this.getAuthServer(), { providerData: n } =
|
|
1074
|
+
const e = await this.getAuthServer(), { providerData: n } = x.getState();
|
|
1104
1075
|
if (!n)
|
|
1105
|
-
throw new
|
|
1076
|
+
throw new R("User is not authenticated");
|
|
1106
1077
|
const o = n;
|
|
1107
1078
|
if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
|
|
1108
1079
|
if (!o.refreshToken)
|
|
1109
|
-
return
|
|
1080
|
+
return x.setState({
|
|
1110
1081
|
isAuthenticated: !1,
|
|
1111
1082
|
isPending: !1,
|
|
1112
1083
|
profile: null,
|
|
1113
1084
|
providerData: null
|
|
1114
1085
|
}), "";
|
|
1115
|
-
const a = await
|
|
1086
|
+
const a = await yt(
|
|
1116
1087
|
e,
|
|
1117
1088
|
this.client,
|
|
1118
1089
|
o.refreshToken
|
|
1119
|
-
), r = await
|
|
1090
|
+
), r = await _t(
|
|
1120
1091
|
e,
|
|
1121
1092
|
this.client,
|
|
1122
1093
|
a
|
|
1123
1094
|
);
|
|
1124
1095
|
if (!r.access_token)
|
|
1125
|
-
throw new
|
|
1096
|
+
throw new R("No access token in response");
|
|
1126
1097
|
return this.setTokensFromResponse(r), r.access_token.toString();
|
|
1127
1098
|
} else
|
|
1128
1099
|
return o.accessToken;
|
|
1129
1100
|
}
|
|
1130
1101
|
getAuthenticationPlugin() {
|
|
1131
|
-
return new
|
|
1102
|
+
return new Dt(this.callbackUrlPath, this.handleCallback);
|
|
1132
1103
|
}
|
|
1133
1104
|
}
|
|
1134
|
-
const
|
|
1105
|
+
const Vt = (t) => new Nt(t);
|
|
1135
1106
|
export {
|
|
1136
|
-
|
|
1137
|
-
|
|
1107
|
+
Nt as OpenIDAuthenticationProvider,
|
|
1108
|
+
Vt as default
|
|
1138
1109
|
};
|
|
1139
1110
|
//# sourceMappingURL=zudoku.auth-openid.js.map
|