zudoku 0.0.0-ec30b50 → 0.0.0-ed94abf

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