zudoku 0.3.0-dev.9 → 0.3.0-dev.90

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 (663) hide show
  1. package/cli.js +5 -1
  2. package/dist/app/App.d.ts +1 -2
  3. package/dist/app/App.js +1 -29
  4. package/dist/app/App.js.map +1 -1
  5. package/dist/app/demo.d.ts +2 -0
  6. package/dist/app/demo.js +33 -0
  7. package/dist/app/demo.js.map +1 -0
  8. package/dist/app/entry.client.d.ts +2 -0
  9. package/dist/app/entry.client.js +35 -0
  10. package/dist/app/entry.client.js.map +1 -0
  11. package/dist/app/entry.server.d.ts +14 -0
  12. package/dist/app/entry.server.js +105 -0
  13. package/dist/app/entry.server.js.map +1 -0
  14. package/dist/app/main.d.ts +6 -1
  15. package/dist/app/main.js +74 -12
  16. package/dist/app/main.js.map +1 -1
  17. package/dist/app/standalone.d.ts +2 -0
  18. package/dist/app/standalone.js +38 -0
  19. package/dist/app/standalone.js.map +1 -0
  20. package/dist/app/tailwind.d.ts +1 -1
  21. package/dist/app/tailwind.js +0 -4
  22. package/dist/app/tailwind.js.map +1 -1
  23. package/dist/cli/cmds/dev.js +5 -0
  24. package/dist/cli/cmds/dev.js.map +1 -1
  25. package/dist/cli/dev/handler.d.ts +1 -0
  26. package/dist/cli/dev/handler.js +3 -1
  27. package/dist/cli/dev/handler.js.map +1 -1
  28. package/dist/config/config.d.ts +21 -46
  29. package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
  30. package/dist/config/validators/InputSidebarSchema.js +71 -0
  31. package/dist/config/validators/InputSidebarSchema.js.map +1 -0
  32. package/dist/config/validators/SidebarSchema.d.ts +17 -0
  33. package/dist/config/validators/SidebarSchema.js +76 -0
  34. package/dist/config/validators/SidebarSchema.js.map +1 -0
  35. package/dist/config/validators/validate.d.ts +1263 -2
  36. package/dist/config/validators/validate.js +170 -1
  37. package/dist/config/validators/validate.js.map +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/internal.d.ts +1 -0
  40. package/dist/internal.js +2 -0
  41. package/dist/internal.js.map +1 -0
  42. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  43. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  44. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  45. package/dist/lib/authentication/authentication.d.ts +10 -9
  46. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  47. package/dist/lib/authentication/components/SignIn.js +14 -0
  48. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  49. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  50. package/dist/lib/authentication/components/SignOut.js +12 -0
  51. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  52. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  53. package/dist/lib/authentication/components/SignUp.js +10 -0
  54. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  55. package/dist/lib/authentication/hook.js +4 -4
  56. package/dist/lib/authentication/hook.js.map +1 -1
  57. package/dist/lib/authentication/providers/auth0.js +11 -6
  58. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  59. package/dist/lib/authentication/providers/clerk.js +59 -30
  60. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  61. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  62. package/dist/lib/authentication/providers/openid.js +79 -29
  63. package/dist/lib/authentication/providers/openid.js.map +1 -1
  64. package/dist/lib/authentication/state.js +1 -1
  65. package/dist/lib/authentication/state.js.map +1 -1
  66. package/dist/lib/components/Bootstrap.d.ts +13 -0
  67. package/dist/lib/components/Bootstrap.js +12 -0
  68. package/dist/lib/components/Bootstrap.js.map +1 -0
  69. package/dist/lib/components/DevPortal.d.ts +5 -23
  70. package/dist/lib/components/DevPortal.js +43 -20
  71. package/dist/lib/components/DevPortal.js.map +1 -1
  72. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  73. package/dist/lib/components/DeveloperHint.js +10 -0
  74. package/dist/lib/components/DeveloperHint.js.map +1 -0
  75. package/dist/lib/components/ErrorPage.d.ts +6 -0
  76. package/dist/lib/components/ErrorPage.js +9 -0
  77. package/dist/lib/components/ErrorPage.js.map +1 -0
  78. package/dist/lib/components/Header.js +23 -4
  79. package/dist/lib/components/Header.js.map +1 -1
  80. package/dist/lib/components/Heading.d.ts +9 -4
  81. package/dist/lib/components/Heading.js +17 -2
  82. package/dist/lib/components/Heading.js.map +1 -1
  83. package/dist/lib/components/InlineCode.d.ts +5 -0
  84. package/dist/lib/components/InlineCode.js +4 -0
  85. package/dist/lib/components/InlineCode.js.map +1 -0
  86. package/dist/lib/components/Layout.js +7 -5
  87. package/dist/lib/components/Layout.js.map +1 -1
  88. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  89. package/dist/lib/components/NotFoundPage.js +12 -0
  90. package/dist/lib/components/NotFoundPage.js.map +1 -0
  91. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  92. package/dist/lib/components/SlotletProvider.js +11 -0
  93. package/dist/lib/components/SlotletProvider.js.map +1 -0
  94. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  95. package/dist/lib/components/SyntaxHighlight.js +24 -22
  96. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  97. package/dist/lib/components/TopNavigation.d.ts +1 -1
  98. package/dist/lib/components/TopNavigation.js +8 -4
  99. package/dist/lib/components/TopNavigation.js.map +1 -1
  100. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  101. package/dist/lib/components/context/ThemeContext.js +3 -29
  102. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  103. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  104. package/dist/lib/components/context/ThemeProvider.js +23 -0
  105. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  106. package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
  107. package/dist/lib/components/context/ZudokuContext.js +43 -0
  108. package/dist/lib/components/context/ZudokuContext.js.map +1 -0
  109. package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
  110. package/dist/lib/components/context/ZudokuProvider.js +16 -0
  111. package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
  112. package/dist/lib/components/index.d.ts +32 -3
  113. package/dist/lib/components/index.js +21 -3
  114. package/dist/lib/components/index.js.map +1 -1
  115. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  116. package/dist/lib/components/navigation/Sidebar.js +12 -0
  117. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  118. package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
  119. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  120. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  121. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  122. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  123. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  124. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  125. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  126. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  127. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  128. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  129. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  130. package/dist/lib/components/navigation/utils.d.ts +16 -0
  131. package/dist/lib/components/navigation/utils.js +85 -0
  132. package/dist/lib/components/navigation/utils.js.map +1 -0
  133. package/dist/lib/core/DevPortalContext.d.ts +58 -42
  134. package/dist/lib/core/DevPortalContext.js +18 -19
  135. package/dist/lib/core/DevPortalContext.js.map +1 -1
  136. package/dist/lib/core/plugins.d.ts +25 -10
  137. package/dist/lib/core/plugins.js +3 -0
  138. package/dist/lib/core/plugins.js.map +1 -1
  139. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  140. package/dist/lib/errors/ErrorAlert.js +8 -0
  141. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  142. package/dist/lib/errors/RouterError.d.ts +1 -0
  143. package/dist/lib/errors/RouterError.js +12 -0
  144. package/dist/lib/errors/RouterError.js.map +1 -0
  145. package/dist/lib/errors/ServerError.d.ts +3 -0
  146. package/dist/lib/errors/ServerError.js +6 -0
  147. package/dist/lib/errors/ServerError.js.map +1 -0
  148. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  149. package/dist/lib/errors/TopLevelError.js +7 -0
  150. package/dist/lib/errors/TopLevelError.js.map +1 -0
  151. package/dist/lib/oas/graphql/index.js +8 -5
  152. package/dist/lib/oas/graphql/index.js.map +1 -1
  153. package/dist/lib/oas/parser/index.d.ts +1 -1
  154. package/dist/lib/oas/parser/index.js +38 -12
  155. package/dist/lib/oas/parser/index.js.map +1 -1
  156. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
  157. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  158. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  159. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  160. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  161. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
  162. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  163. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  164. package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
  165. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  166. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  167. package/dist/lib/plugins/custom-page/index.js +12 -0
  168. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  169. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  170. package/dist/lib/plugins/markdown/MdxPage.js +10 -40
  171. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  172. package/dist/lib/plugins/markdown/Toc.js +17 -9
  173. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  174. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  175. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  176. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  177. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  178. package/dist/lib/plugins/markdown/index.js +3 -7
  179. package/dist/lib/plugins/markdown/index.js.map +1 -1
  180. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  181. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  182. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  183. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  184. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  185. package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
  186. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ParameterList.js +2 -1
  188. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  189. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  190. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  191. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
  192. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
  193. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  194. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  195. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  197. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  198. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  199. package/dist/lib/plugins/openapi/Route.js +8 -0
  200. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  201. package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
  202. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  203. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  204. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  205. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  206. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  207. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  208. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  209. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  210. package/dist/lib/plugins/openapi/Sidecar.js +55 -21
  211. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  212. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  213. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  214. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  215. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  216. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  217. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  218. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  219. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  220. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  221. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  222. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  223. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  224. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  225. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  226. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  227. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  228. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  229. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  230. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  231. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  232. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  233. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  234. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  235. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  236. package/dist/lib/plugins/openapi/context.js +11 -0
  237. package/dist/lib/plugins/openapi/context.js.map +1 -0
  238. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  239. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  240. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  241. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  242. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  243. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  244. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  245. package/dist/lib/plugins/openapi/index.js +76 -32
  246. package/dist/lib/plugins/openapi/index.js.map +1 -1
  247. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  248. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  249. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  250. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  251. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  252. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  253. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  254. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  255. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
  256. package/dist/lib/plugins/openapi/playground/Playground.js +54 -26
  257. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
  259. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
  260. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  261. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  262. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  263. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  264. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  265. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  266. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  267. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  268. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  269. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  270. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  271. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  272. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  273. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  274. package/dist/lib/plugins/openapi-worker.js +1 -1
  275. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  276. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  277. package/dist/lib/plugins/redirect/index.js +3 -4
  278. package/dist/lib/plugins/redirect/index.js.map +1 -1
  279. package/dist/lib/ui/Button.d.ts +5 -1
  280. package/dist/lib/ui/Button.js +24 -1
  281. package/dist/lib/ui/Button.js.map +1 -1
  282. package/dist/lib/ui/Callout.js +2 -2
  283. package/dist/lib/ui/Callout.js.map +1 -1
  284. package/dist/lib/ui/Card.js +1 -1
  285. package/dist/lib/ui/Card.js.map +1 -1
  286. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  287. package/dist/lib/ui/DropdownMenu.js +36 -0
  288. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  289. package/dist/lib/ui/Input.js.map +1 -0
  290. package/dist/lib/util/MdxComponents.d.ts +2 -2
  291. package/dist/lib/util/MdxComponents.js +7 -5
  292. package/dist/lib/util/MdxComponents.js.map +1 -1
  293. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  294. package/dist/lib/util/fetchTimeout.js +14 -0
  295. package/dist/lib/util/fetchTimeout.js.map +1 -0
  296. package/dist/lib/util/groupBy.d.ts +1 -6
  297. package/dist/lib/util/groupBy.js +10 -8
  298. package/dist/lib/util/groupBy.js.map +1 -1
  299. package/dist/lib/util/invariant.d.ts +6 -0
  300. package/dist/lib/util/invariant.js +21 -0
  301. package/dist/lib/util/invariant.js.map +1 -0
  302. package/dist/lib/util/joinPath.js +2 -1
  303. package/dist/lib/util/joinPath.js.map +1 -1
  304. package/dist/lib/util/logInit.d.ts +1 -0
  305. package/dist/lib/util/logInit.js +9 -0
  306. package/dist/lib/util/logInit.js.map +1 -0
  307. package/dist/lib/util/objectEntries.d.ts +4 -0
  308. package/dist/lib/util/objectEntries.js +2 -0
  309. package/dist/lib/util/objectEntries.js.map +1 -0
  310. package/dist/lib/util/renderIf.d.ts +1 -0
  311. package/dist/lib/util/renderIf.js +2 -0
  312. package/dist/lib/util/renderIf.js.map +1 -0
  313. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  314. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  315. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  316. package/dist/lib/util/useScrollToAnchor.js +31 -17
  317. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  318. package/dist/vite/build.js +30 -7
  319. package/dist/vite/build.js.map +1 -1
  320. package/dist/vite/config.d.ts +20 -12
  321. package/dist/vite/config.js +107 -55
  322. package/dist/vite/config.js.map +1 -1
  323. package/dist/vite/config.test.js +6 -3
  324. package/dist/vite/config.test.js.map +1 -1
  325. package/dist/vite/dev-server.d.ts +2 -1
  326. package/dist/vite/dev-server.js +44 -15
  327. package/dist/vite/dev-server.js.map +1 -1
  328. package/dist/vite/html.js +18 -5
  329. package/dist/vite/html.js.map +1 -1
  330. package/dist/vite/plugin-api-keys.js +7 -8
  331. package/dist/vite/plugin-api-keys.js.map +1 -1
  332. package/dist/vite/plugin-api.js +9 -20
  333. package/dist/vite/plugin-api.js.map +1 -1
  334. package/dist/vite/plugin-auth.js +5 -6
  335. package/dist/vite/plugin-auth.js.map +1 -1
  336. package/dist/vite/plugin-component.js +5 -2
  337. package/dist/vite/plugin-component.js.map +1 -1
  338. package/dist/vite/plugin-config.d.ts +3 -6
  339. package/dist/vite/plugin-config.js +5 -8
  340. package/dist/vite/plugin-config.js.map +1 -1
  341. package/dist/vite/plugin-custom-css.d.ts +6 -0
  342. package/dist/vite/plugin-custom-css.js +54 -0
  343. package/dist/vite/plugin-custom-css.js.map +1 -0
  344. package/dist/vite/plugin-docs.js +15 -5
  345. package/dist/vite/plugin-docs.js.map +1 -1
  346. package/dist/vite/plugin-mdx.d.ts +3 -1
  347. package/dist/vite/plugin-mdx.js +5 -5
  348. package/dist/vite/plugin-mdx.js.map +1 -1
  349. package/dist/vite/plugin-metadata.js +1 -1
  350. package/dist/vite/plugin-metadata.js.map +1 -1
  351. package/dist/vite/plugin-redirect.js +10 -10
  352. package/dist/vite/plugin-redirect.js.map +1 -1
  353. package/dist/vite/plugin-sidebar.d.ts +3 -0
  354. package/dist/vite/plugin-sidebar.js +23 -0
  355. package/dist/vite/plugin-sidebar.js.map +1 -0
  356. package/dist/vite/plugin.js +5 -5
  357. package/dist/vite/plugin.js.map +1 -1
  358. package/dist/vite/prerender.d.ts +17 -0
  359. package/dist/vite/prerender.js +79 -0
  360. package/dist/vite/prerender.js.map +1 -0
  361. package/lib/AuthenticationPlugin-C3dzfGaA.js +55 -0
  362. package/lib/AuthenticationPlugin-C3dzfGaA.js.map +1 -0
  363. package/lib/CategoryHeading-BWq12Bfa.js +10 -0
  364. package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
  365. package/lib/Combination-Djh-LWhb.js +2789 -0
  366. package/lib/Combination-Djh-LWhb.js.map +1 -0
  367. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  368. package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
  369. package/lib/Input-SCGD-EvD.js +2239 -0
  370. package/lib/Input-SCGD-EvD.js.map +1 -0
  371. package/lib/Markdown-B_Gax7at.js +14108 -0
  372. package/lib/Markdown-B_Gax7at.js.map +1 -0
  373. package/lib/MdxPage-d02krMBw.js +187 -0
  374. package/lib/MdxPage-d02krMBw.js.map +1 -0
  375. package/lib/OperationList-BQweX28o.js +448 -0
  376. package/lib/OperationList-BQweX28o.js.map +1 -0
  377. package/lib/Route-BPGW1TS_.js +14 -0
  378. package/lib/Route-BPGW1TS_.js.map +1 -0
  379. package/lib/SlotletProvider-CzMAO73_.js +82 -0
  380. package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
  381. package/lib/Spinner-DEgs-1Gu.js +274 -0
  382. package/lib/Spinner-DEgs-1Gu.js.map +1 -0
  383. package/lib/ZudokuContext-C3JtXViU.js +1084 -0
  384. package/lib/ZudokuContext-C3JtXViU.js.map +1 -0
  385. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  386. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  387. package/lib/assets/index-BPdJm2ty.js +1 -0
  388. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  389. package/lib/assets/{worker-BCcpCNJ7.js → worker-CyHZIIfE.js} +10727 -10300
  390. package/lib/assets/worker-CyHZIIfE.js.map +1 -0
  391. package/lib/index-7kcHaXD6.js +1771 -0
  392. package/lib/index-7kcHaXD6.js.map +1 -0
  393. package/lib/index-B8BCBPkc.js +124 -0
  394. package/lib/index-B8BCBPkc.js.map +1 -0
  395. package/lib/index-DoIWqOG1.js +5934 -0
  396. package/lib/index-DoIWqOG1.js.map +1 -0
  397. package/lib/index-pI9JkN46.js +4765 -0
  398. package/lib/index-pI9JkN46.js.map +1 -0
  399. package/lib/joinPath-VeNuJa7y.js +8 -0
  400. package/lib/joinPath-VeNuJa7y.js.map +1 -0
  401. package/lib/jsx-runtime-B6kdoens.js +635 -0
  402. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  403. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  404. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  405. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  406. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  407. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  408. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  409. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  410. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  411. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  412. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  413. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  414. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  415. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  416. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  417. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  418. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  419. package/lib/router-BiRCp01d.js +2971 -0
  420. package/lib/router-BiRCp01d.js.map +1 -0
  421. package/lib/slugify-CiPVjteN.js +28 -0
  422. package/lib/slugify-CiPVjteN.js.map +1 -0
  423. package/lib/state-DsXXkBLH.js +288 -0
  424. package/lib/state-DsXXkBLH.js.map +1 -0
  425. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  426. package/lib/urql-DrBfkb92.js.map +1 -0
  427. package/lib/utils-D3fcGEot.js +749 -0
  428. package/lib/utils-D3fcGEot.js.map +1 -0
  429. package/lib/zudoku.auth-auth0.js +31 -20
  430. package/lib/zudoku.auth-auth0.js.map +1 -0
  431. package/lib/zudoku.auth-clerk.js +59 -29
  432. package/lib/zudoku.auth-clerk.js.map +1 -0
  433. package/lib/zudoku.auth-openid.js +742 -573
  434. package/lib/zudoku.auth-openid.js.map +1 -0
  435. package/lib/zudoku.components.js +2008 -684
  436. package/lib/zudoku.components.js.map +1 -0
  437. package/lib/zudoku.openapi-worker.js +15035 -146
  438. package/lib/zudoku.openapi-worker.js.map +1 -0
  439. package/lib/zudoku.plugin-api-keys.js +325 -0
  440. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  441. package/lib/zudoku.plugin-custom-page.js +13 -0
  442. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  443. package/lib/zudoku.plugin-markdown.js +31 -0
  444. package/lib/zudoku.plugin-markdown.js.map +1 -0
  445. package/lib/zudoku.plugin-openapi.js +14 -0
  446. package/lib/zudoku.plugin-openapi.js.map +1 -0
  447. package/lib/zudoku.plugin-redirect.js +11 -0
  448. package/lib/zudoku.plugin-redirect.js.map +1 -0
  449. package/package.json +64 -25
  450. package/src/app/App.tsx +0 -41
  451. package/src/app/demo-cdn.html +26 -0
  452. package/src/app/demo.html +18 -0
  453. package/src/app/demo.tsx +46 -0
  454. package/src/app/entry.client.tsx +47 -0
  455. package/src/app/entry.server.tsx +160 -0
  456. package/src/app/main.css +83 -3
  457. package/src/app/main.tsx +87 -15
  458. package/src/app/standalone.html +20 -0
  459. package/src/app/standalone.tsx +52 -0
  460. package/src/app/tailwind.ts +2 -6
  461. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  462. package/src/lib/authentication/authentication.ts +6 -12
  463. package/src/lib/authentication/components/SignIn.tsx +15 -0
  464. package/src/lib/authentication/components/SignOut.tsx +13 -0
  465. package/src/lib/authentication/components/SignUp.tsx +11 -0
  466. package/src/lib/authentication/hook.ts +4 -4
  467. package/src/lib/authentication/providers/auth0.tsx +16 -6
  468. package/src/lib/authentication/providers/clerk.tsx +63 -31
  469. package/src/lib/authentication/providers/openid.tsx +104 -34
  470. package/src/lib/authentication/state.ts +1 -1
  471. package/src/lib/components/Bootstrap.tsx +44 -0
  472. package/src/lib/components/DevPortal.tsx +75 -66
  473. package/src/lib/components/DeveloperHint.tsx +25 -0
  474. package/src/lib/components/ErrorPage.tsx +28 -0
  475. package/src/lib/components/Header.tsx +106 -31
  476. package/src/lib/components/Heading.tsx +26 -7
  477. package/src/lib/components/InlineCode.tsx +19 -0
  478. package/src/lib/components/Layout.tsx +16 -11
  479. package/src/lib/components/NotFoundPage.tsx +33 -0
  480. package/src/lib/components/SlotletProvider.tsx +25 -0
  481. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  482. package/src/lib/components/TopNavigation.tsx +10 -5
  483. package/src/lib/components/context/ThemeContext.tsx +3 -41
  484. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  485. package/src/lib/components/context/ZudokuContext.ts +55 -0
  486. package/src/lib/components/context/ZudokuProvider.tsx +26 -0
  487. package/src/lib/components/index.ts +25 -3
  488. package/src/lib/components/navigation/Sidebar.tsx +24 -0
  489. package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
  490. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  491. package/src/lib/components/navigation/SidebarItem.tsx +100 -0
  492. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  493. package/src/lib/components/navigation/utils.ts +117 -0
  494. package/src/lib/core/DevPortalContext.ts +72 -68
  495. package/src/lib/core/plugins.ts +40 -16
  496. package/src/lib/errors/ErrorAlert.tsx +21 -0
  497. package/src/lib/errors/RouterError.tsx +13 -0
  498. package/src/lib/errors/ServerError.tsx +5 -0
  499. package/src/lib/errors/TopLevelError.tsx +8 -0
  500. package/src/lib/oas/graphql/index.ts +11 -6
  501. package/src/lib/oas/parser/index.ts +41 -20
  502. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
  503. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  504. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
  505. package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
  506. package/src/lib/plugins/custom-page/index.tsx +22 -0
  507. package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
  508. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  509. package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
  510. package/src/lib/plugins/markdown/index.tsx +10 -7
  511. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  512. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  513. package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
  514. package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
  515. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  516. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
  517. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -15
  518. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  519. package/src/lib/plugins/openapi/Route.tsx +21 -0
  520. package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
  521. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
  522. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  523. package/src/lib/plugins/openapi/Sidecar.tsx +77 -30
  524. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  525. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  526. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  527. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  528. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  529. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  530. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  531. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  532. package/src/lib/plugins/openapi/context.tsx +16 -0
  533. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  534. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  535. package/src/lib/plugins/openapi/index.tsx +134 -76
  536. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  537. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
  538. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  539. package/src/lib/plugins/openapi/playground/Playground.tsx +240 -230
  540. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
  541. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  542. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  543. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  544. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  545. package/src/lib/plugins/openapi-worker.ts +1 -1
  546. package/src/lib/plugins/redirect/index.tsx +3 -4
  547. package/src/lib/ui/Button.tsx +32 -2
  548. package/src/lib/ui/Callout.tsx +4 -4
  549. package/src/lib/ui/Card.tsx +1 -1
  550. package/src/lib/ui/DropdownMenu.tsx +199 -0
  551. package/src/lib/util/MdxComponents.tsx +7 -15
  552. package/src/lib/util/fetchTimeout.tsx +21 -0
  553. package/src/lib/util/groupBy.ts +7 -12
  554. package/src/lib/util/invariant.ts +26 -0
  555. package/src/lib/util/joinPath.tsx +2 -1
  556. package/src/lib/util/logInit.ts +9 -0
  557. package/src/lib/util/objectEntries.ts +5 -0
  558. package/src/lib/util/renderIf.ts +4 -0
  559. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  560. package/src/lib/util/useScrollToAnchor.ts +39 -18
  561. package/dist/lib/authentication/Callback.d.ts +0 -3
  562. package/dist/lib/authentication/Callback.js +0 -34
  563. package/dist/lib/authentication/Callback.js.map +0 -1
  564. package/dist/lib/components/Input.js.map +0 -1
  565. package/dist/lib/components/Link.d.ts +0 -1
  566. package/dist/lib/components/Link.js +0 -2
  567. package/dist/lib/components/Link.js.map +0 -1
  568. package/dist/lib/components/Router.d.ts +0 -4
  569. package/dist/lib/components/Router.js +0 -20
  570. package/dist/lib/components/Router.js.map +0 -1
  571. package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
  572. package/dist/lib/components/context/DevPortalProvider.js +0 -39
  573. package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
  574. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  575. package/dist/lib/components/navigation/SideNavigation.js +0 -11
  576. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  577. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  578. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  579. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  580. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
  581. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  582. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  583. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  584. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
  585. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
  586. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  587. package/dist/lib/components/navigation/util.d.ts +0 -8
  588. package/dist/lib/components/navigation/util.js +0 -15
  589. package/dist/lib/components/navigation/util.js.map +0 -1
  590. package/dist/lib/core/helmet.d.ts +0 -4
  591. package/dist/lib/core/helmet.js +0 -5
  592. package/dist/lib/core/helmet.js.map +0 -1
  593. package/dist/lib/core/icons.d.ts +0 -1
  594. package/dist/lib/core/icons.js +0 -2
  595. package/dist/lib/core/icons.js.map +0 -1
  596. package/dist/lib/core/router.d.ts +0 -1
  597. package/dist/lib/core/router.js +0 -2
  598. package/dist/lib/core/router.js.map +0 -1
  599. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  600. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  601. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  602. package/dist/lib/plugins/api-key/index.js.map +0 -1
  603. package/dist/lib/plugins/index.d.ts +0 -4
  604. package/dist/lib/plugins/index.js +0 -5
  605. package/dist/lib/plugins/index.js.map +0 -1
  606. package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
  607. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  608. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  609. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  610. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  611. package/dist/lib/plugins/openapi/Select.js +0 -5
  612. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  613. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  614. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  615. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  616. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  617. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  618. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  619. package/dist/lib/ui/button-variants.d.ts +0 -4
  620. package/dist/lib/ui/button-variants.js +0 -24
  621. package/dist/lib/ui/button-variants.js.map +0 -1
  622. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  623. package/dist/lib/util/traverseNavigation.js +0 -30
  624. package/dist/lib/util/traverseNavigation.js.map +0 -1
  625. package/dist/vite/common.d.ts +0 -1
  626. package/dist/vite/common.js +0 -5
  627. package/dist/vite/common.js.map +0 -1
  628. package/dist/vite/plugin-html.d.ts +0 -3
  629. package/dist/vite/plugin-html.js +0 -47
  630. package/dist/vite/plugin-html.js.map +0 -1
  631. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  632. package/dist/vite/plugin-openapi-worker.js +0 -28
  633. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  634. package/lib/Spinner-BewqqUU-.js +0 -8413
  635. package/lib/clerk-Wslx_mPo.js +0 -19685
  636. package/lib/index-PyGcnQFX.js +0 -3462
  637. package/lib/loglevel-CoH7VSwE.js +0 -152
  638. package/lib/state-2Hu1renZ.js +0 -313
  639. package/lib/zudoku.plugins.js +0 -19904
  640. package/src/lib/authentication/Callback.tsx +0 -60
  641. package/src/lib/components/Link.tsx +0 -1
  642. package/src/lib/components/Router.tsx +0 -28
  643. package/src/lib/components/context/DevPortalProvider.ts +0 -54
  644. package/src/lib/components/navigation/SideNavigation.tsx +0 -21
  645. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
  646. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
  647. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
  648. package/src/lib/components/navigation/util.ts +0 -38
  649. package/src/lib/core/helmet.ts +0 -5
  650. package/src/lib/core/icons.tsx +0 -1
  651. package/src/lib/core/router.tsx +0 -1
  652. package/src/lib/plugins/index.ts +0 -4
  653. package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
  654. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  655. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  656. package/src/lib/ui/button-variants.ts +0 -31
  657. package/src/lib/util/traverseNavigation.ts +0 -55
  658. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  659. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  660. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  661. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  662. /package/dist/lib/{components → ui}/Input.js +0 -0
  663. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -0,0 +1,1771 @@
1
+ import * as r from "react";
2
+ import * as At from "react-dom";
3
+ import { b as m, j as G, g as Re, w, c as Ne, d as _e, A as de, p as fe, s as T, i as we, m as X, e as Mt, f as Bt, I as jt, h as qe, k as Se, l as Ce, n as Q, o as Ge, q as Xe, t as Qe, a as Ze, u as et, v as tt, x as nt, y as rt, E as ot, z as Ht } from "./router-BiRCp01d.js";
4
+ /**
5
+ * React Router v6.25.1
6
+ *
7
+ * Copyright (c) Remix Software Inc.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE.md file in the root directory of this source tree.
11
+ *
12
+ * @license MIT
13
+ */
14
+ function I() {
15
+ return I = Object.assign ? Object.assign.bind() : function(e) {
16
+ for (var t = 1; t < arguments.length; t++) {
17
+ var n = arguments[t];
18
+ for (var o in n)
19
+ Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
20
+ }
21
+ return e;
22
+ }, I.apply(this, arguments);
23
+ }
24
+ const U = /* @__PURE__ */ r.createContext(null);
25
+ process.env.NODE_ENV !== "production" && (U.displayName = "DataRouter");
26
+ const M = /* @__PURE__ */ r.createContext(null);
27
+ process.env.NODE_ENV !== "production" && (M.displayName = "DataRouterState");
28
+ const Z = /* @__PURE__ */ r.createContext(null);
29
+ process.env.NODE_ENV !== "production" && (Z.displayName = "Await");
30
+ const S = /* @__PURE__ */ r.createContext(null);
31
+ process.env.NODE_ENV !== "production" && (S.displayName = "Navigation");
32
+ const B = /* @__PURE__ */ r.createContext(null);
33
+ process.env.NODE_ENV !== "production" && (B.displayName = "Location");
34
+ const C = /* @__PURE__ */ r.createContext({
35
+ outlet: null,
36
+ matches: [],
37
+ isDataRoute: !1
38
+ });
39
+ process.env.NODE_ENV !== "production" && (C.displayName = "Route");
40
+ const xe = /* @__PURE__ */ r.createContext(null);
41
+ process.env.NODE_ENV !== "production" && (xe.displayName = "RouteError");
42
+ function De(e, t) {
43
+ let {
44
+ relative: n
45
+ } = t === void 0 ? {} : t;
46
+ V() || (process.env.NODE_ENV !== "production" ? m(
47
+ !1,
48
+ // TODO: This error is probably because they somehow have 2 versions of the
49
+ // router loaded. We can help them understand how to avoid that.
50
+ "useHref() may be used only in the context of a <Router> component."
51
+ ) : m(!1));
52
+ let {
53
+ basename: o,
54
+ navigator: a
55
+ } = r.useContext(S), {
56
+ hash: s,
57
+ pathname: i,
58
+ search: u
59
+ } = Y(e, {
60
+ relative: n
61
+ }), d = i;
62
+ return o !== "/" && (d = i === "/" ? o : G([o, i])), a.createHref({
63
+ pathname: d,
64
+ search: u,
65
+ hash: s
66
+ });
67
+ }
68
+ function V() {
69
+ return r.useContext(B) != null;
70
+ }
71
+ function L() {
72
+ return V() || (process.env.NODE_ENV !== "production" ? m(
73
+ !1,
74
+ // TODO: This error is probably because they somehow have 2 versions of the
75
+ // router loaded. We can help them understand how to avoid that.
76
+ "useLocation() may be used only in the context of a <Router> component."
77
+ ) : m(!1)), r.useContext(B).location;
78
+ }
79
+ function at() {
80
+ return r.useContext(B).navigationType;
81
+ }
82
+ function it(e) {
83
+ V() || (process.env.NODE_ENV !== "production" ? m(
84
+ !1,
85
+ // TODO: This error is probably because they somehow have 2 versions of the
86
+ // router loaded. We can help them understand how to avoid that.
87
+ "useMatch() may be used only in the context of a <Router> component."
88
+ ) : m(!1));
89
+ let {
90
+ pathname: t
91
+ } = L();
92
+ return r.useMemo(() => X(e, Mt(t)), [t, e]);
93
+ }
94
+ const st = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
95
+ function lt(e) {
96
+ r.useContext(S).static || r.useLayoutEffect(e);
97
+ }
98
+ function te() {
99
+ let {
100
+ isDataRoute: e
101
+ } = r.useContext(C);
102
+ return e ? Gt() : Kt();
103
+ }
104
+ function Kt() {
105
+ V() || (process.env.NODE_ENV !== "production" ? m(
106
+ !1,
107
+ // TODO: This error is probably because they somehow have 2 versions of the
108
+ // router loaded. We can help them understand how to avoid that.
109
+ "useNavigate() may be used only in the context of a <Router> component."
110
+ ) : m(!1));
111
+ let e = r.useContext(U), {
112
+ basename: t,
113
+ future: n,
114
+ navigator: o
115
+ } = r.useContext(S), {
116
+ matches: a
117
+ } = r.useContext(C), {
118
+ pathname: s
119
+ } = L(), i = JSON.stringify(Re(a, n.v7_relativeSplatPath)), u = r.useRef(!1);
120
+ return lt(() => {
121
+ u.current = !0;
122
+ }), r.useCallback(function(l, c) {
123
+ if (c === void 0 && (c = {}), process.env.NODE_ENV !== "production" && w(u.current, st), !u.current) return;
124
+ if (typeof l == "number") {
125
+ o.go(l);
126
+ return;
127
+ }
128
+ let f = Ne(l, JSON.parse(i), s, c.relative === "path");
129
+ e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : G([t, f.pathname])), (c.replace ? o.replace : o.push)(f, c.state, c);
130
+ }, [t, o, i, s, e]);
131
+ }
132
+ const ut = /* @__PURE__ */ r.createContext(null);
133
+ function ct() {
134
+ return r.useContext(ut);
135
+ }
136
+ function Oe(e) {
137
+ let t = r.useContext(C).outlet;
138
+ return t && /* @__PURE__ */ r.createElement(ut.Provider, {
139
+ value: e
140
+ }, t);
141
+ }
142
+ function dt() {
143
+ let {
144
+ matches: e
145
+ } = r.useContext(C), t = e[e.length - 1];
146
+ return t ? t.params : {};
147
+ }
148
+ function Y(e, t) {
149
+ let {
150
+ relative: n
151
+ } = t === void 0 ? {} : t, {
152
+ future: o
153
+ } = r.useContext(S), {
154
+ matches: a
155
+ } = r.useContext(C), {
156
+ pathname: s
157
+ } = L(), i = JSON.stringify(Re(a, o.v7_relativeSplatPath));
158
+ return r.useMemo(() => Ne(e, JSON.parse(i), s, n === "path"), [e, i, s, n]);
159
+ }
160
+ function Pe(e, t) {
161
+ return pe(e, t);
162
+ }
163
+ function pe(e, t, n, o) {
164
+ V() || (process.env.NODE_ENV !== "production" ? m(
165
+ !1,
166
+ // TODO: This error is probably because they somehow have 2 versions of the
167
+ // router loaded. We can help them understand how to avoid that.
168
+ "useRoutes() may be used only in the context of a <Router> component."
169
+ ) : m(!1));
170
+ let {
171
+ navigator: a
172
+ } = r.useContext(S), {
173
+ matches: s
174
+ } = r.useContext(C), i = s[s.length - 1], u = i ? i.params : {}, d = i ? i.pathname : "/", l = i ? i.pathnameBase : "/", c = i && i.route;
175
+ if (process.env.NODE_ENV !== "production") {
176
+ let h = c && c.path || "";
177
+ yt(d, !c || h.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ('"' + d + '" (under <Route path="' + h + '">) but the ') + `parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
178
+
179
+ ` + ('Please change the parent <Route path="' + h + '"> to <Route ') + ('path="' + (h === "/" ? "*" : h + "/*") + '">.'));
180
+ }
181
+ let f = L(), p;
182
+ if (t) {
183
+ var v;
184
+ let h = typeof t == "string" ? fe(t) : t;
185
+ l === "/" || (v = h.pathname) != null && v.startsWith(l) || (process.env.NODE_ENV !== "production" ? m(!1, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was " + ('matched by all parent routes. The current pathname base is "' + l + '" ') + ('but pathname "' + h.pathname + '" was given in the `location` prop.')) : m(!1)), p = h;
186
+ } else
187
+ p = f;
188
+ let g = p.pathname || "/", b = g;
189
+ if (l !== "/") {
190
+ let h = l.replace(/^\//, "").split("/");
191
+ b = "/" + g.replace(/^\//, "").split("/").slice(h.length).join("/");
192
+ }
193
+ let y = _e(e, {
194
+ pathname: b
195
+ });
196
+ process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && w(c || y != null, 'No routes matched location "' + p.pathname + p.search + p.hash + '" '), process.env.NODE_ENV !== "production" && w(y == null || y[y.length - 1].route.element !== void 0 || y[y.length - 1].route.Component !== void 0 || y[y.length - 1].route.lazy !== void 0, 'Matched leaf route at location "' + p.pathname + p.search + p.hash + '" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));
197
+ let _ = ft(y && y.map((h) => Object.assign({}, h, {
198
+ params: Object.assign({}, u, h.params),
199
+ pathname: G([
200
+ l,
201
+ // Re-encode pathnames that were decoded inside matchRoutes
202
+ a.encodeLocation ? a.encodeLocation(h.pathname).pathname : h.pathname
203
+ ]),
204
+ pathnameBase: h.pathnameBase === "/" ? l : G([
205
+ l,
206
+ // Re-encode pathnames that were decoded inside matchRoutes
207
+ a.encodeLocation ? a.encodeLocation(h.pathnameBase).pathname : h.pathnameBase
208
+ ])
209
+ })), s, n, o);
210
+ return t && _ ? /* @__PURE__ */ r.createElement(B.Provider, {
211
+ value: {
212
+ location: I({
213
+ pathname: "/",
214
+ search: "",
215
+ hash: "",
216
+ state: null,
217
+ key: "default"
218
+ }, p),
219
+ navigationType: de.Pop
220
+ }
221
+ }, _) : _;
222
+ }
223
+ function zt() {
224
+ let e = ke(), t = we(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, o = "rgba(200,200,200, 0.5)", a = {
225
+ padding: "0.5rem",
226
+ backgroundColor: o
227
+ }, s = {
228
+ padding: "2px 4px",
229
+ backgroundColor: o
230
+ }, i = null;
231
+ return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), i = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ r.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ r.createElement("code", {
232
+ style: s
233
+ }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ r.createElement("code", {
234
+ style: s
235
+ }, "errorElement"), " prop on your route."))), /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ r.createElement("h3", {
236
+ style: {
237
+ fontStyle: "italic"
238
+ }
239
+ }, t), n ? /* @__PURE__ */ r.createElement("pre", {
240
+ style: a
241
+ }, n) : null, i);
242
+ }
243
+ const Wt = /* @__PURE__ */ r.createElement(zt, null);
244
+ class Yt extends r.Component {
245
+ constructor(t) {
246
+ super(t), this.state = {
247
+ location: t.location,
248
+ revalidation: t.revalidation,
249
+ error: t.error
250
+ };
251
+ }
252
+ static getDerivedStateFromError(t) {
253
+ return {
254
+ error: t
255
+ };
256
+ }
257
+ static getDerivedStateFromProps(t, n) {
258
+ return n.location !== t.location || n.revalidation !== "idle" && t.revalidation === "idle" ? {
259
+ error: t.error,
260
+ location: t.location,
261
+ revalidation: t.revalidation
262
+ } : {
263
+ error: t.error !== void 0 ? t.error : n.error,
264
+ location: n.location,
265
+ revalidation: t.revalidation || n.revalidation
266
+ };
267
+ }
268
+ componentDidCatch(t, n) {
269
+ console.error("React Router caught the following error during render", t, n);
270
+ }
271
+ render() {
272
+ return this.state.error !== void 0 ? /* @__PURE__ */ r.createElement(C.Provider, {
273
+ value: this.props.routeContext
274
+ }, /* @__PURE__ */ r.createElement(xe.Provider, {
275
+ value: this.state.error,
276
+ children: this.props.component
277
+ })) : this.props.children;
278
+ }
279
+ }
280
+ function $t(e) {
281
+ let {
282
+ routeContext: t,
283
+ match: n,
284
+ children: o
285
+ } = e, a = r.useContext(U);
286
+ return a && a.static && a.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ r.createElement(C.Provider, {
287
+ value: t
288
+ }, o);
289
+ }
290
+ function ft(e, t, n, o) {
291
+ var a;
292
+ if (t === void 0 && (t = []), n === void 0 && (n = null), o === void 0 && (o = null), e == null) {
293
+ var s;
294
+ if ((s = n) != null && s.errors)
295
+ e = n.matches;
296
+ else
297
+ return null;
298
+ }
299
+ let i = e, u = (a = n) == null ? void 0 : a.errors;
300
+ if (u != null) {
301
+ let c = i.findIndex((f) => f.route.id && (u == null ? void 0 : u[f.route.id]) !== void 0);
302
+ c >= 0 || (process.env.NODE_ENV !== "production" ? m(!1, "Could not find a matching route for errors on route IDs: " + Object.keys(u).join(",")) : m(!1)), i = i.slice(0, Math.min(i.length, c + 1));
303
+ }
304
+ let d = !1, l = -1;
305
+ if (n && o && o.v7_partialHydration)
306
+ for (let c = 0; c < i.length; c++) {
307
+ let f = i[c];
308
+ if ((f.route.HydrateFallback || f.route.hydrateFallbackElement) && (l = c), f.route.id) {
309
+ let {
310
+ loaderData: p,
311
+ errors: v
312
+ } = n, g = f.route.loader && p[f.route.id] === void 0 && (!v || v[f.route.id] === void 0);
313
+ if (f.route.lazy || g) {
314
+ d = !0, l >= 0 ? i = i.slice(0, l + 1) : i = [i[0]];
315
+ break;
316
+ }
317
+ }
318
+ }
319
+ return i.reduceRight((c, f, p) => {
320
+ let v, g = !1, b = null, y = null;
321
+ n && (v = u && f.route.id ? u[f.route.id] : void 0, b = f.route.errorElement || Wt, d && (l < 0 && p === 0 ? (yt("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), g = !0, y = null) : l === p && (g = !0, y = f.route.hydrateFallbackElement || null)));
322
+ let _ = t.concat(i.slice(0, p + 1)), h = () => {
323
+ let E;
324
+ return v ? E = b : g ? E = y : f.route.Component ? E = /* @__PURE__ */ r.createElement(f.route.Component, null) : f.route.element ? E = f.route.element : E = c, /* @__PURE__ */ r.createElement($t, {
325
+ match: f,
326
+ routeContext: {
327
+ outlet: c,
328
+ matches: _,
329
+ isDataRoute: n != null
330
+ },
331
+ children: E
332
+ });
333
+ };
334
+ return n && (f.route.ErrorBoundary || f.route.errorElement || p === 0) ? /* @__PURE__ */ r.createElement(Yt, {
335
+ location: n.location,
336
+ revalidation: n.revalidation,
337
+ component: b,
338
+ error: v,
339
+ children: h(),
340
+ routeContext: {
341
+ outlet: null,
342
+ matches: _,
343
+ isDataRoute: !0
344
+ }
345
+ }) : h();
346
+ }, null);
347
+ }
348
+ var he = /* @__PURE__ */ function(e) {
349
+ return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
350
+ }(he || {}), O = /* @__PURE__ */ function(e) {
351
+ return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
352
+ }(O || {});
353
+ function Le(e) {
354
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
355
+ }
356
+ function Te(e) {
357
+ let t = r.useContext(U);
358
+ return t || (process.env.NODE_ENV !== "production" ? m(!1, Le(e)) : m(!1)), t;
359
+ }
360
+ function j(e) {
361
+ let t = r.useContext(M);
362
+ return t || (process.env.NODE_ENV !== "production" ? m(!1, Le(e)) : m(!1)), t;
363
+ }
364
+ function Jt(e) {
365
+ let t = r.useContext(C);
366
+ return t || (process.env.NODE_ENV !== "production" ? m(!1, Le(e)) : m(!1)), t;
367
+ }
368
+ function ne(e) {
369
+ let t = Jt(e), n = t.matches[t.matches.length - 1];
370
+ return n.route.id || (process.env.NODE_ENV !== "production" ? m(!1, e + ' can only be used on routes that contain a unique "id"') : m(!1)), n.route.id;
371
+ }
372
+ function Fe() {
373
+ return ne(O.UseRouteId);
374
+ }
375
+ function Ue() {
376
+ return j(O.UseNavigation).navigation;
377
+ }
378
+ function pt() {
379
+ let e = Te(he.UseRevalidator), t = j(O.UseRevalidator);
380
+ return r.useMemo(() => ({
381
+ revalidate: e.router.revalidate,
382
+ state: t.revalidation
383
+ }), [e.router.revalidate, t.revalidation]);
384
+ }
385
+ function Ve() {
386
+ let {
387
+ matches: e,
388
+ loaderData: t
389
+ } = j(O.UseMatches);
390
+ return r.useMemo(() => e.map((n) => Bt(n, t)), [e, t]);
391
+ }
392
+ function ht() {
393
+ let e = j(O.UseLoaderData), t = ne(O.UseLoaderData);
394
+ if (e.errors && e.errors[t] != null) {
395
+ console.error("You cannot `useLoaderData` in an errorElement (routeId: " + t + ")");
396
+ return;
397
+ }
398
+ return e.loaderData[t];
399
+ }
400
+ function mt(e) {
401
+ return j(O.UseRouteLoaderData).loaderData[e];
402
+ }
403
+ function vt() {
404
+ let e = j(O.UseActionData), t = ne(O.UseLoaderData);
405
+ return e.actionData ? e.actionData[t] : void 0;
406
+ }
407
+ function ke() {
408
+ var e;
409
+ let t = r.useContext(xe), n = j(O.UseRouteError), o = ne(O.UseRouteError);
410
+ return t !== void 0 ? t : (e = n.errors) == null ? void 0 : e[o];
411
+ }
412
+ function Ie() {
413
+ let e = r.useContext(Z);
414
+ return e == null ? void 0 : e._data;
415
+ }
416
+ function Et() {
417
+ let e = r.useContext(Z);
418
+ return e == null ? void 0 : e._error;
419
+ }
420
+ let qt = 0;
421
+ function Ae(e) {
422
+ let {
423
+ router: t,
424
+ basename: n
425
+ } = Te(he.UseBlocker), o = j(O.UseBlocker), [a, s] = r.useState(""), i = r.useCallback((u) => {
426
+ if (typeof e != "function")
427
+ return !!e;
428
+ if (n === "/")
429
+ return e(u);
430
+ let {
431
+ currentLocation: d,
432
+ nextLocation: l,
433
+ historyAction: c
434
+ } = u;
435
+ return e({
436
+ currentLocation: I({}, d, {
437
+ pathname: T(d.pathname, n) || d.pathname
438
+ }),
439
+ nextLocation: I({}, l, {
440
+ pathname: T(l.pathname, n) || l.pathname
441
+ }),
442
+ historyAction: c
443
+ });
444
+ }, [n, e]);
445
+ return r.useEffect(() => {
446
+ let u = String(++qt);
447
+ return s(u), () => t.deleteBlocker(u);
448
+ }, [t]), r.useEffect(() => {
449
+ a !== "" && t.getBlocker(a, i);
450
+ }, [t, a, i]), a && o.blockers.has(a) ? o.blockers.get(a) : jt;
451
+ }
452
+ function Gt() {
453
+ let {
454
+ router: e
455
+ } = Te(he.UseNavigateStable), t = ne(O.UseNavigateStable), n = r.useRef(!1);
456
+ return lt(() => {
457
+ n.current = !0;
458
+ }), r.useCallback(function(a, s) {
459
+ s === void 0 && (s = {}), process.env.NODE_ENV !== "production" && w(n.current, st), n.current && (typeof a == "number" ? e.navigate(a) : e.navigate(a, I({
460
+ fromRouteId: t
461
+ }, s)));
462
+ }, [e, t]);
463
+ }
464
+ const We = {};
465
+ function yt(e, t, n) {
466
+ !t && !We[e] && (We[e] = !0, process.env.NODE_ENV !== "production" && w(!1, n));
467
+ }
468
+ const Xt = "startTransition", ue = r[Xt];
469
+ function Qt(e) {
470
+ let {
471
+ fallbackElement: t,
472
+ router: n,
473
+ future: o
474
+ } = e, [a, s] = r.useState(n.state), {
475
+ v7_startTransition: i
476
+ } = o || {}, u = r.useCallback((f) => {
477
+ i && ue ? ue(() => s(f)) : s(f);
478
+ }, [s, i]);
479
+ r.useLayoutEffect(() => n.subscribe(u), [n, u]), r.useEffect(() => {
480
+ process.env.NODE_ENV !== "production" && w(t == null || !n.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead");
481
+ }, []);
482
+ let d = r.useMemo(() => ({
483
+ createHref: n.createHref,
484
+ encodeLocation: n.encodeLocation,
485
+ go: (f) => n.navigate(f),
486
+ push: (f, p, v) => n.navigate(f, {
487
+ state: p,
488
+ preventScrollReset: v == null ? void 0 : v.preventScrollReset
489
+ }),
490
+ replace: (f, p, v) => n.navigate(f, {
491
+ replace: !0,
492
+ state: p,
493
+ preventScrollReset: v == null ? void 0 : v.preventScrollReset
494
+ })
495
+ }), [n]), l = n.basename || "/", c = r.useMemo(() => ({
496
+ router: n,
497
+ navigator: d,
498
+ static: !1,
499
+ basename: l
500
+ }), [n, d, l]);
501
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(U.Provider, {
502
+ value: c
503
+ }, /* @__PURE__ */ r.createElement(M.Provider, {
504
+ value: a
505
+ }, /* @__PURE__ */ r.createElement(H, {
506
+ basename: l,
507
+ location: a.location,
508
+ navigationType: a.historyAction,
509
+ navigator: d,
510
+ future: {
511
+ v7_relativeSplatPath: n.future.v7_relativeSplatPath
512
+ }
513
+ }, a.initialized || n.future.v7_partialHydration ? /* @__PURE__ */ r.createElement(Zt, {
514
+ routes: n.routes,
515
+ future: n.future,
516
+ state: a
517
+ }) : t))), null);
518
+ }
519
+ function Zt(e) {
520
+ let {
521
+ routes: t,
522
+ future: n,
523
+ state: o
524
+ } = e;
525
+ return pe(t, void 0, o, n);
526
+ }
527
+ function gt(e) {
528
+ let {
529
+ basename: t,
530
+ children: n,
531
+ initialEntries: o,
532
+ initialIndex: a,
533
+ future: s
534
+ } = e, i = r.useRef();
535
+ i.current == null && (i.current = qe({
536
+ initialEntries: o,
537
+ initialIndex: a,
538
+ v5Compat: !0
539
+ }));
540
+ let u = i.current, [d, l] = r.useState({
541
+ action: u.action,
542
+ location: u.location
543
+ }), {
544
+ v7_startTransition: c
545
+ } = s || {}, f = r.useCallback((p) => {
546
+ c && ue ? ue(() => l(p)) : l(p);
547
+ }, [l, c]);
548
+ return r.useLayoutEffect(() => u.listen(f), [u, f]), /* @__PURE__ */ r.createElement(H, {
549
+ basename: t,
550
+ children: n,
551
+ location: d.location,
552
+ navigationType: d.action,
553
+ navigator: u,
554
+ future: s
555
+ });
556
+ }
557
+ function bt(e) {
558
+ let {
559
+ to: t,
560
+ replace: n,
561
+ state: o,
562
+ relative: a
563
+ } = e;
564
+ V() || (process.env.NODE_ENV !== "production" ? m(
565
+ !1,
566
+ // TODO: This error is probably because they somehow have 2 versions of
567
+ // the router loaded. We can help them understand how to avoid that.
568
+ "<Navigate> may be used only in the context of a <Router> component."
569
+ ) : m(!1));
570
+ let {
571
+ future: s,
572
+ static: i
573
+ } = r.useContext(S);
574
+ process.env.NODE_ENV !== "production" && w(!i, "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");
575
+ let {
576
+ matches: u
577
+ } = r.useContext(C), {
578
+ pathname: d
579
+ } = L(), l = te(), c = Ne(t, Re(u, s.v7_relativeSplatPath), d, a === "path"), f = JSON.stringify(c);
580
+ return r.useEffect(() => l(JSON.parse(f), {
581
+ replace: n,
582
+ state: o,
583
+ relative: a
584
+ }), [l, f, a, n, o]), null;
585
+ }
586
+ function Rt(e) {
587
+ return Oe(e.context);
588
+ }
589
+ function Me(e) {
590
+ process.env.NODE_ENV !== "production" ? m(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.") : m(!1);
591
+ }
592
+ function H(e) {
593
+ let {
594
+ basename: t = "/",
595
+ children: n = null,
596
+ location: o,
597
+ navigationType: a = de.Pop,
598
+ navigator: s,
599
+ static: i = !1,
600
+ future: u
601
+ } = e;
602
+ V() && (process.env.NODE_ENV !== "production" ? m(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : m(!1));
603
+ let d = t.replace(/^\/*/, "/"), l = r.useMemo(() => ({
604
+ basename: d,
605
+ navigator: s,
606
+ static: i,
607
+ future: I({
608
+ v7_relativeSplatPath: !1
609
+ }, u)
610
+ }), [d, u, s, i]);
611
+ typeof o == "string" && (o = fe(o));
612
+ let {
613
+ pathname: c = "/",
614
+ search: f = "",
615
+ hash: p = "",
616
+ state: v = null,
617
+ key: g = "default"
618
+ } = o, b = r.useMemo(() => {
619
+ let y = T(c, d);
620
+ return y == null ? null : {
621
+ location: {
622
+ pathname: y,
623
+ search: f,
624
+ hash: p,
625
+ state: v,
626
+ key: g
627
+ },
628
+ navigationType: a
629
+ };
630
+ }, [d, c, f, p, v, g, a]);
631
+ return process.env.NODE_ENV !== "production" && w(b != null, '<Router basename="' + d + '"> is not able to match the URL ' + ('"' + c + f + p + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), b == null ? null : /* @__PURE__ */ r.createElement(S.Provider, {
632
+ value: l
633
+ }, /* @__PURE__ */ r.createElement(B.Provider, {
634
+ children: n,
635
+ value: b
636
+ }));
637
+ }
638
+ function Nt(e) {
639
+ let {
640
+ children: t,
641
+ location: n
642
+ } = e;
643
+ return Pe(W(t), n);
644
+ }
645
+ function _t(e) {
646
+ let {
647
+ children: t,
648
+ errorElement: n,
649
+ resolve: o
650
+ } = e;
651
+ return /* @__PURE__ */ r.createElement(tn, {
652
+ resolve: o,
653
+ errorElement: n
654
+ }, /* @__PURE__ */ r.createElement(nn, null, t));
655
+ }
656
+ var P = /* @__PURE__ */ function(e) {
657
+ return e[e.pending = 0] = "pending", e[e.success = 1] = "success", e[e.error = 2] = "error", e;
658
+ }(P || {});
659
+ const en = new Promise(() => {
660
+ });
661
+ class tn extends r.Component {
662
+ constructor(t) {
663
+ super(t), this.state = {
664
+ error: null
665
+ };
666
+ }
667
+ static getDerivedStateFromError(t) {
668
+ return {
669
+ error: t
670
+ };
671
+ }
672
+ componentDidCatch(t, n) {
673
+ console.error("<Await> caught the following error during render", t, n);
674
+ }
675
+ render() {
676
+ let {
677
+ children: t,
678
+ errorElement: n,
679
+ resolve: o
680
+ } = this.props, a = null, s = P.pending;
681
+ if (!(o instanceof Promise))
682
+ s = P.success, a = Promise.resolve(), Object.defineProperty(a, "_tracked", {
683
+ get: () => !0
684
+ }), Object.defineProperty(a, "_data", {
685
+ get: () => o
686
+ });
687
+ else if (this.state.error) {
688
+ s = P.error;
689
+ let i = this.state.error;
690
+ a = Promise.reject().catch(() => {
691
+ }), Object.defineProperty(a, "_tracked", {
692
+ get: () => !0
693
+ }), Object.defineProperty(a, "_error", {
694
+ get: () => i
695
+ });
696
+ } else o._tracked ? (a = o, s = "_error" in a ? P.error : "_data" in a ? P.success : P.pending) : (s = P.pending, Object.defineProperty(o, "_tracked", {
697
+ get: () => !0
698
+ }), a = o.then((i) => Object.defineProperty(o, "_data", {
699
+ get: () => i
700
+ }), (i) => Object.defineProperty(o, "_error", {
701
+ get: () => i
702
+ })));
703
+ if (s === P.error && a._error instanceof Se)
704
+ throw en;
705
+ if (s === P.error && !n)
706
+ throw a._error;
707
+ if (s === P.error)
708
+ return /* @__PURE__ */ r.createElement(Z.Provider, {
709
+ value: a,
710
+ children: n
711
+ });
712
+ if (s === P.success)
713
+ return /* @__PURE__ */ r.createElement(Z.Provider, {
714
+ value: a,
715
+ children: t
716
+ });
717
+ throw a;
718
+ }
719
+ }
720
+ function nn(e) {
721
+ let {
722
+ children: t
723
+ } = e, n = Ie(), o = typeof t == "function" ? t(n) : t;
724
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, o);
725
+ }
726
+ function W(e, t) {
727
+ t === void 0 && (t = []);
728
+ let n = [];
729
+ return r.Children.forEach(e, (o, a) => {
730
+ if (!/* @__PURE__ */ r.isValidElement(o))
731
+ return;
732
+ let s = [...t, a];
733
+ if (o.type === r.Fragment) {
734
+ n.push.apply(n, W(o.props.children, s));
735
+ return;
736
+ }
737
+ o.type !== Me && (process.env.NODE_ENV !== "production" ? m(!1, "[" + (typeof o.type == "string" ? o.type : o.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : m(!1)), !o.props.index || !o.props.children || (process.env.NODE_ENV !== "production" ? m(!1, "An index route cannot have child routes.") : m(!1));
738
+ let i = {
739
+ id: o.props.id || s.join("-"),
740
+ caseSensitive: o.props.caseSensitive,
741
+ element: o.props.element,
742
+ Component: o.props.Component,
743
+ index: o.props.index,
744
+ path: o.props.path,
745
+ loader: o.props.loader,
746
+ action: o.props.action,
747
+ errorElement: o.props.errorElement,
748
+ ErrorBoundary: o.props.ErrorBoundary,
749
+ hasErrorBoundary: o.props.ErrorBoundary != null || o.props.errorElement != null,
750
+ shouldRevalidate: o.props.shouldRevalidate,
751
+ handle: o.props.handle,
752
+ lazy: o.props.lazy
753
+ };
754
+ o.props.children && (i.children = W(o.props.children, s)), n.push(i);
755
+ }), n;
756
+ }
757
+ function wt(e) {
758
+ return ft(e);
759
+ }
760
+ function me(e) {
761
+ let t = {
762
+ // Note: this check also occurs in createRoutesFromChildren so update
763
+ // there if you change this -- please and thank you!
764
+ hasErrorBoundary: e.ErrorBoundary != null || e.errorElement != null
765
+ };
766
+ return e.Component && (process.env.NODE_ENV !== "production" && e.element && process.env.NODE_ENV !== "production" && w(!1, "You should not include both `Component` and `element` on your route - `Component` will be used."), Object.assign(t, {
767
+ element: /* @__PURE__ */ r.createElement(e.Component),
768
+ Component: void 0
769
+ })), e.HydrateFallback && (process.env.NODE_ENV !== "production" && e.hydrateFallbackElement && process.env.NODE_ENV !== "production" && w(!1, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."), Object.assign(t, {
770
+ hydrateFallbackElement: /* @__PURE__ */ r.createElement(e.HydrateFallback),
771
+ HydrateFallback: void 0
772
+ })), e.ErrorBoundary && (process.env.NODE_ENV !== "production" && e.errorElement && process.env.NODE_ENV !== "production" && w(!1, "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."), Object.assign(t, {
773
+ errorElement: /* @__PURE__ */ r.createElement(e.ErrorBoundary),
774
+ ErrorBoundary: void 0
775
+ })), t;
776
+ }
777
+ function St(e, t) {
778
+ return Ce({
779
+ basename: t == null ? void 0 : t.basename,
780
+ future: I({}, t == null ? void 0 : t.future, {
781
+ v7_prependBasename: !0
782
+ }),
783
+ history: qe({
784
+ initialEntries: t == null ? void 0 : t.initialEntries,
785
+ initialIndex: t == null ? void 0 : t.initialIndex
786
+ }),
787
+ hydrationData: t == null ? void 0 : t.hydrationData,
788
+ routes: e,
789
+ mapRouteProperties: me,
790
+ unstable_dataStrategy: t == null ? void 0 : t.unstable_dataStrategy,
791
+ unstable_patchRoutesOnMiss: t == null ? void 0 : t.unstable_patchRoutesOnMiss
792
+ }).initialize();
793
+ }
794
+ const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
795
+ __proto__: null,
796
+ AbortedDeferredError: Se,
797
+ Await: _t,
798
+ MemoryRouter: gt,
799
+ Navigate: bt,
800
+ get NavigationType() {
801
+ return de;
802
+ },
803
+ Outlet: Rt,
804
+ Route: Me,
805
+ Router: H,
806
+ RouterProvider: Qt,
807
+ Routes: Nt,
808
+ UNSAFE_DataRouterContext: U,
809
+ UNSAFE_DataRouterStateContext: M,
810
+ UNSAFE_LocationContext: B,
811
+ UNSAFE_NavigationContext: S,
812
+ UNSAFE_RouteContext: C,
813
+ UNSAFE_mapRouteProperties: me,
814
+ UNSAFE_useRouteId: Fe,
815
+ UNSAFE_useRoutesImpl: pe,
816
+ createMemoryRouter: St,
817
+ createPath: Q,
818
+ createRoutesFromChildren: W,
819
+ createRoutesFromElements: W,
820
+ defer: Ge,
821
+ generatePath: Xe,
822
+ isRouteErrorResponse: we,
823
+ json: Qe,
824
+ matchPath: X,
825
+ matchRoutes: _e,
826
+ parsePath: fe,
827
+ redirect: Ze,
828
+ redirectDocument: et,
829
+ renderMatches: wt,
830
+ resolvePath: tt,
831
+ useActionData: vt,
832
+ useAsyncError: Et,
833
+ useAsyncValue: Ie,
834
+ useBlocker: Ae,
835
+ useHref: De,
836
+ useInRouterContext: V,
837
+ useLoaderData: ht,
838
+ useLocation: L,
839
+ useMatch: it,
840
+ useMatches: Ve,
841
+ useNavigate: te,
842
+ useNavigation: Ue,
843
+ useNavigationType: at,
844
+ useOutlet: Oe,
845
+ useOutletContext: ct,
846
+ useParams: dt,
847
+ useResolvedPath: Y,
848
+ useRevalidator: pt,
849
+ useRouteError: ke,
850
+ useRouteLoaderData: mt,
851
+ useRoutes: Pe
852
+ }, Symbol.toStringTag, { value: "Module" }));
853
+ /**
854
+ * React Router DOM v6.25.1
855
+ *
856
+ * Copyright (c) Remix Software Inc.
857
+ *
858
+ * This source code is licensed under the MIT license found in the
859
+ * LICENSE.md file in the root directory of this source tree.
860
+ *
861
+ * @license MIT
862
+ */
863
+ function D() {
864
+ return D = Object.assign ? Object.assign.bind() : function(e) {
865
+ for (var t = 1; t < arguments.length; t++) {
866
+ var n = arguments[t];
867
+ for (var o in n)
868
+ Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
869
+ }
870
+ return e;
871
+ }, D.apply(this, arguments);
872
+ }
873
+ function Be(e, t) {
874
+ if (e == null) return {};
875
+ var n = {}, o = Object.keys(e), a, s;
876
+ for (s = 0; s < o.length; s++)
877
+ a = o[s], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
878
+ return n;
879
+ }
880
+ const se = "get", le = "application/x-www-form-urlencoded";
881
+ function ve(e) {
882
+ return e != null && typeof e.tagName == "string";
883
+ }
884
+ function rn(e) {
885
+ return ve(e) && e.tagName.toLowerCase() === "button";
886
+ }
887
+ function on(e) {
888
+ return ve(e) && e.tagName.toLowerCase() === "form";
889
+ }
890
+ function an(e) {
891
+ return ve(e) && e.tagName.toLowerCase() === "input";
892
+ }
893
+ function sn(e) {
894
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
895
+ }
896
+ function ln(e, t) {
897
+ return e.button === 0 && // Ignore everything but left clicks
898
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
899
+ !sn(e);
900
+ }
901
+ function ce(e) {
902
+ return e === void 0 && (e = ""), new URLSearchParams(typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
903
+ let o = e[n];
904
+ return t.concat(Array.isArray(o) ? o.map((a) => [n, a]) : [[n, o]]);
905
+ }, []));
906
+ }
907
+ function un(e, t) {
908
+ let n = ce(e);
909
+ return t && t.forEach((o, a) => {
910
+ n.has(a) || t.getAll(a).forEach((s) => {
911
+ n.append(a, s);
912
+ });
913
+ }), n;
914
+ }
915
+ let ae = null;
916
+ function cn() {
917
+ if (ae === null)
918
+ try {
919
+ new FormData(
920
+ document.createElement("form"),
921
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
922
+ 0
923
+ ), ae = !1;
924
+ } catch {
925
+ ae = !0;
926
+ }
927
+ return ae;
928
+ }
929
+ const dn = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
930
+ function be(e) {
931
+ return e != null && !dn.has(e) ? (process.env.NODE_ENV !== "production" && w(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + le + '"')), null) : e;
932
+ }
933
+ function fn(e, t) {
934
+ let n, o, a, s, i;
935
+ if (on(e)) {
936
+ let u = e.getAttribute("action");
937
+ o = u ? T(u, t) : null, n = e.getAttribute("method") || se, a = be(e.getAttribute("enctype")) || le, s = new FormData(e);
938
+ } else if (rn(e) || an(e) && (e.type === "submit" || e.type === "image")) {
939
+ let u = e.form;
940
+ if (u == null)
941
+ throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
942
+ let d = e.getAttribute("formaction") || u.getAttribute("action");
943
+ if (o = d ? T(d, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || se, a = be(e.getAttribute("formenctype")) || be(u.getAttribute("enctype")) || le, s = new FormData(u, e), !cn()) {
944
+ let {
945
+ name: l,
946
+ type: c,
947
+ value: f
948
+ } = e;
949
+ if (c === "image") {
950
+ let p = l ? l + "." : "";
951
+ s.append(p + "x", "0"), s.append(p + "y", "0");
952
+ } else l && s.append(l, f);
953
+ }
954
+ } else {
955
+ if (ve(e))
956
+ throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
957
+ n = se, o = null, a = le, i = e;
958
+ }
959
+ return s && a === "text/plain" && (i = s, s = void 0), {
960
+ action: o,
961
+ method: n.toLowerCase(),
962
+ encType: a,
963
+ formData: s,
964
+ body: i
965
+ };
966
+ }
967
+ const pn = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], hn = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"], mn = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"], vn = "6";
968
+ try {
969
+ window.__reactRouterVersion = vn;
970
+ } catch {
971
+ }
972
+ function En(e, t) {
973
+ return Ce({
974
+ basename: t == null ? void 0 : t.basename,
975
+ future: D({}, t == null ? void 0 : t.future, {
976
+ v7_prependBasename: !0
977
+ }),
978
+ history: nt({
979
+ window: t == null ? void 0 : t.window
980
+ }),
981
+ hydrationData: (t == null ? void 0 : t.hydrationData) || Ct(),
982
+ routes: e,
983
+ mapRouteProperties: me,
984
+ unstable_dataStrategy: t == null ? void 0 : t.unstable_dataStrategy,
985
+ unstable_patchRoutesOnMiss: t == null ? void 0 : t.unstable_patchRoutesOnMiss,
986
+ window: t == null ? void 0 : t.window
987
+ }).initialize();
988
+ }
989
+ function yn(e, t) {
990
+ return Ce({
991
+ basename: t == null ? void 0 : t.basename,
992
+ future: D({}, t == null ? void 0 : t.future, {
993
+ v7_prependBasename: !0
994
+ }),
995
+ history: rt({
996
+ window: t == null ? void 0 : t.window
997
+ }),
998
+ hydrationData: (t == null ? void 0 : t.hydrationData) || Ct(),
999
+ routes: e,
1000
+ mapRouteProperties: me,
1001
+ unstable_dataStrategy: t == null ? void 0 : t.unstable_dataStrategy,
1002
+ unstable_patchRoutesOnMiss: t == null ? void 0 : t.unstable_patchRoutesOnMiss,
1003
+ window: t == null ? void 0 : t.window
1004
+ }).initialize();
1005
+ }
1006
+ function Ct() {
1007
+ var e;
1008
+ let t = (e = window) == null ? void 0 : e.__staticRouterHydrationData;
1009
+ return t && t.errors && (t = D({}, t, {
1010
+ errors: gn(t.errors)
1011
+ })), t;
1012
+ }
1013
+ function gn(e) {
1014
+ if (!e) return null;
1015
+ let t = Object.entries(e), n = {};
1016
+ for (let [o, a] of t)
1017
+ if (a && a.__type === "RouteErrorResponse")
1018
+ n[o] = new ot(a.status, a.statusText, a.data, a.internal === !0);
1019
+ else if (a && a.__type === "Error") {
1020
+ if (a.__subType) {
1021
+ let s = window[a.__subType];
1022
+ if (typeof s == "function")
1023
+ try {
1024
+ let i = new s(a.message);
1025
+ i.stack = "", n[o] = i;
1026
+ } catch {
1027
+ }
1028
+ }
1029
+ if (n[o] == null) {
1030
+ let s = new Error(a.message);
1031
+ s.stack = "", n[o] = s;
1032
+ }
1033
+ } else
1034
+ n[o] = a;
1035
+ return n;
1036
+ }
1037
+ const Ee = /* @__PURE__ */ r.createContext({
1038
+ isTransitioning: !1
1039
+ });
1040
+ process.env.NODE_ENV !== "production" && (Ee.displayName = "ViewTransition");
1041
+ const ye = /* @__PURE__ */ r.createContext(/* @__PURE__ */ new Map());
1042
+ process.env.NODE_ENV !== "production" && (ye.displayName = "Fetchers");
1043
+ const bn = "startTransition", A = r[bn], Rn = "flushSync", Ye = At[Rn], Nn = "useId", $e = r[Nn];
1044
+ function _n(e) {
1045
+ A ? A(e) : e();
1046
+ }
1047
+ function q(e) {
1048
+ Ye ? Ye(e) : e();
1049
+ }
1050
+ class wn {
1051
+ constructor() {
1052
+ this.status = "pending", this.promise = new Promise((t, n) => {
1053
+ this.resolve = (o) => {
1054
+ this.status === "pending" && (this.status = "resolved", t(o));
1055
+ }, this.reject = (o) => {
1056
+ this.status === "pending" && (this.status = "rejected", n(o));
1057
+ };
1058
+ });
1059
+ }
1060
+ }
1061
+ function Sn(e) {
1062
+ let {
1063
+ fallbackElement: t,
1064
+ router: n,
1065
+ future: o
1066
+ } = e, [a, s] = r.useState(n.state), [i, u] = r.useState(), [d, l] = r.useState({
1067
+ isTransitioning: !1
1068
+ }), [c, f] = r.useState(), [p, v] = r.useState(), [g, b] = r.useState(), y = r.useRef(/* @__PURE__ */ new Map()), {
1069
+ v7_startTransition: _
1070
+ } = o || {}, h = r.useCallback((N) => {
1071
+ _ ? _n(N) : N();
1072
+ }, [_]), E = r.useCallback((N, F) => {
1073
+ let {
1074
+ deletedFetchers: x,
1075
+ unstable_flushSync: oe,
1076
+ unstable_viewTransitionOpts: K
1077
+ } = F;
1078
+ x.forEach((z) => y.current.delete(z)), N.fetchers.forEach((z, It) => {
1079
+ z.data !== void 0 && y.current.set(It, z.data);
1080
+ });
1081
+ let kt = n.window == null || n.window.document == null || typeof n.window.document.startViewTransition != "function";
1082
+ if (!K || kt) {
1083
+ oe ? q(() => s(N)) : h(() => s(N));
1084
+ return;
1085
+ }
1086
+ if (oe) {
1087
+ q(() => {
1088
+ p && (c && c.resolve(), p.skipTransition()), l({
1089
+ isTransitioning: !0,
1090
+ flushSync: !0,
1091
+ currentLocation: K.currentLocation,
1092
+ nextLocation: K.nextLocation
1093
+ });
1094
+ });
1095
+ let z = n.window.document.startViewTransition(() => {
1096
+ q(() => s(N));
1097
+ });
1098
+ z.finished.finally(() => {
1099
+ q(() => {
1100
+ f(void 0), v(void 0), u(void 0), l({
1101
+ isTransitioning: !1
1102
+ });
1103
+ });
1104
+ }), q(() => v(z));
1105
+ return;
1106
+ }
1107
+ p ? (c && c.resolve(), p.skipTransition(), b({
1108
+ state: N,
1109
+ currentLocation: K.currentLocation,
1110
+ nextLocation: K.nextLocation
1111
+ })) : (u(N), l({
1112
+ isTransitioning: !0,
1113
+ flushSync: !1,
1114
+ currentLocation: K.currentLocation,
1115
+ nextLocation: K.nextLocation
1116
+ }));
1117
+ }, [n.window, p, c, y, h]);
1118
+ r.useLayoutEffect(() => n.subscribe(E), [n, E]), r.useEffect(() => {
1119
+ d.isTransitioning && !d.flushSync && f(new wn());
1120
+ }, [d]), r.useEffect(() => {
1121
+ if (c && i && n.window) {
1122
+ let N = i, F = c.promise, x = n.window.document.startViewTransition(async () => {
1123
+ h(() => s(N)), await F;
1124
+ });
1125
+ x.finished.finally(() => {
1126
+ f(void 0), v(void 0), u(void 0), l({
1127
+ isTransitioning: !1
1128
+ });
1129
+ }), v(x);
1130
+ }
1131
+ }, [h, i, c, n.window]), r.useEffect(() => {
1132
+ c && i && a.location.key === i.location.key && c.resolve();
1133
+ }, [c, p, a.location, i]), r.useEffect(() => {
1134
+ !d.isTransitioning && g && (u(g.state), l({
1135
+ isTransitioning: !0,
1136
+ flushSync: !1,
1137
+ currentLocation: g.currentLocation,
1138
+ nextLocation: g.nextLocation
1139
+ }), b(void 0));
1140
+ }, [d.isTransitioning, g]), r.useEffect(() => {
1141
+ process.env.NODE_ENV !== "production" && w(t == null || !n.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead");
1142
+ }, []);
1143
+ let R = r.useMemo(() => ({
1144
+ createHref: n.createHref,
1145
+ encodeLocation: n.encodeLocation,
1146
+ go: (N) => n.navigate(N),
1147
+ push: (N, F, x) => n.navigate(N, {
1148
+ state: F,
1149
+ preventScrollReset: x == null ? void 0 : x.preventScrollReset
1150
+ }),
1151
+ replace: (N, F, x) => n.navigate(N, {
1152
+ replace: !0,
1153
+ state: F,
1154
+ preventScrollReset: x == null ? void 0 : x.preventScrollReset
1155
+ })
1156
+ }), [n]), k = n.basename || "/", J = r.useMemo(() => ({
1157
+ router: n,
1158
+ navigator: R,
1159
+ static: !1,
1160
+ basename: k
1161
+ }), [n, R, k]), re = r.useMemo(() => ({
1162
+ v7_relativeSplatPath: n.future.v7_relativeSplatPath
1163
+ }), [n.future.v7_relativeSplatPath]);
1164
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(U.Provider, {
1165
+ value: J
1166
+ }, /* @__PURE__ */ r.createElement(M.Provider, {
1167
+ value: a
1168
+ }, /* @__PURE__ */ r.createElement(ye.Provider, {
1169
+ value: y.current
1170
+ }, /* @__PURE__ */ r.createElement(Ee.Provider, {
1171
+ value: d
1172
+ }, /* @__PURE__ */ r.createElement(H, {
1173
+ basename: k,
1174
+ location: a.location,
1175
+ navigationType: a.historyAction,
1176
+ navigator: R,
1177
+ future: re
1178
+ }, a.initialized || n.future.v7_partialHydration ? /* @__PURE__ */ r.createElement(Cn, {
1179
+ routes: n.routes,
1180
+ future: n.future,
1181
+ state: a
1182
+ }) : t))))), null);
1183
+ }
1184
+ const Cn = /* @__PURE__ */ r.memo(xn);
1185
+ function xn(e) {
1186
+ let {
1187
+ routes: t,
1188
+ future: n,
1189
+ state: o
1190
+ } = e;
1191
+ return pe(t, void 0, o, n);
1192
+ }
1193
+ function Dn(e) {
1194
+ let {
1195
+ basename: t,
1196
+ children: n,
1197
+ future: o,
1198
+ window: a
1199
+ } = e, s = r.useRef();
1200
+ s.current == null && (s.current = nt({
1201
+ window: a,
1202
+ v5Compat: !0
1203
+ }));
1204
+ let i = s.current, [u, d] = r.useState({
1205
+ action: i.action,
1206
+ location: i.location
1207
+ }), {
1208
+ v7_startTransition: l
1209
+ } = o || {}, c = r.useCallback((f) => {
1210
+ l && A ? A(() => d(f)) : d(f);
1211
+ }, [d, l]);
1212
+ return r.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ r.createElement(H, {
1213
+ basename: t,
1214
+ children: n,
1215
+ location: u.location,
1216
+ navigationType: u.action,
1217
+ navigator: i,
1218
+ future: o
1219
+ });
1220
+ }
1221
+ function On(e) {
1222
+ let {
1223
+ basename: t,
1224
+ children: n,
1225
+ future: o,
1226
+ window: a
1227
+ } = e, s = r.useRef();
1228
+ s.current == null && (s.current = rt({
1229
+ window: a,
1230
+ v5Compat: !0
1231
+ }));
1232
+ let i = s.current, [u, d] = r.useState({
1233
+ action: i.action,
1234
+ location: i.location
1235
+ }), {
1236
+ v7_startTransition: l
1237
+ } = o || {}, c = r.useCallback((f) => {
1238
+ l && A ? A(() => d(f)) : d(f);
1239
+ }, [d, l]);
1240
+ return r.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ r.createElement(H, {
1241
+ basename: t,
1242
+ children: n,
1243
+ location: u.location,
1244
+ navigationType: u.action,
1245
+ navigator: i,
1246
+ future: o
1247
+ });
1248
+ }
1249
+ function xt(e) {
1250
+ let {
1251
+ basename: t,
1252
+ children: n,
1253
+ future: o,
1254
+ history: a
1255
+ } = e, [s, i] = r.useState({
1256
+ action: a.action,
1257
+ location: a.location
1258
+ }), {
1259
+ v7_startTransition: u
1260
+ } = o || {}, d = r.useCallback((l) => {
1261
+ u && A ? A(() => i(l)) : i(l);
1262
+ }, [i, u]);
1263
+ return r.useLayoutEffect(() => a.listen(d), [a, d]), /* @__PURE__ */ r.createElement(H, {
1264
+ basename: t,
1265
+ children: n,
1266
+ location: s.location,
1267
+ navigationType: s.action,
1268
+ navigator: a,
1269
+ future: o
1270
+ });
1271
+ }
1272
+ process.env.NODE_ENV !== "production" && (xt.displayName = "unstable_HistoryRouter");
1273
+ const Pn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Ln = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, je = /* @__PURE__ */ r.forwardRef(function(t, n) {
1274
+ let {
1275
+ onClick: o,
1276
+ relative: a,
1277
+ reloadDocument: s,
1278
+ replace: i,
1279
+ state: u,
1280
+ target: d,
1281
+ to: l,
1282
+ preventScrollReset: c,
1283
+ unstable_viewTransition: f
1284
+ } = t, p = Be(t, pn), {
1285
+ basename: v
1286
+ } = r.useContext(S), g, b = !1;
1287
+ if (typeof l == "string" && Ln.test(l) && (g = l, Pn))
1288
+ try {
1289
+ let E = new URL(window.location.href), R = l.startsWith("//") ? new URL(E.protocol + l) : new URL(l), k = T(R.pathname, v);
1290
+ R.origin === E.origin && k != null ? l = k + R.search + R.hash : b = !0;
1291
+ } catch {
1292
+ process.env.NODE_ENV !== "production" && w(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
1293
+ }
1294
+ let y = De(l, {
1295
+ relative: a
1296
+ }), _ = Lt(l, {
1297
+ replace: i,
1298
+ state: u,
1299
+ target: d,
1300
+ preventScrollReset: c,
1301
+ relative: a,
1302
+ unstable_viewTransition: f
1303
+ });
1304
+ function h(E) {
1305
+ o && o(E), E.defaultPrevented || _(E);
1306
+ }
1307
+ return (
1308
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1309
+ /* @__PURE__ */ r.createElement("a", D({}, p, {
1310
+ href: g || y,
1311
+ onClick: b || s ? o : h,
1312
+ ref: n,
1313
+ target: d
1314
+ }))
1315
+ );
1316
+ });
1317
+ process.env.NODE_ENV !== "production" && (je.displayName = "Link");
1318
+ const Dt = /* @__PURE__ */ r.forwardRef(function(t, n) {
1319
+ let {
1320
+ "aria-current": o = "page",
1321
+ caseSensitive: a = !1,
1322
+ className: s = "",
1323
+ end: i = !1,
1324
+ style: u,
1325
+ to: d,
1326
+ unstable_viewTransition: l,
1327
+ children: c
1328
+ } = t, f = Be(t, hn), p = Y(d, {
1329
+ relative: f.relative
1330
+ }), v = L(), g = r.useContext(M), {
1331
+ navigator: b,
1332
+ basename: y
1333
+ } = r.useContext(S), _ = g != null && // Conditional usage is OK here because the usage of a data router is static
1334
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1335
+ Vt(p) && l === !0, h = b.encodeLocation ? b.encodeLocation(p).pathname : p.pathname, E = v.pathname, R = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
1336
+ a || (E = E.toLowerCase(), R = R ? R.toLowerCase() : null, h = h.toLowerCase()), R && y && (R = T(R, y) || R);
1337
+ const k = h !== "/" && h.endsWith("/") ? h.length - 1 : h.length;
1338
+ let J = E === h || !i && E.startsWith(h) && E.charAt(k) === "/", re = R != null && (R === h || !i && R.startsWith(h) && R.charAt(h.length) === "/"), N = {
1339
+ isActive: J,
1340
+ isPending: re,
1341
+ isTransitioning: _
1342
+ }, F = J ? o : void 0, x;
1343
+ typeof s == "function" ? x = s(N) : x = [s, J ? "active" : null, re ? "pending" : null, _ ? "transitioning" : null].filter(Boolean).join(" ");
1344
+ let oe = typeof u == "function" ? u(N) : u;
1345
+ return /* @__PURE__ */ r.createElement(je, D({}, f, {
1346
+ "aria-current": F,
1347
+ className: x,
1348
+ ref: n,
1349
+ style: oe,
1350
+ to: d,
1351
+ unstable_viewTransition: l
1352
+ }), typeof c == "function" ? c(N) : c);
1353
+ });
1354
+ process.env.NODE_ENV !== "production" && (Dt.displayName = "NavLink");
1355
+ const He = /* @__PURE__ */ r.forwardRef((e, t) => {
1356
+ let {
1357
+ fetcherKey: n,
1358
+ navigate: o,
1359
+ reloadDocument: a,
1360
+ replace: s,
1361
+ state: i,
1362
+ method: u = se,
1363
+ action: d,
1364
+ onSubmit: l,
1365
+ relative: c,
1366
+ preventScrollReset: f,
1367
+ unstable_viewTransition: p
1368
+ } = e, v = Be(e, mn), g = ze(), b = Ft(d, {
1369
+ relative: c
1370
+ }), y = u.toLowerCase() === "get" ? "get" : "post", _ = (h) => {
1371
+ if (l && l(h), h.defaultPrevented) return;
1372
+ h.preventDefault();
1373
+ let E = h.nativeEvent.submitter, R = (E == null ? void 0 : E.getAttribute("formmethod")) || u;
1374
+ g(E || h.currentTarget, {
1375
+ fetcherKey: n,
1376
+ method: R,
1377
+ navigate: o,
1378
+ replace: s,
1379
+ state: i,
1380
+ relative: c,
1381
+ preventScrollReset: f,
1382
+ unstable_viewTransition: p
1383
+ });
1384
+ };
1385
+ return /* @__PURE__ */ r.createElement("form", D({
1386
+ ref: t,
1387
+ method: y,
1388
+ action: b,
1389
+ onSubmit: a ? l : _
1390
+ }, v));
1391
+ });
1392
+ process.env.NODE_ENV !== "production" && (He.displayName = "Form");
1393
+ function Ot(e) {
1394
+ let {
1395
+ getKey: t,
1396
+ storageKey: n
1397
+ } = e;
1398
+ return Ut({
1399
+ getKey: t,
1400
+ storageKey: n
1401
+ }), null;
1402
+ }
1403
+ process.env.NODE_ENV !== "production" && (Ot.displayName = "ScrollRestoration");
1404
+ var $;
1405
+ (function(e) {
1406
+ e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
1407
+ })($ || ($ = {}));
1408
+ var ee;
1409
+ (function(e) {
1410
+ e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
1411
+ })(ee || (ee = {}));
1412
+ function Pt(e) {
1413
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
1414
+ }
1415
+ function ge(e) {
1416
+ let t = r.useContext(U);
1417
+ return t || (process.env.NODE_ENV !== "production" ? m(!1, Pt(e)) : m(!1)), t;
1418
+ }
1419
+ function Ke(e) {
1420
+ let t = r.useContext(M);
1421
+ return t || (process.env.NODE_ENV !== "production" ? m(!1, Pt(e)) : m(!1)), t;
1422
+ }
1423
+ function Lt(e, t) {
1424
+ let {
1425
+ target: n,
1426
+ replace: o,
1427
+ state: a,
1428
+ preventScrollReset: s,
1429
+ relative: i,
1430
+ unstable_viewTransition: u
1431
+ } = t === void 0 ? {} : t, d = te(), l = L(), c = Y(e, {
1432
+ relative: i
1433
+ });
1434
+ return r.useCallback((f) => {
1435
+ if (ln(f, n)) {
1436
+ f.preventDefault();
1437
+ let p = o !== void 0 ? o : Q(l) === Q(c);
1438
+ d(e, {
1439
+ replace: p,
1440
+ state: a,
1441
+ preventScrollReset: s,
1442
+ relative: i,
1443
+ unstable_viewTransition: u
1444
+ });
1445
+ }
1446
+ }, [l, d, c, o, a, n, e, s, i, u]);
1447
+ }
1448
+ function Tn(e) {
1449
+ process.env.NODE_ENV !== "production" && w(typeof URLSearchParams < "u", "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");
1450
+ let t = r.useRef(ce(e)), n = r.useRef(!1), o = L(), a = r.useMemo(() => (
1451
+ // Only merge in the defaults if we haven't yet called setSearchParams.
1452
+ // Once we call that we want those to take precedence, otherwise you can't
1453
+ // remove a param with setSearchParams({}) if it has an initial value
1454
+ un(o.search, n.current ? null : t.current)
1455
+ ), [o.search]), s = te(), i = r.useCallback((u, d) => {
1456
+ const l = ce(typeof u == "function" ? u(a) : u);
1457
+ n.current = !0, s("?" + l, d);
1458
+ }, [s, a]);
1459
+ return [a, i];
1460
+ }
1461
+ function Fn() {
1462
+ if (typeof document > "u")
1463
+ throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
1464
+ }
1465
+ let Un = 0, Tt = () => "__" + String(++Un) + "__";
1466
+ function ze() {
1467
+ let {
1468
+ router: e
1469
+ } = ge($.UseSubmit), {
1470
+ basename: t
1471
+ } = r.useContext(S), n = Fe();
1472
+ return r.useCallback(function(o, a) {
1473
+ a === void 0 && (a = {}), Fn();
1474
+ let {
1475
+ action: s,
1476
+ method: i,
1477
+ encType: u,
1478
+ formData: d,
1479
+ body: l
1480
+ } = fn(o, t);
1481
+ if (a.navigate === !1) {
1482
+ let c = a.fetcherKey || Tt();
1483
+ e.fetch(c, n, a.action || s, {
1484
+ preventScrollReset: a.preventScrollReset,
1485
+ formData: d,
1486
+ body: l,
1487
+ formMethod: a.method || i,
1488
+ formEncType: a.encType || u,
1489
+ unstable_flushSync: a.unstable_flushSync
1490
+ });
1491
+ } else
1492
+ e.navigate(a.action || s, {
1493
+ preventScrollReset: a.preventScrollReset,
1494
+ formData: d,
1495
+ body: l,
1496
+ formMethod: a.method || i,
1497
+ formEncType: a.encType || u,
1498
+ replace: a.replace,
1499
+ state: a.state,
1500
+ fromRouteId: n,
1501
+ unstable_flushSync: a.unstable_flushSync,
1502
+ unstable_viewTransition: a.unstable_viewTransition
1503
+ });
1504
+ }, [e, t, n]);
1505
+ }
1506
+ function Ft(e, t) {
1507
+ let {
1508
+ relative: n
1509
+ } = t === void 0 ? {} : t, {
1510
+ basename: o
1511
+ } = r.useContext(S), a = r.useContext(C);
1512
+ a || (process.env.NODE_ENV !== "production" ? m(!1, "useFormAction must be used inside a RouteContext") : m(!1));
1513
+ let [s] = a.matches.slice(-1), i = D({}, Y(e || ".", {
1514
+ relative: n
1515
+ })), u = L();
1516
+ if (e == null) {
1517
+ i.search = u.search;
1518
+ let d = new URLSearchParams(i.search);
1519
+ d.has("index") && d.get("index") === "" && (d.delete("index"), i.search = d.toString() ? "?" + d.toString() : "");
1520
+ }
1521
+ return (!e || e === ".") && s.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), o !== "/" && (i.pathname = i.pathname === "/" ? o : G([o, i.pathname])), Q(i);
1522
+ }
1523
+ function Vn(e) {
1524
+ var t;
1525
+ let {
1526
+ key: n
1527
+ } = e === void 0 ? {} : e, {
1528
+ router: o
1529
+ } = ge($.UseFetcher), a = Ke(ee.UseFetcher), s = r.useContext(ye), i = r.useContext(C), u = (t = i.matches[i.matches.length - 1]) == null ? void 0 : t.route.id;
1530
+ s || (process.env.NODE_ENV !== "production" ? m(!1, "useFetcher must be used inside a FetchersContext") : m(!1)), i || (process.env.NODE_ENV !== "production" ? m(!1, "useFetcher must be used inside a RouteContext") : m(!1)), u == null && (process.env.NODE_ENV !== "production" ? m(!1, 'useFetcher can only be used on routes that contain a unique "id"') : m(!1));
1531
+ let d = $e ? $e() : "", [l, c] = r.useState(n || d);
1532
+ n && n !== l ? c(n) : l || c(Tt()), r.useEffect(() => (o.getFetcher(l), () => {
1533
+ o.deleteFetcher(l);
1534
+ }), [o, l]);
1535
+ let f = r.useCallback((h, E) => {
1536
+ u || (process.env.NODE_ENV !== "production" ? m(!1, "No routeId available for fetcher.load()") : m(!1)), o.fetch(l, u, h, E);
1537
+ }, [l, u, o]), p = ze(), v = r.useCallback((h, E) => {
1538
+ p(h, D({}, E, {
1539
+ navigate: !1,
1540
+ fetcherKey: l
1541
+ }));
1542
+ }, [l, p]), g = r.useMemo(() => {
1543
+ let h = /* @__PURE__ */ r.forwardRef((E, R) => /* @__PURE__ */ r.createElement(He, D({}, E, {
1544
+ navigate: !1,
1545
+ fetcherKey: l,
1546
+ ref: R
1547
+ })));
1548
+ return process.env.NODE_ENV !== "production" && (h.displayName = "fetcher.Form"), h;
1549
+ }, [l]), b = a.fetchers.get(l) || Ht, y = s.get(l);
1550
+ return r.useMemo(() => D({
1551
+ Form: g,
1552
+ submit: v,
1553
+ load: f
1554
+ }, b, {
1555
+ data: y
1556
+ }), [g, v, f, b, y]);
1557
+ }
1558
+ function kn() {
1559
+ let e = Ke(ee.UseFetchers);
1560
+ return Array.from(e.fetchers.entries()).map((t) => {
1561
+ let [n, o] = t;
1562
+ return D({}, o, {
1563
+ key: n
1564
+ });
1565
+ });
1566
+ }
1567
+ const Je = "react-router-scroll-positions";
1568
+ let ie = {};
1569
+ function Ut(e) {
1570
+ let {
1571
+ getKey: t,
1572
+ storageKey: n
1573
+ } = e === void 0 ? {} : e, {
1574
+ router: o
1575
+ } = ge($.UseScrollRestoration), {
1576
+ restoreScrollPosition: a,
1577
+ preventScrollReset: s
1578
+ } = Ke(ee.UseScrollRestoration), {
1579
+ basename: i
1580
+ } = r.useContext(S), u = L(), d = Ve(), l = Ue();
1581
+ r.useEffect(() => (window.history.scrollRestoration = "manual", () => {
1582
+ window.history.scrollRestoration = "auto";
1583
+ }), []), An(r.useCallback(() => {
1584
+ if (l.state === "idle") {
1585
+ let c = (t ? t(u, d) : null) || u.key;
1586
+ ie[c] = window.scrollY;
1587
+ }
1588
+ try {
1589
+ sessionStorage.setItem(n || Je, JSON.stringify(ie));
1590
+ } catch (c) {
1591
+ process.env.NODE_ENV !== "production" && w(!1, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + c + ").");
1592
+ }
1593
+ window.history.scrollRestoration = "auto";
1594
+ }, [n, t, l.state, u, d])), typeof document < "u" && (r.useLayoutEffect(() => {
1595
+ try {
1596
+ let c = sessionStorage.getItem(n || Je);
1597
+ c && (ie = JSON.parse(c));
1598
+ } catch {
1599
+ }
1600
+ }, [n]), r.useLayoutEffect(() => {
1601
+ let c = t && i !== "/" ? (p, v) => t(
1602
+ // Strip the basename to match useLocation()
1603
+ D({}, p, {
1604
+ pathname: T(p.pathname, i) || p.pathname
1605
+ }),
1606
+ v
1607
+ ) : t, f = o == null ? void 0 : o.enableScrollRestoration(ie, () => window.scrollY, c);
1608
+ return () => f && f();
1609
+ }, [o, i, t]), r.useLayoutEffect(() => {
1610
+ if (a !== !1) {
1611
+ if (typeof a == "number") {
1612
+ window.scrollTo(0, a);
1613
+ return;
1614
+ }
1615
+ if (u.hash) {
1616
+ let c = document.getElementById(decodeURIComponent(u.hash.slice(1)));
1617
+ if (c) {
1618
+ c.scrollIntoView();
1619
+ return;
1620
+ }
1621
+ }
1622
+ s !== !0 && window.scrollTo(0, 0);
1623
+ }
1624
+ }, [u, a, s]));
1625
+ }
1626
+ function In(e, t) {
1627
+ let {
1628
+ capture: n
1629
+ } = t || {};
1630
+ r.useEffect(() => {
1631
+ let o = n != null ? {
1632
+ capture: n
1633
+ } : void 0;
1634
+ return window.addEventListener("beforeunload", e, o), () => {
1635
+ window.removeEventListener("beforeunload", e, o);
1636
+ };
1637
+ }, [e, n]);
1638
+ }
1639
+ function An(e, t) {
1640
+ let {
1641
+ capture: n
1642
+ } = {};
1643
+ r.useEffect(() => {
1644
+ let o = n != null ? {
1645
+ capture: n
1646
+ } : void 0;
1647
+ return window.addEventListener("pagehide", e, o), () => {
1648
+ window.removeEventListener("pagehide", e, o);
1649
+ };
1650
+ }, [e, n]);
1651
+ }
1652
+ function Mn(e) {
1653
+ let {
1654
+ when: t,
1655
+ message: n
1656
+ } = e, o = Ae(t);
1657
+ r.useEffect(() => {
1658
+ o.state === "blocked" && (window.confirm(n) ? setTimeout(o.proceed, 0) : o.reset());
1659
+ }, [o, n]), r.useEffect(() => {
1660
+ o.state === "blocked" && !t && o.reset();
1661
+ }, [o, t]);
1662
+ }
1663
+ function Vt(e, t) {
1664
+ t === void 0 && (t = {});
1665
+ let n = r.useContext(Ee);
1666
+ n == null && (process.env.NODE_ENV !== "production" ? m(!1, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : m(!1));
1667
+ let {
1668
+ basename: o
1669
+ } = ge($.useViewTransitionState), a = Y(e, {
1670
+ relative: t.relative
1671
+ });
1672
+ if (!n.isTransitioning)
1673
+ return !1;
1674
+ let s = T(n.currentLocation.pathname, o) || n.currentLocation.pathname, i = T(n.nextLocation.pathname, o) || n.nextLocation.pathname;
1675
+ return X(a.pathname, i) != null || X(a.pathname, s) != null;
1676
+ }
1677
+ const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1678
+ __proto__: null,
1679
+ AbortedDeferredError: Se,
1680
+ Await: _t,
1681
+ BrowserRouter: Dn,
1682
+ Form: He,
1683
+ HashRouter: On,
1684
+ Link: je,
1685
+ MemoryRouter: gt,
1686
+ NavLink: Dt,
1687
+ Navigate: bt,
1688
+ get NavigationType() {
1689
+ return de;
1690
+ },
1691
+ Outlet: Rt,
1692
+ Route: Me,
1693
+ Router: H,
1694
+ RouterProvider: Sn,
1695
+ Routes: Nt,
1696
+ ScrollRestoration: Ot,
1697
+ UNSAFE_DataRouterContext: U,
1698
+ UNSAFE_DataRouterStateContext: M,
1699
+ UNSAFE_ErrorResponseImpl: ot,
1700
+ UNSAFE_FetchersContext: ye,
1701
+ UNSAFE_LocationContext: B,
1702
+ UNSAFE_NavigationContext: S,
1703
+ UNSAFE_RouteContext: C,
1704
+ UNSAFE_ViewTransitionContext: Ee,
1705
+ UNSAFE_useRouteId: Fe,
1706
+ UNSAFE_useScrollRestoration: Ut,
1707
+ createBrowserRouter: En,
1708
+ createHashRouter: yn,
1709
+ createMemoryRouter: St,
1710
+ createPath: Q,
1711
+ createRoutesFromChildren: W,
1712
+ createRoutesFromElements: W,
1713
+ createSearchParams: ce,
1714
+ defer: Ge,
1715
+ generatePath: Xe,
1716
+ isRouteErrorResponse: we,
1717
+ json: Qe,
1718
+ matchPath: X,
1719
+ matchRoutes: _e,
1720
+ parsePath: fe,
1721
+ redirect: Ze,
1722
+ redirectDocument: et,
1723
+ renderMatches: wt,
1724
+ resolvePath: tt,
1725
+ unstable_HistoryRouter: xt,
1726
+ unstable_usePrompt: Mn,
1727
+ unstable_useViewTransitionState: Vt,
1728
+ useActionData: vt,
1729
+ useAsyncError: Et,
1730
+ useAsyncValue: Ie,
1731
+ useBeforeUnload: In,
1732
+ useBlocker: Ae,
1733
+ useFetcher: Vn,
1734
+ useFetchers: kn,
1735
+ useFormAction: Ft,
1736
+ useHref: De,
1737
+ useInRouterContext: V,
1738
+ useLinkClickHandler: Lt,
1739
+ useLoaderData: ht,
1740
+ useLocation: L,
1741
+ useMatch: it,
1742
+ useMatches: Ve,
1743
+ useNavigate: te,
1744
+ useNavigation: Ue,
1745
+ useNavigationType: at,
1746
+ useOutlet: Oe,
1747
+ useOutletContext: ct,
1748
+ useParams: dt,
1749
+ useResolvedPath: Y,
1750
+ useRevalidator: pt,
1751
+ useRouteError: ke,
1752
+ useRouteLoaderData: mt,
1753
+ useRoutes: Pe,
1754
+ useSearchParams: Tn,
1755
+ useSubmit: ze
1756
+ }, Symbol.toStringTag, { value: "Module" }));
1757
+ export {
1758
+ je as L,
1759
+ Dt as N,
1760
+ Rt as O,
1761
+ Sn as R,
1762
+ Hn as a,
1763
+ te as b,
1764
+ Ue as c,
1765
+ jn as d,
1766
+ Tn as e,
1767
+ dt as f,
1768
+ ke as g,
1769
+ L as u
1770
+ };
1771
+ //# sourceMappingURL=index-7kcHaXD6.js.map