tower-studio 0.2.32 → 0.2.33

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 (182) 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 +30 -30
  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/browse-fs/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  18. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +67 -67
  19. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  22. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +30 -30
  23. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  26. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +30 -30
  27. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  30. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +47 -47
  31. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  34. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +86 -86
  35. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  38. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +84 -84
  39. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  42. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +64 -64
  43. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  46. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +63 -63
  47. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +30 -30
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +66 -66
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +81 -81
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  62. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +50 -50
  63. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
  66. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0122.hq._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0clvf~t._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gk6ftq._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kay2~d._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
  73. package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
  75. package/.next/standalone/.next/server/chunks/src_lib_0aowbzy._.js +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  77. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01pn3ol._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02p4lry._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dzfucv._.js → [root-of-the-server]__05-t-8s._.js} +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_r3qx7._.js +3 -0
  81. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b77ayk._.js +3 -3
  82. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bs_c.t._.js +1 -1
  83. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cle18b._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e25s-_._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ew4gqf._.js +3 -0
  86. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lx7sf8._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rara9.._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pik08u._.js → [root-of-the-server]__0rumact._.js} +2 -2
  90. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rv7-_r._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/ssr/{_0ttg7a2._.js → _0-mid6~._.js} +2 -2
  93. package/.next/standalone/.next/server/chunks/ssr/_0.sfgns._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/ssr/_04ia97a._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/{_0.y2of~._.js → _06akrwh._.js} +3 -3
  96. package/.next/standalone/.next/server/chunks/ssr/_06~9axc._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  98. package/.next/standalone/.next/server/chunks/ssr/{_0tb5sv.._.js → _0_dt8gs._.js} +2 -2
  99. package/.next/standalone/.next/server/chunks/ssr/_0_kfemp._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/ssr/{_0a5f4n.._.js → _0_~od6x._.js} +2 -2
  101. package/.next/standalone/.next/server/chunks/ssr/_0bkb_.9._.js +1 -1
  102. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/{_0-frleg._.js → _0eln2ih._.js} +2 -2
  104. package/.next/standalone/.next/server/chunks/ssr/_0ex2yo6._.js +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/_0f.zny.._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/{_0_vq_9m._.js → _0n1j319._.js} +2 -2
  108. package/.next/standalone/.next/server/chunks/ssr/{_0lw1tq2._.js → _0qfin2p._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/{_0fb1op1._.js → _0u1ybm2._.js} +2 -2
  111. package/.next/standalone/.next/server/chunks/ssr/_0wown2f._.js +7 -0
  112. package/.next/standalone/.next/server/chunks/ssr/{_0mci_e0._.js → _0x9phlk._.js} +3 -3
  113. package/.next/standalone/.next/server/chunks/ssr/{_0ia4gik._.js → _0xs_.j1._.js} +2 -2
  114. package/.next/standalone/.next/server/chunks/ssr/{_0kqe7k7._.js → _0~_.0md._.js} +2 -2
  115. package/.next/standalone/.next/server/chunks/ssr/_1083dzh._.js +4 -0
  116. package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
  117. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  118. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  119. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  127. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  128. package/.next/standalone/.next/server/pages/500.html +1 -1
  129. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/server-reference-manifest.json +266 -266
  131. package/.next/standalone/.next/static/chunks/021pojk-jcnw0.js +1 -0
  132. package/.next/standalone/.next/static/chunks/{0o.a8t_h5vwy-.js → 0558t1hlvaoxh.js} +1 -1
  133. package/.next/standalone/.next/static/chunks/{0g7kwivg0c5zn.js → 056a8z0wds522.js} +1 -1
  134. package/.next/standalone/.next/static/chunks/06-e8wuosb00v.js +1 -0
  135. package/.next/standalone/.next/static/chunks/08rlai_d171x4.js +1 -0
  136. package/.next/standalone/.next/static/chunks/0_3q9.2g3z23l.js +5 -0
  137. package/.next/standalone/.next/static/chunks/{0b6cq1pd_clzr.js → 0_~520q._qkjj.js} +2 -2
  138. package/.next/standalone/.next/static/chunks/{024-z6hhx6kj8.js → 0c_2jxrtu.h6z.js} +1 -1
  139. package/.next/standalone/.next/static/chunks/{0nkn227~1tu4_.js → 0f-n0eqe6x.4c.js} +1 -1
  140. package/.next/standalone/.next/static/chunks/0fqp8_2f2v3lv.js +1 -0
  141. package/.next/standalone/.next/static/chunks/0gk2y6_okaodm.js +1 -0
  142. package/.next/standalone/.next/static/chunks/{0s86miqs3h9gi.js → 0i4.0h5fn9_pg.js} +1 -1
  143. package/.next/standalone/.next/static/chunks/0imk_sv~a.wkh.js +1 -0
  144. package/.next/standalone/.next/static/chunks/0nidfrkdx7qps.js +5 -0
  145. package/.next/standalone/.next/static/chunks/{0x.izf3-isfsq.js → 0qwt~eu3x658b.js} +1 -1
  146. package/.next/standalone/.next/static/chunks/{0w6~b9luhbk1x.js → 0up~e.7wnmlbs.js} +1 -1
  147. package/.next/standalone/.next/static/chunks/0v1z8vez.wkfb.js +1 -0
  148. package/.next/standalone/.next/static/chunks/0x2ca5v0k2cns.js +5 -0
  149. package/.next/standalone/.next/static/chunks/0x~em7v37r~0r.js +1 -0
  150. package/.next/standalone/.next/static/chunks/0ygoq7i41ir8a.js +1 -0
  151. package/.next/standalone/.next/static/chunks/0yzl3zug_rpw-.js +2 -0
  152. package/.next/standalone/.next/static/chunks/0~5kdq-~kgsbt.js +1 -0
  153. package/.next/standalone/.next/static/chunks/{13iipzi9xw35f.js → 11qzw.-vwkk5g.js} +1 -1
  154. package/.next/standalone/.next/static/chunks/{0nxf2s5ppbm.b.js → 148644k53ubh..js} +1 -1
  155. package/.next/standalone/.next/static/chunks/14gyvwctfte0-.js +5 -0
  156. package/.next/standalone/.next/static/chunks/{15550tahnp.5j.js → 15hxafqqvgizt.js} +1 -1
  157. package/.next/standalone/package.json +1 -1
  158. package/dist/mcp-server.cjs +22 -7
  159. package/package.json +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t0.u9.._.js +0 -3
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1307ll-._.js +0 -3
  162. package/.next/standalone/.next/server/chunks/ssr/_0qd7u-y._.js +0 -4
  163. package/.next/standalone/.next/server/chunks/ssr/_0vl82nb._.js +0 -3
  164. package/.next/standalone/.next/server/chunks/ssr/_0vz_pgd._.js +0 -7
  165. package/.next/standalone/.next/static/chunks/01iha~qq-s2iq.js +0 -1
  166. package/.next/standalone/.next/static/chunks/02cdl9l647nfw.js +0 -5
  167. package/.next/standalone/.next/static/chunks/02hkeaf1dqmhz.js +0 -1
  168. package/.next/standalone/.next/static/chunks/08fee4dmmdj39.js +0 -5
  169. package/.next/standalone/.next/static/chunks/08hbrv30ik~i9.js +0 -1
  170. package/.next/standalone/.next/static/chunks/0cx03gmt.9kfo.js +0 -1
  171. package/.next/standalone/.next/static/chunks/0dsr03qh0epy8.js +0 -1
  172. package/.next/standalone/.next/static/chunks/0mov-lr-7u237.js +0 -5
  173. package/.next/standalone/.next/static/chunks/0n~h~45imnm42.js +0 -1
  174. package/.next/standalone/.next/static/chunks/0qmzg_a-~~1-1.js +0 -2
  175. package/.next/standalone/.next/static/chunks/0serb6jug2wgz.js +0 -1
  176. package/.next/standalone/.next/static/chunks/0y_s_afcrfp3_.js +0 -1
  177. package/.next/standalone/.next/static/chunks/0~moqlrzya~z_.js +0 -5
  178. package/.next/standalone/.next/static/chunks/13dz~n5.w6hta.js +0 -1
  179. package/.next/standalone/.next/static/chunks/17.p0kyu6y24w.js +0 -1
  180. /package/.next/standalone/.next/static/{v4Xp8QqFHgGyfY7YcmgRm → m8-LaeVMTc5jjKuT9Jh1M}/_buildManifest.js +0 -0
  181. /package/.next/standalone/.next/static/{v4Xp8QqFHgGyfY7YcmgRm → m8-LaeVMTc5jjKuT9Jh1M}/_clientMiddlewareManifest.js +0 -0
  182. /package/.next/standalone/.next/static/{v4Xp8QqFHgGyfY7YcmgRm → m8-LaeVMTc5jjKuT9Jh1M}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:i})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),h.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},766403,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60cf6b2d326d0946ce8d37c175c468c1e69b765fae",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},590867,324474,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c44f67c33631945c23e44f17e91cb623eb6bedfb2",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],590867);let r=(0,t.createServerReference)("40fff72f22835092abeb3d0397d5bee7f7fb3bad18",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],324474)},916891,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40a895ba3eccb79f3fb8a1462a05537757a30a1413",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},998793,794321,530243,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60cf7fbcf67ea83b8c27f49c5bcb609d4618ba551c",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],998793);let r=(0,t.createServerReference)("40baa85f3c2053e9a098e3ac7f1088fa940ffa23bc",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],794321);let a=(0,t.createServerReference)("60179f334352ae295d3f7b9c209df818f4a8f82257",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],530243)},486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14842,865514,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(368490),a=e.i(232280),n=e.i(759686),i=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),h=e.i(487486),m=e.i(776639),x=e.i(624687),u=e.i(533499);function f({patchState:e,isLargeFold:s,onLoad:r}){let{t:a}=(0,u.useI18n)();return s?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:r,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:r,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:s}=(0,u.useI18n)(),r=e.split("\n"),a=r.length>500,n=a?r.slice(0,500):r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:n.map((e,s)=>{let r=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:r,children:e||" "},s)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:s("diff.patchTruncated",{n:String(500),total:String(r.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:j,conflictFiles:b,onCommit:w,hasUncommitted:N}){let{t:y}=(0,u.useI18n)(),[v,k]=(0,s.useState)(new Set),[C,S]=(0,s.useState)(new Map),[M,D]=(0,s.useState)(!1),[L,A]=(0,s.useState)(""),[F,T]=(0,s.useState)(!1),B=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(s=>{let r=new Map(s);return"binary"===e.kind?r.set(t,{kind:"binary"}):"empty"===e.kind?r.set(t,{kind:"empty"}):r.set(t,{kind:"ready",patch:e.patch??""}),r})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:N&&w&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>D(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),y("diff.commit")]})})]}),j&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(n.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",b.length," conflicting file",1!==b.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:b.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:i.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let s=v.has(e.filename),n=C.get(e.filename),i=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=v.has(e.filename),void(k(t=>{let s=new Set(t);return s.has(e.filename)?s.delete(e.filename):s.add(e.filename),s}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&B(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[s?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(r.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:y("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),s&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:n,isLargeFold:!n&&i>200,onLoad:()=>B(e.filename)})})]},e.filename)})})}),(0,t.jsx)(m.Dialog,{open:M,onOpenChange:D,children:(0,t.jsxs)(m.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsx)(m.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(x.Textarea,{value:L,onChange:e=>A(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>D(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(L.trim()&&w){T(!0);try{await w(L.trim()),A(""),D(!1)}finally{T(!1)}}},disabled:!L.trim()||F,children:F?"...":y("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let j=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:r,taskId:a,taskTitle:n,baseBranch:i,fileCount:l,commitCount:d,commitLog:h=[],onMergeComplete:x}){let u=(0,g.useRouter)(),[f,p]=(0,s.useState)(!1),[b,w]=(0,s.useState)(null),N=async()=>{p(!0),w(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){r(!1),x(),u.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?w(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):w(t.error??"Merge failed")}catch{w("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(m.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(m.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(m.DialogHeader,{children:(0,t.jsxs)(m.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(j,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:i})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),h.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:h.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),b&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:b})})]}),(0,t.jsxs)(m.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>r(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:N,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},491911,314411,e=>{"use strict";let t=(0,e.i(572989).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t],314411),e.s(["File",0,t],491911)},989383,769824,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,s],989383);let r=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,r],769824)},244354,e=>{"use strict";async function t(e,s,r={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,path:e,...r})});if(!a.ok)throw Error((await a.json()).error||`${s} failed`);return a.json()}e.s(["gitAction",0,t])},48019,782516,755696,886156,586564,719493,436539,e=>{"use strict";var t=e.i(572989);let s=(0,t.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,s],48019);let r=(0,t.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);e.s(["FileMinus",0,r],782516);let a=(0,t.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);e.s(["FileQuestion",0,a],755696);let n=(0,t.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,n],886156);let i=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,i],586564);let l=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,l],719493);let o=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,o],436539)},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},515135,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(491911),a=e.i(48019),n=e.i(782516),i=e.i(755696),l=e.i(886156),o=e.i(400355),c=e.i(586564),d=e.i(719493),h=e.i(597746),m=e.i(368490),x=e.i(232280),u=e.i(977982),f=e.i(436539),p=e.i(232545),g=e.i(49007),j=e.i(194358),b=e.i(487278),w=e.i(375306);let N=(0,e.i(572989).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var y=e.i(226145),v=e.i(738690),k=e.i(242941),C=e.i(998626),S=e.i(519455),M=e.i(755146),D=e.i(759684),L=e.i(337822),A=e.i(746798),F=e.i(776639),T=e.i(793479),B=e.i(624687),I=e.i(533499);function E({open:e,onOpenChange:r,branches:a,currentBranch:n,localPath:i,onCreated:l,onError:c}){let{t:d}=(0,I.useI18n)(),[m,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(n),[g,j]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),[C,M]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(u(""),p(n),j(""),k(""))},[e,n]);let D=[...new Set(a)].filter(e=>e.toLowerCase().includes(N.toLowerCase())),L=async()=>{if(m.trim()){w(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:i,branch:m.trim(),baseBranch:f})});if(e.ok)r(!1),l();else{let t=await e.json();c(t.error||"Unknown error")}}catch{c("Network error")}finally{w(!1)}}};return(0,t.jsx)(F.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(F.DialogHeader,{children:(0,t.jsx)(F.DialogTitle,{children:d("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchName")}),(0,t.jsx)(T.Input,{value:m,onChange:e=>u(e.target.value),placeholder:d("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&L()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>M(!C),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:f,children:f})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${C?"rotate-180":""}`})]}),C&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{p(e),M(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===f?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),e===f&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:d("git.branchDesc")}),(0,t.jsx)(B.Textarea,{value:g,onChange:e=>j(e.target.value),placeholder:d("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(F.DialogFooter,{children:[(0,t.jsx)(S.Button,{variant:"outline",onClick:()=>r(!1),children:d("common.cancel")}),(0,t.jsxs)(S.Button,{onClick:L,disabled:!m.trim()||b,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[b?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,d("common.create")]})]})]})})}var $=e.i(360112),P=e.i(244354);let R={modified:l.FileEdit,added:a.FilePlus,deleted:n.FileMinus,untracked:i.FileQuestion,renamed:l.FileEdit},z={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},U={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function G(e){let t={name:"",path:"",isDir:!0,children:[]};for(let s of e){let e=s.file.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length;t++){let a=e[t],n=t===e.length-1,i=e.slice(0,t+1).join("/");if(n)r.children.push({name:a,path:i,isDir:!1,children:[],file:s});else{let e=r.children.find(e=>e.isDir&&e.name===a);e||(e={name:a,path:i,isDir:!0,children:[]},r.children.push(e)),r=e}}}return(function e(t){if(t.isDir&&(t.children=t.children.map(e),1===t.children.length&&t.children[0].isDir&&""!==t.name)){let e=t.children[0];return{...e,name:`${t.name}/${e.name}`}}return t})(t).children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name))}function O({scroll:e,children:s}){return e?(0,t.jsx)(D.ScrollArea,{className:"flex-1 min-h-0",children:s}):(0,t.jsx)("div",{children:s})}function H({label:e,count:r,labelColor:a,tree:n,batchAction:i,batchLabel:l,batchIcon:o,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g}){let[j,b]=(0,s.useState)(!0);return 0===r?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,t.jsxs)("button",{onClick:()=>b(!j),className:"flex items-center gap-1 flex-1 min-w-0",children:[j?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${a}`,children:[e," (",r,")"]})]}),(0,t.jsx)(S.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":l,children:o})]}),j&&(0,t.jsx)("div",{className:"pb-1",children:n.map(e=>(0,t.jsx)(W,{node:e,depth:0,onFileClick:c,onFileAction:d,fileActionIcon:h,fileActionLabel:u,onFileSecondaryAction:f,fileSecondaryIcon:p,fileSecondaryLabel:g},e.path))})]})}function W({node:e,depth:a,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h}){let[f,p]=(0,s.useState)(!0),g={paddingLeft:`calc(${a} * 8px + 4px)`};if(e.isDir)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>p(!f),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:g,children:[f?(0,t.jsx)(x.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)(u.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:e.name})]}),f&&e.children.sort((e,t)=>e.isDir!==t.isDir?e.isDir?-1:1:e.name.localeCompare(t.name)).map(e=>(0,t.jsx)(W,{node:e,depth:a+1,onFileClick:n,onFileAction:i,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:c,fileSecondaryIcon:d,fileSecondaryLabel:h},e.path))]});let j=e.file,b=R[j.status]||r.File,w=z[j.status]||"text-muted-foreground",N=U[j.status]||"?";return(0,t.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:g,onClick:()=>n(j),children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(b,{className:`h-3.5 w-3.5 shrink-0 ${w}`}),(0,t.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${w}`,children:N}),c&&(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),c(j.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":h??"",children:d}),h&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:h})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:e=>{e.stopPropagation(),i(j.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":o??"",children:l}),o&&(0,t.jsx)(A.TooltipContent,{side:"bottom",children:o})]})]})}e.s(["EditorGitPanel",0,function({localPath:e,onFileSelect:r,mode:a="project"}){let n="task"===a,{t:i}=(0,I.useI18n)(),[l,m]=(0,s.useState)(null),[u,D]=(0,s.useState)(!0),[F,T]=(0,s.useState)(""),[B,R]=(0,s.useState)(!1),[z,U]=(0,s.useState)(!1),[W,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[J,Q]=(0,s.useState)(!1),[X,Y]=(0,s.useState)(""),[Z,_]=(0,s.useState)(!1),ee=(0,s.useCallback)(async()=>{try{let t=await fetch(`/api/git?path=${encodeURIComponent(e)}`);if(t.ok){let s=await t.json();m({changedFiles:s.changedFiles??[],ahead:s.ahead??0,behind:s.behind??0,remoteUrl:s.remoteUrl??"",currentBranch:s.currentBranch??"",branches:s.branches??[],remoteBranches:s.remoteBranches??[],topLevel:s.topLevel??e})}}catch{}finally{D(!1)}},[e]);(0,s.useEffect)(()=>{ee();let e=setInterval(ee,5e3);return()=>clearInterval(e)},[ee]);let et=async t=>{try{await (0,P.gitAction)(e,"stage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},es=async t=>{try{await (0,P.gitAction)(e,"unstage",{files:t}),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},er=async()=>{if(F.trim()){R(!0);try{await (0,P.gitAction)(e,"commit",{message:F}),T(""),$.toast.success(i("git.commitSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{R(!1)}}},ea=async t=>{U(!0);try{await (0,P.gitAction)(e,"pull",t?{branch:t}:{}),$.toast.success(i("git.pullSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{U(!1)}},en=async t=>{V(!0);try{await (0,P.gitAction)(e,"push",t?{branch:t}:{}),$.toast.success(i("git.pushSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{V(!1)}},ei=async()=>{q(!0);try{await (0,P.gitAction)(e,"fetch"),$.toast.success(i("git.fetchSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}finally{q(!1)}},el=async t=>{try{await (0,P.gitAction)(e,"checkout",{branch:t}),Q(!1),$.toast.success(`${i("git.switchSuccess")} ${t}`),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eo=async()=>{try{await (0,P.gitAction)(e,"stash-save",{message:F||void 0}),T(""),$.toast.success(i("git.stashSaved")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ec=async()=>{try{await (0,P.gitAction)(e,"stash-pop",{index:0}),$.toast.success(i("git.stashApplied")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},ed=async t=>{try{await (0,P.gitAction)(e,"discard-file",{file:t}),$.toast.success(i("git.discardFileSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},eh=async()=>{try{await (0,P.gitAction)(e,"discard-all"),$.toast.success(i("git.discardSuccess")),await ee()}catch(e){$.toast.error(e instanceof Error?e.message:String(e))}},em=async t=>{if("deleted"===t.status)return;let s=l?.topLevel??e;try{let a=await (0,P.gitAction)(e,"show",{file:t.file});r?.(t.file,a.content??"",s)}catch{r?.(t.file,"",s)}},ex=l?.changedFiles.filter(e=>e.staged)??[],eu=l?.changedFiles.filter(e=>!e.staged)??[],ef=(0,s.useMemo)(()=>G(ex),[ex]),ep=(0,s.useMemo)(()=>G(eu),[eu]);if(u)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!l)return null;function eg(e){let t=[];for(let s of e)s.isDir?t.push(...eg(s.children)):s.file&&t.push(s.file.file);return t}let ej=[...l?.branches??[],...(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e))],eb=X?ej.filter(e=>e.toLowerCase().includes(X.toLowerCase())):ej;return(0,t.jsxs)("div",{className:n?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[n?(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{render:(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:l?.currentBranch||"—"})]})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:l?.currentBranch||"—"})]}):(0,t.jsxs)(L.Popover,{open:J,onOpenChange:e=>{Q(e),e&&Y("")},children:[(0,t.jsxs)(L.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l?.currentBranch||void 0,children:l?.currentBranch||"—"})]}),(0,t.jsx)(x.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${J?"rotate-180":""}`})]}),(0,t.jsxs)(L.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:X,onChange:e=>Y(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.localBranches")}),(l?.branches??[]).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>{let s=e===l?.currentBranch;return(0,t.jsxs)("button",{onClick:()=>{s?Q(!1):el(e)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s&&(0,t.jsx)(h.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).length>0&&(0,t.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("git.remoteBranches")}),(l?.remoteBranches??[]).filter(e=>!l?.branches?.includes(e)).filter(e=>e.toLowerCase().includes(X.toLowerCase())).map(e=>(0,t.jsxs)("button",{onClick:()=>el(e),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(k.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e})]},`remote-${e}`)),0===eb.length&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:ei,disabled:K,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 ${K?"animate-spin":""}`})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{onClick:()=>{Q(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":i("git.createBranch"),children:(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(A.TooltipContent,{side:"bottom",children:i("git.createBranch")})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,t.jsx)("textarea",{value:F,onChange:e=>T(e.target.value),placeholder:i("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&er()}}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(S.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:er,disabled:B||!F.trim()||0===ex.length,children:[B?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(h.Check,{className:"h-3 w-3"}),i("git.commit")]}),(0,t.jsxs)(M.DropdownMenu,{children:[(0,t.jsx)(M.DropdownMenuTrigger,{render:(0,t.jsx)(S.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,t.jsx)(g.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)(M.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.commit")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:er,disabled:!F.trim()||0===ex.length,children:[(0,t.jsx)(h.Check,{className:"h-3.5 w-3.5 mr-2"}),i("git.commit")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.changes")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>et(eg(ep)),disabled:0===eu.length,children:[(0,t.jsx)(p.Plus,{className:"h-3.5 w-3.5 mr-2"}),i("git.stageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>es(eg(ef)),disabled:0===ex.length,children:[(0,t.jsx)(f.Minus,{className:"h-3.5 w-3.5 mr-2"}),i("git.unstageAll")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eh,disabled:0===eu.length,children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5 mr-2"}),i("git.discardAll")]})]}),!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.sync")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pull")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.push")]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:z,children:[(0,t.jsx)(c.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),i("git.pullFrom"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.behind>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",l.behind]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>ea(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuSub,{children:[(0,t.jsxs)(M.DropdownMenuSubTrigger,{disabled:W,children:[(0,t.jsx)(d.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),i("git.pushTo"),"..."]}),(0,t.jsxs)(M.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),l.currentBranch,l.ahead>0&&(0,t.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",l.ahead]})]}),l.remoteBranches.filter(e=>e!==l.currentBranch).map(e=>(0,t.jsxs)(M.DropdownMenuItem,{onClick:()=>en(e),children:[(0,t.jsx)(y.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),e]},e))]})]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ei,disabled:K,children:[(0,t.jsx)(j.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${K?"animate-spin":""}`}),i("git.fetchAll")]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuGroup,{children:[(0,t.jsx)(M.DropdownMenuLabel,{children:i("git.stash")}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:eo,disabled:0===l.changedFiles.length,children:[(0,t.jsx)(b.Archive,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashSave")]}),(0,t.jsxs)(M.DropdownMenuItem,{onClick:ec,children:[(0,t.jsx)(w.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),i("git.stashPopLatest")]})]})]}),(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsxs)(M.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,t.jsx)(y.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),l.currentBranch]})]})]})]})]}),(0,t.jsxs)(O,{scroll:n,children:[(0,t.jsx)(H,{label:i("git.stagedChanges"),count:ex.length,labelColor:"text-emerald-400",tree:ef,batchAction:()=>es(eg(ef)),batchLabel:i("git.unstageAll"),batchIcon:(0,t.jsx)(f.Minus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>es([e]),fileActionIcon:"−",fileActionLabel:i("git.unstageFile")}),(0,t.jsx)(H,{label:i("git.unstagedChanges"),count:eu.length,labelColor:"text-muted-foreground",tree:ep,batchAction:()=>et(eg(ep)),batchLabel:i("git.stageAll"),batchIcon:(0,t.jsx)(p.Plus,{className:"h-3 w-3"}),onFileClick:em,onFileAction:e=>et([e]),fileActionIcon:"+",fileActionLabel:i("git.stageFile"),onFileSecondaryAction:e=>ed(e),fileSecondaryIcon:(0,t.jsx)(C.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:i("git.discardFile")}),0===l.changedFiles.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,t.jsx)(h.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("git.noChanges")})]})]}),(0,t.jsx)(E,{open:Z,onOpenChange:_,branches:[...l?.branches??[],...l?.remoteBranches??[]],currentBranch:l?.currentBranch??"",localPath:e,onCreated:async()=>{$.toast.success(i("git.createSuccess")),await ee()},onError:e=>$.toast.error(`${i("git.createFailed")}: ${e}`)})]})}],515135)},926933,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("6066325eb350a72dd75bf17983c62fa54de2d1ffc2",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,s])},97716,107477,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("7c8f3ba1721e02719282f561290eb4ae9c83e7bee0",t.callServer,void 0,t.findSourceMapURL,"startPtyExecutionSafe");e.s(["startPtyExecutionSafe",0,s],97716);let r=(0,t.createServerReference)("4065fc7caaaa0530a443c7629138334df97ba17ce3",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r],107477)},279447,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40a30d3bf150126d3c9ee744d9f98e096ef0f0de33",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,s])},777073,986326,310329,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("60b9b794a17c8a4779acfeed1ea371f6f742a236a1",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,s],777073);let r=(0,t.createServerReference)("40916a393dba228f866d0438ec4ad5685814d474e5",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,r],986326);let a=(0,t.createServerReference)("6006d1baad4701e4916f7a6c1c07570bde181060e1",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],310329)},486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},326883,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(232280),a=e.i(472074),n=e.i(882651),i=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),h=e.i(486077),m=e.i(769824),x=e.i(519455),u=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(n.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(i.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:n,onContinueLatest:i}){let{t:l,locale:o}=(0,f.useI18n)(),[g,j]=(0,s.useState)(null),[b,w]=(0,s.useState)(null);return 0===e.length?(0,t.jsx)(u.EmptyState,{icon:m.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(s=>{let m=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(s.gitStats??null),u=function(e,t){if(!e||!t)return"";let s=new Date(t).getTime()-new Date(e).getTime();if(s<0)return"";let r=Math.floor(s/1e3);if(r<60)return`${r}s`;let a=Math.floor(r/60);if(a<60)return`${a}m ${r%60}s`;let n=Math.floor(a/60);return`${n}h ${a%60}m`}(s.startedAt??null,s.endedAt??null),f=g===s.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:s.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(s.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(s.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let s=new Date(e),r=Math.floor((new Date().getTime()-s.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",n=s.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===r?n:1===r?"zh"===t?`昨天 ${n}`:`Yesterday ${n}`:r<7?"zh"===t?`${r}天前 ${n}`:`${r}d ago ${n}`:s.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+n}(s.startedAt??null,o)}),u&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",u,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:s.summary||l("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,t.jsxs)("span",{children:[m.commits," ",l("execution.commits")]}):null,m.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[m.filesChanged," ",l("execution.files")]})]}):null,m.insertions||m.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),m.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),s.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>w(b===s.id?null:s.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(h.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:s.insightNote.title}),b===s.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"})]}),b===s.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:s.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[s.sessionId&&n?(0,t.jsxs)(x.Button,{size:"sm",onClick:()=>n(s.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!s.sessionId&&"FAILED"===s.status&&s.id===e[0]?.id&&i?(0,t.jsxs)(x.Button,{size:"sm",onClick:i,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",onClick:()=>j(f?null:s.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(r.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[s.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:s.gitLog.split("\n").slice(0,3).join("\n")})]}),s.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:s.terminalLog})]}),"FAILED"===s.status&&null!=s.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",s.exitCode]})]})]},s.id)})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:s,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),s&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},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)},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"])},236967,e=>{"use strict";var t=e.i(289721),r=e.i(210702),a=e.i(538059),s=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(r.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(s.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let s=a.icon,n=i===a.key;return(0,t.jsxs)(r.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},615079,823542,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40b3270b8d7a0a3f0a879a0ef4329e62326397c28a",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],615079);let a=(0,t.createServerReference)("40ae5f435f8c19c19241e75464465cd42388ea8828",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],823542)},497732,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(232545),s=e.i(400355),l=e.i(236967),n=e.i(533499),i=e.i(685149),c=e.i(615079),o=e.i(514798);let d=(0,o.createServerReference)("6091d4fb33386bb0328e99ec16c9dae2e6acdfff78",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(823542);let x=(0,o.createServerReference)("60068f966bf7bcf9b0ee9e9a48751f3dd62f4588d7",o.callServer,void 0,o.findSourceMapURL,"getProjectNotes");var u=e.i(975157);function h({active:e,onSelect:r}){let{t:a}=(0,n.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>r("all"),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),i.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>r(a),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var g=e.i(519455),p=e.i(280027),f=e.i(645378),j=e.i(912505),v=e.i(464249),b=e.i(998626);e.i(254826);var N=e.i(309735);function S({note:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)(),l=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(e),className:"text-muted-foreground","aria-label":s("notes.edit"),children:(0,t.jsx)(v.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":s("notes.delete"),children:(0,t.jsx)(b.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(N.Streamdown,{children:l})})]})}function y({notes:e,onEdit:r,onDelete:a}){let{t:s}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(j.EmptyState,{icon:f.FileText,title:s("notes.empty"),description:s("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(S,{note:e,onEdit:r,onDelete:a},e.id))})}var w=e.i(624687);function C({value:e,onChange:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(w.Textarea,{value:e,onChange:e=>r(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(N.Streamdown,{children:e})})})]})}e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:u,initialNotes:f}){let j,v,{t:b}=(0,n.useI18n)(),[N,S]=(0,r.useTransition)(),[w,E]=(0,r.useState)(o),[T,k]=(0,r.useState)(u),[I,R]=(0,r.useState)(f),[O,P]=(0,r.useState)("all"),[A,_]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[D,B]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[G,U]=(0,r.useState)(i.NOTE_CATEGORIES_PRESET[3]),[V,H]=(0,r.useState)(o),[F,W]=(0,r.useState)(u),K=e.find(e=>e.id===w),Y=K?.projects??[],q=e.find(e=>e.id===V),J=q?.projects??[],Q=(0,r.useCallback)(e=>{e?S(async()=>{R(await x(e))}):R([])},[S]),X=async()=>{F&&D.trim()&&(await (0,c.createNote)({title:D.trim(),content:M,category:G,projectId:F}),$(!1),F===T&&Q(T))},Z=async()=>{A&&D.trim()&&(await d(A.id,{title:D.trim(),content:M,category:G}),_(null),Q(T))},ee=async e=>{let t=I.find(t=>t.id===e);!t||confirm(b("notes.deleteConfirm",{title:t.title}))&&(await (0,m.deleteNote)(e),Q(T))},et="all"===O?I.map(e=>({...e,updatedAt:new Date(e.updatedAt)})):I.filter(e=>e.category===O).map(e=>({...e,updatedAt:new Date(e.updatedAt)})),er=L||null!==A;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(p.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;E(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;k(a?.id??null),P("all"),Q(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]}),Y.length>0&&(0,t.jsxs)(p.Select,{value:T??"",onValueChange:e=>e&&void(e!==T&&(k(e),P("all"),Q(e))),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(j=Y.find(e=>e.id===T))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,t.jsx)(p.SelectContent,{children:Y.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!er&&(0,t.jsxs)(g.Button,{onClick:()=>{B(""),z(""),U(i.NOTE_CATEGORIES_PRESET[3]),H(w),W(T),_(null),$(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:b("notes.newNote")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.workspace")}),(0,t.jsxs)(p.Select,{value:V,onValueChange:t=>t&&(t=>{if(t===V)return;H(t);let r=e.find(e=>e.id===t),a=r?.projects[0]??null;W(a?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===V)?.name??V})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!A&&J.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.project")}),(0,t.jsxs)(p.Select,{value:F??"",onValueChange:e=>e&&W(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(v=J.find(e=>e.id===F))?v.alias?`${v.name} (${v.alias})`:v.name:""})}),(0,t.jsx)(p.SelectContent,{children:J.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.categoryLabel")}),(0,t.jsxs)(p.Select,{value:G,onValueChange:e=>e&&U(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:G})}),(0,t.jsx)(p.SelectContent,{children:i.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(p.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:D,onChange:e=>B(e.target.value),placeholder:b("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(C,{value:M,onChange:z}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{$(!1),_(null)},children:b("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:A?Z:X,disabled:!D.trim()||!A&&!F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:b("notes.save")})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h,{active:O,onSelect:P}),(0,t.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(s.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===Y.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:b("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:b("notes.noProjectHint")})]}):(0,t.jsx)(y,{notes:et,onEdit:e=>{B(e.title),z(e.content),U(e.category),_(e),$(!1)},onDelete:ee})]})]})})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:s,description:a,action:l,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},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)},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"])},236967,e=>{"use strict";var t=e.i(289721),r=e.i(210702),s=e.i(538059),a=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,s.usePathname)(),i=o.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(r.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(a.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(s=>{let a=s.icon,n=i===s.key;return(0,t.jsxs)(r.default,{href:`/workspaces/${e}/${s.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${s.key}`)})]},s.key)})]})}])},638130,248945,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("4050d21998b61084d9e78951521484c1a2c6b51217",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],638130);let s=(0,t.createServerReference)("408bd9e05f629ae433a52001ed4b1ed229b76db12c",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,s],248945)},497732,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(232545),a=e.i(400355),l=e.i(236967),n=e.i(533499),i=e.i(685149),c=e.i(638130),o=e.i(514798);let d=(0,o.createServerReference)("607d1f032211183b6c3a25cc1beb381563aa90f02c",o.callServer,void 0,o.findSourceMapURL,"updateNote");var m=e.i(248945);let x=(0,o.createServerReference)("60fc7bd69fdd7b7c58d092fba99c3738504b42b669",o.callServer,void 0,o.findSourceMapURL,"getProjectNotes");var u=e.i(975157);function h({active:e,onSelect:r}){let{t:s}=(0,n.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>r("all"),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:s("notes.allCategories")}),i.NOTE_CATEGORIES_PRESET.map(s=>(0,t.jsx)("button",{onClick:()=>r(s),className:(0,u.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===s?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:s},s))]})}var g=e.i(519455),p=e.i(280027),f=e.i(645378),j=e.i(912505),b=e.i(464249),v=e.i(998626);e.i(254826);var N=e.i(309735);function S({note:e,onEdit:r,onDelete:s}){let{t:a}=(0,n.useI18n)(),l=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(e),className:"text-muted-foreground","aria-label":a("notes.edit"),children:(0,t.jsx)(b.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>s(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":a("notes.delete"),children:(0,t.jsx)(v.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(N.Streamdown,{children:l})})]})}function y({notes:e,onEdit:r,onDelete:s}){let{t:a}=(0,n.useI18n)();return 0===e.length?(0,t.jsx)(j.EmptyState,{icon:f.FileText,title:a("notes.empty"),description:a("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(S,{note:e,onEdit:r,onDelete:s},e.id))})}var w=e.i(624687);function C({value:e,onChange:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(w.Textarea,{value:e,onChange:e=>r(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(N.Streamdown,{children:e})})})]})}e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:u,initialNotes:f}){let j,b,{t:v}=(0,n.useI18n)(),[N,S]=(0,r.useTransition)(),[w,E]=(0,r.useState)(o),[T,k]=(0,r.useState)(u),[I,R]=(0,r.useState)(f),[O,P]=(0,r.useState)("all"),[A,_]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[D,B]=(0,r.useState)(""),[M,z]=(0,r.useState)(""),[G,U]=(0,r.useState)(i.NOTE_CATEGORIES_PRESET[3]),[V,H]=(0,r.useState)(o),[F,W]=(0,r.useState)(u),K=e.find(e=>e.id===w),Y=K?.projects??[],q=e.find(e=>e.id===V),J=q?.projects??[],Q=(0,r.useCallback)(e=>{e?S(async()=>{R(await x(e))}):R([])},[S]),X=async()=>{F&&D.trim()&&(await (0,c.createNote)({title:D.trim(),content:M,category:G,projectId:F}),$(!1),F===T&&Q(T))},Z=async()=>{A&&D.trim()&&(await d(A.id,{title:D.trim(),content:M,category:G}),_(null),Q(T))},ee=async e=>{let t=I.find(t=>t.id===e);!t||confirm(v("notes.deleteConfirm",{title:t.title}))&&(await (0,m.deleteNote)(e),Q(T))},et="all"===O?I.map(e=>({...e,updatedAt:new Date(e.updatedAt)})):I.filter(e=>e.category===O).map(e=>({...e,updatedAt:new Date(e.updatedAt)})),er=L||null!==A;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(p.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;E(t);let r=e.find(e=>e.id===t),s=r?.projects[0]??null;k(s?.id??null),P("all"),Q(s?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]}),Y.length>0&&(0,t.jsxs)(p.Select,{value:T??"",onValueChange:e=>e&&void(e!==T&&(k(e),P("all"),Q(e))),children:[(0,t.jsx)(p.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(j=Y.find(e=>e.id===T))?j.alias?`${j.name} (${j.alias})`:j.name:""})}),(0,t.jsx)(p.SelectContent,{children:Y.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!er&&(0,t.jsxs)(g.Button,{onClick:()=>{B(""),z(""),U(i.NOTE_CATEGORIES_PRESET[3]),H(w),W(T),_(null),$(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(s.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:v("notes.newNote")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:er?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!A&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.workspace")}),(0,t.jsxs)(p.Select,{value:V,onValueChange:t=>t&&(t=>{if(t===V)return;H(t);let r=e.find(e=>e.id===t),s=r?.projects[0]??null;W(s?.id??null)})(t),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===V)?.name??V})}),(0,t.jsx)(p.SelectContent,{children:e.map(e=>(0,t.jsx)(p.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!A&&J.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.project")}),(0,t.jsxs)(p.Select,{value:F??"",onValueChange:e=>e&&W(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(b=J.find(e=>e.id===F))?b.alias?`${b.name} (${b.alias})`:b.name:""})}),(0,t.jsx)(p.SelectContent,{children:J.map(e=>(0,t.jsxs)(p.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v("notes.categoryLabel")}),(0,t.jsxs)(p.Select,{value:G,onValueChange:e=>e&&U(e),children:[(0,t.jsx)(p.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:G})}),(0,t.jsx)(p.SelectContent,{children:i.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(p.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:D,onChange:e=>B(e.target.value),placeholder:v("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(C,{value:M,onChange:z}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(g.Button,{variant:"outline",onClick:()=>{$(!1),_(null)},children:v("notes.cancel")}),(0,t.jsx)(g.Button,{onClick:A?Z:X,disabled:!D.trim()||!A&&!F,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:v("notes.save")})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h,{active:O,onSelect:P}),(0,t.jsxs)("div",{className:`relative ${N?"opacity-40 pointer-events-none":""} transition-opacity`,children:[N&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===Y.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:v("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:v("notes.noProjectHint")})]}):(0,t.jsx)(y,{notes:et,onEdit:e=>{B(e.title),z(e.content),U(e.category),_(e),$(!1)},onDelete:ee})]})]})})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
@@ -0,0 +1,5 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,456346,317056,169715,228184,e=>{"use strict";let t,r,n,a=(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,a],456346);var o,i,l,u,s,c,d,f,p,m=e.i(289721),v=/[\\\/_+.#"@\[\(\{&]/,h=/[\\\/_+.#"@\[\(\{&]/g,g=/[\s-]/,b=/[\s-]/g;function y(e){return e.toLowerCase().replace(b," ")}var x=e.i(965652);function E(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function w(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function C(...e){return t=>{let r=!1,n=e.map(e=>{let n=w(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():w(e[t],null)}}}}function k(...e){return x.useCallback(C(...e),e)}"u">typeof window&&window.document&&window.document.createElement;var S=globalThis?.document?x.useLayoutEffect:()=>{},N=x[" useId ".trim().toString()]||(()=>void 0),j=0;function R(e){let[t,r]=x.useState(N());return S(()=>{e||r(e=>e??String(j++))},[e]),e||(t?`radix-${t}`:"")}x[" useEffectEvent ".trim().toString()],x[" useInsertionEffect ".trim().toString()];var I=x[" useInsertionEffect ".trim().toString()]||S;Symbol("RADIX:SYNC_STATE");var D=e.i(585012);function P(e){var t;let r,n=(t=e,(r=x.forwardRef((e,t)=>{let{children:r,...n}=e;if(x.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==x.Fragment&&(l.ref=t?C(t,i):i),x.cloneElement(r,l)}return x.Children.count(r)>1?x.Children.only(null):null})).displayName=`${t}.SlotClone`,r),a=x.forwardRef((e,t)=>{let{children:r,...a}=e,o=x.Children.toArray(r),i=o.find(A);if(i){let e=i.props.children,r=o.map(t=>t!==i?t:x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null);return(0,m.jsx)(n,{...a,ref:t,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,m.jsx)(n,{...a,ref:t,children:r})});return a.displayName=`${e}.Slot`,a}var M=Symbol("radix.slottable");function A(e){return x.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===M}var O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=P(`Primitive.${t}`),n=x.forwardRef((e,n)=>{let{asChild:a,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(a?r:t,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function L(e){let t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...e)=>t.current?.(...e),[])}var T="dismissableLayer.update",_=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$=x.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...u}=e,s=x.useContext(_),[c,d]=x.useState(null),p=c?.ownerDocument??globalThis?.document,[,v]=x.useState({}),h=k(t,e=>d(e)),g=Array.from(s.layers),[b]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=c?g.indexOf(c):-1,C=s.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,N=function(e,t=globalThis?.document){let r=L(e),n=x.useRef(!1),a=x.useRef(()=>{});return x.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){W("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...s.branches].some(e=>e.contains(t));S&&!r&&(a?.(e),i?.(e),e.defaultPrevented||l?.())},p),j=function(e,t=globalThis?.document){let r=L(e),n=x.useRef(!1);return x.useEffect(()=>{let e=e=>{e.target&&!n.current&&W("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...s.branches].some(e=>e.contains(t))&&(o?.(e),i?.(e),e.defaultPrevented||l?.())},p);return!function(e,t=globalThis?.document){let r=L(e);x.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{w===s.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),x.useEffect(()=>{if(c)return r&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(f=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),F(),()=>{r&&1===s.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=f)}},[c,p,r,s]),x.useEffect(()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),F())},[c,s]),x.useEffect(()=>{let e=()=>v({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),(0,m.jsx)(O.div,{...u,ref:h,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:E(e.onFocusCapture,j.onFocusCapture),onBlurCapture:E(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,N.onPointerDownCapture)})});function F(){let e=new CustomEvent(T);document.dispatchEvent(e)}function W(e,t,r,{discrete:n}){let a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});if(t&&a.addEventListener(e,t,{once:!0}),n)a&&D.flushSync(()=>a.dispatchEvent(o));else a.dispatchEvent(o)}$.displayName="DismissableLayer",x.forwardRef((e,t)=>{let r=x.useContext(_),n=x.useRef(null),a=k(t,n);return x.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,m.jsx)(O.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var B="focusScope.autoFocusOnMount",U="focusScope.autoFocusOnUnmount",z={bubbles:!1,cancelable:!0},K=x.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[l,u]=x.useState(null),s=L(a),c=L(o),d=x.useRef(null),f=k(t,e=>u(e)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:q(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||q(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&q(l)});return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,l,p.paused]),x.useEffect(()=>{if(l){Y.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(B,z);l.addEventListener(B,s),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(q(n,{select:t}),document.activeElement!==r)return}(V(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&q(l))}return()=>{l.removeEventListener(B,s),setTimeout(()=>{let t=new CustomEvent(U,z);l.addEventListener(U,c),l.dispatchEvent(t),t.defaultPrevented||q(e??document.body,{select:!0}),l.removeEventListener(U,c),Y.remove(p)},0)}}},[l,s,c,p]);let v=x.useCallback(e=>{if(!r&&!n||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){var o;let t,n=e.currentTarget,[i,l]=[H(t=V(o=n),o),H(t.reverse(),o)];i&&l?e.shiftKey||a!==l?e.shiftKey&&a===i&&(e.preventDefault(),r&&q(l,{select:!0})):(e.preventDefault(),r&&q(i,{select:!0})):a===n&&e.preventDefault()}},[r,n,p.paused]);return(0,m.jsx)(O.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});function V(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function H(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function q(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}K.displayName="FocusScope";var Y=(n=[],{add(e){let t=n[0];e!==t&&t?.pause(),(n=G(n,e)).unshift(e)},remove(e){n=G(n,e),n[0]?.resume()}});function G(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var X=x.forwardRef((e,t)=>{let{container:r,...n}=e,[a,o]=x.useState(!1);S(()=>o(!0),[]);let i=r||a&&globalThis?.document?.body;return i?D.default.createPortal((0,m.jsx)(O.div,{...n,ref:t}),i):null});X.displayName="Portal";var Z=e=>{var t;let r,n,{present:a,children:o}=e,i=function(e){var t,r;let[n,a]=x.useState(),o=x.useRef(null),i=x.useRef(e),l=x.useRef("none"),[u,s]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},x.useReducer((e,t)=>r[e][t]??e,t));return x.useEffect(()=>{let e=J(o.current);l.current="mounted"===u?e:"none"},[u]),S(()=>{let t=o.current,r=i.current;if(r!==e){let n=l.current,a=J(t);e?s("MOUNT"):"none"===a||t?.display==="none"?s("UNMOUNT"):r&&n!==a?s("ANIMATION_OUT"):s("UNMOUNT"),i.current=e}},[e,s]),S(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let a=J(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&a&&(s("ANIMATION_END"),!i.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},a=e=>{e.target===n&&(l.current=J(o.current))};return n.addEventListener("animationstart",a),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",a),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}s("ANIMATION_END")},[n,s]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(e=>{o.current=e?getComputedStyle(e):null,a(e)},[])}}(a),l="function"==typeof o?o({present:i.isPresent}):x.Children.only(o),u=k(i.ref,(t=l,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||i.isPresent?x.cloneElement(l,{ref:u}):null};function J(e){return e?.animationName||"none"}Z.displayName="Presence";var Q=0;function ee(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var et=function(){return(et=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function er(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var en=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ea="width-before-scroll-bar";function eo(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ei="u">typeof window?x.useLayoutEffect:x.useEffect,el=new WeakMap,eu=(void 0===o&&(o={}),(void 0===i&&(i=function(e){return e}),l=[],u=!1,s={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:null},useMedium:function(e){var t=i(e,u);return l.push(t),function(){l=l.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(u=!0;l.length;){var t=l;l=[],t.forEach(e)}l={push:function(t){return e(t)},filter:function(){return l}}},assignMedium:function(e){u=!0;var t=[];if(l.length){var r=l;l=[],r.forEach(e),t=l}var n=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(n)};a(),l={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),l}}}}).options=et({async:!0,ssr:!1},o),s),es=function(){},ec=x.forwardRef(function(e,t){var r,n,a,o,i=x.useRef(null),l=x.useState({onScrollCapture:es,onWheelCapture:es,onTouchMoveCapture:es}),u=l[0],s=l[1],c=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,m=e.enabled,v=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,y=e.inert,E=e.allowPinchZoom,w=e.as,C=e.gapMode,k=er(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(r=[i,t],n=function(e){return r.forEach(function(t){return eo(t,e)})},(a=(0,x.useState)(function(){return{value:null,callback:n,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=n,o=a.facade,ei(function(){var e=el.get(o);if(e){var t=new Set(e),n=new Set(r),a=o.current;t.forEach(function(e){n.has(e)||eo(e,null)}),n.forEach(function(e){t.has(e)||eo(e,a)})}el.set(o,r)},[r]),o),N=et(et({},k),u);return x.createElement(x.Fragment,null,m&&x.createElement(h,{sideCar:eu,removeScrollBar:p,shards:v,noRelative:g,noIsolation:b,inert:y,setCallbacks:s,allowPinchZoom:!!E,lockRef:i,gapMode:C}),c?x.cloneElement(x.Children.only(d),et(et({},N),{ref:S})):x.createElement(void 0===w?"div":w,et({},N,{className:f,ref:S}),d))});ec.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ec.classNames={fullWidth:ea,zeroRight:en};var ed=function(e){var t=e.sideCar,r=er(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return x.createElement(n,et({},r))};ed.isSideCarExport=!0;var ef=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=p||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,a;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ep=function(){var e=ef();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},em=function(){var e=ep();return function(t){return e(t.styles,t.dynamic),null}},ev={left:0,top:0,right:0,gap:0},eh=function(e){return parseInt(e||"",10)||0},eg=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[eh(r),eh(n),eh(a)]},eb=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return ev;var t=eg(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ey=em(),ex="data-scroll-locked",eE=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(ex,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(en," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ea," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(en," .").concat(en," {\n right: 0 ").concat(n,";\n }\n \n .").concat(ea," .").concat(ea," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ex,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},ew=function(){var e=parseInt(document.body.getAttribute(ex)||"0",10);return isFinite(e)?e:0},eC=function(){x.useEffect(function(){return document.body.setAttribute(ex,(ew()+1).toString()),function(){var e=ew()-1;e<=0?document.body.removeAttribute(ex):document.body.setAttribute(ex,e.toString())}},[])},ek=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;eC();var o=x.useMemo(function(){return eb(a)},[a]);return x.createElement(ey,{styles:eE(o,!t,a,r?"":"!important")})},eS=!1;if("u">typeof window)try{var eN=Object.defineProperty({},"passive",{get:function(){return eS=!0,!0}});window.addEventListener("test",eN,eN),window.removeEventListener("test",eN,eN)}catch(e){eS=!1}var ej=!!eS&&{passive:!1},eR=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},eI=function(e,t){var r=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),eD(e,n)){var a=eP(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},eD=function(e,t){return"v"===e?eR(t,"overflowY"):eR(t,"overflowX")},eP=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eM=function(e,t,r,n,a){var o,i=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),l=i*n,u=r.target,s=t.contains(u),c=!1,d=l>0,f=0,p=0;do{if(!u)break;var m=eP(e,u),v=m[0],h=m[1]-m[2]-i*v;(v||h)&&eD(e,u)&&(f+=h,p+=v);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!s&&u!==document.body||s&&(t.contains(u)||t===u))return d&&(a&&1>Math.abs(f)||!a&&l>f)?c=!0:!d&&(a&&1>Math.abs(p)||!a&&-l>p)&&(c=!0),c},eA=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eO=function(e){return[e.deltaX,e.deltaY]},eL=function(e){return e&&"current"in e?e.current:e},eT=0,e_=[];let e$=(c=function(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),a=x.useState(eT++)[0],o=x.useState(em)[0],i=x.useRef(e);x.useEffect(function(){i.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eL),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=eA(e),l=r.current,u="deltaX"in e?e.deltaX:l[0]-o[0],s="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var m=eI(d,c);if(!m)return!0;if(m?a=d:(a="v"===d?"h":"v",m=eI(d,c)),!m)return!1;if(!n.current&&"changedTouches"in e&&(u||s)&&(n.current=a),!a)return!0;var v=n.current||a;return eM(v,t,e,"h"===v?u:s,!0)},[]),u=x.useCallback(function(e){if(e_.length&&e_[e_.length-1]===o){var r="deltaY"in e?eO(e):eA(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var a=(i.current.shards||[]).map(eL).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?l(e,a[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=x.useCallback(function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=x.useCallback(function(e){r.current=eA(e),n.current=void 0},[]),d=x.useCallback(function(t){s(t.type,eO(t),t.target,l(t,e.lockRef.current))},[]),f=x.useCallback(function(t){s(t.type,eA(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(function(){return e_.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,ej),document.addEventListener("touchmove",u,ej),document.addEventListener("touchstart",c,ej),function(){e_=e_.filter(function(e){return e!==o}),document.removeEventListener("wheel",u,ej),document.removeEventListener("touchmove",u,ej),document.removeEventListener("touchstart",c,ej)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(o,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,p?x.createElement(ek,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},eu.useMedium(c),ed);var eF=x.forwardRef(function(e,t){return x.createElement(ec,et({},e,{ref:t,sideCar:e$}))});eF.classNames=ec.classNames;var eW=new WeakMap,eB=new WeakMap,eU={},ez=0,eK=function(e){return e&&(e.host||eK(e.parentNode))},eV=function(e,t,r,n){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=eK(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eU[r]||(eU[r]=new WeakMap);var o=eU[r],i=[],l=new Set,u=new Set(a),s=function(e){!e||l.has(e)||(l.add(e),s(e.parentNode))};a.forEach(s);var c=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,u=(eW.get(e)||0)+1,s=(o.get(e)||0)+1;eW.set(e,u),o.set(e,s),i.push(e),1===u&&a&&eB.set(e,!0),1===s&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),ez++,function(){i.forEach(function(e){var t=eW.get(e)-1,a=o.get(e)-1;eW.set(e,t),o.set(e,a),t||(eB.has(e)||e.removeAttribute(n),eB.delete(e)),a||e.removeAttribute(r)}),--ez||(eW=new WeakMap,eW=new WeakMap,eB=new WeakMap,eU={})}},eH=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),eV(n,a,r,"aria-hidden")):function(){return null}},eq="Dialog",[eY,eG]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>x.createContext(e));return function(r){let n=r?.[e]||t;return x.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let a=x.createContext(n),o=r.length;r=[...r,n];let i=t=>{let{scope:r,children:n,...i}=t,l=r?.[e]?.[o]||a,u=x.useMemo(()=>i,Object.values(i));return(0,m.jsx)(l.Provider,{value:u,children:n})};return i.displayName=t+"Provider",[i,function(r,i){let l=i?.[e]?.[o]||a,u=x.useContext(l);if(u)return u;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let a=r(e)[`__scope${n}`];return{...t,...a}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(eq),[eX,eZ]=eY(eq),eJ=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,l=x.useRef(null),u=x.useRef(null),[s,c]=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[a,o,i]=function({defaultProp:e,onChange:t}){let[r,n]=x.useState(e),a=x.useRef(r),o=x.useRef(t);return I(()=>{o.current=t},[t]),x.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,n,o]}({defaultProp:t,onChange:r}),l=void 0!==e,u=l?e:a;{let t=x.useRef(void 0!==e);x.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,n])}return[u,x.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&i.current?.(r)}else o(t)},[l,e,o,i])]}({prop:n,defaultProp:a??!1,onChange:o,caller:eq});return(0,m.jsx)(eX,{scope:t,triggerRef:l,contentRef:u,contentId:R(),titleId:R(),descriptionId:R(),open:s,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(e=>!e),[c]),modal:i,children:r})};eJ.displayName=eq;var eQ="DialogTrigger";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(eQ,r),o=k(t,a.triggerRef);return(0,m.jsx)(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ti(a.open),...n,ref:o,onClick:E(e.onClick,a.onOpenToggle)})}).displayName=eQ;var e0="DialogPortal",[e1,e5]=eY(e0,{forceMount:void 0}),e2=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=eZ(e0,t);return(0,m.jsx)(e1,{scope:t,forceMount:r,children:x.Children.map(n,e=>(0,m.jsx)(Z,{present:r||o.open,children:(0,m.jsx)(X,{asChild:!0,container:a,children:e})}))})};e2.displayName=e0;var e3="DialogOverlay",e7=x.forwardRef((e,t)=>{let r=e5(e3,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=eZ(e3,e.__scopeDialog);return o.modal?(0,m.jsx)(Z,{present:n||o.open,children:(0,m.jsx)(e4,{...a,ref:t})}):null});e7.displayName=e3;var e9=P("DialogOverlay.RemoveScroll"),e4=x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(e3,r);return(0,m.jsx)(eF,{as:e9,allowPinchZoom:!0,shards:[a.contentRef],children:(0,m.jsx)(O.div,{"data-state":ti(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),e6="DialogContent",e8=x.forwardRef((e,t)=>{let r=e5(e6,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=eZ(e6,e.__scopeDialog);return(0,m.jsx)(Z,{present:n||o.open,children:o.modal?(0,m.jsx)(te,{...a,ref:t}):(0,m.jsx)(tt,{...a,ref:t})})});e8.displayName=e6;var te=x.forwardRef((e,t)=>{let r=eZ(e6,e.__scopeDialog),n=x.useRef(null),a=k(t,r.contentRef,n);return x.useEffect(()=>{let e=n.current;if(e)return eH(e)},[]),(0,m.jsx)(tr,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:E(e.onFocusOutside,e=>e.preventDefault())})}),tt=x.forwardRef((e,t)=>{let r=eZ(e6,e.__scopeDialog),n=x.useRef(!1),a=x.useRef(!1);return(0,m.jsx)(tr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let o=t.target;r.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),tr=x.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,l=eZ(e6,r),u=x.useRef(null),s=k(t,u);return x.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ee()),document.body.insertAdjacentElement("beforeend",e[1]??ee()),Q++,()=>{1===Q&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Q--}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,m.jsx)($,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ti(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tc,{titleId:l.titleId}),(0,m.jsx)(td,{contentRef:u,descriptionId:l.descriptionId})]})]})}),tn="DialogTitle";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(tn,r);return(0,m.jsx)(O.h2,{id:a.titleId,...n,ref:t})}).displayName=tn;var ta="DialogDescription";x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(ta,r);return(0,m.jsx)(O.p,{id:a.descriptionId,...n,ref:t})}).displayName=ta;var to="DialogClose";function ti(e){return e?"open":"closed"}x.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=eZ(to,r);return(0,m.jsx)(O.button,{type:"button",...n,ref:t,onClick:E(e.onClick,()=>a.onOpenChange(!1))})}).displayName=to;var tl="DialogTitleWarning",[tu,ts]=(d={contentName:e6,titleName:tn,docsSlug:"dialog"},t=x.createContext(d),(r=e=>{let{children:r,...n}=e,a=x.useMemo(()=>n,Object.values(n));return(0,m.jsx)(t.Provider,{value:a,children:r})}).displayName=tl+"Provider",[r,function(e){let r=x.useContext(t);if(r)return r;if(void 0!==d)return d;throw Error(`\`${e}\` must be used within \`${tl}\``)}]),tc=({titleId:e})=>{let t=ts(tl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},td=({contentRef:e,descriptionId:t})=>{let r=ts("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return x.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tf=Symbol.for("react.lazy"),tp=x[" use ".trim().toString()];function tm(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===tf&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var tv=Symbol("radix.slottable");function th(e){return x.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===tv}var tg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let a,o,i,l=(n=r=`Primitive.${t}`,(a=x.forwardRef((e,t)=>{let{children:r,...n}=e;if(tm(r)&&"function"==typeof tp&&(r=tp(r._payload)),x.isValidElement(r)){var a;let e,o,i=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),l=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==x.Fragment&&(l.ref=t?C(t,i):i),x.cloneElement(r,l)}return x.Children.count(r)>1?x.Children.only(null):null})).displayName=`${n}.SlotClone`,o=a,(i=x.forwardRef((e,t)=>{let{children:r,...n}=e;tm(r)&&"function"==typeof tp&&(r=tp(r._payload));let a=x.Children.toArray(r),i=a.find(th);if(i){let e=i.props.children,r=a.map(t=>t!==i?t:x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null);return(0,m.jsx)(o,{...n,ref:t,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,m.jsx)(o,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,i),u=x.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,m.jsx)(n?l:t,{...a,ref:r})});return u.displayName=`Primitive.${t}`,{...e,[t]:u}},{}),tb='[cmdk-group=""]',ty='[cmdk-group-items=""]',tx='[cmdk-item=""]',tE=`${tx}:not([aria-disabled="true"])`,tw="cmdk-item-select",tC="data-value",tk=(e,t,r)=>{var n;return n=e,function e(t,r,n,a,o,i,l){if(i===r.length)return o===t.length?1:.99;var u=`${o},${i}`;if(void 0!==l[u])return l[u];for(var s,c,d,f,p=a.charAt(i),m=n.indexOf(p,o),y=0;m>=0;)(s=e(t,r,n,a,m+1,i+1,l))>y&&(m===o?s*=1:v.test(t.charAt(m-1))?(s*=.8,(d=t.slice(o,m-1).match(h))&&o>0&&(s*=Math.pow(.999,d.length))):g.test(t.charAt(m-1))?(s*=.9,(f=t.slice(o,m-1).match(b))&&o>0&&(s*=Math.pow(.999,f.length))):(s*=.17,o>0&&(s*=Math.pow(.999,m-o))),t.charAt(m)!==r.charAt(i)&&(s*=.9999)),(s<.1&&n.charAt(m-1)===a.charAt(i+1)||a.charAt(i+1)===a.charAt(i)&&n.charAt(m-1)!==a.charAt(i))&&.1*(c=e(t,r,n,a,m+1,i+2,l))>s&&(s=.1*c),s>y&&(y=s),m=n.indexOf(p,m+1);return l[u]=y,y}(n=r&&r.length>0?`${n+" "+r.join(" ")}`:n,t,y(n),y(t),0,0,{})},tS=x.createContext(void 0),tN=x.createContext(void 0),tj=x.createContext(void 0),tR=x.forwardRef((e,t)=>{let r=t$(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=t$(()=>new Set),a=t$(()=>new Map),o=t$(()=>new Map),i=t$(()=>new Set),l=tT(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:v=!1,vimBindings:h=!0,...g}=e,b=R(),y=R(),E=R(),w=x.useRef(null),C=tB();t_(()=>{if(void 0!==c){let e=c.trim();r.current.value=e,k.emit()}},[c]),t_(()=>{C(6,P)},[]);let k=x.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var a,o,i,u;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)D(),j(),C(1,I);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(E);e?e.focus():null==(a=document.getElementById(b))||a.focus()}if(C(7,()=>{var e;r.current.selectedItemId=null==(e=M())?void 0:e.id,k.emit()}),n||C(5,P),(null==(o=l.current)?void 0:o.value)!==void 0){null==(u=(i=l.current).onValueChange)||u.call(i,null!=t?t:"");return}}k.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),S=x.useMemo(()=>({value:(e,t,n)=>{var a;t!==(null==(a=o.current.get(e))?void 0:a.value)&&(o.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,N(t,n)),C(2,()=>{j(),k.emit()}))},item:(e,t)=>(n.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{D(),j(),r.current.value||I(),k.emit()}),()=>{o.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=M();C(4,()=>{D(),(null==t?void 0:t.getAttribute("id"))===e&&I(),k.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:E,labelId:y,listInnerRef:w}),[]);function N(e,t){var n,a;let o=null!=(a=null==(n=l.current)?void 0:n.filter)?a:tk;return e?o(e,r.current.search,t):0}function j(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=a.current.get(r),o=0;n.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([r,o])});let n=w.current;A().sort((t,r)=>{var n,a;let o=t.getAttribute("id"),i=r.getAttribute("id");return(null!=(n=e.get(i))?n:0)-(null!=(a=e.get(o))?a:0)}).forEach(e=>{let t=e.closest(ty);t?t.appendChild(e.parentElement===t?e:e.closest(`${ty} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${ty} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=w.current)?void 0:t.querySelector(`${tb}[${tC}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function I(){let e=A().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(tC);k.setState("value",t||void 0)}function D(){var e,t,i,u;if(!r.current.search||!1===l.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let s=0;for(let a of n.current){let n=N(null!=(t=null==(e=o.current.get(a))?void 0:e.value)?t:"",null!=(u=null==(i=o.current.get(a))?void 0:i.keywords)?u:[]);r.current.filtered.items.set(a,n),n>0&&s++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=s}function P(){var e,t,r;let n=M();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(tb))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=w.current)?void 0:e.querySelector(`${tx}[aria-selected="true"]`)}function A(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(tE))||[])}function O(e){let t=A()[e];t&&k.setState("value",t.getAttribute(tC))}function L(e){var t;let r=M(),n=A(),a=n.findIndex(e=>e===r),o=n[a+e];null!=(t=l.current)&&t.loop&&(o=a+e<0?n[n.length-1]:a+e===n.length?n[0]:n[a+e]),o&&k.setState("value",o.getAttribute(tC))}function T(e){let t=M(),r=null==t?void 0:t.closest(tb),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,tb):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,tb))?void 0:r.querySelector(tE);n?k.setState("value",n.getAttribute(tC)):L(e)}let _=()=>O(A().length-1),$=e=>{e.preventDefault(),e.metaKey?_():e.altKey?T(1):L(1)},F=e=>{e.preventDefault(),e.metaKey?O(0):e.altKey?T(-1):L(-1)};return x.createElement(tg.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=g.onKeyDown)||t.call(g,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":h&&e.ctrlKey&&$(e);break;case"ArrowDown":$(e);break;case"p":case"k":h&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),O(0);break;case"End":e.preventDefault(),_();break;case"Enter":{e.preventDefault();let t=M();if(t){let e=new Event(tw);t.dispatchEvent(e)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:tz},u),tU(e,e=>x.createElement(tN.Provider,{value:k},x.createElement(tS.Provider,{value:S},e))))}),tI=x.forwardRef((e,t)=>{var r,n;let a=R(),o=x.useRef(null),i=x.useContext(tj),l=x.useContext(tS),u=tT(e),s=null!=(n=null==(r=u.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;t_(()=>{if(!s)return l.item(a,null==i?void 0:i.id)},[s]);let c=tW(a,o,[e.value,e.children,o],e.keywords),d=x.useContext(tN),f=tF(e=>e.value&&e.value===c.current),p=tF(e=>!!s||!1===l.filter()||!e.search||e.filtered.items.get(a)>0);function m(){var e,t;v(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function v(){d.setState("value",c.current,!0)}if(x.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(tw,m),()=>t.removeEventListener(tw,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:h,value:g,onSelect:b,forceMount:y,keywords:E,...w}=e;return x.createElement(tg.div,{ref:C(o,t),...w,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||l.getDisablePointerSelection()?void 0:v,onClick:h?void 0:m},e.children)}),tD=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,i=R(),l=x.useRef(null),u=x.useRef(null),s=R(),c=x.useContext(tS),d=tF(e=>!!a||!1===c.filter()||!e.search||e.filtered.groups.has(i));t_(()=>c.group(i),[]),tW(i,l,[e.value,e.heading,u]);let f=x.useMemo(()=>({id:i,forceMount:a}),[a]);return x.createElement(tg.div,{ref:C(l,t),...o,"cmdk-group":"",role:"presentation",hidden:!d||void 0},r&&x.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},r),tU(e,e=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?s:void 0},x.createElement(tj.Provider,{value:f},e))))}),tP=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=x.useRef(null),o=tF(e=>!e.search);return r||o?x.createElement(tg.div,{ref:C(a,t),...n,"cmdk-separator":"",role:"separator"}):null}),tM=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=null!=e.value,o=x.useContext(tN),i=tF(e=>e.search),l=tF(e=>e.selectedItemId),u=x.useContext(tS);return x.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),x.createElement(tg.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:a?e.value:i,onChange:e=>{a||o.setState("search",e.target.value),null==r||r(e.target.value)}})}),tA=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=x.useRef(null),i=x.useRef(null),l=tF(e=>e.selectedItemId),u=x.useContext(tS);return x.useEffect(()=>{if(i.current&&o.current){let e=i.current,t=o.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),x.createElement(tg.div,{ref:C(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},tU(e,e=>x.createElement("div",{ref:C(i,u.listInnerRef),"cmdk-list-sizer":""},e)))}),tO=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:i,...l}=e;return x.createElement(eJ,{open:r,onOpenChange:n},x.createElement(e2,{container:i},x.createElement(e7,{"cmdk-overlay":"",className:a}),x.createElement(e8,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(tR,{ref:t,...l}))))}),tL=Object.assign(tR,{List:tA,Item:tI,Input:tM,Group:tD,Separator:tP,Dialog:tO,Empty:x.forwardRef((e,t)=>tF(e=>0===e.filtered.count)?x.createElement(tg.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:x.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return x.createElement(tg.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},tU(e,e=>x.createElement("div",{"aria-hidden":!0},e)))})});function tT(e){let t=x.useRef(e);return t_(()=>{t.current=e}),t}var t_="u"<typeof window?x.useEffect:x.useLayoutEffect;function t$(e){let t=x.useRef();return void 0===t.current&&(t.current=e()),t}function tF(e){let t=x.useContext(tN),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function tW(e,t,r,n=[]){let a=x.useRef(),o=x.useContext(tS);return t_(()=>{var i;let l=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),u=n.map(e=>e.trim());o.value(e,l,u),null==(i=t.current)||i.setAttribute(tC,l),a.current=l}),a}var tB=()=>{let[e,t]=x.useState(),r=t$(()=>new Map);return t_(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function tU({asChild:e,children:t},r){let n;return e&&x.isValidElement(t)?x.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var tz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},tK=e.i(975157);e.i(776639);var tV=e.i(294237);function tH({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,tK.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}e.i(519455),e.i(793479),e.i(624687);let tq=(0,tV.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function tY({className:e,align:t="inline-start",...r}){return(0,m.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,tK.cn)(tq({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}(0,tV.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var tG=e.i(298751),tG=tG,tX=e.i(533133);e.s(["Command",0,function({className:e,...t}){return(0,m.jsx)(tL,{"data-slot":"command",className:(0,tK.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})},"CommandEmpty",0,function({className:e,...t}){return(0,m.jsx)(tL.Empty,{"data-slot":"command-empty",className:(0,tK.cn)("py-6 text-center text-sm",e),...t})},"CommandGroup",0,function({className:e,...t}){return(0,m.jsx)(tL.Group,{"data-slot":"command-group",className:(0,tK.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})},"CommandInput",0,function({className:e,...t}){return(0,m.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,m.jsxs)(tH,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,m.jsx)(tL.Input,{"data-slot":"command-input",className:(0,tK.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,m.jsx)(tY,{children:(0,m.jsx)(tG.default,{className:"size-4 shrink-0 opacity-50"})})]})})},"CommandItem",0,function({className:e,children:t,...r}){return(0,m.jsxs)(tL.Item,{"data-slot":"command-item",className:(0,tK.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...r,children:[t,(0,m.jsx)(tX.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})},"CommandList",0,function({className:e,...t}){return(0,m.jsx)(tL.List,{"data-slot":"command-list",className:(0,tK.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}],317056);var tZ=e.i(514798);let tJ=(0,tZ.createServerReference)("400c4ee1b60d171d08180e6f8b87d1c74de0bfefd3",tZ.callServer,void 0,tZ.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,tJ],169715);let tQ=(0,tZ.createServerReference)("40a1e0d6ae019ce1220aadd7e516daf5a43c5ef102",tZ.callServer,void 0,tZ.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,tQ],228184)},744798,e=>{"use strict";var t=e.i(289721),r=e.i(965652),n=e.i(776639),a=e.i(519455),o=e.i(793479),i=e.i(624687),l=e.i(110204),u=e.i(226145),s=e.i(597746),c=e.i(456346),d=e.i(280027),f=e.i(337822),p=e.i(317056),m=e.i(533499),v=e.i(169715),h=e.i(228184),g=e.i(514798);let b=(0,g.createServerReference)("406655a5d5e730c5c1c168f25e63602eb5e77d0e9c",g.callServer,void 0,g.findSourceMapURL,"getCurrentBranch");var y=e.i(373884);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:g,onSubmit:x,onUpdate:E,defaultStatus:w="TODO",editTask:C,editTaskLabelIds:k,prefillFromTask:S,labels:N,projectType:j,projectLocalPath:R,versions:I,defaultVersionId:D}){let P,[M,A]=(0,r.useState)(""),[O,L]=(0,r.useState)(""),[T,_]=(0,r.useState)("MEDIUM"),[$,F]=(0,r.useState)(""),[W,B]=(0,r.useState)([]),[U,z]=(0,r.useState)([]),[K,V]=(0,r.useState)(!1),[H,q]=(0,r.useState)(""),[Y,G]=(0,r.useState)(!1),[X,Z]=(0,r.useState)(!0),[J,Q]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),{t:er}=(0,m.useI18n)();(0,r.useEffect)(()=>{if(!e||C)return;let t=!1;return(0,y.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let r=e["task.defaultUseWorktree"],n=e["task.defaultAutoStart"];"boolean"==typeof r&&Z(r),"boolean"==typeof n&&Q(n)}).catch(()=>{}),()=>{t=!0}},[e,C]);let en=!!C,ea=!!R;return(0,r.useEffect)(()=>{C?(A(C.title),L(C.description??""),_(C.priority),F(C.subPath??""),B(k??[]),et(C.versionId??null)):(S?(A(S.title??""),L(S.description??""),_(S.priority??"MEDIUM"),F(S.subPath??""),B(S.labelIds??[])):(A(""),L(""),_("MEDIUM"),F(""),B([])),et(D??null))},[C,k,S,D]),(0,r.useEffect)(()=>{e||C||(A(""),L(""),_("MEDIUM"),F(""),B([]),z([]),q(""),G(!1),et(D??null))},[e,C,D]),(0,r.useEffect)(()=>{e&&ea&&!C&&(V(!0),Promise.all([(0,v.getProjectBranches)(R),b(R)]).then(([e,t])=>{z(e);let r=S?.baseBranch??null;r&&e.includes(r)?q(r):q(t&&e.includes(t)?t:e[0]??""),V(!1),(0,h.fetchRemoteBranches)(R).then(()=>{setTimeout(()=>{(0,v.getProjectBranches)(R).then(e=>{z(e),q(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{z([]),q(""),V(!1)}))},[e,ea,R,C,S]),(0,t.jsx)(n.Dialog,{open:e,onOpenChange:g,disablePointerDismissal:!0,children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsx)(n.DialogTitle,{children:en?er("task.edit"):er("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)(l.Label,{htmlFor:"title",children:er("task.title")}),(0,t.jsx)(o.Input,{id:"title","data-testid":"task-title",placeholder:er("task.titlePlaceholder"),value:M,onChange:e=>A(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"description",children:er("task.description")}),(0,t.jsx)(i.Textarea,{id:"description",placeholder:er("task.descPlaceholder"),rows:4,value:O,onChange:e=>L(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"subPath",children:er("task.subPath")}),(0,t.jsx)(o.Input,{id:"subPath",placeholder:er("task.subPathPlaceholder"),value:$,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:er("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let r={LOW:{label:er("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:er("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:er("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:er("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>_(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${T===e?`${r.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:r.label},e)})})]}),ea&&!en&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.baseBranch")}),K?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchLoading")}):U.length>0?(0,t.jsxs)(f.Popover,{open:Y,onOpenChange:G,children:[(0,t.jsxs)(f.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)(u.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:H||void 0,children:H||er("task.branchNone")}),(0,t.jsx)(c.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(f.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(p.Command,{children:[(0,t.jsx)(p.CommandInput,{placeholder:er("task.branchSearch")}),(0,t.jsxs)(p.CommandList,{children:[(0,t.jsx)(p.CommandEmpty,{children:er("task.branchNone")}),(0,t.jsx)(p.CommandGroup,{children:U.map(e=>(0,t.jsxs)(p.CommandItem,{value:e,onSelect:()=>{q(e),G(!1)},children:[(0,t.jsx)(u.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===H&&(0,t.jsx)(s.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:er("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(l.Label,{className:"text-xs text-muted-foreground",children:er("task.worktreeLabel")}),(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 ${X===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.worktreeYes"):er("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(l.Label,{className:"text-xs text-muted-foreground",children:er("task.autoStartLabel")}),(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 ${J===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?er("task.autoStartYes"):er("task.autoStartNo")},String(e)))})]})]}),N.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:N.map(e=>{let r=W.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{B(t=>r?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${r?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:r?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!en||I&&I.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:er("version.picker.label")}),I&&I.length>0?(0,t.jsxs)(d.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(d.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(P=I.find(e=>e.id===ee))?P.isCurrent?`${P.number} \xb7 ${P.name} \xb7 ${er("version.currentShort")}`:`${P.number} \xb7 ${P.name}`:er("version.picker.none")})}),(0,t.jsxs)(d.SelectContent,{children:[(0,t.jsx)(d.SelectItem,{value:"__none__",children:er("version.picker.none")}),I.map(e=>(0,t.jsx)(d.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${er("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:er("version.picker.empty")})]})]}),(0,t.jsxs)(n.DialogFooter,{children:[(0,t.jsx)(a.Button,{variant:"outline",onClick:()=>g(!1),children:er("common.cancel")}),(0,t.jsx)(a.Button,{onClick:()=>{M.trim()&&(en&&E?E(C.id,{title:M,description:O,priority:T,labelIds:W,subPath:$.trim()||"",versionId:ee}):x({title:M,description:O,priority:T,status:w,labelIds:W,...ea&&X&&H?{baseBranch:H}:{},...$.trim()?{subPath:$.trim()}:{},versionId:ee,autoStart:J}),A(""),L(""),_("MEDIUM"),F(""),B([]),z([]),q(""),Z(!0),et(null),g(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:en?er("common.save"):er("common.create")})]})]})})}],744798)},986407,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a92df73672145c1518d6808e58cbef0220060a1f",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,r])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,822229,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("40bbb15b95b61da428c7e4c39a37b1859d070f0d4a",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},337822,e=>{"use strict";var t,n=e.i(289721);e.s([],707132),e.i(707132);var o=e.i(965652),r=e.i(620163),i=e.i(528796),s=e.i(594640),a=e.i(306296),l=e.i(344478),u=e.i(205995),p=e.i(611008);e.i(708878);var c=e.i(462902);let d=o.createContext(void 0);function g(e){let t=o.useContext(d);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var f=e.i(585012),S=e.i(370161),v=e.i(596290),m=e.i(161476),h=e.i(903224),R=e.i(774641),E=e.i(586622),C=e.i(771326),b=e.i(87396),O=e.i(693354);let x={...C.popupStoreSelectors,disabled:(0,v.createSelector)(e=>e.disabled),instantType:(0,v.createSelector)(e=>e.instantType),openMethod:(0,v.createSelector)(e=>e.openMethod),openChangeReason:(0,v.createSelector)(e=>e.openChangeReason),modal:(0,v.createSelector)(e=>e.modal),stickIfOpen:(0,v.createSelector)(e=>e.stickIfOpen),titleElementId:(0,v.createSelector)(e=>e.titleElementId),descriptionElementId:(0,v.createSelector)(e=>e.descriptionElementId),openOnHover:(0,v.createSelector)(e=>e.openOnHover),closeDelay:(0,v.createSelector)(e=>e.closeDelay),hasViewport:(0,v.createSelector)(e=>e.hasViewport)};class T extends S.ReactStore{constructor(e){const t={...(0,C.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:o.createRef(),backdropRef:o.createRef(),internalBackdropRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:o.createRef(),beforeContentFocusGuardRef:o.createRef(),stickIfOpenTimeout:new m.Timeout,triggerElements:new b.PopupTriggerMap},x)}setOpen=(e,t)=>{let n=t.reason===E.REASONS.triggerHover,o=t.reason===E.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===E.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(O.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),f.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===E.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,h.useRefWithInit)(()=>new T(t)).current,o=e??n;return(0,R.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var I=e.i(67077),y=e.i(894621),P=e.i(892069);function A({props:e}){let{children:t,open:c,defaultOpen:g=!1,onOpenChange:f,onOpenChangeComplete:S,modal:v=!1,handle:m,triggerId:h,defaultTriggerId:R=null}=e,C=T.useStore(m?.store,{modal:v,open:g,openProp:c,activeTriggerId:R,triggerIdProp:h});(0,i.useOnFirstRender)(()=>{void 0===c&&!1===C.state.open&&!0===g&&C.update({open:!0,activeTriggerId:R})}),C.useControlledProp("openProp",c),C.useControlledProp("triggerIdProp",h);let b=C.useState("open"),O=C.useState("positionerElement"),x=C.useState("payload"),M=C.useState("openChangeReason");C.useContextCallback("onOpenChange",f),C.useContextCallback("onOpenChangeComplete",S);let{openMethod:k,triggerProps:w}=(0,P.useOpenInteractionType)(b);(0,y.useImplicitActiveTrigger)(C);let{forceUnmount:F}=(0,y.useOpenStateTransitions)(b,C,()=>{C.update({stickIfOpen:!0,openChangeReason:null})});(0,r.useScrollLock)(b&&!0===v&&M!==E.REASONS.triggerHover&&"touch"!==k,O),o.useEffect(()=>{b||C.context.stickIfOpenTimeout.clear()},[C,b]);let N=o.useCallback(e=>{let t=(0,I.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{C.set("preventUnmountingOnClose",!0)},t},[C]),j=o.useCallback(()=>{C.setOpen(!1,N(E.REASONS.imperativeAction))},[C,N]);o.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,p.useSyncedFloatingRootContext)({popupStore:C,onOpenChange:C.setOpen}),H=(0,s.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),B=(0,l.useRole)(D),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:U}=(0,a.useInteractions)([H,B]),G=o.useMemo(()=>L(w),[L,w]),K=o.useMemo(()=>U(w),[U,w]),_=o.useMemo(()=>V(),[V]);C.useSyncedValues({modal:v,openMethod:k,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,u.useFloatingParentNodeId)()});let z=o.useMemo(()=>({store:C}),[C]);return(0,n.jsx)(d.Provider,{value:z,children:"function"==typeof t?t({payload:x}):t})}var M=e.i(887642),k=e.i(282109),w=e.i(845756),F=e.i(581263),N=e.i(660272),j=e.i(430557),D=e.i(411657),H=e.i(207516),B=e.i(221732),L=e.i(682354),V=e.i(870541);let U=o.forwardRef(function(e,t){let{render:r,className:i,disabled:s=!1,nativeButton:l=!0,handle:u,payload:p,openOnHover:d=!1,delay:S=300,closeDelay:v=0,id:m,...h}=e,R=g(!0),C=u?.store??R?.store;if(!C)throw Error((0,c.default)(74));let b=(0,H.useBaseUiId)(m),x=C.useState("isTriggerActive",b),T=C.useState("floatingRootContext"),P=C.useState("isOpenedByTrigger",b),A=o.useRef(null),{registerTrigger:U,isMountedByThisTrigger:G}=(0,y.useTriggerDataForwarding)(b,A,C,{payload:p,disabled:s,openOnHover:d,closeDelay:v}),K=C.useState("openChangeReason"),_=C.useState("stickIfOpen"),z=C.useState("openMethod"),W=(0,D.useHoverReferenceInteraction)(T,{enabled:null!=T&&d&&("touch"!==z||K!==E.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,N.safePolygon)(),restMs:S,delay:{close:v},triggerElementRef:A,isActiveTrigger:x}),Y=(0,j.useClick)(T,{enabled:null!=T,stickIfOpen:_}),q=(0,a.useInteractions)([Y]),J=C.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,k.useButton)({disabled:s,native:l}),Z=o.useMemo(()=>({open:e=>e&&K===E.REASONS.triggerPress?w.pressableTriggerOpenStateMapping.open(e):w.triggerOpenStateMapping.open(e)}),[K]),$=(0,F.useRenderElement)("button",e,{state:{disabled:s,open:P},ref:[X,t,U,A],props:[q.getReferenceProps(),W,J,{[O.CLICK_TRIGGER_IDENTIFIER]:"",id:b},h,Q],stateAttributesMapping:Z}),ee=o.useRef(null),et=(0,M.useStableCallback)(e=>{f.flushSync(()=>{C.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,V.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,M.useStableCallback)(e=>{let t=C.select("positionerElement");if(t&&(0,V.isOutsideEvent)(e,t))C.context.beforeContentFocusGuardRef.current?.focus();else{f.flushSync(()=>{C.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,V.getTabbableAfterElement)(C.context.triggerFocusTargetRef.current||A.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,V.getNextTabbable)(n))===e)break}n?.focus()}});return x?(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(B.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(o.Fragment,{children:$},b),(0,n.jsx)(B.FocusGuard,{ref:C.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(o.Fragment,{children:$},b)});var G=e.i(888393);let K=o.createContext(void 0),_=o.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=g();return i.useState("mounted")||o?(0,n.jsx)(K.Provider,{value:o,children:(0,n.jsx)(G.FloatingPortal,{ref:t,...r})}):null});var z=e.i(831766),W=e.i(804849);let Y=o.createContext(void 0);function q(){let e=o.useContext(Y);if(!e)throw Error((0,c.default)(46));return e}var J=e.i(887943),Q=e.i(72287),X=e.i(412522),Z=e.i(431362),$=e.i(808754);let ee=o.forwardRef(function(e,t){let{render:r,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:p="center",sideOffset:d=0,alignOffset:f=0,collisionBoundary:S="clipping-ancestors",collisionPadding:v=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:R=!1,collisionAvoidance:C=O.POPUP_COLLISION_AVOIDANCE,...b}=e,{store:x}=g(),T=function(){let e=o.useContext(K);if(void 0===e)throw Error((0,c.default)(45));return e}(),I=(0,u.useFloatingNodeId)(),y=x.useState("floatingRootContext"),P=x.useState("mounted"),A=x.useState("open"),M=x.useState("openChangeReason"),k=x.useState("activeTriggerElement"),N=x.useState("modal"),j=x.useState("positionerElement"),D=x.useState("instantType"),H=x.useState("transitionStatus"),B=x.useState("hasViewport"),L=o.useRef(null),V=(0,X.useAnimationsFinished)(j,!1,!1),U=(0,J.useAnchorPositioning)({anchor:s,floatingRootContext:y,positionMethod:a,mounted:P,side:l,sideOffset:d,align:p,alignOffset:f,arrowPadding:m,collisionBoundary:S,collisionPadding:v,sticky:h,disableAnchorTracking:R,keepMounted:T,nodeId:I,collisionAvoidance:C,adaptiveOrigin:B?Z.adaptiveOrigin:void 0}),G=o.useMemo(()=>{let e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[A,P,U.positionerStyles]),_=o.useMemo(()=>({props:G,...U}),[G,U]),q=y.useState("domReferenceElement");(0,W.useIsoLayoutEffect)(()=>{let e=L.current;if(q&&(L.current=q),e&&q&&q!==e){x.set("instantType",void 0);let e=new AbortController;return V(()=>{x.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[q,V,x]);let ee={open:A,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:D},et=o.useCallback(e=>{x.set("positionerElement",e)},[x]),en=(0,F.useRenderElement)("div",e,{state:ee,props:[_.props,(0,$.getDisabledMountTransitionStyles)(H),b],ref:[t,et],stateAttributesMapping:w.popupStateMapping});return(0,n.jsxs)(Y.Provider,{value:_,children:[P&&!0===N&&M!==E.REASONS.triggerHover&&(0,n.jsx)(Q.InternalBackdrop,{ref:x.context.internalBackdropRef,inert:(0,z.inertValue)(!A),cutout:k}),(0,n.jsx)(u.FloatingNode,{id:I,children:en})]})});var et=e.i(92615),en=e.i(11931),eo=e.i(511980),er=e.i(809058),ei=e.i(504068),es=e.i(197920),ea=e.i(196368);let el=o.createContext(void 0);function eu(e){let{value:t,children:o}=e;return(0,n.jsx)(el.Provider,{value:t,children:o})}let ep={...w.popupStateMapping,...er.transitionStatusMapping},ec=o.forwardRef(function(e,t){let{className:r,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=g(),p=q(),c=null!=(0,ea.useToolbarRootContext)(!0),{context:d,hasClosePart:f}=function(){let[e,t]=o.useState(0),n=(0,M.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:o.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=u.useState("open"),v=u.useState("openMethod"),m=u.useState("instantType"),h=u.useState("transitionStatus"),R=u.useState("popupProps"),C=u.useState("titleElementId"),b=u.useState("descriptionElementId"),O=u.useState("modal"),x=u.useState("mounted"),T=u.useState("openChangeReason"),I=u.useState("activeTriggerElement"),y=u.useState("floatingRootContext");(0,ei.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),A=u.useState("openOnHover"),k=u.useState("closeDelay");(0,eo.useHoverFloatingInteraction)(y,{enabled:A&&!P,closeDelay:k});let w=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,N={open:S,side:p.side,align:p.align,instant:m,transitionStatus:h},j=o.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,F.useRenderElement)("div",e,{state:N,ref:[t,u.context.popupRef,j],props:[R,{"aria-labelledby":C,"aria-describedby":b,onKeyDown(e){c&&es.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,$.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ep});return(0,n.jsx)(en.FloatingFocusManager,{context:y,openInteractionType:v,modal:!1!==O&&f,disabled:!x||T===E.REASONS.triggerHover,initialFocus:w,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,et.isHTMLElement)(I)?I:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(eu,{value:d,children:D})})}),ed=o.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=g(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:p,arrowStyles:c}=q();return(0,F.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:p},ref:[t,a],props:[{style:c,"aria-hidden":!0},r],stateAttributesMapping:w.popupStateMapping})}),eg={...w.popupStateMapping,...er.transitionStatusMapping},ef=o.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=g(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,F.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===E.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:eg})}),eS=o.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=g(),s=(0,H.useBaseUiId)(r.id);return(0,W.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,F.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),ev=o.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=g(),s=(0,H.useBaseUiId)(r.id);return(0,W.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,F.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),em=o.forwardRef(function(e,t){let n,{render:r,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:p}=(0,k.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:c}=g();return n=o.useContext(el),(0,W.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,F.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){c.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,p]})}),eh=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let eE={activationDirection:e=>e?{"data-activation-direction":e}:null},eC=o.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=g(),{side:a}=q(),l=s.useState("instantType"),{children:u,state:p}=(0,eR.usePopupViewport)({store:s,side:a,cssVars:eh,children:r}),c={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return(0,F.useRenderElement)("div",e,{state:c,ref:t,props:[i,{children:u}],stateAttributesMapping:eE})});class eb{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ed,"Backdrop",0,ef,"Close",0,em,"Description",0,ev,"Handle",0,eb,"Popup",0,ec,"Portal",0,_,"Positioner",0,ee,"Root",0,function(e){return g(!0)?(0,n.jsx)(A,{props:e}):(0,n.jsx)(u.FloatingTree,{children:(0,n.jsx)(A,{props:e})})},"Title",0,eS,"Trigger",0,U,"Viewport",0,eC,"createHandle",0,function(){return new eb}],107641);var eO=e.i(107641),eO=eO,ex=e.i(975157);e.s(["Popover",0,function({...e}){return(0,n.jsx)(eO.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:o=0,side:r="bottom",sideOffset:i=4,...s}){return(0,n.jsx)(eO.Portal,{children:(0,n.jsx)(eO.Positioner,{align:t,alignOffset:o,side:r,sideOffset:i,className:"isolate z-50",children:(0,n.jsx)(eO.Popup,{"data-slot":"popover-content",className:(0,ex.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eO.Trigger,{"data-slot":"popover-trigger",...e})}],337822)},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)},110204,e=>{"use strict";var t=e.i(289721),n=e.i(975157);e.s(["Label",0,function({className:e,...o}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,n.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),...o})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,373884,e=>{"use strict";var t=e.i(514798);let n=(0,t.createServerReference)("402470a32f09e25bab1e3ec4b8f8072f660945d5db",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,n])},337822,e=>{"use strict";var t,n=e.i(289721);e.s([],707132),e.i(707132);var o=e.i(965652),r=e.i(620163),i=e.i(528796),s=e.i(594640),a=e.i(306296),l=e.i(344478),u=e.i(205995),p=e.i(611008);e.i(708878);var c=e.i(462902);let d=o.createContext(void 0);function g(e){let t=o.useContext(d);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var f=e.i(585012),S=e.i(370161),v=e.i(596290),m=e.i(161476),h=e.i(903224),R=e.i(774641),E=e.i(586622),C=e.i(771326),b=e.i(87396),O=e.i(693354);let x={...C.popupStoreSelectors,disabled:(0,v.createSelector)(e=>e.disabled),instantType:(0,v.createSelector)(e=>e.instantType),openMethod:(0,v.createSelector)(e=>e.openMethod),openChangeReason:(0,v.createSelector)(e=>e.openChangeReason),modal:(0,v.createSelector)(e=>e.modal),stickIfOpen:(0,v.createSelector)(e=>e.stickIfOpen),titleElementId:(0,v.createSelector)(e=>e.titleElementId),descriptionElementId:(0,v.createSelector)(e=>e.descriptionElementId),openOnHover:(0,v.createSelector)(e=>e.openOnHover),closeDelay:(0,v.createSelector)(e=>e.closeDelay),hasViewport:(0,v.createSelector)(e=>e.hasViewport)};class T extends S.ReactStore{constructor(e){const t={...(0,C.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:o.createRef(),backdropRef:o.createRef(),internalBackdropRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:o.createRef(),beforeContentFocusGuardRef:o.createRef(),stickIfOpenTimeout:new m.Timeout,triggerElements:new b.PopupTriggerMap},x)}setOpen=(e,t)=>{let n=t.reason===E.REASONS.triggerHover,o=t.reason===E.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===E.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},s=this.state.floatingRootContext.context.events;s?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(O.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),f.flushSync(a)):a(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===E.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,h.useRefWithInit)(()=>new T(t)).current,o=e??n;return(0,R.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var I=e.i(67077),y=e.i(894621),P=e.i(892069);function A({props:e}){let{children:t,open:c,defaultOpen:g=!1,onOpenChange:f,onOpenChangeComplete:S,modal:v=!1,handle:m,triggerId:h,defaultTriggerId:R=null}=e,C=T.useStore(m?.store,{modal:v,open:g,openProp:c,activeTriggerId:R,triggerIdProp:h});(0,i.useOnFirstRender)(()=>{void 0===c&&!1===C.state.open&&!0===g&&C.update({open:!0,activeTriggerId:R})}),C.useControlledProp("openProp",c),C.useControlledProp("triggerIdProp",h);let b=C.useState("open"),O=C.useState("positionerElement"),x=C.useState("payload"),M=C.useState("openChangeReason");C.useContextCallback("onOpenChange",f),C.useContextCallback("onOpenChangeComplete",S);let{openMethod:k,triggerProps:w}=(0,P.useOpenInteractionType)(b);(0,y.useImplicitActiveTrigger)(C);let{forceUnmount:F}=(0,y.useOpenStateTransitions)(b,C,()=>{C.update({stickIfOpen:!0,openChangeReason:null})});(0,r.useScrollLock)(b&&!0===v&&M!==E.REASONS.triggerHover&&"touch"!==k,O),o.useEffect(()=>{b||C.context.stickIfOpenTimeout.clear()},[C,b]);let N=o.useCallback(e=>{let t=(0,I.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{C.set("preventUnmountingOnClose",!0)},t},[C]),j=o.useCallback(()=>{C.setOpen(!1,N(E.REASONS.imperativeAction))},[C,N]);o.useImperativeHandle(e.actionsRef,()=>({unmount:F,close:j}),[F,j]);let D=(0,p.useSyncedFloatingRootContext)({popupStore:C,onOpenChange:C.setOpen}),H=(0,s.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),B=(0,l.useRole)(D),{getReferenceProps:L,getFloatingProps:V,getTriggerProps:U}=(0,a.useInteractions)([H,B]),G=o.useMemo(()=>L(w),[L,w]),K=o.useMemo(()=>U(w),[U,w]),_=o.useMemo(()=>V(),[V]);C.useSyncedValues({modal:v,openMethod:k,activeTriggerProps:G,inactiveTriggerProps:K,popupProps:_,floatingRootContext:D,nested:null!=(0,u.useFloatingParentNodeId)()});let z=o.useMemo(()=>({store:C}),[C]);return(0,n.jsx)(d.Provider,{value:z,children:"function"==typeof t?t({payload:x}):t})}var M=e.i(887642),k=e.i(282109),w=e.i(845756),F=e.i(581263),N=e.i(660272),j=e.i(430557),D=e.i(411657),H=e.i(207516),B=e.i(221732),L=e.i(682354),V=e.i(870541);let U=o.forwardRef(function(e,t){let{render:r,className:i,disabled:s=!1,nativeButton:l=!0,handle:u,payload:p,openOnHover:d=!1,delay:S=300,closeDelay:v=0,id:m,...h}=e,R=g(!0),C=u?.store??R?.store;if(!C)throw Error((0,c.default)(74));let b=(0,H.useBaseUiId)(m),x=C.useState("isTriggerActive",b),T=C.useState("floatingRootContext"),P=C.useState("isOpenedByTrigger",b),A=o.useRef(null),{registerTrigger:U,isMountedByThisTrigger:G}=(0,y.useTriggerDataForwarding)(b,A,C,{payload:p,disabled:s,openOnHover:d,closeDelay:v}),K=C.useState("openChangeReason"),_=C.useState("stickIfOpen"),z=C.useState("openMethod"),W=(0,D.useHoverReferenceInteraction)(T,{enabled:null!=T&&d&&("touch"!==z||K!==E.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,N.safePolygon)(),restMs:S,delay:{close:v},triggerElementRef:A,isActiveTrigger:x}),Y=(0,j.useClick)(T,{enabled:null!=T,stickIfOpen:_}),q=(0,a.useInteractions)([Y]),J=C.useState("triggerProps",G),{getButtonProps:Q,buttonRef:X}=(0,k.useButton)({disabled:s,native:l}),Z=o.useMemo(()=>({open:e=>e&&K===E.REASONS.triggerPress?w.pressableTriggerOpenStateMapping.open(e):w.triggerOpenStateMapping.open(e)}),[K]),$=(0,F.useRenderElement)("button",e,{state:{disabled:s,open:P},ref:[X,t,U,A],props:[q.getReferenceProps(),W,J,{[O.CLICK_TRIGGER_IDENTIFIER]:"",id:b},h,Q],stateAttributesMapping:Z}),ee=o.useRef(null),et=(0,M.useStableCallback)(e=>{f.flushSync(()=>{C.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,V.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,M.useStableCallback)(e=>{let t=C.select("positionerElement");if(t&&(0,V.isOutsideEvent)(e,t))C.context.beforeContentFocusGuardRef.current?.focus();else{f.flushSync(()=>{C.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,V.getTabbableAfterElement)(C.context.triggerFocusTargetRef.current||A.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,V.getNextTabbable)(n))===e)break}n?.focus()}});return x?(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(B.FocusGuard,{ref:ee,onFocus:et}),(0,n.jsx)(o.Fragment,{children:$},b),(0,n.jsx)(B.FocusGuard,{ref:C.context.triggerFocusTargetRef,onFocus:en})]}):(0,n.jsx)(o.Fragment,{children:$},b)});var G=e.i(888393);let K=o.createContext(void 0),_=o.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=g();return i.useState("mounted")||o?(0,n.jsx)(K.Provider,{value:o,children:(0,n.jsx)(G.FloatingPortal,{ref:t,...r})}):null});var z=e.i(831766),W=e.i(804849);let Y=o.createContext(void 0);function q(){let e=o.useContext(Y);if(!e)throw Error((0,c.default)(46));return e}var J=e.i(887943),Q=e.i(72287),X=e.i(412522),Z=e.i(431362),$=e.i(808754);let ee=o.forwardRef(function(e,t){let{render:r,className:i,anchor:s,positionMethod:a="absolute",side:l="bottom",align:p="center",sideOffset:d=0,alignOffset:f=0,collisionBoundary:S="clipping-ancestors",collisionPadding:v=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:R=!1,collisionAvoidance:C=O.POPUP_COLLISION_AVOIDANCE,...b}=e,{store:x}=g(),T=function(){let e=o.useContext(K);if(void 0===e)throw Error((0,c.default)(45));return e}(),I=(0,u.useFloatingNodeId)(),y=x.useState("floatingRootContext"),P=x.useState("mounted"),A=x.useState("open"),M=x.useState("openChangeReason"),k=x.useState("activeTriggerElement"),N=x.useState("modal"),j=x.useState("positionerElement"),D=x.useState("instantType"),H=x.useState("transitionStatus"),B=x.useState("hasViewport"),L=o.useRef(null),V=(0,X.useAnimationsFinished)(j,!1,!1),U=(0,J.useAnchorPositioning)({anchor:s,floatingRootContext:y,positionMethod:a,mounted:P,side:l,sideOffset:d,align:p,alignOffset:f,arrowPadding:m,collisionBoundary:S,collisionPadding:v,sticky:h,disableAnchorTracking:R,keepMounted:T,nodeId:I,collisionAvoidance:C,adaptiveOrigin:B?Z.adaptiveOrigin:void 0}),G=o.useMemo(()=>{let e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!P,style:{...U.positionerStyles,...e}}},[A,P,U.positionerStyles]),_=o.useMemo(()=>({props:G,...U}),[G,U]),q=y.useState("domReferenceElement");(0,W.useIsoLayoutEffect)(()=>{let e=L.current;if(q&&(L.current=q),e&&q&&q!==e){x.set("instantType",void 0);let e=new AbortController;return V(()=>{x.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[q,V,x]);let ee={open:A,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:D},et=o.useCallback(e=>{x.set("positionerElement",e)},[x]),en=(0,F.useRenderElement)("div",e,{state:ee,props:[_.props,(0,$.getDisabledMountTransitionStyles)(H),b],ref:[t,et],stateAttributesMapping:w.popupStateMapping});return(0,n.jsxs)(Y.Provider,{value:_,children:[P&&!0===N&&M!==E.REASONS.triggerHover&&(0,n.jsx)(Q.InternalBackdrop,{ref:x.context.internalBackdropRef,inert:(0,z.inertValue)(!A),cutout:k}),(0,n.jsx)(u.FloatingNode,{id:I,children:en})]})});var et=e.i(92615),en=e.i(11931),eo=e.i(511980),er=e.i(809058),ei=e.i(504068),es=e.i(197920),ea=e.i(196368);let el=o.createContext(void 0);function eu(e){let{value:t,children:o}=e;return(0,n.jsx)(el.Provider,{value:t,children:o})}let ep={...w.popupStateMapping,...er.transitionStatusMapping},ec=o.forwardRef(function(e,t){let{className:r,render:i,initialFocus:s,finalFocus:a,...l}=e,{store:u}=g(),p=q(),c=null!=(0,ea.useToolbarRootContext)(!0),{context:d,hasClosePart:f}=function(){let[e,t]=o.useState(0),n=(0,M.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:o.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=u.useState("open"),v=u.useState("openMethod"),m=u.useState("instantType"),h=u.useState("transitionStatus"),R=u.useState("popupProps"),C=u.useState("titleElementId"),b=u.useState("descriptionElementId"),O=u.useState("modal"),x=u.useState("mounted"),T=u.useState("openChangeReason"),I=u.useState("activeTriggerElement"),y=u.useState("floatingRootContext");(0,ei.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let P=u.useState("disabled"),A=u.useState("openOnHover"),k=u.useState("closeDelay");(0,eo.useHoverFloatingInteraction)(y,{enabled:A&&!P,closeDelay:k});let w=void 0===s?function(e){return"touch"!==e||u.context.popupRef.current}:s,N={open:S,side:p.side,align:p.align,instant:m,transitionStatus:h},j=o.useCallback(e=>{u.set("popupElement",e)},[u]),D=(0,F.useRenderElement)("div",e,{state:N,ref:[t,u.context.popupRef,j],props:[R,{"aria-labelledby":C,"aria-describedby":b,onKeyDown(e){c&&es.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,$.getDisabledMountTransitionStyles)(h),l],stateAttributesMapping:ep});return(0,n.jsx)(en.FloatingFocusManager,{context:y,openInteractionType:v,modal:!1!==O&&f,disabled:!x||T===E.REASONS.triggerHover,initialFocus:w,returnFocus:a,restoreFocus:"popup",previousFocusableElement:(0,et.isHTMLElement)(I)?I:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(eu,{value:d,children:D})})}),ed=o.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=g(),s=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:p,arrowStyles:c}=q();return(0,F.useRenderElement)("div",e,{state:{open:s,side:l,align:u,uncentered:p},ref:[t,a],props:[{style:c,"aria-hidden":!0},r],stateAttributesMapping:w.popupStateMapping})}),eg={...w.popupStateMapping,...er.transitionStatusMapping},ef=o.forwardRef(function(e,t){let{className:n,render:o,...r}=e,{store:i}=g(),s=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,F.useRenderElement)("div",e,{state:{open:s,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===E.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},r],stateAttributesMapping:eg})}),eS=o.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=g(),s=(0,H.useBaseUiId)(r.id);return(0,W.useIsoLayoutEffect)(()=>(i.set("titleElementId",s),()=>{i.set("titleElementId",void 0)}),[i,s]),(0,F.useRenderElement)("h2",e,{ref:t,props:[{id:s},r]})}),ev=o.forwardRef(function(e,t){let{render:n,className:o,...r}=e,{store:i}=g(),s=(0,H.useBaseUiId)(r.id);return(0,W.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",s),()=>{i.set("descriptionElementId",void 0)}),[i,s]),(0,F.useRenderElement)("p",e,{ref:t,props:[{id:s},r]})}),em=o.forwardRef(function(e,t){let n,{render:r,className:i,disabled:s=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:p}=(0,k.useButton)({disabled:s,focusableWhenDisabled:!1,native:a}),{store:c}=g();return n=o.useContext(el),(0,W.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,F.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){c.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,p]})}),eh=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eR=e.i(203667);let eE={activationDirection:e=>e?{"data-activation-direction":e}:null},eC=o.forwardRef(function(e,t){let{render:n,className:o,children:r,...i}=e,{store:s}=g(),{side:a}=q(),l=s.useState("instantType"),{children:u,state:p}=(0,eR.usePopupViewport)({store:s,side:a,cssVars:eh,children:r}),c={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return(0,F.useRenderElement)("div",e,{state:c,ref:t,props:[i,{children:u}],stateAttributesMapping:eE})});class eb{constructor(){this.store=new T}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,I.createChangeEventDetails)(E.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ed,"Backdrop",0,ef,"Close",0,em,"Description",0,ev,"Handle",0,eb,"Popup",0,ec,"Portal",0,_,"Positioner",0,ee,"Root",0,function(e){return g(!0)?(0,n.jsx)(A,{props:e}):(0,n.jsx)(u.FloatingTree,{children:(0,n.jsx)(A,{props:e})})},"Title",0,eS,"Trigger",0,U,"Viewport",0,eC,"createHandle",0,function(){return new eb}],107641);var eO=e.i(107641),eO=eO,ex=e.i(975157);e.s(["Popover",0,function({...e}){return(0,n.jsx)(eO.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:o=0,side:r="bottom",sideOffset:i=4,...s}){return(0,n.jsx)(eO.Portal,{children:(0,n.jsx)(eO.Positioner,{align:t,alignOffset:o,side:r,sideOffset:i,className:"isolate z-50",children:(0,n.jsx)(eO.Popup,{"data-slot":"popover-content",className:(0,ex.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eO.Trigger,{"data-slot":"popover-trigger",...e})}],337822)},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)},110204,e=>{"use strict";var t=e.i(289721),n=e.i(975157);e.s(["Label",0,function({className:e,...o}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,n.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),...o})}])}]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tower-studio",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
5
5
  "bin": {
6
6
  "tower": "bin/tower.mjs"