zudoku 0.3.0-dev.10 → 0.3.0-dev.100

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 (686) hide show
  1. package/LICENSE.md +21 -0
  2. package/cli.js +5 -1
  3. package/dist/app/App.d.ts +1 -2
  4. package/dist/app/App.js +1 -29
  5. package/dist/app/App.js.map +1 -1
  6. package/dist/app/demo.d.ts +2 -0
  7. package/dist/app/demo.js +52 -0
  8. package/dist/app/demo.js.map +1 -0
  9. package/dist/app/entry.client.d.ts +2 -0
  10. package/dist/app/entry.client.js +35 -0
  11. package/dist/app/entry.client.js.map +1 -0
  12. package/dist/app/entry.server.d.ts +14 -0
  13. package/dist/app/entry.server.js +105 -0
  14. package/dist/app/entry.server.js.map +1 -0
  15. package/dist/app/main.d.ts +6 -1
  16. package/dist/app/main.js +79 -12
  17. package/dist/app/main.js.map +1 -1
  18. package/dist/app/standalone.d.ts +2 -0
  19. package/dist/app/standalone.js +49 -0
  20. package/dist/app/standalone.js.map +1 -0
  21. package/dist/app/tailwind.d.ts +1 -1
  22. package/dist/app/tailwind.js +0 -4
  23. package/dist/app/tailwind.js.map +1 -1
  24. package/dist/cli/cmds/dev.js +5 -0
  25. package/dist/cli/cmds/dev.js.map +1 -1
  26. package/dist/cli/dev/handler.d.ts +1 -0
  27. package/dist/cli/dev/handler.js +3 -1
  28. package/dist/cli/dev/handler.js.map +1 -1
  29. package/dist/config/config.d.ts +19 -45
  30. package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
  31. package/dist/config/validators/InputSidebarSchema.js +71 -0
  32. package/dist/config/validators/InputSidebarSchema.js.map +1 -0
  33. package/dist/config/validators/SidebarSchema.d.ts +17 -0
  34. package/dist/config/validators/SidebarSchema.js +76 -0
  35. package/dist/config/validators/SidebarSchema.js.map +1 -0
  36. package/dist/config/validators/validate.d.ts +1323 -2
  37. package/dist/config/validators/validate.js +179 -1
  38. package/dist/config/validators/validate.js.map +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/internal.d.ts +1 -0
  41. package/dist/internal.js +2 -0
  42. package/dist/internal.js.map +1 -0
  43. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  44. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  45. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  46. package/dist/lib/authentication/authentication.d.ts +10 -9
  47. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  48. package/dist/lib/authentication/components/SignIn.js +14 -0
  49. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  50. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  51. package/dist/lib/authentication/components/SignOut.js +12 -0
  52. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  53. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  54. package/dist/lib/authentication/components/SignUp.js +10 -0
  55. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  56. package/dist/lib/authentication/hook.js +4 -4
  57. package/dist/lib/authentication/hook.js.map +1 -1
  58. package/dist/lib/authentication/providers/auth0.js +11 -6
  59. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  60. package/dist/lib/authentication/providers/clerk.js +59 -30
  61. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  62. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  63. package/dist/lib/authentication/providers/openid.js +79 -29
  64. package/dist/lib/authentication/providers/openid.js.map +1 -1
  65. package/dist/lib/authentication/state.js +1 -1
  66. package/dist/lib/authentication/state.js.map +1 -1
  67. package/dist/lib/components/Bootstrap.d.ts +13 -0
  68. package/dist/lib/components/Bootstrap.js +12 -0
  69. package/dist/lib/components/Bootstrap.js.map +1 -0
  70. package/dist/lib/components/ClientOnly.d.ts +3 -0
  71. package/dist/lib/components/ClientOnly.js +7 -0
  72. package/dist/lib/components/ClientOnly.js.map +1 -0
  73. package/dist/lib/components/DevPortal.d.ts +5 -23
  74. package/dist/lib/components/DevPortal.js +43 -20
  75. package/dist/lib/components/DevPortal.js.map +1 -1
  76. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  77. package/dist/lib/components/DeveloperHint.js +10 -0
  78. package/dist/lib/components/DeveloperHint.js.map +1 -0
  79. package/dist/lib/components/ErrorPage.d.ts +6 -0
  80. package/dist/lib/components/ErrorPage.js +9 -0
  81. package/dist/lib/components/ErrorPage.js.map +1 -0
  82. package/dist/lib/components/Header.js +25 -5
  83. package/dist/lib/components/Header.js.map +1 -1
  84. package/dist/lib/components/Heading.d.ts +9 -4
  85. package/dist/lib/components/Heading.js +17 -2
  86. package/dist/lib/components/Heading.js.map +1 -1
  87. package/dist/lib/components/InlineCode.d.ts +5 -0
  88. package/dist/lib/components/InlineCode.js +4 -0
  89. package/dist/lib/components/InlineCode.js.map +1 -0
  90. package/dist/lib/components/Layout.js +7 -5
  91. package/dist/lib/components/Layout.js.map +1 -1
  92. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  93. package/dist/lib/components/NotFoundPage.js +12 -0
  94. package/dist/lib/components/NotFoundPage.js.map +1 -0
  95. package/dist/lib/components/Search.d.ts +1 -0
  96. package/dist/lib/components/Search.js +34 -0
  97. package/dist/lib/components/Search.js.map +1 -0
  98. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  99. package/dist/lib/components/SlotletProvider.js +11 -0
  100. package/dist/lib/components/SlotletProvider.js.map +1 -0
  101. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  102. package/dist/lib/components/SyntaxHighlight.js +24 -22
  103. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  104. package/dist/lib/components/TopNavigation.d.ts +1 -1
  105. package/dist/lib/components/TopNavigation.js +8 -4
  106. package/dist/lib/components/TopNavigation.js.map +1 -1
  107. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  108. package/dist/lib/components/context/ThemeContext.js +3 -29
  109. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  110. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  111. package/dist/lib/components/context/ThemeProvider.js +23 -0
  112. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  113. package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
  114. package/dist/lib/components/context/ZudokuContext.js +46 -0
  115. package/dist/lib/components/context/ZudokuContext.js.map +1 -0
  116. package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
  117. package/dist/lib/components/context/ZudokuProvider.js +16 -0
  118. package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
  119. package/dist/lib/components/index.d.ts +32 -3
  120. package/dist/lib/components/index.js +21 -3
  121. package/dist/lib/components/index.js.map +1 -1
  122. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  123. package/dist/lib/components/navigation/Sidebar.js +12 -0
  124. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  125. package/dist/lib/components/navigation/SidebarBadge.d.ts +23 -0
  126. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  127. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  128. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  129. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  130. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  131. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  132. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  133. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  134. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  135. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  136. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  137. package/dist/lib/components/navigation/utils.d.ts +16 -0
  138. package/dist/lib/components/navigation/utils.js +85 -0
  139. package/dist/lib/components/navigation/utils.js.map +1 -0
  140. package/dist/lib/core/DevPortalContext.d.ts +58 -42
  141. package/dist/lib/core/DevPortalContext.js +18 -19
  142. package/dist/lib/core/DevPortalContext.js.map +1 -1
  143. package/dist/lib/core/plugins.d.ts +32 -10
  144. package/dist/lib/core/plugins.js +4 -0
  145. package/dist/lib/core/plugins.js.map +1 -1
  146. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  147. package/dist/lib/errors/ErrorAlert.js +8 -0
  148. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  149. package/dist/lib/errors/RouterError.d.ts +1 -0
  150. package/dist/lib/errors/RouterError.js +12 -0
  151. package/dist/lib/errors/RouterError.js.map +1 -0
  152. package/dist/lib/errors/ServerError.d.ts +3 -0
  153. package/dist/lib/errors/ServerError.js +6 -0
  154. package/dist/lib/errors/ServerError.js.map +1 -0
  155. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  156. package/dist/lib/errors/TopLevelError.js +7 -0
  157. package/dist/lib/errors/TopLevelError.js.map +1 -0
  158. package/dist/lib/oas/graphql/index.js +18 -9
  159. package/dist/lib/oas/graphql/index.js.map +1 -1
  160. package/dist/lib/oas/parser/index.d.ts +1 -1
  161. package/dist/lib/oas/parser/index.js +38 -12
  162. package/dist/lib/oas/parser/index.js.map +1 -1
  163. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
  164. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  165. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  166. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  167. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  168. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
  169. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  170. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  171. package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
  172. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  173. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  174. package/dist/lib/plugins/custom-page/index.js +12 -0
  175. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  176. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  177. package/dist/lib/plugins/markdown/MdxPage.js +10 -40
  178. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  179. package/dist/lib/plugins/markdown/Toc.js +17 -9
  180. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  181. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  182. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  183. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  184. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  185. package/dist/lib/plugins/markdown/index.js +3 -7
  186. package/dist/lib/plugins/markdown/index.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  188. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  189. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  190. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  191. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  192. package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
  193. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  194. package/dist/lib/plugins/openapi/ParameterList.js +2 -1
  195. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  197. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  198. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
  199. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
  200. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  201. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  202. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  203. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  204. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  205. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  206. package/dist/lib/plugins/openapi/Route.js +8 -0
  207. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  208. package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
  209. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  210. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  211. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  212. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  213. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  214. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  215. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  216. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  217. package/dist/lib/plugins/openapi/Sidecar.js +49 -17
  218. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  219. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  220. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  221. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  222. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  223. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  224. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  225. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  226. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  227. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  228. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  229. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  230. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  231. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  232. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  233. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  234. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  235. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  236. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  237. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  238. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  239. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  240. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  241. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  242. package/dist/lib/plugins/openapi/context.js +11 -0
  243. package/dist/lib/plugins/openapi/context.js.map +1 -0
  244. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  245. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  246. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  247. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  248. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  249. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  250. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  251. package/dist/lib/plugins/openapi/index.js +85 -32
  252. package/dist/lib/plugins/openapi/index.js.map +1 -1
  253. package/dist/lib/plugins/openapi/interfaces.d.ts +16 -0
  254. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  255. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  256. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  257. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  259. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  260. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  261. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
  262. package/dist/lib/plugins/openapi/playground/Playground.js +54 -26
  263. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  264. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
  265. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
  266. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  267. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  268. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  269. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  270. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  271. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  272. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  273. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  274. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  275. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  276. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  277. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  278. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  279. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  280. package/dist/lib/plugins/openapi-worker.js +1 -1
  281. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  282. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  283. package/dist/lib/plugins/redirect/index.js +3 -4
  284. package/dist/lib/plugins/redirect/index.js.map +1 -1
  285. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +2 -0
  286. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +3 -0
  287. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +1 -0
  288. package/dist/lib/plugins/search-inkeep/index.d.ts +6 -0
  289. package/dist/lib/plugins/search-inkeep/index.js +18 -0
  290. package/dist/lib/plugins/search-inkeep/index.js.map +1 -0
  291. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +23 -0
  292. package/dist/lib/plugins/search-inkeep/inkeep.js +23 -0
  293. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -0
  294. package/dist/lib/ui/Button.d.ts +5 -1
  295. package/dist/lib/ui/Button.js +24 -1
  296. package/dist/lib/ui/Button.js.map +1 -1
  297. package/dist/lib/ui/Callout.js +2 -2
  298. package/dist/lib/ui/Callout.js.map +1 -1
  299. package/dist/lib/ui/Card.js +1 -1
  300. package/dist/lib/ui/Card.js.map +1 -1
  301. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  302. package/dist/lib/ui/DropdownMenu.js +36 -0
  303. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  304. package/dist/lib/ui/Input.js.map +1 -0
  305. package/dist/lib/util/MdxComponents.d.ts +2 -2
  306. package/dist/lib/util/MdxComponents.js +7 -5
  307. package/dist/lib/util/MdxComponents.js.map +1 -1
  308. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  309. package/dist/lib/util/fetchTimeout.js +14 -0
  310. package/dist/lib/util/fetchTimeout.js.map +1 -0
  311. package/dist/lib/util/groupBy.d.ts +1 -6
  312. package/dist/lib/util/groupBy.js +10 -8
  313. package/dist/lib/util/groupBy.js.map +1 -1
  314. package/dist/lib/util/invariant.d.ts +6 -0
  315. package/dist/lib/util/invariant.js +21 -0
  316. package/dist/lib/util/invariant.js.map +1 -0
  317. package/dist/lib/util/joinPath.js +3 -2
  318. package/dist/lib/util/joinPath.js.map +1 -1
  319. package/dist/lib/util/logInit.d.ts +1 -0
  320. package/dist/lib/util/logInit.js +9 -0
  321. package/dist/lib/util/logInit.js.map +1 -0
  322. package/dist/lib/util/objectEntries.d.ts +4 -0
  323. package/dist/lib/util/objectEntries.js +2 -0
  324. package/dist/lib/util/objectEntries.js.map +1 -0
  325. package/dist/lib/util/renderIf.d.ts +1 -0
  326. package/dist/lib/util/renderIf.js +2 -0
  327. package/dist/lib/util/renderIf.js.map +1 -0
  328. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  329. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  330. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  331. package/dist/lib/util/useScrollToAnchor.js +31 -17
  332. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  333. package/dist/vite/build.js +30 -7
  334. package/dist/vite/build.js.map +1 -1
  335. package/dist/vite/config.d.ts +21 -12
  336. package/dist/vite/config.js +107 -55
  337. package/dist/vite/config.js.map +1 -1
  338. package/dist/vite/config.test.js +7 -4
  339. package/dist/vite/config.test.js.map +1 -1
  340. package/dist/vite/dev-server.d.ts +2 -1
  341. package/dist/vite/dev-server.js +44 -15
  342. package/dist/vite/dev-server.js.map +1 -1
  343. package/dist/vite/html.js +18 -5
  344. package/dist/vite/html.js.map +1 -1
  345. package/dist/vite/plugin-api-keys.js +7 -8
  346. package/dist/vite/plugin-api-keys.js.map +1 -1
  347. package/dist/vite/plugin-api.js +8 -24
  348. package/dist/vite/plugin-api.js.map +1 -1
  349. package/dist/vite/plugin-auth.js +5 -6
  350. package/dist/vite/plugin-auth.js.map +1 -1
  351. package/dist/vite/plugin-component.d.ts +2 -2
  352. package/dist/vite/plugin-component.js +9 -4
  353. package/dist/vite/plugin-component.js.map +1 -1
  354. package/dist/vite/plugin-config.d.ts +0 -2
  355. package/dist/vite/plugin-config.js +2 -13
  356. package/dist/vite/plugin-config.js.map +1 -1
  357. package/dist/vite/plugin-custom-css.d.ts +6 -0
  358. package/dist/vite/plugin-custom-css.js +54 -0
  359. package/dist/vite/plugin-custom-css.js.map +1 -0
  360. package/dist/vite/plugin-docs.js +11 -5
  361. package/dist/vite/plugin-docs.js.map +1 -1
  362. package/dist/vite/plugin-mdx.d.ts +3 -1
  363. package/dist/vite/plugin-mdx.js +5 -5
  364. package/dist/vite/plugin-mdx.js.map +1 -1
  365. package/dist/vite/plugin-metadata.js +1 -1
  366. package/dist/vite/plugin-metadata.js.map +1 -1
  367. package/dist/vite/plugin-redirect.js +10 -10
  368. package/dist/vite/plugin-redirect.js.map +1 -1
  369. package/dist/vite/plugin-sidebar.d.ts +3 -0
  370. package/dist/vite/plugin-sidebar.js +23 -0
  371. package/dist/vite/plugin-sidebar.js.map +1 -0
  372. package/dist/vite/plugin.js +7 -7
  373. package/dist/vite/plugin.js.map +1 -1
  374. package/dist/vite/prerender.d.ts +17 -0
  375. package/dist/vite/prerender.js +79 -0
  376. package/dist/vite/prerender.js.map +1 -0
  377. package/lib/AuthenticationPlugin-CH5NSVOu.js +55 -0
  378. package/lib/AuthenticationPlugin-CH5NSVOu.js.map +1 -0
  379. package/lib/CategoryHeading-BWq12Bfa.js +10 -0
  380. package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
  381. package/lib/Combination-D-9IH0zy.js +2789 -0
  382. package/lib/Combination-D-9IH0zy.js.map +1 -0
  383. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  384. package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
  385. package/lib/InkeepCustomTrigger-CE5-K5ex.js +6 -0
  386. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +1 -0
  387. package/lib/Input-HmAaR6kw.js +2239 -0
  388. package/lib/Input-HmAaR6kw.js.map +1 -0
  389. package/lib/Markdown-B_Gax7at.js +14108 -0
  390. package/lib/Markdown-B_Gax7at.js.map +1 -0
  391. package/lib/MdxPage-oN3huD58.js +187 -0
  392. package/lib/MdxPage-oN3huD58.js.map +1 -0
  393. package/lib/OperationList-Ctj0ihBN.js +448 -0
  394. package/lib/OperationList-Ctj0ihBN.js.map +1 -0
  395. package/lib/Route-DAF15JAU.js +14 -0
  396. package/lib/Route-DAF15JAU.js.map +1 -0
  397. package/lib/SlotletProvider-CzMAO73_.js +82 -0
  398. package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
  399. package/lib/Spinner-BCz1kNGw.js +276 -0
  400. package/lib/Spinner-BCz1kNGw.js.map +1 -0
  401. package/lib/ZudokuContext-BIZ8zHbZ.js +1084 -0
  402. package/lib/ZudokuContext-BIZ8zHbZ.js.map +1 -0
  403. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  404. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  405. package/lib/assets/index-BPdJm2ty.js +1 -0
  406. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  407. package/lib/assets/{worker-BCcpCNJ7.js → worker-CR7aeKop.js} +10752 -10325
  408. package/lib/assets/worker-CR7aeKop.js.map +1 -0
  409. package/lib/index-7kcHaXD6.js +1771 -0
  410. package/lib/index-7kcHaXD6.js.map +1 -0
  411. package/lib/index-CtKkHGcd.js +5942 -0
  412. package/lib/index-CtKkHGcd.js.map +1 -0
  413. package/lib/index-D-9Z7HSn.js +124 -0
  414. package/lib/index-D-9Z7HSn.js.map +1 -0
  415. package/lib/index-pI9JkN46.js +4765 -0
  416. package/lib/index-pI9JkN46.js.map +1 -0
  417. package/lib/joinPath-B7kNnUX4.js +8 -0
  418. package/lib/joinPath-B7kNnUX4.js.map +1 -0
  419. package/lib/jsx-runtime-B6kdoens.js +635 -0
  420. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  421. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  422. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  423. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  424. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  425. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  426. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  427. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  428. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  429. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  430. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  431. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  432. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  433. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  434. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  435. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  436. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  437. package/lib/router-BiRCp01d.js +2971 -0
  438. package/lib/router-BiRCp01d.js.map +1 -0
  439. package/lib/slugify-CiPVjteN.js +28 -0
  440. package/lib/slugify-CiPVjteN.js.map +1 -0
  441. package/lib/state-DsXXkBLH.js +288 -0
  442. package/lib/state-DsXXkBLH.js.map +1 -0
  443. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  444. package/lib/urql-DrBfkb92.js.map +1 -0
  445. package/lib/utils-Bh4upQ0e.js +749 -0
  446. package/lib/utils-Bh4upQ0e.js.map +1 -0
  447. package/lib/zudoku.auth-auth0.js +31 -20
  448. package/lib/zudoku.auth-auth0.js.map +1 -0
  449. package/lib/zudoku.auth-clerk.js +59 -29
  450. package/lib/zudoku.auth-clerk.js.map +1 -0
  451. package/lib/zudoku.auth-openid.js +742 -573
  452. package/lib/zudoku.auth-openid.js.map +1 -0
  453. package/lib/zudoku.components.js +2063 -684
  454. package/lib/zudoku.components.js.map +1 -0
  455. package/lib/zudoku.openapi-worker.js +15035 -146
  456. package/lib/zudoku.openapi-worker.js.map +1 -0
  457. package/lib/zudoku.plugin-api-keys.js +325 -0
  458. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  459. package/lib/zudoku.plugin-custom-page.js +13 -0
  460. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  461. package/lib/zudoku.plugin-markdown.js +31 -0
  462. package/lib/zudoku.plugin-markdown.js.map +1 -0
  463. package/lib/zudoku.plugin-openapi.js +14 -0
  464. package/lib/zudoku.plugin-openapi.js.map +1 -0
  465. package/lib/zudoku.plugin-redirect.js +11 -0
  466. package/lib/zudoku.plugin-redirect.js.map +1 -0
  467. package/lib/zudoku.plugin-search-inkeep.js +51 -0
  468. package/lib/zudoku.plugin-search-inkeep.js.map +1 -0
  469. package/package.json +68 -25
  470. package/src/app/App.tsx +0 -41
  471. package/src/app/demo-cdn.html +26 -0
  472. package/src/app/demo.html +18 -0
  473. package/src/app/demo.tsx +61 -0
  474. package/src/app/entry.client.tsx +47 -0
  475. package/src/app/entry.server.tsx +160 -0
  476. package/src/app/main.css +83 -3
  477. package/src/app/main.tsx +92 -15
  478. package/src/app/standalone.html +20 -0
  479. package/src/app/standalone.tsx +53 -0
  480. package/src/app/tailwind.ts +2 -6
  481. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  482. package/src/lib/authentication/authentication.ts +6 -12
  483. package/src/lib/authentication/components/SignIn.tsx +15 -0
  484. package/src/lib/authentication/components/SignOut.tsx +13 -0
  485. package/src/lib/authentication/components/SignUp.tsx +11 -0
  486. package/src/lib/authentication/hook.ts +4 -4
  487. package/src/lib/authentication/providers/auth0.tsx +16 -6
  488. package/src/lib/authentication/providers/clerk.tsx +63 -31
  489. package/src/lib/authentication/providers/openid.tsx +104 -34
  490. package/src/lib/authentication/state.ts +1 -1
  491. package/src/lib/components/Bootstrap.tsx +45 -0
  492. package/src/lib/components/ClientOnly.tsx +13 -0
  493. package/src/lib/components/DevPortal.tsx +75 -66
  494. package/src/lib/components/DeveloperHint.tsx +25 -0
  495. package/src/lib/components/ErrorPage.tsx +28 -0
  496. package/src/lib/components/Header.tsx +109 -41
  497. package/src/lib/components/Heading.tsx +26 -7
  498. package/src/lib/components/InlineCode.tsx +19 -0
  499. package/src/lib/components/Layout.tsx +19 -11
  500. package/src/lib/components/NotFoundPage.tsx +33 -0
  501. package/src/lib/components/Search.tsx +60 -0
  502. package/src/lib/components/SlotletProvider.tsx +25 -0
  503. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  504. package/src/lib/components/TopNavigation.tsx +10 -5
  505. package/src/lib/components/context/ThemeContext.tsx +3 -41
  506. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  507. package/src/lib/components/context/ZudokuContext.ts +58 -0
  508. package/src/lib/components/context/ZudokuProvider.tsx +26 -0
  509. package/src/lib/components/index.ts +25 -3
  510. package/src/lib/components/navigation/Sidebar.tsx +24 -0
  511. package/src/lib/components/navigation/SidebarBadge.tsx +43 -0
  512. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  513. package/src/lib/components/navigation/SidebarItem.tsx +128 -0
  514. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  515. package/src/lib/components/navigation/utils.ts +117 -0
  516. package/src/lib/core/DevPortalContext.ts +72 -68
  517. package/src/lib/core/plugins.ts +52 -15
  518. package/src/lib/errors/ErrorAlert.tsx +21 -0
  519. package/src/lib/errors/RouterError.tsx +13 -0
  520. package/src/lib/errors/ServerError.tsx +5 -0
  521. package/src/lib/errors/TopLevelError.tsx +8 -0
  522. package/src/lib/oas/graphql/index.ts +23 -12
  523. package/src/lib/oas/parser/index.ts +41 -20
  524. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
  525. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  526. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
  527. package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
  528. package/src/lib/plugins/custom-page/index.tsx +22 -0
  529. package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
  530. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  531. package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
  532. package/src/lib/plugins/markdown/index.tsx +10 -7
  533. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  534. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  535. package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
  536. package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
  537. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  538. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
  539. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -16
  540. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  541. package/src/lib/plugins/openapi/Route.tsx +21 -0
  542. package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
  543. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
  544. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  545. package/src/lib/plugins/openapi/Sidecar.tsx +68 -26
  546. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  547. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  548. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  549. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  550. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  551. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  552. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  553. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  554. package/src/lib/plugins/openapi/context.tsx +16 -0
  555. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  556. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  557. package/src/lib/plugins/openapi/index.tsx +145 -76
  558. package/src/lib/plugins/openapi/interfaces.ts +10 -0
  559. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
  560. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  561. package/src/lib/plugins/openapi/playground/Playground.tsx +240 -230
  562. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
  563. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  564. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  565. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  566. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  567. package/src/lib/plugins/openapi-worker.ts +1 -1
  568. package/src/lib/plugins/redirect/index.tsx +3 -4
  569. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +3 -0
  570. package/src/lib/plugins/search-inkeep/index.tsx +63 -0
  571. package/src/lib/plugins/search-inkeep/inkeep.ts +32 -0
  572. package/src/lib/ui/Button.tsx +32 -2
  573. package/src/lib/ui/Callout.tsx +4 -4
  574. package/src/lib/ui/Card.tsx +1 -1
  575. package/src/lib/ui/DropdownMenu.tsx +199 -0
  576. package/src/lib/util/MdxComponents.tsx +7 -15
  577. package/src/lib/util/fetchTimeout.tsx +21 -0
  578. package/src/lib/util/groupBy.ts +7 -12
  579. package/src/lib/util/invariant.ts +26 -0
  580. package/src/lib/util/joinPath.tsx +3 -2
  581. package/src/lib/util/logInit.ts +9 -0
  582. package/src/lib/util/objectEntries.ts +5 -0
  583. package/src/lib/util/renderIf.ts +4 -0
  584. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  585. package/src/lib/util/useScrollToAnchor.ts +39 -18
  586. package/dist/lib/authentication/Callback.d.ts +0 -3
  587. package/dist/lib/authentication/Callback.js +0 -34
  588. package/dist/lib/authentication/Callback.js.map +0 -1
  589. package/dist/lib/components/Input.js.map +0 -1
  590. package/dist/lib/components/Link.d.ts +0 -1
  591. package/dist/lib/components/Link.js +0 -2
  592. package/dist/lib/components/Link.js.map +0 -1
  593. package/dist/lib/components/Router.d.ts +0 -4
  594. package/dist/lib/components/Router.js +0 -20
  595. package/dist/lib/components/Router.js.map +0 -1
  596. package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
  597. package/dist/lib/components/context/DevPortalProvider.js +0 -39
  598. package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
  599. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  600. package/dist/lib/components/navigation/SideNavigation.js +0 -11
  601. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  602. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  603. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  604. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  605. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
  606. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  607. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  608. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  609. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
  610. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
  611. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  612. package/dist/lib/components/navigation/util.d.ts +0 -8
  613. package/dist/lib/components/navigation/util.js +0 -15
  614. package/dist/lib/components/navigation/util.js.map +0 -1
  615. package/dist/lib/core/helmet.d.ts +0 -4
  616. package/dist/lib/core/helmet.js +0 -5
  617. package/dist/lib/core/helmet.js.map +0 -1
  618. package/dist/lib/core/icons.d.ts +0 -1
  619. package/dist/lib/core/icons.js +0 -2
  620. package/dist/lib/core/icons.js.map +0 -1
  621. package/dist/lib/core/router.d.ts +0 -1
  622. package/dist/lib/core/router.js +0 -2
  623. package/dist/lib/core/router.js.map +0 -1
  624. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  625. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  626. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  627. package/dist/lib/plugins/api-key/index.js.map +0 -1
  628. package/dist/lib/plugins/index.d.ts +0 -4
  629. package/dist/lib/plugins/index.js +0 -5
  630. package/dist/lib/plugins/index.js.map +0 -1
  631. package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
  632. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  633. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  634. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  635. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  636. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  637. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  638. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  639. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  640. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  641. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  642. package/dist/lib/ui/button-variants.d.ts +0 -4
  643. package/dist/lib/ui/button-variants.js +0 -24
  644. package/dist/lib/ui/button-variants.js.map +0 -1
  645. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  646. package/dist/lib/util/traverseNavigation.js +0 -30
  647. package/dist/lib/util/traverseNavigation.js.map +0 -1
  648. package/dist/vite/common.d.ts +0 -1
  649. package/dist/vite/common.js +0 -5
  650. package/dist/vite/common.js.map +0 -1
  651. package/dist/vite/plugin-html.d.ts +0 -3
  652. package/dist/vite/plugin-html.js +0 -47
  653. package/dist/vite/plugin-html.js.map +0 -1
  654. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  655. package/dist/vite/plugin-openapi-worker.js +0 -28
  656. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  657. package/lib/Spinner-DCwVN24H.js +0 -8441
  658. package/lib/clerk-Wslx_mPo.js +0 -19685
  659. package/lib/index-PyGcnQFX.js +0 -3462
  660. package/lib/loglevel-CoH7VSwE.js +0 -152
  661. package/lib/state-2Hu1renZ.js +0 -313
  662. package/lib/zudoku.plugins.js +0 -19908
  663. package/src/lib/authentication/Callback.tsx +0 -60
  664. package/src/lib/components/Link.tsx +0 -1
  665. package/src/lib/components/Router.tsx +0 -28
  666. package/src/lib/components/context/DevPortalProvider.ts +0 -54
  667. package/src/lib/components/navigation/SideNavigation.tsx +0 -21
  668. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
  669. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
  670. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
  671. package/src/lib/components/navigation/util.ts +0 -38
  672. package/src/lib/core/helmet.ts +0 -5
  673. package/src/lib/core/icons.tsx +0 -1
  674. package/src/lib/core/router.tsx +0 -1
  675. package/src/lib/plugins/index.ts +0 -4
  676. package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
  677. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  678. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  679. package/src/lib/ui/button-variants.ts +0 -31
  680. package/src/lib/util/traverseNavigation.ts +0 -55
  681. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  682. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  683. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  684. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  685. /package/dist/lib/{components → ui}/Input.js +0 -0
  686. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -1,894 +1,2273 @@
1
- var De = Object.defineProperty;
2
- var se = (t) => {
3
- throw TypeError(t);
1
+ var sr = Object.defineProperty;
2
+ var dt = (e) => {
3
+ throw TypeError(e);
4
4
  };
5
- var Te = (t, e, s) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
- var y = (t, e, s) => Te(t, typeof e != "symbol" ? e + "" : e, s), ae = (t, e, s) => e.has(t) || se("Cannot " + s);
7
- var i = (t, e, s) => (ae(t, e, "read from private field"), s ? s.call(t) : e.get(t)), m = (t, e, s) => e.has(t) ? se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), u = (t, e, s, a) => (ae(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
8
- var S = (t, e, s, a) => ({
9
- set _(r) {
10
- u(t, e, r, s);
5
+ var ir = (e, t, n) => t in e ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var j = (e, t, n) => ir(e, typeof t != "symbol" ? t + "" : t, n), ht = (e, t, n) => t.has(e) || dt("Cannot " + n);
7
+ var h = (e, t, n) => (ht(e, t, "read from private field"), n ? n.call(e) : t.get(e)), N = (e, t, n) => t.has(e) ? dt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), S = (e, t, n, r) => (ht(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
+ var Me = (e, t, n, r) => ({
9
+ set _(a) {
10
+ S(e, t, a, n);
11
11
  },
12
12
  get _() {
13
- return i(t, e, a);
13
+ return h(e, t, r);
14
14
  }
15
15
  });
16
- import { j as n, u as D, O as Ie } from "./index-PyGcnQFX.js";
17
- import { S as me, h as ge, Q as Ee, n as p, m as ne, M as Se, a as re, b as j, e as Fe, c as Re, d as He, f as Le, o as ie, r as oe, g as ze, i as le, p as ce, s as Ke, j as z, u as U, N as B, k as _e, l as Be, q as Ve, t as W, v as X, w as V, x as ve, y as Ue, z as L, R as ye, T as xe, C as be, A as We, B as Xe, D as $e, E as Ge, H as Je, F as Ye, G as Ze, I as et, J as tt, K as st, L as at, O as nt, P as rt, U as it, V as ot } from "./Spinner-DCwVN24H.js";
18
- import { X as _t, W as Bt } from "./Spinner-DCwVN24H.js";
19
- import { memo as je, createContext as lt, useEffect as I, useRef as K, useState as ct, forwardRef as ht, Suspense as Pe, useMemo as H } from "react";
20
- import { c as ut } from "./state-2Hu1renZ.js";
21
- var x, de, dt = (de = class extends me {
22
- constructor(e = {}) {
16
+ import { H as Pt, a as Ge, M as cr, u as ur, A as lr, b as dr } from "./utils-Bh4upQ0e.js";
17
+ import { d as hr, a as fr, R as pr, N as Pe, u as De, L as je, b as mr, c as gr, O as jt } from "./index-7kcHaXD6.js";
18
+ import { E as Rt, S as vr, a as Re, R as xr } from "./SlotletProvider-CzMAO73_.js";
19
+ import { j as o } from "./jsx-runtime-B6kdoens.js";
20
+ import { M as yr, c as wr, a as Et, b as _t, A as br, u as me, h as Mr, d as y, e as Cr, F as Sr, D as Pr, C as jr, P as se, f as He, g as Rr, i as Nt, R as Er, S as _r, j as Nr, k as Dr, l as Dt, m as Ir, n as Ee, o as It, p as kr, B as Qe } from "./Combination-D-9IH0zy.js";
21
+ import { c as ie, a as M, C as Ar, b as Or, u as Tr, T as Fr, M as Lr, V as Kr, d as ze, e as $r, f as Br } from "./Markdown-B_Gax7at.js";
22
+ import * as c from "react";
23
+ import Qr, { StrictMode as kt, createContext as At, Component as qr, createElement as ft, isValidElement as Ur, useState as de, useCallback as Ot, useEffect as W, Suspense as Tt, memo as Ft, useMemo as Ke, useContext as Gr, Fragment as Hr, useRef as Ve, forwardRef as zr } from "react";
24
+ import { g as Ye } from "./_commonjsHelpers-BVfed4GL.js";
25
+ import { r as Vr } from "./router-BiRCp01d.js";
26
+ import { S as qe, R as Yr, T as Xr, C as Wr } from "./index-D-9Z7HSn.js";
27
+ import { S as Lt, h as Kt, Q as Jr, n as E, m as pt, a as mt, b as $, e as Zr, c as eo, d as to, f as no, o as gt, r as vt, g as ro, i as xt, p as yt, s as oo, u as Ie, j as ao, Z as so, k as io, l as $t, q as co } from "./ZudokuContext-BIZ8zHbZ.js";
28
+ import { j as Xe } from "./joinPath-B7kNnUX4.js";
29
+ import { c as Bt, P as ke, R as uo, I as lo, S as $e, a as ho } from "./Spinner-BCz1kNGw.js";
30
+ /**
31
+ * @license lucide-react v0.378.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ const Qt = ie("ChevronRight", [
37
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
38
+ ]);
39
+ /**
40
+ * @license lucide-react v0.378.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ const fo = ie("Dot", [
46
+ ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
47
+ ]);
48
+ /**
49
+ * @license lucide-react v0.378.0 - ISC
50
+ *
51
+ * This source code is licensed under the ISC license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */
54
+ const po = ie("ExternalLink", [
55
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
56
+ ["path", { d: "M10 14 21 3", key: "gplh6r" }],
57
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
58
+ ]);
59
+ /**
60
+ * @license lucide-react v0.378.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */
65
+ const mo = ie("MoonStar", [
66
+ ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
67
+ ["path", { d: "M20 3v4", key: "1olli1" }],
68
+ ["path", { d: "M22 5h-4", key: "1gvqau" }]
69
+ ]);
70
+ /**
71
+ * @license lucide-react v0.378.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */
76
+ const go = ie("Search", [
77
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
78
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
79
+ ]);
80
+ /**
81
+ * @license lucide-react v0.378.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */
86
+ const vo = ie("Sun", [
87
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
88
+ ["path", { d: "M12 2v2", key: "tus03m" }],
89
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
90
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
91
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
92
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
93
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
94
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
95
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
96
+ ]);
97
+ function xo({ error: e }) {
98
+ return /* @__PURE__ */ o.jsx(Rt, { error: e });
99
+ }
100
+ var ge = {};
101
+ const yo = /* @__PURE__ */ Ye(Vr), wo = /* @__PURE__ */ Ye(hr), bo = /* @__PURE__ */ Ye(fr);
102
+ Object.defineProperty(ge, "__esModule", { value: !0 });
103
+ var Mo = Qr, F = yo, We = wo, B = bo;
104
+ function Co(e) {
105
+ if (e && e.__esModule) return e;
106
+ var t = /* @__PURE__ */ Object.create(null);
107
+ return e && Object.keys(e).forEach(function(n) {
108
+ if (n !== "default") {
109
+ var r = Object.getOwnPropertyDescriptor(e, n);
110
+ Object.defineProperty(t, n, r.get ? r : {
111
+ enumerable: !0,
112
+ get: function() {
113
+ return e[n];
114
+ }
115
+ });
116
+ }
117
+ }), t.default = e, Object.freeze(t);
118
+ }
119
+ var O = /* @__PURE__ */ Co(Mo);
120
+ function So({
121
+ basename: e,
122
+ children: t,
123
+ location: n = "/",
124
+ future: r
125
+ }) {
126
+ typeof n == "string" && (n = B.parsePath(n));
127
+ let a = F.Action.Pop, s = {
128
+ pathname: n.pathname || "/",
129
+ search: n.search || "",
130
+ hash: n.hash || "",
131
+ state: n.state != null ? n.state : null,
132
+ key: n.key || "default"
133
+ }, i = qt();
134
+ return /* @__PURE__ */ O.createElement(B.Router, {
135
+ basename: e,
136
+ children: t,
137
+ location: s,
138
+ navigationType: a,
139
+ navigator: i,
140
+ future: r,
141
+ static: !0
142
+ });
143
+ }
144
+ function Po({
145
+ context: e,
146
+ router: t,
147
+ hydrate: n = !0,
148
+ nonce: r
149
+ }) {
150
+ t && e || (process.env.NODE_ENV !== "production" ? F.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : F.UNSAFE_invariant(!1));
151
+ let a = {
152
+ router: t,
153
+ navigator: qt(),
154
+ static: !0,
155
+ staticContext: e,
156
+ basename: e.basename || "/"
157
+ }, s = /* @__PURE__ */ new Map(), i = "";
158
+ if (n !== !1) {
159
+ let d = {
160
+ loaderData: e.loaderData,
161
+ actionData: e.actionData,
162
+ errors: Ro(e.errors)
163
+ };
164
+ i = `window.__staticRouterHydrationData = JSON.parse(${ko(JSON.stringify(JSON.stringify(d)))});`;
165
+ }
166
+ let {
167
+ state: u
168
+ } = a.router;
169
+ return /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement(B.UNSAFE_DataRouterContext.Provider, {
170
+ value: a
171
+ }, /* @__PURE__ */ O.createElement(B.UNSAFE_DataRouterStateContext.Provider, {
172
+ value: u
173
+ }, /* @__PURE__ */ O.createElement(B.UNSAFE_FetchersContext.Provider, {
174
+ value: s
175
+ }, /* @__PURE__ */ O.createElement(B.UNSAFE_ViewTransitionContext.Provider, {
176
+ value: {
177
+ isTransitioning: !1
178
+ }
179
+ }, /* @__PURE__ */ O.createElement(B.Router, {
180
+ basename: a.basename,
181
+ location: u.location,
182
+ navigationType: u.historyAction,
183
+ navigator: a.navigator,
184
+ static: a.static,
185
+ future: {
186
+ v7_relativeSplatPath: t.future.v7_relativeSplatPath
187
+ }
188
+ }, /* @__PURE__ */ O.createElement(jo, {
189
+ routes: t.routes,
190
+ future: t.future,
191
+ state: u
192
+ })))))), i ? /* @__PURE__ */ O.createElement("script", {
193
+ suppressHydrationWarning: !0,
194
+ nonce: r,
195
+ dangerouslySetInnerHTML: {
196
+ __html: i
197
+ }
198
+ }) : null);
199
+ }
200
+ function jo({
201
+ routes: e,
202
+ future: t,
203
+ state: n
204
+ }) {
205
+ return We.UNSAFE_useRoutesImpl(e, void 0, n, t);
206
+ }
207
+ function Ro(e) {
208
+ if (!e) return null;
209
+ let t = Object.entries(e), n = {};
210
+ for (let [r, a] of t)
211
+ F.isRouteErrorResponse(a) ? n[r] = {
212
+ ...a,
213
+ __type: "RouteErrorResponse"
214
+ } : a instanceof Error ? n[r] = {
215
+ message: a.message,
216
+ __type: "Error",
217
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
218
+ // can re-create the same type during hydration.
219
+ ...a.name !== "Error" ? {
220
+ __subType: a.name
221
+ } : {}
222
+ } : n[r] = a;
223
+ return n;
224
+ }
225
+ function qt() {
226
+ return {
227
+ createHref: Ut,
228
+ encodeLocation: Gt,
229
+ push(e) {
230
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
231
+ },
232
+ replace(e) {
233
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
234
+ },
235
+ go(e) {
236
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
237
+ },
238
+ back() {
239
+ throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
240
+ },
241
+ forward() {
242
+ throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
243
+ }
244
+ };
245
+ }
246
+ function Eo(e, t) {
247
+ return F.createStaticHandler(e, {
248
+ ...t,
249
+ mapRouteProperties: We.UNSAFE_mapRouteProperties
250
+ });
251
+ }
252
+ function _o(e, t, n = {}) {
253
+ let r = {}, a = F.UNSAFE_convertRoutesToDataRoutes(e, We.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((u) => {
254
+ let d = r[u.route.id] || u.route;
255
+ return {
256
+ ...u,
257
+ route: d
258
+ };
259
+ }), i = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
260
+ return {
261
+ get basename() {
262
+ return t.basename;
263
+ },
264
+ get future() {
265
+ var u, d;
266
+ return {
267
+ v7_fetcherPersist: !1,
268
+ v7_normalizeFormMethod: !1,
269
+ v7_partialHydration: ((u = n.future) == null ? void 0 : u.v7_partialHydration) === !0,
270
+ v7_prependBasename: !1,
271
+ v7_relativeSplatPath: ((d = n.future) == null ? void 0 : d.v7_relativeSplatPath) === !0,
272
+ v7_skipActionErrorRevalidation: !1
273
+ };
274
+ },
275
+ get state() {
276
+ return {
277
+ historyAction: F.Action.Pop,
278
+ location: t.location,
279
+ matches: s,
280
+ loaderData: t.loaderData,
281
+ actionData: t.actionData,
282
+ errors: t.errors,
283
+ initialized: !0,
284
+ navigation: F.IDLE_NAVIGATION,
285
+ restoreScrollPosition: null,
286
+ preventScrollReset: !1,
287
+ revalidation: "idle",
288
+ fetchers: /* @__PURE__ */ new Map(),
289
+ blockers: /* @__PURE__ */ new Map()
290
+ };
291
+ },
292
+ get routes() {
293
+ return a;
294
+ },
295
+ get window() {
296
+ },
297
+ initialize() {
298
+ throw i("initialize");
299
+ },
300
+ subscribe() {
301
+ throw i("subscribe");
302
+ },
303
+ enableScrollRestoration() {
304
+ throw i("enableScrollRestoration");
305
+ },
306
+ navigate() {
307
+ throw i("navigate");
308
+ },
309
+ fetch() {
310
+ throw i("fetch");
311
+ },
312
+ revalidate() {
313
+ throw i("revalidate");
314
+ },
315
+ createHref: Ut,
316
+ encodeLocation: Gt,
317
+ getFetcher() {
318
+ return F.IDLE_FETCHER;
319
+ },
320
+ deleteFetcher() {
321
+ throw i("deleteFetcher");
322
+ },
323
+ dispose() {
324
+ throw i("dispose");
325
+ },
326
+ getBlocker() {
327
+ return F.IDLE_BLOCKER;
328
+ },
329
+ deleteBlocker() {
330
+ throw i("deleteBlocker");
331
+ },
332
+ patchRoutes() {
333
+ throw i("patchRoutes");
334
+ },
335
+ _internalFetchControllers: /* @__PURE__ */ new Map(),
336
+ _internalActiveDeferreds: /* @__PURE__ */ new Map(),
337
+ _internalSetRoutes() {
338
+ throw i("_internalSetRoutes");
339
+ }
340
+ };
341
+ }
342
+ function Ut(e) {
343
+ return typeof e == "string" ? e : B.createPath(e);
344
+ }
345
+ function Gt(e) {
346
+ let t = typeof e == "string" ? e : B.createPath(e);
347
+ t = t.replace(/ $/, "%20");
348
+ let n = No.test(t) ? new URL(t) : new URL(t, "http://localhost");
349
+ return {
350
+ pathname: n.pathname,
351
+ search: n.search,
352
+ hash: n.hash
353
+ };
354
+ }
355
+ const No = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Do = {
356
+ "&": "\\u0026",
357
+ ">": "\\u003e",
358
+ "<": "\\u003c",
359
+ "\u2028": "\\u2028",
360
+ "\u2029": "\\u2029"
361
+ }, Io = /[&><\u2028\u2029]/g;
362
+ function ko(e) {
363
+ return e.replace(Io, (t) => Do[t]);
364
+ }
365
+ ge.StaticRouter = So;
366
+ var Ao = ge.StaticRouterProvider = Po;
367
+ ge.createStaticHandler = Eo;
368
+ ge.createStaticRouter = _o;
369
+ const Oo = ({
370
+ router: e,
371
+ hydrate: t = !1
372
+ }) => /* @__PURE__ */ o.jsx(kt, { children: /* @__PURE__ */ o.jsx(Pt, { children: /* @__PURE__ */ o.jsx(qe.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ o.jsx(pr, { router: e }) }) }) }), To = ({
373
+ router: e,
374
+ context: t,
375
+ helmetContext: n
376
+ }) => /* @__PURE__ */ o.jsx(kt, { children: /* @__PURE__ */ o.jsx(Pt, { context: n, children: /* @__PURE__ */ o.jsx(Ao, { router: e, context: t }) }) });
377
+ var T, Mt, Fo = (Mt = class extends Lt {
378
+ constructor(t = {}) {
23
379
  super();
24
- m(this, x);
25
- this.config = e, u(this, x, /* @__PURE__ */ new Map());
380
+ N(this, T);
381
+ this.config = t, S(this, T, /* @__PURE__ */ new Map());
26
382
  }
27
- build(e, s, a) {
28
- const r = s.queryKey, o = s.queryHash ?? ge(r, s);
29
- let l = this.get(o);
30
- return l || (l = new Ee({
383
+ build(t, n, r) {
384
+ const a = n.queryKey, s = n.queryHash ?? Kt(a, n);
385
+ let i = this.get(s);
386
+ return i || (i = new Jr({
31
387
  cache: this,
32
- queryKey: r,
33
- queryHash: o,
34
- options: e.defaultQueryOptions(s),
35
- state: a,
36
- defaultOptions: e.getQueryDefaults(r)
37
- }), this.add(l)), l;
38
- }
39
- add(e) {
40
- i(this, x).has(e.queryHash) || (i(this, x).set(e.queryHash, e), this.notify({
388
+ queryKey: a,
389
+ queryHash: s,
390
+ options: t.defaultQueryOptions(n),
391
+ state: r,
392
+ defaultOptions: t.getQueryDefaults(a)
393
+ }), this.add(i)), i;
394
+ }
395
+ add(t) {
396
+ h(this, T).has(t.queryHash) || (h(this, T).set(t.queryHash, t), this.notify({
41
397
  type: "added",
42
- query: e
398
+ query: t
43
399
  }));
44
400
  }
45
- remove(e) {
46
- const s = i(this, x).get(e.queryHash);
47
- s && (e.destroy(), s === e && i(this, x).delete(e.queryHash), this.notify({ type: "removed", query: e }));
401
+ remove(t) {
402
+ const n = h(this, T).get(t.queryHash);
403
+ n && (t.destroy(), n === t && h(this, T).delete(t.queryHash), this.notify({ type: "removed", query: t }));
48
404
  }
49
405
  clear() {
50
- p.batch(() => {
51
- this.getAll().forEach((e) => {
52
- this.remove(e);
406
+ E.batch(() => {
407
+ this.getAll().forEach((t) => {
408
+ this.remove(t);
53
409
  });
54
410
  });
55
411
  }
56
- get(e) {
57
- return i(this, x).get(e);
412
+ get(t) {
413
+ return h(this, T).get(t);
58
414
  }
59
415
  getAll() {
60
- return [...i(this, x).values()];
416
+ return [...h(this, T).values()];
61
417
  }
62
- find(e) {
63
- const s = { exact: !0, ...e };
418
+ find(t) {
419
+ const n = { exact: !0, ...t };
64
420
  return this.getAll().find(
65
- (a) => ne(s, a)
421
+ (r) => pt(n, r)
66
422
  );
67
423
  }
68
- findAll(e = {}) {
69
- const s = this.getAll();
70
- return Object.keys(e).length > 0 ? s.filter((a) => ne(e, a)) : s;
424
+ findAll(t = {}) {
425
+ const n = this.getAll();
426
+ return Object.keys(t).length > 0 ? n.filter((r) => pt(t, r)) : n;
71
427
  }
72
- notify(e) {
73
- p.batch(() => {
74
- this.listeners.forEach((s) => {
75
- s(e);
428
+ notify(t) {
429
+ E.batch(() => {
430
+ this.listeners.forEach((n) => {
431
+ n(t);
76
432
  });
77
433
  });
78
434
  }
79
435
  onFocus() {
80
- p.batch(() => {
81
- this.getAll().forEach((e) => {
82
- e.onFocus();
436
+ E.batch(() => {
437
+ this.getAll().forEach((t) => {
438
+ t.onFocus();
83
439
  });
84
440
  });
85
441
  }
86
442
  onOnline() {
87
- p.batch(() => {
88
- this.getAll().forEach((e) => {
89
- e.onOnline();
443
+ E.batch(() => {
444
+ this.getAll().forEach((t) => {
445
+ t.onOnline();
90
446
  });
91
447
  });
92
448
  }
93
- }, x = new WeakMap(), de), f, T, fe, ft = (fe = class extends me {
94
- constructor(e = {}) {
449
+ }, T = new WeakMap(), Mt), R, pe, Ct, Lo = (Ct = class extends Lt {
450
+ constructor(t = {}) {
95
451
  super();
96
- m(this, f);
97
- m(this, T);
98
- this.config = e, u(this, f, /* @__PURE__ */ new Map()), u(this, T, Date.now());
452
+ N(this, R);
453
+ N(this, pe);
454
+ this.config = t, S(this, R, /* @__PURE__ */ new Map()), S(this, pe, Date.now());
99
455
  }
100
- build(e, s, a) {
101
- const r = new Se({
456
+ build(t, n, r) {
457
+ const a = new yr({
102
458
  mutationCache: this,
103
- mutationId: ++S(this, T)._,
104
- options: e.defaultMutationOptions(s),
105
- state: a
459
+ mutationId: ++Me(this, pe)._,
460
+ options: t.defaultMutationOptions(n),
461
+ state: r
106
462
  });
107
- return this.add(r), r;
108
- }
109
- add(e) {
110
- const s = F(e), a = i(this, f).get(s) ?? [];
111
- a.push(e), i(this, f).set(s, a), this.notify({ type: "added", mutation: e });
112
- }
113
- remove(e) {
114
- var a;
115
- const s = F(e);
116
- if (i(this, f).has(s)) {
117
- const r = (a = i(this, f).get(s)) == null ? void 0 : a.filter((o) => o !== e);
118
- r && (r.length === 0 ? i(this, f).delete(s) : i(this, f).set(s, r));
463
+ return this.add(a), a;
464
+ }
465
+ add(t) {
466
+ const n = Ce(t), r = h(this, R).get(n) ?? [];
467
+ r.push(t), h(this, R).set(n, r), this.notify({ type: "added", mutation: t });
468
+ }
469
+ remove(t) {
470
+ var r;
471
+ const n = Ce(t);
472
+ if (h(this, R).has(n)) {
473
+ const a = (r = h(this, R).get(n)) == null ? void 0 : r.filter((s) => s !== t);
474
+ a && (a.length === 0 ? h(this, R).delete(n) : h(this, R).set(n, a));
119
475
  }
120
- this.notify({ type: "removed", mutation: e });
476
+ this.notify({ type: "removed", mutation: t });
121
477
  }
122
- canRun(e) {
123
- var a;
124
- const s = (a = i(this, f).get(F(e))) == null ? void 0 : a.find((r) => r.state.status === "pending");
125
- return !s || s === e;
478
+ canRun(t) {
479
+ var r;
480
+ const n = (r = h(this, R).get(Ce(t))) == null ? void 0 : r.find((a) => a.state.status === "pending");
481
+ return !n || n === t;
126
482
  }
127
- runNext(e) {
128
- var a;
129
- const s = (a = i(this, f).get(F(e))) == null ? void 0 : a.find((r) => r !== e && r.state.isPaused);
130
- return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
483
+ runNext(t) {
484
+ var r;
485
+ const n = (r = h(this, R).get(Ce(t))) == null ? void 0 : r.find((a) => a !== t && a.state.isPaused);
486
+ return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
131
487
  }
132
488
  clear() {
133
- p.batch(() => {
134
- this.getAll().forEach((e) => {
135
- this.remove(e);
489
+ E.batch(() => {
490
+ this.getAll().forEach((t) => {
491
+ this.remove(t);
136
492
  });
137
493
  });
138
494
  }
139
495
  getAll() {
140
- return [...i(this, f).values()].flat();
496
+ return [...h(this, R).values()].flat();
141
497
  }
142
- find(e) {
143
- const s = { exact: !0, ...e };
498
+ find(t) {
499
+ const n = { exact: !0, ...t };
144
500
  return this.getAll().find(
145
- (a) => re(s, a)
501
+ (r) => mt(n, r)
146
502
  );
147
503
  }
148
- findAll(e = {}) {
149
- return this.getAll().filter((s) => re(e, s));
504
+ findAll(t = {}) {
505
+ return this.getAll().filter((n) => mt(t, n));
150
506
  }
151
- notify(e) {
152
- p.batch(() => {
153
- this.listeners.forEach((s) => {
154
- s(e);
507
+ notify(t) {
508
+ E.batch(() => {
509
+ this.listeners.forEach((n) => {
510
+ n(t);
155
511
  });
156
512
  });
157
513
  }
158
514
  resumePausedMutations() {
159
- const e = this.getAll().filter((s) => s.state.isPaused);
160
- return p.batch(
515
+ const t = this.getAll().filter((n) => n.state.isPaused);
516
+ return E.batch(
161
517
  () => Promise.all(
162
- e.map((s) => s.continue().catch(j))
518
+ t.map((n) => n.continue().catch($))
163
519
  )
164
520
  );
165
521
  }
166
- }, f = new WeakMap(), T = new WeakMap(), fe);
167
- function F(t) {
168
- var e;
169
- return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
522
+ }, R = new WeakMap(), pe = new WeakMap(), Ct);
523
+ function Ce(e) {
524
+ var t;
525
+ return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
170
526
  }
171
- function pt(t) {
527
+ function Ko(e) {
172
528
  return {
173
- onFetch: (e, s) => {
174
- const a = async () => {
175
- var $, G, J, Y, Z;
176
- const r = e.options, o = (J = (G = ($ = e.fetchOptions) == null ? void 0 : $.meta) == null ? void 0 : G.fetchMore) == null ? void 0 : J.direction, l = ((Y = e.state.data) == null ? void 0 : Y.pages) || [], h = ((Z = e.state.data) == null ? void 0 : Z.pageParams) || [], g = { pages: [], pageParams: [] };
177
- let b = !1;
178
- const d = (v) => {
179
- Object.defineProperty(v, "signal", {
529
+ onFetch: (t, n) => {
530
+ const r = async () => {
531
+ var x, b, I, Q, V;
532
+ const a = t.options, s = (I = (b = (x = t.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : b.fetchMore) == null ? void 0 : I.direction, i = ((Q = t.state.data) == null ? void 0 : Q.pages) || [], u = ((V = t.state.data) == null ? void 0 : V.pageParams) || [], d = { pages: [], pageParams: [] };
533
+ let g = !1;
534
+ const p = (C) => {
535
+ Object.defineProperty(C, "signal", {
180
536
  enumerable: !0,
181
- get: () => (e.signal.aborted ? b = !0 : e.signal.addEventListener("abort", () => {
182
- b = !0;
183
- }), e.signal)
537
+ get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
538
+ g = !0;
539
+ }), t.signal)
184
540
  });
185
- }, Qe = Fe(e.options, e.fetchOptions), _ = async (v, P, O) => {
186
- if (b)
541
+ }, l = Zr(t.options, t.fetchOptions), f = async (C, k, L) => {
542
+ if (g)
187
543
  return Promise.reject();
188
- if (P == null && v.pages.length)
189
- return Promise.resolve(v);
190
- const E = {
191
- queryKey: e.queryKey,
192
- pageParam: P,
193
- direction: O ? "backward" : "forward",
194
- meta: e.options.meta
544
+ if (k == null && C.pages.length)
545
+ return Promise.resolve(C);
546
+ const Y = {
547
+ queryKey: t.queryKey,
548
+ pageParam: k,
549
+ direction: L ? "backward" : "forward",
550
+ meta: t.options.meta
195
551
  };
196
- d(E);
197
- const qe = await Qe(
198
- E
199
- ), { maxPages: ee } = e.options, te = O ? Re : He;
552
+ p(Y);
553
+ const Z = await l(
554
+ Y
555
+ ), { maxPages: we } = t.options, X = L ? eo : to;
200
556
  return {
201
- pages: te(v.pages, qe, ee),
202
- pageParams: te(v.pageParams, P, ee)
557
+ pages: X(C.pages, Z, we),
558
+ pageParams: X(C.pageParams, k, we)
203
559
  };
204
560
  };
205
- let C;
206
- if (o && l.length) {
207
- const v = o === "backward", P = v ? mt : he, O = {
208
- pages: l,
209
- pageParams: h
210
- }, E = P(r, O);
211
- C = await _(O, E, v);
561
+ let v;
562
+ if (s && i.length) {
563
+ const C = s === "backward", k = C ? $o : wt, L = {
564
+ pages: i,
565
+ pageParams: u
566
+ }, Y = k(a, L);
567
+ v = await f(L, Y, C);
212
568
  } else {
213
- C = await _(
214
- g,
215
- h[0] ?? r.initialPageParam
569
+ v = await f(
570
+ d,
571
+ u[0] ?? a.initialPageParam
216
572
  );
217
- const v = t ?? l.length;
218
- for (let P = 1; P < v; P++) {
219
- const O = he(r, C);
220
- C = await _(C, O);
573
+ const C = e ?? i.length;
574
+ for (let k = 1; k < C; k++) {
575
+ const L = wt(a, v);
576
+ v = await f(v, L);
221
577
  }
222
578
  }
223
- return C;
579
+ return v;
224
580
  };
225
- e.options.persister ? e.fetchFn = () => {
226
- var r, o;
227
- return (o = (r = e.options).persister) == null ? void 0 : o.call(
228
- r,
581
+ t.options.persister ? t.fetchFn = () => {
582
+ var a, s;
583
+ return (s = (a = t.options).persister) == null ? void 0 : s.call(
229
584
  a,
585
+ r,
230
586
  {
231
- queryKey: e.queryKey,
232
- meta: e.options.meta,
233
- signal: e.signal
587
+ queryKey: t.queryKey,
588
+ meta: t.options.meta,
589
+ signal: t.signal
234
590
  },
235
- s
591
+ n
236
592
  );
237
- } : e.fetchFn = a;
593
+ } : t.fetchFn = r;
238
594
  }
239
595
  };
240
596
  }
241
- function he(t, { pages: e, pageParams: s }) {
242
- const a = e.length - 1;
243
- return t.getNextPageParam(
244
- e[a],
245
- e,
246
- s[a],
247
- s
597
+ function wt(e, { pages: t, pageParams: n }) {
598
+ const r = t.length - 1;
599
+ return e.getNextPageParam(
600
+ t[r],
601
+ t,
602
+ n[r],
603
+ n
248
604
  );
249
605
  }
250
- function mt(t, { pages: e, pageParams: s }) {
251
- var a;
252
- return (a = t.getPreviousPageParam) == null ? void 0 : a.call(
253
- t,
254
- e[0],
606
+ function $o(e, { pages: t, pageParams: n }) {
607
+ var r;
608
+ return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
255
609
  e,
256
- s[0],
257
- s
610
+ t[0],
611
+ t,
612
+ n[0],
613
+ n
258
614
  );
259
615
  }
260
- var c, w, N, M, A, k, Q, q, pe, gt = (pe = class {
261
- constructor(t = {}) {
262
- m(this, c);
263
- m(this, w);
264
- m(this, N);
265
- m(this, M);
266
- m(this, A);
267
- m(this, k);
268
- m(this, Q);
269
- m(this, q);
270
- u(this, c, t.queryCache || new dt()), u(this, w, t.mutationCache || new ft()), u(this, N, t.defaultOptions || {}), u(this, M, /* @__PURE__ */ new Map()), u(this, A, /* @__PURE__ */ new Map()), u(this, k, 0);
616
+ var w, U, G, ne, re, H, oe, ae, St, Bo = (St = class {
617
+ constructor(e = {}) {
618
+ N(this, w);
619
+ N(this, U);
620
+ N(this, G);
621
+ N(this, ne);
622
+ N(this, re);
623
+ N(this, H);
624
+ N(this, oe);
625
+ N(this, ae);
626
+ S(this, w, e.queryCache || new Fo()), S(this, U, e.mutationCache || new Lo()), S(this, G, e.defaultOptions || {}), S(this, ne, /* @__PURE__ */ new Map()), S(this, re, /* @__PURE__ */ new Map()), S(this, H, 0);
271
627
  }
272
628
  mount() {
273
- S(this, k)._++, i(this, k) === 1 && (u(this, Q, Le.subscribe(async (t) => {
274
- t && (await this.resumePausedMutations(), i(this, c).onFocus());
275
- })), u(this, q, ie.subscribe(async (t) => {
276
- t && (await this.resumePausedMutations(), i(this, c).onOnline());
629
+ Me(this, H)._++, h(this, H) === 1 && (S(this, oe, no.subscribe(async (e) => {
630
+ e && (await this.resumePausedMutations(), h(this, w).onFocus());
631
+ })), S(this, ae, gt.subscribe(async (e) => {
632
+ e && (await this.resumePausedMutations(), h(this, w).onOnline());
277
633
  })));
278
634
  }
279
635
  unmount() {
280
- var t, e;
281
- S(this, k)._--, i(this, k) === 0 && ((t = i(this, Q)) == null || t.call(this), u(this, Q, void 0), (e = i(this, q)) == null || e.call(this), u(this, q, void 0));
636
+ var e, t;
637
+ Me(this, H)._--, h(this, H) === 0 && ((e = h(this, oe)) == null || e.call(this), S(this, oe, void 0), (t = h(this, ae)) == null || t.call(this), S(this, ae, void 0));
282
638
  }
283
- isFetching(t) {
284
- return i(this, c).findAll({ ...t, fetchStatus: "fetching" }).length;
639
+ isFetching(e) {
640
+ return h(this, w).findAll({ ...e, fetchStatus: "fetching" }).length;
285
641
  }
286
- isMutating(t) {
287
- return i(this, w).findAll({ ...t, status: "pending" }).length;
642
+ isMutating(e) {
643
+ return h(this, U).findAll({ ...e, status: "pending" }).length;
288
644
  }
289
- getQueryData(t) {
290
- var s;
291
- const e = this.defaultQueryOptions({ queryKey: t });
292
- return (s = i(this, c).get(e.queryHash)) == null ? void 0 : s.state.data;
645
+ getQueryData(e) {
646
+ var n;
647
+ const t = this.defaultQueryOptions({ queryKey: e });
648
+ return (n = h(this, w).get(t.queryHash)) == null ? void 0 : n.state.data;
293
649
  }
294
- ensureQueryData(t) {
295
- const e = this.getQueryData(t.queryKey);
296
- if (e === void 0)
297
- return this.fetchQuery(t);
650
+ ensureQueryData(e) {
651
+ const t = this.getQueryData(e.queryKey);
652
+ if (t === void 0)
653
+ return this.fetchQuery(e);
298
654
  {
299
- const s = this.defaultQueryOptions(t), a = i(this, c).build(this, s);
300
- return t.revalidateIfStale && a.isStaleByTime(oe(s.staleTime, a)) && this.prefetchQuery(s), Promise.resolve(e);
655
+ const n = this.defaultQueryOptions(e), r = h(this, w).build(this, n);
656
+ return e.revalidateIfStale && r.isStaleByTime(vt(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
301
657
  }
302
658
  }
303
- getQueriesData(t) {
304
- return i(this, c).findAll(t).map(({ queryKey: e, state: s }) => {
305
- const a = s.data;
306
- return [e, a];
659
+ getQueriesData(e) {
660
+ return h(this, w).findAll(e).map(({ queryKey: t, state: n }) => {
661
+ const r = n.data;
662
+ return [t, r];
307
663
  });
308
664
  }
309
- setQueryData(t, e, s) {
310
- const a = this.defaultQueryOptions({ queryKey: t }), r = i(this, c).get(
311
- a.queryHash
312
- ), o = r == null ? void 0 : r.state.data, l = ze(e, o);
313
- if (l !== void 0)
314
- return i(this, c).build(this, a).setData(l, { ...s, manual: !0 });
315
- }
316
- setQueriesData(t, e, s) {
317
- return p.batch(
318
- () => i(this, c).findAll(t).map(({ queryKey: a }) => [
319
- a,
320
- this.setQueryData(a, e, s)
665
+ setQueryData(e, t, n) {
666
+ const r = this.defaultQueryOptions({ queryKey: e }), a = h(this, w).get(
667
+ r.queryHash
668
+ ), s = a == null ? void 0 : a.state.data, i = ro(t, s);
669
+ if (i !== void 0)
670
+ return h(this, w).build(this, r).setData(i, { ...n, manual: !0 });
671
+ }
672
+ setQueriesData(e, t, n) {
673
+ return E.batch(
674
+ () => h(this, w).findAll(e).map(({ queryKey: r }) => [
675
+ r,
676
+ this.setQueryData(r, t, n)
321
677
  ])
322
678
  );
323
679
  }
324
- getQueryState(t) {
325
- var s;
326
- const e = this.defaultQueryOptions({ queryKey: t });
327
- return (s = i(this, c).get(e.queryHash)) == null ? void 0 : s.state;
680
+ getQueryState(e) {
681
+ var n;
682
+ const t = this.defaultQueryOptions({ queryKey: e });
683
+ return (n = h(this, w).get(t.queryHash)) == null ? void 0 : n.state;
328
684
  }
329
- removeQueries(t) {
330
- const e = i(this, c);
331
- p.batch(() => {
332
- e.findAll(t).forEach((s) => {
333
- e.remove(s);
685
+ removeQueries(e) {
686
+ const t = h(this, w);
687
+ E.batch(() => {
688
+ t.findAll(e).forEach((n) => {
689
+ t.remove(n);
334
690
  });
335
691
  });
336
692
  }
337
- resetQueries(t, e) {
338
- const s = i(this, c), a = {
693
+ resetQueries(e, t) {
694
+ const n = h(this, w), r = {
339
695
  type: "active",
340
- ...t
696
+ ...e
341
697
  };
342
- return p.batch(() => (s.findAll(t).forEach((r) => {
343
- r.reset();
344
- }), this.refetchQueries(a, e)));
698
+ return E.batch(() => (n.findAll(e).forEach((a) => {
699
+ a.reset();
700
+ }), this.refetchQueries(r, t)));
345
701
  }
346
- cancelQueries(t = {}, e = {}) {
347
- const s = { revert: !0, ...e }, a = p.batch(
348
- () => i(this, c).findAll(t).map((r) => r.cancel(s))
702
+ cancelQueries(e = {}, t = {}) {
703
+ const n = { revert: !0, ...t }, r = E.batch(
704
+ () => h(this, w).findAll(e).map((a) => a.cancel(n))
349
705
  );
350
- return Promise.all(a).then(j).catch(j);
706
+ return Promise.all(r).then($).catch($);
351
707
  }
352
- invalidateQueries(t = {}, e = {}) {
353
- return p.batch(() => {
354
- if (i(this, c).findAll(t).forEach((a) => {
355
- a.invalidate();
356
- }), t.refetchType === "none")
708
+ invalidateQueries(e = {}, t = {}) {
709
+ return E.batch(() => {
710
+ if (h(this, w).findAll(e).forEach((r) => {
711
+ r.invalidate();
712
+ }), e.refetchType === "none")
357
713
  return Promise.resolve();
358
- const s = {
359
- ...t,
360
- type: t.refetchType ?? t.type ?? "active"
714
+ const n = {
715
+ ...e,
716
+ type: e.refetchType ?? e.type ?? "active"
361
717
  };
362
- return this.refetchQueries(s, e);
718
+ return this.refetchQueries(n, t);
363
719
  });
364
720
  }
365
- refetchQueries(t = {}, e) {
366
- const s = {
367
- ...e,
368
- cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
369
- }, a = p.batch(
370
- () => i(this, c).findAll(t).filter((r) => !r.isDisabled()).map((r) => {
371
- let o = r.fetch(void 0, s);
372
- return s.throwOnError || (o = o.catch(j)), r.state.fetchStatus === "paused" ? Promise.resolve() : o;
721
+ refetchQueries(e = {}, t) {
722
+ const n = {
723
+ ...t,
724
+ cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
725
+ }, r = E.batch(
726
+ () => h(this, w).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
727
+ let s = a.fetch(void 0, n);
728
+ return n.throwOnError || (s = s.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
373
729
  })
374
730
  );
375
- return Promise.all(a).then(j);
731
+ return Promise.all(r).then($);
376
732
  }
377
- fetchQuery(t) {
378
- const e = this.defaultQueryOptions(t);
379
- e.retry === void 0 && (e.retry = !1);
380
- const s = i(this, c).build(this, e);
381
- return s.isStaleByTime(
382
- oe(e.staleTime, s)
383
- ) ? s.fetch(e) : Promise.resolve(s.state.data);
733
+ fetchQuery(e) {
734
+ const t = this.defaultQueryOptions(e);
735
+ t.retry === void 0 && (t.retry = !1);
736
+ const n = h(this, w).build(this, t);
737
+ return n.isStaleByTime(
738
+ vt(t.staleTime, n)
739
+ ) ? n.fetch(t) : Promise.resolve(n.state.data);
384
740
  }
385
- prefetchQuery(t) {
386
- return this.fetchQuery(t).then(j).catch(j);
741
+ prefetchQuery(e) {
742
+ return this.fetchQuery(e).then($).catch($);
387
743
  }
388
- fetchInfiniteQuery(t) {
389
- return t.behavior = pt(t.pages), this.fetchQuery(t);
744
+ fetchInfiniteQuery(e) {
745
+ return e.behavior = Ko(e.pages), this.fetchQuery(e);
390
746
  }
391
- prefetchInfiniteQuery(t) {
392
- return this.fetchInfiniteQuery(t).then(j).catch(j);
747
+ prefetchInfiniteQuery(e) {
748
+ return this.fetchInfiniteQuery(e).then($).catch($);
393
749
  }
394
750
  resumePausedMutations() {
395
- return ie.isOnline() ? i(this, w).resumePausedMutations() : Promise.resolve();
751
+ return gt.isOnline() ? h(this, U).resumePausedMutations() : Promise.resolve();
396
752
  }
397
753
  getQueryCache() {
398
- return i(this, c);
754
+ return h(this, w);
399
755
  }
400
756
  getMutationCache() {
401
- return i(this, w);
757
+ return h(this, U);
402
758
  }
403
759
  getDefaultOptions() {
404
- return i(this, N);
760
+ return h(this, G);
405
761
  }
406
- setDefaultOptions(t) {
407
- u(this, N, t);
762
+ setDefaultOptions(e) {
763
+ S(this, G, e);
408
764
  }
409
- setQueryDefaults(t, e) {
410
- i(this, M).set(le(t), {
411
- queryKey: t,
412
- defaultOptions: e
765
+ setQueryDefaults(e, t) {
766
+ h(this, ne).set(xt(e), {
767
+ queryKey: e,
768
+ defaultOptions: t
413
769
  });
414
770
  }
415
- getQueryDefaults(t) {
416
- const e = [...i(this, M).values()];
417
- let s = {};
418
- return e.forEach((a) => {
419
- ce(t, a.queryKey) && (s = { ...s, ...a.defaultOptions });
420
- }), s;
421
- }
422
- setMutationDefaults(t, e) {
423
- i(this, A).set(le(t), {
424
- mutationKey: t,
425
- defaultOptions: e
771
+ getQueryDefaults(e) {
772
+ const t = [...h(this, ne).values()];
773
+ let n = {};
774
+ return t.forEach((r) => {
775
+ yt(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
776
+ }), n;
777
+ }
778
+ setMutationDefaults(e, t) {
779
+ h(this, re).set(xt(e), {
780
+ mutationKey: e,
781
+ defaultOptions: t
426
782
  });
427
783
  }
428
- getMutationDefaults(t) {
429
- const e = [...i(this, A).values()];
430
- let s = {};
431
- return e.forEach((a) => {
432
- ce(t, a.mutationKey) && (s = { ...s, ...a.defaultOptions });
433
- }), s;
434
- }
435
- defaultQueryOptions(t) {
436
- if (t._defaulted)
437
- return t;
438
- const e = {
439
- ...i(this, N).queries,
440
- ...this.getQueryDefaults(t.queryKey),
441
- ...t,
784
+ getMutationDefaults(e) {
785
+ const t = [...h(this, re).values()];
786
+ let n = {};
787
+ return t.forEach((r) => {
788
+ yt(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
789
+ }), n;
790
+ }
791
+ defaultQueryOptions(e) {
792
+ if (e._defaulted)
793
+ return e;
794
+ const t = {
795
+ ...h(this, G).queries,
796
+ ...this.getQueryDefaults(e.queryKey),
797
+ ...e,
442
798
  _defaulted: !0
443
799
  };
444
- return e.queryHash || (e.queryHash = ge(
445
- e.queryKey,
446
- e
447
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Ke && (e.enabled = !1), e;
800
+ return t.queryHash || (t.queryHash = Kt(
801
+ t.queryKey,
802
+ t
803
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === oo && (t.enabled = !1), t;
448
804
  }
449
- defaultMutationOptions(t) {
450
- return t != null && t._defaulted ? t : {
451
- ...i(this, N).mutations,
452
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
453
- ...t,
805
+ defaultMutationOptions(e) {
806
+ return e != null && e._defaulted ? e : {
807
+ ...h(this, G).mutations,
808
+ ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
809
+ ...e,
454
810
  _defaulted: !0
455
811
  };
456
812
  }
457
813
  clear() {
458
- i(this, c).clear(), i(this, w).clear();
459
- }
460
- }, c = new WeakMap(), w = new WeakMap(), N = new WeakMap(), M = new WeakMap(), A = new WeakMap(), k = new WeakMap(), Q = new WeakMap(), q = new WeakMap(), pe);
461
- const we = (t) => "getRoutes" in t && typeof t.getRoutes == "function", vt = (t) => "initialize" in t && typeof t.initialize == "function", yt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ne = new gt(), xt = ut(() => ({}));
462
- class bt {
463
- constructor(e) {
464
- y(this, "plugins", []);
465
- y(this, "navigationPlugins");
466
- y(this, "navigation");
467
- y(this, "meta");
468
- y(this, "authentication");
469
- y(this, "state");
470
- y(this, "initialize", async () => {
471
- await Promise.all([
472
- this.plugins.filter(vt).map((e) => e.initialize(this))
473
- ]);
814
+ h(this, w).clear(), h(this, U).clear();
815
+ }
816
+ }, w = new WeakMap(), U = new WeakMap(), G = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), H = new WeakMap(), oe = new WeakMap(), ae = new WeakMap(), St);
817
+ const Qo = At(null), Be = {
818
+ didCatch: !1,
819
+ error: null
820
+ };
821
+ class qo extends qr {
822
+ constructor(t) {
823
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Be;
824
+ }
825
+ static getDerivedStateFromError(t) {
826
+ return {
827
+ didCatch: !0,
828
+ error: t
829
+ };
830
+ }
831
+ resetErrorBoundary() {
832
+ const {
833
+ error: t
834
+ } = this.state;
835
+ if (t !== null) {
836
+ for (var n, r, a = arguments.length, s = new Array(a), i = 0; i < a; i++)
837
+ s[i] = arguments[i];
838
+ (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
839
+ args: s,
840
+ reason: "imperative-api"
841
+ }), this.setState(Be);
842
+ }
843
+ }
844
+ componentDidCatch(t, n) {
845
+ var r, a;
846
+ (r = (a = this.props).onError) === null || r === void 0 || r.call(a, t, n);
847
+ }
848
+ componentDidUpdate(t, n) {
849
+ const {
850
+ didCatch: r
851
+ } = this.state, {
852
+ resetKeys: a
853
+ } = this.props;
854
+ if (r && n.error !== null && Uo(t.resetKeys, a)) {
855
+ var s, i;
856
+ (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
857
+ next: a,
858
+ prev: t.resetKeys,
859
+ reason: "keys"
860
+ }), this.setState(Be);
861
+ }
862
+ }
863
+ render() {
864
+ const {
865
+ children: t,
866
+ fallbackRender: n,
867
+ FallbackComponent: r,
868
+ fallback: a
869
+ } = this.props, {
870
+ didCatch: s,
871
+ error: i
872
+ } = this.state;
873
+ let u = t;
874
+ if (s) {
875
+ const d = {
876
+ error: i,
877
+ resetErrorBoundary: this.resetErrorBoundary
878
+ };
879
+ if (typeof n == "function")
880
+ u = n(d);
881
+ else if (r)
882
+ u = ft(r, d);
883
+ else if (a === null || Ur(a))
884
+ u = a;
885
+ else
886
+ throw i;
887
+ }
888
+ return ft(Qo.Provider, {
889
+ value: {
890
+ didCatch: s,
891
+ error: i,
892
+ resetErrorBoundary: this.resetErrorBoundary
893
+ }
894
+ }, u);
895
+ }
896
+ }
897
+ function Uo() {
898
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
899
+ return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
900
+ }
901
+ const Go = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Ho = (e) => "getRoutes" in e && typeof e.getRoutes == "function", zo = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Vo = (e) => "initialize" in e && typeof e.initialize == "function", Yo = (e) => "getHead" in e && typeof e.getHead == "function", Xo = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Wo = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Ht = new Bo();
902
+ class Jo {
903
+ constructor(t) {
904
+ j(this, "plugins");
905
+ j(this, "sidebars");
906
+ j(this, "topNavigation");
907
+ j(this, "meta");
908
+ j(this, "page");
909
+ j(this, "authentication");
910
+ j(this, "navigationPlugins");
911
+ j(this, "initialize", async ({
912
+ navigate: t
913
+ }) => {
914
+ await Promise.all(
915
+ this.plugins.filter(Vo).map((n) => {
916
+ var r;
917
+ return (r = n.initialize) == null ? void 0 : r.call(n, this, { navigate: t });
918
+ })
919
+ );
474
920
  });
475
- y(this, "invalidateCache", async (e) => {
476
- await Ne.invalidateQueries({ queryKey: e });
921
+ j(this, "invalidateCache", async (t) => {
922
+ await Ht.invalidateQueries({ queryKey: t });
477
923
  });
478
- y(this, "getApiIdentities", async () => (await Promise.all(
479
- this.plugins.filter(yt).map((s) => s.getIdentities(this))
924
+ j(this, "getApiIdentities", async () => (await Promise.all(
925
+ this.plugins.filter(Wo).map((n) => n.getIdentities(this))
480
926
  )).flat());
481
- y(this, "getNavigation", async (e) => (await Promise.all(
927
+ j(this, "getPluginSidebar", async (t) => (await Promise.all(
482
928
  this.navigationPlugins.map(
483
- async (a) => {
484
- var r;
485
- return (r = a.getNavigation) == null ? void 0 : r.call(a, e);
929
+ (r) => {
930
+ var a;
931
+ return (a = r.getSidebar) == null ? void 0 : a.call(r, Xe(t));
486
932
  }
487
933
  )
488
- )).flatMap((a) => a ?? []));
489
- this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(we), this.authentication = e.authentication, this.meta = e.meta, this.state = xt;
934
+ )).flatMap((r) => r ?? []));
935
+ j(this, "signRequest", async (t) => {
936
+ if (!this.authentication)
937
+ throw new Error("No authentication provider configured");
938
+ const n = await this.authentication.getAccessToken();
939
+ return t.headers.set("Authorization", `Bearer ${n}`), t;
940
+ });
941
+ this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Ho), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
490
942
  }
491
- async signRequest(e) {
492
- if (!this.authentication)
493
- throw new Error("No authentication provider configured");
494
- const s = await this.authentication.getAccessToken();
495
- return e.headers.set("Authorization", `Bearer ${s}`), e;
943
+ }
944
+ function Zo({ error: e, resetErrorBoundary: t }) {
945
+ return /* @__PURE__ */ o.jsx(Rt, { error: e });
946
+ }
947
+ const Se = globalThis;
948
+ (!Se.requestIdleCallback || !Se.cancelIdleCallback) && (Se.requestIdleCallback = (e) => setTimeout(e, 1), Se.cancelIdleCallback = clearTimeout);
949
+ var Ue = ["Enter", " "], ea = ["ArrowDown", "PageUp", "Home"], zt = ["ArrowUp", "PageDown", "End"], ta = [...ea, ...zt], na = {
950
+ ltr: [...Ue, "ArrowRight"],
951
+ rtl: [...Ue, "ArrowLeft"]
952
+ }, ra = {
953
+ ltr: ["ArrowLeft"],
954
+ rtl: ["ArrowRight"]
955
+ }, ve = "Menu", [he, oa, aa] = wr(ve), [J, Vt] = Et(ve, [
956
+ aa,
957
+ _t,
958
+ Bt
959
+ ]), xe = _t(), Yt = Bt(), [Xt, z] = J(ve), [sa, ye] = J(ve), Wt = (e) => {
960
+ const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = e, u = xe(t), [d, g] = c.useState(null), p = c.useRef(!1), l = He(s), f = Dr(a);
961
+ return c.useEffect(() => {
962
+ const v = () => {
963
+ p.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
964
+ }, x = () => p.current = !1;
965
+ return document.addEventListener("keydown", v, { capture: !0 }), () => {
966
+ document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", x, { capture: !0 }), document.removeEventListener("pointermove", x, { capture: !0 });
967
+ };
968
+ }, []), /* @__PURE__ */ o.jsx(Dt, { ...u, children: /* @__PURE__ */ o.jsx(
969
+ Xt,
970
+ {
971
+ scope: t,
972
+ open: n,
973
+ onOpenChange: l,
974
+ content: d,
975
+ onContentChange: g,
976
+ children: /* @__PURE__ */ o.jsx(
977
+ sa,
978
+ {
979
+ scope: t,
980
+ onClose: c.useCallback(() => l(!1), [l]),
981
+ isUsingKeyboardRef: p,
982
+ dir: f,
983
+ modal: i,
984
+ children: r
985
+ }
986
+ )
987
+ }
988
+ ) });
989
+ };
990
+ Wt.displayName = ve;
991
+ var ia = "MenuAnchor", Je = c.forwardRef(
992
+ (e, t) => {
993
+ const { __scopeMenu: n, ...r } = e, a = xe(n);
994
+ return /* @__PURE__ */ o.jsx(br, { ...a, ...r, ref: t });
995
+ }
996
+ );
997
+ Je.displayName = ia;
998
+ var Ze = "MenuPortal", [ca, Jt] = J(Ze, {
999
+ forceMount: void 0
1000
+ }), Zt = (e) => {
1001
+ const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, s = z(Ze, t);
1002
+ return /* @__PURE__ */ o.jsx(ca, { scope: t, forceMount: n, children: /* @__PURE__ */ o.jsx(ke, { present: n || s.open, children: /* @__PURE__ */ o.jsx(Ir, { asChild: !0, container: a, children: r }) }) });
1003
+ };
1004
+ Zt.displayName = Ze;
1005
+ var D = "MenuContent", [ua, et] = J(D), en = c.forwardRef(
1006
+ (e, t) => {
1007
+ const n = Jt(D, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = z(D, e.__scopeMenu), i = ye(D, e.__scopeMenu);
1008
+ return /* @__PURE__ */ o.jsx(he.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(ke, { present: r || s.open, children: /* @__PURE__ */ o.jsx(he.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(la, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(da, { ...a, ref: t }) }) }) });
1009
+ }
1010
+ ), la = c.forwardRef(
1011
+ (e, t) => {
1012
+ const n = z(D, e.__scopeMenu), r = c.useRef(null), a = me(t, r);
1013
+ return c.useEffect(() => {
1014
+ const s = r.current;
1015
+ if (s) return Mr(s);
1016
+ }, []), /* @__PURE__ */ o.jsx(
1017
+ tt,
1018
+ {
1019
+ ...e,
1020
+ ref: a,
1021
+ trapFocus: n.open,
1022
+ disableOutsidePointerEvents: n.open,
1023
+ disableOutsideScroll: !0,
1024
+ onFocusOutside: y(
1025
+ e.onFocusOutside,
1026
+ (s) => s.preventDefault(),
1027
+ { checkForDefaultPrevented: !1 }
1028
+ ),
1029
+ onDismiss: () => n.onOpenChange(!1)
1030
+ }
1031
+ );
496
1032
  }
1033
+ ), da = c.forwardRef((e, t) => {
1034
+ const n = z(D, e.__scopeMenu);
1035
+ return /* @__PURE__ */ o.jsx(
1036
+ tt,
1037
+ {
1038
+ ...e,
1039
+ ref: t,
1040
+ trapFocus: !1,
1041
+ disableOutsidePointerEvents: !1,
1042
+ disableOutsideScroll: !1,
1043
+ onDismiss: () => n.onOpenChange(!1)
1044
+ }
1045
+ );
1046
+ }), tt = c.forwardRef(
1047
+ (e, t) => {
1048
+ const {
1049
+ __scopeMenu: n,
1050
+ loop: r = !1,
1051
+ trapFocus: a,
1052
+ onOpenAutoFocus: s,
1053
+ onCloseAutoFocus: i,
1054
+ disableOutsidePointerEvents: u,
1055
+ onEntryFocus: d,
1056
+ onEscapeKeyDown: g,
1057
+ onPointerDownOutside: p,
1058
+ onFocusOutside: l,
1059
+ onInteractOutside: f,
1060
+ onDismiss: v,
1061
+ disableOutsideScroll: x,
1062
+ ...b
1063
+ } = e, I = z(D, n), Q = ye(D, n), V = xe(n), C = Yt(n), k = oa(n), [L, Y] = c.useState(null), Z = c.useRef(null), we = me(t, Z, I.onContentChange), X = c.useRef(0), be = c.useRef(""), nr = c.useRef(0), Oe = c.useRef(null), it = c.useRef("right"), Te = c.useRef(0), rr = x ? Er : c.Fragment, or = x ? { as: _r, allowPinchZoom: !0 } : void 0, ar = (m) => {
1064
+ var te, ut;
1065
+ const _ = be.current + m, A = k().filter((K) => !K.disabled), q = document.activeElement, Fe = (te = A.find((K) => K.ref.current === q)) == null ? void 0 : te.textValue, Le = A.map((K) => K.textValue), ct = Ca(Le, _, Fe), ce = (ut = A.find((K) => K.textValue === ct)) == null ? void 0 : ut.ref.current;
1066
+ (function K(lt) {
1067
+ be.current = lt, window.clearTimeout(X.current), lt !== "" && (X.current = window.setTimeout(() => K(""), 1e3));
1068
+ })(_), ce && setTimeout(() => ce.focus());
1069
+ };
1070
+ c.useEffect(() => () => window.clearTimeout(X.current), []), Cr();
1071
+ const ee = c.useCallback((m) => {
1072
+ var A, q;
1073
+ return it.current === ((A = Oe.current) == null ? void 0 : A.side) && Pa(m, (q = Oe.current) == null ? void 0 : q.area);
1074
+ }, []);
1075
+ return /* @__PURE__ */ o.jsx(
1076
+ ua,
1077
+ {
1078
+ scope: n,
1079
+ searchRef: be,
1080
+ onItemEnter: c.useCallback(
1081
+ (m) => {
1082
+ ee(m) && m.preventDefault();
1083
+ },
1084
+ [ee]
1085
+ ),
1086
+ onItemLeave: c.useCallback(
1087
+ (m) => {
1088
+ var _;
1089
+ ee(m) || ((_ = Z.current) == null || _.focus(), Y(null));
1090
+ },
1091
+ [ee]
1092
+ ),
1093
+ onTriggerLeave: c.useCallback(
1094
+ (m) => {
1095
+ ee(m) && m.preventDefault();
1096
+ },
1097
+ [ee]
1098
+ ),
1099
+ pointerGraceTimerRef: nr,
1100
+ onPointerGraceIntentChange: c.useCallback((m) => {
1101
+ Oe.current = m;
1102
+ }, []),
1103
+ children: /* @__PURE__ */ o.jsx(rr, { ...or, children: /* @__PURE__ */ o.jsx(
1104
+ Sr,
1105
+ {
1106
+ asChild: !0,
1107
+ trapped: a,
1108
+ onMountAutoFocus: y(s, (m) => {
1109
+ var _;
1110
+ m.preventDefault(), (_ = Z.current) == null || _.focus({ preventScroll: !0 });
1111
+ }),
1112
+ onUnmountAutoFocus: i,
1113
+ children: /* @__PURE__ */ o.jsx(
1114
+ Pr,
1115
+ {
1116
+ asChild: !0,
1117
+ disableOutsidePointerEvents: u,
1118
+ onEscapeKeyDown: g,
1119
+ onPointerDownOutside: p,
1120
+ onFocusOutside: l,
1121
+ onInteractOutside: f,
1122
+ onDismiss: v,
1123
+ children: /* @__PURE__ */ o.jsx(
1124
+ uo,
1125
+ {
1126
+ asChild: !0,
1127
+ ...C,
1128
+ dir: Q.dir,
1129
+ orientation: "vertical",
1130
+ loop: r,
1131
+ currentTabStopId: L,
1132
+ onCurrentTabStopIdChange: Y,
1133
+ onEntryFocus: y(d, (m) => {
1134
+ Q.isUsingKeyboardRef.current || m.preventDefault();
1135
+ }),
1136
+ preventScrollOnEntryFocus: !0,
1137
+ children: /* @__PURE__ */ o.jsx(
1138
+ jr,
1139
+ {
1140
+ role: "menu",
1141
+ "aria-orientation": "vertical",
1142
+ "data-state": xn(I.open),
1143
+ "data-radix-menu-content": "",
1144
+ dir: Q.dir,
1145
+ ...V,
1146
+ ...b,
1147
+ ref: we,
1148
+ style: { outline: "none", ...b.style },
1149
+ onKeyDown: y(b.onKeyDown, (m) => {
1150
+ const A = m.target.closest("[data-radix-menu-content]") === m.currentTarget, q = m.ctrlKey || m.altKey || m.metaKey, Fe = m.key.length === 1;
1151
+ A && (m.key === "Tab" && m.preventDefault(), !q && Fe && ar(m.key));
1152
+ const Le = Z.current;
1153
+ if (m.target !== Le || !ta.includes(m.key)) return;
1154
+ m.preventDefault();
1155
+ const ce = k().filter((te) => !te.disabled).map((te) => te.ref.current);
1156
+ zt.includes(m.key) && ce.reverse(), ba(ce);
1157
+ }),
1158
+ onBlur: y(e.onBlur, (m) => {
1159
+ m.currentTarget.contains(m.target) || (window.clearTimeout(X.current), be.current = "");
1160
+ }),
1161
+ onPointerMove: y(
1162
+ e.onPointerMove,
1163
+ fe((m) => {
1164
+ const _ = m.target, A = Te.current !== m.clientX;
1165
+ if (m.currentTarget.contains(_) && A) {
1166
+ const q = m.clientX > Te.current ? "right" : "left";
1167
+ it.current = q, Te.current = m.clientX;
1168
+ }
1169
+ })
1170
+ )
1171
+ }
1172
+ )
1173
+ }
1174
+ )
1175
+ }
1176
+ )
1177
+ }
1178
+ ) })
1179
+ }
1180
+ );
1181
+ }
1182
+ );
1183
+ en.displayName = D;
1184
+ var ha = "MenuGroup", nt = c.forwardRef(
1185
+ (e, t) => {
1186
+ const { __scopeMenu: n, ...r } = e;
1187
+ return /* @__PURE__ */ o.jsx(se.div, { role: "group", ...r, ref: t });
1188
+ }
1189
+ );
1190
+ nt.displayName = ha;
1191
+ var fa = "MenuLabel", tn = c.forwardRef(
1192
+ (e, t) => {
1193
+ const { __scopeMenu: n, ...r } = e;
1194
+ return /* @__PURE__ */ o.jsx(se.div, { ...r, ref: t });
1195
+ }
1196
+ );
1197
+ tn.displayName = fa;
1198
+ var _e = "MenuItem", bt = "menu.itemSelect", Ae = c.forwardRef(
1199
+ (e, t) => {
1200
+ const { disabled: n = !1, onSelect: r, ...a } = e, s = c.useRef(null), i = ye(_e, e.__scopeMenu), u = et(_e, e.__scopeMenu), d = me(t, s), g = c.useRef(!1), p = () => {
1201
+ const l = s.current;
1202
+ if (!n && l) {
1203
+ const f = new CustomEvent(bt, { bubbles: !0, cancelable: !0 });
1204
+ l.addEventListener(bt, (v) => r == null ? void 0 : r(v), { once: !0 }), Nr(l, f), f.defaultPrevented ? g.current = !1 : i.onClose();
1205
+ }
1206
+ };
1207
+ return /* @__PURE__ */ o.jsx(
1208
+ nn,
1209
+ {
1210
+ ...a,
1211
+ ref: d,
1212
+ disabled: n,
1213
+ onClick: y(e.onClick, p),
1214
+ onPointerDown: (l) => {
1215
+ var f;
1216
+ (f = e.onPointerDown) == null || f.call(e, l), g.current = !0;
1217
+ },
1218
+ onPointerUp: y(e.onPointerUp, (l) => {
1219
+ var f;
1220
+ g.current || (f = l.currentTarget) == null || f.click();
1221
+ }),
1222
+ onKeyDown: y(e.onKeyDown, (l) => {
1223
+ const f = u.searchRef.current !== "";
1224
+ n || f && l.key === " " || Ue.includes(l.key) && (l.currentTarget.click(), l.preventDefault());
1225
+ })
1226
+ }
1227
+ );
1228
+ }
1229
+ );
1230
+ Ae.displayName = _e;
1231
+ var nn = c.forwardRef(
1232
+ (e, t) => {
1233
+ const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = et(_e, n), u = Yt(n), d = c.useRef(null), g = me(t, d), [p, l] = c.useState(!1), [f, v] = c.useState("");
1234
+ return c.useEffect(() => {
1235
+ const x = d.current;
1236
+ x && v((x.textContent ?? "").trim());
1237
+ }, [s.children]), /* @__PURE__ */ o.jsx(
1238
+ he.ItemSlot,
1239
+ {
1240
+ scope: n,
1241
+ disabled: r,
1242
+ textValue: a ?? f,
1243
+ children: /* @__PURE__ */ o.jsx(lo, { asChild: !0, ...u, focusable: !r, children: /* @__PURE__ */ o.jsx(
1244
+ se.div,
1245
+ {
1246
+ role: "menuitem",
1247
+ "data-highlighted": p ? "" : void 0,
1248
+ "aria-disabled": r || void 0,
1249
+ "data-disabled": r ? "" : void 0,
1250
+ ...s,
1251
+ ref: g,
1252
+ onPointerMove: y(
1253
+ e.onPointerMove,
1254
+ fe((x) => {
1255
+ r ? i.onItemLeave(x) : (i.onItemEnter(x), x.defaultPrevented || x.currentTarget.focus({ preventScroll: !0 }));
1256
+ })
1257
+ ),
1258
+ onPointerLeave: y(
1259
+ e.onPointerLeave,
1260
+ fe((x) => i.onItemLeave(x))
1261
+ ),
1262
+ onFocus: y(e.onFocus, () => l(!0)),
1263
+ onBlur: y(e.onBlur, () => l(!1))
1264
+ }
1265
+ ) })
1266
+ }
1267
+ );
1268
+ }
1269
+ ), pa = "MenuCheckboxItem", rn = c.forwardRef(
1270
+ (e, t) => {
1271
+ const { checked: n = !1, onCheckedChange: r, ...a } = e;
1272
+ return /* @__PURE__ */ o.jsx(un, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
1273
+ Ae,
1274
+ {
1275
+ role: "menuitemcheckbox",
1276
+ "aria-checked": Ne(n) ? "mixed" : n,
1277
+ ...a,
1278
+ ref: t,
1279
+ "data-state": at(n),
1280
+ onSelect: y(
1281
+ a.onSelect,
1282
+ () => r == null ? void 0 : r(Ne(n) ? !0 : !n),
1283
+ { checkForDefaultPrevented: !1 }
1284
+ )
1285
+ }
1286
+ ) });
1287
+ }
1288
+ );
1289
+ rn.displayName = pa;
1290
+ var on = "MenuRadioGroup", [ma, ga] = J(
1291
+ on,
1292
+ { value: void 0, onValueChange: () => {
1293
+ } }
1294
+ ), an = c.forwardRef(
1295
+ (e, t) => {
1296
+ const { value: n, onValueChange: r, ...a } = e, s = He(r);
1297
+ return /* @__PURE__ */ o.jsx(ma, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(nt, { ...a, ref: t }) });
1298
+ }
1299
+ );
1300
+ an.displayName = on;
1301
+ var sn = "MenuRadioItem", cn = c.forwardRef(
1302
+ (e, t) => {
1303
+ const { value: n, ...r } = e, a = ga(sn, e.__scopeMenu), s = n === a.value;
1304
+ return /* @__PURE__ */ o.jsx(un, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
1305
+ Ae,
1306
+ {
1307
+ role: "menuitemradio",
1308
+ "aria-checked": s,
1309
+ ...r,
1310
+ ref: t,
1311
+ "data-state": at(s),
1312
+ onSelect: y(
1313
+ r.onSelect,
1314
+ () => {
1315
+ var i;
1316
+ return (i = a.onValueChange) == null ? void 0 : i.call(a, n);
1317
+ },
1318
+ { checkForDefaultPrevented: !1 }
1319
+ )
1320
+ }
1321
+ ) });
1322
+ }
1323
+ );
1324
+ cn.displayName = sn;
1325
+ var rt = "MenuItemIndicator", [un, va] = J(
1326
+ rt,
1327
+ { checked: !1 }
1328
+ ), ln = c.forwardRef(
1329
+ (e, t) => {
1330
+ const { __scopeMenu: n, forceMount: r, ...a } = e, s = va(rt, n);
1331
+ return /* @__PURE__ */ o.jsx(
1332
+ ke,
1333
+ {
1334
+ present: r || Ne(s.checked) || s.checked === !0,
1335
+ children: /* @__PURE__ */ o.jsx(
1336
+ se.span,
1337
+ {
1338
+ ...a,
1339
+ ref: t,
1340
+ "data-state": at(s.checked)
1341
+ }
1342
+ )
1343
+ }
1344
+ );
1345
+ }
1346
+ );
1347
+ ln.displayName = rt;
1348
+ var xa = "MenuSeparator", dn = c.forwardRef(
1349
+ (e, t) => {
1350
+ const { __scopeMenu: n, ...r } = e;
1351
+ return /* @__PURE__ */ o.jsx(
1352
+ se.div,
1353
+ {
1354
+ role: "separator",
1355
+ "aria-orientation": "horizontal",
1356
+ ...r,
1357
+ ref: t
1358
+ }
1359
+ );
1360
+ }
1361
+ );
1362
+ dn.displayName = xa;
1363
+ var ya = "MenuArrow", hn = c.forwardRef(
1364
+ (e, t) => {
1365
+ const { __scopeMenu: n, ...r } = e, a = xe(n);
1366
+ return /* @__PURE__ */ o.jsx(Rr, { ...a, ...r, ref: t });
1367
+ }
1368
+ );
1369
+ hn.displayName = ya;
1370
+ var ot = "MenuSub", [wa, fn] = J(ot), pn = (e) => {
1371
+ const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e, s = z(ot, t), i = xe(t), [u, d] = c.useState(null), [g, p] = c.useState(null), l = He(a);
1372
+ return c.useEffect(() => (s.open === !1 && l(!1), () => l(!1)), [s.open, l]), /* @__PURE__ */ o.jsx(Dt, { ...i, children: /* @__PURE__ */ o.jsx(
1373
+ Xt,
1374
+ {
1375
+ scope: t,
1376
+ open: r,
1377
+ onOpenChange: l,
1378
+ content: g,
1379
+ onContentChange: p,
1380
+ children: /* @__PURE__ */ o.jsx(
1381
+ wa,
1382
+ {
1383
+ scope: t,
1384
+ contentId: Ee(),
1385
+ triggerId: Ee(),
1386
+ trigger: u,
1387
+ onTriggerChange: d,
1388
+ children: n
1389
+ }
1390
+ )
1391
+ }
1392
+ ) });
1393
+ };
1394
+ pn.displayName = ot;
1395
+ var ue = "MenuSubTrigger", mn = c.forwardRef(
1396
+ (e, t) => {
1397
+ const n = z(ue, e.__scopeMenu), r = ye(ue, e.__scopeMenu), a = fn(ue, e.__scopeMenu), s = et(ue, e.__scopeMenu), i = c.useRef(null), { pointerGraceTimerRef: u, onPointerGraceIntentChange: d } = s, g = { __scopeMenu: e.__scopeMenu }, p = c.useCallback(() => {
1398
+ i.current && window.clearTimeout(i.current), i.current = null;
1399
+ }, []);
1400
+ return c.useEffect(() => p, [p]), c.useEffect(() => {
1401
+ const l = u.current;
1402
+ return () => {
1403
+ window.clearTimeout(l), d(null);
1404
+ };
1405
+ }, [u, d]), /* @__PURE__ */ o.jsx(Je, { asChild: !0, ...g, children: /* @__PURE__ */ o.jsx(
1406
+ nn,
1407
+ {
1408
+ id: a.triggerId,
1409
+ "aria-haspopup": "menu",
1410
+ "aria-expanded": n.open,
1411
+ "aria-controls": a.contentId,
1412
+ "data-state": xn(n.open),
1413
+ ...e,
1414
+ ref: Nt(t, a.onTriggerChange),
1415
+ onClick: (l) => {
1416
+ var f;
1417
+ (f = e.onClick) == null || f.call(e, l), !(e.disabled || l.defaultPrevented) && (l.currentTarget.focus(), n.open || n.onOpenChange(!0));
1418
+ },
1419
+ onPointerMove: y(
1420
+ e.onPointerMove,
1421
+ fe((l) => {
1422
+ s.onItemEnter(l), !l.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
1423
+ n.onOpenChange(!0), p();
1424
+ }, 100));
1425
+ })
1426
+ ),
1427
+ onPointerLeave: y(
1428
+ e.onPointerLeave,
1429
+ fe((l) => {
1430
+ var v, x;
1431
+ p();
1432
+ const f = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
1433
+ if (f) {
1434
+ const b = (x = n.content) == null ? void 0 : x.dataset.side, I = b === "right", Q = I ? -5 : 5, V = f[I ? "left" : "right"], C = f[I ? "right" : "left"];
1435
+ s.onPointerGraceIntentChange({
1436
+ area: [
1437
+ // Apply a bleed on clientX to ensure that our exit point is
1438
+ // consistently within polygon bounds
1439
+ { x: l.clientX + Q, y: l.clientY },
1440
+ { x: V, y: f.top },
1441
+ { x: C, y: f.top },
1442
+ { x: C, y: f.bottom },
1443
+ { x: V, y: f.bottom }
1444
+ ],
1445
+ side: b
1446
+ }), window.clearTimeout(u.current), u.current = window.setTimeout(
1447
+ () => s.onPointerGraceIntentChange(null),
1448
+ 300
1449
+ );
1450
+ } else {
1451
+ if (s.onTriggerLeave(l), l.defaultPrevented) return;
1452
+ s.onPointerGraceIntentChange(null);
1453
+ }
1454
+ })
1455
+ ),
1456
+ onKeyDown: y(e.onKeyDown, (l) => {
1457
+ var v;
1458
+ const f = s.searchRef.current !== "";
1459
+ e.disabled || f && l.key === " " || na[r.dir].includes(l.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), l.preventDefault());
1460
+ })
1461
+ }
1462
+ ) });
1463
+ }
1464
+ );
1465
+ mn.displayName = ue;
1466
+ var gn = "MenuSubContent", vn = c.forwardRef(
1467
+ (e, t) => {
1468
+ const n = Jt(D, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = z(D, e.__scopeMenu), i = ye(D, e.__scopeMenu), u = fn(gn, e.__scopeMenu), d = c.useRef(null), g = me(t, d);
1469
+ return /* @__PURE__ */ o.jsx(he.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(ke, { present: r || s.open, children: /* @__PURE__ */ o.jsx(he.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(
1470
+ tt,
1471
+ {
1472
+ id: u.contentId,
1473
+ "aria-labelledby": u.triggerId,
1474
+ ...a,
1475
+ ref: g,
1476
+ align: "start",
1477
+ side: i.dir === "rtl" ? "left" : "right",
1478
+ disableOutsidePointerEvents: !1,
1479
+ disableOutsideScroll: !1,
1480
+ trapFocus: !1,
1481
+ onOpenAutoFocus: (p) => {
1482
+ var l;
1483
+ i.isUsingKeyboardRef.current && ((l = d.current) == null || l.focus()), p.preventDefault();
1484
+ },
1485
+ onCloseAutoFocus: (p) => p.preventDefault(),
1486
+ onFocusOutside: y(e.onFocusOutside, (p) => {
1487
+ p.target !== u.trigger && s.onOpenChange(!1);
1488
+ }),
1489
+ onEscapeKeyDown: y(e.onEscapeKeyDown, (p) => {
1490
+ i.onClose(), p.preventDefault();
1491
+ }),
1492
+ onKeyDown: y(e.onKeyDown, (p) => {
1493
+ var v;
1494
+ const l = p.currentTarget.contains(p.target), f = ra[i.dir].includes(p.key);
1495
+ l && f && (s.onOpenChange(!1), (v = u.trigger) == null || v.focus(), p.preventDefault());
1496
+ })
1497
+ }
1498
+ ) }) }) });
1499
+ }
1500
+ );
1501
+ vn.displayName = gn;
1502
+ function xn(e) {
1503
+ return e ? "open" : "closed";
497
1504
  }
498
- /**
499
- * @license lucide-react v0.378.0 - ISC
500
- *
501
- * This source code is licensed under the ISC license.
502
- * See the LICENSE file in the root directory of this source tree.
503
- */
504
- const ke = z("ChevronRight", [
505
- ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
506
- ]);
507
- /**
508
- * @license lucide-react v0.378.0 - ISC
509
- *
510
- * This source code is licensed under the ISC license.
511
- * See the LICENSE file in the root directory of this source tree.
512
- */
513
- const jt = z("ExternalLink", [
514
- ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
515
- ["path", { d: "M10 14 21 3", key: "gplh6r" }],
516
- ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
517
- ]);
518
- /**
519
- * @license lucide-react v0.378.0 - ISC
520
- *
521
- * This source code is licensed under the ISC license.
522
- * See the LICENSE file in the root directory of this source tree.
523
- */
524
- const Pt = z("MoonStar", [
525
- ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
526
- ["path", { d: "M20 3v4", key: "1olli1" }],
527
- ["path", { d: "M22 5h-4", key: "1gvqau" }]
528
- ]);
529
- /**
530
- * @license lucide-react v0.378.0 - ISC
531
- *
532
- * This source code is licensed under the ISC license.
533
- * See the LICENSE file in the root directory of this source tree.
534
- */
535
- const wt = z("Sun", [
536
- ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
537
- ["path", { d: "M12 2v2", key: "tus03m" }],
538
- ["path", { d: "M12 20v2", key: "1lh1kg" }],
539
- ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
540
- ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
541
- ["path", { d: "M2 12h2", key: "1t8f8n" }],
542
- ["path", { d: "M20 12h2", key: "1q8mjw" }],
543
- ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
544
- ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
545
- ]), Nt = () => {
546
- const { navigation: t } = U();
547
- return /* @__PURE__ */ n.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(
548
- B,
1505
+ function Ne(e) {
1506
+ return e === "indeterminate";
1507
+ }
1508
+ function at(e) {
1509
+ return Ne(e) ? "indeterminate" : e ? "checked" : "unchecked";
1510
+ }
1511
+ function ba(e) {
1512
+ const t = document.activeElement;
1513
+ for (const n of e)
1514
+ if (n === t || (n.focus(), document.activeElement !== t)) return;
1515
+ }
1516
+ function Ma(e, t) {
1517
+ return e.map((n, r) => e[(t + r) % e.length]);
1518
+ }
1519
+ function Ca(e, t, n) {
1520
+ const a = t.length > 1 && Array.from(t).every((g) => g === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1521
+ let i = Ma(e, Math.max(s, 0));
1522
+ a.length === 1 && (i = i.filter((g) => g !== n));
1523
+ const d = i.find(
1524
+ (g) => g.toLowerCase().startsWith(a.toLowerCase())
1525
+ );
1526
+ return d !== n ? d : void 0;
1527
+ }
1528
+ function Sa(e, t) {
1529
+ const { x: n, y: r } = e;
1530
+ let a = !1;
1531
+ for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
1532
+ const u = t[s].x, d = t[s].y, g = t[i].x, p = t[i].y;
1533
+ d > r != p > r && n < (g - u) * (r - d) / (p - d) + u && (a = !a);
1534
+ }
1535
+ return a;
1536
+ }
1537
+ function Pa(e, t) {
1538
+ if (!t) return !1;
1539
+ const n = { x: e.clientX, y: e.clientY };
1540
+ return Sa(n, t);
1541
+ }
1542
+ function fe(e) {
1543
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1544
+ }
1545
+ var ja = Wt, Ra = Je, Ea = Zt, _a = en, Na = nt, Da = tn, Ia = Ae, ka = rn, Aa = an, Oa = cn, Ta = ln, Fa = dn, La = hn, Ka = pn, $a = mn, Ba = vn, st = "DropdownMenu", [Qa, Us] = Et(
1546
+ st,
1547
+ [Vt]
1548
+ ), P = Vt(), [qa, yn] = Qa(st), wn = (e) => {
1549
+ const {
1550
+ __scopeDropdownMenu: t,
1551
+ children: n,
1552
+ dir: r,
1553
+ open: a,
1554
+ defaultOpen: s,
1555
+ onOpenChange: i,
1556
+ modal: u = !0
1557
+ } = e, d = P(t), g = c.useRef(null), [p = !1, l] = It({
1558
+ prop: a,
1559
+ defaultProp: s,
1560
+ onChange: i
1561
+ });
1562
+ return /* @__PURE__ */ o.jsx(
1563
+ qa,
1564
+ {
1565
+ scope: t,
1566
+ triggerId: Ee(),
1567
+ triggerRef: g,
1568
+ contentId: Ee(),
1569
+ open: p,
1570
+ onOpenChange: l,
1571
+ onOpenToggle: c.useCallback(() => l((f) => !f), [l]),
1572
+ modal: u,
1573
+ children: /* @__PURE__ */ o.jsx(ja, { ...d, open: p, onOpenChange: l, dir: r, modal: u, children: n })
1574
+ }
1575
+ );
1576
+ };
1577
+ wn.displayName = st;
1578
+ var bn = "DropdownMenuTrigger", Mn = c.forwardRef(
1579
+ (e, t) => {
1580
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, s = yn(bn, n), i = P(n);
1581
+ return /* @__PURE__ */ o.jsx(Ra, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
1582
+ se.button,
1583
+ {
1584
+ type: "button",
1585
+ id: s.triggerId,
1586
+ "aria-haspopup": "menu",
1587
+ "aria-expanded": s.open,
1588
+ "aria-controls": s.open ? s.contentId : void 0,
1589
+ "data-state": s.open ? "open" : "closed",
1590
+ "data-disabled": r ? "" : void 0,
1591
+ disabled: r,
1592
+ ...a,
1593
+ ref: Nt(t, s.triggerRef),
1594
+ onPointerDown: y(e.onPointerDown, (u) => {
1595
+ !r && u.button === 0 && u.ctrlKey === !1 && (s.onOpenToggle(), s.open || u.preventDefault());
1596
+ }),
1597
+ onKeyDown: y(e.onKeyDown, (u) => {
1598
+ r || (["Enter", " "].includes(u.key) && s.onOpenToggle(), u.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(u.key) && u.preventDefault());
1599
+ })
1600
+ }
1601
+ ) });
1602
+ }
1603
+ );
1604
+ Mn.displayName = bn;
1605
+ var Ua = "DropdownMenuPortal", Cn = (e) => {
1606
+ const { __scopeDropdownMenu: t, ...n } = e, r = P(t);
1607
+ return /* @__PURE__ */ o.jsx(Ea, { ...r, ...n });
1608
+ };
1609
+ Cn.displayName = Ua;
1610
+ var Sn = "DropdownMenuContent", Pn = c.forwardRef(
1611
+ (e, t) => {
1612
+ const { __scopeDropdownMenu: n, ...r } = e, a = yn(Sn, n), s = P(n), i = c.useRef(!1);
1613
+ return /* @__PURE__ */ o.jsx(
1614
+ _a,
1615
+ {
1616
+ id: a.contentId,
1617
+ "aria-labelledby": a.triggerId,
1618
+ ...s,
1619
+ ...r,
1620
+ ref: t,
1621
+ onCloseAutoFocus: y(e.onCloseAutoFocus, (u) => {
1622
+ var d;
1623
+ i.current || (d = a.triggerRef.current) == null || d.focus(), i.current = !1, u.preventDefault();
1624
+ }),
1625
+ onInteractOutside: y(e.onInteractOutside, (u) => {
1626
+ const d = u.detail.originalEvent, g = d.button === 0 && d.ctrlKey === !0, p = d.button === 2 || g;
1627
+ (!a.modal || p) && (i.current = !0);
1628
+ }),
1629
+ style: {
1630
+ ...e.style,
1631
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1632
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1633
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1634
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1635
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1636
+ }
1637
+ }
1638
+ );
1639
+ }
1640
+ );
1641
+ Pn.displayName = Sn;
1642
+ var Ga = "DropdownMenuGroup", Ha = c.forwardRef(
1643
+ (e, t) => {
1644
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1645
+ return /* @__PURE__ */ o.jsx(Na, { ...a, ...r, ref: t });
1646
+ }
1647
+ );
1648
+ Ha.displayName = Ga;
1649
+ var za = "DropdownMenuLabel", jn = c.forwardRef(
1650
+ (e, t) => {
1651
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1652
+ return /* @__PURE__ */ o.jsx(Da, { ...a, ...r, ref: t });
1653
+ }
1654
+ );
1655
+ jn.displayName = za;
1656
+ var Va = "DropdownMenuItem", Rn = c.forwardRef(
1657
+ (e, t) => {
1658
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1659
+ return /* @__PURE__ */ o.jsx(Ia, { ...a, ...r, ref: t });
1660
+ }
1661
+ );
1662
+ Rn.displayName = Va;
1663
+ var Ya = "DropdownMenuCheckboxItem", En = c.forwardRef((e, t) => {
1664
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1665
+ return /* @__PURE__ */ o.jsx(ka, { ...a, ...r, ref: t });
1666
+ });
1667
+ En.displayName = Ya;
1668
+ var Xa = "DropdownMenuRadioGroup", Wa = c.forwardRef((e, t) => {
1669
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1670
+ return /* @__PURE__ */ o.jsx(Aa, { ...a, ...r, ref: t });
1671
+ });
1672
+ Wa.displayName = Xa;
1673
+ var Ja = "DropdownMenuRadioItem", _n = c.forwardRef((e, t) => {
1674
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1675
+ return /* @__PURE__ */ o.jsx(Oa, { ...a, ...r, ref: t });
1676
+ });
1677
+ _n.displayName = Ja;
1678
+ var Za = "DropdownMenuItemIndicator", Nn = c.forwardRef((e, t) => {
1679
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1680
+ return /* @__PURE__ */ o.jsx(Ta, { ...a, ...r, ref: t });
1681
+ });
1682
+ Nn.displayName = Za;
1683
+ var es = "DropdownMenuSeparator", Dn = c.forwardRef((e, t) => {
1684
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1685
+ return /* @__PURE__ */ o.jsx(Fa, { ...a, ...r, ref: t });
1686
+ });
1687
+ Dn.displayName = es;
1688
+ var ts = "DropdownMenuArrow", ns = c.forwardRef(
1689
+ (e, t) => {
1690
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1691
+ return /* @__PURE__ */ o.jsx(La, { ...a, ...r, ref: t });
1692
+ }
1693
+ );
1694
+ ns.displayName = ts;
1695
+ var rs = (e) => {
1696
+ const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: s } = e, i = P(t), [u = !1, d] = It({
1697
+ prop: r,
1698
+ defaultProp: s,
1699
+ onChange: a
1700
+ });
1701
+ return /* @__PURE__ */ o.jsx(Ka, { ...i, open: u, onOpenChange: d, children: n });
1702
+ }, os = "DropdownMenuSubTrigger", In = c.forwardRef((e, t) => {
1703
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1704
+ return /* @__PURE__ */ o.jsx($a, { ...a, ...r, ref: t });
1705
+ });
1706
+ In.displayName = os;
1707
+ var as = "DropdownMenuSubContent", kn = c.forwardRef((e, t) => {
1708
+ const { __scopeDropdownMenu: n, ...r } = e, a = P(n);
1709
+ return /* @__PURE__ */ o.jsx(
1710
+ Ba,
1711
+ {
1712
+ ...a,
1713
+ ...r,
1714
+ ref: t,
1715
+ style: {
1716
+ ...e.style,
1717
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1718
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1719
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1720
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1721
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1722
+ }
1723
+ }
1724
+ );
1725
+ });
1726
+ kn.displayName = as;
1727
+ var ss = wn, is = Mn, An = Cn, On = Pn, Tn = jn, Fn = Rn, Ln = En, Kn = _n, $n = Nn, Bn = Dn, cs = rs, Qn = In, qn = kn;
1728
+ const us = ss, ls = is, ds = An, hs = cs, Un = c.forwardRef(({ className: e, inset: t, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
1729
+ Qn,
1730
+ {
1731
+ ref: a,
1732
+ className: M(
1733
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1734
+ t && "pl-8",
1735
+ e
1736
+ ),
1737
+ ...r,
1738
+ children: [
1739
+ n,
1740
+ /* @__PURE__ */ o.jsx(Qt, { className: "ml-auto h-4 w-4" })
1741
+ ]
1742
+ }
1743
+ ));
1744
+ Un.displayName = Qn.displayName;
1745
+ const Gn = c.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
1746
+ qn,
1747
+ {
1748
+ ref: n,
1749
+ className: M(
1750
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1751
+ e
1752
+ ),
1753
+ ...t
1754
+ }
1755
+ ));
1756
+ Gn.displayName = qn.displayName;
1757
+ const Hn = c.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(
1758
+ On,
1759
+ {
1760
+ ref: r,
1761
+ sideOffset: t,
1762
+ className: M(
1763
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1764
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1765
+ e
1766
+ ),
1767
+ ...n
1768
+ }
1769
+ ) }));
1770
+ Hn.displayName = On.displayName;
1771
+ const zn = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
1772
+ Fn,
1773
+ {
1774
+ ref: r,
1775
+ className: M(
1776
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1777
+ t && "pl-8",
1778
+ e
1779
+ ),
1780
+ ...n
1781
+ }
1782
+ ));
1783
+ zn.displayName = Fn.displayName;
1784
+ const fs = c.forwardRef(({ className: e, children: t, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
1785
+ Ln,
1786
+ {
1787
+ ref: a,
1788
+ className: M(
1789
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1790
+ e
1791
+ ),
1792
+ checked: n,
1793
+ ...r,
1794
+ children: [
1795
+ /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Ar, { className: "h-4 w-4" }) }) }),
1796
+ t
1797
+ ]
1798
+ }
1799
+ ));
1800
+ fs.displayName = Ln.displayName;
1801
+ const ps = c.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ o.jsxs(
1802
+ Kn,
1803
+ {
1804
+ ref: r,
1805
+ className: M(
1806
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1807
+ e
1808
+ ),
1809
+ ...n,
1810
+ children: [
1811
+ /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(fo, { className: "h-4 w-4 fill-current" }) }) }),
1812
+ t
1813
+ ]
1814
+ }
1815
+ ));
1816
+ ps.displayName = Kn.displayName;
1817
+ const Vn = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
1818
+ Tn,
1819
+ {
1820
+ ref: r,
1821
+ className: M(
1822
+ "px-2 py-1.5 text-sm font-semibold",
1823
+ t && "pl-8",
1824
+ e
1825
+ ),
1826
+ ...n
1827
+ }
1828
+ ));
1829
+ Vn.displayName = Tn.displayName;
1830
+ const Yn = c.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
1831
+ Bn,
1832
+ {
1833
+ ref: n,
1834
+ className: M("-mx-1 my-1 h-px bg-muted", e),
1835
+ ...t
1836
+ }
1837
+ ));
1838
+ Yn.displayName = Bn.displayName;
1839
+ const ms = () => {
1840
+ const e = Ie(), [t, n] = de(!1), r = Ot(() => n(!1), []);
1841
+ W(() => {
1842
+ if (t)
1843
+ return;
1844
+ function s(i) {
1845
+ i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
1846
+ }
1847
+ return window.addEventListener("keydown", s), () => {
1848
+ window.removeEventListener("keydown", s);
1849
+ };
1850
+ }, [t, n]);
1851
+ const a = e.plugins.find(zo);
1852
+ return a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1853
+ /* @__PURE__ */ o.jsxs(
1854
+ "button",
1855
+ {
1856
+ type: "button",
1857
+ onClick: () => n(!0),
1858
+ className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72",
1859
+ children: [
1860
+ /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
1861
+ /* @__PURE__ */ o.jsx(go, { size: 14 }),
1862
+ "Search"
1863
+ ] }),
1864
+ /* @__PURE__ */ o.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
1865
+ ]
1866
+ }
1867
+ ),
1868
+ /* @__PURE__ */ o.jsx(Tt, { fallback: null, children: a.renderSearch({
1869
+ isOpen: t,
1870
+ onClose: r
1871
+ }) })
1872
+ ] }) : null;
1873
+ }, gs = () => {
1874
+ const { topNavigation: e } = Ie();
1875
+ return e.length <= 1 ? null : /* @__PURE__ */ o.jsx("nav", { className: "border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
1876
+ Pe,
549
1877
  {
550
- className: ({ isActive: s }) => _e(
1878
+ className: ({ isActive: n }) => Or(
551
1879
  "block py-3.5 font-medium -mb-px border-b-2",
552
- s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1880
+ n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
553
1881
  ),
554
- to: e.path,
555
- children: e.label
1882
+ to: t.id,
1883
+ children: t.label
556
1884
  }
557
- ) }, e.label)) }) });
558
- }, Oe = je(function() {
559
- const [e, s] = Be(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = Ve(), { meta: g } = U(), b = e ? Pt : wt;
560
- return /* @__PURE__ */ n.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
561
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
562
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
563
- (g == null ? void 0 : g.logo) && /* @__PURE__ */ n.jsx("img", { src: g.logo, alt: "My Dev Portal", className: "h-10" }),
564
- /* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: g == null ? void 0 : g.headerTitle })
565
- ] }),
566
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
567
- /* @__PURE__ */ n.jsx("div", { className: "w-full max-w-prose" }),
568
- /* @__PURE__ */ n.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex", children: [
569
- o && /* @__PURE__ */ n.jsx(n.Fragment, { children: a ? /* @__PURE__ */ n.jsxs(
570
- "button",
1885
+ ) }, t.label)) }) });
1886
+ }, Xn = ({ item: e }) => e.children ? /* @__PURE__ */ o.jsxs(hs, { children: [
1887
+ /* @__PURE__ */ o.jsx(Un, { children: e.label }),
1888
+ /* @__PURE__ */ o.jsx(ds, { children: /* @__PURE__ */ o.jsx(Gn, { children: e.children.map((t, n) => (
1889
+ // eslint-disable-next-line react/no-array-index-key
1890
+ /* @__PURE__ */ o.jsx(Xn, { item: t }, n)
1891
+ )) }) })
1892
+ ] }, e.label) : /* @__PURE__ */ o.jsx(je, { to: e.path ?? "", children: /* @__PURE__ */ o.jsx(zn, { children: e.label }, e.label) }), Wn = Ft(function() {
1893
+ const [t, n] = Tr(), { isAuthenticated: r, profile: a, isAuthEnabled: s } = kr(), { pathname: i } = De(), u = Ie(), { page: d, plugins: g } = u, p = g.filter((f) => Go(f)).flatMap((f) => f.getProfileMenuItems(u)).map((f) => /* @__PURE__ */ o.jsx(Xn, { item: f }, f.label)), l = t ? mo : vo;
1894
+ return /* @__PURE__ */ o.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1895
+ /* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]", children: [
1896
+ /* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(je, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
1897
+ (d == null ? void 0 : d.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1898
+ /* @__PURE__ */ o.jsx(
1899
+ "img",
571
1900
  {
572
- className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap",
573
- onClick: h,
574
- children: [
575
- "Logout ",
576
- r != null && r.email ? `(${r.email})` : null
577
- ]
1901
+ src: d.logo.src.light,
1902
+ alt: d.logo.alt ?? d.pageTitle,
1903
+ style: { width: d.logo.width },
1904
+ className: M("h-10", t && "hidden"),
1905
+ loading: "lazy"
578
1906
  }
579
- ) : /* @__PURE__ */ n.jsx(
580
- "button",
1907
+ ),
1908
+ /* @__PURE__ */ o.jsx(
1909
+ "img",
581
1910
  {
582
- className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded",
583
- onClick: l,
1911
+ src: d.logo.src.dark,
1912
+ alt: d.logo.alt ?? d.pageTitle,
1913
+ style: { width: d.logo.width },
1914
+ className: M("h-10", !t && "hidden"),
1915
+ loading: "lazy"
1916
+ }
1917
+ )
1918
+ ] }),
1919
+ /* @__PURE__ */ o.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: d == null ? void 0 : d.pageTitle })
1920
+ ] }) }) }),
1921
+ /* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1922
+ /* @__PURE__ */ o.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ o.jsx(ms, {}) }),
1923
+ /* @__PURE__ */ o.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex gap-2", children: [
1924
+ s && !r ? /* @__PURE__ */ o.jsx(Qe, { variant: "ghost", asChild: !0, children: /* @__PURE__ */ o.jsx(
1925
+ je,
1926
+ {
1927
+ to: {
1928
+ pathname: "/signin",
1929
+ search: `?redirect=${encodeURIComponent(i)}`
1930
+ },
584
1931
  children: "Login"
585
1932
  }
586
- ) }),
587
- /* @__PURE__ */ n.jsx(
1933
+ ) }) : p.length > 0 && /* @__PURE__ */ o.jsxs(us, { children: [
1934
+ /* @__PURE__ */ o.jsx(ls, { asChild: !0, children: /* @__PURE__ */ o.jsx(Qe, { variant: "ghost", children: a != null && a.email ? `${a.email}` : "My Account" }) }),
1935
+ /* @__PURE__ */ o.jsxs(Hn, { className: "w-56", children: [
1936
+ /* @__PURE__ */ o.jsx(Vn, { children: "My Account" }),
1937
+ /* @__PURE__ */ o.jsx(Yn, {}),
1938
+ p
1939
+ ] })
1940
+ ] }),
1941
+ /* @__PURE__ */ o.jsx(
588
1942
  "button",
589
1943
  {
1944
+ type: "button",
1945
+ "aria-label": t ? "Switch to light mode" : "Switch to dark mode",
590
1946
  className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
591
- onClick: s,
592
- children: /* @__PURE__ */ n.jsx(b, { size: 18 })
1947
+ onClick: n,
1948
+ children: /* @__PURE__ */ o.jsx(l, { size: 18 })
593
1949
  }
594
1950
  )
595
1951
  ] })
596
1952
  ] })
597
1953
  ] }),
598
- /* @__PURE__ */ n.jsx(Nt, {})
1954
+ /* @__PURE__ */ o.jsx(gs, {})
599
1955
  ] }) });
600
- }), Ce = {
601
- Header: Oe
602
- }, kt = lt(Ce), Ot = kt.Provider, Ct = () => {
603
- const t = D(), { setActiveAnchor: e } = W();
604
- I(() => {
605
- if (!t.hash) return;
606
- const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
607
- if (a) {
608
- requestAnimationFrame(() => {
609
- a.scrollIntoView(), requestIdleCallback(() => e(s));
610
- });
611
- return;
612
- }
613
- const r = new MutationObserver((o, l) => {
614
- const h = document.getElementById(decodeURIComponent(s));
615
- h && (h.scrollIntoView(), requestIdleCallback(() => e(s)), l.disconnect());
616
- });
617
- return r.observe(document.body, { childList: !0, subtree: !0 }), () => r.disconnect();
618
- }, [t.hash, e]);
619
- }, Mt = () => {
620
- const t = D(), e = K(t.pathname);
621
- I(() => {
622
- e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
623
- }, [t.pathname]);
624
- }, Me = ({
625
- item: t,
626
- defaultOpen: e,
627
- path: s
1956
+ }), Jn = {
1957
+ Header: Wn
1958
+ }, vs = At(Jn), xs = vs.Provider, ys = (e) => {
1959
+ const [t, n] = de(!1);
1960
+ W(() => {
1961
+ const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), u = s === "dark" || !s && i.matches;
1962
+ n(u);
1963
+ }, [t]);
1964
+ const r = Ot(() => {
1965
+ const s = !t;
1966
+ document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
1967
+ }, [t]), a = [t, r];
1968
+ return /* @__PURE__ */ o.jsx(Fr.Provider, { value: a, ...e });
1969
+ }, ws = ({
1970
+ children: e,
1971
+ context: t
628
1972
  }) => {
629
- const [a, r] = ct(e), o = D(), l = K(o.pathname);
630
- return I(() => {
631
- !a && l.current !== o.pathname && r(X(t, o.pathname, s)), l.current = o.pathname;
632
- }, [a, t, s, o.pathname]), [a, r];
633
- }, R = Xe(
634
- "flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
635
- {
636
- variants: {
637
- isActive: {
638
- true: "text-primary font-medium",
639
- false: "text-foreground/80"
640
- },
641
- isMuted: {
642
- true: "text-foreground/30",
643
- false: ""
644
- }
645
- }
646
- }
647
- ), At = "data-anchor", Ae = ({
648
- category: t,
649
- item: e,
650
- activeAnchor: s,
651
- currentTopNavItem: a,
652
- basePath: r = ""
1973
+ const n = mr();
1974
+ return ao({
1975
+ queryFn: async () => (await t.initialize({ navigate: n }), !0),
1976
+ queryKey: ["zudoku-initialize"]
1977
+ }), /* @__PURE__ */ o.jsx(so.Provider, { value: t, children: e });
1978
+ }, bs = ({
1979
+ children: e,
1980
+ ...t
653
1981
  }) => {
654
- const o = V(e) ? ve(r, e.path) : "", l = D(), [h, g] = Me({
655
- item: e,
656
- path: o,
657
- defaultOpen: () => X(e, l.pathname, o)
1982
+ var l, f;
1983
+ const n = Ke(
1984
+ () => ({ ...Jn, ...t.overrides }),
1985
+ [t.overrides]
1986
+ ), r = Ke(() => {
1987
+ var x;
1988
+ return {
1989
+ ...(t.plugins ?? []).filter(Xo).flatMap(
1990
+ (b) => b.getMdxComponents ? [b.getMdxComponents()] : []
1991
+ ).reduce((b, I) => ({ ...b, ...I }), {}),
1992
+ ...Lr,
1993
+ ...(x = t.mdx) == null ? void 0 : x.components
1994
+ };
1995
+ }, [(l = t.mdx) == null ? void 0 : l.components, t.plugins]), { stagger: a } = Gr(qe), [s, i] = de(!1), u = Ke(
1996
+ () => s ? { stagger: !0 } : { stagger: a },
1997
+ [a, s]
1998
+ ), d = gr();
1999
+ W(() => {
2000
+ s || i(!0);
2001
+ }, [s, d.location]);
2002
+ const [g] = de(() => new Jo(t)), p = (f = t.plugins) == null ? void 0 : f.filter(Yo).map((v, x) => {
2003
+ var b;
2004
+ return /* @__PURE__ */ o.jsx(Hr, { children: (b = v.getHead) == null ? void 0 : b.call(v) }, x);
658
2005
  });
659
- if (Ue(e)) {
660
- const d = L(
661
- "flex items-center gap-2",
662
- R({
663
- isActive: e.href === l.pathname
664
- })
665
- );
666
- return e.href.startsWith("http") ? /* @__PURE__ */ n.jsxs(
667
- "a",
668
- {
669
- className: d,
670
- href: e.href,
671
- target: "_blank",
672
- rel: "noopener noreferrer",
673
- children: [
674
- e.label,
675
- /* @__PURE__ */ n.jsx(jt, { size: 14 })
676
- ]
677
- }
678
- ) : /* @__PURE__ */ n.jsx(B, { className: d, to: e.href, children: e.label });
679
- }
680
- const b = /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between w-full", children: [
681
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
682
- e.icon,
683
- typeof e.label != "string" ? e.label : /* @__PURE__ */ n.jsx("span", { className: "truncate", children: e.label })
684
- ] }),
685
- e.children && /* @__PURE__ */ n.jsx(
686
- ke,
687
- {
688
- size: 16,
689
- className: "transition shrink-0 group-data-[state=open]:rotate-90"
690
- }
691
- )
2006
+ return /* @__PURE__ */ o.jsxs(io, { client: Ht, children: [
2007
+ /* @__PURE__ */ o.jsx(Ge, { children: p }),
2008
+ /* @__PURE__ */ o.jsx(qe.Provider, { value: u, children: /* @__PURE__ */ o.jsx(ws, { context: g, children: /* @__PURE__ */ o.jsx(cr, { components: r, children: /* @__PURE__ */ o.jsx(ys, { children: /* @__PURE__ */ o.jsx(xs, { value: n, children: /* @__PURE__ */ o.jsx(vr, { slotlets: t.slotlets, children: /* @__PURE__ */ o.jsx(Kr, { children: e ?? /* @__PURE__ */ o.jsx(jt, {}) }) }) }) }) }) }) })
692
2009
  ] });
693
- return /* @__PURE__ */ n.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ n.jsxs(
694
- ye,
2010
+ }, Ms = Ft(bs), Zn = (e) => /* @__PURE__ */ o.jsx(qo, { FallbackComponent: Zo, children: /* @__PURE__ */ o.jsx(Ms, { ...e }) });
2011
+ Zn.displayName = "DevPortal";
2012
+ const Cs = ({
2013
+ category: e,
2014
+ level: t
2015
+ }) => {
2016
+ var p;
2017
+ const n = $t(), r = ur(e), a = e.collapsible ?? !0, s = e.collapsed ?? !0, i = !!(!a || !s || r), [u, d] = de(i);
2018
+ W(() => {
2019
+ r && d(!0);
2020
+ }, [r]);
2021
+ const g = a && /* @__PURE__ */ o.jsx(
2022
+ "button",
2023
+ {
2024
+ type: "button",
2025
+ onClick: (l) => {
2026
+ l.preventDefault(), d((f) => !f);
2027
+ },
2028
+ children: /* @__PURE__ */ o.jsx(
2029
+ Qt,
2030
+ {
2031
+ size: 16,
2032
+ className: "transition shrink-0 group-data-[state=open]:rotate-90"
2033
+ }
2034
+ )
2035
+ }
2036
+ );
2037
+ return /* @__PURE__ */ o.jsxs(
2038
+ Yr,
695
2039
  {
696
- open: h,
697
- onOpenChange: () => g((d) => !d),
698
- className: "flex flex-col",
2040
+ className: M("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
2041
+ defaultOpen: i,
2042
+ open: u,
2043
+ onOpenChange: () => d(!0),
699
2044
  children: [
700
- /* @__PURE__ */ n.jsx(
701
- xe,
2045
+ /* @__PURE__ */ o.jsx(
2046
+ Xr,
702
2047
  {
703
- className: L(
2048
+ className: M(
704
2049
  "group text-start",
705
- R({ isActive: !1 })
2050
+ le({ isActive: !1, isTopLevel: t === 0 }),
2051
+ a ? "cursor-pointer" : "cursor-default hover:bg-transparent"
706
2052
  ),
707
- children: b
2053
+ asChild: !0,
2054
+ disabled: !a,
2055
+ children: ((p = e.link) == null ? void 0 : p.type) === "doc" ? /* @__PURE__ */ o.jsx(Pe, { to: Xe(n == null ? void 0 : n.id, e.link.id), children: ({ isActive: l }) => /* @__PURE__ */ o.jsxs(
2056
+ "div",
2057
+ {
2058
+ className: M(
2059
+ "flex items-center gap-2 justify-between w-full",
2060
+ l ? "text-primary font-medium" : "text-foreground/80"
2061
+ ),
2062
+ children: [
2063
+ /* @__PURE__ */ o.jsx("div", { className: "truncate", children: e.label }),
2064
+ g
2065
+ ]
2066
+ }
2067
+ ) }) : /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between w-full", children: [
2068
+ /* @__PURE__ */ o.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
2069
+ g
2070
+ ] })
708
2071
  }
709
2072
  ),
710
- /* @__PURE__ */ n.jsx(be, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ n.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: e.children.map((d) => /* @__PURE__ */ n.jsx(
711
- Ae,
2073
+ /* @__PURE__ */ o.jsx(Wr, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ o.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((l) => /* @__PURE__ */ o.jsx(
2074
+ tr,
712
2075
  {
713
- category: t,
714
- item: d,
715
- activeAnchor: s,
716
- currentTopNavItem: a,
717
- basePath: o
2076
+ level: t + 1,
2077
+ item: l
718
2078
  },
719
- V(d) ? d.path : d.href
2079
+ l.label
720
2080
  )) }) })
721
2081
  ]
722
2082
  }
723
- ) : e.path.startsWith("#") ? /* @__PURE__ */ n.jsx(
724
- We,
725
- {
726
- to: e.path,
727
- [At]: e.path,
728
- className: R({
729
- isActive: e.path.slice(1) === s,
730
- isMuted: e.muted
731
- }),
732
- children: b
733
- }
734
- ) : /* @__PURE__ */ n.jsx(
735
- B,
736
- {
737
- className: ({ isActive: d }) => R({ isActive: d }),
738
- to: o,
739
- children: b
2083
+ );
2084
+ }, le = $r(
2085
+ "flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
2086
+ {
2087
+ variants: {
2088
+ isTopLevel: {
2089
+ true: "font-semibold"
2090
+ },
2091
+ isActive: {
2092
+ true: "text-primary font-medium",
2093
+ false: "text-foreground/80"
2094
+ },
2095
+ isMuted: {
2096
+ true: "text-foreground/30",
2097
+ false: ""
2098
+ }
740
2099
  }
741
- ) });
742
- }, Qt = ({
743
- category: t
2100
+ }
2101
+ ), er = "data-anchor", tr = ({
2102
+ item: e,
2103
+ level: t = 0
744
2104
  }) => {
745
- const { activeAnchor: e } = W(), s = $e(), a = D(), r = t.collapsible ?? !0, [o, l] = Me({
746
- item: t,
747
- path: (s == null ? void 0 : s.path) ?? "",
748
- defaultOpen: () => !r || t.expanded || X(t, a.pathname, (s == null ? void 0 : s.path) ?? "")
749
- });
750
- return /* @__PURE__ */ n.jsxs(
751
- ye,
752
- {
753
- open: o,
754
- onOpenChange: () => l((h) => !h),
755
- children: [
756
- t.label.length > 0 ? /* @__PURE__ */ n.jsx(xe, { asChild: r, disabled: !r, children: /* @__PURE__ */ n.jsxs(
757
- "h5",
758
- {
759
- className: L(
760
- "flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]",
761
- r ? "hover:bg-accent" : "cursor-auto"
762
- ),
763
- children: [
764
- t.label,
765
- r && /* @__PURE__ */ n.jsx(
766
- ke,
767
- {
768
- className: "group-data-[state=open]:rotate-90 transition",
769
- size: 16
770
- }
771
- )
772
- ]
773
- }
774
- ) }) : "Endpoints",
775
- /* @__PURE__ */ n.jsx(be, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ n.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((h) => /* @__PURE__ */ n.jsx(
776
- Ae,
777
- {
778
- category: t,
779
- item: h,
780
- activeAnchor: e,
781
- currentTopNavItem: s,
782
- basePath: ve(s == null ? void 0 : s.path, t.path)
783
- },
784
- V(h) ? h.path + h.label : h.href
785
- )) }) })
786
- ]
787
- },
788
- t.label
789
- );
790
- }, qt = ht(function({ children: e, className: s, pushMainContent: a }, r) {
791
- return /* @__PURE__ */ n.jsx(
2105
+ const n = $t(), { activeAnchor: r } = ze();
2106
+ switch (e.type) {
2107
+ case "category":
2108
+ return /* @__PURE__ */ o.jsx(Cs, { category: e, level: t });
2109
+ case "doc":
2110
+ return /* @__PURE__ */ o.jsx(
2111
+ Pe,
2112
+ {
2113
+ className: ({ isActive: a }) => le({ isActive: a, isTopLevel: t === 0 }),
2114
+ to: Xe(n == null ? void 0 : n.id, e.id),
2115
+ children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2116
+ /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
2117
+ /* @__PURE__ */ o.jsx($e, { ...e.badge })
2118
+ ] }) : e.label
2119
+ }
2120
+ );
2121
+ case "link":
2122
+ return e.href.startsWith("#") ? /* @__PURE__ */ o.jsx(
2123
+ lr,
2124
+ {
2125
+ to: e.href,
2126
+ [er]: e.href.slice(1),
2127
+ className: M(
2128
+ "flex gap-2.5 justify-between",
2129
+ t === 0 && "-mx-[--padding-nav-item]",
2130
+ le({
2131
+ isActive: e.href.slice(1) === r
2132
+ })
2133
+ ),
2134
+ children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2135
+ /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
2136
+ /* @__PURE__ */ o.jsx($e, { ...e.badge })
2137
+ ] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
2138
+ }
2139
+ ) : e.href.startsWith("http") ? /* @__PURE__ */ o.jsxs(
2140
+ "a",
2141
+ {
2142
+ className: M(
2143
+ le({ isTopLevel: t === 0 }),
2144
+ "block"
2145
+ ),
2146
+ href: e.href,
2147
+ target: "_blank",
2148
+ rel: "noopener noreferrer",
2149
+ children: [
2150
+ /* @__PURE__ */ o.jsx("span", { className: "whitespace-normal", children: e.label }),
2151
+ /* @__PURE__ */ o.jsxs("span", { className: "whitespace-nowrap", children: [
2152
+ " ",
2153
+ /* @__PURE__ */ o.jsx(po, { className: "inline ml-1", size: 12 })
2154
+ ] })
2155
+ ]
2156
+ }
2157
+ ) : /* @__PURE__ */ o.jsx(
2158
+ Pe,
2159
+ {
2160
+ className: M("flex gap-2.5 justify-between", le()),
2161
+ to: e.href,
2162
+ children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2163
+ /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
2164
+ /* @__PURE__ */ o.jsx($e, { ...e.badge })
2165
+ ] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
2166
+ }
2167
+ );
2168
+ }
2169
+ }, Ss = (e, t = { block: "center" }) => {
2170
+ if (!e) return;
2171
+ const n = e.getBoundingClientRect();
2172
+ n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
2173
+ }, Ps = () => {
2174
+ const e = De(), { setActiveAnchor: t } = ze();
2175
+ W(() => {
2176
+ if (!e.hash) return;
2177
+ const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
2178
+ const a = document.getElementById(n), s = document.querySelector(`[${er}="${n}"]`);
2179
+ return a ? (a.scrollIntoView(), Ss(s), requestIdleCallback(() => t(n)), !0) : !1;
2180
+ };
2181
+ if (!r()) {
2182
+ const a = new MutationObserver((s, i) => {
2183
+ r() && i.disconnect();
2184
+ });
2185
+ return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
2186
+ }
2187
+ }, [e.hash, t]);
2188
+ }, js = () => {
2189
+ const e = De(), t = Ve(e.pathname);
2190
+ W(() => {
2191
+ t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
2192
+ }, [e.pathname]);
2193
+ }, Rs = zr(function({ children: t, className: n, pushMainContent: r }, a) {
2194
+ return /* @__PURE__ */ o.jsx(
792
2195
  "nav",
793
2196
  {
794
- "data-navigation": String(a),
795
- className: L(
2197
+ "data-navigation": String(r),
2198
+ className: M(
796
2199
  "peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
797
- s
2200
+ n
798
2201
  ),
799
- ref: r,
800
- children: e
2202
+ ref: a,
2203
+ children: t
801
2204
  }
802
2205
  );
803
- }), Dt = () => {
804
- const t = K(null), e = Ge();
805
- return /* @__PURE__ */ n.jsx(
806
- qt,
2206
+ }), Es = () => {
2207
+ const e = Ve(null), t = co();
2208
+ return /* @__PURE__ */ o.jsxs(
2209
+ Rs,
807
2210
  {
808
- ref: t,
809
- pushMainContent: e.data.items.length > 0,
810
- children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(Qt, { category: s }, s.label))
2211
+ ref: e,
2212
+ pushMainContent: t.data.items.length > 0,
2213
+ children: [
2214
+ /* @__PURE__ */ o.jsx(Re, { name: "zudoku-before-navigation" }),
2215
+ t.data.items.map((n) => /* @__PURE__ */ o.jsx(tr, { item: n }, n.label)),
2216
+ /* @__PURE__ */ o.jsx(Re, { name: "zudoku-after-navigation" })
2217
+ ]
811
2218
  }
812
2219
  );
813
- }, ue = ({ children: t }) => {
814
- const e = D(), { setActiveAnchor: s } = W(), { meta: a } = U();
815
- Ct(), Mt();
816
- const r = K(e.pathname);
817
- return I(() => {
818
- e.pathname !== r.current && s(""), r.current = e.pathname;
819
- }, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
820
- /* @__PURE__ */ n.jsxs(Je, { titleTemplate: a == null ? void 0 : a.pageTitle, children: [
821
- /* @__PURE__ */ n.jsx("title", { children: "Home" }),
822
- (a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
823
- (a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })
2220
+ }, _s = ({ children: e }) => {
2221
+ const t = De(), { setActiveAnchor: n } = ze(), { meta: r } = Ie();
2222
+ Ps(), js();
2223
+ const a = Ve(t.pathname);
2224
+ return W(() => {
2225
+ t.pathname !== a.current && n(""), a.current = t.pathname;
2226
+ }, [t.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2227
+ !1,
2228
+ /* @__PURE__ */ o.jsxs(Ge, { titleTemplate: r == null ? void 0 : r.title, children: [
2229
+ (r == null ? void 0 : r.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: r.description }),
2230
+ (r == null ? void 0 : r.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: r.favicon })
824
2231
  ] }),
825
- /* @__PURE__ */ n.jsx(Oe, {}),
826
- /* @__PURE__ */ n.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ n.jsxs(
827
- Pe,
2232
+ /* @__PURE__ */ o.jsx(Wn, {}),
2233
+ /* @__PURE__ */ o.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ o.jsxs(
2234
+ Tt,
828
2235
  {
829
- fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(Ye, {}) }),
2236
+ fallback: /* @__PURE__ */ o.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ o.jsx(ho, {}) }),
830
2237
  children: [
831
- /* @__PURE__ */ n.jsx(Dt, {}),
832
- /* @__PURE__ */ n.jsx(
2238
+ /* @__PURE__ */ o.jsx(Es, {}),
2239
+ /* @__PURE__ */ o.jsxs(
833
2240
  "main",
834
2241
  {
835
- className: `dark:border-white/10 translate-x-0 h-full
836
- lg:overflow-visible
837
- lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
838
- lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
839
- children: t ?? /* @__PURE__ */ n.jsx(Ie, {})
2242
+ className: M(
2243
+ "dark:border-white/10 translate-x-0 h-full",
2244
+ "lg:overflow-visible",
2245
+ "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
2246
+ "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
2247
+ ),
2248
+ children: [
2249
+ /* @__PURE__ */ o.jsx(Re, { name: "zudoku-before-content" }),
2250
+ e ?? /* @__PURE__ */ o.jsx(jt, {}),
2251
+ /* @__PURE__ */ o.jsx(Re, { name: "zudoku-after-content" })
2252
+ ]
840
2253
  }
841
2254
  )
842
2255
  ]
843
2256
  }
844
2257
  ) })
845
2258
  ] });
846
- };
847
- function Tt({ plugins: t }) {
848
- const e = H(() => {
849
- const s = (t ?? []).flatMap(
850
- (a) => we(a) ? a.getRoutes() : []
851
- );
852
- return Ze([
853
- {
854
- path: "/",
855
- element: /* @__PURE__ */ n.jsx(ue, {}),
856
- errorElement: /* @__PURE__ */ n.jsx(ue, { children: /* @__PURE__ */ n.jsx("div", { className: "h-[75vh] flex items-center justify-center", children: "Error, look at the console" }) }),
857
- children: s
858
- }
859
- ]);
860
- }, [t]);
861
- return /* @__PURE__ */ n.jsx(et, { router: e });
862
- }
863
- const It = (t) => {
864
- const e = H(
865
- () => ({ ...Ce, ...t.overrides }),
866
- [t.overrides]
867
- ), s = H(
868
- () => ({ ...tt, ...t.mdxComponents }),
869
- [t.mdxComponents]
870
- ), a = H(() => new bt(t), [t]);
871
- return I(() => {
872
- a.initialize();
873
- }, [a]), /* @__PURE__ */ n.jsx(st, { client: Ne, children: /* @__PURE__ */ n.jsx(at, { children: /* @__PURE__ */ n.jsx(nt, { value: a, children: /* @__PURE__ */ n.jsx(rt, { components: s, children: /* @__PURE__ */ n.jsx(it, { children: /* @__PURE__ */ n.jsx(Ot, { value: e, children: /* @__PURE__ */ n.jsx(ot, { children: /* @__PURE__ */ n.jsx(
874
- Pe,
875
- {
876
- fallback: /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: "Loading..." }),
877
- children: /* @__PURE__ */ n.jsx(
878
- Tt,
879
- {
880
- plugins: [
881
- ...t.plugins ?? [],
882
- ...t.authentication ? [t.authentication] : []
883
- ]
884
- }
885
- )
886
- }
887
- ) }) }) }) }) }) }) });
888
- }, Et = je(It);
889
- Et.displayName = "DevPortal";
2259
+ }, Gs = dr, Hs = Br, zs = Zn, Vs = _s, Ys = je, Xs = xr, Ws = xo, Js = Oo, Zs = To, ei = Qe, ti = Ge;
890
2260
  export {
891
- Et as DevPortal,
892
- _t as Link,
893
- Bt as useMDXComponents
2261
+ Js as Bootstrap,
2262
+ Zs as BootstrapStatic,
2263
+ ei as Button,
2264
+ Hs as Callout,
2265
+ zs as DevPortal,
2266
+ ti as Head,
2267
+ Vs as Layout,
2268
+ Ys as Link,
2269
+ Xs as RouterError,
2270
+ Ws as ServerError,
2271
+ Gs as useMDXComponents
894
2272
  };
2273
+ //# sourceMappingURL=zudoku.components.js.map