trybeacon 0.1.33 → 0.1.35

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 (330) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +14 -13
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +6 -0
  6. package/.next/server/app/_global-error/page.js +3 -3
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page.js +2 -2
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  21. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  26. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  27. package/.next/server/app/api/board-annotations/route.js +1 -1
  28. package/.next/server/app/api/board-layout/route.js +1 -1
  29. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  30. package/.next/server/app/api/bug-flags/route.js +1 -1
  31. package/.next/server/app/api/code-graph/position/route.js +1 -1
  32. package/.next/server/app/api/code-graph/route.js +1 -1
  33. package/.next/server/app/api/context/feature/route.js +1 -1
  34. package/.next/server/app/api/context/file/route.js +1 -1
  35. package/.next/server/app/api/context/route.js +2 -2
  36. package/.next/server/app/api/db/arrange/route.js +1 -1
  37. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  38. package/.next/server/app/api/db/position/route.js +1 -1
  39. package/.next/server/app/api/db/position/route.js.nft.json +1 -1
  40. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  41. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  42. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  43. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  44. package/.next/server/app/api/draft/approve/route.js +1 -1
  45. package/.next/server/app/api/draft/route.js +1 -1
  46. package/.next/server/app/api/draft/status/route.js +1 -1
  47. package/.next/server/app/api/edges/[id]/route.js +1 -1
  48. package/.next/server/app/api/edges/route.js +1 -1
  49. package/.next/server/app/api/edges/route.js.nft.json +1 -1
  50. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  51. package/.next/server/app/api/entities/route.js +1 -1
  52. package/.next/server/app/api/feedback/[id]/route.js +1 -1
  53. package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
  54. package/.next/server/app/api/feedback/route.js +1 -1
  55. package/.next/server/app/api/ingest/route.js +2 -2
  56. package/.next/server/app/api/init/route.js +2 -2
  57. package/.next/server/app/api/init/route.js.nft.json +1 -1
  58. package/.next/server/app/api/map/describe/route.js +2 -2
  59. package/.next/server/app/api/map/describe/route.js.nft.json +1 -1
  60. package/.next/server/app/api/map/files/route.js +1 -1
  61. package/.next/server/app/api/map/files/route.js.nft.json +1 -1
  62. package/.next/server/app/api/map/finish/route.js +1 -1
  63. package/.next/server/app/api/map/finish/route.js.nft.json +1 -1
  64. package/.next/server/app/api/map/route.js +1 -1
  65. package/.next/server/app/api/map/route.js.nft.json +1 -1
  66. package/.next/server/app/api/map/start/route.js +1 -1
  67. package/.next/server/app/api/map/start/route.js.nft.json +1 -1
  68. package/.next/server/app/api/map/touch-active/route.js +1 -1
  69. package/.next/server/app/api/map/touch-active/route.js.nft.json +1 -1
  70. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  71. package/.next/server/app/api/nodes/[id]/position/route.js.nft.json +1 -1
  72. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  73. package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -1
  74. package/.next/server/app/api/nodes/positions/route.js +1 -1
  75. package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -1
  76. package/.next/server/app/api/nodes/route.js +1 -1
  77. package/.next/server/app/api/nodes/route.js.nft.json +1 -1
  78. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  79. package/.next/server/app/api/nodes/subtasks/route.js.nft.json +1 -1
  80. package/.next/server/app/api/notes/[id]/route.js +1 -1
  81. package/.next/server/app/api/notes/route.js +1 -1
  82. package/.next/server/app/api/open/route.js +1 -1
  83. package/.next/server/app/api/plan/annotations/route.js +3 -3
  84. package/.next/server/app/api/plan/approve/route.js +2 -2
  85. package/.next/server/app/api/plan/history/route.js +1 -1
  86. package/.next/server/app/api/plan/markdown/route.js +1 -1
  87. package/.next/server/app/api/plan/markdown/route.js.nft.json +1 -1
  88. package/.next/server/app/api/plan/presence/route.js +1 -1
  89. package/.next/server/app/api/plan/route.js +1 -1
  90. package/.next/server/app/api/plan/route.js.nft.json +1 -1
  91. package/.next/server/app/api/plan/verdict/route.js +1 -1
  92. package/.next/server/app/api/preferences/route.js +1 -1
  93. package/.next/server/app/api/project-meta/route.js +1 -0
  94. package/.next/server/app/api/project-meta/route.js.nft.json +1 -0
  95. package/.next/server/app/api/project-meta/route_client-reference-manifest.js +1 -0
  96. package/.next/server/app/api/reset/route.js +1 -1
  97. package/.next/server/app/api/stream/route.js +2 -2
  98. package/.next/server/app/api/version/route.js +1 -1
  99. package/.next/server/app/api/workspace/activate/route.js +1 -1
  100. package/.next/server/app/api/workspace/route.js +1 -1
  101. package/.next/server/app/apple-icon.png/route.js +1 -1
  102. package/.next/server/app/docs/page.js +2 -2
  103. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app/docs.html +1 -1
  105. package/.next/server/app/docs.rsc +2 -2
  106. package/.next/server/app/docs.segments/_full.segment.rsc +2 -2
  107. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  108. package/.next/server/app/docs.segments/_index.segment.rsc +2 -2
  109. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  110. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  111. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  112. package/.next/server/app/feedback/page.js +2 -2
  113. package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/feedback.html +1 -1
  115. package/.next/server/app/feedback.rsc +2 -2
  116. package/.next/server/app/feedback.segments/_full.segment.rsc +2 -2
  117. package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  118. package/.next/server/app/feedback.segments/_index.segment.rsc +2 -2
  119. package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
  121. package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  122. package/.next/server/app/help/page.js +2 -2
  123. package/.next/server/app/help/page.js.nft.json +1 -1
  124. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  125. package/.next/server/app/help.html +1 -1
  126. package/.next/server/app/help.rsc +2 -2
  127. package/.next/server/app/help.segments/_full.segment.rsc +2 -2
  128. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  129. package/.next/server/app/help.segments/_index.segment.rsc +2 -2
  130. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  131. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  132. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  133. package/.next/server/app/icon.svg/route.js +1 -1
  134. package/.next/server/app/index.html +1 -1
  135. package/.next/server/app/index.rsc +2 -2
  136. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  137. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  138. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  139. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  140. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  141. package/.next/server/app/map/page.js +2 -2
  142. package/.next/server/app/map/page.js.nft.json +1 -1
  143. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  144. package/.next/server/app/page.js +2 -2
  145. package/.next/server/app/page_client-reference-manifest.js +1 -1
  146. package/.next/server/app/plan/page.js +2 -2
  147. package/.next/server/app/plan/page.js.nft.json +1 -1
  148. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  149. package/.next/server/app/settings/page.js +2 -2
  150. package/.next/server/app/settings/page.js.nft.json +1 -1
  151. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  152. package/.next/server/app-paths-manifest.json +14 -13
  153. package/.next/server/chunks/1130.js +1 -0
  154. package/.next/server/chunks/1341.js +1 -0
  155. package/.next/server/chunks/249.js +1 -1
  156. package/.next/server/chunks/2933.js +1 -1
  157. package/.next/server/chunks/{4274.js → 3269.js} +2 -2
  158. package/.next/server/chunks/3622.js +1 -0
  159. package/.next/server/chunks/4378.js +1 -1
  160. package/.next/server/chunks/4940.js +1 -0
  161. package/.next/server/chunks/7154.js +1 -0
  162. package/.next/server/chunks/9213.js +1 -1
  163. package/.next/server/chunks/9313.js +3 -3
  164. package/.next/server/chunks/9683.js +1 -1
  165. package/.next/server/chunks/9734.js +1 -1
  166. package/.next/server/middleware-build-manifest.js +1 -1
  167. package/.next/server/middleware.js +3 -3
  168. package/.next/server/pages/404.html +1 -1
  169. package/.next/server/pages/500.html +1 -1
  170. package/.next/server/server-reference-manifest.js +1 -1
  171. package/.next/server/server-reference-manifest.json +1 -1
  172. package/.next/static/chunks/1551-c19a41da7732c31e.js +1 -0
  173. package/.next/static/chunks/{1202-dfeac8ec49693586.js → 6955-c21412b6dcd86d80.js} +1 -1
  174. package/.next/static/chunks/app/_global-error/page-68515a67eece5248.js +1 -0
  175. package/.next/static/chunks/app/api/board-annotations/[id]/route-68515a67eece5248.js +1 -0
  176. package/.next/static/chunks/app/api/board-annotations/route-68515a67eece5248.js +1 -0
  177. package/.next/static/chunks/app/api/board-layout/route-68515a67eece5248.js +1 -0
  178. package/.next/static/chunks/app/api/bug-flags/[id]/route-68515a67eece5248.js +1 -0
  179. package/.next/static/chunks/app/api/bug-flags/route-68515a67eece5248.js +1 -0
  180. package/.next/static/chunks/app/api/code-graph/position/route-68515a67eece5248.js +1 -0
  181. package/.next/static/chunks/app/api/code-graph/route-68515a67eece5248.js +1 -0
  182. package/.next/static/chunks/app/api/context/feature/route-68515a67eece5248.js +1 -0
  183. package/.next/static/chunks/app/api/context/file/route-68515a67eece5248.js +1 -0
  184. package/.next/static/chunks/app/api/context/route-68515a67eece5248.js +1 -0
  185. package/.next/static/chunks/app/api/db/arrange/route-68515a67eece5248.js +1 -0
  186. package/.next/static/chunks/app/api/db/backfill-access/route-68515a67eece5248.js +1 -0
  187. package/.next/static/chunks/app/api/db/position/route-68515a67eece5248.js +1 -0
  188. package/.next/static/chunks/app/api/db/prune-planned/route-68515a67eece5248.js +1 -0
  189. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-68515a67eece5248.js +1 -0
  190. package/.next/static/chunks/app/api/db/relations/[id]/route-68515a67eece5248.js +1 -0
  191. package/.next/static/chunks/app/api/db/tables/[id]/route-68515a67eece5248.js +1 -0
  192. package/.next/static/chunks/app/api/draft/approve/route-68515a67eece5248.js +1 -0
  193. package/.next/static/chunks/app/api/draft/route-68515a67eece5248.js +1 -0
  194. package/.next/static/chunks/app/api/draft/status/route-68515a67eece5248.js +1 -0
  195. package/.next/static/chunks/app/api/edges/[id]/route-68515a67eece5248.js +1 -0
  196. package/.next/static/chunks/app/api/edges/route-68515a67eece5248.js +1 -0
  197. package/.next/static/chunks/app/api/endpoints/[id]/route-68515a67eece5248.js +1 -0
  198. package/.next/static/chunks/app/api/entities/route-68515a67eece5248.js +1 -0
  199. package/.next/static/chunks/app/api/feedback/[id]/route-68515a67eece5248.js +1 -0
  200. package/.next/static/chunks/app/api/feedback/[id]/vote/route-68515a67eece5248.js +1 -0
  201. package/.next/static/chunks/app/api/feedback/route-68515a67eece5248.js +1 -0
  202. package/.next/static/chunks/app/api/ingest/route-68515a67eece5248.js +1 -0
  203. package/.next/static/chunks/app/api/init/route-68515a67eece5248.js +1 -0
  204. package/.next/static/chunks/app/api/map/describe/route-68515a67eece5248.js +1 -0
  205. package/.next/static/chunks/app/api/map/files/route-68515a67eece5248.js +1 -0
  206. package/.next/static/chunks/app/api/map/finish/route-68515a67eece5248.js +1 -0
  207. package/.next/static/chunks/app/api/map/route-68515a67eece5248.js +1 -0
  208. package/.next/static/chunks/app/api/map/start/route-68515a67eece5248.js +1 -0
  209. package/.next/static/chunks/app/api/map/touch-active/route-68515a67eece5248.js +1 -0
  210. package/.next/static/chunks/app/api/nodes/[id]/position/route-68515a67eece5248.js +1 -0
  211. package/.next/static/chunks/app/api/nodes/[id]/route-68515a67eece5248.js +1 -0
  212. package/.next/static/chunks/app/api/nodes/positions/route-68515a67eece5248.js +1 -0
  213. package/.next/static/chunks/app/api/nodes/route-68515a67eece5248.js +1 -0
  214. package/.next/static/chunks/app/api/nodes/subtasks/route-68515a67eece5248.js +1 -0
  215. package/.next/static/chunks/app/api/notes/[id]/route-68515a67eece5248.js +1 -0
  216. package/.next/static/chunks/app/api/notes/route-68515a67eece5248.js +1 -0
  217. package/.next/static/chunks/app/api/open/route-68515a67eece5248.js +1 -0
  218. package/.next/static/chunks/app/api/plan/annotations/route-68515a67eece5248.js +1 -0
  219. package/.next/static/chunks/app/api/plan/approve/route-68515a67eece5248.js +1 -0
  220. package/.next/static/chunks/app/api/plan/history/route-68515a67eece5248.js +1 -0
  221. package/.next/static/chunks/app/api/plan/markdown/route-68515a67eece5248.js +1 -0
  222. package/.next/static/chunks/app/api/plan/presence/route-68515a67eece5248.js +1 -0
  223. package/.next/static/chunks/app/api/plan/route-68515a67eece5248.js +1 -0
  224. package/.next/static/chunks/app/api/plan/verdict/route-68515a67eece5248.js +1 -0
  225. package/.next/static/chunks/app/api/preferences/route-68515a67eece5248.js +1 -0
  226. package/.next/static/chunks/app/api/project-meta/route-68515a67eece5248.js +1 -0
  227. package/.next/static/chunks/app/api/reset/route-68515a67eece5248.js +1 -0
  228. package/.next/static/chunks/app/api/stream/route-68515a67eece5248.js +1 -0
  229. package/.next/static/chunks/app/api/version/route-68515a67eece5248.js +1 -0
  230. package/.next/static/chunks/app/api/workspace/activate/route-68515a67eece5248.js +1 -0
  231. package/.next/static/chunks/app/api/workspace/route-68515a67eece5248.js +1 -0
  232. package/.next/static/chunks/app/map/page-8417d6e5dc33e7fb.js +1 -0
  233. package/.next/static/chunks/app/plan/page-af54cdc9fb6058a3.js +1 -0
  234. package/.next/static/chunks/next/dist/client/components/builtin/app-error-68515a67eece5248.js +1 -0
  235. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-68515a67eece5248.js +1 -0
  236. package/.next/static/chunks/next/dist/client/components/builtin/not-found-68515a67eece5248.js +1 -0
  237. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-68515a67eece5248.js +1 -0
  238. package/.next/static/css/496162fa86c30a1d.css +1 -0
  239. package/.next/static/p7RuAgL_wa-K9PsrN1Js0/_buildManifest.js +1 -0
  240. package/.next/trace +38 -38
  241. package/.next/trace-build +1 -1
  242. package/.next/types/app/api/{plan → project-meta}/route.ts +3 -3
  243. package/.next/types/routes.d.ts +2 -1
  244. package/.next/types/validator.ts +9 -0
  245. package/dist/bin/beacon.js +9 -6
  246. package/dist/bin/doctor.js +31 -28
  247. package/dist/bin/hook.js +28 -25
  248. package/dist/bin/mcp.js +40 -37
  249. package/dist/bin/plan.js +31 -28
  250. package/dist/bin/remove.js +6 -6
  251. package/dist/bin/uninstall.js +30 -27
  252. package/dist/lib/assets.js +6 -3
  253. package/dist/lib/codex-install.js +6 -3
  254. package/dist/lib/global-install.js +6 -3
  255. package/dist/lib/release.js +2 -0
  256. package/dist/lib/semver.js +2 -0
  257. package/dist/lib/workspaces.js +1 -1
  258. package/drizzle/0006_optimal_chronomancer.sql +2 -0
  259. package/drizzle/meta/0006_snapshot.json +1765 -0
  260. package/drizzle/meta/_journal.json +7 -0
  261. package/package.json +1 -1
  262. package/.next/server/chunks/7138.js +0 -1
  263. package/.next/server/chunks/7373.js +0 -1
  264. package/.next/static/chunks/8252-326851ad274762f5.js +0 -1
  265. package/.next/static/chunks/app/_global-error/page-4cdc03c65547f289.js +0 -1
  266. package/.next/static/chunks/app/api/board-annotations/[id]/route-4cdc03c65547f289.js +0 -1
  267. package/.next/static/chunks/app/api/board-annotations/route-4cdc03c65547f289.js +0 -1
  268. package/.next/static/chunks/app/api/board-layout/route-4cdc03c65547f289.js +0 -1
  269. package/.next/static/chunks/app/api/bug-flags/[id]/route-4cdc03c65547f289.js +0 -1
  270. package/.next/static/chunks/app/api/bug-flags/route-4cdc03c65547f289.js +0 -1
  271. package/.next/static/chunks/app/api/code-graph/position/route-4cdc03c65547f289.js +0 -1
  272. package/.next/static/chunks/app/api/code-graph/route-4cdc03c65547f289.js +0 -1
  273. package/.next/static/chunks/app/api/context/feature/route-4cdc03c65547f289.js +0 -1
  274. package/.next/static/chunks/app/api/context/file/route-4cdc03c65547f289.js +0 -1
  275. package/.next/static/chunks/app/api/context/route-4cdc03c65547f289.js +0 -1
  276. package/.next/static/chunks/app/api/db/arrange/route-4cdc03c65547f289.js +0 -1
  277. package/.next/static/chunks/app/api/db/backfill-access/route-4cdc03c65547f289.js +0 -1
  278. package/.next/static/chunks/app/api/db/position/route-4cdc03c65547f289.js +0 -1
  279. package/.next/static/chunks/app/api/db/prune-planned/route-4cdc03c65547f289.js +0 -1
  280. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-4cdc03c65547f289.js +0 -1
  281. package/.next/static/chunks/app/api/db/relations/[id]/route-4cdc03c65547f289.js +0 -1
  282. package/.next/static/chunks/app/api/db/tables/[id]/route-4cdc03c65547f289.js +0 -1
  283. package/.next/static/chunks/app/api/draft/approve/route-4cdc03c65547f289.js +0 -1
  284. package/.next/static/chunks/app/api/draft/route-4cdc03c65547f289.js +0 -1
  285. package/.next/static/chunks/app/api/draft/status/route-4cdc03c65547f289.js +0 -1
  286. package/.next/static/chunks/app/api/edges/[id]/route-4cdc03c65547f289.js +0 -1
  287. package/.next/static/chunks/app/api/edges/route-4cdc03c65547f289.js +0 -1
  288. package/.next/static/chunks/app/api/endpoints/[id]/route-4cdc03c65547f289.js +0 -1
  289. package/.next/static/chunks/app/api/entities/route-4cdc03c65547f289.js +0 -1
  290. package/.next/static/chunks/app/api/feedback/[id]/route-4cdc03c65547f289.js +0 -1
  291. package/.next/static/chunks/app/api/feedback/[id]/vote/route-4cdc03c65547f289.js +0 -1
  292. package/.next/static/chunks/app/api/feedback/route-4cdc03c65547f289.js +0 -1
  293. package/.next/static/chunks/app/api/ingest/route-4cdc03c65547f289.js +0 -1
  294. package/.next/static/chunks/app/api/init/route-4cdc03c65547f289.js +0 -1
  295. package/.next/static/chunks/app/api/map/describe/route-4cdc03c65547f289.js +0 -1
  296. package/.next/static/chunks/app/api/map/files/route-4cdc03c65547f289.js +0 -1
  297. package/.next/static/chunks/app/api/map/finish/route-4cdc03c65547f289.js +0 -1
  298. package/.next/static/chunks/app/api/map/route-4cdc03c65547f289.js +0 -1
  299. package/.next/static/chunks/app/api/map/start/route-4cdc03c65547f289.js +0 -1
  300. package/.next/static/chunks/app/api/map/touch-active/route-4cdc03c65547f289.js +0 -1
  301. package/.next/static/chunks/app/api/nodes/[id]/position/route-4cdc03c65547f289.js +0 -1
  302. package/.next/static/chunks/app/api/nodes/[id]/route-4cdc03c65547f289.js +0 -1
  303. package/.next/static/chunks/app/api/nodes/positions/route-4cdc03c65547f289.js +0 -1
  304. package/.next/static/chunks/app/api/nodes/route-4cdc03c65547f289.js +0 -1
  305. package/.next/static/chunks/app/api/nodes/subtasks/route-4cdc03c65547f289.js +0 -1
  306. package/.next/static/chunks/app/api/notes/[id]/route-4cdc03c65547f289.js +0 -1
  307. package/.next/static/chunks/app/api/notes/route-4cdc03c65547f289.js +0 -1
  308. package/.next/static/chunks/app/api/open/route-4cdc03c65547f289.js +0 -1
  309. package/.next/static/chunks/app/api/plan/annotations/route-4cdc03c65547f289.js +0 -1
  310. package/.next/static/chunks/app/api/plan/approve/route-4cdc03c65547f289.js +0 -1
  311. package/.next/static/chunks/app/api/plan/history/route-4cdc03c65547f289.js +0 -1
  312. package/.next/static/chunks/app/api/plan/markdown/route-4cdc03c65547f289.js +0 -1
  313. package/.next/static/chunks/app/api/plan/presence/route-4cdc03c65547f289.js +0 -1
  314. package/.next/static/chunks/app/api/plan/route-4cdc03c65547f289.js +0 -1
  315. package/.next/static/chunks/app/api/plan/verdict/route-4cdc03c65547f289.js +0 -1
  316. package/.next/static/chunks/app/api/preferences/route-4cdc03c65547f289.js +0 -1
  317. package/.next/static/chunks/app/api/reset/route-4cdc03c65547f289.js +0 -1
  318. package/.next/static/chunks/app/api/stream/route-4cdc03c65547f289.js +0 -1
  319. package/.next/static/chunks/app/api/version/route-4cdc03c65547f289.js +0 -1
  320. package/.next/static/chunks/app/api/workspace/activate/route-4cdc03c65547f289.js +0 -1
  321. package/.next/static/chunks/app/api/workspace/route-4cdc03c65547f289.js +0 -1
  322. package/.next/static/chunks/app/map/page-ac03f88297a40d47.js +0 -1
  323. package/.next/static/chunks/app/plan/page-47e880f3e83a2753.js +0 -1
  324. package/.next/static/chunks/next/dist/client/components/builtin/app-error-4cdc03c65547f289.js +0 -1
  325. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-4cdc03c65547f289.js +0 -1
  326. package/.next/static/chunks/next/dist/client/components/builtin/not-found-4cdc03c65547f289.js +0 -1
  327. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4cdc03c65547f289.js +0 -1
  328. package/.next/static/css/cb2ba3334a6b2336.css +0 -1
  329. package/.next/static/kJSpkyKRHr2jFBQoOGP8P/_buildManifest.js +0 -1
  330. /package/.next/static/{kJSpkyKRHr2jFBQoOGP8P → p7RuAgL_wa-K9PsrN1Js0}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- (()=>{var a={};a.id=6624,a.ids=[6624],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},478:(a,b,c)=>{"use strict";c.d(b,{PlanWorkspace:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call PlanWorkspace() from the server but PlanWorkspace is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/plan/plan-workspace.tsx","PlanWorkspace")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},25623:(a,b,c)=>{"use strict";c.d(b,{PlanWorkspace:()=>X});var d=c(48249),e=c(67484),f=c(35471),g=c(15996),h=c(36274),i=c(69357),j=c(25148),k=c(64686);let l=(0,k.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=c(18201);let n=(0,k.A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var o=c(92361),p=c(10920),q=c(52839),r=c(45535),s=c(57684),t=c(24422),u=c(19099),v=c(81166),w=c(61837),x=c(49783),y=c(99086),z=c(33191),A=c(2942);function B({markdown:a,round:b,onApi:c,hideSubmit:g=!1,getExtraSubmitPayload:h}){let[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[A,D]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),H=(0,e.useRef)(null),I=(0,e.useRef)(null);(0,e.useCallback)(()=>{let a=window.getSelection();if(!a||a.isCollapsed)return void p(null);let b=a.toString().trim();if(!b)return void p(null);if(!H.current?.contains(a.anchorNode))return;let c=a.getRangeAt(0).getBoundingClientRect();p({x:c.right+window.scrollX,y:c.top+window.scrollY,excerpt:b})},[]);let J=(0,e.useCallback)((a,b="comment",c="")=>{let d=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;j(e=>[...e,{id:d,excerpt:a,comment:c,kind:b}]),"comment"===b&&v(d),p(null),window.getSelection()?.removeAllRanges()},[]),K=async()=>{if(!A){D(!0);try{let a=h?.()??{},c=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:k,round:b,...a})});c.ok?G(!0):409===c.status&&window.location.reload()}finally{D(!1)}}},L=(0,e.useMemo)(()=>i.filter(a=>"deletion"===a.kind||a.comment.trim()).length+ +!!k.trim(),[i,k]);return(0,d.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,d.jsx)("div",{className:"relative shrink-0",children:(0,d.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!g&&(0,d.jsxs)("button",{onClick:()=>void K(),disabled:A||0===L,className:(0,z.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",F?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===L?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:F?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[F?(0,d.jsx)(f.A,{className:"size-3"}):(0,d.jsx)(q.A,{className:"size-3"}),F?"Submitted":"Submit feedback"]}),m&&(0,d.jsxs)("div",{ref:I,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,d.jsx)("button",{onClick:()=>n(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,d.jsx)(r.A,{className:"size-3"})})]}),(0,d.jsx)("textarea",{autoFocus:!0,value:k,onChange:a=>l(a.target.value),onKeyDown:a=>{a.stopPropagation(),"Enter"===a.key&&a.shiftKey?(a.preventDefault(),!A&&L>0&&(K(),n(!1))):"Escape"===a.key&&(a.preventDefault(),n(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,d.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"Shift+Enter to submit \xb7 Esc to close"})]})]})}),(0,d.jsx)("div",{ref:H,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,d.jsx)(E,{markdown:a,annotations:s?[...i,{id:"__pending",excerpt:s.excerpt,comment:"",kind:"comment"}]:i,focusOnId:u,onClearFocus:()=>v(null),onUpdate:(a,b)=>j(c=>c.map(c=>c.id===a?{...c,comment:b}:c)),onRemove:a=>j(b=>b.filter(b=>b.id!==a))})}),o&&(0,d.jsxs)("div",{style:{position:"fixed",left:o.x+4,top:o.y-30,zIndex:60},className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,d.jsx)("button",{onClick:()=>{t({...o,seed:""}),p(null),window.getSelection()?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,d.jsx)(x.A,{className:"size-3.5"})}),(0,d.jsx)("button",{onClick:()=>J(o.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,d.jsx)(y.A,{className:"size-3.5"})})]}),s&&(0,d.jsx)(C,{excerpt:s.excerpt,x:s.x,y:s.y,seed:s.seed,onConfirm:a=>{J(s.excerpt,"comment",a),t(null)},onCancel:()=>t(null)})]})}function C({excerpt:a,x:b,y:c,seed:g,onConfirm:h,onCancel:i}){let[j,k]=(0,e.useState)(g),l=(0,e.useRef)(null),m=()=>j.trim()?h(j.trim()):i();return(0,d.jsxs)("div",{ref:l,style:{position:"fixed",left:b+4,top:c-6,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:a=>{l.current?.contains(a.relatedTarget)||m()},children:[(0,d.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",a,"”"]}),(0,d.jsx)("textarea",{autoFocus:!0,value:j,onChange:a=>k(a.target.value),onFocus:a=>a.currentTarget.setSelectionRange(j.length,j.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:a=>{a.stopPropagation(),"Enter"!==a.key||a.shiftKey?"Escape"===a.key&&(a.preventDefault(),i()):(a.preventDefault(),m())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,d.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,d.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,d.jsx)(r.A,{className:"size-3"}),"Discard"]}),(0,d.jsxs)("button",{type:"button",onClick:m,disabled:!j.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,d.jsx)(f.A,{className:"size-3"}),"Add"]})]})]})}function D({annotations:a,updateComment:b,removeAnnotation:c,focusOnAnnotation:e,onClose:f}){return 0===a.length?(0,d.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.map(a=>(0,d.jsx)("li",{className:(0,z.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===a.kind?"border-red-500/25":"border-sky-500/15"),children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{e(a.id),f?.()},title:"Jump to this excerpt in the plan",className:(0,z.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===a.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",a.excerpt,"”"]}),"deletion"!==a.kind&&(0,d.jsx)("textarea",{value:a.comment,onChange:c=>b(a.id,c.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,d.jsx)("button",{onClick:()=>c(a.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,d.jsx)(s.A,{className:"size-3"})})]})},a.id))})}function E({markdown:a,annotations:b,focusOnId:c,onClearFocus:f,onUpdate:g,onRemove:h}){let i=(0,e.useMemo)(()=>(0,A.n$)(a),[a]);return(0,d.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((a,e)=>(0,d.jsx)(F,{block:a,index:e,annotations:b,focusOnId:c,onClearFocus:f,onUpdate:g,onRemove:h},e))})}function F({block:a,index:b,annotations:c,focusOnId:e,onClearFocus:f,onUpdate:g,onRemove:h}){if("code"===a.kind)return(0,d.jsx)(A.NG,{text:a.text});if("table"===a.kind)return(0,d.jsx)(A.QH,{block:a});let i=(0,d.jsx)(G,{text:a.text,annotations:c,focusOnId:e,onClearFocus:f,onUpdate:g,onRemove:h}),j=(0,A.Vq)(a.kind)?(0,A.vB)(b):void 0;return(0,d.jsx)(d.Fragment,{children:(0,A.aM)(a,i,"reading",j)})}function G({text:a,annotations:b,focusOnId:c,onClearFocus:e,onUpdate:f,onRemove:g}){let h=b.map(b=>({a:b,idx:a.indexOf(b.excerpt)})).filter(a=>a.idx>=0).sort((a,b)=>a.idx-b.idx);if(!h.length)return(0,d.jsx)(I,{text:a});let i=[],j=0;for(let{a:b,idx:k}of h)k<j||(k>j&&i.push((0,d.jsx)(I,{text:a.slice(j,k)},`p-${j}`)),i.push((0,d.jsx)(H,{annotation:b,autoFocus:c===b.id,onClearFocus:e,onUpdate:f,onRemove:g},b.id)),j=k+b.excerpt.length);return j<a.length&&i.push((0,d.jsx)(I,{text:a.slice(j)},"p-tail")),(0,d.jsx)(d.Fragment,{children:i})}function H({annotation:a,autoFocus:b,onClearFocus:c,onUpdate:f,onRemove:g}){return((0,e.useRef)(null),"deletion"===(a.kind??"comment"))?(0,d.jsxs)("span",{className:"relative inline",children:[(0,d.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,d.jsx)(I,{text:a.excerpt})}),(0,d.jsx)("button",{type:"button",onClick:()=>g(a.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,d.jsx)(s.A,{className:"size-3"})})]}):(0,d.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":a.id,children:(0,d.jsx)(I,{text:a.excerpt})})}function I({text:a}){return(0,d.jsx)(A.cV,{text:a})}let J=(0,k.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function K({pendingPlan:a=!1}={}){let b=(0,u.useRouter)(),[c,i]=(0,e.useState)([]),[j,k]=(0,e.useState)(null),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)("markdown"),q=(0,e.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Date(c.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});b.has(a)||b.set(a,[]),b.get(a).push(c)}return Array.from(b.entries())})(c),[c]),s=a?(0,d.jsxs)("button",{onClick:()=>b.push((0,w.rc)()),className:"glass pointer-events-auto fixed left-3 top-3 z-30 flex h-10 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,d.jsx)(J,{className:"size-3.5"})," Back to current plan"]}):null;return 0===c.length?(0,d.jsxs)(d.Fragment,{children:[s,(0,d.jsx)("div",{className:"flex h-screen items-center justify-center px-6 pt-14 text-center",children:(0,d.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,d.jsx)(l,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,d.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,d.jsxs)("div",{className:"flex h-screen min-h-0 pt-14",children:[s,m&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"glass pointer-events-auto fixed left-1/2 top-3 z-30 flex -translate-x-1/2 items-center gap-0.5 rounded-full p-1",children:[(0,d.jsx)(L,{active:"markdown"===o,onClick:()=>p("markdown"),children:"Plan"}),(0,d.jsx)(L,{active:"map"===o,onClick:()=>p("map"),icon:(0,d.jsx)(g.A,{className:"size-3"}),children:"Features"}),(0,d.jsx)(L,{active:"db"===o,onClick:()=>p("db"),icon:(0,d.jsx)(h.A,{className:"size-3"}),children:"Schema"})]}),(0,d.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,d.jsx)("span",{className:(0,z.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()})]})]}),(0,d.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,d.jsxs)("div",{className:"border-b border-white/5 px-3 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",c.length]}),(0,d.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:q.map(([a,b])=>(0,d.jsxs)("li",{children:[(0,d.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:a}),(0,d.jsx)("ul",{children:b.map(a=>(0,d.jsx)("li",{children:(0,d.jsxs)("button",{onClick:()=>k(a.id),className:(0,z.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",j===a.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,d.jsx)("span",{className:(0,z.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===a.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:a.verdict,children:"approved"===a.verdict?(0,d.jsx)(f.A,{className:"size-2.5"}):(0,d.jsx)(r.A,{className:"size-2.5"})}),(0,d.jsx)("span",{className:"line-clamp-2",children:a.description})]})},a.id))})]},a))})]}),m?(0,d.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,d.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:["markdown"===o&&(0,d.jsxs)("div",{className:"px-5 py-4",children:[(0,d.jsx)(A.pO,{markdown:m.markdown}),""===m.markdown.replace(/^#[^\n]*\n?/,"").trim()&&(0,d.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema tabs for what it proposed."}),m.globalComment&&(0,d.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,d.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,d.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]}),"map"===o&&(0,d.jsx)(M,{featureGraph:m.featureGraph}),"db"===o&&(0,d.jsx)(N,{draftDoc:m.draftDoc})]})}):(0,d.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})}function L({active:a,onClick:b,icon:c,children:e}){return(0,d.jsxs)("button",{onClick:b,className:(0,z.cn)("flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium transition-colors",a?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[c,e]})}function M({featureGraph:a}){let b=a?.features??[];return 0===b.length?(0,d.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No features were proposed in this plan."}):(0,d.jsx)("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map((a,b)=>(0,d.jsxs)("div",{className:"rounded-lg border border-sky-500/20 bg-card/50 p-3",children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-sky-300",children:"feature"}),a.cluster&&(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:a.cluster})]}),(0,d.jsx)("div",{className:"text-sm font-semibold leading-tight",children:a.title}),a.role&&(0,d.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground",children:a.role}),a.plain&&(0,d.jsx)("div",{className:"mt-2 text-[12px] text-foreground/80",children:a.plain})]},b))})}function N({draftDoc:a}){let b=a?.tables??[],c=a?.endpoints??[];return 0===b.length&&0===c.length?(0,d.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No schema was proposed in this plan."}):(0,d.jsxs)("div",{className:"space-y-5 px-5 py-4",children:[b.length>0&&(0,d.jsxs)("section",{children:[(0,d.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Tables \xb7 ",b.length]}),(0,d.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:b.map(a=>(0,d.jsxs)("div",{className:"rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"font-mono text-[13px] font-semibold",children:a.name}),a.domain&&(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:a.domain})]}),a.description&&(0,d.jsx)("div",{className:"mb-1.5 text-[11px] text-muted-foreground",children:a.description}),(0,d.jsx)("ul",{className:"space-y-0.5 text-[11px]",children:a.columns.map((a,b)=>(0,d.jsxs)("li",{className:"flex items-baseline gap-1.5",children:[(0,d.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[11px]",children:a.name}),(0,d.jsx)("span",{className:"text-muted-foreground",children:a.type}),a.isPk&&(0,d.jsx)("span",{className:"text-amber-300/80 text-[9px]",children:"PK"}),a.isFk&&(0,d.jsx)("span",{className:"text-sky-300/80 text-[9px]",children:"FK"}),!a.nullable&&(0,d.jsx)("span",{className:"text-muted-foreground/60 text-[9px]",children:"NOT NULL"})]},b))})]},a.id))})]}),c.length>0&&(0,d.jsxs)("section",{children:[(0,d.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Endpoints \xb7 ",c.length]}),(0,d.jsx)("ul",{className:"space-y-1.5",children:c.map(a=>{let b;return(0,d.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-white/5 bg-card/40 px-2.5 py-1.5 text-[12px]",children:[(0,d.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-bold",style:(b=O[a.method.toUpperCase()]??"#8a8a8a",{background:`${b}22`,color:b}),children:a.method}),(0,d.jsx)("span",{className:"font-mono",children:a.path}),a.description&&(0,d.jsx)("span",{className:"ml-2 text-[11px] text-muted-foreground",children:a.description})]},a.id)})})]})]})}let O={GET:"#7bd389",POST:"#4ea1ff",PUT:"#ffb86b",PATCH:"#ffb86b",DELETE:"#ff3860"};function P({markdown:a}){let b=(0,e.useMemo)(()=>(0,A.n$)(a).map((a,b)=>({b:a,i:b})).filter(({b:a})=>(0,A.Vq)(a.kind)).map(({b:a,i:b})=>({id:(0,A.vB)(b),level:(0,A.F8)(a.kind),label:(0,A.kz)(a.text)})).filter(a=>a.label.length>0),[a]),[c,f]=(0,e.useState)(null);return(0,d.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,d.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===b.length?(0,d.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,d.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:b.map(a=>(0,d.jsx)("button",{onClick:()=>{var b;let c;return b=a.id,void((c=document.getElementById(b))&&(c.scrollIntoView({behavior:"smooth",block:"start"}),f(b)))},title:a.label,style:{paddingLeft:`${.5+.75*a.level}rem`},className:(0,z.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",c===a.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:a.label},a.id))})]})}var Q=c(48581),R=c(74732),S=c(26284),T=c(56922);function U({open:a,onOpenChange:b,onConfirmed:c}){let[g,h]=(0,e.useState)("bypassPermissions"),[i,j]=(0,e.useState)(!1);async function k(){j(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:g})}).catch(()=>{}),b(!1),c()}finally{j(!1)}}return(0,d.jsx)(R.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(R.Cf,{className:"max-w-lg",children:[(0,d.jsxs)(R.c7,{children:[(0,d.jsxs)(R.L3,{className:"flex items-center gap-2",children:[(0,d.jsx)(Q.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,d.jsx)(R.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,d.jsx)("div",{className:"space-y-2 py-1",children:T.pC.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>h(a.value),className:(0,z.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",g===a.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,d.jsx)("span",{className:(0,z.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",g===a.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:g===a.value&&(0,d.jsx)(f.A,{className:"size-3 text-emerald-300"})}),(0,d.jsxs)("span",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block text-sm font-medium text-foreground",children:a.label}),(0,d.jsx)("span",{className:"block text-xs text-muted-foreground",children:a.description})]})]},a.value))}),(0,d.jsxs)(R.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,d.jsx)(S.$,{onClick:k,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}var V=c(72469),W=c(7747);function X({dbProps:a,mapProps:b,planMarkdown:c,forceHistory:k=!1}){let x=(0,u.useRouter)(),{status:y,discard:A}=(0,v.j)(),C=b.nodes.length>0,E=a.tables.length>0||a.endpoints.length>0||(a.draft?.tables.length??0)>0||(a.draft?.endpoints.length??0)>0,[F,G]=(0,e.useState)(C?"map":"db"),H="map"!==F||C?"db"!==F||E?F:"map":"db",[I,J]=(0,e.useState)(!1),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),Q=(0,e.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),O({features:y.features,tables:y.tables,endpoints:y.endpoints})},[y.features,y.tables,y.endpoints]),R=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/preferences",{cache:"no-store"});if((await a.json()).planApprovalModeConfigured)return void Q()}catch{Q();return}M(!0)},[Q]),[S,T]=(0,e.useState)(null),$=(0,e.useCallback)(a=>T(a),[]),_=(0,e.useRef)(null),aa=(0,e.useRef)(null),ab=(0,e.useRef)(a.draft),[ac,ad]=(0,e.useState)(!1),ae=(0,e.useCallback)(()=>ad(!0),[]),[af,ag]=(0,e.useState)([]),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)(""),al=(0,e.useCallback)(a=>{ak(a),ai(!0)},[]),am=(0,e.useRef)(af),an=(0,e.useCallback)(()=>({draft:ab.current,questions:am.current}),[]),ao=(0,e.useMemo)(()=>{let c=[];for(let a of b.nodes)c.push(`feature: ${a.title}`);for(let b of a.draft?.tables??[])c.push(`table: ${b.name}`);for(let b of a.tables)c.push(`table: ${b.name}`);for(let b of a.draft?.endpoints??[])c.push(`endpoint: ${b.method} ${b.path}`);for(let b of a.endpoints)c.push(`endpoint: ${b.method} ${b.path}`);return Array.from(new Set(c))},[b.nodes,a]),ap=S?(0,d.jsx)(D,{annotations:S.annotations,updateComment:S.updateComment,removeAnnotation:S.removeAnnotation,focusOnAnnotation:S.focusOnAnnotation,onClose:()=>_.current?.close()}):null,aq=(0,e.useCallback)(()=>{_.current?.open()},[]),ar=(0,e.useCallback)(()=>{"db"===H?aa.current?.openComments():_.current?.openComments()},[H]),as=(0,e.useCallback)(a=>{S?.addComment(a)},[S]),at=(0,e.useCallback)(a=>{S?.focusOnAnnotation(a),"db"===H?aa.current?.openComments():_.current?.openComments()},[S,H]),[au,av]=(0,e.useState)(()=>50),aw=(0,e.useRef)(null),ax=(0,e.useRef)(!1),ay=(0,e.useCallback)(a=>{a.preventDefault(),ax.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]),az=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),await A(),x.refresh()};if((!y.pending||k)&&!N)return(0,d.jsx)(K,{pendingPlan:y.pending});let aA=C||E,aB=aA&&!I,aC=!aA||I,aD=((S?.liveCount??0)>0||ac||af.length>0)&&!S?.submitted;return(0,d.jsxs)("div",{className:"relative flex h-screen flex-col",children:[N&&(0,d.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,d.jsx)(f.A,{className:"size-6 text-emerald-300"})}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,d.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:N.features>0||N.tables>0||N.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[N.features>0&&(0,d.jsxs)("button",{onClick:()=>x.push("/map?view=ROADMAP"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,d.jsx)(g.A,{className:"size-4 text-sky-300"})," ",N.features," feature",1===N.features?"":"s"," → Map"]}),(N.tables>0||N.endpoints>0)&&(0,d.jsxs)("button",{onClick:()=>x.push("/map?view=DATABASE"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,d.jsx)(h.A,{className:"size-4 text-violet-300"})," ",N.tables," table",1===N.tables?"":"s"," \xb7 ",N.endpoints," endpoint",1===N.endpoints?"":"s"," → Database"]})]}),(0,d.jsx)("button",{onClick:()=>{O(null),x.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),S?.submitted&&(0,d.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,d.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,d.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,d.jsx)("button",{onClick:()=>x.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,d.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[aA&&I&&(0,d.jsx)("button",{onClick:()=>J(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(j.A,{className:"size-3.5"})}),(0,d.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,d.jsx)("button",{onClick:()=>x.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(l,{className:"size-3.5"})}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,d.jsx)("button",{onClick:aq,disabled:!S,title:"Open the side panel (details)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(m.A,{className:"size-3.5"})}),(0,d.jsxs)("button",{onClick:ar,disabled:!S,title:S?.annotationCount?`Open comments \xb7 ${S.annotationCount} comment${1===S.annotationCount?"":"s"} so far`:"Open comments — select a card/table and 'Comment on this', or highlight text",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,d.jsx)(n,{className:"size-3.5"}),S&&(S.annotationCount??0)>0&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:S.annotationCount})]}),(0,d.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>S?.toggleOverall?.(),disabled:!S?.toggleOverall,title:S?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,z.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",S?.globalOpen?"bg-white/10 text-foreground":S?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,d.jsx)(o.A,{className:"size-3.5"}),S?.hasGlobalComment&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,d.jsxs)("button",{onClick:()=>ai(a=>!a),title:"Ask the agent a question about a node (answered in its next round)",className:(0,z.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",ah?"bg-white/10 text-foreground":af.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,d.jsx)(p.A,{className:"size-3.5"}),af.length>0&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:af.length})]}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,d.jsxs)("button",{onClick:()=>S?.submit(),disabled:!S||S.submitting||0===S.liveCount&&!ac&&0===af.length,title:S&&(0!==S.liveCount||ac||0!==af.length)?S.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,z.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",S?.submitted?"text-sky-300":S&&(0!==S.liveCount||ac||0!==af.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[S?.submitted?(0,d.jsx)(f.A,{className:"size-3"}):(0,d.jsx)(q.A,{className:"size-3"}),S?.submitted?"Submitted":"Feedback"]}),aD&&(0,d.jsxs)("button",{onClick:()=>{S?.clearAll?.(),ad(!1),ag([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,d.jsx)(r.A,{className:"size-3"})," Clear to approve"]}),(0,d.jsxs)("button",{onClick:()=>void R(),disabled:aD,title:aD?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,z.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",aD&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,d.jsx)(f.A,{className:"size-3"})," Approve"]}),(0,d.jsxs)("button",{onClick:az,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,d.jsx)(s.A,{className:"size-3"})," Discard"]}),(0,d.jsx)(U,{open:L,onOpenChange:M,onConfirmed:()=>void Q()})]})]}),ah&&(0,d.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,d.jsx)("button",{onClick:()=>ai(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,d.jsx)(r.A,{className:"size-3.5"})})]}),(0,d.jsx)(Y,{targets:ao,initialTarget:aj,onAdd:a=>ag(b=>[...b,a])}),af.length>0&&(0,d.jsx)("ul",{className:"mt-2 space-y-1",children:af.map((a,b)=>(0,d.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:a.target}),(0,d.jsx)("div",{className:"text-[11px] text-foreground/90",children:a.question})]}),(0,d.jsx)("button",{onClick:()=>ag(a=>a.filter((a,c)=>c!==b)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,d.jsx)(r.A,{className:"size-3"})})]},b))}),(0,d.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,d.jsxs)("div",{ref:aw,className:"flex min-h-0 flex-1",children:[aC&&(0,d.jsx)(P,{markdown:c}),(0,d.jsxs)("div",{className:(0,z.cn)("relative flex min-w-0 flex-col",!aB&&"flex-1"),style:aB?{width:`${au}%`}:void 0,children:[aB&&(0,d.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,d.jsx)("button",{onClick:()=>J(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(t.A,{className:"size-3.5"})})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,d.jsx)(B,{markdown:c,round:y.proposedAt,onApi:$,hideSubmit:!0,getExtraSubmitPayload:an})})]}),aB&&(0,d.jsx)("div",{onPointerDown:ay,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,d.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),aB&&(0,d.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-au}%`},children:[C&&E&&(0,d.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,d.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,d.jsx)(Z,{active:"map"===H,onClick:()=>G("map"),icon:(0,d.jsx)(g.A,{className:"size-3"}),children:"Map"}),(0,d.jsx)(Z,{active:"db"===H,onClick:()=>G("db"),icon:(0,d.jsx)(h.A,{className:"size-3"}),children:"Database"})]})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===H?(0,d.jsx)(V.MapClient,{view:b.view,nodes:b.nodes,edges:b.edges,embedded:!0,commentsContent:ap,commentsCount:S?.annotationCount??0,controlRef:_,onAskAgent:al,onAddComment:as,annotations:S?.annotations,onPinClick:at,onUpdateComment:S?.updateComment,onRemoveComment:S?.removeAnnotation}):(0,d.jsx)(W.DbMapClient,{tables:a.tables,relations:a.relations,endpoints:a.endpoints,draft:a.draft,workspaceId:a.workspaceId,diffBase:a.diffBase,embedded:!0,draftRef:ab,onEdit:ae,controlRef:aa,commentsContent:ap,commentsCount:S?.annotationCount??0,onAddComment:as,annotations:S?.annotations,onPinClick:at,onUpdateComment:S?.updateComment,onRemoveComment:S?.removeAnnotation})})]})]})]})}function Y({targets:a,onAdd:b,initialTarget:c}){let[f,g]=(0,e.useState)(c||a[0]||""),[h,i]=(0,e.useState)(""),j=()=>{let a=h.trim();a&&(b({target:f||"(plan)",question:a}),i(""))};return(0,d.jsxs)("div",{className:"space-y-1.5",children:[a.length>0&&(0,d.jsx)("select",{value:f,onChange:a=>g(a.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:a.map(a=>(0,d.jsx)("option",{value:a,className:"bg-card",children:a},a))}),(0,d.jsx)("textarea",{value:h,onChange:a=>i(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),j())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,d.jsx)("button",{onClick:j,disabled:!h.trim(),className:(0,z.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",h.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}function Z({active:a,onClick:b,icon:c,children:e}){return(0,d.jsxs)("button",{onClick:b,className:(0,z.cn)("flex items-center gap-1 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",a?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[c,e]})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},28855:a=>{"use strict";a.exports=import("@libsql/client")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},39577:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["plan",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,65193)),"/home/runner/work/beacon/beacon/app/plan/page.tsx"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,86364))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,7667))).default(a)],openGraph:[],twitter:[],manifest:void 0}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,23704)),"/home/runner/work/beacon/beacon/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,86364))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,7667))).default(a)],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/plan/page",pathname:"/plan",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/plan/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},48581:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},52839:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},56922:(a,b,c)=>{"use strict";c.d(b,{pC:()=>d});let d=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},58343:(a,b,c)=>{Promise.resolve().then(c.bind(c,478))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65193:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>r,dynamic:()=>s});var e=c(5735),f=c(73024),g=c(76760),h=c(56727),i=c(72179),j=c(50101),k=c(79935),l=c(24433),m=c(45301),n=c(6716),o=c(84853),p=c(478),q=a([h,i,j,l]);[h,i,j,l]=q.then?(await q)():q;let s="force-dynamic";async function r({searchParams:a}){let b=await a??{},c="history"===b.view,d="string"==typeof b.ws?b.ws:void 0,q=await (0,o.K)(d);return(0,h.X_)(q,async()=>{let a,b=(0,i.iL)(),d=await h.db.query.node.findMany({where:(a,{and:b,eq:c})=>b(c(a.view,"ROADMAP"),c(a.source,"DRAFT")),with:{nodeTags:{with:{tag:{columns:{label:!0}}}},files:{columns:{path:!0},orderBy:(a,{asc:b})=>b(a.path)}}}),o=q??(0,n.VB)()?.id??"default",[r,s]=await Promise.all([h.db.query.dbTable.findMany({columns:{name:!0},with:{columns:{columns:{name:!0,type:!0,isPk:!0,isFk:!0,nullable:!0}}}}),h.db.query.endpoint.findMany({columns:{method:!0,path:!0}})]),t={tables:r.map(a=>({name:a.name,columns:a.columns})),endpoints:s.map(a=>({method:a.method,path:a.path}))},u=new Set(d.map(a=>a.id)),v=u.size?await h.db.query.edge.findMany({where:(a,{and:b,inArray:c})=>b(c(a.fromId,[...u]),c(a.toId,[...u]))}):[],w=d.map(a=>({id:a.id,view:a.view,kind:a.kind,cluster:a.cluster,title:a.title,role:a.role,plain:a.plain,status:a.status,priority:a.priority,x:a.x,y:a.y,source:a.source,sourceRef:a.sourceRef,parentId:a.parentId,isCriterion:a.nodeTags.some(a=>"criterion"===a.tag.label),files:a.files.map(a=>a.path),bugFlags:[]})),x=v.map(a=>({id:a.id,fromId:a.fromId,toId:a.toId,kind:a.kind,label:a.label,sourceHandle:a.sourceHandle,targetHandle:a.targetHandle})),y=await (0,j.C5)(),z="(no description)";try{let b=JSON.parse((0,f.readFileSync)((0,g.join)((0,m.KS)(),"plan-meta.json"),"utf8"));z=b.description??z,a=b.markdown?(0,l.J)(b.markdown).prose:void 0}catch{}let A=a??(0,k.j)(z,b,y);return(0,e.jsx)(p.PlanWorkspace,{dbProps:{tables:[],relations:[],endpoints:[],draft:b,workspaceId:o,diffBase:t},mapProps:{view:"ROADMAP",nodes:w,edges:x},planMarkdown:A,forceHistory:c})})}d()}catch(a){d(a)}})},69357:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},97663:(a,b,c)=>{Promise.resolve().then(c.bind(c,25623))}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,9884,3254,5871,4046,319,4217,4198,5573,5719,4274,9683,9734,3015,249,7138],()=>b(b.s=39577));module.exports=c})();
1
+ (()=>{var a={};a.id=6624,a.ids=[6624],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},478:(a,b,c)=>{"use strict";c.d(b,{PlanWorkspace:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call PlanWorkspace() from the server but PlanWorkspace is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/plan/plan-workspace.tsx","PlanWorkspace")},2998:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["plan",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,65193)),"/home/runner/work/beacon/beacon/app/plan/page.tsx"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,86364))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,7667))).default(a)],openGraph:[],twitter:[],manifest:void 0}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,23704)),"/home/runner/work/beacon/beacon/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,86364))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,7667))).default(a)],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/plan/page",pathname:"/plan",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/plan/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},25623:(a,b,c)=>{"use strict";c.d(b,{PlanWorkspace:()=>Y});var d=c(48249),e=c(67484),f=c(35471),g=c(15996),h=c(36274),i=c(69357),j=c(25148),k=c(64686);let l=(0,k.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=c(18201);let n=(0,k.A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var o=c(92361),p=c(10920),q=c(52839),r=c(45535),s=c(57684),t=c(24422),u=c(19099),v=c(81166),w=c(61837),x=c(49783),y=c(99086),z=c(33191),A=c(2942);let B="u">typeof CSS&&"highlights"in CSS&&"u">typeof Highlight;function C({markdown:a,round:b,onApi:c,hideSubmit:g=!1,getExtraSubmitPayload:h}){let[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[A,E]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),I=(0,e.useRef)(null),J=(0,e.useRef)(null),K=(0,e.useRef)(null);(0,e.useCallback)(()=>{let a=window.getSelection();if(!a||a.isCollapsed)return void p(null);let b=a.toString().trim();if(!b)return void p(null);if(!I.current?.contains(a.anchorNode))return;let c=a.getRangeAt(0).getBoundingClientRect();p({x:c.right+window.scrollX,y:c.top+window.scrollY,excerpt:b})},[]);let L=(0,e.useCallback)((a,b="comment",c="")=>{let d=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;j(e=>[...e,{id:d,excerpt:a,comment:c,kind:b}]),"comment"===b&&v(d),p(null),window.getSelection()?.removeAllRanges()},[]),M=async()=>{if(!A){E(!0);try{let a=h?.()??{},c=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:k,round:b,...a})});c.ok?H(!0):409===c.status&&window.location.reload()}finally{E(!1)}}},N=(0,e.useMemo)(()=>i.filter(a=>"deletion"===a.kind||a.comment.trim()).length+ +!!k.trim(),[i,k]);return(0,d.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,d.jsx)("div",{className:"relative shrink-0",children:(0,d.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!g&&(0,d.jsxs)("button",{onClick:()=>void M(),disabled:A||0===N,className:(0,z.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",G?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===N?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:G?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[G?(0,d.jsx)(f.A,{className:"size-3"}):(0,d.jsx)(q.A,{className:"size-3"}),G?"Submitted":"Submit feedback"]}),m&&(0,d.jsxs)("div",{ref:J,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,d.jsx)("button",{onClick:()=>n(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,d.jsx)(r.A,{className:"size-3"})})]}),(0,d.jsx)("textarea",{autoFocus:!0,value:k,onChange:a=>l(a.target.value),onKeyDown:a=>{a.stopPropagation(),"Enter"===a.key&&a.shiftKey?(a.preventDefault(),!A&&N>0&&(M(),n(!1))):"Escape"===a.key&&(a.preventDefault(),n(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,d.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"Shift+Enter to submit \xb7 Esc to close"})]})]})}),(0,d.jsx)("div",{ref:I,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,d.jsx)(F,{markdown:a,annotations:s&&!B?[...i,{id:"__pending",excerpt:s.excerpt,comment:"",kind:"comment"}]:i,focusOnId:u,onClearFocus:()=>v(null),onUpdate:(a,b)=>j(c=>c.map(c=>c.id===a?{...c,comment:b}:c)),onRemove:a=>j(b=>b.filter(b=>b.id!==a))})}),o&&(0,d.jsxs)("div",{style:{position:"fixed",left:o.x+4,top:o.y-30,zIndex:60},className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,d.jsx)("button",{onClick:()=>{let a=window.getSelection();K.current=a&&a.rangeCount?a.getRangeAt(0).cloneRange():null,t({...o,seed:""}),p(null),a?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,d.jsx)(x.A,{className:"size-3.5"})}),(0,d.jsx)("button",{onClick:()=>L(o.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,d.jsx)(y.A,{className:"size-3.5"})})]}),s&&(0,d.jsx)(D,{excerpt:s.excerpt,x:s.x,y:s.y,seed:s.seed,onConfirm:a=>{L(s.excerpt,"comment",a),t(null)},onCancel:()=>t(null)})]})}function D({excerpt:a,x:b,y:c,seed:g,onConfirm:h,onCancel:i}){let[j,k]=(0,e.useState)(g),l=(0,e.useRef)(null),m=()=>j.trim()?h(j.trim()):i();return(0,d.jsxs)("div",{ref:l,style:{position:"fixed",left:b+4,top:c-6,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:a=>{l.current?.contains(a.relatedTarget)||m()},children:[(0,d.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",a,"”"]}),(0,d.jsx)("textarea",{autoFocus:!0,value:j,onChange:a=>k(a.target.value),onFocus:a=>a.currentTarget.setSelectionRange(j.length,j.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:a=>{a.stopPropagation(),"Enter"!==a.key||a.shiftKey?"Escape"===a.key&&(a.preventDefault(),i()):(a.preventDefault(),m())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,d.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,d.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,d.jsx)(r.A,{className:"size-3"}),"Discard"]}),(0,d.jsxs)("button",{type:"button",onClick:m,disabled:!j.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,d.jsx)(f.A,{className:"size-3"}),"Add"]})]})]})}function E({annotations:a,updateComment:b,removeAnnotation:c,focusOnAnnotation:e,onClose:f}){return 0===a.length?(0,d.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,d.jsx)("ul",{className:"space-y-1.5",children:a.map(a=>(0,d.jsx)("li",{className:(0,z.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===a.kind?"border-red-500/25":"border-sky-500/15"),children:(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{e(a.id),f?.()},title:"Jump to this excerpt in the plan",className:(0,z.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===a.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",a.excerpt,"”"]}),"deletion"!==a.kind&&(0,d.jsx)("textarea",{value:a.comment,onChange:c=>b(a.id,c.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,d.jsx)("button",{onClick:()=>c(a.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,d.jsx)(s.A,{className:"size-3"})})]})},a.id))})}function F({markdown:a,annotations:b,focusOnId:c,onClearFocus:f,onUpdate:g,onRemove:h}){let i=(0,e.useMemo)(()=>(0,A.n$)(a),[a]);return(0,d.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((a,e)=>(0,d.jsx)(G,{block:a,index:e,annotations:b,focusOnId:c,onClearFocus:f,onUpdate:g,onRemove:h},e))})}function G({block:a,index:b,annotations:c,focusOnId:e,onClearFocus:f,onUpdate:g,onRemove:h}){if("code"===a.kind)return(0,d.jsx)(A.NG,{text:a.text});if("table"===a.kind)return(0,d.jsx)(A.QH,{block:a});let i=(0,d.jsx)(H,{text:a.text,annotations:c,focusOnId:e,onClearFocus:f,onUpdate:g,onRemove:h}),j=(0,A.Vq)(a.kind)?(0,A.vB)(b):void 0;return(0,d.jsx)(d.Fragment,{children:(0,A.aM)(a,i,"reading",j)})}function H({text:a,annotations:b,focusOnId:c,onClearFocus:e,onUpdate:f,onRemove:g}){let h=(B?[]:b).map(b=>({a:b,idx:a.indexOf(b.excerpt)})).filter(a=>a.idx>=0).sort((a,b)=>a.idx-b.idx);if(!h.length)return(0,d.jsx)(J,{text:a});let i=[],j=0;for(let{a:b,idx:k}of h)k<j||(k>j&&i.push((0,d.jsx)(J,{text:a.slice(j,k)},`p-${j}`)),i.push((0,d.jsx)(I,{annotation:b,autoFocus:c===b.id,onClearFocus:e,onUpdate:f,onRemove:g},b.id)),j=k+b.excerpt.length);return j<a.length&&i.push((0,d.jsx)(J,{text:a.slice(j)},"p-tail")),(0,d.jsx)(d.Fragment,{children:i})}function I({annotation:a,autoFocus:b,onClearFocus:c,onUpdate:f,onRemove:g}){return((0,e.useRef)(null),"deletion"===(a.kind??"comment"))?(0,d.jsxs)("span",{className:"relative inline",children:[(0,d.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,d.jsx)(J,{text:a.excerpt})}),(0,d.jsx)("button",{type:"button",onClick:()=>g(a.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,d.jsx)(s.A,{className:"size-3"})})]}):(0,d.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":a.id,children:(0,d.jsx)(J,{text:a.excerpt})})}function J({text:a}){return(0,d.jsx)(A.cV,{text:a})}let K=(0,k.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function L({pendingPlan:a=!1}={}){let b=(0,u.useRouter)(),[c,i]=(0,e.useState)([]),[j,k]=(0,e.useState)(null),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)("markdown"),q=(0,e.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Date(c.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});b.has(a)||b.set(a,[]),b.get(a).push(c)}return Array.from(b.entries())})(c),[c]),s=a?(0,d.jsxs)("button",{onClick:()=>b.push((0,w.rc)()),className:"glass pointer-events-auto fixed left-3 top-3 z-30 flex h-10 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,d.jsx)(K,{className:"size-3.5"})," Back to current plan"]}):null;return 0===c.length?(0,d.jsxs)(d.Fragment,{children:[s,(0,d.jsx)("div",{className:"flex h-screen items-center justify-center px-6 pt-14 text-center",children:(0,d.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,d.jsx)(l,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,d.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,d.jsxs)("div",{className:"flex h-screen min-h-0 pt-14",children:[s,m&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"glass pointer-events-auto fixed left-1/2 top-3 z-30 flex -translate-x-1/2 items-center gap-0.5 rounded-full p-1",children:[(0,d.jsx)(M,{active:"markdown"===o,onClick:()=>p("markdown"),children:"Plan"}),(0,d.jsx)(M,{active:"map"===o,onClick:()=>p("map"),icon:(0,d.jsx)(g.A,{className:"size-3"}),children:"Features"}),(0,d.jsx)(M,{active:"db"===o,onClick:()=>p("db"),icon:(0,d.jsx)(h.A,{className:"size-3"}),children:"Schema"})]}),(0,d.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,d.jsx)("span",{className:(0,z.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()})]})]}),(0,d.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,d.jsxs)("div",{className:"border-b border-white/5 px-3 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",c.length]}),(0,d.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:q.map(([a,b])=>(0,d.jsxs)("li",{children:[(0,d.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:a}),(0,d.jsx)("ul",{children:b.map(a=>(0,d.jsx)("li",{children:(0,d.jsxs)("button",{onClick:()=>k(a.id),className:(0,z.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",j===a.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,d.jsx)("span",{className:(0,z.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===a.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:a.verdict,children:"approved"===a.verdict?(0,d.jsx)(f.A,{className:"size-2.5"}):(0,d.jsx)(r.A,{className:"size-2.5"})}),(0,d.jsx)("span",{className:"line-clamp-2",children:a.description})]})},a.id))})]},a))})]}),m?(0,d.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,d.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:["markdown"===o&&(0,d.jsxs)("div",{className:"px-5 py-4",children:[(0,d.jsx)(A.pO,{markdown:m.markdown}),""===m.markdown.replace(/^#[^\n]*\n?/,"").trim()&&(0,d.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema tabs for what it proposed."}),m.globalComment&&(0,d.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,d.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,d.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]}),"map"===o&&(0,d.jsx)(N,{featureGraph:m.featureGraph}),"db"===o&&(0,d.jsx)(O,{draftDoc:m.draftDoc})]})}):(0,d.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})}function M({active:a,onClick:b,icon:c,children:e}){return(0,d.jsxs)("button",{onClick:b,className:(0,z.cn)("flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium transition-colors",a?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[c,e]})}function N({featureGraph:a}){let b=a?.features??[];return 0===b.length?(0,d.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No features were proposed in this plan."}):(0,d.jsx)("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map((a,b)=>(0,d.jsxs)("div",{className:"rounded-lg border border-sky-500/20 bg-card/50 p-3",children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-sky-300",children:"feature"}),a.cluster&&(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:a.cluster})]}),(0,d.jsx)("div",{className:"text-sm font-semibold leading-tight",children:a.title}),a.role&&(0,d.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground",children:a.role}),a.plain&&(0,d.jsx)("div",{className:"mt-2 text-[12px] text-foreground/80",children:a.plain})]},b))})}function O({draftDoc:a}){let b=a?.tables??[],c=a?.endpoints??[];return 0===b.length&&0===c.length?(0,d.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No schema was proposed in this plan."}):(0,d.jsxs)("div",{className:"space-y-5 px-5 py-4",children:[b.length>0&&(0,d.jsxs)("section",{children:[(0,d.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Tables \xb7 ",b.length]}),(0,d.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:b.map(a=>(0,d.jsxs)("div",{className:"rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"font-mono text-[13px] font-semibold",children:a.name}),a.domain&&(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground",children:a.domain})]}),a.description&&(0,d.jsx)("div",{className:"mb-1.5 text-[11px] text-muted-foreground",children:a.description}),(0,d.jsx)("ul",{className:"space-y-0.5 text-[11px]",children:a.columns.map((a,b)=>(0,d.jsxs)("li",{className:"flex items-baseline gap-1.5",children:[(0,d.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[11px]",children:a.name}),(0,d.jsx)("span",{className:"text-muted-foreground",children:a.type}),a.isPk&&(0,d.jsx)("span",{className:"text-amber-300/80 text-[9px]",children:"PK"}),a.isFk&&(0,d.jsx)("span",{className:"text-sky-300/80 text-[9px]",children:"FK"}),!a.nullable&&(0,d.jsx)("span",{className:"text-muted-foreground/60 text-[9px]",children:"NOT NULL"})]},b))})]},a.id))})]}),c.length>0&&(0,d.jsxs)("section",{children:[(0,d.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Endpoints \xb7 ",c.length]}),(0,d.jsx)("ul",{className:"space-y-1.5",children:c.map(a=>{let b;return(0,d.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-white/5 bg-card/40 px-2.5 py-1.5 text-[12px]",children:[(0,d.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-bold",style:(b=P[a.method.toUpperCase()]??"#8a8a8a",{background:`${b}22`,color:b}),children:a.method}),(0,d.jsx)("span",{className:"font-mono",children:a.path}),a.description&&(0,d.jsx)("span",{className:"ml-2 text-[11px] text-muted-foreground",children:a.description})]},a.id)})})]})]})}let P={GET:"#7bd389",POST:"#4ea1ff",PUT:"#ffb86b",PATCH:"#ffb86b",DELETE:"#ff3860"};function Q({markdown:a}){let b=(0,e.useMemo)(()=>(0,A.n$)(a).map((a,b)=>({b:a,i:b})).filter(({b:a})=>(0,A.Vq)(a.kind)).map(({b:a,i:b})=>({id:(0,A.vB)(b),level:(0,A.F8)(a.kind),label:(0,A.kz)(a.text)})).filter(a=>a.label.length>0),[a]),[c,f]=(0,e.useState)(null);return(0,d.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,d.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===b.length?(0,d.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,d.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:b.map(a=>(0,d.jsx)("button",{onClick:()=>{var b;let c;return b=a.id,void((c=document.getElementById(b))&&(c.scrollIntoView({behavior:"smooth",block:"start"}),f(b)))},title:a.label,style:{paddingLeft:`${.5+.75*a.level}rem`},className:(0,z.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",c===a.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:a.label},a.id))})]})}var R=c(48581),S=c(74732),T=c(26284),U=c(56922);function V({open:a,onOpenChange:b,onConfirmed:c}){let[g,h]=(0,e.useState)("bypassPermissions"),[i,j]=(0,e.useState)(!1);async function k(){j(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:g})}).catch(()=>{}),b(!1),c()}finally{j(!1)}}return(0,d.jsx)(S.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(S.Cf,{className:"max-w-lg",children:[(0,d.jsxs)(S.c7,{children:[(0,d.jsxs)(S.L3,{className:"flex items-center gap-2",children:[(0,d.jsx)(R.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,d.jsx)(S.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,d.jsx)("div",{className:"space-y-2 py-1",children:U.pC.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>h(a.value),className:(0,z.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",g===a.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,d.jsx)("span",{className:(0,z.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",g===a.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:g===a.value&&(0,d.jsx)(f.A,{className:"size-3 text-emerald-300"})}),(0,d.jsxs)("span",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block text-sm font-medium text-foreground",children:a.label}),(0,d.jsx)("span",{className:"block text-xs text-muted-foreground",children:a.description})]})]},a.value))}),(0,d.jsxs)(S.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,d.jsx)(T.$,{onClick:k,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}var W=c(74331),X=c(7747);function Y({dbProps:a,mapProps:b,planMarkdown:c,forceHistory:k=!1}){let x=(0,u.useRouter)(),{status:y,discard:A}=(0,v.j)(),B=b.nodes.length>0,D=a.tables.length>0||a.endpoints.length>0||(a.draft?.tables.length??0)>0||(a.draft?.endpoints.length??0)>0,[F,G]=(0,e.useState)(B?"map":"db"),H="map"!==F||B?"db"!==F||D?F:"map":"db",[I,J]=(0,e.useState)(!1),[K,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),P=(0,e.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),O({features:y.features,tables:y.tables,endpoints:y.endpoints})},[y.features,y.tables,y.endpoints]),R=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/preferences",{cache:"no-store"});if((await a.json()).planApprovalModeConfigured)return void P()}catch{P();return}M(!0)},[P]),[S,T]=(0,e.useState)(null),U=(0,e.useCallback)(a=>T(a),[]),_=(0,e.useRef)(null),aa=(0,e.useRef)(null),ab=(0,e.useRef)(a.draft),[ac,ad]=(0,e.useState)(!1),ae=(0,e.useCallback)(()=>ad(!0),[]),[af,ag]=(0,e.useState)([]),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)(""),al=(0,e.useCallback)(a=>{ak(a),ai(!0)},[]),am=(0,e.useRef)(af),an=(0,e.useCallback)(()=>({draft:ab.current,questions:am.current}),[]),ao=(0,e.useMemo)(()=>{let c=[];for(let a of b.nodes)c.push(`feature: ${a.title}`);for(let b of a.draft?.tables??[])c.push(`table: ${b.name}`);for(let b of a.tables)c.push(`table: ${b.name}`);for(let b of a.draft?.endpoints??[])c.push(`endpoint: ${b.method} ${b.path}`);for(let b of a.endpoints)c.push(`endpoint: ${b.method} ${b.path}`);return Array.from(new Set(c))},[b.nodes,a]),ap=S?(0,d.jsx)(E,{annotations:S.annotations,updateComment:S.updateComment,removeAnnotation:S.removeAnnotation,focusOnAnnotation:S.focusOnAnnotation,onClose:()=>_.current?.close()}):null,aq=(0,e.useCallback)(()=>{_.current?.open()},[]),ar=(0,e.useCallback)(()=>{"db"===H?aa.current?.openComments():_.current?.openComments()},[H]),as=(0,e.useCallback)(a=>{S?.addComment(a)},[S]),at=(0,e.useCallback)(a=>{S?.focusOnAnnotation(a),"db"===H?aa.current?.openComments():_.current?.openComments()},[S,H]),[au,av]=(0,e.useState)(()=>50),aw=(0,e.useRef)(null),ax=(0,e.useRef)(!1),ay=(0,e.useCallback)(a=>{a.preventDefault(),ax.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]),az=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),await A(),x.refresh()};if((!y.pending||k)&&!N)return(0,d.jsx)(L,{pendingPlan:y.pending});let aA=B||D,aB=aA&&!I,aC=!aA||I,aD=((S?.liveCount??0)>0||ac||af.length>0)&&!S?.submitted;return(0,d.jsxs)("div",{className:"relative flex h-screen flex-col",children:[N&&(0,d.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,d.jsx)(f.A,{className:"size-6 text-emerald-300"})}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,d.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:N.features>0||N.tables>0||N.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[N.features>0&&(0,d.jsxs)("button",{onClick:()=>x.push("/map?view=ROADMAP"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,d.jsx)(g.A,{className:"size-4 text-sky-300"})," ",N.features," feature",1===N.features?"":"s"," → Map"]}),(N.tables>0||N.endpoints>0)&&(0,d.jsxs)("button",{onClick:()=>x.push("/map?view=DATABASE"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,d.jsx)(h.A,{className:"size-4 text-violet-300"})," ",N.tables," table",1===N.tables?"":"s"," \xb7 ",N.endpoints," endpoint",1===N.endpoints?"":"s"," → Database"]})]}),(0,d.jsx)("button",{onClick:()=>{O(null),x.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),S?.submitted&&(0,d.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,d.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,d.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,d.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,d.jsx)("button",{onClick:()=>x.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,d.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[aA&&I&&(0,d.jsx)("button",{onClick:()=>J(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(j.A,{className:"size-3.5"})}),(0,d.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,d.jsx)("button",{onClick:()=>x.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(l,{className:"size-3.5"})}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,d.jsx)("button",{onClick:aq,disabled:!S,title:"Open the side panel (details)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(m.A,{className:"size-3.5"})}),(0,d.jsxs)("button",{onClick:ar,disabled:!S,title:S?.annotationCount?`Open comments \xb7 ${S.annotationCount} comment${1===S.annotationCount?"":"s"} so far`:"Open comments — select a card/table and 'Comment on this', or highlight text",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,d.jsx)(n,{className:"size-3.5"}),S&&(S.annotationCount??0)>0&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:S.annotationCount})]}),(0,d.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>S?.toggleOverall?.(),disabled:!S?.toggleOverall,title:S?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,z.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",S?.globalOpen?"bg-white/10 text-foreground":S?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,d.jsx)(o.A,{className:"size-3.5"}),S?.hasGlobalComment&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,d.jsxs)("button",{onClick:()=>ai(a=>!a),title:"Ask the agent a question about a node (answered in its next round)",className:(0,z.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",ah?"bg-white/10 text-foreground":af.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,d.jsx)(p.A,{className:"size-3.5"}),af.length>0&&(0,d.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:af.length})]}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,d.jsxs)("button",{onClick:()=>S?.submit(),disabled:!S||S.submitting||0===S.liveCount&&!ac&&0===af.length,title:S&&(0!==S.liveCount||ac||0!==af.length)?S.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,z.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",S?.submitted?"text-sky-300":S&&(0!==S.liveCount||ac||0!==af.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[S?.submitted?(0,d.jsx)(f.A,{className:"size-3"}):(0,d.jsx)(q.A,{className:"size-3"}),S?.submitted?"Submitted":"Feedback"]}),aD&&(0,d.jsxs)("button",{onClick:()=>{S?.clearAll?.(),ad(!1),ag([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,d.jsx)(r.A,{className:"size-3"})," Clear to approve"]}),(0,d.jsxs)("button",{onClick:()=>void R(),disabled:aD,title:aD?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,z.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",aD&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,d.jsx)(f.A,{className:"size-3"})," Approve"]}),(0,d.jsxs)("button",{onClick:az,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,d.jsx)(s.A,{className:"size-3"})," Discard"]}),(0,d.jsx)(V,{open:K,onOpenChange:M,onConfirmed:()=>void P()})]})]}),ah&&(0,d.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,d.jsx)("button",{onClick:()=>ai(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,d.jsx)(r.A,{className:"size-3.5"})})]}),(0,d.jsx)(Z,{targets:ao,initialTarget:aj,onAdd:a=>ag(b=>[...b,a])}),af.length>0&&(0,d.jsx)("ul",{className:"mt-2 space-y-1",children:af.map((a,b)=>(0,d.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:a.target}),(0,d.jsx)("div",{className:"text-[11px] text-foreground/90",children:a.question})]}),(0,d.jsx)("button",{onClick:()=>ag(a=>a.filter((a,c)=>c!==b)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,d.jsx)(r.A,{className:"size-3"})})]},b))}),(0,d.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,d.jsxs)("div",{ref:aw,className:"flex min-h-0 flex-1",children:[aC&&(0,d.jsx)(Q,{markdown:c}),(0,d.jsxs)("div",{className:(0,z.cn)("relative flex min-w-0 flex-col",!aB&&"flex-1"),style:aB?{width:`${au}%`}:void 0,children:[aB&&(0,d.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,d.jsx)("button",{onClick:()=>J(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,d.jsx)(t.A,{className:"size-3.5"})})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,d.jsx)(C,{markdown:c,round:y.proposedAt,onApi:U,hideSubmit:!0,getExtraSubmitPayload:an})})]}),aB&&(0,d.jsx)("div",{onPointerDown:ay,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,d.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),aB&&(0,d.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-au}%`},children:[B&&D&&(0,d.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,d.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,d.jsx)($,{active:"map"===H,onClick:()=>G("map"),icon:(0,d.jsx)(g.A,{className:"size-3"}),children:"Map"}),(0,d.jsx)($,{active:"db"===H,onClick:()=>G("db"),icon:(0,d.jsx)(h.A,{className:"size-3"}),children:"Database"})]})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===H?(0,d.jsx)(W.MapClient,{view:b.view,nodes:b.nodes,edges:b.edges,hasFrontend:b.hasFrontend,embedded:!0,commentsContent:ap,commentsCount:S?.annotationCount??0,controlRef:_,onAskAgent:al,onAddComment:as,annotations:S?.annotations,onPinClick:at,onUpdateComment:S?.updateComment,onRemoveComment:S?.removeAnnotation}):(0,d.jsx)(X.DbMapClient,{tables:a.tables,relations:a.relations,endpoints:a.endpoints,draft:a.draft,workspaceId:a.workspaceId,diffBase:a.diffBase,embedded:!0,draftRef:ab,onEdit:ae,controlRef:aa,commentsContent:ap,commentsCount:S?.annotationCount??0,onAddComment:as,annotations:S?.annotations,onPinClick:at,onUpdateComment:S?.updateComment,onRemoveComment:S?.removeAnnotation})})]})]})]})}function Z({targets:a,onAdd:b,initialTarget:c}){let[f,g]=(0,e.useState)(c||a[0]||""),[h,i]=(0,e.useState)(""),j=()=>{let a=h.trim();a&&(b({target:f||"(plan)",question:a}),i(""))};return(0,d.jsxs)("div",{className:"space-y-1.5",children:[a.length>0&&(0,d.jsx)("select",{value:f,onChange:a=>g(a.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:a.map(a=>(0,d.jsx)("option",{value:a,className:"bg-card",children:a},a))}),(0,d.jsx)("textarea",{value:h,onChange:a=>i(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),j())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,d.jsx)("button",{onClick:j,disabled:!h.trim(),className:(0,z.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",h.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}function $({active:a,onClick:b,icon:c,children:e}){return(0,d.jsxs)("button",{onClick:b,className:(0,z.cn)("flex items-center gap-1 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",a?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[c,e]})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},28855:a=>{"use strict";a.exports=import("@libsql/client")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},48581:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},52839:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},56922:(a,b,c)=>{"use strict";c.d(b,{pC:()=>d});let d=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},58343:(a,b,c)=>{Promise.resolve().then(c.bind(c,478))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65193:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>s,dynamic:()=>t});var e=c(5735),f=c(73024),g=c(76760),h=c(56727),i=c(72179),j=c(50101),k=c(79935),l=c(24433),m=c(72595),n=c(45301),o=c(6716),p=c(84853),q=c(478),r=a([h,i,j,l,m]);[h,i,j,l,m]=r.then?(await r)():r;let t="force-dynamic";async function s({searchParams:a}){let b=await a??{},c="history"===b.view,d="string"==typeof b.ws?b.ws:void 0,r=await (0,p.K)(d);return(0,h.X_)(r,async()=>{let a,b=(0,i.iL)(),d=await h.db.query.node.findMany({where:(a,{and:b,eq:c})=>b(c(a.view,"ROADMAP"),c(a.source,"DRAFT")),with:{nodeTags:{with:{tag:{columns:{label:!0}}}},files:{columns:{path:!0},orderBy:(a,{asc:b})=>b(a.path)}}}),p=r??(0,o.VB)()?.id??"default",[s,t]=await Promise.all([h.db.query.dbTable.findMany({columns:{name:!0},with:{columns:{columns:{name:!0,type:!0,isPk:!0,isFk:!0,nullable:!0}}}}),h.db.query.endpoint.findMany({columns:{method:!0,path:!0}})]),u={tables:s.map(a=>({name:a.name,columns:a.columns})),endpoints:t.map(a=>({method:a.method,path:a.path}))},v=new Set(d.map(a=>a.id)),w=v.size?await h.db.query.edge.findMany({where:(a,{and:b,inArray:c})=>b(c(a.fromId,[...v]),c(a.toId,[...v]))}):[],x=d.map(a=>({id:a.id,view:a.view,kind:a.kind,cluster:a.cluster,layer:a.layer,title:a.title,role:a.role,plain:a.plain,status:a.status,priority:a.priority,x:a.x,y:a.y,source:a.source,sourceRef:a.sourceRef,parentId:a.parentId,isCriterion:a.nodeTags.some(a=>"criterion"===a.tag.label),files:a.files.map(a=>a.path),bugFlags:[]})),y=w.map(a=>({id:a.id,fromId:a.fromId,toId:a.toId,kind:a.kind,label:a.label,sourceHandle:a.sourceHandle,targetHandle:a.targetHandle})),z=await (0,j.C5)(),A="(no description)";try{let b=JSON.parse((0,f.readFileSync)((0,g.join)((0,n.KS)(),"plan-meta.json"),"utf8"));A=b.description??A,a=b.markdown?(0,l.J)(b.markdown).prose:void 0}catch{}let B=a??(0,k.j)(A,b,z),C=await (0,m.jZ)();return(0,e.jsx)(q.PlanWorkspace,{dbProps:{tables:[],relations:[],endpoints:[],draft:b,workspaceId:p,diffBase:u},mapProps:{view:"ROADMAP",nodes:x,edges:y,hasFrontend:C},planMarkdown:B,forceHistory:c})})}d()}catch(a){d(a)}})},69357:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(64686).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},72595:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{hA:()=>i,jZ:()=>k,zr:()=>j});var e=c(56727),f=c(30046),g=c(32753),h=a([e]);async function i(a=e.db){let[b]=await a.insert(f.projectMeta).values({id:"singleton"}).onConflictDoUpdate({target:f.projectMeta.id,set:{id:"singleton"}}).returning();return b}async function j(a,b=e.db){let c={};null!=a.overview&&(c.overview=a.overview),a.conventions&&(c.conventions=JSON.stringify(a.conventions)),void 0!==a.hasFrontend&&(c.hasFrontend=a.hasFrontend),0===Object.keys(c).length&&(c.id="singleton");let[d]=await b.insert(f.projectMeta).values({id:"singleton",overview:a.overview??null,conventions:JSON.stringify(a.conventions??[]),hasFrontend:a.hasFrontend??null}).onConflictDoUpdate({target:f.projectMeta.id,set:c}).returning();return d}async function k(a=e.db){let b=await i(a);if(null!=b.hasFrontend)return b.hasFrontend;let c=await a.select({path:f.codeFile.path}).from(f.codeFile);return(0,g.EC)(c.map(a=>a.path))}e=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},97663:(a,b,c)=>{Promise.resolve().then(c.bind(c,25623))}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,9884,3254,5871,4046,319,4217,4198,5573,5719,3269,9683,9734,3015,249,7154],()=>b(b.s=2998));module.exports=c})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../lib/drizzle/provision.ts","../../../../node_modules/@libsql/client/lib-cjs/hrana.js","../../../../node_modules/@libsql/client/lib-cjs/http.js","../../../../node_modules/@libsql/client/lib-cjs/node.js","../../../../node_modules/@libsql/client/lib-cjs/package.json","../../../../node_modules/@libsql/client/lib-cjs/sql_cache.js","../../../../node_modules/@libsql/client/lib-cjs/sqlite3.js","../../../../node_modules/@libsql/client/lib-cjs/ws.js","../../../../node_modules/@libsql/client/lib-esm/hrana.js","../../../../node_modules/@libsql/client/lib-esm/http.js","../../../../node_modules/@libsql/client/lib-esm/node.js","../../../../node_modules/@libsql/client/lib-esm/sql_cache.js","../../../../node_modules/@libsql/client/lib-esm/sqlite3.js","../../../../node_modules/@libsql/client/lib-esm/ws.js","../../../../node_modules/@libsql/client/package.json","../../../../node_modules/@libsql/core/lib-cjs/api.js","../../../../node_modules/@libsql/core/lib-cjs/config.js","../../../../node_modules/@libsql/core/lib-cjs/package.json","../../../../node_modules/@libsql/core/lib-cjs/uri.js","../../../../node_modules/@libsql/core/lib-cjs/util.js","../../../../node_modules/@libsql/core/lib-esm/api.js","../../../../node_modules/@libsql/core/lib-esm/config.js","../../../../node_modules/@libsql/core/lib-esm/uri.js","../../../../node_modules/@libsql/core/lib-esm/util.js","../../../../node_modules/@libsql/core/package.json","../../../../node_modules/@libsql/hrana-client/lib-cjs/batch.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/byte_queue.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/describe.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/index.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/json/decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/json/encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/util.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/errors.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/stream.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/id_alloc.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/index.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/libsql_url.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/package.json","../../../../node_modules/@libsql/hrana-client/lib-cjs/queue.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/queue_microtask.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/result.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/sql.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/stmt.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/stream.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/util.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/value.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/batch.js","../../../../node_modules/@libsql/hrana-client/lib-esm/byte_queue.js","../../../../node_modules/@libsql/hrana-client/lib-esm/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/describe.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/index.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/json/decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/json/encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/util.js","../../../../node_modules/@libsql/hrana-client/lib-esm/errors.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/id_alloc.js","../../../../node_modules/@libsql/hrana-client/lib-esm/index.js","../../../../node_modules/@libsql/hrana-client/lib-esm/libsql_url.js","../../../../node_modules/@libsql/hrana-client/lib-esm/queue.js","../../../../node_modules/@libsql/hrana-client/lib-esm/queue_microtask.js","../../../../node_modules/@libsql/hrana-client/lib-esm/result.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/sql.js","../../../../node_modules/@libsql/hrana-client/lib-esm/stmt.js","../../../../node_modules/@libsql/hrana-client/lib-esm/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/util.js","../../../../node_modules/@libsql/hrana-client/lib-esm/value.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/stream.js","../../../../node_modules/@libsql/hrana-client/package.json","../../../../node_modules/@libsql/isomorphic-ws/node.cjs","../../../../node_modules/@libsql/isomorphic-ws/node.mjs","../../../../node_modules/@libsql/isomorphic-ws/package.json","../../../../node_modules/@libsql/linux-x64-gnu/index.node","../../../../node_modules/@libsql/linux-x64-gnu/package.json","../../../../node_modules/@neon-rs/load/dist/index.js","../../../../node_modules/@neon-rs/load/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/detect-libc/lib/detect-libc.js","../../../../node_modules/detect-libc/lib/filesystem.js","../../../../node_modules/detect-libc/lib/process.js","../../../../node_modules/detect-libc/package.json","../../../../node_modules/js-base64/base64.js","../../../../node_modules/js-base64/base64.mjs","../../../../node_modules/js-base64/package.json","../../../../node_modules/libsql/auth.js","../../../../node_modules/libsql/index.js","../../../../node_modules/libsql/package.json","../../../../node_modules/libsql/sqlite-error.js","../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../node_modules/next/dist/client/lib/console.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../node_modules/next/dist/compiled/ws/index.js","../../../../node_modules/next/dist/compiled/ws/package.json","../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../node_modules/next/dist/lib/constants.js","../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../node_modules/next/dist/lib/interop-default.js","../../../../node_modules/next/dist/lib/is-error.js","../../../../node_modules/next/dist/lib/picocolors.js","../../../../node_modules/next/dist/lib/scheduler.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../node_modules/next/dist/server/node-environment.js","../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../node_modules/next/dist/server/require-hook.js","../../../../node_modules/next/dist/server/response-cache/types.js","../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../node_modules/next/dist/shared/lib/router/utils/get-segment-param.js","../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../node_modules/next/dist/shared/lib/segment.js","../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../node_modules/next/dist/shared/lib/size-limit.js","../../../../node_modules/next/package.json","../../../../node_modules/promise-limit/index.js","../../../../node_modules/promise-limit/package.json","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/package.json","../../../../node_modules/ws/index.js","../../../../node_modules/ws/lib/buffer-util.js","../../../../node_modules/ws/lib/constants.js","../../../../node_modules/ws/lib/event-target.js","../../../../node_modules/ws/lib/extension.js","../../../../node_modules/ws/lib/limiter.js","../../../../node_modules/ws/lib/permessage-deflate.js","../../../../node_modules/ws/lib/receiver.js","../../../../node_modules/ws/lib/sender.js","../../../../node_modules/ws/lib/stream.js","../../../../node_modules/ws/lib/subprotocol.js","../../../../node_modules/ws/lib/validation.js","../../../../node_modules/ws/lib/websocket-server.js","../../../../node_modules/ws/lib/websocket.js","../../../../node_modules/ws/package.json","../../../../node_modules/ws/wrapper.mjs","../../../../package.json","../../../package.json","../../chunks/249.js","../../chunks/2877.js","../../chunks/3015.js","../../chunks/319.js","../../chunks/3254.js","../../chunks/4046.js","../../chunks/4198.js","../../chunks/4217.js","../../chunks/4274.js","../../chunks/4741.js","../../chunks/5258.js","../../chunks/5573.js","../../chunks/5719.js","../../chunks/5871.js","../../chunks/6042.js","../../chunks/7138.js","../../chunks/9127.js","../../chunks/9683.js","../../chunks/9734.js","../../chunks/9884.js","../../webpack-runtime.js","page_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../lib/drizzle/provision.ts","../../../../node_modules/@libsql/client/lib-cjs/hrana.js","../../../../node_modules/@libsql/client/lib-cjs/http.js","../../../../node_modules/@libsql/client/lib-cjs/node.js","../../../../node_modules/@libsql/client/lib-cjs/package.json","../../../../node_modules/@libsql/client/lib-cjs/sql_cache.js","../../../../node_modules/@libsql/client/lib-cjs/sqlite3.js","../../../../node_modules/@libsql/client/lib-cjs/ws.js","../../../../node_modules/@libsql/client/lib-esm/hrana.js","../../../../node_modules/@libsql/client/lib-esm/http.js","../../../../node_modules/@libsql/client/lib-esm/node.js","../../../../node_modules/@libsql/client/lib-esm/sql_cache.js","../../../../node_modules/@libsql/client/lib-esm/sqlite3.js","../../../../node_modules/@libsql/client/lib-esm/ws.js","../../../../node_modules/@libsql/client/package.json","../../../../node_modules/@libsql/core/lib-cjs/api.js","../../../../node_modules/@libsql/core/lib-cjs/config.js","../../../../node_modules/@libsql/core/lib-cjs/package.json","../../../../node_modules/@libsql/core/lib-cjs/uri.js","../../../../node_modules/@libsql/core/lib-cjs/util.js","../../../../node_modules/@libsql/core/lib-esm/api.js","../../../../node_modules/@libsql/core/lib-esm/config.js","../../../../node_modules/@libsql/core/lib-esm/uri.js","../../../../node_modules/@libsql/core/lib-esm/util.js","../../../../node_modules/@libsql/core/package.json","../../../../node_modules/@libsql/hrana-client/lib-cjs/batch.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/byte_queue.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/describe.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/index.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/json/decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/json/encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/encoding/protobuf/util.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/errors.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/http/stream.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/id_alloc.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/index.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/libsql_url.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/package.json","../../../../node_modules/@libsql/hrana-client/lib-cjs/queue.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/queue_microtask.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/result.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/shared/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/sql.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/stmt.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/stream.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/util.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/value.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/client.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-cjs/ws/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/batch.js","../../../../node_modules/@libsql/hrana-client/lib-esm/byte_queue.js","../../../../node_modules/@libsql/hrana-client/lib-esm/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/describe.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/index.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/json/decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/json/encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/encoding/protobuf/util.js","../../../../node_modules/@libsql/hrana-client/lib-esm/errors.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/http/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/id_alloc.js","../../../../node_modules/@libsql/hrana-client/lib-esm/index.js","../../../../node_modules/@libsql/hrana-client/lib-esm/libsql_url.js","../../../../node_modules/@libsql/hrana-client/lib-esm/queue.js","../../../../node_modules/@libsql/hrana-client/lib-esm/queue_microtask.js","../../../../node_modules/@libsql/hrana-client/lib-esm/result.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/shared/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/sql.js","../../../../node_modules/@libsql/hrana-client/lib-esm/stmt.js","../../../../node_modules/@libsql/hrana-client/lib-esm/stream.js","../../../../node_modules/@libsql/hrana-client/lib-esm/util.js","../../../../node_modules/@libsql/hrana-client/lib-esm/value.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/client.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/cursor.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/json_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/json_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/protobuf_decode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/protobuf_encode.js","../../../../node_modules/@libsql/hrana-client/lib-esm/ws/stream.js","../../../../node_modules/@libsql/hrana-client/package.json","../../../../node_modules/@libsql/isomorphic-ws/node.cjs","../../../../node_modules/@libsql/isomorphic-ws/node.mjs","../../../../node_modules/@libsql/isomorphic-ws/package.json","../../../../node_modules/@libsql/linux-x64-gnu/index.node","../../../../node_modules/@libsql/linux-x64-gnu/package.json","../../../../node_modules/@neon-rs/load/dist/index.js","../../../../node_modules/@neon-rs/load/package.json","../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../node_modules/@swc/helpers/package.json","../../../../node_modules/detect-libc/lib/detect-libc.js","../../../../node_modules/detect-libc/lib/filesystem.js","../../../../node_modules/detect-libc/lib/process.js","../../../../node_modules/detect-libc/package.json","../../../../node_modules/js-base64/base64.js","../../../../node_modules/js-base64/base64.mjs","../../../../node_modules/js-base64/package.json","../../../../node_modules/libsql/auth.js","../../../../node_modules/libsql/index.js","../../../../node_modules/libsql/package.json","../../../../node_modules/libsql/sqlite-error.js","../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../node_modules/next/dist/client/lib/console.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../node_modules/next/dist/compiled/ws/index.js","../../../../node_modules/next/dist/compiled/ws/package.json","../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../node_modules/next/dist/lib/constants.js","../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../node_modules/next/dist/lib/interop-default.js","../../../../node_modules/next/dist/lib/is-error.js","../../../../node_modules/next/dist/lib/picocolors.js","../../../../node_modules/next/dist/lib/scheduler.js","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../node_modules/next/dist/server/node-environment.js","../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../node_modules/next/dist/server/require-hook.js","../../../../node_modules/next/dist/server/response-cache/types.js","../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../node_modules/next/dist/shared/lib/router/utils/get-segment-param.js","../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../node_modules/next/dist/shared/lib/segment.js","../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../node_modules/next/dist/shared/lib/size-limit.js","../../../../node_modules/next/package.json","../../../../node_modules/promise-limit/index.js","../../../../node_modules/promise-limit/package.json","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/package.json","../../../../node_modules/ws/index.js","../../../../node_modules/ws/lib/buffer-util.js","../../../../node_modules/ws/lib/constants.js","../../../../node_modules/ws/lib/event-target.js","../../../../node_modules/ws/lib/extension.js","../../../../node_modules/ws/lib/limiter.js","../../../../node_modules/ws/lib/permessage-deflate.js","../../../../node_modules/ws/lib/receiver.js","../../../../node_modules/ws/lib/sender.js","../../../../node_modules/ws/lib/stream.js","../../../../node_modules/ws/lib/subprotocol.js","../../../../node_modules/ws/lib/validation.js","../../../../node_modules/ws/lib/websocket-server.js","../../../../node_modules/ws/lib/websocket.js","../../../../node_modules/ws/package.json","../../../../node_modules/ws/wrapper.mjs","../../../../package.json","../../../package.json","../../chunks/249.js","../../chunks/2877.js","../../chunks/3015.js","../../chunks/319.js","../../chunks/3254.js","../../chunks/3269.js","../../chunks/4046.js","../../chunks/4198.js","../../chunks/4217.js","../../chunks/4741.js","../../chunks/5258.js","../../chunks/5573.js","../../chunks/5719.js","../../chunks/5871.js","../../chunks/6042.js","../../chunks/7154.js","../../chunks/9127.js","../../chunks/9683.js","../../chunks/9734.js","../../chunks/9884.js","../../webpack-runtime.js","page_client-reference-manifest.js"]}