@chorus-aidlc/chorus 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +357 -355
  3. package/.next/standalone/.next/app-path-routes-manifest.json +44 -44
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +18 -18
  6. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +2 -2
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +2 -2
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  46. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  50. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  51. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
  54. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  55. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/admin/companies.html +2 -2
  57. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  58. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/admin.html +2 -2
  60. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  61. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  69. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
  83. package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
  100. package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
  103. package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
  106. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js.nft.json +1 -1
  109. package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js.nft.json +1 -1
  111. package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
  113. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
  116. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
  117. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
  119. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
  122. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
  125. package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
  129. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/events/route.js +1 -1
  135. package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
  136. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  139. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  142. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  143. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  145. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
  148. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
  149. package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  151. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  154. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  155. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  156. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -1
  157. package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
  158. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
  159. package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
  161. package/.next/standalone/.next/server/app/api/mcp/route.js +1 -1
  162. package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  163. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  164. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  165. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  166. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
  168. package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
  169. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
  171. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
  172. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  173. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
  174. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
  175. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  176. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
  177. package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
  178. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  179. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
  180. package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
  181. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  182. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  183. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  184. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  185. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
  186. package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
  187. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  188. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  189. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  190. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  191. package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
  192. package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
  193. package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
  194. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
  197. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  198. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  199. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  200. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  201. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  202. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  203. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  204. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  205. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  206. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  208. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  209. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  210. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  211. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
  212. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
  214. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  215. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  216. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
  217. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
  218. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  219. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
  220. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
  221. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js.nft.json +1 -1
  223. package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
  224. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  225. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  226. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  227. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  228. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  229. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  230. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  231. package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
  232. package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
  233. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  234. package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
  235. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  236. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
  237. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  238. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
  239. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
  240. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  241. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
  242. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
  243. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  244. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
  245. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
  246. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  247. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
  248. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
  249. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  250. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
  251. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
  252. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  253. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  254. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
  255. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  256. package/.next/standalone/.next/server/app/index.html +2 -2
  257. package/.next/standalone/.next/server/app/index.rsc +2 -2
  258. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  259. package/.next/standalone/.next/server/app/login/admin.html +2 -2
  260. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  261. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  262. package/.next/standalone/.next/server/app/login/callback.html +2 -2
  263. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  264. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  265. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  266. package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
  267. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  268. package/.next/standalone/.next/server/app/login.html +2 -2
  269. package/.next/standalone/.next/server/app/login.rsc +2 -2
  270. package/.next/standalone/.next/server/app/onboarding/page.js +2 -2
  271. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  272. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  273. package/.next/standalone/.next/server/app/onboarding.html +2 -2
  274. package/.next/standalone/.next/server/app/onboarding.rsc +3 -3
  275. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  276. package/.next/standalone/.next/server/app/projects.html +2 -2
  277. package/.next/standalone/.next/server/app/projects.rsc +3 -3
  278. package/.next/standalone/.next/server/app/settings.html +2 -2
  279. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  280. package/.next/standalone/.next/server/app-paths-manifest.json +44 -44
  281. package/.next/standalone/.next/server/chunks/109.js +1 -0
  282. package/.next/standalone/.next/server/chunks/1318.js +1 -1
  283. package/.next/standalone/.next/server/chunks/1496.js +1 -0
  284. package/.next/standalone/.next/server/chunks/1559.js +2 -2
  285. package/.next/standalone/.next/server/chunks/2572.js +1 -1
  286. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  287. package/.next/standalone/.next/server/chunks/3112.js +1 -1
  288. package/.next/standalone/.next/server/chunks/{2536.js → 3619.js} +3 -3
  289. package/.next/standalone/.next/server/chunks/{6080.js → 4810.js} +1 -1
  290. package/.next/standalone/.next/server/chunks/4827.js +1 -1
  291. package/.next/standalone/.next/server/chunks/5245.js +1 -1
  292. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  293. package/.next/standalone/.next/server/chunks/6506.js +2 -2
  294. package/.next/standalone/.next/server/chunks/6515.js +2 -2
  295. package/.next/standalone/.next/server/chunks/6737.js +1 -0
  296. package/.next/standalone/.next/server/chunks/6753.js +3 -3
  297. package/.next/standalone/.next/server/chunks/679.js +1 -1
  298. package/.next/standalone/.next/server/chunks/731.js +1 -0
  299. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  300. package/.next/standalone/.next/server/chunks/7530.js +1 -1
  301. package/.next/standalone/.next/server/chunks/7857.js +1 -0
  302. package/.next/standalone/.next/server/chunks/920.js +1 -1
  303. package/.next/standalone/.next/server/chunks/9213.js +1 -1
  304. package/.next/standalone/.next/server/chunks/9378.js +1 -1
  305. package/.next/standalone/.next/server/chunks/9931.js +1 -1
  306. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  307. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  308. package/.next/standalone/.next/server/pages/404.html +2 -2
  309. package/.next/standalone/.next/server/pages/500.html +1 -1
  310. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  311. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  312. package/.next/standalone/.next/static/chunks/11595.0afa1a540f681fb4.js +1 -0
  313. package/.next/standalone/.next/static/chunks/22705-324a191727ae45b7.js +1 -0
  314. package/.next/standalone/.next/static/chunks/{31308-32614efb88305738.js → 31308-bb4a97b3f39c22dd.js} +1 -1
  315. package/.next/standalone/.next/static/chunks/33456.4a5f4712a7e78d8f.js +1 -0
  316. package/.next/standalone/.next/static/chunks/44216-3876e84f5b02d355.js +1 -0
  317. package/.next/standalone/.next/static/chunks/4860.5719e32b95be2d93.js +1 -0
  318. package/.next/standalone/.next/static/chunks/6528-a8a562ef7d26bb43.js +1 -0
  319. package/.next/standalone/.next/static/chunks/67439-7b339b28ed0ecfc6.js +1 -0
  320. package/.next/standalone/.next/static/chunks/79919-ae8bd8d8ec1e38ce.js +1 -0
  321. package/.next/standalone/.next/static/chunks/82203-4ce5926624df7ed0.js +1 -0
  322. package/.next/standalone/.next/static/chunks/94643-37ac7b8ef8ea5e75.js +1 -0
  323. package/.next/standalone/.next/static/chunks/99373.6c1509bfaf599741.js +1 -0
  324. package/.next/standalone/.next/static/chunks/99775-697e82ee04eac6b1.js +1 -0
  325. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-2fda722cdace8147.js +1 -0
  326. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-eecb38fa4b8eb4e8.js → page-b45c42c536eff64b.js} +1 -1
  327. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-792aba7fd6b6daa3.js +1 -0
  328. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/{page-cd7ec77596304a07.js → page-800a979f12b73f27.js} +1 -1
  329. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-97a9e6f949002004.js → page-34de35f75aa71f6d.js} +1 -1
  330. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-a16002aa2a911619.js +1 -0
  331. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/new/{page-cec15f4b835d34fc.js → page-e8030824994edf35.js} +1 -1
  332. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-4f7f1ddbaf79be8f.js +1 -0
  333. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-4ee117e690fda56f.js → page-349b0977f3c6209a.js} +1 -1
  334. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-7fbc46dfb7b22bd3.js → page-be43cb06112fce12.js} +1 -1
  335. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-6916e1abab42a6e6.js +1 -0
  336. package/.next/standalone/.next/static/chunks/app/onboarding/{page-4fce966dc96d4ff1.js → page-c0090caae202eae5.js} +1 -1
  337. package/.next/standalone/.next/static/chunks/{webpack-1bfc783412a06fc5.js → webpack-cfb63dd1b416c92e.js} +1 -1
  338. package/.next/standalone/.next/static/css/75c761a5428611fa.css +1 -0
  339. package/.next/standalone/package.json +1 -1
  340. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +2 -2
  341. package/.next/standalone/public/chorus-plugin/agents/code-reviewer.md +1 -0
  342. package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +12 -3
  343. package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +4 -0
  344. package/.next/standalone/public/chorus-plugin/bin/chorus-api.sh +1 -1
  345. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-for-verify.sh +3 -3
  346. package/.next/standalone/public/chorus-plugin/bin/on-post-submit-proposal.sh +3 -3
  347. package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +2 -2
  348. package/.next/standalone/public/chorus-plugin/bin/on-session-start.sh +39 -64
  349. package/.next/standalone/public/chorus-plugin/bin/resolve-spec-mode.sh +107 -0
  350. package/.next/standalone/public/chorus-plugin/bin/tests/test-resolver-drift.sh +46 -0
  351. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity-negative.sh +328 -0
  352. package/.next/standalone/public/chorus-plugin/bin/tests/test-skill-harness-fidelity.sh +372 -0
  353. package/.next/standalone/public/chorus-plugin/bin/tests/test-spec-mode-resolution.sh +83 -0
  354. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
  355. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +11 -6
  356. package/.next/standalone/public/chorus-plugin/skills/chorus-cli/SKILL.md +1 -1
  357. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +14 -9
  358. package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
  359. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
  360. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +27 -31
  361. package/.next/standalone/public/chorus-plugin/skills/orchestrate/SKILL.md +11 -1
  362. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +14 -7
  363. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +6 -4
  364. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +10 -8
  365. package/.next/standalone/public/chorus-plugin/skills/spec-lite/SKILL.md +147 -0
  366. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +49 -34
  367. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-code-reviewer.json +1 -1
  368. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-proposal-reviewer.json +2 -1
  369. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-task-reviewer.json +1 -1
  370. package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus.md +1 -1
  371. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
  372. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-cli/SKILL.md +1 -1
  373. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +9 -7
  374. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
  375. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
  376. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +35 -27
  377. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-orchestrate/SKILL.md +9 -1
  378. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +14 -7
  379. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +2 -2
  380. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +8 -8
  381. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-spec-lite/SKILL.md +147 -0
  382. package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +39 -25
  383. package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +11 -6
  384. package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
  385. package/.next/standalone/public/kiro-plugin/bin/on-agent-spawn.sh +41 -0
  386. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-for-verify.sh +3 -3
  387. package/.next/standalone/public/kiro-plugin/bin/on-post-submit-proposal.sh +3 -3
  388. package/.next/standalone/public/kiro-plugin/bin/on-post-verify-task.sh +2 -2
  389. package/.next/standalone/public/kiro-plugin/bin/resolve-spec-mode.sh +107 -0
  390. package/.next/standalone/public/kiro-plugin/manifest.txt +2 -0
  391. package/.next/standalone/public/skill/chorus/SKILL.md +11 -1
  392. package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +1 -0
  393. package/.next/standalone/public/skill/develop-chorus/SKILL.md +1 -1
  394. package/.next/standalone/public/skill/orchestrate-chorus/SKILL.md +11 -1
  395. package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +5 -2
  396. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  397. package/.next/standalone/public/skill/review-chorus/SKILL.md +5 -3
  398. package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +4 -0
  399. package/.next/standalone/public/skill/yolo-chorus/SKILL.md +23 -7
  400. package/README.ja.md +3 -3
  401. package/README.ko.md +3 -3
  402. package/README.md +3 -3
  403. package/README.zh.md +3 -3
  404. package/cli/agent-cli-config.mjs +323 -0
  405. package/cli/agent-launcher.mjs +45 -17
  406. package/cli/claude-spawner.mjs +22 -13
  407. package/cli/codex-spawner.mjs +23 -15
  408. package/cli/credentials.mjs +7 -0
  409. package/cli/daemon-agent.mjs +1 -1
  410. package/cli/daemon-config.mjs +14 -0
  411. package/cli/daemon.mjs +34 -9
  412. package/cli/dsh-managed-config.mjs +219 -293
  413. package/cli/dsh-spawner.mjs +53 -27
  414. package/cli/init/steps/credential-seed.mjs +1 -1
  415. package/cli/kiro-spawner.mjs +22 -15
  416. package/cli/launch-diagnostics.mjs +67 -0
  417. package/cli/login.mjs +17 -1
  418. package/cli/pi-spawner.mjs +19 -12
  419. package/cli/prompts.mjs +52 -2
  420. package/cli/spawner-select.mjs +6 -11
  421. package/package.json +1 -1
  422. package/.next/standalone/.next/server/chunks/1114.js +0 -1
  423. package/.next/standalone/.next/server/chunks/2953.js +0 -1
  424. package/.next/standalone/.next/server/chunks/5162.js +0 -1
  425. package/.next/standalone/.next/server/chunks/6689.js +0 -1
  426. package/.next/standalone/.next/server/chunks/9667.js +0 -1
  427. package/.next/standalone/.next/static/chunks/11595.b81c0bf7732c3b62.js +0 -1
  428. package/.next/standalone/.next/static/chunks/24808-e3d95efc7ec039c5.js +0 -1
  429. package/.next/standalone/.next/static/chunks/33456.cfc9aa607a62e879.js +0 -1
  430. package/.next/standalone/.next/static/chunks/4860.41351a823cf400e4.js +0 -1
  431. package/.next/standalone/.next/static/chunks/51468-194d894e563580dd.js +0 -1
  432. package/.next/standalone/.next/static/chunks/61570-527701d072d00a24.js +0 -1
  433. package/.next/standalone/.next/static/chunks/65066-6da35d5cb080c7f5.js +0 -1
  434. package/.next/standalone/.next/static/chunks/72875-0987d09cd8406614.js +0 -1
  435. package/.next/standalone/.next/static/chunks/75936-79860953212592fd.js +0 -1
  436. package/.next/standalone/.next/static/chunks/79919-e02963faee5cb563.js +0 -1
  437. package/.next/standalone/.next/static/chunks/94643-e8f5fa25e2340cc8.js +0 -1
  438. package/.next/standalone/.next/static/chunks/99373.633f7c25e64bcdac.js +0 -1
  439. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-bb5ef11586301c72.js +0 -1
  440. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page-725373108da1b08c.js +0 -1
  441. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-7d2f4713697eb0a7.js +0 -1
  442. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/page-0225f87552b977d9.js +0 -1
  443. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/page-8b30678a58e7b2ee.js +0 -1
  444. package/.next/standalone/.next/static/css/1d9cf83f50b6db00.css +0 -1
  445. /package/.next/standalone/.next/static/{WSN4XeA1kUCI6CeEHcaT_ → IxKVu5zkFPTjSKAUR99yH}/_buildManifest.js +0 -0
  446. /package/.next/standalone/.next/static/{WSN4XeA1kUCI6CeEHcaT_ → IxKVu5zkFPTjSKAUR99yH}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=1318,exports.ids=[1318],exports.modules={8495:(a,b,c)=>{c.d(b,{S:()=>h});var d=c(10837);c(21968);var e=c(9810),f=c(25711),g=c(96307);function h({className:a,...b}){return(0,d.jsx)(f.Root,{"data-slot":"checkbox",className:(0,g.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",a),...b,children:(0,d.jsx)(f.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,d.jsx)(e.A,{className:"size-3.5"})})})}},9190:(a,b,c)=>{c.d(b,{n:()=>v});var d=c(10837),e=c(21968),f=c(9222),g=c(51592),h=c(49102),i=c(21790),j=c(20447),k=c(9810),l=c(97443),m=c(81512),n=c.n(m),o=c(76172),p=c(87812),q=c(22727),r=c(6871),s=c(7086),t=c(77521);let u=["in_progress","to_verify","open","assigned","done","closed"];function v({tasks:a,projectUuid:b,proposalUuids:c,onSelectTask:m}){let v=(0,f.c)("ideaTracker"),[w,x]=(0,e.useState)({}),y=(0,e.useMemo)(()=>a.map(a=>a.uuid),[a]),z=(0,e.useCallback)(async()=>{if(0===y.length)return;let a=await (0,p.h)(y);a.success&&a.data&&x(a.data)},[y]);(0,o.eV)("task",z);let A=(0,e.useMemo)(()=>{let b=[];for(let c of u){let d=a.filter(a=>a.status===c);d.length>0&&b.push({status:c,tasks:d})}let c=new Set(u),d=a.filter(a=>!c.has(a.status));return d.length>0&&b.push({status:"other",tasks:d}),b},[a]),[B,C]=(0,e.useState)(new Set),D=(0,e.useMemo)(()=>{let b=a.length,c=a.filter(a=>"done"===a.status||"closed"===a.status).length,d=0,e=0,f=0,g=0;for(let b of a)b.acceptanceSummary&&(d+=b.acceptanceSummary.total,e+=b.acceptanceSummary.passed,f+=b.acceptanceSummary.required,g+=b.acceptanceSummary.requiredPassed);return{total:b,done:c,acTotal:d,acPassed:e,acRequired:f,acRequiredPassed:g}},[a]);return 0===a.length?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,d.jsx)(g.A,{className:"h-8 w-8 text-muted-foreground"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:v("panel.taskList.noTasks")})]}):(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-[#FAFAF7] dark:bg-[#1e1e1c] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:v("panel.taskList.summary",{done:D.done,total:D.total})}),D.acTotal>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:v("panel.taskList.acSummary",{passed:D.acRequiredPassed,total:D.acRequired})})]}),c.length>0&&(0,d.jsxs)(n(),{href:`/projects/${b}/tasks?proposalUuids=${c.join(",")}`,className:"ml-auto flex items-center gap-1 text-[13px] font-medium text-primary shrink-0",children:[v("panel.taskList.viewKanban"),(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"})]})]}),A.map(a=>{let b=B.has(a.status);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{onClick:()=>{var b;return b=a.status,void C(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex items-center gap-2 w-full text-left py-1.5 group cursor-pointer",children:[b?(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,t.eT)(a.status)}`}),(0,d.jsx)("span",{className:"text-[13px] font-medium text-foreground",children:function(a,b){switch(a){case"in_progress":return b("panel.taskList.inProgress");case"to_verify":return b("panel.taskList.toVerify");case"open":return b("panel.taskList.open");case"assigned":return b("panel.taskList.assigned");case"done":return b("panel.taskList.done");case"closed":return b("panel.taskList.closed");default:return a}}(a.status,v)}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground ml-auto",children:a.tasks.length})]}),!b&&(0,d.jsx)("div",{className:"ml-3 space-y-0.5",children:a.tasks.map(a=>{let b=w[a.uuid]||0,c=a.acceptanceSummary;return(0,d.jsx)(q.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,d.jsxs)("button",{onClick:()=>m(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2.5 py-2 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${(0,t.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[13px] text-foreground truncate group-hover:text-primary",children:a.title}),c&&c.total>0&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5 shrink-0 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-2.5 w-2.5"}),c.requiredPassed,"/",c.required]}),a.assignee&&(0,d.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] text-muted-foreground max-w-[72px] truncate",title:a.assignee.name,children:[(0,s.bB)(a.assignee)?(0,d.jsx)(r.AgentAvatar,{name:a.assignee.name,size:14,className:"shrink-0 rounded-full"}):(0,d.jsx)(l.A,{className:"h-2.5 w-2.5 shrink-0"}),a.assignee.name.split(/[@\s]/)[0]]}),b>0&&(0,d.jsx)("span",{className:"inline-flex items-center justify-center h-4 min-w-[16px] rounded-full bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E] text-[9px] font-semibold shrink-0",title:v("panel.taskList.workersActive",{count:b}),children:b})]})},a.uuid)})})]},a.status)})]})}},10687:(a,b,c)=>{c.d(b,{p:()=>s});var d=c(10837),e=c(21968),f=c(9222),g=c(5797);let h=(0,c(56556).A)("message-square-text",[["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"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]);var i=c(21289),j=c(51592),k=c(65956),l=c(20447),m=c(9810),n=c(90856),o=c(21790),p=c(49102),q=c(42377);q.callServer,q.findSourceMapURL;var r=c(77521);function s({idea:a,proposals:b,tasks:c,onSelectTask:q}){let s=(0,f.c)("ideaTracker"),t=(0,f.c)(),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(new Set),y=(0,e.useMemo)(()=>"open"===a.status?"idea_created":"elaborating"===a.status||0===b.length?"elaboration":b.some(a=>"approved"===a.status)&&c.length>0?"tasks":"proposal",[a.status,b,c]),z=(0,e.useMemo)(()=>{let a=["idea_created","elaboration","proposal","tasks"],b=a.indexOf(y);return a.map((a,c)=>({id:a,labelKey:({idea_created:"panel.timeline.ideaCreated",elaboration:"panel.timeline.elaboration",proposal:"panel.timeline.proposal",tasks:"panel.timeline.tasksProgress"})[a],status:c<b?"completed":c===b?"active":"upcoming",icon:({idea_created:(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"}),elaboration:(0,d.jsx)(h,{className:"h-3.5 w-3.5"}),proposal:(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"}),tasks:(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"})})[a]}))},[y]),A=(0,e.useCallback)(a=>{x(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),B=(0,e.useMemo)(()=>"open"===a.status?s("panel.timeline.noElaboration"):"skipped"===a.elaborationStatus?s("panel.timeline.elaborationSkipped"):"resolved"===a.elaborationStatus&&u?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):"elaborating"===a.status?s("panel.timeline.elaborationInProgress"):u&&u.summary.totalQuestions>0?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):s("panel.timeline.noElaboration"),[a.status,a.elaborationStatus,u,s]),C=(0,e.useMemo)(()=>{if(0===b.length)return s("panel.timeline.noProposal");let a=b.filter(a=>"approved"===a.status).length,c=b.filter(a=>"pending"===a.status).length;if(a>0&&1===b.length)return s("panel.timeline.proposalApproved");if(a>0)return s("panel.timeline.proposalsApproved",{count:a,total:b.length});if(c>0)return s("panel.timeline.proposalPending");switch(b[0].status){case"draft":default:return s("panel.timeline.proposalDraft");case"rejected":return s("panel.timeline.proposalRejected")}},[b,s]),D=(0,e.useMemo)(()=>{let a=0,c=0;for(let d of b)a+=d.documentDrafts?.length??0,c+=d.taskDrafts?.length??0;return{docCount:a,taskDraftCount:c}},[b]),E=(0,e.useMemo)(()=>{let a=c.filter(a=>"done"===a.status||"closed"===a.status).length,b=c.filter(a=>"in_progress"===a.status).length;return{done:a,inProgress:b,toVerify:c.filter(a=>"to_verify"===a.status).length,open:c.filter(a=>"open"===a.status||"assigned"===a.status).length,total:c.length}},[c]);return(0,d.jsx)("div",{className:"space-y-0",children:z.map((e,f)=>{let g=w.has(e.id),h=f===z.length-1;return(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-5 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#E0F2F1] dark:bg-[#12292a] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B] dark:text-[#4FD1C0]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-primary flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 fill-white text-white"})}):(0,d.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-dashed border-[#D9D9D9] dark:border-[#3a3a40] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-muted-foreground"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1 min-h-[8px]"})]}),(0,d.jsxs)("div",{className:`flex-1 min-w-0 ${h?"pb-0":"pb-4"}`,children:[(0,d.jsxs)("button",{onClick:()=>A(e.id),className:"flex items-center gap-1.5 w-full text-left group cursor-pointer",children:[g?(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-primary":"completed"===e.status?"text-foreground":"text-muted-foreground"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground truncate ml-1",children:(b=>{switch(b.id){case"idea_created":return a.createdBy?a.createdBy.name:"";case"elaboration":return B;case"proposal":return C;case"tasks":return c.length>0?s("panel.timeline.tasksComplete",{done:E.done,total:E.total}):s("panel.timeline.noTasks");default:return""}})(e)})]}),(e=>{let f=w.has(e.id);switch(e.id){case"idea_created":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[a.createdBy&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-muted-foreground line-clamp-2",children:[a.content.slice(0,120),a.content.length>120?"...":""]})]}):null;case"elaboration":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.rounds",{count:u.rounds.length})})]}):null;case"proposal":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:C}),b.length>0&&(0,d.jsxs)("div",{className:"space-y-1",children:[D.docCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.documents",{count:D.docCount})})]}),D.taskDraftCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.tasks",{count:D.taskDraftCount})})]})]})]}):null;case"tasks":return f?(0,d.jsx)("div",{className:"mt-2 space-y-2",children:0===c.length?(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.noTasks")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex-1 h-1.5 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] overflow-hidden flex",children:[E.done>0&&(0,d.jsx)("div",{className:"h-full bg-[#00796B]",style:{width:`${E.done/E.total*100}%`}}),E.inProgress>0&&(0,d.jsx)("div",{className:"h-full bg-[#1976D2]",style:{width:`${E.inProgress/E.total*100}%`}}),E.toVerify>0&&(0,d.jsx)("div",{className:"h-full bg-[#7B1FA2]",style:{width:`${E.toVerify/E.total*100}%`}})]}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:s("panel.timeline.tasksComplete",{done:E.done,total:E.total})})]}),(0,d.jsxs)("div",{className:"space-y-1",children:[c.slice(0,5).map(a=>(0,d.jsxs)("button",{onClick:()=>q(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2 py-1.5 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[12px] text-foreground truncate group-hover:text-primary",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground px-2",children:s("panel.timeline.moreItems",{count:c.length-5})})]})]})}):null;default:return null}})(e)]})]},e.id)})})}},17068:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k});var e=c(10837),f=c(21968),g=c(9222),h=c(40467),i=c(56828),j=a([i]);function k({ideaUuid:a,currentUserUuid:b,commentCount:c,onCommentCountChange:d}){let j=(0,g.c)("ideaTracker"),[k,l]=(0,f.useState)("comments");return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex gap-1 rounded-lg bg-secondary p-0.5",children:[(0,e.jsxs)("button",{onClick:()=>l("comments"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors flex items-center justify-center gap-1.5 cursor-pointer ${"comments"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:[j("panel.activityTab.comments"),c>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:c})]}),(0,e.jsx)("button",{onClick:()=>l("activity"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors cursor-pointer ${"activity"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:j("panel.activityTab.activity")})]}),(0,e.jsx)("div",{children:"activity"===k?(0,e.jsx)(h.v,{ideaUuid:a}):(0,e.jsx)(i.$m,{targetType:"idea",targetUuid:a,currentUserUuid:b,onCountChange:d,compact:!0})})]})}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},21289:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},25711:(a,b,c)=>{c.r(b),c.d(b,{Checkbox:()=>v,CheckboxIndicator:()=>x,Indicator:()=>x,Root:()=>v,createCheckboxScope:()=>p,unstable_BubbleInput:()=>z,unstable_CheckboxBubbleInput:()=>z,unstable_CheckboxProvider:()=>s,unstable_CheckboxTrigger:()=>u,unstable_Provider:()=>s,unstable_Trigger:()=>u});var d=c(21968),e=c(96090),f=c(42990),g=c(22546),h=c(15035),i=c(29851),j=c(7579),k=c(5030),l=c(16551),m=c(10837),n="Checkbox",[o,p]=(0,f.A)(n),[q,r]=o(n);function s(a){let{__scopeCheckbox:b,checked:c,children:e,defaultChecked:f,disabled:g,form:i,name:j,onCheckedChange:k,required:l,value:o="on",internal_do_not_use_render:p}=a,[r,s]=(0,h.i)({prop:c,defaultProp:f??!1,onChange:k,caller:n}),[t,u]=d.useState(null),[v,w]=d.useState(null),x=d.useRef(!1),y=!t||!!i||!!t.closest("form"),z={checked:r,disabled:g,setChecked:s,control:t,setControl:u,name:j,form:i,value:o,hasConsumerStoppedPropagationRef:x,required:l,defaultChecked:!A(f)&&f,isFormControl:y,bubbleInput:v,setBubbleInput:w};return(0,m.jsx)(q,{scope:b,...z,children:"function"==typeof p?p(z):e})}var t="CheckboxTrigger",u=d.forwardRef(({__scopeCheckbox:a,onKeyDown:b,onClick:c,...f},h)=>{let{control:i,value:j,disabled:k,checked:n,required:o,setControl:p,setChecked:q,hasConsumerStoppedPropagationRef:s,isFormControl:u,bubbleInput:v}=r(t,a),w=(0,e.s)(h,p),x=d.useRef(n);return d.useEffect(()=>{let a=i?.form;if(a){let b=()=>q(x.current);return a.addEventListener("reset",b),()=>a.removeEventListener("reset",b)}},[i,q]),(0,m.jsx)(l.sG.button,{type:"button",role:"checkbox","aria-checked":A(n)?"mixed":n,"aria-required":o,"data-state":B(n),"data-disabled":k?"":void 0,disabled:k,value:j,...f,ref:w,onKeyDown:(0,g.mK)(b,a=>{"Enter"===a.key&&a.preventDefault()}),onClick:(0,g.mK)(c,a=>{q(a=>!!A(a)||!a),v&&u&&(s.current=a.isPropagationStopped(),s.current||a.stopPropagation())})})});u.displayName=t;var v=d.forwardRef((a,b)=>{let{__scopeCheckbox:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i,onCheckedChange:j,form:k,...l}=a;return(0,m.jsx)(s,{__scopeCheckbox:c,checked:e,defaultChecked:f,disabled:h,required:g,onCheckedChange:j,name:d,form:k,value:i,internal_do_not_use_render:({isFormControl:a})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,{...l,ref:b,__scopeCheckbox:c}),a&&(0,m.jsx)(z,{__scopeCheckbox:c})]})})});v.displayName=n;var w="CheckboxIndicator",x=d.forwardRef((a,b)=>{let{__scopeCheckbox:c,forceMount:d,...e}=a,f=r(w,c);return(0,m.jsx)(k.C,{present:d||A(f.checked)||!0===f.checked,children:(0,m.jsx)(l.sG.span,{"data-state":B(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:b,style:{pointerEvents:"none",...a.style}})})});x.displayName=w;var y="CheckboxBubbleInput",z=d.forwardRef(({__scopeCheckbox:a,...b},c)=>{let{control:f,hasConsumerStoppedPropagationRef:g,checked:h,defaultChecked:k,required:n,disabled:o,name:p,value:q,form:s,bubbleInput:t,setBubbleInput:u}=r(y,a),v=(0,e.s)(c,u),w=(0,i.Z)(h),x=(0,j.X)(f);d.useEffect(()=>{if(!t)return;let a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,b=!g.current;if(w!==h&&a){let c=new Event("click",{bubbles:b});t.indeterminate=A(h),a.call(t,!A(h)&&h),t.dispatchEvent(c)}},[t,w,h,g]);let z=d.useRef(!A(h)&&h);return(0,m.jsx)(l.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:k??z.current,required:n,disabled:o,name:p,value:q,form:s,...b,tabIndex:-1,ref:v,style:{...b.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function A(a){return"indeterminate"===a}function B(a){return A(a)?"indeterminate":a?"checked":"unchecked"}z.displayName=y},30645:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40069dee6367078231db62d85f1374c928b8967ea6",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ai});var e=c(10837),f=c(21968),g=c(9222),h=c(68884),i=c(76549),j=c(33291),k=c(24364),l=c(87461),m=c(10694),n=c(86460),o=c(53109),p=c(74733),q=c(59876),r=c(98893),s=c(79543),t=c(42424),u=c(74645),v=c(49599),w=c(9994),x=c(20170),y=c(2852),z=c(88536),A=c(6019),B=c(76172),C=c(84722),D=c(64370),E=c(10687),F=c(64909),G=c(9190),H=c(17068),I=c(86104),J=c(98310),K=c(16995),L=c(79233),M=c(44963),N=c(44620),O=c(85513),P=c(30645),Q=c(88496),R=c(85865),S=c(69039),T=c(43800),U=c(38756),V=c(22063),W=c(26402),X=c(15745),Y=c(65455),Z=c(59058),$=c(43756),_=c(70028),aa=c(76799),ab=c(77078),ac=c(43393),ad=c(54722),ae=c(76664),af=c(77521),ag=c(79030),ah=a([C,D,H,I,J,M]);function ai({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:ah}){let ai=(0,g.c)(),aj=(0,g.c)("ideaTracker"),ak=(0,g.c)("status"),al=(0,g.c)("ideaTracker.lineage"),am=(0,h.r)(),an=(0,_.kz)(),ao=an?.activeSessionsByIdea.get(a)??[],[ap,aq]=(0,f.useState)(null),[ar,as]=(0,f.useState)(!0),[at,au]=(0,f.useState)(null),[av,aw]=(0,f.useState)([]),[ax,ay]=(0,f.useState)([]),[az,aA]=(0,f.useState)("overview"),[aB,aC]=(0,f.useState)(new Set(["overview"])),[aD,aE]=(0,f.useState)(!1),[aF,aG]=(0,f.useState)(0),[aH,aI]=(0,f.useState)(!1),[aJ,aK]=(0,f.useState)(!1),[aL,aM]=(0,f.useState)(null),[aN,aO]=(0,f.useState)(!0),[aP,aQ]=(0,f.useState)(!1),[aR,aS]=(0,f.useState)(null),[aT,aU]=(0,f.useState)(!1),{start:aV,pickerState:aW,confirmPick:aX,cancelPick:aY,isResolving:aZ}=(0,aa.E)({reassignNoWake:ac.U,previewIdeaUuid:ap?.uuid}),[a$,a_]=(0,f.useState)(!1),[a0,a1]=(0,f.useState)(""),[a2,a3]=(0,f.useState)(""),[a4,a5]=(0,f.useState)(!1),[a6,a7]=(0,f.useState)(null),[a8,a9]=(0,f.useState)(!1),[ba,bb]=(0,f.useState)(!1),[bc,bd]=(0,f.useState)(!1),[be,bf]=(0,f.useState)(!1),[bg,bh]=(0,f.useState)(null),[bi,bj]=(0,f.useState)(null),[bk,bl]=(0,f.useState)(null),bm=(0,f.useCallback)(a=>{bl(null),bh(a)},[]),bn=(0,f.useCallback)(a=>{bh(null),bj(null),bl(a)},[]),[bo,bp]=(0,f.useState)(!1),[bq,br]=(0,f.useState)(!1),bs=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),bt=(0,f.useCallback)(async()=>{try{let b=await (0,P.c)(a);b.success?(aq(b.data),au(null)):au(aj("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{au(aj("panel.loadFailed"))}finally{as(!1)}},[a,aj]);(0,B.eV)("idea",bt),(0,B.eV)("proposal",bt),(0,B.eV)("task",bt);let bu=ap?.uuid,bv=ap?.status,bw=(0,f.useCallback)(async()=>{if(!bu||"open"===bv)return void aw([]);try{let a=await (0,Q.U)(b,bu);a.success&&aw(a.data)}catch(a){ad.q.error("Failed to fetch proposals:",a)}},[b,bu,bv]);(0,B.eV)("proposal",bw);let bx=(0,f.useCallback)(async()=>{let a=av.filter(a=>"approved"===a.status);if(0===a.length)return void ay([]);try{let c=(await Promise.all(a.map(a=>(0,R.c)(b,a.uuid)))).flatMap(a=>a.success&&a.data?a.data.map(a=>({uuid:a.uuid,title:a.title,status:a.status,commentCount:a.commentCount??0,assignee:a.assignee??null,acceptanceSummary:a.acceptanceSummary??null})):[]);ay(c)}catch(a){ad.q.error("Failed to fetch tasks:",a)}},[b,av]);(0,B.eV)("task",bx);let by=(0,f.useCallback)(async()=>{if(!bu)return;let a=await (0,T.z)(bu);a.success&&a.data&&aM(a.data),aO(!1)},[bu]);(0,B.eV)("idea",by);let bz=(0,f.useMemo)(()=>ap?function(a,b,c){let d=["overview"];return d.push("elaboration"),b.length>0&&d.push("proposal"),c.length>0&&d.push("tasks"),d.push("activity"),d}(0,av,ax):["overview","activity"],[ap,av,ax]);(0,f.useRef)(null),ap&&ap.badgeHint;let bA=(0,f.useMemo)(()=>ax.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[ax]),bB=(0,f.useCallback)(()=>{if(!bg)return void bj(null);(0,S.Q)(bg).then(a=>{a.success&&bj(a.data)}).catch(a=>ad.q.error("Failed to load task details:",a))},[bg]);(0,B.eV)("task",bB);let bC=()=>{a_(!1),a1(ap?.title||""),a3(ap?.content||""),a7(null)},bD=async()=>{if(!ap||!a0.trim())return void a7(ai("ideas.titleRequired"));a5(!0),a7(null);let a=await (0,N.J)({ideaUuid:ap.uuid,projectUuid:b,title:a0.trim(),content:a2.trim()||null});a5(!1),a.success?(a_(!1),await bt(),am.refresh()):a7(a.error||ai("ideas.updateFailed"))},bE=async()=>{if(!ap)return;aK(!0);let a=await (0,O.Z)(ap.uuid,b);aK(!1),a.success&&(d(),am.refresh())},bF=async()=>{if(!ap)return;aQ(!0),aS(null);let a=await (0,U.e)(ap.uuid);aQ(!1),a.success?(aU(!0),await bt(),am.refresh()):aS(a.error||ai("elaboration.verifyFailed"))},bG=async a=>{if(!ap)return;a9(!0),aq({...ap,isContainer:a});let c=await (0,N.J)({ideaUuid:ap.uuid,projectUuid:b,title:ap.title,content:ap.content??null,isContainer:a});a9(!1),c.success?(await bt(),am.refresh()):(aq({...ap,isContainer:!a}),i.oR.error(c.error||ai("ideas.updateFailed")))},bH=ap?.derivedStatus||"todo",bI=ap?.isContainer===!0,bJ=null!==ap,bK=(0,W.o)({ideaStatus:ap?.status,elaborationStatus:ap?.elaborationStatus,elaboration:aL});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:d}),(0,e.jsxs)("div",{className:`fixed right-0 top-14 md:top-0 z-50 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col border-l border-border bg-card shadow-xl ${bq?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:ar?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-secondary"}):ap?a$?(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ai("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:`text-[11px] font-semibold uppercase tracking-wider ${bI?"text-primary":"text-muted-foreground"}`,children:bI?al("typeTheme"):al("typeIdea")}),(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:ap.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex min-w-0 items-center gap-2",children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:[(0,e.jsx)(v.E,{className:af._5[bH]||af._5.todo,children:ap.badgeHint?aj(`badge.${af.Wl[ap.badgeHint]||"open"}`):ak(af.Bj[bH]||"todo")}),bI&&ap.childProgress&&ap.childProgress.total>0&&(0,e.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs font-medium text-primary",title:al("childrenDone",{done:ap.childProgress.done,total:ap.childProgress.total}),children:[(0,e.jsx)(ag.C,{done:ap.childProgress.done,total:ap.childProgress.total,size:13,stroke:2}),ap.childProgress.done,"/",ap.childProgress.total]}),(0,e.jsx)("span",{className:"min-w-0 truncate whitespace-nowrap text-xs text-muted-foreground",title:(0,ae.r)(ap.createdAt),children:(0,ae.r)(ap.createdAt)})]}),ao.length>0&&an&&(0,e.jsx)($.U,{sessions:ao,onSelect:an.openChatForActiveSession,surface:"sidebar",className:"shrink-0"})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:aj("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[ap&&!a$&&(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border px-2.5",onClick:()=>bf(!0),title:al("deriveIdea"),"aria-label":al("deriveIdea"),children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-medium text-primary",children:al("derive")})]}),ap&&!a$&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>bb(!0),title:ai("ideas.actions.move"),"aria-label":ai("ideas.actions.move"),children:(0,e.jsx)(k.A,{className:"h-4 w-4 text-muted-foreground"})}),ap&&"elaborated"!==ap.status&&!a$&&(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:()=>{ap&&(a1(ap.title),a3(ap.content||""),a7(null),a_(!0))},title:ai("ideas.editIdea"),children:(0,e.jsx)(l.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:a$?bC:d,children:(0,e.jsx)(m.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),ap&&!ar&&!a$&&(0,e.jsx)("div",{className:"border-b border-secondary px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bz.map(a=>(0,e.jsxs)("button",{onClick:()=>{aA(a),aE(!0),aC(b=>new Set([...b,a])),bs(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${az===a?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-muted-foreground"}`,children:[aj(`panel.tabs.${a}`),"tasks"===a&&bA>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0] text-[10px] font-semibold leading-none",children:bA}),"activity"===a&&aF>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:aF})]},a))})}),(0,e.jsx)(u.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:ar?(0,e.jsxs)("div",{className:"flex flex-1 items-center justify-center py-12",children:[(0,e.jsx)(n.A,{className:"h-6 w-6 animate-spin text-primary"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-muted-foreground",children:aj("loading")})]}):at?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:at})}):ap?a$?(0,e.jsxs)("div",{className:"space-y-5",children:[a6&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:a6}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:ai("ideas.titleLabel")}),(0,e.jsx)(w.p,{id:"edit-title",value:a0,onChange:a=>a1(a.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(y.J,{htmlFor:"edit-content",className:"text-[13px] font-medium text-foreground",children:ai("common.content")}),(0,e.jsx)(x.T,{id:"edit-content",value:a2,onChange:a=>a3(a.target.value),rows:8,className:"border-border text-sm resize-none focus-visible:ring-primary"})]})]}):(0,e.jsxs)(e.Fragment,{children:[aB.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===az?"block":"none"},children:[(0,e.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3 rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e] bg-background px-3.5 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)(y.J,{htmlFor:"container-toggle",className:"flex items-center gap-1.5 text-[13px] font-medium text-foreground",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary","aria-hidden":!0}),al("container")]}),(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:al("containerDescription")})]}),(0,e.jsx)(z.d,{id:"container-toggle",checked:bI,disabled:a8,onCheckedChange:bG,"aria-label":al("makeContainer")})]}),(0,e.jsx)(E.p,{idea:ap,proposals:av,tasks:ax,onSelectTask:bm}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(j.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:al("title")})]}),(0,e.jsxs)(t.$,{variant:"outline",size:"sm",className:"h-7 gap-1 border-border px-2 text-[11px] text-muted-foreground",onClick:()=>bd(!0),children:[(0,e.jsx)(l.A,{className:"h-3 w-3"}),ap.parentUuid?al("changeParent"):al("setParent")]})]}),ap.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>ah?.(ap.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-background px-3 py-2.5 text-left transition-colors hover:bg-secondary",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:al("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-foreground/80",children:ap.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",children:al("noParent")}),ap.children&&ap.children.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between px-1 pt-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-[12px] font-medium text-foreground/80",children:al("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:ap.children.length})]}),(()=>{let a=ap.children.filter(a=>"done"===a.derivedStatus).length,b=ap.children.length;return(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",title:al("childrenDone",{done:a,total:b}),children:[(0,e.jsx)(ag.C,{done:a,total:b,size:14,stroke:2}),a,"/",b]})})()]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e]",children:ap.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>ah?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-background",children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-foreground",children:a.title})]}),(0,e.jsx)(v.E,{className:`shrink-0 border-0 text-[10px] ${af._5[a.derivedStatus]||af._5.todo}`,children:ak(af.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(F.U,{projectUuid:b,ideaUuid:ap.uuid,proposals:av,onDocClick:bn}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(q.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ai("references.title")})]}),(0,e.jsx)(Z.ReferencesSection,{targetType:"idea",targetUuid:ap.uuid,canWrite:!0,compact:!0})]})]}),bz.includes("elaboration")&&aB.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===az?"block":"none"},children:(0,e.jsx)(C.G,{idea:ap,elaboration:aL,isLoading:aN,onRefresh:async()=>{await by(),await bt()},onReassign:()=>aI(!0),canReassign:bJ})}),bz.includes("proposal")&&aB.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===az?"block":"none"},children:(0,e.jsx)(D.k,{idea:ap,projectUuid:b,onTaskClick:bm,onDocClick:bn,initialProposals:av})}),bz.includes("tasks")&&aB.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===az?"block":"none"},children:(0,e.jsx)(G.n,{tasks:ax,projectUuid:b,proposalUuids:av.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:bm})}),aB.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===az?"block":"none"},children:(0,e.jsx)(H.x,{ideaUuid:ap.uuid,currentUserUuid:c,commentCount:aF,onCommentCountChange:aG})})]}):null})}),ap&&!ar&&(0,e.jsx)("div",{className:"border-t border-secondary px-6 py-4",children:a$?(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(t.$,{variant:"outline",className:"border-border",onClick:bC,disabled:a4,children:ai("common.cancel")}),(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:bD,disabled:a4||!a0.trim(),children:a4?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ai("common.save")]}):ai("common.save")})]}):(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[!bI&&(0,e.jsxs)(e.Fragment,{children:[bK&&!aT&&(0,e.jsx)(t.$,{className:"bg-primary hover:bg-[#B56A42] text-white",onClick:()=>{ap&&aV({ideaUuid:ap.uuid,wake:bF})},disabled:aP||aZ,children:aP?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ai("elaboration.verifying")]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r.A,{className:"mr-2 h-4 w-4"}),ai("elaboration.verifyButton")]})}),aT&&(0,e.jsx)("span",{className:"text-[11px] text-[#00796B] dark:text-[#4FD1C0]",children:ai("elaboration.verifiedQueuedHint")}),aR&&(0,e.jsx)("span",{className:"text-[11px] text-destructive",children:aR}),(0,e.jsx)(X.w,{ideaUuid:ap.uuid,assignee:ap.assignee,assigneeName:ap.assignee?.name,proposals:av,tasks:ax,onStarted:()=>{bt()}}),(0,e.jsx)(Y.s,{ideaUuid:ap.uuid,assignee:ap.assignee,assigneeName:ap.assignee?.name,proposals:av,tasks:ax,onStarted:()=>{bt()}})]}),bI&&(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:al("containerHint")})]}),(0,e.jsxs)(A.Lt,{children:[(0,e.jsx)(A.tv,{asChild:!0,children:(0,e.jsx)(t.$,{variant:"outline",size:"icon",className:"shrink-0 h-8 w-8 border-border text-[#EF4444] dark:text-[#F0897E] hover:bg-[#FFEBEE] dark:hover:bg-[#331619] hover:text-[#EF4444] hover:border-[#EF4444]",children:(0,e.jsx)(s.A,{className:"h-4 w-4"})})}),(0,e.jsxs)(A.EO,{children:[(0,e.jsxs)(A.wd,{children:[(0,e.jsx)(A.r7,{children:ai("ideas.deleteIdea")}),(0,e.jsx)(A.$v,{children:ai("ideas.deleteIdeaConfirm",{title:ap.title})})]}),(0,e.jsxs)(A.ck,{children:[(0,e.jsx)(A.Zr,{children:ai("common.cancel")}),(0,e.jsx)(A.Rx,{variant:"destructive",onClick:bE,disabled:aJ,children:aJ?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.A,{className:"mr-2 h-4 w-4 animate-spin"}),ai("common.delete")]}):ai("common.delete")})]})]})]})]})})]}),(0,e.jsx)(K.h,{open:ba,onOpenChange:bb,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),ap&&(0,e.jsx)(L.d,{open:bc,onOpenChange:bd,ideaUuid:ap.uuid,ideaTitle:ap.title,projectUuid:b,currentParentUuid:ap.parentUuid??null,descendantUuids:ap.descendantUuids??[],onChanged:bt}),ap&&(0,e.jsx)(M.i,{open:be,onOpenChange:bf,projectUuid:b,parentUuid:ap.uuid,parentTitle:ap.title,onCreated:a=>{i.oR.success(al("deriveIdea")),am.refresh(),ah?.(a)}}),aH&&ap&&(0,e.jsx)(V.i,{idea:{uuid:ap.uuid,title:ap.title,content:ap.content,status:ap.status,assignee:ap.assignee?{type:ap.assignee.type,uuid:ap.assignee.uuid,name:ap.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{aI(!1),bt()}}),(0,e.jsx)(ab.V,{open:null!==aW,agentName:ap?.assignee?.name??"",instances:aW?.instances??[],onConfirm:aX,onCancel:aY}),bg&&bi&&(0,e.jsx)(I.v,{task:bi,projectUuid:b,currentUserUuid:c,mode:bo?"sidebyside":"overlay",onClose:()=>{bh(null),bj(null)},onBack:()=>{bh(null),bj(null)}}),bk&&(0,e.jsx)(J.K,{title:bk.title,type:bk.type,content:bk.content,mode:bo?"sidebyside":"overlay",onClose:()=>bl(null),onBack:()=>bl(null)})]})}[C,D,H,I,J,M]=ah.then?(await ah)():ah,d()}catch(a){d(a)}})},33291:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]])},40467:(a,b,c)=>{c.d(b,{v:()=>k});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(2852),i=c(44960),j=c(77521);function k({ideaUuid:a}){let b=(0,f.c)(),[c,k]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0);return(0,e.useCallback)(async()=>{m(!0),k((await (0,i.x)(a)).activities),m(!1)},[a]),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)(h.J,{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:b("common.activity")}),(0,d.jsx)("div",{className:"mt-2",children:l?(0,d.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground italic",children:b("common.noActivity")}):c.map((a,e)=>(0,d.jsxs)("div",{className:"flex items-stretch gap-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-2 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full border-[1.5px] border-[#D9D9D9] dark:border-[#3a3a40] bg-card"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-foreground",children:function(a,b){let{action:c,actorName:d}=a;switch(c){case"created":case"idea_created":return b("activity.ideaCreated",{actor:d});case"assigned":case"idea_assigned":return b("activity.ideaAssigned",{actor:d});case"claimed":case"idea_claimed":return b("activity.ideaClaimed",{actor:d});case"released":case"idea_released":return b("activity.ideaReleased",{actor:d});case"status_changed":case"idea_status_changed":return b("activity.ideaStatusChanged",{actor:d});case"edited":case"idea_edited":return b("activity.ideaEdited",{actor:d});case"reparented":case"idea_reparented":return b("activity.ideaReparented",{actor:d});case"elaboration_started":return b("activity.elaborationStarted",{actor:d});case"elaboration_answered":return b("activity.elaborationAnswered",{actor:d});case"elaboration_skipped":return b("activity.elaborationSkipped",{actor:d});case"elaboration_resolved":return b("activity.elaborationResolved",{actor:d});case"elaboration_followup":return b("activity.elaborationFollowup",{actor:d});default:return b("activity.genericAction",{actor:d,action:c})}}(a,b)}),(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},43756:(a,b,c)=>{c.d(b,{U:()=>l});var d=c(10837),e=c(21968),f=c(9222),g=c(6871),h=c(42424),i=c(74113),j=c(96307);function k(a){return a.agentName??a.agentUuid}function l({sessions:a,onSelect:b,surface:c,className:l}){let m=(0,f.c)("activeSessions"),[n,o]=(0,e.useState)(!1),p=(0,e.useRef)(null);if(0===a.length)return null;let q=a.some(a=>a.canOpen),r=1===a.length&&a[0].canOpen,s=a[0],t=()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},u=()=>{t(),p.current=setTimeout(()=>o(!1),120)},v=a=>{a.canOpen&&(o(!1),b(a))},w=(0,d.jsxs)(h.$,{type:"button",variant:"outline",size:"tracker"===c?"xs":"icon-sm","data-testid":`${c}-active-session-indicator`,"aria-label":m(q?"indicatorLabel":"statusOnlyIndicatorLabel",{count:a.length}),"aria-disabled":!q,"aria-haspopup":a.length>1?"dialog":void 0,onPointerDown:a=>a.stopPropagation(),onPointerEnter:r?void 0:a=>{"touch"!==a.pointerType&&(t(),o(!0))},onPointerLeave:r?void 0:a=>{"touch"!==a.pointerType&&u()},onFocus:r?void 0:()=>o(!0),onClick:a=>{if(a.stopPropagation(),t(),r)return void v(s);n&&a.preventDefault()},onKeyDown:a=>a.stopPropagation(),className:(0,j.cn)("group/active relative gap-1.5 overflow-visible border-emerald-500/35 bg-emerald-500/10 font-semibold text-emerald-700 shadow-none transition-[background-color,border-color,box-shadow] hover:border-emerald-500/60 hover:bg-emerald-500/15 hover:text-emerald-700 hover:shadow-[0_3px_10px_-5px_rgba(16,185,129,0.8)] focus-visible:border-emerald-500 focus-visible:ring-emerald-500/50 dark:border-emerald-500/35 dark:bg-emerald-500/10 dark:text-emerald-300 dark:hover:border-emerald-500/60 dark:hover:bg-emerald-500/15 dark:hover:text-emerald-300","tracker"===c?"h-7 min-w-7 px-1 text-[11px]":"sidebar"===c?"h-8 min-w-8 px-1 text-[11px]":"h-9 min-w-9 px-1 text-[11px] shadow-sm",l),children:[(0,d.jsxs)("span",{className:"relative shrink-0","aria-hidden":!0,children:[(0,d.jsx)(g.AgentAvatar,{name:k(s),size:"graph"===c?22:20,className:"rounded-full ring-1 ring-emerald-600/25"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2 rounded-full border-2 border-card bg-emerald-500"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2 rounded-full bg-emerald-400/75 motion-safe:animate-ping motion-reduce:animate-none"})]}),a.length>1&&(0,d.jsx)("span",{children:a.length})]});return r?w:(0,d.jsxs)(i.AM,{open:n,onOpenChange:o,children:[(0,d.jsx)(i.Wv,{asChild:!0,children:w}),(0,d.jsxs)(i.hl,{align:"start",sideOffset:6,onCloseAutoFocus:a=>a.preventDefault(),onPointerDown:a=>a.stopPropagation(),onPointerEnter:t,onPointerLeave:u,onClick:a=>a.stopPropagation(),className:"w-[min(22rem,calc(100vw-2rem))] p-1.5","aria-label":m("chooserLabel"),children:[(0,d.jsx)("p",{className:"px-2 pb-1.5 pt-1 text-xs font-medium text-muted-foreground",children:m("runningCount",{count:a.length})}),(0,d.jsx)("div",{className:"max-h-64 overflow-y-auto",children:a.map(a=>(0,d.jsxs)(h.$,{type:"button",variant:"ghost",disabled:!a.canOpen,"aria-label":a.canOpen?k(a):m("statusOnlyEntry",{agent:k(a)}),onClick:()=>v(a),className:"group/session h-auto w-full min-w-0 items-start justify-start gap-2.5 whitespace-normal px-2 py-2 text-left disabled:cursor-not-allowed disabled:opacity-65",children:[(0,d.jsxs)("span",{className:"relative mt-0.5 shrink-0","aria-hidden":!0,children:[(0,d.jsx)(g.AgentAvatar,{name:k(a),size:30,className:"rounded-lg ring-1 ring-border transition-shadow group-hover/session:ring-emerald-500/45"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border-2 border-card bg-emerald-500"})]}),(0,d.jsxs)("span",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block truncate text-xs font-medium text-foreground",children:k(a)}),(0,d.jsx)("span",{className:"block truncate text-[11px] text-muted-foreground",children:a.connectionAvailable?m("location",{host:a.host??m("unknownHost"),cwd:a.cwd??m("unknownCwd")}):m("agentFallback")}),!a.canOpen&&(0,d.jsx)("span",{className:"block text-[11px] font-medium text-muted-foreground",children:m("statusOnly")})]})]},a.sessionUuid))})]})]})}},44963:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{i:()=>u});var e=c(10837),f=c(21968),g=c(9222),h=c(86460),i=c(42424),j=c(11568),k=c(9994),l=c(20170),m=c(2852),n=c(8495),o=c(94372),p=c(42087),q=c(93524),r=c(70028),s=c(68797),t=a([s]);function u({open:a,onOpenChange:b,projectUuid:c,onCreated:d,parentUuid:t,parentTitle:u}){let v=(0,g.c)("ideaTracker"),w=(0,g.c)("ideaTracker.lineage"),x=!!t,y=(0,g.c)("common"),[z,A]=(0,f.useState)(""),[B,C]=(0,f.useState)(""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(!1),[H,I]=(0,f.useState)(null),[J,K]=(0,f.useState)(!1),[L,M]=(0,f.useState)(!1),N=(0,r.kz)(),O=(N?.connections??[]).some(a=>"online"===a.effectiveStatus),[P,Q]=(0,f.useState)("form"),R=x?"form":P,S=async()=>{let a=z.trim();if(a){G(!0),I(null);try{let e=await fetch(`/api/projects/${c}/ideas`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,content:B.trim()||void 0,...t?{parentUuid:t}:{},...D?{isContainer:!0}:{}})}),f=await e.json();f.success&&f.data?.uuid?(A(""),C(""),E(!1),b(!1),d?.(f.data.uuid)):I(f.error||v("error.createFailed"))}catch{I(v("error.createFailed"))}finally{G(!1)}}},T=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 py-2",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(m.J,{htmlFor:"idea-title",children:v("newIdea.ideaTitle")}),(0,e.jsx)(k.p,{id:"idea-title",value:z,onChange:a=>A(a.target.value),placeholder:v("newIdea.titlePlaceholder"),autoFocus:!0,onKeyDown:a=>{!(0,p.P)(a)&&"Enter"===a.key&&!a.shiftKey&&z.trim()&&(a.preventDefault(),S())}})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(m.J,{htmlFor:"idea-content",children:[v("newIdea.description"),(0,e.jsxs)("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:["(",y("optional"),")"]})]}),(0,e.jsx)(l.T,{id:"idea-content",value:B,onChange:a=>C(a.target.value),placeholder:v("newIdea.descriptionPlaceholder"),rows:4,className:"resize-none"})]}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-is-container",checked:D,onCheckedChange:a=>E(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-is-container",className:"cursor-pointer",children:w("makeContainer")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:w("containerHint")})]})]}),H&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-[12px] text-destructive",children:H})]}),(0,e.jsxs)(j.Es,{children:[(0,e.jsx)(i.$,{variant:"outline",onClick:()=>b(!1),disabled:F,children:y("cancel")}),(0,e.jsxs)(i.$,{onClick:S,disabled:F||!z.trim(),className:"bg-primary hover:bg-[#B56A42] text-white",children:[F?(0,e.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}):null,y("create")]})]})]}),U=async a=>{let b=await (0,q.tm)("/api/ideas/conversational",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectUuid:c,agentUuid:a.agentUuid,connectionUuid:a.connectionUuid,descriptionText:a.userText,...J?{decompose:!0}:{}})});if(!b.ok){let a=null;try{let c=await b.json();"string"==typeof c?.error&&c.error&&(a=c.error)}catch{}throw new s.fF(b.status,a)}let d=null;try{let a=await b.json();a?.success&&a.data?.session&&(d=a.data.session)}catch{}if(!d)throw new s.fF(b.status,null);return d},V=(0,e.jsxs)("div",{className:"space-y-3 py-2",children:[(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-decompose",checked:J,onCheckedChange:a=>K(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-decompose",className:"cursor-pointer",children:v("newIdea.decompose")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:v("newIdea.decomposeHint")})]})]}),(0,e.jsx)(s.jH,{projectUuid:c,dispatch:U,onStarted:a=>{b(!1),N?.openChatForSession(a)}})]});return(0,e.jsx)(j.lG,{open:a,onOpenChange:b,children:(0,e.jsxs)(j.Cf,{className:"sm:max-w-[480px]",children:[(0,e.jsxs)(j.c7,{children:[(0,e.jsx)(j.L3,{children:x?w("deriveIdea"):v("newIdea.title")}),x&&u&&(0,e.jsxs)("p",{className:"text-[13px] text-muted-foreground",children:[w("derivedFrom")," \xb7 ",u]})]}),!x&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.tU,{value:R,onValueChange:a=>Q(a),children:(0,e.jsxs)(o.j7,{className:"grid w-full grid-cols-2",children:[(0,e.jsx)(o.Xi,{value:"form",children:v("newIdea.modeForm")}),(0,e.jsx)(o.Xi,{value:"conversation",disabled:!O&&!L,children:v("newIdea.modeConversation")})]})}),!O&&(0,e.jsxs)("div",{className:"rounded-xl border border-[#EFEBE4] dark:border-[#2a2a2e] bg-[#FCFBF8] dark:bg-[#1e1d1b] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-muted-foreground",children:v("newIdea.modeConversationOfflineHint")}),(0,e.jsx)(s.Bs,{variant:"compact"})]})]}),"form"===R?T:V]})})}s=(t.then?(await t)():t)[0],d()}catch(a){d(a)}})},53109:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]])},55183:(a,b,c)=>{function d(a){return a.replace(/\\n/g,"\n")}c.d(b,{j:()=>d,y:()=>e});let e={prd:"typePrd",tech_design:"typeTechDesign",adr:"typeAdr",spec:"typeSpec",guide:"typeGuide",design:"typeDesign",note:"typeNote",report:"typeReport",other:"typeOther"}},64370:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>A});var e=c(10837),f=c(21968),g=c(9222),h=c(81512),i=c.n(h),j=c(86460),k=c(21289),l=c(49102),m=c(20447),n=c(21790),o=c(51592),p=c(49599),q=c(42424),r=c(22727),s=c(90061),t=c(76172),u=c(97450),v=c(60265),w=c(55183),x=c(88496);c(85865);var y=c(54722),z=a([u]);function A({idea:a,projectUuid:b,onTaskClick:c,onDocClick:d,initialProposals:h}){let i=(0,g.c)("ideaTracker"),[l,m]=(0,f.useState)(h??[]),[n,o]=(0,f.useState)(!h),p=(0,f.useCallback)(async()=>{try{let c=await (0,x.U)(b,a.uuid);if(c.success)return m(c.data),c.data}catch(a){y.q.error("Failed to fetch proposals:",a)}finally{o(!1)}return[]},[b,a.uuid]),q=(0,f.useRef)(l);q.current=l;let{getPresence:r}=(0,s.xQ)();return((0,t.eV)("proposal",async()=>{let a=q.current;for(let b of(await p())){let c=a.find(a=>a.uuid===b.uuid);if(!c)continue;let d=new Set((c.documentDrafts??[]).map(a=>a.uuid)),e=new Set((c.taskDrafts??[]).map(a=>a.uuid)),f=(b.documentDrafts??[]).filter(a=>a.uuid&&!d.has(a.uuid)),g=(b.taskDrafts??[]).filter(a=>a.uuid&&!e.has(a.uuid)),h=[...f.map(a=>a.uuid),...g.map(a=>a.uuid)];if(h.length>0){let a=r("proposal",b.uuid)[0];if(a)for(let c of h)(0,s.fv)({entityType:"proposal",entityUuid:b.uuid,subEntityType:"draft",subEntityUuid:c,agentUuid:a.agentUuid,agentName:a.agentName,action:"mutate"})}}}),n)?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(j.A,{className:"h-5 w-5 animate-spin text-primary"})}):0===l.length?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#F3E5F5] dark:bg-[#281630]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2] dark:text-[#C98FE0]"})}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i("panel.noProposals")})]}):(0,e.jsx)("div",{className:"space-y-5",children:l.map(a=>(0,e.jsx)(B,{proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d},a.uuid))})}u=(z.then?(await z)():z)[0];let D={draft:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",pending:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",approved:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",rejected:"bg-[#FFEBEE] dark:bg-[#331619] text-[#C4574C] dark:text-[#F0897E]",revised:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"};function B({proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d}){let h=(0,g.c)("ideaTracker"),j=(0,g.c)(),k=(0,g.c)("proposals"),n=(0,g.c)("tasks"),o=(0,g.c)("documents"),s=a.documentDrafts||[],t=a.taskDrafts||[],[x,y]=(0,f.useState)(new Set),[z,A]=(0,f.useState)("cards"),[B,E]=(0,f.useState)([]),F="approved"===a.status,G=(0,f.useMemo)(()=>{let a=new Map;for(let b of B)a.set(b.title,b);return a},[B]),{dagTasks:H,dagEdges:I,dagHeight:J}=(0,f.useMemo)(()=>{let a=t.map(a=>{let b=G.get(a.title);return{uuid:b?.uuid||a.uuid,title:a.title,status:b?.status||"open",priority:a.priority||"medium"}}),b=[],c=new Map(t.map(a=>[a.uuid,a]));for(let a of t)if(a.dependsOnDraftUuids)for(let d of a.dependsOnDraftUuids){let e=G.get(a.title),f=c.get(d),g=f?G.get(f.title):void 0;b.push({from:e?.uuid||a.uuid,to:g?.uuid||d})}return{dagTasks:a,dagEdges:b,dagHeight:Math.max(350,90*a.length)}},[t,G]),K=F?B.filter(a=>"done"===a.status||"closed"===a.status).length:0;return(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-[14px] font-semibold text-foreground truncate flex-1",children:a.title}),(0,e.jsx)(p.E,{className:`text-[11px] font-semibold border-0 shrink-0 ${D[a.status]||""}`,children:j(`status.${a.status}`)})]}),a.description&&(0,e.jsx)("div",{className:"max-h-[120px] overflow-y-auto text-[13px] leading-relaxed text-foreground/80 prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-primary",children:(0,e.jsx)(u.MarkdownContent,{children:(0,w.j)(a.description)})}),(0,e.jsxs)(i(),{href:`/projects/${b}/proposals/${a.uuid}`,className:"flex items-center gap-1 text-[13px] font-medium text-primary hover:underline",children:[h("panel.viewProposal"),(0,e.jsx)(l.A,{className:"h-3.5 w-3.5"})]}),s.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:s.length})]}),(0,e.jsx)("div",{className:"space-y-0",children:s.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid||`draft-${c}`,badgeInside:!0,children:(0,e.jsxs)(q.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>b.content&&d?.({title:b.title,type:b.type,content:b.content}),children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:o(w.y[b.type]||"typeOther")}),(0,e.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:b.title})]})},b.uuid||c))})]}),(t.length>0||B.length>0)&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between pb-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-muted-foreground",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-border"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] p-0.5 mt-3 w-fit",children:[(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("cards"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"cards"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:k("cardsView")}),(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("dag"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"dag"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:n("dagView")})]}),"cards"===z&&(0,e.jsx)("div",{className:"space-y-0",children:F&&B.length>0?B.map(a=>(0,e.jsx)(r.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:{uuid:a.uuid,title:a.title},expanded:!1,onToggle:()=>{},onNavigate:c?()=>c(a.uuid):void 0,taskStatus:a.status})},a.uuid)):t.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:b,expanded:x.has(c),onToggle:()=>{y(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}})},b.uuid))}),"dag"===z&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(v._u,{tasks:H,edges:I,readonly:!0,height:J,onNodeClick:c})})]}),0===s.length&&0===t.length&&0===B.length&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",assigned:"border-[#1976D2] bg-[#1976D2]",in_progress:"border-[#5A9E6F] bg-[#5A9E6F]",to_verify:"border-[#7B1FA2] bg-[#7B1FA2]",done:"border-[#00796B] bg-[#00796B]",closed:"border-[#9A9A9A] bg-[#9A9A9A] dark:border-[#6b6862] dark:bg-[#6b6862]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",key:"toVerify"},done:{className:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",key:"done"},closed:{className:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",key:"done"}};function C({task:a,expanded:b,onToggle:c,onNavigate:d,taskStatus:f}){let h=(0,g.c)("proposals"),i=(0,g.c)("acceptanceCriteria"),j=(0,g.c)("status"),k=a.acceptanceCriteriaItems||[],p=!!(a.description||k.length>0),r=f?E[f]||E.open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",s=f?F[f]:null,t=(0,e.jsx)("span",{className:`shrink-0 h-2 w-2 rounded-full border-[1.5px] ${r} transition-colors`}),u=(0,e.jsx)("span",{className:"flex-1 min-w-0 text-[13px] leading-snug truncate text-muted-foreground",children:a.title}),v=s?(0,e.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium ${s.className}`,children:j(s.key)}):null;return d?(0,e.jsxs)(q.$,{variant:"ghost",onClick:d,className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}):(0,e.jsxs)("div",{children:[(0,e.jsxs)(q.$,{variant:"ghost",onClick:p?c:void 0,className:`w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 ${p?"cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg":""} transition-colors`,children:[b?(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}),b&&p&&(0,e.jsxs)("div",{className:"pb-3 pl-5 space-y-3",children:[a.description&&(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-background p-3 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-foreground",children:h("taskAcceptanceCriteria")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:k.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-[11px] leading-snug text-foreground/80 flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},64909:(a,b,c)=>{c.d(b,{U:()=>p});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(20447),i=c(49599),j=c(42424),k=c(76172),l=c(54722),m=c(55183),n=c(42377);let o=(0,n.createServerReference)("6039d16366d2e51d8c2627679452b89a4932b15478",n.callServer,void 0,n.findSourceMapURL,"getReportsForIdeaAction");function p({projectUuid:a,ideaUuid:b,proposals:c,onDocClick:n}){let p=(0,f.c)("idea"),q=(0,f.c)("documents"),[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(!0),v=c.some(a=>"approved"===a.status),w=(0,e.useCallback)(async()=>{if(!v){s([]),u(!1);return}try{let c=await o(a,b);if(c.success){let a=[...c.data].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime());s(a.map(a=>({uuid:a.uuid,title:a.title,type:a.type,content:a.content??null,createdAt:a.createdAt})))}}catch(a){l.q.error("Failed to fetch reports for idea:",a)}finally{u(!1)}},[a,b,v]);return((0,k.eV)("document",w),t)?v?(0,d.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-primary"})}):null:0===r.length?null:(0,d.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["\xb7 ",p("reportsAcrossProposals")]})]}),(0,d.jsx)("div",{className:"space-y-0",children:r.map(a=>(0,d.jsxs)(j.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>n({title:a.title,type:"report",content:a.content??""}),children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:q(m.y[a.type]||"typeOther")}),(0,d.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:a.title})]},a.uuid))})]})}},69039:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40225d5c66e0d917210e793e64aaff1d900bd17e7b",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},69815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>n});var e=c(10837),f=c(9222),g=c(80251),h=c(6871),i=c(2852),j=c(99127),k=c(68797),l=c(7086),m=a([k]);function n({assignee:a,onReassign:b,editable:c}){let d=(0,f.c)("common"),m=!0===c&&"function"==typeof b,n=d(a?"reassign":"assign"),o=a?(0,e.jsxs)(e.Fragment,{children:[(0,l.bB)(a)?(0,e.jsx)(h.AgentAvatar,{name:a.name,size:28,className:"rounded-full"}):(0,e.jsx)(g.eu,{className:"h-7 w-7",children:(0,e.jsx)(g.q5,{className:"bg-border text-muted-foreground",children:a.name.charAt(0).toUpperCase()})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:d((0,l.bB)(a)?"agent":"user")}),"agent_instance"===a.type&&a.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(k.jQ,{cwd:a.instance.cwd,host:a.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:d("unassigned")}),p="mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3";return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:d("assignee")}),m?(0,e.jsx)(j.Bc,{delayDuration:300,children:(0,e.jsxs)(j.m_,{children:[(0,e.jsx)(j.k$,{asChild:!0,children:(0,e.jsx)("button",{type:"button",onClick:b,"aria-label":n,className:`${p} w-full cursor-pointer text-left`,children:o})}),(0,e.jsx)(j.ZI,{children:n})]})}):(0,e.jsx)("div",{className:p,children:o})]})}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},72229:(a,b,c)=>{c.d(b,{b:()=>j});var d=c(21968),e=c(16551),f=c(10837),g="horizontal",h=["horizontal","vertical"],i=d.forwardRef((a,b)=>{var c;let{decorative:d,orientation:i=g,...j}=a,k=(c=i,h.includes(c))?i:g;return(0,f.jsx)(e.sG.div,{"data-orientation":k,...d?{role:"none"}:{"aria-orientation":"vertical"===k?k:void 0,role:"separator"},...j,ref:b})});i.displayName="Separator";var j=i},74733:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]])},79030:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(10837),e=c(96307);function f({done:a,total:b,size:c=14,stroke:f=2,className:g,color:h="#B26B3D",trackColor:i="#EAD9C8"}){let j=(c-f)/2,k=2*Math.PI*j,l=b>0?Math.min(1,Math.max(0,a/b)):0;return(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,className:(0,e.cn)("shrink-0",g),role:"img","aria-label":`${a}/${b}`,children:[(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:i,strokeWidth:f}),l>0&&(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:b>0&&a>=b?"#1D9E75":h,strokeWidth:f,strokeDasharray:k,strokeDashoffset:k*(1-l),strokeLinecap:"round",transform:`rotate(-90 ${c/2} ${c/2})`})]})}},79233:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(68884),h=c(76549),i=c(86460);let j=(0,c(56556).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var k=c(21692),l=c(42424),m=c(11568),n=c(10297),o=c(96307),p=c(42377);let q=(0,p.createServerReference)("40cc7934967e6b545567d23b802348bffd523e16f1",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("6082e2eb9c632842d0a374e00b906c662fdeb87236",p.callServer,void 0,p.findSourceMapURL,"setIdeaParentAction");var s=c(54722);function t({open:a,onOpenChange:b,ideaUuid:c,ideaTitle:p,projectUuid:t,currentParentUuid:u,descendantUuids:v,onChanged:w}){let x=(0,f.c)("ideaTracker.lineage"),y=(0,f.c)("common"),z=(0,g.r)(),[A,B]=(0,e.useState)([]),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),K=new Set([c,...v]);(0,e.useCallback)(async()=>{F(!0),J(null);try{let a=await q(t);a.success?(B(a.data),D(a.hasMore)):J(a.error)}catch(a){s.q.error("Failed to load parent candidates:",a),J(x("saveFailed"))}F(!1)},[t,x]);let L=async a=>{if(!G){H(!0),J(null);try{let d=await r(c,a);d.success?(h.oR.success(a?x("save"):x("detach")),b(!1),z.refresh(),w()):J(d.error||x("saveFailed"))}catch(a){J(a instanceof Error?a.message:x("saveFailed"))}H(!1)}};return(0,d.jsx)(m.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(m.Cf,{children:[(0,d.jsxs)(m.c7,{children:[(0,d.jsx)(m.L3,{children:x("setParentTitle")}),(0,d.jsx)(m.rr,{children:x("setParentDescription",{title:p})})]}),(0,d.jsxs)("div",{className:"min-w-0 space-y-3 pt-1",children:[E?(0,d.jsx)("div",{className:"flex h-40 items-center justify-center",children:(0,d.jsx)(i.A,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):(0,d.jsx)("div",{className:"rounded-md border border-border",children:(0,d.jsxs)(n.uB,{children:[(0,d.jsx)(n.G7,{placeholder:x("searchPlaceholder")}),(0,d.jsxs)(n.oI,{children:[(0,d.jsx)(n.xL,{children:x("noCandidates")}),(0,d.jsx)(n.L$,{children:A.map(a=>{let b=K.has(a.uuid),c=a.uuid===u;return(0,d.jsxs)(n.h_,{value:a.title,disabled:b,onSelect:()=>{b||L(a.uuid)},className:(0,o.cn)("flex min-w-0 items-center justify-between gap-2",b&&"opacity-55",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A] dark:text-[#EBA890]",children:[(0,d.jsx)(j,{className:"h-3 w-3"}),x("cycleBlocked")]})]},a.uuid)})})]})]})}),(0,d.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-[#FBF0EB] dark:bg-[#221e1b] px-3 py-2.5",children:[(0,d.jsx)(k.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#B0654A] dark:text-[#EBA890]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238] dark:text-[#E9A088]",children:x("cycleWarning")})]}),C&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",role:"status",children:x("pickerTruncated")}),I&&(0,d.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:I})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[u?(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>L(null),disabled:G,children:x("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>b(!1),disabled:G,children:y("cancel")})]})]})})}},84722:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{G:()=>q});var e=c(10837),f=c(9222),g=c(86460),h=c(16235),i=c(2852),j=c(84819),k=c(65891),l=c(97450),m=c(31009),n=c(45148),o=c(69815),p=a([l,o]);function q({idea:a,elaboration:b,isLoading:c,onRefresh:d,onReassign:p,canReassign:q}){let r=(0,f.c)("ideaTracker"),s=(0,f.c)("common");return c?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(g.A,{className:"h-5 w-5 animate-spin text-primary"})}):(0,e.jsxs)(m.P.div,{variants:n.qG,initial:"initial",animate:"animate",children:[(0,e.jsx)(o.p,{assignee:a.assignee,onReassign:p,editable:q}),(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),b&&b.rounds.length>0?(0,e.jsx)("div",{children:(0,e.jsx)(k.R,{ideaUuid:a.uuid,elaboration:b,onRefresh:d})}):"open"===a.status?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF3E0] dark:bg-[#3a2a12]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationNotStartedDesc")})]})]}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#E3F2FD] dark:bg-[#13253a]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2] dark:text-[#5AA9F0]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("content")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(l.MarkdownContent,{children:a.content})})})]})]})]})}[l,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},98310:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K:()=>q});var e=c(10837),f=c(21968),g=c(9222),h=c(35209),i=c(10694),j=c(42424),k=c(49599),l=c(74645),m=c(97450),n=c(55183),o=c(77521),p=a([m]);function q({title:a,type:b,content:c,mode:d="overlay",onClose:p,onBack:q}){let r=(0,g.c)("documents"),[s,t]=(0,f.useState)(!1),u="sidebyside"===d;return(0,e.jsxs)(e.Fragment,{children:[!u&&(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:p}),(0,e.jsxs)("div",{className:`fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ${u?`z-40 ${s?"":"animate-in slide-in-from-right duration-300"}`:`z-50 right-0 ${s?"":"animate-in slide-in-from-right duration-300"}`}`,style:u?{right:`${o.L8}px`}:void 0,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[q&&(0,e.jsx)(j.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:q,children:(0,e.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:a}),(0,e.jsx)("div",{className:"mt-1.5",children:(0,e.jsx)(k.E,{variant:"outline",className:"text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:r(n.y[b]||"typeOther")})})]}),(0,e.jsx)(j.$,{variant:"outline",size:"icon",className:"ml-4 h-8 w-8 shrink-0 border-border",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"})})]}),(0,e.jsx)(l.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"px-6 py-5 text-[13px] leading-relaxed text-foreground prose prose-sm max-w-none [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:mt-4 [&_h1]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1.5 [&_h3]:text-sm [&_h3]:font-medium [&_h3]:mt-2 [&_h3]:mb-1 [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:text-[12px] [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-secondary [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2 [&_a]:text-primary",children:(0,e.jsx)(m.MarkdownContent,{children:(0,n.j)(c)})})})]})]})}m=(p.then?(await p)():p)[0],d()}catch(a){d(a)}})}};
1
+ "use strict";exports.id=1318,exports.ids=[1318],exports.modules={1327:(a,b,c)=>{c.d(b,{M:()=>F});var d=c(10837),e=c(21968),f=c(9222),g=c(76549),h=c(98893),i=c(58270),j=c(77840),k=c(33291),l=c(53109),m=c(24364),n=c(87461),o=c(59876),p=c(14973),q=c(79543),r=c(21790),s=c(42424),t=c(33863),u=c(94143),v=c(99127),w=c(71819),x=c(68952),y=c(42087),z=c(96307);let A={default:"",verify:"text-[#1976D2] focus:text-[#155FA0] focus:bg-[#E3F2FD] dark:text-[#64B5F6] dark:focus:text-[#90CAF9] dark:focus:bg-[#102A43]",develop:"text-[#2E7D32] focus:text-[#256628] focus:bg-[#E8F5E9] dark:text-[#72D572] dark:focus:text-[#9AE69A] dark:focus:bg-[#17351D]",yolo:"text-[#6A4FB6] focus:text-[#584098] focus:bg-[#F1ECFA] dark:text-[#B39DDB] dark:focus:text-[#D1C4E9] dark:focus:bg-[#2A2040]",destructive:"text-destructive focus:text-destructive focus:bg-destructive/10"};function B(a){return()=>{}}function C(){return!1}function D({label:a,icon:b,reason:c,onSelect:f,onTooltipEscape:g,tone:h="default"}){let i=(0,e.useId)(),j=(0,d.jsxs)(t._2,{"aria-label":a,"aria-disabled":!!c,"aria-describedby":c?i:void 0,variant:"destructive"===h?"destructive":"default",className:(0,z.cn)(A[h],c&&"cursor-default text-muted-foreground focus:bg-accent focus:text-muted-foreground dark:focus:bg-accent dark:text-muted-foreground dark:focus:text-muted-foreground"),onKeyDown:a=>{"Enter"===a.key&&(0,y.P)(a)&&a.preventDefault()},onSelect:a=>{c?a.preventDefault():f()},children:[b,(0,d.jsx)("span",{children:a}),c&&(0,d.jsx)("span",{id:i,className:"sr-only",children:c})]});return c?(0,d.jsxs)(v.m_,{children:[(0,d.jsx)(v.k$,{asChild:!0,children:j}),(0,d.jsx)(v.ZI,{side:"left",className:"z-[120] max-w-64",onEscapeKeyDown:g,children:c})]}):j}function E({label:a,icon:b,reason:c,onSelect:f,tone:g="default"}){let h=(0,e.useId)();return(0,d.jsxs)(s.$,{type:"button",variant:"ghost","aria-label":a,"aria-disabled":!!c,"aria-describedby":c?h:void 0,className:(0,z.cn)("focus-visible:ring-ring flex min-h-12 w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm outline-none transition-colors","hover:bg-accent focus-visible:ring-2 [&_svg]:size-5 [&_svg]:shrink-0",A[g],c&&"cursor-default text-muted-foreground hover:bg-transparent focus:bg-accent focus:text-muted-foreground dark:focus:bg-accent dark:text-muted-foreground dark:focus:text-muted-foreground"),onKeyDown:a=>{"Enter"===a.key&&(0,y.P)(a)&&a.preventDefault()},onClick:()=>{c||f()},children:[b,(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"block font-medium",children:a}),c&&(0,d.jsx)("span",{id:h,className:"mt-0.5 block text-xs leading-4 text-muted-foreground",children:c})]})]})}function F(a){let b=(0,f.c)(),c=(0,f.c)("ideaTracker.panel.actions"),[y,A]=(0,e.useState)(!1),F=(0,e.useSyncExternalStore)(B,C,()=>!1),G=a.busy?c("busy"):void 0,H=G||a.stageReason||a.stageDataReason,I=async b=>{try{let d=b?new URL(`/projects/${a.projectUuid}/dashboard?panel=${a.ideaUuid}`,window.location.origin).href:a.ideaUuid;await navigator.clipboard.writeText(d),g.oR.success(c(b?"linkCopied":"uuidCopied"))}catch{g.oR.error(c("copyFailed"))}},J={ideaUuid:a.ideaUuid,assignee:a.assignee,assigneeName:a.assigneeName,proposals:a.proposals,tasks:a.tasks,onStarted:a.onStarted,disabledReason:H,onCloseAutoFocus:a.onCloseAutoFocus};return(0,d.jsx)(w.w,{...J,renderAction:f=>(0,d.jsx)(x.s,{...J,disabledReason:H||(f.busy?c("busy"):void 0),renderAction:g=>{let w=G||(f.busy||g.busy?c("busy"):void 0),x=[[{label:b("elaboration.verifyButton"),icon:(0,d.jsx)(h.A,{}),reason:w||a.stageReason||a.verifyReason,onSelect:a.onVerify,tone:"verify"},{label:f.label,icon:(0,d.jsx)(i.A,{}),reason:w||f.disabledReason,onSelect:f.onSelect,tone:"develop"},{label:g.label,icon:(0,d.jsx)(j.A,{}),reason:w||g.disabledReason,onSelect:g.onSelect,tone:"yolo"}],[{label:b("ideaTracker.lineage.deriveIdea"),icon:(0,d.jsx)(k.A,{}),reason:w,onSelect:a.onDerive,tone:"default"},{label:b("ideaTracker.lineage.setParentTitle"),icon:(0,d.jsx)(l.A,{}),reason:w,onSelect:a.onSetParent,tone:"default"},{label:b("ideas.actions.move"),icon:(0,d.jsx)(m.A,{}),reason:w,onSelect:a.onMove,tone:"default"},{label:b("ideas.editIdea"),icon:(0,d.jsx)(n.A,{}),reason:w||a.editReason,onSelect:a.onEdit,tone:"default"}],[{label:c("copyLink"),icon:(0,d.jsx)(o.A,{}),onSelect:()=>{I(!0)},tone:"default"},{label:c("copyUuid"),icon:(0,d.jsx)(p.A,{}),onSelect:()=>{I(!1)},tone:"default"}],[{label:b("ideas.deleteIdea"),icon:(0,d.jsx)(q.A,{}),reason:w,onSelect:a.onDelete,tone:"destructive"}]];return F?(0,d.jsxs)(u.cj,{open:y,onOpenChange:A,children:[(0,d.jsx)(u.CG,{asChild:!0,children:(0,d.jsxs)(s.$,{ref:a.triggerRef,variant:"outline",size:"sm",className:"h-11 gap-1.5 border-border px-3",children:[b("common.actions"),(0,d.jsx)(r.A,{className:"size-4","aria-hidden":!0})]})}),(0,d.jsxs)(u.h,{side:"bottom",className:"max-h-[min(82svh,44rem)] gap-0 overflow-hidden rounded-t-2xl pb-[max(1rem,env(safe-area-inset-bottom))]",onCloseAutoFocus:a.onCloseAutoFocus,children:[(0,d.jsx)("div",{className:"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-muted-foreground/25","aria-hidden":!0}),(0,d.jsxs)(u.Fm,{className:"border-b px-4 pt-3 pb-3 text-left",children:[(0,d.jsx)(u.qp,{children:b("common.actions")}),(0,d.jsx)(u.Qs,{className:"sr-only",children:b("common.actions")})]}),(0,d.jsx)("div",{className:"overflow-y-auto overscroll-contain px-2 py-2",children:x.map((a,b)=>(0,d.jsx)("div",{className:(0,z.cn)(b>0&&"mt-1 border-t pt-1"),children:a.map(a=>(0,d.jsx)(E,{...a,onSelect:()=>{A(!1),a.onSelect()}},a.label))},b))})]})]}):(0,d.jsx)(v.Bc,{delayDuration:300,children:(0,d.jsxs)(t.rI,{open:y,onOpenChange:A,children:[(0,d.jsx)(t.ty,{asChild:!0,children:(0,d.jsxs)(s.$,{ref:a.triggerRef,variant:"outline",size:"sm",className:"h-8 gap-1.5 border-border px-2.5",children:[b("common.actions"),(0,d.jsx)(r.A,{className:"h-3.5 w-3.5","aria-hidden":!0})]})}),(0,d.jsx)(t.SQ,{align:"end",className:"z-[100] w-64 max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto",children:x.map((a,b)=>(0,d.jsxs)(e.Fragment,{children:[b>0&&(0,d.jsx)(t.mB,{}),a.map(a=>(0,d.jsx)(D,{...a,onTooltipEscape:()=>A(!1)},a.label))]},b))})]})})}})})}},8495:(a,b,c)=>{c.d(b,{S:()=>h});var d=c(10837);c(21968);var e=c(9810),f=c(25711),g=c(96307);function h({className:a,...b}){return(0,d.jsx)(f.Root,{"data-slot":"checkbox",className:(0,g.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",a),...b,children:(0,d.jsx)(f.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,d.jsx)(e.A,{className:"size-3.5"})})})}},9190:(a,b,c)=>{c.d(b,{n:()=>v});var d=c(10837),e=c(21968),f=c(9222),g=c(51592),h=c(49102),i=c(21790),j=c(20447),k=c(9810),l=c(97443),m=c(81512),n=c.n(m),o=c(76172),p=c(32930),q=c(22727),r=c(6871),s=c(7086),t=c(77521);let u=["in_progress","to_verify","open","assigned","done","closed"];function v({tasks:a,projectUuid:b,proposalUuids:c,onSelectTask:m}){let v=(0,f.c)("ideaTracker"),[w,x]=(0,e.useState)({}),y=(0,e.useMemo)(()=>a.map(a=>a.uuid),[a]),z=(0,e.useCallback)(async()=>{if(0===y.length)return;let a=await (0,p.h)(y);a.success&&a.data&&x(a.data)},[y]);(0,o.eV)("task",z);let A=(0,e.useMemo)(()=>{let b=[];for(let c of u){let d=a.filter(a=>a.status===c);d.length>0&&b.push({status:c,tasks:d})}let c=new Set(u),d=a.filter(a=>!c.has(a.status));return d.length>0&&b.push({status:"other",tasks:d}),b},[a]),[B,C]=(0,e.useState)(new Set),D=(0,e.useMemo)(()=>{let b=a.length,c=a.filter(a=>"done"===a.status||"closed"===a.status).length,d=0,e=0,f=0,g=0;for(let b of a)b.acceptanceSummary&&(d+=b.acceptanceSummary.total,e+=b.acceptanceSummary.passed,f+=b.acceptanceSummary.required,g+=b.acceptanceSummary.requiredPassed);return{total:b,done:c,acTotal:d,acPassed:e,acRequired:f,acRequiredPassed:g}},[a]);return 0===a.length?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,d.jsx)(g.A,{className:"h-8 w-8 text-muted-foreground"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:v("panel.taskList.noTasks")})]}):(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-[#FAFAF7] dark:bg-[#1e1e1c] px-3 py-2",children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:v("panel.taskList.summary",{done:D.done,total:D.total})}),D.acTotal>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:"\xb7"}),(0,d.jsx)("span",{className:"text-[12px] text-muted-foreground",children:v("panel.taskList.acSummary",{passed:D.acRequiredPassed,total:D.acRequired})})]}),c.length>0&&(0,d.jsxs)(n(),{href:`/projects/${b}/tasks?proposalUuids=${c.join(",")}`,className:"ml-auto flex items-center gap-1 text-[13px] font-medium text-primary shrink-0",children:[v("panel.taskList.viewKanban"),(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"})]})]}),A.map(a=>{let b=B.has(a.status);return(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{onClick:()=>{var b;return b=a.status,void C(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"flex items-center gap-2 w-full text-left py-1.5 group cursor-pointer",children:[b?(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,d.jsx)(i.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,t.eT)(a.status)}`}),(0,d.jsx)("span",{className:"text-[13px] font-medium text-foreground",children:function(a,b){switch(a){case"in_progress":return b("panel.taskList.inProgress");case"to_verify":return b("panel.taskList.toVerify");case"open":return b("panel.taskList.open");case"assigned":return b("panel.taskList.assigned");case"done":return b("panel.taskList.done");case"closed":return b("panel.taskList.closed");default:return a}}(a.status,v)}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground ml-auto",children:a.tasks.length})]}),!b&&(0,d.jsx)("div",{className:"ml-3 space-y-0.5",children:a.tasks.map(a=>{let b=w[a.uuid]||0,c=a.acceptanceSummary;return(0,d.jsx)(q.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,d.jsxs)("button",{onClick:()=>m(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2.5 py-2 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(j.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${(0,t.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[13px] text-foreground truncate group-hover:text-primary",children:a.title}),c&&c.total>0&&(0,d.jsxs)("span",{className:"inline-flex items-center gap-0.5 shrink-0 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-2.5 w-2.5"}),c.requiredPassed,"/",c.required]}),a.assignee&&(0,d.jsxs)("span",{className:"shrink-0 inline-flex items-center gap-1 text-[10px] text-muted-foreground max-w-[72px] truncate",title:a.assignee.name,children:[(0,s.bB)(a.assignee)?(0,d.jsx)(r.AgentAvatar,{name:a.assignee.name,size:14,className:"shrink-0 rounded-full"}):(0,d.jsx)(l.A,{className:"h-2.5 w-2.5 shrink-0"}),a.assignee.name.split(/[@\s]/)[0]]}),b>0&&(0,d.jsx)("span",{className:"inline-flex items-center justify-center h-4 min-w-[16px] rounded-full bg-[#E8F5E9] dark:bg-[#14281a] text-[#2E7D32] dark:text-[#5FD07E] text-[9px] font-semibold shrink-0",title:v("panel.taskList.workersActive",{count:b}),children:b})]})},a.uuid)})})]},a.status)})]})}},17068:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{x:()=>k});var e=c(10837),f=c(21968),g=c(9222),h=c(40467),i=c(56828),j=a([i]);function k({ideaUuid:a,currentUserUuid:b,commentCount:c,onCommentCountChange:d}){let j=(0,g.c)("ideaTracker"),[k,l]=(0,f.useState)("comments");return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex gap-1 rounded-lg bg-secondary p-0.5",children:[(0,e.jsxs)("button",{onClick:()=>l("comments"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors flex items-center justify-center gap-1.5 cursor-pointer ${"comments"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:[j("panel.activityTab.comments"),c>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:c})]}),(0,e.jsx)("button",{onClick:()=>l("activity"),className:`flex-1 rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors cursor-pointer ${"activity"===k?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:j("panel.activityTab.activity")})]}),(0,e.jsx)("div",{children:"activity"===k?(0,e.jsx)(h.v,{ideaUuid:a}):(0,e.jsx)(i.$m,{targetType:"idea",targetUuid:a,currentUserUuid:b,onCountChange:d,compact:!0})})]})}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},21289:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},25711:(a,b,c)=>{c.r(b),c.d(b,{Checkbox:()=>v,CheckboxIndicator:()=>x,Indicator:()=>x,Root:()=>v,createCheckboxScope:()=>p,unstable_BubbleInput:()=>z,unstable_CheckboxBubbleInput:()=>z,unstable_CheckboxProvider:()=>s,unstable_CheckboxTrigger:()=>u,unstable_Provider:()=>s,unstable_Trigger:()=>u});var d=c(21968),e=c(96090),f=c(42990),g=c(22546),h=c(15035),i=c(29851),j=c(7579),k=c(5030),l=c(16551),m=c(10837),n="Checkbox",[o,p]=(0,f.A)(n),[q,r]=o(n);function s(a){let{__scopeCheckbox:b,checked:c,children:e,defaultChecked:f,disabled:g,form:i,name:j,onCheckedChange:k,required:l,value:o="on",internal_do_not_use_render:p}=a,[r,s]=(0,h.i)({prop:c,defaultProp:f??!1,onChange:k,caller:n}),[t,u]=d.useState(null),[v,w]=d.useState(null),x=d.useRef(!1),y=!t||!!i||!!t.closest("form"),z={checked:r,disabled:g,setChecked:s,control:t,setControl:u,name:j,form:i,value:o,hasConsumerStoppedPropagationRef:x,required:l,defaultChecked:!A(f)&&f,isFormControl:y,bubbleInput:v,setBubbleInput:w};return(0,m.jsx)(q,{scope:b,...z,children:"function"==typeof p?p(z):e})}var t="CheckboxTrigger",u=d.forwardRef(({__scopeCheckbox:a,onKeyDown:b,onClick:c,...f},h)=>{let{control:i,value:j,disabled:k,checked:n,required:o,setControl:p,setChecked:q,hasConsumerStoppedPropagationRef:s,isFormControl:u,bubbleInput:v}=r(t,a),w=(0,e.s)(h,p),x=d.useRef(n);return d.useEffect(()=>{let a=i?.form;if(a){let b=()=>q(x.current);return a.addEventListener("reset",b),()=>a.removeEventListener("reset",b)}},[i,q]),(0,m.jsx)(l.sG.button,{type:"button",role:"checkbox","aria-checked":A(n)?"mixed":n,"aria-required":o,"data-state":B(n),"data-disabled":k?"":void 0,disabled:k,value:j,...f,ref:w,onKeyDown:(0,g.mK)(b,a=>{"Enter"===a.key&&a.preventDefault()}),onClick:(0,g.mK)(c,a=>{q(a=>!!A(a)||!a),v&&u&&(s.current=a.isPropagationStopped(),s.current||a.stopPropagation())})})});u.displayName=t;var v=d.forwardRef((a,b)=>{let{__scopeCheckbox:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i,onCheckedChange:j,form:k,...l}=a;return(0,m.jsx)(s,{__scopeCheckbox:c,checked:e,defaultChecked:f,disabled:h,required:g,onCheckedChange:j,name:d,form:k,value:i,internal_do_not_use_render:({isFormControl:a})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,{...l,ref:b,__scopeCheckbox:c}),a&&(0,m.jsx)(z,{__scopeCheckbox:c})]})})});v.displayName=n;var w="CheckboxIndicator",x=d.forwardRef((a,b)=>{let{__scopeCheckbox:c,forceMount:d,...e}=a,f=r(w,c);return(0,m.jsx)(k.C,{present:d||A(f.checked)||!0===f.checked,children:(0,m.jsx)(l.sG.span,{"data-state":B(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:b,style:{pointerEvents:"none",...a.style}})})});x.displayName=w;var y="CheckboxBubbleInput",z=d.forwardRef(({__scopeCheckbox:a,...b},c)=>{let{control:f,hasConsumerStoppedPropagationRef:g,checked:h,defaultChecked:k,required:n,disabled:o,name:p,value:q,form:s,bubbleInput:t,setBubbleInput:u}=r(y,a),v=(0,e.s)(c,u),w=(0,i.Z)(h),x=(0,j.X)(f);d.useEffect(()=>{if(!t)return;let a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,b=!g.current;if(w!==h&&a){let c=new Event("click",{bubbles:b});t.indeterminate=A(h),a.call(t,!A(h)&&h),t.dispatchEvent(c)}},[t,w,h,g]);let z=d.useRef(!A(h)&&h);return(0,m.jsx)(l.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:k??z.current,required:n,disabled:o,name:p,value:q,form:s,...b,tabIndex:-1,ref:v,style:{...b.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function A(a){return"indeterminate"===a}function B(a){return A(a)?"indeterminate":a?"checked":"unchecked"}z.displayName=y},32382:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>ad});var e=c(10837),f=c(21968),g=c(9222),h=c(68884),i=c(76549),j=c(10694),k=c(86460),l=c(33291),m=c(53109),n=c(74733),o=c(59876),p=c(42424),q=c(74645),r=c(49599),s=c(9994),t=c(20170),u=c(2852),v=c(88536),w=c(6019),x=c(76172),y=c(84722),z=c(64370),A=c(99201),B=c(49488),C=c(9190),D=c(17068),E=c(86104),F=c(98310),G=c(50468),H=c(46310),I=c(44963),J=c(51017),K=c(56568),L=c(99923),M=c(48127),N=c(48798),O=c(87034),P=c(35770),Q=c(79097),R=c(3259),S=c(26402),T=c(1327),U=c(53015),V=c(43756),W=c(70028),X=c(76799),Y=c(77078),Z=c(85933),$=c(54722),_=c(76664),aa=c(77521),ab=c(79030),ac=a([y,z,D,E,F,I]);function ad(a){return(0,e.jsx)(ae,{...a},a.ideaUuid)}function ae({ideaUuid:a,projectUuid:b,currentUserUuid:c,onClose:d,onNavigate:ac}){let ad=(0,g.c)(),ae=(0,g.c)("ideaTracker"),af=(0,g.c)("status"),ag=(0,g.c)("ideaTracker.lineage"),ah=(0,h.r)(),ai=(0,W.kz)(),aj=ai?.activeSessionsByIdea.get(a)??[],[ak,al]=(0,f.useState)(null),[am,an]=(0,f.useState)(!0),[ao,ap]=(0,f.useState)(null),[aq,ar]=(0,f.useState)([]),[as,at]=(0,f.useState)([]),[au,av]=(0,f.useState)(null),[aw,ax]=(0,f.useState)(null),ay=(0,f.useRef)(0),az=(0,f.useRef)(0),[aA,aB]=(0,f.useState)("overview"),[aC,aD]=(0,f.useState)(new Set(["overview"])),[aE,aF]=(0,f.useState)(!1),[aG,aH]=(0,f.useState)(0),[aI,aJ]=(0,f.useState)(!1),[aK,aL]=(0,f.useState)(!1),[aM,aN]=(0,f.useState)(!1),aO=(0,f.useRef)(null),aP=(0,f.useCallback)(a=>{a.preventDefault(),aO.current?.focus()},[]),[aQ,aR]=(0,f.useState)(null),[aS,aT]=(0,f.useState)(!0),[aU,aV]=(0,f.useState)(!1),[aW,aX]=(0,f.useState)(null),[aY,aZ]=(0,f.useState)(!1),{start:a$,pickerState:a_,confirmPick:a0,cancelPick:a1,isResolving:a2}=(0,X.E)({reassignNoWake:Z.U,previewIdeaUuid:ak?.uuid}),[a3,a4]=(0,f.useState)(!1),[a5,a6]=(0,f.useState)(""),[a7,a8]=(0,f.useState)(""),[a9,ba]=(0,f.useState)(!1),[bb,bc]=(0,f.useState)(null),[bd,be]=(0,f.useState)(!1),[bf,bg]=(0,f.useState)(!1),[bh,bi]=(0,f.useState)(!1),[bj,bk]=(0,f.useState)(!1),[bl,bm]=(0,f.useState)(null),[bn,bo]=(0,f.useState)(null),[bp,bq]=(0,f.useState)(null),br=(0,f.useCallback)(a=>{bq(null),bm(a)},[]),bs=(0,f.useCallback)(a=>{bm(null),bo(null),bq(a)},[]),[bt,bu]=(0,f.useState)(!1),[bv,bw]=(0,f.useState)(!1),bx=(0,f.useCallback)(a=>{let b=new URLSearchParams(window.location.search);b.set("tab",a),window.history.replaceState(null,"",`${window.location.pathname}?${b.toString()}`)},[]),by=(0,f.useCallback)(async()=>{try{let b=await (0,L.c)(a);b.success?(al(b.data),ap(null)):ap(ae("Not found"===b.error?"panel.notFound":"panel.loadFailed"))}catch{ap(ae("panel.loadFailed"))}finally{an(!1)}},[a,ae]);(0,x.eV)("idea",by),(0,x.eV)("proposal",by),(0,x.eV)("task",by);let bz=ak?.uuid,bA=ak?.status,bB=`${bz}:${bA}`,bC=(0,f.useCallback)(async()=>{let a=++ay.current;if(av(null),bz){if("open"===bA){ar([]),av(bB);return}try{let c=await (0,M.U)(b,bz);a===ay.current&&c.success&&(ar(c.data),av(bB))}catch(a){$.q.error("Failed to fetch proposals:",a)}}},[b,bz,bA,bB]);(0,x.eV)("proposal",bC);let bD=(0,f.useCallback)(async()=>{let a=++az.current;ax(null);let c=aq.filter(a=>"approved"===a.status);if(0===c.length){at([]),ax(aq);return}try{let d=await Promise.all(c.map(a=>(0,N.c)(b,a.uuid)));if(a!==az.current||d.some(a=>!a.success))return;let e=d.flatMap(a=>a.success&&a.data?a.data.map(a=>({uuid:a.uuid,title:a.title,status:a.status,commentCount:a.commentCount??0,assignee:a.assignee??null,acceptanceSummary:a.acceptanceSummary??null})):[]);at(e),ax(aq)}catch(a){$.q.error("Failed to fetch tasks:",a)}},[b,aq]);(0,x.eV)("task",bD);let bE=(0,f.useCallback)(async()=>{if(!bz)return;let a=await (0,P.z)(bz);a.success&&a.data&&aR(a.data),aT(!1)},[bz]);(0,x.eV)("idea",bE);let bF=(0,f.useMemo)(()=>ak?function(a,b,c){let d=["overview"];return d.push("elaboration"),b.length>0&&d.push("proposal"),c.length>0&&d.push("tasks"),d.push("activity"),d}(0,aq,as):["overview","activity"],[ak,aq,as]);(0,f.useRef)(null),ak&&ak.badgeHint;let bG=(0,f.useMemo)(()=>as.filter(a=>"in_progress"===a.status||"assigned"===a.status||"to_verify"===a.status).length,[as]),bH=(0,f.useCallback)(()=>{if(!bl)return void bo(null);(0,O.Q)(bl).then(a=>{a.success&&bo(a.data)}).catch(a=>$.q.error("Failed to load task details:",a))},[bl]);(0,x.eV)("task",bH);let bI=()=>{a4(!1),a6(ak?.title||""),a8(ak?.content||""),bc(null)},bJ=async()=>{if(!ak||!a5.trim())return void bc(ad("ideas.titleRequired"));ba(!0),bc(null);let a=await (0,J.J)({ideaUuid:ak.uuid,projectUuid:b,title:a5.trim(),content:a7.trim()||null});ba(!1),a.success?(a4(!1),await by(),ah.refresh()):bc(a.error||ad("ideas.updateFailed"))},bK=async()=>{if(!ak||aK)return;aL(!0);let a=await (0,K.Z)(ak.uuid,b);aL(!1),a.success&&(d(),ah.refresh())},bL=async()=>{if(!ak)return;aV(!0),aX(null);let a=await (0,Q.e)(ak.uuid);aV(!1),a.success?(aZ(!0),await by(),ah.refresh()):aX(a.error||ad("elaboration.verifyFailed"))},bM=async a=>{if(!ak)return;be(!0),al({...ak,isContainer:a});let c=await (0,J.J)({ideaUuid:ak.uuid,projectUuid:b,title:ak.title,content:ak.content??null,isContainer:a});be(!1),c.success?(await by(),ah.refresh()):(al({...ak,isContainer:!a}),i.oR.error(c.error||ad("ideas.updateFailed")))},bN=ak?.derivedStatus||"todo",bO=ak?.isContainer===!0,bP=null!==ak,bQ=(0,S.o)({ideaStatus:ak?.status,elaborationStatus:ak?.elaborationStatus,elaboration:aQ});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:d}),(0,e.jsxs)("div",{className:`fixed right-0 top-14 md:top-0 z-50 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col border-l border-border bg-card shadow-xl ${bv?"":"animate-in slide-in-from-right duration-300"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[(0,e.jsx)("div",{className:"flex-1 min-w-0",children:am?(0,e.jsx)("div",{className:"h-5 w-40 animate-pulse rounded bg-secondary"}):ak?a3?(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ad("ideas.editIdea")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:`text-[11px] font-semibold uppercase tracking-wider ${bO?"text-primary":"text-muted-foreground"}`,children:bO?ag("typeTheme"):ag("typeIdea")}),(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:ak.title}),(0,e.jsxs)("div",{className:"mt-1.5 flex min-w-0 items-center gap-2",children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:[(0,e.jsx)(r.E,{className:aa._5[bN]||aa._5.todo,children:ak.badgeHint?ae(`badge.${aa.Wl[ak.badgeHint]||"open"}`):af(aa.Bj[bN]||"todo")}),bO&&ak.childProgress&&ak.childProgress.total>0&&(0,e.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs font-medium text-primary",title:ag("childrenDone",{done:ak.childProgress.done,total:ak.childProgress.total}),children:[(0,e.jsx)(ab.C,{done:ak.childProgress.done,total:ak.childProgress.total,size:13,stroke:2}),ak.childProgress.done,"/",ak.childProgress.total]}),(0,e.jsx)("span",{className:"min-w-0 truncate whitespace-nowrap text-xs text-muted-foreground",title:(0,_.r)(ak.createdAt),children:(0,_.r)(ak.createdAt)})]}),aj.length>0&&ai&&(0,e.jsx)(V.U,{sessions:aj,onSelect:ai.openChatForActiveSession,surface:"sidebar",className:"shrink-0"})]})]}):(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground",children:ae("panel.notFound")})}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-2 ml-3",children:[ak&&!am&&!a3&&(0,e.jsx)(T.M,{ideaUuid:ak.uuid,projectUuid:b,assignee:ak.assignee,assigneeName:ak.assignee?.name,proposals:aq,tasks:as,triggerRef:aO,busy:aK||aU||a2||a9||bd||null!==a_,stageReason:bO?ag("containerHint"):void 0,stageDataReason:au!==bB||aw!==aq?ae("panel.actions.loadingStage"):void 0,verifyReason:aS?ae("loading"):aY?ad("elaboration.verifiedQueuedHint"):bQ?void 0:ae("panel.actions.verifyUnavailable"),editReason:"elaborated"===ak.status?ae("panel.actions.editUnavailable"):void 0,onVerify:()=>{!ak||ak.isContainer||!bQ||aY||aS||aU||a2||bd||a$({ideaUuid:ak.uuid,wake:bL})},onDerive:()=>bk(!0),onSetParent:()=>bi(!0),onMove:()=>bg(!0),onEdit:()=>{ak&&"elaborated"!==ak.status&&(a6(ak.title),a8(ak.content||""),bc(null),a4(!0))},onDelete:()=>aN(!0),onStarted:by,onCloseAutoFocus:aP},ak.uuid),(0,e.jsx)(p.$,{variant:"outline",size:"icon",className:"h-8 w-8 border-border",onClick:a3?bI:d,"aria-label":ad("common.close"),children:(0,e.jsx)(j.A,{className:"h-4 w-4 text-muted-foreground"})})]})]}),ak&&!am&&!a3&&(0,e.jsx)("div",{className:"border-b border-secondary px-6",children:(0,e.jsx)("div",{className:"flex gap-0 -mb-px",children:bF.map(a=>(0,e.jsxs)("button",{onClick:()=>{aB(a),aF(!0),aD(b=>new Set([...b,a])),bx(a)},className:`relative flex items-center gap-1.5 px-3 py-2.5 text-[13px] font-medium transition-colors cursor-pointer ${aA===a?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-muted-foreground"}`,children:[ae(`panel.tabs.${a}`),"tasks"===a&&bG>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0] text-[10px] font-semibold leading-none",children:bG}),"activity"===a&&aG>0&&(0,e.jsx)("span",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded-full bg-secondary text-muted-foreground text-[10px] font-semibold leading-none",children:aG})]},a))})}),(0,e.jsx)(q.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"flex min-h-full flex-col px-6 py-5",children:am?(0,e.jsxs)("div",{className:"flex flex-1 items-center justify-center py-12",children:[(0,e.jsx)(k.A,{className:"h-6 w-6 animate-spin text-primary"}),(0,e.jsx)("span",{className:"ml-2 text-sm text-muted-foreground",children:ae("loading")})]}):ao?(0,e.jsx)("div",{className:"flex flex-1 items-center justify-center py-12",children:(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:ao})}):ak?a3?(0,e.jsxs)("div",{className:"space-y-5",children:[bb&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:bb}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(u.J,{htmlFor:"edit-title",className:"text-[13px] font-medium text-foreground",children:ad("ideas.titleLabel")}),(0,e.jsx)(s.p,{id:"edit-title",value:a5,onChange:a=>a6(a.target.value),className:"border-border text-sm focus-visible:ring-primary",autoFocus:!0})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(u.J,{htmlFor:"edit-content",className:"text-[13px] font-medium text-foreground",children:ad("common.content")}),(0,e.jsx)(t.T,{id:"edit-content",value:a7,onChange:a=>a8(a.target.value),rows:8,className:"border-border text-sm resize-none focus-visible:ring-primary"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,e.jsx)(p.$,{variant:"outline",onClick:bI,disabled:a9,children:ad("common.cancel")}),(0,e.jsxs)(p.$,{onClick:bJ,disabled:a9||!a5.trim(),children:[a9&&(0,e.jsx)(k.A,{className:"mr-2 h-4 w-4 animate-spin"}),ad("common.save")]})]})]}):(0,e.jsxs)(e.Fragment,{children:[aY&&(0,e.jsx)("p",{role:"status",className:"mb-4 text-xs text-muted-foreground",children:ad("elaboration.verifiedQueuedHint")}),aW&&(0,e.jsx)("p",{role:"alert",className:"mb-4 text-xs text-destructive",children:aW}),bO&&(0,e.jsx)("p",{className:"mb-4 text-xs text-muted-foreground",children:ag("containerHint")}),aC.has("overview")&&(0,e.jsxs)("div",{style:{display:"overview"===aA?"block":"none"},children:[(0,e.jsxs)("div",{className:"mb-5 flex items-start justify-between gap-3 rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e] bg-background px-3.5 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-0.5",children:[(0,e.jsxs)(u.J,{htmlFor:"container-toggle",className:"flex items-center gap-1.5 text-[13px] font-medium text-foreground",children:[(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 text-primary","aria-hidden":!0}),ag("container")]}),(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:ag("containerDescription")})]}),(0,e.jsx)(v.d,{id:"container-toggle",checked:bO,disabled:bd,onCheckedChange:bM,"aria-label":ag("makeContainer")})]}),(0,e.jsx)(A.p,{idea:ak,proposals:aq,tasks:as,onSelectTask:br}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsx)("div",{className:"flex items-center",children:(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ag("title")})]})}),ak.parent?(0,e.jsxs)("button",{type:"button",onClick:()=>ac?.(ak.parent.uuid),className:"flex w-full items-center gap-2 rounded-lg bg-background px-3 py-2.5 text-left transition-colors hover:bg-secondary",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:ag("derivedFrom")}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium text-foreground/80",children:ak.parent.title})]}):(0,e.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",children:ag("noParent")}),ak.children&&ak.children.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between px-1 pt-1",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("span",{className:"text-[12px] font-medium text-foreground/80",children:ag("derivedIdeas")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:ak.children.length})]}),(()=>{let a=ak.children.filter(a=>"done"===a.derivedStatus).length,b=ak.children.length;return(0,e.jsxs)("span",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",title:ag("childrenDone",{done:a,total:b}),children:[(0,e.jsx)(ab.C,{done:a,total:b,size:14,stroke:2}),a,"/",b]})})()]}),(0,e.jsx)("div",{className:"overflow-hidden rounded-lg border border-[#EFEBE3] dark:border-[#2a2a2e]",children:ak.children.map((a,b)=>(0,e.jsxs)("div",{children:[b>0&&(0,e.jsx)("div",{className:"h-px bg-[#F0EEEA] dark:bg-[#1f1e1c]"}),(0,e.jsxs)("button",{type:"button",onClick:()=>ac?.(a.uuid),className:"flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left transition-colors hover:bg-background",children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"truncate text-[12px] text-foreground",children:a.title})]}),(0,e.jsx)(r.E,{className:`shrink-0 border-0 text-[10px] ${aa._5[a.derivedStatus]||aa._5.todo}`,children:af(aa.Bj[a.derivedStatus]||"todo")})]})]},a.uuid))})]})]}),(0,e.jsx)(B.U,{projectUuid:b,ideaUuid:ak.uuid,proposals:aq,onDocClick:bs}),(0,e.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 text-primary"}),(0,e.jsx)("span",{className:"text-[12px] font-semibold text-foreground/80",children:ad("references.title")})]}),(0,e.jsx)(U.ReferencesSection,{targetType:"idea",targetUuid:ak.uuid,canWrite:!0,compact:!0})]})]}),bF.includes("elaboration")&&aC.has("elaboration")&&(0,e.jsx)("div",{style:{display:"elaboration"===aA?"block":"none"},children:(0,e.jsx)(y.G,{idea:ak,elaboration:aQ,isLoading:aS,onRefresh:async()=>{await bE(),await by()},onReassign:()=>aJ(!0),canReassign:bP})}),bF.includes("proposal")&&aC.has("proposal")&&(0,e.jsx)("div",{style:{display:"proposal"===aA?"block":"none"},children:(0,e.jsx)(z.k,{idea:ak,projectUuid:b,onTaskClick:br,onDocClick:bs,initialProposals:aq})}),bF.includes("tasks")&&aC.has("tasks")&&(0,e.jsx)("div",{style:{display:"tasks"===aA?"block":"none"},children:(0,e.jsx)(C.n,{tasks:as,projectUuid:b,proposalUuids:aq.filter(a=>"approved"===a.status).map(a=>a.uuid),onSelectTask:br})}),aC.has("activity")&&(0,e.jsx)("div",{style:{display:"activity"===aA?"block":"none"},children:(0,e.jsx)(D.x,{ideaUuid:ak.uuid,currentUserUuid:c,commentCount:aG,onCommentCountChange:aH})})]}):null})}),ak&&(0,e.jsx)(w.Lt,{open:aM,onOpenChange:aN,children:(0,e.jsxs)(w.EO,{onCloseAutoFocus:aP,children:[(0,e.jsxs)(w.wd,{children:[(0,e.jsx)(w.r7,{children:ad("ideas.deleteIdea")}),(0,e.jsx)(w.$v,{children:ad("ideas.deleteIdeaConfirm",{title:ak.title})})]}),(0,e.jsxs)(w.ck,{children:[(0,e.jsx)(w.Zr,{children:ad("common.cancel")}),(0,e.jsx)(w.Rx,{variant:"destructive",onClick:bK,disabled:aK,children:ad("common.delete")})]})]})})]}),(0,e.jsx)(G.h,{open:bf,onOpenChange:bg,onCloseAutoFocus:aP,ideaUuid:a,projectUuid:b,onMoved:()=>d()}),ak&&(0,e.jsx)(H.d,{open:bh,onOpenChange:bi,ideaUuid:ak.uuid,ideaTitle:ak.title,projectUuid:b,currentParentUuid:ak.parentUuid??null,descendantUuids:ak.descendantUuids??[],onChanged:by,onCloseAutoFocus:aP}),ak&&(0,e.jsx)(I.i,{open:bj,onOpenChange:bk,onCloseAutoFocus:aP,projectUuid:b,parentUuid:ak.uuid,parentTitle:ak.title,onCreated:a=>{i.oR.success(ag("deriveIdea")),ah.refresh(),ac?.(a)}}),aI&&ak&&(0,e.jsx)(R.i,{idea:{uuid:ak.uuid,title:ak.title,content:ak.content,status:ak.status,assignee:ak.assignee?{type:ak.assignee.type,uuid:ak.assignee.uuid,name:ak.assignee.name}:null},projectUuid:b,currentUserUuid:c,onClose:()=>{aJ(!1),by()}}),(0,e.jsx)(Y.V,{open:null!==a_,onCloseAutoFocus:aP,agentName:ak?.assignee?.name??"",instances:a_?.instances??[],onConfirm:a0,onCancel:a1}),bl&&bn&&(0,e.jsx)(E.v,{task:bn,projectUuid:b,currentUserUuid:c,mode:bt?"sidebyside":"overlay",onClose:()=>{bm(null),bo(null)},onBack:()=>{bm(null),bo(null)}}),bp&&(0,e.jsx)(F.K,{title:bp.title,type:bp.type,content:bp.content,mode:bt?"sidebyside":"overlay",onClose:()=>bq(null),onBack:()=>bq(null)})]})}[y,z,D,E,F,I]=ac.then?(await ac)():ac,d()}catch(a){d(a)}})},33291:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]])},40467:(a,b,c)=>{c.d(b,{v:()=>k});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(2852),i=c(9952),j=c(77521);function k({ideaUuid:a}){let b=(0,f.c)(),[c,k]=(0,e.useState)([]),[l,m]=(0,e.useState)(!0);return(0,e.useCallback)(async()=>{m(!0),k((await (0,i.x)(a)).activities),m(!1)},[a]),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)(h.J,{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:b("common.activity")}),(0,d.jsx)("div",{className:"mt-2",children:l?(0,d.jsx)("div",{className:"flex items-center justify-center py-4",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):0===c.length?(0,d.jsx)("p",{className:"text-sm text-muted-foreground italic",children:b("common.noActivity")}):c.map((a,e)=>(0,d.jsxs)("div",{className:"flex items-stretch gap-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-2 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full border-[1.5px] border-[#D9D9D9] dark:border-[#3a3a40] bg-card"}),e<c.length-1&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1"})]}),(0,d.jsxs)("div",{className:"flex-1 pb-3",children:[(0,d.jsx)("p",{className:"text-[13px] text-foreground",children:function(a,b){let{action:c,actorName:d}=a;switch(c){case"created":case"idea_created":return b("activity.ideaCreated",{actor:d});case"assigned":case"idea_assigned":return b("activity.ideaAssigned",{actor:d});case"claimed":case"idea_claimed":return b("activity.ideaClaimed",{actor:d});case"released":case"idea_released":return b("activity.ideaReleased",{actor:d});case"status_changed":case"idea_status_changed":return b("activity.ideaStatusChanged",{actor:d});case"edited":case"idea_edited":return b("activity.ideaEdited",{actor:d});case"reparented":case"idea_reparented":return b("activity.ideaReparented",{actor:d});case"elaboration_started":return b("activity.elaborationStarted",{actor:d});case"elaboration_answered":return b("activity.elaborationAnswered",{actor:d});case"elaboration_skipped":return b("activity.elaborationSkipped",{actor:d});case"elaboration_resolved":return b("activity.elaborationResolved",{actor:d});case"elaboration_followup":return b("activity.elaborationFollowup",{actor:d});default:return b("activity.genericAction",{actor:d,action:c})}}(a,b)}),(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground",children:(0,j.fw)(a.createdAt,b)})]})]},a.uuid))})]})}},43756:(a,b,c)=>{c.d(b,{U:()=>l});var d=c(10837),e=c(21968),f=c(9222),g=c(6871),h=c(42424),i=c(74113),j=c(96307);function k(a){return a.agentName??a.agentUuid}function l({sessions:a,onSelect:b,surface:c,className:l}){let m=(0,f.c)("activeSessions"),[n,o]=(0,e.useState)(!1),p=(0,e.useRef)(null);if(0===a.length)return null;let q=a.some(a=>a.canOpen),r=1===a.length&&a[0].canOpen,s=a[0],t=()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},u=()=>{t(),p.current=setTimeout(()=>o(!1),120)},v=a=>{a.canOpen&&(o(!1),b(a))},w=(0,d.jsxs)(h.$,{type:"button",variant:"outline",size:"tracker"===c?"xs":"icon-sm","data-testid":`${c}-active-session-indicator`,"aria-label":m(q?"indicatorLabel":"statusOnlyIndicatorLabel",{count:a.length}),"aria-disabled":!q,"aria-haspopup":a.length>1?"dialog":void 0,onPointerDown:a=>a.stopPropagation(),onPointerEnter:r?void 0:a=>{"touch"!==a.pointerType&&(t(),o(!0))},onPointerLeave:r?void 0:a=>{"touch"!==a.pointerType&&u()},onFocus:r?void 0:()=>o(!0),onClick:a=>{if(a.stopPropagation(),t(),r)return void v(s);n&&a.preventDefault()},onKeyDown:a=>a.stopPropagation(),className:(0,j.cn)("group/active relative gap-1.5 overflow-visible border-emerald-500/35 bg-emerald-500/10 font-semibold text-emerald-700 shadow-none transition-[background-color,border-color,box-shadow] hover:border-emerald-500/60 hover:bg-emerald-500/15 hover:text-emerald-700 hover:shadow-[0_3px_10px_-5px_rgba(16,185,129,0.8)] focus-visible:border-emerald-500 focus-visible:ring-emerald-500/50 dark:border-emerald-500/35 dark:bg-emerald-500/10 dark:text-emerald-300 dark:hover:border-emerald-500/60 dark:hover:bg-emerald-500/15 dark:hover:text-emerald-300","tracker"===c?"h-7 min-w-7 px-1 text-[11px]":"sidebar"===c?"h-8 min-w-8 px-1 text-[11px]":"h-9 min-w-9 px-1 text-[11px] shadow-sm",l),children:[(0,d.jsxs)("span",{className:"relative shrink-0","aria-hidden":!0,children:[(0,d.jsx)(g.AgentAvatar,{name:k(s),size:"graph"===c?22:20,className:"rounded-full ring-1 ring-emerald-600/25"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2 rounded-full border-2 border-card bg-emerald-500"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2 rounded-full bg-emerald-400/75 motion-safe:animate-ping motion-reduce:animate-none"})]}),a.length>1&&(0,d.jsx)("span",{children:a.length})]});return r?w:(0,d.jsxs)(i.AM,{open:n,onOpenChange:o,children:[(0,d.jsx)(i.Wv,{asChild:!0,children:w}),(0,d.jsxs)(i.hl,{align:"start",sideOffset:6,onCloseAutoFocus:a=>a.preventDefault(),onPointerDown:a=>a.stopPropagation(),onPointerEnter:t,onPointerLeave:u,onClick:a=>a.stopPropagation(),className:"w-[min(22rem,calc(100vw-2rem))] p-1.5","aria-label":m("chooserLabel"),children:[(0,d.jsx)("p",{className:"px-2 pb-1.5 pt-1 text-xs font-medium text-muted-foreground",children:m("runningCount",{count:a.length})}),(0,d.jsx)("div",{className:"max-h-64 overflow-y-auto",children:a.map(a=>(0,d.jsxs)(h.$,{type:"button",variant:"ghost",disabled:!a.canOpen,"aria-label":a.canOpen?k(a):m("statusOnlyEntry",{agent:k(a)}),onClick:()=>v(a),className:"group/session h-auto w-full min-w-0 items-start justify-start gap-2.5 whitespace-normal px-2 py-2 text-left disabled:cursor-not-allowed disabled:opacity-65",children:[(0,d.jsxs)("span",{className:"relative mt-0.5 shrink-0","aria-hidden":!0,children:[(0,d.jsx)(g.AgentAvatar,{name:k(a),size:30,className:"rounded-lg ring-1 ring-border transition-shadow group-hover/session:ring-emerald-500/45"}),(0,d.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border-2 border-card bg-emerald-500"})]}),(0,d.jsxs)("span",{className:"min-w-0",children:[(0,d.jsx)("span",{className:"block truncate text-xs font-medium text-foreground",children:k(a)}),(0,d.jsx)("span",{className:"block truncate text-[11px] text-muted-foreground",children:a.connectionAvailable?m("location",{host:a.host??m("unknownHost"),cwd:a.cwd??m("unknownCwd")}):m("agentFallback")}),!a.canOpen&&(0,d.jsx)("span",{className:"block text-[11px] font-medium text-muted-foreground",children:m("statusOnly")})]})]},a.sessionUuid))})]})]})}},44963:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{i:()=>u});var e=c(10837),f=c(21968),g=c(9222),h=c(86460),i=c(42424),j=c(11568),k=c(9994),l=c(20170),m=c(2852),n=c(8495),o=c(94372),p=c(42087),q=c(93524),r=c(70028),s=c(68797),t=a([s]);function u({open:a,onOpenChange:b,onCloseAutoFocus:c,projectUuid:d,onCreated:t,parentUuid:u,parentTitle:v}){let w=(0,g.c)("ideaTracker"),x=(0,g.c)("ideaTracker.lineage"),y=!!u,z=(0,g.c)("common"),[A,B]=(0,f.useState)(""),[C,D]=(0,f.useState)(""),[E,F]=(0,f.useState)(!1),[G,H]=(0,f.useState)(!1),[I,J]=(0,f.useState)(null),[K,L]=(0,f.useState)(!1),[M,N]=(0,f.useState)(!1),O=(0,r.kz)(),P=(O?.connections??[]).some(a=>"online"===a.effectiveStatus),[Q,R]=(0,f.useState)("form"),S=y?"form":Q,T=async()=>{let a=A.trim();if(a){H(!0),J(null);try{let c=await fetch(`/api/projects/${d}/ideas`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,content:C.trim()||void 0,...u?{parentUuid:u}:{},...E?{isContainer:!0}:{}})}),e=await c.json();e.success&&e.data?.uuid?(B(""),D(""),F(!1),b(!1),t?.(e.data.uuid)):J(e.error||w("error.createFailed"))}catch{J(w("error.createFailed"))}finally{H(!1)}}},U=(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 py-2",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(m.J,{htmlFor:"idea-title",children:w("newIdea.ideaTitle")}),(0,e.jsx)(k.p,{id:"idea-title",value:A,onChange:a=>B(a.target.value),placeholder:w("newIdea.titlePlaceholder"),autoFocus:!0,onKeyDown:a=>{!(0,p.P)(a)&&"Enter"===a.key&&!a.shiftKey&&A.trim()&&(a.preventDefault(),T())}})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(m.J,{htmlFor:"idea-content",children:[w("newIdea.description"),(0,e.jsxs)("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:["(",z("optional"),")"]})]}),(0,e.jsx)(l.T,{id:"idea-content",value:C,onChange:a=>D(a.target.value),placeholder:w("newIdea.descriptionPlaceholder"),rows:4,className:"resize-none"})]}),(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-is-container",checked:E,onCheckedChange:a=>F(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-is-container",className:"cursor-pointer",children:x("makeContainer")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:x("containerHint")})]})]}),I&&(0,e.jsx)("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-[12px] text-destructive",children:I})]}),(0,e.jsxs)(j.Es,{children:[(0,e.jsx)(i.$,{variant:"outline",onClick:()=>b(!1),disabled:G,children:z("cancel")}),(0,e.jsxs)(i.$,{onClick:T,disabled:G||!A.trim(),className:"bg-primary hover:bg-[#B56A42] text-white",children:[G?(0,e.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}):null,z("create")]})]})]}),V=async a=>{let b=await (0,q.tm)("/api/ideas/conversational",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectUuid:d,agentUuid:a.agentUuid,connectionUuid:a.connectionUuid,descriptionText:a.userText,...K?{decompose:!0}:{}})});if(!b.ok){let a=null;try{let c=await b.json();"string"==typeof c?.error&&c.error&&(a=c.error)}catch{}throw new s.fF(b.status,a)}let c=null;try{let a=await b.json();a?.success&&a.data?.session&&(c=a.data.session)}catch{}if(!c)throw new s.fF(b.status,null);return c},W=(0,e.jsxs)("div",{className:"space-y-3 py-2",children:[(0,e.jsxs)("div",{className:"flex items-start gap-2",children:[(0,e.jsx)(n.S,{id:"idea-decompose",checked:K,onCheckedChange:a=>L(!0===a),className:"mt-0.5"}),(0,e.jsxs)("div",{className:"grid gap-1 leading-none",children:[(0,e.jsx)(m.J,{htmlFor:"idea-decompose",className:"cursor-pointer",children:w("newIdea.decompose")}),(0,e.jsx)("p",{className:"text-xs font-normal text-muted-foreground",children:w("newIdea.decomposeHint")})]})]}),(0,e.jsx)(s.jH,{projectUuid:d,dispatch:V,onStarted:a=>{b(!1),O?.openChatForSession(a)}})]});return(0,e.jsx)(j.lG,{open:a,onOpenChange:b,children:(0,e.jsxs)(j.Cf,{className:"sm:max-w-[480px]",onCloseAutoFocus:c,children:[(0,e.jsxs)(j.c7,{children:[(0,e.jsx)(j.L3,{children:y?x("deriveIdea"):w("newIdea.title")}),y&&v&&(0,e.jsxs)("p",{className:"text-[13px] text-muted-foreground",children:[x("derivedFrom")," \xb7 ",v]})]}),!y&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o.tU,{value:S,onValueChange:a=>R(a),children:(0,e.jsxs)(o.j7,{className:"grid w-full grid-cols-2",children:[(0,e.jsx)(o.Xi,{value:"form",children:w("newIdea.modeForm")}),(0,e.jsx)(o.Xi,{value:"conversation",disabled:!P&&!M,children:w("newIdea.modeConversation")})]})}),!P&&(0,e.jsxs)("div",{className:"rounded-xl border border-[#EFEBE4] dark:border-[#2a2a2e] bg-[#FCFBF8] dark:bg-[#1e1d1b] px-3 py-2",children:[(0,e.jsx)("p",{className:"px-1 pt-1 text-[12px] font-medium text-muted-foreground",children:w("newIdea.modeConversationOfflineHint")}),(0,e.jsx)(s.Bs,{variant:"compact"})]})]}),"form"===S?U:W]})})}s=(t.then?(await t)():t)[0],d()}catch(a){d(a)}})},46310:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(10837),e=c(21968),f=c(9222),g=c(68884),h=c(76549),i=c(86460);let j=(0,c(56556).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var k=c(21692),l=c(42424),m=c(11568),n=c(10297),o=c(96307),p=c(42377);let q=(0,p.createServerReference)("40f79bfbedab92ef2b2a5e10a65bfff644d6f3a5ab",p.callServer,void 0,p.findSourceMapURL,"getProjectIdeasForPickerAction"),r=(0,p.createServerReference)("6014f58b5386dae958784423149acc09255b0ab9d1",p.callServer,void 0,p.findSourceMapURL,"setIdeaParentAction");var s=c(54722);function t({open:a,onOpenChange:b,ideaUuid:c,ideaTitle:p,projectUuid:t,currentParentUuid:u,descendantUuids:v,onChanged:w,onCloseAutoFocus:x}){let y=(0,f.c)("ideaTracker.lineage"),z=(0,f.c)("common"),A=(0,g.r)(),[B,C]=(0,e.useState)([]),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(null),L=new Set([c,...v]);(0,e.useCallback)(async()=>{G(!0),K(null);try{let a=await q(t);a.success?(C(a.data),E(a.hasMore)):K(a.error)}catch(a){s.q.error("Failed to load parent candidates:",a),K(y("saveFailed"))}G(!1)},[t,y]);let M=async a=>{if(!H){I(!0),K(null);try{let d=await r(c,a);d.success?(h.oR.success(a?y("save"):y("detach")),b(!1),A.refresh(),w()):K(d.error||y("saveFailed"))}catch(a){K(a instanceof Error?a.message:y("saveFailed"))}I(!1)}};return(0,d.jsx)(m.lG,{open:a,onOpenChange:b,children:(0,d.jsxs)(m.Cf,{onCloseAutoFocus:x,children:[(0,d.jsxs)(m.c7,{children:[(0,d.jsx)(m.L3,{children:y("setParentTitle")}),(0,d.jsx)(m.rr,{children:y("setParentDescription",{title:p})})]}),(0,d.jsxs)("div",{className:"min-w-0 space-y-3 pt-1",children:[F?(0,d.jsx)("div",{className:"flex h-40 items-center justify-center",children:(0,d.jsx)(i.A,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):(0,d.jsx)("div",{className:"rounded-md border border-border",children:(0,d.jsxs)(n.uB,{children:[(0,d.jsx)(n.G7,{placeholder:y("searchPlaceholder")}),(0,d.jsxs)(n.oI,{children:[(0,d.jsx)(n.xL,{children:y("noCandidates")}),(0,d.jsx)(n.L$,{children:B.map(a=>{let b=L.has(a.uuid),c=a.uuid===u;return(0,d.jsxs)(n.h_,{value:a.title,disabled:b,onSelect:()=>{b||M(a.uuid)},className:(0,o.cn)("flex min-w-0 items-center justify-between gap-2",b&&"opacity-55",c&&"bg-primary/10"),children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",children:a.title}),b&&(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-[11px] font-medium text-[#B0654A] dark:text-[#EBA890]",children:[(0,d.jsx)(j,{className:"h-3 w-3"}),y("cycleBlocked")]})]},a.uuid)})})]})]})}),(0,d.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-[#FBF0EB] dark:bg-[#221e1b] px-3 py-2.5",children:[(0,d.jsx)(k.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#B0654A] dark:text-[#EBA890]"}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[#9A5238] dark:text-[#E9A088]",children:y("cycleWarning")})]}),D&&(0,d.jsx)("p",{className:"px-1 text-[12px] text-muted-foreground",role:"status",children:y("pickerTruncated")}),J&&(0,d.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:J})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[u?(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>M(null),disabled:H,children:y("detach")}):(0,d.jsx)("span",{}),(0,d.jsx)(l.$,{variant:"outline",className:"border-border",onClick:()=>b(!1),disabled:H,children:z("cancel")})]})]})})}},49488:(a,b,c)=>{c.d(b,{U:()=>p});var d=c(10837),e=c(21968),f=c(9222),g=c(86460),h=c(20447),i=c(49599),j=c(42424),k=c(76172),l=c(54722),m=c(55183),n=c(42377);let o=(0,n.createServerReference)("60ca2eff388485dcb9faf78f94388a49be2d7795f4",n.callServer,void 0,n.findSourceMapURL,"getReportsForIdeaAction");function p({projectUuid:a,ideaUuid:b,proposals:c,onDocClick:n}){let p=(0,f.c)("idea"),q=(0,f.c)("documents"),[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(!0),v=c.some(a=>"approved"===a.status),w=(0,e.useCallback)(async()=>{if(!v){s([]),u(!1);return}try{let c=await o(a,b);if(c.success){let a=[...c.data].sort((a,b)=>new Date(b.createdAt).getTime()-new Date(a.createdAt).getTime());s(a.map(a=>({uuid:a.uuid,title:a.title,type:a.type,content:a.content??null,createdAt:a.createdAt})))}}catch(a){l.q.error("Failed to fetch reports for idea:",a)}finally{u(!1)}},[a,b,v]);return((0,k.eV)("document",w),t)?v?(0,d.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,d.jsx)(g.A,{className:"h-4 w-4 animate-spin text-primary"})}):null:0===r.length?null:(0,d.jsxs)("div",{className:"mt-6 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,d.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:p("reportsList")}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.length}),(0,d.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["\xb7 ",p("reportsAcrossProposals")]})]}),(0,d.jsx)("div",{className:"space-y-0",children:r.map(a=>(0,d.jsxs)(j.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>n({title:a.title,type:"report",content:a.content??""}),children:[(0,d.jsx)(h.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(i.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:q(m.y[a.type]||"typeOther")}),(0,d.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:a.title})]},a.uuid))})]})}},53109:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]])},55183:(a,b,c)=>{function d(a){return a.replace(/\\n/g,"\n")}c.d(b,{j:()=>d,y:()=>e});let e={prd:"typePrd",tech_design:"typeTechDesign",adr:"typeAdr",spec:"typeSpec",guide:"typeGuide",design:"typeDesign",note:"typeNote",report:"typeReport",other:"typeOther"}},64370:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>A});var e=c(10837),f=c(21968),g=c(9222),h=c(81512),i=c.n(h),j=c(86460),k=c(21289),l=c(49102),m=c(20447),n=c(21790),o=c(51592),p=c(49599),q=c(42424),r=c(22727),s=c(90061),t=c(76172),u=c(97450),v=c(60265),w=c(55183),x=c(48127);c(48798);var y=c(54722),z=a([u]);function A({idea:a,projectUuid:b,onTaskClick:c,onDocClick:d,initialProposals:h}){let i=(0,g.c)("ideaTracker"),[l,m]=(0,f.useState)(h??[]),[n,o]=(0,f.useState)(!h),p=(0,f.useCallback)(async()=>{try{let c=await (0,x.U)(b,a.uuid);if(c.success)return m(c.data),c.data}catch(a){y.q.error("Failed to fetch proposals:",a)}finally{o(!1)}return[]},[b,a.uuid]),q=(0,f.useRef)(l);q.current=l;let{getPresence:r}=(0,s.xQ)();return((0,t.eV)("proposal",async()=>{let a=q.current;for(let b of(await p())){let c=a.find(a=>a.uuid===b.uuid);if(!c)continue;let d=new Set((c.documentDrafts??[]).map(a=>a.uuid)),e=new Set((c.taskDrafts??[]).map(a=>a.uuid)),f=(b.documentDrafts??[]).filter(a=>a.uuid&&!d.has(a.uuid)),g=(b.taskDrafts??[]).filter(a=>a.uuid&&!e.has(a.uuid)),h=[...f.map(a=>a.uuid),...g.map(a=>a.uuid)];if(h.length>0){let a=r("proposal",b.uuid)[0];if(a)for(let c of h)(0,s.fv)({entityType:"proposal",entityUuid:b.uuid,subEntityType:"draft",subEntityUuid:c,agentUuid:a.agentUuid,agentName:a.agentName,action:"mutate"})}}}),n)?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(j.A,{className:"h-5 w-5 animate-spin text-primary"})}):0===l.length?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#F3E5F5] dark:bg-[#281630]",children:(0,e.jsx)(k.A,{className:"h-5 w-5 text-[#7B1FA2] dark:text-[#C98FE0]"})}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:i("panel.noProposals")})]}):(0,e.jsx)("div",{className:"space-y-5",children:l.map(a=>(0,e.jsx)(B,{proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d},a.uuid))})}u=(z.then?(await z)():z)[0];let D={draft:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",pending:"bg-[#FFF3E0] dark:bg-[#3a2a12] text-[#E65100] dark:text-[#F0A050]",approved:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",rejected:"bg-[#FFEBEE] dark:bg-[#331619] text-[#C4574C] dark:text-[#F0897E]",revised:"bg-[#E3F2FD] dark:bg-[#13253a] text-[#1976D2] dark:text-[#5AA9F0]",closed:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground"};function B({proposal:a,projectUuid:b,onTaskClick:c,onDocClick:d}){let h=(0,g.c)("ideaTracker"),j=(0,g.c)(),k=(0,g.c)("proposals"),n=(0,g.c)("tasks"),o=(0,g.c)("documents"),s=a.documentDrafts||[],t=a.taskDrafts||[],[x,y]=(0,f.useState)(new Set),[z,A]=(0,f.useState)("cards"),[B,E]=(0,f.useState)([]),F="approved"===a.status,G=(0,f.useMemo)(()=>{let a=new Map;for(let b of B)a.set(b.title,b);return a},[B]),{dagTasks:H,dagEdges:I,dagHeight:J}=(0,f.useMemo)(()=>{let a=t.map(a=>{let b=G.get(a.title);return{uuid:b?.uuid||a.uuid,title:a.title,status:b?.status||"open",priority:a.priority||"medium"}}),b=[],c=new Map(t.map(a=>[a.uuid,a]));for(let a of t)if(a.dependsOnDraftUuids)for(let d of a.dependsOnDraftUuids){let e=G.get(a.title),f=c.get(d),g=f?G.get(f.title):void 0;b.push({from:e?.uuid||a.uuid,to:g?.uuid||d})}return{dagTasks:a,dagEdges:b,dagHeight:Math.max(350,90*a.length)}},[t,G]),K=F?B.filter(a=>"done"===a.status||"closed"===a.status).length:0;return(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-[14px] font-semibold text-foreground truncate flex-1",children:a.title}),(0,e.jsx)(p.E,{className:`text-[11px] font-semibold border-0 shrink-0 ${D[a.status]||""}`,children:j(`status.${a.status}`)})]}),a.description&&(0,e.jsx)("div",{className:"max-h-[120px] overflow-y-auto text-[13px] leading-relaxed text-foreground/80 prose prose-sm max-w-none [&_h1]:text-sm [&_h2]:text-[13px] [&_h3]:text-xs [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-primary",children:(0,e.jsx)(u.MarkdownContent,{children:(0,w.j)(a.description)})}),(0,e.jsxs)(i(),{href:`/projects/${b}/proposals/${a.uuid}`,className:"flex items-center gap-1 text-[13px] font-medium text-primary hover:underline",children:[h("panel.viewProposal"),(0,e.jsx)(l.A,{className:"h-3.5 w-3.5"})]}),s.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"documents":"documentDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:s.length})]}),(0,e.jsx)("div",{className:"space-y-0",children:s.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid||`draft-${c}`,badgeInside:!0,children:(0,e.jsxs)(q.$,{variant:"ghost",className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-3.5 hover:bg-background transition-colors cursor-pointer -mx-1 px-1 rounded-lg",onClick:()=>b.content&&d?.({title:b.title,type:b.type,content:b.content}),children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,e.jsx)(p.E,{variant:"outline",className:"shrink-0 text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:o(w.y[b.type]||"typeOther")}),(0,e.jsx)("span",{className:"flex-1 min-w-0 text-left text-[13px] text-foreground truncate",children:b.title})]})},b.uuid||c))})]}),(t.length>0||B.length>0)&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between pb-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[1px] text-muted-foreground",children:k(F?"tasks":"taskDrafts")}),(0,e.jsx)("span",{className:"text-[11px] text-muted-foreground",children:F&&B.length>0?B.length:t.length})]}),(0,e.jsxs)("span",{className:"text-[12px] text-muted-foreground",children:[K,"/",F&&B.length>0?B.length:t.length]})]}),(0,e.jsx)("div",{className:"-mx-6 border-t border-border"}),I.length>0&&(0,e.jsxs)("div",{className:"flex gap-0.5 rounded-lg border border-border bg-[#F7F6F3] dark:bg-[#1e1d1b] p-0.5 mt-3 w-fit",children:[(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("cards"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"cards"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:k("cardsView")}),(0,e.jsx)(q.$,{variant:"ghost",size:"sm",onClick:()=>A("dag"),className:`rounded-md px-2.5 py-1 h-auto text-[11px] font-medium transition-colors ${"dag"===z?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-muted-foreground"}`,children:n("dagView")})]}),"cards"===z&&(0,e.jsx)("div",{className:"space-y-0",children:F&&B.length>0?B.map(a=>(0,e.jsx)(r.D,{entityType:"task",entityUuid:a.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:{uuid:a.uuid,title:a.title},expanded:!1,onToggle:()=>{},onNavigate:c?()=>c(a.uuid):void 0,taskStatus:a.status})},a.uuid)):t.map((b,c)=>(0,e.jsx)(r.D,{entityType:"proposal",entityUuid:a.uuid,subEntityType:"draft",subEntityUuid:b.uuid,badgeInside:!0,children:(0,e.jsx)(C,{task:b,expanded:x.has(c),onToggle:()=>{y(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}})},b.uuid))}),"dag"===z&&(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsx)(v._u,{tasks:H,edges:I,readonly:!0,height:J,onNodeClick:c})})]}),0===s.length&&0===t.length&&0===B.length&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground italic",children:k("emptyContainer")})]})}let E={open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",assigned:"border-[#1976D2] bg-[#1976D2]",in_progress:"border-[#5A9E6F] bg-[#5A9E6F]",to_verify:"border-[#7B1FA2] bg-[#7B1FA2]",done:"border-[#00796B] bg-[#00796B]",closed:"border-[#9A9A9A] bg-[#9A9A9A] dark:border-[#6b6862] dark:bg-[#6b6862]"},F={open:null,assigned:null,in_progress:{className:"bg-[#E8F5E9] dark:bg-[#14281a] text-[#5A9E6F] dark:text-[#6FD19A]",key:"inProgress"},to_verify:{className:"bg-[#F3E5F5] dark:bg-[#281630] text-[#7B1FA2] dark:text-[#C98FE0]",key:"toVerify"},done:{className:"bg-[#E0F2F1] dark:bg-[#12292a] text-[#00796B] dark:text-[#4FD1C0]",key:"done"},closed:{className:"bg-[#F5F5F5] dark:bg-[#1e1e20] text-muted-foreground",key:"done"}};function C({task:a,expanded:b,onToggle:c,onNavigate:d,taskStatus:f}){let h=(0,g.c)("proposals"),i=(0,g.c)("acceptanceCriteria"),j=(0,g.c)("status"),k=a.acceptanceCriteriaItems||[],p=!!(a.description||k.length>0),r=f?E[f]||E.open:"border-[#D9D9D9] dark:border-[#3a3a40] bg-card",s=f?F[f]:null,t=(0,e.jsx)("span",{className:`shrink-0 h-2 w-2 rounded-full border-[1.5px] ${r} transition-colors`}),u=(0,e.jsx)("span",{className:"flex-1 min-w-0 text-[13px] leading-snug truncate text-muted-foreground",children:a.title}),v=s?(0,e.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium ${s.className}`,children:j(s.key)}):null;return d?(0,e.jsxs)(q.$,{variant:"ghost",onClick:d,className:"w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg transition-colors",children:[(0,e.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}):(0,e.jsxs)("div",{children:[(0,e.jsxs)(q.$,{variant:"ghost",onClick:p?c:void 0,className:`w-full justify-start h-auto text-left flex items-center gap-2.5 py-4 ${p?"cursor-pointer hover:bg-background -mx-1 px-1 rounded-lg":""} transition-colors`,children:[b?(0,e.jsx)(n.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,e.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),t,u,v]}),b&&p&&(0,e.jsxs)("div",{className:"pb-3 pl-5 space-y-3",children:[a.description&&(0,e.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:a.description}),k.length>0&&(0,e.jsxs)("div",{className:"rounded-lg bg-background p-3 space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,e.jsx)("span",{className:"text-[11px] font-semibold text-foreground",children:h("taskAcceptanceCriteria")})]}),(0,e.jsx)("div",{className:"space-y-1.5",children:k.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-[11px] leading-snug text-foreground/80 flex-1",children:a.description}),!1!==a.required&&(0,e.jsx)("span",{className:"shrink-0 text-[10px] font-medium text-[#E65100] dark:text-[#F0A050]",children:i("required")})]},b))})]})]})]})}d()}catch(a){d(a)}})},69815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{p:()=>n});var e=c(10837),f=c(9222),g=c(80251),h=c(6871),i=c(2852),j=c(99127),k=c(68797),l=c(7086),m=a([k]);function n({assignee:a,onReassign:b,editable:c}){let d=(0,f.c)("common"),m=!0===c&&"function"==typeof b,n=d(a?"reassign":"assign"),o=a?(0,e.jsxs)(e.Fragment,{children:[(0,l.bB)(a)?(0,e.jsx)(h.AgentAvatar,{name:a.name,size:28,className:"rounded-full"}):(0,e.jsx)(g.eu,{className:"h-7 w-7",children:(0,e.jsx)(g.q5,{className:"bg-border text-muted-foreground",children:a.name.charAt(0).toUpperCase()})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.name}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:d((0,l.bB)(a)?"agent":"user")}),"agent_instance"===a.type&&a.instance&&(0,e.jsx)("div",{className:"mt-1",children:(0,e.jsx)(k.jQ,{cwd:a.instance.cwd,host:a.instance.host})})]})]}):(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:d("unassigned")}),p="mt-2 flex items-center gap-2.5 rounded-lg bg-background p-3";return(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:d("assignee")}),m?(0,e.jsx)(j.Bc,{delayDuration:300,children:(0,e.jsxs)(j.m_,{children:[(0,e.jsx)(j.k$,{asChild:!0,children:(0,e.jsx)("button",{type:"button",onClick:b,"aria-label":n,className:`${p} w-full cursor-pointer text-left`,children:o})}),(0,e.jsx)(j.ZI,{children:n})]})}):(0,e.jsx)("div",{className:p,children:o})]})}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},72229:(a,b,c)=>{c.d(b,{b:()=>j});var d=c(21968),e=c(16551),f=c(10837),g="horizontal",h=["horizontal","vertical"],i=d.forwardRef((a,b)=>{var c;let{decorative:d,orientation:i=g,...j}=a,k=(c=i,h.includes(c))?i:g;return(0,f.jsx)(e.sG.div,{"data-orientation":k,...d?{role:"none"}:{"aria-orientation":"vertical"===k?k:void 0,role:"separator"},...j,ref:b})});i.displayName="Separator";var j=i},74733:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(56556).A)("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]])},79030:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(10837),e=c(96307);function f({done:a,total:b,size:c=14,stroke:f=2,className:g,color:h="#B26B3D",trackColor:i="#EAD9C8"}){let j=(c-f)/2,k=2*Math.PI*j,l=b>0?Math.min(1,Math.max(0,a/b)):0;return(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,className:(0,e.cn)("shrink-0",g),role:"img","aria-label":`${a}/${b}`,children:[(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:i,strokeWidth:f}),l>0&&(0,d.jsx)("circle",{cx:c/2,cy:c/2,r:j,fill:"none",stroke:b>0&&a>=b?"#1D9E75":h,strokeWidth:f,strokeDasharray:k,strokeDashoffset:k*(1-l),strokeLinecap:"round",transform:`rotate(-90 ${c/2} ${c/2})`})]})}},84722:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{G:()=>q});var e=c(10837),f=c(9222),g=c(86460),h=c(16235),i=c(2852),j=c(84819),k=c(25525),l=c(97450),m=c(31009),n=c(45148),o=c(69815),p=a([l,o]);function q({idea:a,elaboration:b,isLoading:c,onRefresh:d,onReassign:p,canReassign:q}){let r=(0,f.c)("ideaTracker"),s=(0,f.c)("common");return c?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsx)(g.A,{className:"h-5 w-5 animate-spin text-primary"})}):(0,e.jsxs)(m.P.div,{variants:n.qG,initial:"initial",animate:"animate",children:[(0,e.jsx)(o.p,{assignee:a.assignee,onReassign:p,editable:q}),(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),b&&b.rounds.length>0?(0,e.jsx)("div",{children:(0,e.jsx)(k.R,{ideaUuid:a.uuid,elaboration:b,onRefresh:d})}):"open"===a.status?(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF3E0] dark:bg-[#3a2a12]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#E65100] dark:text-[#F0A050]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationNotStarted")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationNotStartedDesc")})]})]}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[(0,e.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-[#E3F2FD] dark:bg-[#13253a]",children:(0,e.jsx)(h.A,{className:"h-5 w-5 text-[#1976D2] dark:text-[#5AA9F0]"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("panel.elaborationWaiting")}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r("panel.elaborationWaitingDesc")})]})]}),a.content&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(j.Separator,{className:"my-5 bg-secondary"}),(0,e.jsxs)("div",{children:[(0,e.jsx)(i.J,{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("content")}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)("div",{className:"prose prose-sm max-w-none text-[13px] leading-relaxed text-foreground",children:(0,e.jsx)(l.MarkdownContent,{children:a.content})})})]})]})]})}[l,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},87034:(a,b,c)=>{c.d(b,{Q:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40f71cbfef2707e32c995692457638015649a998b5",d.callServer,void 0,d.findSourceMapURL,"getTaskAction")},98310:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{K:()=>q});var e=c(10837),f=c(21968),g=c(9222),h=c(35209),i=c(10694),j=c(42424),k=c(49599),l=c(74645),m=c(97450),n=c(55183),o=c(77521),p=a([m]);function q({title:a,type:b,content:c,mode:d="overlay",onClose:p,onBack:q}){let r=(0,g.c)("documents"),[s,t]=(0,f.useState)(!1),u="sidebyside"===d;return(0,e.jsxs)(e.Fragment,{children:[!u&&(0,e.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:p}),(0,e.jsxs)("div",{className:`fixed top-14 md:top-0 flex h-[calc(100%-3.5rem)] md:h-full w-full md:w-[480px] flex-col bg-card shadow-xl border-l border-border ${u?`z-40 ${s?"":"animate-in slide-in-from-right duration-300"}`:`z-50 right-0 ${s?"":"animate-in slide-in-from-right duration-300"}`}`,style:u?{right:`${o.L8}px`}:void 0,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-secondary px-6 py-5",children:[q&&(0,e.jsx)(j.$,{variant:"ghost",size:"icon",className:"mr-2 h-8 w-8 shrink-0",onClick:q,children:(0,e.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h2",{className:"text-base font-semibold text-foreground truncate",children:a}),(0,e.jsx)("div",{className:"mt-1.5",children:(0,e.jsx)(k.E,{variant:"outline",className:"text-[10px] font-medium border-border text-muted-foreground bg-secondary px-2 py-0.5 font-mono",children:r(n.y[b]||"typeOther")})})]}),(0,e.jsx)(j.$,{variant:"outline",size:"icon",className:"ml-4 h-8 w-8 shrink-0 border-border",onClick:p,children:(0,e.jsx)(i.A,{className:"h-4 w-4 text-muted-foreground"})})]}),(0,e.jsx)(l.F,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:(0,e.jsx)("div",{className:"px-6 py-5 text-[13px] leading-relaxed text-foreground prose prose-sm max-w-none [&_h1]:text-lg [&_h1]:font-semibold [&_h1]:mt-4 [&_h1]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1.5 [&_h3]:text-sm [&_h3]:font-medium [&_h3]:mt-2 [&_h3]:mb-1 [&_p]:text-[13px] [&_p]:text-foreground/80 [&_p]:my-1.5 [&_li]:text-[13px] [&_li]:text-foreground/80 [&_ul]:my-1 [&_ol]:my-1 [&_strong]:text-foreground [&_code]:text-[12px] [&_code]:bg-secondary [&_code]:text-foreground [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_pre]:bg-secondary [&_pre]:text-foreground [&_pre]:p-3 [&_pre]:rounded-lg [&_pre]:my-2 [&_a]:text-primary",children:(0,e.jsx)(m.MarkdownContent,{children:(0,n.j)(c)})})})]})]})}m=(p.then?(await p)():p)[0],d()}catch(a){d(a)}})},99201:(a,b,c)=>{c.d(b,{p:()=>s});var d=c(10837),e=c(21968),f=c(9222),g=c(5797);let h=(0,c(56556).A)("message-square-text",[["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"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]);var i=c(21289),j=c(51592),k=c(65956),l=c(20447),m=c(9810),n=c(90856),o=c(21790),p=c(49102),q=c(42377);q.callServer,q.findSourceMapURL;var r=c(77521);function s({idea:a,proposals:b,tasks:c,onSelectTask:q}){let s=(0,f.c)("ideaTracker"),t=(0,f.c)(),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(new Set),y=(0,e.useMemo)(()=>"open"===a.status?"idea_created":"elaborating"===a.status||0===b.length?"elaboration":b.some(a=>"approved"===a.status)&&c.length>0?"tasks":"proposal",[a.status,b,c]),z=(0,e.useMemo)(()=>{let a=["idea_created","elaboration","proposal","tasks"],b=a.indexOf(y);return a.map((a,c)=>({id:a,labelKey:({idea_created:"panel.timeline.ideaCreated",elaboration:"panel.timeline.elaboration",proposal:"panel.timeline.proposal",tasks:"panel.timeline.tasksProgress"})[a],status:c<b?"completed":c===b?"active":"upcoming",icon:({idea_created:(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"}),elaboration:(0,d.jsx)(h,{className:"h-3.5 w-3.5"}),proposal:(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"}),tasks:(0,d.jsx)(j.A,{className:"h-3.5 w-3.5"})})[a]}))},[y]),A=(0,e.useCallback)(a=>{x(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),B=(0,e.useMemo)(()=>"open"===a.status?s("panel.timeline.noElaboration"):"skipped"===a.elaborationStatus?s("panel.timeline.elaborationSkipped"):"resolved"===a.elaborationStatus&&u?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):"elaborating"===a.status?s("panel.timeline.elaborationInProgress"):u&&u.summary.totalQuestions>0?s("panel.timeline.elaborationComplete",{count:u.summary.totalQuestions}):s("panel.timeline.noElaboration"),[a.status,a.elaborationStatus,u,s]),C=(0,e.useMemo)(()=>{if(0===b.length)return s("panel.timeline.noProposal");let a=b.filter(a=>"approved"===a.status).length,c=b.filter(a=>"pending"===a.status).length;if(a>0&&1===b.length)return s("panel.timeline.proposalApproved");if(a>0)return s("panel.timeline.proposalsApproved",{count:a,total:b.length});if(c>0)return s("panel.timeline.proposalPending");switch(b[0].status){case"draft":default:return s("panel.timeline.proposalDraft");case"rejected":return s("panel.timeline.proposalRejected")}},[b,s]),D=(0,e.useMemo)(()=>{let a=0,c=0;for(let d of b)a+=d.documentDrafts?.length??0,c+=d.taskDrafts?.length??0;return{docCount:a,taskDraftCount:c}},[b]),E=(0,e.useMemo)(()=>{let a=c.filter(a=>"done"===a.status||"closed"===a.status).length,b=c.filter(a=>"in_progress"===a.status).length;return{done:a,inProgress:b,toVerify:c.filter(a=>"to_verify"===a.status).length,open:c.filter(a=>"open"===a.status||"assigned"===a.status).length,total:c.length}},[c]);return(0,d.jsx)("div",{className:"space-y-0",children:z.map((e,f)=>{let g=w.has(e.id),h=f===z.length-1;return(0,d.jsxs)("div",{className:"flex gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center w-5 shrink-0",children:[(0,d.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-[#E0F2F1] dark:bg-[#12292a] flex items-center justify-center",children:(0,d.jsx)(m.A,{className:"h-3 w-3 text-[#00796B] dark:text-[#4FD1C0]"})}):"active"===e.status?(0,d.jsx)("div",{className:"h-5 w-5 rounded-full bg-primary flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 fill-white text-white"})}):(0,d.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-dashed border-[#D9D9D9] dark:border-[#3a3a40] flex items-center justify-center",children:(0,d.jsx)(n.A,{className:"h-2 w-2 text-muted-foreground"})})}),!h&&(0,d.jsx)("div",{className:"flex-1 w-px bg-border mt-1 min-h-[8px]"})]}),(0,d.jsxs)("div",{className:`flex-1 min-w-0 ${h?"pb-0":"pb-4"}`,children:[(0,d.jsxs)("button",{onClick:()=>A(e.id),className:"flex items-center gap-1.5 w-full text-left group cursor-pointer",children:[g?(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,d.jsx)("span",{className:`text-[13px] font-medium ${"active"===e.status?"text-primary":"completed"===e.status?"text-foreground":"text-muted-foreground"}`,children:s(e.labelKey)}),!g&&(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground truncate ml-1",children:(b=>{switch(b.id){case"idea_created":return a.createdBy?a.createdBy.name:"";case"elaboration":return B;case"proposal":return C;case"tasks":return c.length>0?s("panel.timeline.tasksComplete",{done:E.done,total:E.total}):s("panel.timeline.noTasks");default:return""}})(e)})]}),(e=>{let f=w.has(e.id);switch(e.id){case"idea_created":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[a.createdBy&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.createdBy",{name:a.createdBy.name})}),(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:(0,r.fw)(a.createdAt,t)}),a.content&&(0,d.jsxs)("p",{className:"text-[12px] text-muted-foreground line-clamp-2",children:[a.content.slice(0,120),a.content.length>120?"...":""]})]}):null;case"elaboration":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:B}),u&&u.rounds.length>0&&(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.rounds",{count:u.rounds.length})})]}):null;case"proposal":return f?(0,d.jsxs)("div",{className:"mt-2 space-y-1.5",children:[(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:C}),b.length>0&&(0,d.jsxs)("div",{className:"space-y-1",children:[D.docCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(k.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.documents",{count:D.docCount})})]}),D.taskDraftCount>0&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"h-3 w-3"}),(0,d.jsx)("span",{children:s("panel.timeline.tasks",{count:D.taskDraftCount})})]})]})]}):null;case"tasks":return f?(0,d.jsx)("div",{className:"mt-2 space-y-2",children:0===c.length?(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:s("panel.timeline.noTasks")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex-1 h-1.5 rounded-full bg-[#F0EDE8] dark:bg-[#1f1e1c] overflow-hidden flex",children:[E.done>0&&(0,d.jsx)("div",{className:"h-full bg-[#00796B]",style:{width:`${E.done/E.total*100}%`}}),E.inProgress>0&&(0,d.jsx)("div",{className:"h-full bg-[#1976D2]",style:{width:`${E.inProgress/E.total*100}%`}}),E.toVerify>0&&(0,d.jsx)("div",{className:"h-full bg-[#7B1FA2]",style:{width:`${E.toVerify/E.total*100}%`}})]}),(0,d.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:s("panel.timeline.tasksComplete",{done:E.done,total:E.total})})]}),(0,d.jsxs)("div",{className:"space-y-1",children:[c.slice(0,5).map(a=>(0,d.jsxs)("button",{onClick:()=>q(a.uuid),className:"flex items-center gap-2 w-full text-left rounded-md px-2 py-1.5 hover:bg-secondary transition-colors group cursor-pointer",children:[(0,d.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground shrink-0 group-hover:text-primary"}),(0,d.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${(0,r.eT)(a.status)}`}),(0,d.jsx)("span",{className:"flex-1 text-[12px] text-foreground truncate group-hover:text-primary",children:a.title})]},a.uuid)),c.length>5&&(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground px-2",children:s("panel.timeline.moreItems",{count:c.length-5})})]})]})}):null;default:return null}})(e)]})]},e.id)})})}},99923:(a,b,c)=>{c.d(b,{c:()=>e});var d=c(42377);let e=(0,d.createServerReference)("40b4a0e98175441ca9bd980463fa7fedeb7b8a7e1a",d.callServer,void 0,d.findSourceMapURL,"getIdeaAction")}};