scope-agent-workbench 0.0.0-stage → 0.2.3

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 (358) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/LICENSE +21 -0
  3. package/README.md +174 -2
  4. package/README.zh-CN.md +175 -0
  5. package/bin/scope.mjs +111 -0
  6. package/bridge/account-quotas.mjs +881 -0
  7. package/bridge/agent-email-relay.mjs +160 -0
  8. package/bridge/app-server-client.mjs +2522 -0
  9. package/bridge/app-server-websocket-transport.mjs +219 -0
  10. package/bridge/archive/routes.mjs +19 -0
  11. package/bridge/archive/service.mjs +130 -0
  12. package/bridge/archive/thread-lifecycle.mjs +52 -0
  13. package/bridge/attachment-store.mjs +184 -0
  14. package/bridge/auth-profile-failover.mjs +58 -0
  15. package/bridge/auth-profile-manager.mjs +215 -0
  16. package/bridge/capacity-recovery.mjs +90 -0
  17. package/bridge/codex-upgrade.mjs +150 -0
  18. package/bridge/deployment-profile.mjs +64 -0
  19. package/bridge/email-notifier.mjs +616 -0
  20. package/bridge/gpu-usage-history.mjs +322 -0
  21. package/bridge/host-session-restart.mjs +35 -0
  22. package/bridge/http.mjs +69 -0
  23. package/bridge/idle-sessions.mjs +185 -0
  24. package/bridge/inventory-scanner.mjs +517 -0
  25. package/bridge/local/dialogue.mjs +150 -0
  26. package/bridge/local/directories.mjs +40 -0
  27. package/bridge/local/executable.mjs +29 -0
  28. package/bridge/local/history.mjs +36 -0
  29. package/bridge/local/python-probe.mjs +35 -0
  30. package/bridge/local/runtime.mjs +188 -0
  31. package/bridge/local/transport.mjs +70 -0
  32. package/bridge/maintenance/install-command.mjs +141 -0
  33. package/bridge/maintenance/routes.mjs +21 -0
  34. package/bridge/maintenance/service.mjs +175 -0
  35. package/bridge/model-catalog.mjs +21 -0
  36. package/bridge/persistent-home-guard.mjs +6 -0
  37. package/bridge/plugins/aliyun-dlc/index.mjs +47 -0
  38. package/bridge/plugins/aliyun-dlc/manifest.mjs +12 -0
  39. package/bridge/plugins/aliyun-dlc/monitor.mjs +236 -0
  40. package/bridge/plugins/aliyun-dlc/probe.mjs +701 -0
  41. package/bridge/plugins/config-store.mjs +35 -0
  42. package/bridge/plugins/external.mjs +87 -0
  43. package/bridge/plugins/package.mjs +96 -0
  44. package/bridge/plugins/registry.mjs +37 -0
  45. package/bridge/plugins/routes.mjs +27 -0
  46. package/bridge/private-gateway.mjs +371 -0
  47. package/bridge/private-start.mjs +22 -0
  48. package/bridge/probes/app-server-handoff-probe.mjs +89 -0
  49. package/bridge/probes/app-server-writer-probe.mjs +72 -0
  50. package/bridge/probes/assistant-search-probe.mjs +323 -0
  51. package/bridge/probes/dialogue-probe.mjs +464 -0
  52. package/bridge/probes/history-probe.mjs +432 -0
  53. package/bridge/probes/index.mjs +15 -0
  54. package/bridge/probes/new-session-preflight.mjs +16 -0
  55. package/bridge/probes/profile-cancel-probe.mjs +19 -0
  56. package/bridge/probes/profile-delete-probe.mjs +28 -0
  57. package/bridge/probes/profile-list-probe.mjs +117 -0
  58. package/bridge/probes/profile-write-probe.mjs +111 -0
  59. package/bridge/probes/raw-context-probe.mjs +53 -0
  60. package/bridge/probes/remote-probe.mjs +637 -0
  61. package/bridge/probes/submission-probe.mjs +2 -0
  62. package/bridge/probes/takeover-probe.mjs +328 -0
  63. package/bridge/probes/vscode-open-preflight.mjs +23 -0
  64. package/bridge/profile-capacity-policy.mjs +14 -0
  65. package/bridge/providers/acp-forms.py +49 -0
  66. package/bridge/providers/antigravity-interactive.mjs +14 -0
  67. package/bridge/providers/antigravity-interactive.py +349 -0
  68. package/bridge/providers/claude-capabilities.py +52 -0
  69. package/bridge/providers/claude-interactive.mjs +14 -0
  70. package/bridge/providers/claude-interactive.py +463 -0
  71. package/bridge/providers/cli-command.mjs +103 -0
  72. package/bridge/providers/codex-workbench.mjs +164 -0
  73. package/bridge/providers/conversation-routes.mjs +28 -0
  74. package/bridge/providers/conversations.mjs +231 -0
  75. package/bridge/providers/native-commands.mjs +48 -0
  76. package/bridge/providers/native-commands.py +38 -0
  77. package/bridge/providers/native-models.mjs +129 -0
  78. package/bridge/providers/native-session-state.mjs +14 -0
  79. package/bridge/providers/native-session-state.py +96 -0
  80. package/bridge/providers/remote-cli.mjs +75 -0
  81. package/bridge/providers/remote-job.py +130 -0
  82. package/bridge/remote-app-server-command.mjs +203 -0
  83. package/bridge/remote-bootstrap/routes.mjs +51 -0
  84. package/bridge/remote-bootstrap/scope-protocol.mjs +125 -0
  85. package/bridge/remote-bootstrap/service.mjs +597 -0
  86. package/bridge/remote-bootstrap/tunnels.mjs +347 -0
  87. package/bridge/remote-directory-listing.mjs +148 -0
  88. package/bridge/remote-images.mjs +140 -0
  89. package/bridge/remote-profile-home.mjs +39 -0
  90. package/bridge/remote-rollout-locks.mjs +31 -0
  91. package/bridge/remote-videos.mjs +129 -0
  92. package/bridge/research/insights.mjs +522 -0
  93. package/bridge/research/scan-host.mjs +18 -0
  94. package/bridge/rollout-summary.mjs +177 -0
  95. package/bridge/routes/accounts.mjs +326 -0
  96. package/bridge/routes/dialogue.mjs +165 -0
  97. package/bridge/routes/email.mjs +50 -0
  98. package/bridge/routes/management.mjs +291 -0
  99. package/bridge/routes/models.mjs +312 -0
  100. package/bridge/routes/runtime.mjs +82 -0
  101. package/bridge/routes/session-commands.mjs +12 -0
  102. package/bridge/routes/session-delivery.mjs +328 -0
  103. package/bridge/routes/session-lifecycle.mjs +839 -0
  104. package/bridge/routes/system.mjs +289 -0
  105. package/bridge/server.mjs +3357 -0
  106. package/bridge/session-attachments.mjs +150 -0
  107. package/bridge/session-cache-archive.mjs +22 -0
  108. package/bridge/session-catalog/agy-history.py +388 -0
  109. package/bridge/session-catalog/catalog.mjs +110 -0
  110. package/bridge/session-catalog/probe.py +1207 -0
  111. package/bridge/session-catalog/routes.mjs +34 -0
  112. package/bridge/session-profiles.mjs +115 -0
  113. package/bridge/shared-start.mjs +22 -0
  114. package/bridge/start.mjs +205 -0
  115. package/bridge/state-persistence.mjs +405 -0
  116. package/bridge/submissions/settings.mjs +50 -0
  117. package/bridge/terminal-gateway.mjs +171 -0
  118. package/bridge/tmux-delivery.mjs +390 -0
  119. package/bridge/tmux-session-control.mjs +29 -0
  120. package/bridge/transport/ssh-command.mjs +119 -0
  121. package/bridge/ui-server.mjs +257 -0
  122. package/bridge/vscode-opener.mjs +157 -0
  123. package/bridge/web-terminal.mjs +52 -0
  124. package/bridge/workbench/conversation-routes.mjs +31 -0
  125. package/bridge/workbench/directory-probe.mjs +41 -0
  126. package/bridge/workbench/directory-routes.mjs +112 -0
  127. package/bridge/workbench/manager-context.mjs +51 -0
  128. package/bridge/workbench/routes.mjs +40 -0
  129. package/bridge/workbench/scheduler.mjs +131 -0
  130. package/bridge/workbench/service.mjs +301 -0
  131. package/bridge/workbench/store.mjs +64 -0
  132. package/bridge/workbench/task-archive.mjs +46 -0
  133. package/dist/client/.assetsignore +2 -0
  134. package/dist/client/.vite/manifest.json +366 -0
  135. package/dist/client/_headers +3 -0
  136. package/dist/client/agents/LICENSE.lobe-icons +21 -0
  137. package/dist/client/agents/README.md +14 -0
  138. package/dist/client/agents/antigravity.svg +39 -0
  139. package/dist/client/agents/claude.svg +1 -0
  140. package/dist/client/agents/codex.svg +1 -0
  141. package/dist/client/agents/dsh.svg +4 -0
  142. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  143. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  144. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  145. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  146. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  147. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  148. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  149. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  150. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  151. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  152. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  153. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  154. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  155. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  156. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  157. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  158. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  159. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  160. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  161. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  162. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  163. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  164. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  165. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  166. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  167. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  168. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  169. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  170. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  171. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  172. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  173. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  174. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  175. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  176. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  177. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  178. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  179. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  180. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  181. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  182. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  183. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  184. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  185. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  186. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  187. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  188. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  189. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  190. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  191. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  192. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  193. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  194. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  195. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  196. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  197. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  198. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  199. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  200. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  201. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-001175b1.woff2 +0 -0
  202. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-52306abf.woff2 +0 -0
  203. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-875ccdd4.woff2 +0 -0
  204. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-98bbbccb.woff2 +0 -0
  205. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-ff2310f5.woff2 +0 -0
  206. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-013b2f2f.woff2 +0 -0
  207. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-0638449e.woff2 +0 -0
  208. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44745446.woff2 +0 -0
  209. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44e03052.woff2 +0 -0
  210. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-971fb274.woff2 +0 -0
  211. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-f6b33328.woff2 +0 -0
  212. package/dist/client/assets/addon-fit-BZbxZs2G.js +1 -0
  213. package/dist/client/assets/framework-CXnKph_e.js +9 -0
  214. package/dist/client/assets/index-BMior55c.js +3 -0
  215. package/dist/client/assets/index-CNnP2Ses.css +2 -0
  216. package/dist/client/assets/layout-segment-context-DjGudgXn.js +1 -0
  217. package/dist/client/assets/page-CJqXlhDs.js +551 -0
  218. package/dist/client/assets/page-LYzRz6_S.css +1 -0
  219. package/dist/client/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
  220. package/dist/client/assets/xterm-BBgU7shl.js +36 -0
  221. package/dist/client/favicon.svg +6 -0
  222. package/dist/client/file.svg +1 -0
  223. package/dist/client/globe.svg +1 -0
  224. package/dist/client/og.png +0 -0
  225. package/dist/client/scope-logo.svg +11 -0
  226. package/dist/client/window.svg +1 -0
  227. package/dist/server/.vite/manifest.json +14 -0
  228. package/dist/server/__vite_rsc_assets_manifest.js +49 -0
  229. package/dist/server/assets/index-CNnP2Ses.css +2 -0
  230. package/dist/server/image-config.json +1 -0
  231. package/dist/server/index.js +15201 -0
  232. package/dist/server/ssr/__vite_rsc_assets_manifest.js +49 -0
  233. package/dist/server/ssr/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  234. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  235. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  236. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  237. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  238. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  239. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  240. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  241. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  242. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  243. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  244. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  245. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  246. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  247. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  248. package/dist/server/ssr/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  249. package/dist/server/ssr/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  250. package/dist/server/ssr/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  251. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  252. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  253. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  254. package/dist/server/ssr/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  255. package/dist/server/ssr/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  256. package/dist/server/ssr/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  257. package/dist/server/ssr/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  258. package/dist/server/ssr/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  259. package/dist/server/ssr/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  260. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  261. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  262. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  263. package/dist/server/ssr/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  264. package/dist/server/ssr/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  265. package/dist/server/ssr/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  266. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  267. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  268. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  269. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  270. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  271. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  272. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  273. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  274. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  275. package/dist/server/ssr/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  276. package/dist/server/ssr/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  277. package/dist/server/ssr/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  278. package/dist/server/ssr/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  279. package/dist/server/ssr/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  280. package/dist/server/ssr/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  281. package/dist/server/ssr/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  282. package/dist/server/ssr/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  283. package/dist/server/ssr/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  284. package/dist/server/ssr/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  285. package/dist/server/ssr/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  286. package/dist/server/ssr/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  287. package/dist/server/ssr/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  288. package/dist/server/ssr/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  289. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  290. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  291. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  292. package/dist/server/ssr/assets/addon-fit-C09Jj0_f.js +42 -0
  293. package/dist/server/ssr/assets/error-boundary-Dd2ZYXA8.js +277 -0
  294. package/dist/server/ssr/assets/layout-segment-context-HV_Mvyzf.js +37 -0
  295. package/dist/server/ssr/assets/page-BB9Dri2u.js +104686 -0
  296. package/dist/server/ssr/assets/page-LYzRz6_S.css +1 -0
  297. package/dist/server/ssr/assets/xterm-DgzE4ZZ1.js +10232 -0
  298. package/dist/server/ssr/index.js +11840 -0
  299. package/dist/server/ssr/vinext-server.json +1 -0
  300. package/dist/server/vinext-externals.json +1 -0
  301. package/dist/server/vinext-server.json +1 -0
  302. package/dist/server/wrangler.json +1 -0
  303. package/examples/agents/global-agreements.example.md +10 -0
  304. package/examples/agents/research-project.example.md +10 -0
  305. package/examples/agents-media-previews.md +22 -0
  306. package/examples/deployment.example.json +6 -0
  307. package/examples/leak-denylist.example.json +10 -0
  308. package/examples/plugins/hello/index.mjs +4 -0
  309. package/examples/plugins/hello/scope-plugin.json +13 -0
  310. package/examples/workbench.config.json +44 -0
  311. package/lib/account-quota.d.ts +42 -0
  312. package/lib/account-quota.js +121 -0
  313. package/lib/browser-snapshot-cache.js +61 -0
  314. package/lib/conversation-location.js +26 -0
  315. package/lib/conversation.js +62 -0
  316. package/lib/dialogue-refresh.js +14 -0
  317. package/lib/execution-host.js +22 -0
  318. package/lib/formula-preview.js +48 -0
  319. package/lib/i18n.tsx +81 -0
  320. package/lib/incremental-snapshot.js +324 -0
  321. package/lib/manager-plan.js +37 -0
  322. package/lib/markdown-images.js +22 -0
  323. package/lib/markdown-math.js +151 -0
  324. package/lib/markdown-url.js +13 -0
  325. package/lib/model-effort.js +13 -0
  326. package/lib/native-history.d.ts +32 -0
  327. package/lib/native-history.js +94 -0
  328. package/lib/overview-delta.js +41 -0
  329. package/lib/project-view.js +86 -0
  330. package/lib/projects.js +74 -0
  331. package/lib/remote-links.js +95 -0
  332. package/lib/runtime-config.js +70 -0
  333. package/lib/session-activity.js +34 -0
  334. package/lib/session-cache-guard.js +52 -0
  335. package/lib/session-filters.js +38 -0
  336. package/lib/ssh-config.js +26 -0
  337. package/lib/stable-order.js +39 -0
  338. package/lib/subagent-display-prefs.ts +130 -0
  339. package/lib/workbench-config.js +172 -0
  340. package/package.json +105 -4
  341. package/scripts/agent-email-relay.mjs +104 -0
  342. package/scripts/benchmark-bridge.mjs +38 -0
  343. package/scripts/cli-integration-smoke.mjs +64 -0
  344. package/scripts/email-notification-cli.mjs +28 -0
  345. package/scripts/enable-private-access.ps1 +109 -0
  346. package/scripts/export-opensource.mjs +112 -0
  347. package/scripts/fixtures/media/convergence.png +0 -0
  348. package/scripts/fixtures/media/rollout_demo.mp4 +0 -0
  349. package/scripts/fixtures/native-conversations.mjs +465 -0
  350. package/scripts/fixtures/workbench-conversations.mjs +475 -0
  351. package/scripts/install-remote-server.sh +67 -0
  352. package/scripts/lib/export-directory.mjs +38 -0
  353. package/scripts/lib/secret-scanner.mjs +139 -0
  354. package/scripts/plugin-cli.mjs +19 -0
  355. package/scripts/preview-workbench.mjs +669 -0
  356. package/scripts/probe-antigravity-acp.mjs +35 -0
  357. package/scripts/remote-bootstrap-cli.mjs +52 -0
  358. package/scripts/remote-email-tool.py +383 -0
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/layout-segment-context-DjGudgXn.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/framework-CXnKph_e.js","assets/page-CJqXlhDs.js","assets/page-LYzRz6_S.css"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";import{i as r,n as i,r as a,t as o}from"./framework-CXnKph_e.js";var s=`X-Vinext-Params`,c=`X-Vinext-Mounted-Slots`,l=`X-Vinext-Interception-Context`,u=`X-Vinext-Rsc-Render-Mode`,d=`x-rsc-action`,f=`x-nextjs-action-not-found`,p=`x-action-redirect`,m=`Next-Router-State-Tree`,h=`Next-Router-Prefetch`,g=`Next-Router-Segment-Prefetch`,_=`Next-Url`,v=`[\\u0000-\\u001F \\u200B\\uFEFF]*`,y=`[\\r\\n\\t]*`;function b(e){let t=e.split(``).join(y);return RegExp(`^${v}${t}${y}:`,`i`)}var x=[b(`javascript`),b(`data`),b(`vbscript`)],S=`Next.js has blocked a javascript: URL as a security precaution.`;function C(e){let t=``+e;return x.some(e=>e.test(t))}function ee(e){if(C(e))throw Error(S)}var w=`navigation`,T=`refresh-preserve-ui`,E=`action-rerender-preserve-ui`;function D(e){switch(e){case T:return T;case E:return E;default:return w}}var te=`0.0.50`;function O(e){if(typeof window>`u`)return;let t=window.next;if(t){e.version!==void 0&&(t.version=e.version),e.appDir!==void 0&&(t.appDir=e.appDir),e.router!==void 0&&(t.router=e.router),e.__pendingUrl!==void 0&&(t.__pendingUrl=e.__pendingUrl),e.__internal_src_page!==void 0&&(t.__internal_src_page=e.__internal_src_page);return}window.next={version:e.version??te,...e}}var k=null;function A(e){return Object.values(e).some(e=>typeof e==`function`)?e:null}function j(e){return k=e,k}function M(e,t){k?.onRouterTransitionStart?.(e,t)}function ne(e={}){return{schemaVersion:1,graphVersion:e.graphVersion??null,deploymentVersion:e.deploymentVersion??null,appElementsSchemaVersion:1,rscPayloadSchemaVersion:1,rootBoundaryId:e.rootBoundaryId??null,renderEpoch:e.renderEpoch??null}}function re(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function N(e){return typeof e==`string`||e===null}function ie(e){return e.schemaVersion===1&&e.appElementsSchemaVersion===1&&e.rscPayloadSchemaVersion===1}function P(e){return!re(e)||!ie(e)||!N(e.graphVersion)||!N(e.deploymentVersion)||!N(e.rootBoundaryId)||!N(e.renderEpoch)?null:{schemaVersion:1,graphVersion:e.graphVersion,deploymentVersion:e.deploymentVersion,appElementsSchemaVersion:1,rscPayloadSchemaVersion:1,rootBoundaryId:e.rootBoundaryId,renderEpoch:e.renderEpoch}}var F=t(r(),1),I=`\0`,ae=`__artifactCompatibility`,oe=`__interceptionContext`,L=`__layoutIds`,R=`__layoutFlags`,z=`__route`,se=`__rootLayout`,ce=`__VINEXT_UNMATCHED_SLOT__`,B=Symbol.for(`vinext.unmatchedSlot`);function le(e,t){return t===null?e:`${e}${I}${t}`}function ue(e,t){return le(`route:${e}`,t)}function de(e,t){return le(`page:${e}`,t)}function fe(e){return`layout:${e}`}function pe(e){return`template:${e}`}function me(e,t){return`slot:${e}:${t}`}function he(e,t){return le(e,t)}function ge(e){let t=e.indexOf(I),n=t===-1?e:e.slice(0,t);return n.startsWith(`/`)?{interceptionContext:t===-1?null:e.slice(t+1),path:n}:null}function _e(e){return e.startsWith(`/`)?e:null}function ve(e){if(e.startsWith(`route:`)){let t=ge(e.slice(6));return t?{interceptionContext:t.interceptionContext,kind:`route`,path:t.path}:null}if(e.startsWith(`page:`)){let t=ge(e.slice(5));return t?{interceptionContext:t.interceptionContext,kind:`page`,path:t.path}:null}if(e.startsWith(`layout:`)){let t=_e(e.slice(7));return t?{kind:`layout`,treePath:t}:null}if(e.startsWith(`template:`)){let t=_e(e.slice(9));return t?{kind:`template`,treePath:t}:null}if(e.startsWith(`slot:`)){let t=e.slice(5),n=t.indexOf(`:`);if(n<=0)return null;let r=t.slice(0,n),i=_e(t.slice(n+1));return i?{kind:`slot`,name:r,treePath:i}:null}return null}function ye(e){if(!e.startsWith(`slot:`))return!1;let t=e.slice(5),n=t.indexOf(`:`);return n>0&&t.charCodeAt(n+1)===47}function be(e){return{[z]:e.routeId,[oe]:e.interceptionContext,[L]:[...e.layoutIds??[]],[se]:e.rootLayoutTreePath}}function xe(e){let t=!1;for(let[n,r]of Object.entries(e))if(ye(n)&&r===`__VINEXT_UNMATCHED_SLOT__`){t=!0;break}if(!t)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=ye(t)&&r===`__VINEXT_UNMATCHED_SLOT__`?B:r;return n}function Se(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;for(let t of Object.values(e))if(t!==`s`&&t!==`d`)return!1;return!0}function Ce(e){return Se(e)?e:{}}function we(e){if(e===void 0)return[];if(!Array.isArray(e))throw Error(`[vinext] Invalid __layoutIds in App Router payload: expected layout id string[]`);let t=[];for(let n of e){if(typeof n!=`string`)throw Error(`[vinext] Invalid __layoutIds in App Router payload: expected layout id string[]`);if(ve(n)?.kind!==`layout`)throw Error(`[vinext] Invalid __layoutIds in App Router payload: expected layout ids`);t.push(n)}return t}function Te(e){return!(typeof e!=`object`||!e||Array.isArray(e)||(0,F.isValidElement)(e))}function Ee(e,t){return{...e,[R]:t}}function V(e){return Te(e.element)?{...e.element,[R]:e.layoutFlags,[ae]:e.artifactCompatibility??ne()}:e.element}function De(e){return e===void 0?ne():P(e)??ne()}function Oe(e){let t=e[z];if(typeof t!=`string`)throw Error(`[vinext] Missing __route string in App Router payload`);let n=e[oe];if(n!=null&&typeof n!=`string`)throw Error(`[vinext] Invalid __interceptionContext in App Router payload`);let r=e[se];if(r===void 0)throw Error(`[vinext] Missing __rootLayout key in App Router payload`);if(r!==null&&typeof r!=`string`)throw Error(`[vinext] Invalid __rootLayout in App Router payload: expected string or null`);let i=Ce(e[R]),a=we(e[L]);return{artifactCompatibility:De(e[ae]),interceptionContext:n??null,layoutIds:a,layoutFlags:i,routeId:t,rootLayoutTreePath:r}}var H={keys:{artifactCompatibility:ae,interceptionContext:oe,layoutIds:L,layoutFlags:R,rootLayout:se,route:z},unmatchedSlotValue:ce,createMetadataEntries:be,decode:xe,encodeCacheKey:he,encodeLayoutId:fe,encodeOutgoingPayload:V,encodePageId:de,encodeRouteId:ue,encodeSlotId:me,encodeTemplateId:pe,isSlotId:ye,parseElementKey:ve,readMetadata:Oe,withLayoutFlags:Ee};function ke(e){return e&&Array.from(new Set(e.split(/\s+/).filter(Boolean))).sort().join(` `)||null}function Ae(e){return Object.keys(e).filter(t=>{let n=e[t];return H.isSlotId(t)&&n!=null&&n!==B}).sort()}function je(e){return ke(Ae(e).join(` `))}function Me(e,t){return t??e}var Ne=`_rsc`,Pe=`text/x-component`;[`RSC`,`Accept`,m,h,g,_,l,c,u].join(`, `);var Fe=12,Ie=new TextEncoder;function Le(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function Re(e){return e??`0`}function ze(e){let t=D(e);return t===`navigation`?null:t}function Be(e,t={}){let n=[e.get(h),e.get(g),e.get(m),e.get(_),e.get(l),e.get(c),...t.includeRenderModeHeader===!1?[]:[ze(e.get(u))]];return n.every(e=>e===null)?null:n.map(Re).join(`,`)}async function Ve(e){let t=await globalThis.crypto.subtle.digest(`SHA-256`,Ie.encode(e));return Le(new Uint8Array(t).subarray(0,Fe))}function He(e){return(e.search.startsWith(`?`)?e.search.slice(1):e.search).split(`&`).filter(e=>e.length>0&&!Ue(e))}function Ue(e){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t);try{return decodeURIComponent(n.replaceAll(`+`,` `))===Ne}catch{return n===Ne}}async function We(e){let t=Be(e);return t===null?``:Ve(t)}function Ge(e,t){let n=He(e);n.push(t.length>0?`${Ne}=${t}`:Ne),e.search=`?${n.join(`&`)}`}function Ke(e){let t=He(e);e.search=t.length>0?`?${t.join(`&`)}`:``}function qe(e){return e.endsWith(`.rsc`)?e.slice(0,-4):e}function Je(e={}){let t=new Headers({Accept:Pe,RSC:`1`});e.interceptionContext!==void 0&&e.interceptionContext!==null&&t.set(l,e.interceptionContext),e.mountedSlotsHeader!==void 0&&e.mountedSlotsHeader!==null&&t.set(c,e.mountedSlotsHeader);let n=e.renderMode??`navigation`;return n!==`navigation`&&t.set(u,n),t}function Ye(e){let t=e.indexOf(`#`),n=t===-1?e:e.slice(0,t),r=n.indexOf(`?`),i=r===-1?n:n.slice(0,r),a=r===-1?``:n.slice(r);return`${i.length>1&&i.endsWith(`/`)?i.slice(0,-1):i}.rsc${a}`}async function Xe(e,t){let n=new URL(Ye(e),`http://vinext.local`);return Ge(n,await We(t)),`${n.pathname}${n.search}`}function Ze(e,t){return t?e===t||e.startsWith(t+`/`):!1}function U(e,t){return Ze(e,t)?e.slice(t.length)||`/`:e}function Qe(e){if(typeof window>`u`)return null;try{let t=e.startsWith(`//`)?new URL(e,window.location.origin):new URL(e);if(t.origin===window.location.origin)return t.pathname+t.search+t.hash}catch{}return null}function $e(e,t){let n=Qe(e);if(n==null||!t)return n;try{let e=new URL(n,`http://vinext.local`);return Ze(e.pathname,t)?U(e.pathname,t)+e.search+e.hash:null}catch{return n}}function et(e,t){return!t||!e.startsWith(`/`)||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)?e:t+e}function tt(e,t,n=``){let r=t??(typeof window<`u`?window.location.href:void 0);if(!r||e.startsWith(`/`)||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`))return e;try{let t=new URL(e,r);return(n&&t.pathname===n?``:n?U(t.pathname,n):t.pathname)+t.search+t.hash}catch{return e}}function nt(e,t,n=``){let r=tt(e,t,n);return n?r===``?n:r.startsWith(`?`)||r.startsWith(`#`)?n+r:et(r,n):et(r,n)}function rt(e,t,n=``){try{let r=new URL(t),i=new URL(e,t);return U(r.pathname,n)===U(i.pathname,n)&&r.search===i.search&&i.hash!==``}catch{return!1}}var it=class extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}},at=class extends URLSearchParams{append(e,t){throw new it}delete(e,t){throw new it}set(e,t){throw new it}sort(){throw new it}},ot=Symbol.for(`vinext.layoutSegmentContext`),st=Symbol.for(`vinext.serverInsertedHTMLContext`);function ct(){if(typeof F.createContext!=`function`)return null;let e=globalThis;return e[st]||(e[st]=F.createContext(null)),e[st]??null}ct();function lt(){if(typeof F.createContext!=`function`)return null;let e=globalThis;return e[ot]||(e[ot]=F.createContext({children:[]})),e[ot]??null}var ut=Symbol.for(`vinext.navigation.globalAccessors`),dt=Symbol.for(`vinext.navigation.clientHydrationContext`);function ft(){return globalThis[ut]}function pt(){let e=globalThis;if(Object.prototype.hasOwnProperty.call(e,dt))return e[dt]??null}function mt(e){globalThis[dt]=e}var ht=null,gt=()=>{if(typeof window<`u`){let e=pt();return e===void 0?ht:e}let e=ft();return e?e.getServerContext():ht},_t=e=>{if(typeof window<`u`){ht=e,mt(e);return}let t=ft();t?t.setServerContext(e):ht=e};function vt(e){_t(e)}var W=typeof window>`u`;function yt(){return W?null:U(window.location.pathname,``)}function bt(){return W?`/`:window.location.pathname+window.location.search}function xt(){return W?new Map:(window.__VINEXT_RSC_PREFETCH_CACHE__||(window.__VINEXT_RSC_PREFETCH_CACHE__=new Map),window.__VINEXT_RSC_PREFETCH_CACHE__)}function St(){return W?new Set:(window.__VINEXT_RSC_PREFETCHED_URLS__||(window.__VINEXT_RSC_PREFETCHED_URLS__=new Set),window.__VINEXT_RSC_PREFETCHED_URLS__)}function Ct(){let e=xt();if(e.size<50)return;let t=Date.now(),n=St();for(let[r,i]of e)t-i.timestamp>=3e4&&(e.delete(r),n.delete(r));for(;e.size>=50;){let t=e.keys().next().value;if(t!==void 0)e.delete(t),n.delete(t);else break}}async function wt(e){return{buffer:await e.arrayBuffer(),contentType:e.headers.get(`content-type`)??`text/x-component`,mountedSlotsHeader:e.headers.get(c),paramsHeader:e.headers.get(s),url:e.url}}function Tt(e,t=!0){let n=new Headers({"content-type":e.contentType});return e.mountedSlotsHeader!=null&&n.set(c,e.mountedSlotsHeader),e.paramsHeader!=null&&n.set(s,e.paramsHeader),new Response(t?e.buffer.slice(0):e.buffer,{status:200,headers:n})}function Et(e,t,n=null,r=null){let i=H.encodeCacheKey(e,n),a=xt(),o=St(),s={outcome:`pending`,timestamp:Date.now()};s.pending=t.then(async e=>{e.ok?s.snapshot={...await wt(e),mountedSlotsHeader:r}:(o.delete(i),a.delete(i))}).catch(()=>{o.delete(i),a.delete(i)}).finally(()=>{s.pending=void 0,s.snapshot&&(s.outcome=`cache-seeded`)}),a.set(i,s),Ct()}function Dt(e,t=null,n=null){let r=H.encodeCacheKey(e,t),i=xt(),a=i.get(r);return!a||a.pending||a.outcome!==`cache-seeded`?null:(i.delete(r),St().delete(r),a.snapshot?(a.snapshot.mountedSlotsHeader??null)!==n||Date.now()-a.timestamp>=3e4?null:a.snapshot:null)}var Ot=Symbol.for(`vinext.clientNavigationState`),kt=Symbol.for(`vinext.mountedSlotsHeader`);function At(e){if(W)return;let t=window;t[kt]=e}function jt(){return W?null:window[kt]??null}function G(){if(W)return null;let e=window;return e[Ot]??={listeners:new Set,cachedSearch:window.location.search,cachedReadonlySearchParams:new at(window.location.search),cachedPathname:U(window.location.pathname,``),clientParams:{},clientParamsJson:`{}`,pendingClientParams:null,pendingClientParamsJson:null,pendingPathname:null,pendingPathnameNavId:null,originalPushState:window.history.pushState.bind(window.history),originalReplaceState:window.history.replaceState.bind(window.history),patchInstalled:!1,hasPendingNavigationUpdate:!1,suppressUrlNotifyCount:0,navigationSnapshotActiveCount:0},e[Ot]}function Mt(){let e=G();if(e)for(let t of e.listeners)t()}function Nt(){return G()?.cachedPathname??`/`}function Pt(){let e=G();if(!e)return!1;let t=!1,n=U(window.location.pathname,``);n!==e.cachedPathname&&(e.cachedPathname=n,t=!0);let r=window.location.search;return r!==e.cachedSearch&&(e.cachedSearch=r,e.cachedReadonlySearchParams=new at(r),t=!0),t}function Ft(){let e=G();e&&e.navigationSnapshotActiveCount++}var It=Symbol.for(`vinext.clientNavigationRenderContext`);function Lt(){if(typeof F.createContext!=`function`)return null;let e=globalThis;return e[It]||(e[It]=F.createContext(null)),e[It]??null}function Rt(){let e=Lt();if(!e||typeof F.useContext!=`function`)return null;try{return F.useContext(e)}catch{return null}}function zt(e,t){let n=typeof window<`u`?window.location.origin:`http://localhost`,r=new URL(e,n);return{pathname:U(r.pathname,``),searchParams:new at(r.search),params:t}}var Bt=`{}`;function Vt(e){let t=G();if(!t){let t=JSON.stringify(e);t!==Bt&&(Bt=t);return}let n=JSON.stringify(e);n!==t.clientParamsJson&&(t.clientParams=e,t.clientParamsJson=n,t.pendingClientParams=null,t.pendingClientParamsJson=null,Mt())}function Ht(e){let t=G();if(!t)return;let n=JSON.stringify(e);n!==t.clientParamsJson&&n!==t.pendingClientParamsJson&&(t.pendingClientParams=e,t.pendingClientParamsJson=n,t.hasPendingNavigationUpdate=!0)}function Ut(e,t){let n=G();n&&(n.pendingPathname=U(e,``),n.pendingPathnameNavId=t)}function Wt(e){let t=G();t&&(t.pendingPathnameNavId===null||t.pendingPathnameNavId===e)&&(t.pendingPathname=null,t.pendingPathnameNavId=null)}function Gt(e){let t=G();return t?(t.listeners.add(e),()=>{t.listeners.delete(e)}):()=>{}}function Kt(){if(W)return gt()?.pathname??`/`;let e=Rt(),t=F.useSyncExternalStore(Gt,Nt,()=>gt()?.pathname??`/`);return e&&(G()?.navigationSnapshotActiveCount??0)>0?e.pathname:t}function qt(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)}function Jt(e){return typeof window>`u`?!1:e.startsWith(`#`)?!0:rt(e,window.location.href,``)}function Yt(e){if(!e||e===`#`){window.scrollTo(0,0);return}let t=e.slice(1),n=document.getElementById(t);n&&n.scrollIntoView({behavior:`auto`})}function Xt(e){let t=G();if(!t)return e();t.suppressUrlNotifyCount+=1;try{return e()}finally{--t.suppressUrlNotifyCount}}function K(e,t){if(W)return;let n=G();if(!n)return;(e!==void 0||t?.releaseSnapshot===!0)&&n.navigationSnapshotActiveCount>0&&--n.navigationSnapshotActiveCount;let r=Pt();n.pendingClientParams!==null&&n.pendingClientParamsJson!==null&&(n.clientParams=n.pendingClientParams,n.clientParamsJson=n.pendingClientParamsJson,n.pendingClientParams=null,n.pendingClientParamsJson=null),(n.pendingPathnameNavId===null||e!==void 0&&n.pendingPathnameNavId===e)&&(n.pendingPathname=null,n.pendingPathnameNavId=null);let i=r||n.hasPendingNavigationUpdate;n.hasPendingNavigationUpdate=!1,i&&Mt()}function Zt(e,t,n){Xt(()=>{G()?.originalPushState.call(window.history,e,t,n)})}function q(e,t,n){Xt(()=>{G()?.originalReplaceState.call(window.history,e,t,n)})}function Qt(){q({...window.history.state??{},__vinext_scrollX:window.scrollX,__vinext_scrollY:window.scrollY},``)}function $t(e){if(e&&typeof e==`object`&&`__vinext_scrollY`in e){let{__vinext_scrollX:t,__vinext_scrollY:n}=e;Promise.resolve().then(()=>{let e=window.__VINEXT_RSC_PENDING__??null;e?e.then(()=>{requestAnimationFrame(()=>{window.scrollTo(t,n)})}):requestAnimationFrame(()=>{window.scrollTo(t,n)})})}}async function en(e,t,n,r=!1){let i=e;if(qt(e)){let n=$e(e,``);if(n==null){t===`replace`?window.location.replace(e):window.location.assign(e);return}i=n}let a=nt(i,window.location.href,``);if(M(a,t),t===`push`&&Qt(),Jt(a)){let e=a.includes(`#`)?a.slice(a.indexOf(`#`)):``;t===`replace`?q(null,``,a):Zt(null,``,a),K(),n&&Yt(e);return}let o=a.indexOf(`#`),s=o===-1?``:a.slice(o);typeof window.__VINEXT_RSC_NAVIGATE__==`function`?await window.__VINEXT_RSC_NAVIGATE__(a,0,`navigate`,t,void 0,r):(t===`replace`?q(null,``,a):Zt(null,``,a),K()),n&&(s?Yt(s):window.scrollTo(0,0))}var tn={bfcacheId:`0`,push(e,t){ee(e),!W&&F.startTransition(()=>{en(e,`push`,t?.scroll!==!1,!0)})},replace(e,t){ee(e),!W&&F.startTransition(()=>{en(e,`replace`,t?.scroll!==!1,!0)})},back(){W||window.history.back()},forward(){W||window.history.forward()},refresh(){if(W)return;let e=window.__VINEXT_CLEAR_NAV_CACHES__;typeof e==`function`&&e();let t=window.__VINEXT_RSC_NAVIGATE__;typeof t==`function`&&F.startTransition(()=>{t(window.location.href,0,`refresh`,void 0,void 0,!0)})},prefetch(e){ee(e),!W&&(async()=>{let t=e;if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)){let n=$e(e,``);if(n==null)return;t=n}let n=nt(t,window.location.href,``),r=yt(),i=jt(),a=Je({interceptionContext:r});i&&a.set(c,i);let o=await Xe(n,a),s=H.encodeCacheKey(o,r),l=St();l.has(s)||(l.add(s),Et(o,fetch(o,{headers:a,credentials:`include`,priority:`low`}),r,i))})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})}},nn=tn;function rn(){return tn}var an=`NEXT_HTTP_ERROR_FALLBACK`,on=class extends Error{digest;constructor(e,t){super(e),this.digest=t}};function sn(){throw new on(`NEXT_NOT_FOUND`,`${an};404`)}if(!W){let e=G();e&&!e.patchInstalled&&(e.patchInstalled=!0,window.addEventListener(`popstate`,e=>{typeof window.__VINEXT_RSC_NAVIGATE__!=`function`&&(K(),$t(e.state))}),window.history.pushState=function(t,n,r){e.originalPushState.call(window.history,t,n,r),e.suppressUrlNotifyCount===0&&K()},window.history.replaceState=function(t,n,r){e.originalReplaceState.call(window.history,t,n,r),e.suppressUrlNotifyCount===0&&K()})}function cn(e){return!e||typeof e!=`object`||!(`digest`in e)?null:String(e.digest)}function ln(e){let t=cn(e);return t===null?!1:t===`NEXT_NOT_FOUND`||t.startsWith(`NEXT_HTTP_ERROR_FALLBACK;`)||t.startsWith(`NEXT_REDIRECT;`)}var un=e({DevRecoveryBoundary:()=>On,ErrorBoundary:()=>xn,ErrorBoundaryInner:()=>bn,ForbiddenBoundary:()=>Tn,ForbiddenBoundaryInner:()=>wn,NotFoundBoundary:()=>Cn,RedirectBoundary:()=>yn,RedirectErrorBoundary:()=>vn,UnauthorizedBoundary:()=>Dn,UnauthorizedBoundaryInner:()=>En}),J=a();function dn(e){return e==null||e===``?null:e}function Y(e){return{previousPathname:e.pathname,previousResetKey:dn(e.resetKey)}}function fn(e,t){let n=dn(e.previousResetKey),r=dn(t.previousResetKey);return n!==null||r!==null?n!==r:e.previousPathname!==t.previousPathname}function pn(e){return cn(e)?.startsWith(`NEXT_REDIRECT;`)??!1}function mn(e){try{return decodeURIComponent(e)}catch{return e}}function hn(e){let t=e.digest.split(`;`),n=t.length>=5?t.slice(2,-2).join(`;`):t[2];return n?mn(n):null}function gn(e){return e.digest.split(`;`,2)[1]===`push`?`push`:`replace`}function _n({redirect:e,redirectType:t}){let n=rn();return F.useEffect(()=>{F.startTransition(()=>{t===`push`?n.push(e):n.replace(e)})},[e,t,n]),null}var vn=class extends F.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if(pn(e)){if(e.handled)return{redirect:null,redirectType:null};let t=hn(e);if(t===null)throw e;return{redirect:t,redirectType:gn(e)}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return e!==null&&t!==null?(0,J.jsx)(_n,{redirect:e,redirectType:t}):this.props.children}};function yn({children:e}){return(0,J.jsx)(vn,{children:e})}var bn=class extends F.Component{constructor(e){super(e),this.state={error:null,...Y(e)}}static getDerivedStateFromProps(e,t){let n=Y(e);return t.error&&fn(n,t)?{error:null,...n}:{error:t.error,...n}}static getDerivedStateFromError(e){if(ln(e))throw e;return{error:{thrownValue:e}}}reset=()=>{this.setState({error:null})};render(){if(this.state.error){let e=this.props.fallback;return(0,J.jsx)(e,{error:this.state.error.thrownValue,reset:this.reset})}return this.props.children}};function xn({fallback:e,children:t,resetKey:n}){return(0,J.jsx)(bn,{pathname:Kt(),resetKey:n,fallback:e,children:t})}var Sn=class extends F.Component{constructor(e){super(e),this.state={notFound:!1,...Y(e)}}static getDerivedStateFromProps(e,t){let n=Y(e);return t.notFound&&fn(n,t)?{notFound:!1,...n}:{notFound:t.notFound,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e){let t=String(e.digest);if(t===`NEXT_NOT_FOUND`||t===`NEXT_HTTP_ERROR_FALLBACK;404`)return{notFound:!0}}throw e}render(){return this.state.notFound?this.props.fallback:this.props.children}};function Cn({fallback:e,children:t,resetKey:n}){return(0,J.jsx)(Sn,{pathname:Kt(),resetKey:n,fallback:e,children:t})}var wn=class extends F.Component{constructor(e){super(e),this.state={forbidden:!1,...Y(e)}}static getDerivedStateFromProps(e,t){let n=Y(e);return t.forbidden&&fn(n,t)?{forbidden:!1,...n}:{forbidden:t.forbidden,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;403`)return{forbidden:!0};throw e}render(){return this.state.forbidden?this.props.fallback:this.props.children}};function Tn({fallback:e,children:t,resetKey:n}){return(0,J.jsx)(wn,{pathname:Kt(),resetKey:n,fallback:e,children:t})}var En=class extends F.Component{constructor(e){super(e),this.state={unauthorized:!1,...Y(e)}}static getDerivedStateFromProps(e,t){let n=Y(e);return t.unauthorized&&fn(n,t)?{unauthorized:!1,...n}:{unauthorized:t.unauthorized,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;401`)return{unauthorized:!0};throw e}render(){return this.state.unauthorized?this.props.fallback:this.props.children}};function Dn({fallback:e,children:t,resetKey:n}){return(0,J.jsx)(En,{pathname:Kt(),resetKey:n,fallback:e,children:t})}var On=class extends F.Component{constructor(e){super(e),this.state={error:null,previousResetKey:e.resetKey}}static getDerivedStateFromProps(e,t){return e.resetKey===t.previousResetKey?null:{error:null,previousResetKey:e.resetKey}}static getDerivedStateFromError(e){if(ln(e))throw e;return{error:{thrownValue:e}}}componentDidCatch(){this.props.onCatch?.(this.props.resetKey)}render(){return this.state.error?null:this.props.children}},kn=e({Children:()=>In,ChildrenContext:()=>Mn,ElementsContext:()=>jn,ParallelSlot:()=>Ln,ParallelSlotsContext:()=>Nn,Slot:()=>Fn,UNMATCHED_SLOT:()=>B,mergeElements:()=>Pn}),An=Object.freeze({}),jn=F.createContext(An),Mn=F.createContext(null),Nn=F.createContext(null);function Pn(e,t,n={}){let r=typeof n==`boolean`?n:n.clearAbsentSlots??!1,i=typeof n==`boolean`?!n:n.preserveAbsentSlots??!0,a=typeof n==`boolean`?[]:n.preserveElementIds??[],o={...t};for(let t of a)if(!Object.hasOwn(o,t)&&Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(o[t]=n)}let s=new Set([...Object.keys(e),...Object.keys(t)].filter(e=>H.isSlotId(e)));for(let n of s)t[n]===B&&Object.hasOwn(e,n)&&(o[n]=e[n]);if(r)for(let e of s)Object.hasOwn(t,e)||delete o[e];else if(i){for(let t of s)if(!Object.hasOwn(o,t)&&Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(o[t]=n)}}return o}function Fn({id:e,children:t,parallelSlots:n}){let r=F.useContext(jn);if(!Object.hasOwn(r,e))return null;let i=r[e];return i===B&&sn(),(0,J.jsx)(Nn.Provider,{value:n??null,children:(0,J.jsx)(Mn.Provider,{value:t??null,children:i})})}function In(){return F.useContext(Mn)}function Ln({name:e}){return F.useContext(Nn)?.[e]??null}j(A(e({})));function Rn(e){return!!e&&typeof e==`object`&&(`returnValue`in e||`root`in e)}function zn(e){return Rn(e)?e.root!==void 0:!0}function Bn(){return globalThis}function Vn(){return Error(`The connection to the page was unexpectedly closed, possibly due to the stop button being clicked, loss of Wi-Fi, or an unstable internet connection.`)}function Hn(e){let t=new TextEncoder;return new ReadableStream({start(n){for(let r of e)n.enqueue(t.encode(r));n.close()}})}function Un(){let e=new TextEncoder;return new ReadableStream({start(t){let n=Bn(),r=n.__VINEXT_RSC_CHUNKS__??[];for(let n of r)t.enqueue(e.encode(n));if(n.__VINEXT_RSC_DONE__){t.close();return}let i=!1,a,o=()=>{let e=a;a=void 0,e?.()},s=()=>{i||(i=!0,o(),t.close())},c=()=>{i||(i=!0,o(),t.error(Vn()))},l=n.__VINEXT_RSC_CHUNKS__??=[];if(l.push=function(...r){let a=Array.prototype.push.apply(this,r);if(i)return a;for(let n of r)t.enqueue(e.encode(n));return n.__VINEXT_RSC_DONE__&&s(),a},typeof document<`u`)if(document.readyState===`loading`)document.addEventListener(`DOMContentLoaded`,c),a=()=>document.removeEventListener(`DOMContentLoaded`,c);else{let e=setTimeout(c);a=()=>clearTimeout(e)}}})}var X={commitCurrent:`NC_COMMIT`,prefetchOnly:`NC_PREFETCH_ONLY`,requestWork:`NC_REQUEST`,rootBoundaryChanged:`NC_ROOT`,rootBoundaryUnknown:`NC_ROOT_UNKNOWN`,staleOperation:`NC_STALE`},Wn={hardNavigate:`NT_HARD_NAVIGATE`,noCommit:`NT_NO_COMMIT`,visibleCommit:`NT_VISIBLE_COMMIT`};function Gn(e){return{...e.activeNavigationId===void 0?{}:{activeNavigationId:e.activeNavigationId},currentRootLayoutTreePath:e.currentRootLayoutTreePath,currentVisibleCommitVersion:e.currentVisibleCommitVersion,nextRootLayoutTreePath:e.nextRootLayoutTreePath,...e.startedNavigationId===void 0?{}:{startedNavigationId:e.startedNavigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion}}function Kn(e,t={}){return{code:e,fields:{...t}}}function Z(e,t={}){return{schemaVersion:0,entries:[Kn(e,t)]}}function qn(e,t,n={}){return{schemaVersion:e.schemaVersion,entries:[Kn(t,n),...e.entries]}}function Jn(e){return{kind:`requestWork`,token:e.state.nextOperationToken,work:e.work,trace:Z(X.requestWork,{eventKind:e.eventKind,targetHref:Yn(e.work)})}}function Yn(e){switch(e.kind){case`flight`:case`prefetch`:return e.href;case`traverseFlight`:return null;default:throw Error(`[vinext] Unknown requested navigation work: `+String(e))}}function Xn(e){return e.state.traceFields??Gn({currentRootLayoutTreePath:e.state.visibleSnapshot.rootBoundaryId,currentVisibleCommitVersion:e.state.visibleCommitVersion,nextRootLayoutTreePath:e.event.result.targetSnapshot.rootBoundaryId,startedVisibleCommitVersion:e.event.token.baseVisibleCommitVersion})}function Zn(e,t){return e===null||t===null?`rootBoundaryUnknownFallback`:e===t?`currentRootBoundary`:`rootBoundaryChanged`}function Qn(e,t){if(Zn(e.rootBoundaryId,t.rootBoundaryId)!==`currentRootBoundary`)return[];let n=[],r=Math.min(e.layoutIds.length,t.layoutIds.length);for(let i=0;i<r;i++){let r=e.layoutIds[i];if(r!==t.layoutIds[i])break;n.push(r)}return n}function $n(e,t){return er(e,Qn(e,t))}function er(e,t){if(t.length===0)return[];let n=new Set(t),r=[],i=new Set;for(let t of e.mountedParallelSlots)t.ownerLayoutId!==null&&n.has(t.ownerLayoutId)&&(i.has(t.slotId)||(r.push(t.slotId),i.add(t.slotId)));return r}function tr(e,t){let n=Qn(e,t);return[...n,...er(e,n)]}function nr(e){let t=Qn(e.currentSnapshot,e.targetSnapshot);return e.lane===`traverse`?t:[...t,...er(e.currentSnapshot,t)]}function rr(e){let t=Xn(e);if(e.event.token.lane===`prefetch`)return{kind:`noCommit`,reason:`prefetchOnly`,token:e.event.token,trace:Z(X.prefetchOnly,t)};let n=Zn(e.state.visibleSnapshot.rootBoundaryId,e.event.result.targetSnapshot.rootBoundaryId);return n===`rootBoundaryChanged`?{kind:`hardNavigate`,reason:`rootBoundaryChanged`,token:e.event.token,trace:Z(X.rootBoundaryChanged,t),url:e.event.result.href}:n===`rootBoundaryUnknownFallback`?{kind:`proposeCommit`,proposal:{preserveAbsentSlots:!0,preserveElementIds:[],reason:`rootBoundaryUnknownFallback`,targetSnapshot:e.event.result.targetSnapshot},token:e.event.token,trace:Z(X.rootBoundaryUnknown,t)}:{kind:`proposeCommit`,proposal:{preserveAbsentSlots:!1,preserveElementIds:nr({currentSnapshot:e.state.visibleSnapshot,lane:e.event.token.lane,targetSnapshot:e.event.result.targetSnapshot}),reason:`currentRootBoundary`,targetSnapshot:e.event.result.targetSnapshot},token:e.event.token,trace:Z(X.commitCurrent,t)}}function ir(e){switch(e.event.kind){case`navigate`:return Jn({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`flight`,mode:e.event.mode}});case`refresh`:return Jn({eventKind:e.event.kind,state:e.state,work:{href:e.state.visibleSnapshot.displayUrl,kind:`flight`,mode:`refresh`}});case`traverse`:return Jn({eventKind:e.event.kind,state:e.state,work:{direction:e.event.direction,historyState:e.event.historyState,kind:`traverseFlight`}});case`prefetch`:return Jn({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`prefetch`}});case`flightResponseArrived`:return rr({event:e.event,state:e.state});default:{let t=e.event;throw Error(`[vinext] Unknown navigation event: `+String(t))}}}var ar={classifyRootBoundaryTransition:Zn,plan:ir,resolveCurrentRootBoundaryElementPersistence:tr,resolveMountedParallelSlotPersistence:$n,resolveSameLayoutAncestorPersistence:Qn},or=`__vinext_previousNextUrl`;function sr(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e))t[n]=r;return t}function cr(e,t){let n=sr(e);return t===null?delete n[or]:n[or]=t,Object.keys(n).length>0?n:null}function lr(e){let t=sr(e)[or];return typeof t==`string`?t:null}function ur(e){return{id:e.id,lane:e.lane,startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`pending`}}function dr(e,t=``){return e===null?null:U(new URL(e,`http://localhost`).pathname,t)}function fr(e){let t=Je();t.set(d,e.actionId);let n=dr(e.previousNextUrl,e.basePath);n!==null&&t.set(l,n);let r=je(e.elements);return r!==null&&t.set(c,r),{headers:t}}function pr(e){let t=mr(e);return e.startedNavigationId!==e.activeNavigationId||e.pending.action.operation.startedVisibleCommitVersion!==e.currentState.visibleCommitVersion?{disposition:`skip`,preserveElementIds:[],trace:Z(X.staleOperation,t)}:Sr(xr({currentState:e.currentState,pending:e.pending,targetHref:e.targetHref,traceFields:t}))}function mr(e){return{...Gn({activeNavigationId:e.activeNavigationId,currentRootLayoutTreePath:e.currentState.rootLayoutTreePath,currentVisibleCommitVersion:e.currentState.visibleCommitVersion,nextRootLayoutTreePath:e.pending.rootLayoutTreePath,startedNavigationId:e.startedNavigationId,startedVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion}),...e.targetHref===void 0?{}:{targetHref:e.targetHref}}}function hr(e){let t=e.searchParams.toString();return t===``?e.pathname:`${e.pathname}?${t}`}function gr(e){let t=[];for(let n of Ae(e)){let e=H.parseElementKey(n);e?.kind===`slot`&&t.push({ownerLayoutId:H.encodeLayoutId(e.treePath),slotId:n})}return t}function _r(e){return{displayUrl:hr(e.navigationSnapshot),layoutIds:e.layoutIds,matchedUrl:e.navigationSnapshot.pathname,mountedParallelSlots:gr(e.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:e.routeId}}function vr(e){return{displayUrl:hr(e.action.navigationSnapshot),layoutIds:e.action.layoutIds,matchedUrl:e.action.navigationSnapshot.pathname,mountedParallelSlots:gr(e.action.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:e.routeId}}function yr(e){return{baseVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion,deploymentVersion:null,graphVersion:null,lane:e.pending.action.operation.lane,operationId:e.pending.action.operation.id,targetSnapshotFingerprint:br(e.targetSnapshot)}}function br(e){return`${e.routeId}|root:${e.rootBoundaryId??`unknown`}`}function xr(e){let t=vr(e.pending),n=yr({pending:e.pending,targetSnapshot:t});return ar.plan({routeManifest:null,state:{nextOperationToken:n,traceFields:e.traceFields,visibleCommitVersion:e.currentState.visibleCommitVersion,visibleSnapshot:_r(e.currentState)},event:{kind:`flightResponseArrived`,result:{href:e.targetHref??t.displayUrl,targetSnapshot:t},token:n}})}function Sr(e){switch(e.kind){case`proposeCommit`:return{disposition:`dispatch`,preserveAbsentSlots:e.proposal.preserveAbsentSlots,preserveElementIds:e.proposal.preserveElementIds,trace:e.trace};case`hardNavigate`:return{disposition:`hard-navigate`,preserveElementIds:[],trace:e.trace};case`noCommit`:return{disposition:`skip`,preserveElementIds:[],trace:e.trace};case`requestWork`:throw Error(`[vinext] Root-boundary commit planning returned requestWork (${e.work.kind}); flightResponseArrived should never request work`);default:throw Error(`[vinext] Unknown navigation decision: `+String(e))}}async function Cr(e){let t=await e.nextElements,n=H.readMetadata(t),r=e.previousNextUrl===void 0?e.currentState.previousNextUrl:e.previousNextUrl;return{action:{elements:t,interceptionContext:n.interceptionContext,layoutIds:n.layoutIds,layoutFlags:n.layoutFlags,navigationSnapshot:e.navigationSnapshot,operation:ur({id:e.renderId,lane:e.operationLane,startedVisibleCommitVersion:e.currentState.visibleCommitVersion}),previousNextUrl:r,renderId:e.renderId,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId,type:e.type},interceptionContext:n.interceptionContext,previousNextUrl:r,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId}}var wr=Symbol(`ApprovedVisibleCommit`);function Tr(e,t){return Er(t),kr(e,t)}function Er(e){if(e[wr]!==!0)throw Error(`[vinext] Visible router state mutation requires ApprovedVisibleCommit`)}function Dr(e,t){return{id:e.id,lane:e.lane,startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`committed`,visibleCommitVersion:t}}function Or(e,t,n){let r=e.visibleCommitVersion+1;return{...t,activeOperation:Dr(n,r),visibleCommitVersion:r}}function kr(e,t){let{action:n}=t;switch(n.type){case`traverse`:case`navigate`:return Or(e,{elements:Pn(e.elements,n.elements,{clearAbsentSlots:n.type===`traverse`,preserveAbsentSlots:t.decision.preserveAbsentSlots,preserveElementIds:t.decision.preserveElementIds}),interceptionContext:n.interceptionContext,layoutFlags:Mr(e.layoutFlags,n.layoutFlags,t.decision.preserveElementIds),layoutIds:n.layoutIds,navigationSnapshot:n.navigationSnapshot,previousNextUrl:n.previousNextUrl,renderId:n.renderId,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId},n.operation);case`replace`:return Or(e,{elements:n.elements,interceptionContext:n.interceptionContext,layoutFlags:n.layoutFlags,layoutIds:n.layoutIds,navigationSnapshot:n.navigationSnapshot,previousNextUrl:n.previousNextUrl,renderId:n.renderId,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId},n.operation);default:{let e=n.type;throw Error(`[vinext] Unknown router action: `+String(e))}}}function Ar(e){let t=pr(e);switch(t.disposition){case`skip`:return{disposition:`no-commit`,trace:t.trace};case`hard-navigate`:return{disposition:`hard-navigate`,trace:t.trace};case`dispatch`:return jr(t.trace,t.preserveElementIds,t.preserveAbsentSlots);default:throw Error(`[vinext] Unknown navigation commit disposition: `+String(t))}}function jr(e=Z(X.commitCurrent),t=[],n=!1){return{disposition:`commit`,preserveAbsentSlots:n,preserveElementIds:[...t],trace:e}}function Mr(e,t,n){let r={...t};for(let t of n){if(Object.hasOwn(r,t))continue;let n=e[t];n&&(r[t]=n)}return r}function Nr(e){return{[wr]:!0,action:e.pending.action,decision:e.decision,interceptionContext:e.pending.interceptionContext,previousNextUrl:e.pending.previousNextUrl,rootLayoutTreePath:e.pending.rootLayoutTreePath,routeId:e.pending.routeId}}function Pr(e){return{operationLane:e.action.operation.lane,pendingOperationId:e.action.operation.id,startedVisibleCommitVersion:e.action.operation.startedVisibleCommitVersion}}function Fr(e,t,n){return qn(e,t,Pr(n))}function Ir(e,t){switch(e.disposition){case`commit`:return{...e,trace:Fr(e.trace,Wn.visibleCommit,t)};case`hard-navigate`:return{...e,trace:Fr(e.trace,Wn.hardNavigate,t)};case`no-commit`:return{...e,trace:Fr(e.trace,Wn.noCommit,t)};default:throw Error(`[vinext] Unknown commit decision: `+String(e))}}function Lr(e){if(e.action.operation.lane!==`hmr`)throw Error(`[vinext] HMR visible commit approval requires an HMR pending operation`);let t=Ir(jr(),e);if(t.disposition!==`commit`)throw Error(`[vinext] HMR visible commit approval did not produce a commit decision`);return Nr({decision:t,pending:e})}function Rr(e){let t=Ir(Ar({activeNavigationId:e.activeNavigationId,currentState:e.currentState,pending:e.pending,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref}),e.pending);switch(t.disposition){case`commit`:return{approvedCommit:Nr({decision:t,pending:e.pending}),decision:t};case`hard-navigate`:case`no-commit`:return{approvedCommit:null,decision:t};default:throw Error(`[vinext] Unknown commit decision: `+String(t))}}async function zr(e){let t=await Cr({currentState:e.currentState,nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,previousNextUrl:e.previousNextUrl,renderId:e.renderId,type:e.type}),n=e.getCurrentStateForApproval?.()??e.currentState,r=Rr({activeNavigationId:e.getActiveNavigationId?.()??e.activeNavigationId,currentState:n,pending:t,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref});return{approvedCommit:r.approvedCommit,decision:r.decision,pending:t,trace:r.decision.trace}}var Br=`__vinext_hard_navigation_target__`;function Vr(e){try{return new URL(e,window.location.href).href}catch{return e}}function Hr(){try{return window.sessionStorage.getItem(Br)}catch{return null}}function Ur(e){try{return window.sessionStorage.setItem(Br,e),window.sessionStorage.getItem(Br)===e}catch{return!1}}function Wr(){try{window.sessionStorage.removeItem(Br)}catch{}}function Gr(e,t=`assign`){let n=Vr(e),r=Vr(window.location.href);return Hr()===n&&r===n?(Wr(),console.error(`[vinext] Prevented repeated hard navigation to ${n}; leaving the current document in place to avoid a reload loop.`),!1):!Ur(n)&&r===n?(console.error(`[vinext] Hard navigation to ${n} requires a reload-loop guard, but sessionStorage is unavailable; leaving the current document in place.`),!1):(t===`replace`?window.location.replace(e):window.location.assign(e),!0)}function Kr(e={}){let t=e.commitClientNavigationState??K,n=e.performHardNavigation??Gr,r=0,i=0,a=new Map,o=new Map,s=null,c=null,l=null,u=null,d=null,f=!1;function p(){if(!s)throw Error(`[vinext] Browser router state setter is not initialized`);return s}function m(){if(!c)throw Error(`[vinext] Browser router state is not initialized`);return c.current}function h(){return c||f?Promise.resolve():(d||=new Promise(e=>{u=e}),d)}function g(){f=!0;let e=u;u=null,d=null,e?.()}function _(){return i+=1,i}function v(){return r+=1,r}function y(){return c!==null}function b(e){return e===i}function x(){let e=p();l&&!l.settled&&(l.settled=!0,l.resolve(m()));let t,n=new Promise(e=>{t=e});if(!t)throw Error(`[vinext] Failed to initialize browser router promise`);let r={promise:n,resolve:t,settled:!1};return l=r,e(n),r}function S(e){!e||e.settled||(e.settled=!0,e.resolve(m()),l===e&&(l=null))}function C(e,t){S(t),b(e)&&Wt(e)}function ee(e,t){!e||e.settled||(e.settled=!0,e.resolve(Tr(m(),t)),l===e&&(l=null))}function w(e,t){t&&o.set(e,t)}function T(e){for(let[n,r]of o)n>e||(o.delete(n),n===e?r():t(void 0,{releaseSnapshot:!0}))}function E(e){for(let[t,n]of a)t>e||(a.delete(t),n())}async function D(e,t){if(!y())return;let n=await Cr({currentState:m(),nextElements:e,navigationSnapshot:t,operationLane:`hmr`,renderId:v(),type:`replace`});y()&&k(Lr(n))}function te({renderId:e,children:t}){return(0,F.useLayoutEffect)(()=>{T(e);let t=requestAnimationFrame(()=>{E(e)});return()=>{cancelAnimationFrame(t),E(e)}},[e]),t}function O(e,t){let n=p();if(t){ee(t,e);return}(0,F.startTransition)(()=>{n(Tr(m(),e))})}function k(e){p()(Tr(m(),e))}async function A(e){let r=v(),s,c=new Promise(e=>{s=e,a.set(r,e)}),l=!1;try{let t=await Cr({currentState:m(),nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,previousNextUrl:e.previousNextUrl,renderId:r,type:e.actionType}),o=Rr({activeNavigationId:i,currentState:m(),pending:t,startedNavigationId:e.navId,targetHref:e.targetHref});if(o.decision.disposition===`no-commit`)return S(e.pendingRouterState),a.delete(r),s?.(),`no-commit`;if(o.decision.disposition===`hard-navigate`)return S(e.pendingRouterState),a.delete(r),n(e.targetHref)?`hard-navigate`:`no-commit`;let c=o.approvedCommit;if(c===null)throw Error(`[vinext] Commit decision did not approve a visible commit`);w(r,e.createNavigationCommitEffect({href:e.targetHref,historyUpdateMode:e.historyUpdateMode,navId:e.navId,params:e.params,previousNextUrl:c.previousNextUrl})),Ft(),l=!0,O(c,e.pendingRouterState)}catch(n){throw o.delete(r),a.delete(r),l&&t(e.navId),S(e.pendingRouterState),s?.(),n}return c.then(()=>`committed`)}async function j(e,t,r,a){let o=a??m(),s=i,{approvedCommit:c,decision:l,pending:u,trace:d}=await zr({activeNavigationId:i,currentState:o,getActiveNavigationId:()=>i,getCurrentStateForApproval:m,navigationSnapshot:t,nextElements:e,renderId:v(),operationLane:`server-action`,startedNavigationId:s,targetHref:window.location.href,type:`navigate`});if(l.disposition===`hard-navigate`){n(window.location.href);return}if(c){let e=Rr({activeNavigationId:i,currentState:m(),pending:u,startedNavigationId:s,targetHref:window.location.href});if(e.decision.disposition===`hard-navigate`){n(window.location.href);return}e.approvedCommit&&k(e.approvedCommit)}if(r){if(!r.ok)throw r.data;return r.data}}function M(e,t){return s=e,c=t,g(),()=>{s===e&&(s=null),c===t&&(c=null,f=!1)}}return{beginNavigation:_,hasBrowserRouterState:y,getBrowserRouterState:m,isCurrentNavigation:b,waitForBrowserRouterStateReady:h,attachBrowserRouterState:M,beginPendingBrowserRouterState:x,finalizeNavigation:C,renderNavigationPayload:A,commitSameUrlNavigatePayload:j,hmrReplaceTree:D,drainPrePaintEffects:T,NavigationCommitSignal:te}}var qr=`__VINEXT_RSC_FORM_STATE__`;function Jr(e){let t=e.__VINEXT_RSC_FORM_STATE__??null;return delete e[qr],t}function Yr(e){let t={formState:e.formState,onUncaughtError:e.onUncaughtError};return e.onCaughtError?{...t,onCaughtError:e.onCaughtError}:t}function Xr(e){return(t,n)=>{console.error(t),n?.componentStack&&console.error(`The above error occurred in a React component:
3
+ `+n.componentStack);let r=e();r!==null&&window.location.assign(r)}}var Zr=o(),Qr=`https://nextjs.org/docs/messages/failed-to-find-server-action`;function $r(e){return`Server Action "${e}" was not found on the server. \nRead more: ${Qr}`}function ei(e){return e.headers.get(f)===`1`}function ti(e){return e}function ni(e,t){let n=t?.keyFn??((...e)=>e[0]),r=t?.cache??new Map;return ti(function(...t){let i=n(...t),a=r.get(i);if(a!==void 0)return a;let o=e.apply(this,t);return r.set(i,o),o})}function ri(e){return e.split(`$$cache=`)[0]}function ii(){globalThis.__vite_rsc_require__=e=>e.startsWith(`$$server:`)?(e=e.slice(9),globalThis.__vite_rsc_server_require__(e)):globalThis.__vite_rsc_client_require__(e)}var ai=!1;function oi(e){if(ai)return;ai=!0;let t=ni(t=>e.load(ri(t)));globalThis.__vite_rsc_client_require__=t,ii()}var si=n((e=>{var t=i(),n={stream:!0},r=Object.prototype.hasOwnProperty;function a(e,t){if(e){var n=e[t[0]];if(e=n&&n[t[2]])n=e.name;else{if(e=n&&n[`*`],!e)throw Error(`Could not find the module "`+t[0]+`" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.`);n=t[2]}return t.length===4?[e.id,e.chunks,n,1]:[e.id,e.chunks,n]}return t}function o(e,t){var n=``,r=e[t];if(r)n=r.name;else{var i=t.lastIndexOf(`#`);if(i!==-1&&(n=t.slice(i+1),r=e[t.slice(0,i)]),!r)throw Error(`Could not find the module "`+t+`" in the React Server Manifest. This is probably a bug in the React Server Components bundler.`)}return r.async?[r.id,r.chunks,n,1]:[r.id,r.chunks,n]}var s=new Map;function c(e){var t=__vite_rsc_require__(e);return typeof t.then!=`function`||t.status===`fulfilled`?null:(t.then(function(e){t.status=`fulfilled`,t.value=e},function(e){t.status=`rejected`,t.reason=e}),t)}function l(){}function u(e){for(var t=e[1],n=[],r=0;r<t.length;){var i=t[r++],a=t[r++],o=s.get(i);o===void 0?(f.set(i,a),a=__webpack_chunk_load__(i),n.push(a),o=s.set.bind(s,i,null),a.then(o,l),s.set(i,a)):o!==null&&n.push(o)}return e.length===4?n.length===0?c(e[0]):Promise.all(n).then(function(){return c(e[0])}):0<n.length?Promise.all(n):null}function d(e){var t=__vite_rsc_require__(e[0]);if(e.length===4&&typeof t.then==`function`)if(t.status===`fulfilled`)t=t.value;else throw t.reason;if(e[2]===`*`)return t;if(e[2]===``)return t.__esModule?t.default:t;if(r.call(t,e[2]))return t[e[2]]}var f=new Map,p={}.u;({}).u=function(e){var t=f.get(e);return t===void 0?p(e):t};var m=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.lazy`),_=Symbol.iterator;function v(e){return typeof e!=`object`||!e?null:(e=_&&e[_]||e[`@@iterator`],typeof e==`function`?e:null)}var y=Symbol.asyncIterator,b=Array.isArray,x=Object.getPrototypeOf,S=Object.prototype,C=new WeakMap;function ee(e){return Number.isFinite(e)?e===0&&1/e==-1/0?`$-0`:e:e===1/0?`$Infinity`:e===-1/0?`$-Infinity`:`$NaN`}function w(e,t,n,r,i){function a(e,n){n=new Blob([new Uint8Array(n.buffer,n.byteOffset,n.byteLength)]);var r=f++;return m===null&&(m=new FormData),m.append(t+r,n),`$`+e+r.toString(16)}function o(e){function n(c){c.done?(c=f++,a.append(t+c,new Blob(s)),a.append(t+o,`"$o`+c.toString(16)+`"`),a.append(t+o,`C`),p--,p===0&&r(a)):(s.push(c.value),e.read(new Uint8Array(1024)).then(n,i))}m===null&&(m=new FormData);var a=m;p++;var o=f++,s=[];return e.read(new Uint8Array(1024)).then(n,i),`$r`+o.toString(16)}function s(e){function n(s){if(s.done)a.append(t+o,`C`),p--,p===0&&r(a);else try{var c=JSON.stringify(s.value,u);a.append(t+o,c),e.read().then(n,i)}catch(e){i(e)}}m===null&&(m=new FormData);var a=m;p++;var o=f++;return e.read().then(n,i),`$R`+o.toString(16)}function c(e){try{var t=e.getReader({mode:`byob`})}catch{return s(e.getReader())}return o(t)}function l(e,n){function a(e){if(e.done){if(e.value===void 0)o.append(t+s,`C`);else try{var c=JSON.stringify(e.value,u);o.append(t+s,`C`+c)}catch(e){i(e);return}p--,p===0&&r(o)}else try{var l=JSON.stringify(e.value,u);o.append(t+s,l),n.next().then(a,i)}catch(e){i(e)}}m===null&&(m=new FormData);var o=m;p++;var s=f++;return e=e===n,n.next().then(a,i),`$`+(e?`x`:`X`)+s.toString(16)}function u(e,o){if(o===null)return null;if(typeof o==`object`){switch(o.$$typeof){case h:if(n!==void 0&&e.indexOf(`:`)===-1){var s=_.get(this);if(s!==void 0)return n.set(s+`:`+e,o),`$T`}throw Error(`React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.`);case g:s=o._payload;var T=o._init;m===null&&(m=new FormData),p++;try{var E=T(s),D=f++,te=d(E,D);return m.append(t+D,te),`$`+D.toString(16)}catch(e){if(typeof e==`object`&&e&&typeof e.then==`function`){p++;var O=f++;return s=function(){try{var e=d(o,O),n=m;n.append(t+O,e),p--,p===0&&r(n)}catch(e){i(e)}},e.then(s,s),`$`+O.toString(16)}return i(e),null}finally{p--}}if(s=_.get(o),typeof o.then==`function`){if(s!==void 0)if(w===o)w=null;else return s;m===null&&(m=new FormData),p++;var k=f++;return e=`$@`+k.toString(16),_.set(o,e),o.then(function(e){try{var n=_.get(e),a=n===void 0?d(e,k):JSON.stringify(n);e=m,e.append(t+k,a),p--,p===0&&r(e)}catch(e){i(e)}},i),e}if(s!==void 0)if(w===o)w=null;else return s;else e.indexOf(`:`)===-1&&(s=_.get(this),s!==void 0&&(e=s+`:`+e,_.set(o,e),n!==void 0&&n.set(e,o)));if(b(o))return o;if(o instanceof FormData){m===null&&(m=new FormData);var A=m;e=f++;var j=t+`_`+e+`_`;return o.forEach(function(e,t){A.append(j+t,e)}),`$K`+e.toString(16)}if(o instanceof Map)return e=f++,s=d(Array.from(o),e),m===null&&(m=new FormData),m.append(t+e,s),`$Q`+e.toString(16);if(o instanceof Set)return e=f++,s=d(Array.from(o),e),m===null&&(m=new FormData),m.append(t+e,s),`$W`+e.toString(16);if(o instanceof ArrayBuffer)return e=new Blob([o]),s=f++,m===null&&(m=new FormData),m.append(t+s,e),`$A`+s.toString(16);if(o instanceof Int8Array)return a(`O`,o);if(o instanceof Uint8Array)return a(`o`,o);if(o instanceof Uint8ClampedArray)return a(`U`,o);if(o instanceof Int16Array)return a(`S`,o);if(o instanceof Uint16Array)return a(`s`,o);if(o instanceof Int32Array)return a(`L`,o);if(o instanceof Uint32Array)return a(`l`,o);if(o instanceof Float32Array)return a(`G`,o);if(o instanceof Float64Array)return a(`g`,o);if(o instanceof BigInt64Array)return a(`M`,o);if(o instanceof BigUint64Array)return a(`m`,o);if(o instanceof DataView)return a(`V`,o);if(typeof Blob==`function`&&o instanceof Blob)return m===null&&(m=new FormData),e=f++,m.append(t+e,o),`$B`+e.toString(16);if(e=v(o))return s=e.call(o),s===o?(e=f++,s=d(Array.from(s),e),m===null&&(m=new FormData),m.append(t+e,s),`$i`+e.toString(16)):Array.from(s);if(typeof ReadableStream==`function`&&o instanceof ReadableStream)return c(o);if(e=o[y],typeof e==`function`)return l(o,e.call(o));if(e=x(o),e!==S&&(e===null||x(e)!==null)){if(n===void 0)throw Error(`Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported.`);return`$T`}return o}if(typeof o==`string`)return o[o.length-1]===`Z`&&this[e]instanceof Date?`$D`+o:(e=o[0]===`$`?`$`+o:o,e);if(typeof o==`boolean`)return o;if(typeof o==`number`)return ee(o);if(o===void 0)return`$undefined`;if(typeof o==`function`){if(s=C.get(o),s!==void 0)return e=_.get(o),e===void 0?(e=JSON.stringify({id:s.id,bound:s.bound},u),m===null&&(m=new FormData),s=f++,m.set(t+s,e),e=`$h`+s.toString(16),_.set(o,e),e):e;if(n!==void 0&&e.indexOf(`:`)===-1&&(s=_.get(this),s!==void 0))return n.set(s+`:`+e,o),`$T`;throw Error(`Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.`)}if(typeof o==`symbol`){if(n!==void 0&&e.indexOf(`:`)===-1&&(s=_.get(this),s!==void 0))return n.set(s+`:`+e,o),`$T`;throw Error(`Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.`)}if(typeof o==`bigint`)return`$n`+o.toString(10);throw Error(`Type `+typeof o+` is not supported as an argument to a Server Function.`)}function d(e,t){return typeof e==`object`&&e&&(t=`$`+t.toString(16),_.set(e,t),n!==void 0&&n.set(t,e)),w=e,JSON.stringify(e,u)}var f=1,p=0,m=null,_=new WeakMap,w=e,T=d(e,0);return m===null?r(T):(m.set(t+`0`,T),p===0&&r(m)),function(){0<p&&(p=0,r(m===null?T:m))}}function T(e,t,n){C.has(e)||C.set(e,{id:t,originalBind:e.bind,bound:n})}function E(e,t){function n(){var e=Array.prototype.slice.call(arguments);return i?i.status===`fulfilled`?t(r,i.value.concat(e)):Promise.resolve(i).then(function(n){return t(r,n.concat(e))}):t(r,e)}var r=e.id,i=e.bound;return T(n,r,i),n}function D(e,t,n){this.status=e,this.value=t,this.reason=n}D.prototype=Object.create(Promise.prototype),D.prototype.then=function(e,t){switch(this.status){case`resolved_model`:F(this);break;case`resolved_module`:I(this)}switch(this.status){case`fulfilled`:typeof e==`function`&&e(this.value);break;case`pending`:case`blocked`:typeof e==`function`&&(this.value===null&&(this.value=[]),this.value.push(e)),typeof t==`function`&&(this.reason===null&&(this.reason=[]),this.reason.push(t));break;case`halted`:break;default:typeof t==`function`&&t(this.reason)}};function te(e){switch(e.status){case`resolved_model`:F(e);break;case`resolved_module`:I(e)}switch(e.status){case`fulfilled`:return e.value;case`pending`:case`blocked`:case`halted`:throw e;default:throw e.reason}}function O(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];typeof i==`function`?i(t):R(i,t,n)}}function k(e,t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):z(r,t)}}function A(e,t){var n=t.handler.chunk;if(n===null)return null;if(n===e)return t.handler;if(t=n.value,t!==null)for(n=0;n<t.length;n++){var r=t[n];if(typeof r!=`function`&&(r=A(e,r),r!==null))return r}return null}function j(e,t,n){switch(e.status){case`fulfilled`:O(t,e.value,e);break;case`blocked`:for(var r=0;r<t.length;r++){var i=t[r];if(typeof i!=`function`){var a=A(e,i);if(a!==null)switch(R(i,a.value,e),t.splice(r,1),r--,n!==null&&(i=n.indexOf(i),i!==-1&&n.splice(i,1)),e.status){case`fulfilled`:O(t,e.value,e);return;case`rejected`:n!==null&&k(n,e.reason);return}}}case`pending`:if(e.value)for(r=0;r<t.length;r++)e.value.push(t[r]);else e.value=t;if(e.reason){if(n)for(t=0;t<n.length;t++)e.reason.push(n[t])}else e.reason=n;break;case`rejected`:n&&k(n,e.reason)}}function M(e,t,n){t.status!==`pending`&&t.status!==`blocked`?t.reason.error(n):(e=t.reason,t.status=`rejected`,t.reason=n,e!==null&&k(e,n))}function ne(e,t,n){return new D(`resolved_model`,(n?`{"done":true,"value":`:`{"done":false,"value":`)+t+`}`,e)}function re(e,t,n,r){N(e,t,(r?`{"done":true,"value":`:`{"done":false,"value":`)+n+`}`)}function N(e,t,n){if(t.status!==`pending`)t.reason.enqueueModel(n);else{var r=t.value,i=t.reason;t.status=`resolved_model`,t.value=n,t.reason=e,r!==null&&(F(t),j(t,r,i))}}function ie(e,t,n){if(t.status===`pending`||t.status===`blocked`){e=t.value;var r=t.reason;t.status=`resolved_module`,t.value=n,t.reason=null,e!==null&&(I(t),j(t,e,r))}}var P=null;function F(e){var t=P;P=null;var n=e.value,r=e.reason;e.status=`blocked`,e.value=null,e.reason=null;try{var i=JSON.parse(n,r._fromJSON),a=e.value;if(a!==null)for(e.value=null,e.reason=null,n=0;n<a.length;n++){var o=a[n];typeof o==`function`?o(i):R(o,i,e)}if(P!==null){if(P.errored)throw P.reason;if(0<P.deps){P.value=i,P.chunk=e;return}}e.status=`fulfilled`,e.value=i}catch(t){e.status=`rejected`,e.reason=t}finally{P=t}}function I(e){try{var t=d(e.value);e.status=`fulfilled`,e.value=t}catch(t){e.status=`rejected`,e.reason=t}}function ae(e,t){e._closed=!0,e._closedReason=t,e._chunks.forEach(function(n){n.status===`pending`?M(e,n,t):n.status===`fulfilled`&&n.reason!==null&&n.reason.error(t)})}function oe(e){return{$$typeof:g,_payload:e,_init:te}}function L(e,t){var n=e._chunks,r=n.get(t);return r||(r=e._closed?new D(`rejected`,null,e._closedReason):new D(`pending`,null,null),n.set(t,r)),r}function R(e,t){var n=e.response,i=e.handler,a=e.parentObject,o=e.key,s=e.map,c=e.path;try{for(var l=1;l<c.length;l++){for(;typeof t==`object`&&t&&t.$$typeof===g;){var u=t._payload;if(u===i.chunk)t=i.value;else{switch(u.status){case`resolved_model`:F(u);break;case`resolved_module`:I(u)}switch(u.status){case`fulfilled`:t=u.value;continue;case`blocked`:var d=A(u,e);if(d!==null){t=d.value;continue}case`pending`:c.splice(0,l-1),u.value===null?u.value=[e]:u.value.push(e),u.reason===null?u.reason=[e]:u.reason.push(e);return;case`halted`:return;default:z(e,u.reason);return}}}var f=c[l];if(typeof t==`object`&&t&&r.call(t,f))t=t[f];else throw Error(`Invalid reference.`)}for(;typeof t==`object`&&t&&t.$$typeof===g;){var p=t._payload;if(p===i.chunk)t=i.value;else{switch(p.status){case`resolved_model`:F(p);break;case`resolved_module`:I(p)}switch(p.status){case`fulfilled`:t=p.value;continue}break}}var m=s(n,t,a,o);if(o!==`__proto__`&&(a[o]=m),o===``&&i.value===null&&(i.value=m),a[0]===h&&typeof i.value==`object`&&i.value!==null&&i.value.$$typeof===h){var _=i.value;switch(o){case`3`:_.props=m}}}catch(t){z(e,t);return}i.deps--,i.deps===0&&(e=i.chunk,e!==null&&e.status===`blocked`&&(t=e.value,e.status=`fulfilled`,e.value=i.value,e.reason=i.reason,t!==null&&O(t,i.value,e)))}function z(e,t){var n=e.handler;e=e.response,n.errored||(n.errored=!0,n.value=null,n.reason=t,n=n.chunk,n!==null&&n.status===`blocked`&&M(e,n,t))}function se(e,t,n,r,i,a){if(P){var o=P;o.deps++}else o=P={parent:null,chunk:null,value:null,reason:null,deps:1,errored:!1};return t={response:r,handler:o,parentObject:t,key:n,map:i,path:a},e.value===null?e.value=[t]:e.value.push(t),e.reason===null?e.reason=[t]:e.reason.push(t),null}function ce(e,t,n,r){if(!e._serverReferenceConfig)return E(t,e._callServer);var i=o(e._serverReferenceConfig,t.id),a=u(i);if(a)t.bound&&(a=Promise.all([a,t.bound]));else if(t.bound)a=Promise.resolve(t.bound);else return a=d(i),T(a,t.id,t.bound),a;if(P){var s=P;s.deps++}else s=P={parent:null,chunk:null,value:null,reason:null,deps:1,errored:!1};return a.then(function(){var e=d(i);if(t.bound){var a=t.bound.value.slice(0);a.unshift(null),e=e.bind.apply(e,a)}if(T(e,t.id,t.bound),r!==`__proto__`&&(n[r]=e),r===``&&s.value===null&&(s.value=e),n[0]===h&&typeof s.value==`object`&&s.value!==null&&s.value.$$typeof===h)switch(a=s.value,r){case`3`:a.props=e}s.deps--,s.deps===0&&(e=s.chunk,e!==null&&e.status===`blocked`&&(a=e.value,e.status=`fulfilled`,e.value=s.value,e.reason=null,a!==null&&O(a,s.value,e)))},function(t){if(!s.errored){s.errored=!0,s.value=null,s.reason=t;var n=s.chunk;n!==null&&n.status===`blocked`&&M(e,n,t)}}),null}function B(e,t,n,r,i){t=t.split(`:`);var a=parseInt(t[0],16);switch(a=L(e,a),a.status){case`resolved_model`:F(a);break;case`resolved_module`:I(a)}switch(a.status){case`fulfilled`:a=a.value;for(var o=1;o<t.length;o++){for(;typeof a==`object`&&a&&a.$$typeof===g;){switch(a=a._payload,a.status){case`resolved_model`:F(a);break;case`resolved_module`:I(a)}switch(a.status){case`fulfilled`:a=a.value;break;case`blocked`:case`pending`:return se(a,n,r,e,i,t.slice(o-1));case`halted`:return P?(e=P,e.deps++):P={parent:null,chunk:null,value:null,reason:null,deps:1,errored:!1},null;default:return P?(P.errored=!0,P.value=null,P.reason=a.reason):P={parent:null,chunk:null,value:null,reason:a.reason,deps:0,errored:!0},null}}a=a[t[o]]}for(;typeof a==`object`&&a&&a.$$typeof===g;){switch(t=a._payload,t.status){case`resolved_model`:F(t);break;case`resolved_module`:I(t)}switch(t.status){case`fulfilled`:a=t.value;continue}break}return i(e,a,n,r);case`pending`:case`blocked`:return se(a,n,r,e,i,t);case`halted`:return P?(e=P,e.deps++):P={parent:null,chunk:null,value:null,reason:null,deps:1,errored:!1},null;default:return P?(P.errored=!0,P.value=null,P.reason=a.reason):P={parent:null,chunk:null,value:null,reason:a.reason,deps:0,errored:!0},null}}function le(e,t){return new Map(t)}function ue(e,t){return new Set(t)}function de(e,t){return new Blob(t.slice(1),{type:t[0]})}function fe(e,t){e=new FormData;for(var n=0;n<t.length;n++)e.append(t[n][0],t[n][1]);return e}function pe(e,t){return t[Symbol.iterator]()}function me(e,t){return t}function he(e,t,n,r){if(r[0]===`$`){if(r===`$`)return P!==null&&n===`0`&&(P={parent:P,chunk:null,value:null,reason:null,deps:0,errored:!1}),h;switch(r[1]){case`$`:return r.slice(1);case`L`:return t=parseInt(r.slice(2),16),e=L(e,t),oe(e);case`@`:return t=parseInt(r.slice(2),16),L(e,t);case`S`:return Symbol.for(r.slice(2));case`h`:return r=r.slice(2),B(e,r,t,n,ce);case`T`:if(t=`$`+r.slice(2),e=e._tempRefs,e==null)throw Error(`Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.`);return e.get(t);case`Q`:return r=r.slice(2),B(e,r,t,n,le);case`W`:return r=r.slice(2),B(e,r,t,n,ue);case`B`:return r=r.slice(2),B(e,r,t,n,de);case`K`:return r=r.slice(2),B(e,r,t,n,fe);case`Z`:return Te();case`i`:return r=r.slice(2),B(e,r,t,n,pe);case`I`:return 1/0;case`-`:return r===`$-0`?-0:-1/0;case`N`:return NaN;case`u`:return;case`D`:return new Date(Date.parse(r.slice(2)));case`n`:return BigInt(r.slice(2));default:return r=r.slice(1),B(e,r,t,n,me)}}return r}function ge(){throw Error(`Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.`)}function _e(e,t,n,r,i,a,o){var s=new Map;this._bundlerConfig=e,this._serverReferenceConfig=t,this._moduleLoading=n,this._callServer=r===void 0?ge:r,this._encodeFormAction=i,this._nonce=a,this._chunks=s,this._stringDecoder=new TextDecoder,this._fromJSON=null,this._closed=!1,this._closedReason=null,this._tempRefs=o,this._fromJSON=Oe(this)}function ve(e,t,n){e=e._chunks;var r=e.get(t);r&&r.status!==`pending`?r.reason.enqueueValue(n):(n=new D(`fulfilled`,n,null),e.set(t,n))}function ye(e,t,n){var r=e._chunks,i=r.get(t);n=JSON.parse(n,e._fromJSON);var o=a(e._bundlerConfig,n);if(n=u(o)){if(i){var s=i;s.status=`blocked`}else s=new D(`blocked`,null,null),r.set(t,s);n.then(function(){return ie(e,s,o)},function(t){return M(e,s,t)})}else i?ie(e,i,o):(i=new D(`resolved_module`,o,null),r.set(t,i))}function be(e,t,n,r){e=e._chunks;var i=e.get(t);i?i.status===`pending`&&(t=i.value,i.status=`fulfilled`,i.value=n,i.reason=r,t!==null&&O(t,i.value,i)):(n=new D(`fulfilled`,n,r),e.set(t,n))}function xe(e,t,n){var r=null,i=!1;n=new ReadableStream({type:n,start:function(e){r=e}});var a=null;be(e,t,n,{enqueueValue:function(e){a===null?r.enqueue(e):a.then(function(){r.enqueue(e)})},enqueueModel:function(t){if(a===null){var n=new D(`resolved_model`,t,e);F(n),n.status===`fulfilled`?r.enqueue(n.value):(n.then(function(e){return r.enqueue(e)},function(e){return r.error(e)}),a=n)}else{n=a;var i=new D(`pending`,null,null);i.then(function(e){return r.enqueue(e)},function(e){return r.error(e)}),a=i,n.then(function(){a===i&&(a=null),N(e,i,t)})}},close:function(){if(!i)if(i=!0,a===null)r.close();else{var e=a;a=null,e.then(function(){return r.close()})}},error:function(e){if(!i)if(i=!0,a===null)r.error(e);else{var t=a;a=null,t.then(function(){return r.error(e)})}}})}function Se(){return this}function Ce(e){return e={next:e},e[y]=Se,e}function we(e,t,n){var r=[],i=!1,a=0,o={};o[y]=function(){var e=0;return Ce(function(t){if(t!==void 0)throw Error(`Values cannot be passed to next() of AsyncIterables passed to Client Components.`);if(e===r.length){if(i)return new D(`fulfilled`,{done:!0,value:void 0},null);r[e]=new D(`pending`,null,null)}return r[e++]})},be(e,t,n?o[y]():o,{enqueueValue:function(e){if(a===r.length)r[a]=new D(`fulfilled`,{done:!1,value:e},null);else{var t=r[a],n=t.value,i=t.reason;t.status=`fulfilled`,t.value={done:!1,value:e},t.reason=null,n!==null&&j(t,n,i)}a++},enqueueModel:function(t){a===r.length?r[a]=ne(e,t,!1):re(e,r[a],t,!1),a++},close:function(t){if(!i)for(i=!0,a===r.length?r[a]=ne(e,t,!0):re(e,r[a],t,!0),a++;a<r.length;)re(e,r[a++],`"$undefined"`,!0)},error:function(t){if(!i)for(i=!0,a===r.length&&(r[a]=new D(`pending`,null,null));a<r.length;)M(e,r[a++],t)}})}function Te(){var e=Error(`An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.`);return e.stack=`Error: `+e.message,e}function Ee(e,t){for(var n=e.length,r=t.length,i=0;i<n;i++)r+=e[i].byteLength;r=new Uint8Array(r);for(var a=i=0;a<n;a++){var o=e[a];r.set(o,i),i+=o.byteLength}return r.set(t,i),r}function V(e,t,n,r,i,a){n=n.length===0&&r.byteOffset%a===0?r:Ee(n,r),i=new i(n.buffer,n.byteOffset,n.byteLength/a),ve(e,t,i)}function De(e,t,r,i,a,o){switch(i){case 65:ve(e,r,Ee(a,o).buffer);return;case 79:V(e,r,a,o,Int8Array,1);return;case 111:ve(e,r,a.length===0?o:Ee(a,o));return;case 85:V(e,r,a,o,Uint8ClampedArray,1);return;case 83:V(e,r,a,o,Int16Array,2);return;case 115:V(e,r,a,o,Uint16Array,2);return;case 76:V(e,r,a,o,Int32Array,4);return;case 108:V(e,r,a,o,Uint32Array,4);return;case 71:V(e,r,a,o,Float32Array,4);return;case 103:V(e,r,a,o,Float64Array,8);return;case 77:V(e,r,a,o,BigInt64Array,8);return;case 109:V(e,r,a,o,BigUint64Array,8);return;case 86:V(e,r,a,o,DataView,1);return}t=e._stringDecoder;for(var s=``,c=0;c<a.length;c++)s+=t.decode(a[c],n);switch(a=s+=t.decode(o),i){case 73:ye(e,r,a);break;case 72:switch(r=a[0],a=a.slice(1),e=JSON.parse(a,e._fromJSON),a=m.d,r){case`D`:a.D(e);break;case`C`:typeof e==`string`?a.C(e):a.C(e[0],e[1]);break;case`L`:r=e[0],i=e[1],e.length===3?a.L(r,i,e[2]):a.L(r,i);break;case`m`:typeof e==`string`?a.m(e):a.m(e[0],e[1]);break;case`X`:typeof e==`string`?a.X(e):a.X(e[0],e[1]);break;case`S`:typeof e==`string`?a.S(e):a.S(e[0],e[1]===0?void 0:e[1],e.length===3?e[2]:void 0);break;case`M`:typeof e==`string`?a.M(e):a.M(e[0],e[1])}break;case 69:i=e._chunks,o=i.get(r),a=JSON.parse(a),t=Te(),t.digest=a.digest,o?M(e,o,t):(e=new D(`rejected`,null,t),i.set(r,e));break;case 84:e=e._chunks,(i=e.get(r))&&i.status!==`pending`?i.reason.enqueueValue(a):(a=new D(`fulfilled`,a,null),e.set(r,a));break;case 78:case 68:case 74:case 87:throw Error(`Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.`);case 82:xe(e,r,void 0);break;case 114:xe(e,r,`bytes`);break;case 88:we(e,r,!1);break;case 120:we(e,r,!0);break;case 67:(r=e._chunks.get(r))&&r.status===`fulfilled`&&r.reason.close(a===``?`"$undefined"`:a);break;default:i=e._chunks,(o=i.get(r))?N(e,o,a):(e=new D(`resolved_model`,a,e),i.set(r,e))}}function Oe(e){return function(t,n){if(t!==`__proto__`){if(typeof n==`string`)return he(e,this,t,n);if(typeof n==`object`&&n){if(n[0]===h){if(t={$$typeof:h,type:n[1],key:n[2],ref:null,props:n[3]},P!==null){if(n=P,P=n.parent,n.errored)t=new D(`rejected`,null,n.reason),t=oe(t);else if(0<n.deps){var r=new D(`blocked`,null,null);n.value=t,n.chunk=r,t=oe(r)}}}else t=n;return t}return n}}}function H(e){ae(e,Error(`Connection closed.`))}function ke(e){return new _e(null,null,null,e&&e.callServer?e.callServer:void 0,void 0,void 0,e&&e.temporaryReferences?e.temporaryReferences:void 0)}function Ae(e,t,n){function r(t){var s=t.value;if(t.done)return n();var c=0,l=a._rowState;t=a._rowID;for(var u=a._rowTag,d=a._rowLength,f=a._buffer,p=s.length;c<p;){var m=-1;switch(l){case 0:m=s[c++],m===58?l=1:t=t<<4|(96<m?m-87:m-48);continue;case 1:l=s[c],l===84||l===65||l===79||l===111||l===85||l===83||l===115||l===76||l===108||l===71||l===103||l===77||l===109||l===86?(u=l,l=2,c++):64<l&&91>l||l===35||l===114||l===120?(u=l,l=3,c++):(u=0,l=3);continue;case 2:m=s[c++],m===44?l=4:d=d<<4|(96<m?m-87:m-48);continue;case 3:m=s.indexOf(10,c);break;case 4:m=c+d,m>s.length&&(m=-1)}var h=s.byteOffset+c;if(-1<m)d=new Uint8Array(s.buffer,h,m-c),De(e,a,t,u,f,d),c=m,l===3&&c++,d=t=u=l=0,f.length=0;else{s=new Uint8Array(s.buffer,h,s.byteLength-c),f.push(s),d-=s.byteLength;break}}return a._rowState=l,a._rowID=t,a._rowTag=u,a._rowLength=d,o.read().then(r).catch(i)}function i(t){ae(e,t)}var a={_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[]},o=t.getReader();o.read().then(r).catch(i)}e.createFromFetch=function(e,t){var n=ke(t);return e.then(function(e){Ae(n,e.body,H.bind(null,n))},function(e){ae(n,e)}),L(n,0)},e.createFromReadableStream=function(e,t){return t=ke(t),Ae(t,e,H.bind(null,t)),L(t,0)},e.createTemporaryReferenceSet=function(){return new Map},e.encodeReply=function(e,t){return new Promise(function(n,r){var i=w(e,``,t&&t.temporaryReferences?t.temporaryReferences:void 0,n,r);if(t&&t.signal){var a=t.signal;if(a.aborted)i(a.reason);else{var o=function(){i(a.reason),a.removeEventListener(`abort`,o)};a.addEventListener(`abort`,o)}}})}})),ci=t(n(((e,t)=>{t.exports=si()}))(),1);function li(e,t={}){return ci.createFromReadableStream(e,{callServer:fi,findSourceMapURL:hi,...t})}function ui(e,t={}){return ci.createFromFetch(e,{callServer:fi,findSourceMapURL:hi,...t})}var di=ci.encodeReply;function fi(...e){return globalThis.__viteRscCallServer(...e)}function pi(e){globalThis.__viteRscCallServer=e}var mi=ci.createTemporaryReferenceSet;function hi(e,t){let n=new URL(`/__vite_rsc_findSourceMapURL`,import.meta.url);return n.searchParams.set(`filename`,e),n.searchParams.set(`environmentName`,t),n.toString()}var gi=`modulepreload`,_i=function(e){return`/`+e},vi={},yi=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=_i(t,n),t in vi)return;vi[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:gi,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},bi={"15c18cfaeeff":async()=>{let e=await yi(()=>import(`./layout-segment-context-DjGudgXn.js`),__vite__mapDeps([0,1,2]));return{get LayoutSegmentProvider(){return e.LayoutSegmentProvider}}},"593f344dc510":async()=>{let e=await yi(()=>Promise.resolve().then(()=>un),void 0);return{get ErrorBoundary(){return e.ErrorBoundary},get ForbiddenBoundary(){return e.ForbiddenBoundary},get NotFoundBoundary(){return e.NotFoundBoundary},get RedirectBoundary(){return e.RedirectBoundary},get UnauthorizedBoundary(){return e.UnauthorizedBoundary}}},"6efdf509a785":async()=>{let e=await yi(()=>import(`./page-CJqXlhDs.js`),__vite__mapDeps([3,1,2,4]));return{get default(){return e.default}}},"8c0f216c4604":async()=>{let e=await yi(()=>Promise.resolve().then(()=>kn),void 0);return{get Children(){return e.Children},get ParallelSlot(){return e.ParallelSlot},get Slot(){return e.Slot}}}};xi();function xi(){oi({load:async e=>{{let t=bi[e];if(!t)throw Error(`client reference not found '${e}'`);return t()}}})}function Si(e){return e===`traverse`?`traverse`:`navigate`}function Ci(e){switch(e){case`navigate`:return`navigation`;case`refresh`:return`refresh`;case`traverse`:return`traverse`;default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}var wi=50,Ti=5*6e4,Ei=30*6e4,Q=Kr(),Di=Q.NavigationCommitSignal;function Oi(e){if(!e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}}function ki(e){return e instanceof Promise}var Ai={},$=new Map,ji=null;function Mi(){return Q.getBrowserRouterState()}function Ni(){return Q.hasBrowserRouterState()}function Pi(){return Q.waitForBrowserRouterStateReady()}function Fi(){return Q.beginPendingBrowserRouterState()}function Ii(e){Ai=e,Vt(e)}function Li(e){Ai=e,Ht(e)}function Ri(){$.clear()}function zi(){xt().clear(),St().clear()}function Bi(){Ri(),zi()}function Vi(e){let{href:t,historyUpdateMode:n,navId:r,params:i,previousNextUrl:a}=e;return()=>{if(!Q.isCurrentNavigation(r)){K(void 0,{releaseSnapshot:!0});return}let e=new URL(t,window.location.origin).href;Li(i);let o=cr(n===`replace`?window.history.state:null,a);n===`replace`&&window.location.href!==e?q(o,``,t):n===`push`&&window.location.href!==e&&Zt(o,``,t),ji=null,K(r)}}async function Hi(e,t,n,r,i,a,o,s,c=`navigate`,l=`navigation`){try{return await Q.renderNavigationPayload({actionType:c,createNavigationCommitEffect:e=>(ji=e.href,Vi(e)),historyUpdateMode:i,navigationSnapshot:t,nextElements:e,operationLane:l,params:a,pendingRouterState:s,previousNextUrl:o,targetHref:n,navId:r})}catch(e){throw ji=null,e}}async function Ui(e,t,n){let r=zt(window.location.href,Ai);return Q.commitSameUrlNavigatePayload(e,r,t,n)}function Wi(){for(;$.size>=wi;){let e=$.keys().next().value;if(e===void 0)return;$.delete(e)}}function Gi(e,t,n,r){let i=H.encodeCacheKey(e,t),a=$.get(i);if(!a)return null;if((a.response.mountedSlotsHeader??null)!==n)return $.delete(i),null;if(r===`refresh`)return null;if(r===`traverse`){let e=a.expiresAt-Ti;return Date.now()-e>=Ei?($.delete(i),null):($.delete(i),$.set(i,a),a)}return a.expiresAt>Date.now()?($.delete(i),$.set(i,a),a):($.delete(i),null)}function Ki(e,t,n,r){let i=H.encodeCacheKey(e,t);$.delete(i),Wi();let a=Date.now();$.set(i,{params:r,expiresAt:a+Ti,response:n})}function qi(e,t){if(t!==void 0)return{interceptionContext:dr(t,``),previousNextUrl:t};switch(e){case`navigate`:return{interceptionContext:yt(),previousNextUrl:bt()};case`traverse`:{let e=lr(window.history.state);return{interceptionContext:dr(e,``),previousNextUrl:e}}case`refresh`:{let e=Mi().previousNextUrl;return{interceptionContext:dr(e,``),previousNextUrl:e}}default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}function Ji(e){return Promise.resolve(e).then(e=>H.decode(e))}function Yi({initialElements:e,initialNavigationSnapshot:t}){let n=(0,F.use)(e),r=H.readMetadata(n),[i,a]=(0,F.useState)({activeOperation:null,elements:n,interceptionContext:r.interceptionContext,layoutIds:r.layoutIds,layoutFlags:r.layoutFlags,navigationSnapshot:t,previousNextUrl:null,renderId:0,rootLayoutTreePath:r.rootLayoutTreePath,routeId:r.routeId,visibleCommitVersion:0}),o=ki(i)?(0,F.use)(i):i,s=(0,F.useRef)(o);s.current=o,(0,F.useLayoutEffect)(()=>{let e=Q.attachBrowserRouterState(a,s);return()=>{e(),At(null)}},[a]),(0,F.useLayoutEffect)(()=>{At(je(s.current.elements))},[o.elements]),(0,F.useLayoutEffect)(()=>{o.renderId===0&&q(cr(window.history.state,o.previousNextUrl),``,window.location.href)},[o.previousNextUrl,o.renderId]);let c=(0,F.createElement)(yn,null,(0,F.createElement)(Di,{renderId:o.renderId},(0,F.createElement)(jn.Provider,{value:o.elements},(0,F.createElement)(Fn,{id:o.routeId})))),l=Lt();return l?(0,F.createElement)(l.Provider,{value:o.navigationSnapshot},c):c}function Xi(e,t,n){vt({pathname:e,searchParams:new URLSearchParams(t),params:n})}function Zi(e){try{return decodeURIComponent(e)}catch{return e}}function Qi(e){let t=Zi(e.startsWith(`#`)?e.slice(1):e);requestAnimationFrame(()=>{if(t===``||t===`top`){window.scrollTo(0,0);return}let e=document.getElementById(t);if(e){e.scrollIntoView({behavior:`auto`});return}document.getElementsByName(t)[0]?.scrollIntoView({behavior:`auto`})})}function $i(e){if(!(e&&typeof e==`object`&&`__vinext_scrollY`in e)){window.location.hash&&Qi(window.location.hash);return}let t=Number(e.__vinext_scrollY),n=`__vinext_scrollX`in e?Number(e.__vinext_scrollX):0;requestAnimationFrame(()=>{window.scrollTo(n,t)})}var ea=!1,ta=`__vinext_rsc_initial_reload__`;function na(){try{return sessionStorage.getItem(ta)}catch{return null}}function ra(e){try{sessionStorage.setItem(ta,e)}catch{}}function ia(){try{sessionStorage.removeItem(ta)}catch{}}function aa(e){let t=window.location.pathname+window.location.search;return na()===t?(ia(),console.error(`[vinext] Initial RSC fetch ${e} after reload; aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null):(ra(t),na()===t?(console.warn(`[vinext] Initial RSC fetch ${e}; reloading once to let the server render the HTML error page`),window.location.reload(),null):(console.error(`[vinext] Initial RSC fetch ${e}; sessionStorage unavailable so the reload-loop guard cannot persist — aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null))}async function oa(){let e=Bn();if(e.__VINEXT_RSC__||e.__VINEXT_RSC_CHUNKS__||e.__VINEXT_RSC_DONE__){if(ia(),Wr(),e.__VINEXT_RSC__){let t=e.__VINEXT_RSC__;delete e.__VINEXT_RSC__;let n=t.params??{};return t.params&&Ii(t.params),t.nav&&Xi(t.nav.pathname,t.nav.searchParams,n),Hn(t.rsc)}let t=e.__VINEXT_RSC_PARAMS__??{};return e.__VINEXT_RSC_PARAMS__&&Ii(e.__VINEXT_RSC_PARAMS__),e.__VINEXT_RSC_NAV__&&Xi(e.__VINEXT_RSC_NAV__.pathname,e.__VINEXT_RSC_NAV__.searchParams,t),Un()}let t=Je(),n=await fetch(await Xe(window.location.pathname+window.location.search,t),{credentials:`include`,headers:t});if(!n.ok)return aa(`returned ${n.status}`);let r=n.headers.get(`content-type`)??``;if(!r.startsWith(`text/x-component`))return aa(`returned non-RSC content-type "${r||`(missing)`}"`);if(!n.body)return aa(`returned empty body`);ia(),Wr();let i=Oi(n.headers.get(s)),a=i??{};if(i)try{Ii(i)}catch{}return Xi(window.location.pathname,window.location.search,a),n.body}function sa(){pi(async(e,t)=>{let n=mi(),r=await di(t,{temporaryReferences:n}),i=Mi(),{headers:a}=fr({actionId:e,basePath:``,elements:i.elements,previousNextUrl:i.previousNextUrl}),o=await fetch(await Xe(window.location.pathname+window.location.search,a),{method:`POST`,headers:a,body:r});if(ei(o))throw Error($r(e));let s=o.headers.get(p);if(s){if(C(s)){console.error(S);return}try{if(new URL(s,window.location.origin).origin!==window.location.origin){window.location.href=s;return}}catch{}Bi(),(o.headers.get(`x-action-redirect-type`)??`replace`)===`push`?window.location.assign(s):window.location.replace(s);return}let c=await ui(Promise.resolve(o),{temporaryReferences:n});if(zn(c)&&Bi(),Rn(c)){if(c.root!==void 0)return Ui(Promise.resolve(H.decode(c.root)),c.returnValue,i);if(c.returnValue){if(!c.returnValue.ok)throw c.returnValue.data;return c.returnValue.data}return}return Ui(Promise.resolve(H.decode(c)),void 0,i)})}async function ca(){sa();let e=await oa();e!==null&&la(e)}function la(e){let t=Ji(li(e)),n=zt(window.location.href,Ai);q(cr(window.history.state,null),``,window.location.href);let r=Xr(()=>ji),i=Yr({formState:Jr(Bn()),onUncaughtError:r});window.__VINEXT_RSC_ROOT__=(0,Zr.hydrateRoot)(document,(0,F.createElement)(Yi,{initialElements:t,initialNavigationSnapshot:n}),i),window.__VINEXT_HYDRATED_AT=performance.now(),window.__VINEXT_CLEAR_NAV_CACHES__=Bi,window.__VINEXT_RSC_NAVIGATE__=async function(e,t=0,n=`navigate`,r,i,a=!1){let o=null,l=Q.beginNavigation(),u=e,d=r,f=i,p=t;try{let e=a&&n!==`refresh`;if(e&&Ni())o=Fi();else{if(await Pi(),!Q.isCurrentNavigation(l))return;e&&(o=Fi())}for(;;){if(p>10){console.error(`[vinext] Too many RSC redirects — aborting navigation to prevent infinite loop.`),window.location.href=u;return}let e=new URL(u,window.location.origin),t=qi(n,f),r=t.interceptionContext,i=t.previousNextUrl;Ut(e.pathname,l);let a=Mi().elements,m=je(a),h=Je({interceptionContext:r,renderMode:n===`refresh`?T:void 0});m&&h.set(c,m);let g=await Xe(e.pathname+e.search,h),_=Gi(g,r,m,n);if(_){if(!Q.isCurrentNavigation(l))return;let e=_.params,t=zt(u,e),r=Ji(ui(Promise.resolve(Tt(_.response))));if(!Q.isCurrentNavigation(l))return;await Hi(r,t,u,l,d,e,i,o,Si(n),Ci(n));return}let v,y=null;if(n!==`refresh`){let e=Dt(g,r,m);e&&(v=Tt(e,!1),y=e.url)}if(v||=await fetch(g,{headers:h,credentials:`include`}),!Q.isCurrentNavigation(l))return;let b=(v.headers.get(`content-type`)??``).startsWith(`text/x-component`);if(!v.ok||!b||!v.body){let e=y??v.url,t=u;if(e){let n=new URL(e,window.location.origin);Ke(n);let r=new URL(u,window.location.origin),i=qe(n.pathname);r.pathname.length>1&&r.pathname.endsWith(`/`)&&!i.endsWith(`/`)&&(i+=`/`),t=i+n.search,r.hash&&(t+=r.hash)}window.location.href=t;return}let x=new URL(y??v.url,window.location.origin);Ke(x);let S=new URL(g,window.location.origin);if(x.pathname!==S.pathname){let e=qe(x.pathname)+x.search;q(cr(null,i),``,e),u=e,d=void 0,f=i,p+=1;continue}let C=Oi(v.headers.get(`X-Vinext-Params`))??{},ee=zt(u,C),w=v.body;if(!w)return;let[E,D]=w.tee(),te=new Response(E,{status:v.status,headers:v.headers}),O=new Response(D).arrayBuffer();if(!Q.isCurrentNavigation(l))return;let k=Ji(ui(Promise.resolve(te)));if(!Q.isCurrentNavigation(l)||await Hi(k,ee,u,l,d,C,i,o,Si(n),Ci(n))!==`committed`||!Q.isCurrentNavigation(l))return;let A=await k,j=H.readMetadata(A),M=await O;Ki(g,Me(r,j.interceptionContext),{buffer:M,contentType:v.headers.get(`content-type`)??`text/x-component`,mountedSlotsHeader:v.headers.get(c),paramsHeader:v.headers.get(s),url:v.url},C);return}}catch(e){if(!Q.isCurrentNavigation(l))return;ea||console.error(`[vinext] RSC navigation error:`,e),window.location.href=u}finally{Q.finalizeNavigation(l,o)}},`scrollRestoration`in history&&(history.scrollRestoration=`manual`),window.addEventListener(`popstate`,e=>{M(window.location.href,`traverse`);let t=window.__VINEXT_RSC_NAVIGATE__?.(window.location.href,0,`traverse`)??Promise.resolve();window.__VINEXT_RSC_PENDING__=t,t.finally(()=>{$i(e.state),window.__VINEXT_RSC_PENDING__===t&&(window.__VINEXT_RSC_PENDING__=null)})})}typeof document<`u`&&(O({appDir:!0,router:nn}),window.addEventListener(`pagehide`,()=>{ea=!0}),window.addEventListener(`pageshow`,()=>{ea=!1}),ca()),window.__VINEXT_LINK_PREFETCH_ROUTES__=[{patternParts:[],isDynamic:!1}];export{lt as n,yi as t};