zudoku 0.45.1 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (532) hide show
  1. package/dist/app/main.js +4 -23
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/config.d.ts +2 -2
  4. package/dist/config/file-exists.d.ts +1 -0
  5. package/dist/config/file-exists.js +5 -0
  6. package/dist/config/file-exists.js.map +1 -0
  7. package/dist/config/loader.d.ts +19 -4
  8. package/dist/config/loader.js +94 -14
  9. package/dist/config/loader.js.map +1 -1
  10. package/dist/config/validators/validate.d.ts +3536 -743
  11. package/dist/config/validators/validate.js +396 -11
  12. package/dist/config/validators/validate.js.map +1 -1
  13. package/dist/index.d.ts +4 -2
  14. package/dist/index.js +2 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib/authentication/AuthenticationPlugin.d.ts +7 -2
  17. package/dist/lib/authentication/AuthenticationPlugin.js +13 -1
  18. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  19. package/dist/lib/authentication/authentication.d.ts +2 -4
  20. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  21. package/dist/lib/authentication/providers/clerk.js +62 -43
  22. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  23. package/dist/lib/authentication/providers/openid.d.ts +7 -12
  24. package/dist/lib/authentication/providers/openid.js +11 -22
  25. package/dist/lib/authentication/providers/openid.js.map +1 -1
  26. package/dist/lib/authentication/providers/supabase.js +3 -5
  27. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  28. package/dist/lib/components/Autocomplete.js +1 -1
  29. package/dist/lib/components/Banner.js +1 -1
  30. package/dist/lib/components/Banner.js.map +1 -1
  31. package/dist/lib/components/ErrorPage.js +1 -1
  32. package/dist/lib/components/Footer.js +3 -3
  33. package/dist/lib/components/Footer.js.map +1 -1
  34. package/dist/lib/components/Header.js +16 -8
  35. package/dist/lib/components/Header.js.map +1 -1
  36. package/dist/lib/components/Heading.js +6 -1
  37. package/dist/lib/components/Heading.js.map +1 -1
  38. package/dist/lib/components/InlineCode.js +1 -1
  39. package/dist/lib/components/InlineCode.js.map +1 -1
  40. package/dist/lib/components/Layout.js +2 -2
  41. package/dist/lib/components/Layout.js.map +1 -1
  42. package/dist/lib/components/Main.js +2 -2
  43. package/dist/lib/components/Main.js.map +1 -1
  44. package/dist/lib/components/Markdown.js +8 -3
  45. package/dist/lib/components/Markdown.js.map +1 -1
  46. package/dist/lib/components/MobileTopNavigation.js +3 -2
  47. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  48. package/dist/lib/components/NotFoundPage.js +1 -1
  49. package/dist/lib/components/Pagination.js +1 -1
  50. package/dist/lib/components/Pagination.js.map +1 -1
  51. package/dist/lib/components/Search.js +1 -1
  52. package/dist/lib/components/Search.js.map +1 -1
  53. package/dist/lib/components/Slot.d.ts +17 -0
  54. package/dist/lib/components/Slot.js +24 -0
  55. package/dist/lib/components/Slot.js.map +1 -0
  56. package/dist/lib/components/Slot.test.js +168 -0
  57. package/dist/lib/components/Slot.test.js.map +1 -0
  58. package/dist/lib/components/TopNavigation.d.ts +1 -4
  59. package/dist/lib/components/TopNavigation.js +3 -11
  60. package/dist/lib/components/TopNavigation.js.map +1 -1
  61. package/dist/lib/components/Zudoku.js +2 -2
  62. package/dist/lib/components/Zudoku.js.map +1 -1
  63. package/dist/lib/components/context/SlotProvider.d.ts +26 -0
  64. package/dist/lib/components/context/SlotProvider.js +83 -0
  65. package/dist/lib/components/context/SlotProvider.js.map +1 -0
  66. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  67. package/dist/lib/components/context/ZudokuProvider.js +2 -1
  68. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  69. package/dist/lib/components/index.d.ts +29 -23
  70. package/dist/lib/components/index.js +13 -7
  71. package/dist/lib/components/index.js.map +1 -1
  72. package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
  73. package/dist/lib/components/navigation/Sidebar.js +3 -3
  74. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  75. package/dist/lib/components/navigation/SidebarBadge.js +1 -1
  76. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  77. package/dist/lib/components/navigation/SidebarCategory.js +3 -3
  78. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  79. package/dist/lib/components/navigation/SidebarItem.d.ts +0 -5
  80. package/dist/lib/components/navigation/SidebarItem.js +19 -23
  81. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  82. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  83. package/dist/lib/components/navigation/Toc.js +1 -1
  84. package/dist/lib/components/navigation/Toc.js.map +1 -1
  85. package/dist/lib/components/navigation/utils.d.ts +8 -0
  86. package/dist/lib/components/navigation/utils.js +34 -6
  87. package/dist/lib/components/navigation/utils.js.map +1 -1
  88. package/dist/lib/core/ZudokuContext.d.ts +12 -8
  89. package/dist/lib/core/ZudokuContext.js +6 -5
  90. package/dist/lib/core/ZudokuContext.js.map +1 -1
  91. package/dist/lib/core/plugins.d.ts +5 -2
  92. package/dist/lib/core/plugins.js +1 -0
  93. package/dist/lib/core/plugins.js.map +1 -1
  94. package/dist/lib/errors/ErrorAlert.js +1 -1
  95. package/dist/lib/hooks/index.d.ts +19 -0
  96. package/dist/lib/hooks/index.js +11 -0
  97. package/dist/lib/hooks/index.js.map +1 -1
  98. package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
  99. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
  100. package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
  101. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  102. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  103. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -23
  104. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  105. package/dist/lib/plugins/api-keys/index.d.ts +18 -9
  106. package/dist/lib/plugins/api-keys/index.js +49 -34
  107. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  108. package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
  109. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  110. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  111. package/dist/lib/plugins/markdown/index.d.ts +1 -1
  112. package/dist/lib/plugins/markdown/resolver.d.ts +1 -1
  113. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  114. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  115. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  116. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  117. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  118. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  119. package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
  120. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  121. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -1
  122. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  123. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  124. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
  125. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  126. package/dist/lib/plugins/openapi/SchemaList.js +6 -5
  127. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  128. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  129. package/dist/lib/plugins/openapi/SidecarExamples.js +8 -0
  130. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  131. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  132. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  133. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  134. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  135. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  136. package/dist/lib/plugins/openapi/playground/Playground.js +2 -0
  137. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  138. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  139. package/dist/lib/plugins/openapi/playground/SubmitButton.js +7 -10
  140. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -1
  141. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +2 -2
  142. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  143. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
  144. package/dist/lib/plugins/openapi/schema/SchemaView.js +3 -3
  145. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  146. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  147. package/dist/lib/ui/Badge.d.ts +2 -2
  148. package/dist/lib/ui/Badge.js +1 -1
  149. package/dist/lib/ui/Badge.js.map +1 -1
  150. package/dist/lib/ui/Button.d.ts +2 -2
  151. package/dist/lib/ui/Button.js +8 -6
  152. package/dist/lib/ui/Button.js.map +1 -1
  153. package/dist/lib/ui/Callout.js +1 -1
  154. package/dist/lib/ui/Callout.js.map +1 -1
  155. package/dist/lib/ui/Card.js +1 -1
  156. package/dist/lib/ui/Checkbox.js +1 -1
  157. package/dist/lib/ui/Checkbox.js.map +1 -1
  158. package/dist/lib/ui/Command.d.ts +2 -2
  159. package/dist/lib/ui/Command.js +3 -3
  160. package/dist/lib/ui/Command.js.map +1 -1
  161. package/dist/lib/ui/Dialog.js +1 -1
  162. package/dist/lib/ui/Dialog.js.map +1 -1
  163. package/dist/lib/ui/DropdownMenu.js +4 -4
  164. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  165. package/dist/lib/ui/HoverCard.js +1 -1
  166. package/dist/lib/ui/HoverCard.js.map +1 -1
  167. package/dist/lib/ui/Input.js +1 -1
  168. package/dist/lib/ui/Input.js.map +1 -1
  169. package/dist/lib/ui/Popover.js +1 -1
  170. package/dist/lib/ui/Popover.js.map +1 -1
  171. package/dist/lib/ui/RadioGroup.js +1 -1
  172. package/dist/lib/ui/RadioGroup.js.map +1 -1
  173. package/dist/lib/ui/Select.js +2 -2
  174. package/dist/lib/ui/Select.js.map +1 -1
  175. package/dist/lib/ui/Slider.js +1 -1
  176. package/dist/lib/ui/Slider.js.map +1 -1
  177. package/dist/lib/ui/Switch.js +1 -1
  178. package/dist/lib/ui/Switch.js.map +1 -1
  179. package/dist/lib/ui/Tabs.js +2 -2
  180. package/dist/lib/ui/Tabs.js.map +1 -1
  181. package/dist/lib/ui/Textarea.js +1 -1
  182. package/dist/lib/ui/Textarea.js.map +1 -1
  183. package/dist/lib/ui/Toggle.js +1 -1
  184. package/dist/lib/ui/Toggle.js.map +1 -1
  185. package/dist/lib/ui/Tooltip.d.ts +2 -1
  186. package/dist/lib/ui/Tooltip.js +2 -1
  187. package/dist/lib/ui/Tooltip.js.map +1 -1
  188. package/dist/lib/util/useExposedProps.d.ts +8 -1
  189. package/dist/lib/util/useExposedProps.js.map +1 -1
  190. package/dist/vite/api/SchemaManager.js +16 -1
  191. package/dist/vite/api/SchemaManager.js.map +1 -1
  192. package/dist/vite/build.js +44 -6
  193. package/dist/vite/build.js.map +1 -1
  194. package/dist/vite/config.d.ts +2 -9
  195. package/dist/vite/config.js +6 -95
  196. package/dist/vite/config.js.map +1 -1
  197. package/dist/vite/config.test.js +1 -1
  198. package/dist/vite/config.test.js.map +1 -1
  199. package/dist/vite/css/plugin.d.ts +1 -2
  200. package/dist/vite/css/plugin.js +3 -2
  201. package/dist/vite/css/plugin.js.map +1 -1
  202. package/dist/vite/dev-server.d.ts +0 -1
  203. package/dist/vite/dev-server.js +10 -12
  204. package/dist/vite/dev-server.js.map +1 -1
  205. package/dist/vite/html.d.ts +2 -2
  206. package/dist/vite/html.js +5 -2
  207. package/dist/vite/html.js.map +1 -1
  208. package/dist/vite/plugin-api-keys.d.ts +1 -2
  209. package/dist/vite/plugin-api-keys.js +9 -3
  210. package/dist/vite/plugin-api-keys.js.map +1 -1
  211. package/dist/vite/plugin-api.d.ts +1 -2
  212. package/dist/vite/plugin-api.js +5 -4
  213. package/dist/vite/plugin-api.js.map +1 -1
  214. package/dist/vite/plugin-auth.d.ts +1 -2
  215. package/dist/vite/plugin-auth.js +3 -2
  216. package/dist/vite/plugin-auth.js.map +1 -1
  217. package/dist/vite/plugin-component.d.ts +1 -2
  218. package/dist/vite/plugin-component.js +3 -2
  219. package/dist/vite/plugin-component.js.map +1 -1
  220. package/dist/vite/plugin-config-reload.d.ts +1 -2
  221. package/dist/vite/plugin-config-reload.js +21 -22
  222. package/dist/vite/plugin-config-reload.js.map +1 -1
  223. package/dist/vite/plugin-config.d.ts +1 -2
  224. package/dist/vite/plugin-config.js +4 -3
  225. package/dist/vite/plugin-config.js.map +1 -1
  226. package/dist/vite/plugin-configure-tailwind.d.ts +2 -0
  227. package/dist/vite/plugin-configure-tailwind.js +38 -0
  228. package/dist/vite/plugin-configure-tailwind.js.map +1 -0
  229. package/dist/vite/plugin-custom-pages.d.ts +1 -2
  230. package/dist/vite/plugin-custom-pages.js +3 -2
  231. package/dist/vite/plugin-custom-pages.js.map +1 -1
  232. package/dist/vite/plugin-docs.d.ts +1 -2
  233. package/dist/vite/plugin-docs.js +4 -3
  234. package/dist/vite/plugin-docs.js.map +1 -1
  235. package/dist/vite/plugin-frontmatter.d.ts +1 -2
  236. package/dist/vite/plugin-frontmatter.js +3 -2
  237. package/dist/vite/plugin-frontmatter.js.map +1 -1
  238. package/dist/vite/plugin-mdx.d.ts +1 -2
  239. package/dist/vite/plugin-mdx.js +3 -2
  240. package/dist/vite/plugin-mdx.js.map +1 -1
  241. package/dist/vite/plugin-redirect.d.ts +1 -2
  242. package/dist/vite/plugin-redirect.js +3 -2
  243. package/dist/vite/plugin-redirect.js.map +1 -1
  244. package/dist/vite/plugin-search.d.ts +1 -2
  245. package/dist/vite/plugin-search.js +3 -2
  246. package/dist/vite/plugin-search.js.map +1 -1
  247. package/dist/vite/plugin-shiki-register.d.ts +1 -2
  248. package/dist/vite/plugin-shiki-register.js +2 -1
  249. package/dist/vite/plugin-shiki-register.js.map +1 -1
  250. package/dist/vite/plugin-sidebar.d.ts +1 -2
  251. package/dist/vite/plugin-sidebar.js +3 -2
  252. package/dist/vite/plugin-sidebar.js.map +1 -1
  253. package/dist/vite/plugin-theme-css.d.ts +1 -2
  254. package/dist/vite/plugin-theme-css.js +20 -60
  255. package/dist/vite/plugin-theme-css.js.map +1 -1
  256. package/dist/vite/plugin.d.ts +1 -2
  257. package/dist/vite/plugin.js +22 -21
  258. package/dist/vite/plugin.js.map +1 -1
  259. package/dist/vite/sitemap.d.ts +1 -1
  260. package/dist/zuplo/with-zuplo.d.ts +2 -2
  261. package/dist/zuplo/with-zuplo.js.map +1 -1
  262. package/lib/Button-BE9IVkWV.js +51 -0
  263. package/lib/Button-BE9IVkWV.js.map +1 -0
  264. package/lib/{Callout-XadUe37J.js → Callout-BkgOUkoZ.js} +9 -8
  265. package/lib/Callout-BkgOUkoZ.js.map +1 -0
  266. package/lib/{Card-BlCYNw5W.js → Card-DPhGbYUM.js} +3 -3
  267. package/lib/{Card-BlCYNw5W.js.map → Card-DPhGbYUM.js.map} +1 -1
  268. package/lib/{CategoryHeading-DZi-Szor.js → CategoryHeading-Cu2RwgjC.js} +2 -2
  269. package/lib/{CategoryHeading-DZi-Szor.js.map → CategoryHeading-Cu2RwgjC.js.map} +1 -1
  270. package/lib/{Dialog-CNf2oWXG.js → Dialog-Du6WMcIA.js} +8 -7
  271. package/lib/Dialog-Du6WMcIA.js.map +1 -0
  272. package/lib/{Drawer-BPBxzel2.js → Drawer-BzkOKwgC.js} +2 -2
  273. package/lib/{Drawer-BPBxzel2.js.map → Drawer-BzkOKwgC.js.map} +1 -1
  274. package/lib/Markdown-BRAyzyUJ.js +15348 -0
  275. package/lib/Markdown-BRAyzyUJ.js.map +1 -0
  276. package/lib/{MdxPage-tTTaDsLc.js → MdxPage-B3v1BSKr.js} +11 -11
  277. package/lib/MdxPage-B3v1BSKr.js.map +1 -0
  278. package/lib/{OasProvider-DalHQixM.js → OasProvider-5jrFuhVk.js} +3 -3
  279. package/lib/{OasProvider-DalHQixM.js.map → OasProvider-5jrFuhVk.js.map} +1 -1
  280. package/lib/{OperationList-BB09ENaq.js → OperationList-BmoMLQPO.js} +1039 -1005
  281. package/lib/OperationList-BmoMLQPO.js.map +1 -0
  282. package/lib/Pagination-Cr0fWZS3.js +36 -0
  283. package/lib/Pagination-Cr0fWZS3.js.map +1 -0
  284. package/lib/RouteGuard-PrSVLbSr.js +55 -0
  285. package/lib/RouteGuard-PrSVLbSr.js.map +1 -0
  286. package/lib/{SchemaList-BH9bgMRw.js → SchemaList-B4riYLoP.js} +61 -47
  287. package/lib/SchemaList-B4riYLoP.js.map +1 -0
  288. package/lib/{SchemaView-BsB7EFRl.js → SchemaView-CPZ6RgsF.js} +100 -95
  289. package/lib/SchemaView-CPZ6RgsF.js.map +1 -0
  290. package/lib/{AuthenticationPlugin-BTJ37DKg.js → SignUp-CWaiH0tY.js} +23 -50
  291. package/lib/SignUp-CWaiH0tY.js.map +1 -0
  292. package/lib/Slot-Bo6K4tnb.js +160 -0
  293. package/lib/Slot-Bo6K4tnb.js.map +1 -0
  294. package/lib/{SyntaxHighlight-UxOF1xNb.js → SyntaxHighlight-DedRjJNr.js} +233 -212
  295. package/lib/{SyntaxHighlight-UxOF1xNb.js.map → SyntaxHighlight-DedRjJNr.js.map} +1 -1
  296. package/lib/{Toc-Ax54Pw8S.js → Toc-lL3fzNkl.js} +5 -5
  297. package/lib/Toc-lL3fzNkl.js.map +1 -0
  298. package/lib/{circular-CZaZtOBs.js → circular-oB4auIIg.js} +2 -2
  299. package/lib/{circular-CZaZtOBs.js.map → circular-oB4auIIg.js.map} +1 -1
  300. package/lib/clsx-OuTLNxxd.js +17 -0
  301. package/lib/clsx-OuTLNxxd.js.map +1 -0
  302. package/lib/{cn-CwJPJKOE.js → cn-wvCW-ho6.js} +1015 -562
  303. package/lib/cn-wvCW-ho6.js.map +1 -0
  304. package/lib/{createServer-DmqFeMgf.js → createServer-DCB82j2t.js} +81 -81
  305. package/lib/{createServer-DmqFeMgf.js.map → createServer-DCB82j2t.js.map} +1 -1
  306. package/lib/{hook-BwOB_iZo.js → hook-DawSLaZr.js} +323 -300
  307. package/lib/hook-DawSLaZr.js.map +1 -0
  308. package/lib/{index-sS7O9W-R.js → index-BXYvD5-7.js} +868 -758
  309. package/lib/index-BXYvD5-7.js.map +1 -0
  310. package/lib/{index-Z13x6tPX.js → index-DI5SPFK9.js} +2 -2
  311. package/lib/{index-Z13x6tPX.js.map → index-DI5SPFK9.js.map} +1 -1
  312. package/lib/index-QzXzw_ra.js +24 -0
  313. package/lib/index-QzXzw_ra.js.map +1 -0
  314. package/lib/{RouteGuard-lkdEJoDV.js → index.esm-BFcSKCe-.js} +232 -281
  315. package/lib/index.esm-BFcSKCe-.js.map +1 -0
  316. package/lib/{index.esm-D2ZUREQN.js → index.esm-DSfX_eMP.js} +3 -3
  317. package/lib/{index.esm-D2ZUREQN.js.map → index.esm-DSfX_eMP.js.map} +1 -1
  318. package/lib/joinPath-B7kNnUX4.js +8 -0
  319. package/lib/joinPath-B7kNnUX4.js.map +1 -0
  320. package/lib/{mutation-CL2MCRQL.js → mutation-oxMvODNQ.js} +2 -2
  321. package/lib/{mutation-CL2MCRQL.js.map → mutation-oxMvODNQ.js.map} +1 -1
  322. package/lib/ui/Accordion.js +1 -1
  323. package/lib/ui/ActionButton.js +2 -2
  324. package/lib/ui/Alert.js +2 -2
  325. package/lib/ui/AlertDialog.js +1 -1
  326. package/lib/ui/Badge.js +3 -3
  327. package/lib/ui/Badge.js.map +1 -1
  328. package/lib/ui/Breadcrumb.js +1 -1
  329. package/lib/ui/Button.js +20 -18
  330. package/lib/ui/Button.js.map +1 -1
  331. package/lib/ui/Callout.js +6 -5
  332. package/lib/ui/Callout.js.map +1 -1
  333. package/lib/ui/Card.js +8 -8
  334. package/lib/ui/Card.js.map +1 -1
  335. package/lib/ui/Carousel.js +1 -1
  336. package/lib/ui/Checkbox.js +7 -7
  337. package/lib/ui/Checkbox.js.map +1 -1
  338. package/lib/ui/CodeBlock.js +1 -1
  339. package/lib/ui/Command.js +43 -43
  340. package/lib/ui/Command.js.map +1 -1
  341. package/lib/ui/Dialog.js +2 -2
  342. package/lib/ui/Dialog.js.map +1 -1
  343. package/lib/ui/Drawer.js +2 -2
  344. package/lib/ui/DropdownMenu.js +34 -34
  345. package/lib/ui/DropdownMenu.js.map +1 -1
  346. package/lib/ui/Form.js +2 -2
  347. package/lib/ui/HoverCard.js +5 -5
  348. package/lib/ui/HoverCard.js.map +1 -1
  349. package/lib/ui/Input.js +2 -2
  350. package/lib/ui/Input.js.map +1 -1
  351. package/lib/ui/Label.js +2 -2
  352. package/lib/ui/Pagination.js +1 -1
  353. package/lib/ui/Popover.js +2 -2
  354. package/lib/ui/Popover.js.map +1 -1
  355. package/lib/ui/Progress.js +1 -1
  356. package/lib/ui/RadioGroup.js +10 -10
  357. package/lib/ui/RadioGroup.js.map +1 -1
  358. package/lib/ui/ScrollArea.js +1 -1
  359. package/lib/ui/Select.js +31 -31
  360. package/lib/ui/Select.js.map +1 -1
  361. package/lib/ui/Skeleton.js +1 -1
  362. package/lib/ui/Slider.js +5 -5
  363. package/lib/ui/Slider.js.map +1 -1
  364. package/lib/ui/Switch.js +5 -5
  365. package/lib/ui/Switch.js.map +1 -1
  366. package/lib/ui/SyntaxHighlight.js +2 -2
  367. package/lib/ui/Tabs.js +16 -16
  368. package/lib/ui/Tabs.js.map +1 -1
  369. package/lib/ui/Textarea.js +5 -5
  370. package/lib/ui/Textarea.js.map +1 -1
  371. package/lib/ui/Toggle.js +7 -7
  372. package/lib/ui/Toggle.js.map +1 -1
  373. package/lib/ui/ToggleGroup.js +1 -1
  374. package/lib/ui/Tooltip.js +15 -8
  375. package/lib/ui/Tooltip.js.map +1 -1
  376. package/lib/ui/util.js +1 -1
  377. package/lib/useExposedProps-DG8J6ewJ.js.map +1 -1
  378. package/lib/useMutation-C_j3dA_L.js +97 -0
  379. package/lib/useMutation-C_j3dA_L.js.map +1 -0
  380. package/lib/zudoku.auth-auth0.js +1 -1
  381. package/lib/zudoku.auth-auth0.js.map +1 -1
  382. package/lib/zudoku.auth-clerk.js +99 -82
  383. package/lib/zudoku.auth-clerk.js.map +1 -1
  384. package/lib/zudoku.auth-openid.js +246 -216
  385. package/lib/zudoku.auth-openid.js.map +1 -1
  386. package/lib/zudoku.components.js +4957 -33
  387. package/lib/zudoku.components.js.map +1 -1
  388. package/lib/zudoku.hooks.js +21 -12
  389. package/lib/zudoku.hooks.js.map +1 -1
  390. package/lib/zudoku.plugin-api-catalog.js +8 -8
  391. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  392. package/lib/zudoku.plugin-api-keys.js +5022 -214
  393. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  394. package/lib/zudoku.plugin-custom-pages.js +2 -2
  395. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  396. package/lib/zudoku.plugin-markdown.js +1 -1
  397. package/lib/zudoku.plugin-markdown.js.map +1 -1
  398. package/lib/zudoku.plugin-openapi.js +3 -3
  399. package/lib/zudoku.plugin-redirect.js.map +1 -1
  400. package/lib/zudoku.plugin-search-pagefind.js +5 -5
  401. package/lib/zudoku.plugins.js +7 -6
  402. package/lib/zudoku.plugins.js.map +1 -1
  403. package/package.json +15 -15
  404. package/src/app/defaultTheme.css +54 -0
  405. package/src/app/font.geist.css +73 -0
  406. package/src/app/main.css +113 -156
  407. package/src/app/main.tsx +4 -28
  408. package/src/lib/authentication/AuthenticationPlugin.tsx +18 -4
  409. package/src/lib/authentication/authentication.ts +2 -5
  410. package/src/lib/authentication/providers/auth0.tsx +8 -2
  411. package/src/lib/authentication/providers/clerk.tsx +72 -48
  412. package/src/lib/authentication/providers/openid.tsx +19 -26
  413. package/src/lib/authentication/providers/supabase.tsx +7 -7
  414. package/src/lib/components/Autocomplete.tsx +1 -1
  415. package/src/lib/components/Banner.tsx +1 -1
  416. package/src/lib/components/ErrorPage.tsx +1 -1
  417. package/src/lib/components/Footer.tsx +4 -4
  418. package/src/lib/components/Header.tsx +29 -29
  419. package/src/lib/components/Heading.tsx +9 -5
  420. package/src/lib/components/InlineCode.tsx +1 -1
  421. package/src/lib/components/Layout.tsx +3 -3
  422. package/src/lib/components/Main.tsx +4 -4
  423. package/src/lib/components/Markdown.tsx +14 -4
  424. package/src/lib/components/MobileTopNavigation.tsx +3 -2
  425. package/src/lib/components/NotFoundPage.tsx +1 -1
  426. package/src/lib/components/Pagination.tsx +3 -9
  427. package/src/lib/components/Search.tsx +1 -1
  428. package/src/lib/components/Slot.test.tsx +465 -0
  429. package/src/lib/components/Slot.tsx +64 -0
  430. package/src/lib/components/TopNavigation.tsx +5 -17
  431. package/src/lib/components/Zudoku.tsx +9 -9
  432. package/src/lib/components/context/SlotProvider.tsx +149 -0
  433. package/src/lib/components/context/ZudokuProvider.tsx +2 -1
  434. package/src/lib/components/index.ts +14 -10
  435. package/src/lib/components/navigation/PoweredByZudoku.tsx +1 -1
  436. package/src/lib/components/navigation/Sidebar.tsx +3 -3
  437. package/src/lib/components/navigation/SidebarBadge.tsx +1 -1
  438. package/src/lib/components/navigation/SidebarCategory.tsx +3 -3
  439. package/src/lib/components/navigation/SidebarItem.tsx +57 -30
  440. package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
  441. package/src/lib/components/navigation/Toc.tsx +2 -2
  442. package/src/lib/components/navigation/utils.ts +42 -6
  443. package/src/lib/core/ZudokuContext.ts +24 -12
  444. package/src/lib/core/plugins.ts +10 -2
  445. package/src/lib/errors/ErrorAlert.tsx +1 -1
  446. package/src/lib/hooks/index.ts +11 -0
  447. package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
  448. package/src/lib/plugins/api-keys/CreateApiKey.tsx +54 -42
  449. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +292 -112
  450. package/src/lib/plugins/api-keys/index.tsx +101 -55
  451. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  452. package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
  453. package/src/lib/plugins/markdown/index.tsx +2 -2
  454. package/src/lib/plugins/markdown/resolver.ts +4 -2
  455. package/src/lib/plugins/openapi/CollapsibleCode.tsx +1 -1
  456. package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
  457. package/src/lib/plugins/openapi/OperationList.tsx +2 -2
  458. package/src/lib/plugins/openapi/OperationListItem.tsx +6 -34
  459. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -1
  460. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
  461. package/src/lib/plugins/openapi/SchemaList.tsx +20 -8
  462. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  463. package/src/lib/plugins/openapi/SidecarExamples.tsx +6 -0
  464. package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
  465. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  466. package/src/lib/plugins/openapi/playground/Playground.tsx +7 -1
  467. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  468. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +24 -29
  469. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +2 -2
  470. package/src/lib/plugins/openapi/schema/SchemaView.tsx +7 -3
  471. package/src/lib/plugins/redirect/index.tsx +1 -1
  472. package/src/lib/ui/Badge.tsx +2 -2
  473. package/src/lib/ui/Button.tsx +9 -6
  474. package/src/lib/ui/Callout.tsx +1 -0
  475. package/src/lib/ui/Card.tsx +1 -1
  476. package/src/lib/ui/Checkbox.tsx +1 -1
  477. package/src/lib/ui/Command.tsx +5 -5
  478. package/src/lib/ui/Dialog.tsx +1 -1
  479. package/src/lib/ui/DropdownMenu.tsx +4 -4
  480. package/src/lib/ui/HoverCard.tsx +1 -1
  481. package/src/lib/ui/Input.tsx +1 -1
  482. package/src/lib/ui/Popover.tsx +1 -1
  483. package/src/lib/ui/RadioGroup.tsx +1 -1
  484. package/src/lib/ui/Select.tsx +3 -3
  485. package/src/lib/ui/Slider.tsx +1 -1
  486. package/src/lib/ui/Switch.tsx +1 -1
  487. package/src/lib/ui/Tabs.tsx +2 -2
  488. package/src/lib/ui/Textarea.tsx +1 -1
  489. package/src/lib/ui/Toggle.tsx +1 -1
  490. package/src/lib/ui/Tooltip.tsx +16 -1
  491. package/src/lib/util/useExposedProps.tsx +12 -1
  492. package/dist/app/tailwind.d.ts +0 -4
  493. package/dist/app/tailwind.js +0 -97
  494. package/dist/app/tailwind.js.map +0 -1
  495. package/dist/config/common.d.ts +0 -10
  496. package/dist/config/common.js +0 -2
  497. package/dist/config/common.js.map +0 -1
  498. package/dist/config/validators/common.d.ts +0 -8001
  499. package/dist/config/validators/common.js +0 -414
  500. package/dist/config/validators/common.js.map +0 -1
  501. package/dist/lib/components/SlotletProvider.d.ts +0 -17
  502. package/dist/lib/components/SlotletProvider.js +0 -18
  503. package/dist/lib/components/SlotletProvider.js.map +0 -1
  504. package/dist/vite/plugin-docs.test.js +0 -22
  505. package/dist/vite/plugin-docs.test.js.map +0 -1
  506. package/lib/AuthenticationPlugin-BTJ37DKg.js.map +0 -1
  507. package/lib/Button-Bdk_Ij3U.js +0 -49
  508. package/lib/Button-Bdk_Ij3U.js.map +0 -1
  509. package/lib/Callout-XadUe37J.js.map +0 -1
  510. package/lib/Dialog-CNf2oWXG.js.map +0 -1
  511. package/lib/Markdown-D96AphCL.js +0 -7691
  512. package/lib/Markdown-D96AphCL.js.map +0 -1
  513. package/lib/MdxPage-tTTaDsLc.js.map +0 -1
  514. package/lib/OperationList-BB09ENaq.js.map +0 -1
  515. package/lib/Pagination-CtmnJOJi.js +0 -48
  516. package/lib/Pagination-CtmnJOJi.js.map +0 -1
  517. package/lib/RouteGuard-lkdEJoDV.js.map +0 -1
  518. package/lib/SchemaList-BH9bgMRw.js.map +0 -1
  519. package/lib/SchemaView-BsB7EFRl.js.map +0 -1
  520. package/lib/Select-HTio1oSE.js +0 -211
  521. package/lib/Select-HTio1oSE.js.map +0 -1
  522. package/lib/SlotletProvider-CTgIBRWg.js +0 -257
  523. package/lib/SlotletProvider-CTgIBRWg.js.map +0 -1
  524. package/lib/Toc-Ax54Pw8S.js.map +0 -1
  525. package/lib/cn-CwJPJKOE.js.map +0 -1
  526. package/lib/hook-BwOB_iZo.js.map +0 -1
  527. package/lib/index-BnT4-Efz.js +0 -4975
  528. package/lib/index-BnT4-Efz.js.map +0 -1
  529. package/lib/index-sS7O9W-R.js.map +0 -1
  530. package/src/app/tailwind.ts +0 -103
  531. package/src/lib/components/SlotletProvider.tsx +0 -55
  532. /package/dist/{vite/plugin-docs.test.d.ts → lib/components/Slot.test.d.ts} +0 -0
@@ -1,16 +1,17 @@
1
- import { j as M } from "./jsx-runtime-C5mzlN2N.js";
2
- import { g as Pe, Z as Ue } from "./invariant-DAFpPywt.js";
3
- import { C as Le } from "./ClientOnly-E7hGysn1.js";
4
- import { d as xe, f as he, u as L } from "./hook-BwOB_iZo.js";
5
- import { A as Ce } from "./AuthenticationPlugin-BTJ37DKg.js";
6
- import { N as Ie } from "./chunk-BAXFHI7N-C9WnHsLV.js";
7
- import { a as je } from "./index-BnT4-Efz.js";
8
- var z = { exports: {} }, Oe = z.exports, re;
9
- function ze() {
1
+ import { j as L } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { g as Pe, Z as Le } from "./invariant-DAFpPywt.js";
3
+ import { C as Ue } from "./ClientOnly-E7hGysn1.js";
4
+ import { d as xe, l as fe, u as x } from "./hook-DawSLaZr.js";
5
+ import { LogOutIcon as Ce } from "lucide-react";
6
+ import { S as Ie, a as je, b as Oe } from "./SignUp-CWaiH0tY.js";
7
+ import { N as ze } from "./chunk-BAXFHI7N-C9WnHsLV.js";
8
+ import { useZudoku as Je } from "./zudoku.components.js";
9
+ var J = { exports: {} }, De = J.exports, re;
10
+ function Ne() {
10
11
  return re || (re = 1, function(t) {
11
12
  (function(e, n) {
12
13
  t.exports ? t.exports = n() : e.log = n();
13
- })(Oe, function() {
14
+ })(De, function() {
14
15
  var e = function() {
15
16
  }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
16
17
  "trace",
@@ -19,8 +20,8 @@ function ze() {
19
20
  "warn",
20
21
  "error"
21
22
  ], r = {}, i = null;
22
- function c(l, m) {
23
- var u = l[m];
23
+ function c(l, g) {
24
+ var u = l[g];
24
25
  if (typeof u.bind == "function")
25
26
  return u.bind(l);
26
27
  try {
@@ -38,9 +39,9 @@ function ze() {
38
39
  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
40
  }
40
41
  function p() {
41
- for (var l = this.getLevel(), m = 0; m < s.length; m++) {
42
- var u = s[m];
43
- this[u] = m < l ? e : this.methodFactory(u, l, this.name);
42
+ for (var l = this.getLevel(), g = 0; g < s.length; g++) {
43
+ var u = s[g];
44
+ this[u] = g < l ? e : this.methodFactory(u, l, this.name);
44
45
  }
45
46
  if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
46
47
  return "No console available for logging";
@@ -50,22 +51,22 @@ function ze() {
50
51
  typeof console !== n && (p.call(this), this[l].apply(this, arguments));
51
52
  };
52
53
  }
53
- function b(l, m, u) {
54
+ function b(l, g, u) {
54
55
  return y(l) || A.apply(this, arguments);
55
56
  }
56
- function h(l, m) {
57
- var u = this, j, K, P, _ = "loglevel";
57
+ function h(l, g) {
58
+ var u = this, O, H, P, _ = "loglevel";
58
59
  typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
59
60
  function ke(d) {
60
- var g = (s[d] || "silent").toUpperCase();
61
+ var m = (s[d] || "silent").toUpperCase();
61
62
  if (!(typeof window === n || !_)) {
62
63
  try {
63
- window.localStorage[_] = g;
64
+ window.localStorage[_] = m;
64
65
  return;
65
66
  } catch {
66
67
  }
67
68
  try {
68
- window.document.cookie = encodeURIComponent(_) + "=" + g + ";";
69
+ window.document.cookie = encodeURIComponent(_) + "=" + m + ";";
69
70
  } catch {
70
71
  }
71
72
  }
@@ -79,9 +80,9 @@ function ze() {
79
80
  }
80
81
  if (typeof d === n)
81
82
  try {
82
- var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
83
+ var m = window.document.cookie, z = encodeURIComponent(_), ne = m.indexOf(z + "=");
83
84
  ne !== -1 && (d = /^([^;]+)/.exec(
84
- g.slice(ne + O.length + 1)
85
+ m.slice(ne + z.length + 1)
85
86
  )[1]);
86
87
  } catch {
87
88
  }
@@ -101,9 +102,9 @@ function ze() {
101
102
  }
102
103
  }
103
104
  function U(d) {
104
- var g = d;
105
- if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
106
- return g;
105
+ var m = d;
106
+ if (typeof m == "string" && u.levels[m.toUpperCase()] !== void 0 && (m = u.levels[m.toUpperCase()]), typeof m == "number" && m >= 0 && m <= u.levels.SILENT)
107
+ return m;
107
108
  throw new TypeError("log.setLevel() called with invalid level: " + d);
108
109
  }
109
110
  u.name = l, u.levels = {
@@ -113,12 +114,12 @@ function ze() {
113
114
  WARN: 3,
114
115
  ERROR: 4,
115
116
  SILENT: 5
116
- }, u.methodFactory = m || b, u.getLevel = function() {
117
- return P ?? K ?? j;
118
- }, u.setLevel = function(d, g) {
119
- return P = U(d), g !== !1 && ke(P), p.call(u);
117
+ }, u.methodFactory = g || b, u.getLevel = function() {
118
+ return P ?? H ?? O;
119
+ }, u.setLevel = function(d, m) {
120
+ return P = U(d), m !== !1 && ke(P), p.call(u);
120
121
  }, u.setDefaultLevel = function(d) {
121
- K = U(d), ee() || u.setLevel(d, !1);
122
+ H = U(d), ee() || u.setLevel(d, !1);
122
123
  }, u.resetLevel = function() {
123
124
  P = null, Ee(), p.call(u);
124
125
  }, u.enableAll = function(d) {
@@ -126,21 +127,21 @@ function ze() {
126
127
  }, u.disableAll = function(d) {
127
128
  u.setLevel(u.levels.SILENT, d);
128
129
  }, u.rebuild = function() {
129
- if (i !== u && (j = U(i.getLevel())), p.call(u), i === u)
130
+ if (i !== u && (O = U(i.getLevel())), p.call(u), i === u)
130
131
  for (var d in r)
131
132
  r[d].rebuild();
132
- }, j = U(
133
+ }, O = U(
133
134
  i ? i.getLevel() : "WARN"
134
135
  );
135
136
  var te = ee();
136
137
  te != null && (P = U(te)), p.call(u);
137
138
  }
138
- i = new h(), i.getLogger = function(m) {
139
- if (typeof m != "symbol" && typeof m != "string" || m === "")
139
+ i = new h(), i.getLogger = function(g) {
140
+ if (typeof g != "symbol" && typeof g != "string" || g === "")
140
141
  throw new TypeError("You must supply a name when creating a logger.");
141
- var u = r[m];
142
- return u || (u = r[m] = new h(
143
- m,
142
+ var u = r[g];
143
+ return u || (u = r[g] = new h(
144
+ g,
144
145
  i.methodFactory
145
146
  )), u;
146
147
  };
@@ -151,10 +152,10 @@ function ze() {
151
152
  return r;
152
153
  }, i.default = i, i;
153
154
  });
154
- }(z)), z.exports;
155
+ }(J)), J.exports;
155
156
  }
156
- var Je = ze();
157
- const oe = /* @__PURE__ */ Pe(Je);
157
+ var We = Ne();
158
+ const oe = /* @__PURE__ */ Pe(We);
158
159
  let B;
159
160
  (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
160
161
  function V(t, e) {
@@ -166,19 +167,19 @@ function V(t, e) {
166
167
  return !1;
167
168
  }
168
169
  }
169
- const D = Symbol(), De = Symbol(), G = Symbol(), Ne = Symbol(), We = Symbol(), Ke = Symbol(), He = new TextEncoder(), $e = new TextDecoder();
170
+ const N = Symbol(), Ke = Symbol(), G = Symbol(), He = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), Be = new TextDecoder();
170
171
  function k(t) {
171
- return typeof t == "string" ? He.encode(t) : $e.decode(t);
172
+ return typeof t == "string" ? Me.encode(t) : Be.decode(t);
172
173
  }
173
174
  const ie = 32768;
174
- function Fe(t) {
175
+ function qe(t) {
175
176
  t instanceof ArrayBuffer && (t = new Uint8Array(t));
176
177
  const e = [];
177
178
  for (let n = 0; n < t.byteLength; n += ie)
178
179
  e.push(String.fromCharCode.apply(null, t.subarray(n, n + ie)));
179
180
  return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
180
181
  }
181
- function Me(t) {
182
+ function Ve(t) {
182
183
  try {
183
184
  const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
184
185
  for (let o = 0; o < e.length; o++)
@@ -189,9 +190,9 @@ function Me(t) {
189
190
  }
190
191
  }
191
192
  function T(t) {
192
- return typeof t == "string" ? Me(t) : Fe(t);
193
+ return typeof t == "string" ? Ve(t) : qe(t);
193
194
  }
194
- class Be {
195
+ class Ge {
195
196
  constructor(e) {
196
197
  this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
197
198
  }
@@ -220,33 +221,33 @@ class v extends Error {
220
221
  super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
221
222
  }
222
223
  }
223
- class qe extends Error {
224
+ class Ze extends Error {
224
225
  constructor(e, n) {
225
226
  super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
226
227
  }
227
228
  }
228
- const a = qe, fe = new Be(100);
229
- function pe(t) {
229
+ const a = Ze, pe = new Ge(100);
230
+ function we(t) {
230
231
  return t instanceof CryptoKey;
231
232
  }
232
- function Ve(t) {
233
- return pe(t) && t.type === "private";
233
+ function Ye(t) {
234
+ return we(t) && t.type === "private";
234
235
  }
235
- function Ge(t) {
236
- return pe(t) && t.type === "public";
236
+ function Qe(t) {
237
+ return we(t) && t.type === "public";
237
238
  }
238
239
  function Z(t) {
239
240
  try {
240
241
  const e = t.headers.get("dpop-nonce");
241
- e && fe.set(new URL(t.url).origin, e);
242
+ e && pe.set(new URL(t.url).origin, e);
242
243
  } catch {
243
244
  }
244
245
  return t;
245
246
  }
246
- function x(t) {
247
+ function C(t) {
247
248
  return !(t === null || typeof t != "object" || Array.isArray(t));
248
249
  }
249
- function N(t) {
250
+ function W(t) {
250
251
  V(t, Headers) && (t = Object.fromEntries(t.entries()));
251
252
  const e = new Headers(t);
252
253
  if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
@@ -255,12 +256,12 @@ function N(t) {
255
256
  throw new TypeError('"options.headers" must not include the "dpop" header name');
256
257
  return e;
257
258
  }
258
- function Ze(t) {
259
+ function Xe(t) {
259
260
  if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
260
261
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
261
262
  return t;
262
263
  }
263
- async function Ye(t, e) {
264
+ async function et(t, e) {
264
265
  if (!(t instanceof URL))
265
266
  throw new TypeError('"issuerIdentifier" must be an instance of URL');
266
267
  if (t.protocol !== "https:" && t.protocol !== "http:")
@@ -277,7 +278,7 @@ async function Ye(t, e) {
277
278
  default:
278
279
  throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
279
280
  }
280
- const o = N(e?.headers);
281
+ const o = W(e?.headers);
281
282
  return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
282
283
  headers: Object.fromEntries(o.entries()),
283
284
  method: "GET",
@@ -288,7 +289,7 @@ async function Ye(t, e) {
288
289
  function w(t) {
289
290
  return typeof t == "string" && t.length !== 0;
290
291
  }
291
- async function Qe(t, e) {
292
+ async function tt(t, e) {
292
293
  if (!(t instanceof URL))
293
294
  throw new TypeError('"expectedIssuer" must be an instance of URL');
294
295
  if (!V(e, Response))
@@ -302,7 +303,7 @@ async function Qe(t, e) {
302
303
  } catch (o) {
303
304
  throw new a('failed to parse "response" body as JSON', { cause: o });
304
305
  }
305
- if (!x(n))
306
+ if (!C(n))
306
307
  throw new a('"response" body must be a top level object');
307
308
  if (!w(n.issuer))
308
309
  throw new a('"response" body "issuer" property must be a non-empty string');
@@ -313,13 +314,13 @@ async function Qe(t, e) {
313
314
  function Y() {
314
315
  return T(crypto.getRandomValues(new Uint8Array(32)));
315
316
  }
316
- function Xe() {
317
+ function nt() {
317
318
  return Y();
318
319
  }
319
- function et() {
320
+ function rt() {
320
321
  return Y();
321
322
  }
322
- async function tt(t) {
323
+ async function ot(t) {
323
324
  if (!w(t))
324
325
  throw new TypeError('"codeVerifier" must be a non-empty string');
325
326
  return T(await crypto.subtle.digest("SHA-256", k(t)));
@@ -327,11 +328,11 @@ async function tt(t) {
327
328
  function se(t) {
328
329
  return encodeURIComponent(t).replace(/%20/g, "+");
329
330
  }
330
- function nt(t, e) {
331
+ function it(t, e) {
331
332
  const n = se(t), o = se(e);
332
333
  return `Basic ${btoa(`${n}:${o}`)}`;
333
334
  }
334
- function rt(t) {
335
+ function st(t) {
335
336
  switch (t.algorithm.hash.name) {
336
337
  case "SHA-256":
337
338
  return "PS256";
@@ -343,7 +344,7 @@ function rt(t) {
343
344
  throw new v("unsupported RsaHashedKeyAlgorithm hash name");
344
345
  }
345
346
  }
346
- function ot(t) {
347
+ function at(t) {
347
348
  switch (t.algorithm.hash.name) {
348
349
  case "SHA-256":
349
350
  return "RS256";
@@ -355,7 +356,7 @@ function ot(t) {
355
356
  throw new v("unsupported RsaHashedKeyAlgorithm hash name");
356
357
  }
357
358
  }
358
- function it(t) {
359
+ function ct(t) {
359
360
  switch (t.algorithm.namedCurve) {
360
361
  case "P-256":
361
362
  return "ES256";
@@ -367,14 +368,14 @@ function it(t) {
367
368
  throw new v("unsupported EcKeyAlgorithm namedCurve");
368
369
  }
369
370
  }
370
- function st(t) {
371
+ function ut(t) {
371
372
  switch (t.algorithm.name) {
372
373
  case "RSA-PSS":
373
- return rt(t);
374
+ return st(t);
374
375
  case "RSASSA-PKCS1-v1_5":
375
- return ot(t);
376
+ return at(t);
376
377
  case "ECDSA":
377
- return it(t);
378
+ return ct(t);
378
379
  case "Ed25519":
379
380
  case "Ed448":
380
381
  return "EdDSA";
@@ -382,25 +383,25 @@ function st(t) {
382
383
  throw new v("unsupported CryptoKey algorithm name");
383
384
  }
384
385
  }
385
- function W(t) {
386
- const e = t?.[D];
386
+ function K(t) {
387
+ const e = t?.[N];
387
388
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
388
389
  }
389
- function we(t) {
390
- const e = t?.[De];
390
+ function ge(t) {
391
+ const e = t?.[Ke];
391
392
  return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
392
393
  }
393
394
  function Q() {
394
395
  return Math.floor(Date.now() / 1e3);
395
396
  }
396
- function C(t) {
397
+ function I(t) {
397
398
  if (typeof t != "object" || t === null)
398
399
  throw new TypeError('"as" must be an object');
399
400
  if (!w(t.issuer))
400
401
  throw new TypeError('"as.issuer" property must be a non-empty string');
401
402
  return !0;
402
403
  }
403
- function I(t) {
404
+ function j(t) {
404
405
  if (typeof t != "object" || t === null)
405
406
  throw new TypeError('"client" must be an object');
406
407
  if (!w(t.client_id))
@@ -416,11 +417,11 @@ function ce(t, e) {
416
417
  if (e !== void 0)
417
418
  throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
418
419
  }
419
- async function at(t, e, n, o, s) {
420
+ async function lt(t, e, n, o, s) {
420
421
  switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
421
422
  case void 0:
422
423
  case "client_secret_basic": {
423
- o.set("authorization", nt(e.client_id, ae(e.client_secret)));
424
+ o.set("authorization", it(e.client_id, ae(e.client_secret)));
424
425
  break;
425
426
  }
426
427
  case "client_secret_post": {
@@ -439,26 +440,26 @@ async function at(t, e, n, o, s) {
439
440
  throw new v("unsupported client token_endpoint_auth_method");
440
441
  }
441
442
  }
442
- async function ct(t, e, n) {
443
+ async function dt(t, e, n) {
443
444
  if (!n.usages.includes("sign"))
444
445
  throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
445
- const o = `${T(k(JSON.stringify(t)))}.${T(k(JSON.stringify(e)))}`, s = T(await crypto.subtle.sign(Se(n), n, k(o)));
446
+ const o = `${T(k(JSON.stringify(t)))}.${T(k(JSON.stringify(e)))}`, s = T(await crypto.subtle.sign(Te(n), n, k(o)));
446
447
  return `${o}.${s}`;
447
448
  }
448
- async function ut(t, e, n, o, s, r) {
449
- const { privateKey: i, publicKey: c, nonce: f = fe.get(n.origin) } = e;
450
- if (!Ve(i))
449
+ async function ht(t, e, n, o, s, r) {
450
+ const { privateKey: i, publicKey: c, nonce: f = pe.get(n.origin) } = e;
451
+ if (!Ye(i))
451
452
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
452
- if (!Ge(c))
453
+ if (!Qe(c))
453
454
  throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
454
455
  if (f !== void 0 && !w(f))
455
456
  throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
456
457
  if (!c.extractable)
457
458
  throw new TypeError('"DPoP.publicKey.extractable" must be true');
458
459
  const y = Q() + s, p = {
459
- alg: st(i),
460
+ alg: ut(i),
460
461
  typ: "dpop+jwt",
461
- jwk: await dt(c)
462
+ jwk: await pt(c)
462
463
  }, A = {
463
464
  iat: y,
464
465
  jti: Y(),
@@ -467,15 +468,15 @@ async function ut(t, e, n, o, s, r) {
467
468
  htu: `${n.origin}${n.pathname}`,
468
469
  ath: r ? T(await crypto.subtle.digest("SHA-256", k(r))) : void 0
469
470
  };
470
- e[Ne]?.(p, A), t.set("dpop", await ct(p, A, i));
471
+ e[He]?.(p, A), t.set("dpop", await dt(p, A, i));
471
472
  }
472
- let J;
473
- async function lt(t) {
473
+ let D;
474
+ async function ft(t) {
474
475
  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 };
475
- return J.set(t, c), c;
476
+ return D.set(t, c), c;
476
477
  }
477
- async function dt(t) {
478
- return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || lt(t);
478
+ async function pt(t) {
479
+ return D || (D = /* @__PURE__ */ new WeakMap()), D.get(t) || ft(t);
479
480
  }
480
481
  function ue(t, e, n) {
481
482
  if (typeof t != "string")
@@ -485,36 +486,36 @@ function ue(t, e, n) {
485
486
  function me(t, e, n = !1) {
486
487
  return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? ue(t.mtls_endpoint_aliases[e], e, n) : ue(t[e], e, n);
487
488
  }
488
- function ge(t, e) {
489
- return !!(t.use_mtls_endpoint_aliases || e?.[Ke]);
489
+ function ye(t, e) {
490
+ return !!(t.use_mtls_endpoint_aliases || e?.[Fe]);
490
491
  }
491
492
  function q(t) {
492
493
  const e = t;
493
494
  return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
494
495
  }
495
- async function ht(t, e, n, o, s, r) {
496
+ async function wt(t, e, n, o, s, r) {
496
497
  if (!w(t))
497
498
  throw new TypeError('"accessToken" must be a non-empty string');
498
499
  if (!(n instanceof URL))
499
500
  throw new TypeError('"url" must be an instance of URL');
500
- return o = N(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ut(o, r.DPoP, n, e.toUpperCase(), W({ [D]: r?.[D] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
501
+ return o = W(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ht(o, r.DPoP, n, e.toUpperCase(), K({ [N]: r?.[N] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
501
502
  body: s,
502
503
  headers: Object.fromEntries(o.entries()),
503
504
  method: e,
504
505
  redirect: "manual",
505
- signal: r?.signal ? Ze(r.signal) : null
506
+ signal: r?.signal ? Xe(r.signal) : null
506
507
  }).then(Z);
507
508
  }
508
- async function ft(t, e, n, o) {
509
- C(t), I(e);
510
- const s = me(t, "userinfo_endpoint", ge(e, o)), r = N(o?.headers);
511
- 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, {
509
+ async function gt(t, e, n, o) {
510
+ I(t), j(e);
511
+ const s = me(t, "userinfo_endpoint", ye(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")), wt(n, "GET", s, r, null, {
512
513
  ...o,
513
- [D]: W(e)
514
+ [N]: K(e)
514
515
  });
515
516
  }
516
- async function pt(t, e, n, o, s, r, i) {
517
- return await at(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
517
+ async function mt(t, e, n, o, s, r, i) {
518
+ return await lt(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
518
519
  body: s,
519
520
  headers: Object.fromEntries(r.entries()),
520
521
  method: n,
@@ -522,33 +523,33 @@ async function pt(t, e, n, o, s, r, i) {
522
523
  signal: null
523
524
  }).then(Z);
524
525
  }
525
- async function ye(t, e, n, o, s) {
526
- const r = me(t, "token_endpoint", ge(e, s));
526
+ async function be(t, e, n, o, s) {
527
+ const r = me(t, "token_endpoint", ye(e, s));
527
528
  o.set("grant_type", n);
528
- const i = N(s?.headers);
529
- return i.set("accept", "application/json"), pt(t, e, "POST", r, o, i, s);
529
+ const i = W(s?.headers);
530
+ return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, s);
530
531
  }
531
- async function wt(t, e, n, o) {
532
- if (C(t), I(e), !w(n))
532
+ async function yt(t, e, n, o) {
533
+ if (I(t), j(e), !w(n))
533
534
  throw new TypeError('"refreshToken" must be a non-empty string');
534
535
  const s = new URLSearchParams(o?.additionalParameters);
535
- return s.set("refresh_token", n), ye(t, e, "refresh_token", s, o);
536
+ return s.set("refresh_token", n), be(t, e, "refresh_token", s, o);
536
537
  }
537
- const be = /* @__PURE__ */ new WeakMap();
538
- function mt(t) {
538
+ const _e = /* @__PURE__ */ new WeakMap();
539
+ function bt(t) {
539
540
  if (!t.id_token)
540
541
  return;
541
- const e = be.get(t);
542
+ const e = _e.get(t);
542
543
  if (!e)
543
544
  throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
544
545
  return e[0];
545
546
  }
546
- async function _e(t, e, n, o = !1, s = !1) {
547
- if (C(t), I(e), !V(n, Response))
547
+ async function ve(t, e, n, o = !1, s = !1) {
548
+ if (I(t), j(e), !V(n, Response))
548
549
  throw new TypeError('"response" must be an instance of Response');
549
550
  if (n.status !== 200) {
550
551
  let i;
551
- if (i = await Et(n))
552
+ if (i = await Lt(n))
552
553
  return i;
553
554
  throw new a('"response" is not a conform Token Endpoint response');
554
555
  }
@@ -559,7 +560,7 @@ async function _e(t, e, n, o = !1, s = !1) {
559
560
  } catch (i) {
560
561
  throw new a('failed to parse "response" body as JSON', { cause: i });
561
562
  }
562
- if (!x(r))
563
+ if (!C(r))
563
564
  throw new a('"response" body must be a top level object');
564
565
  if (!w(r.access_token))
565
566
  throw new a('"response" body "access_token" property must be a non-empty string');
@@ -577,7 +578,7 @@ async function _e(t, e, n, o = !1, s = !1) {
577
578
  if (r.id_token !== void 0 && !w(r.id_token))
578
579
  throw new a('"response" body "id_token" property must be a non-empty string');
579
580
  if (r.id_token) {
580
- const { claims: i, jwt: c } = await Ut(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Te, W(e), we(e), e[We]).then(Tt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(bt.bind(void 0, t.issuer)).then(yt.bind(void 0, e.client_id));
581
+ const { claims: i, jwt: c } = await Ct(r.id_token, It.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ae, K(e), ge(e), e[$e]).then(Et.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(St.bind(void 0, t.issuer)).then(vt.bind(void 0, e.client_id));
581
582
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
582
583
  if (i.azp === void 0)
583
584
  throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
@@ -586,15 +587,15 @@ async function _e(t, e, n, o = !1, s = !1) {
586
587
  }
587
588
  if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
588
589
  throw new a('ID Token "auth_time" (authentication time) must be a positive number');
589
- be.set(r, [i, c]);
590
+ _e.set(r, [i, c]);
590
591
  }
591
592
  }
592
593
  return r;
593
594
  }
594
- async function gt(t, e, n) {
595
- return _e(t, e, n);
595
+ async function _t(t, e, n) {
596
+ return ve(t, e, n);
596
597
  }
597
- function yt(t, e) {
598
+ function vt(t, e) {
598
599
  if (Array.isArray(e.claims.aud)) {
599
600
  if (!e.claims.aud.includes(t))
600
601
  throw new a('unexpected JWT "aud" (audience) claim value');
@@ -602,17 +603,17 @@ function yt(t, e) {
602
603
  throw new a('unexpected JWT "aud" (audience) claim value');
603
604
  return e;
604
605
  }
605
- function bt(t, e) {
606
+ function St(t, e) {
606
607
  if (e.claims.iss !== t)
607
608
  throw new a('unexpected JWT "iss" (issuer) claim value');
608
609
  return e;
609
610
  }
610
- const ve = /* @__PURE__ */ new WeakSet();
611
- function _t(t) {
612
- return ve.add(t), t;
611
+ const Se = /* @__PURE__ */ new WeakSet();
612
+ function Tt(t) {
613
+ return Se.add(t), t;
613
614
  }
614
- async function vt(t, e, n, o, s, r) {
615
- if (C(t), I(e), !ve.has(n))
615
+ async function At(t, e, n, o, s, r) {
616
+ if (I(t), j(e), !Se.has(n))
616
617
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
617
618
  if (!w(o))
618
619
  throw new TypeError('"redirectUri" must be a non-empty string');
@@ -622,9 +623,9 @@ async function vt(t, e, n, o, s, r) {
622
623
  if (!i)
623
624
  throw new a('no authorization code in "callbackParameters"');
624
625
  const c = new URLSearchParams(r?.additionalParameters);
625
- return c.set("redirect_uri", o), c.set("code_verifier", s), c.set("code", i), ye(t, e, "authorization_code", c, r);
626
+ return c.set("redirect_uri", o), c.set("code_verifier", s), c.set("code", i), be(t, e, "authorization_code", c, r);
626
627
  }
627
- const St = {
628
+ const kt = {
628
629
  aud: "audience",
629
630
  c_hash: "code hash",
630
631
  client_id: "client id",
@@ -640,33 +641,33 @@ const St = {
640
641
  htu: "http uri",
641
642
  cnf: "confirmation"
642
643
  };
643
- function Tt(t, e) {
644
+ function Et(t, e) {
644
645
  for (const n of t)
645
646
  if (e.claims[n] === void 0)
646
- throw new a(`JWT "${n}" (${St[n]}) claim missing`);
647
+ throw new a(`JWT "${n}" (${kt[n]}) claim missing`);
647
648
  return e;
648
649
  }
649
- const At = Symbol(), H = Symbol();
650
- async function kt(t, e, n, o, s) {
651
- const r = await _e(t, e, n);
650
+ const Rt = Symbol(), $ = Symbol();
651
+ async function Pt(t, e, n, o, s) {
652
+ const r = await ve(t, e, n);
652
653
  if (q(r))
653
654
  return r;
654
655
  if (!w(r.id_token))
655
656
  throw new a('"response" body "id_token" property must be a non-empty string');
656
- s ?? (s = e.default_max_age ?? H);
657
- const i = mt(r);
658
- if ((e.require_auth_time || s !== H) && i.auth_time === void 0)
657
+ s ?? (s = e.default_max_age ?? $);
658
+ const i = bt(r);
659
+ if ((e.require_auth_time || s !== $) && i.auth_time === void 0)
659
660
  throw new a('ID Token "auth_time" (authentication time) claim missing');
660
- if (s !== H) {
661
+ if (s !== $) {
661
662
  if (typeof s != "number" || s < 0)
662
663
  throw new TypeError('"maxAge" must be a non-negative number');
663
- const c = Q() + W(e), f = we(e);
664
+ const c = Q() + K(e), f = ge(e);
664
665
  if (i.auth_time + s < c - f)
665
666
  throw new a("too much time has elapsed since the last End-User authentication");
666
667
  }
667
668
  switch (o) {
668
669
  case void 0:
669
- case At:
670
+ case Rt:
670
671
  if (i.nonce !== void 0)
671
672
  throw new a('unexpected ID Token "nonce" claim value');
672
673
  break;
@@ -684,12 +685,12 @@ function X(t) {
684
685
  if (t.bodyUsed)
685
686
  throw new TypeError('"response" body has been used already');
686
687
  }
687
- async function Et(t) {
688
+ async function Lt(t) {
688
689
  if (t.status > 399 && t.status < 500) {
689
690
  X(t);
690
691
  try {
691
692
  const e = await t.json();
692
- if (x(e) && typeof e.error == "string" && e.error.length)
693
+ if (C(e) && typeof e.error == "string" && e.error.length)
693
694
  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;
694
695
  } catch {
695
696
  }
@@ -699,7 +700,7 @@ function le(t) {
699
700
  if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
700
701
  throw new a(`${t.name} modulusLength must be at least 2048 bits`);
701
702
  }
702
- function Rt(t) {
703
+ function Ut(t) {
703
704
  switch (t) {
704
705
  case "P-256":
705
706
  return "SHA-256";
@@ -711,12 +712,12 @@ function Rt(t) {
711
712
  throw new v();
712
713
  }
713
714
  }
714
- function Se(t) {
715
+ function Te(t) {
715
716
  switch (t.algorithm.name) {
716
717
  case "ECDSA":
717
718
  return {
718
719
  name: t.algorithm.name,
719
- hash: Rt(t.algorithm.namedCurve)
720
+ hash: Ut(t.algorithm.namedCurve)
720
721
  };
721
722
  case "RSA-PSS":
722
723
  switch (le(t.algorithm), t.algorithm.hash.name) {
@@ -738,13 +739,13 @@ function Se(t) {
738
739
  }
739
740
  throw new v();
740
741
  }
741
- const Te = Symbol();
742
- async function Pt(t, e, n, o) {
742
+ const Ae = Symbol();
743
+ async function xt(t, e, n, o) {
743
744
  const s = `${t}.${e}`;
744
- if (!await crypto.subtle.verify(Se(n), n, o, k(s)))
745
+ if (!await crypto.subtle.verify(Te(n), n, o, k(s)))
745
746
  throw new a("JWT signature verification failed");
746
747
  }
747
- async function Ut(t, e, n, o, s, r) {
748
+ async function Ct(t, e, n, o, s, r) {
748
749
  let { 0: i, 1: c, 2: f, length: y } = t.split(".");
749
750
  if (y === 5)
750
751
  if (r !== void 0)
@@ -759,20 +760,20 @@ async function Ut(t, e, n, o, s, r) {
759
760
  } catch (l) {
760
761
  throw new a("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
761
762
  }
762
- if (!x(p))
763
+ if (!C(p))
763
764
  throw new a("JWT Header must be a top level object");
764
765
  if (e(p), p.crit !== void 0)
765
766
  throw new a('unexpected JWT "crit" header parameter');
766
767
  const A = T(f);
767
768
  let b;
768
- n !== Te && (b = await n(p), await Pt(i, c, b, A));
769
+ n !== Ae && (b = await n(p), await xt(i, c, b, A));
769
770
  let h;
770
771
  try {
771
772
  h = JSON.parse(k(T(c)));
772
773
  } catch (l) {
773
774
  throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
774
775
  }
775
- if (!x(h))
776
+ if (!C(h))
776
777
  throw new a("JWT Payload must be a top level object");
777
778
  const R = Q() + o;
778
779
  if (h.exp !== void 0) {
@@ -795,7 +796,7 @@ async function Ut(t, e, n, o, s, r) {
795
796
  throw new a('unexpected JWT "aud" (audience) claim type');
796
797
  return { header: p, claims: h, signature: A, key: b, jwt: t };
797
798
  }
798
- function Lt(t, e, n) {
799
+ function It(t, e, n) {
799
800
  if (t !== void 0) {
800
801
  if (n.alg !== t)
801
802
  throw new a('unexpected JWT "alg" header parameter');
@@ -815,9 +816,9 @@ function S(t, e) {
815
816
  throw new a(`"${e}" parameter must be provided only once`);
816
817
  return n;
817
818
  }
818
- const xt = Symbol(), Ct = Symbol();
819
- function It(t, e, n, o) {
820
- if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
819
+ const jt = Symbol(), Ot = Symbol();
820
+ function zt(t, e, n, o) {
821
+ if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
821
822
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
822
823
  if (S(n, "response"))
823
824
  throw new a('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
@@ -828,11 +829,11 @@ function It(t, e, n, o) {
828
829
  throw new a('unexpected "iss" (issuer) response parameter value');
829
830
  switch (o) {
830
831
  case void 0:
831
- case Ct:
832
+ case Ot:
832
833
  if (r !== void 0)
833
834
  throw new a('unexpected "state" response parameter encountered');
834
835
  break;
835
- case xt:
836
+ case jt:
836
837
  break;
837
838
  default:
838
839
  if (!w(o))
@@ -852,28 +853,65 @@ function It(t, e, n, o) {
852
853
  const c = S(n, "id_token"), f = S(n, "token");
853
854
  if (c !== void 0 || f !== void 0)
854
855
  throw new v("implicit and hybrid flows are not supported");
855
- return _t(new URLSearchParams(n));
856
+ return Tt(new URLSearchParams(n));
856
857
  }
857
- function jt(t, e, n = "/") {
858
+ class Jt {
859
+ getRoutes() {
860
+ return [
861
+ {
862
+ path: "/signout",
863
+ element: /* @__PURE__ */ L.jsx(Ie, {})
864
+ },
865
+ {
866
+ path: "/signin",
867
+ element: /* @__PURE__ */ L.jsx(je, {})
868
+ },
869
+ {
870
+ path: "/signup",
871
+ element: /* @__PURE__ */ L.jsx(Oe, {})
872
+ }
873
+ ];
874
+ }
875
+ async getSidebar(e) {
876
+ return e.startsWith("/settings") ? [
877
+ {
878
+ type: "link",
879
+ label: "Logout",
880
+ href: "/signout"
881
+ }
882
+ ] : [];
883
+ }
884
+ getProfileMenuItems() {
885
+ return [
886
+ {
887
+ label: "Logout",
888
+ path: "/signout",
889
+ category: "bottom",
890
+ icon: Ce
891
+ }
892
+ ];
893
+ }
894
+ }
895
+ function Dt(t, e, n = "/") {
858
896
  return t.startsWith(e) ? n !== "/" && t.startsWith(e + n) ? t.slice(e.length + n.length) : t.slice(e.length) : t;
859
897
  }
860
- function Ot({
898
+ function Nt({
861
899
  handleCallback: t
862
900
  }) {
863
- const { options: e } = je(), n = xe({
901
+ const { options: e } = Je(), n = xe({
864
902
  retry: !1,
865
903
  queryKey: ["oauth-callback"],
866
904
  queryFn: async () => {
867
905
  try {
868
- return he(
869
- jt(
906
+ return fe(
907
+ Dt(
870
908
  await t(),
871
909
  window.location.origin,
872
910
  e.basePath
873
911
  )
874
912
  );
875
913
  } catch (o) {
876
- throw new Ue("Could not validate user", {
914
+ throw new Le("Could not validate user", {
877
915
  cause: o,
878
916
  title: "Authentication Error",
879
917
  developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
@@ -881,7 +919,7 @@ function Ot({
881
919
  }
882
920
  }
883
921
  });
884
- return /* @__PURE__ */ M.jsx(Ie, { to: n.data });
922
+ return /* @__PURE__ */ L.jsx(ze, { to: n.data });
885
923
  }
886
924
  class E extends Error {
887
925
  }
@@ -890,22 +928,8 @@ class de extends E {
890
928
  super(e, o), this.error = n;
891
929
  }
892
930
  }
893
- const $ = "code-verifier", F = "oauth-state", Ae = "/oauth/callback";
894
- class zt extends Ce {
895
- constructor(e) {
896
- super(), this.handleCallback = e;
897
- }
898
- getRoutes() {
899
- return [
900
- ...super.getRoutes(),
901
- {
902
- path: Ae,
903
- element: /* @__PURE__ */ M.jsx(Le, { children: /* @__PURE__ */ M.jsx(Ot, { handleCallback: this.handleCallback }) })
904
- }
905
- ];
906
- }
907
- }
908
- class Jt {
931
+ const F = "code-verifier", M = "oauth-state", he = "/oauth/callback";
932
+ class Wt extends Jt {
909
933
  client;
910
934
  issuer;
911
935
  authorizationServer;
@@ -926,15 +950,15 @@ class Jt {
926
950
  basePath: c,
927
951
  scopes: f
928
952
  }) {
929
- this.client = {
953
+ super(), this.client = {
930
954
  client_id: o,
931
955
  token_endpoint_auth_method: "none"
932
- }, this.audience = n, this.issuer = e, this.callbackUrlPath = he(c, Ae), this.scopes = f ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
956
+ }, this.audience = n, this.issuer = e, this.callbackUrlPath = fe(c, he), this.scopes = f ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
933
957
  }
934
958
  async getAuthServer() {
935
959
  if (!this.authorizationServer) {
936
- const e = new URL(this.issuer), n = await Ye(e);
937
- this.authorizationServer = await Qe(
960
+ const e = new URL(this.issuer), n = await et(e);
961
+ this.authorizationServer = await tt(
938
962
  e,
939
963
  n
940
964
  );
@@ -957,7 +981,7 @@ class Jt {
957
981
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
958
982
  tokenType: e.token_type
959
983
  };
960
- L.setState({
984
+ x.setState({
961
985
  providerData: n
962
986
  });
963
987
  }
@@ -979,8 +1003,8 @@ class Jt {
979
1003
  const o = "S256", s = await this.getAuthServer();
980
1004
  if (!s.authorization_endpoint)
981
1005
  throw new E("No authorization endpoint");
982
- const r = Xe(), i = await tt(r);
983
- sessionStorage.setItem($, r);
1006
+ const r = nt(), i = await ot(r);
1007
+ sessionStorage.setItem(F, r);
984
1008
  const c = new URL(
985
1009
  s.authorization_endpoint
986
1010
  );
@@ -993,27 +1017,27 @@ class Jt {
993
1017
  isSignIn: !n,
994
1018
  isSignUp: n
995
1019
  });
996
- const y = et();
997
- sessionStorage.setItem(F, y), c.searchParams.set("state", y), location.href = c.href;
1020
+ const y = rt();
1021
+ sessionStorage.setItem(M, y), c.searchParams.set("state", y), location.href = c.href;
998
1022
  }
999
1023
  async getAccessToken() {
1000
- const e = await this.getAuthServer(), { providerData: n } = L.getState();
1024
+ const e = await this.getAuthServer(), { providerData: n } = x.getState();
1001
1025
  if (!n)
1002
1026
  throw new E("User is not authenticated");
1003
1027
  const o = n;
1004
1028
  if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1005
1029
  if (!o.refreshToken)
1006
- return L.setState({
1030
+ return x.setState({
1007
1031
  isAuthenticated: !1,
1008
1032
  isPending: !1,
1009
1033
  profile: null,
1010
1034
  providerData: null
1011
1035
  }), "";
1012
- const s = await wt(
1036
+ const s = await yt(
1013
1037
  e,
1014
1038
  this.client,
1015
1039
  o.refreshToken
1016
- ), r = await gt(
1040
+ ), r = await _t(
1017
1041
  e,
1018
1042
  this.client,
1019
1043
  s
@@ -1029,7 +1053,7 @@ class Jt {
1029
1053
  return e.headers.set("Authorization", `Bearer ${n}`), e;
1030
1054
  };
1031
1055
  signOut = async () => {
1032
- L.setState({
1056
+ x.setState({
1033
1057
  isAuthenticated: !1,
1034
1058
  isPending: !1,
1035
1059
  profile: void 0,
@@ -1046,13 +1070,13 @@ class Jt {
1046
1070
  )) : o = n;
1047
1071
  };
1048
1072
  handleCallback = async () => {
1049
- const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(F);
1050
- if (sessionStorage.removeItem(F), n !== o)
1073
+ const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(M);
1074
+ if (sessionStorage.removeItem(M), n !== o)
1051
1075
  throw new E("Invalid state parameter");
1052
- const s = sessionStorage.getItem($);
1053
- if (sessionStorage.removeItem($), !s)
1076
+ const s = sessionStorage.getItem(F);
1077
+ if (sessionStorage.removeItem(F), !s)
1054
1078
  throw new E("No code verifier found in state.");
1055
- const r = await this.getAuthServer(), i = It(
1079
+ const r = await this.getAuthServer(), i = zt(
1056
1080
  r,
1057
1081
  this.client,
1058
1082
  e.searchParams,
@@ -1065,19 +1089,19 @@ class Jt {
1065
1089
  );
1066
1090
  const c = new URL(e);
1067
1091
  c.pathname = this.callbackUrlPath, c.search = "";
1068
- const f = await vt(
1092
+ const f = await At(
1069
1093
  r,
1070
1094
  this.client,
1071
1095
  i,
1072
1096
  c.toString(),
1073
1097
  s
1074
- ), y = await kt(
1098
+ ), y = await Pt(
1075
1099
  r,
1076
1100
  this.client,
1077
1101
  f
1078
1102
  );
1079
1103
  this.setTokensFromResponse(y);
1080
- const p = await this.getAccessToken(), b = await (await ft(
1104
+ const p = await this.getAccessToken(), b = await (await gt(
1081
1105
  r,
1082
1106
  this.client,
1083
1107
  p
@@ -1088,7 +1112,7 @@ class Jt {
1088
1112
  emailVerified: b.email_verified ?? !1,
1089
1113
  pictureUrl: b.picture
1090
1114
  };
1091
- L.setState({
1115
+ x.setState({
1092
1116
  isAuthenticated: !0,
1093
1117
  isPending: !1,
1094
1118
  profile: h
@@ -1096,14 +1120,20 @@ class Jt {
1096
1120
  const R = sessionStorage.getItem("redirect-to") ?? "/";
1097
1121
  return sessionStorage.removeItem("redirect-to"), R;
1098
1122
  };
1099
- getAuthenticationPlugin() {
1100
- return new zt(this.handleCallback);
1123
+ getRoutes() {
1124
+ return [
1125
+ ...super.getRoutes(),
1126
+ {
1127
+ path: he,
1128
+ element: /* @__PURE__ */ L.jsx(Ue, { children: /* @__PURE__ */ L.jsx(Nt, { handleCallback: this.handleCallback }) })
1129
+ }
1130
+ ];
1101
1131
  }
1102
1132
  }
1103
- const Mt = (t) => new Jt(t);
1133
+ const Gt = (t) => new Wt(t);
1104
1134
  export {
1105
- Ae as OPENID_CALLBACK_PATH,
1106
- Jt as OpenIDAuthenticationProvider,
1107
- Mt as default
1135
+ he as OPENID_CALLBACK_PATH,
1136
+ Wt as OpenIDAuthenticationProvider,
1137
+ Gt as default
1108
1138
  };
1109
1139
  //# sourceMappingURL=zudoku.auth-openid.js.map