zudoku 0.0.0-f40ea27 → 0.0.0-f42e3678

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.
Files changed (420) hide show
  1. package/README.md +2 -2
  2. package/dist/app/demo.js +16 -1
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/main.js +3 -9
  5. package/dist/app/main.js.map +1 -1
  6. package/dist/cli/build/handler.js +9 -1
  7. package/dist/cli/build/handler.js.map +1 -1
  8. package/dist/config/config.d.ts +1 -0
  9. package/dist/config/loader.js +2 -5
  10. package/dist/config/loader.js.map +1 -1
  11. package/dist/config/validators/BuildSchema.js +5 -0
  12. package/dist/config/validators/BuildSchema.js.map +1 -1
  13. package/dist/config/validators/InputNavigationSchema.d.ts +254 -163
  14. package/dist/config/validators/InputNavigationSchema.js +4 -4
  15. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  16. package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
  17. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
  18. package/dist/config/validators/NavigationSchema.js +3 -2
  19. package/dist/config/validators/NavigationSchema.js.map +1 -1
  20. package/dist/config/validators/ProtectedRoutesSchema.d.ts +12 -0
  21. package/dist/config/validators/ProtectedRoutesSchema.js +19 -0
  22. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
  23. package/dist/config/validators/icon-types.d.ts +1 -1
  24. package/dist/config/validators/icon-types.js +16 -0
  25. package/dist/config/validators/icon-types.js.map +1 -1
  26. package/dist/config/validators/validate.d.ts +36 -20
  27. package/dist/config/validators/validate.js +18 -4
  28. package/dist/config/validators/validate.js.map +1 -1
  29. package/dist/config/validators/validate.test.js +65 -2
  30. package/dist/config/validators/validate.test.js.map +1 -1
  31. package/dist/flat-config.d.ts +8 -6
  32. package/dist/lib/authentication/authentication.d.ts +2 -0
  33. package/dist/lib/authentication/components/CallbackHandler.js +11 -9
  34. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  35. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
  36. package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
  37. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
  38. package/dist/lib/authentication/components/SignIn.js +4 -3
  39. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  40. package/dist/lib/authentication/errors.d.ts +6 -12
  41. package/dist/lib/authentication/errors.js +2 -1
  42. package/dist/lib/authentication/errors.js.map +1 -1
  43. package/dist/lib/authentication/hook.d.ts +1 -0
  44. package/dist/lib/authentication/hook.js.map +1 -1
  45. package/dist/lib/authentication/providers/azureb2c.js +4 -2
  46. package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
  47. package/dist/lib/authentication/providers/clerk.js +4 -2
  48. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  49. package/dist/lib/authentication/providers/openid.d.ts +4 -2
  50. package/dist/lib/authentication/providers/openid.js +14 -6
  51. package/dist/lib/authentication/providers/openid.js.map +1 -1
  52. package/dist/lib/components/Banner.js +1 -1
  53. package/dist/lib/components/Banner.js.map +1 -1
  54. package/dist/lib/components/CategoryHeading.js +1 -1
  55. package/dist/lib/components/CategoryHeading.js.map +1 -1
  56. package/dist/lib/components/Header.js +1 -1
  57. package/dist/lib/components/Header.js.map +1 -1
  58. package/dist/lib/components/Heading.js +1 -1
  59. package/dist/lib/components/Heading.js.map +1 -1
  60. package/dist/lib/components/Markdown.js +2 -2
  61. package/dist/lib/components/Markdown.js.map +1 -1
  62. package/dist/lib/components/MobileTopNavigation.js +11 -6
  63. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  64. package/dist/lib/components/NotFoundPage.js +1 -1
  65. package/dist/lib/components/NotFoundPage.js.map +1 -1
  66. package/dist/lib/components/Pagination.js +1 -1
  67. package/dist/lib/components/Pagination.js.map +1 -1
  68. package/dist/lib/components/StatusPage.js +4 -0
  69. package/dist/lib/components/StatusPage.js.map +1 -1
  70. package/dist/lib/components/TopNavigation.d.ts +5 -0
  71. package/dist/lib/components/TopNavigation.js +20 -15
  72. package/dist/lib/components/TopNavigation.js.map +1 -1
  73. package/dist/lib/components/Typography.d.ts +1 -1
  74. package/dist/lib/components/Typography.js +1 -1
  75. package/dist/lib/components/Typography.js.map +1 -1
  76. package/dist/lib/components/context/ZudokuContext.js +21 -13
  77. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  78. package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
  79. package/dist/lib/components/navigation/NavigationItem.js +8 -1
  80. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  81. package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
  82. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  83. package/dist/lib/components/navigation/utils.d.ts +3 -1
  84. package/dist/lib/components/navigation/utils.js +6 -3
  85. package/dist/lib/components/navigation/utils.js.map +1 -1
  86. package/dist/lib/core/RouteGuard.js +9 -9
  87. package/dist/lib/core/RouteGuard.js.map +1 -1
  88. package/dist/lib/core/ZudokuContext.d.ts +5 -2
  89. package/dist/lib/core/ZudokuContext.js +27 -2
  90. package/dist/lib/core/ZudokuContext.js.map +1 -1
  91. package/dist/lib/core/plugins.d.ts +2 -1
  92. package/dist/lib/core/plugins.js.map +1 -1
  93. package/dist/lib/errors/ErrorAlert.js +1 -1
  94. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  95. package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
  96. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  97. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +6 -4
  98. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  99. package/dist/lib/plugins/api-keys/index.d.ts +1 -0
  100. package/dist/lib/plugins/api-keys/index.js +4 -8
  101. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  102. package/dist/lib/plugins/markdown/MdxPage.js +4 -3
  103. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  104. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  105. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  106. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  107. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  108. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  109. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  110. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  111. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  112. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  113. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
  114. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  115. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  116. package/dist/lib/plugins/openapi/index.js +43 -11
  117. package/dist/lib/plugins/openapi/index.js.map +1 -1
  118. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  119. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  120. package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
  121. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  122. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  123. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  124. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  125. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  126. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  127. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  128. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  129. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  130. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  131. package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
  132. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  133. package/dist/lib/ui/ActionButton.js +1 -1
  134. package/dist/lib/ui/ActionButton.js.map +1 -1
  135. package/dist/lib/ui/Alert.d.ts +1 -1
  136. package/dist/lib/ui/Badge.d.ts +1 -1
  137. package/dist/lib/ui/Button.d.ts +2 -2
  138. package/dist/lib/ui/CodeBlock.js +1 -1
  139. package/dist/lib/ui/CodeBlock.js.map +1 -1
  140. package/dist/lib/ui/Command.d.ts +1 -1
  141. package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
  142. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  143. package/dist/lib/util/invariant.d.ts +6 -5
  144. package/dist/lib/util/invariant.js +1 -1
  145. package/dist/lib/util/invariant.js.map +1 -1
  146. package/dist/vite/build.js +7 -1
  147. package/dist/vite/build.js.map +1 -1
  148. package/dist/vite/dev-server.js +9 -1
  149. package/dist/vite/dev-server.js.map +1 -1
  150. package/dist/vite/mdx/remark-last-modified.js +1 -28
  151. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  152. package/dist/vite/plugin-docs.js +20 -13
  153. package/dist/vite/plugin-docs.js.map +1 -1
  154. package/dist/vite/plugin-mdx.js +2 -3
  155. package/dist/vite/plugin-mdx.js.map +1 -1
  156. package/dist/vite/plugin-theme.js +88 -49
  157. package/dist/vite/plugin-theme.js.map +1 -1
  158. package/dist/vite/plugin-theme.test.js +25 -4
  159. package/dist/vite/plugin-theme.test.js.map +1 -1
  160. package/dist/vite/prerender/worker.js +5 -1
  161. package/dist/vite/prerender/worker.js.map +1 -1
  162. package/dist/vite/shadcn-registry.d.ts +8 -8
  163. package/lib/{Button-BE9IVkWV.js → Button-B3o-2Xdf.js} +2 -2
  164. package/lib/{Button-BE9IVkWV.js.map → Button-B3o-2Xdf.js.map} +1 -1
  165. package/lib/{Card-DPhGbYUM.js → Card-CMDQUPM4.js} +2 -2
  166. package/lib/{Card-DPhGbYUM.js.map → Card-CMDQUPM4.js.map} +1 -1
  167. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  168. package/lib/{CodeBlock-DAKxs_Tu.js → CodeBlock-B-G0eKtw.js} +3 -3
  169. package/lib/{CodeBlock-DAKxs_Tu.js.map → CodeBlock-B-G0eKtw.js.map} +1 -1
  170. package/lib/{Command-xsbs2uhf.js → Command-BYukybsa.js} +3 -3
  171. package/lib/{Command-xsbs2uhf.js.map → Command-BYukybsa.js.map} +1 -1
  172. package/lib/{Dialog-CiIdyz6a.js → Dialog-u9Uz9sTt.js} +5 -5
  173. package/lib/{Dialog-CiIdyz6a.js.map → Dialog-u9Uz9sTt.js.map} +1 -1
  174. package/lib/{Drawer-BzkOKwgC.js → Drawer-DJ05s2pH.js} +86 -86
  175. package/lib/{Drawer-BzkOKwgC.js.map → Drawer-DJ05s2pH.js.map} +1 -1
  176. package/lib/{MdxPage-swXPJ0gf.js → MdxPage-Bsko6_kb.js} +34 -34
  177. package/lib/MdxPage-Bsko6_kb.js.map +1 -0
  178. package/lib/OAuthErrorPage-DJzGiIBt.js +150 -0
  179. package/lib/OAuthErrorPage-DJzGiIBt.js.map +1 -0
  180. package/lib/{OasProvider-CDAM3TB1.js → OasProvider-DQQRt3oS.js} +3 -3
  181. package/lib/{OasProvider-CDAM3TB1.js.map → OasProvider-DQQRt3oS.js.map} +1 -1
  182. package/lib/{OperationList-C9Hb9ql8.js → OperationList-DpmkHf26.js} +212 -210
  183. package/lib/OperationList-DpmkHf26.js.map +1 -0
  184. package/lib/{Pagination-VGlgeCmS.js → Pagination-kqFNgtnI.js} +10 -9
  185. package/lib/Pagination-kqFNgtnI.js.map +1 -0
  186. package/lib/{RouteGuard-CbKd7_9h.js → RouteGuard-0wPUKdxJ.js} +166 -165
  187. package/lib/{RouteGuard-CbKd7_9h.js.map → RouteGuard-0wPUKdxJ.js.map} +1 -1
  188. package/lib/{SchemaList-BAbh1BXO.js → SchemaList-DS-pMd6B.js} +9 -9
  189. package/lib/{SchemaList-BAbh1BXO.js.map → SchemaList-DS-pMd6B.js.map} +1 -1
  190. package/lib/{SchemaView-C2Io712T.js → SchemaView-BnN6WHjw.js} +6 -6
  191. package/lib/{SchemaView-C2Io712T.js.map → SchemaView-BnN6WHjw.js.map} +1 -1
  192. package/lib/Select-BmTTKNPp.js +273 -0
  193. package/lib/Select-BmTTKNPp.js.map +1 -0
  194. package/lib/SignUp-BwOSCD-6.js +56 -0
  195. package/lib/SignUp-BwOSCD-6.js.map +1 -0
  196. package/lib/{Slot-DwZlQ-vX.js → Slot-DAyXieeZ.js} +1634 -1643
  197. package/lib/Slot-DAyXieeZ.js.map +1 -0
  198. package/lib/Spinner-mNLZ6awP.js.map +1 -1
  199. package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-BMKR4pl6.js} +757 -757
  200. package/lib/SyntaxHighlight-BMKR4pl6.js.map +1 -0
  201. package/lib/{Toc-WCmwFkX-.js → Toc-BKDRCQzU.js} +3 -3
  202. package/lib/{Toc-WCmwFkX-.js.map → Toc-BKDRCQzU.js.map} +1 -1
  203. package/lib/ZudokuContext-CLl5w57E.js +1278 -0
  204. package/lib/ZudokuContext-CLl5w57E.js.map +1 -0
  205. package/lib/{chunk-DQRVZFIR-DHK7_Ilc.js → chunk-QMGIS6GS-CEOk3lro.js} +3 -3
  206. package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +1 -0
  207. package/lib/{circular-B42RaanD.js → circular-8GWQDvCW.js} +2 -2
  208. package/lib/{circular-B42RaanD.js.map → circular-8GWQDvCW.js.map} +1 -1
  209. package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
  210. package/lib/cn-dYga0KKN.js.map +1 -0
  211. package/lib/{createServer-BKFsRuuk.js → createServer-BsezSzvV.js} +3398 -3552
  212. package/lib/createServer-BsezSzvV.js.map +1 -0
  213. package/lib/errors-Cs7hKmdL.js +45 -0
  214. package/lib/errors-Cs7hKmdL.js.map +1 -0
  215. package/lib/hook-DbUCLQNg.js +247 -0
  216. package/lib/hook-DbUCLQNg.js.map +1 -0
  217. package/lib/index-A5Qdwj1B.js +4081 -0
  218. package/lib/index-A5Qdwj1B.js.map +1 -0
  219. package/lib/{index-B6Re5_cx.js → index-Bg7Js3jB.js} +873 -951
  220. package/lib/index-Bg7Js3jB.js.map +1 -0
  221. package/lib/{index-CcV90rin.js → index-BkW9tJ6j.js} +2 -2
  222. package/lib/{index-CcV90rin.js.map → index-BkW9tJ6j.js.map} +1 -1
  223. package/lib/index-Bm35Tkgf.js +107 -0
  224. package/lib/index-Bm35Tkgf.js.map +1 -0
  225. package/lib/index-CrcNWbel.js.map +1 -1
  226. package/lib/index-DI5SPFK9.js.map +1 -1
  227. package/lib/index-DmNq2fbN.js.map +1 -1
  228. package/lib/index.esm-CdzlRw50.js +1254 -0
  229. package/lib/index.esm-CdzlRw50.js.map +1 -0
  230. package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
  231. package/lib/invariant-Bm-FVUQE.js.map +1 -0
  232. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
  233. package/lib/processors/removeExtensions.js.map +1 -1
  234. package/lib/processors/removeParameters.js.map +1 -1
  235. package/lib/processors/removePaths.js.map +1 -1
  236. package/lib/processors/traverse.js.map +1 -1
  237. package/lib/ui/Accordion.js +1 -1
  238. package/lib/ui/Accordion.js.map +1 -1
  239. package/lib/ui/ActionButton.js +10 -10
  240. package/lib/ui/ActionButton.js.map +1 -1
  241. package/lib/ui/Alert.js +1 -1
  242. package/lib/ui/Alert.js.map +1 -1
  243. package/lib/ui/AlertDialog.js +1 -1
  244. package/lib/ui/AlertDialog.js.map +1 -1
  245. package/lib/ui/Badge.js +1 -1
  246. package/lib/ui/Badge.js.map +1 -1
  247. package/lib/ui/Breadcrumb.js +1 -1
  248. package/lib/ui/Breadcrumb.js.map +1 -1
  249. package/lib/ui/Button.js +1 -1
  250. package/lib/ui/Button.js.map +1 -1
  251. package/lib/ui/Callout.js +1 -1
  252. package/lib/ui/Callout.js.map +1 -1
  253. package/lib/ui/Card.js +1 -1
  254. package/lib/ui/Card.js.map +1 -1
  255. package/lib/ui/Carousel.js +1 -1
  256. package/lib/ui/Carousel.js.map +1 -1
  257. package/lib/ui/Checkbox.js +1 -1
  258. package/lib/ui/Checkbox.js.map +1 -1
  259. package/lib/ui/CodeBlock.js +2 -2
  260. package/lib/ui/Command.js +2 -2
  261. package/lib/ui/Command.js.map +1 -1
  262. package/lib/ui/Dialog.js +1 -1
  263. package/lib/ui/Dialog.js.map +1 -1
  264. package/lib/ui/Drawer.js +2 -2
  265. package/lib/ui/DropdownMenu.js +1 -1
  266. package/lib/ui/DropdownMenu.js.map +1 -1
  267. package/lib/ui/EmbeddedCodeBlock.js +2 -2
  268. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  269. package/lib/ui/Form.js +2 -2
  270. package/lib/ui/Form.js.map +1 -1
  271. package/lib/ui/HoverCard.js +1 -1
  272. package/lib/ui/HoverCard.js.map +1 -1
  273. package/lib/ui/Input.js +1 -1
  274. package/lib/ui/Input.js.map +1 -1
  275. package/lib/ui/Label.js +1 -1
  276. package/lib/ui/Label.js.map +1 -1
  277. package/lib/ui/Pagination.js +1 -1
  278. package/lib/ui/Pagination.js.map +1 -1
  279. package/lib/ui/Popover.js +1 -1
  280. package/lib/ui/Popover.js.map +1 -1
  281. package/lib/ui/Progress.js +1 -1
  282. package/lib/ui/Progress.js.map +1 -1
  283. package/lib/ui/RadioGroup.js +1 -1
  284. package/lib/ui/RadioGroup.js.map +1 -1
  285. package/lib/ui/ScrollArea.js +1 -1
  286. package/lib/ui/ScrollArea.js.map +1 -1
  287. package/lib/ui/Select.js +1 -1
  288. package/lib/ui/Select.js.map +1 -1
  289. package/lib/ui/Skeleton.js +1 -1
  290. package/lib/ui/Skeleton.js.map +1 -1
  291. package/lib/ui/Slider.js +1 -1
  292. package/lib/ui/Slider.js.map +1 -1
  293. package/lib/ui/Stepper.js.map +1 -1
  294. package/lib/ui/Switch.js +1 -1
  295. package/lib/ui/Switch.js.map +1 -1
  296. package/lib/ui/SyntaxHighlight.js +4 -4
  297. package/lib/ui/Tabs.js +1 -1
  298. package/lib/ui/Tabs.js.map +1 -1
  299. package/lib/ui/Textarea.js +1 -1
  300. package/lib/ui/Textarea.js.map +1 -1
  301. package/lib/ui/Toggle.js +1 -1
  302. package/lib/ui/Toggle.js.map +1 -1
  303. package/lib/ui/ToggleGroup.js +1 -1
  304. package/lib/ui/ToggleGroup.js.map +1 -1
  305. package/lib/ui/Tooltip.js +1 -1
  306. package/lib/ui/Tooltip.js.map +1 -1
  307. package/lib/ui/util.js +1 -1
  308. package/lib/{useExposedProps-BIYjecPD.js → useExposedProps-KcgXHKeE.js} +2 -2
  309. package/lib/{useExposedProps-BIYjecPD.js.map → useExposedProps-KcgXHKeE.js.map} +1 -1
  310. package/lib/zudoku.auth-auth0.js +1 -1
  311. package/lib/zudoku.auth-auth0.js.map +1 -1
  312. package/lib/zudoku.auth-azureb2c.js +46 -9883
  313. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  314. package/lib/zudoku.auth-clerk.js +25 -22
  315. package/lib/zudoku.auth-clerk.js.map +1 -1
  316. package/lib/zudoku.auth-openid.js +249 -231
  317. package/lib/zudoku.auth-openid.js.map +1 -1
  318. package/lib/zudoku.auth-supabase.js +97 -0
  319. package/lib/zudoku.auth-supabase.js.map +1 -0
  320. package/lib/zudoku.components.js +30 -29
  321. package/lib/zudoku.components.js.map +1 -1
  322. package/lib/zudoku.hooks.js +17 -16
  323. package/lib/zudoku.hooks.js.map +1 -1
  324. package/lib/zudoku.icons.js.map +1 -1
  325. package/lib/zudoku.plugin-api-catalog.js +26 -25
  326. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  327. package/lib/zudoku.plugin-api-keys.js +428 -299
  328. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  329. package/lib/zudoku.plugin-custom-pages.js +1 -1
  330. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  331. package/lib/zudoku.plugin-markdown.js +1 -1
  332. package/lib/zudoku.plugin-markdown.js.map +1 -1
  333. package/lib/zudoku.plugin-openapi.js +7 -6
  334. package/lib/zudoku.plugin-openapi.js.map +1 -1
  335. package/lib/zudoku.plugin-redirect.js +1 -1
  336. package/lib/zudoku.plugin-redirect.js.map +1 -1
  337. package/lib/zudoku.plugin-search-inkeep.js +54 -57
  338. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  339. package/lib/zudoku.plugin-search-pagefind.js +123 -118
  340. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  341. package/lib/zudoku.plugins.js.map +1 -1
  342. package/package.json +34 -33
  343. package/src/app/demo.tsx +19 -2
  344. package/src/app/main.css +26 -5
  345. package/src/app/main.tsx +6 -14
  346. package/src/lib/authentication/authentication.ts +2 -2
  347. package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
  348. package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
  349. package/src/lib/authentication/components/SignIn.tsx +5 -12
  350. package/src/lib/authentication/errors.ts +27 -13
  351. package/src/lib/authentication/hook.ts +2 -0
  352. package/src/lib/authentication/providers/azureb2c.tsx +8 -3
  353. package/src/lib/authentication/providers/clerk.tsx +4 -1
  354. package/src/lib/authentication/providers/openid.tsx +30 -5
  355. package/src/lib/components/Banner.tsx +0 -1
  356. package/src/lib/components/CategoryHeading.tsx +4 -1
  357. package/src/lib/components/Header.tsx +5 -2
  358. package/src/lib/components/Heading.tsx +1 -1
  359. package/src/lib/components/Markdown.tsx +3 -3
  360. package/src/lib/components/MobileTopNavigation.tsx +60 -8
  361. package/src/lib/components/NotFoundPage.tsx +3 -2
  362. package/src/lib/components/Pagination.tsx +1 -0
  363. package/src/lib/components/StatusPage.tsx +5 -0
  364. package/src/lib/components/TopNavigation.tsx +34 -18
  365. package/src/lib/components/Typography.tsx +1 -1
  366. package/src/lib/components/context/ZudokuContext.ts +25 -18
  367. package/src/lib/components/navigation/NavigationItem.tsx +9 -1
  368. package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
  369. package/src/lib/components/navigation/utils.ts +9 -3
  370. package/src/lib/core/RouteGuard.tsx +13 -13
  371. package/src/lib/core/ZudokuContext.ts +40 -5
  372. package/src/lib/core/plugins.ts +2 -1
  373. package/src/lib/errors/ErrorAlert.tsx +5 -7
  374. package/src/lib/plugins/api-keys/CreateApiKey.tsx +12 -1
  375. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +37 -13
  376. package/src/lib/plugins/api-keys/index.tsx +8 -9
  377. package/src/lib/plugins/markdown/MdxPage.tsx +4 -3
  378. package/src/lib/plugins/openapi/OperationList.tsx +4 -2
  379. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  380. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
  381. package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
  382. package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
  383. package/src/lib/plugins/openapi/index.tsx +67 -17
  384. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  385. package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
  386. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  387. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  388. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
  389. package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
  390. package/src/lib/ui/ActionButton.tsx +3 -1
  391. package/src/lib/ui/Alert.tsx +1 -1
  392. package/src/lib/ui/CodeBlock.tsx +1 -1
  393. package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
  394. package/src/lib/util/invariant.ts +7 -5
  395. package/lib/Alert-CT_ViLrJ.js +0 -161
  396. package/lib/Alert-CT_ViLrJ.js.map +0 -1
  397. package/lib/MdxPage-swXPJ0gf.js.map +0 -1
  398. package/lib/OperationList-C9Hb9ql8.js.map +0 -1
  399. package/lib/Pagination-VGlgeCmS.js.map +0 -1
  400. package/lib/SignUp-5RUdVhnq.js +0 -63
  401. package/lib/SignUp-5RUdVhnq.js.map +0 -1
  402. package/lib/Slot-DwZlQ-vX.js.map +0 -1
  403. package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
  404. package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
  405. package/lib/clerk-BDZ31hjU.js +0 -25190
  406. package/lib/clerk-BDZ31hjU.js.map +0 -1
  407. package/lib/cn-wvCW-ho6.js.map +0 -1
  408. package/lib/createServer-BKFsRuuk.js.map +0 -1
  409. package/lib/errors-CF2X_x5o.js +0 -78
  410. package/lib/errors-CF2X_x5o.js.map +0 -1
  411. package/lib/hook-Bd0yS8M0.js +0 -1503
  412. package/lib/hook-Bd0yS8M0.js.map +0 -1
  413. package/lib/index-B6Re5_cx.js.map +0 -1
  414. package/lib/index-CLy1XyH0.js +0 -3919
  415. package/lib/index-CLy1XyH0.js.map +0 -1
  416. package/lib/index-ClhS5TxS.js +0 -107
  417. package/lib/index-ClhS5TxS.js.map +0 -1
  418. package/lib/index.esm-Cp4wkyud.js +0 -1236
  419. package/lib/index.esm-Cp4wkyud.js.map +0 -1
  420. package/lib/invariant-DAFpPywt.js.map +0 -1
@@ -1,14 +1,17 @@
1
- import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
2
- import { g as Le } from "./invariant-DAFpPywt.js";
3
- import { C as Ue } from "./ClientOnly-E7hGysn1.js";
4
- import { j as xe, u as S } from "./hook-Bd0yS8M0.js";
5
- import { C as Ce, O as re, A as R, a as Ie } from "./errors-CF2X_x5o.js";
6
- var O = { exports: {} }, je = O.exports, oe;
7
- function De() {
1
+ import { j as D } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { g as Le } from "./invariant-Bm-FVUQE.js";
3
+ import { E as Ue } from "./index-A5Qdwj1B.js";
4
+ import { C as xe } from "./ClientOnly-E7hGysn1.js";
5
+ import { j as Ce } from "./ZudokuContext-CLl5w57E.js";
6
+ import { C as Ie, O as re, A as R } from "./errors-Cs7hKmdL.js";
7
+ import { C as je, O as Oe } from "./OAuthErrorPage-DJzGiIBt.js";
8
+ import { u as S } from "./hook-DbUCLQNg.js";
9
+ var J = { exports: {} }, De = J.exports, oe;
10
+ function Je() {
8
11
  return oe || (oe = 1, function(t) {
9
12
  (function(e, n) {
10
13
  t.exports ? t.exports = n() : e.log = n();
11
- })(je, function() {
14
+ })(De, function() {
12
15
  var e = function() {
13
16
  }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
14
17
  "trace",
@@ -17,28 +20,28 @@ function De() {
17
20
  "warn",
18
21
  "error"
19
22
  ], r = {}, i = null;
20
- function c(l, m) {
21
- var u = l[m];
22
- if (typeof u.bind == "function")
23
- return u.bind(l);
23
+ function u(l, m) {
24
+ var c = l[m];
25
+ if (typeof c.bind == "function")
26
+ return c.bind(l);
24
27
  try {
25
- return Function.prototype.bind.call(u, l);
28
+ return Function.prototype.bind.call(c, l);
26
29
  } catch {
27
30
  return function() {
28
- return Function.prototype.apply.apply(u, [l, arguments]);
31
+ return Function.prototype.apply.apply(c, [l, arguments]);
29
32
  };
30
33
  }
31
34
  }
32
- function f() {
35
+ function d() {
33
36
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
34
37
  }
35
38
  function y(l) {
36
- return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? f : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
39
+ return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? d : console[l] !== void 0 ? u(console, l) : console.log !== void 0 ? u(console, "log") : e;
37
40
  }
38
41
  function p() {
39
42
  for (var l = this.getLevel(), m = 0; m < s.length; m++) {
40
- var u = s[m];
41
- this[u] = m < l ? e : this.methodFactory(u, l, this.name);
43
+ var c = s[m];
44
+ this[c] = m < l ? e : this.methodFactory(c, l, this.name);
42
45
  }
43
46
  if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
44
47
  return "No console available for logging";
@@ -48,14 +51,14 @@ function De() {
48
51
  typeof console !== n && (p.call(this), this[l].apply(this, arguments));
49
52
  };
50
53
  }
51
- function b(l, m, u) {
54
+ function b(l, m, c) {
52
55
  return y(l) || k.apply(this, arguments);
53
56
  }
54
57
  function h(l, m) {
55
- var u = this, j, K, L, _ = "loglevel";
58
+ var c = this, j, H, L, _ = "loglevel";
56
59
  typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
57
- function Ee(d) {
58
- var g = (s[d] || "silent").toUpperCase();
60
+ function Ee(f) {
61
+ var g = (s[f] || "silent").toUpperCase();
59
62
  if (!(typeof window === n || !_)) {
60
63
  try {
61
64
  window.localStorage[_] = g;
@@ -68,22 +71,22 @@ function De() {
68
71
  }
69
72
  }
70
73
  }
71
- function X() {
72
- var d;
74
+ function ee() {
75
+ var f;
73
76
  if (!(typeof window === n || !_)) {
74
77
  try {
75
- d = window.localStorage[_];
78
+ f = window.localStorage[_];
76
79
  } catch {
77
80
  }
78
- if (typeof d === n)
81
+ if (typeof f === n)
79
82
  try {
80
- var g = window.document.cookie, D = encodeURIComponent(_), te = g.indexOf(D + "=");
81
- te !== -1 && (d = /^([^;]+)/.exec(
82
- g.slice(te + D.length + 1)
83
+ var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
84
+ ne !== -1 && (f = /^([^;]+)/.exec(
85
+ g.slice(ne + O.length + 1)
83
86
  )[1]);
84
87
  } catch {
85
88
  }
86
- return u.levels[d] === void 0 && (d = void 0), d;
89
+ return c.levels[f] === void 0 && (f = void 0), f;
87
90
  }
88
91
  }
89
92
  function Re() {
@@ -98,49 +101,49 @@ function De() {
98
101
  }
99
102
  }
100
103
  }
101
- function U(d) {
102
- var g = d;
103
- if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
104
+ function U(f) {
105
+ var g = f;
106
+ if (typeof g == "string" && c.levels[g.toUpperCase()] !== void 0 && (g = c.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= c.levels.SILENT)
104
107
  return g;
105
- throw new TypeError("log.setLevel() called with invalid level: " + d);
108
+ throw new TypeError("log.setLevel() called with invalid level: " + f);
106
109
  }
107
- u.name = l, u.levels = {
110
+ c.name = l, c.levels = {
108
111
  TRACE: 0,
109
112
  DEBUG: 1,
110
113
  INFO: 2,
111
114
  WARN: 3,
112
115
  ERROR: 4,
113
116
  SILENT: 5
114
- }, u.methodFactory = m || b, u.getLevel = function() {
115
- return L ?? K ?? j;
116
- }, u.setLevel = function(d, g) {
117
- return L = U(d), g !== !1 && Ee(L), p.call(u);
118
- }, u.setDefaultLevel = function(d) {
119
- K = U(d), X() || u.setLevel(d, !1);
120
- }, u.resetLevel = function() {
121
- L = null, Re(), p.call(u);
122
- }, u.enableAll = function(d) {
123
- u.setLevel(u.levels.TRACE, d);
124
- }, u.disableAll = function(d) {
125
- u.setLevel(u.levels.SILENT, d);
126
- }, u.rebuild = function() {
127
- if (i !== u && (j = U(i.getLevel())), p.call(u), i === u)
128
- for (var d in r)
129
- r[d].rebuild();
117
+ }, c.methodFactory = m || b, c.getLevel = function() {
118
+ return L ?? H ?? j;
119
+ }, c.setLevel = function(f, g) {
120
+ return L = U(f), g !== !1 && Ee(L), p.call(c);
121
+ }, c.setDefaultLevel = function(f) {
122
+ H = U(f), ee() || c.setLevel(f, !1);
123
+ }, c.resetLevel = function() {
124
+ L = null, Re(), p.call(c);
125
+ }, c.enableAll = function(f) {
126
+ c.setLevel(c.levels.TRACE, f);
127
+ }, c.disableAll = function(f) {
128
+ c.setLevel(c.levels.SILENT, f);
129
+ }, c.rebuild = function() {
130
+ if (i !== c && (j = U(i.getLevel())), p.call(c), i === c)
131
+ for (var f in r)
132
+ r[f].rebuild();
130
133
  }, j = U(
131
134
  i ? i.getLevel() : "WARN"
132
135
  );
133
- var ee = X();
134
- ee != null && (L = U(ee)), p.call(u);
136
+ var te = ee();
137
+ te != null && (L = U(te)), p.call(c);
135
138
  }
136
139
  i = new h(), i.getLogger = function(m) {
137
140
  if (typeof m != "symbol" && typeof m != "string" || m === "")
138
141
  throw new TypeError("You must supply a name when creating a logger.");
139
- var u = r[m];
140
- return u || (u = r[m] = new h(
142
+ var c = r[m];
143
+ return c || (c = r[m] = new h(
141
144
  m,
142
145
  i.methodFactory
143
- )), u;
146
+ )), c;
144
147
  };
145
148
  var P = typeof window !== n ? window.log : void 0;
146
149
  return i.noConflict = function() {
@@ -149,13 +152,13 @@ function De() {
149
152
  return r;
150
153
  }, i.default = i, i;
151
154
  });
152
- }(O)), O.exports;
155
+ }(J)), J.exports;
153
156
  }
154
- var Oe = De();
155
- const ie = /* @__PURE__ */ Le(Oe);
156
- let M;
157
- (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (M = "oauth4webapi/v2.17.0");
158
- function q(t, e) {
157
+ var ze = Je();
158
+ const ie = /* @__PURE__ */ Le(ze);
159
+ let B;
160
+ (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
161
+ function V(t, e) {
159
162
  if (t == null)
160
163
  return !1;
161
164
  try {
@@ -164,19 +167,19 @@ function q(t, e) {
164
167
  return !1;
165
168
  }
166
169
  }
167
- const z = Symbol(), Je = Symbol(), V = Symbol(), ze = Symbol(), Ne = Symbol(), We = Symbol(), Ke = new TextEncoder(), He = new TextDecoder();
170
+ const N = Symbol(), Ne = Symbol(), G = Symbol(), We = Symbol(), Ke = Symbol(), He = Symbol(), $e = new TextEncoder(), Fe = new TextDecoder();
168
171
  function E(t) {
169
- return typeof t == "string" ? Ke.encode(t) : He.decode(t);
172
+ return typeof t == "string" ? $e.encode(t) : Fe.decode(t);
170
173
  }
171
174
  const se = 32768;
172
- function $e(t) {
175
+ function Me(t) {
173
176
  t instanceof ArrayBuffer && (t = new Uint8Array(t));
174
177
  const e = [];
175
178
  for (let n = 0; n < t.byteLength; n += se)
176
179
  e.push(String.fromCharCode.apply(null, t.subarray(n, n + se)));
177
180
  return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
178
181
  }
179
- function Fe(t) {
182
+ function Be(t) {
180
183
  try {
181
184
  const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
182
185
  for (let o = 0; o < e.length; o++)
@@ -187,9 +190,9 @@ function Fe(t) {
187
190
  }
188
191
  }
189
192
  function A(t) {
190
- return typeof t == "string" ? Fe(t) : $e(t);
193
+ return typeof t == "string" ? Be(t) : Me(t);
191
194
  }
192
- class Me {
195
+ class qe {
193
196
  constructor(e) {
194
197
  this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
195
198
  }
@@ -218,22 +221,22 @@ class v extends Error {
218
221
  super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
219
222
  }
220
223
  }
221
- class Be extends Error {
224
+ class Ve extends Error {
222
225
  constructor(e, n) {
223
226
  super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
224
227
  }
225
228
  }
226
- const a = Be, we = new Me(100);
229
+ const a = Ve, we = new qe(100);
227
230
  function me(t) {
228
231
  return t instanceof CryptoKey;
229
232
  }
230
- function qe(t) {
233
+ function Ge(t) {
231
234
  return me(t) && t.type === "private";
232
235
  }
233
- function Ve(t) {
236
+ function Ye(t) {
234
237
  return me(t) && t.type === "public";
235
238
  }
236
- function G(t) {
239
+ function Y(t) {
237
240
  try {
238
241
  const e = t.headers.get("dpop-nonce");
239
242
  e && we.set(new URL(t.url).origin, e);
@@ -244,21 +247,21 @@ function G(t) {
244
247
  function x(t) {
245
248
  return !(t === null || typeof t != "object" || Array.isArray(t));
246
249
  }
247
- function N(t) {
248
- q(t, Headers) && (t = Object.fromEntries(t.entries()));
250
+ function W(t) {
251
+ V(t, Headers) && (t = Object.fromEntries(t.entries()));
249
252
  const e = new Headers(t);
250
- if (M && !e.has("user-agent") && e.set("user-agent", M), e.has("authorization"))
253
+ if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
251
254
  throw new TypeError('"options.headers" must not include the "authorization" header name');
252
255
  if (e.has("dpop"))
253
256
  throw new TypeError('"options.headers" must not include the "dpop" header name');
254
257
  return e;
255
258
  }
256
- function Ge(t) {
259
+ function Ze(t) {
257
260
  if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
258
261
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
259
262
  return t;
260
263
  }
261
- async function Ye(t, e) {
264
+ async function Qe(t, e) {
262
265
  if (!(t instanceof URL))
263
266
  throw new TypeError('"issuerIdentifier" must be an instance of URL');
264
267
  if (t.protocol !== "https:" && t.protocol !== "http:")
@@ -275,25 +278,25 @@ async function Ye(t, e) {
275
278
  default:
276
279
  throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
277
280
  }
278
- const o = N(e?.headers);
279
- return o.set("accept", "application/json"), (e?.[V] || fetch)(n.href, {
281
+ const o = W(e?.headers);
282
+ return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
280
283
  headers: Object.fromEntries(o.entries()),
281
284
  method: "GET",
282
285
  redirect: "manual",
283
286
  signal: null
284
- }).then(G);
287
+ }).then(Y);
285
288
  }
286
289
  function w(t) {
287
290
  return typeof t == "string" && t.length !== 0;
288
291
  }
289
- async function Ze(t, e) {
292
+ async function Xe(t, e) {
290
293
  if (!(t instanceof URL))
291
294
  throw new TypeError('"expectedIssuer" must be an instance of URL');
292
- if (!q(e, Response))
295
+ if (!V(e, Response))
293
296
  throw new TypeError('"response" must be an instance of Response');
294
297
  if (e.status !== 200)
295
298
  throw new a('"response" is not a conform Authorization Server Metadata response');
296
- Q(e);
299
+ X(e);
297
300
  let n;
298
301
  try {
299
302
  n = await e.json();
@@ -308,16 +311,16 @@ async function Ze(t, e) {
308
311
  throw new a('"response" body "issuer" does not match "expectedIssuer"');
309
312
  return n;
310
313
  }
311
- function Y() {
314
+ function Z() {
312
315
  return A(crypto.getRandomValues(new Uint8Array(32)));
313
316
  }
314
- function Qe() {
315
- return Y();
317
+ function et() {
318
+ return Z();
316
319
  }
317
- function Xe() {
318
- return Y();
320
+ function tt() {
321
+ return Z();
319
322
  }
320
- async function et(t) {
323
+ async function nt(t) {
321
324
  if (!w(t))
322
325
  throw new TypeError('"codeVerifier" must be a non-empty string');
323
326
  return A(await crypto.subtle.digest("SHA-256", E(t)));
@@ -325,11 +328,11 @@ async function et(t) {
325
328
  function ae(t) {
326
329
  return encodeURIComponent(t).replace(/%20/g, "+");
327
330
  }
328
- function tt(t, e) {
331
+ function rt(t, e) {
329
332
  const n = ae(t), o = ae(e);
330
333
  return `Basic ${btoa(`${n}:${o}`)}`;
331
334
  }
332
- function nt(t) {
335
+ function ot(t) {
333
336
  switch (t.algorithm.hash.name) {
334
337
  case "SHA-256":
335
338
  return "PS256";
@@ -341,7 +344,7 @@ function nt(t) {
341
344
  throw new v("unsupported RsaHashedKeyAlgorithm hash name");
342
345
  }
343
346
  }
344
- function rt(t) {
347
+ function it(t) {
345
348
  switch (t.algorithm.hash.name) {
346
349
  case "SHA-256":
347
350
  return "RS256";
@@ -353,7 +356,7 @@ function rt(t) {
353
356
  throw new v("unsupported RsaHashedKeyAlgorithm hash name");
354
357
  }
355
358
  }
356
- function ot(t) {
359
+ function st(t) {
357
360
  switch (t.algorithm.namedCurve) {
358
361
  case "P-256":
359
362
  return "ES256";
@@ -365,14 +368,14 @@ function ot(t) {
365
368
  throw new v("unsupported EcKeyAlgorithm namedCurve");
366
369
  }
367
370
  }
368
- function it(t) {
371
+ function at(t) {
369
372
  switch (t.algorithm.name) {
370
373
  case "RSA-PSS":
371
- return nt(t);
374
+ return ot(t);
372
375
  case "RSASSA-PKCS1-v1_5":
373
- return rt(t);
376
+ return it(t);
374
377
  case "ECDSA":
375
- return ot(t);
378
+ return st(t);
376
379
  case "Ed25519":
377
380
  case "Ed448":
378
381
  return "EdDSA";
@@ -380,15 +383,15 @@ function it(t) {
380
383
  throw new v("unsupported CryptoKey algorithm name");
381
384
  }
382
385
  }
383
- function W(t) {
384
- const e = t?.[z];
386
+ function K(t) {
387
+ const e = t?.[N];
385
388
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
386
389
  }
387
390
  function ge(t) {
388
- const e = t?.[Je];
391
+ const e = t?.[Ne];
389
392
  return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
390
393
  }
391
- function Z() {
394
+ function Q() {
392
395
  return Math.floor(Date.now() / 1e3);
393
396
  }
394
397
  function C(t) {
@@ -414,11 +417,11 @@ function ue(t, e) {
414
417
  if (e !== void 0)
415
418
  throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
416
419
  }
417
- async function st(t, e, n, o, s) {
420
+ async function ct(t, e, n, o, s) {
418
421
  switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
419
422
  case void 0:
420
423
  case "client_secret_basic": {
421
- o.set("authorization", tt(e.client_id, ce(e.client_secret)));
424
+ o.set("authorization", rt(e.client_id, ce(e.client_secret)));
422
425
  break;
423
426
  }
424
427
  case "client_secret_post": {
@@ -437,43 +440,43 @@ async function st(t, e, n, o, s) {
437
440
  throw new v("unsupported client token_endpoint_auth_method");
438
441
  }
439
442
  }
440
- async function at(t, e, n) {
443
+ async function ut(t, e, n) {
441
444
  if (!n.usages.includes("sign"))
442
445
  throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
443
446
  const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, s = A(await crypto.subtle.sign(Ae(n), n, E(o)));
444
447
  return `${o}.${s}`;
445
448
  }
446
- async function ct(t, e, n, o, s, r) {
447
- const { privateKey: i, publicKey: c, nonce: f = we.get(n.origin) } = e;
448
- if (!qe(i))
449
+ async function lt(t, e, n, o, s, r) {
450
+ const { privateKey: i, publicKey: u, nonce: d = we.get(n.origin) } = e;
451
+ if (!Ge(i))
449
452
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
450
- if (!Ve(c))
453
+ if (!Ye(u))
451
454
  throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
452
- if (f !== void 0 && !w(f))
455
+ if (d !== void 0 && !w(d))
453
456
  throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
454
- if (!c.extractable)
457
+ if (!u.extractable)
455
458
  throw new TypeError('"DPoP.publicKey.extractable" must be true');
456
- const y = Z() + s, p = {
457
- alg: it(i),
459
+ const y = Q() + s, p = {
460
+ alg: at(i),
458
461
  typ: "dpop+jwt",
459
- jwk: await lt(c)
462
+ jwk: await ft(u)
460
463
  }, k = {
461
464
  iat: y,
462
- jti: Y(),
465
+ jti: Z(),
463
466
  htm: o,
464
- nonce: f,
467
+ nonce: d,
465
468
  htu: `${n.origin}${n.pathname}`,
466
469
  ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
467
470
  };
468
- e[ze]?.(p, k), t.set("dpop", await at(p, k, i));
471
+ e[We]?.(p, k), t.set("dpop", await ut(p, k, i));
469
472
  }
470
- let J;
471
- async function ut(t) {
472
- const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: s, y: r, crv: i };
473
- return J.set(t, c), c;
473
+ let z;
474
+ async function dt(t) {
475
+ const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), u = { kty: e, e: n, n: o, x: s, y: r, crv: i };
476
+ return z.set(t, u), u;
474
477
  }
475
- async function lt(t) {
476
- return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || ut(t);
478
+ async function ft(t) {
479
+ return z || (z = /* @__PURE__ */ new WeakMap()), z.get(t) || dt(t);
477
480
  }
478
481
  function le(t, e, n) {
479
482
  if (typeof t != "string")
@@ -484,47 +487,47 @@ function ye(t, e, n = !1) {
484
487
  return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? le(t.mtls_endpoint_aliases[e], e, n) : le(t[e], e, n);
485
488
  }
486
489
  function be(t, e) {
487
- return !!(t.use_mtls_endpoint_aliases || e?.[We]);
490
+ return !!(t.use_mtls_endpoint_aliases || e?.[He]);
488
491
  }
489
- function B(t) {
492
+ function q(t) {
490
493
  const e = t;
491
494
  return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
492
495
  }
493
- async function dt(t, e, n, o, s, r) {
496
+ async function ht(t, e, n, o, s, r) {
494
497
  if (!w(t))
495
498
  throw new TypeError('"accessToken" must be a non-empty string');
496
499
  if (!(n instanceof URL))
497
500
  throw new TypeError('"url" must be an instance of URL');
498
- return o = N(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ct(o, r.DPoP, n, e.toUpperCase(), W({ [z]: r?.[z] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[V] || fetch)(n.href, {
501
+ return o = W(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await lt(o, r.DPoP, n, e.toUpperCase(), K({ [N]: r?.[N] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
499
502
  body: s,
500
503
  headers: Object.fromEntries(o.entries()),
501
504
  method: e,
502
505
  redirect: "manual",
503
- signal: r?.signal ? Ge(r.signal) : null
504
- }).then(G);
506
+ signal: r?.signal ? Ze(r.signal) : null
507
+ }).then(Y);
505
508
  }
506
- async function ht(t, e, n, o) {
509
+ async function pt(t, e, n, o) {
507
510
  C(t), I(e);
508
- const s = ye(t, "userinfo_endpoint", be(e, o)), r = N(o?.headers);
509
- return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), dt(n, "GET", s, r, null, {
511
+ const s = ye(t, "userinfo_endpoint", be(e, o)), r = W(o?.headers);
512
+ return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ht(n, "GET", s, r, null, {
510
513
  ...o,
511
- [z]: W(e)
514
+ [N]: K(e)
512
515
  });
513
516
  }
514
- async function ft(t, e, n, o, s, r, i) {
515
- return await st(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[V] || fetch)(o.href, {
517
+ async function wt(t, e, n, o, s, r, i) {
518
+ return await ct(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
516
519
  body: s,
517
520
  headers: Object.fromEntries(r.entries()),
518
521
  method: n,
519
522
  redirect: "manual",
520
523
  signal: null
521
- }).then(G);
524
+ }).then(Y);
522
525
  }
523
526
  async function _e(t, e, n, o, s) {
524
527
  const r = ye(t, "token_endpoint", be(e, s));
525
528
  o.set("grant_type", n);
526
- const i = N(s?.headers);
527
- return i.set("accept", "application/json"), ft(t, e, "POST", r, o, i, s);
529
+ const i = W(s?.headers);
530
+ return i.set("accept", "application/json"), wt(t, e, "POST", r, o, i, s);
528
531
  }
529
532
  async function de(t, e, n, o) {
530
533
  if (C(t), I(e), !w(n))
@@ -533,7 +536,7 @@ async function de(t, e, n, o) {
533
536
  return s.set("refresh_token", n), _e(t, e, "refresh_token", s, o);
534
537
  }
535
538
  const ve = /* @__PURE__ */ new WeakMap();
536
- function pt(t) {
539
+ function mt(t) {
537
540
  if (!t.id_token)
538
541
  return;
539
542
  const e = ve.get(t);
@@ -542,15 +545,15 @@ function pt(t) {
542
545
  return e[0];
543
546
  }
544
547
  async function Se(t, e, n, o = !1, s = !1) {
545
- if (C(t), I(e), !q(n, Response))
548
+ if (C(t), I(e), !V(n, Response))
546
549
  throw new TypeError('"response" must be an instance of Response');
547
550
  if (n.status !== 200) {
548
551
  let i;
549
- if (i = await Tt(n))
552
+ if (i = await kt(n))
550
553
  return i;
551
554
  throw new a('"response" is not a conform Token Endpoint response');
552
555
  }
553
- Q(n);
556
+ X(n);
554
557
  let r;
555
558
  try {
556
559
  r = await n.json();
@@ -575,7 +578,7 @@ async function Se(t, e, n, o = !1, s = !1) {
575
578
  if (r.id_token !== void 0 && !w(r.id_token))
576
579
  throw new a('"response" body "id_token" property must be a non-empty string');
577
580
  if (r.id_token) {
578
- const { claims: i, jwt: c } = await Et(r.id_token, Rt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, W(e), ge(e), e[Ne]).then(_t.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(mt.bind(void 0, t.issuer)).then(wt.bind(void 0, e.client_id));
581
+ const { claims: i, jwt: u } = await Pt(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), ke, K(e), ge(e), e[Ke]).then(St.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(yt.bind(void 0, t.issuer)).then(gt.bind(void 0, e.client_id));
579
582
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
580
583
  if (i.azp === void 0)
581
584
  throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
@@ -584,15 +587,15 @@ async function Se(t, e, n, o = !1, s = !1) {
584
587
  }
585
588
  if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
586
589
  throw new a('ID Token "auth_time" (authentication time) must be a positive number');
587
- ve.set(r, [i, c]);
590
+ ve.set(r, [i, u]);
588
591
  }
589
592
  }
590
593
  return r;
591
594
  }
592
- async function he(t, e, n) {
595
+ async function fe(t, e, n) {
593
596
  return Se(t, e, n);
594
597
  }
595
- function wt(t, e) {
598
+ function gt(t, e) {
596
599
  if (Array.isArray(e.claims.aud)) {
597
600
  if (!e.claims.aud.includes(t))
598
601
  throw new a('unexpected JWT "aud" (audience) claim value');
@@ -600,16 +603,16 @@ function wt(t, e) {
600
603
  throw new a('unexpected JWT "aud" (audience) claim value');
601
604
  return e;
602
605
  }
603
- function mt(t, e) {
606
+ function yt(t, e) {
604
607
  if (e.claims.iss !== t)
605
608
  throw new a('unexpected JWT "iss" (issuer) claim value');
606
609
  return e;
607
610
  }
608
611
  const Te = /* @__PURE__ */ new WeakSet();
609
- function gt(t) {
612
+ function bt(t) {
610
613
  return Te.add(t), t;
611
614
  }
612
- async function yt(t, e, n, o, s, r) {
615
+ async function _t(t, e, n, o, s, r) {
613
616
  if (C(t), I(e), !Te.has(n))
614
617
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
615
618
  if (!w(o))
@@ -619,10 +622,10 @@ async function yt(t, e, n, o, s, r) {
619
622
  const i = T(n, "code");
620
623
  if (!i)
621
624
  throw new a('no authorization code in "callbackParameters"');
622
- const c = new URLSearchParams(r?.additionalParameters);
623
- return c.set("redirect_uri", o), c.set("code_verifier", s), c.set("code", i), _e(t, e, "authorization_code", c, r);
625
+ const u = new URLSearchParams(r?.additionalParameters);
626
+ return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i), _e(t, e, "authorization_code", u, r);
624
627
  }
625
- const bt = {
628
+ const vt = {
626
629
  aud: "audience",
627
630
  c_hash: "code hash",
628
631
  client_id: "client id",
@@ -638,33 +641,33 @@ const bt = {
638
641
  htu: "http uri",
639
642
  cnf: "confirmation"
640
643
  };
641
- function _t(t, e) {
644
+ function St(t, e) {
642
645
  for (const n of t)
643
646
  if (e.claims[n] === void 0)
644
- throw new a(`JWT "${n}" (${bt[n]}) claim missing`);
647
+ throw new a(`JWT "${n}" (${vt[n]}) claim missing`);
645
648
  return e;
646
649
  }
647
- const vt = Symbol(), H = Symbol();
648
- async function St(t, e, n, o, s) {
650
+ const Tt = Symbol(), $ = Symbol();
651
+ async function At(t, e, n, o, s) {
649
652
  const r = await Se(t, e, n);
650
- if (B(r))
653
+ if (q(r))
651
654
  return r;
652
655
  if (!w(r.id_token))
653
656
  throw new a('"response" body "id_token" property must be a non-empty string');
654
- s ?? (s = e.default_max_age ?? H);
655
- const i = pt(r);
656
- if ((e.require_auth_time || s !== H) && i.auth_time === void 0)
657
+ s ?? (s = e.default_max_age ?? $);
658
+ const i = mt(r);
659
+ if ((e.require_auth_time || s !== $) && i.auth_time === void 0)
657
660
  throw new a('ID Token "auth_time" (authentication time) claim missing');
658
- if (s !== H) {
661
+ if (s !== $) {
659
662
  if (typeof s != "number" || s < 0)
660
663
  throw new TypeError('"maxAge" must be a non-negative number');
661
- const c = Z() + W(e), f = ge(e);
662
- if (i.auth_time + s < c - f)
664
+ const u = Q() + K(e), d = ge(e);
665
+ if (i.auth_time + s < u - d)
663
666
  throw new a("too much time has elapsed since the last End-User authentication");
664
667
  }
665
668
  switch (o) {
666
669
  case void 0:
667
- case vt:
670
+ case Tt:
668
671
  if (i.nonce !== void 0)
669
672
  throw new a('unexpected ID Token "nonce" claim value');
670
673
  break;
@@ -678,13 +681,13 @@ async function St(t, e, n, o, s) {
678
681
  }
679
682
  return r;
680
683
  }
681
- function Q(t) {
684
+ function X(t) {
682
685
  if (t.bodyUsed)
683
686
  throw new TypeError('"response" body has been used already');
684
687
  }
685
- async function Tt(t) {
688
+ async function kt(t) {
686
689
  if (t.status > 399 && t.status < 500) {
687
- Q(t);
690
+ X(t);
688
691
  try {
689
692
  const e = await t.json();
690
693
  if (x(e) && typeof e.error == "string" && e.error.length)
@@ -693,11 +696,11 @@ async function Tt(t) {
693
696
  }
694
697
  }
695
698
  }
696
- function fe(t) {
699
+ function he(t) {
697
700
  if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
698
701
  throw new a(`${t.name} modulusLength must be at least 2048 bits`);
699
702
  }
700
- function At(t) {
703
+ function Et(t) {
701
704
  switch (t) {
702
705
  case "P-256":
703
706
  return "SHA-256";
@@ -714,10 +717,10 @@ function Ae(t) {
714
717
  case "ECDSA":
715
718
  return {
716
719
  name: t.algorithm.name,
717
- hash: At(t.algorithm.namedCurve)
720
+ hash: Et(t.algorithm.namedCurve)
718
721
  };
719
722
  case "RSA-PSS":
720
- switch (fe(t.algorithm), t.algorithm.hash.name) {
723
+ switch (he(t.algorithm), t.algorithm.hash.name) {
721
724
  case "SHA-256":
722
725
  case "SHA-384":
723
726
  case "SHA-512":
@@ -729,7 +732,7 @@ function Ae(t) {
729
732
  throw new v();
730
733
  }
731
734
  case "RSASSA-PKCS1-v1_5":
732
- return fe(t.algorithm), t.algorithm.name;
735
+ return he(t.algorithm), t.algorithm.name;
733
736
  case "Ed448":
734
737
  case "Ed25519":
735
738
  return t.algorithm.name;
@@ -737,16 +740,16 @@ function Ae(t) {
737
740
  throw new v();
738
741
  }
739
742
  const ke = Symbol();
740
- async function kt(t, e, n, o) {
743
+ async function Rt(t, e, n, o) {
741
744
  const s = `${t}.${e}`;
742
745
  if (!await crypto.subtle.verify(Ae(n), n, o, E(s)))
743
746
  throw new a("JWT signature verification failed");
744
747
  }
745
- async function Et(t, e, n, o, s, r) {
746
- let { 0: i, 1: c, 2: f, length: y } = t.split(".");
748
+ async function Pt(t, e, n, o, s, r) {
749
+ let { 0: i, 1: u, 2: d, length: y } = t.split(".");
747
750
  if (y === 5)
748
751
  if (r !== void 0)
749
- t = await r(t), { 0: i, 1: c, 2: f, length: y } = t.split(".");
752
+ t = await r(t), { 0: i, 1: u, 2: d, length: y } = t.split(".");
750
753
  else
751
754
  throw new v("JWE structure JWTs are not supported");
752
755
  if (y !== 3)
@@ -761,18 +764,18 @@ async function Et(t, e, n, o, s, r) {
761
764
  throw new a("JWT Header must be a top level object");
762
765
  if (e(p), p.crit !== void 0)
763
766
  throw new a('unexpected JWT "crit" header parameter');
764
- const k = A(f);
767
+ const k = A(d);
765
768
  let b;
766
- n !== ke && (b = await n(p), await kt(i, c, b, k));
769
+ n !== ke && (b = await n(p), await Rt(i, u, b, k));
767
770
  let h;
768
771
  try {
769
- h = JSON.parse(E(A(c)));
772
+ h = JSON.parse(E(A(u)));
770
773
  } catch (l) {
771
774
  throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
772
775
  }
773
776
  if (!x(h))
774
777
  throw new a("JWT Payload must be a top level object");
775
- const P = Z() + o;
778
+ const P = Q() + o;
776
779
  if (h.exp !== void 0) {
777
780
  if (typeof h.exp != "number")
778
781
  throw new a('unexpected JWT "exp" (expiration time) claim type');
@@ -793,7 +796,7 @@ async function Et(t, e, n, o, s, r) {
793
796
  throw new a('unexpected JWT "aud" (audience) claim type');
794
797
  return { header: p, claims: h, signature: k, key: b, jwt: t };
795
798
  }
796
- function Rt(t, e, n) {
799
+ function Lt(t, e, n) {
797
800
  if (t !== void 0) {
798
801
  if (n.alg !== t)
799
802
  throw new a('unexpected JWT "alg" header parameter');
@@ -813,8 +816,8 @@ function T(t, e) {
813
816
  throw new a(`"${e}" parameter must be provided only once`);
814
817
  return n;
815
818
  }
816
- const Pt = Symbol(), Lt = Symbol();
817
- function Ut(t, e, n, o) {
819
+ const Ut = Symbol(), xt = Symbol();
820
+ function Ct(t, e, n, o) {
818
821
  if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
819
822
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
820
823
  if (T(n, "response"))
@@ -826,11 +829,11 @@ function Ut(t, e, n, o) {
826
829
  throw new a('unexpected "iss" (issuer) response parameter value');
827
830
  switch (o) {
828
831
  case void 0:
829
- case Lt:
832
+ case xt:
830
833
  if (r !== void 0)
831
834
  throw new a('unexpected "state" response parameter encountered');
832
835
  break;
833
- case Pt:
836
+ case Ut:
834
837
  break;
835
838
  default:
836
839
  if (!w(o))
@@ -847,13 +850,13 @@ function Ut(t, e, n, o) {
847
850
  error_description: T(n, "error_description"),
848
851
  error_uri: T(n, "error_uri")
849
852
  };
850
- const c = T(n, "id_token"), f = T(n, "token");
851
- if (c !== void 0 || f !== void 0)
853
+ const u = T(n, "id_token"), d = T(n, "token");
854
+ if (u !== void 0 || d !== void 0)
852
855
  throw new v("implicit and hybrid flows are not supported");
853
- return gt(new URLSearchParams(n));
856
+ return bt(new URLSearchParams(n));
854
857
  }
855
- const $ = "code-verifier", F = "oauth-state", pe = "/oauth/callback";
856
- class xt extends Ce {
858
+ const F = "code-verifier", M = "oauth-state", pe = "/oauth/callback";
859
+ class It extends Ie {
857
860
  client;
858
861
  issuer;
859
862
  authorizationServer;
@@ -871,18 +874,18 @@ class xt extends Ce {
871
874
  redirectToAfterSignUp: s,
872
875
  redirectToAfterSignIn: r,
873
876
  redirectToAfterSignOut: i = "/",
874
- basePath: c,
875
- scopes: f
877
+ basePath: u,
878
+ scopes: d
876
879
  }) {
877
880
  super(), this.client = {
878
881
  client_id: o,
879
882
  token_endpoint_auth_method: "none"
880
- }, this.audience = n, this.issuer = e, this.callbackUrlPath = xe(c, pe), this.scopes = f ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
883
+ }, this.audience = n, this.issuer = e, this.callbackUrlPath = Ce(u, pe), this.scopes = d ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
881
884
  }
882
885
  async getAuthServer() {
883
886
  if (!this.authorizationServer) {
884
- const e = new URL(this.issuer), n = await Ye(e);
885
- this.authorizationServer = await Ze(
887
+ const e = new URL(this.issuer), n = await Qe(e);
888
+ this.authorizationServer = await Xe(
886
889
  e,
887
890
  n
888
891
  );
@@ -894,7 +897,7 @@ class xt extends Ce {
894
897
  * @param response
895
898
  */
896
899
  setTokensFromResponse(e) {
897
- if (B(e))
900
+ if (q(e))
898
901
  throw ie.error("Bad Token Response", e), new re("Bad Token Response", e);
899
902
  if (!e.expires_in)
900
903
  throw new R("No expires_in in response");
@@ -909,40 +912,49 @@ class xt extends Ce {
909
912
  providerData: n
910
913
  });
911
914
  }
912
- async signUp({ redirectTo: e } = {}) {
915
+ async signUp({
916
+ redirectTo: e,
917
+ replace: n = !1
918
+ } = {}) {
913
919
  return this.authorize({
914
920
  redirectTo: this.redirectToAfterSignUp ?? e ?? "/",
921
+ replace: n,
915
922
  isSignUp: !0
916
923
  });
917
924
  }
918
- async signIn({ redirectTo: e } = {}) {
925
+ async signIn({
926
+ redirectTo: e,
927
+ replace: n = !1
928
+ } = {}) {
919
929
  return this.authorize({
920
- redirectTo: this.redirectToAfterSignIn ?? e ?? "/"
930
+ redirectTo: this.redirectToAfterSignIn ?? e ?? "/",
931
+ replace: n
921
932
  });
922
933
  }
923
934
  async authorize({
924
935
  redirectTo: e,
925
- isSignUp: n = !1
936
+ isSignUp: n = !1,
937
+ replace: o = !1
926
938
  }) {
927
- const o = "S256", s = await this.getAuthServer();
928
- if (!s.authorization_endpoint)
939
+ const s = "S256", r = await this.getAuthServer();
940
+ if (!r.authorization_endpoint)
929
941
  throw new R("No authorization endpoint");
930
- const r = Qe(), i = await et(r);
931
- sessionStorage.setItem($, r);
932
- const c = new URL(
933
- s.authorization_endpoint
942
+ const i = et(), u = await nt(i);
943
+ sessionStorage.setItem(F, i);
944
+ const d = new URL(
945
+ r.authorization_endpoint
934
946
  );
935
947
  sessionStorage.setItem("redirect-to", e);
936
- const f = new URL(window.location.origin);
937
- f.pathname = this.callbackUrlPath, f.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", f.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
948
+ const y = new URL(window.location.origin);
949
+ y.pathname = this.callbackUrlPath, y.search = "", d.searchParams.set("client_id", this.client.client_id), d.searchParams.set("redirect_uri", y.toString()), d.searchParams.set("response_type", "code"), d.searchParams.set("scope", this.scopes.join(" ")), d.searchParams.set("code_challenge", u), d.searchParams.set(
938
950
  "code_challenge_method",
939
- o
940
- ), this.audience && c.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(c, {
951
+ s
952
+ ), this.audience && d.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(d, {
941
953
  isSignIn: !n,
942
954
  isSignUp: n
943
955
  });
944
- const y = Xe();
945
- sessionStorage.setItem(F, y), c.searchParams.set("state", y), location.href = c.href;
956
+ const p = tt();
957
+ sessionStorage.setItem(M, p), d.searchParams.set("state", p), o ? location.replace(d.href) : location.href = d.href;
946
958
  }
947
959
  async getAccessToken() {
948
960
  const e = await this.getAuthServer(), { providerData: n } = S.getState();
@@ -961,7 +973,7 @@ class xt extends Ce {
961
973
  e,
962
974
  this.client,
963
975
  o.refreshToken
964
- ), r = await he(
976
+ ), r = await fe(
965
977
  e,
966
978
  this.client,
967
979
  s
@@ -1015,7 +1027,7 @@ class xt extends Ce {
1015
1027
  o,
1016
1028
  this.client,
1017
1029
  n.refreshToken
1018
- ), r = await he(
1030
+ ), r = await fe(
1019
1031
  o,
1020
1032
  this.client,
1021
1033
  s
@@ -1036,38 +1048,38 @@ class xt extends Ce {
1036
1048
  S.setState({ isPending: !1 });
1037
1049
  };
1038
1050
  handleCallback = async () => {
1039
- const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(F);
1040
- if (sessionStorage.removeItem(F), n !== o)
1051
+ const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
1052
+ if (sessionStorage.removeItem(M), n !== o)
1041
1053
  throw new R("Invalid state parameter");
1042
- const s = sessionStorage.getItem($);
1043
- if (sessionStorage.removeItem($), !s)
1054
+ const s = sessionStorage.getItem(F);
1055
+ if (sessionStorage.removeItem(F), !s)
1044
1056
  throw new R("No code verifier found in state.");
1045
- const r = await this.getAuthServer(), i = Ut(
1057
+ const r = await this.getAuthServer(), i = Ct(
1046
1058
  r,
1047
1059
  this.client,
1048
1060
  e.searchParams,
1049
1061
  n ?? void 0
1050
1062
  );
1051
- if (B(i))
1063
+ if (q(i))
1052
1064
  throw ie.error("Error validating OAuth response", i), new re(
1053
1065
  "Error validating OAuth response",
1054
1066
  i
1055
1067
  );
1056
- const c = new URL(e);
1057
- c.pathname = this.callbackUrlPath, c.search = "";
1058
- const f = await yt(
1068
+ const u = new URL(e);
1069
+ u.pathname = this.callbackUrlPath, u.search = "";
1070
+ const d = await _t(
1059
1071
  r,
1060
1072
  this.client,
1061
1073
  i,
1062
- c.toString(),
1074
+ u.toString(),
1063
1075
  s
1064
- ), y = await St(
1076
+ ), y = await At(
1065
1077
  r,
1066
1078
  this.client,
1067
- f
1079
+ d
1068
1080
  );
1069
1081
  this.setTokensFromResponse(y);
1070
- const p = await this.getAccessToken(), b = await (await ht(
1082
+ const p = await this.getAccessToken(), b = await (await pt(
1071
1083
  r,
1072
1084
  this.client,
1073
1085
  p
@@ -1091,15 +1103,21 @@ class xt extends Ce {
1091
1103
  ...super.getRoutes(),
1092
1104
  {
1093
1105
  path: pe,
1094
- element: /* @__PURE__ */ ne.jsx(Ue, { children: /* @__PURE__ */ ne.jsx(Ie, { handleCallback: this.handleCallback }) })
1106
+ element: /* @__PURE__ */ D.jsx(xe, { children: /* @__PURE__ */ D.jsx(
1107
+ Ue,
1108
+ {
1109
+ fallbackRender: ({ error: e }) => /* @__PURE__ */ D.jsx(Oe, { error: e }),
1110
+ children: /* @__PURE__ */ D.jsx(je, { handleCallback: this.handleCallback })
1111
+ }
1112
+ ) })
1095
1113
  }
1096
1114
  ];
1097
1115
  }
1098
1116
  }
1099
- const Jt = (t) => new xt(t);
1117
+ const Ht = (t) => new It(t);
1100
1118
  export {
1101
1119
  pe as OPENID_CALLBACK_PATH,
1102
- xt as OpenIDAuthenticationProvider,
1103
- Jt as default
1120
+ It as OpenIDAuthenticationProvider,
1121
+ Ht as default
1104
1122
  };
1105
1123
  //# sourceMappingURL=zudoku.auth-openid.js.map