zudoku 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/dist/app/demo.js +1 -1
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.client.js +1 -15
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +1 -2
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -1
  8. package/dist/app/sentry.js +1 -1
  9. package/dist/app/sentry.js.map +1 -1
  10. package/dist/app/standalone.js +1 -1
  11. package/dist/app/standalone.js.map +1 -1
  12. package/dist/cli/cmds/build.js +1 -0
  13. package/dist/cli/cmds/build.js.map +1 -1
  14. package/dist/config/validators/common.d.ts +104 -104
  15. package/dist/config/validators/icon-types.d.ts +1 -1
  16. package/dist/config/validators/validate.d.ts +90 -90
  17. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  18. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  19. package/dist/lib/authentication/components/SignIn.js +1 -1
  20. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  21. package/dist/lib/authentication/components/SignOut.js +1 -1
  22. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  23. package/dist/lib/components/AnchorLink.d.ts +1 -1
  24. package/dist/lib/components/AnchorLink.js +1 -1
  25. package/dist/lib/components/AnchorLink.js.map +1 -1
  26. package/dist/lib/components/Bootstrap.d.ts +1 -2
  27. package/dist/lib/components/Bootstrap.js +3 -3
  28. package/dist/lib/components/Bootstrap.js.map +1 -1
  29. package/dist/lib/components/Header.js +1 -1
  30. package/dist/lib/components/Header.js.map +1 -1
  31. package/dist/lib/components/Layout.js +1 -1
  32. package/dist/lib/components/Layout.js.map +1 -1
  33. package/dist/lib/components/NotFoundPage.js +1 -1
  34. package/dist/lib/components/NotFoundPage.js.map +1 -1
  35. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  36. package/dist/lib/components/TopNavigation.js +1 -1
  37. package/dist/lib/components/TopNavigation.js.map +1 -1
  38. package/dist/lib/components/Zudoku.js +1 -1
  39. package/dist/lib/components/Zudoku.js.map +1 -1
  40. package/dist/lib/components/context/ZudokuContext.js +1 -1
  41. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  42. package/dist/lib/components/index.d.ts +4 -4
  43. package/dist/lib/components/index.js +1 -1
  44. package/dist/lib/components/index.js.map +1 -1
  45. package/dist/lib/components/navigation/SidebarCategory.js +1 -1
  46. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  47. package/dist/lib/components/navigation/SidebarItem.js +1 -1
  48. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  49. package/dist/lib/components/navigation/utils.js +1 -1
  50. package/dist/lib/components/navigation/utils.js.map +1 -1
  51. package/dist/lib/core/plugins.d.ts +3 -5
  52. package/dist/lib/core/plugins.js.map +1 -1
  53. package/dist/lib/errors/RouterError.js +1 -1
  54. package/dist/lib/errors/RouterError.js.map +1 -1
  55. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  56. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  57. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  58. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  59. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  60. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  61. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  62. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  63. package/dist/lib/plugins/markdown/index.d.ts +1 -0
  64. package/dist/lib/plugins/markdown/index.js.map +1 -1
  65. package/dist/lib/plugins/openapi/Route.js +1 -1
  66. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  67. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  68. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  69. package/dist/lib/plugins/openapi/index.js +1 -1
  70. package/dist/lib/plugins/openapi/index.js.map +1 -1
  71. package/dist/lib/plugins/redirect/index.js +1 -1
  72. package/dist/lib/plugins/redirect/index.js.map +1 -1
  73. package/dist/lib/util/MdxComponents.d.ts +16 -16
  74. package/dist/lib/util/MdxComponents.js +1 -3
  75. package/dist/lib/util/MdxComponents.js.map +1 -1
  76. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  77. package/dist/lib/util/useExposedProps.js +1 -1
  78. package/dist/lib/util/useExposedProps.js.map +1 -1
  79. package/dist/lib/util/useOnScreen.d.ts +1 -1
  80. package/dist/lib/util/useScrollToAnchor.js +1 -1
  81. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  82. package/dist/lib/util/useScrollToTop.js +1 -1
  83. package/dist/lib/util/useScrollToTop.js.map +1 -1
  84. package/dist/vite/config.js +15 -8
  85. package/dist/vite/config.js.map +1 -1
  86. package/dist/vite/css/collect.d.ts +2 -0
  87. package/dist/vite/css/collect.js +27 -0
  88. package/dist/vite/css/collect.js.map +1 -0
  89. package/dist/vite/css/plugin.d.ts +5 -0
  90. package/dist/vite/css/plugin.js +79 -0
  91. package/dist/vite/css/plugin.js.map +1 -0
  92. package/dist/vite/dev-server.js +7 -3
  93. package/dist/vite/dev-server.js.map +1 -1
  94. package/dist/vite/plugin-mdx.js +2 -0
  95. package/dist/vite/plugin-mdx.js.map +1 -1
  96. package/dist/vite/plugin.js +4 -0
  97. package/dist/vite/plugin.js.map +1 -1
  98. package/lib/{AnchorLink-BR0MvI7n.js → AnchorLink-DFZZbmvr.js} +13 -14
  99. package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
  100. package/lib/{AuthenticationPlugin-D0Em0SwR.js → AuthenticationPlugin-DQy635W9.js} +15 -16
  101. package/lib/AuthenticationPlugin-DQy635W9.js.map +1 -0
  102. package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
  103. package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
  104. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
  105. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
  106. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  107. package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
  108. package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
  109. package/lib/{Markdown-CRsmPPfY.js → Markdown-CZDLNOFc.js} +3080 -3058
  110. package/lib/{Markdown-CRsmPPfY.js.map → Markdown-CZDLNOFc.js.map} +1 -1
  111. package/lib/{MdxPage-Wp8QU0-q.js → MdxPage-CBa4X6L5.js} +9 -9
  112. package/lib/MdxPage-CBa4X6L5.js.map +1 -0
  113. package/lib/OperationList-Bj-6EKhp.js +4889 -0
  114. package/lib/{OperationList-u8xHU9-b.js.map → OperationList-Bj-6EKhp.js.map} +1 -1
  115. package/lib/Route-C9cYcP-j.js +11 -0
  116. package/lib/Route-C9cYcP-j.js.map +1 -0
  117. package/lib/{Select-O9ZM3ZgX.js → Select-Bb_Hqc70.js} +5 -5
  118. package/lib/{Select-O9ZM3ZgX.js.map → Select-Bb_Hqc70.js.map} +1 -1
  119. package/lib/{SidebarBadge-DxFJcJ6V.js → SidebarBadge-Bm793GDY.js} +3 -3
  120. package/lib/{SidebarBadge-DxFJcJ6V.js.map → SidebarBadge-Bm793GDY.js.map} +1 -1
  121. package/lib/SlotletProvider-pfc9oejW.js +221 -0
  122. package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
  123. package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
  124. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
  125. package/lib/{SyntaxHighlight-C31iouiO.js → SyntaxHighlight-Bz-lOJtH.js} +8 -10
  126. package/lib/{SyntaxHighlight-C31iouiO.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
  127. package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
  128. package/lib/assets/index-C7jnHK4b.js.map +1 -0
  129. package/lib/assets/{worker-C_2va8B8.js → worker-BmEAZjUP.js} +5249 -4922
  130. package/lib/assets/worker-BmEAZjUP.js.map +1 -0
  131. package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
  132. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
  133. package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
  134. package/lib/cn-qaFjX9_3.js.map +1 -0
  135. package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
  136. package/lib/{context-D1nXWxm7.js.map → context-h_UkBLvr.js.map} +1 -1
  137. package/lib/{createServer-BCAHdrpE.js → createServer-BVFp6Bl3.js} +4521 -4195
  138. package/lib/createServer-BVFp6Bl3.js.map +1 -0
  139. package/lib/{hook-hEqe7fPB.js → hook-DMHiUaIV.js} +3 -3
  140. package/lib/{hook-hEqe7fPB.js.map → hook-DMHiUaIV.js.map} +1 -1
  141. package/lib/{index-CmdLGbbk.js → index-B6rTMjdI.js} +47 -47
  142. package/lib/{index-CmdLGbbk.js.map → index-B6rTMjdI.js.map} +1 -1
  143. package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
  144. package/lib/index-CBXSgjaE.js.map +1 -0
  145. package/lib/index-CPNSgwSb.js +36 -0
  146. package/lib/index-CPNSgwSb.js.map +1 -0
  147. package/lib/index-LNp6rxyU.js.map +1 -1
  148. package/lib/index.esm-BSV1C092.js +692 -0
  149. package/lib/{index.esm-Bm8pj-bc.js.map → index.esm-BSV1C092.js.map} +1 -1
  150. package/lib/index.esm-BnnBRKJX.js +1214 -0
  151. package/lib/index.esm-BnnBRKJX.js.map +1 -0
  152. package/lib/invariant-Caa8-XvF.js.map +1 -1
  153. package/lib/jsx-runtime-Dx-03ztt.js +446 -0
  154. package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
  155. package/lib/object_hash-BNWPnMN9.js +787 -0
  156. package/lib/object_hash-BNWPnMN9.js.map +1 -0
  157. package/lib/post-processors/removeExtensions.js.map +1 -1
  158. package/lib/post-processors/removePaths.js.map +1 -1
  159. package/lib/post-processors/traverse.js.map +1 -1
  160. package/lib/prism-csharp.min-DUwvItt4.js +63 -0
  161. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
  162. package/lib/prism-java.min-BtgBR4yd.js +35 -0
  163. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
  164. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  165. package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
  166. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
  167. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  168. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  169. package/lib/state-CFQsUZUP.js +202 -0
  170. package/lib/state-CFQsUZUP.js.map +1 -0
  171. package/lib/ui/Accordion.js +2 -2
  172. package/lib/ui/Accordion.js.map +1 -1
  173. package/lib/ui/ActionButton.js +4 -4
  174. package/lib/ui/ActionButton.js.map +1 -1
  175. package/lib/ui/Alert.js +3 -3
  176. package/lib/ui/Alert.js.map +1 -1
  177. package/lib/ui/AlertDialog.js +2 -2
  178. package/lib/ui/AlertDialog.js.map +1 -1
  179. package/lib/ui/Badge.js +3 -3
  180. package/lib/ui/Badge.js.map +1 -1
  181. package/lib/ui/Breadcrumb.js +2 -2
  182. package/lib/ui/Breadcrumb.js.map +1 -1
  183. package/lib/ui/Button.js +3 -3
  184. package/lib/ui/Button.js.map +1 -1
  185. package/lib/ui/Callout.js +2 -2
  186. package/lib/ui/Callout.js.map +1 -1
  187. package/lib/ui/Card.js +2 -2
  188. package/lib/ui/Card.js.map +1 -1
  189. package/lib/ui/Carousel.js +407 -401
  190. package/lib/ui/Carousel.js.map +1 -1
  191. package/lib/ui/Checkbox.js +2 -2
  192. package/lib/ui/Checkbox.js.map +1 -1
  193. package/lib/ui/Command.js +111 -108
  194. package/lib/ui/Command.js.map +1 -1
  195. package/lib/ui/Dialog.js +2 -2
  196. package/lib/ui/Dialog.js.map +1 -1
  197. package/lib/ui/Drawer.js +2 -2
  198. package/lib/ui/Drawer.js.map +1 -1
  199. package/lib/ui/DropdownMenu.js +2 -2
  200. package/lib/ui/DropdownMenu.js.map +1 -1
  201. package/lib/ui/Form.js +3 -3
  202. package/lib/ui/Form.js.map +1 -1
  203. package/lib/ui/HoverCard.js +2 -2
  204. package/lib/ui/Input.js +2 -2
  205. package/lib/ui/Input.js.map +1 -1
  206. package/lib/ui/Label.js +3 -3
  207. package/lib/ui/Pagination.js +2 -2
  208. package/lib/ui/Pagination.js.map +1 -1
  209. package/lib/ui/Popover.js +2 -2
  210. package/lib/ui/Popover.js.map +1 -1
  211. package/lib/ui/Progress.js +2 -2
  212. package/lib/ui/Progress.js.map +1 -1
  213. package/lib/ui/RadioGroup.js +2 -2
  214. package/lib/ui/RadioGroup.js.map +1 -1
  215. package/lib/ui/ScrollArea.js +2 -2
  216. package/lib/ui/ScrollArea.js.map +1 -1
  217. package/lib/ui/Select.js +2 -2
  218. package/lib/ui/Select.js.map +1 -1
  219. package/lib/ui/Skeleton.js +2 -2
  220. package/lib/ui/Skeleton.js.map +1 -1
  221. package/lib/ui/Slider.js +2 -2
  222. package/lib/ui/Switch.js +2 -2
  223. package/lib/ui/Switch.js.map +1 -1
  224. package/lib/ui/Tabs.js +2 -2
  225. package/lib/ui/Textarea.js +2 -2
  226. package/lib/ui/Textarea.js.map +1 -1
  227. package/lib/ui/Toggle.js +3 -3
  228. package/lib/ui/Toggle.js.map +1 -1
  229. package/lib/ui/ToggleGroup.js +2 -2
  230. package/lib/ui/ToggleGroup.js.map +1 -1
  231. package/lib/ui/Tooltip.js +2 -2
  232. package/lib/useExposedProps-DE9lR6MF.js +9 -0
  233. package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
  234. package/lib/{utils-DcpDOncX.js → utils-R0j3Raw1.js} +30 -31
  235. package/lib/{utils-DcpDOncX.js.map → utils-R0j3Raw1.js.map} +1 -1
  236. package/lib/zudoku.auth-auth0.js +1 -1
  237. package/lib/zudoku.auth-auth0.js.map +1 -1
  238. package/lib/zudoku.auth-clerk.js +2 -2
  239. package/lib/zudoku.auth-clerk.js.map +1 -1
  240. package/lib/zudoku.auth-openid.js +348 -346
  241. package/lib/zudoku.auth-openid.js.map +1 -1
  242. package/lib/zudoku.components.js +679 -939
  243. package/lib/zudoku.components.js.map +1 -1
  244. package/lib/zudoku.openapi-worker.js +1 -1
  245. package/lib/zudoku.openapi-worker.js.map +1 -1
  246. package/lib/zudoku.plugin-api-catalog.js +3 -3
  247. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  248. package/lib/zudoku.plugin-api-keys.js +15 -16
  249. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  250. package/lib/zudoku.plugin-custom-pages.js +4 -4
  251. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  252. package/lib/zudoku.plugin-markdown.js +2 -2
  253. package/lib/zudoku.plugin-markdown.js.map +1 -1
  254. package/lib/zudoku.plugin-openapi.js +5 -5
  255. package/lib/zudoku.plugin-redirect.js +1 -1
  256. package/lib/zudoku.plugin-redirect.js.map +1 -1
  257. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  258. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  259. package/package.json +35 -35
  260. package/src/app/demo.tsx +1 -1
  261. package/src/app/entry.client.tsx +1 -15
  262. package/src/app/entry.server.tsx +2 -2
  263. package/src/app/main.tsx +1 -1
  264. package/src/app/sentry.ts +1 -1
  265. package/src/app/standalone.tsx +1 -1
  266. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  267. package/src/lib/authentication/components/SignIn.tsx +1 -1
  268. package/src/lib/authentication/components/SignOut.tsx +1 -1
  269. package/src/lib/components/AnchorLink.tsx +1 -1
  270. package/src/lib/components/Bootstrap.tsx +4 -6
  271. package/src/lib/components/Header.tsx +1 -1
  272. package/src/lib/components/Layout.tsx +1 -1
  273. package/src/lib/components/NotFoundPage.tsx +1 -1
  274. package/src/lib/components/SlotletProvider.tsx +1 -1
  275. package/src/lib/components/TopNavigation.tsx +1 -1
  276. package/src/lib/components/Zudoku.tsx +1 -1
  277. package/src/lib/components/context/ZudokuContext.ts +1 -1
  278. package/src/lib/components/index.ts +1 -1
  279. package/src/lib/components/navigation/SidebarCategory.tsx +1 -1
  280. package/src/lib/components/navigation/SidebarItem.tsx +1 -1
  281. package/src/lib/components/navigation/utils.ts +1 -1
  282. package/src/lib/core/plugins.ts +3 -7
  283. package/src/lib/errors/RouterError.tsx +1 -1
  284. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  285. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  286. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  287. package/src/lib/plugins/api-keys/index.tsx +1 -1
  288. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  289. package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
  290. package/src/lib/plugins/markdown/index.tsx +2 -1
  291. package/src/lib/plugins/openapi/Route.tsx +1 -1
  292. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  293. package/src/lib/plugins/openapi/index.tsx +1 -1
  294. package/src/lib/plugins/redirect/index.tsx +1 -1
  295. package/src/lib/util/MdxComponents.tsx +1 -3
  296. package/src/lib/util/createVariantComponent.tsx +2 -2
  297. package/src/lib/util/useExposedProps.tsx +1 -1
  298. package/src/lib/util/useScrollToAnchor.ts +1 -1
  299. package/src/lib/util/useScrollToTop.ts +1 -1
  300. package/lib/AnchorLink-BR0MvI7n.js.map +0 -1
  301. package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
  302. package/lib/MdxPage-Wp8QU0-q.js.map +0 -1
  303. package/lib/OperationList-u8xHU9-b.js +0 -4706
  304. package/lib/Route-DlG_HTMu.js +0 -11
  305. package/lib/Route-DlG_HTMu.js.map +0 -1
  306. package/lib/SlotletProvider-BgvYIPQe.js +0 -252
  307. package/lib/SlotletProvider-BgvYIPQe.js.map +0 -1
  308. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  309. package/lib/assets/worker-C_2va8B8.js.map +0 -1
  310. package/lib/cn-BmFQLtkS.js.map +0 -1
  311. package/lib/createServer-BCAHdrpE.js.map +0 -1
  312. package/lib/index-BuAyrJe3.js +0 -46
  313. package/lib/index-BuAyrJe3.js.map +0 -1
  314. package/lib/index-CkwDvuPt.js.map +0 -1
  315. package/lib/index-Czzd9rjU.js +0 -899
  316. package/lib/index-Czzd9rjU.js.map +0 -1
  317. package/lib/index-Yn8c3UWE.js +0 -921
  318. package/lib/index-Yn8c3UWE.js.map +0 -1
  319. package/lib/index.esm-Bm8pj-bc.js +0 -675
  320. package/lib/index.esm-C5mr_sKO.js +0 -1193
  321. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  322. package/lib/jsx-runtime-B6kdoens.js +0 -635
  323. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  324. package/lib/object_hash-CvlLgU-M.js +0 -785
  325. package/lib/object_hash-CvlLgU-M.js.map +0 -1
  326. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  327. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  328. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  329. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  330. package/lib/router-lfyopgBI.js +0 -3024
  331. package/lib/router-lfyopgBI.js.map +0 -1
  332. package/lib/state-tsXBLONe.js +0 -203
  333. package/lib/state-tsXBLONe.js.map +0 -1
  334. package/lib/useExposedProps-CTPtylCV.js +0 -10
  335. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
@@ -1,921 +0,0 @@
1
- import * as o from "react";
2
- import * as Ue from "react-dom";
3
- import { N as O, c as he, a as ne, u as A, d as V, D as J, e as pe, R as re, f as ae, g as M, h as Ie, m as ve, i as ye, j as we, k as Ee, A as Ve, M as Me, l as He, O as Ke, n as Be, o as je, L as ze, p as We, q as ce, r as Ye, s as qe, t as Ge, v as Je, w as Xe, x as $e, y as Qe, z as Ze, B as et, C as tt, b as nt, E as rt, F as at, G as ot, H as it } from "./index-Czzd9rjU.js";
4
- import { s as P, w as H, c as q, i as E, j as st, m as te, a as Se, b as ge, d as Re, E as be, I as lt, A as ut, e as ct, f as ft, g as dt, h as mt, k as ht, l as pt, p as vt, r as yt, n as wt, o as Et, q as St } from "./router-lfyopgBI.js";
5
- /**
6
- * React Router DOM v6.27.0
7
- *
8
- * Copyright (c) Remix Software Inc.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE.md file in the root directory of this source tree.
12
- *
13
- * @license MIT
14
- */
15
- function b() {
16
- return b = Object.assign ? Object.assign.bind() : function(e) {
17
- for (var t = 1; t < arguments.length; t++) {
18
- var n = arguments[t];
19
- for (var a in n)
20
- Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
21
- }
22
- return e;
23
- }, b.apply(this, arguments);
24
- }
25
- function oe(e, t) {
26
- if (e == null) return {};
27
- var n = {}, a = Object.keys(e), r, s;
28
- for (s = 0; s < a.length; s++)
29
- r = a[s], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
30
- return n;
31
- }
32
- const W = "get", Y = "application/x-www-form-urlencoded";
33
- function X(e) {
34
- return e != null && typeof e.tagName == "string";
35
- }
36
- function gt(e) {
37
- return X(e) && e.tagName.toLowerCase() === "button";
38
- }
39
- function Rt(e) {
40
- return X(e) && e.tagName.toLowerCase() === "form";
41
- }
42
- function bt(e) {
43
- return X(e) && e.tagName.toLowerCase() === "input";
44
- }
45
- function Nt(e) {
46
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
47
- }
48
- function Ct(e, t) {
49
- return e.button === 0 && // Ignore everything but left clicks
50
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
51
- !Nt(e);
52
- }
53
- function G(e) {
54
- return e === void 0 && (e = ""), new URLSearchParams(typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
55
- let a = e[n];
56
- return t.concat(Array.isArray(a) ? a.map((r) => [n, r]) : [[n, a]]);
57
- }, []));
58
- }
59
- function Tt(e, t) {
60
- let n = G(e);
61
- return t && t.forEach((a, r) => {
62
- n.has(r) || t.getAll(r).forEach((s) => {
63
- n.append(r, s);
64
- });
65
- }), n;
66
- }
67
- let j = null;
68
- function _t() {
69
- if (j === null)
70
- try {
71
- new FormData(
72
- document.createElement("form"),
73
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
74
- 0
75
- ), j = !1;
76
- } catch {
77
- j = !0;
78
- }
79
- return j;
80
- }
81
- const Lt = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
82
- function ee(e) {
83
- return e != null && !Lt.has(e) ? (process.env.NODE_ENV !== "production" && H(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + Y + '"')), null) : e;
84
- }
85
- function xt(e, t) {
86
- let n, a, r, s, i;
87
- if (Rt(e)) {
88
- let u = e.getAttribute("action");
89
- a = u ? P(u, t) : null, n = e.getAttribute("method") || W, r = ee(e.getAttribute("enctype")) || Y, s = new FormData(e);
90
- } else if (gt(e) || bt(e) && (e.type === "submit" || e.type === "image")) {
91
- let u = e.form;
92
- if (u == null)
93
- throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
94
- let f = e.getAttribute("formaction") || u.getAttribute("action");
95
- if (a = f ? P(f, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || W, r = ee(e.getAttribute("formenctype")) || ee(u.getAttribute("enctype")) || Y, s = new FormData(u, e), !_t()) {
96
- let {
97
- name: l,
98
- type: c,
99
- value: d
100
- } = e;
101
- if (c === "image") {
102
- let h = l ? l + "." : "";
103
- s.append(h + "x", "0"), s.append(h + "y", "0");
104
- } else l && s.append(l, d);
105
- }
106
- } else {
107
- if (X(e))
108
- throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
109
- n = W, a = null, r = Y, i = e;
110
- }
111
- return s && r === "text/plain" && (i = s, s = void 0), {
112
- action: a,
113
- method: n.toLowerCase(),
114
- encType: r,
115
- formData: s,
116
- body: i
117
- };
118
- }
119
- const Ft = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], Pt = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], Dt = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], Ot = "6";
120
- try {
121
- window.__reactRouterVersion = Ot;
122
- } catch {
123
- }
124
- function At(e, t) {
125
- return Se({
126
- basename: t == null ? void 0 : t.basename,
127
- future: b({}, t == null ? void 0 : t.future, {
128
- v7_prependBasename: !0
129
- }),
130
- history: ge({
131
- window: t == null ? void 0 : t.window
132
- }),
133
- hydrationData: (t == null ? void 0 : t.hydrationData) || Ne(),
134
- routes: e,
135
- mapRouteProperties: ve,
136
- dataStrategy: t == null ? void 0 : t.dataStrategy,
137
- patchRoutesOnNavigation: t == null ? void 0 : t.patchRoutesOnNavigation,
138
- window: t == null ? void 0 : t.window
139
- }).initialize();
140
- }
141
- function kt(e, t) {
142
- return Se({
143
- basename: t == null ? void 0 : t.basename,
144
- future: b({}, t == null ? void 0 : t.future, {
145
- v7_prependBasename: !0
146
- }),
147
- history: Re({
148
- window: t == null ? void 0 : t.window
149
- }),
150
- hydrationData: (t == null ? void 0 : t.hydrationData) || Ne(),
151
- routes: e,
152
- mapRouteProperties: ve,
153
- dataStrategy: t == null ? void 0 : t.dataStrategy,
154
- patchRoutesOnNavigation: t == null ? void 0 : t.patchRoutesOnNavigation,
155
- window: t == null ? void 0 : t.window
156
- }).initialize();
157
- }
158
- function Ne() {
159
- var e;
160
- let t = (e = window) == null ? void 0 : e.__staticRouterHydrationData;
161
- return t && t.errors && (t = b({}, t, {
162
- errors: Ut(t.errors)
163
- })), t;
164
- }
165
- function Ut(e) {
166
- if (!e) return null;
167
- let t = Object.entries(e), n = {};
168
- for (let [a, r] of t)
169
- if (r && r.__type === "RouteErrorResponse")
170
- n[a] = new be(r.status, r.statusText, r.data, r.internal === !0);
171
- else if (r && r.__type === "Error") {
172
- if (r.__subType) {
173
- let s = window[r.__subType];
174
- if (typeof s == "function")
175
- try {
176
- let i = new s(r.message);
177
- i.stack = "", n[a] = i;
178
- } catch {
179
- }
180
- }
181
- if (n[a] == null) {
182
- let s = new Error(r.message);
183
- s.stack = "", n[a] = s;
184
- }
185
- } else
186
- n[a] = r;
187
- return n;
188
- }
189
- const $ = /* @__PURE__ */ o.createContext({
190
- isTransitioning: !1
191
- });
192
- process.env.NODE_ENV !== "production" && ($.displayName = "ViewTransition");
193
- const Q = /* @__PURE__ */ o.createContext(/* @__PURE__ */ new Map());
194
- process.env.NODE_ENV !== "production" && (Q.displayName = "Fetchers");
195
- const It = "startTransition", L = o[It], Vt = "flushSync", fe = Ue[Vt], Mt = "useId", de = o[Mt];
196
- function Ht(e) {
197
- L ? L(e) : e();
198
- }
199
- function U(e) {
200
- fe ? fe(e) : e();
201
- }
202
- class Kt {
203
- constructor() {
204
- this.status = "pending", this.promise = new Promise((t, n) => {
205
- this.resolve = (a) => {
206
- this.status === "pending" && (this.status = "resolved", t(a));
207
- }, this.reject = (a) => {
208
- this.status === "pending" && (this.status = "rejected", n(a));
209
- };
210
- });
211
- }
212
- }
213
- function Bt(e) {
214
- let {
215
- fallbackElement: t,
216
- router: n,
217
- future: a
218
- } = e, [r, s] = o.useState(n.state), [i, u] = o.useState(), [f, l] = o.useState({
219
- isTransitioning: !1
220
- }), [c, d] = o.useState(), [h, S] = o.useState(), [w, N] = o.useState(), g = o.useRef(/* @__PURE__ */ new Map()), {
221
- v7_startTransition: C
222
- } = a || {}, m = o.useCallback((y) => {
223
- C ? Ht(y) : y();
224
- }, [C]), p = o.useCallback((y, T) => {
225
- let {
226
- deletedFetchers: R,
227
- flushSync: B,
228
- viewTransitionOpts: x
229
- } = T;
230
- R.forEach((F) => g.current.delete(F)), y.fetchers.forEach((F, ke) => {
231
- F.data !== void 0 && g.current.set(ke, F.data);
232
- });
233
- let Ae = n.window == null || n.window.document == null || typeof n.window.document.startViewTransition != "function";
234
- if (!x || Ae) {
235
- B ? U(() => s(y)) : m(() => s(y));
236
- return;
237
- }
238
- if (B) {
239
- U(() => {
240
- h && (c && c.resolve(), h.skipTransition()), l({
241
- isTransitioning: !0,
242
- flushSync: !0,
243
- currentLocation: x.currentLocation,
244
- nextLocation: x.nextLocation
245
- });
246
- });
247
- let F = n.window.document.startViewTransition(() => {
248
- U(() => s(y));
249
- });
250
- F.finished.finally(() => {
251
- U(() => {
252
- d(void 0), S(void 0), u(void 0), l({
253
- isTransitioning: !1
254
- });
255
- });
256
- }), U(() => S(F));
257
- return;
258
- }
259
- h ? (c && c.resolve(), h.skipTransition(), N({
260
- state: y,
261
- currentLocation: x.currentLocation,
262
- nextLocation: x.nextLocation
263
- })) : (u(y), l({
264
- isTransitioning: !0,
265
- flushSync: !1,
266
- currentLocation: x.currentLocation,
267
- nextLocation: x.nextLocation
268
- }));
269
- }, [n.window, h, c, g, m]);
270
- o.useLayoutEffect(() => n.subscribe(p), [n, p]), o.useEffect(() => {
271
- f.isTransitioning && !f.flushSync && d(new Kt());
272
- }, [f]), o.useEffect(() => {
273
- if (c && i && n.window) {
274
- let y = i, T = c.promise, R = n.window.document.startViewTransition(async () => {
275
- m(() => s(y)), await T;
276
- });
277
- R.finished.finally(() => {
278
- d(void 0), S(void 0), u(void 0), l({
279
- isTransitioning: !1
280
- });
281
- }), S(R);
282
- }
283
- }, [m, i, c, n.window]), o.useEffect(() => {
284
- c && i && r.location.key === i.location.key && c.resolve();
285
- }, [c, h, r.location, i]), o.useEffect(() => {
286
- !f.isTransitioning && w && (u(w.state), l({
287
- isTransitioning: !0,
288
- flushSync: !1,
289
- currentLocation: w.currentLocation,
290
- nextLocation: w.nextLocation
291
- }), N(void 0));
292
- }, [f.isTransitioning, w]), o.useEffect(() => {
293
- process.env.NODE_ENV !== "production" && H(t == null || !n.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead");
294
- }, []);
295
- let v = o.useMemo(() => ({
296
- createHref: n.createHref,
297
- encodeLocation: n.encodeLocation,
298
- go: (y) => n.navigate(y),
299
- push: (y, T, R) => n.navigate(y, {
300
- state: T,
301
- preventScrollReset: R == null ? void 0 : R.preventScrollReset
302
- }),
303
- replace: (y, T, R) => n.navigate(y, {
304
- replace: !0,
305
- state: T,
306
- preventScrollReset: R == null ? void 0 : R.preventScrollReset
307
- })
308
- }), [n]), _ = n.basename || "/", k = o.useMemo(() => ({
309
- router: n,
310
- navigator: v,
311
- static: !1,
312
- basename: _
313
- }), [n, v, _]), K = o.useMemo(() => ({
314
- v7_relativeSplatPath: n.future.v7_relativeSplatPath
315
- }), [n.future.v7_relativeSplatPath]);
316
- return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(ae.Provider, {
317
- value: k
318
- }, /* @__PURE__ */ o.createElement(J.Provider, {
319
- value: r
320
- }, /* @__PURE__ */ o.createElement(Q.Provider, {
321
- value: g.current
322
- }, /* @__PURE__ */ o.createElement($.Provider, {
323
- value: f
324
- }, /* @__PURE__ */ o.createElement(M, {
325
- basename: _,
326
- location: r.location,
327
- navigationType: r.historyAction,
328
- navigator: v,
329
- future: K
330
- }, r.initialized || n.future.v7_partialHydration ? /* @__PURE__ */ o.createElement(jt, {
331
- routes: n.routes,
332
- future: n.future,
333
- state: r
334
- }) : t))))), null);
335
- }
336
- const jt = /* @__PURE__ */ o.memo(zt);
337
- function zt(e) {
338
- let {
339
- routes: t,
340
- future: n,
341
- state: a
342
- } = e;
343
- return Ie(t, void 0, a, n);
344
- }
345
- function Wt(e) {
346
- let {
347
- basename: t,
348
- children: n,
349
- future: a,
350
- window: r
351
- } = e, s = o.useRef();
352
- s.current == null && (s.current = ge({
353
- window: r,
354
- v5Compat: !0
355
- }));
356
- let i = s.current, [u, f] = o.useState({
357
- action: i.action,
358
- location: i.location
359
- }), {
360
- v7_startTransition: l
361
- } = a || {}, c = o.useCallback((d) => {
362
- l && L ? L(() => f(d)) : f(d);
363
- }, [f, l]);
364
- return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
365
- basename: t,
366
- children: n,
367
- location: u.location,
368
- navigationType: u.action,
369
- navigator: i,
370
- future: a
371
- });
372
- }
373
- function Yt(e) {
374
- let {
375
- basename: t,
376
- children: n,
377
- future: a,
378
- window: r
379
- } = e, s = o.useRef();
380
- s.current == null && (s.current = Re({
381
- window: r,
382
- v5Compat: !0
383
- }));
384
- let i = s.current, [u, f] = o.useState({
385
- action: i.action,
386
- location: i.location
387
- }), {
388
- v7_startTransition: l
389
- } = a || {}, c = o.useCallback((d) => {
390
- l && L ? L(() => f(d)) : f(d);
391
- }, [f, l]);
392
- return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
393
- basename: t,
394
- children: n,
395
- location: u.location,
396
- navigationType: u.action,
397
- navigator: i,
398
- future: a
399
- });
400
- }
401
- function Ce(e) {
402
- let {
403
- basename: t,
404
- children: n,
405
- future: a,
406
- history: r
407
- } = e, [s, i] = o.useState({
408
- action: r.action,
409
- location: r.location
410
- }), {
411
- v7_startTransition: u
412
- } = a || {}, f = o.useCallback((l) => {
413
- u && L ? L(() => i(l)) : i(l);
414
- }, [i, u]);
415
- return o.useLayoutEffect(() => r.listen(f), [r, f]), /* @__PURE__ */ o.createElement(M, {
416
- basename: t,
417
- children: n,
418
- location: s.location,
419
- navigationType: s.action,
420
- navigator: r,
421
- future: a
422
- });
423
- }
424
- process.env.NODE_ENV !== "production" && (Ce.displayName = "unstable_HistoryRouter");
425
- const qt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Gt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ie = /* @__PURE__ */ o.forwardRef(function(t, n) {
426
- let {
427
- onClick: a,
428
- relative: r,
429
- reloadDocument: s,
430
- replace: i,
431
- state: u,
432
- target: f,
433
- to: l,
434
- preventScrollReset: c,
435
- viewTransition: d
436
- } = t, h = oe(t, Ft), {
437
- basename: S
438
- } = o.useContext(O), w, N = !1;
439
- if (typeof l == "string" && Gt.test(l) && (w = l, qt))
440
- try {
441
- let p = new URL(window.location.href), v = l.startsWith("//") ? new URL(p.protocol + l) : new URL(l), _ = P(v.pathname, S);
442
- v.origin === p.origin && _ != null ? l = _ + v.search + v.hash : N = !0;
443
- } catch {
444
- process.env.NODE_ENV !== "production" && H(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
445
- }
446
- let g = he(l, {
447
- relative: r
448
- }), C = xe(l, {
449
- replace: i,
450
- state: u,
451
- target: f,
452
- preventScrollReset: c,
453
- relative: r,
454
- viewTransition: d
455
- });
456
- function m(p) {
457
- a && a(p), p.defaultPrevented || C(p);
458
- }
459
- return (
460
- // eslint-disable-next-line jsx-a11y/anchor-has-content
461
- /* @__PURE__ */ o.createElement("a", b({}, h, {
462
- href: w || g,
463
- onClick: N || s ? a : m,
464
- ref: n,
465
- target: f
466
- }))
467
- );
468
- });
469
- process.env.NODE_ENV !== "production" && (ie.displayName = "Link");
470
- const Te = /* @__PURE__ */ o.forwardRef(function(t, n) {
471
- let {
472
- "aria-current": a = "page",
473
- caseSensitive: r = !1,
474
- className: s = "",
475
- end: i = !1,
476
- style: u,
477
- to: f,
478
- viewTransition: l,
479
- children: c
480
- } = t, d = oe(t, Pt), h = V(f, {
481
- relative: d.relative
482
- }), S = A(), w = o.useContext(J), {
483
- navigator: N,
484
- basename: g
485
- } = o.useContext(O), C = w != null && // Conditional usage is OK here because the usage of a data router is static
486
- // eslint-disable-next-line react-hooks/rules-of-hooks
487
- Oe(h) && l === !0, m = N.encodeLocation ? N.encodeLocation(h).pathname : h.pathname, p = S.pathname, v = w && w.navigation && w.navigation.location ? w.navigation.location.pathname : null;
488
- r || (p = p.toLowerCase(), v = v ? v.toLowerCase() : null, m = m.toLowerCase()), v && g && (v = P(v, g) || v);
489
- const _ = m !== "/" && m.endsWith("/") ? m.length - 1 : m.length;
490
- let k = p === m || !i && p.startsWith(m) && p.charAt(_) === "/", K = v != null && (v === m || !i && v.startsWith(m) && v.charAt(m.length) === "/"), y = {
491
- isActive: k,
492
- isPending: K,
493
- isTransitioning: C
494
- }, T = k ? a : void 0, R;
495
- typeof s == "function" ? R = s(y) : R = [s, k ? "active" : null, K ? "pending" : null, C ? "transitioning" : null].filter(Boolean).join(" ");
496
- let B = typeof u == "function" ? u(y) : u;
497
- return /* @__PURE__ */ o.createElement(ie, b({}, d, {
498
- "aria-current": T,
499
- className: R,
500
- ref: n,
501
- style: B,
502
- to: f,
503
- viewTransition: l
504
- }), typeof c == "function" ? c(y) : c);
505
- });
506
- process.env.NODE_ENV !== "production" && (Te.displayName = "NavLink");
507
- const se = /* @__PURE__ */ o.forwardRef((e, t) => {
508
- let {
509
- fetcherKey: n,
510
- navigate: a,
511
- reloadDocument: r,
512
- replace: s,
513
- state: i,
514
- method: u = W,
515
- action: f,
516
- onSubmit: l,
517
- relative: c,
518
- preventScrollReset: d,
519
- viewTransition: h
520
- } = e, S = oe(e, Dt), w = ue(), N = Pe(f, {
521
- relative: c
522
- }), g = u.toLowerCase() === "get" ? "get" : "post", C = (m) => {
523
- if (l && l(m), m.defaultPrevented) return;
524
- m.preventDefault();
525
- let p = m.nativeEvent.submitter, v = (p == null ? void 0 : p.getAttribute("formmethod")) || u;
526
- w(p || m.currentTarget, {
527
- fetcherKey: n,
528
- method: v,
529
- navigate: a,
530
- replace: s,
531
- state: i,
532
- relative: c,
533
- preventScrollReset: d,
534
- viewTransition: h
535
- });
536
- };
537
- return /* @__PURE__ */ o.createElement("form", b({
538
- ref: t,
539
- method: g,
540
- action: N,
541
- onSubmit: r ? l : C
542
- }, S));
543
- });
544
- process.env.NODE_ENV !== "production" && (se.displayName = "Form");
545
- function _e(e) {
546
- let {
547
- getKey: t,
548
- storageKey: n
549
- } = e;
550
- return De({
551
- getKey: t,
552
- storageKey: n
553
- }), null;
554
- }
555
- process.env.NODE_ENV !== "production" && (_e.displayName = "ScrollRestoration");
556
- var D;
557
- (function(e) {
558
- e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
559
- })(D || (D = {}));
560
- var I;
561
- (function(e) {
562
- e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
563
- })(I || (I = {}));
564
- function Le(e) {
565
- return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
566
- }
567
- function Z(e) {
568
- let t = o.useContext(ae);
569
- return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
570
- }
571
- function le(e) {
572
- let t = o.useContext(J);
573
- return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
574
- }
575
- function xe(e, t) {
576
- let {
577
- target: n,
578
- replace: a,
579
- state: r,
580
- preventScrollReset: s,
581
- relative: i,
582
- viewTransition: u
583
- } = t === void 0 ? {} : t, f = ne(), l = A(), c = V(e, {
584
- relative: i
585
- });
586
- return o.useCallback((d) => {
587
- if (Ct(d, n)) {
588
- d.preventDefault();
589
- let h = a !== void 0 ? a : q(l) === q(c);
590
- f(e, {
591
- replace: h,
592
- state: r,
593
- preventScrollReset: s,
594
- relative: i,
595
- viewTransition: u
596
- });
597
- }
598
- }, [l, f, c, a, r, n, e, s, i, u]);
599
- }
600
- function Jt(e) {
601
- process.env.NODE_ENV !== "production" && H(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.");
602
- let t = o.useRef(G(e)), n = o.useRef(!1), a = A(), r = o.useMemo(() => (
603
- // Only merge in the defaults if we haven't yet called setSearchParams.
604
- // Once we call that we want those to take precedence, otherwise you can't
605
- // remove a param with setSearchParams({}) if it has an initial value
606
- Tt(a.search, n.current ? null : t.current)
607
- ), [a.search]), s = ne(), i = o.useCallback((u, f) => {
608
- const l = G(typeof u == "function" ? u(r) : u);
609
- n.current = !0, s("?" + l, f);
610
- }, [s, r]);
611
- return [r, i];
612
- }
613
- function Xt() {
614
- if (typeof document > "u")
615
- throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
616
- }
617
- let $t = 0, Fe = () => "__" + String(++$t) + "__";
618
- function ue() {
619
- let {
620
- router: e
621
- } = Z(D.UseSubmit), {
622
- basename: t
623
- } = o.useContext(O), n = pe();
624
- return o.useCallback(function(a, r) {
625
- r === void 0 && (r = {}), Xt();
626
- let {
627
- action: s,
628
- method: i,
629
- encType: u,
630
- formData: f,
631
- body: l
632
- } = xt(a, t);
633
- if (r.navigate === !1) {
634
- let c = r.fetcherKey || Fe();
635
- e.fetch(c, n, r.action || s, {
636
- preventScrollReset: r.preventScrollReset,
637
- formData: f,
638
- body: l,
639
- formMethod: r.method || i,
640
- formEncType: r.encType || u,
641
- flushSync: r.flushSync
642
- });
643
- } else
644
- e.navigate(r.action || s, {
645
- preventScrollReset: r.preventScrollReset,
646
- formData: f,
647
- body: l,
648
- formMethod: r.method || i,
649
- formEncType: r.encType || u,
650
- replace: r.replace,
651
- state: r.state,
652
- fromRouteId: n,
653
- flushSync: r.flushSync,
654
- viewTransition: r.viewTransition
655
- });
656
- }, [e, t, n]);
657
- }
658
- function Pe(e, t) {
659
- let {
660
- relative: n
661
- } = t === void 0 ? {} : t, {
662
- basename: a
663
- } = o.useContext(O), r = o.useContext(re);
664
- r || (process.env.NODE_ENV !== "production" ? E(!1, "useFormAction must be used inside a RouteContext") : E(!1));
665
- let [s] = r.matches.slice(-1), i = b({}, V(e || ".", {
666
- relative: n
667
- })), u = A();
668
- if (e == null) {
669
- i.search = u.search;
670
- let f = new URLSearchParams(i.search), l = f.getAll("index");
671
- if (l.some((d) => d === "")) {
672
- f.delete("index"), l.filter((h) => h).forEach((h) => f.append("index", h));
673
- let d = f.toString();
674
- i.search = d ? "?" + d : "";
675
- }
676
- }
677
- return (!e || e === ".") && s.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (i.pathname = i.pathname === "/" ? a : st([a, i.pathname])), q(i);
678
- }
679
- function Qt(e) {
680
- var t;
681
- let {
682
- key: n
683
- } = e === void 0 ? {} : e, {
684
- router: a
685
- } = Z(D.UseFetcher), r = le(I.UseFetcher), s = o.useContext(Q), i = o.useContext(re), u = (t = i.matches[i.matches.length - 1]) == null ? void 0 : t.route.id;
686
- s || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a FetchersContext") : E(!1)), i || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a RouteContext") : E(!1)), u == null && (process.env.NODE_ENV !== "production" ? E(!1, 'useFetcher can only be used on routes that contain a unique "id"') : E(!1));
687
- let f = de ? de() : "", [l, c] = o.useState(n || f);
688
- n && n !== l ? c(n) : l || c(Fe()), o.useEffect(() => (a.getFetcher(l), () => {
689
- a.deleteFetcher(l);
690
- }), [a, l]);
691
- let d = o.useCallback((m, p) => {
692
- u || (process.env.NODE_ENV !== "production" ? E(!1, "No routeId available for fetcher.load()") : E(!1)), a.fetch(l, u, m, p);
693
- }, [l, u, a]), h = ue(), S = o.useCallback((m, p) => {
694
- h(m, b({}, p, {
695
- navigate: !1,
696
- fetcherKey: l
697
- }));
698
- }, [l, h]), w = o.useMemo(() => {
699
- let m = /* @__PURE__ */ o.forwardRef((p, v) => /* @__PURE__ */ o.createElement(se, b({}, p, {
700
- navigate: !1,
701
- fetcherKey: l,
702
- ref: v
703
- })));
704
- return process.env.NODE_ENV !== "production" && (m.displayName = "fetcher.Form"), m;
705
- }, [l]), N = r.fetchers.get(l) || lt, g = s.get(l);
706
- return o.useMemo(() => b({
707
- Form: w,
708
- submit: S,
709
- load: d
710
- }, N, {
711
- data: g
712
- }), [w, S, d, N, g]);
713
- }
714
- function Zt() {
715
- let e = le(I.UseFetchers);
716
- return Array.from(e.fetchers.entries()).map((t) => {
717
- let [n, a] = t;
718
- return b({}, a, {
719
- key: n
720
- });
721
- });
722
- }
723
- const me = "react-router-scroll-positions";
724
- let z = {};
725
- function De(e) {
726
- let {
727
- getKey: t,
728
- storageKey: n
729
- } = e === void 0 ? {} : e, {
730
- router: a
731
- } = Z(D.UseScrollRestoration), {
732
- restoreScrollPosition: r,
733
- preventScrollReset: s
734
- } = le(I.UseScrollRestoration), {
735
- basename: i
736
- } = o.useContext(O), u = A(), f = ye(), l = we();
737
- o.useEffect(() => (window.history.scrollRestoration = "manual", () => {
738
- window.history.scrollRestoration = "auto";
739
- }), []), tn(o.useCallback(() => {
740
- if (l.state === "idle") {
741
- let c = (t ? t(u, f) : null) || u.key;
742
- z[c] = window.scrollY;
743
- }
744
- try {
745
- sessionStorage.setItem(n || me, JSON.stringify(z));
746
- } catch (c) {
747
- process.env.NODE_ENV !== "production" && H(!1, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + c + ").");
748
- }
749
- window.history.scrollRestoration = "auto";
750
- }, [n, t, l.state, u, f])), typeof document < "u" && (o.useLayoutEffect(() => {
751
- try {
752
- let c = sessionStorage.getItem(n || me);
753
- c && (z = JSON.parse(c));
754
- } catch {
755
- }
756
- }, [n]), o.useLayoutEffect(() => {
757
- let c = t && i !== "/" ? (h, S) => t(
758
- // Strip the basename to match useLocation()
759
- b({}, h, {
760
- pathname: P(h.pathname, i) || h.pathname
761
- }),
762
- S
763
- ) : t, d = a == null ? void 0 : a.enableScrollRestoration(z, () => window.scrollY, c);
764
- return () => d && d();
765
- }, [a, i, t]), o.useLayoutEffect(() => {
766
- if (r !== !1) {
767
- if (typeof r == "number") {
768
- window.scrollTo(0, r);
769
- return;
770
- }
771
- if (u.hash) {
772
- let c = document.getElementById(decodeURIComponent(u.hash.slice(1)));
773
- if (c) {
774
- c.scrollIntoView();
775
- return;
776
- }
777
- }
778
- s !== !0 && window.scrollTo(0, 0);
779
- }
780
- }, [u, r, s]));
781
- }
782
- function en(e, t) {
783
- let {
784
- capture: n
785
- } = t || {};
786
- o.useEffect(() => {
787
- let a = n != null ? {
788
- capture: n
789
- } : void 0;
790
- return window.addEventListener("beforeunload", e, a), () => {
791
- window.removeEventListener("beforeunload", e, a);
792
- };
793
- }, [e, n]);
794
- }
795
- function tn(e, t) {
796
- let {
797
- capture: n
798
- } = {};
799
- o.useEffect(() => {
800
- let a = n != null ? {
801
- capture: n
802
- } : void 0;
803
- return window.addEventListener("pagehide", e, a), () => {
804
- window.removeEventListener("pagehide", e, a);
805
- };
806
- }, [e, n]);
807
- }
808
- function nn(e) {
809
- let {
810
- when: t,
811
- message: n
812
- } = e, a = Ee(t);
813
- o.useEffect(() => {
814
- a.state === "blocked" && (window.confirm(n) ? setTimeout(a.proceed, 0) : a.reset());
815
- }, [a, n]), o.useEffect(() => {
816
- a.state === "blocked" && !t && a.reset();
817
- }, [a, t]);
818
- }
819
- function Oe(e, t) {
820
- t === void 0 && (t = {});
821
- let n = o.useContext($);
822
- n == null && (process.env.NODE_ENV !== "production" ? E(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : E(!1));
823
- let {
824
- basename: a
825
- } = Z(D.useViewTransitionState), r = V(e, {
826
- relative: t.relative
827
- });
828
- if (!n.isTransitioning)
829
- return !1;
830
- let s = P(n.currentLocation.pathname, a) || n.currentLocation.pathname, i = P(n.nextLocation.pathname, a) || n.nextLocation.pathname;
831
- return te(r.pathname, i) != null || te(r.pathname, s) != null;
832
- }
833
- const on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
834
- __proto__: null,
835
- AbortedDeferredError: ut,
836
- Await: Ve,
837
- BrowserRouter: Wt,
838
- Form: se,
839
- HashRouter: Yt,
840
- Link: ie,
841
- MemoryRouter: Me,
842
- NavLink: Te,
843
- Navigate: He,
844
- get NavigationType() {
845
- return ct;
846
- },
847
- Outlet: Ke,
848
- Route: Be,
849
- Router: M,
850
- RouterProvider: Bt,
851
- Routes: je,
852
- ScrollRestoration: _e,
853
- UNSAFE_DataRouterContext: ae,
854
- UNSAFE_DataRouterStateContext: J,
855
- UNSAFE_ErrorResponseImpl: be,
856
- UNSAFE_FetchersContext: Q,
857
- UNSAFE_LocationContext: ze,
858
- UNSAFE_NavigationContext: O,
859
- UNSAFE_RouteContext: re,
860
- UNSAFE_ViewTransitionContext: $,
861
- UNSAFE_useRouteId: pe,
862
- UNSAFE_useScrollRestoration: De,
863
- createBrowserRouter: At,
864
- createHashRouter: kt,
865
- createMemoryRouter: We,
866
- createPath: q,
867
- createRoutesFromChildren: ce,
868
- createRoutesFromElements: ce,
869
- createSearchParams: G,
870
- defer: ft,
871
- generatePath: dt,
872
- isRouteErrorResponse: mt,
873
- json: ht,
874
- matchPath: te,
875
- matchRoutes: pt,
876
- parsePath: vt,
877
- redirect: yt,
878
- redirectDocument: wt,
879
- renderMatches: Ye,
880
- replace: Et,
881
- resolvePath: St,
882
- unstable_HistoryRouter: Ce,
883
- unstable_usePrompt: nn,
884
- useActionData: qe,
885
- useAsyncError: Ge,
886
- useAsyncValue: Je,
887
- useBeforeUnload: en,
888
- useBlocker: Ee,
889
- useFetcher: Qt,
890
- useFetchers: Zt,
891
- useFormAction: Pe,
892
- useHref: he,
893
- useInRouterContext: Xe,
894
- useLinkClickHandler: xe,
895
- useLoaderData: $e,
896
- useLocation: A,
897
- useMatch: Qe,
898
- useMatches: ye,
899
- useNavigate: ne,
900
- useNavigation: we,
901
- useNavigationType: Ze,
902
- useOutlet: et,
903
- useOutletContext: tt,
904
- useParams: nt,
905
- useResolvedPath: V,
906
- useRevalidator: rt,
907
- useRouteError: at,
908
- useRouteLoaderData: ot,
909
- useRoutes: it,
910
- useSearchParams: Jt,
911
- useSubmit: ue,
912
- useViewTransitionState: Oe
913
- }, Symbol.toStringTag, { value: "Module" }));
914
- export {
915
- ie as L,
916
- Te as N,
917
- Bt as R,
918
- on as d,
919
- Jt as u
920
- };
921
- //# sourceMappingURL=index-Yn8c3UWE.js.map