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