tower-studio 0.2.36 → 0.2.38

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 (206) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +26 -26
  13. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  34. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +61 -61
  35. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  38. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +26 -26
  39. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  42. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +26 -26
  43. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  46. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +43 -43
  47. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +97 -97
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +84 -84
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +71 -71
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +72 -72
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +26 -26
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +70 -70
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +81 -81
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  78. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +46 -46
  79. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  82. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
  83. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05nz.tg._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~foo~5._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-tolks._.js +2 -2
  92. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__046-2.-._.js +3 -0
  93. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0bsx096._.js → [root-of-the-server]__04p5fnx._.js} +2 -2
  94. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__062b.yt._.js +2 -2
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__093tt4a._.js +2 -2
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bgr0ql._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pa9_bd._.js → [root-of-the-server]__0dixwk_._.js} +2 -2
  100. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0guqcva._.js +2 -2
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +1 -1
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vv4hxw._.js → [root-of-the-server]__0i97rbw._.js} +2 -2
  103. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__13~k9z5._.js → [root-of-the-server]__0mbvmq1._.js} +2 -2
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p0te97._.js +2 -2
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0iatlhd._.js → [root-of-the-server]__0rlar2j._.js} +2 -2
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0siyg1p._.js +2 -2
  108. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t6f4lq._.js +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0th-t1a._.js +2 -2
  110. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/_00t6138._.js +2 -2
  113. package/.next/standalone/.next/server/chunks/ssr/{_0mhdb-a._.js → _00vn2qb._.js} +2 -2
  114. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  115. package/.next/standalone/.next/server/chunks/ssr/_07_.oek._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/ssr/{_0zidle2._.js → _09j.h2h._.js} +2 -2
  117. package/.next/standalone/.next/server/chunks/ssr/_09ri_be._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/_0_q.4.i._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/_0cxhub8._.js +2 -2
  121. package/.next/standalone/.next/server/chunks/ssr/{_0ebel46._.js → _0ght75u._.js} +2 -2
  122. package/.next/standalone/.next/server/chunks/ssr/_0hh17jg._.js +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/{_0izxa9k._.js → _0j84cn0._.js} +2 -2
  124. package/.next/standalone/.next/server/chunks/ssr/_0mpce0d._.js +2 -2
  125. package/.next/standalone/.next/server/chunks/ssr/_0muaopo._.js +2 -2
  126. package/.next/standalone/.next/server/chunks/ssr/_0n1l7yo._.js +2 -2
  127. package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/_0no6nrx._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/ssr/{_0xx4aa5._.js → _0qkt.3y._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/{_0jf91oa._.js → _0t53a7_._.js} +3 -3
  132. package/.next/standalone/.next/server/chunks/ssr/_0vqyl_~._.js +3 -0
  133. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/ssr/{_0soj-y2._.js → _13glpna._.js} +2 -2
  135. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  137. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  147. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  148. package/.next/standalone/.next/server/pages/500.html +1 -1
  149. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/server-reference-manifest.json +215 -215
  151. package/.next/standalone/.next/static/chunks/0.nk_89kz3j6c.js +1 -0
  152. package/.next/standalone/.next/static/chunks/01.g0gvh6h11a.js +2 -0
  153. package/.next/standalone/.next/static/chunks/03zzmb3y7kpxl.js +1 -0
  154. package/.next/standalone/.next/static/chunks/04t77qlr4-sw7.js +1 -0
  155. package/.next/standalone/.next/static/chunks/097rglx2_e2oo.js +1 -0
  156. package/.next/standalone/.next/static/chunks/{0xy8x3-.0bopl.js → 0a234qgxmvbfu.js} +1 -1
  157. package/.next/standalone/.next/static/chunks/{01tsz1~lswudb.js → 0bsigqvr2-qcp.js} +1 -1
  158. package/.next/standalone/.next/static/chunks/{0m_l01d2lzffq.js → 0c0u4it7gyb1..js} +1 -1
  159. package/.next/standalone/.next/static/chunks/0dt3ljzz2pz0r.css +1 -0
  160. package/.next/standalone/.next/static/chunks/{188_7xt~9qo5z.js → 0jlzko424.5et.js} +1 -1
  161. package/.next/standalone/.next/static/chunks/{0xc5b.xin3frr.js → 0khxfvo-tgpbc.js} +1 -1
  162. package/.next/standalone/.next/static/chunks/0nfwp8f87wok1.js +1 -0
  163. package/.next/standalone/.next/static/chunks/0qu5zm6k.e_de.js +5 -0
  164. package/.next/standalone/.next/static/chunks/0rbykdrqih-0t.js +1 -0
  165. package/.next/standalone/.next/static/chunks/{0n9bv.-ktyu9g.js → 0w7_~s93hxxkk.js} +1 -1
  166. package/.next/standalone/.next/static/chunks/0wbzgoyu4~g4x.js +1 -0
  167. package/.next/standalone/.next/static/chunks/{0odml~1zfmatg.js → 0yl2smjfz2bzk.js} +1 -1
  168. package/.next/standalone/.next/static/chunks/{06pdwir_r4uhn.js → 10q75vl~mg7vy.js} +1 -1
  169. package/.next/standalone/.next/static/chunks/11pivwhywsmj9.js +1 -0
  170. package/.next/standalone/.next/static/chunks/{0m5kd96epukmx.js → 13ipvyn1q8z4y.js} +1 -1
  171. package/.next/standalone/.next/static/chunks/13qts-1uv7-ee.js +1 -0
  172. package/.next/standalone/.next/static/chunks/14bii1nj2yewi.js +1 -0
  173. package/.next/standalone/.next/static/chunks/14man4i21otxe.js +1 -0
  174. package/.next/standalone/.next/static/chunks/{0p0_.0f~k5o3x.js → 151eqj4g7bidp.js} +1 -1
  175. package/.next/standalone/.next/static/chunks/15_ulpp1r-6ra.js +1 -0
  176. package/.next/standalone/.next/static/chunks/15~2jg4z8h54~.js +1 -0
  177. package/.next/standalone/.next/static/chunks/{02_isu4z4lk1~.js → 17ldo-bezxis..js} +1 -1
  178. package/.next/standalone/.next/static/chunks/{0ntang9wkuj-8.js → 183k6undfylp5.js} +1 -1
  179. package/.next/standalone/package.json +2 -2
  180. package/package.json +2 -2
  181. package/scripts/migrations/0002-backfill-done-at.ts +29 -0
  182. package/skills/tower/SKILL.md +81 -2
  183. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10xjtl0._.js +0 -3
  184. package/.next/standalone/.next/server/chunks/ssr/_0.7vx4q._.js +0 -3
  185. package/.next/standalone/.next/server/chunks/ssr/_0gc019m._.js +0 -3
  186. package/.next/standalone/.next/server/chunks/ssr/_0m_1ssw._.js +0 -3
  187. package/.next/standalone/.next/server/chunks/ssr/_0nghgzi._.js +0 -3
  188. package/.next/standalone/.next/server/chunks/ssr/_0reranf._.js +0 -3
  189. package/.next/standalone/.next/static/chunks/0-fc2i1mw_t-2.js +0 -2
  190. package/.next/standalone/.next/static/chunks/0.7r6od5..1~d.css +0 -1
  191. package/.next/standalone/.next/static/chunks/0.duc36elgwmt.js +0 -1
  192. package/.next/standalone/.next/static/chunks/093zwcwn8el.s.js +0 -1
  193. package/.next/standalone/.next/static/chunks/0gx4n5njdyksz.js +0 -1
  194. package/.next/standalone/.next/static/chunks/0l49-stccar4a.js +0 -1
  195. package/.next/standalone/.next/static/chunks/0l~z-vsf.633k.js +0 -5
  196. package/.next/standalone/.next/static/chunks/0m_9-3_hpbfly.js +0 -1
  197. package/.next/standalone/.next/static/chunks/0sm78n1ikzixj.js +0 -1
  198. package/.next/standalone/.next/static/chunks/0v73i.x591~km.js +0 -1
  199. package/.next/standalone/.next/static/chunks/0wkd~xb2skr1g.js +0 -1
  200. package/.next/standalone/.next/static/chunks/0xyj_-7b.4l1l.js +0 -1
  201. package/.next/standalone/.next/static/chunks/10f-2fo.qg504.js +0 -1
  202. package/.next/standalone/.next/static/chunks/11p_dl5tngif4.js +0 -1
  203. package/.next/standalone/.next/static/chunks/153-zn4e8fta1.js +0 -1
  204. /package/.next/standalone/.next/static/{SCktqI1yaRGMJYovFwj4q → 08PQLn-tnfP4XX6HBzxZ7}/_buildManifest.js +0 -0
  205. /package/.next/standalone/.next/static/{SCktqI1yaRGMJYovFwj4q → 08PQLn-tnfP4XX6HBzxZ7}/_clientMiddlewareManifest.js +0 -0
  206. /package/.next/standalone/.next/static/{SCktqI1yaRGMJYovFwj4q → 08PQLn-tnfP4XX6HBzxZ7}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},732179,246025,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40744ed3c17602f30e1df64a1ea0d8368af7bd224c",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],732179);let r=(0,t.createServerReference)("40effa36b2c8877c59eaceb39025dce4844df564de",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],246025)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},715443,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4044480c2820912250aa5e72984e1e2006506180c4",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}])},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},456346,75896,72609,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("405dda82de054a22fa6f48d7a303a6399f1f1ea165",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],75896);let s=(0,a.createServerReference)("40445148acbf903a1eb13a7785977e49ed766bb8bb",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],72609)},623706,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40df13f09c67846d69939bdf708fb29fea1275139b",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},192551,802380,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("404268743695e9bb2522c2739b49209f98a0e6c410",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],192551);let r=(0,t.createServerReference)("40bc08544885636f5a33a149f2ca4aa39d638cd7ad",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],802380)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(280027),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(75896),g=e.i(72609),f=e.i(514798);let b=(0,f.createServerReference)("40fddb22bbbfdcde5c0c57a5ab4aea8886d8cebef8",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(715443);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let M,[E,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:E,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(M=T.find(e=>e.id===ee))?M.isCurrent?`${M.number} \xb7 ${M.name} \xb7 ${ea("version.currentShort")}`:`${M.number} \xb7 ${M.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{E.trim()&&(er&&j?j(w.id,{title:E,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:E,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,M=D?p.length:0,E=M>0?Math.ceil(M/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,M),$=E>1,B=D&&L>0,A=D&&L<E-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,M-1))},[D,A,f,L,M]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,552961,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("40d4947da4af538751a36db357c67231410622b977",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],552961)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(623706),c=e.i(552961),d=e.i(119063),u=e.i(192551),x=e.i(802380),m=e.i(732179),h=e.i(246025),p=e.i(613585),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),M=e.i(297338),E=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:B,taskId:A}){let{t:F}=(0,i.useI18n)(),[U,_]=(0,a.useState)(null),[z,H]=(0,a.useTransition)(),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)([]),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)(null),[Q,Z]=(0,a.useState)([]),[ee,et]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!A||!e){_(null),J([]),Z([]);return}(0,u.getTaskNotes)(A).then(e=>J(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>J([])),(0,x.getTaskAssets)(A).then(e=>Z(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>Z([])),H(async()=>{let e=await (0,c.getTaskOverview)(A);e&&(_(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{Y(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>Y([])))})},[A,e]);let ea=U?j.BOARD_COLUMNS.find(e=>e.id===U.status):null,er=U?j.PRIORITY_CONFIG[U.priority]:null,es=U?.executions?.[0]??null,en=(()=>{if(es?.worktreePath)return es.worktreePath;let e=U?.project?.localPath;return e?U?.subPath?`${e}/${U.subPath}`:e:null})(),el=(()=>{let e=es?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ei=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),eo=e=>{ei(e)?et(e):O.toast.info(F("assets.previewNotSupported"))},ec=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||F("git.openInFileManagerFailed"))}}catch{O.toast.error(F("git.openInFileManagerFailed"))}},ed=ee?(0,y.isImageAsset)(ee.filename,ee.mimeType)?"image":$.test(ee.filename)?"text":null:null,eu=Q.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),ex=ee?eu.findIndex(e=>e.id===ee.id):-1,em=async e=>{if(U?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:U.project.id}),O.toast.success(F("taskDrawer.duplicateSuccess")),G(!1),B(!1)}catch{O.toast.error(F("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:B,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:U?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:F("taskDrawer.title")}),U&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[ea&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${ea.color}`}),ea.label]}),er&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${er.color}`,children:er.label}),U.version&&(0,t.jsx)(R.TaskVersionTag,{number:U.version.number,name:U.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:z&&!U?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:F("assets.loading")}):U?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:F("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:U.description||F("taskDrawer.noDescription")})]}),U.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:F("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:U.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:F("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(U.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),F("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:U._count.assets})]}),Q.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:Q.map(e=>{var a;let r=ei(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(M.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>eo(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?F("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eo(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:F("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ec(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:F("assets.revealInFinder"),children:(0,t.jsx)(E.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),F("taskDrawer.notes")]}),X.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:X.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>q(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:F("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:F("taskDrawer.fileChanges")}),el?(0,t.jsx)(L,{added:el.added,removed:el.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),F("taskDrawer.lastExecution")]}),es?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:es.status}),es.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:es.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noExecution")})]}),en&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(en)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(F("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(en)}catch(e){console.error("openInEditor failed:",e),O.toast.error(F("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(en)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(F("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{U&&G(!0)},disabled:!U,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),F("taskDrawer.duplicate")]})})]}):null})]}),U?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:V,onOpenChange:G,onSubmit:em,labels:W,projectType:U.project.type,projectLocalPath:U.project.localPath,prefillFromTask:{title:U.title,description:U.description,priority:U.priority,subPath:U.subPath,labelIds:U.labels.map(e=>e.label.id),baseBranch:U.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:K,open:null!==K,onOpenChange:e=>{e||q(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ed&&ex>=0?eu[ex].url:null,filename:"image"===ed&&ex>=0?eu[ex].filename:"",open:"image"===ed,onOpenChange:e=>{e||et(null)},assets:eu.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:ex>=0?ex:void 0,onIndexChange:e=>{let t=eu[e];if(!t)return;let a=Q.find(e=>e.id===t.id);a&&et(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ed&&ee?(0,y.localPathToApiUrl)(ee.path):null,filename:ee?.filename??"",open:"text"===ed,onOpenChange:e=>{e||et(null)}})]})}],605005)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69466,e=>{"use strict";e.s([],386333),e.i(386333),e.i(546149),e.i(297282),e.i(70309),e.i(869124),e.i(872613),e.i(476463),e.i(909043),e.i(719414),e.i(556437),e.i(975138);var i=e.i(514798);let r=(0,i.createServerReference)("609d49fcf34b582aa5977f0ab9c1e300e1f0bcb2db",i.callServer,void 0,i.findSourceMapURL,"revealInFinder");e.s(["revealInFinder",0,r],69466)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,715443,e=>{"use strict";var c=e.i(514798);let r=(0,c.createServerReference)("4044480c2820912250aa5e72984e1e2006506180c4",c.callServer,void 0,c.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,r])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},732179,246025,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40744ed3c17602f30e1df64a1ea0d8368af7bd224c",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],732179);let r=(0,t.createServerReference)("40effa36b2c8877c59eaceb39025dce4844df564de",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],246025)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},715443,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("4044480c2820912250aa5e72984e1e2006506180c4",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}])},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},623706,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40df13f09c67846d69939bdf708fb29fea1275139b",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},192551,802380,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("404268743695e9bb2522c2739b49209f98a0e6c410",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],192551);let r=(0,t.createServerReference)("40bc08544885636f5a33a149f2ca4aa39d638cd7ad",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],802380)},456346,75896,72609,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("405dda82de054a22fa6f48d7a303a6399f1f1ea165",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],75896);let s=(0,a.createServerReference)("40445148acbf903a1eb13a7785977e49ed766bb8bb",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],72609)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(280027),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(75896),g=e.i(72609),f=e.i(514798);let b=(0,f.createServerReference)("40fddb22bbbfdcde5c0c57a5ab4aea8886d8cebef8",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(715443);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let M,[E,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:E,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(M=T.find(e=>e.id===ee))?M.isCurrent?`${M.number} \xb7 ${M.name} \xb7 ${ea("version.currentShort")}`:`${M.number} \xb7 ${M.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{E.trim()&&(er&&j?j(w.id,{title:E,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:E,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,M=D?p.length:0,E=M>0?Math.ceil(M/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,M),$=E>1,B=D&&L>0,A=D&&L<E-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,M-1))},[D,A,f,L,M]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘","任务笔记","经验洞见"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},980376,552961,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("40d4947da4af538751a36db357c67231410622b977",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],552961)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(623706),c=e.i(552961),d=e.i(119063),u=e.i(192551),x=e.i(802380),m=e.i(732179),h=e.i(246025),p=e.i(613585),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),M=e.i(297338),E=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:B,taskId:A}){let{t:F}=(0,i.useI18n)(),[U,_]=(0,a.useState)(null),[z,H]=(0,a.useTransition)(),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)([]),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)(null),[Q,Z]=(0,a.useState)([]),[ee,et]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!A||!e){_(null),J([]),Z([]);return}(0,u.getTaskNotes)(A).then(e=>J(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>J([])),(0,x.getTaskAssets)(A).then(e=>Z(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>Z([])),H(async()=>{let e=await (0,c.getTaskOverview)(A);e&&(_(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{Y(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>Y([])))})},[A,e]);let ea=U?j.BOARD_COLUMNS.find(e=>e.id===U.status):null,er=U?j.PRIORITY_CONFIG[U.priority]:null,es=U?.executions?.[0]??null,en=(()=>{if(es?.worktreePath)return es.worktreePath;let e=U?.project?.localPath;return e?U?.subPath?`${e}/${U.subPath}`:e:null})(),el=(()=>{let e=es?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ei=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),eo=e=>{ei(e)?et(e):O.toast.info(F("assets.previewNotSupported"))},ec=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||F("git.openInFileManagerFailed"))}}catch{O.toast.error(F("git.openInFileManagerFailed"))}},ed=ee?(0,y.isImageAsset)(ee.filename,ee.mimeType)?"image":$.test(ee.filename)?"text":null:null,eu=Q.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),ex=ee?eu.findIndex(e=>e.id===ee.id):-1,em=async e=>{if(U?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:U.project.id}),O.toast.success(F("taskDrawer.duplicateSuccess")),G(!1),B(!1)}catch{O.toast.error(F("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:B,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:U?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:F("taskDrawer.title")}),U&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[ea&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${ea.color}`}),ea.label]}),er&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${er.color}`,children:er.label}),U.version&&(0,t.jsx)(R.TaskVersionTag,{number:U.version.number,name:U.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:z&&!U?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:F("assets.loading")}):U?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:F("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:U.description||F("taskDrawer.noDescription")})]}),U.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:F("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:U.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:F("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(U.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),F("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:U._count.assets})]}),Q.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:Q.map(e=>{var a;let r=ei(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(M.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>eo(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?F("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eo(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:F("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ec(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:F("assets.revealInFinder"),children:(0,t.jsx)(E.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),F("taskDrawer.notes")]}),X.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:X.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>q(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:F("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:F("taskDrawer.fileChanges")}),el?(0,t.jsx)(L,{added:el.added,removed:el.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),F("taskDrawer.lastExecution")]}),es?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:es.status}),es.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:es.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:F("taskDrawer.noExecution")})]}),en&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(en)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(F("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(en)}catch(e){console.error("openInEditor failed:",e),O.toast.error(F("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(en)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(F("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),F("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{U&&G(!0)},disabled:!U,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),F("taskDrawer.duplicate")]})})]}):null})]}),U?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:V,onOpenChange:G,onSubmit:em,labels:W,projectType:U.project.type,projectLocalPath:U.project.localPath,prefillFromTask:{title:U.title,description:U.description,priority:U.priority,subPath:U.subPath,labelIds:U.labels.map(e=>e.label.id),baseBranch:U.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:K,open:null!==K,onOpenChange:e=>{e||q(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ed&&ex>=0?eu[ex].url:null,filename:"image"===ed&&ex>=0?eu[ex].filename:"",open:"image"===ed,onOpenChange:e=>{e||et(null)},assets:eu.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:ex>=0?ex:void 0,onIndexChange:e=>{let t=eu[e];if(!t)return;let a=Q.find(e=>e.id===t.id);a&&et(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ed&&ee?(0,y.localPathToApiUrl)(ee.path):null,filename:ee?.filename??"",open:"text"===ed,onOpenChange:e=>{e||et(null)}})]})}],605005)}]);