decocms 4.562.1 → 4.563.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/dist/client/assets/{AlertCircle-Cwj2JDLb.js → AlertCircle-2LbzMVC9.js} +1 -1
  2. package/dist/client/assets/{AreaChart-M71cxP0N.js → AreaChart-qBz2MFzD.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D6im8CSl.js → ArrowLeft-BeuQwyHa.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-zoWFBt83.js → ArrowUp-DmxAfWhF.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-CkRq1ukN.js → CartesianChart-BSwxZ1ZU.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-CJyVrm-b.js → CategoricalChart-DVdTZlRq.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Dycaqr3_.js → CheckCircle-BzNTGMCW.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-Cq__IjWt.js → ChevronSelectorVertical-XdbRnSsi.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B0uKxpVg.js → ChevronUp-aYmfXYet.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-CMHPxKus.js → CreditCard01-yFcUZGe-.js} +1 -1
  11. package/dist/client/assets/{Globe04-BLpPYUUd.js → Globe04-RPMmcIuy.js} +1 -1
  12. package/dist/client/assets/{Key01-KS2Cdqso.js → Key01-jvDltRrN.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-CFo-1erV.js → LinkBroken01-Jybptj_M.js} +1 -1
  14. package/dist/client/assets/{Minus-CR14C6Ew.js → Minus-BqtyYKKc.js} +1 -1
  15. package/dist/client/assets/{Monitor01-PjSuNm4O.js → Monitor01-As0zpJLy.js} +1 -1
  16. package/dist/client/assets/{Play-DAD0wkps.js → Play-CdlorRHF.js} +1 -1
  17. package/dist/client/assets/{Plus-Caq968Zm.js → Plus-CzoopYlU.js} +1 -1
  18. package/dist/client/assets/ReferenceLine-CJng4Q0_.js +1 -0
  19. package/dist/client/assets/{SearchMd-BionSqTl.js → SearchMd-By2dNUiw.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-DUpALglE.js → ShoppingBag01-DhegylE0.js} +1 -1
  21. package/dist/client/assets/{Sun-x19ShBxe.js → Sun-Hd0LHTxB.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-Dghq_Bvd.js → SwitchHorizontal01-Czrqzt6f.js} +1 -1
  23. package/dist/client/assets/{Tool01-GdBdG6P_.js → Tool01-D38zOT0h.js} +1 -1
  24. package/dist/client/assets/{Tooltip-CDDThlKy.js → Tooltip-Dxjn-_yM.js} +1 -1
  25. package/dist/client/assets/{Trash01-DhMVlpac.js → Trash01-BxSWir9J.js} +1 -1
  26. package/dist/client/assets/{Upload01-hsehoAUh.js → Upload01-C8sapTWh.js} +1 -1
  27. package/dist/client/assets/{UserSquare-T5uOviXx.js → UserSquare-CEg-eLCw.js} +1 -1
  28. package/dist/client/assets/{Users01-DDaeVlhF.js → Users01-CMreTMtq.js} +1 -1
  29. package/dist/client/assets/{XClose-NmocES7U.js → XClose-DGifUqyQ.js} +1 -1
  30. package/dist/client/assets/{Zap-aTbgq59l.js → Zap-BLaVFWQx.js} +1 -1
  31. package/dist/client/assets/{access-gate-CpAtBb_h.js → access-gate-BJSZ7nU5.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-BFqv_pWT.js → add-connection-dialog-Dpu5ecJP.js} +1 -1
  33. package/dist/client/assets/agent-app-CHKycGm0.js +1 -0
  34. package/dist/client/assets/agent-assets-7nArEuts.js +1 -0
  35. package/dist/client/assets/{agent-automation-7-KjK-1c.js → agent-automation-Dq1UMpQM.js} +3 -3
  36. package/dist/client/assets/{agent-automations-DnNwxwTt.js → agent-automations-DF3vcb3-.js} +1 -1
  37. package/dist/client/assets/agent-calendar-CsvxRBRw.js +1 -0
  38. package/dist/client/assets/agent-capabilities-CaXbVMop.js +1 -0
  39. package/dist/client/assets/{agent-connect-sources-SuTyB8Qe.js → agent-connect-sources-84FLUgzX.js} +1 -1
  40. package/dist/client/assets/agent-deck-DEx4qeYv.js +1 -0
  41. package/dist/client/assets/agent-e2e-CfTkWgUa.js +1 -0
  42. package/dist/client/assets/agent-experiments-BMy2QOPP.js +1 -0
  43. package/dist/client/assets/agent-file-C7mhhKFK.js +1 -0
  44. package/dist/client/assets/agent-hosting-BmtgVBqV.js +1 -0
  45. package/dist/client/assets/{agent-icon-DD6O0sln.js → agent-icon-U2nlXoBG.js} +1 -1
  46. package/dist/client/assets/agent-library-DIxeSWXa.js +1 -0
  47. package/dist/client/assets/agent-library-file-DQB6i5_0.js +1 -0
  48. package/dist/client/assets/agent-overview-D8ZTdoEM.js +1 -0
  49. package/dist/client/assets/agent-releases-DOPovy0S.js +2 -0
  50. package/dist/client/assets/agent-settings-x3yUV6x9.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-YGSo4JHf.js → agent-site-editor-Pg_WHlnv.js} +2 -2
  52. package/dist/client/assets/agent-site-editor-code-DDscaXHP.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-CBj6Azpl.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-Doqukvwz.js +1 -0
  55. package/dist/client/assets/agent-view-CvpQlU18.js +1 -0
  56. package/dist/client/assets/{agent-view-guard-Ud9RVhUT.js → agent-view-guard-BFnkZyhp.js} +1 -1
  57. package/dist/client/assets/{ai-providers-CdWvTe6E.js → ai-providers-tFJSU00y.js} +1 -1
  58. package/dist/client/assets/{alert-rSlkmSpl.js → alert-B52lXsYB.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-CdJGMHGj.js → analytics-sections-DgZGw207.js} +1 -1
  60. package/dist/client/assets/api-keys-BEFmsf3L.js +1 -0
  61. package/dist/client/assets/{api-keys-CgV7T2W3.js → api-keys-Bc1E8umo.js} +1 -1
  62. package/dist/client/assets/app-editor-a13s_yZZ.js +1 -0
  63. package/dist/client/assets/{asset-utils-DJaTbmOK.js → asset-utils-DxOK6Cj3.js} +1 -1
  64. package/dist/client/assets/{auth-Dfx2bf9S.js → auth-D991fBKg.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-BzI646tE.js → auth-catchall-CO4eQSBG.js} +1 -1
  66. package/dist/client/assets/{auth-entry-BA2dv7O1.js → auth-entry-IOobChfY.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-3t1_TKos.js → auth-split-layout-Dn_4EroD.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-EuyAX3Gy.js → authenticate-and-persist-oauth-CM3iiCDW.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-BK5XD6ZY.js → automation-list-row-sEGCpgiC.js} +1 -1
  70. package/dist/client/assets/{automation-runs-BekfbsHI.js → automation-runs-DnhCJL7r.js} +1 -1
  71. package/dist/client/assets/{automations-ocOVuWpR.js → automations-BopJHgke.js} +1 -1
  72. package/dist/client/assets/{autosend-BLYIlkXq.js → autosend-D6GGYoeu.js} +1 -1
  73. package/dist/client/assets/{badge-9UZ-oy57.js → badge-C9w1KAGQ.js} +1 -1
  74. package/dist/client/assets/{block-document-B5Xpou_B.js → block-document-ExA3sDvi.js} +2 -2
  75. package/dist/client/assets/{blocks-preview-workspace-context-CGoI0EUn.js → blocks-preview-workspace-context-Gbv7_zq8.js} +1 -1
  76. package/dist/client/assets/blocks-tab-states-oXZbJa9b.js +1 -0
  77. package/dist/client/assets/{blog-schema-DMB79fe6.js → blog-schema-4OEvCOpU.js} +1 -1
  78. package/dist/client/assets/{buckets-C5e8GKB5.js → buckets-DsGf5D8D.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc-aExDV9Mz.js → build-improve-prompt-doc-BpZBupFA.js} +1 -1
  80. package/dist/client/assets/{calendar-CKcdkgh5.js → calendar-ahGH-Iwe.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-D8AT7eAw.js → capability-load-error-BG7LprlO.js} +1 -1
  82. package/dist/client/assets/category-editor-Ctbp0oQy.js +1 -0
  83. package/dist/client/assets/{chart-Ch4wXn1G.js → chart-DnblhNHq.js} +1 -1
  84. package/dist/client/assets/{chat-context-tsaqCp6v.js → chat-context-CCj5lauv.js} +2 -2
  85. package/dist/client/assets/{chat-draft-DeOYn8wH.js → chat-draft-BtMWyLm7.js} +1 -1
  86. package/dist/client/assets/{checkbox-bO8ZnM7n.js → checkbox-DB14k3TQ.js} +1 -1
  87. package/dist/client/assets/{choose-editor-B-1DX2pl.js → choose-editor-D4zx1UJt.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-WUcj8Laj.js → cli-auth-success-DeaH4VUx.js} +1 -1
  89. package/dist/client/assets/{client-icons-CJKwmsS5.js → client-icons-C4W9Kqhd.js} +1 -1
  90. package/dist/client/assets/cms-settings-editor-CcuLaEnU.js +1 -0
  91. package/dist/client/assets/cms-store-drafts-BumH78UY.js +1 -0
  92. package/dist/client/assets/{collapsible-CehJ-xlR.js → collapsible-BPEhSNLz.js} +1 -1
  93. package/dist/client/assets/{collection-detail-w7NYTWNb.js → collection-detail-ralZDDkv.js} +1 -1
  94. package/dist/client/assets/{collection-display-button-CVOVdzmi.js → collection-display-button-CigTGx80.js} +1 -1
  95. package/dist/client/assets/{collection-search-Lm88VC-w.js → collection-search-D_oD-yY0.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-LUTykEyP.js → collection-table-wrapper-C2dK4p_4.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-BW9NTpao.js → collection-tabs-SAUXvS4g.js} +1 -1
  98. package/dist/client/assets/{combobox-C8IS_aP5.js → combobox-hVgdYGtQ.js} +1 -1
  99. package/dist/client/assets/{command-B42vqDSm.js → command-DiccrIM8.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-gN7svOR8.js → companion-mcps-section-BUEyDlWy.js} +1 -1
  101. package/dist/client/assets/{config--cZAprAj.js → config-DgUlbPLE.js} +1 -1
  102. package/dist/client/assets/{connect-BAZtz6qy.js → connect-DhpQ_i5Y.js} +3 -3
  103. package/dist/client/assets/{connect-layout-FGHNVpHc.js → connect-layout-Dgb_j_Nn.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-BlacChCY.js → connect-source-dialog-Dga8Dh15.js} +1 -1
  105. package/dist/client/assets/{connection-Brtus8mh.js → connection-DF20RpK_.js} +1 -1
  106. package/dist/client/assets/{connection-card-CSkWTxJN.js → connection-card-DeCnJCAi.js} +1 -1
  107. package/dist/client/assets/{connection-detail-Dz92Js40.js → connection-detail-Dn5XmXHk.js} +1 -1
  108. package/dist/client/assets/{connection-form-helpers-CQaJSXmJ.js → connection-form-helpers-B4MG2Fy2.js} +1 -1
  109. package/dist/client/assets/{connection-slug-DREkgXeA.js → connection-slug-tS8GnOSc.js} +1 -1
  110. package/dist/client/assets/{connections-BZUJ_roU.js → connections-DREB4U2P.js} +1 -1
  111. package/dist/client/assets/{content-tab-Bc_Tg1a4.js → content-tab-kF-GtTU9.js} +8 -8
  112. package/dist/client/assets/context-Gpy7m9cw.js +1 -0
  113. package/dist/client/assets/{context-menu-D-JkcRvL.js → context-menu-vUs3I8Wh.js} +1 -1
  114. package/dist/client/assets/{context-shell-Bwve3xDx.js → context-shell-vU2YMH1K.js} +3 -3
  115. package/dist/client/assets/{core.esm-ByTukYOF.js → core.esm-CWyzckxm.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-BIe1f-Sz.js → create-organization-dialog-qsB5dfrW.js} +1 -1
  117. package/dist/client/assets/device-hint-DMMaEP-p.js +1 -0
  118. package/dist/client/assets/{discover-D050EtE3.js → discover-DN-I6i-O.js} +1 -1
  119. package/dist/client/assets/{domain-settings-DPbJEdjs.js → domain-settings-FZeIPnhT.js} +1 -1
  120. package/dist/client/assets/{drawer-Dijofbhl.js → drawer-CMTReHxa.js} +1 -1
  121. package/dist/client/assets/{editor-BODVgWYK.js → editor-C6CE2FNQ.js} +1 -1
  122. package/dist/client/assets/{editor-classes-BdpfcKyR.js → editor-classes-DbMPYB4Z.js} +1 -1
  123. package/dist/client/assets/{empty-state-Drt9QRbX.js → empty-state-DF9St1T6.js} +1 -1
  124. package/dist/client/assets/{empty-state-CwfRxt_B.js → empty-state-ovRL7NEK.js} +1 -1
  125. package/dist/client/assets/experiments-tab-choice-BXlwzycK.js +1 -0
  126. package/dist/client/assets/{extract-connection-data-Pe-Tip3g.js → extract-connection-data-Q1k0ncm3.js} +1 -1
  127. package/dist/client/assets/{feature-gate-2Z3FyCIy.js → feature-gate-DKF86Lcy.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-CpM-erQe.js → feature-paywall-BoU9TII8.js} +1 -1
  129. package/dist/client/assets/{feedback-DcWPFhR_.js → feedback-f3MT17uD.js} +1 -1
  130. package/dist/client/assets/{file-explorer-xWdf34ip.js → file-explorer-DmvPCizi.js} +2 -2
  131. package/dist/client/assets/{file-preview-Ca_4k6rv.js → file-preview-aD0sVwV5.js} +1 -1
  132. package/dist/client/assets/{file-share-button-DgOCZ5mM.js → file-share-button-agT85qGG.js} +2 -2
  133. package/dist/client/assets/{file-type-icon-DiS0iV28.js → file-type-icon-CflTIvHJ.js} +1 -1
  134. package/dist/client/assets/{folder-icon-swAD3bQU.js → folder-icon-BKhbsJwX.js} +1 -1
  135. package/dist/client/assets/{form-CRja9i9j.js → form-B_3ZthF3.js} +1 -1
  136. package/dist/client/assets/{general-C7SfdAAF.js → general-BdjsCK2j.js} +1 -1
  137. package/dist/client/assets/{github-icon-tpEVyIwD.js → github-icon-M-2WiP3Y.js} +1 -1
  138. package/dist/client/assets/home-dTYjLEfm.js +1 -0
  139. package/dist/client/assets/{home-overview-CMI03yPH.js → home-overview-BAVfF6qS.js} +1 -1
  140. package/dist/client/assets/hosted-reconcile-B3o4dv7j.js +1 -0
  141. package/dist/client/assets/{icon-button-BZ9f2Pt9.js → icon-button-DQuPTgIB.js} +1 -1
  142. package/dist/client/assets/{index-Z8XjhDCo.js → index-0kopV6YP.js} +2 -2
  143. package/dist/client/assets/{index-68Cr2r1N.js → index-2bmOBUEF.js} +1 -1
  144. package/dist/client/assets/{index-LnWr599j.js → index-BM0DSfBG.js} +1 -1
  145. package/dist/client/assets/{index-Cvc22Qvh.js → index-BZX-7ipZ.js} +45 -45
  146. package/dist/client/assets/index-BlTJ0I-U.js +4 -0
  147. package/dist/client/assets/{index-C2wTYLQr.js → index-BvJNHE6H.js} +6 -6
  148. package/dist/client/assets/{index-CbuCRTrW.js → index-C2-s3ia2.js} +1 -1
  149. package/dist/client/assets/{index-CcZq_9Fb.js → index-C81DBcO6.js} +1 -1
  150. package/dist/client/assets/{index-BGom2FnM.js → index-Cjc_aSrk.js} +1 -1
  151. package/dist/client/assets/{index-Dw1u8oXT.js → index-D7Mi9FGh.js} +1 -1
  152. package/dist/client/assets/{index-Dt7ZIwRY.js → index-DHMhIfTt.js} +1 -1
  153. package/dist/client/assets/{index-D0G5dFqT.js → index-DT3lYd1R.js} +1 -1
  154. package/dist/client/assets/{index-CZXPJi4-.js → index-DzmcFP3y.js} +1 -1
  155. package/dist/client/assets/index-SmuiYnIl.css +1 -0
  156. package/dist/client/assets/{index-DQAtcq3Z.js → index-cmF_qGuq.js} +1 -1
  157. package/dist/client/assets/{index-BW7-bbk0.js → index-iezPx7cK.js} +1 -1
  158. package/dist/client/assets/index-mtR249ru.js +1 -0
  159. package/dist/client/assets/{index-redirect-PbFd_QHU.js → index-redirect-ay83YA5a.js} +1 -1
  160. package/dist/client/assets/{infiniteQueryObserver-CmujZk55.js → infiniteQueryObserver-CQGSlzKO.js} +1 -1
  161. package/dist/client/assets/{infra-billing-BlZrBUYP.js → infra-billing-DUjivW_p.js} +1 -1
  162. package/dist/client/assets/{input-D6ZRMHIB.js → input-3OyhKW_c.js} +1 -1
  163. package/dist/client/assets/input-CcFFY__7.js +17 -0
  164. package/dist/client/assets/{integration-icon-DMt85Vdd.js → integration-icon-Btk7lWbK.js} +1 -1
  165. package/dist/client/assets/{jira-icon-C0C7R9Uf.js → jira-icon-TeK8CaRV.js} +1 -1
  166. package/dist/client/assets/{label-RB5C5N6z.js → label-BGCn7A0y.js} +1 -1
  167. package/dist/client/assets/{layout-CBfnb3CZ.js → layout-XVKa9Y6f.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-zWqSTSjP.js → legacy-agents-deep-DksTbOzF.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-BZlpoESe.js → legacy-main-redirect-8kA2UC85.js} +1 -1
  170. package/dist/client/assets/library-O1-Gs4qz.js +1 -0
  171. package/dist/client/assets/{library-tab-C7gKe5iN.js → library-tab-DJKD7rUC.js} +3 -3
  172. package/dist/client/assets/{login-D9zRzHBo.js → login-CH5yud2M.js} +1 -1
  173. package/dist/client/assets/{markdown-HhU9_nSI.js → markdown-B6eeRWQb.js} +1 -1
  174. package/dist/client/assets/{mcp-app-renderer-DeLjk14w.js → mcp-app-renderer-DwuRGgZk.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-DLwsgkOm.js → mcp-oauth-BvqIKSqR.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-C-i6IZ7F.js → mcp-oauth-Bz1Lo9Pk.js} +1 -1
  177. package/dist/client/assets/{members-DocomT72.js → members-FYjquUkN.js} +1 -1
  178. package/dist/client/assets/{memory-BP3-K3oo.js → memory-CoUl94G3.js} +1 -1
  179. package/dist/client/assets/{mock-board-CoWf0eSd.js → mock-board-DvOE8ZQh.js} +4 -4
  180. package/dist/client/assets/{monaco-editor-oUmtqDLR.js → monaco-editor-vUgphdkE.js} +1 -1
  181. package/dist/client/assets/monitoring-UUQquQf7.js +2 -0
  182. package/dist/client/assets/{monitoring-stats-row-XSvwSWAi.js → monitoring-stats-row-BY92i-Bt.js} +1 -1
  183. package/dist/client/assets/{multi-select-CISJC82c.js → multi-select-9ieJQPsD.js} +1 -1
  184. package/dist/client/assets/mustache-CgF6ozKS.js +4 -0
  185. package/dist/client/assets/named-rule-view-CdhLqAy7.js +1 -0
  186. package/dist/client/assets/{new-project-dialog-BA0jmhgS.js → new-project-dialog-EK9WMEhp.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-C1NevZMJ.js → oauth-callback-Cuv6PAYs.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-BJwoy8qA.js → oauth-callback-ai-provider-BGc97raN.js} +1 -1
  189. package/dist/client/assets/{oauth-consent-BTT41r6l.js → oauth-consent-fGbsmdGY.js} +1 -1
  190. package/dist/client/assets/{onboarding-C2uIwwWY.js → onboarding-DF5AGUdi.js} +1 -1
  191. package/dist/client/assets/openai-conversation-CMIme_Ur.js +3 -0
  192. package/dist/client/assets/{optimistic-project-sidebar-views-BnUNFsLR.js → optimistic-project-sidebar-views-mQ0HUqGi.js} +1 -1
  193. package/dist/client/assets/{order-monitor-day-BzMajB7Y.js → order-monitor-day-BPx4Aihv.js} +1 -1
  194. package/dist/client/assets/{organization-choice-5ra3ZqkQ.js → organization-choice-KNGQur5O.js} +1 -1
  195. package/dist/client/assets/{orgs-ZeqGcjOU.js → orgs-C5Zlwg3I.js} +1 -1
  196. package/dist/client/assets/{own-accounts-section-Dd8ELrvu.js → own-accounts-section-C_F0-lzr.js} +1 -1
  197. package/dist/client/assets/{pair-Bx1LbJmC.js → pair-C5KKQk8r.js} +7 -7
  198. package/dist/client/assets/{parse-sections-BTDQNPKy.js → parse-sections-DE2O_vev.js} +7 -7
  199. package/dist/client/assets/{plan-bz8_rmrJ.js → plan-DdvgvWt2.js} +1 -1
  200. package/dist/client/assets/{plan-ladder-CZUMQESY.js → plan-ladder-BQ0gcfdF.js} +1 -1
  201. package/dist/client/assets/{plan-usage-card-SygAb3OS.js → plan-usage-card-8-3zMqsW.js} +2 -2
  202. package/dist/client/assets/{popover-D5YX99Kp.js → popover-CkuSZicN.js} +1 -1
  203. package/dist/client/assets/post-calendar-DVrcXuZq.js +1 -0
  204. package/dist/client/assets/{post-editor-BAf1z147.js → post-editor-CG6NXsGN.js} +2 -2
  205. package/dist/client/assets/{preview-content-TDEad-bh.js → preview-content-xRBU7B3O.js} +1 -1
  206. package/dist/client/assets/{preview-dialog-BkHpQdXG.js → preview-dialog-D36kXBk6.js} +1 -1
  207. package/dist/client/assets/{preview-panel-DduOnxXk.js → preview-panel-Cp7F1lqp.js} +1 -1
  208. package/dist/client/assets/preview-tab-Dn0RGnhj.js +551 -0
  209. package/dist/client/assets/{product-picker-dialog-DDkB9ByB.js → product-picker-dialog-C2KLekZA.js} +1 -1
  210. package/dist/client/assets/{profile-DHJVxDvo.js → profile-BfDfzRPA.js} +1 -1
  211. package/dist/client/assets/project-app-view-DVhAuH9N.js +1 -0
  212. package/dist/client/assets/project-apps-D47w7eJj.js +1 -0
  213. package/dist/client/assets/{project-icon-eZOGIGwj.js → project-icon-ofE-LDok.js} +1 -1
  214. package/dist/client/assets/{project-index-BSMjLbxc.js → project-index-PpuyCKHe.js} +1 -1
  215. package/dist/client/assets/project-reports-BuJS86vH.js +1 -0
  216. package/dist/client/assets/project-sidebar-views-Dew_3OKS.js +1 -0
  217. package/dist/client/assets/project-tasks-CZtVWSYo.js +1 -0
  218. package/dist/client/assets/{projects-D7HB1QKY.js → projects-Be7d593_.js} +1 -1
  219. package/dist/client/assets/{projects-empty-state-DBWek16Y.js → projects-empty-state-DpmH0sch.js} +1 -1
  220. package/dist/client/assets/{prompts-MMmII7eb.js → prompts-ClmMS_OK.js} +1 -1
  221. package/dist/client/assets/record-editor-OoLxSu9R.js +1 -0
  222. package/dist/client/assets/redirect-editor-W9B4A_h8.js +1 -0
  223. package/dist/client/assets/{reports-D0VzI1C_.js → reports-DCsJlho1.js} +1 -1
  224. package/dist/client/assets/{reports-onboarding-DonafHiF.js → reports-onboarding-CMTzWUTp.js} +1 -1
  225. package/dist/client/assets/reports-s2E9cwFc.js +1 -0
  226. package/dist/client/assets/{reports-tab-Wl9IyKm6.js → reports-tab-BKnG1JmX.js} +2 -2
  227. package/dist/client/assets/repositories-Dj2kaTIN.js +1 -0
  228. package/dist/client/assets/{repositories-9kTJbSW8.js → repositories-KlUH4dUR.js} +1 -1
  229. package/dist/client/assets/{repository-binding-B7A7NBUB.js → repository-binding-CqOunspI.js} +1 -1
  230. package/dist/client/assets/{repository-picker-CI7xSsin.js → repository-picker-DNdEQtlZ.js} +1 -1
  231. package/dist/client/assets/{require-capability-BTBUQsVM.js → require-capability-RYn3iksk.js} +1 -1
  232. package/dist/client/assets/{required-auth-layout-ClYF4eFR.js → required-auth-layout-Dfyc4Zas.js} +1 -1
  233. package/dist/client/assets/{reset-password-Ah3K7D-l.js → reset-password-CTGJ7V-t.js} +1 -1
  234. package/dist/client/assets/{resizable-DzzgKGKP.js → resizable-BCGqPRic.js} +1 -1
  235. package/dist/client/assets/resolve-tab-icon-BnqDq-fY.js +1 -0
  236. package/dist/client/assets/{review-settings-Fxdols3J.js → review-settings-DvoYyrmi.js} +1 -1
  237. package/dist/client/assets/{role-color-CEkb11P4.js → role-color-cUMHSMVi.js} +1 -1
  238. package/dist/client/assets/{roles-CqJ0hOtT.js → roles-x3B4vLKU.js} +1 -1
  239. package/dist/client/assets/route-PbputQp9.js +1 -0
  240. package/dist/client/assets/route-h-Fc_oVe.js +1 -0
  241. package/dist/client/assets/route-wINBwrny.js +1 -0
  242. package/dist/client/assets/sandbox-lifecycle-context-CXwLCWvJ.js +1 -0
  243. package/dist/client/assets/{schema-BH82js-o.js → schema-C1bLOk3P.js} +1 -1
  244. package/dist/client/assets/{schema-DHahXPsT.js → schema-DHLwjAWR.js} +1 -1
  245. package/dist/client/assets/{scroll-area-BN87AboJ.js → scroll-area-rELMi4e6.js} +1 -1
  246. package/dist/client/assets/{search-input-BBYghT-z.js → search-input-Crult1Qo.js} +1 -1
  247. package/dist/client/assets/{search-toggle-pLnMgrhP.js → search-toggle-DzMf9QP4.js} +1 -1
  248. package/dist/client/assets/{secret-picker-DWWFQJzg.js → secret-picker-CimF9dsx.js} +1 -1
  249. package/dist/client/assets/{secrets-CM4b3_qA.js → secrets-CZCnF6s4.js} +1 -1
  250. package/dist/client/assets/section-array-field-C3Tpx16b.js +1 -0
  251. package/dist/client/assets/{sections-CgO1w_IT.js → sections-346PcP2T.js} +1 -1
  252. package/dist/client/assets/sections-editor-DwV32_3f.js +1 -0
  253. package/dist/client/assets/{select-GzsOSPza.js → select-CwDmbwEv.js} +1 -1
  254. package/dist/client/assets/{select-model-BU2ssn1V.js → select-model-B1ocDBwF.js} +1 -1
  255. package/dist/client/assets/seo-editor-D1gGpMMF.js +1 -0
  256. package/dist/client/assets/{separator-CuwdHpjW.js → separator-C05SxAdn.js} +1 -1
  257. package/dist/client/assets/settings-tab-BImv5HgS.js +1 -0
  258. package/dist/client/assets/{sheet-BIQm-3An.js → sheet-BYgfxL9i.js} +1 -1
  259. package/dist/client/assets/{shell-layout-CH0j9rog.js → shell-layout-BvJfyzsq.js} +1 -1
  260. package/dist/client/assets/site-draft-actions-CgeV78uL.js +3 -0
  261. package/dist/client/assets/site-draft-view-Dkq2XweK.js +1 -0
  262. package/dist/client/assets/site-editor-B9ARkCiN.js +1 -0
  263. package/dist/client/assets/site-editor-toast-D83gMpdg.js +1 -0
  264. package/dist/client/assets/{skills-C71x-yhC.js → skills-OVV2oEwU.js} +1 -1
  265. package/dist/client/assets/{slider-BTgIuWj6.js → slider-Ipy9G5jv.js} +1 -1
  266. package/dist/client/assets/{sortable.esm-Dd1EVaQb.js → sortable.esm-DgwAq-fn.js} +1 -1
  267. package/dist/client/assets/{sso-BfwIPTh8.js → sso-C9cutlah.js} +1 -1
  268. package/dist/client/assets/{suggestion-CsEyXKDY.js → suggestion-Dwy6qysF.js} +1 -1
  269. package/dist/client/assets/{switch-BRZA_xq0.js → switch-BLkpF22m.js} +1 -1
  270. package/dist/client/assets/{synced-repos-Do7bESqI.js → synced-repos-orJHnVxs.js} +1 -1
  271. package/dist/client/assets/{tab-icon-glyph-BsVyyg_A.js → tab-icon-glyph-Co1M723I.js} +1 -1
  272. package/dist/client/assets/{table-DJd8n4EY.js → table-DPFxRA7S.js} +1 -1
  273. package/dist/client/assets/{tabs-D5AMuciq.js → tabs--wmPR0cZ.js} +1 -1
  274. package/dist/client/assets/{task-board-DN88kD7h.js → task-board-DJtwkz3O.js} +1 -1
  275. package/dist/client/assets/{task-route-4C0M-4XY.js → task-route-vCMrJPp9.js} +1 -1
  276. package/dist/client/assets/{task-status-B2JNuBbQ.js → task-status-msgu5x2s.js} +1 -1
  277. package/dist/client/assets/{taskboard-analytics-D_AXxVNg.js → taskboard-analytics-5nxg7YXN.js} +1 -1
  278. package/dist/client/assets/{tasks-dMEgvkta.js → tasks-DpWVcTLT.js} +1 -1
  279. package/dist/client/assets/tasks-hbXv3hSd.js +1 -0
  280. package/dist/client/assets/{textarea-D7HQlMVo.js → textarea-D5OF_Tld.js} +1 -1
  281. package/dist/client/assets/{thread-analytics-BQjHh_yV.js → thread-analytics-CVsji2MZ.js} +1 -1
  282. package/dist/client/assets/{thread-intent-Bs-Q7fma.js → thread-intent-DIce2mks.js} +2 -2
  283. package/dist/client/assets/{thread-route-C-uX4C4C.js → thread-route-CGqDFJ1K.js} +1 -1
  284. package/dist/client/assets/{thread-route-B44higRI.js → thread-route-CP2TR6nw.js} +1 -1
  285. package/dist/client/assets/{thread-sheet-body-BNo76_XD.js → thread-sheet-body-Cba15kJF.js} +1 -1
  286. package/dist/client/assets/{time-range-picker-D4sglVBw.js → time-range-picker-OdWLHy9U.js} +1 -1
  287. package/dist/client/assets/{toggle-group-BBgjmF6C.js → toggle-group-DbLOGwe7.js} +1 -1
  288. package/dist/client/assets/{tool-namespace-l4eN7YZ5.js → tool-namespace-BQhkJpu9.js} +1 -1
  289. package/dist/client/assets/{tool-set-selector-Bi-Sw2KD.js → tool-set-selector-BmAnaEsw.js} +1 -1
  290. package/dist/client/assets/{toolbar-icon-button-nrUHQe-I.js → toolbar-icon-button-BzIcnxXk.js} +1 -1
  291. package/dist/client/assets/{tooltip-C0GWPsi8.js → tooltip--uPFG1gb.js} +1 -1
  292. package/dist/client/assets/{tooltipContext-DdEokZtY.js → tooltipContext-C8ArdkXW.js} +1 -1
  293. package/dist/client/assets/{track-29FVOdFL.js → track-Bb4064-s.js} +1 -1
  294. package/dist/client/assets/{types-DKuFfsqr.js → types-EjHtXl5u.js} +1 -1
  295. package/dist/client/assets/{url-slug-5t39ocbn.js → url-slug-rCJqhuIp.js} +1 -1
  296. package/dist/client/assets/{usage-stats-CHeI7dPd.js → usage-stats-DaOtdhEm.js} +2 -2
  297. package/dist/client/assets/{use-ai-providers-BbVlPdZd.js → use-ai-providers-C5rCFpU_.js} +1 -1
  298. package/dist/client/assets/{use-apply-named-rule-CnOcORn0.js → use-apply-named-rule-zZmpVvRd.js} +1 -1
  299. package/dist/client/assets/use-ask-in-chat-BaG9i0zc.js +1 -0
  300. package/dist/client/assets/{use-automations-BoyfX_H0.js → use-automations-CI7vvUzE.js} +1 -1
  301. package/dist/client/assets/{use-autosave-CZD-Fkyk.js → use-autosave-DUBcsRSH.js} +1 -1
  302. package/dist/client/assets/use-blocks-v8-project-CXrKL60y.js +1 -0
  303. package/dist/client/assets/{use-chat-layout-state-BC5WrKKn.js → use-chat-layout-state-CZaSk8YF.js} +1 -1
  304. package/dist/client/assets/{use-cms-publish-actions-BbDVRUuf.js → use-cms-publish-actions-BV2nwL3g.js} +5 -5
  305. package/dist/client/assets/{use-connect-companion-DEAJWvqA.js → use-connect-companion-DC6UOpxV.js} +1 -1
  306. package/dist/client/assets/{use-connection-Dqyf1wn8.js → use-connection-BEb786wf.js} +1 -1
  307. package/dist/client/assets/{use-content-sync-vr73v2b2.js → use-content-sync-CtHfpBJp.js} +1 -1
  308. package/dist/client/assets/{use-copy-BGfQrJIh.js → use-copy-DccRTYvG.js} +1 -1
  309. package/dist/client/assets/{use-date-fns-locale-C4jbLuwI.js → use-date-fns-locale-DD1YxYKP.js} +1 -1
  310. package/dist/client/assets/{use-debounced-autosave-BrjHHNNB.js → use-debounced-autosave-clO2CzWE.js} +1 -1
  311. package/dist/client/assets/{use-debounced-value-BF84eZeF.js → use-debounced-value-CJpdUTvG.js} +1 -1
  312. package/dist/client/assets/{use-deco-credits-MCc3vHir.js → use-deco-credits-DtE2LNZs.js} +1 -1
  313. package/dist/client/assets/{use-decopilot-events-uSeDcfUe.js → use-decopilot-events-DxBT3zOC.js} +1 -1
  314. package/dist/client/assets/{use-delete-connection-CLe-XFxn.js → use-delete-connection-COvFjvtJ.js} +1 -1
  315. package/dist/client/assets/{use-deployment-admin-ShnoFTNr.js → use-deployment-admin-BSEuekHe.js} +1 -1
  316. package/dist/client/assets/{use-entitlements-wE65MYfi.js → use-entitlements-CWXMyUT0.js} +1 -1
  317. package/dist/client/assets/use-fast-preview-draft-url-BCmBxVQg.js +1 -0
  318. package/dist/client/assets/{use-file-configs-D9BR1kJU.js → use-file-configs-DsyBYIJw.js} +1 -1
  319. package/dist/client/assets/{use-id-selection-BcfcmGZl.js → use-id-selection-6CmUdc1s.js} +1 -1
  320. package/dist/client/assets/{use-inbox-feed-EYADn16y.js → use-inbox-feed-okLCp4Pp.js} +1 -1
  321. package/dist/client/assets/{use-infinite-scroll-Ds1Wd1cw.js → use-infinite-scroll-4e7tB3Vz.js} +1 -1
  322. package/dist/client/assets/{use-join-requests-CkWiAH0i.js → use-join-requests-muPMmn0O.js} +1 -1
  323. package/dist/client/assets/use-main-panel-tabs-BcP_qZl8.js +1 -0
  324. package/dist/client/assets/use-mcp-auth-status-D_TqnxnH.js +1 -0
  325. package/dist/client/assets/{use-mcp-client-BfCmeMHR.js → use-mcp-client-CrdyqnFt.js} +1 -1
  326. package/dist/client/assets/{use-mcp-prompts-DoojBZhS.js → use-mcp-prompts-C3SHzM_d.js} +1 -1
  327. package/dist/client/assets/{use-mcp-tools-DwTtnjNb.js → use-mcp-tools-DQIJMlw-.js} +1 -1
  328. package/dist/client/assets/{use-mobile-C1stVK0E.js → use-mobile-BDWitdax.js} +1 -1
  329. package/dist/client/assets/use-move-blocks-B48xFUbp.js +1 -0
  330. package/dist/client/assets/{use-navigate-to-agent-D2d0cpFU.js → use-navigate-to-agent-C3sX18jI.js} +1 -1
  331. package/dist/client/assets/{use-org-fs-DHnEDbF9.js → use-org-fs-BRERSVus.js} +1 -1
  332. package/dist/client/assets/{use-org-repo-syncs-CcoLGdUP.js → use-org-repo-syncs-BFFdo3jR.js} +1 -1
  333. package/dist/client/assets/{use-org-sso-d82WgyRM.js → use-org-sso-BHDTii7j.js} +1 -1
  334. package/dist/client/assets/{use-organization-settings-a6mUKPHv.js → use-organization-settings-DPCrcu8e.js} +1 -1
  335. package/dist/client/assets/{use-project-scope-C0EKXyqg.js → use-project-scope-k7OaKjIm.js} +1 -1
  336. package/dist/client/assets/{use-recent-apps-DEMyNf2W.js → use-recent-apps-Buo9cWvj.js} +1 -1
  337. package/dist/client/assets/{use-reports-diagnostic-rjeHGSYu.js → use-reports-diagnostic-B1lbI319.js} +1 -1
  338. package/dist/client/assets/use-sandbox-events-BRJYKM54.js +2 -0
  339. package/dist/client/assets/{use-secrets-CifnNbah.js → use-secrets-DlNiP0j4.js} +1 -1
  340. package/dist/client/assets/use-section-preview-base-CL9U3MEc.js +1 -0
  341. package/dist/client/assets/use-sidebar-collapsed-ByMTBVZc.js +1 -0
  342. package/dist/client/assets/{use-tags-CgXVAtG9.js → use-tags-CcJayzHf.js} +1 -1
  343. package/dist/client/assets/{use-task-board-analytics-BTZNDNnK.js → use-task-board-analytics-0-6_3j_2.js} +1 -1
  344. package/dist/client/assets/{use-task-board-events-DCguN7A5.js → use-task-board-events-CzDIUBok.js} +1 -1
  345. package/dist/client/assets/{use-task-board-item-prs-CnqmEndd.js → use-task-board-item-prs-DbHC-4Ry.js} +1 -1
  346. package/dist/client/assets/{use-task-board-items-BmpaMZkF.js → use-task-board-items-COxHF7_K.js} +1 -1
  347. package/dist/client/assets/{use-task-board-prompts-DdSO4gLi.js → use-task-board-prompts-CKi9j8wF.js} +1 -1
  348. package/dist/client/assets/{use-task-metadata-D3xqf4sH.js → use-task-metadata-BxcNhivS.js} +1 -1
  349. package/dist/client/assets/{use-thread-outputs-D6sQTVJo.js → use-thread-outputs-lMVF4bT2.js} +1 -1
  350. package/dist/client/assets/use-voice-input-DsJxHyTh.js +1 -0
  351. package/dist/client/assets/useInfiniteQuery-B313haH3.js +1 -0
  352. package/dist/client/assets/{useQueries-BuMODvFG.js → useQueries-BO8pZ9q-.js} +1 -1
  353. package/dist/client/assets/useSuspenseInfiniteQuery-07GrICuv.js +1 -0
  354. package/dist/client/assets/{users-Ct3PwBMT.js → users-DCPPe9Uo.js} +1 -1
  355. package/dist/client/assets/{utils-DA49HMaO.js → utils-D0xixM8q.js} +3 -3
  356. package/dist/client/assets/{variant-calendar-CPtUMCAS.js → variant-calendar-C5r0ak32.js} +1 -1
  357. package/dist/client/assets/{variant-matcher-override-DnlLYEoa.js → variant-matcher-override-QQd3tA7f.js} +1 -1
  358. package/dist/client/assets/{view-header-CAO18iqy.js → view-header-BPAnt0vh.js} +1 -1
  359. package/dist/client/assets/{virtual-mcp-C4mAz3N8.js → virtual-mcp-Dzr3mFmO.js} +1 -1
  360. package/dist/client/assets/{watch-sse-pool-BI4P-Lkx.js → watch-sse-pool-j0K-nQ0i.js} +1 -1
  361. package/dist/client/index.html +2 -2
  362. package/dist/server/server.js +464 -464
  363. package/package.json +1 -1
  364. package/dist/client/assets/ReferenceLine-DEAQfOjW.js +0 -1
  365. package/dist/client/assets/agent-app-ZW_Vm-c7.js +0 -1
  366. package/dist/client/assets/agent-assets-kQe7VufN.js +0 -1
  367. package/dist/client/assets/agent-calendar-CbAiDaBT.js +0 -1
  368. package/dist/client/assets/agent-capabilities-DKq2l6j_.js +0 -1
  369. package/dist/client/assets/agent-deck-8VVMhl7J.js +0 -1
  370. package/dist/client/assets/agent-e2e-C9FJgu1a.js +0 -1
  371. package/dist/client/assets/agent-file-D5ZobkO7.js +0 -1
  372. package/dist/client/assets/agent-hosting-Df5G-pNf.js +0 -1
  373. package/dist/client/assets/agent-library-C_HTRhOS.js +0 -1
  374. package/dist/client/assets/agent-library-file-8gKy0Im-.js +0 -1
  375. package/dist/client/assets/agent-overview-CSsPaJjm.js +0 -1
  376. package/dist/client/assets/agent-releases-6IDVzk1I.js +0 -2
  377. package/dist/client/assets/agent-settings-uWS3yWiw.js +0 -1
  378. package/dist/client/assets/agent-site-editor-code-wtgSW_Bw.js +0 -2
  379. package/dist/client/assets/agent-site-editor-content-BC5jgNMj.js +0 -1
  380. package/dist/client/assets/agent-site-editor-preview-Dd0H-yKP.js +0 -1
  381. package/dist/client/assets/agent-view-C4jCWfsN.js +0 -1
  382. package/dist/client/assets/api-keys-CmWPTVBS.js +0 -1
  383. package/dist/client/assets/app-editor-DQrUb2qq.js +0 -1
  384. package/dist/client/assets/blocks-tab-states-CNkB95lx.js +0 -1
  385. package/dist/client/assets/category-editor-DDFXYf_d.js +0 -1
  386. package/dist/client/assets/cms-settings-editor-CL1HXF3j.js +0 -1
  387. package/dist/client/assets/cms-store-drafts-C_ZG08jQ.js +0 -1
  388. package/dist/client/assets/context-2NK4t-Lg.js +0 -1
  389. package/dist/client/assets/device-hint-Djy4F7LR.js +0 -1
  390. package/dist/client/assets/home-DsrjQvGT.js +0 -1
  391. package/dist/client/assets/hosted-reconcile-BnVn2LVL.js +0 -1
  392. package/dist/client/assets/index-B8Pa92mK.js +0 -4
  393. package/dist/client/assets/index-D-DRzVEB.js +0 -2
  394. package/dist/client/assets/index-ug7KC70Z.css +0 -1
  395. package/dist/client/assets/input-C7_FCkgY.js +0 -17
  396. package/dist/client/assets/library-pMQg4GCR.js +0 -1
  397. package/dist/client/assets/monitoring-DKfNSCeR.js +0 -2
  398. package/dist/client/assets/mustache-D4zVU9iA.js +0 -4
  399. package/dist/client/assets/named-rule-view-BTwHmZ5L.js +0 -1
  400. package/dist/client/assets/openai-conversation-pUSF1vof.js +0 -3
  401. package/dist/client/assets/post-calendar-BIBU13NF.js +0 -1
  402. package/dist/client/assets/preview-tab-Cgfndmyh.js +0 -551
  403. package/dist/client/assets/project-app-view-BfcPf6du.js +0 -1
  404. package/dist/client/assets/project-apps-Bny6_T2A.js +0 -1
  405. package/dist/client/assets/project-reports-BzA8d8hO.js +0 -1
  406. package/dist/client/assets/project-sidebar-views-CrRbPbLq.js +0 -1
  407. package/dist/client/assets/project-tasks-BCE2SgoF.js +0 -1
  408. package/dist/client/assets/record-editor-DVouiUmR.js +0 -1
  409. package/dist/client/assets/redirect-editor-cm3-huyu.js +0 -1
  410. package/dist/client/assets/reports-BHAVwnBG.js +0 -1
  411. package/dist/client/assets/repositories-bPxFm30V.js +0 -1
  412. package/dist/client/assets/resolve-tab-icon-DMbVCUvi.js +0 -1
  413. package/dist/client/assets/route-BA7jjOjA.js +0 -1
  414. package/dist/client/assets/route-DGCMYgfH.js +0 -1
  415. package/dist/client/assets/route-DJbiUXJl.js +0 -1
  416. package/dist/client/assets/sandbox-lifecycle-context-WaQV2LhH.js +0 -1
  417. package/dist/client/assets/sections-editor-Uk83RbMN.js +0 -1
  418. package/dist/client/assets/seo-editor-dMXY0ofk.js +0 -1
  419. package/dist/client/assets/settings-tab-FvtSSyQC.js +0 -1
  420. package/dist/client/assets/site-draft-view-C74WkBDm.js +0 -3
  421. package/dist/client/assets/site-editor-CazX9Ijc.js +0 -1
  422. package/dist/client/assets/site-editor-toast-DrW9VMK5.js +0 -1
  423. package/dist/client/assets/tasks-BlrmxtrG.js +0 -1
  424. package/dist/client/assets/use-ask-in-chat-Cp_wqFIx.js +0 -1
  425. package/dist/client/assets/use-fast-preview-draft-url-BmUgrEyk.js +0 -1
  426. package/dist/client/assets/use-main-panel-tabs-DTMcBtUc.js +0 -1
  427. package/dist/client/assets/use-mcp-auth-status-DhFx8XVQ.js +0 -1
  428. package/dist/client/assets/use-move-blocks-Bclcq-Qe.js +0 -1
  429. package/dist/client/assets/use-section-preview-base-SkN8HQaB.js +0 -1
  430. package/dist/client/assets/use-sidebar-collapsed-DwcGl0-e.js +0 -1
  431. package/dist/client/assets/useInfiniteQuery-P9--kf7E.js +0 -1
  432. package/dist/client/assets/useSuspenseInfiniteQuery-C2ZhOGvp.js +0 -1
@@ -1,10 +1,10 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-BA7jjOjA.js","assets/index-Cvc22Qvh.js","assets/index-ug7KC70Z.css","assets/AlertCircle-Cwj2JDLb.js","assets/agent-icon-DD6O0sln.js","assets/Tool01-GdBdG6P_.js","assets/ArrowUp-zoWFBt83.js","assets/ArrowLeft-D6im8CSl.js","assets/LinkBroken01-CFo-1erV.js","assets/ShoppingBag01-DUpALglE.js","assets/Globe04-BLpPYUUd.js","assets/CheckCircle-Dycaqr3_.js","assets/ChevronUp-B0uKxpVg.js","assets/ChevronSelectorVertical-Cq__IjWt.js","assets/UserSquare-T5uOviXx.js","assets/CreditCard01-CMHPxKus.js","assets/SwitchHorizontal01-Dghq_Bvd.js","assets/Key01-KS2Cdqso.js","assets/Minus-CR14C6Ew.js","assets/Monitor01-PjSuNm4O.js","assets/Sun-x19ShBxe.js","assets/Play-DAD0wkps.js","assets/Plus-Caq968Zm.js","assets/SearchMd-BionSqTl.js","assets/Trash01-DhMVlpac.js","assets/Upload01-hsehoAUh.js","assets/Users01-DDaeVlhF.js","assets/XClose-NmocES7U.js","assets/Zap-aTbgq59l.js","assets/use-sidebar-collapsed-DwcGl0-e.js","assets/use-chat-layout-state-BC5WrKKn.js","assets/thread-route-B44higRI.js","assets/autosend-BLYIlkXq.js","assets/use-project-scope-C0EKXyqg.js","assets/repository-binding-B7A7NBUB.js","assets/use-mcp-client-BfCmeMHR.js","assets/auth-Dfx2bf9S.js","assets/thread-intent-Bs-Q7fma.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-BI4P-Lkx.js","assets/task-board-DN88kD7h.js","assets/schema-BH82js-o.js","assets/tooltip-C0GWPsi8.js","assets/index-LnWr599j.js","assets/toolbar-icon-button-nrUHQe-I.js","assets/shell-layout-CH0j9rog.js","assets/use-deployment-admin-ShnoFTNr.js","assets/admin-fetch-BhTJlAsX.js","assets/command-B42vqDSm.js","assets/index-DQAtcq3Z.js","assets/integration-icon-DMt85Vdd.js","assets/project-icon-eZOGIGwj.js","assets/use-navigate-to-agent-D2d0cpFU.js","assets/new-project-dialog-BA0jmhgS.js","assets/label-RB5C5N6z.js","assets/repository-picker-CI7xSsin.js","assets/github-icon-tpEVyIwD.js","assets/useInfiniteQuery-P9--kf7E.js","assets/infiniteQueryObserver-CmujZk55.js","assets/collection-search-Lm88VC-w.js","assets/use-debounced-value-BF84eZeF.js","assets/use-organization-settings-a6mUKPHv.js","assets/required-auth-layout-ClYF4eFR.js","assets/use-org-sso-d82WgyRM.js","assets/shell-layout-CE2Eihra.css","assets/use-mobile-C1stVK0E.js","assets/sheet-BIQm-3An.js","assets/index-D-DRzVEB.js","assets/chat-context-tsaqCp6v.js","assets/use-entitlements-wE65MYfi.js","assets/use-ai-providers-BbVlPdZd.js","assets/use-decopilot-events-uSeDcfUe.js","assets/sandbox-url-D3mC8qhT.js","assets/tool-namespace-l4eN7YZ5.js","assets/drawer-Dijofbhl.js","assets/use-mcp-prompts-DoojBZhS.js","assets/usage-stats-CHeI7dPd.js","assets/form-CRja9i9j.js","assets/utils-CVEq3hMx.js","assets/markdown-HhU9_nSI.js","assets/use-copy-BGfQrJIh.js","assets/input-C7_FCkgY.js","assets/icon-button-BZ9f2Pt9.js","assets/file-type-icon-DiS0iV28.js","assets/chat-draft-DeOYn8wH.js","assets/select-GzsOSPza.js","assets/index-BdQq_4o_.js","assets/tabs-D5AMuciq.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-MCc3vHir.js","assets/toggle-group-BBgjmF6C.js","assets/index-D0G5dFqT.js","assets/checkbox-bO8ZnM7n.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/popover-D5YX99Kp.js","assets/input-D6ZRMHIB.js","assets/suggestion-CsEyXKDY.js","assets/use-org-fs-DHnEDbF9.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-CpM-erQe.js","assets/plan-ladder-CZUMQESY.js","assets/add-connection-dialog-BFqv_pWT.js","assets/extract-connection-data-Pe-Tip3g.js","assets/metadata-D72DunRR.js","assets/connection-Brtus8mh.js","assets/url-slug-5t39ocbn.js","assets/connection-card-CSkWTxJN.js","assets/connection-slug-DREkgXeA.js","assets/textarea-D7HQlMVo.js","assets/use-connection-Dqyf1wn8.js","assets/schema-DHahXPsT.js","assets/connection-form-helpers-CQaJSXmJ.js","assets/authenticate-and-persist-oauth-EuyAX3Gy.js","assets/mcp-oauth-DLwsgkOm.js","assets/mcp-oauth-C-i6IZ7F.js","assets/collection-tabs-BW9NTpao.js","assets/badge-9UZ-oy57.js","assets/use-infinite-scroll-Ds1Wd1cw.js","assets/useSuspenseInfiniteQuery-C2ZhOGvp.js","assets/use-task-board-events-DCguN7A5.js","assets/input-Bwd_JSM8.css","assets/pair-Bx1LbJmC.js","assets/collapsible-CehJ-xlR.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DeLjk14w.js","assets/types-DKuFfsqr.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/use-thread-outputs-D6sQTVJo.js","assets/agent-capabilities-DKq2l6j_.js","assets/cms-store-drafts-C_ZG08jQ.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-WaQV2LhH.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-Drt9QRbX.js","assets/index-BGom2FnM.js","assets/resizable-DzzgKGKP.js","assets/task-status-B2JNuBbQ.js","assets/use-main-panel-tabs-DTMcBtUc.js","assets/use-mcp-tools-DwTtnjNb.js","assets/resolve-tab-icon-DMbVCUvi.js","assets/use-task-metadata-D3xqf4sH.js","assets/preview-source-BsRLGWUP.js","assets/project-sidebar-views-CrRbPbLq.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-D9BR1kJU.js","assets/virtual-mcp-C4mAz3N8.js","assets/tab-icon-glyph-BsVyyg_A.js","assets/project-apps-Bny6_T2A.js","assets/legacy-main-redirect-BZlpoESe.js","assets/preview-dialog-BkHpQdXG.js","assets/preview-content-TDEad-bh.js","assets/file-share-button-DgOCZ5mM.js","assets/file-preview-Ca_4k6rv.js","assets/utils-DA49HMaO.js","assets/editor-BODVgWYK.js","assets/blocks-preview-workspace-context-CGoI0EUn.js"])))=>i.map(i=>d[i]);
2
- import{bl as $r,c as R,a5 as tt,f as cl,u as Rr,j as n,h as xt,a0 as gc,b as X,d as bi,B as re,L as Xi,ak as Qt,q as Zs,av as hc,r as W,e as St,m as K,t as Qe,K as Ct,aH as xc,aI as jc,aJ as bc,aK as kc,bj as yc,aL as vc,aM as Nc,aN as Sc,h4 as Bc,h5 as Cc,i as Ga,_ as Me,X as Ke,Z as qe,au as sl,ap as ys,an as vs,ao as Ns,Y as Ne,bx as Cs,D as nl,v as al,w as Sl,x as ll,aT as Bl,y as ki,I as si,am as Ys,o as ot,a8 as Ma,ax as Vs,T as wc,h6 as yi,ac as Al,ar as Er,at as Or,a as vi,b3 as zl,aU as Dc,b2 as il,n as Ss,as as Va,bB as Oa,h7 as Tc,ec as _c,b9 as Ic,J as Ni,N as Ji,P as Zi,bQ as Ac,E as zc,aS as $c,a6 as Rc,d4 as Ec,h8 as Oc,R as Lc,h9 as Fc}from"./index-Cvc22Qvh.js";import{u as Pc,a as er,K as Mc,P as Kc,b as Uc,D as qc,g as tr,C as Gc}from"./core.esm-ByTukYOF.js";import{S as sr,v as nr,s as Vc,a as Hc,u as Yc}from"./sortable.esm-Dd1EVaQb.js";import{u as Lr}from"./use-task-board-analytics-BTZNDNnK.js";import{C as Wc}from"./combobox-C8IS_aP5.js";import{ax as ar,G as dl,aq as Fr,g as It,bd as di,b4 as Pr,b as ui,be as Si,H as Qc,bf as Xc,bg as Jc,bh as Zc,J as Mr,e as ed,bi as td,bj as lr,az as Kr,_ as Cl,u as Ws,aL as el,a5 as Bi,N as $l,bk as sd,F as wl,b5 as fi,b7 as mi,a4 as Ci,an as Ur,E as nd,n as ad,ac as ld,R as id}from"./agent-icon-DD6O0sln.js";import{g as rd,a as qr}from"./Tool01-GdBdG6P_.js";import{u as od,c as cd,a as dd,C as ud}from"./use-task-board-prompts-DdSO4gLi.js";import{S as fd}from"./search-toggle-pLnMgrhP.js";import{c as Ms,T as Ks,a as Us}from"./tooltip-C0GWPsi8.js";import{i as Ha}from"./CheckCircle-Dycaqr3_.js";import{s as is}from"./Plus-Caq968Zm.js";import{g as Gr,f as md,s as ni}from"./UserSquare-T5uOviXx.js";import{i as Wt}from"./Zap-aTbgq59l.js";import{P as ns,a as ss,b as as,c as pd}from"./popover-D5YX99Kp.js";import{f as gd,g as hd,C as xd,e as jd}from"./context-menu-D-JkcRvL.js";import{S as ct,d as bd}from"./feedback-DcWPFhR_.js";import{B as Ka}from"./badge-9UZ-oy57.js";import{g as Vr,r as Hr,h as kd}from"./use-task-board-items-BmpaMZkF.js";import{R as yd}from"./new-project-dialog-BA0jmhgS.js";import{a as vd}from"./watch-sse-pool-BI4P-Lkx.js";import{a as Nd,M as Sd,n as Bd,c as wi}from"./sprints-C1z9xhcL.js";import{t as ul,n as Cd}from"./ChevronUp-B0uKxpVg.js";import{s as wd}from"./Trash01-DhMVlpac.js";import{I as Bt}from"./icon-button-BZ9f2Pt9.js";import{L as Nl}from"./label-RB5C5N6z.js";import{S as Dd,b as Td,a as _d,d as Id,c as Yr}from"./select-GzsOSPza.js";import{B as Bs,a as Wr,U as qs,E as Qr,D as Ad,d as ir,b as Di,r as zd,f as $d,t as pi}from"./task-route-4C0M-4XY.js";import{i as Ti,a as Rl,c as Qs,l as dt,d as Dl,T as At,P as et,t as en,e as _i,s as Xr,f as Ii,g as Ts,h as Rd,j as Ed,S as Od,H as Jr,b as Zr,k as Ld,r as gi,m as Fd,n as Pd,o as Md,L as Ai,C as zi,p as Kd,q as ai,u as rr,v as Ud,w as qd,x as Gd,y as Vd,z as Hd}from"./config--cZAprAj.js";import{S as Ie,C as ws,e as Tl,R as Yd,i as or,n as eo,f as to,g as Wd}from"./task-board-DN88kD7h.js";import{t as tn}from"./task-key-BCHdFiOO.js";import{u as El,a as so,b as no}from"./use-tags-CgXVAtG9.js";import{f as ao}from"./use-organization-settings-a6mUKPHv.js";import{C as $i}from"./calendar-CKcdkgh5.js";import{b as cr,A as Qd,a as Xd}from"./alert-rSlkmSpl.js";import{C as Jd,a as Zd,b as eu}from"./collapsible-CehJ-xlR.js";import{u as li}from"./use-copy-BGfQrJIh.js";import{i as rs}from"./AlertCircle-Cwj2JDLb.js";import{a as dr,h as tu,M as Ri,p as su}from"./markdown-HhU9_nSI.js";import{M as nu,a as au,b as lu,c as iu,d as ru,U as ou,e as cu,m as du,f as uu,u as fu,g as mu,h as lo,A as pu}from"./index-C2wTYLQr.js";import{d as io,S as ur}from"./sandbox-start-errors-BK_aDCyt.js";import{p as fr,r as gu,u as ro,G as hu}from"./repository-picker-CI7xSsin.js";import{u as Ei}from"./use-task-board-item-prs-CnqmEndd.js";import{u as oo}from"./use-connection-Dqyf1wn8.js";import{d as xu,a as ju,p as bu}from"./repository-binding-B7A7NBUB.js";import{b as co,s as uo,e as Ua,a as rl,c as ku,N as Xs,d as Oi,f as yu,g as vu}from"./project-index-BSMjLbxc.js";import{s as Nu,a as Su}from"./use-project-scope-C0EKXyqg.js";import{G as Bu}from"./github-icon-tpEVyIwD.js";import{P as Cu}from"./project-icon-eZOGIGwj.js";import{l as wu}from"./github-repo-scope-C58hYmYC.js";import{a as Li,C as Fi,b as Hs,e as qa,c as Pi,f as Mi,g as fo}from"./command-B42vqDSm.js";import{c as Du,S as Tu,a as _u,b as Iu}from"./sheet-BIQm-3An.js";import{T as Au}from"./thread-sheet-body-BNo76_XD.js";import{u as zu}from"./use-mcp-client-BfCmeMHR.js";import{i as $u}from"./ArrowUp-zoWFBt83.js";import{i as Ru}from"./Upload01-hsehoAUh.js";import{i as Eu}from"./use-org-fs-DHnEDbF9.js";import{u as Ou,s as Lu,b as Fu,c as Pu}from"./usage-stats-CHeI7dPd.js";import{s as Mu}from"./suggestion-CsEyXKDY.js";import{a as Ku}from"./pair-Bx1LbJmC.js";import{S as Pa}from"./separator-CuwdHpjW.js";import{a as Uu}from"./shell-layout-CH0j9rog.js";import{c as qu}from"./thread-intent-Bs-Q7fma.js";import{w as Gu}from"./chat-draft-DeOYn8wH.js";const Vu=$r("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const Hu=$r("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),Yu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function Wu(t,e){return`${t==="gitlab"?"!":"#"}${e}`}function Qu(t,e){return`${gu(t)}/${Yu[t.provider]}/${e}`}const Xu=[{re:/https?:\/\/([^/\s"']+)\/([^\s"']+?)\/-\/merge_requests\/(\d+)/,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull-requests\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/repos\/([^/\s"']+\/[^/\s"']+)\/pulls\/(\d+)/,api:!0},{re:/https?:\/\/([^/\s"']+)\/api\/v4\/projects\/([^/\s"']+)\/merge_requests\/(\d+)/,api:!0,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/2\.0\/repositories\/([^/\s"']+\/[^/\s"']+)\/pullrequests\/(\d+)/,api:!0}],Ju={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function Zu(t){const e=t.toLowerCase();return Ju[e]??e}function e1(t,e,s){const l=Number(t[3]);if(!Number.isSafeInteger(l)||l<=0)return null;const i=Zu(t[1]),a=t[2],r=e?decodeURIComponent(a):a;if(/^\d+$/.test(r))return null;const o=`https://${i}/${r}`,c=fr(o)??(s?fr(o,{provider:s}):null);return c?{repo:c,number:l,url:Qu(c,l)}:null}function t1(t){const e=t.trim();if(!e)return null;for(const{re:s,api:l,provider:i}of Xu){const a=s.exec(e),r=a?e1(a,l===!0,i):null;if(r)return r}return null}function Ol(){const t=R.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=cl(e).org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{boardOrg:i}=Rr(l);return i&&i!==s?i:null}function s1(t){const e=R.c(12),{children:s}=t,{project:l}=tt(),i=Ol(),{data:a,isLoading:r}=Lr();if(!i)return s;if(r){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"flex h-full items-center justify-center",children:n.jsx(xt,{className:"size-5 text-muted-foreground"})}),e[0]=f):f=e[0],f}let o;e[1]!==a?.orgs||e[2]!==i?(o=a?.orgs.find(f=>f.slug===i),e[1]=a?.orgs,e[2]=i,e[3]=o):o=e[3];const c=o;if(!c)return s;let d;e[4]!==c.id||e[5]!==c.name||e[6]!==c.slug?(d={id:c.id,name:c.name,slug:c.slug,logo:null},e[4]=c.id,e[5]=c.name,e[6]=c.slug,e[7]=d):d=e[7];let u;return e[8]!==s||e[9]!==l||e[10]!==d?(u=n.jsx(gc,{org:d,project:l,children:s}),e[8]=s,e[9]=l,e[10]=d,e[11]=u):u=e[11],u}function n1(){const t=R.c(5),e=X(),s=Ol();if(!s)return null;let l;t[0]!==e||t[1]!==s?(l=e("taskBoard.analytics.bannerBoard",{org:s}),t[0]=e,t[1]=s,t[2]=l):l=t[2];let i;return t[3]!==l?(i=n.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:l}),t[3]=l,t[4]=i):i=t[4],i}function a1(){const t=R.c(27),e=X(),s=bi(),l=cl({strict:!1}).org??"",i=Ol(),{data:a}=Lr();if(!a?.isTaskBoardAdmin)return null;let r;t[0]!==e?(r=e("taskBoard.analytics.orgCurrent"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==l||t[3]!==r?(o={value:l,label:r},t[2]=l,t[3]=r,t[4]=o):o=t[4];let c;if(t[5]!==a.orgs||t[6]!==l||t[7]!==o){let x;t[9]!==l?(x=k=>k.slug!==l,t[9]=l,t[10]=x):x=t[10],c=[o,...a.orgs.filter(x).map(l1)],t[5]=a.orgs,t[6]=l,t[7]=o,t[8]=c}else c=t[8];const d=c,u=i??l;let f;t[11]!==s||t[12]!==l?(f=x=>s({to:".",search:k=>({...k,boardOrg:x===l?void 0:x}),replace:!0}),t[11]=s,t[12]=l,t[13]=f):f=t[13];let m;t[14]!==e?(m=e("taskBoard.analytics.orgPickerPlaceholder"),t[14]=e,t[15]=m):m=t[15];let p;t[16]!==e?(p=e("taskBoard.analytics.orgSearch"),t[16]=e,t[17]=p):p=t[17];let h;t[18]!==e?(h=e("taskBoard.analytics.orgEmpty"),t[18]=e,t[19]=h):h=t[19];let j;return t[20]!==d||t[21]!==u||t[22]!==f||t[23]!==m||t[24]!==p||t[25]!==h?(j=n.jsx(Wc,{options:d,value:u,onChange:f,width:"w-[200px]",placeholder:m,searchPlaceholder:p,emptyMessage:h}),t[20]=d,t[21]=u,t[22]=f,t[23]=m,t[24]=p,t[25]=h,t[26]=j):j=t[26],j}function l1(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function i1(t){const e=R.c(5),{project:s}=t,l=X();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const r=cl(i).org??"";let o;return e[1]!==r||e[2]!==s||e[3]!==l?(o=n.jsx(re,{size:"sm",variant:"outline",className:"hidden sm:inline-flex",asChild:!0,children:s?n.jsxs(Xi,{to:"/$org/projects/$agentId/taskboard-analytics",params:{org:r,agentId:s},children:[n.jsx(ar,{size:16}),l("taskBoard.analytics.openAnalytics")]}):n.jsxs(Xi,{to:"/$org/taskboard-analytics",params:{org:r},children:[n.jsx(ar,{size:16}),l("taskBoard.analytics.openAnalytics")]})}),e[1]=r,e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function r1(t){const e=R.c(58),{isDemoBoard:s}=t,l=X(),i=Qt(),a=Zs(),{locator:r}=tt(),{isPrivileged:o}=hc(),c=Ol(),[d,u]=W.useState(!1);let f;e[0]!==i?(f=()=>i.call("DEMO_BOARD_RESET",{}),e[0]=i,e[1]=f):f=e[1];let m,p;e[2]!==l?(m=P=>{const J=P.problems.length+P.deadPreviewUrls.length;J>0?Qe.warning(l("taskBoard.demoReset.doneWithIssues",{count:J})):Qe.success(l("taskBoard.demoReset.done"))},p=P=>Qe.error(l("taskBoard.demoReset.failed"),{description:P instanceof Error?P.message:void 0}),e[2]=l,e[3]=m,e[4]=p):(m=e[3],p=e[4]);let h;e[5]!==r||e[6]!==a?(h=()=>a.invalidateQueries({queryKey:Ct.taskBoardItems(r)}),e[5]=r,e[6]=a,e[7]=h):h=e[7];let j;e[8]!==f||e[9]!==m||e[10]!==p||e[11]!==h?(j={mutationFn:f,onSuccess:m,onError:p,onSettled:h},e[8]=f,e[9]=m,e[10]=p,e[11]=h,e[12]=j):j=e[12];const x=St(j);if(!s||!o||c)return null;const k=x.isPending;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=()=>u(!0),e[13]=b):b=e[13];const y=x.isPending&&"animate-spin";let g;e[14]!==y?(g=K(y),e[14]=y,e[15]=g):g=e[15];let v;e[16]!==g?(v=n.jsx(rd,{size:16,className:g}),e[16]=g,e[17]=v):v=e[17];let N;e[18]!==l?(N=l("taskBoard.demoReset.button"),e[18]=l,e[19]=N):N=e[19];let B;e[20]!==x.isPending||e[21]!==v||e[22]!==N?(B=n.jsxs(re,{size:"sm",variant:"outline",className:"hidden sm:inline-flex",disabled:k,onClick:b,children:[v,N]}),e[20]=x.isPending,e[21]=v,e[22]=N,e[23]=B):B=e[23];let w;e[24]!==l?(w=l("taskBoard.demoReset.title"),e[24]=l,e[25]=w):w=e[25];let D;e[26]!==w?(D=n.jsx(xc,{children:w}),e[26]=w,e[27]=D):D=e[27];let C;e[28]!==l?(C=l("taskBoard.demoReset.description"),e[28]=l,e[29]=C):C=e[29];let S;e[30]!==C?(S=n.jsx(jc,{children:C}),e[30]=C,e[31]=S):S=e[31];let T;e[32]!==D||e[33]!==S?(T=n.jsxs(bc,{children:[D,S]}),e[32]=D,e[33]=S,e[34]=T):T=e[34];let _;e[35]!==l?(_=l("taskBoard.demoReset.cancel"),e[35]=l,e[36]=_):_=e[36];let z;e[37]!==_?(z=n.jsx(kc,{children:_}),e[37]=_,e[38]=z):z=e[38];let I;e[39]!==x?(I=()=>x.mutate(),e[39]=x,e[40]=I):I=e[40];let $;e[41]!==l?($=l("taskBoard.demoReset.confirm"),e[41]=l,e[42]=$):$=e[42];let E;e[43]!==I||e[44]!==$?(E=n.jsx(yc,{variant:"destructive",onClick:I,children:$}),e[43]=I,e[44]=$,e[45]=E):E=e[45];let O;e[46]!==z||e[47]!==E?(O=n.jsxs(vc,{children:[z,E]}),e[46]=z,e[47]=E,e[48]=O):O=e[48];let L;e[49]!==T||e[50]!==O?(L=n.jsxs(Nc,{children:[T,O]}),e[49]=T,e[50]=O,e[51]=L):L=e[51];let U;e[52]!==d||e[53]!==L?(U=n.jsx(Sc,{open:d,onOpenChange:u,children:L}),e[52]=d,e[53]=L,e[54]=U):U=e[54];let G;return e[55]!==B||e[56]!==U?(G=n.jsxs(n.Fragment,{children:[B,U]}),e[55]=B,e[56]=U,e[57]=G):G=e[57],G}function fl(t){const e=R.c(11),{size:s,className:l}=t,i=s===void 0?16:s;let a;e[0]!==l?(a=K("inline-flex shrink-0 items-center justify-center rounded-full",l),e[0]=l,e[1]=a):a=e[1];let r;e[2]!==i?(r={width:i,height:i,backgroundColor:`${Bc}26`},e[2]=i,e[3]=r):r=e[3];const o=i*.6,c=i*.6;let d;e[4]!==o||e[5]!==c?(d=n.jsx("img",{src:Cc,alt:"Reviewer",style:{width:o,height:c}}),e[4]=o,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==d?(u=n.jsx("span",{className:a,style:r,children:d}),e[7]=a,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}const o1=[];function Ll(){const t=R.c(7),{org:e}=tt(),s=Qt();let l;t[0]!==e.id?(l=Ct.taskBoardSprints(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==s?(i=async()=>(await s.call("TASK_BOARD_SPRINT_LIST",{})).sprints,t[2]=s,t[3]=i):i=t[3];let a;t[4]!==l||t[5]!==i?(a={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6];const{data:r}=Ga(a);return r??o1}function mo(){const t=R.c(4),{org:e,locator:s}=tt(),l=Zs();let i;return t[0]!==s||t[1]!==e.id||t[2]!==l?(i=()=>Promise.all([l.invalidateQueries({queryKey:Ct.taskBoardSprints(e.id)}),l.invalidateQueries({queryKey:Ct.taskBoardItems(s)})]),t[0]=s,t[1]=e.id,t[2]=l,t[3]=i):i=t[3],i}const mr=()=>0;function c1(){const t=R.c(3),{org:e}=tt(),s=mo();let l;t[0]!==e.slug||t[1]!==s?(l=()=>vd.subscribe(e.slug,s,s),t[0]=e.slug,t[1]=s,t[2]=l):l=t[2];const i=l;W.useSyncExternalStore(i,mr,mr)}function d1(){const t=R.c(38),e=Qt(),s=mo(),l=X();let i;t[0]!==l?(i=N=>Qe.error(N instanceof Error&&N.message?N.message:l("taskBoard.sprints.actionError")),t[0]=l,t[1]=i):i=t[1];const a=i;let r;t[2]!==e?(r=N=>e.call("TASK_BOARD_SPRINT_CREATE",N),t[2]=e,t[3]=r):r=t[3];let o;t[4]!==s||t[5]!==a||t[6]!==r?(o={mutationFn:r,onError:a,onSettled:s},t[4]=s,t[5]=a,t[6]=r,t[7]=o):o=t[7];const c=St(o);let d;t[8]!==e?(d=N=>e.call("TASK_BOARD_SPRINT_UPDATE",N),t[8]=e,t[9]=d):d=t[9];let u;t[10]!==s||t[11]!==a||t[12]!==d?(u={mutationFn:d,onError:a,onSettled:s},t[10]=s,t[11]=a,t[12]=d,t[13]=u):u=t[13];const f=St(u);let m;t[14]!==e?(m=N=>e.call("TASK_BOARD_SPRINT_START",{id:N}),t[14]=e,t[15]=m):m=t[15];let p;t[16]!==s||t[17]!==a||t[18]!==m?(p={mutationFn:m,onError:a,onSettled:s},t[16]=s,t[17]=a,t[18]=m,t[19]=p):p=t[19];const h=St(p);let j;t[20]!==e?(j=N=>e.call("TASK_BOARD_SPRINT_COMPLETE",N),t[20]=e,t[21]=j):j=t[21];let x;t[22]!==s||t[23]!==a||t[24]!==j?(x={mutationFn:j,onError:a,onSettled:s},t[22]=s,t[23]=a,t[24]=j,t[25]=x):x=t[25];const k=St(x);let b;t[26]!==e?(b=N=>e.call("TASK_BOARD_SPRINT_DELETE",{id:N}),t[26]=e,t[27]=b):b=t[27];let y;t[28]!==s||t[29]!==a||t[30]!==b?(y={mutationFn:b,onError:a,onSettled:s},t[28]=s,t[29]=a,t[30]=b,t[31]=y):y=t[31];const g=St(y);let v;return t[32]!==k||t[33]!==c||t[34]!==g||t[35]!==h||t[36]!==f?(v={create:c,update:f,start:h,complete:k,remove:g},t[32]=k,t[33]=c,t[34]=g,t[35]=h,t[36]=f,t[37]=v):v=t[37],v}const u1=14,f1=/^sprint\s+(\d+)$/i;function pr(t,e){const s=Date.parse(`${t}T00:00:00Z`)+e*864e5;return new Date(s).toISOString().slice(0,10)}function m1(t,e){const s=Math.max(0,...t.map(r=>Number(f1.exec(r.name.trim())?.[1]??0))),l=t.map(r=>r.endDate).filter(r=>r!==null).sort().at(-1),i=l?pr(l,1):e,a=i>e?i:e;return{name:`Sprint ${s>0?s+1:t.length+1}`,startDate:a,endDate:pr(a,u1-1)}}function p1(t=new Date){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const g1=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});function gr(t){return g1.format(new Date(`${t}T00:00:00Z`))}function po(t){const e=t.startDate?gr(t.startDate):null,s=t.endDate?gr(t.endDate):null;return e&&s?`${e} – ${s}`:e??s}function ol(t,e){return t.state==="active"?e("taskBoard.sprints.nameCurrent",{name:t.name}):t.state==="closed"?e("taskBoard.sprints.nameClosed",{name:t.name}):t.name}const ii="__backlog__",h1=[{state:"active",labelKey:"taskBoard.sprints.sectionActive"},{state:"future",labelKey:"taskBoard.sprints.sectionFuture"},{state:"closed",labelKey:"taskBoard.sprints.sectionClosed"}];function x1(t){const e=R.c(20),{sprints:s,value:l,onChange:i}=t,a=X(),[r,o]=W.useState(!1);let c;if(e[0]!==s||e[1]!==l){let p;e[3]!==l?(p=h=>h.id===l,e[3]=l,e[4]=p):p=e[4],c=s.find(p),e[0]=s,e[1]=l,e[2]=c}else c=e[2];const d=c;let u;if(e[5]!==i||e[6]!==d||e[7]!==s||e[8]!==a||e[9]!==l){const p=s.filter(b1),h=s.filter(j1);let j;e[11]!==i||e[12]!==l?(j=(k,b,y)=>n.jsxs(Ne,{onClick:()=>i(b),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:y}),l===b&&n.jsx(Cs,{size:14,className:"shrink-0"})]},k),e[11]=i,e[12]=l,e[13]=j):j=e[13];const x=j;u=s.length===0?n.jsx(Bt,{label:a("taskBoard.sprints.manage"),tooltipSide:"bottom",variant:"outline",onClick:()=>o(!0),children:n.jsx(Wt,{})}):n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm","aria-label":a("taskBoard.sprints.label"),children:[l===Bs?n.jsx(dl,{}):n.jsx(Wt,{}),n.jsx("span",{className:"max-w-[10rem] truncate",children:d?d.name:a(l===Bs?"taskBoard.sprints.backlog":"taskBoard.sprints.all")}),n.jsx(ul,{className:"text-muted-foreground"})]})}),n.jsxs(qe,{align:"end",className:"w-60",children:[p.map(k=>x(k.id,k.id,ol(k,a))),p.length>0&&n.jsx(sl,{}),x(Bs,Bs,a("taskBoard.sprints.backlog")),x("all",null,a("taskBoard.sprints.all")),h.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:a("taskBoard.sprints.sectionClosed")}),n.jsx(Ns,{className:"max-h-72 w-56 overflow-y-auto",children:h.map(k=>x(k.id,k.id,k.name))})]}),n.jsx(sl,{}),n.jsxs(Ne,{onClick:()=>o(!0),children:[n.jsx(qr,{size:14,className:"text-muted-foreground"}),a("taskBoard.sprints.manageItem")]})]})]}),e[5]=i,e[6]=d,e[7]=s,e[8]=a,e[9]=l,e[10]=u}else u=e[10];let f;e[14]!==r||e[15]!==s?(f=r&&n.jsx(k1,{sprints:s,onClose:()=>o(!1)}),e[14]=r,e[15]=s,e[16]=f):f=e[16];let m;return e[17]!==u||e[18]!==f?(m=n.jsxs(n.Fragment,{children:[u,f]}),e[17]=u,e[18]=f,e[19]=m):m=e[19],m}function j1(t){return t.state==="closed"}function b1(t){return t.state!=="closed"}function k1(t){const e=R.c(59),{sprints:s,onClose:l}=t,i=X(),a=d1(),{items:r}=Vr(),[o,c]=W.useState(null),[d,u]=W.useState(null),[f,m]=W.useState(null);let p;e[0]!==r?(p=O=>r.filter(L=>L.sprintId===O),e[0]=r,e[1]=p):p=e[1];const h=p;let j;e[2]!==s?(j=()=>c({id:null,...m1(s,p1())}),e[2]=s,e[3]=j):j=e[3];const x=j;let k;e[4]!==a.create||e[5]!==a.update?(k=O=>{const L={name:O.name.trim(),startDate:O.startDate||null,endDate:O.endDate||null},U={onSuccess:()=>c(null)};O.id===null?a.create.mutate(L,U):a.update.mutate({id:O.id,...L},U)},e[4]=a.create,e[5]=a.update,e[6]=k):k=e[6];const b=k;let y;e[7]!==l?(y=O=>!O&&l(),e[7]=l,e[8]=y):y=e[8];let g;e[9]!==i?(g=i("taskBoard.sprints.title"),e[9]=i,e[10]=g):g=e[10];let v;e[11]!==g?(v=n.jsx(ll,{children:g}),e[11]=g,e[12]=v):v=e[12];let N;e[13]!==i?(N=i("taskBoard.sprints.description"),e[13]=i,e[14]=N):N=e[14];let B;e[15]!==N?(B=n.jsx(Bl,{children:N}),e[15]=N,e[16]=B):B=e[16];let w;e[17]!==v||e[18]!==B?(w=n.jsxs(Sl,{children:[v,B]}),e[17]=v,e[18]=B,e[19]=w):w=e[19];let D;e[20]!==a.create||e[21]!==a.update||e[22]!==o||e[23]!==x||e[24]!==b||e[25]!==i?(D=o?n.jsx(N1,{draft:o,pending:a.create.isPending||a.update.isPending,onChange:c,onCancel:()=>c(null),onSave:b}):n.jsxs(re,{variant:"outline",size:"sm",className:"justify-self-start",onClick:x,children:[n.jsx(is,{size:16}),i("taskBoard.sprints.new")]}),e[20]=a.create,e[21]=a.update,e[22]=o,e[23]=x,e[24]=b,e[25]=i,e[26]=D):D=e[26];let C;e[27]!==s.length||e[28]!==i?(C=s.length===0&&n.jsx("p",{className:"text-sm text-muted-foreground",children:i("taskBoard.sprints.empty")}),e[27]=s.length,e[28]=i,e[29]=C):C=e[29];let S;e[30]!==a.start||e[31]!==h||e[32]!==s||e[33]!==i?(S=h1.map(O=>{const{state:L,labelKey:U}=O,G=s.filter(P=>P.state===L);return G.length===0?null:n.jsxs("section",{className:"flex flex-col gap-1",children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground",children:i(U)}),G.map(P=>n.jsx(v1,{sprint:P,cardCount:h(P.id).length,busy:a.start.isPending&&a.start.variables===P.id,onStart:()=>a.start.mutate(P.id),onComplete:()=>u(P),onEdit:()=>c({id:P.id,name:P.name,startDate:P.startDate??"",endDate:P.endDate??""}),onDelete:()=>m(P)},P.id))]},L)}),e[30]=a.start,e[31]=h,e[32]=s,e[33]=i,e[34]=S):S=e[34];let T;e[35]!==C||e[36]!==S?(T=n.jsxs("div",{className:"flex max-h-[50vh] flex-col gap-4 overflow-y-auto",children:[C,S]}),e[35]=C,e[36]=S,e[37]=T):T=e[37];let _;e[38]!==D||e[39]!==T||e[40]!==w?(_=n.jsxs(al,{className:"max-w-lg",children:[w,D,T]}),e[38]=D,e[39]=T,e[40]=w,e[41]=_):_=e[41];let z;e[42]!==_||e[43]!==y?(z=n.jsx(nl,{open:!0,onOpenChange:y,children:_}),e[42]=_,e[43]=y,e[44]=z):z=e[44];let I;e[45]!==a.complete||e[46]!==h||e[47]!==d||e[48]!==s?(I=d&&n.jsx(S1,{sprint:d,sprints:s,openCards:h(d.id).filter(y1).length,pending:a.complete.isPending,onCancel:()=>u(null),onConfirm:O=>a.complete.mutate({id:d.id,moveOpenTo:O},{onSuccess:()=>u(null)})}),e[45]=a.complete,e[46]=h,e[47]=d,e[48]=s,e[49]=I):I=e[49];let $;e[50]!==a.remove||e[51]!==h||e[52]!==f||e[53]!==i?($=f&&n.jsx(nl,{open:!0,onOpenChange:O=>!O&&m(null),children:n.jsxs(al,{className:"max-w-md",children:[n.jsxs(Sl,{children:[n.jsx(ll,{children:i("taskBoard.sprints.deleteTitle",{name:f.name})}),n.jsx(Bl,{children:i("taskBoard.sprints.deleteDescription",{count:h(f.id).length})})]}),n.jsxs(ki,{children:[n.jsx(re,{variant:"outline",onClick:()=>m(null),children:i("taskBoard.sprints.cancel")}),n.jsxs(re,{variant:"destructive",disabled:a.remove.isPending,onClick:()=>a.remove.mutate(f.id,{onSuccess:()=>m(null)}),children:[a.remove.isPending&&n.jsx(xt,{className:"size-4"}),i("taskBoard.sprints.delete")]})]})]})}),e[50]=a.remove,e[51]=h,e[52]=f,e[53]=i,e[54]=$):$=e[54];let E;return e[55]!==z||e[56]!==I||e[57]!==$?(E=n.jsxs(n.Fragment,{children:[z,I,$]}),e[55]=z,e[56]=I,e[57]=$,e[58]=E):E=e[58],E}function y1(t){return!Nd(t.status)}function v1(t){const e=R.c(61),{sprint:s,cardCount:l,busy:i,onStart:a,onComplete:r,onEdit:o,onDelete:c}=t,d=X();let u;e[0]!==s?(u=po(s),e[0]=s,e[1]=u):u=e[1];const f=u,m=s.state==="active"?"text-foreground":"text-muted-foreground";let p;e[2]!==m?(p=K("shrink-0",m),e[2]=m,e[3]=p):p=e[3];let h;e[4]!==p?(h=n.jsx(Wt,{size:16,className:p}),e[4]=p,e[5]=h):h=e[5];let j;e[6]!==s.name?(j=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.name}),e[6]=s.name,e[7]=j):j=e[7];let x;e[8]!==l||e[9]!==d?(x=d("taskBoard.sprints.cardCount",{count:l}),e[8]=l,e[9]=d,e[10]=x):x=e[10];let k;e[11]!==f||e[12]!==x?(k=[f,x].filter(Boolean),e[11]=f,e[12]=x,e[13]=k):k=e[13];const b=k.join(" · ");let y;e[14]!==b?(y=n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),e[14]=b,e[15]=y):y=e[15];let g;e[16]!==j||e[17]!==y?(g=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[j,y]}),e[16]=j,e[17]=y,e[18]=g):g=e[18];let v;e[19]!==s.state||e[20]!==d?(v=s.state==="active"&&n.jsx(Ka,{variant:"outline",children:d("taskBoard.sprints.running")}),e[19]=s.state,e[20]=d,e[21]=v):v=e[21];let N;e[22]!==i||e[23]!==a||e[24]!==s.state||e[25]!==d?(N=s.state==="future"&&n.jsxs(re,{size:"sm",variant:"outline",disabled:i,onClick:a,children:[i&&n.jsx(xt,{className:"size-4"}),d("taskBoard.sprints.start")]}),e[22]=i,e[23]=a,e[24]=s.state,e[25]=d,e[26]=N):N=e[26];let B;e[27]!==r||e[28]!==s.state||e[29]!==d?(B=s.state==="active"&&n.jsx(re,{size:"sm",variant:"outline",onClick:r,children:d("taskBoard.sprints.complete")}),e[27]=r,e[28]=s.state,e[29]=d,e[30]=B):B=e[30];let w;e[31]!==d?(w=d("taskBoard.sprints.more"),e[31]=d,e[32]=w):w=e[32];let D;e[33]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Ys,{}),e[33]=D):D=e[33];let C;e[34]!==w?(C=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:w,size:"icon-sm",children:D})}),e[34]=w,e[35]=C):C=e[35];let S;e[36]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Fr,{size:14}),e[36]=S):S=e[36];let T;e[37]!==d?(T=d("taskBoard.sprints.edit"),e[37]=d,e[38]=T):T=e[38];let _;e[39]!==o||e[40]!==T?(_=n.jsxs(Ne,{onClick:o,children:[S,T]}),e[39]=o,e[40]=T,e[41]=_):_=e[41];let z;e[42]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(wd,{size:14}),e[42]=z):z=e[42];let I;e[43]!==d?(I=d("taskBoard.sprints.delete"),e[43]=d,e[44]=I):I=e[44];let $;e[45]!==c||e[46]!==I?($=n.jsxs(Ne,{variant:"destructive",onClick:c,children:[z,I]}),e[45]=c,e[46]=I,e[47]=$):$=e[47];let E;e[48]!==_||e[49]!==$?(E=n.jsxs(qe,{align:"end",children:[_,$]}),e[48]=_,e[49]=$,e[50]=E):E=e[50];let O;e[51]!==C||e[52]!==E?(O=n.jsxs(Me,{children:[C,E]}),e[51]=C,e[52]=E,e[53]=O):O=e[53];let L;return e[54]!==g||e[55]!==v||e[56]!==N||e[57]!==B||e[58]!==O||e[59]!==h?(L=n.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-2 py-2 hover:bg-accent",children:[h,g,v,N,B,O]}),e[54]=g,e[55]=v,e[56]=N,e[57]=B,e[58]=O,e[59]=h,e[60]=L):L=e[60],L}function N1(t){const e=R.c(76),{draft:s,pending:l,onChange:i,onCancel:a,onSave:r}=t,o=X(),c=s.startDate!==""&&s.endDate!==""&&s.endDate<s.startDate;let d;e[0]!==c||e[1]!==s.name?(d=s.name.trim()!==""&&!c,e[0]=c,e[1]=s.name,e[2]=d):d=e[2];const u=d;let f;e[3]!==s||e[4]!==r||e[5]!==u?(f=P=>{P.preventDefault(),u&&r(s)},e[3]=s,e[4]=r,e[5]=u,e[6]=f):f=e[6];let m;e[7]!==o?(m=o("taskBoard.sprints.nameLabel"),e[7]=o,e[8]=m):m=e[8];let p;e[9]!==m?(p=n.jsx(Nl,{htmlFor:"sprint-name",children:m}),e[9]=m,e[10]=p):p=e[10];let h;e[11]!==s||e[12]!==i?(h=P=>i({...s,name:P.target.value}),e[11]=s,e[12]=i,e[13]=h):h=e[13];let j;e[14]!==s.name||e[15]!==h?(j=n.jsx(si,{id:"sprint-name",value:s.name,maxLength:Sd,autoFocus:!0,onChange:h}),e[14]=s.name,e[15]=h,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[p,j]}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let k;e[20]!==o?(k=o("taskBoard.sprints.startLabel"),e[20]=o,e[21]=k):k=e[21];let b;e[22]!==k?(b=n.jsx(Nl,{htmlFor:"sprint-start",children:k}),e[22]=k,e[23]=b):b=e[23];let y;e[24]!==s||e[25]!==i?(y=P=>i({...s,startDate:P.target.value}),e[24]=s,e[25]=i,e[26]=y):y=e[26];let g;e[27]!==s.startDate||e[28]!==y?(g=n.jsx(si,{id:"sprint-start",type:"date",value:s.startDate,onChange:y}),e[27]=s.startDate,e[28]=y,e[29]=g):g=e[29];let v;e[30]!==g||e[31]!==b?(v=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[b,g]}),e[30]=g,e[31]=b,e[32]=v):v=e[32];let N;e[33]!==o?(N=o("taskBoard.sprints.endLabel"),e[33]=o,e[34]=N):N=e[34];let B;e[35]!==N?(B=n.jsx(Nl,{htmlFor:"sprint-end",children:N}),e[35]=N,e[36]=B):B=e[36];const w=s.startDate||void 0;let D;e[37]!==s||e[38]!==i?(D=P=>i({...s,endDate:P.target.value}),e[37]=s,e[38]=i,e[39]=D):D=e[39];let C;e[40]!==s.endDate||e[41]!==w||e[42]!==D?(C=n.jsx(si,{id:"sprint-end",type:"date",value:s.endDate,min:w,onChange:D}),e[40]=s.endDate,e[41]=w,e[42]=D,e[43]=C):C=e[43];let S;e[44]!==B||e[45]!==C?(S=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[B,C]}),e[44]=B,e[45]=C,e[46]=S):S=e[46];let T;e[47]!==v||e[48]!==S?(T=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[v,S]}),e[47]=v,e[48]=S,e[49]=T):T=e[49];let _;e[50]!==c||e[51]!==o?(_=c&&n.jsx("p",{className:"text-xs text-destructive",children:o("taskBoard.sprints.endBeforeStart")}),e[50]=c,e[51]=o,e[52]=_):_=e[52];let z;e[53]!==o?(z=o("taskBoard.sprints.cancel"),e[53]=o,e[54]=z):z=e[54];let I;e[55]!==a||e[56]!==z?(I=n.jsx(re,{type:"button",variant:"ghost",size:"sm",onClick:a,children:z}),e[55]=a,e[56]=z,e[57]=I):I=e[57];const $=!u||l;let E;e[58]!==l?(E=l&&n.jsx(xt,{className:"size-4"}),e[58]=l,e[59]=E):E=e[59];let O;e[60]!==s.id||e[61]!==o?(O=s.id===null?o("taskBoard.sprints.create"):o("taskBoard.sprints.save"),e[60]=s.id,e[61]=o,e[62]=O):O=e[62];let L;e[63]!==$||e[64]!==E||e[65]!==O?(L=n.jsxs(re,{type:"submit",size:"sm",disabled:$,children:[E,O]}),e[63]=$,e[64]=E,e[65]=O,e[66]=L):L=e[66];let U;e[67]!==I||e[68]!==L?(U=n.jsxs("div",{className:"flex justify-end gap-2",children:[I,L]}),e[67]=I,e[68]=L,e[69]=U):U=e[69];let G;return e[70]!==T||e[71]!==f||e[72]!==_||e[73]!==U||e[74]!==x?(G=n.jsxs("form",{className:"flex flex-col gap-3 rounded-lg border border-border p-3",onSubmit:f,children:[x,T,_,U]}),e[70]=T,e[71]=f,e[72]=_,e[73]=U,e[74]=x,e[75]=G):G=e[75],G}function S1(t){const e=R.c(49),{sprint:s,sprints:l,openCards:i,pending:a,onCancel:r,onConfirm:o}=t,c=X();let d;e[0]!==s.id?(d=O=>O.id!==s.id&&O.state!=="closed",e[0]=s.id,e[1]=d):d=e[1];const u=l.filter(d);let f;e[2]!==s.id||e[3]!==l?(f=Bd(l,s.id)??ii,e[2]=s.id,e[3]=l,e[4]=f):f=e[4];const[m,p]=W.useState(f),h=nl,j=!0;let x;e[5]!==r?(x=O=>!O&&r(),e[5]=r,e[6]=x):x=e[6];const k=al,b="max-w-md";let y;e[7]!==s.name||e[8]!==c?(y=c("taskBoard.sprints.completeTitle",{name:s.name}),e[7]=s.name,e[8]=c,e[9]=y):y=e[9];let g;e[10]!==y?(g=n.jsx(ll,{children:y}),e[10]=y,e[11]=g):g=e[11];let v;e[12]!==i||e[13]!==c?(v=i===0?c("taskBoard.sprints.completeNothingOpen"):c("taskBoard.sprints.completeDescription",{count:i}),e[12]=i,e[13]=c,e[14]=v):v=e[14];let N;e[15]!==v?(N=n.jsx(Bl,{children:v}),e[15]=v,e[16]=N):N=e[16];let B;e[17]!==g||e[18]!==N?(B=n.jsxs(Sl,{children:[g,N]}),e[17]=g,e[18]=N,e[19]=B):B=e[19];const w=i>0&&n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx(Nl,{children:c("taskBoard.sprints.moveOpenTo")}),n.jsxs(Dd,{value:m,onValueChange:p,children:[n.jsx(Td,{children:n.jsx(_d,{})}),n.jsxs(Id,{children:[u.map(B1),n.jsx(Yr,{value:ii,children:c("taskBoard.sprints.backlog")})]})]})]});let D;e[20]!==c?(D=c("taskBoard.sprints.cancel"),e[20]=c,e[21]=D):D=e[21];let C;e[22]!==r||e[23]!==D?(C=n.jsx(re,{variant:"outline",onClick:r,children:D}),e[22]=r,e[23]=D,e[24]=C):C=e[24];let S;e[25]!==o||e[26]!==m?(S=()=>o(m===ii?null:m),e[25]=o,e[26]=m,e[27]=S):S=e[27];let T;e[28]!==a?(T=a&&n.jsx(xt,{className:"size-4"}),e[28]=a,e[29]=T):T=e[29];let _;e[30]!==c?(_=c("taskBoard.sprints.complete"),e[30]=c,e[31]=_):_=e[31];let z;e[32]!==a||e[33]!==S||e[34]!==T||e[35]!==_?(z=n.jsxs(re,{disabled:a,onClick:S,children:[T,_]}),e[32]=a,e[33]=S,e[34]=T,e[35]=_,e[36]=z):z=e[36];let I;e[37]!==C||e[38]!==z?(I=n.jsxs(ki,{children:[C,z]}),e[37]=C,e[38]=z,e[39]=I):I=e[39];let $;e[40]!==k||e[41]!==B||e[42]!==w||e[43]!==I?($=n.jsxs(k,{className:b,children:[B,w,I]}),e[40]=k,e[41]=B,e[42]=w,e[43]=I,e[44]=$):$=e[44];let E;return e[45]!==h||e[46]!==$||e[47]!==x?(E=n.jsx(h,{open:j,onOpenChange:x,children:$}),e[45]=h,e[46]=$,e[47]=x,e[48]=E):E=e[48],E}function B1(t){return n.jsx(Yr,{value:t.id,children:t.name},t.id)}function go(t){const e=R.c(10),{assigneeId:s,assignee:l,size:i,title:a,className:r}=t,o=i===void 0?20:i;if(!s)return null;let c;e[0]!==l||e[1]!==s||e[2]!==o?(c=s===Ie?n.jsx(ct,{size:o}):l?n.jsx(ot,{url:l.user?.image??void 0,fallback:l.user?.name??"?",shape:"circle",size:"xs"}):null,e[0]=l,e[1]=s,e[2]=o,e[3]=c):c=e[3];const d=c;if(!d)return null;let u;e[4]!==r?(u=K("inline-flex shrink-0",r),e[4]=r,e[5]=u):u=e[5];let f;return e[6]!==d||e[7]!==u||e[8]!==a?(f=n.jsx("span",{className:u,title:a,children:d}),e[6]=d,e[7]=u,e[8]=a,e[9]=f):f=e[9],f}function C1(t){switch(t){case"done":return"done";case"archived":return null;case"triage":case"todo":return"todo";case"in_progress":case"in_review":case"qa":case"customer_approval":case"ready_for_deployment":case"post_deploy_validation":return"active";default:return t}}function Ya(t){const e={done:0,active:0,todo:0,total:0};for(const s of t){const l=C1(s.status);l&&(e[l]+=1,e.total+=1)}return e}function Ki(t){return t.total>0&&t.done===t.total?"done":t.active>0||t.done>0?"in_progress":"todo"}function Wa(t,e){return t.filter(s=>s.parentId===e)}function Qa(t,e){return e.parentId?t.find(s=>s.id===e.parentId):void 0}function ho(t,e){const s=Qa(t,e);return!!s&&!s.isEpic}function w1(t){return t.status==="done"||t.status==="archived"?!1:Ti(t)||Rl(t)==="failed"}function D1(t,e){return t.flatMap(s=>{if(s.isEpic){if(s.status==="archived")return[s];const l=Ki(Ya(Wa(e,s.id)));return[{...s,status:l}]}return ho(e,s)&&!w1(s)?[]:[s]})}const xo=W.createContext(null);function cs(){return W.use(xo)}function T1(t){const e=R.c(3),{value:s,children:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(xo,{value:s,children:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function Ui(t){const e=R.c(12),{progress:s,className:l}=t;let i;e[0]!==s.total?(i=m=>s.total===0?"0%":`${m/s.total*100}%`,e[0]=s.total,e[1]=i):i=e[1];const a=i;let r;e[2]!==l?(r=K("flex h-1.5 w-full overflow-hidden rounded-full bg-muted",l),e[2]=l,e[3]=r):r=e[3];const o=a(s.done);let c;e[4]!==o?(c=n.jsx("div",{className:"bg-success",style:{width:o}}),e[4]=o,e[5]=c):c=e[5];const d=a(s.active);let u;e[6]!==d?(u=n.jsx("div",{className:"bg-chart-1",style:{width:d}}),e[6]=d,e[7]=u):u=e[7];let f;return e[8]!==r||e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:r,children:[c,u]}),e[8]=r,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function _1(t){const e=R.c(9),{item:s}=t,l=cs();if(!l)return null;let i;e[0]!==l.items||e[1]!==s?(i=Qa(l.items,s),e[0]=l.items,e[1]=s,e[2]=i):i=e[2];const a=i;if(!a?.isEpic)return null;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(It,{size:11,className:"shrink-0 text-chart-1"}),e[3]=r):r=e[3];let o;e[4]!==a.title?(o=n.jsx("span",{className:"truncate",children:a.title}),e[4]=a.title,e[5]=o):o=e[5];let c;return e[6]!==a.title||e[7]!==o?(c=n.jsxs("span",{title:a.title,className:"inline-flex h-5 max-w-40 items-center gap-1 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[r,o]}),e[6]=a.title,e[7]=o,e[8]=c):c=e[8],c}function I1(t){const e=R.c(15),{item:s}=t,l=X(),i=cs();if(!i||!s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const r=a;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(It,{size:11,className:"shrink-0 text-chart-1"}),e[3]=o):o=e[3];let c;e[4]!==l?(c=l("taskBoard.epics.epicBadge"),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r?(d=n.jsx(Ui,{progress:r,className:"w-10"}),e[6]=r,e[7]=d):d=e[7];let u;e[8]!==r.done||e[9]!==r.total?(u=n.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[r.done,"/",r.total]}),e[8]=r.done,e[9]=r.total,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==u?(f=n.jsxs("span",{className:"inline-flex h-5 items-center gap-1.5 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[o,c,d,u]}),e[11]=c,e[12]=d,e[13]=u,e[14]=f):f=e[14],f}function A1(t){const e=R.c(10),{item:s}=t,l=X(),i=cs();if(!i||s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const r=a;if(r.total===0)return null;let o;e[3]!==l?(o=l("taskBoard.epics.subtasks"),e[3]=l,e[4]=o):o=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(di,{size:11,className:"shrink-0"}),e[5]=c):c=e[5];let d;return e[6]!==r.done||e[7]!==r.total||e[8]!==o?(d=n.jsxs("span",{title:o,className:"inline-flex h-5 items-center gap-1 rounded-md bg-muted px-1.5 text-xs font-medium tabular-nums text-muted-foreground",children:[c,r.done,"/",r.total]}),e[6]=r.done,e[7]=r.total,e[8]=o,e[9]=d):d=e[9],d}function z1(){const t=R.c(14),e=X(),s=cs();if(!s)return null;const l=s.items;let i,a,r;if(t[0]!==s||t[1]!==e){r=Symbol.for("react.early_return_sentinel");e:{const c=l.filter($1);if(c.length===0){let u;t[5]!==e?(u=e("taskBoard.epics.empty"),t[5]=e,t[6]=u):u=t[6];let f;t[7]!==u?(f=n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:u}),t[7]=u,t[8]=f):f=t[8],r=f;break e}i="grid gap-3 md:grid-cols-2";let d;t[9]!==s?(d=u=>n.jsx(R1,{epic:u,workItems:Wa(s.items,u.id),board:s},u.id),t[9]=s,t[10]=d):d=t[10],a=c.map(d)}t[0]=s,t[1]=e,t[2]=i,t[3]=a,t[4]=r}else i=t[2],a=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return t[11]!==i||t[12]!==a?(o=n.jsx("div",{className:i,children:a}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function $1(t){return t.isEpic}function R1(t){const e=R.c(96),{epic:s,workItems:l,board:i}=t,a=X();let r,o,c,d,u,f,m,p,h,j,x,k,b;if(e[0]!==i||e[1]!==s||e[2]!==a||e[3]!==l){const N=Ya(l),B=Ki(N),w=B==="done";let D;e[17]!==w?(D=jo(w),e[17]=w,e[18]=D):D=e[18];const C=D;let S;e[19]!==l?(S=Hr(l),e[19]=l,e[20]=S):S=e[20];const T=S.length;let _;e[21]!==l?(_=l.filter(Qs),e[21]=l,e[22]=_):_=e[22];const z=_.length,I=N.total===0?0:Math.round(N.done/N.total*100),$=[...new Set(l.flatMap(E1))];b="button",e[23]!==i||e[24]!==s?(o=()=>i.onOpen(s),e[23]=i,e[24]=s,e[25]=o):o=e[25],c="surface flex w-full flex-col gap-4 p-4 text-left transition-colors hover:bg-accent";let E;e[26]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(It,{size:16,className:"mt-0.5 shrink-0 text-chart-1"}),e[26]=E):E=e[26];let O;e[27]!==s.title?(O=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),e[27]=s.title,e[28]=O):O=e[28];let L;e[29]!==i.orgSlug||e[30]!==s.keySeq?(L=tn(i.orgSlug,s.keySeq),e[29]=i.orgSlug,e[30]=s.keySeq,e[31]=L):L=e[31];const U=N.total===1?a("taskBoard.epics.cardCountOne"):a("taskBoard.epics.cardCountMany",{count:N.total});let G;e[32]!==L||e[33]!==U?(G=n.jsxs("span",{className:"text-xs text-muted-foreground",children:[L," · ",U]}),e[32]=L,e[33]=U,e[34]=G):G=e[34];let P;e[35]!==O||e[36]!==G?(P=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[O,G]}),e[35]=O,e[36]=G,e[37]=P):P=e[37];let J;e[38]!==B?(J=n.jsx(hi,{status:B}),e[38]=B,e[39]=J):J=e[39];let H;e[40]!==B||e[41]!==a?(H=dt(B,a),e[40]=B,e[41]=a,e[42]=H):H=e[42];let se;e[43]!==C||e[44]!==J||e[45]!==H.label?(se=n.jsxs("span",{className:C,children:[J,H.label]}),e[43]=C,e[44]=J,e[45]=H.label,e[46]=se):se=e[46],e[47]!==P||e[48]!==se?(d=n.jsxs("div",{className:"flex items-start gap-3",children:[E,P,se]}),e[47]=P,e[48]=se,e[49]=d):d=e[49];let V;e[50]!==N?(V=n.jsx(Ui,{progress:N,className:"flex-1"}),e[50]=N,e[51]=V):V=e[51];let ee;e[52]!==I?(ee=n.jsxs("span",{className:"shrink-0 text-xs font-medium tabular-nums text-foreground",children:[I,"%"]}),e[52]=I,e[53]=ee):ee=e[53],e[54]!==V||e[55]!==ee?(u=n.jsxs("div",{className:"flex items-center gap-3",children:[V,ee]}),e[54]=V,e[55]=ee,e[56]=u):u=e[56],h="flex min-h-5 items-center gap-4 text-xs text-muted-foreground";const ie=N.done;let ne;e[57]!==a?(ne=a("taskBoard.epics.segmentDone"),e[57]=a,e[58]=ne):ne=e[58],e[59]!==N||e[60]!==ne?(j=n.jsx(ri,{className:"bg-success",count:ie,children:ne}),e[59]=N,e[60]=ne,e[61]=j):j=e[61];const F=N.active;let q;e[62]!==a?(q=a("taskBoard.epics.segmentActive"),e[62]=a,e[63]=q):q=e[63],e[64]!==N||e[65]!==q?(x=n.jsx(ri,{className:"bg-chart-1",count:F,children:q}),e[64]=N,e[65]=q,e[66]=x):x=e[66];const le=N.todo;let de;e[67]!==a?(de=a("taskBoard.epics.segmentTodo"),e[67]=a,e[68]=de):de=e[68],e[69]!==N||e[70]!==de?(k=n.jsx(ri,{className:"bg-muted-foreground/30",count:le,children:de}),e[69]=N,e[70]=de,e[71]=k):k=e[71],r="ml-auto flex items-center gap-3",e[72]!==z||e[73]!==a?(f=z>0&&n.jsxs("span",{title:a("taskBoard.taskBoard.swimlaneCritical"),className:"inline-flex items-center gap-1 text-destructive",children:[n.jsx(Pr,{size:13}),n.jsx("span",{className:"tabular-nums",children:z})]}),e[72]=z,e[73]=a,e[74]=f):f=e[74],e[75]!==T||e[76]!==a?(m=T>0&&n.jsxs("span",{title:T===1?a("taskBoard.taskBoard.agentsRunningOne"):a("taskBoard.taskBoard.agentsRunningMany",{count:T}),className:"inline-flex items-center gap-1 text-foreground",children:[n.jsx(xt,{className:"size-3"}),n.jsx("span",{className:"tabular-nums",children:T})]}),e[75]=T,e[76]=a,e[77]=m):m=e[77],p=$.length>0&&n.jsx("span",{className:"flex -space-x-1.5",children:$.slice(0,3).map(pe=>n.jsx(go,{assigneeId:pe,assignee:i.memberByUserId.get(pe),size:18,className:"rounded-full ring-2 ring-card"},pe))}),e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=p,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b}else r=e[4],o=e[5],c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],p=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16];let y;e[78]!==r||e[79]!==f||e[80]!==m||e[81]!==p?(y=n.jsxs("span",{className:r,children:[f,m,p]}),e[78]=r,e[79]=f,e[80]=m,e[81]=p,e[82]=y):y=e[82];let g;e[83]!==y||e[84]!==h||e[85]!==j||e[86]!==x||e[87]!==k?(g=n.jsxs("div",{className:h,children:[j,x,k,y]}),e[83]=y,e[84]=h,e[85]=j,e[86]=x,e[87]=k,e[88]=g):g=e[88];let v;return e[89]!==o||e[90]!==c||e[91]!==d||e[92]!==u||e[93]!==g||e[94]!==b?(v=n.jsxs("button",{type:b,onClick:o,className:c,children:[d,u,g]}),e[89]=o,e[90]=c,e[91]=d,e[92]=u,e[93]=g,e[94]=b,e[95]=v):v=e[95],v}function E1(t){return t.assigneeId?[t.assigneeId]:[]}function ri(t){const e=R.c(10),{className:s,count:l,children:i}=t;let a;e[0]!==s?(a=K("size-2 rounded-full",s),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==a?(r=n.jsx("span",{className:a}),e[2]=a,e[3]=r):r=e[3];let o;e[4]!==l?(o=n.jsx("span",{className:"tabular-nums text-foreground",children:l}),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==i||e[7]!==r||e[8]!==o?(c=n.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[r,o,i]}),e[6]=i,e[7]=r,e[8]=o,e[9]=c):c=e[9],c}function hi(t){const e=R.c(10),{status:s}=t;let l,i,a,r;if(e[0]!==s){const c=Dl(s);l=c.icon,i=12,a=!0,r=K("shrink-0",c.iconClassName.replace(/\banimate-\S+\b/g,"").trim()),e[0]=s,e[1]=l,e[2]=i,e[3]=a,e[4]=r}else l=e[1],i=e[2],a=e[3],r=e[4];let o;return e[5]!==l||e[6]!==i||e[7]!==a||e[8]!==r?(o=n.jsx(l,{size:i,"aria-hidden":a,className:r}),e[5]=l,e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],o}function jo(t){return K("inline-flex h-6 shrink-0 items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors",t?"bg-success/15 text-success hover:bg-success/25":"bg-muted text-foreground hover:bg-secondary-hover")}function O1(t){const e=R.c(35),{item:s,buttonClassName:l}=t,i=X(),a=cs();if(!a)return null;const r=s.isEpic;let o;e[0]!==a.items||e[1]!==s?(o=Qa(a.items,s),e[0]=a.items,e[1]=s,e[2]=o):o=e[2];const c=o;let d,u,f,m,p,h;if(e[3]!==a||e[4]!==l||e[5]!==r||e[6]!==s.id||e[7]!==c||e[8]!==i){let k;e[15]!==s.id?(k=v=>v.isEpic&&v.id!==s.id,e[15]=s.id,e[16]=k):k=e[16];const b=a.items.filter(k);u=Me;let y;e[17]!==l?(y=K(l,"max-w-full"),e[17]=l,e[18]=y):y=e[18];let g;e[19]!==r||e[20]!==c||e[21]!==i?(g=r?n.jsxs(n.Fragment,{children:[n.jsx(It,{size:16,className:"shrink-0 text-chart-1"}),i("taskBoard.epics.epicBadge")]}):c?n.jsxs(n.Fragment,{children:[c.isEpic?n.jsx(It,{size:16,className:"shrink-0 text-chart-1"}):n.jsx(di,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 truncate",children:c.title})]}):n.jsxs(n.Fragment,{children:[n.jsx(di,{size:16,className:"shrink-0"}),i("taskBoard.epics.addParent")]}),e[19]=r,e[20]=c,e[21]=i,e[22]=g):g=e[22],e[23]!==y||e[24]!==g?(h=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:y,children:g})}),e[23]=y,e[24]=g,e[25]=h):h=e[25],d=qe,f="start",m="w-64",p=r?n.jsx(Ne,{onSelect:()=>a.setEpic(s.id,!1),children:i("taskBoard.epics.makeCard")}):n.jsxs(n.Fragment,{children:[c&&n.jsx(Ne,{onSelect:()=>a.setParent(s.id,null),children:i("taskBoard.epics.noParent")}),b.map(v=>n.jsxs(Ne,{className:"gap-2",onSelect:()=>a.setParent(s.id,v.id),children:[n.jsx(It,{size:14,className:"shrink-0 text-chart-1"}),n.jsx("span",{className:"truncate",children:v.title})]},v.id)),(c||b.length>0)&&n.jsx(sl,{}),n.jsxs(Ne,{className:"gap-2",onSelect:()=>a.setEpic(s.id,!0),children:[n.jsx(It,{size:14,className:"shrink-0"}),i("taskBoard.epics.makeEpic")]})]}),e[3]=a,e[4]=l,e[5]=r,e[6]=s.id,e[7]=c,e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=p,e[14]=h}else d=e[9],u=e[10],f=e[11],m=e[12],p=e[13],h=e[14];let j;e[26]!==d||e[27]!==f||e[28]!==m||e[29]!==p?(j=n.jsx(d,{align:f,className:m,children:p}),e[26]=d,e[27]=f,e[28]=m,e[29]=p,e[30]=j):j=e[30];let x;return e[31]!==u||e[32]!==h||e[33]!==j?(x=n.jsxs(u,{children:[h,j]}),e[31]=u,e[32]=h,e[33]=j,e[34]=x):x=e[34],x}function L1(t){const e=R.c(44),{item:s}=t,l=X(),i=cs(),[a,r]=W.useState("");if(!i)return null;const o=s.isEpic;if(ho(i.items,s))return null;let c,d,u,f,m;if(e[0]!==i||e[1]!==a||e[2]!==o||e[3]!==s||e[4]!==l){const v=Wa(i.items,s.id),N=Ya(v),B=o?i.items.filter(I=>I.id!==s.id&&!I.isEpic&&!Qa(i.items,I)&&I.status!=="archived"):[];let w;e[10]!==i||e[11]!==a||e[12]!==s?(w=()=>{const I=a.trim();I&&(i.onCreateChild(s,I),r(""))},e[10]=i,e[11]=a,e[12]=s,e[13]=w):w=e[13],c=w,f="flex flex-col gap-3 pb-6";const D=o?"taskBoard.epics.workItems":"taskBoard.epics.subtasks";let C;e[14]!==l||e[15]!==D?(C=l(D),e[14]=l,e[15]=D,e[16]=C):C=e[16];let S;e[17]!==C?(S=n.jsx("span",{className:"text-base font-semibold text-foreground",children:C}),e[17]=C,e[18]=S):S=e[18];const T=N.total>0&&n.jsxs(n.Fragment,{children:[n.jsx(Ui,{progress:N,className:"max-w-40"}),n.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:l("taskBoard.epics.progress",{done:N.done,total:N.total})})]}),_=B.length>0&&n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{size:"sm",variant:"ghost",className:"ml-auto",children:l("taskBoard.epics.addExisting")})}),n.jsx(qe,{align:"end",className:"max-h-80 w-72 overflow-y-auto",children:B.map(I=>n.jsx(Ne,{onSelect:()=>i.setParent(I.id,s.id),children:n.jsx("span",{className:"truncate",children:I.title})},I.id))})]});e[19]!==_||e[20]!==S||e[21]!==T?(m=n.jsxs("div",{className:"flex items-center gap-3",children:[S,T,_]}),e[19]=_,e[20]=S,e[21]=T,e[22]=m):m=e[22],d="surface flex flex-col overflow-hidden";let z;e[23]!==i?(z=I=>n.jsx(bo,{child:I,board:i},I.id),e[23]=i,e[24]=z):z=e[24],u=v.map(z),e[0]=i,e[1]=a,e[2]=o,e[3]=s,e[4]=l,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9];let p;e[25]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(is,{size:15,className:"shrink-0 text-muted-foreground"}),e[25]=p):p=e[25];let h;e[26]===Symbol.for("react.memo_cache_sentinel")?(h=v=>r(v.target.value),e[26]=h):h=e[26];let j;e[27]!==c?(j=v=>{v.key==="Enter"&&c()},e[27]=c,e[28]=j):j=e[28];const x=o?"taskBoard.epics.addWorkItemPlaceholder":"taskBoard.epics.addSubtaskPlaceholder";let k;e[29]!==l||e[30]!==x?(k=l(x),e[29]=l,e[30]=x,e[31]=k):k=e[31];let b;e[32]!==a||e[33]!==j||e[34]!==k?(b=n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[p,n.jsx("input",{value:a,onChange:h,onKeyDown:j,placeholder:k,className:"min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),e[32]=a,e[33]=j,e[34]=k,e[35]=b):b=e[35];let y;e[36]!==d||e[37]!==b||e[38]!==u?(y=n.jsxs("div",{className:d,children:[u,b]}),e[36]=d,e[37]=b,e[38]=u,e[39]=y):y=e[39];let g;return e[40]!==y||e[41]!==f||e[42]!==m?(g=n.jsxs("div",{className:f,children:[m,y]}),e[40]=y,e[41]=f,e[42]=m,e[43]=g):g=e[43],g}const F1=ws.filter(t=>t!=="archived");function bo(t){const e=R.c(63),{child:s,board:l}=t,i=X(),a=At[s.type??Tl],r=a.icon,o=et[s.priority],c=o.icon,d=s.isEpic;let u;e[0]!==l.items||e[1]!==s.id||e[2]!==s.status||e[3]!==d?(u=d?Ki(Ya(Wa(l.items,s.id))):s.status,e[0]=l.items,e[1]=s.id,e[2]=s.status,e[3]=d,e[4]=u):u=e[4];const f=u;let m;e[5]!==f||e[6]!==i?(m=dt(f,i),e[5]=f,e[6]=i,e[7]=m):m=e[7];const p=m,h=f==="done";let j;e[8]!==h?(j=jo(h),e[8]=h,e[9]=j):j=e[9];const x=j;let k;e[10]!==l.memberByUserId||e[11]!==s.assigneeId?(k=s.assigneeId?l.memberByUserId.get(s.assigneeId):void 0,e[10]=l.memberByUserId,e[11]=s.assigneeId,e[12]=k):k=e[12];const b=k;let y;e[13]!==r||e[14]!==d||e[15]!==i||e[16]!==a.iconClassName||e[17]!==a.labelKey?(y=d?n.jsx(It,{size:15,"aria-label":i("taskBoard.epics.epicBadge"),className:"shrink-0 text-chart-1"}):n.jsx(r,{size:15,"aria-label":i(a.labelKey),className:K("shrink-0",a.iconClassName)}),e[13]=r,e[14]=d,e[15]=i,e[16]=a.iconClassName,e[17]=a.labelKey,e[18]=y):y=e[18];let g;e[19]!==l||e[20]!==s?(g=()=>l.onOpen(s),e[19]=l,e[20]=s,e[21]=g):g=e[21];const v=h&&"line-through";let N;e[22]!==v?(N=K("shrink-0 text-sm text-muted-foreground",v),e[22]=v,e[23]=N):N=e[23];let B;e[24]!==l.orgSlug||e[25]!==s.keySeq?(B=tn(l.orgSlug,s.keySeq),e[24]=l.orgSlug,e[25]=s.keySeq,e[26]=B):B=e[26];let w;e[27]!==N||e[28]!==B?(w=n.jsx("span",{className:N,children:B}),e[27]=N,e[28]=B,e[29]=w):w=e[29];let D;e[30]!==s.title?(D=n.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:s.title}),e[30]=s.title,e[31]=D):D=e[31];let C;e[32]!==w||e[33]!==D||e[34]!==g?(C=n.jsxs("button",{type:"button",onClick:g,className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[w,D]}),e[32]=w,e[33]=D,e[34]=g,e[35]=C):C=e[35];let S;e[36]!==l||e[37]!==s.id||e[38]!==x||e[39]!==d||e[40]!==p.label||e[41]!==f||e[42]!==i?(S=n.jsx("div",{className:"flex w-44 shrink-0 justify-start",children:d?n.jsxs("span",{className:x,children:[n.jsx(hi,{status:f}),p.label]}):n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:x,children:[n.jsx(hi,{status:f}),p.label,n.jsx(ul,{size:12,className:"shrink-0"})]})}),n.jsx(qe,{align:"end",className:"w-56",children:F1.map(O=>{const L=dt(O,i),U=L.visual.icon;return n.jsxs(Ne,{className:"gap-2",onSelect:()=>l.onSetStatus(s.id,O),children:[n.jsx(U,{size:14,className:K("shrink-0",L.visual.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),L.label]},O)})})]})}),e[36]=l,e[37]=s.id,e[38]=x,e[39]=d,e[40]=p.label,e[41]=f,e[42]=i,e[43]=S):S=e[43];const T=b?.user?.name??void 0;let _;e[44]!==b||e[45]!==s.assigneeId||e[46]!==T?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(go,{assigneeId:s.assigneeId,assignee:b,title:T})}),e[44]=b,e[45]=s.assigneeId,e[46]=T,e[47]=_):_=e[47];let z;e[48]!==o.labelKey||e[49]!==i?(z=i(o.labelKey),e[48]=o.labelKey,e[49]=i,e[50]=z):z=e[50];let I;e[51]!==o.iconClassName?(I=K("shrink-0",o.iconClassName),e[51]=o.iconClassName,e[52]=I):I=e[52];let $;e[53]!==c||e[54]!==z||e[55]!==I?($=n.jsx(c,{size:15,"aria-label":z,className:I}),e[53]=c,e[54]=z,e[55]=I,e[56]=$):$=e[56];let E;return e[57]!==C||e[58]!==S||e[59]!==_||e[60]!==$||e[61]!==y?(E=n.jsxs("div",{className:"flex min-w-0 items-center gap-3 border-b border-border px-3 py-2 transition-colors last:border-b-0 hover:bg-accent",children:[y,C,S,_,$]}),e[57]=C,e[58]=S,e[59]=_,e[60]=$,e[61]=y,e[62]=E):E=e[62],E}function P1(t){const e=R.c(14),{item:s}=t,l=X(),i=cs();if(!i)return null;let a;e[0]!==i.items||e[1]!==s?(a=Qa(i.items,s),e[0]=i.items,e[1]=s,e[2]=a):a=e[2];const r=a;if(!r)return null;const c=r.isEpic?"taskBoard.epics.epicBadge":"taskBoard.epics.parentTask";let d;e[3]!==l||e[4]!==c?(d=l(c),e[3]=l,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=n.jsx("span",{className:"text-base font-semibold text-foreground",children:d}),e[6]=d,e[7]=u):u=e[7];let f;e[8]!==i||e[9]!==r?(f=n.jsx("div",{className:"surface flex flex-col overflow-hidden",children:n.jsx(bo,{child:r,board:i})}),e[8]=i,e[9]=r,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs("div",{className:"flex flex-col gap-3 pb-6",children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function M1(t){const e=R.c(19),s=X(),l=cs();if(!l||!t)return null;if(t.isEpic){let u;e[0]!==s?(u=s("taskBoard.epics.tab"),e[0]=s,e[1]=u):u=e[1];let f;return e[2]!==l.onShowEpics||e[3]!==u?(f={key:"epics",label:u,onSelect:l.onShowEpics},e[2]=l.onShowEpics,e[3]=u,e[4]=f):f=e[4],f}let i,a,r,o;if(e[5]!==l.items||e[6]!==l.orgSlug||e[7]!==t){o=Symbol.for("react.early_return_sentinel");e:{if(i=Qa(l.items,t),!i){o=null;break e}a="parent",r=tn(l.orgSlug,i.keySeq)??i.title}e[5]=l.items,e[6]=l.orgSlug,e[7]=t,e[8]=i,e[9]=a,e[10]=r,e[11]=o}else i=e[8],a=e[9],r=e[10],o=e[11];if(o!==Symbol.for("react.early_return_sentinel"))return o;let c;e[12]!==l||e[13]!==i?(c=()=>l.onOpen(i),e[12]=l,e[13]=i,e[14]=c):c=e[14];let d;return e[15]!==a||e[16]!==r||e[17]!==c?(d={key:a,label:r,onSelect:c},e[15]=a,e[16]=r,e[17]=c,e[18]=d):d=e[18],d}const K1="claude-subscription";function ko(t){const e=(t??[]).filter(s=>s.costUsd!==null);return e.length===0?null:{total:e.reduce((s,l)=>s+(l.costUsd??0),0),runCount:e.length,onSubscription:e.every(s=>s.costProvider===K1)}}function U1(t,e){const s=t.state==="open"&&!t.merged,l=t.mergeable===!1,i=t.checksStatus!=="failing";return{isOpen:s,hasConflict:l,showShip:e&&s&&i&&!l,showResolveConflict:e&&s&&l}}function yo(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function q1(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(yo).length,total:e.length}}function G1(t){const e=R.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==s||e[1]!==t?(i=Ct.previewProbe(s,t??""),e[0]=s,e[1]=t,e[2]=i):i=e[2];const a=!!t;let r;e[3]!==l||e[4]!==t?(r=()=>l.call("TASK_BOARD_PREVIEW_PROBE",{url:t}),e[3]=l,e[4]=t,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==a||e[8]!==r?(o={queryKey:i,enabled:a,staleTime:0,gcTime:0,retry:!1,queryFn:r},e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],Ga(o)}function V1(t,e){return new URL(e,t).toString()}function H1(t){const e=R.c(46),{url:s,routes:l}=t,i=X(),{data:a,isPending:r,isError:o}=G1(s),c=a?.available??!1;if(r){let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(xt,{className:"size-[14px]"}),e[0]=D):D=e[0];let C;e[1]!==i?(C=i("taskBoard.taskDialog.previewLabel"),e[1]=i,e[2]=C):C=e[2];let S;return e[3]!==C?(S=n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[D,C]}),e[3]=C,e[4]=S):S=e[4],S}if(!c||o){let D;e[5]!==i?(D=i("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=i,e[6]=D):D=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ui,{size:14}),e[7]=C):C=e[7];let S;e[8]!==i?(S=i("taskBoard.taskDialog.previewUnavailable"),e[8]=i,e[9]=S):S=e[9];let T;return e[10]!==D||e[11]!==S?(T=n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:D,children:[C,S]}),e[10]=D,e[11]=S,e[12]=T):T=e[12],T}const d=l.length>0&&"rounded-r-none";let u;e[13]!==d?(u=K("gap-1.5",d),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ui,{size:14}),e[15]=f):f=e[15];let m;e[16]!==i?(m=i("taskBoard.taskDialog.previewLabel"),e[16]=i,e[17]=m):m=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Ma,{size:12}),e[18]=p):p=e[18];let h;e[19]!==m||e[20]!==s?(h=n.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",children:[f,m,p]}),e[19]=m,e[20]=s,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==h?(j=n.jsx(re,{asChild:!0,type:"button",variant:"outline",size:"sm",className:u,children:h}),e[22]=u,e[23]=h,e[24]=j):j=e[24];const x=j;if(l.length===0)return x;let k;e[25]!==i?(k=i("taskBoard.taskDialog.previewRoutesLabel"),e[25]=i,e[26]=k):k=e[26];let b;e[27]!==i?(b=i("taskBoard.taskDialog.previewRoutesLabel"),e[27]=i,e[28]=b):b=e[28];let y;e[29]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ul,{size:14}),e[29]=y):y=e[29];let g;e[30]!==k||e[31]!==b?(g=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":k,title:b,children:y})}),e[30]=k,e[31]=b,e[32]=g):g=e[32];let v;if(e[33]!==l||e[34]!==s){let D;e[36]!==s?(D=C=>n.jsx(Ne,{asChild:!0,children:n.jsx("a",{href:V1(s,C),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:C})},C),e[36]=s,e[37]=D):D=e[37],v=l.map(D),e[33]=l,e[34]=s,e[35]=v}else v=e[35];let N;e[38]!==v?(N=n.jsx(qe,{align:"start",children:v}),e[38]=v,e[39]=N):N=e[39];let B;e[40]!==g||e[41]!==N?(B=n.jsxs(Me,{children:[g,N]}),e[40]=g,e[41]=N,e[42]=B):B=e[42];let w;return e[43]!==x||e[44]!==B?(w=n.jsxs("div",{className:"flex items-center",children:[x,B]}),e[43]=x,e[44]=B,e[45]=w):w=e[45],w}function Y1(t){return typeof t!="string"?"":io(t.replace(/^Error:\s*/,"")).message}function W1(t){return t?.to==="todo"?!0:t?.to==="triage"&&typeof t.retriesSpent=="number"}function Q1(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(!s||s.action!=="status_changed")continue;if(typeof s.data?.retry=="number")return null;const l=s.data?.reason;return typeof l!="string"||!W1(s.data)?null:io(l.replace(/^Error:\s*/,""))}return null}function X1({orgSlug:t,repo:e,repositories:s,returnTo:l}){const i=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(o=>o.path===e)?.accountId:null;if(!a)return{url:`${i}/install?returnTo=${encodeURIComponent(l)}`,ownerOnly:!1,owner:null};const r=e?.includes("/")?e.split("/")[0]:null;return{url:`${i}/accounts/${encodeURIComponent(a)}/manage`,ownerOnly:r!==null,owner:r}}function vo(t){const e=R.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==t||e[1]!==s?(i=Ct.taskBoardActivity(s,t??""),e[0]=t,e[1]=s,e[2]=i):i=e[2];const a=!!t;let r;e[3]!==t||e[4]!==l?(r=async()=>(await l.call("TASK_BOARD_ACTIVITY_LIST",{taskBoardItemId:t})).activity,e[3]=t,e[4]=l,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==a||e[8]!==r?(o={queryKey:i,enabled:a,queryFn:r},e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],Ga(o)}function J1(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Zs();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_PROMOTE_TO_PRODUCTION",{taskBoardItemId:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function Z1(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Zs();let a;e[0]!==t||e[1]!==l?(a=async c=>await l.call("TASK_BOARD_RESOLVE_CONFLICT",{id:t,prNumber:c}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function ef(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Zs();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_RUN_REVIEWER",{id:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function tf(t){return t?Yd:[]}function sf(t,e){if(e.length===0)return null;const s=e.map(a=>t.find(r=>r.reviewer===a)),l=s.filter(a=>a?.verdict==="approved"),i={passed:l.length,total:e.length};return s.some(a=>a?.verdict==="changes_requested")?{...i,tone:"danger"}:l.length===0?{...i,tone:"danger"}:l.length<e.length?{...i,tone:"pending"}:{...i,tone:"ok"}}function nf(t){return t==="ready_for_deployment"}const af=[],lf=[];function No(t,e){const s=R.c(4),l=e===void 0?af:e,i=xu();let a;if(s[0]!==i||s[1]!==l||s[2]!==t){const r=Nu(i);a=co(r,[...t.map(rf),...l]),s[0]=i,s[1]=l,s[2]=t,s[3]=a}else a=s[3];return a}function rf(t){return t.repo}function So(t){return t?.projects.length===1?t.projects[0]:void 0}function of(t){return So(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function ls(t){const e=R.c(6),{entry:s}=t;let l;e[0]!==s?(l=So(s),e[0]=s,e[1]=l):l=e[1];const i=l;if(i){let r;return e[2]!==i.icon||e[3]!==i.title?(r=n.jsx(Cu,{icon:i.icon,name:i.title}),e[2]=i.icon,e[3]=i.title,e[4]=r):r=e[4],r}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Bu,{className:"size-3"})}),e[5]=a):a=e[5],a}function Bo(t){const e=R.c(14),{entry:s}=t;let l;e[0]!==s?(l=of(s),e[0]=s,e[1]=l):l=e[1];const i=l;let a;e[2]!==s?(a=n.jsx(ls,{entry:s}),e[2]=s,e[3]=a):a=e[3];let r;e[4]!==s.title?(r=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=r):r=e[5];let o;e[6]!==i?(o=i&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=o):o=e[7];let c;e[8]!==r||e[9]!==o?(c=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10];let d;return e[11]!==a||e[12]!==c?(d=n.jsxs(n.Fragment,{children:[a,c]}),e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function qi(t){const e=R.c(57),{members:s,onSelect:l}=t,i=X();let a;e[0]!==i?(a=i("taskBoard.taskDialog.assignToPlaceholder"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==i?(r=i("taskBoard.taskDialog.assignToPlaceholder"),e[2]=i,e[3]=r):r=e[3];let o;e[4]!==a||e[5]!==r?(o=n.jsx(Li,{placeholder:a,"aria-label":r,className:"h-9"}),e[4]=a,e[5]=r,e[6]=o):o=e[6];let c;e[7]!==i?(c=i("taskBoard.taskDialog.noMembersFound"),e[7]=i,e[8]=c):c=e[8];let d;e[9]!==c?(d=n.jsx(Fi,{children:c}),e[9]=c,e[10]=d):d=e[10];let u;e[11]!==i?(u=i("taskBoard.taskDialog.superAgentLabel"),e[11]=i,e[12]=u):u=e[12];let f;e[13]!==l?(f=()=>l(Ie),e[13]=l,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(ct,{size:16}),e[15]=m):m=e[15];let p;e[16]!==i?(p=i("taskBoard.taskDialog.superAgentLabel"),e[16]=i,e[17]=p):p=e[17];let h;e[18]!==p?(h=n.jsx("span",{className:"truncate",children:p}),e[18]=p,e[19]=h):h=e[19];let j;e[20]!==h||e[21]!==u||e[22]!==f?(j=n.jsxs(Hs,{value:u,onSelect:f,className:"gap-2",children:[m,h]}),e[20]=h,e[21]=u,e[22]=f,e[23]=j):j=e[23];let x;e[24]!==i?(x=i("taskBoard.taskDialog.unassignedLabel"),e[24]=i,e[25]=x):x=e[25];let k;e[26]!==l?(k=()=>l(null),e[26]=l,e[27]=k):k=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Vs,{size:16,className:"text-muted-foreground"}),e[28]=b):b=e[28];let y;e[29]!==i?(y=i("taskBoard.taskDialog.unassignedLabel"),e[29]=i,e[30]=y):y=e[30];let g;e[31]!==y?(g=n.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=g):g=e[32];let v;e[33]!==x||e[34]!==k||e[35]!==g?(v=n.jsxs(Hs,{value:x,onSelect:k,className:"gap-2",children:[b,g]}),e[33]=x,e[34]=k,e[35]=g,e[36]=v):v=e[36];let N;e[37]!==j||e[38]!==v?(N=n.jsxs(qa,{children:[j,v]}),e[37]=j,e[38]=v,e[39]=N):N=e[39];let B;e[40]!==i?(B=i("taskBoard.taskDialog.membersGroupHeading"),e[40]=i,e[41]=B):B=e[41];let w;if(e[42]!==s||e[43]!==l){let T;e[45]!==l?(T=_=>n.jsxs(Hs,{value:_.user?.name??_.userId,onSelect:()=>l(_.userId),className:"gap-2",children:[n.jsx(ot,{url:_.user?.image??void 0,fallback:_.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:_.user?.name??_.userId})]},_.userId),e[45]=l,e[46]=T):T=e[46],w=s.map(T),e[42]=s,e[43]=l,e[44]=w}else w=e[44];let D;e[47]!==B||e[48]!==w?(D=n.jsx(qa,{heading:B,children:w}),e[47]=B,e[48]=w,e[49]=D):D=e[49];let C;e[50]!==N||e[51]!==D||e[52]!==d?(C=n.jsxs(Pi,{children:[d,N,D]}),e[50]=N,e[51]=D,e[52]=d,e[53]=C):C=e[53];let S;return e[54]!==C||e[55]!==o?(S=n.jsxs(Mi,{children:[o,C]}),e[54]=C,e[55]=o,e[56]=S):S=e[56],S}function Co({tags:t,selectedIds:e,defaultColor:s,onToggle:l,onCreate:i,onDelete:a}){const r=X(),[o,c]=W.useState(""),[d,u]=W.useState(!1),[f,m]=W.useState(s),p=o.trim(),h=t.some(x=>x.name.toLowerCase()===p.toLowerCase()),j=async()=>{if(!(!p||h||d)){u(!0);try{await i(p,f),c("")}finally{u(!1)}}};return n.jsxs(Mi,{children:[n.jsx(Li,{value:o,onValueChange:c,placeholder:r("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":r("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),n.jsxs(Pi,{children:[p&&!h?n.jsx(qa,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("input",{type:"color",value:f,onChange:x=>m(x.target.value),"aria-label":r("taskBoard.taskDialog.pickTagColorAriaLabel"),className:"ml-2 size-4 shrink-0 cursor-pointer appearance-none rounded-full border-0 bg-transparent p-0 [&::-moz-color-swatch]:rounded-full [&::-moz-color-swatch]:border-0 [&::-webkit-color-swatch]:rounded-full [&::-webkit-color-swatch]:border-0 [&::-webkit-color-swatch-wrapper]:p-0"}),n.jsxs(Hs,{value:`create-${p}`,disabled:d,onSelect:j,className:"flex-1 gap-2",children:[n.jsx(is,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:r("taskBoard.taskDialog.createTagOption",{name:p})})]})]})}):n.jsx(Fi,{children:r("taskBoard.taskDialog.noTagsFound")}),n.jsx(qa,{children:t.map(x=>{const k=e.includes(x.id);return n.jsxs(Hs,{value:x.name,onSelect:()=>l(x.id),className:"group gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(x.color)}}),n.jsx("span",{className:"flex-1 truncate",children:x.name}),n.jsx("button",{type:"button","aria-label":r("taskBoard.taskDialog.deleteTagAriaLabel",{name:x.name}),className:"flex size-5 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 hover:bg-background hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100",onClick:b=>{b.stopPropagation(),a(x.id)},children:n.jsx(Si,{size:13})}),k&&n.jsx(Cs,{size:14,className:"shrink-0 text-foreground"})]},x.id)})})]})]})}function cf(t){if(!t)return[];const e=[],s=new Set,l=(r,o)=>{s.has(r)||(s.add(r),e.push({url:r,label:o.trim()||r}))},i=t.replace(/!\[[^\]]*\]\([^)]*\)/g,"");for(const r of i.matchAll(/\[([^\]]*)\]\((https?:\/\/[^)\s]+)[^)]*\)/g))l(r[2]??"",r[1]??"");const a=i.replace(/\[[^\]]*\]\([^)]*\)/g,"");for(const r of a.matchAll(/https?:\/\/[^\s)]+/g)){const o=r[0].replace(/[.,;:!?]+$/,"");o&&l(o,o)}return e}function df(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function uf(t){const e=R.c(5),{title:s}=t;let l;e[0]!==s?(l=n.jsx(Du,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:n.jsx(Tu,{className:"truncate text-sm leading-snug",children:s})}),e[0]=s,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex flex-1 items-center justify-center"}),e[2]=i):i=e[2];let a;return e[3]!==l?(a=n.jsxs(n.Fragment,{children:[l,i]}),e[3]=l,e[4]=a):a=e[4],a}function ff(t){const e=R.c(12),{thread:s}=t,{org:l,locator:i}=tt();let a;e[0]!==l.id||e[1]!==l.slug?(a={connectionId:wc,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=a):a=e[2];const r=zu(a),o=oo(),c=ju(),{data:d}=yi();let u;e[3]!==s?(u=df(s),e[3]=s,e[4]=u):u=e[4];let f;return e[5]!==r||e[6]!==o||e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==c?(f=n.jsx(Au,{thread:u,client:r,locator:i,connections:o,virtualMcps:c,members:d,meta:!1}),e[5]=r,e[6]=o,e[7]=i,e[8]=d,e[9]=u,e[10]=c,e[11]=f):f=e[11],f}function mf(t){const e=R.c(11),{thread:s,onClose:l}=t,i=X(),a=!!s;let r;e[0]!==l?(r=u=>!u&&l(),e[0]=l,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==s?(o=s&&n.jsx(W.Suspense,{fallback:n.jsx(uf,{title:s.title??i("taskBoard.taskDialog.superAgentDefaultName")}),children:n.jsx(ff,{thread:s})}),e[2]=i,e[3]=s,e[4]=o):o=e[4];let c;e[5]!==o?(c=n.jsx(_u,{"data-testid":"task-thread-sheet",className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:o}),e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==c?(d=n.jsx(Iu,{open:a,onOpenChange:r,children:c}),e[7]=a,e[8]=r,e[9]=c,e[10]=d):d=e[10],d}const pf=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),gf=new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"short"});function wo(t){return e=>{e.target instanceof Element&&e.target.closest("a, button, input, [contenteditable=true]")||window.getSelection()?.toString()||t()}}function Do(t){const e=R.c(65),{id:s,author:l,avatar:i,createdAt:a,body:r,threadId:o,metadata:c,actions:d,onOpenThread:u,onOpen:f,commentId:m,muted:p,editor:h,continuation:j}=t,x=X(),k=W.useContext(dr),b=k?.orgSlug;let y;e[0]!==k?.orgId||e[1]!==b||e[2]!==o?(y=Ct.orgFsList(k?.orgId??b??"","outputs",o??""),e[0]=k?.orgId,e[1]=b,e[2]=o,e[3]=y):y=e[3];let g;e[4]!==r||e[5]!==b||e[6]!==o?(g=!!b&&!!o&&tu(r),e[4]=r,e[5]=b,e[6]=o,e[7]=g):g=e[7];let v;e[8]!==b||e[9]!==o?(v=()=>b&&o?Eu(b,"outputs",o):[],e[8]=b,e[9]=o,e[10]=v):v=e[10];let N;e[11]!==y||e[12]!==g||e[13]!==v?(N={queryKey:y,enabled:g,staleTime:3e4,gcTime:3e5,retry:!1,queryFn:v},e[11]=y,e[12]=g,e[13]=v,e[14]=N):N=e[14];const{data:B}=Ga(N);let w;e[15]!==B?(w=new Set(B?.filter(xf).map(hf)),e[15]=B,e[16]=w):w=e[16];const D=w;let C,S,T,_,z,I,$,E;if(e[17]!==l||e[18]!==i||e[19]!==m||e[20]!==j||e[21]!==a||e[22]!==c||e[23]!==p||e[24]!==f||e[25]!==u||e[26]!==x){const P=new Date(a),J=gf.format(P);$=m,E="task-message",C=p||void 0,e[35]!==f?(S=f&&wo(f),e[35]=f,e[36]=S):S=e[36];const H=j?"py-1":"py-2.5",se=p&&"opacity-60 hover:opacity-100",V=f&&"cursor-pointer";e[37]!==H||e[38]!==se||e[39]!==V?(T=K("group relative -mx-3 flex min-w-0 gap-3 rounded-lg px-3 transition-colors hover:bg-muted/50",H,se,V),e[37]=H,e[38]=se,e[39]=V,e[40]=T):T=e[40];const ee=j?n.jsx("time",{dateTime:a,title:J,className:"text-meta whitespace-nowrap pt-0.5 opacity-0 group-hover:opacity-100",children:pf.format(P)}):n.jsx("div",{className:"pt-0.5",children:i});e[41]!==ee?(_=n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:ee}),e[41]=ee,e[42]=_):_=e[42],z="flex min-w-0 flex-1 flex-col gap-0.5",I=(!j||c||u)&&n.jsxs("div",{className:"flex min-h-5 flex-wrap items-center gap-x-2 gap-y-1",children:[!j&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),n.jsx("time",{dateTime:a,title:J,className:"text-meta",children:Al(P)})]}),p&&n.jsx("span",{className:"text-meta",children:x("taskBoard.conversation.behindTheScenesLabel")}),c,u&&n.jsx(re,{variant:"ghost",size:"xs",className:"ml-auto font-normal text-muted-foreground",onClick:u,children:x("taskBoard.conversation.openChat")})]}),e[17]=l,e[18]=i,e[19]=m,e[20]=j,e[21]=a,e[22]=c,e[23]=p,e[24]=f,e[25]=u,e[26]=x,e[27]=C,e[28]=S,e[29]=T,e[30]=_,e[31]=z,e[32]=I,e[33]=$,e[34]=E}else C=e[27],S=e[28],T=e[29],_=e[30],z=e[31],I=e[32],$=e[33],E=e[34];let O;e[43]!==r||e[44]!==h||e[45]!==k||e[46]!==s||e[47]!==D||e[48]!==o?(O=(h||r)&&n.jsx("div",{className:K("min-w-0 break-words leading-relaxed text-foreground","[&_img]:max-h-80"),children:h??n.jsx(dr.Provider,{value:k?{...k,threadId:o??void 0,outputFiles:D}:null,children:n.jsx(Ri,{id:s,text:r,imageGallery:!0})})}),e[43]=r,e[44]=h,e[45]=k,e[46]=s,e[47]=D,e[48]=o,e[49]=O):O=e[49];let L;e[50]!==O||e[51]!==z||e[52]!==I?(L=n.jsxs("div",{className:z,children:[I,O]}),e[50]=O,e[51]=z,e[52]=I,e[53]=L):L=e[53];let U;e[54]!==d?(U=d&&n.jsx("div",{className:"surface absolute -top-3 right-3 z-10 flex items-center gap-0.5 rounded-lg p-0.5 opacity-0 transition-opacity group-hover:opacity-100 has-[:focus-visible]:opacity-100 has-[[data-state=open]]:opacity-100",children:d}),e[54]=d,e[55]=U):U=e[55];let G;return e[56]!==C||e[57]!==S||e[58]!==T||e[59]!==_||e[60]!==L||e[61]!==U||e[62]!==$||e[63]!==E?(G=n.jsxs("article",{"data-comment-id":$,"data-testid":E,"data-muted":C,onClick:S,className:T,children:[_,L,U]}),e[56]=C,e[57]=S,e[58]=T,e[59]=_,e[60]=L,e[61]=U,e[62]=$,e[63]=E,e[64]=G):G=e[64],G}function hf(t){return t.path.slice(t.path.lastIndexOf("/")+1)}function xf(t){return t.kind==="file"}const jf=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function bf({placeholder:t,onSubmit:e,onEmptyChange:s,onSendingChange:l,onMentionsChange:i,agents:a,autoFocus:r,uploads:o,ref:c,className:d}){const[u]=W.useState(()=>new nu),f=W.useRef(!1),m=Ou({extensions:[Lu.configure({heading:!1,bulletList:!1,orderedList:!1,listItem:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,link:!1,underline:!1}),au,du(u),Mu.configure({placeholder:t}),lu,...o?[iu,ru,ou]:[]],editorProps:{attributes:{role:"textbox","aria-label":t,"aria-multiline":"true",class:K("outline-none text-sm leading-relaxed text-foreground",jf)},handleKeyDown:(h,j)=>j.key!=="Enter"||j.shiftKey||cu.getState(h.state)?.active?!1:(j.preventDefault(),p(),!0),handlePaste:o?.handlePaste,handleDrop:o?.handleDrop},onCreate:({editor:h})=>{r&&h.commands.focus("end")},onUpdate:({editor:h})=>{s(h.isEmpty),i?.(su(h.getMarkdown()))}});async function p(){if(!m||f.current||o?.uploading())return;const h=m.getMarkdown().trim();if(h){f.current=!0,l?.(!0),m.setEditable(!1);try{await e(h)!==!1&&(m.commands.clearContent(),s(!0),i?.([]))}finally{f.current=!1,l?.(!1),m.isDestroyed||m.setEditable(!0)}}}return W.useImperativeHandle(c,()=>({submit:p,focus:()=>m?.commands.focus(),attach:h=>{!m?.isEditable||!o||o.uploadInto(m.view,h,m.state.selection.to)}})),n.jsxs(n.Fragment,{children:[n.jsx(Fu,{editor:m,className:d}),n.jsx(uu,{store:u,agents:a})]})}function kf(){const t=R.c(5),e=X();let s;t[0]!==e?(s=e("taskBoard.taskDialog.superAgentLabel"),t[0]=e,t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ct,{size:24}),t[2]=l):l=t[2];let i;return t[3]!==s?(i=[{id:Ie,name:s,icon:l}],t[3]=s,t[4]=i):i=t[4],i}function yf(t){const e=R.c(42),{thread:s,me:l,onEdit:i,onDelete:a,onReply:r,liveRunElsewhere:o,continuation:c,replying:d,onReplyingChange:u}=t,f=X(),[m,p]=W.useState(!1),h=d??m,j=u??p,x=s.run?.status==="running"||s.run?.status==="waiting",[k,b]=W.useState(!s.run||x||s.replies.length===0);let y;if(e[0]!==c||e[1]!==k||e[2]!==x||e[3]!==o||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==h||e[9]!==j||e[10]!==f||e[11]!==s){const g=s.replies.at(-1),v=s.run?x?"steer":o?"busy":"revive":void 0,N=v==="steer"?"taskBoard.agentThread.replySteer":v==="revive"?"taskBoard.agentThread.replyRevive":"taskBoard.agentThread.reply";let B;e[13]!==f||e[14]!==N?(B=f(N),e[13]=f,e[14]=N,e[15]=B):B=e[15];const w=B;let D;e[16]!==j?(D=()=>{b(!0),j(!0)},e[16]=j,e[17]=D):D=e[17];const C=D,S=k&&!!s.run&&s.replies.length>0&&!x,T=s.run,_=T&&s.author.isAgent?T:void 0,z=T&&!_&&k&&g?.author.isAgent?T:void 0,I=T&&!_&&!z?T:void 0;let $;e[18]!==x?($=V=>n.jsxs(n.Fragment,{children:[n.jsx(hr,{run:V}),x&&V.onStop&&n.jsx(Cf,{onStop:V.onStop})]}),e[18]=x,e[19]=$):$=e[19];const E=$,O=!c&&"pt-2";let L;e[20]!==O?(L=K("flex flex-col",O),e[20]=O,e[21]=L):L=e[21];const U=s.author.isAgent?s.run?.onOpen??s.onOpenThread:void 0;let G;e[22]!==E||e[23]!==_?(G=_&&E(_),e[22]=E,e[23]=_,e[24]=G):G=e[24];const P=r&&C;let J;e[25]!==l||e[26]!==i||e[27]!==s?(J=jr(s,l)?V=>i(s.id,V):void 0,e[25]=l,e[26]=i,e[27]=s,e[28]=J):J=e[28];let H;e[29]!==l||e[30]!==a||e[31]!==s?(H=xr(s,l)?()=>a(s.id):void 0,e[29]=l,e[30]=a,e[31]=s,e[32]=H):H=e[32];let se;e[33]!==c||e[34]!==w||e[35]!==P||e[36]!==J||e[37]!==H||e[38]!==U||e[39]!==G||e[40]!==s?(se=n.jsx(br,{comment:s,onOpen:U,continuation:c,metadata:G,onReply:P,replyLabel:w,onEdit:J,onDelete:H}),e[33]=c,e[34]=w,e[35]=P,e[36]=J,e[37]=H,e[38]=U,e[39]=G,e[40]=s,e[41]=se):se=e[41],y=n.jsxs("div",{"data-testid":"comment-thread","data-expanded":k,className:L,children:[se,(s.replies.length>0||h||I)&&n.jsxs("div",{className:"ml-11 flex flex-col",children:[!k&&g&&n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:()=>b(!0),className:"focus-ring -mx-1.5 flex min-w-0 items-center gap-2 rounded-lg px-1.5 py-1 text-left text-sm transition-colors hover:bg-muted/50",children:[n.jsx(vf,{replies:s.replies}),n.jsx("span",{className:"shrink-0 font-medium text-foreground",children:s.replies.length===1?f("taskBoard.agentThread.repliesCountOne"):f("taskBoard.agentThread.repliesCount",{count:s.replies.length})}),n.jsxs("span",{className:"min-w-0 truncate text-muted-foreground",children:[g.author.name,": ",wf(g.body)]})]}),I&&!x&&n.jsx(hr,{run:I})]}),k&&s.replies.map((V,ee)=>n.jsx(br,{onOpen:V.author.isAgent?V.onOpenThread??s.run?.onOpen:void 0,comment:z&&V===g?{...V,onOpenThread:void 0}:V,metadata:z&&V===g&&E(z),continuation:To(s.replies[ee-1],V),onEdit:jr(V,l)?ie=>i(V.id,ie):void 0,onDelete:xr(V,l)?()=>a(V.id):void 0,onReply:r&&C,replyLabel:w,isReply:!0},V.id)),I&&(x||k)&&n.jsxs("div",{onClick:I.onOpen&&wo(I.onOpen),className:K("-mx-3 flex min-h-9 items-center gap-3 rounded-lg px-3 py-1 transition-colors",I.onOpen&&"cursor-pointer hover:bg-muted/50"),children:[n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:n.jsx(ct,{size:24})}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:f("taskBoard.taskDialog.superAgentLabel")}),E(I)]}),r&&h&&n.jsx("div",{className:"mt-1",children:n.jsx(_o,{autoFocus:!0,replyTo:s.run?{id:Ie,name:f("taskBoard.taskDialog.superAgentLabel"),isAgent:!0}:s.author,placeholder:f(s.run?"taskBoard.agentThread.replyToRunPlaceholder":"taskBoard.taskDialog.commentReplyPlaceholder"),route:v,mentionRoute:o?"steer":"start",onCancel:()=>j(!1),onSubmit:async V=>{const ee=await r(V);return ee!==!1&&j(!1),ee}})}),S&&n.jsx("div",{className:"-mx-2 flex",children:n.jsxs(re,{variant:"ghost",size:"xs",onClick:()=>{b(!1),j(!1)},className:"font-normal text-muted-foreground",children:[n.jsx(Cd,{}),f("taskBoard.agentThread.hideReplies")]})})]})]}),e[0]=c,e[1]=k,e[2]=x,e[3]=o,e[4]=l,e[5]=a,e[6]=i,e[7]=r,e[8]=h,e[9]=j,e[10]=f,e[11]=s,e[12]=y}else y=e[12];return y}function vf(t){const e=R.c(4),{replies:s}=t;let l;e[0]!==s?(l=[...new Map(s.map(Sf)).values()].slice(0,3),e[0]=s,e[1]=l):l=e[1];const i=l;let a;return e[2]!==i?(a=n.jsx("span",{className:"flex shrink-0 -space-x-1",children:i.map(Nf)}),e[2]=i,e[3]=a):a=e[3],a}function Nf(t){return n.jsx("span",{className:"flex rounded-full ring-2 ring-background",children:n.jsx(Gi,{author:t,size:"2xs"})},t.id)}function Sf(t){return[t.author.id,t.author]}const Bf=5*6e4;function To(t,e){if(!t||t.replies.length>0||t.run||e.run||t.author.id!==e.author.id||!!t.internal!=!!e.internal)return!1;const s=new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime();return s>=0&&s<Bf}function Cf(t){const e=R.c(12),{onStop:s}=t,l=X(),[i,a]=W.useState(!1);let r;e[0]!==s?(r=async()=>{a(!0);try{await s()}catch{a(!1)}},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==i?(o=i?n.jsx(xt,{size:"2xs"}):n.jsx("span",{"aria-hidden":!0,className:"size-2 rounded-[2px] bg-current"}),e[2]=i,e[3]=o):o=e[3];const c=i?"taskBoard.agentThread.stopping":"taskBoard.agentThread.stop";let d;e[4]!==l||e[5]!==c?(d=l(c),e[4]=l,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==i||e[8]!==r||e[9]!==o||e[10]!==d?(u=n.jsxs(re,{variant:"ghost-destructive",size:"xs",disabled:i,onClick:r,className:"h-5",children:[o,d]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d,e[11]=u):u=e[11],u}function wf(t){return t.replace(/\[@?([^\]]+)\]\([^)]*\)/g,"$1").replace(/[*_`#>]/g,"").replace(/\s+/g," ").trim()}function Df(t){switch(t){case"running":return{variant:"success",hover:"hover:bg-success/15",icon:n.jsx(xt,{size:"2xs"}),label:"taskBoard.agentThread.statusRunning"};case"waiting":return{variant:"warning",hover:"hover:bg-warning/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusWaiting"};case"failed":return{variant:"destructive",hover:"hover:bg-destructive/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusFailed"};case"stopped":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Xc,{}),label:"taskBoard.agentThread.statusStopped"};case"done":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Ha,{}),label:"taskBoard.agentThread.statusDone"};default:{const e=t;throw new Error(`Unhandled run status: ${String(e)}`)}}}function hr(t){const e=R.c(4),{run:s}=t,l=X();let i;if(e[0]!==s.onOpen||e[1]!==s.status||e[2]!==l){const{variant:a,hover:r,icon:o,label:c}=Df(s.status);i=s.onOpen?n.jsx(Ka,{variant:a,asChild:!0,className:K("cursor-pointer",r),children:n.jsxs("button",{type:"button",onClick:s.onOpen,"aria-label":l("taskBoard.agentThread.openRun"),children:[o,l(c)]})}):n.jsxs(Ka,{variant:a,children:[o,l(c)]}),e[0]=s.onOpen,e[1]=s.status,e[2]=l,e[3]=i}else i=e[3];return i}function xr(t,e){return t.author.id===e.id||t.author.isAgent===!0}function jr(t,e){return t.author.id===e.id}function br(t){const e=R.c(28),{comment:s,onOpen:l,isReply:i,continuation:a,metadata:r,onReply:o,replyLabel:c,onEdit:d,onDelete:u}=t,f=X(),[m,p]=W.useState(!1),h=i?"xs":"sm";let j;e[0]!==s.author||e[1]!==h?(j=n.jsx(Gi,{author:s.author,size:h}),e[0]=s.author,e[1]=h,e[2]=j):j=e[2];const x=a&&!r,k=m?void 0:l;let b;e[3]!==s.body||e[4]!==m||e[5]!==d?(b=m&&d?n.jsx(Tf,{body:s.body,onSave:d,onClose:()=>p(!1)}):void 0,e[3]=s.body,e[4]=m,e[5]=d,e[6]=b):b=e[6];let y;e[7]!==m||e[8]!==u||e[9]!==d||e[10]!==o||e[11]!==c||e[12]!==f?(y=!m&&(o||d||u)&&n.jsxs(n.Fragment,{children:[o&&n.jsxs(re,{variant:"ghost",size:"sm",title:c,onClick:o,className:"font-normal text-muted-foreground",children:[n.jsx(Qc,{size:16}),f("taskBoard.agentThread.reply")]}),(d||u)&&n.jsx(_f,{onEdit:d&&(()=>p(!0)),onDelete:u})]}),e[7]=m,e[8]=u,e[9]=d,e[10]=o,e[11]=c,e[12]=f,e[13]=y):y=e[13];let g;return e[14]!==s.author.name||e[15]!==s.body||e[16]!==s.createdAt||e[17]!==s.id||e[18]!==s.internal||e[19]!==s.onOpenThread||e[20]!==s.threadId||e[21]!==r||e[22]!==j||e[23]!==x||e[24]!==k||e[25]!==b||e[26]!==y?(g=n.jsx(Do,{id:s.id,commentId:s.id,author:s.author.name,avatar:j,createdAt:s.createdAt,body:s.body,threadId:s.threadId,continuation:x,metadata:r,muted:s.internal,onOpenThread:s.onOpenThread,onOpen:k,editor:b,actions:y}),e[14]=s.author.name,e[15]=s.body,e[16]=s.createdAt,e[17]=s.id,e[18]=s.internal,e[19]=s.onOpenThread,e[20]=s.threadId,e[21]=r,e[22]=j,e[23]=x,e[24]=k,e[25]=b,e[26]=y,e[27]=g):g=e[27],g}function Tf(t){const e=R.c(33),{body:s,onSave:l,onClose:i}=t,a=X(),[r,o]=W.useState(s),[c,d]=W.useState(!1);let u;e[0]!==r?(u=r.trim(),e[0]=r,e[1]=u):u=e[1];const f=u;let m;e[2]!==f||e[3]!==i||e[4]!==l?(m=async()=>{d(!0),await l(f)?i():d(!1)},e[2]=f,e[3]=i,e[4]=l,e[5]=m):m=e[5];const p=m;let h;e[6]!==a?(h=a("taskBoard.taskDialog.commentPlaceholder"),e[6]=a,e[7]=h):h=e[7];let j;e[8]!==s||e[9]!==h?(j=n.jsx(lo,{inline:!0,defaultValue:s,onChange:o,placeholder:h}),e[8]=s,e[9]=h,e[10]=j):j=e[10];let x;e[11]!==a?(x=a("taskBoard.taskDialog.commentEditCancel"),e[11]=a,e[12]=x):x=e[12];let k;e[13]!==i||e[14]!==c||e[15]!==x?(k=n.jsx(re,{variant:"ghost",size:"sm",onClick:i,disabled:c,className:"text-muted-foreground",children:x}),e[13]=i,e[14]=c,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==s||e[18]!==f||e[19]!==c?(b=c||!f||f===s.trim(),e[17]=s,e[18]=f,e[19]=c,e[20]=b):b=e[20];let y;e[21]!==a?(y=a("taskBoard.taskDialog.commentEditSave"),e[21]=a,e[22]=y):y=e[22];let g;e[23]!==p||e[24]!==b||e[25]!==y?(g=n.jsx(re,{size:"sm",onClick:p,disabled:b,children:y}),e[23]=p,e[24]=b,e[25]=y,e[26]=g):g=e[26];let v;e[27]!==k||e[28]!==g?(v=n.jsxs("div",{className:"flex justify-end gap-1",children:[k,g]}),e[27]=k,e[28]=g,e[29]=v):v=e[29];let N;return e[30]!==v||e[31]!==j?(N=n.jsxs("div",{className:"surface flex flex-col gap-1 p-3",children:[j,v]}),e[30]=v,e[31]=j,e[32]=N):N=e[32],N}function _f(t){const e=R.c(20),{onEdit:s,onDelete:l}=t,i=X(),a=W.useRef(!1);let r;e[0]!==i?(r=i("taskBoard.taskDialog.commentActionsAriaLabel"),e[0]=i,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ys,{size:16}),e[2]=o):o=e[2];let c;e[3]!==r?(c=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-sm","aria-label":r,className:"shrink-0 text-muted-foreground",children:o})}),e[3]=r,e[4]=c):c=e[4];let d,u,f;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{a.current=!0},u=()=>{a.current=!0},f=x=>{a.current&&x.preventDefault(),a.current=!1},e[5]=d,e[6]=u,e[7]=f):(d=e[5],u=e[6],f=e[7]);let m;e[8]!==s||e[9]!==i?(m=s&&n.jsxs(Ne,{onSelect:s,children:[n.jsx(Fr,{size:16}),i("taskBoard.taskDialog.commentEdit")]}),e[8]=s,e[9]=i,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==i?(p=l&&n.jsxs(Ne,{variant:"destructive",onSelect:l,children:[n.jsx(Si,{size:16}),i("taskBoard.taskDialog.commentDelete")]}),e[11]=l,e[12]=i,e[13]=p):p=e[13];let h;e[14]!==m||e[15]!==p?(h=n.jsxs(qe,{align:"end",className:"w-48",onPointerDownOutside:d,onPointerUp:u,onCloseAutoFocus:f,children:[m,p]}),e[14]=m,e[15]=p,e[16]=h):h=e[16];let j;return e[17]!==c||e[18]!==h?(j=n.jsxs(Me,{children:[c,h]}),e[17]=c,e[18]=h,e[19]=j):j=e[19],j}function Gi(t){const e=R.c(9),{author:s,size:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={"2xs":16,xs:24,sm:32},e[0]=i):i=e[0];const a=i[l];if(s.isReviewer){let d;return e[1]!==a?(d=n.jsx(fl,{size:a}),e[1]=a,e[2]=d):d=e[2],d}if(s.isAgent){let d;return e[3]!==a?(d=n.jsx(ct,{size:a}),e[3]=a,e[4]=d):d=e[4],d}const r=s.image??void 0,o=s.name??"?";let c;return e[5]!==l||e[6]!==r||e[7]!==o?(c=n.jsx(ot,{url:r,fallback:o,shape:"circle",size:l}),e[5]=l,e[6]=r,e[7]=o,e[8]=c):c=e[8],c}function If(t){const e=R.c(3),{onSubmit:s,agentRoute:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(_o,{onSubmit:s,mentionRoute:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function Af(t){const e=R.c(19),{replyTo:s,route:l}=t,i=X(),a=l==="busy",r=l?"agent-route-note":void 0,o=a?"text-warning":l?"text-success":"text-foreground";let c;e[0]!==o?(c=K("-mx-3 -mt-3 mb-1 flex items-center gap-2 border-b border-border/60 px-3 py-2 text-xs font-medium",o),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&n.jsx(Jc,{size:14,className:"shrink-0 text-muted-foreground"}),e[2]=s,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==s?(u=s?n.jsx(Gi,{author:s,size:"2xs"}):a?n.jsx(rs,{size:14,className:"shrink-0"}):n.jsx(ct,{size:16}),e[4]=a,e[5]=s,e[6]=u):u=e[6];let f;e[7]!==s?.name||e[8]!==l||e[9]!==i?(f=l?i(l==="start"?"taskBoard.agentThread.routeStart":l==="steer"?"taskBoard.agentThread.routeSteer":l==="revive"?"taskBoard.agentThread.routeRevive":"taskBoard.agentThread.routeBusy"):s?.name,e[7]=s?.name,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;e[11]!==f?(m=n.jsx("span",{className:"min-w-0 truncate",children:f}),e[11]=f,e[12]=m):m=e[12];let p;return e[13]!==r||e[14]!==c||e[15]!==d||e[16]!==u||e[17]!==m?(p=n.jsxs("div",{"data-testid":r,className:c,children:[d,u,m]}),e[13]=r,e[14]=c,e[15]=d,e[16]=u,e[17]=m,e[18]=p):p=e[18],p}function yl(t){return t.dataTransfer.types.includes("Files")}function _o(t){const e=R.c(71),{onSubmit:s,replyTo:l,route:i,mentionRoute:a,placeholder:r,autoFocus:o,onCancel:c}=t,d=X(),u=W.useRef(null),f=kf(),[m,p]=W.useState(!1),h=i??(m?a:void 0),[j,x]=W.useState(!0),[k,b]=W.useState(!1),y=fu(),[g,v]=W.useState(!1),N=W.useRef(0);let B;e[0]===Symbol.for("react.memo_cache_sentinel")?(B=()=>u.current?.submit(),e[0]=B):B=e[0];const w=B;let D;e[1]!==r||e[2]!==d?(D=r??d("taskBoard.taskDialog.commentPlaceholder"),e[1]=r,e[2]=d,e[3]=D):D=e[3];let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C=ue=>p(ue.includes(Ie)),e[4]=C):C=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=K("w-full [&_.tiptap]:outline-none","min-h-10","[&_img]:max-h-40"),e[5]=S):S=e[5];let T;e[6]!==f||e[7]!==o||e[8]!==s||e[9]!==D||e[10]!==y?(T=n.jsx(bf,{ref:u,placeholder:D,onSubmit:s,onEmptyChange:x,onSendingChange:b,onMentionsChange:C,agents:f,autoFocus:o,uploads:y,className:S}),e[6]=f,e[7]=o,e[8]=s,e[9]=D,e[10]=y,e[11]=T):T=e[11];const _=T,z=j||y.pending>0||h==="busy";let I;e[12]!==d?(I=d("taskBoard.taskDialog.commentSubmitAriaLabel"),e[12]=d,e[13]=I):I=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx($u,{size:16}),e[14]=$):$=e[14];let E;e[15]!==z||e[16]!==I?(E=n.jsx(re,{variant:"ghost",size:"icon-sm",disabled:z,onClick:w,"aria-label":I,className:"shrink-0 cursor-pointer text-muted-foreground",children:$}),e[15]=z,e[16]=I,e[17]=E):E=e[17];const O=E;let L;e[18]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u.current?.focus(),e[18]=L):L=e[18];const U=L,G=!!h&&h!=="busy",P=G?"opacity-40 dark:opacity-25":"opacity-0";let J;e[19]!==P?(J=K("pointer-events-none absolute inset-x-0 top-1/2 -bottom-2 rounded-full bg-gradient-to-r from-brand-purple via-brand to-brand-yellow blur-xl transition-opacity duration-300",P),e[19]=P,e[20]=J):J=e[20];let H;e[21]!==J?(H=n.jsx("div",{"aria-hidden":!0,className:J}),e[21]=J,e[22]=H):H=e[22];const se=G?"opacity-100":"opacity-0";let V;e[23]!==se?(V=K("pointer-events-none absolute -inset-px rounded-[calc(var(--studio-surface-radius)+1px)] bg-gradient-to-r from-brand-purple via-brand to-brand-yellow transition-opacity duration-300",se),e[23]=se,e[24]=V):V=e[24];let ee;e[25]!==V?(ee=n.jsx("div",{"aria-hidden":!0,className:V}),e[25]=V,e[26]=ee):ee=e[26];let ie;e[27]===Symbol.for("react.memo_cache_sentinel")?(ie=ue=>{yl(ue)&&(ue.stopPropagation(),N.current=N.current+1,v(!0))},e[27]=ie):ie=e[27];let ne;e[28]!==k?(ne=ue=>{yl(ue)&&(ue.preventDefault(),ue.stopPropagation(),k&&(ue.dataTransfer.dropEffect="none"))},e[28]=k,e[29]=ne):ne=e[29];let F,q,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(F=ue=>{yl(ue)&&(ue.stopPropagation(),N.current=Math.max(0,N.current-1),N.current===0&&v(!1))},q=()=>{N.current=0,v(!1)},le=ue=>{yl(ue)&&(ue.preventDefault(),ue.stopPropagation(),u.current?.attach(Array.from(ue.dataTransfer.files)))},e[30]=F,e[31]=q,e[32]=le):(F=e[30],q=e[31],le=e[32]);const de=h==="busy"&&"outline-1 outline-border";let pe;e[33]!==de?(pe=K("surface relative flex cursor-text flex-col gap-1 transition-shadow","p-3",de),e[33]=de,e[34]=pe):pe=e[34];let Se;e[35]!==h||e[36]!==l?(Se=(l||h)&&n.jsx(Af,{replyTo:l,route:h}),e[35]=h,e[36]=l,e[37]=Se):Se=e[37];let Be;e[38]===Symbol.for("react.memo_cache_sentinel")?(Be=ue=>u.current?.attach(ue),e[38]=Be):Be=e[38];let oe;e[39]!==k?(oe=n.jsx(pu,{onFiles:Be,disabled:k}),e[39]=k,e[40]=oe):oe=e[40];let ge;e[41]!==y.pending?(ge=n.jsx(mu,{pending:y.pending}),e[41]=y.pending,e[42]=ge):ge=e[42];let ye;e[43]!==oe||e[44]!==ge?(ye=n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[oe,ge]}),e[43]=oe,e[44]=ge,e[45]=ye):ye=e[45];let he;e[46]!==c||e[47]!==d?(he=c&&n.jsx(re,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:ue=>{ue.stopPropagation(),c()},children:d("taskBoard.taskDialog.commentEditCancel")}),e[46]=c,e[47]=d,e[48]=he):he=e[48];let ae;e[49]!==O||e[50]!==he?(ae=n.jsxs("div",{className:"flex items-center gap-1",children:[he,O]}),e[49]=O,e[50]=he,e[51]=ae):ae=e[51];let we;e[52]!==ye||e[53]!==ae?(we=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[ye,ae]}),e[52]=ye,e[53]=ae,e[54]=we):we=e[54];let ce;e[55]!==g||e[56]!==k||e[57]!==d?(ce=g&&!k&&n.jsxs("div",{className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center gap-2 rounded-xl border-2 border-dashed border-primary/40 bg-muted text-sm font-medium text-primary/70",children:[n.jsx(Ru,{size:16}),d("taskBoard.taskDialog.commentDropToAttach")]}),e[55]=g,e[56]=k,e[57]=d,e[58]=ce):ce=e[58];let xe;e[59]!==h||e[60]!==ne||e[61]!==pe||e[62]!==Se||e[63]!==we||e[64]!==ce||e[65]!==_?(xe=n.jsxs("div",{"data-testid":"new-comment-composer",onClick:U,onDragEnter:ie,onDragOver:ne,onDragLeave:F,onDropCapture:q,onDrop:le,"data-agent-route":h,className:pe,children:[Se,_,we,ce]}),e[59]=h,e[60]=ne,e[61]=pe,e[62]=Se,e[63]=we,e[64]=ce,e[65]=_,e[66]=xe):xe=e[66];let be;return e[67]!==H||e[68]!==ee||e[69]!==xe?(be=n.jsxs("div",{className:"relative",children:[H,ee,xe]}),e[67]=H,e[68]=ee,e[69]=xe,e[70]=be):be=e[70],be}function zf(t){const e=t.filter(l=>!l.parentId).map(l=>({...l,replies:[]})),s=new Map(e.map(l=>[l.id,l]));for(const l of t)l.parentId&&s.get(l.parentId)?.replies.push(l);return e}function Io(t){return t.filter(e=>e.audience==="human").map(e=>({...e,replies:e.replies.filter(s=>s.audience==="human")}))}function Ao(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Or.taskFeedBehindTheScenes(),t[0]=e):e=t[0],Er(e,!1)}function Vi(t){const e=R.c(43),{locator:s}=tt(),l=Qt(),i=Zs();let a;e[0]!==t||e[1]!==s?(a=Ct.taskBoardComments(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const r=a,o=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>zf((await l.call("TASK_BOARD_COMMENT_LIST",{taskBoardItemId:t})).comments),e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d={queryKey:r,enabled:o,queryFn:c},e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==i||e[11]!==r?(f=()=>i.invalidateQueries({queryKey:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12];const m=f;let p;e[13]!==t||e[14]!==l?(p=S=>l.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...S}),e[13]=t,e[14]=l,e[15]=p):p=e[15];let h;e[16]!==m||e[17]!==p?(h={mutationFn:p,onSuccess:m},e[16]=m,e[17]=p,e[18]=h):h=e[18];const j=St(h);let x;e[19]!==l?(x=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[19]=l,e[20]=x):x=e[20];let k;e[21]!==m||e[22]!==x?(k={mutationFn:x,onSuccess:m},e[21]=m,e[22]=x,e[23]=k):k=e[23];const b=St(k);let y;e[24]!==l?(y=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[24]=l,e[25]=y):y=e[25];let g;e[26]!==m||e[27]!==y?(g={mutationFn:y,onSuccess:m},e[26]=m,e[27]=y,e[28]=g):g=e[28];const v=St(g);let N;e[29]!==l?(N=S=>l.call("TASK_BOARD_COMMENT_DELETE",{id:S}),e[29]=l,e[30]=N):N=e[30];let B;e[31]!==m||e[32]!==N?(B={mutationFn:N,onSuccess:m},e[31]=m,e[32]=N,e[33]=B):B=e[33];const w=St(B);let D;e[34]!==u.data?(D=u.data??[],e[34]=u.data,e[35]=D):D=e[35];let C;return e[36]!==b||e[37]!==j||e[38]!==u.isPending||e[39]!==w||e[40]!==v||e[41]!==D?(C={threads:D,isLoading:u.isPending,post:j,edit:b,setResolved:v,remove:w},e[36]=b,e[37]=j,e[38]=u.isPending,e[39]=w,e[40]=v,e[41]=D,e[42]=C):C=e[42],C}function $f(t){const e=R.c(24),{locator:s}=tt(),l=Qt(),i=Zs();let a;e[0]!==t||e[1]!==s?(a=Ct.notificationSubscribers(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const r=a,o=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>(await l.call("NOTIFICATION_SUBSCRIPTION_LIST",{taskBoardItemId:t})).userIds,e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d={queryKey:r,enabled:o,queryFn:c},e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==t||e[11]!==l?(f=k=>l.call("NOTIFICATION_SUBSCRIPTION_SET",{taskBoardItemId:t,subscribed:k}),e[10]=t,e[11]=l,e[12]=f):f=e[12];let m;e[13]!==i||e[14]!==r?(m=()=>i.invalidateQueries({queryKey:r}),e[13]=i,e[14]=r,e[15]=m):m=e[15];let p;e[16]!==f||e[17]!==m?(p={mutationFn:f,onSuccess:m},e[16]=f,e[17]=m,e[18]=p):p=e[18];const h=St(p);let j;e[19]!==u.data?(j=u.data??[],e[19]=u.data,e[20]=j):j=e[20];let x;return e[21]!==h||e[22]!==j?(x={subscriberIds:j,setSubscribed:h},e[21]=h,e[22]=j,e[23]=x):x=e[23],x}const Rf=3;function Ef(t){const e=R.c(30),{itemId:s,members:l}=t,i=X(),{data:a}=vi.useSession(),r=a?.user?.id,{subscriberIds:o,setSubscribed:c}=$f(s);let d;e[0]!==r||e[1]!==o?(d=!!r&&o.includes(r),e[0]=r,e[1]=o,e[2]=d):d=e[2];const u=d;let f;if(e[3]!==l||e[4]!==r||e[5]!==u||e[6]!==o){const N=new Map(l.map(Ff)),B=r?N.get(r):void 0;let w;e[8]!==r?(w=C=>C!==r,e[8]=r,e[9]=w):w=e[9];const D=o.filter(w).map(C=>N.get(C)).filter(Lf);f=[...u&&B?[B]:[],...D],e[3]=l,e[4]=r,e[5]=u,e[6]=o,e[7]=f}else f=e[7];const m=f;let p;e[10]!==m?(p=m.slice(0,Rf),e[10]=m,e[11]=p):p=e[11];const h=p,j=m.length-h.length,x=!s||c.isPending;let k;e[12]!==c||e[13]!==u?(k=()=>c.mutate(!u),e[12]=c,e[13]=u,e[14]=k):k=e[14];let b;e[15]!==u||e[16]!==i?(b=i(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[15]=u,e[16]=i,e[17]=b):b=e[17];let y;e[18]!==x||e[19]!==k||e[20]!==b?(y=n.jsx(re,{type:"button",variant:"ghost",size:"sm",disabled:x,onClick:k,className:"px-2 font-normal text-muted-foreground",children:b}),e[18]=x,e[19]=k,e[20]=b,e[21]=y):y=e[21];let g;e[22]!==j||e[23]!==h||e[24]!==m||e[25]!==i?(g=h.length>0&&n.jsxs("span",{className:"inline-flex items-center",title:m.map(N=>N.user?.name??i("taskBoard.taskDialog.someoneLabel")).join(", "),children:[h.map(Of),j>0&&n.jsxs("span",{className:"-ml-2 inline-flex size-6 items-center justify-center rounded-full bg-muted text-2xs font-medium text-muted-foreground ring-2 ring-background",children:["+",j]})]}),e[22]=j,e[23]=h,e[24]=m,e[25]=i,e[26]=g):g=e[26];let v;return e[27]!==y||e[28]!==g?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[y,g]}),e[27]=y,e[28]=g,e[29]=v):v=e[29],v}function Of(t){return n.jsx(ot,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function Lf(t){return!!t}function Ff(t){return[t.userId,t]}function Pf({item:t,hidden:e,children:s}){const l=X(),i=Ku({initial:!1,resize:"instant"}),a=Vi(t?.id),[r]=Ao(),o=r?a.threads:Io(a.threads),[c,d]=W.useState(null),u=p=>p.flatMap(h=>[h.id,...h.replies.map(j=>j.id)]),f=u(a.threads);!a.isLoading&&(c===null||i.isAtBottom)&&f.join()!==c?.join()&&d(f);const m=c?u(o).filter(p=>!c.includes(p)).length:0;return t?n.jsxs("div",{className:K("relative min-h-0 min-w-0 flex-1 flex-col",e?"hidden lg:flex":"flex"),children:[n.jsx("div",{"data-testid":"task-conversation-scroll",ref:i.scrollRef,className:"min-h-0 flex-1 overflow-y-auto",children:n.jsx("div",{ref:i.contentRef,children:s})}),t&&n.jsxs("div",{className:"relative shrink-0 border-t border-border bg-background px-5 pb-4 pt-3 sm:px-8",children:[!i.isAtBottom&&n.jsx("div",{className:"absolute inset-x-0 bottom-full flex justify-center pb-3 pointer-events-none",children:n.jsx(re,{variant:"secondary",size:"sm",className:"pointer-events-auto shadow-soft",onClick:()=>{i.scrollToBottom()},children:m?l("taskBoard.conversation.newReplies",{count:m}):l("taskBoard.conversation.jumpToLatest")})}),n.jsx(If,{agentRoute:t.threads.some(p=>_i(p)&&(p.status==="in_progress"||p.status==="requires_action"))?"steer":"start",onSubmit:async p=>{try{return await a.post.mutateAsync({body:p}),i.scrollToBottom(),!0}catch(h){return Qe.error(h instanceof Error?h.message:l("taskBoard.conversation.sendFailed")),!1}}})]})]}):n.jsx("div",{className:"min-w-0 sm:flex-1",children:s})}function Hi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function zo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const kr=560,Mf=2e3,$o=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Yt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent sm:border-transparent",yr=4,vr=1,La="opacity-50";function Nr(t){const e=R.c(12),{icon:s,label:l,hint:i,selected:a,onSelect:r}=t;let o;e[0]!==l?(o=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==i?(c=i&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=c):c=e[3];let d;e[4]!==a?(d=a&&n.jsx(Cs,{size:14,className:"shrink-0"}),e[4]=a,e[5]=d):d=e[5];let u;return e[6]!==s||e[7]!==r||e[8]!==o||e[9]!==c||e[10]!==d?(u=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground hover:bg-accent",onClick:r,children:[s,o,c,d]}),e[6]=s,e[7]=r,e[8]=o,e[9]=c,e[10]=d,e[11]=u):u=e[11],u}function Kf(t){const e=R.c(22),{threads:s}=t,l=X();let i,a,r,o,c,d;if(e[0]!==l||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const m=ko(s);if(!m){d=null;break e}const{total:p,runCount:h,onSubscription:j}=m,x=h===1,k=j?x?"taskBoard.taskDialog.costTooltipSubscriptionSingular":"taskBoard.taskDialog.costTooltipSubscriptionPlural":x?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural";e[8]===Symbol.for("react.memo_cache_sentinel")?(r=K(Yt,"cursor-default hover:bg-transparent"),e[8]=r):r=e[8];const b=String(h);e[9]!==l||e[10]!==b||e[11]!==k?(o=l(k,{runs:b}),e[9]=l,e[10]=b,e[11]=k,e[12]=o):o=e[12],e[13]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(md,{size:16,className:"shrink-0 text-muted-foreground"}),e[13]=c):c=e[13],i="tabular-nums",a=l("taskBoard.taskDialog.costEstimatePrefix",{amount:p.toLocaleString(void 0,{style:"currency",currency:"USD"})})}e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=r,e[5]=o,e[6]=c,e[7]=d}else i=e[2],a=e[3],r=e[4],o=e[5],c=e[6],d=e[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;let u;e[14]!==i||e[15]!==a?(u=n.jsx("span",{className:i,children:a}),e[14]=i,e[15]=a,e[16]=u):u=e[16];let f;return e[17]!==r||e[18]!==o||e[19]!==c||e[20]!==u?(f=n.jsxs("div",{className:r,title:o,children:[c,u]}),e[17]=r,e[18]=o,e[19]=c,e[20]=u,e[21]=f):f=e[21],f}function tl(t){const e=R.c(7),{label:s,children:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"px-3 text-sm font-medium text-muted-foreground opacity-[0.74]",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("div",{className:"flex flex-wrap gap-2 sm:flex-col sm:items-start sm:gap-1",children:l}),e[2]=l,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs("div",{className:"flex flex-col gap-2",children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}function Uf(t){const e=R.c(7),{item:s}=t,l=X(),{data:i}=Ei(s.id);if(!i||i.length===0)return null;let a;e[0]!==l?(a=l("taskBoard.taskDialog.reviewsLabel"),e[0]=l,e[1]=a):a=e[1];let r;e[2]!==i?(r=i.map(qf),e[2]=i,e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==r?(o=n.jsx(tl,{label:a,children:r}),e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function qf(t){return n.jsx(re,{asChild:!0,variant:"ghost",className:"h-9 w-full justify-start gap-2 px-3 font-medium",children:n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",title:t.title?`#${t.number} ${t.title}`:t.url,children:[n.jsx(el,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t.title??`#${t.number}`})]})},t.url)}function Gf(t){const e=R.c(11),{label:s,action:l,children:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ul,{size:14,className:"shrink-0 transition-transform group-data-[state=closed]:-rotate-90"}),e[0]=a):a=e[0];let r;e[1]!==s?(r=n.jsxs(Jd,{className:"group flex w-fit items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[s,a]}),e[1]=s,e[2]=r):r=e[2];let o;e[3]!==l||e[4]!==r?(o=n.jsxs("div",{className:"flex min-h-7 items-center justify-between gap-2",children:[r,l]}),e[3]=l,e[4]=r,e[5]=o):o=e[5];let c;e[6]!==i?(c=n.jsx(Zd,{className:"-mx-2 -mb-2",children:n.jsx("div",{className:"px-2 pb-2",children:i})}),e[6]=i,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=n.jsxs(eu,{defaultOpen:!0,className:"flex flex-col gap-2",children:[o,c]}),e[8]=o,e[9]=c,e[10]=d):d=e[10],d}function Ro(t){const e=R.c(452),{chrome:s,open:l,onClose:i,item:a,defaultStatus:r,defaultProject:o,defaultSprintId:c,onSetSprint:d,onSubmit:u,onDelete:f,onClone:m,onArchive:p,onOpenPreview:h,onNewChat:j,onAutoFix:x,onRerun:k,isSaving:b}=t,y=l===void 0?!0:l,g=X(),{org:v}=tt();let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N={strict:!1},e[0]=N):N=e[0];const{agentId:B}=cl(N),{data:w}=yi();let D;e[1]!==w?.data?.members?(D=w?.data?.members??[],e[1]=w?.data?.members,e[2]=D):D=e[2];const C=D,{handleCopy:S,copied:T}=li(),{handleCopy:_,copied:z}=li(),{handleCopy:I,copied:$}=li(),{data:E}=El();let O;e[3]!==E?(O=E===void 0?[]:E,e[3]=E,e[4]=O):O=e[4];const L=O,U=so(),G=no();let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={slug:"mcp-github"},e[5]=P):P=e[5];const J=oo(P);let H;e[6]!==J?(H=wu(J),e[6]=J,e[7]=H):H=e[7];const V=No(lf,H),ee=uo(V),ie=a?.title??"",ne=a?.description??"",F=a?.status??r??ws[0],q=a?.priority??"medium",le=a?.type??Tl,de=a?.assigneeId??null,pe=a?a.repo:o?.repo??null,Se=a?a.virtualMcpId:o?.virtualMcpId??null,Be=a?.dueDate;let oe;e[8]!==Be?(oe=zo(Be),e[8]=Be,e[9]=oe):oe=e[9];let ge;e[10]!==a?.tags?(ge=a?.tags.map(Zf)??[],e[10]=a?.tags,e[11]=ge):ge=e[11];const ye=c??null;let he;e[12]!==ne||e[13]!==F||e[14]!==q||e[15]!==le||e[16]!==de||e[17]!==pe||e[18]!==Se||e[19]!==oe||e[20]!==ge||e[21]!==ye||e[22]!==ie?(he={title:ie,description:ne,status:F,priority:q,type:le,assigneeId:de,repo:pe,virtualMcpId:Se,dueDate:oe,tagIds:ge,sprintId:ye},e[12]=ne,e[13]=F,e[14]=q,e[15]=le,e[16]=de,e[17]=pe,e[18]=Se,e[19]=oe,e[20]=ge,e[21]=ye,e[22]=ie,e[23]=he):he=e[23];const[ae,we]=W.useState(he),{title:ce,description:xe,status:be,priority:ue,assigneeId:ze,repo:Q,virtualMcpId:fe,dueDate:Oe}=ae;let Ge;e[24]!==V||e[25]!==Q||e[26]!==fe?(Ge=(fe?Ua(fe,V):void 0)??(Q?Ua(Q,V):void 0),e[24]=V,e[25]=Q,e[26]=fe,e[27]=Ge):Ge=e[27];const Ue=Ge,Y=ae.type,te=ae.tagIds,[me,Ce]=W.useState(!1),[ke,Fe]=W.useState(!a),[st,nt]=W.useState(!1),[De,Ve]=W.useState(!1),$e=De&&!me;let Je;e[28]===Symbol.for("react.memo_cache_sentinel")?(Je=M=>{if(!M)return;const Ae=()=>Ve(M.scrollHeight>kr);Ae();const We=new ResizeObserver(Ae);return We.observe(M),()=>We.disconnect()},e[28]=Je):Je=e[28];const wt=Je,[at,ut]=W.useState(!1),[Te,He]=W.useState(!1),Le=Ll(),Ye=a?a.sprintId:ae.sprintId;let Xt;e[29]!==Ye?(Xt=M=>M.id===Ye,e[29]=Ye,e[30]=Xt):Xt=e[30];const jt=Le.find(Xt),Jt=Le.filter(Jf),bt=M=>{He(!1),a?d?.(M):je({sprintId:M})},[Zt,it]=W.useState(!1),[Dt,ve]=W.useState(!1),[zt,rt]=W.useState(null);let kt;e[31]!==a?.threads||e[32]!==zt?(kt=a?.threads.find(M=>M.threadId===zt)??null,e[31]=a?.threads,e[32]=zt,e[33]=kt):kt=e[33];const gt=kt,yt=W.useRef(ae),ft=W.useRef(null),Re=W.useRef(u);let _e;e[34]!==a?(_e=()=>{ft.current=null;const M=yt.current;M.title.trim()&&Re.current({title:M.title.trim(),description:M.description.trim()||null,status:M.status,priority:M.priority,type:M.type,assigneeId:M.assigneeId,repo:M.repo,virtualMcpId:M.virtualMcpId,dueDate:M.dueDate?Hi(M.dueDate):null,tagIds:M.tagIds,...a?{}:{sprintId:M.sprintId}})},e[34]=a,e[35]=_e):_e=e[35];const mt=_e,je=(M,Ae)=>{const We=Ae===void 0?!1:Ae,Et={...yt.current,...M};yt.current=Et,Re.current=u,we(Et),a&&(ft.current&&clearTimeout(ft.current),We?ft.current=setTimeout(mt,Mf):mt())};let Tt;e[36]!==mt?(Tt=()=>{ft.current&&(clearTimeout(ft.current),mt())},e[36]=mt,e[37]=Tt):Tt=e[37];const Pe=Tt;let pt;e[38]===Symbol.for("react.memo_cache_sentinel")?(pt=()=>{ft.current&&(clearTimeout(ft.current),ft.current=null)},e[38]=pt):pt=e[38];const Ot=pt;let vt;e[39]!==Pe||e[40]!==i?(vt=()=>{Pe(),i()},e[39]=Pe,e[40]=i,e[41]=vt):vt=e[41];const Nt=vt;let ds;e[42]!==Pe?(ds=M=>{if(M)return()=>Pe()},e[42]=Pe,e[43]=ds):ds=e[43];const es=ds;let us;e[44]!==Nt?(us=M=>{if(!M)return;const Ae=We=>{if(We.key!=="Escape"||We.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Et=We.target;if(Et instanceof HTMLElement&&(Et.isContentEditable||Et instanceof HTMLInputElement||Et instanceof HTMLTextAreaElement)){Et.blur();return}Nt()};return document.addEventListener("keydown",Ae),()=>document.removeEventListener("keydown",Ae)},e[44]=Nt,e[45]=us):us=e[45];const $t=us;let fs;e[46]!==U||e[47]!==je?(fs=async(M,Ae)=>{const We=await U.mutateAsync({name:M,color:Ae});je({tagIds:[...yt.current.tagIds,We.id]})},e[46]=U,e[47]=je,e[48]=fs):fs=e[48];const _s=fs;let ms;e[49]!==G||e[50]!==je?(ms=M=>{G.mutate(M),je({tagIds:yt.current.tagIds.filter(Ae=>Ae!==M)})},e[49]=G,e[50]=je,e[51]=ms):ms=e[51];const Is=ms,_t=ze===Ie,nn=a&&x&&(be==="triage"||be==="todo")&&!_t,an=a&&k&&a.assigneeId===Ie;let ps;e[52]!==a||e[53]!==v?(ps=a?tn(v.slug,a.keySeq):null,e[52]=a,e[53]=v,e[54]=ps):ps=e[54];const ht=ps;let gs;if(e[55]!==ze||e[56]!==C){let M;e[58]!==ze?(M=Ae=>Ae.userId===ze,e[58]=ze,e[59]=M):M=e[59],gs=C.find(M),e[55]=ze,e[56]=C,e[57]=gs}else gs=e[57];const Lt=gs;let As;e[60]!==a||e[61]!==C?(As=a?.assignedBy?C.find(M=>M.userId===a.assignedBy):void 0,e[60]=a,e[61]=C,e[62]=As):As=e[62];const lt=As;let Ft;e[63]!==a||e[64]!==C?(Ft=a?C.find(M=>M.userId===a.createdBy):void 0,e[63]=a,e[64]=C,e[65]=Ft):Ft=e[65];const Ze=Ft;let hs;e[66]!==a?.tags||e[67]!==g?(hs=a?.tags.some(Xf)?g("taskBoard.taskDialog.createdByFeedbackLabel"):g("taskBoard.taskDialog.createdBySystemLabel"),e[66]=a?.tags,e[67]=g,e[68]=hs):hs=e[68];const Pt=hs;let xs;e[69]!==be?(xs=Dl(be),e[69]=be,e[70]=xs):xs=e[70];const zs=xs.icon;let Mt;e[71]!==st||e[72]!==a||e[73]!==g?(Mt=a&&n.jsx(re,{variant:"ghost",size:"sm",className:"lg:hidden",onClick:()=>nt(Qf),"aria-expanded":st,children:g("taskBoard.conversation.details")}),e[71]=st,e[72]=a,e[73]=g,e[74]=Mt):Mt=e[74];let $s;e[75]!==b||e[76]!==a||e[77]!==g?($s=a&&b&&n.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:g("taskBoard.taskDialog.savingLabel")}),e[75]=b,e[76]=a,e[77]=g,e[78]=$s):$s=e[78];let js;e[79]!==a||e[80]!==g?(js=a?.externalUrl&&n.jsx(Bt,{asChild:!0,variant:"secondary",label:g("taskBoard.taskDialog.openInTrackerAriaLabel"),children:n.jsx("a",{href:a.externalUrl,target:"_blank",rel:"noreferrer",children:n.jsx(Ma,{size:16})})}),e[79]=a,e[80]=g,e[81]=js):js=e[81];let Kt;e[82]!==B||e[83]!==T||e[84]!==_||e[85]!==xe||e[86]!==S||e[87]!==a||e[88]!==z||e[89]!==p||e[90]!==x||e[91]!==m||e[92]!==f||e[93]!==j||e[94]!==k||e[95]!==v||e[96]!==nn||e[97]!==an||e[98]!==be||e[99]!==g?(Kt=a&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{variant:"secondary",label:g("taskBoard.taskDialog.shareAriaLabel"),onClick:()=>{_(`${window.location.origin}${Wr(v.slug,a,B)}`),Qe.success(g("taskBoard.taskDialog.linkCopied"))},children:z?n.jsx(Cs,{size:16}):n.jsx(Zc,{size:16})}),n.jsxs(Me,{modal:!1,children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"secondary",size:"icon-sm","aria-label":g("taskBoard.taskDialog.moreActionsAriaLabel"),children:n.jsx(Ys,{size:16})})}),n.jsxs(qe,{align:"end",className:"w-48",children:[j&&n.jsxs(Ne,{onSelect:j,children:[n.jsx(Mr,{size:16}),g("taskBoard.taskDialog.newChatButton")]}),nn&&n.jsxs(Ne,{onSelect:x,children:[n.jsx(It,{size:16}),g("taskBoard.taskBoard.autoFix")]}),an&&n.jsxs(Ne,{onSelect:k,children:[n.jsx(zl,{size:16}),g("taskBoard.taskBoard.rerun")]}),(j||nn||an)&&n.jsx(sl,{}),xe&&n.jsxs(Ne,{onSelect:()=>S(xe),children:[T?n.jsx(Cs,{size:16}):n.jsx(ed,{size:16}),g("taskBoard.taskDialog.copyDescription")]}),m&&n.jsxs(Ne,{onSelect:m,children:[n.jsx(td,{size:16}),g("taskBoard.taskDialog.cloneTask")]}),p&&be!=="archived"&&n.jsxs(Ne,{onSelect:()=>{Ot(),p()},children:[n.jsx(Dc,{size:16}),g("taskBoard.taskDialog.archiveTask")]}),f&&n.jsxs(Ne,{variant:"destructive",onSelect:()=>{Ot(),f()},children:[n.jsx(Si,{size:16}),g("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[82]=B,e[83]=T,e[84]=_,e[85]=xe,e[86]=S,e[87]=a,e[88]=z,e[89]=p,e[90]=x,e[91]=m,e[92]=f,e[93]=j,e[94]=k,e[95]=v,e[96]=nn,e[97]=an,e[98]=be,e[99]=g,e[100]=Kt):Kt=e[100];let Ut;e[101]!==s||e[102]!==Nt||e[103]!==g?(Ut=s==="dialog"&&n.jsx(Bt,{variant:"secondary",label:g("taskBoard.taskDialog.closeAriaLabel"),onClick:Nt,children:n.jsx(il,{size:16})}),e[101]=s,e[102]=Nt,e[103]=g,e[104]=Ut):Ut=e[104];let ln;e[105]!==Mt||e[106]!==$s||e[107]!==js||e[108]!==Kt||e[109]!==Ut?(ln=n.jsxs("div",{className:"flex items-center gap-2",children:[Mt,$s,js,Kt,Ut]}),e[105]=Mt,e[106]=$s,e[107]=js,e[108]=Kt,e[109]=Ut,e[110]=ln):ln=e[110];const Rs=ln,Es=M1(a);let qt;e[111]!==Rs||e[112]!==s||e[113]!==Nt||e[114]!==I||e[115]!==Es||e[116]!==$||e[117]!==ht||e[118]!==g?(qt=s==="page"?n.jsxs(n.Fragment,{children:[n.jsx(Ss.Breadcrumbs,{after:"page",parent:{label:g("taskBoard.taskDetail.breadcrumbTasks"),onSelect:Nt},items:[...Es?[Es]:[],{key:"task",label:ht??g("taskBoard.taskDetail.breadcrumbTask")}]}),n.jsx(Ss.Actions,{children:Rs})]}):n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[ht?n.jsxs(re,{variant:"ghost",size:"sm",title:ht,"aria-label":g("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-base text-muted-foreground hover:text-foreground",onClick:()=>{I(ht),Qe.success(g("taskBoard.taskDialog.idCopied"))},children:[$?n.jsx(Cs,{size:16}):n.jsx(lr,{size:16}),ht]}):n.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-base text-muted-foreground opacity-50",children:[n.jsx(lr,{size:16}),"–"]}),Rs]}),e[111]=Rs,e[112]=s,e[113]=Nt,e[114]=I,e[115]=Es,e[116]=$,e[117]=ht,e[118]=g,e[119]=qt):qt=e[119];const bs=qt;let Gt;e[120]!==s||e[121]!==bs?(Gt=s==="page"?n.jsx("div",{className:K("mx-auto w-full","max-w-[1280px]"),children:bs}):bs,e[120]=s,e[121]=bs,e[122]=Gt):Gt=e[122];const Os=a?"overflow-hidden":"overflow-y-auto";let Vt;e[123]!==Os?(Vt=K("flex min-h-0 flex-1 flex-col",Os),e[123]=Os,e[124]=Vt):Vt=e[124];const Ls=s==="page"&&"mx-auto w-full",Xa=s==="page"&&"max-w-[1280px]";let A;e[125]!==Ls||e[126]!==Xa?(A=K("flex flex-col","min-h-0 flex-1 lg:flex-row",Ls,Xa),e[125]=Ls,e[126]=Xa,e[127]=A):A=e[127];const Z=!!a&&st;let Ee;e[128]!==Ze?.user?.image||e[129]!==Ze?.user?.name||e[130]!==ke||e[131]!==Pe||e[132]!==a||e[133]!==Pt||e[134]!==g?(Ee=a&&n.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm text-muted-foreground",children:[n.jsx(ot,{url:Ze?.user?.image??void 0,fallback:Ze?.user?.name??"?",shape:"circle",size:"xs"}),n.jsx("span",{className:"font-medium text-foreground",children:or(a)?Pt:Ze?.user?.name??g("taskBoard.taskDialog.unknownCreatorLabel")}),n.jsx("time",{dateTime:a.createdAt,children:Al(new Date(a.createdAt))}),n.jsx(re,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>{Pe(),Fe(Wf)},children:g(ke?"taskBoard.conversation.doneEditing":"taskBoard.conversation.edit")})]}),e[128]=Ze?.user?.image,e[129]=Ze?.user?.name,e[130]=ke,e[131]=Pe,e[132]=a,e[133]=Pt,e[134]=g,e[135]=Ee):Ee=e[135];let Xe;e[136]!==ke||e[137]!==Pe||e[138]!==a||e[139]!==je||e[140]!==g||e[141]!==ce?(Xe=a&&!ke?n.jsx("h1",{className:"text-2xl font-semibold leading-snug text-foreground",children:ce}):n.jsx("textarea",{ref:Yf,value:ce,onChange:M=>{je({title:M.target.value},!0),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},onKeyDown:Hf,onBlur:Pe,placeholder:g("taskBoard.taskDialog.taskTitlePlaceholder"),autoFocus:!a,rows:1,className:K("w-full resize-none overflow-hidden border-0 bg-transparent text-2xl font-semibold leading-snug text-foreground outline-none placeholder:text-foreground/30")}),e[136]=ke,e[137]=Pe,e[138]=a,e[139]=je,e[140]=g,e[141]=ce,e[142]=Xe):Xe=e[142];let Rt;e[143]!==a||e[144]!==L||e[145]!==te?(Rt=a&&te.length>0&&n.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:te.map(M=>{const Ae=L.find(We=>We.id===M);return Ae?n.jsx("span",{className:"rounded-md border border-border px-2 py-1",children:Ae.name},M):null})}),e[143]=a,e[144]=L,e[145]=te,e[146]=Rt):Rt=e[146];let ts;e[147]!==Xe||e[148]!==Rt?(ts=n.jsxs("div",{children:[Xe,Rt]}),e[147]=Xe,e[148]=Rt,e[149]=ts):ts=e[149];let Ht;e[150]!==a||e[151]!==k||e[152]!==v?(Ht=a&&n.jsx(zm,{item:a,orgSlug:v.slug,onRerun:k}),e[150]=a,e[151]=k,e[152]=v,e[153]=Ht):Ht=e[153];const Ja=$e&&"overflow-hidden";let rn;e[154]!==Ja?(rn=K("relative",Ja),e[154]=Ja,e[155]=rn):rn=e[155];let on;e[156]!==$e?(on=$e?{maxHeight:kr}:void 0,e[156]=$e,e[157]=on):on=e[157];let pl;e[158]===Symbol.for("react.memo_cache_sentinel")?(pl=()=>Ce(!0),e[158]=pl):pl=e[158];let cn;e[159]!==xe||e[160]!==ke||e[161]!==a||e[162]!==je||e[163]!==g?(cn=n.jsx("div",{ref:wt,"data-testid":"task-description",children:a&&!ke?n.jsx(Ri,{id:`task-post-${a.id}`,text:xe}):n.jsx(lo,{defaultValue:xe,onChange:M=>je({description:M},!0),placeholder:g("taskBoard.taskDialog.descriptionPlaceholder")})}),e[159]=xe,e[160]=ke,e[161]=a,e[162]=je,e[163]=g,e[164]=cn):cn=e[164];let dn;e[165]!==$e?(dn=$e&&n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-background to-transparent"}),e[165]=$e,e[166]=dn):dn=e[166];let un;e[167]!==Pe||e[168]!==rn||e[169]!==on||e[170]!==cn||e[171]!==dn?(un=n.jsxs("div",{className:rn,style:on,onFocusCapture:pl,onBlurCapture:Pe,children:[cn,dn]}),e[167]=Pe,e[168]=rn,e[169]=on,e[170]=cn,e[171]=dn,e[172]=un):un=e[172];let fn;e[173]!==me||e[174]!==De||e[175]!==g?(fn=De&&n.jsxs(re,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>Ce(Vf),children:[n.jsx(ul,{size:14,className:K("transition-transform",me&&"rotate-180")}),g(me?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[173]=me,e[174]=De,e[175]=g,e[176]=fn):fn=e[176];let mn;e[177]!==un||e[178]!==fn?(mn=n.jsxs("div",{className:"flex flex-col py-6",children:[un,fn]}),e[177]=un,e[178]=fn,e[179]=mn):mn=e[179];let pn;e[180]!==a?(pn=a&&n.jsx(P1,{item:a}),e[180]=a,e[181]=pn):pn=e[181];let gn;e[182]!==a?(gn=a&&n.jsx(L1,{item:a}),e[182]=a,e[183]=gn):gn=e[183];let hn;e[184]!==a?(hn=a&&n.jsx("div",{className:"py-4",children:n.jsx("hr",{className:"border-border"})}),e[184]=a,e[185]=hn):hn=e[185];let xn;e[186]!==a||e[187]!==C||e[188]!==rt?(xn=a&&n.jsx("div",{className:"flex flex-col gap-8",children:n.jsx(jm,{item:a,members:C,onOpenThread:M=>rt(M.threadId)})}),e[186]=a,e[187]=C,e[188]=rt,e[189]=xn):xn=e[189];let jn;e[190]!==mn||e[191]!==pn||e[192]!==gn||e[193]!==hn||e[194]!==xn?(jn=n.jsxs("div",{className:"flex flex-col",children:[mn,pn,gn,hn,xn]}),e[190]=mn,e[191]=pn,e[192]=gn,e[193]=hn,e[194]=xn,e[195]=jn):jn=e[195];let bn;e[196]!==Ee||e[197]!==ts||e[198]!==Ht||e[199]!==jn?(bn=n.jsxs("div",{className:"flex min-w-0 flex-col gap-2 px-5 py-6 sm:px-8",children:[Ee,ts,Ht,jn]}),e[196]=Ee,e[197]=ts,e[198]=Ht,e[199]=jn,e[200]=bn):bn=e[200];let kn;e[201]!==a||e[202]!==Z||e[203]!==bn?(kn=n.jsx(Pf,{item:a,hidden:Z,children:bn}),e[201]=a,e[202]=Z,e[203]=bn,e[204]=kn):kn=e[204];const uc="task-inspector",Pl=a?st?"flex":"hidden":"flex";let yn;e[205]!==Pl?(yn=K("w-full flex-col gap-6 border-t border-border p-6","min-h-0 flex-1 overflow-y-auto lg:flex lg:w-[320px] lg:flex-none lg:border-l lg:border-t-0",Pl),e[205]=Pl,e[206]=yn):yn=e[206];let vn;e[207]!==a?(vn=a&&n.jsx(Uf,{item:a}),e[207]=a,e[208]=vn):vn=e[208];const Ml=tl;let Nn;e[209]!==g?(Nn=g("taskBoard.taskDialog.propertiesLabel"),e[209]=g,e[210]=Nn):Nn=e[210];let Sn;e[211]!==a||e[212]!==be?(Sn=K(a?Xr({...a,status:be}):Dl(be).iconClassName),e[211]=a,e[212]=be,e[213]=Sn):Sn=e[213];let Bn;e[214]!==zs||e[215]!==Sn?(Bn=n.jsx(zs,{size:16,className:Sn}),e[214]=zs,e[215]=Sn,e[216]=Bn):Bn=e[216];let Cn;e[217]!==be||e[218]!==g?(Cn=dt(be,g),e[217]=be,e[218]=g,e[219]=Cn):Cn=e[219];let wn;e[220]!==Bn||e[221]!==Cn.label?(wn=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:Yt,children:[Bn,Cn.label]})}),e[220]=Bn,e[221]=Cn.label,e[222]=wn):wn=e[222];let Dn;e[223]!==je||e[224]!==g?(Dn=ws.map(M=>{const{label:Ae,visual:We}=dt(M,g),Et=We.icon;return n.jsxs(Ne,{onSelect:()=>je({status:M}),className:"gap-2",children:[n.jsx(Et,{size:16,className:We.iconClassName}),Ae]},M)}),e[223]=je,e[224]=g,e[225]=Dn):Dn=e[225];let Tn;e[226]!==Dn?(Tn=n.jsx(qe,{align:"start",className:"w-44",children:Dn}),e[226]=Dn,e[227]=Tn):Tn=e[227];let _n;e[228]!==wn||e[229]!==Tn?(_n=n.jsxs(Me,{children:[wn,Tn]}),e[228]=wn,e[229]=Tn,e[230]=_n):_n=e[230];let gl;e[231]===Symbol.for("react.memo_cache_sentinel")?(gl=K(Yt),e[231]=gl):gl=e[231];const Kl=At[Y].icon;let hl;e[232]!==Kl?(hl=n.jsx(Kl,{size:16}),e[232]=Kl,e[233]=hl):hl=e[233];const Ul=hl,ql=At[Y];let In;e[234]!==g||e[235]!==ql.labelKey?(In=g(ql.labelKey),e[234]=g,e[235]=ql.labelKey,e[236]=In):In=e[236];let An;e[237]!==Ul||e[238]!==In?(An=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:gl,children:[Ul,In]})}),e[237]=Ul,e[238]=In,e[239]=An):An=e[239];let zn;e[240]!==je||e[241]!==g?(zn=Ii.map(M=>{const Ae=At[M].icon;return n.jsxs(Ne,{onSelect:()=>je({type:M}),children:[n.jsx(Ae,{size:16}),g(At[M].labelKey)]},M)}),e[240]=je,e[241]=g,e[242]=zn):zn=e[242];let $n;e[243]!==zn?($n=n.jsx(qe,{align:"start",className:"w-44",children:zn}),e[243]=zn,e[244]=$n):$n=e[244];let Rn;e[245]!==An||e[246]!==$n?(Rn=n.jsxs(Me,{children:[An,$n]}),e[245]=An,e[246]=$n,e[247]=Rn):Rn=e[247];const Gl=ue==="none"&&La;let En;e[248]!==Gl?(En=K(Yt,Gl),e[248]=Gl,e[249]=En):En=e[249];let On;e[250]!==ue||e[251]!==g?(On=ue==="none"?n.jsxs(n.Fragment,{children:[n.jsx(Ys,{size:16}),g("taskBoard.taskDialog.setPriorityButton")]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:K("size-2 rounded-full",et[ue].dotClassName)}),g(et[ue].labelKey)]}),e[250]=ue,e[251]=g,e[252]=On):On=e[252];let Ln;e[253]!==En||e[254]!==On?(Ln=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:En,children:On})}),e[253]=En,e[254]=On,e[255]=Ln):Ln=e[255];let Fn;e[256]!==je||e[257]!==g?(Fn=Ts.map(M=>n.jsxs(Ne,{onSelect:()=>je({priority:M}),children:[n.jsx("span",{className:K("size-2 rounded-full",et[M].dotClassName)}),g(et[M].labelKey)]},M)),e[256]=je,e[257]=g,e[258]=Fn):Fn=e[258];let Pn;e[259]!==Fn?(Pn=n.jsx(qe,{align:"start",className:"w-40",children:Fn}),e[259]=Fn,e[260]=Pn):Pn=e[260];let Mn;e[261]!==Ln||e[262]!==Pn?(Mn=n.jsxs(Me,{children:[Ln,Pn]}),e[261]=Ln,e[262]=Pn,e[263]=Mn):Mn=e[263];let Kn;e[264]!==Ze||e[265]!==a||e[266]!==Pt||e[267]!==g?(Kn=a&&n.jsx("div",{className:"inline-flex h-9 items-center justify-start gap-2 px-3 text-sm font-medium text-foreground",title:g("taskBoard.taskDialog.createdByLabel"),children:or(a)?n.jsxs(n.Fragment,{children:[n.jsx(It,{size:16,className:"text-muted-foreground"}),Pt]}):Ze?n.jsxs(n.Fragment,{children:[n.jsx(ot,{url:Ze.user?.image??void 0,fallback:Ze.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:Ze.user?.name??g("taskBoard.taskDialog.unknownCreatorLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Vs,{size:16,className:"text-muted-foreground"}),g("taskBoard.taskDialog.unknownCreatorLabel")]})}),e[264]=Ze,e[265]=a,e[266]=Pt,e[267]=g,e[268]=Kn):Kn=e[268];const Vl=!ze&&La;let Un;e[269]!==Vl?(Un=K(Yt,Vl),e[269]=Vl,e[270]=Un):Un=e[270];let qn;e[271]!==lt||e[272]!==Lt||e[273]!==_t||e[274]!==g?(qn=_t&&lt?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[n.jsx(ot,{url:lt.user?.image??void 0,fallback:lt.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:lt.user?.name??g("taskBoard.taskDialog.superAgentDefaultName")})]}),n.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(ot,{url:lt.user?.image??void 0,fallback:lt.user?.name??"?",shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),n.jsx(ct,{size:16,className:"ring-2 ring-background"})]}),g("taskBoard.taskDialog.superAgentLabel")]})]}):_t?n.jsxs(n.Fragment,{children:[n.jsx(ct,{size:16}),g("taskBoard.taskDialog.superAgentLabel")]}):Lt?n.jsxs(n.Fragment,{children:[n.jsx(ot,{url:Lt.user?.image??void 0,fallback:Lt.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:Lt.user?.name??g("taskBoard.taskDialog.unassignedLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Kr,{size:16,className:"text-muted-foreground"}),g("taskBoard.taskDialog.assignButton")]}),e[271]=lt,e[272]=Lt,e[273]=_t,e[274]=g,e[275]=qn):qn=e[275];let Gn;e[276]!==Un||e[277]!==qn?(Gn=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button",className:Un,children:qn})}),e[276]=Un,e[277]=qn,e[278]=Gn):Gn=e[278];let Vn;e[279]!==a?.assigneeId||e[280]!==k||e[281]!==je||e[282]!==it?(Vn=M=>{if(it(!1),M===Ie&&a?.assigneeId===Ie){k?.();return}je({assigneeId:M})},e[279]=a?.assigneeId,e[280]=k,e[281]=je,e[282]=it,e[283]=Vn):Vn=e[283];let Hn;e[284]!==C||e[285]!==Vn?(Hn=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(qi,{members:C,onSelect:Vn})}),e[284]=C,e[285]=Vn,e[286]=Hn):Hn=e[286];let Yn;e[287]!==Zt||e[288]!==it||e[289]!==Gn||e[290]!==Hn?(Yn=n.jsxs(ns,{open:Zt,onOpenChange:it,modal:!0,children:[Gn,Hn]}),e[287]=Zt,e[288]=it,e[289]=Gn,e[290]=Hn,e[291]=Yn):Yn=e[291];let Wn;e[292]!==lt||e[293]!==_t||e[294]!==g?(Wn=_t&&lt&&n.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[n.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),n.jsxs("span",{className:K(Yt,"pointer-events-none"),children:[n.jsx(ct,{size:16}),g("taskBoard.taskDialog.superAgentLabel")]})]}),e[292]=lt,e[293]=_t,e[294]=g,e[295]=Wn):Wn=e[295];let Qn;e[296]!==Yn||e[297]!==Wn?(Qn=n.jsxs("div",{className:"flex flex-col",children:[Yn,Wn]}),e[296]=Yn,e[297]=Wn,e[298]=Qn):Qn=e[298];const Hl=!Oe&&La;let Xn;e[299]!==Hl?(Xn=K(Yt,Hl),e[299]=Hl,e[300]=Xn):Xn=e[300];let xl;e[301]===Symbol.for("react.memo_cache_sentinel")?(xl=n.jsx(Ws,{size:16,className:"text-muted-foreground"}),e[301]=xl):xl=e[301];let Jn;e[302]!==Oe||e[303]!==g?(Jn=Oe?$o.format(Oe):g("taskBoard.taskDialog.dueDateLabel"),e[302]=Oe,e[303]=g,e[304]=Jn):Jn=e[304];let Zn;e[305]!==Xn||e[306]!==Jn?(Zn=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:Xn,children:[xl,Jn]})}),e[305]=Xn,e[306]=Jn,e[307]=Zn):Zn=e[307];const Yl=Oe??void 0;let ea;e[308]!==je?(ea=M=>{je({dueDate:M??null}),M&&ut(!1)},e[308]=je,e[309]=ea):ea=e[309];let ta;e[310]!==Yl||e[311]!==ea?(ta=n.jsx(as,{className:"w-auto p-0",align:"start",children:n.jsx($i,{mode:"single",selected:Yl,onSelect:ea,initialFocus:!0})}),e[310]=Yl,e[311]=ea,e[312]=ta):ta=e[312];let sa;e[313]!==at||e[314]!==Zn||e[315]!==ta?(sa=n.jsxs(ns,{open:at,onOpenChange:ut,children:[Zn,ta]}),e[313]=at,e[314]=Zn,e[315]=ta,e[316]=sa):sa=e[316];const Wl=(Le.length>0||Ye)&&n.jsxs(ns,{open:Te,onOpenChange:He,modal:!0,children:[n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:K(Yt,!Ye&&La),children:[n.jsx(Wt,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:jt?ol(jt,g):g(Ye?"taskBoard.sprints.goneLabel":"taskBoard.sprints.backlog")})]})}),n.jsxs(as,{align:"start",className:"w-64 p-1",children:[n.jsx(Nr,{icon:n.jsx(dl,{size:14,className:"text-muted-foreground"}),label:g("taskBoard.sprints.backlog"),selected:!Ye,onSelect:()=>bt(null)}),Jt.map(M=>n.jsx(Nr,{icon:n.jsx(Wt,{size:14,className:"text-muted-foreground"}),label:ol(M,g),hint:po(M),selected:M.id===Ye,onSelect:()=>bt(M.id)},M.id))]})]}),Ql=a?.threads;let na;e[317]!==Ql?(na=n.jsx(Kf,{threads:Ql}),e[317]=Ql,e[318]=na):na=e[318];let aa;e[319]!==Ml||e[320]!==Mn||e[321]!==Kn||e[322]!==Qn||e[323]!==sa||e[324]!==Wl||e[325]!==na||e[326]!==Nn||e[327]!==_n||e[328]!==Rn?(aa=n.jsxs(Ml,{label:Nn,children:[_n,Rn,Mn,Kn,Qn,sa,Wl,na]}),e[319]=Ml,e[320]=Mn,e[321]=Kn,e[322]=Qn,e[323]=sa,e[324]=Wl,e[325]=na,e[326]=Nn,e[327]=_n,e[328]=Rn,e[329]=aa):aa=e[329];let la;e[330]!==g?(la=g("taskBoard.taskDialog.labelsLabel"),e[330]=g,e[331]=la):la=e[331];let ia;e[332]!==L||e[333]!==je||e[334]!==ve||e[335]!==g||e[336]!==te?(ia=te.length===0?n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:K(Yt,La),children:[n.jsx(Cl,{size:16}),g("taskBoard.taskDialog.tagsButton")]})}):n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[te.map(M=>{const Ae=L.find(We=>We.id===M);return Ae?n.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:[n.jsxs("button",{type:"button",onClick:()=>ve(!0),className:"inline-flex items-center gap-1.5",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(Ae.color)}}),n.jsx("span",{className:"truncate",children:Ae.name})]}),n.jsx("button",{type:"button","aria-label":g("taskBoard.taskDialog.removeTagAriaLabel",{name:Ae.name}),className:"-mr-0.5 flex size-3.5 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground",onClick:()=>{je({tagIds:te.filter(We=>We!==M)})},children:n.jsx(il,{size:10})})]},M):null}),n.jsx(ss,{asChild:!0,children:n.jsx(re,{variant:"outline",size:"icon-sm","aria-label":g("taskBoard.taskDialog.addTagButton"),className:"text-muted-foreground",children:n.jsx(is,{className:"size-3.5"})})})]}),e[332]=L,e[333]=je,e[334]=ve,e[335]=g,e[336]=te,e[337]=ia):ia=e[337];let ra;e[338]!==L.length?(ra=eo(L.length),e[338]=L.length,e[339]=ra):ra=e[339];let oa;e[340]!==je||e[341]!==te?(oa=M=>je({tagIds:te.includes(M)?te.filter(Ae=>Ae!==M):[...te,M]}),e[340]=je,e[341]=te,e[342]=oa):oa=e[342];let ca;e[343]!==_s||e[344]!==Is||e[345]!==L||e[346]!==ra||e[347]!==oa||e[348]!==te?(ca=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(Co,{tags:L,selectedIds:te,defaultColor:ra,onToggle:oa,onCreate:_s,onDelete:Is})}),e[343]=_s,e[344]=Is,e[345]=L,e[346]=ra,e[347]=oa,e[348]=te,e[349]=ca):ca=e[349];let da;e[350]!==ve||e[351]!==ia||e[352]!==ca||e[353]!==Dt?(da=n.jsxs(ns,{open:Dt,onOpenChange:ve,modal:!0,children:[ia,ca]}),e[350]=ve,e[351]=ia,e[352]=ca,e[353]=Dt,e[354]=da):da=e[354];let ua;e[355]!==la||e[356]!==da?(ua=n.jsx(tl,{label:la,children:da}),e[355]=la,e[356]=da,e[357]=ua):ua=e[357];let fa;e[358]!==a||e[359]!==g?(fa=a&&n.jsx(tl,{label:g("taskBoard.epics.parentLabel"),children:n.jsx(O1,{item:a,buttonClassName:Yt})}),e[358]=a,e[359]=g,e[360]=fa):fa=e[360];const Xl=tl;let ma;e[361]!==g?(ma=g("taskBoard.taskDialog.projectLabel"),e[361]=g,e[362]=ma):ma=e[362];const Jl=Me,Zl=!Q&&!fe&&La;let pa;e[363]!==Zl?(pa=K(Yt,"max-w-full",Zl),e[363]=Zl,e[364]=pa):pa=e[364];let ga;e[365]!==Ue?(ga=n.jsx(ls,{entry:Ue}),e[365]=Ue,e[366]=ga):ga=e[366];let ha;e[367]!==Q||e[368]!==Ue?.title||e[369]!==g?(ha=Ue?.title??Q??g("taskBoard.taskDialog.projectButton"),e[367]=Q,e[368]=Ue?.title,e[369]=g,e[370]=ha):ha=e[370];let xa;e[371]!==ha?(xa=n.jsx("span",{className:"min-w-0 truncate text-left",children:ha}),e[371]=ha,e[372]=xa):xa=e[372];let ja;e[373]!==pa||e[374]!==ga||e[375]!==xa?(ja=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:pa,children:[ga,xa]})}),e[373]=pa,e[374]=ga,e[375]=xa,e[376]=ja):ja=e[376];const ei=qe,fc="start",mc="w-64";let ba;e[377]!==je?(ba=()=>je(rl(null)),e[377]=je,e[378]=ba):ba=e[378];let ka;e[379]!==g?(ka=g("taskBoard.taskDialog.noProject"),e[379]=g,e[380]=ka):ka=e[380];let ya;e[381]!==ba||e[382]!==ka?(ya=n.jsx(Ne,{onSelect:ba,children:ka}),e[381]=ba,e[382]=ka,e[383]=ya):ya=e[383];let jl;e[384]!==je?(jl=M=>n.jsx(Ne,{className:"gap-2",onSelect:()=>je(rl(M)),children:n.jsx(Bo,{entry:M})},M.id),e[384]=je,e[385]=jl):jl=e[385];const ti=ee.map(jl);let va;e[386]!==ei||e[387]!==ya||e[388]!==ti?(va=n.jsxs(ei,{align:fc,className:mc,children:[ya,ti]}),e[386]=ei,e[387]=ya,e[388]=ti,e[389]=va):va=e[389];let Na;e[390]!==Jl||e[391]!==ja||e[392]!==va?(Na=n.jsxs(Jl,{children:[ja,va]}),e[390]=Jl,e[391]=ja,e[392]=va,e[393]=Na):Na=e[393];let Sa;e[394]!==Xl||e[395]!==ma||e[396]!==Na?(Sa=n.jsx(Xl,{label:ma,children:Na}),e[394]=Xl,e[395]=ma,e[396]=Na,e[397]=Sa):Sa=e[397];let Ba;e[398]!==xe||e[399]!==a||e[400]!==h?(Ba=a&&n.jsx(um,{item:a,description:xe,onOpenPreview:h}),e[398]=xe,e[399]=a,e[400]=h,e[401]=Ba):Ba=e[401];let Ca;e[402]!==aa||e[403]!==ua||e[404]!==fa||e[405]!==Sa||e[406]!==Ba||e[407]!==yn||e[408]!==vn?(Ca=n.jsxs("div",{"data-testid":uc,className:yn,children:[vn,aa,ua,fa,Sa,Ba]}),e[402]=aa,e[403]=ua,e[404]=fa,e[405]=Sa,e[406]=Ba,e[407]=yn,e[408]=vn,e[409]=Ca):Ca=e[409];let wa;e[410]!==Ca||e[411]!==A||e[412]!==kn?(wa=n.jsxs("div",{className:A,children:[kn,Ca]}),e[410]=Ca,e[411]=A,e[412]=kn,e[413]=wa):wa=e[413];let Da;e[414]!==wa||e[415]!==Vt?(Da=n.jsx("div",{className:Vt,children:wa}),e[414]=wa,e[415]=Vt,e[416]=Da):Da=e[416];let Ta;e[417]!==rt?(Ta=()=>rt(null),e[417]=rt,e[418]=Ta):Ta=e[418];let _a;e[419]!==gt||e[420]!==Ta?(_a=n.jsx(mf,{thread:gt,onClose:Ta}),e[419]=gt,e[420]=Ta,e[421]=_a):_a=e[421];let Ia;e[422]!==mt||e[423]!==b||e[424]!==a||e[425]!==g||e[426]!==ce?(Ia=!a&&n.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:n.jsxs(re,{size:"sm",disabled:!ce.trim()||b,onClick:mt,children:[n.jsx(is,{size:16}),g("taskBoard.taskDialog.createTaskButton")]})}),e[422]=mt,e[423]=b,e[424]=a,e[425]=g,e[426]=ce,e[427]=Ia):Ia=e[427];let bl;e[428]!==Da||e[429]!==_a||e[430]!==Ia||e[431]!==Gt?(bl=n.jsxs(n.Fragment,{children:[Gt,Da,_a,Ia]}),e[428]=Da,e[429]=_a,e[430]=Ia,e[431]=Gt,e[432]=bl):bl=e[432];const Aa=bl;if(s==="page"){let M;e[433]!==$t||e[434]!==es?(M=We=>{const Et=$t(We),pc=es(We);return()=>{Et?.(),pc?.()}},e[433]=$t,e[434]=es,e[435]=M):M=e[435];let Ae;return e[436]!==Aa||e[437]!==M?(Ae=n.jsx("div",{ref:M,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:Aa}),e[436]=Aa,e[437]=M,e[438]=Ae):Ae=e[438],Ae}let za;e[439]!==Nt?(za=M=>!M&&Nt(),e[439]=Nt,e[440]=za):za=e[440];let $a;e[441]!==g?($a=g("taskBoard.taskDialog.newTaskTitle"),e[441]=g,e[442]=$a):$a=e[442];let Ra;e[443]!==$a?(Ra=n.jsx(ll,{className:"sr-only",children:$a}),e[443]=$a,e[444]=Ra):Ra=e[444];let Ea;e[445]!==Aa||e[446]!==Ra?(Ea=n.jsxs(al,{className:"flex max-h-[92vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[90vh] sm:max-h-[820px] sm:max-w-[1040px]",closeButtonClassName:"hidden",children:[Ra,Aa]}),e[445]=Aa,e[446]=Ra,e[447]=Ea):Ea=e[447];let kl;return e[448]!==y||e[449]!==za||e[450]!==Ea?(kl=n.jsx(nl,{open:y,onOpenChange:za,children:Ea}),e[448]=y,e[449]=za,e[450]=Ea,e[451]=kl):kl=e[451],kl}function Vf(t){return!t}function Hf(t){t.key==="Enter"&&t.preventDefault()}function Yf(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Wf(t){return!t}function Qf(t){return!t}function Xf(t){return t.name===bd}function Jf(t){return t.state!=="closed"}function Zf(t){return t.id}function em(t){const e=R.c(2);let s;return e[0]!==t?(s=n.jsx(Ro,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function tm(t){const e=R.c(2);let s;return e[0]!==t?(s=n.jsx(Ro,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function sm(t,e){switch(t.status){case"failed":return Ed(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:rs}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:sd};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:$l};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:Bi,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:Ha};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:rs};default:return t.status}}function nm(t){const e=R.c(17),{thread:s,onOpen:l}=t,i=X();let a;if(e[0]!==l||e[1]!==i||e[2]!==s){const r=s.status?sm({...s,status:s.status},i):null,o=s.lastMessage;let c;e[4]!==s.title?(c=to(s.title,"reviewer"),e[4]=s.title,e[5]=c):c=e[5];const d=c,u=s.threadId,f=d?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel";let m;e[6]!==i||e[7]!==f?(m=i(f),e[6]=i,e[7]=f,e[8]=m):m=e[8];let p;e[9]!==d?(p=d?n.jsx(fl,{size:32}):n.jsx(ct,{size:32}),e[9]=d,e[10]=p):p=e[10];let h;e[11]!==l||e[12]!==s?(h=l?()=>l(s):void 0,e[11]=l,e[12]=s,e[13]=h):h=e[13];let j;e[14]!==l||e[15]!==s?(j=l?()=>l(s):void 0,e[14]=l,e[15]=s,e[16]=j):j=e[16],a=n.jsx(Do,{id:`run-${s.threadId}`,threadId:u,author:m,avatar:p,createdAt:s.createdAt,body:o||s.title||"",muted:s.status!=="requires_action",onOpenThread:h,onOpen:j,metadata:r&&n.jsxs("span",{className:K("flex shrink-0 items-center gap-1.5",r.className),children:[r.spin?n.jsx(xt,{className:"size-[15px]",label:r.label}):n.jsx(r.icon,{size:15}),n.jsx("span",{className:"text-xs",children:r.label})]})}),e[0]=l,e[1]=i,e[2]=s,e[3]=a}else a=e[3];return a}function am(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Gr}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:el}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:el}:t.state===null&&t.merged===null?{label:e("taskBoard.taskDialog.prStateUnknown"),className:"text-muted-foreground",icon:el}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:el}}function lm(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:Ha};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:rs};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:Bi};default:return null}}const im=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function rm(t){if(t.status!=="completed")return{icon:Bi,className:"text-warning",spin:!0};const e=t.conclusion;return e&&im.has(e)?{icon:rs,className:"text-destructive",spin:!1}:yo(t)?{icon:Ha,className:"text-success",spin:!1}:{icon:$l,className:"text-muted-foreground",spin:!1}}function om(t){const e=R.c(58),{pr:s,routes:l,revalidating:i,previewThread:a,readyToShip:r,shipPending:o,resolvePending:c,onShip:d,onResolveConflict:u,onOpenPreview:f}=t,m=X(),[p,h]=W.useState(!1),j=t1(s.url)?.repo.provider??"github";let x;if(e[0]!==p||e[1]!==f||e[2]!==u||e[3]!==d||e[4]!==s||e[5]!==a||e[6]!==j||e[7]!==r||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o||e[12]!==m){const k=am(s,m),b=lm(s.checksStatus,m);let y;e[14]!==s||e[15]!==r?(y=U1(s,r),e[14]=s,e[15]=r,e[16]=y):y=e[16];const{isOpen:g,hasConflict:v,showShip:N,showResolveConflict:B}=y,w=!!a||!!s.previewUrl||N||B,D=s.checks??[],C=D.length>0||b!=null,S=D.length>0,T=q1(s.checksStatus,D,p),_=T?{label:m("taskBoard.taskDialog.prChecksScore",T),className:"text-warning",icon:rs}:b,z=i&&"revalidating-ring";let I;e[17]!==z?(I=K("flex flex-col gap-3 rounded-xl border border-border bg-card p-3",z),e[17]=z,e[18]=I):I=e[18];let $;e[19]!==j?($=n.jsx(hu,{provider:j,className:"size-4 shrink-0 text-foreground"}),e[19]=j,e[20]=$):$=e[20];const E=s.title??`${s.repoOwner}/${s.repoName}`;let O;e[21]!==E?(O=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:E}),e[21]=E,e[22]=O):O=e[22];const L=K("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let U;e[23]!==k?(U=n.jsx(k.icon,{size:13}),e[23]=k,e[24]=U):U=e[24];let G;e[25]!==k||e[26]!==L||e[27]!==U?(G=n.jsxs("span",{className:L,children:[U,k.label]}),e[25]=k,e[26]=L,e[27]=U,e[28]=G):G=e[28];const P=s.url,J=s.url;let H;e[29]!==s.number||e[30]!==j?(H=Wu(j,s.number),e[29]=s.number,e[30]=j,e[31]=H):H=e[31];let se;e[32]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Ma,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[32]=se):se=e[32];let V;e[33]!==s.url||e[34]!==H?(V=n.jsxs("a",{href:P,target:"_blank",rel:"noreferrer",title:J,className:"group flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent",children:[H,se]}),e[33]=s.url,e[34]=H,e[35]=V):V=e[35];let ee;e[36]!==G||e[37]!==V||e[38]!==$||e[39]!==O?(ee=n.jsxs("div",{className:"flex items-center gap-3",children:[$,O,G,V]}),e[36]=G,e[37]=V,e[38]=$,e[39]=O,e[40]=ee):ee=e[40];let ie;e[41]!==v||e[42]!==g||e[43]!==m?(ie=v&&g&&n.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[n.jsx(rs,{size:13,className:"shrink-0"}),m("taskBoard.taskDialog.prConflict")]}),e[41]=v,e[42]=g,e[43]=m,e[44]=ie):ie=e[44];let ne;e[45]!==w||e[46]!==f||e[47]!==u||e[48]!==d||e[49]!==s.previewUrl||e[50]!==a||e[51]!==c||e[52]!==l||e[53]!==o||e[54]!==B||e[55]!==N||e[56]!==m?(ne=w&&n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:m("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[n.jsx(Mr,{size:13}),m("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&n.jsx(H1,{url:s.previewUrl,routes:l}),N&&n.jsx(re,{type:"button",variant:"success",size:"sm",disabled:o,onClick:d,children:m("taskBoard.taskDialog.shipToProductionButton")}),B&&n.jsxs(re,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:m("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[n.jsx(Gr,{size:13}),m("taskBoard.taskDialog.resolveConflictButton")]})]}),e[45]=w,e[46]=f,e[47]=u,e[48]=d,e[49]=s.previewUrl,e[50]=a,e[51]=c,e[52]=l,e[53]=o,e[54]=B,e[55]=N,e[56]=m,e[57]=ne):ne=e[57],x=n.jsxs("div",{className:I,children:[ee,ie,ne,C&&n.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[n.jsxs("button",{type:"button",disabled:!S,onClick:()=>h(cm),className:"flex w-full items-center gap-1.5 font-medium disabled:cursor-default",children:[_?n.jsx(_.icon,{size:13,className:_.className}):n.jsx(Ha,{size:13,className:"text-muted-foreground"}),n.jsx("span",{className:K(_?.className??"text-muted-foreground"),children:_?.label??m("taskBoard.taskDialog.prChecksLabel")}),S&&n.jsx(Va,{size:14,className:K("ml-auto text-muted-foreground/60 transition-transform",p&&"rotate-90")})]}),p&&n.jsx("div",{className:"mt-2 flex flex-col gap-2",children:D.map((F,q)=>{const le=rm(F),de=`${F.name}-${q}`;return n.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[le.spin?n.jsx(xt,{className:K("size-[13px]",le.className)}):n.jsx(le.icon,{size:13,className:K("shrink-0",le.className)}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:F.name}),F.detailsUrl&&n.jsx("a",{href:F.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:n.jsx(Ma,{size:12})})]}),F.summary&&n.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:n.jsx(Ri,{id:`${s.url}-${de}`,text:F.summary})})]},de)})})]})]}),e[0]=p,e[1]=f,e[2]=u,e[3]=d,e[4]=s,e[5]=a,e[6]=j,e[7]=r,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=m,e[13]=x}else x=e[13];return x}function cm(t){return!t}function dm(){const t=R.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Oa,{className:"size-4 shrink-0 rounded"}),n.jsx(Oa,{className:"h-4 min-w-0 flex-1"}),n.jsx(Oa,{className:"h-4 w-16 shrink-0"}),n.jsx(Oa,{className:"h-4 w-10 shrink-0"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3",children:[e,n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Oa,{className:"h-7 w-20"}),n.jsx(Oa,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function um(t){const e=R.c(54),{item:s,description:l,onOpenPreview:i}=t,a=X(),{data:r,isLoading:o,isFetching:c}=Ei(s.id),d=J1(s.id),u=Z1(s.id),f=Vi(s.id);let m,p,h,j,x,k;if(e[0]!==f.threads||e[1]!==l||e[2]!==s.previewRoutes||e[3]!==s.status||e[4]!==s.threads||e[5]!==i||e[6]!==d||e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==u||e[11]!==a){k=Symbol.for("react.early_return_sentinel");e:{let g;e[18]!==f.threads||e[19]!==l?(g=[l,...f.threads.flatMap(pm)],e[18]=f.threads,e[19]=l,e[20]=g):g=e[20];const v=cf(g.join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-PbputQp9.js","assets/index-BZX-7ipZ.js","assets/index-SmuiYnIl.css","assets/AlertCircle-2LbzMVC9.js","assets/agent-icon-U2nlXoBG.js","assets/Tool01-D38zOT0h.js","assets/ArrowUp-DmxAfWhF.js","assets/ArrowLeft-BeuQwyHa.js","assets/LinkBroken01-Jybptj_M.js","assets/ShoppingBag01-DhegylE0.js","assets/Globe04-RPMmcIuy.js","assets/CheckCircle-BzNTGMCW.js","assets/ChevronUp-aYmfXYet.js","assets/ChevronSelectorVertical-XdbRnSsi.js","assets/UserSquare-CEg-eLCw.js","assets/CreditCard01-yFcUZGe-.js","assets/SwitchHorizontal01-Czrqzt6f.js","assets/Key01-jvDltRrN.js","assets/Minus-BqtyYKKc.js","assets/Monitor01-As0zpJLy.js","assets/Sun-Hd0LHTxB.js","assets/Play-CdlorRHF.js","assets/Plus-CzoopYlU.js","assets/SearchMd-By2dNUiw.js","assets/Trash01-BxSWir9J.js","assets/Upload01-C8sapTWh.js","assets/Users01-CMreTMtq.js","assets/XClose-DGifUqyQ.js","assets/Zap-BLaVFWQx.js","assets/use-sidebar-collapsed-ByMTBVZc.js","assets/use-chat-layout-state-CZaSk8YF.js","assets/thread-route-CP2TR6nw.js","assets/autosend-D6GGYoeu.js","assets/use-project-scope-k7OaKjIm.js","assets/repository-binding-CqOunspI.js","assets/use-mcp-client-CrdyqnFt.js","assets/auth-D991fBKg.js","assets/thread-intent-DIce2mks.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-j0K-nQ0i.js","assets/task-board-DJtwkz3O.js","assets/schema-C1bLOk3P.js","assets/tooltip--uPFG1gb.js","assets/index-BM0DSfBG.js","assets/toolbar-icon-button-BzIcnxXk.js","assets/shell-layout-BvJfyzsq.js","assets/use-deployment-admin-BSEuekHe.js","assets/admin-fetch-BhTJlAsX.js","assets/command-DiccrIM8.js","assets/index-cmF_qGuq.js","assets/integration-icon-Btk7lWbK.js","assets/project-icon-ofE-LDok.js","assets/use-navigate-to-agent-C3sX18jI.js","assets/new-project-dialog-EK9WMEhp.js","assets/label-BGCn7A0y.js","assets/repository-picker-DNdEQtlZ.js","assets/github-icon-M-2WiP3Y.js","assets/useInfiniteQuery-B313haH3.js","assets/infiniteQueryObserver-CQGSlzKO.js","assets/collection-search-D_oD-yY0.js","assets/use-debounced-value-CJpdUTvG.js","assets/use-organization-settings-DPCrcu8e.js","assets/required-auth-layout-Dfyc4Zas.js","assets/use-org-sso-BHDTii7j.js","assets/shell-layout-CE2Eihra.css","assets/use-mobile-BDWitdax.js","assets/sheet-BYgfxL9i.js","assets/index-mtR249ru.js","assets/chat-context-CCj5lauv.js","assets/use-entitlements-CWXMyUT0.js","assets/use-ai-providers-C5rCFpU_.js","assets/use-decopilot-events-DxBT3zOC.js","assets/tool-namespace-BQhkJpu9.js","assets/drawer-CMTReHxa.js","assets/use-mcp-prompts-C3SHzM_d.js","assets/usage-stats-DaOtdhEm.js","assets/form-B_3ZthF3.js","assets/utils-CVEq3hMx.js","assets/markdown-B6eeRWQb.js","assets/use-copy-DccRTYvG.js","assets/input-CcFFY__7.js","assets/icon-button-DQuPTgIB.js","assets/file-type-icon-CflTIvHJ.js","assets/chat-draft-BtMWyLm7.js","assets/use-voice-input-DsJxHyTh.js","assets/popover-CkuSZicN.js","assets/index-DT3lYd1R.js","assets/checkbox-DB14k3TQ.js","assets/select-CwDmbwEv.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/tabs--wmPR0cZ.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-DtE2LNZs.js","assets/toggle-group-DbLOGwe7.js","assets/input-3OyhKW_c.js","assets/suggestion-Dwy6qysF.js","assets/use-org-fs-BRERSVus.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-BoU9TII8.js","assets/plan-ladder-BQ0gcfdF.js","assets/add-connection-dialog-Dpu5ecJP.js","assets/extract-connection-data-Q1k0ncm3.js","assets/metadata-D72DunRR.js","assets/connection-DF20RpK_.js","assets/url-slug-rCJqhuIp.js","assets/connection-card-DeCnJCAi.js","assets/connection-slug-tS8GnOSc.js","assets/textarea-D5OF_Tld.js","assets/use-connection-BEb786wf.js","assets/schema-DHLwjAWR.js","assets/connection-form-helpers-B4MG2Fy2.js","assets/authenticate-and-persist-oauth-CM3iiCDW.js","assets/mcp-oauth-BvqIKSqR.js","assets/mcp-oauth-Bz1Lo9Pk.js","assets/collection-tabs-SAUXvS4g.js","assets/badge-C9w1KAGQ.js","assets/use-infinite-scroll-4e7tB3Vz.js","assets/useSuspenseInfiniteQuery-07GrICuv.js","assets/use-task-board-events-CzDIUBok.js","assets/input-Bwd_JSM8.css","assets/pair-C5KKQk8r.js","assets/collapsible-BPEhSNLz.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DwuRGgZk.js","assets/types-EjHtXl5u.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/use-thread-outputs-lMVF4bT2.js","assets/agent-capabilities-CaXbVMop.js","assets/cms-store-drafts-BumH78UY.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-CXwLCWvJ.js","assets/use-sandbox-events-BRJYKM54.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-DF9St1T6.js","assets/use-blocks-v8-project-CXrKL60y.js","assets/index-Cjc_aSrk.js","assets/resizable-BCGqPRic.js","assets/task-status-msgu5x2s.js","assets/use-main-panel-tabs-BcP_qZl8.js","assets/use-mcp-tools-DQIJMlw-.js","assets/resolve-tab-icon-BnqDq-fY.js","assets/use-task-metadata-BxcNhivS.js","assets/preview-source-BsRLGWUP.js","assets/project-sidebar-views-Dew_3OKS.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-DsyBYIJw.js","assets/virtual-mcp-Dzr3mFmO.js","assets/tab-icon-glyph-Co1M723I.js","assets/project-apps-D47w7eJj.js","assets/legacy-main-redirect-8kA2UC85.js","assets/preview-dialog-D36kXBk6.js","assets/preview-content-xRBU7B3O.js","assets/file-share-button-agT85qGG.js","assets/file-preview-aD0sVwV5.js","assets/utils-D0xixM8q.js","assets/editor-C6CE2FNQ.js","assets/blocks-preview-workspace-context-Gbv7_zq8.js"])))=>i.map(i=>d[i]);
2
+ import{bl as $r,c as R,a5 as tt,f as cl,u as Rr,j as n,h as xt,a0 as gc,b as X,d as bi,B as re,L as Xi,ak as Qt,q as Js,av as hc,r as W,e as St,m as K,t as Qe,K as Ct,aH as xc,aI as jc,aJ as bc,aK as kc,bj as yc,aL as vc,aM as Nc,aN as Sc,h4 as Bc,h5 as Cc,i as Ga,_ as Me,X as Ke,Z as qe,au as sl,ap as ys,an as vs,ao as Ns,Y as Ne,bx as Cs,D as nl,v as al,w as Sl,x as ll,aT as Bl,y as ki,I as si,am as Ys,o as ot,a8 as Ma,ax as Vs,T as wc,h6 as yi,ac as Al,ar as Er,at as Or,a as vi,b3 as zl,aU as Dc,b2 as il,n as Ss,as as Va,bB as Oa,h7 as Tc,ec as _c,b9 as Ic,J as Ni,N as Zi,P as Ji,bQ as Ac,E as zc,aS as $c,a6 as Rc,d4 as Ec,h8 as Oc,R as Lc,h9 as Fc}from"./index-BZX-7ipZ.js";import{u as Pc,a as er,K as Mc,P as Kc,b as Uc,D as qc,g as tr,C as Gc}from"./core.esm-CWyzckxm.js";import{S as sr,v as nr,s as Vc,a as Hc,u as Yc}from"./sortable.esm-DgwAq-fn.js";import{u as Lr}from"./use-task-board-analytics-0-6_3j_2.js";import{C as Wc}from"./combobox-hVgdYGtQ.js";import{ay as ar,H as dl,ar as Fr,g as It,be as di,b5 as Pr,b as ui,bf as Si,I as Qc,bg as Xc,bh as Zc,bi as Jc,K as Mr,e as ed,bj as td,bk as lr,aA as Kr,$ as Cl,v as Ws,aG as el,a6 as Bi,O as $l,bl as sd,G as wl,b6 as fi,b8 as mi,a5 as Ci,ao as Ur,F as nd,n as ad,ad as ld,S as id}from"./agent-icon-U2nlXoBG.js";import{g as rd,a as qr}from"./Tool01-D38zOT0h.js";import{u as od,c as cd,a as dd,C as ud}from"./use-task-board-prompts-CKi9j8wF.js";import{S as fd}from"./search-toggle-DzMf9QP4.js";import{c as Ms,T as Ks,a as Us}from"./tooltip--uPFG1gb.js";import{i as Ha}from"./CheckCircle-BzNTGMCW.js";import{s as is}from"./Plus-CzoopYlU.js";import{g as Gr,f as md,s as ni}from"./UserSquare-CEg-eLCw.js";import{i as Wt}from"./Zap-BLaVFWQx.js";import{P as ns,a as ss,b as as,c as pd}from"./popover-CkuSZicN.js";import{f as gd,g as hd,C as xd,e as jd}from"./context-menu-vUs3I8Wh.js";import{S as ct,d as bd}from"./feedback-f3MT17uD.js";import{B as Ka}from"./badge-C9w1KAGQ.js";import{g as Vr,r as Hr,h as kd}from"./use-task-board-items-COxHF7_K.js";import{R as yd}from"./new-project-dialog-EK9WMEhp.js";import{a as vd}from"./watch-sse-pool-j0K-nQ0i.js";import{a as Nd,M as Sd,n as Bd,c as wi}from"./sprints-C1z9xhcL.js";import{t as ul,n as Cd}from"./ChevronUp-aYmfXYet.js";import{s as wd}from"./Trash01-BxSWir9J.js";import{I as Bt}from"./icon-button-DQuPTgIB.js";import{L as Nl}from"./label-BGCn7A0y.js";import{S as Dd,b as Td,a as _d,d as Id,c as Yr}from"./select-CwDmbwEv.js";import{B as Bs,a as Wr,U as qs,E as Qr,D as Ad,d as ir,b as Di,r as zd,f as $d,t as pi}from"./task-route-vCMrJPp9.js";import{i as Ti,a as Rl,c as Qs,l as dt,d as Dl,T as At,P as et,t as en,e as _i,s as Xr,f as Ii,g as Ts,h as Rd,j as Ed,S as Od,H as Zr,b as Jr,k as Ld,r as gi,m as Fd,n as Pd,o as Md,L as Ai,C as zi,p as Kd,q as ai,u as rr,v as Ud,w as qd,x as Gd,y as Vd,z as Hd}from"./config-DgUlbPLE.js";import{S as Ie,C as ws,e as Tl,R as Yd,i as or,n as eo,f as to,g as Wd}from"./task-board-DJtwkz3O.js";import{t as tn}from"./task-key-BCHdFiOO.js";import{u as El,a as so,b as no}from"./use-tags-CcJayzHf.js";import{f as ao}from"./use-organization-settings-DPCrcu8e.js";import{C as $i}from"./calendar-ahGH-Iwe.js";import{b as cr,A as Qd,a as Xd}from"./alert-B52lXsYB.js";import{C as Zd,a as Jd,b as eu}from"./collapsible-BPEhSNLz.js";import{u as li}from"./use-copy-DccRTYvG.js";import{i as rs}from"./AlertCircle-2LbzMVC9.js";import{a as dr,h as tu,M as Ri,p as su}from"./markdown-B6eeRWQb.js";import{M as nu,a as au,b as lu,c as iu,d as ru,U as ou,e as cu,m as du,f as uu,u as fu,g as mu,h as lo,A as pu}from"./index-BvJNHE6H.js";import{d as io,S as ur}from"./sandbox-start-errors-BK_aDCyt.js";import{p as fr,r as gu,u as ro,G as hu}from"./repository-picker-DNdEQtlZ.js";import{u as Ei}from"./use-task-board-item-prs-DbHC-4Ry.js";import{u as oo}from"./use-connection-BEb786wf.js";import{d as xu,a as ju,p as bu}from"./repository-binding-CqOunspI.js";import{b as co,s as uo,e as Ua,a as rl,c as ku,N as Xs,d as Oi,f as yu,g as vu}from"./project-index-PpuyCKHe.js";import{s as Nu,a as Su}from"./use-project-scope-k7OaKjIm.js";import{G as Bu}from"./github-icon-M-2WiP3Y.js";import{P as Cu}from"./project-icon-ofE-LDok.js";import{l as wu}from"./github-repo-scope-C58hYmYC.js";import{a as Li,C as Fi,b as Hs,e as qa,c as Pi,f as Mi,g as fo}from"./command-DiccrIM8.js";import{c as Du,S as Tu,a as _u,b as Iu}from"./sheet-BYgfxL9i.js";import{T as Au}from"./thread-sheet-body-Cba15kJF.js";import{u as zu}from"./use-mcp-client-CrdyqnFt.js";import{i as $u}from"./ArrowUp-DmxAfWhF.js";import{i as Ru}from"./Upload01-C8sapTWh.js";import{i as Eu}from"./use-org-fs-BRERSVus.js";import{u as Ou,s as Lu,b as Fu,c as Pu}from"./usage-stats-DaOtdhEm.js";import{s as Mu}from"./suggestion-Dwy6qysF.js";import{a as Ku}from"./pair-C5KKQk8r.js";import{S as Pa}from"./separator-C05SxAdn.js";import{a as Uu}from"./shell-layout-BvJfyzsq.js";import{c as qu}from"./thread-intent-DIce2mks.js";import{w as Gu}from"./chat-draft-BtMWyLm7.js";const Vu=$r("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const Hu=$r("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),Yu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function Wu(t,e){return`${t==="gitlab"?"!":"#"}${e}`}function Qu(t,e){return`${gu(t)}/${Yu[t.provider]}/${e}`}const Xu=[{re:/https?:\/\/([^/\s"']+)\/([^\s"']+?)\/-\/merge_requests\/(\d+)/,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull-requests\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/repos\/([^/\s"']+\/[^/\s"']+)\/pulls\/(\d+)/,api:!0},{re:/https?:\/\/([^/\s"']+)\/api\/v4\/projects\/([^/\s"']+)\/merge_requests\/(\d+)/,api:!0,provider:"gitlab"},{re:/https?:\/\/([^/\s"']+)\/2\.0\/repositories\/([^/\s"']+\/[^/\s"']+)\/pullrequests\/(\d+)/,api:!0}],Zu={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function Ju(t){const e=t.toLowerCase();return Zu[e]??e}function e1(t,e,s){const l=Number(t[3]);if(!Number.isSafeInteger(l)||l<=0)return null;const i=Ju(t[1]),a=t[2],r=e?decodeURIComponent(a):a;if(/^\d+$/.test(r))return null;const o=`https://${i}/${r}`,c=fr(o)??(s?fr(o,{provider:s}):null);return c?{repo:c,number:l,url:Qu(c,l)}:null}function t1(t){const e=t.trim();if(!e)return null;for(const{re:s,api:l,provider:i}of Xu){const a=s.exec(e),r=a?e1(a,l===!0,i):null;if(r)return r}return null}function Ol(){const t=R.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=cl(e).org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{boardOrg:i}=Rr(l);return i&&i!==s?i:null}function s1(t){const e=R.c(12),{children:s}=t,{project:l}=tt(),i=Ol(),{data:a,isLoading:r}=Lr();if(!i)return s;if(r){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"flex h-full items-center justify-center",children:n.jsx(xt,{className:"size-5 text-muted-foreground"})}),e[0]=f):f=e[0],f}let o;e[1]!==a?.orgs||e[2]!==i?(o=a?.orgs.find(f=>f.slug===i),e[1]=a?.orgs,e[2]=i,e[3]=o):o=e[3];const c=o;if(!c)return s;let d;e[4]!==c.id||e[5]!==c.name||e[6]!==c.slug?(d={id:c.id,name:c.name,slug:c.slug,logo:null},e[4]=c.id,e[5]=c.name,e[6]=c.slug,e[7]=d):d=e[7];let u;return e[8]!==s||e[9]!==l||e[10]!==d?(u=n.jsx(gc,{org:d,project:l,children:s}),e[8]=s,e[9]=l,e[10]=d,e[11]=u):u=e[11],u}function n1(){const t=R.c(5),e=X(),s=Ol();if(!s)return null;let l;t[0]!==e||t[1]!==s?(l=e("taskBoard.analytics.bannerBoard",{org:s}),t[0]=e,t[1]=s,t[2]=l):l=t[2];let i;return t[3]!==l?(i=n.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:l}),t[3]=l,t[4]=i):i=t[4],i}function a1(){const t=R.c(27),e=X(),s=bi(),l=cl({strict:!1}).org??"",i=Ol(),{data:a}=Lr();if(!a?.isTaskBoardAdmin)return null;let r;t[0]!==e?(r=e("taskBoard.analytics.orgCurrent"),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==l||t[3]!==r?(o={value:l,label:r},t[2]=l,t[3]=r,t[4]=o):o=t[4];let c;if(t[5]!==a.orgs||t[6]!==l||t[7]!==o){let x;t[9]!==l?(x=k=>k.slug!==l,t[9]=l,t[10]=x):x=t[10],c=[o,...a.orgs.filter(x).map(l1)],t[5]=a.orgs,t[6]=l,t[7]=o,t[8]=c}else c=t[8];const d=c,u=i??l;let f;t[11]!==s||t[12]!==l?(f=x=>s({to:".",search:k=>({...k,boardOrg:x===l?void 0:x}),replace:!0}),t[11]=s,t[12]=l,t[13]=f):f=t[13];let m;t[14]!==e?(m=e("taskBoard.analytics.orgPickerPlaceholder"),t[14]=e,t[15]=m):m=t[15];let p;t[16]!==e?(p=e("taskBoard.analytics.orgSearch"),t[16]=e,t[17]=p):p=t[17];let h;t[18]!==e?(h=e("taskBoard.analytics.orgEmpty"),t[18]=e,t[19]=h):h=t[19];let j;return t[20]!==d||t[21]!==u||t[22]!==f||t[23]!==m||t[24]!==p||t[25]!==h?(j=n.jsx(Wc,{options:d,value:u,onChange:f,width:"w-[200px]",placeholder:m,searchPlaceholder:p,emptyMessage:h}),t[20]=d,t[21]=u,t[22]=f,t[23]=m,t[24]=p,t[25]=h,t[26]=j):j=t[26],j}function l1(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function i1(t){const e=R.c(5),{project:s}=t,l=X();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const r=cl(i).org??"";let o;return e[1]!==r||e[2]!==s||e[3]!==l?(o=n.jsx(re,{size:"sm",variant:"outline",className:"hidden sm:inline-flex",asChild:!0,children:s?n.jsxs(Xi,{to:"/$org/projects/$agentId/taskboard-analytics",params:{org:r,agentId:s},children:[n.jsx(ar,{size:16}),l("taskBoard.analytics.openAnalytics")]}):n.jsxs(Xi,{to:"/$org/taskboard-analytics",params:{org:r},children:[n.jsx(ar,{size:16}),l("taskBoard.analytics.openAnalytics")]})}),e[1]=r,e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function r1(t){const e=R.c(58),{isDemoBoard:s}=t,l=X(),i=Qt(),a=Js(),{locator:r}=tt(),{isPrivileged:o}=hc(),c=Ol(),[d,u]=W.useState(!1);let f;e[0]!==i?(f=()=>i.call("DEMO_BOARD_RESET",{}),e[0]=i,e[1]=f):f=e[1];let m,p;e[2]!==l?(m=P=>{const Z=P.problems.length+P.deadPreviewUrls.length;Z>0?Qe.warning(l("taskBoard.demoReset.doneWithIssues",{count:Z})):Qe.success(l("taskBoard.demoReset.done"))},p=P=>Qe.error(l("taskBoard.demoReset.failed"),{description:P instanceof Error?P.message:void 0}),e[2]=l,e[3]=m,e[4]=p):(m=e[3],p=e[4]);let h;e[5]!==r||e[6]!==a?(h=()=>a.invalidateQueries({queryKey:Ct.taskBoardItems(r)}),e[5]=r,e[6]=a,e[7]=h):h=e[7];let j;e[8]!==f||e[9]!==m||e[10]!==p||e[11]!==h?(j={mutationFn:f,onSuccess:m,onError:p,onSettled:h},e[8]=f,e[9]=m,e[10]=p,e[11]=h,e[12]=j):j=e[12];const x=St(j);if(!s||!o||c)return null;const k=x.isPending;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=()=>u(!0),e[13]=b):b=e[13];const y=x.isPending&&"animate-spin";let g;e[14]!==y?(g=K(y),e[14]=y,e[15]=g):g=e[15];let v;e[16]!==g?(v=n.jsx(rd,{size:16,className:g}),e[16]=g,e[17]=v):v=e[17];let N;e[18]!==l?(N=l("taskBoard.demoReset.button"),e[18]=l,e[19]=N):N=e[19];let B;e[20]!==x.isPending||e[21]!==v||e[22]!==N?(B=n.jsxs(re,{size:"sm",variant:"outline",className:"hidden sm:inline-flex",disabled:k,onClick:b,children:[v,N]}),e[20]=x.isPending,e[21]=v,e[22]=N,e[23]=B):B=e[23];let w;e[24]!==l?(w=l("taskBoard.demoReset.title"),e[24]=l,e[25]=w):w=e[25];let D;e[26]!==w?(D=n.jsx(xc,{children:w}),e[26]=w,e[27]=D):D=e[27];let C;e[28]!==l?(C=l("taskBoard.demoReset.description"),e[28]=l,e[29]=C):C=e[29];let S;e[30]!==C?(S=n.jsx(jc,{children:C}),e[30]=C,e[31]=S):S=e[31];let T;e[32]!==D||e[33]!==S?(T=n.jsxs(bc,{children:[D,S]}),e[32]=D,e[33]=S,e[34]=T):T=e[34];let _;e[35]!==l?(_=l("taskBoard.demoReset.cancel"),e[35]=l,e[36]=_):_=e[36];let z;e[37]!==_?(z=n.jsx(kc,{children:_}),e[37]=_,e[38]=z):z=e[38];let I;e[39]!==x?(I=()=>x.mutate(),e[39]=x,e[40]=I):I=e[40];let $;e[41]!==l?($=l("taskBoard.demoReset.confirm"),e[41]=l,e[42]=$):$=e[42];let E;e[43]!==I||e[44]!==$?(E=n.jsx(yc,{variant:"destructive",onClick:I,children:$}),e[43]=I,e[44]=$,e[45]=E):E=e[45];let O;e[46]!==z||e[47]!==E?(O=n.jsxs(vc,{children:[z,E]}),e[46]=z,e[47]=E,e[48]=O):O=e[48];let L;e[49]!==T||e[50]!==O?(L=n.jsxs(Nc,{children:[T,O]}),e[49]=T,e[50]=O,e[51]=L):L=e[51];let U;e[52]!==d||e[53]!==L?(U=n.jsx(Sc,{open:d,onOpenChange:u,children:L}),e[52]=d,e[53]=L,e[54]=U):U=e[54];let G;return e[55]!==B||e[56]!==U?(G=n.jsxs(n.Fragment,{children:[B,U]}),e[55]=B,e[56]=U,e[57]=G):G=e[57],G}function fl(t){const e=R.c(11),{size:s,className:l}=t,i=s===void 0?16:s;let a;e[0]!==l?(a=K("inline-flex shrink-0 items-center justify-center rounded-full",l),e[0]=l,e[1]=a):a=e[1];let r;e[2]!==i?(r={width:i,height:i,backgroundColor:`${Bc}26`},e[2]=i,e[3]=r):r=e[3];const o=i*.6,c=i*.6;let d;e[4]!==o||e[5]!==c?(d=n.jsx("img",{src:Cc,alt:"Reviewer",style:{width:o,height:c}}),e[4]=o,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==d?(u=n.jsx("span",{className:a,style:r,children:d}),e[7]=a,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}const o1=[];function Ll(){const t=R.c(7),{org:e}=tt(),s=Qt();let l;t[0]!==e.id?(l=Ct.taskBoardSprints(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==s?(i=async()=>(await s.call("TASK_BOARD_SPRINT_LIST",{})).sprints,t[2]=s,t[3]=i):i=t[3];let a;t[4]!==l||t[5]!==i?(a={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6];const{data:r}=Ga(a);return r??o1}function mo(){const t=R.c(4),{org:e,locator:s}=tt(),l=Js();let i;return t[0]!==s||t[1]!==e.id||t[2]!==l?(i=()=>Promise.all([l.invalidateQueries({queryKey:Ct.taskBoardSprints(e.id)}),l.invalidateQueries({queryKey:Ct.taskBoardItems(s)})]),t[0]=s,t[1]=e.id,t[2]=l,t[3]=i):i=t[3],i}const mr=()=>0;function c1(){const t=R.c(3),{org:e}=tt(),s=mo();let l;t[0]!==e.slug||t[1]!==s?(l=()=>vd.subscribe(e.slug,s,s),t[0]=e.slug,t[1]=s,t[2]=l):l=t[2];const i=l;W.useSyncExternalStore(i,mr,mr)}function d1(){const t=R.c(38),e=Qt(),s=mo(),l=X();let i;t[0]!==l?(i=N=>Qe.error(N instanceof Error&&N.message?N.message:l("taskBoard.sprints.actionError")),t[0]=l,t[1]=i):i=t[1];const a=i;let r;t[2]!==e?(r=N=>e.call("TASK_BOARD_SPRINT_CREATE",N),t[2]=e,t[3]=r):r=t[3];let o;t[4]!==s||t[5]!==a||t[6]!==r?(o={mutationFn:r,onError:a,onSettled:s},t[4]=s,t[5]=a,t[6]=r,t[7]=o):o=t[7];const c=St(o);let d;t[8]!==e?(d=N=>e.call("TASK_BOARD_SPRINT_UPDATE",N),t[8]=e,t[9]=d):d=t[9];let u;t[10]!==s||t[11]!==a||t[12]!==d?(u={mutationFn:d,onError:a,onSettled:s},t[10]=s,t[11]=a,t[12]=d,t[13]=u):u=t[13];const f=St(u);let m;t[14]!==e?(m=N=>e.call("TASK_BOARD_SPRINT_START",{id:N}),t[14]=e,t[15]=m):m=t[15];let p;t[16]!==s||t[17]!==a||t[18]!==m?(p={mutationFn:m,onError:a,onSettled:s},t[16]=s,t[17]=a,t[18]=m,t[19]=p):p=t[19];const h=St(p);let j;t[20]!==e?(j=N=>e.call("TASK_BOARD_SPRINT_COMPLETE",N),t[20]=e,t[21]=j):j=t[21];let x;t[22]!==s||t[23]!==a||t[24]!==j?(x={mutationFn:j,onError:a,onSettled:s},t[22]=s,t[23]=a,t[24]=j,t[25]=x):x=t[25];const k=St(x);let b;t[26]!==e?(b=N=>e.call("TASK_BOARD_SPRINT_DELETE",{id:N}),t[26]=e,t[27]=b):b=t[27];let y;t[28]!==s||t[29]!==a||t[30]!==b?(y={mutationFn:b,onError:a,onSettled:s},t[28]=s,t[29]=a,t[30]=b,t[31]=y):y=t[31];const g=St(y);let v;return t[32]!==k||t[33]!==c||t[34]!==g||t[35]!==h||t[36]!==f?(v={create:c,update:f,start:h,complete:k,remove:g},t[32]=k,t[33]=c,t[34]=g,t[35]=h,t[36]=f,t[37]=v):v=t[37],v}const u1=14,f1=/^sprint\s+(\d+)$/i;function pr(t,e){const s=Date.parse(`${t}T00:00:00Z`)+e*864e5;return new Date(s).toISOString().slice(0,10)}function m1(t,e){const s=Math.max(0,...t.map(r=>Number(f1.exec(r.name.trim())?.[1]??0))),l=t.map(r=>r.endDate).filter(r=>r!==null).sort().at(-1),i=l?pr(l,1):e,a=i>e?i:e;return{name:`Sprint ${s>0?s+1:t.length+1}`,startDate:a,endDate:pr(a,u1-1)}}function p1(t=new Date){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const g1=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});function gr(t){return g1.format(new Date(`${t}T00:00:00Z`))}function po(t){const e=t.startDate?gr(t.startDate):null,s=t.endDate?gr(t.endDate):null;return e&&s?`${e} – ${s}`:e??s}function ol(t,e){return t.state==="active"?e("taskBoard.sprints.nameCurrent",{name:t.name}):t.state==="closed"?e("taskBoard.sprints.nameClosed",{name:t.name}):t.name}const ii="__backlog__",h1=[{state:"active",labelKey:"taskBoard.sprints.sectionActive"},{state:"future",labelKey:"taskBoard.sprints.sectionFuture"},{state:"closed",labelKey:"taskBoard.sprints.sectionClosed"}];function x1(t){const e=R.c(20),{sprints:s,value:l,onChange:i}=t,a=X(),[r,o]=W.useState(!1);let c;if(e[0]!==s||e[1]!==l){let p;e[3]!==l?(p=h=>h.id===l,e[3]=l,e[4]=p):p=e[4],c=s.find(p),e[0]=s,e[1]=l,e[2]=c}else c=e[2];const d=c;let u;if(e[5]!==i||e[6]!==d||e[7]!==s||e[8]!==a||e[9]!==l){const p=s.filter(b1),h=s.filter(j1);let j;e[11]!==i||e[12]!==l?(j=(k,b,y)=>n.jsxs(Ne,{onClick:()=>i(b),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:y}),l===b&&n.jsx(Cs,{size:14,className:"shrink-0"})]},k),e[11]=i,e[12]=l,e[13]=j):j=e[13];const x=j;u=s.length===0?n.jsx(Bt,{label:a("taskBoard.sprints.manage"),tooltipSide:"bottom",variant:"outline",onClick:()=>o(!0),children:n.jsx(Wt,{})}):n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm","aria-label":a("taskBoard.sprints.label"),children:[l===Bs?n.jsx(dl,{}):n.jsx(Wt,{}),n.jsx("span",{className:"max-w-[10rem] truncate",children:d?d.name:a(l===Bs?"taskBoard.sprints.backlog":"taskBoard.sprints.all")}),n.jsx(ul,{className:"text-muted-foreground"})]})}),n.jsxs(qe,{align:"end",className:"w-60",children:[p.map(k=>x(k.id,k.id,ol(k,a))),p.length>0&&n.jsx(sl,{}),x(Bs,Bs,a("taskBoard.sprints.backlog")),x("all",null,a("taskBoard.sprints.all")),h.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:a("taskBoard.sprints.sectionClosed")}),n.jsx(Ns,{className:"max-h-72 w-56 overflow-y-auto",children:h.map(k=>x(k.id,k.id,k.name))})]}),n.jsx(sl,{}),n.jsxs(Ne,{onClick:()=>o(!0),children:[n.jsx(qr,{size:14,className:"text-muted-foreground"}),a("taskBoard.sprints.manageItem")]})]})]}),e[5]=i,e[6]=d,e[7]=s,e[8]=a,e[9]=l,e[10]=u}else u=e[10];let f;e[14]!==r||e[15]!==s?(f=r&&n.jsx(k1,{sprints:s,onClose:()=>o(!1)}),e[14]=r,e[15]=s,e[16]=f):f=e[16];let m;return e[17]!==u||e[18]!==f?(m=n.jsxs(n.Fragment,{children:[u,f]}),e[17]=u,e[18]=f,e[19]=m):m=e[19],m}function j1(t){return t.state==="closed"}function b1(t){return t.state!=="closed"}function k1(t){const e=R.c(59),{sprints:s,onClose:l}=t,i=X(),a=d1(),{items:r}=Vr(),[o,c]=W.useState(null),[d,u]=W.useState(null),[f,m]=W.useState(null);let p;e[0]!==r?(p=O=>r.filter(L=>L.sprintId===O),e[0]=r,e[1]=p):p=e[1];const h=p;let j;e[2]!==s?(j=()=>c({id:null,...m1(s,p1())}),e[2]=s,e[3]=j):j=e[3];const x=j;let k;e[4]!==a.create||e[5]!==a.update?(k=O=>{const L={name:O.name.trim(),startDate:O.startDate||null,endDate:O.endDate||null},U={onSuccess:()=>c(null)};O.id===null?a.create.mutate(L,U):a.update.mutate({id:O.id,...L},U)},e[4]=a.create,e[5]=a.update,e[6]=k):k=e[6];const b=k;let y;e[7]!==l?(y=O=>!O&&l(),e[7]=l,e[8]=y):y=e[8];let g;e[9]!==i?(g=i("taskBoard.sprints.title"),e[9]=i,e[10]=g):g=e[10];let v;e[11]!==g?(v=n.jsx(ll,{children:g}),e[11]=g,e[12]=v):v=e[12];let N;e[13]!==i?(N=i("taskBoard.sprints.description"),e[13]=i,e[14]=N):N=e[14];let B;e[15]!==N?(B=n.jsx(Bl,{children:N}),e[15]=N,e[16]=B):B=e[16];let w;e[17]!==v||e[18]!==B?(w=n.jsxs(Sl,{children:[v,B]}),e[17]=v,e[18]=B,e[19]=w):w=e[19];let D;e[20]!==a.create||e[21]!==a.update||e[22]!==o||e[23]!==x||e[24]!==b||e[25]!==i?(D=o?n.jsx(N1,{draft:o,pending:a.create.isPending||a.update.isPending,onChange:c,onCancel:()=>c(null),onSave:b}):n.jsxs(re,{variant:"outline",size:"sm",className:"justify-self-start",onClick:x,children:[n.jsx(is,{size:16}),i("taskBoard.sprints.new")]}),e[20]=a.create,e[21]=a.update,e[22]=o,e[23]=x,e[24]=b,e[25]=i,e[26]=D):D=e[26];let C;e[27]!==s.length||e[28]!==i?(C=s.length===0&&n.jsx("p",{className:"text-sm text-muted-foreground",children:i("taskBoard.sprints.empty")}),e[27]=s.length,e[28]=i,e[29]=C):C=e[29];let S;e[30]!==a.start||e[31]!==h||e[32]!==s||e[33]!==i?(S=h1.map(O=>{const{state:L,labelKey:U}=O,G=s.filter(P=>P.state===L);return G.length===0?null:n.jsxs("section",{className:"flex flex-col gap-1",children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground",children:i(U)}),G.map(P=>n.jsx(v1,{sprint:P,cardCount:h(P.id).length,busy:a.start.isPending&&a.start.variables===P.id,onStart:()=>a.start.mutate(P.id),onComplete:()=>u(P),onEdit:()=>c({id:P.id,name:P.name,startDate:P.startDate??"",endDate:P.endDate??""}),onDelete:()=>m(P)},P.id))]},L)}),e[30]=a.start,e[31]=h,e[32]=s,e[33]=i,e[34]=S):S=e[34];let T;e[35]!==C||e[36]!==S?(T=n.jsxs("div",{className:"flex max-h-[50vh] flex-col gap-4 overflow-y-auto",children:[C,S]}),e[35]=C,e[36]=S,e[37]=T):T=e[37];let _;e[38]!==D||e[39]!==T||e[40]!==w?(_=n.jsxs(al,{className:"max-w-lg",children:[w,D,T]}),e[38]=D,e[39]=T,e[40]=w,e[41]=_):_=e[41];let z;e[42]!==_||e[43]!==y?(z=n.jsx(nl,{open:!0,onOpenChange:y,children:_}),e[42]=_,e[43]=y,e[44]=z):z=e[44];let I;e[45]!==a.complete||e[46]!==h||e[47]!==d||e[48]!==s?(I=d&&n.jsx(S1,{sprint:d,sprints:s,openCards:h(d.id).filter(y1).length,pending:a.complete.isPending,onCancel:()=>u(null),onConfirm:O=>a.complete.mutate({id:d.id,moveOpenTo:O},{onSuccess:()=>u(null)})}),e[45]=a.complete,e[46]=h,e[47]=d,e[48]=s,e[49]=I):I=e[49];let $;e[50]!==a.remove||e[51]!==h||e[52]!==f||e[53]!==i?($=f&&n.jsx(nl,{open:!0,onOpenChange:O=>!O&&m(null),children:n.jsxs(al,{className:"max-w-md",children:[n.jsxs(Sl,{children:[n.jsx(ll,{children:i("taskBoard.sprints.deleteTitle",{name:f.name})}),n.jsx(Bl,{children:i("taskBoard.sprints.deleteDescription",{count:h(f.id).length})})]}),n.jsxs(ki,{children:[n.jsx(re,{variant:"outline",onClick:()=>m(null),children:i("taskBoard.sprints.cancel")}),n.jsxs(re,{variant:"destructive",disabled:a.remove.isPending,onClick:()=>a.remove.mutate(f.id,{onSuccess:()=>m(null)}),children:[a.remove.isPending&&n.jsx(xt,{className:"size-4"}),i("taskBoard.sprints.delete")]})]})]})}),e[50]=a.remove,e[51]=h,e[52]=f,e[53]=i,e[54]=$):$=e[54];let E;return e[55]!==z||e[56]!==I||e[57]!==$?(E=n.jsxs(n.Fragment,{children:[z,I,$]}),e[55]=z,e[56]=I,e[57]=$,e[58]=E):E=e[58],E}function y1(t){return!Nd(t.status)}function v1(t){const e=R.c(61),{sprint:s,cardCount:l,busy:i,onStart:a,onComplete:r,onEdit:o,onDelete:c}=t,d=X();let u;e[0]!==s?(u=po(s),e[0]=s,e[1]=u):u=e[1];const f=u,m=s.state==="active"?"text-foreground":"text-muted-foreground";let p;e[2]!==m?(p=K("shrink-0",m),e[2]=m,e[3]=p):p=e[3];let h;e[4]!==p?(h=n.jsx(Wt,{size:16,className:p}),e[4]=p,e[5]=h):h=e[5];let j;e[6]!==s.name?(j=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.name}),e[6]=s.name,e[7]=j):j=e[7];let x;e[8]!==l||e[9]!==d?(x=d("taskBoard.sprints.cardCount",{count:l}),e[8]=l,e[9]=d,e[10]=x):x=e[10];let k;e[11]!==f||e[12]!==x?(k=[f,x].filter(Boolean),e[11]=f,e[12]=x,e[13]=k):k=e[13];const b=k.join(" · ");let y;e[14]!==b?(y=n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),e[14]=b,e[15]=y):y=e[15];let g;e[16]!==j||e[17]!==y?(g=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[j,y]}),e[16]=j,e[17]=y,e[18]=g):g=e[18];let v;e[19]!==s.state||e[20]!==d?(v=s.state==="active"&&n.jsx(Ka,{variant:"outline",children:d("taskBoard.sprints.running")}),e[19]=s.state,e[20]=d,e[21]=v):v=e[21];let N;e[22]!==i||e[23]!==a||e[24]!==s.state||e[25]!==d?(N=s.state==="future"&&n.jsxs(re,{size:"sm",variant:"outline",disabled:i,onClick:a,children:[i&&n.jsx(xt,{className:"size-4"}),d("taskBoard.sprints.start")]}),e[22]=i,e[23]=a,e[24]=s.state,e[25]=d,e[26]=N):N=e[26];let B;e[27]!==r||e[28]!==s.state||e[29]!==d?(B=s.state==="active"&&n.jsx(re,{size:"sm",variant:"outline",onClick:r,children:d("taskBoard.sprints.complete")}),e[27]=r,e[28]=s.state,e[29]=d,e[30]=B):B=e[30];let w;e[31]!==d?(w=d("taskBoard.sprints.more"),e[31]=d,e[32]=w):w=e[32];let D;e[33]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Ys,{}),e[33]=D):D=e[33];let C;e[34]!==w?(C=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:w,size:"icon-sm",children:D})}),e[34]=w,e[35]=C):C=e[35];let S;e[36]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Fr,{size:14}),e[36]=S):S=e[36];let T;e[37]!==d?(T=d("taskBoard.sprints.edit"),e[37]=d,e[38]=T):T=e[38];let _;e[39]!==o||e[40]!==T?(_=n.jsxs(Ne,{onClick:o,children:[S,T]}),e[39]=o,e[40]=T,e[41]=_):_=e[41];let z;e[42]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(wd,{size:14}),e[42]=z):z=e[42];let I;e[43]!==d?(I=d("taskBoard.sprints.delete"),e[43]=d,e[44]=I):I=e[44];let $;e[45]!==c||e[46]!==I?($=n.jsxs(Ne,{variant:"destructive",onClick:c,children:[z,I]}),e[45]=c,e[46]=I,e[47]=$):$=e[47];let E;e[48]!==_||e[49]!==$?(E=n.jsxs(qe,{align:"end",children:[_,$]}),e[48]=_,e[49]=$,e[50]=E):E=e[50];let O;e[51]!==C||e[52]!==E?(O=n.jsxs(Me,{children:[C,E]}),e[51]=C,e[52]=E,e[53]=O):O=e[53];let L;return e[54]!==g||e[55]!==v||e[56]!==N||e[57]!==B||e[58]!==O||e[59]!==h?(L=n.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-2 py-2 hover:bg-accent",children:[h,g,v,N,B,O]}),e[54]=g,e[55]=v,e[56]=N,e[57]=B,e[58]=O,e[59]=h,e[60]=L):L=e[60],L}function N1(t){const e=R.c(76),{draft:s,pending:l,onChange:i,onCancel:a,onSave:r}=t,o=X(),c=s.startDate!==""&&s.endDate!==""&&s.endDate<s.startDate;let d;e[0]!==c||e[1]!==s.name?(d=s.name.trim()!==""&&!c,e[0]=c,e[1]=s.name,e[2]=d):d=e[2];const u=d;let f;e[3]!==s||e[4]!==r||e[5]!==u?(f=P=>{P.preventDefault(),u&&r(s)},e[3]=s,e[4]=r,e[5]=u,e[6]=f):f=e[6];let m;e[7]!==o?(m=o("taskBoard.sprints.nameLabel"),e[7]=o,e[8]=m):m=e[8];let p;e[9]!==m?(p=n.jsx(Nl,{htmlFor:"sprint-name",children:m}),e[9]=m,e[10]=p):p=e[10];let h;e[11]!==s||e[12]!==i?(h=P=>i({...s,name:P.target.value}),e[11]=s,e[12]=i,e[13]=h):h=e[13];let j;e[14]!==s.name||e[15]!==h?(j=n.jsx(si,{id:"sprint-name",value:s.name,maxLength:Sd,autoFocus:!0,onChange:h}),e[14]=s.name,e[15]=h,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[p,j]}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let k;e[20]!==o?(k=o("taskBoard.sprints.startLabel"),e[20]=o,e[21]=k):k=e[21];let b;e[22]!==k?(b=n.jsx(Nl,{htmlFor:"sprint-start",children:k}),e[22]=k,e[23]=b):b=e[23];let y;e[24]!==s||e[25]!==i?(y=P=>i({...s,startDate:P.target.value}),e[24]=s,e[25]=i,e[26]=y):y=e[26];let g;e[27]!==s.startDate||e[28]!==y?(g=n.jsx(si,{id:"sprint-start",type:"date",value:s.startDate,onChange:y}),e[27]=s.startDate,e[28]=y,e[29]=g):g=e[29];let v;e[30]!==g||e[31]!==b?(v=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[b,g]}),e[30]=g,e[31]=b,e[32]=v):v=e[32];let N;e[33]!==o?(N=o("taskBoard.sprints.endLabel"),e[33]=o,e[34]=N):N=e[34];let B;e[35]!==N?(B=n.jsx(Nl,{htmlFor:"sprint-end",children:N}),e[35]=N,e[36]=B):B=e[36];const w=s.startDate||void 0;let D;e[37]!==s||e[38]!==i?(D=P=>i({...s,endDate:P.target.value}),e[37]=s,e[38]=i,e[39]=D):D=e[39];let C;e[40]!==s.endDate||e[41]!==w||e[42]!==D?(C=n.jsx(si,{id:"sprint-end",type:"date",value:s.endDate,min:w,onChange:D}),e[40]=s.endDate,e[41]=w,e[42]=D,e[43]=C):C=e[43];let S;e[44]!==B||e[45]!==C?(S=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[B,C]}),e[44]=B,e[45]=C,e[46]=S):S=e[46];let T;e[47]!==v||e[48]!==S?(T=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[v,S]}),e[47]=v,e[48]=S,e[49]=T):T=e[49];let _;e[50]!==c||e[51]!==o?(_=c&&n.jsx("p",{className:"text-xs text-destructive",children:o("taskBoard.sprints.endBeforeStart")}),e[50]=c,e[51]=o,e[52]=_):_=e[52];let z;e[53]!==o?(z=o("taskBoard.sprints.cancel"),e[53]=o,e[54]=z):z=e[54];let I;e[55]!==a||e[56]!==z?(I=n.jsx(re,{type:"button",variant:"ghost",size:"sm",onClick:a,children:z}),e[55]=a,e[56]=z,e[57]=I):I=e[57];const $=!u||l;let E;e[58]!==l?(E=l&&n.jsx(xt,{className:"size-4"}),e[58]=l,e[59]=E):E=e[59];let O;e[60]!==s.id||e[61]!==o?(O=s.id===null?o("taskBoard.sprints.create"):o("taskBoard.sprints.save"),e[60]=s.id,e[61]=o,e[62]=O):O=e[62];let L;e[63]!==$||e[64]!==E||e[65]!==O?(L=n.jsxs(re,{type:"submit",size:"sm",disabled:$,children:[E,O]}),e[63]=$,e[64]=E,e[65]=O,e[66]=L):L=e[66];let U;e[67]!==I||e[68]!==L?(U=n.jsxs("div",{className:"flex justify-end gap-2",children:[I,L]}),e[67]=I,e[68]=L,e[69]=U):U=e[69];let G;return e[70]!==T||e[71]!==f||e[72]!==_||e[73]!==U||e[74]!==x?(G=n.jsxs("form",{className:"flex flex-col gap-3 rounded-lg border border-border p-3",onSubmit:f,children:[x,T,_,U]}),e[70]=T,e[71]=f,e[72]=_,e[73]=U,e[74]=x,e[75]=G):G=e[75],G}function S1(t){const e=R.c(49),{sprint:s,sprints:l,openCards:i,pending:a,onCancel:r,onConfirm:o}=t,c=X();let d;e[0]!==s.id?(d=O=>O.id!==s.id&&O.state!=="closed",e[0]=s.id,e[1]=d):d=e[1];const u=l.filter(d);let f;e[2]!==s.id||e[3]!==l?(f=Bd(l,s.id)??ii,e[2]=s.id,e[3]=l,e[4]=f):f=e[4];const[m,p]=W.useState(f),h=nl,j=!0;let x;e[5]!==r?(x=O=>!O&&r(),e[5]=r,e[6]=x):x=e[6];const k=al,b="max-w-md";let y;e[7]!==s.name||e[8]!==c?(y=c("taskBoard.sprints.completeTitle",{name:s.name}),e[7]=s.name,e[8]=c,e[9]=y):y=e[9];let g;e[10]!==y?(g=n.jsx(ll,{children:y}),e[10]=y,e[11]=g):g=e[11];let v;e[12]!==i||e[13]!==c?(v=i===0?c("taskBoard.sprints.completeNothingOpen"):c("taskBoard.sprints.completeDescription",{count:i}),e[12]=i,e[13]=c,e[14]=v):v=e[14];let N;e[15]!==v?(N=n.jsx(Bl,{children:v}),e[15]=v,e[16]=N):N=e[16];let B;e[17]!==g||e[18]!==N?(B=n.jsxs(Sl,{children:[g,N]}),e[17]=g,e[18]=N,e[19]=B):B=e[19];const w=i>0&&n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx(Nl,{children:c("taskBoard.sprints.moveOpenTo")}),n.jsxs(Dd,{value:m,onValueChange:p,children:[n.jsx(Td,{children:n.jsx(_d,{})}),n.jsxs(Id,{children:[u.map(B1),n.jsx(Yr,{value:ii,children:c("taskBoard.sprints.backlog")})]})]})]});let D;e[20]!==c?(D=c("taskBoard.sprints.cancel"),e[20]=c,e[21]=D):D=e[21];let C;e[22]!==r||e[23]!==D?(C=n.jsx(re,{variant:"outline",onClick:r,children:D}),e[22]=r,e[23]=D,e[24]=C):C=e[24];let S;e[25]!==o||e[26]!==m?(S=()=>o(m===ii?null:m),e[25]=o,e[26]=m,e[27]=S):S=e[27];let T;e[28]!==a?(T=a&&n.jsx(xt,{className:"size-4"}),e[28]=a,e[29]=T):T=e[29];let _;e[30]!==c?(_=c("taskBoard.sprints.complete"),e[30]=c,e[31]=_):_=e[31];let z;e[32]!==a||e[33]!==S||e[34]!==T||e[35]!==_?(z=n.jsxs(re,{disabled:a,onClick:S,children:[T,_]}),e[32]=a,e[33]=S,e[34]=T,e[35]=_,e[36]=z):z=e[36];let I;e[37]!==C||e[38]!==z?(I=n.jsxs(ki,{children:[C,z]}),e[37]=C,e[38]=z,e[39]=I):I=e[39];let $;e[40]!==k||e[41]!==B||e[42]!==w||e[43]!==I?($=n.jsxs(k,{className:b,children:[B,w,I]}),e[40]=k,e[41]=B,e[42]=w,e[43]=I,e[44]=$):$=e[44];let E;return e[45]!==h||e[46]!==$||e[47]!==x?(E=n.jsx(h,{open:j,onOpenChange:x,children:$}),e[45]=h,e[46]=$,e[47]=x,e[48]=E):E=e[48],E}function B1(t){return n.jsx(Yr,{value:t.id,children:t.name},t.id)}function go(t){const e=R.c(10),{assigneeId:s,assignee:l,size:i,title:a,className:r}=t,o=i===void 0?20:i;if(!s)return null;let c;e[0]!==l||e[1]!==s||e[2]!==o?(c=s===Ie?n.jsx(ct,{size:o}):l?n.jsx(ot,{url:l.user?.image??void 0,fallback:l.user?.name??"?",shape:"circle",size:"xs"}):null,e[0]=l,e[1]=s,e[2]=o,e[3]=c):c=e[3];const d=c;if(!d)return null;let u;e[4]!==r?(u=K("inline-flex shrink-0",r),e[4]=r,e[5]=u):u=e[5];let f;return e[6]!==d||e[7]!==u||e[8]!==a?(f=n.jsx("span",{className:u,title:a,children:d}),e[6]=d,e[7]=u,e[8]=a,e[9]=f):f=e[9],f}function C1(t){switch(t){case"done":return"done";case"archived":return null;case"triage":case"todo":return"todo";case"in_progress":case"in_review":case"qa":case"customer_approval":case"ready_for_deployment":case"post_deploy_validation":return"active";default:return t}}function Ya(t){const e={done:0,active:0,todo:0,total:0};for(const s of t){const l=C1(s.status);l&&(e[l]+=1,e.total+=1)}return e}function Ki(t){return t.total>0&&t.done===t.total?"done":t.active>0||t.done>0?"in_progress":"todo"}function Wa(t,e){return t.filter(s=>s.parentId===e)}function Qa(t,e){return e.parentId?t.find(s=>s.id===e.parentId):void 0}function ho(t,e){const s=Qa(t,e);return!!s&&!s.isEpic}function w1(t){return t.status==="done"||t.status==="archived"?!1:Ti(t)||Rl(t)==="failed"}function D1(t,e){return t.flatMap(s=>{if(s.isEpic){if(s.status==="archived")return[s];const l=Ki(Ya(Wa(e,s.id)));return[{...s,status:l}]}return ho(e,s)&&!w1(s)?[]:[s]})}const xo=W.createContext(null);function cs(){return W.use(xo)}function T1(t){const e=R.c(3),{value:s,children:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(xo,{value:s,children:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function Ui(t){const e=R.c(12),{progress:s,className:l}=t;let i;e[0]!==s.total?(i=m=>s.total===0?"0%":`${m/s.total*100}%`,e[0]=s.total,e[1]=i):i=e[1];const a=i;let r;e[2]!==l?(r=K("flex h-1.5 w-full overflow-hidden rounded-full bg-muted",l),e[2]=l,e[3]=r):r=e[3];const o=a(s.done);let c;e[4]!==o?(c=n.jsx("div",{className:"bg-success",style:{width:o}}),e[4]=o,e[5]=c):c=e[5];const d=a(s.active);let u;e[6]!==d?(u=n.jsx("div",{className:"bg-chart-1",style:{width:d}}),e[6]=d,e[7]=u):u=e[7];let f;return e[8]!==r||e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:r,children:[c,u]}),e[8]=r,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function _1(t){const e=R.c(9),{item:s}=t,l=cs();if(!l)return null;let i;e[0]!==l.items||e[1]!==s?(i=Qa(l.items,s),e[0]=l.items,e[1]=s,e[2]=i):i=e[2];const a=i;if(!a?.isEpic)return null;let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(It,{size:11,className:"shrink-0 text-chart-1"}),e[3]=r):r=e[3];let o;e[4]!==a.title?(o=n.jsx("span",{className:"truncate",children:a.title}),e[4]=a.title,e[5]=o):o=e[5];let c;return e[6]!==a.title||e[7]!==o?(c=n.jsxs("span",{title:a.title,className:"inline-flex h-5 max-w-40 items-center gap-1 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[r,o]}),e[6]=a.title,e[7]=o,e[8]=c):c=e[8],c}function I1(t){const e=R.c(15),{item:s}=t,l=X(),i=cs();if(!i||!s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const r=a;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(It,{size:11,className:"shrink-0 text-chart-1"}),e[3]=o):o=e[3];let c;e[4]!==l?(c=l("taskBoard.epics.epicBadge"),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r?(d=n.jsx(Ui,{progress:r,className:"w-10"}),e[6]=r,e[7]=d):d=e[7];let u;e[8]!==r.done||e[9]!==r.total?(u=n.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[r.done,"/",r.total]}),e[8]=r.done,e[9]=r.total,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==u?(f=n.jsxs("span",{className:"inline-flex h-5 items-center gap-1.5 rounded-md bg-chart-1/15 px-1.5 text-xs font-medium text-foreground",children:[o,c,d,u]}),e[11]=c,e[12]=d,e[13]=u,e[14]=f):f=e[14],f}function A1(t){const e=R.c(10),{item:s}=t,l=X(),i=cs();if(!i||s.isEpic)return null;let a;e[0]!==i.items||e[1]!==s.id?(a=Ya(Wa(i.items,s.id)),e[0]=i.items,e[1]=s.id,e[2]=a):a=e[2];const r=a;if(r.total===0)return null;let o;e[3]!==l?(o=l("taskBoard.epics.subtasks"),e[3]=l,e[4]=o):o=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(di,{size:11,className:"shrink-0"}),e[5]=c):c=e[5];let d;return e[6]!==r.done||e[7]!==r.total||e[8]!==o?(d=n.jsxs("span",{title:o,className:"inline-flex h-5 items-center gap-1 rounded-md bg-muted px-1.5 text-xs font-medium tabular-nums text-muted-foreground",children:[c,r.done,"/",r.total]}),e[6]=r.done,e[7]=r.total,e[8]=o,e[9]=d):d=e[9],d}function z1(){const t=R.c(14),e=X(),s=cs();if(!s)return null;const l=s.items;let i,a,r;if(t[0]!==s||t[1]!==e){r=Symbol.for("react.early_return_sentinel");e:{const c=l.filter($1);if(c.length===0){let u;t[5]!==e?(u=e("taskBoard.epics.empty"),t[5]=e,t[6]=u):u=t[6];let f;t[7]!==u?(f=n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:u}),t[7]=u,t[8]=f):f=t[8],r=f;break e}i="grid gap-3 md:grid-cols-2";let d;t[9]!==s?(d=u=>n.jsx(R1,{epic:u,workItems:Wa(s.items,u.id),board:s},u.id),t[9]=s,t[10]=d):d=t[10],a=c.map(d)}t[0]=s,t[1]=e,t[2]=i,t[3]=a,t[4]=r}else i=t[2],a=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;let o;return t[11]!==i||t[12]!==a?(o=n.jsx("div",{className:i,children:a}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function $1(t){return t.isEpic}function R1(t){const e=R.c(96),{epic:s,workItems:l,board:i}=t,a=X();let r,o,c,d,u,f,m,p,h,j,x,k,b;if(e[0]!==i||e[1]!==s||e[2]!==a||e[3]!==l){const N=Ya(l),B=Ki(N),w=B==="done";let D;e[17]!==w?(D=jo(w),e[17]=w,e[18]=D):D=e[18];const C=D;let S;e[19]!==l?(S=Hr(l),e[19]=l,e[20]=S):S=e[20];const T=S.length;let _;e[21]!==l?(_=l.filter(Qs),e[21]=l,e[22]=_):_=e[22];const z=_.length,I=N.total===0?0:Math.round(N.done/N.total*100),$=[...new Set(l.flatMap(E1))];b="button",e[23]!==i||e[24]!==s?(o=()=>i.onOpen(s),e[23]=i,e[24]=s,e[25]=o):o=e[25],c="surface flex w-full flex-col gap-4 p-4 text-left transition-colors hover:bg-accent";let E;e[26]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(It,{size:16,className:"mt-0.5 shrink-0 text-chart-1"}),e[26]=E):E=e[26];let O;e[27]!==s.title?(O=n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),e[27]=s.title,e[28]=O):O=e[28];let L;e[29]!==i.orgSlug||e[30]!==s.keySeq?(L=tn(i.orgSlug,s.keySeq),e[29]=i.orgSlug,e[30]=s.keySeq,e[31]=L):L=e[31];const U=N.total===1?a("taskBoard.epics.cardCountOne"):a("taskBoard.epics.cardCountMany",{count:N.total});let G;e[32]!==L||e[33]!==U?(G=n.jsxs("span",{className:"text-xs text-muted-foreground",children:[L," · ",U]}),e[32]=L,e[33]=U,e[34]=G):G=e[34];let P;e[35]!==O||e[36]!==G?(P=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[O,G]}),e[35]=O,e[36]=G,e[37]=P):P=e[37];let Z;e[38]!==B?(Z=n.jsx(hi,{status:B}),e[38]=B,e[39]=Z):Z=e[39];let H;e[40]!==B||e[41]!==a?(H=dt(B,a),e[40]=B,e[41]=a,e[42]=H):H=e[42];let se;e[43]!==C||e[44]!==Z||e[45]!==H.label?(se=n.jsxs("span",{className:C,children:[Z,H.label]}),e[43]=C,e[44]=Z,e[45]=H.label,e[46]=se):se=e[46],e[47]!==P||e[48]!==se?(d=n.jsxs("div",{className:"flex items-start gap-3",children:[E,P,se]}),e[47]=P,e[48]=se,e[49]=d):d=e[49];let V;e[50]!==N?(V=n.jsx(Ui,{progress:N,className:"flex-1"}),e[50]=N,e[51]=V):V=e[51];let ee;e[52]!==I?(ee=n.jsxs("span",{className:"shrink-0 text-xs font-medium tabular-nums text-foreground",children:[I,"%"]}),e[52]=I,e[53]=ee):ee=e[53],e[54]!==V||e[55]!==ee?(u=n.jsxs("div",{className:"flex items-center gap-3",children:[V,ee]}),e[54]=V,e[55]=ee,e[56]=u):u=e[56],h="flex min-h-5 items-center gap-4 text-xs text-muted-foreground";const ie=N.done;let ne;e[57]!==a?(ne=a("taskBoard.epics.segmentDone"),e[57]=a,e[58]=ne):ne=e[58],e[59]!==N||e[60]!==ne?(j=n.jsx(ri,{className:"bg-success",count:ie,children:ne}),e[59]=N,e[60]=ne,e[61]=j):j=e[61];const F=N.active;let q;e[62]!==a?(q=a("taskBoard.epics.segmentActive"),e[62]=a,e[63]=q):q=e[63],e[64]!==N||e[65]!==q?(x=n.jsx(ri,{className:"bg-chart-1",count:F,children:q}),e[64]=N,e[65]=q,e[66]=x):x=e[66];const le=N.todo;let de;e[67]!==a?(de=a("taskBoard.epics.segmentTodo"),e[67]=a,e[68]=de):de=e[68],e[69]!==N||e[70]!==de?(k=n.jsx(ri,{className:"bg-muted-foreground/30",count:le,children:de}),e[69]=N,e[70]=de,e[71]=k):k=e[71],r="ml-auto flex items-center gap-3",e[72]!==z||e[73]!==a?(f=z>0&&n.jsxs("span",{title:a("taskBoard.taskBoard.swimlaneCritical"),className:"inline-flex items-center gap-1 text-destructive",children:[n.jsx(Pr,{size:13}),n.jsx("span",{className:"tabular-nums",children:z})]}),e[72]=z,e[73]=a,e[74]=f):f=e[74],e[75]!==T||e[76]!==a?(m=T>0&&n.jsxs("span",{title:T===1?a("taskBoard.taskBoard.agentsRunningOne"):a("taskBoard.taskBoard.agentsRunningMany",{count:T}),className:"inline-flex items-center gap-1 text-foreground",children:[n.jsx(xt,{className:"size-3"}),n.jsx("span",{className:"tabular-nums",children:T})]}),e[75]=T,e[76]=a,e[77]=m):m=e[77],p=$.length>0&&n.jsx("span",{className:"flex -space-x-1.5",children:$.slice(0,3).map(pe=>n.jsx(go,{assigneeId:pe,assignee:i.memberByUserId.get(pe),size:18,className:"rounded-full ring-2 ring-card"},pe))}),e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=p,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b}else r=e[4],o=e[5],c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],p=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16];let y;e[78]!==r||e[79]!==f||e[80]!==m||e[81]!==p?(y=n.jsxs("span",{className:r,children:[f,m,p]}),e[78]=r,e[79]=f,e[80]=m,e[81]=p,e[82]=y):y=e[82];let g;e[83]!==y||e[84]!==h||e[85]!==j||e[86]!==x||e[87]!==k?(g=n.jsxs("div",{className:h,children:[j,x,k,y]}),e[83]=y,e[84]=h,e[85]=j,e[86]=x,e[87]=k,e[88]=g):g=e[88];let v;return e[89]!==o||e[90]!==c||e[91]!==d||e[92]!==u||e[93]!==g||e[94]!==b?(v=n.jsxs("button",{type:b,onClick:o,className:c,children:[d,u,g]}),e[89]=o,e[90]=c,e[91]=d,e[92]=u,e[93]=g,e[94]=b,e[95]=v):v=e[95],v}function E1(t){return t.assigneeId?[t.assigneeId]:[]}function ri(t){const e=R.c(10),{className:s,count:l,children:i}=t;let a;e[0]!==s?(a=K("size-2 rounded-full",s),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==a?(r=n.jsx("span",{className:a}),e[2]=a,e[3]=r):r=e[3];let o;e[4]!==l?(o=n.jsx("span",{className:"tabular-nums text-foreground",children:l}),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==i||e[7]!==r||e[8]!==o?(c=n.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[r,o,i]}),e[6]=i,e[7]=r,e[8]=o,e[9]=c):c=e[9],c}function hi(t){const e=R.c(10),{status:s}=t;let l,i,a,r;if(e[0]!==s){const c=Dl(s);l=c.icon,i=12,a=!0,r=K("shrink-0",c.iconClassName.replace(/\banimate-\S+\b/g,"").trim()),e[0]=s,e[1]=l,e[2]=i,e[3]=a,e[4]=r}else l=e[1],i=e[2],a=e[3],r=e[4];let o;return e[5]!==l||e[6]!==i||e[7]!==a||e[8]!==r?(o=n.jsx(l,{size:i,"aria-hidden":a,className:r}),e[5]=l,e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],o}function jo(t){return K("inline-flex h-6 shrink-0 items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors",t?"bg-success/15 text-success hover:bg-success/25":"bg-muted text-foreground hover:bg-secondary-hover")}function O1(t){const e=R.c(35),{item:s,buttonClassName:l}=t,i=X(),a=cs();if(!a)return null;const r=s.isEpic;let o;e[0]!==a.items||e[1]!==s?(o=Qa(a.items,s),e[0]=a.items,e[1]=s,e[2]=o):o=e[2];const c=o;let d,u,f,m,p,h;if(e[3]!==a||e[4]!==l||e[5]!==r||e[6]!==s.id||e[7]!==c||e[8]!==i){let k;e[15]!==s.id?(k=v=>v.isEpic&&v.id!==s.id,e[15]=s.id,e[16]=k):k=e[16];const b=a.items.filter(k);u=Me;let y;e[17]!==l?(y=K(l,"max-w-full"),e[17]=l,e[18]=y):y=e[18];let g;e[19]!==r||e[20]!==c||e[21]!==i?(g=r?n.jsxs(n.Fragment,{children:[n.jsx(It,{size:16,className:"shrink-0 text-chart-1"}),i("taskBoard.epics.epicBadge")]}):c?n.jsxs(n.Fragment,{children:[c.isEpic?n.jsx(It,{size:16,className:"shrink-0 text-chart-1"}):n.jsx(di,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 truncate",children:c.title})]}):n.jsxs(n.Fragment,{children:[n.jsx(di,{size:16,className:"shrink-0"}),i("taskBoard.epics.addParent")]}),e[19]=r,e[20]=c,e[21]=i,e[22]=g):g=e[22],e[23]!==y||e[24]!==g?(h=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:y,children:g})}),e[23]=y,e[24]=g,e[25]=h):h=e[25],d=qe,f="start",m="w-64",p=r?n.jsx(Ne,{onSelect:()=>a.setEpic(s.id,!1),children:i("taskBoard.epics.makeCard")}):n.jsxs(n.Fragment,{children:[c&&n.jsx(Ne,{onSelect:()=>a.setParent(s.id,null),children:i("taskBoard.epics.noParent")}),b.map(v=>n.jsxs(Ne,{className:"gap-2",onSelect:()=>a.setParent(s.id,v.id),children:[n.jsx(It,{size:14,className:"shrink-0 text-chart-1"}),n.jsx("span",{className:"truncate",children:v.title})]},v.id)),(c||b.length>0)&&n.jsx(sl,{}),n.jsxs(Ne,{className:"gap-2",onSelect:()=>a.setEpic(s.id,!0),children:[n.jsx(It,{size:14,className:"shrink-0"}),i("taskBoard.epics.makeEpic")]})]}),e[3]=a,e[4]=l,e[5]=r,e[6]=s.id,e[7]=c,e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=p,e[14]=h}else d=e[9],u=e[10],f=e[11],m=e[12],p=e[13],h=e[14];let j;e[26]!==d||e[27]!==f||e[28]!==m||e[29]!==p?(j=n.jsx(d,{align:f,className:m,children:p}),e[26]=d,e[27]=f,e[28]=m,e[29]=p,e[30]=j):j=e[30];let x;return e[31]!==u||e[32]!==h||e[33]!==j?(x=n.jsxs(u,{children:[h,j]}),e[31]=u,e[32]=h,e[33]=j,e[34]=x):x=e[34],x}function L1(t){const e=R.c(44),{item:s}=t,l=X(),i=cs(),[a,r]=W.useState("");if(!i)return null;const o=s.isEpic;if(ho(i.items,s))return null;let c,d,u,f,m;if(e[0]!==i||e[1]!==a||e[2]!==o||e[3]!==s||e[4]!==l){const v=Wa(i.items,s.id),N=Ya(v),B=o?i.items.filter(I=>I.id!==s.id&&!I.isEpic&&!Qa(i.items,I)&&I.status!=="archived"):[];let w;e[10]!==i||e[11]!==a||e[12]!==s?(w=()=>{const I=a.trim();I&&(i.onCreateChild(s,I),r(""))},e[10]=i,e[11]=a,e[12]=s,e[13]=w):w=e[13],c=w,f="flex flex-col gap-3 pb-6";const D=o?"taskBoard.epics.workItems":"taskBoard.epics.subtasks";let C;e[14]!==l||e[15]!==D?(C=l(D),e[14]=l,e[15]=D,e[16]=C):C=e[16];let S;e[17]!==C?(S=n.jsx("span",{className:"text-base font-semibold text-foreground",children:C}),e[17]=C,e[18]=S):S=e[18];const T=N.total>0&&n.jsxs(n.Fragment,{children:[n.jsx(Ui,{progress:N,className:"max-w-40"}),n.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:l("taskBoard.epics.progress",{done:N.done,total:N.total})})]}),_=B.length>0&&n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{size:"sm",variant:"ghost",className:"ml-auto",children:l("taskBoard.epics.addExisting")})}),n.jsx(qe,{align:"end",className:"max-h-80 w-72 overflow-y-auto",children:B.map(I=>n.jsx(Ne,{onSelect:()=>i.setParent(I.id,s.id),children:n.jsx("span",{className:"truncate",children:I.title})},I.id))})]});e[19]!==_||e[20]!==S||e[21]!==T?(m=n.jsxs("div",{className:"flex items-center gap-3",children:[S,T,_]}),e[19]=_,e[20]=S,e[21]=T,e[22]=m):m=e[22],d="surface flex flex-col overflow-hidden";let z;e[23]!==i?(z=I=>n.jsx(bo,{child:I,board:i},I.id),e[23]=i,e[24]=z):z=e[24],u=v.map(z),e[0]=i,e[1]=a,e[2]=o,e[3]=s,e[4]=l,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9];let p;e[25]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(is,{size:15,className:"shrink-0 text-muted-foreground"}),e[25]=p):p=e[25];let h;e[26]===Symbol.for("react.memo_cache_sentinel")?(h=v=>r(v.target.value),e[26]=h):h=e[26];let j;e[27]!==c?(j=v=>{v.key==="Enter"&&c()},e[27]=c,e[28]=j):j=e[28];const x=o?"taskBoard.epics.addWorkItemPlaceholder":"taskBoard.epics.addSubtaskPlaceholder";let k;e[29]!==l||e[30]!==x?(k=l(x),e[29]=l,e[30]=x,e[31]=k):k=e[31];let b;e[32]!==a||e[33]!==j||e[34]!==k?(b=n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[p,n.jsx("input",{value:a,onChange:h,onKeyDown:j,placeholder:k,className:"min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),e[32]=a,e[33]=j,e[34]=k,e[35]=b):b=e[35];let y;e[36]!==d||e[37]!==b||e[38]!==u?(y=n.jsxs("div",{className:d,children:[u,b]}),e[36]=d,e[37]=b,e[38]=u,e[39]=y):y=e[39];let g;return e[40]!==y||e[41]!==f||e[42]!==m?(g=n.jsxs("div",{className:f,children:[m,y]}),e[40]=y,e[41]=f,e[42]=m,e[43]=g):g=e[43],g}const F1=ws.filter(t=>t!=="archived");function bo(t){const e=R.c(63),{child:s,board:l}=t,i=X(),a=At[s.type??Tl],r=a.icon,o=et[s.priority],c=o.icon,d=s.isEpic;let u;e[0]!==l.items||e[1]!==s.id||e[2]!==s.status||e[3]!==d?(u=d?Ki(Ya(Wa(l.items,s.id))):s.status,e[0]=l.items,e[1]=s.id,e[2]=s.status,e[3]=d,e[4]=u):u=e[4];const f=u;let m;e[5]!==f||e[6]!==i?(m=dt(f,i),e[5]=f,e[6]=i,e[7]=m):m=e[7];const p=m,h=f==="done";let j;e[8]!==h?(j=jo(h),e[8]=h,e[9]=j):j=e[9];const x=j;let k;e[10]!==l.memberByUserId||e[11]!==s.assigneeId?(k=s.assigneeId?l.memberByUserId.get(s.assigneeId):void 0,e[10]=l.memberByUserId,e[11]=s.assigneeId,e[12]=k):k=e[12];const b=k;let y;e[13]!==r||e[14]!==d||e[15]!==i||e[16]!==a.iconClassName||e[17]!==a.labelKey?(y=d?n.jsx(It,{size:15,"aria-label":i("taskBoard.epics.epicBadge"),className:"shrink-0 text-chart-1"}):n.jsx(r,{size:15,"aria-label":i(a.labelKey),className:K("shrink-0",a.iconClassName)}),e[13]=r,e[14]=d,e[15]=i,e[16]=a.iconClassName,e[17]=a.labelKey,e[18]=y):y=e[18];let g;e[19]!==l||e[20]!==s?(g=()=>l.onOpen(s),e[19]=l,e[20]=s,e[21]=g):g=e[21];const v=h&&"line-through";let N;e[22]!==v?(N=K("shrink-0 text-sm text-muted-foreground",v),e[22]=v,e[23]=N):N=e[23];let B;e[24]!==l.orgSlug||e[25]!==s.keySeq?(B=tn(l.orgSlug,s.keySeq),e[24]=l.orgSlug,e[25]=s.keySeq,e[26]=B):B=e[26];let w;e[27]!==N||e[28]!==B?(w=n.jsx("span",{className:N,children:B}),e[27]=N,e[28]=B,e[29]=w):w=e[29];let D;e[30]!==s.title?(D=n.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:s.title}),e[30]=s.title,e[31]=D):D=e[31];let C;e[32]!==w||e[33]!==D||e[34]!==g?(C=n.jsxs("button",{type:"button",onClick:g,className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[w,D]}),e[32]=w,e[33]=D,e[34]=g,e[35]=C):C=e[35];let S;e[36]!==l||e[37]!==s.id||e[38]!==x||e[39]!==d||e[40]!==p.label||e[41]!==f||e[42]!==i?(S=n.jsx("div",{className:"flex w-44 shrink-0 justify-start",children:d?n.jsxs("span",{className:x,children:[n.jsx(hi,{status:f}),p.label]}):n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:x,children:[n.jsx(hi,{status:f}),p.label,n.jsx(ul,{size:12,className:"shrink-0"})]})}),n.jsx(qe,{align:"end",className:"w-56",children:F1.map(O=>{const L=dt(O,i),U=L.visual.icon;return n.jsxs(Ne,{className:"gap-2",onSelect:()=>l.onSetStatus(s.id,O),children:[n.jsx(U,{size:14,className:K("shrink-0",L.visual.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),L.label]},O)})})]})}),e[36]=l,e[37]=s.id,e[38]=x,e[39]=d,e[40]=p.label,e[41]=f,e[42]=i,e[43]=S):S=e[43];const T=b?.user?.name??void 0;let _;e[44]!==b||e[45]!==s.assigneeId||e[46]!==T?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(go,{assigneeId:s.assigneeId,assignee:b,title:T})}),e[44]=b,e[45]=s.assigneeId,e[46]=T,e[47]=_):_=e[47];let z;e[48]!==o.labelKey||e[49]!==i?(z=i(o.labelKey),e[48]=o.labelKey,e[49]=i,e[50]=z):z=e[50];let I;e[51]!==o.iconClassName?(I=K("shrink-0",o.iconClassName),e[51]=o.iconClassName,e[52]=I):I=e[52];let $;e[53]!==c||e[54]!==z||e[55]!==I?($=n.jsx(c,{size:15,"aria-label":z,className:I}),e[53]=c,e[54]=z,e[55]=I,e[56]=$):$=e[56];let E;return e[57]!==C||e[58]!==S||e[59]!==_||e[60]!==$||e[61]!==y?(E=n.jsxs("div",{className:"flex min-w-0 items-center gap-3 border-b border-border px-3 py-2 transition-colors last:border-b-0 hover:bg-accent",children:[y,C,S,_,$]}),e[57]=C,e[58]=S,e[59]=_,e[60]=$,e[61]=y,e[62]=E):E=e[62],E}function P1(t){const e=R.c(14),{item:s}=t,l=X(),i=cs();if(!i)return null;let a;e[0]!==i.items||e[1]!==s?(a=Qa(i.items,s),e[0]=i.items,e[1]=s,e[2]=a):a=e[2];const r=a;if(!r)return null;const c=r.isEpic?"taskBoard.epics.epicBadge":"taskBoard.epics.parentTask";let d;e[3]!==l||e[4]!==c?(d=l(c),e[3]=l,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=n.jsx("span",{className:"text-base font-semibold text-foreground",children:d}),e[6]=d,e[7]=u):u=e[7];let f;e[8]!==i||e[9]!==r?(f=n.jsx("div",{className:"surface flex flex-col overflow-hidden",children:n.jsx(bo,{child:r,board:i})}),e[8]=i,e[9]=r,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs("div",{className:"flex flex-col gap-3 pb-6",children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function M1(t){const e=R.c(19),s=X(),l=cs();if(!l||!t)return null;if(t.isEpic){let u;e[0]!==s?(u=s("taskBoard.epics.tab"),e[0]=s,e[1]=u):u=e[1];let f;return e[2]!==l.onShowEpics||e[3]!==u?(f={key:"epics",label:u,onSelect:l.onShowEpics},e[2]=l.onShowEpics,e[3]=u,e[4]=f):f=e[4],f}let i,a,r,o;if(e[5]!==l.items||e[6]!==l.orgSlug||e[7]!==t){o=Symbol.for("react.early_return_sentinel");e:{if(i=Qa(l.items,t),!i){o=null;break e}a="parent",r=tn(l.orgSlug,i.keySeq)??i.title}e[5]=l.items,e[6]=l.orgSlug,e[7]=t,e[8]=i,e[9]=a,e[10]=r,e[11]=o}else i=e[8],a=e[9],r=e[10],o=e[11];if(o!==Symbol.for("react.early_return_sentinel"))return o;let c;e[12]!==l||e[13]!==i?(c=()=>l.onOpen(i),e[12]=l,e[13]=i,e[14]=c):c=e[14];let d;return e[15]!==a||e[16]!==r||e[17]!==c?(d={key:a,label:r,onSelect:c},e[15]=a,e[16]=r,e[17]=c,e[18]=d):d=e[18],d}const K1="claude-subscription";function ko(t){const e=(t??[]).filter(s=>s.costUsd!==null);return e.length===0?null:{total:e.reduce((s,l)=>s+(l.costUsd??0),0),runCount:e.length,onSubscription:e.every(s=>s.costProvider===K1)}}function U1(t,e){const s=t.state==="open"&&!t.merged,l=t.mergeable===!1,i=t.checksStatus!=="failing";return{isOpen:s,hasConflict:l,showShip:e&&s&&i&&!l,showResolveConflict:e&&s&&l}}function yo(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function q1(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(yo).length,total:e.length}}function G1(t){const e=R.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==s||e[1]!==t?(i=Ct.previewProbe(s,t??""),e[0]=s,e[1]=t,e[2]=i):i=e[2];const a=!!t;let r;e[3]!==l||e[4]!==t?(r=()=>l.call("TASK_BOARD_PREVIEW_PROBE",{url:t}),e[3]=l,e[4]=t,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==a||e[8]!==r?(o={queryKey:i,enabled:a,staleTime:0,gcTime:0,retry:!1,queryFn:r},e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],Ga(o)}function V1(t,e){return new URL(e,t).toString()}function H1(t){const e=R.c(46),{url:s,routes:l}=t,i=X(),{data:a,isPending:r,isError:o}=G1(s),c=a?.available??!1;if(r){let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(xt,{className:"size-[14px]"}),e[0]=D):D=e[0];let C;e[1]!==i?(C=i("taskBoard.taskDialog.previewLabel"),e[1]=i,e[2]=C):C=e[2];let S;return e[3]!==C?(S=n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[D,C]}),e[3]=C,e[4]=S):S=e[4],S}if(!c||o){let D;e[5]!==i?(D=i("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=i,e[6]=D):D=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ui,{size:14}),e[7]=C):C=e[7];let S;e[8]!==i?(S=i("taskBoard.taskDialog.previewUnavailable"),e[8]=i,e[9]=S):S=e[9];let T;return e[10]!==D||e[11]!==S?(T=n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:D,children:[C,S]}),e[10]=D,e[11]=S,e[12]=T):T=e[12],T}const d=l.length>0&&"rounded-r-none";let u;e[13]!==d?(u=K("gap-1.5",d),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ui,{size:14}),e[15]=f):f=e[15];let m;e[16]!==i?(m=i("taskBoard.taskDialog.previewLabel"),e[16]=i,e[17]=m):m=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Ma,{size:12}),e[18]=p):p=e[18];let h;e[19]!==m||e[20]!==s?(h=n.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",children:[f,m,p]}),e[19]=m,e[20]=s,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==h?(j=n.jsx(re,{asChild:!0,type:"button",variant:"outline",size:"sm",className:u,children:h}),e[22]=u,e[23]=h,e[24]=j):j=e[24];const x=j;if(l.length===0)return x;let k;e[25]!==i?(k=i("taskBoard.taskDialog.previewRoutesLabel"),e[25]=i,e[26]=k):k=e[26];let b;e[27]!==i?(b=i("taskBoard.taskDialog.previewRoutesLabel"),e[27]=i,e[28]=b):b=e[28];let y;e[29]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ul,{size:14}),e[29]=y):y=e[29];let g;e[30]!==k||e[31]!==b?(g=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":k,title:b,children:y})}),e[30]=k,e[31]=b,e[32]=g):g=e[32];let v;if(e[33]!==l||e[34]!==s){let D;e[36]!==s?(D=C=>n.jsx(Ne,{asChild:!0,children:n.jsx("a",{href:V1(s,C),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:C})},C),e[36]=s,e[37]=D):D=e[37],v=l.map(D),e[33]=l,e[34]=s,e[35]=v}else v=e[35];let N;e[38]!==v?(N=n.jsx(qe,{align:"start",children:v}),e[38]=v,e[39]=N):N=e[39];let B;e[40]!==g||e[41]!==N?(B=n.jsxs(Me,{children:[g,N]}),e[40]=g,e[41]=N,e[42]=B):B=e[42];let w;return e[43]!==x||e[44]!==B?(w=n.jsxs("div",{className:"flex items-center",children:[x,B]}),e[43]=x,e[44]=B,e[45]=w):w=e[45],w}function Y1(t){return typeof t!="string"?"":io(t.replace(/^Error:\s*/,"")).message}function W1(t){return t?.to==="todo"?!0:t?.to==="triage"&&typeof t.retriesSpent=="number"}function Q1(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(!s||s.action!=="status_changed")continue;if(typeof s.data?.retry=="number")return null;const l=s.data?.reason;return typeof l!="string"||!W1(s.data)?null:io(l.replace(/^Error:\s*/,""))}return null}function X1({orgSlug:t,repo:e,repositories:s,returnTo:l}){const i=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(o=>o.path===e)?.accountId:null;if(!a)return{url:`${i}/install?returnTo=${encodeURIComponent(l)}`,ownerOnly:!1,owner:null};const r=e?.includes("/")?e.split("/")[0]:null;return{url:`${i}/accounts/${encodeURIComponent(a)}/manage`,ownerOnly:r!==null,owner:r}}function vo(t){const e=R.c(10),{locator:s}=tt(),l=Qt();let i;e[0]!==t||e[1]!==s?(i=Ct.taskBoardActivity(s,t??""),e[0]=t,e[1]=s,e[2]=i):i=e[2];const a=!!t;let r;e[3]!==t||e[4]!==l?(r=async()=>(await l.call("TASK_BOARD_ACTIVITY_LIST",{taskBoardItemId:t})).activity,e[3]=t,e[4]=l,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==a||e[8]!==r?(o={queryKey:i,enabled:a,queryFn:r},e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],Ga(o)}function Z1(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Js();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_PROMOTE_TO_PRODUCTION",{taskBoardItemId:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function J1(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Js();let a;e[0]!==t||e[1]!==l?(a=async c=>await l.call("TASK_BOARD_RESOLVE_CONFLICT",{id:t,prNumber:c}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardItemPrs(s,t)}),i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function ef(t){const e=R.c(10),{locator:s}=tt(),l=Qt(),i=Js();let a;e[0]!==t||e[1]!==l?(a=async()=>await l.call("TASK_BOARD_RUN_REVIEWER",{id:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==i?(r=()=>{i.invalidateQueries({queryKey:Ct.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=i,e[6]=r):r=e[6];let o;return e[7]!==a||e[8]!==r?(o={mutationFn:a,onSuccess:r},e[7]=a,e[8]=r,e[9]=o):o=e[9],St(o)}function tf(t){return t?Yd:[]}function sf(t,e){if(e.length===0)return null;const s=e.map(a=>t.find(r=>r.reviewer===a)),l=s.filter(a=>a?.verdict==="approved"),i={passed:l.length,total:e.length};return s.some(a=>a?.verdict==="changes_requested")?{...i,tone:"danger"}:l.length===0?{...i,tone:"danger"}:l.length<e.length?{...i,tone:"pending"}:{...i,tone:"ok"}}function nf(t){return t==="ready_for_deployment"}const af=[],lf=[];function No(t,e){const s=R.c(4),l=e===void 0?af:e,i=xu();let a;if(s[0]!==i||s[1]!==l||s[2]!==t){const r=Nu(i);a=co(r,[...t.map(rf),...l]),s[0]=i,s[1]=l,s[2]=t,s[3]=a}else a=s[3];return a}function rf(t){return t.repo}function So(t){return t?.projects.length===1?t.projects[0]:void 0}function of(t){return So(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function ls(t){const e=R.c(6),{entry:s}=t;let l;e[0]!==s?(l=So(s),e[0]=s,e[1]=l):l=e[1];const i=l;if(i){let r;return e[2]!==i.icon||e[3]!==i.title?(r=n.jsx(Cu,{icon:i.icon,name:i.title}),e[2]=i.icon,e[3]=i.title,e[4]=r):r=e[4],r}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Bu,{className:"size-3"})}),e[5]=a):a=e[5],a}function Bo(t){const e=R.c(14),{entry:s}=t;let l;e[0]!==s?(l=of(s),e[0]=s,e[1]=l):l=e[1];const i=l;let a;e[2]!==s?(a=n.jsx(ls,{entry:s}),e[2]=s,e[3]=a):a=e[3];let r;e[4]!==s.title?(r=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=r):r=e[5];let o;e[6]!==i?(o=i&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=o):o=e[7];let c;e[8]!==r||e[9]!==o?(c=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10];let d;return e[11]!==a||e[12]!==c?(d=n.jsxs(n.Fragment,{children:[a,c]}),e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function qi(t){const e=R.c(57),{members:s,onSelect:l}=t,i=X();let a;e[0]!==i?(a=i("taskBoard.taskDialog.assignToPlaceholder"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==i?(r=i("taskBoard.taskDialog.assignToPlaceholder"),e[2]=i,e[3]=r):r=e[3];let o;e[4]!==a||e[5]!==r?(o=n.jsx(Li,{placeholder:a,"aria-label":r,className:"h-9"}),e[4]=a,e[5]=r,e[6]=o):o=e[6];let c;e[7]!==i?(c=i("taskBoard.taskDialog.noMembersFound"),e[7]=i,e[8]=c):c=e[8];let d;e[9]!==c?(d=n.jsx(Fi,{children:c}),e[9]=c,e[10]=d):d=e[10];let u;e[11]!==i?(u=i("taskBoard.taskDialog.superAgentLabel"),e[11]=i,e[12]=u):u=e[12];let f;e[13]!==l?(f=()=>l(Ie),e[13]=l,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(ct,{size:16}),e[15]=m):m=e[15];let p;e[16]!==i?(p=i("taskBoard.taskDialog.superAgentLabel"),e[16]=i,e[17]=p):p=e[17];let h;e[18]!==p?(h=n.jsx("span",{className:"truncate",children:p}),e[18]=p,e[19]=h):h=e[19];let j;e[20]!==h||e[21]!==u||e[22]!==f?(j=n.jsxs(Hs,{value:u,onSelect:f,className:"gap-2",children:[m,h]}),e[20]=h,e[21]=u,e[22]=f,e[23]=j):j=e[23];let x;e[24]!==i?(x=i("taskBoard.taskDialog.unassignedLabel"),e[24]=i,e[25]=x):x=e[25];let k;e[26]!==l?(k=()=>l(null),e[26]=l,e[27]=k):k=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Vs,{size:16,className:"text-muted-foreground"}),e[28]=b):b=e[28];let y;e[29]!==i?(y=i("taskBoard.taskDialog.unassignedLabel"),e[29]=i,e[30]=y):y=e[30];let g;e[31]!==y?(g=n.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=g):g=e[32];let v;e[33]!==x||e[34]!==k||e[35]!==g?(v=n.jsxs(Hs,{value:x,onSelect:k,className:"gap-2",children:[b,g]}),e[33]=x,e[34]=k,e[35]=g,e[36]=v):v=e[36];let N;e[37]!==j||e[38]!==v?(N=n.jsxs(qa,{children:[j,v]}),e[37]=j,e[38]=v,e[39]=N):N=e[39];let B;e[40]!==i?(B=i("taskBoard.taskDialog.membersGroupHeading"),e[40]=i,e[41]=B):B=e[41];let w;if(e[42]!==s||e[43]!==l){let T;e[45]!==l?(T=_=>n.jsxs(Hs,{value:_.user?.name??_.userId,onSelect:()=>l(_.userId),className:"gap-2",children:[n.jsx(ot,{url:_.user?.image??void 0,fallback:_.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:_.user?.name??_.userId})]},_.userId),e[45]=l,e[46]=T):T=e[46],w=s.map(T),e[42]=s,e[43]=l,e[44]=w}else w=e[44];let D;e[47]!==B||e[48]!==w?(D=n.jsx(qa,{heading:B,children:w}),e[47]=B,e[48]=w,e[49]=D):D=e[49];let C;e[50]!==N||e[51]!==D||e[52]!==d?(C=n.jsxs(Pi,{children:[d,N,D]}),e[50]=N,e[51]=D,e[52]=d,e[53]=C):C=e[53];let S;return e[54]!==C||e[55]!==o?(S=n.jsxs(Mi,{children:[o,C]}),e[54]=C,e[55]=o,e[56]=S):S=e[56],S}function Co({tags:t,selectedIds:e,defaultColor:s,onToggle:l,onCreate:i,onDelete:a}){const r=X(),[o,c]=W.useState(""),[d,u]=W.useState(!1),[f,m]=W.useState(s),p=o.trim(),h=t.some(x=>x.name.toLowerCase()===p.toLowerCase()),j=async()=>{if(!(!p||h||d)){u(!0);try{await i(p,f),c("")}finally{u(!1)}}};return n.jsxs(Mi,{children:[n.jsx(Li,{value:o,onValueChange:c,placeholder:r("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":r("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),n.jsxs(Pi,{children:[p&&!h?n.jsx(qa,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("input",{type:"color",value:f,onChange:x=>m(x.target.value),"aria-label":r("taskBoard.taskDialog.pickTagColorAriaLabel"),className:"ml-2 size-4 shrink-0 cursor-pointer appearance-none rounded-full border-0 bg-transparent p-0 [&::-moz-color-swatch]:rounded-full [&::-moz-color-swatch]:border-0 [&::-webkit-color-swatch]:rounded-full [&::-webkit-color-swatch]:border-0 [&::-webkit-color-swatch-wrapper]:p-0"}),n.jsxs(Hs,{value:`create-${p}`,disabled:d,onSelect:j,className:"flex-1 gap-2",children:[n.jsx(is,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:r("taskBoard.taskDialog.createTagOption",{name:p})})]})]})}):n.jsx(Fi,{children:r("taskBoard.taskDialog.noTagsFound")}),n.jsx(qa,{children:t.map(x=>{const k=e.includes(x.id);return n.jsxs(Hs,{value:x.name,onSelect:()=>l(x.id),className:"group gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(x.color)}}),n.jsx("span",{className:"flex-1 truncate",children:x.name}),n.jsx("button",{type:"button","aria-label":r("taskBoard.taskDialog.deleteTagAriaLabel",{name:x.name}),className:"flex size-5 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 hover:bg-background hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100",onClick:b=>{b.stopPropagation(),a(x.id)},children:n.jsx(Si,{size:13})}),k&&n.jsx(Cs,{size:14,className:"shrink-0 text-foreground"})]},x.id)})})]})]})}function cf(t){if(!t)return[];const e=[],s=new Set,l=(r,o)=>{s.has(r)||(s.add(r),e.push({url:r,label:o.trim()||r}))},i=t.replace(/!\[[^\]]*\]\([^)]*\)/g,"");for(const r of i.matchAll(/\[([^\]]*)\]\((https?:\/\/[^)\s]+)[^)]*\)/g))l(r[2]??"",r[1]??"");const a=i.replace(/\[[^\]]*\]\([^)]*\)/g,"");for(const r of a.matchAll(/https?:\/\/[^\s)]+/g)){const o=r[0].replace(/[.,;:!?]+$/,"");o&&l(o,o)}return e}function df(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function uf(t){const e=R.c(5),{title:s}=t;let l;e[0]!==s?(l=n.jsx(Du,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:n.jsx(Tu,{className:"truncate text-sm leading-snug",children:s})}),e[0]=s,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex flex-1 items-center justify-center"}),e[2]=i):i=e[2];let a;return e[3]!==l?(a=n.jsxs(n.Fragment,{children:[l,i]}),e[3]=l,e[4]=a):a=e[4],a}function ff(t){const e=R.c(12),{thread:s}=t,{org:l,locator:i}=tt();let a;e[0]!==l.id||e[1]!==l.slug?(a={connectionId:wc,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=a):a=e[2];const r=zu(a),o=oo(),c=ju(),{data:d}=yi();let u;e[3]!==s?(u=df(s),e[3]=s,e[4]=u):u=e[4];let f;return e[5]!==r||e[6]!==o||e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==c?(f=n.jsx(Au,{thread:u,client:r,locator:i,connections:o,virtualMcps:c,members:d,meta:!1}),e[5]=r,e[6]=o,e[7]=i,e[8]=d,e[9]=u,e[10]=c,e[11]=f):f=e[11],f}function mf(t){const e=R.c(11),{thread:s,onClose:l}=t,i=X(),a=!!s;let r;e[0]!==l?(r=u=>!u&&l(),e[0]=l,e[1]=r):r=e[1];let o;e[2]!==i||e[3]!==s?(o=s&&n.jsx(W.Suspense,{fallback:n.jsx(uf,{title:s.title??i("taskBoard.taskDialog.superAgentDefaultName")}),children:n.jsx(ff,{thread:s})}),e[2]=i,e[3]=s,e[4]=o):o=e[4];let c;e[5]!==o?(c=n.jsx(_u,{"data-testid":"task-thread-sheet",className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:o}),e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==c?(d=n.jsx(Iu,{open:a,onOpenChange:r,children:c}),e[7]=a,e[8]=r,e[9]=c,e[10]=d):d=e[10],d}const pf=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),gf=new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"short"});function wo(t){return e=>{e.target instanceof Element&&e.target.closest("a, button, input, [contenteditable=true]")||window.getSelection()?.toString()||t()}}function Do(t){const e=R.c(65),{id:s,author:l,avatar:i,createdAt:a,body:r,threadId:o,metadata:c,actions:d,onOpenThread:u,onOpen:f,commentId:m,muted:p,editor:h,continuation:j}=t,x=X(),k=W.useContext(dr),b=k?.orgSlug;let y;e[0]!==k?.orgId||e[1]!==b||e[2]!==o?(y=Ct.orgFsList(k?.orgId??b??"","outputs",o??""),e[0]=k?.orgId,e[1]=b,e[2]=o,e[3]=y):y=e[3];let g;e[4]!==r||e[5]!==b||e[6]!==o?(g=!!b&&!!o&&tu(r),e[4]=r,e[5]=b,e[6]=o,e[7]=g):g=e[7];let v;e[8]!==b||e[9]!==o?(v=()=>b&&o?Eu(b,"outputs",o):[],e[8]=b,e[9]=o,e[10]=v):v=e[10];let N;e[11]!==y||e[12]!==g||e[13]!==v?(N={queryKey:y,enabled:g,staleTime:3e4,gcTime:3e5,retry:!1,queryFn:v},e[11]=y,e[12]=g,e[13]=v,e[14]=N):N=e[14];const{data:B}=Ga(N);let w;e[15]!==B?(w=new Set(B?.filter(xf).map(hf)),e[15]=B,e[16]=w):w=e[16];const D=w;let C,S,T,_,z,I,$,E;if(e[17]!==l||e[18]!==i||e[19]!==m||e[20]!==j||e[21]!==a||e[22]!==c||e[23]!==p||e[24]!==f||e[25]!==u||e[26]!==x){const P=new Date(a),Z=gf.format(P);$=m,E="task-message",C=p||void 0,e[35]!==f?(S=f&&wo(f),e[35]=f,e[36]=S):S=e[36];const H=j?"py-1":"py-2.5",se=p&&"opacity-60 hover:opacity-100",V=f&&"cursor-pointer";e[37]!==H||e[38]!==se||e[39]!==V?(T=K("group relative -mx-3 flex min-w-0 gap-3 rounded-lg px-3 transition-colors hover:bg-muted/50",H,se,V),e[37]=H,e[38]=se,e[39]=V,e[40]=T):T=e[40];const ee=j?n.jsx("time",{dateTime:a,title:Z,className:"text-meta whitespace-nowrap pt-0.5 opacity-0 group-hover:opacity-100",children:pf.format(P)}):n.jsx("div",{className:"pt-0.5",children:i});e[41]!==ee?(_=n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:ee}),e[41]=ee,e[42]=_):_=e[42],z="flex min-w-0 flex-1 flex-col gap-0.5",I=(!j||c||u)&&n.jsxs("div",{className:"flex min-h-5 flex-wrap items-center gap-x-2 gap-y-1",children:[!j&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),n.jsx("time",{dateTime:a,title:Z,className:"text-meta",children:Al(P)})]}),p&&n.jsx("span",{className:"text-meta",children:x("taskBoard.conversation.behindTheScenesLabel")}),c,u&&n.jsx(re,{variant:"ghost",size:"xs",className:"ml-auto font-normal text-muted-foreground",onClick:u,children:x("taskBoard.conversation.openChat")})]}),e[17]=l,e[18]=i,e[19]=m,e[20]=j,e[21]=a,e[22]=c,e[23]=p,e[24]=f,e[25]=u,e[26]=x,e[27]=C,e[28]=S,e[29]=T,e[30]=_,e[31]=z,e[32]=I,e[33]=$,e[34]=E}else C=e[27],S=e[28],T=e[29],_=e[30],z=e[31],I=e[32],$=e[33],E=e[34];let O;e[43]!==r||e[44]!==h||e[45]!==k||e[46]!==s||e[47]!==D||e[48]!==o?(O=(h||r)&&n.jsx("div",{className:K("min-w-0 break-words leading-relaxed text-foreground","[&_img]:max-h-80"),children:h??n.jsx(dr.Provider,{value:k?{...k,threadId:o??void 0,outputFiles:D}:null,children:n.jsx(Ri,{id:s,text:r,imageGallery:!0})})}),e[43]=r,e[44]=h,e[45]=k,e[46]=s,e[47]=D,e[48]=o,e[49]=O):O=e[49];let L;e[50]!==O||e[51]!==z||e[52]!==I?(L=n.jsxs("div",{className:z,children:[I,O]}),e[50]=O,e[51]=z,e[52]=I,e[53]=L):L=e[53];let U;e[54]!==d?(U=d&&n.jsx("div",{className:"surface absolute -top-3 right-3 z-10 flex items-center gap-0.5 rounded-lg p-0.5 opacity-0 transition-opacity group-hover:opacity-100 has-[:focus-visible]:opacity-100 has-[[data-state=open]]:opacity-100",children:d}),e[54]=d,e[55]=U):U=e[55];let G;return e[56]!==C||e[57]!==S||e[58]!==T||e[59]!==_||e[60]!==L||e[61]!==U||e[62]!==$||e[63]!==E?(G=n.jsxs("article",{"data-comment-id":$,"data-testid":E,"data-muted":C,onClick:S,className:T,children:[_,L,U]}),e[56]=C,e[57]=S,e[58]=T,e[59]=_,e[60]=L,e[61]=U,e[62]=$,e[63]=E,e[64]=G):G=e[64],G}function hf(t){return t.path.slice(t.path.lastIndexOf("/")+1)}function xf(t){return t.kind==="file"}const jf=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function bf({placeholder:t,onSubmit:e,onEmptyChange:s,onSendingChange:l,onMentionsChange:i,agents:a,autoFocus:r,uploads:o,ref:c,className:d}){const[u]=W.useState(()=>new nu),f=W.useRef(!1),m=Ou({extensions:[Lu.configure({heading:!1,bulletList:!1,orderedList:!1,listItem:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,link:!1,underline:!1}),au,du(u),Mu.configure({placeholder:t}),lu,...o?[iu,ru,ou]:[]],editorProps:{attributes:{role:"textbox","aria-label":t,"aria-multiline":"true",class:K("outline-none text-sm leading-relaxed text-foreground",jf)},handleKeyDown:(h,j)=>j.key!=="Enter"||j.shiftKey||cu.getState(h.state)?.active?!1:(j.preventDefault(),p(),!0),handlePaste:o?.handlePaste,handleDrop:o?.handleDrop},onCreate:({editor:h})=>{r&&h.commands.focus("end")},onUpdate:({editor:h})=>{s(h.isEmpty),i?.(su(h.getMarkdown()))}});async function p(){if(!m||f.current||o?.uploading())return;const h=m.getMarkdown().trim();if(h){f.current=!0,l?.(!0),m.setEditable(!1);try{await e(h)!==!1&&(m.commands.clearContent(),s(!0),i?.([]))}finally{f.current=!1,l?.(!1),m.isDestroyed||m.setEditable(!0)}}}return W.useImperativeHandle(c,()=>({submit:p,focus:()=>m?.commands.focus(),attach:h=>{!m?.isEditable||!o||o.uploadInto(m.view,h,m.state.selection.to)}})),n.jsxs(n.Fragment,{children:[n.jsx(Fu,{editor:m,className:d}),n.jsx(uu,{store:u,agents:a})]})}function kf(){const t=R.c(5),e=X();let s;t[0]!==e?(s=e("taskBoard.taskDialog.superAgentLabel"),t[0]=e,t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ct,{size:24}),t[2]=l):l=t[2];let i;return t[3]!==s?(i=[{id:Ie,name:s,icon:l}],t[3]=s,t[4]=i):i=t[4],i}function yf(t){const e=R.c(42),{thread:s,me:l,onEdit:i,onDelete:a,onReply:r,liveRunElsewhere:o,continuation:c,replying:d,onReplyingChange:u}=t,f=X(),[m,p]=W.useState(!1),h=d??m,j=u??p,x=s.run?.status==="running"||s.run?.status==="waiting",[k,b]=W.useState(!s.run||x||s.replies.length===0);let y;if(e[0]!==c||e[1]!==k||e[2]!==x||e[3]!==o||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==h||e[9]!==j||e[10]!==f||e[11]!==s){const g=s.replies.at(-1),v=s.run?x?"steer":o?"busy":"revive":void 0,N=v==="steer"?"taskBoard.agentThread.replySteer":v==="revive"?"taskBoard.agentThread.replyRevive":"taskBoard.agentThread.reply";let B;e[13]!==f||e[14]!==N?(B=f(N),e[13]=f,e[14]=N,e[15]=B):B=e[15];const w=B;let D;e[16]!==j?(D=()=>{b(!0),j(!0)},e[16]=j,e[17]=D):D=e[17];const C=D,S=k&&!!s.run&&s.replies.length>0&&!x,T=s.run,_=T&&s.author.isAgent?T:void 0,z=T&&!_&&k&&g?.author.isAgent?T:void 0,I=T&&!_&&!z?T:void 0;let $;e[18]!==x?($=V=>n.jsxs(n.Fragment,{children:[n.jsx(hr,{run:V}),x&&V.onStop&&n.jsx(Cf,{onStop:V.onStop})]}),e[18]=x,e[19]=$):$=e[19];const E=$,O=!c&&"pt-2";let L;e[20]!==O?(L=K("flex flex-col",O),e[20]=O,e[21]=L):L=e[21];const U=s.author.isAgent?s.run?.onOpen??s.onOpenThread:void 0;let G;e[22]!==E||e[23]!==_?(G=_&&E(_),e[22]=E,e[23]=_,e[24]=G):G=e[24];const P=r&&C;let Z;e[25]!==l||e[26]!==i||e[27]!==s?(Z=jr(s,l)?V=>i(s.id,V):void 0,e[25]=l,e[26]=i,e[27]=s,e[28]=Z):Z=e[28];let H;e[29]!==l||e[30]!==a||e[31]!==s?(H=xr(s,l)?()=>a(s.id):void 0,e[29]=l,e[30]=a,e[31]=s,e[32]=H):H=e[32];let se;e[33]!==c||e[34]!==w||e[35]!==P||e[36]!==Z||e[37]!==H||e[38]!==U||e[39]!==G||e[40]!==s?(se=n.jsx(br,{comment:s,onOpen:U,continuation:c,metadata:G,onReply:P,replyLabel:w,onEdit:Z,onDelete:H}),e[33]=c,e[34]=w,e[35]=P,e[36]=Z,e[37]=H,e[38]=U,e[39]=G,e[40]=s,e[41]=se):se=e[41],y=n.jsxs("div",{"data-testid":"comment-thread","data-expanded":k,className:L,children:[se,(s.replies.length>0||h||I)&&n.jsxs("div",{className:"ml-11 flex flex-col",children:[!k&&g&&n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:()=>b(!0),className:"focus-ring -mx-1.5 flex min-w-0 items-center gap-2 rounded-lg px-1.5 py-1 text-left text-sm transition-colors hover:bg-muted/50",children:[n.jsx(vf,{replies:s.replies}),n.jsx("span",{className:"shrink-0 font-medium text-foreground",children:s.replies.length===1?f("taskBoard.agentThread.repliesCountOne"):f("taskBoard.agentThread.repliesCount",{count:s.replies.length})}),n.jsxs("span",{className:"min-w-0 truncate text-muted-foreground",children:[g.author.name,": ",wf(g.body)]})]}),I&&!x&&n.jsx(hr,{run:I})]}),k&&s.replies.map((V,ee)=>n.jsx(br,{onOpen:V.author.isAgent?V.onOpenThread??s.run?.onOpen:void 0,comment:z&&V===g?{...V,onOpenThread:void 0}:V,metadata:z&&V===g&&E(z),continuation:To(s.replies[ee-1],V),onEdit:jr(V,l)?ie=>i(V.id,ie):void 0,onDelete:xr(V,l)?()=>a(V.id):void 0,onReply:r&&C,replyLabel:w,isReply:!0},V.id)),I&&(x||k)&&n.jsxs("div",{onClick:I.onOpen&&wo(I.onOpen),className:K("-mx-3 flex min-h-9 items-center gap-3 rounded-lg px-3 py-1 transition-colors",I.onOpen&&"cursor-pointer hover:bg-muted/50"),children:[n.jsx("div",{className:"flex w-8 shrink-0 justify-center",children:n.jsx(ct,{size:24})}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:f("taskBoard.taskDialog.superAgentLabel")}),E(I)]}),r&&h&&n.jsx("div",{className:"mt-1",children:n.jsx(_o,{autoFocus:!0,replyTo:s.run?{id:Ie,name:f("taskBoard.taskDialog.superAgentLabel"),isAgent:!0}:s.author,placeholder:f(s.run?"taskBoard.agentThread.replyToRunPlaceholder":"taskBoard.taskDialog.commentReplyPlaceholder"),route:v,mentionRoute:o?"steer":"start",onCancel:()=>j(!1),onSubmit:async V=>{const ee=await r(V);return ee!==!1&&j(!1),ee}})}),S&&n.jsx("div",{className:"-mx-2 flex",children:n.jsxs(re,{variant:"ghost",size:"xs",onClick:()=>{b(!1),j(!1)},className:"font-normal text-muted-foreground",children:[n.jsx(Cd,{}),f("taskBoard.agentThread.hideReplies")]})})]})]}),e[0]=c,e[1]=k,e[2]=x,e[3]=o,e[4]=l,e[5]=a,e[6]=i,e[7]=r,e[8]=h,e[9]=j,e[10]=f,e[11]=s,e[12]=y}else y=e[12];return y}function vf(t){const e=R.c(4),{replies:s}=t;let l;e[0]!==s?(l=[...new Map(s.map(Sf)).values()].slice(0,3),e[0]=s,e[1]=l):l=e[1];const i=l;let a;return e[2]!==i?(a=n.jsx("span",{className:"flex shrink-0 -space-x-1",children:i.map(Nf)}),e[2]=i,e[3]=a):a=e[3],a}function Nf(t){return n.jsx("span",{className:"flex rounded-full ring-2 ring-background",children:n.jsx(Gi,{author:t,size:"2xs"})},t.id)}function Sf(t){return[t.author.id,t.author]}const Bf=5*6e4;function To(t,e){if(!t||t.replies.length>0||t.run||e.run||t.author.id!==e.author.id||!!t.internal!=!!e.internal)return!1;const s=new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime();return s>=0&&s<Bf}function Cf(t){const e=R.c(12),{onStop:s}=t,l=X(),[i,a]=W.useState(!1);let r;e[0]!==s?(r=async()=>{a(!0);try{await s()}catch{a(!1)}},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==i?(o=i?n.jsx(xt,{size:"2xs"}):n.jsx("span",{"aria-hidden":!0,className:"size-2 rounded-[2px] bg-current"}),e[2]=i,e[3]=o):o=e[3];const c=i?"taskBoard.agentThread.stopping":"taskBoard.agentThread.stop";let d;e[4]!==l||e[5]!==c?(d=l(c),e[4]=l,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==i||e[8]!==r||e[9]!==o||e[10]!==d?(u=n.jsxs(re,{variant:"ghost-destructive",size:"xs",disabled:i,onClick:r,className:"h-5",children:[o,d]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d,e[11]=u):u=e[11],u}function wf(t){return t.replace(/\[@?([^\]]+)\]\([^)]*\)/g,"$1").replace(/[*_`#>]/g,"").replace(/\s+/g," ").trim()}function Df(t){switch(t){case"running":return{variant:"success",hover:"hover:bg-success/15",icon:n.jsx(xt,{size:"2xs"}),label:"taskBoard.agentThread.statusRunning"};case"waiting":return{variant:"warning",hover:"hover:bg-warning/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusWaiting"};case"failed":return{variant:"destructive",hover:"hover:bg-destructive/15",icon:n.jsx(rs,{}),label:"taskBoard.agentThread.statusFailed"};case"stopped":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Xc,{}),label:"taskBoard.agentThread.statusStopped"};case"done":return{variant:"muted",hover:"hover:bg-secondary-hover",icon:n.jsx(Ha,{}),label:"taskBoard.agentThread.statusDone"};default:{const e=t;throw new Error(`Unhandled run status: ${String(e)}`)}}}function hr(t){const e=R.c(4),{run:s}=t,l=X();let i;if(e[0]!==s.onOpen||e[1]!==s.status||e[2]!==l){const{variant:a,hover:r,icon:o,label:c}=Df(s.status);i=s.onOpen?n.jsx(Ka,{variant:a,asChild:!0,className:K("cursor-pointer",r),children:n.jsxs("button",{type:"button",onClick:s.onOpen,"aria-label":l("taskBoard.agentThread.openRun"),children:[o,l(c)]})}):n.jsxs(Ka,{variant:a,children:[o,l(c)]}),e[0]=s.onOpen,e[1]=s.status,e[2]=l,e[3]=i}else i=e[3];return i}function xr(t,e){return t.author.id===e.id||t.author.isAgent===!0}function jr(t,e){return t.author.id===e.id}function br(t){const e=R.c(28),{comment:s,onOpen:l,isReply:i,continuation:a,metadata:r,onReply:o,replyLabel:c,onEdit:d,onDelete:u}=t,f=X(),[m,p]=W.useState(!1),h=i?"xs":"sm";let j;e[0]!==s.author||e[1]!==h?(j=n.jsx(Gi,{author:s.author,size:h}),e[0]=s.author,e[1]=h,e[2]=j):j=e[2];const x=a&&!r,k=m?void 0:l;let b;e[3]!==s.body||e[4]!==m||e[5]!==d?(b=m&&d?n.jsx(Tf,{body:s.body,onSave:d,onClose:()=>p(!1)}):void 0,e[3]=s.body,e[4]=m,e[5]=d,e[6]=b):b=e[6];let y;e[7]!==m||e[8]!==u||e[9]!==d||e[10]!==o||e[11]!==c||e[12]!==f?(y=!m&&(o||d||u)&&n.jsxs(n.Fragment,{children:[o&&n.jsxs(re,{variant:"ghost",size:"sm",title:c,onClick:o,className:"font-normal text-muted-foreground",children:[n.jsx(Qc,{size:16}),f("taskBoard.agentThread.reply")]}),(d||u)&&n.jsx(_f,{onEdit:d&&(()=>p(!0)),onDelete:u})]}),e[7]=m,e[8]=u,e[9]=d,e[10]=o,e[11]=c,e[12]=f,e[13]=y):y=e[13];let g;return e[14]!==s.author.name||e[15]!==s.body||e[16]!==s.createdAt||e[17]!==s.id||e[18]!==s.internal||e[19]!==s.onOpenThread||e[20]!==s.threadId||e[21]!==r||e[22]!==j||e[23]!==x||e[24]!==k||e[25]!==b||e[26]!==y?(g=n.jsx(Do,{id:s.id,commentId:s.id,author:s.author.name,avatar:j,createdAt:s.createdAt,body:s.body,threadId:s.threadId,continuation:x,metadata:r,muted:s.internal,onOpenThread:s.onOpenThread,onOpen:k,editor:b,actions:y}),e[14]=s.author.name,e[15]=s.body,e[16]=s.createdAt,e[17]=s.id,e[18]=s.internal,e[19]=s.onOpenThread,e[20]=s.threadId,e[21]=r,e[22]=j,e[23]=x,e[24]=k,e[25]=b,e[26]=y,e[27]=g):g=e[27],g}function Tf(t){const e=R.c(33),{body:s,onSave:l,onClose:i}=t,a=X(),[r,o]=W.useState(s),[c,d]=W.useState(!1);let u;e[0]!==r?(u=r.trim(),e[0]=r,e[1]=u):u=e[1];const f=u;let m;e[2]!==f||e[3]!==i||e[4]!==l?(m=async()=>{d(!0),await l(f)?i():d(!1)},e[2]=f,e[3]=i,e[4]=l,e[5]=m):m=e[5];const p=m;let h;e[6]!==a?(h=a("taskBoard.taskDialog.commentPlaceholder"),e[6]=a,e[7]=h):h=e[7];let j;e[8]!==s||e[9]!==h?(j=n.jsx(lo,{inline:!0,defaultValue:s,onChange:o,placeholder:h}),e[8]=s,e[9]=h,e[10]=j):j=e[10];let x;e[11]!==a?(x=a("taskBoard.taskDialog.commentEditCancel"),e[11]=a,e[12]=x):x=e[12];let k;e[13]!==i||e[14]!==c||e[15]!==x?(k=n.jsx(re,{variant:"ghost",size:"sm",onClick:i,disabled:c,className:"text-muted-foreground",children:x}),e[13]=i,e[14]=c,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==s||e[18]!==f||e[19]!==c?(b=c||!f||f===s.trim(),e[17]=s,e[18]=f,e[19]=c,e[20]=b):b=e[20];let y;e[21]!==a?(y=a("taskBoard.taskDialog.commentEditSave"),e[21]=a,e[22]=y):y=e[22];let g;e[23]!==p||e[24]!==b||e[25]!==y?(g=n.jsx(re,{size:"sm",onClick:p,disabled:b,children:y}),e[23]=p,e[24]=b,e[25]=y,e[26]=g):g=e[26];let v;e[27]!==k||e[28]!==g?(v=n.jsxs("div",{className:"flex justify-end gap-1",children:[k,g]}),e[27]=k,e[28]=g,e[29]=v):v=e[29];let N;return e[30]!==v||e[31]!==j?(N=n.jsxs("div",{className:"surface flex flex-col gap-1 p-3",children:[j,v]}),e[30]=v,e[31]=j,e[32]=N):N=e[32],N}function _f(t){const e=R.c(20),{onEdit:s,onDelete:l}=t,i=X(),a=W.useRef(!1);let r;e[0]!==i?(r=i("taskBoard.taskDialog.commentActionsAriaLabel"),e[0]=i,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ys,{size:16}),e[2]=o):o=e[2];let c;e[3]!==r?(c=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-sm","aria-label":r,className:"shrink-0 text-muted-foreground",children:o})}),e[3]=r,e[4]=c):c=e[4];let d,u,f;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{a.current=!0},u=()=>{a.current=!0},f=x=>{a.current&&x.preventDefault(),a.current=!1},e[5]=d,e[6]=u,e[7]=f):(d=e[5],u=e[6],f=e[7]);let m;e[8]!==s||e[9]!==i?(m=s&&n.jsxs(Ne,{onSelect:s,children:[n.jsx(Fr,{size:16}),i("taskBoard.taskDialog.commentEdit")]}),e[8]=s,e[9]=i,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==i?(p=l&&n.jsxs(Ne,{variant:"destructive",onSelect:l,children:[n.jsx(Si,{size:16}),i("taskBoard.taskDialog.commentDelete")]}),e[11]=l,e[12]=i,e[13]=p):p=e[13];let h;e[14]!==m||e[15]!==p?(h=n.jsxs(qe,{align:"end",className:"w-48",onPointerDownOutside:d,onPointerUp:u,onCloseAutoFocus:f,children:[m,p]}),e[14]=m,e[15]=p,e[16]=h):h=e[16];let j;return e[17]!==c||e[18]!==h?(j=n.jsxs(Me,{children:[c,h]}),e[17]=c,e[18]=h,e[19]=j):j=e[19],j}function Gi(t){const e=R.c(9),{author:s,size:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={"2xs":16,xs:24,sm:32},e[0]=i):i=e[0];const a=i[l];if(s.isReviewer){let d;return e[1]!==a?(d=n.jsx(fl,{size:a}),e[1]=a,e[2]=d):d=e[2],d}if(s.isAgent){let d;return e[3]!==a?(d=n.jsx(ct,{size:a}),e[3]=a,e[4]=d):d=e[4],d}const r=s.image??void 0,o=s.name??"?";let c;return e[5]!==l||e[6]!==r||e[7]!==o?(c=n.jsx(ot,{url:r,fallback:o,shape:"circle",size:l}),e[5]=l,e[6]=r,e[7]=o,e[8]=c):c=e[8],c}function If(t){const e=R.c(3),{onSubmit:s,agentRoute:l}=t;let i;return e[0]!==l||e[1]!==s?(i=n.jsx(_o,{onSubmit:s,mentionRoute:l}),e[0]=l,e[1]=s,e[2]=i):i=e[2],i}function Af(t){const e=R.c(19),{replyTo:s,route:l}=t,i=X(),a=l==="busy",r=l?"agent-route-note":void 0,o=a?"text-warning":l?"text-success":"text-foreground";let c;e[0]!==o?(c=K("-mx-3 -mt-3 mb-1 flex items-center gap-2 border-b border-border/60 px-3 py-2 text-xs font-medium",o),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&n.jsx(Zc,{size:14,className:"shrink-0 text-muted-foreground"}),e[2]=s,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==s?(u=s?n.jsx(Gi,{author:s,size:"2xs"}):a?n.jsx(rs,{size:14,className:"shrink-0"}):n.jsx(ct,{size:16}),e[4]=a,e[5]=s,e[6]=u):u=e[6];let f;e[7]!==s?.name||e[8]!==l||e[9]!==i?(f=l?i(l==="start"?"taskBoard.agentThread.routeStart":l==="steer"?"taskBoard.agentThread.routeSteer":l==="revive"?"taskBoard.agentThread.routeRevive":"taskBoard.agentThread.routeBusy"):s?.name,e[7]=s?.name,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;e[11]!==f?(m=n.jsx("span",{className:"min-w-0 truncate",children:f}),e[11]=f,e[12]=m):m=e[12];let p;return e[13]!==r||e[14]!==c||e[15]!==d||e[16]!==u||e[17]!==m?(p=n.jsxs("div",{"data-testid":r,className:c,children:[d,u,m]}),e[13]=r,e[14]=c,e[15]=d,e[16]=u,e[17]=m,e[18]=p):p=e[18],p}function yl(t){return t.dataTransfer.types.includes("Files")}function _o(t){const e=R.c(71),{onSubmit:s,replyTo:l,route:i,mentionRoute:a,placeholder:r,autoFocus:o,onCancel:c}=t,d=X(),u=W.useRef(null),f=kf(),[m,p]=W.useState(!1),h=i??(m?a:void 0),[j,x]=W.useState(!0),[k,b]=W.useState(!1),y=fu(),[g,v]=W.useState(!1),N=W.useRef(0);let B;e[0]===Symbol.for("react.memo_cache_sentinel")?(B=()=>u.current?.submit(),e[0]=B):B=e[0];const w=B;let D;e[1]!==r||e[2]!==d?(D=r??d("taskBoard.taskDialog.commentPlaceholder"),e[1]=r,e[2]=d,e[3]=D):D=e[3];let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C=ue=>p(ue.includes(Ie)),e[4]=C):C=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=K("w-full [&_.tiptap]:outline-none","min-h-10","[&_img]:max-h-40"),e[5]=S):S=e[5];let T;e[6]!==f||e[7]!==o||e[8]!==s||e[9]!==D||e[10]!==y?(T=n.jsx(bf,{ref:u,placeholder:D,onSubmit:s,onEmptyChange:x,onSendingChange:b,onMentionsChange:C,agents:f,autoFocus:o,uploads:y,className:S}),e[6]=f,e[7]=o,e[8]=s,e[9]=D,e[10]=y,e[11]=T):T=e[11];const _=T,z=j||y.pending>0||h==="busy";let I;e[12]!==d?(I=d("taskBoard.taskDialog.commentSubmitAriaLabel"),e[12]=d,e[13]=I):I=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx($u,{size:16}),e[14]=$):$=e[14];let E;e[15]!==z||e[16]!==I?(E=n.jsx(re,{variant:"ghost",size:"icon-sm",disabled:z,onClick:w,"aria-label":I,className:"shrink-0 cursor-pointer text-muted-foreground",children:$}),e[15]=z,e[16]=I,e[17]=E):E=e[17];const O=E;let L;e[18]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u.current?.focus(),e[18]=L):L=e[18];const U=L,G=!!h&&h!=="busy",P=G?"opacity-40 dark:opacity-25":"opacity-0";let Z;e[19]!==P?(Z=K("pointer-events-none absolute inset-x-0 top-1/2 -bottom-2 rounded-full bg-gradient-to-r from-brand-purple via-brand to-brand-yellow blur-xl transition-opacity duration-300",P),e[19]=P,e[20]=Z):Z=e[20];let H;e[21]!==Z?(H=n.jsx("div",{"aria-hidden":!0,className:Z}),e[21]=Z,e[22]=H):H=e[22];const se=G?"opacity-100":"opacity-0";let V;e[23]!==se?(V=K("pointer-events-none absolute -inset-px rounded-[calc(var(--studio-surface-radius)+1px)] bg-gradient-to-r from-brand-purple via-brand to-brand-yellow transition-opacity duration-300",se),e[23]=se,e[24]=V):V=e[24];let ee;e[25]!==V?(ee=n.jsx("div",{"aria-hidden":!0,className:V}),e[25]=V,e[26]=ee):ee=e[26];let ie;e[27]===Symbol.for("react.memo_cache_sentinel")?(ie=ue=>{yl(ue)&&(ue.stopPropagation(),N.current=N.current+1,v(!0))},e[27]=ie):ie=e[27];let ne;e[28]!==k?(ne=ue=>{yl(ue)&&(ue.preventDefault(),ue.stopPropagation(),k&&(ue.dataTransfer.dropEffect="none"))},e[28]=k,e[29]=ne):ne=e[29];let F,q,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(F=ue=>{yl(ue)&&(ue.stopPropagation(),N.current=Math.max(0,N.current-1),N.current===0&&v(!1))},q=()=>{N.current=0,v(!1)},le=ue=>{yl(ue)&&(ue.preventDefault(),ue.stopPropagation(),u.current?.attach(Array.from(ue.dataTransfer.files)))},e[30]=F,e[31]=q,e[32]=le):(F=e[30],q=e[31],le=e[32]);const de=h==="busy"&&"outline-1 outline-border";let pe;e[33]!==de?(pe=K("surface relative flex cursor-text flex-col gap-1 transition-shadow","p-3",de),e[33]=de,e[34]=pe):pe=e[34];let Se;e[35]!==h||e[36]!==l?(Se=(l||h)&&n.jsx(Af,{replyTo:l,route:h}),e[35]=h,e[36]=l,e[37]=Se):Se=e[37];let Be;e[38]===Symbol.for("react.memo_cache_sentinel")?(Be=ue=>u.current?.attach(ue),e[38]=Be):Be=e[38];let oe;e[39]!==k?(oe=n.jsx(pu,{onFiles:Be,disabled:k}),e[39]=k,e[40]=oe):oe=e[40];let ge;e[41]!==y.pending?(ge=n.jsx(mu,{pending:y.pending}),e[41]=y.pending,e[42]=ge):ge=e[42];let ye;e[43]!==oe||e[44]!==ge?(ye=n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[oe,ge]}),e[43]=oe,e[44]=ge,e[45]=ye):ye=e[45];let he;e[46]!==c||e[47]!==d?(he=c&&n.jsx(re,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:ue=>{ue.stopPropagation(),c()},children:d("taskBoard.taskDialog.commentEditCancel")}),e[46]=c,e[47]=d,e[48]=he):he=e[48];let ae;e[49]!==O||e[50]!==he?(ae=n.jsxs("div",{className:"flex items-center gap-1",children:[he,O]}),e[49]=O,e[50]=he,e[51]=ae):ae=e[51];let we;e[52]!==ye||e[53]!==ae?(we=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[ye,ae]}),e[52]=ye,e[53]=ae,e[54]=we):we=e[54];let ce;e[55]!==g||e[56]!==k||e[57]!==d?(ce=g&&!k&&n.jsxs("div",{className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center gap-2 rounded-xl border-2 border-dashed border-primary/40 bg-muted text-sm font-medium text-primary/70",children:[n.jsx(Ru,{size:16}),d("taskBoard.taskDialog.commentDropToAttach")]}),e[55]=g,e[56]=k,e[57]=d,e[58]=ce):ce=e[58];let xe;e[59]!==h||e[60]!==ne||e[61]!==pe||e[62]!==Se||e[63]!==we||e[64]!==ce||e[65]!==_?(xe=n.jsxs("div",{"data-testid":"new-comment-composer",onClick:U,onDragEnter:ie,onDragOver:ne,onDragLeave:F,onDropCapture:q,onDrop:le,"data-agent-route":h,className:pe,children:[Se,_,we,ce]}),e[59]=h,e[60]=ne,e[61]=pe,e[62]=Se,e[63]=we,e[64]=ce,e[65]=_,e[66]=xe):xe=e[66];let be;return e[67]!==H||e[68]!==ee||e[69]!==xe?(be=n.jsxs("div",{className:"relative",children:[H,ee,xe]}),e[67]=H,e[68]=ee,e[69]=xe,e[70]=be):be=e[70],be}function zf(t){const e=t.filter(l=>!l.parentId).map(l=>({...l,replies:[]})),s=new Map(e.map(l=>[l.id,l]));for(const l of t)l.parentId&&s.get(l.parentId)?.replies.push(l);return e}function Io(t){return t.filter(e=>e.audience==="human").map(e=>({...e,replies:e.replies.filter(s=>s.audience==="human")}))}function Ao(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Or.taskFeedBehindTheScenes(),t[0]=e):e=t[0],Er(e,!1)}function Vi(t){const e=R.c(43),{locator:s}=tt(),l=Qt(),i=Js();let a;e[0]!==t||e[1]!==s?(a=Ct.taskBoardComments(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const r=a,o=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>zf((await l.call("TASK_BOARD_COMMENT_LIST",{taskBoardItemId:t})).comments),e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d={queryKey:r,enabled:o,queryFn:c},e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==i||e[11]!==r?(f=()=>i.invalidateQueries({queryKey:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12];const m=f;let p;e[13]!==t||e[14]!==l?(p=S=>l.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...S}),e[13]=t,e[14]=l,e[15]=p):p=e[15];let h;e[16]!==m||e[17]!==p?(h={mutationFn:p,onSuccess:m},e[16]=m,e[17]=p,e[18]=h):h=e[18];const j=St(h);let x;e[19]!==l?(x=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[19]=l,e[20]=x):x=e[20];let k;e[21]!==m||e[22]!==x?(k={mutationFn:x,onSuccess:m},e[21]=m,e[22]=x,e[23]=k):k=e[23];const b=St(k);let y;e[24]!==l?(y=S=>l.call("TASK_BOARD_COMMENT_UPDATE",S),e[24]=l,e[25]=y):y=e[25];let g;e[26]!==m||e[27]!==y?(g={mutationFn:y,onSuccess:m},e[26]=m,e[27]=y,e[28]=g):g=e[28];const v=St(g);let N;e[29]!==l?(N=S=>l.call("TASK_BOARD_COMMENT_DELETE",{id:S}),e[29]=l,e[30]=N):N=e[30];let B;e[31]!==m||e[32]!==N?(B={mutationFn:N,onSuccess:m},e[31]=m,e[32]=N,e[33]=B):B=e[33];const w=St(B);let D;e[34]!==u.data?(D=u.data??[],e[34]=u.data,e[35]=D):D=e[35];let C;return e[36]!==b||e[37]!==j||e[38]!==u.isPending||e[39]!==w||e[40]!==v||e[41]!==D?(C={threads:D,isLoading:u.isPending,post:j,edit:b,setResolved:v,remove:w},e[36]=b,e[37]=j,e[38]=u.isPending,e[39]=w,e[40]=v,e[41]=D,e[42]=C):C=e[42],C}function $f(t){const e=R.c(24),{locator:s}=tt(),l=Qt(),i=Js();let a;e[0]!==t||e[1]!==s?(a=Ct.notificationSubscribers(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const r=a,o=!!t;let c;e[3]!==t||e[4]!==l?(c=async()=>(await l.call("NOTIFICATION_SUBSCRIPTION_LIST",{taskBoardItemId:t})).userIds,e[3]=t,e[4]=l,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==o||e[8]!==c?(d={queryKey:r,enabled:o,queryFn:c},e[6]=r,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Ga(d);let f;e[10]!==t||e[11]!==l?(f=k=>l.call("NOTIFICATION_SUBSCRIPTION_SET",{taskBoardItemId:t,subscribed:k}),e[10]=t,e[11]=l,e[12]=f):f=e[12];let m;e[13]!==i||e[14]!==r?(m=()=>i.invalidateQueries({queryKey:r}),e[13]=i,e[14]=r,e[15]=m):m=e[15];let p;e[16]!==f||e[17]!==m?(p={mutationFn:f,onSuccess:m},e[16]=f,e[17]=m,e[18]=p):p=e[18];const h=St(p);let j;e[19]!==u.data?(j=u.data??[],e[19]=u.data,e[20]=j):j=e[20];let x;return e[21]!==h||e[22]!==j?(x={subscriberIds:j,setSubscribed:h},e[21]=h,e[22]=j,e[23]=x):x=e[23],x}const Rf=3;function Ef(t){const e=R.c(30),{itemId:s,members:l}=t,i=X(),{data:a}=vi.useSession(),r=a?.user?.id,{subscriberIds:o,setSubscribed:c}=$f(s);let d;e[0]!==r||e[1]!==o?(d=!!r&&o.includes(r),e[0]=r,e[1]=o,e[2]=d):d=e[2];const u=d;let f;if(e[3]!==l||e[4]!==r||e[5]!==u||e[6]!==o){const N=new Map(l.map(Ff)),B=r?N.get(r):void 0;let w;e[8]!==r?(w=C=>C!==r,e[8]=r,e[9]=w):w=e[9];const D=o.filter(w).map(C=>N.get(C)).filter(Lf);f=[...u&&B?[B]:[],...D],e[3]=l,e[4]=r,e[5]=u,e[6]=o,e[7]=f}else f=e[7];const m=f;let p;e[10]!==m?(p=m.slice(0,Rf),e[10]=m,e[11]=p):p=e[11];const h=p,j=m.length-h.length,x=!s||c.isPending;let k;e[12]!==c||e[13]!==u?(k=()=>c.mutate(!u),e[12]=c,e[13]=u,e[14]=k):k=e[14];let b;e[15]!==u||e[16]!==i?(b=i(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[15]=u,e[16]=i,e[17]=b):b=e[17];let y;e[18]!==x||e[19]!==k||e[20]!==b?(y=n.jsx(re,{type:"button",variant:"ghost",size:"sm",disabled:x,onClick:k,className:"px-2 font-normal text-muted-foreground",children:b}),e[18]=x,e[19]=k,e[20]=b,e[21]=y):y=e[21];let g;e[22]!==j||e[23]!==h||e[24]!==m||e[25]!==i?(g=h.length>0&&n.jsxs("span",{className:"inline-flex items-center",title:m.map(N=>N.user?.name??i("taskBoard.taskDialog.someoneLabel")).join(", "),children:[h.map(Of),j>0&&n.jsxs("span",{className:"-ml-2 inline-flex size-6 items-center justify-center rounded-full bg-muted text-2xs font-medium text-muted-foreground ring-2 ring-background",children:["+",j]})]}),e[22]=j,e[23]=h,e[24]=m,e[25]=i,e[26]=g):g=e[26];let v;return e[27]!==y||e[28]!==g?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[y,g]}),e[27]=y,e[28]=g,e[29]=v):v=e[29],v}function Of(t){return n.jsx(ot,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function Lf(t){return!!t}function Ff(t){return[t.userId,t]}function Pf({item:t,hidden:e,children:s}){const l=X(),i=Ku({initial:!1,resize:"instant"}),a=Vi(t?.id),[r]=Ao(),o=r?a.threads:Io(a.threads),[c,d]=W.useState(null),u=p=>p.flatMap(h=>[h.id,...h.replies.map(j=>j.id)]),f=u(a.threads);!a.isLoading&&(c===null||i.isAtBottom)&&f.join()!==c?.join()&&d(f);const m=c?u(o).filter(p=>!c.includes(p)).length:0;return t?n.jsxs("div",{className:K("relative min-h-0 min-w-0 flex-1 flex-col",e?"hidden lg:flex":"flex"),children:[n.jsx("div",{"data-testid":"task-conversation-scroll",ref:i.scrollRef,className:"min-h-0 flex-1 overflow-y-auto",children:n.jsx("div",{ref:i.contentRef,children:s})}),t&&n.jsxs("div",{className:"relative shrink-0 border-t border-border bg-background px-5 pb-4 pt-3 sm:px-8",children:[!i.isAtBottom&&n.jsx("div",{className:"absolute inset-x-0 bottom-full flex justify-center pb-3 pointer-events-none",children:n.jsx(re,{variant:"secondary",size:"sm",className:"pointer-events-auto shadow-soft",onClick:()=>{i.scrollToBottom()},children:m?l("taskBoard.conversation.newReplies",{count:m}):l("taskBoard.conversation.jumpToLatest")})}),n.jsx(If,{agentRoute:t.threads.some(p=>_i(p)&&(p.status==="in_progress"||p.status==="requires_action"))?"steer":"start",onSubmit:async p=>{try{return await a.post.mutateAsync({body:p}),i.scrollToBottom(),!0}catch(h){return Qe.error(h instanceof Error?h.message:l("taskBoard.conversation.sendFailed")),!1}}})]})]}):n.jsx("div",{className:"min-w-0 sm:flex-1",children:s})}function Hi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function zo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const kr=560,Mf=2e3,$o=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Yt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent sm:border-transparent",yr=4,vr=1,La="opacity-50";function Nr(t){const e=R.c(12),{icon:s,label:l,hint:i,selected:a,onSelect:r}=t;let o;e[0]!==l?(o=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==i?(c=i&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=c):c=e[3];let d;e[4]!==a?(d=a&&n.jsx(Cs,{size:14,className:"shrink-0"}),e[4]=a,e[5]=d):d=e[5];let u;return e[6]!==s||e[7]!==r||e[8]!==o||e[9]!==c||e[10]!==d?(u=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground hover:bg-accent",onClick:r,children:[s,o,c,d]}),e[6]=s,e[7]=r,e[8]=o,e[9]=c,e[10]=d,e[11]=u):u=e[11],u}function Kf(t){const e=R.c(22),{threads:s}=t,l=X();let i,a,r,o,c,d;if(e[0]!==l||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const m=ko(s);if(!m){d=null;break e}const{total:p,runCount:h,onSubscription:j}=m,x=h===1,k=j?x?"taskBoard.taskDialog.costTooltipSubscriptionSingular":"taskBoard.taskDialog.costTooltipSubscriptionPlural":x?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural";e[8]===Symbol.for("react.memo_cache_sentinel")?(r=K(Yt,"cursor-default hover:bg-transparent"),e[8]=r):r=e[8];const b=String(h);e[9]!==l||e[10]!==b||e[11]!==k?(o=l(k,{runs:b}),e[9]=l,e[10]=b,e[11]=k,e[12]=o):o=e[12],e[13]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(md,{size:16,className:"shrink-0 text-muted-foreground"}),e[13]=c):c=e[13],i="tabular-nums",a=l("taskBoard.taskDialog.costEstimatePrefix",{amount:p.toLocaleString(void 0,{style:"currency",currency:"USD"})})}e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=r,e[5]=o,e[6]=c,e[7]=d}else i=e[2],a=e[3],r=e[4],o=e[5],c=e[6],d=e[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;let u;e[14]!==i||e[15]!==a?(u=n.jsx("span",{className:i,children:a}),e[14]=i,e[15]=a,e[16]=u):u=e[16];let f;return e[17]!==r||e[18]!==o||e[19]!==c||e[20]!==u?(f=n.jsxs("div",{className:r,title:o,children:[c,u]}),e[17]=r,e[18]=o,e[19]=c,e[20]=u,e[21]=f):f=e[21],f}function tl(t){const e=R.c(7),{label:s,children:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"px-3 text-sm font-medium text-muted-foreground opacity-[0.74]",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("div",{className:"flex flex-wrap gap-2 sm:flex-col sm:items-start sm:gap-1",children:l}),e[2]=l,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs("div",{className:"flex flex-col gap-2",children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}function Uf(t){const e=R.c(7),{item:s}=t,l=X(),{data:i}=Ei(s.id);if(!i||i.length===0)return null;let a;e[0]!==l?(a=l("taskBoard.taskDialog.reviewsLabel"),e[0]=l,e[1]=a):a=e[1];let r;e[2]!==i?(r=i.map(qf),e[2]=i,e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==r?(o=n.jsx(tl,{label:a,children:r}),e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function qf(t){return n.jsx(re,{asChild:!0,variant:"ghost",className:"h-9 w-full justify-start gap-2 px-3 font-medium",children:n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",title:t.title?`#${t.number} ${t.title}`:t.url,children:[n.jsx(el,{size:16,className:"shrink-0"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t.title??`#${t.number}`})]})},t.url)}function Gf(t){const e=R.c(11),{label:s,action:l,children:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ul,{size:14,className:"shrink-0 transition-transform group-data-[state=closed]:-rotate-90"}),e[0]=a):a=e[0];let r;e[1]!==s?(r=n.jsxs(Zd,{className:"group flex w-fit items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[s,a]}),e[1]=s,e[2]=r):r=e[2];let o;e[3]!==l||e[4]!==r?(o=n.jsxs("div",{className:"flex min-h-7 items-center justify-between gap-2",children:[r,l]}),e[3]=l,e[4]=r,e[5]=o):o=e[5];let c;e[6]!==i?(c=n.jsx(Jd,{className:"-mx-2 -mb-2",children:n.jsx("div",{className:"px-2 pb-2",children:i})}),e[6]=i,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=n.jsxs(eu,{defaultOpen:!0,className:"flex flex-col gap-2",children:[o,c]}),e[8]=o,e[9]=c,e[10]=d):d=e[10],d}function Ro(t){const e=R.c(452),{chrome:s,open:l,onClose:i,item:a,defaultStatus:r,defaultProject:o,defaultSprintId:c,onSetSprint:d,onSubmit:u,onDelete:f,onClone:m,onArchive:p,onOpenPreview:h,onNewChat:j,onAutoFix:x,onRerun:k,isSaving:b}=t,y=l===void 0?!0:l,g=X(),{org:v}=tt();let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N={strict:!1},e[0]=N):N=e[0];const{agentId:B}=cl(N),{data:w}=yi();let D;e[1]!==w?.data?.members?(D=w?.data?.members??[],e[1]=w?.data?.members,e[2]=D):D=e[2];const C=D,{handleCopy:S,copied:T}=li(),{handleCopy:_,copied:z}=li(),{handleCopy:I,copied:$}=li(),{data:E}=El();let O;e[3]!==E?(O=E===void 0?[]:E,e[3]=E,e[4]=O):O=e[4];const L=O,U=so(),G=no();let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={slug:"mcp-github"},e[5]=P):P=e[5];const Z=oo(P);let H;e[6]!==Z?(H=wu(Z),e[6]=Z,e[7]=H):H=e[7];const V=No(lf,H),ee=uo(V),ie=a?.title??"",ne=a?.description??"",F=a?.status??r??ws[0],q=a?.priority??"medium",le=a?.type??Tl,de=a?.assigneeId??null,pe=a?a.repo:o?.repo??null,Se=a?a.virtualMcpId:o?.virtualMcpId??null,Be=a?.dueDate;let oe;e[8]!==Be?(oe=zo(Be),e[8]=Be,e[9]=oe):oe=e[9];let ge;e[10]!==a?.tags?(ge=a?.tags.map(Jf)??[],e[10]=a?.tags,e[11]=ge):ge=e[11];const ye=c??null;let he;e[12]!==ne||e[13]!==F||e[14]!==q||e[15]!==le||e[16]!==de||e[17]!==pe||e[18]!==Se||e[19]!==oe||e[20]!==ge||e[21]!==ye||e[22]!==ie?(he={title:ie,description:ne,status:F,priority:q,type:le,assigneeId:de,repo:pe,virtualMcpId:Se,dueDate:oe,tagIds:ge,sprintId:ye},e[12]=ne,e[13]=F,e[14]=q,e[15]=le,e[16]=de,e[17]=pe,e[18]=Se,e[19]=oe,e[20]=ge,e[21]=ye,e[22]=ie,e[23]=he):he=e[23];const[ae,we]=W.useState(he),{title:ce,description:xe,status:be,priority:ue,assigneeId:ze,repo:Q,virtualMcpId:fe,dueDate:Oe}=ae;let Ge;e[24]!==V||e[25]!==Q||e[26]!==fe?(Ge=(fe?Ua(fe,V):void 0)??(Q?Ua(Q,V):void 0),e[24]=V,e[25]=Q,e[26]=fe,e[27]=Ge):Ge=e[27];const Ue=Ge,Y=ae.type,te=ae.tagIds,[me,Ce]=W.useState(!1),[ke,Fe]=W.useState(!a),[st,nt]=W.useState(!1),[De,Ve]=W.useState(!1),$e=De&&!me;let Ze;e[28]===Symbol.for("react.memo_cache_sentinel")?(Ze=M=>{if(!M)return;const Ae=()=>Ve(M.scrollHeight>kr);Ae();const We=new ResizeObserver(Ae);return We.observe(M),()=>We.disconnect()},e[28]=Ze):Ze=e[28];const wt=Ze,[at,ut]=W.useState(!1),[Te,He]=W.useState(!1),Le=Ll(),Ye=a?a.sprintId:ae.sprintId;let Xt;e[29]!==Ye?(Xt=M=>M.id===Ye,e[29]=Ye,e[30]=Xt):Xt=e[30];const jt=Le.find(Xt),Zt=Le.filter(Zf),bt=M=>{He(!1),a?d?.(M):je({sprintId:M})},[Jt,it]=W.useState(!1),[Dt,ve]=W.useState(!1),[zt,rt]=W.useState(null);let kt;e[31]!==a?.threads||e[32]!==zt?(kt=a?.threads.find(M=>M.threadId===zt)??null,e[31]=a?.threads,e[32]=zt,e[33]=kt):kt=e[33];const gt=kt,yt=W.useRef(ae),ft=W.useRef(null),Re=W.useRef(u);let _e;e[34]!==a?(_e=()=>{ft.current=null;const M=yt.current;M.title.trim()&&Re.current({title:M.title.trim(),description:M.description.trim()||null,status:M.status,priority:M.priority,type:M.type,assigneeId:M.assigneeId,repo:M.repo,virtualMcpId:M.virtualMcpId,dueDate:M.dueDate?Hi(M.dueDate):null,tagIds:M.tagIds,...a?{}:{sprintId:M.sprintId}})},e[34]=a,e[35]=_e):_e=e[35];const mt=_e,je=(M,Ae)=>{const We=Ae===void 0?!1:Ae,Et={...yt.current,...M};yt.current=Et,Re.current=u,we(Et),a&&(ft.current&&clearTimeout(ft.current),We?ft.current=setTimeout(mt,Mf):mt())};let Tt;e[36]!==mt?(Tt=()=>{ft.current&&(clearTimeout(ft.current),mt())},e[36]=mt,e[37]=Tt):Tt=e[37];const Pe=Tt;let pt;e[38]===Symbol.for("react.memo_cache_sentinel")?(pt=()=>{ft.current&&(clearTimeout(ft.current),ft.current=null)},e[38]=pt):pt=e[38];const Ot=pt;let vt;e[39]!==Pe||e[40]!==i?(vt=()=>{Pe(),i()},e[39]=Pe,e[40]=i,e[41]=vt):vt=e[41];const Nt=vt;let ds;e[42]!==Pe?(ds=M=>{if(M)return()=>Pe()},e[42]=Pe,e[43]=ds):ds=e[43];const es=ds;let us;e[44]!==Nt?(us=M=>{if(!M)return;const Ae=We=>{if(We.key!=="Escape"||We.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Et=We.target;if(Et instanceof HTMLElement&&(Et.isContentEditable||Et instanceof HTMLInputElement||Et instanceof HTMLTextAreaElement)){Et.blur();return}Nt()};return document.addEventListener("keydown",Ae),()=>document.removeEventListener("keydown",Ae)},e[44]=Nt,e[45]=us):us=e[45];const $t=us;let fs;e[46]!==U||e[47]!==je?(fs=async(M,Ae)=>{const We=await U.mutateAsync({name:M,color:Ae});je({tagIds:[...yt.current.tagIds,We.id]})},e[46]=U,e[47]=je,e[48]=fs):fs=e[48];const _s=fs;let ms;e[49]!==G||e[50]!==je?(ms=M=>{G.mutate(M),je({tagIds:yt.current.tagIds.filter(Ae=>Ae!==M)})},e[49]=G,e[50]=je,e[51]=ms):ms=e[51];const Is=ms,_t=ze===Ie,nn=a&&x&&(be==="triage"||be==="todo")&&!_t,an=a&&k&&a.assigneeId===Ie;let ps;e[52]!==a||e[53]!==v?(ps=a?tn(v.slug,a.keySeq):null,e[52]=a,e[53]=v,e[54]=ps):ps=e[54];const ht=ps;let gs;if(e[55]!==ze||e[56]!==C){let M;e[58]!==ze?(M=Ae=>Ae.userId===ze,e[58]=ze,e[59]=M):M=e[59],gs=C.find(M),e[55]=ze,e[56]=C,e[57]=gs}else gs=e[57];const Lt=gs;let As;e[60]!==a||e[61]!==C?(As=a?.assignedBy?C.find(M=>M.userId===a.assignedBy):void 0,e[60]=a,e[61]=C,e[62]=As):As=e[62];const lt=As;let Ft;e[63]!==a||e[64]!==C?(Ft=a?C.find(M=>M.userId===a.createdBy):void 0,e[63]=a,e[64]=C,e[65]=Ft):Ft=e[65];const Je=Ft;let hs;e[66]!==a?.tags||e[67]!==g?(hs=a?.tags.some(Xf)?g("taskBoard.taskDialog.createdByFeedbackLabel"):g("taskBoard.taskDialog.createdBySystemLabel"),e[66]=a?.tags,e[67]=g,e[68]=hs):hs=e[68];const Pt=hs;let xs;e[69]!==be?(xs=Dl(be),e[69]=be,e[70]=xs):xs=e[70];const zs=xs.icon;let Mt;e[71]!==st||e[72]!==a||e[73]!==g?(Mt=a&&n.jsx(re,{variant:"ghost",size:"sm",className:"lg:hidden",onClick:()=>nt(Qf),"aria-expanded":st,children:g("taskBoard.conversation.details")}),e[71]=st,e[72]=a,e[73]=g,e[74]=Mt):Mt=e[74];let $s;e[75]!==b||e[76]!==a||e[77]!==g?($s=a&&b&&n.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:g("taskBoard.taskDialog.savingLabel")}),e[75]=b,e[76]=a,e[77]=g,e[78]=$s):$s=e[78];let js;e[79]!==a||e[80]!==g?(js=a?.externalUrl&&n.jsx(Bt,{asChild:!0,variant:"secondary",label:g("taskBoard.taskDialog.openInTrackerAriaLabel"),children:n.jsx("a",{href:a.externalUrl,target:"_blank",rel:"noreferrer",children:n.jsx(Ma,{size:16})})}),e[79]=a,e[80]=g,e[81]=js):js=e[81];let Kt;e[82]!==B||e[83]!==T||e[84]!==_||e[85]!==xe||e[86]!==S||e[87]!==a||e[88]!==z||e[89]!==p||e[90]!==x||e[91]!==m||e[92]!==f||e[93]!==j||e[94]!==k||e[95]!==v||e[96]!==nn||e[97]!==an||e[98]!==be||e[99]!==g?(Kt=a&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{variant:"secondary",label:g("taskBoard.taskDialog.shareAriaLabel"),onClick:()=>{_(`${window.location.origin}${Wr(v.slug,a,B)}`),Qe.success(g("taskBoard.taskDialog.linkCopied"))},children:z?n.jsx(Cs,{size:16}):n.jsx(Jc,{size:16})}),n.jsxs(Me,{modal:!1,children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"secondary",size:"icon-sm","aria-label":g("taskBoard.taskDialog.moreActionsAriaLabel"),children:n.jsx(Ys,{size:16})})}),n.jsxs(qe,{align:"end",className:"w-48",children:[j&&n.jsxs(Ne,{onSelect:j,children:[n.jsx(Mr,{size:16}),g("taskBoard.taskDialog.newChatButton")]}),nn&&n.jsxs(Ne,{onSelect:x,children:[n.jsx(It,{size:16}),g("taskBoard.taskBoard.autoFix")]}),an&&n.jsxs(Ne,{onSelect:k,children:[n.jsx(zl,{size:16}),g("taskBoard.taskBoard.rerun")]}),(j||nn||an)&&n.jsx(sl,{}),xe&&n.jsxs(Ne,{onSelect:()=>S(xe),children:[T?n.jsx(Cs,{size:16}):n.jsx(ed,{size:16}),g("taskBoard.taskDialog.copyDescription")]}),m&&n.jsxs(Ne,{onSelect:m,children:[n.jsx(td,{size:16}),g("taskBoard.taskDialog.cloneTask")]}),p&&be!=="archived"&&n.jsxs(Ne,{onSelect:()=>{Ot(),p()},children:[n.jsx(Dc,{size:16}),g("taskBoard.taskDialog.archiveTask")]}),f&&n.jsxs(Ne,{variant:"destructive",onSelect:()=>{Ot(),f()},children:[n.jsx(Si,{size:16}),g("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[82]=B,e[83]=T,e[84]=_,e[85]=xe,e[86]=S,e[87]=a,e[88]=z,e[89]=p,e[90]=x,e[91]=m,e[92]=f,e[93]=j,e[94]=k,e[95]=v,e[96]=nn,e[97]=an,e[98]=be,e[99]=g,e[100]=Kt):Kt=e[100];let Ut;e[101]!==s||e[102]!==Nt||e[103]!==g?(Ut=s==="dialog"&&n.jsx(Bt,{variant:"secondary",label:g("taskBoard.taskDialog.closeAriaLabel"),onClick:Nt,children:n.jsx(il,{size:16})}),e[101]=s,e[102]=Nt,e[103]=g,e[104]=Ut):Ut=e[104];let ln;e[105]!==Mt||e[106]!==$s||e[107]!==js||e[108]!==Kt||e[109]!==Ut?(ln=n.jsxs("div",{className:"flex items-center gap-2",children:[Mt,$s,js,Kt,Ut]}),e[105]=Mt,e[106]=$s,e[107]=js,e[108]=Kt,e[109]=Ut,e[110]=ln):ln=e[110];const Rs=ln,Es=M1(a);let qt;e[111]!==Rs||e[112]!==s||e[113]!==Nt||e[114]!==I||e[115]!==Es||e[116]!==$||e[117]!==ht||e[118]!==g?(qt=s==="page"?n.jsxs(n.Fragment,{children:[n.jsx(Ss.Breadcrumbs,{after:"page",parent:{label:g("taskBoard.taskDetail.breadcrumbTasks"),onSelect:Nt},items:[...Es?[Es]:[],{key:"task",label:ht??g("taskBoard.taskDetail.breadcrumbTask")}]}),n.jsx(Ss.Actions,{children:Rs})]}):n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[ht?n.jsxs(re,{variant:"ghost",size:"sm",title:ht,"aria-label":g("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-base text-muted-foreground hover:text-foreground",onClick:()=>{I(ht),Qe.success(g("taskBoard.taskDialog.idCopied"))},children:[$?n.jsx(Cs,{size:16}):n.jsx(lr,{size:16}),ht]}):n.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-base text-muted-foreground opacity-50",children:[n.jsx(lr,{size:16}),"–"]}),Rs]}),e[111]=Rs,e[112]=s,e[113]=Nt,e[114]=I,e[115]=Es,e[116]=$,e[117]=ht,e[118]=g,e[119]=qt):qt=e[119];const bs=qt;let Gt;e[120]!==s||e[121]!==bs?(Gt=s==="page"?n.jsx("div",{className:K("mx-auto w-full","max-w-[1280px]"),children:bs}):bs,e[120]=s,e[121]=bs,e[122]=Gt):Gt=e[122];const Os=a?"overflow-hidden":"overflow-y-auto";let Vt;e[123]!==Os?(Vt=K("flex min-h-0 flex-1 flex-col",Os),e[123]=Os,e[124]=Vt):Vt=e[124];const Ls=s==="page"&&"mx-auto w-full",Xa=s==="page"&&"max-w-[1280px]";let A;e[125]!==Ls||e[126]!==Xa?(A=K("flex flex-col","min-h-0 flex-1 lg:flex-row",Ls,Xa),e[125]=Ls,e[126]=Xa,e[127]=A):A=e[127];const J=!!a&&st;let Ee;e[128]!==Je?.user?.image||e[129]!==Je?.user?.name||e[130]!==ke||e[131]!==Pe||e[132]!==a||e[133]!==Pt||e[134]!==g?(Ee=a&&n.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm text-muted-foreground",children:[n.jsx(ot,{url:Je?.user?.image??void 0,fallback:Je?.user?.name??"?",shape:"circle",size:"xs"}),n.jsx("span",{className:"font-medium text-foreground",children:or(a)?Pt:Je?.user?.name??g("taskBoard.taskDialog.unknownCreatorLabel")}),n.jsx("time",{dateTime:a.createdAt,children:Al(new Date(a.createdAt))}),n.jsx(re,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>{Pe(),Fe(Wf)},children:g(ke?"taskBoard.conversation.doneEditing":"taskBoard.conversation.edit")})]}),e[128]=Je?.user?.image,e[129]=Je?.user?.name,e[130]=ke,e[131]=Pe,e[132]=a,e[133]=Pt,e[134]=g,e[135]=Ee):Ee=e[135];let Xe;e[136]!==ke||e[137]!==Pe||e[138]!==a||e[139]!==je||e[140]!==g||e[141]!==ce?(Xe=a&&!ke?n.jsx("h1",{className:"text-2xl font-semibold leading-snug text-foreground",children:ce}):n.jsx("textarea",{ref:Yf,value:ce,onChange:M=>{je({title:M.target.value},!0),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},onKeyDown:Hf,onBlur:Pe,placeholder:g("taskBoard.taskDialog.taskTitlePlaceholder"),autoFocus:!a,rows:1,className:K("w-full resize-none overflow-hidden border-0 bg-transparent text-2xl font-semibold leading-snug text-foreground outline-none placeholder:text-foreground/30")}),e[136]=ke,e[137]=Pe,e[138]=a,e[139]=je,e[140]=g,e[141]=ce,e[142]=Xe):Xe=e[142];let Rt;e[143]!==a||e[144]!==L||e[145]!==te?(Rt=a&&te.length>0&&n.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:te.map(M=>{const Ae=L.find(We=>We.id===M);return Ae?n.jsx("span",{className:"rounded-md border border-border px-2 py-1",children:Ae.name},M):null})}),e[143]=a,e[144]=L,e[145]=te,e[146]=Rt):Rt=e[146];let ts;e[147]!==Xe||e[148]!==Rt?(ts=n.jsxs("div",{children:[Xe,Rt]}),e[147]=Xe,e[148]=Rt,e[149]=ts):ts=e[149];let Ht;e[150]!==a||e[151]!==k||e[152]!==v?(Ht=a&&n.jsx(zm,{item:a,orgSlug:v.slug,onRerun:k}),e[150]=a,e[151]=k,e[152]=v,e[153]=Ht):Ht=e[153];const Za=$e&&"overflow-hidden";let rn;e[154]!==Za?(rn=K("relative",Za),e[154]=Za,e[155]=rn):rn=e[155];let on;e[156]!==$e?(on=$e?{maxHeight:kr}:void 0,e[156]=$e,e[157]=on):on=e[157];let pl;e[158]===Symbol.for("react.memo_cache_sentinel")?(pl=()=>Ce(!0),e[158]=pl):pl=e[158];let cn;e[159]!==xe||e[160]!==ke||e[161]!==a||e[162]!==je||e[163]!==g?(cn=n.jsx("div",{ref:wt,"data-testid":"task-description",children:a&&!ke?n.jsx(Ri,{id:`task-post-${a.id}`,text:xe}):n.jsx(lo,{defaultValue:xe,onChange:M=>je({description:M},!0),placeholder:g("taskBoard.taskDialog.descriptionPlaceholder")})}),e[159]=xe,e[160]=ke,e[161]=a,e[162]=je,e[163]=g,e[164]=cn):cn=e[164];let dn;e[165]!==$e?(dn=$e&&n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-background to-transparent"}),e[165]=$e,e[166]=dn):dn=e[166];let un;e[167]!==Pe||e[168]!==rn||e[169]!==on||e[170]!==cn||e[171]!==dn?(un=n.jsxs("div",{className:rn,style:on,onFocusCapture:pl,onBlurCapture:Pe,children:[cn,dn]}),e[167]=Pe,e[168]=rn,e[169]=on,e[170]=cn,e[171]=dn,e[172]=un):un=e[172];let fn;e[173]!==me||e[174]!==De||e[175]!==g?(fn=De&&n.jsxs(re,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>Ce(Vf),children:[n.jsx(ul,{size:14,className:K("transition-transform",me&&"rotate-180")}),g(me?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[173]=me,e[174]=De,e[175]=g,e[176]=fn):fn=e[176];let mn;e[177]!==un||e[178]!==fn?(mn=n.jsxs("div",{className:"flex flex-col py-6",children:[un,fn]}),e[177]=un,e[178]=fn,e[179]=mn):mn=e[179];let pn;e[180]!==a?(pn=a&&n.jsx(P1,{item:a}),e[180]=a,e[181]=pn):pn=e[181];let gn;e[182]!==a?(gn=a&&n.jsx(L1,{item:a}),e[182]=a,e[183]=gn):gn=e[183];let hn;e[184]!==a?(hn=a&&n.jsx("div",{className:"py-4",children:n.jsx("hr",{className:"border-border"})}),e[184]=a,e[185]=hn):hn=e[185];let xn;e[186]!==a||e[187]!==C||e[188]!==rt?(xn=a&&n.jsx("div",{className:"flex flex-col gap-8",children:n.jsx(jm,{item:a,members:C,onOpenThread:M=>rt(M.threadId)})}),e[186]=a,e[187]=C,e[188]=rt,e[189]=xn):xn=e[189];let jn;e[190]!==mn||e[191]!==pn||e[192]!==gn||e[193]!==hn||e[194]!==xn?(jn=n.jsxs("div",{className:"flex flex-col",children:[mn,pn,gn,hn,xn]}),e[190]=mn,e[191]=pn,e[192]=gn,e[193]=hn,e[194]=xn,e[195]=jn):jn=e[195];let bn;e[196]!==Ee||e[197]!==ts||e[198]!==Ht||e[199]!==jn?(bn=n.jsxs("div",{className:"flex min-w-0 flex-col gap-2 px-5 py-6 sm:px-8",children:[Ee,ts,Ht,jn]}),e[196]=Ee,e[197]=ts,e[198]=Ht,e[199]=jn,e[200]=bn):bn=e[200];let kn;e[201]!==a||e[202]!==J||e[203]!==bn?(kn=n.jsx(Pf,{item:a,hidden:J,children:bn}),e[201]=a,e[202]=J,e[203]=bn,e[204]=kn):kn=e[204];const uc="task-inspector",Pl=a?st?"flex":"hidden":"flex";let yn;e[205]!==Pl?(yn=K("w-full flex-col gap-6 border-t border-border p-6","min-h-0 flex-1 overflow-y-auto lg:flex lg:w-[320px] lg:flex-none lg:border-l lg:border-t-0",Pl),e[205]=Pl,e[206]=yn):yn=e[206];let vn;e[207]!==a?(vn=a&&n.jsx(Uf,{item:a}),e[207]=a,e[208]=vn):vn=e[208];const Ml=tl;let Nn;e[209]!==g?(Nn=g("taskBoard.taskDialog.propertiesLabel"),e[209]=g,e[210]=Nn):Nn=e[210];let Sn;e[211]!==a||e[212]!==be?(Sn=K(a?Xr({...a,status:be}):Dl(be).iconClassName),e[211]=a,e[212]=be,e[213]=Sn):Sn=e[213];let Bn;e[214]!==zs||e[215]!==Sn?(Bn=n.jsx(zs,{size:16,className:Sn}),e[214]=zs,e[215]=Sn,e[216]=Bn):Bn=e[216];let Cn;e[217]!==be||e[218]!==g?(Cn=dt(be,g),e[217]=be,e[218]=g,e[219]=Cn):Cn=e[219];let wn;e[220]!==Bn||e[221]!==Cn.label?(wn=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:Yt,children:[Bn,Cn.label]})}),e[220]=Bn,e[221]=Cn.label,e[222]=wn):wn=e[222];let Dn;e[223]!==je||e[224]!==g?(Dn=ws.map(M=>{const{label:Ae,visual:We}=dt(M,g),Et=We.icon;return n.jsxs(Ne,{onSelect:()=>je({status:M}),className:"gap-2",children:[n.jsx(Et,{size:16,className:We.iconClassName}),Ae]},M)}),e[223]=je,e[224]=g,e[225]=Dn):Dn=e[225];let Tn;e[226]!==Dn?(Tn=n.jsx(qe,{align:"start",className:"w-44",children:Dn}),e[226]=Dn,e[227]=Tn):Tn=e[227];let _n;e[228]!==wn||e[229]!==Tn?(_n=n.jsxs(Me,{children:[wn,Tn]}),e[228]=wn,e[229]=Tn,e[230]=_n):_n=e[230];let gl;e[231]===Symbol.for("react.memo_cache_sentinel")?(gl=K(Yt),e[231]=gl):gl=e[231];const Kl=At[Y].icon;let hl;e[232]!==Kl?(hl=n.jsx(Kl,{size:16}),e[232]=Kl,e[233]=hl):hl=e[233];const Ul=hl,ql=At[Y];let In;e[234]!==g||e[235]!==ql.labelKey?(In=g(ql.labelKey),e[234]=g,e[235]=ql.labelKey,e[236]=In):In=e[236];let An;e[237]!==Ul||e[238]!==In?(An=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:gl,children:[Ul,In]})}),e[237]=Ul,e[238]=In,e[239]=An):An=e[239];let zn;e[240]!==je||e[241]!==g?(zn=Ii.map(M=>{const Ae=At[M].icon;return n.jsxs(Ne,{onSelect:()=>je({type:M}),children:[n.jsx(Ae,{size:16}),g(At[M].labelKey)]},M)}),e[240]=je,e[241]=g,e[242]=zn):zn=e[242];let $n;e[243]!==zn?($n=n.jsx(qe,{align:"start",className:"w-44",children:zn}),e[243]=zn,e[244]=$n):$n=e[244];let Rn;e[245]!==An||e[246]!==$n?(Rn=n.jsxs(Me,{children:[An,$n]}),e[245]=An,e[246]=$n,e[247]=Rn):Rn=e[247];const Gl=ue==="none"&&La;let En;e[248]!==Gl?(En=K(Yt,Gl),e[248]=Gl,e[249]=En):En=e[249];let On;e[250]!==ue||e[251]!==g?(On=ue==="none"?n.jsxs(n.Fragment,{children:[n.jsx(Ys,{size:16}),g("taskBoard.taskDialog.setPriorityButton")]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:K("size-2 rounded-full",et[ue].dotClassName)}),g(et[ue].labelKey)]}),e[250]=ue,e[251]=g,e[252]=On):On=e[252];let Ln;e[253]!==En||e[254]!==On?(Ln=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:En,children:On})}),e[253]=En,e[254]=On,e[255]=Ln):Ln=e[255];let Fn;e[256]!==je||e[257]!==g?(Fn=Ts.map(M=>n.jsxs(Ne,{onSelect:()=>je({priority:M}),children:[n.jsx("span",{className:K("size-2 rounded-full",et[M].dotClassName)}),g(et[M].labelKey)]},M)),e[256]=je,e[257]=g,e[258]=Fn):Fn=e[258];let Pn;e[259]!==Fn?(Pn=n.jsx(qe,{align:"start",className:"w-40",children:Fn}),e[259]=Fn,e[260]=Pn):Pn=e[260];let Mn;e[261]!==Ln||e[262]!==Pn?(Mn=n.jsxs(Me,{children:[Ln,Pn]}),e[261]=Ln,e[262]=Pn,e[263]=Mn):Mn=e[263];let Kn;e[264]!==Je||e[265]!==a||e[266]!==Pt||e[267]!==g?(Kn=a&&n.jsx("div",{className:"inline-flex h-9 items-center justify-start gap-2 px-3 text-sm font-medium text-foreground",title:g("taskBoard.taskDialog.createdByLabel"),children:or(a)?n.jsxs(n.Fragment,{children:[n.jsx(It,{size:16,className:"text-muted-foreground"}),Pt]}):Je?n.jsxs(n.Fragment,{children:[n.jsx(ot,{url:Je.user?.image??void 0,fallback:Je.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:Je.user?.name??g("taskBoard.taskDialog.unknownCreatorLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Vs,{size:16,className:"text-muted-foreground"}),g("taskBoard.taskDialog.unknownCreatorLabel")]})}),e[264]=Je,e[265]=a,e[266]=Pt,e[267]=g,e[268]=Kn):Kn=e[268];const Vl=!ze&&La;let Un;e[269]!==Vl?(Un=K(Yt,Vl),e[269]=Vl,e[270]=Un):Un=e[270];let qn;e[271]!==lt||e[272]!==Lt||e[273]!==_t||e[274]!==g?(qn=_t&&lt?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[n.jsx(ot,{url:lt.user?.image??void 0,fallback:lt.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:lt.user?.name??g("taskBoard.taskDialog.superAgentDefaultName")})]}),n.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(ot,{url:lt.user?.image??void 0,fallback:lt.user?.name??"?",shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),n.jsx(ct,{size:16,className:"ring-2 ring-background"})]}),g("taskBoard.taskDialog.superAgentLabel")]})]}):_t?n.jsxs(n.Fragment,{children:[n.jsx(ct,{size:16}),g("taskBoard.taskDialog.superAgentLabel")]}):Lt?n.jsxs(n.Fragment,{children:[n.jsx(ot,{url:Lt.user?.image??void 0,fallback:Lt.user?.name??"?",shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:Lt.user?.name??g("taskBoard.taskDialog.unassignedLabel")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Kr,{size:16,className:"text-muted-foreground"}),g("taskBoard.taskDialog.assignButton")]}),e[271]=lt,e[272]=Lt,e[273]=_t,e[274]=g,e[275]=qn):qn=e[275];let Gn;e[276]!==Un||e[277]!==qn?(Gn=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button",className:Un,children:qn})}),e[276]=Un,e[277]=qn,e[278]=Gn):Gn=e[278];let Vn;e[279]!==a?.assigneeId||e[280]!==k||e[281]!==je||e[282]!==it?(Vn=M=>{if(it(!1),M===Ie&&a?.assigneeId===Ie){k?.();return}je({assigneeId:M})},e[279]=a?.assigneeId,e[280]=k,e[281]=je,e[282]=it,e[283]=Vn):Vn=e[283];let Hn;e[284]!==C||e[285]!==Vn?(Hn=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(qi,{members:C,onSelect:Vn})}),e[284]=C,e[285]=Vn,e[286]=Hn):Hn=e[286];let Yn;e[287]!==Jt||e[288]!==it||e[289]!==Gn||e[290]!==Hn?(Yn=n.jsxs(ns,{open:Jt,onOpenChange:it,modal:!0,children:[Gn,Hn]}),e[287]=Jt,e[288]=it,e[289]=Gn,e[290]=Hn,e[291]=Yn):Yn=e[291];let Wn;e[292]!==lt||e[293]!==_t||e[294]!==g?(Wn=_t&&lt&&n.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[n.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),n.jsxs("span",{className:K(Yt,"pointer-events-none"),children:[n.jsx(ct,{size:16}),g("taskBoard.taskDialog.superAgentLabel")]})]}),e[292]=lt,e[293]=_t,e[294]=g,e[295]=Wn):Wn=e[295];let Qn;e[296]!==Yn||e[297]!==Wn?(Qn=n.jsxs("div",{className:"flex flex-col",children:[Yn,Wn]}),e[296]=Yn,e[297]=Wn,e[298]=Qn):Qn=e[298];const Hl=!Oe&&La;let Xn;e[299]!==Hl?(Xn=K(Yt,Hl),e[299]=Hl,e[300]=Xn):Xn=e[300];let xl;e[301]===Symbol.for("react.memo_cache_sentinel")?(xl=n.jsx(Ws,{size:16,className:"text-muted-foreground"}),e[301]=xl):xl=e[301];let Zn;e[302]!==Oe||e[303]!==g?(Zn=Oe?$o.format(Oe):g("taskBoard.taskDialog.dueDateLabel"),e[302]=Oe,e[303]=g,e[304]=Zn):Zn=e[304];let Jn;e[305]!==Xn||e[306]!==Zn?(Jn=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:Xn,children:[xl,Zn]})}),e[305]=Xn,e[306]=Zn,e[307]=Jn):Jn=e[307];const Yl=Oe??void 0;let ea;e[308]!==je?(ea=M=>{je({dueDate:M??null}),M&&ut(!1)},e[308]=je,e[309]=ea):ea=e[309];let ta;e[310]!==Yl||e[311]!==ea?(ta=n.jsx(as,{className:"w-auto p-0",align:"start",children:n.jsx($i,{mode:"single",selected:Yl,onSelect:ea,initialFocus:!0})}),e[310]=Yl,e[311]=ea,e[312]=ta):ta=e[312];let sa;e[313]!==at||e[314]!==Jn||e[315]!==ta?(sa=n.jsxs(ns,{open:at,onOpenChange:ut,children:[Jn,ta]}),e[313]=at,e[314]=Jn,e[315]=ta,e[316]=sa):sa=e[316];const Wl=(Le.length>0||Ye)&&n.jsxs(ns,{open:Te,onOpenChange:He,modal:!0,children:[n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:K(Yt,!Ye&&La),children:[n.jsx(Wt,{size:16,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:jt?ol(jt,g):g(Ye?"taskBoard.sprints.goneLabel":"taskBoard.sprints.backlog")})]})}),n.jsxs(as,{align:"start",className:"w-64 p-1",children:[n.jsx(Nr,{icon:n.jsx(dl,{size:14,className:"text-muted-foreground"}),label:g("taskBoard.sprints.backlog"),selected:!Ye,onSelect:()=>bt(null)}),Zt.map(M=>n.jsx(Nr,{icon:n.jsx(Wt,{size:14,className:"text-muted-foreground"}),label:ol(M,g),hint:po(M),selected:M.id===Ye,onSelect:()=>bt(M.id)},M.id))]})]}),Ql=a?.threads;let na;e[317]!==Ql?(na=n.jsx(Kf,{threads:Ql}),e[317]=Ql,e[318]=na):na=e[318];let aa;e[319]!==Ml||e[320]!==Mn||e[321]!==Kn||e[322]!==Qn||e[323]!==sa||e[324]!==Wl||e[325]!==na||e[326]!==Nn||e[327]!==_n||e[328]!==Rn?(aa=n.jsxs(Ml,{label:Nn,children:[_n,Rn,Mn,Kn,Qn,sa,Wl,na]}),e[319]=Ml,e[320]=Mn,e[321]=Kn,e[322]=Qn,e[323]=sa,e[324]=Wl,e[325]=na,e[326]=Nn,e[327]=_n,e[328]=Rn,e[329]=aa):aa=e[329];let la;e[330]!==g?(la=g("taskBoard.taskDialog.labelsLabel"),e[330]=g,e[331]=la):la=e[331];let ia;e[332]!==L||e[333]!==je||e[334]!==ve||e[335]!==g||e[336]!==te?(ia=te.length===0?n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:K(Yt,La),children:[n.jsx(Cl,{size:16}),g("taskBoard.taskDialog.tagsButton")]})}):n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[te.map(M=>{const Ae=L.find(We=>We.id===M);return Ae?n.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:[n.jsxs("button",{type:"button",onClick:()=>ve(!0),className:"inline-flex items-center gap-1.5",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(Ae.color)}}),n.jsx("span",{className:"truncate",children:Ae.name})]}),n.jsx("button",{type:"button","aria-label":g("taskBoard.taskDialog.removeTagAriaLabel",{name:Ae.name}),className:"-mr-0.5 flex size-3.5 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground",onClick:()=>{je({tagIds:te.filter(We=>We!==M)})},children:n.jsx(il,{size:10})})]},M):null}),n.jsx(ss,{asChild:!0,children:n.jsx(re,{variant:"outline",size:"icon-sm","aria-label":g("taskBoard.taskDialog.addTagButton"),className:"text-muted-foreground",children:n.jsx(is,{className:"size-3.5"})})})]}),e[332]=L,e[333]=je,e[334]=ve,e[335]=g,e[336]=te,e[337]=ia):ia=e[337];let ra;e[338]!==L.length?(ra=eo(L.length),e[338]=L.length,e[339]=ra):ra=e[339];let oa;e[340]!==je||e[341]!==te?(oa=M=>je({tagIds:te.includes(M)?te.filter(Ae=>Ae!==M):[...te,M]}),e[340]=je,e[341]=te,e[342]=oa):oa=e[342];let ca;e[343]!==_s||e[344]!==Is||e[345]!==L||e[346]!==ra||e[347]!==oa||e[348]!==te?(ca=n.jsx(as,{align:"start",className:"w-56 p-0",children:n.jsx(Co,{tags:L,selectedIds:te,defaultColor:ra,onToggle:oa,onCreate:_s,onDelete:Is})}),e[343]=_s,e[344]=Is,e[345]=L,e[346]=ra,e[347]=oa,e[348]=te,e[349]=ca):ca=e[349];let da;e[350]!==ve||e[351]!==ia||e[352]!==ca||e[353]!==Dt?(da=n.jsxs(ns,{open:Dt,onOpenChange:ve,modal:!0,children:[ia,ca]}),e[350]=ve,e[351]=ia,e[352]=ca,e[353]=Dt,e[354]=da):da=e[354];let ua;e[355]!==la||e[356]!==da?(ua=n.jsx(tl,{label:la,children:da}),e[355]=la,e[356]=da,e[357]=ua):ua=e[357];let fa;e[358]!==a||e[359]!==g?(fa=a&&n.jsx(tl,{label:g("taskBoard.epics.parentLabel"),children:n.jsx(O1,{item:a,buttonClassName:Yt})}),e[358]=a,e[359]=g,e[360]=fa):fa=e[360];const Xl=tl;let ma;e[361]!==g?(ma=g("taskBoard.taskDialog.projectLabel"),e[361]=g,e[362]=ma):ma=e[362];const Zl=Me,Jl=!Q&&!fe&&La;let pa;e[363]!==Jl?(pa=K(Yt,"max-w-full",Jl),e[363]=Jl,e[364]=pa):pa=e[364];let ga;e[365]!==Ue?(ga=n.jsx(ls,{entry:Ue}),e[365]=Ue,e[366]=ga):ga=e[366];let ha;e[367]!==Q||e[368]!==Ue?.title||e[369]!==g?(ha=Ue?.title??Q??g("taskBoard.taskDialog.projectButton"),e[367]=Q,e[368]=Ue?.title,e[369]=g,e[370]=ha):ha=e[370];let xa;e[371]!==ha?(xa=n.jsx("span",{className:"min-w-0 truncate text-left",children:ha}),e[371]=ha,e[372]=xa):xa=e[372];let ja;e[373]!==pa||e[374]!==ga||e[375]!==xa?(ja=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button",className:pa,children:[ga,xa]})}),e[373]=pa,e[374]=ga,e[375]=xa,e[376]=ja):ja=e[376];const ei=qe,fc="start",mc="w-64";let ba;e[377]!==je?(ba=()=>je(rl(null)),e[377]=je,e[378]=ba):ba=e[378];let ka;e[379]!==g?(ka=g("taskBoard.taskDialog.noProject"),e[379]=g,e[380]=ka):ka=e[380];let ya;e[381]!==ba||e[382]!==ka?(ya=n.jsx(Ne,{onSelect:ba,children:ka}),e[381]=ba,e[382]=ka,e[383]=ya):ya=e[383];let jl;e[384]!==je?(jl=M=>n.jsx(Ne,{className:"gap-2",onSelect:()=>je(rl(M)),children:n.jsx(Bo,{entry:M})},M.id),e[384]=je,e[385]=jl):jl=e[385];const ti=ee.map(jl);let va;e[386]!==ei||e[387]!==ya||e[388]!==ti?(va=n.jsxs(ei,{align:fc,className:mc,children:[ya,ti]}),e[386]=ei,e[387]=ya,e[388]=ti,e[389]=va):va=e[389];let Na;e[390]!==Zl||e[391]!==ja||e[392]!==va?(Na=n.jsxs(Zl,{children:[ja,va]}),e[390]=Zl,e[391]=ja,e[392]=va,e[393]=Na):Na=e[393];let Sa;e[394]!==Xl||e[395]!==ma||e[396]!==Na?(Sa=n.jsx(Xl,{label:ma,children:Na}),e[394]=Xl,e[395]=ma,e[396]=Na,e[397]=Sa):Sa=e[397];let Ba;e[398]!==xe||e[399]!==a||e[400]!==h?(Ba=a&&n.jsx(um,{item:a,description:xe,onOpenPreview:h}),e[398]=xe,e[399]=a,e[400]=h,e[401]=Ba):Ba=e[401];let Ca;e[402]!==aa||e[403]!==ua||e[404]!==fa||e[405]!==Sa||e[406]!==Ba||e[407]!==yn||e[408]!==vn?(Ca=n.jsxs("div",{"data-testid":uc,className:yn,children:[vn,aa,ua,fa,Sa,Ba]}),e[402]=aa,e[403]=ua,e[404]=fa,e[405]=Sa,e[406]=Ba,e[407]=yn,e[408]=vn,e[409]=Ca):Ca=e[409];let wa;e[410]!==Ca||e[411]!==A||e[412]!==kn?(wa=n.jsxs("div",{className:A,children:[kn,Ca]}),e[410]=Ca,e[411]=A,e[412]=kn,e[413]=wa):wa=e[413];let Da;e[414]!==wa||e[415]!==Vt?(Da=n.jsx("div",{className:Vt,children:wa}),e[414]=wa,e[415]=Vt,e[416]=Da):Da=e[416];let Ta;e[417]!==rt?(Ta=()=>rt(null),e[417]=rt,e[418]=Ta):Ta=e[418];let _a;e[419]!==gt||e[420]!==Ta?(_a=n.jsx(mf,{thread:gt,onClose:Ta}),e[419]=gt,e[420]=Ta,e[421]=_a):_a=e[421];let Ia;e[422]!==mt||e[423]!==b||e[424]!==a||e[425]!==g||e[426]!==ce?(Ia=!a&&n.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:n.jsxs(re,{size:"sm",disabled:!ce.trim()||b,onClick:mt,children:[n.jsx(is,{size:16}),g("taskBoard.taskDialog.createTaskButton")]})}),e[422]=mt,e[423]=b,e[424]=a,e[425]=g,e[426]=ce,e[427]=Ia):Ia=e[427];let bl;e[428]!==Da||e[429]!==_a||e[430]!==Ia||e[431]!==Gt?(bl=n.jsxs(n.Fragment,{children:[Gt,Da,_a,Ia]}),e[428]=Da,e[429]=_a,e[430]=Ia,e[431]=Gt,e[432]=bl):bl=e[432];const Aa=bl;if(s==="page"){let M;e[433]!==$t||e[434]!==es?(M=We=>{const Et=$t(We),pc=es(We);return()=>{Et?.(),pc?.()}},e[433]=$t,e[434]=es,e[435]=M):M=e[435];let Ae;return e[436]!==Aa||e[437]!==M?(Ae=n.jsx("div",{ref:M,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:Aa}),e[436]=Aa,e[437]=M,e[438]=Ae):Ae=e[438],Ae}let za;e[439]!==Nt?(za=M=>!M&&Nt(),e[439]=Nt,e[440]=za):za=e[440];let $a;e[441]!==g?($a=g("taskBoard.taskDialog.newTaskTitle"),e[441]=g,e[442]=$a):$a=e[442];let Ra;e[443]!==$a?(Ra=n.jsx(ll,{className:"sr-only",children:$a}),e[443]=$a,e[444]=Ra):Ra=e[444];let Ea;e[445]!==Aa||e[446]!==Ra?(Ea=n.jsxs(al,{className:"flex max-h-[92vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[90vh] sm:max-h-[820px] sm:max-w-[1040px]",closeButtonClassName:"hidden",children:[Ra,Aa]}),e[445]=Aa,e[446]=Ra,e[447]=Ea):Ea=e[447];let kl;return e[448]!==y||e[449]!==za||e[450]!==Ea?(kl=n.jsx(nl,{open:y,onOpenChange:za,children:Ea}),e[448]=y,e[449]=za,e[450]=Ea,e[451]=kl):kl=e[451],kl}function Vf(t){return!t}function Hf(t){t.key==="Enter"&&t.preventDefault()}function Yf(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Wf(t){return!t}function Qf(t){return!t}function Xf(t){return t.name===bd}function Zf(t){return t.state!=="closed"}function Jf(t){return t.id}function em(t){const e=R.c(2);let s;return e[0]!==t?(s=n.jsx(Ro,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function tm(t){const e=R.c(2);let s;return e[0]!==t?(s=n.jsx(Ro,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function sm(t,e){switch(t.status){case"failed":return Ed(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:rs}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:sd};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:$l};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:Bi,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:Ha};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:rs};default:return t.status}}function nm(t){const e=R.c(17),{thread:s,onOpen:l}=t,i=X();let a;if(e[0]!==l||e[1]!==i||e[2]!==s){const r=s.status?sm({...s,status:s.status},i):null,o=s.lastMessage;let c;e[4]!==s.title?(c=to(s.title,"reviewer"),e[4]=s.title,e[5]=c):c=e[5];const d=c,u=s.threadId,f=d?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel";let m;e[6]!==i||e[7]!==f?(m=i(f),e[6]=i,e[7]=f,e[8]=m):m=e[8];let p;e[9]!==d?(p=d?n.jsx(fl,{size:32}):n.jsx(ct,{size:32}),e[9]=d,e[10]=p):p=e[10];let h;e[11]!==l||e[12]!==s?(h=l?()=>l(s):void 0,e[11]=l,e[12]=s,e[13]=h):h=e[13];let j;e[14]!==l||e[15]!==s?(j=l?()=>l(s):void 0,e[14]=l,e[15]=s,e[16]=j):j=e[16],a=n.jsx(Do,{id:`run-${s.threadId}`,threadId:u,author:m,avatar:p,createdAt:s.createdAt,body:o||s.title||"",muted:s.status!=="requires_action",onOpenThread:h,onOpen:j,metadata:r&&n.jsxs("span",{className:K("flex shrink-0 items-center gap-1.5",r.className),children:[r.spin?n.jsx(xt,{className:"size-[15px]",label:r.label}):n.jsx(r.icon,{size:15}),n.jsx("span",{className:"text-xs",children:r.label})]})}),e[0]=l,e[1]=i,e[2]=s,e[3]=a}else a=e[3];return a}function am(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Gr}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:el}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:el}:t.state===null&&t.merged===null?{label:e("taskBoard.taskDialog.prStateUnknown"),className:"text-muted-foreground",icon:el}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:el}}function lm(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:Ha};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:rs};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:Bi};default:return null}}const im=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function rm(t){if(t.status!=="completed")return{icon:Bi,className:"text-warning",spin:!0};const e=t.conclusion;return e&&im.has(e)?{icon:rs,className:"text-destructive",spin:!1}:yo(t)?{icon:Ha,className:"text-success",spin:!1}:{icon:$l,className:"text-muted-foreground",spin:!1}}function om(t){const e=R.c(58),{pr:s,routes:l,revalidating:i,previewThread:a,readyToShip:r,shipPending:o,resolvePending:c,onShip:d,onResolveConflict:u,onOpenPreview:f}=t,m=X(),[p,h]=W.useState(!1),j=t1(s.url)?.repo.provider??"github";let x;if(e[0]!==p||e[1]!==f||e[2]!==u||e[3]!==d||e[4]!==s||e[5]!==a||e[6]!==j||e[7]!==r||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o||e[12]!==m){const k=am(s,m),b=lm(s.checksStatus,m);let y;e[14]!==s||e[15]!==r?(y=U1(s,r),e[14]=s,e[15]=r,e[16]=y):y=e[16];const{isOpen:g,hasConflict:v,showShip:N,showResolveConflict:B}=y,w=!!a||!!s.previewUrl||N||B,D=s.checks??[],C=D.length>0||b!=null,S=D.length>0,T=q1(s.checksStatus,D,p),_=T?{label:m("taskBoard.taskDialog.prChecksScore",T),className:"text-warning",icon:rs}:b,z=i&&"revalidating-ring";let I;e[17]!==z?(I=K("flex flex-col gap-3 rounded-xl border border-border bg-card p-3",z),e[17]=z,e[18]=I):I=e[18];let $;e[19]!==j?($=n.jsx(hu,{provider:j,className:"size-4 shrink-0 text-foreground"}),e[19]=j,e[20]=$):$=e[20];const E=s.title??`${s.repoOwner}/${s.repoName}`;let O;e[21]!==E?(O=n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:E}),e[21]=E,e[22]=O):O=e[22];const L=K("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let U;e[23]!==k?(U=n.jsx(k.icon,{size:13}),e[23]=k,e[24]=U):U=e[24];let G;e[25]!==k||e[26]!==L||e[27]!==U?(G=n.jsxs("span",{className:L,children:[U,k.label]}),e[25]=k,e[26]=L,e[27]=U,e[28]=G):G=e[28];const P=s.url,Z=s.url;let H;e[29]!==s.number||e[30]!==j?(H=Wu(j,s.number),e[29]=s.number,e[30]=j,e[31]=H):H=e[31];let se;e[32]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Ma,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[32]=se):se=e[32];let V;e[33]!==s.url||e[34]!==H?(V=n.jsxs("a",{href:P,target:"_blank",rel:"noreferrer",title:Z,className:"group flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent",children:[H,se]}),e[33]=s.url,e[34]=H,e[35]=V):V=e[35];let ee;e[36]!==G||e[37]!==V||e[38]!==$||e[39]!==O?(ee=n.jsxs("div",{className:"flex items-center gap-3",children:[$,O,G,V]}),e[36]=G,e[37]=V,e[38]=$,e[39]=O,e[40]=ee):ee=e[40];let ie;e[41]!==v||e[42]!==g||e[43]!==m?(ie=v&&g&&n.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[n.jsx(rs,{size:13,className:"shrink-0"}),m("taskBoard.taskDialog.prConflict")]}),e[41]=v,e[42]=g,e[43]=m,e[44]=ie):ie=e[44];let ne;e[45]!==w||e[46]!==f||e[47]!==u||e[48]!==d||e[49]!==s.previewUrl||e[50]!==a||e[51]!==c||e[52]!==l||e[53]!==o||e[54]!==B||e[55]!==N||e[56]!==m?(ne=w&&n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&n.jsxs(re,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:m("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[n.jsx(Mr,{size:13}),m("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&n.jsx(H1,{url:s.previewUrl,routes:l}),N&&n.jsx(re,{type:"button",variant:"success",size:"sm",disabled:o,onClick:d,children:m("taskBoard.taskDialog.shipToProductionButton")}),B&&n.jsxs(re,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:m("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[n.jsx(Gr,{size:13}),m("taskBoard.taskDialog.resolveConflictButton")]})]}),e[45]=w,e[46]=f,e[47]=u,e[48]=d,e[49]=s.previewUrl,e[50]=a,e[51]=c,e[52]=l,e[53]=o,e[54]=B,e[55]=N,e[56]=m,e[57]=ne):ne=e[57],x=n.jsxs("div",{className:I,children:[ee,ie,ne,C&&n.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[n.jsxs("button",{type:"button",disabled:!S,onClick:()=>h(cm),className:"flex w-full items-center gap-1.5 font-medium disabled:cursor-default",children:[_?n.jsx(_.icon,{size:13,className:_.className}):n.jsx(Ha,{size:13,className:"text-muted-foreground"}),n.jsx("span",{className:K(_?.className??"text-muted-foreground"),children:_?.label??m("taskBoard.taskDialog.prChecksLabel")}),S&&n.jsx(Va,{size:14,className:K("ml-auto text-muted-foreground/60 transition-transform",p&&"rotate-90")})]}),p&&n.jsx("div",{className:"mt-2 flex flex-col gap-2",children:D.map((F,q)=>{const le=rm(F),de=`${F.name}-${q}`;return n.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[le.spin?n.jsx(xt,{className:K("size-[13px]",le.className)}):n.jsx(le.icon,{size:13,className:K("shrink-0",le.className)}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:F.name}),F.detailsUrl&&n.jsx("a",{href:F.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:n.jsx(Ma,{size:12})})]}),F.summary&&n.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:n.jsx(Ri,{id:`${s.url}-${de}`,text:F.summary})})]},de)})})]})]}),e[0]=p,e[1]=f,e[2]=u,e[3]=d,e[4]=s,e[5]=a,e[6]=j,e[7]=r,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=m,e[13]=x}else x=e[13];return x}function cm(t){return!t}function dm(){const t=R.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Oa,{className:"size-4 shrink-0 rounded"}),n.jsx(Oa,{className:"h-4 min-w-0 flex-1"}),n.jsx(Oa,{className:"h-4 w-16 shrink-0"}),n.jsx(Oa,{className:"h-4 w-10 shrink-0"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3",children:[e,n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Oa,{className:"h-7 w-20"}),n.jsx(Oa,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function um(t){const e=R.c(54),{item:s,description:l,onOpenPreview:i}=t,a=X(),{data:r,isLoading:o,isFetching:c}=Ei(s.id),d=Z1(s.id),u=J1(s.id),f=Vi(s.id);let m,p,h,j,x,k;if(e[0]!==f.threads||e[1]!==l||e[2]!==s.previewRoutes||e[3]!==s.status||e[4]!==s.threads||e[5]!==i||e[6]!==d||e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==u||e[11]!==a){k=Symbol.for("react.early_return_sentinel");e:{let g;e[18]!==f.threads||e[19]!==l?(g=[l,...f.threads.flatMap(pm)],e[18]=f.threads,e[19]=l,e[20]=g):g=e[20];const v=cf(g.join(`
3
3
 
4
- `)),N=o&&!r;if(!N&&(!r||r.length===0)&&v.length===0){k=null;break e}let B;e[21]!==s.status?(B=nf(s.status),e[21]=s.status,e[22]=B):B=e[22];const w=B;let D;e[23]!==d||e[24]!==a?(D=()=>d.mutate(void 0,{onSuccess:I=>I?.merged?Qe.success(a("taskBoard.taskDialog.shipSuccess")):Qe.error(a("taskBoard.taskDialog.shipError")),onError:()=>Qe.error(a("taskBoard.taskDialog.shipError"))}),e[23]=d,e[24]=a,e[25]=D):D=e[25];const C=D;let S;e[26]!==u||e[27]!==a?(S=I=>u.mutate(I,{onSuccess:()=>Qe.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>Qe.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[26]=u,e[27]=a,e[28]=S):S=e[28];const T=S;let _;e[29]!==s.threads||e[30]!==i?(_=i?s.threads.find(mm):void 0,e[29]=s.threads,e[30]=i,e[31]=_):_=e[31];const z=_;m=Gf,e[32]!==a?(x=a("taskBoard.taskDialog.linksLabel"),e[32]=a,e[33]=x):x=e[33],p="flex flex-col gap-1",e[34]!==s.previewRoutes||e[35]!==N||e[36]!==i||e[37]!==T||e[38]!==C||e[39]!==z||e[40]!==d||e[41]!==r||e[42]!==c||e[43]!==w||e[44]!==u?(h=N?n.jsx(dm,{}):(r??[]).map(I=>n.jsx(om,{pr:I,routes:s.previewRoutes??[],revalidating:c,previewThread:z,readyToShip:w,shipPending:d.isPending,resolvePending:u.isPending,onShip:C,onResolveConflict:()=>T(I.number),onOpenPreview:i},I.url)),e[34]=s.previewRoutes,e[35]=N,e[36]=i,e[37]=T,e[38]=C,e[39]=z,e[40]=d,e[41]=r,e[42]=c,e[43]=w,e[44]=u,e[45]=h):h=e[45],j=v.map(fm)}e[0]=f.threads,e[1]=l,e[2]=s.previewRoutes,e[3]=s.status,e[4]=s.threads,e[5]=i,e[6]=d,e[7]=r,e[8]=c,e[9]=o,e[10]=u,e[11]=a,e[12]=m,e[13]=p,e[14]=h,e[15]=j,e[16]=x,e[17]=k}else m=e[12],p=e[13],h=e[14],j=e[15],x=e[16],k=e[17];if(k!==Symbol.for("react.early_return_sentinel"))return k;let b;e[46]!==p||e[47]!==h||e[48]!==j?(b=n.jsxs("div",{className:p,children:[h,j]}),e[46]=p,e[47]=h,e[48]=j,e[49]=b):b=e[49];let y;return e[50]!==m||e[51]!==x||e[52]!==b?(y=n.jsx(m,{label:x,children:b}),e[50]=m,e[51]=x,e[52]=b,e[53]=y):y=e[53],y}function fm(t){return n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-accent",children:[n.jsx(ui,{size:15,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),n.jsx(Ma,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function mm(t){return t.hasPreview&&t.virtualMcpId}function pm(t){return[t.body,...t.replies.map(gm)]}function gm(t){return t.body}function hm(t){const e=R.c(13),{item:s}=t,l=X(),i=ao(),{data:a}=Ei(s.id),r=ef(s.id);if(!Wd({reviewerEnabled:i,hasPullRequest:(a??[]).length>0,threadTitles:s.threads.map(xm)}))return null;const c=r.isPending;let d;e[0]!==l?(d=l("taskBoard.taskDialog.runReviewerTitle"),e[0]=l,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==l?(u=()=>r.mutate(void 0,{onSuccess:h=>h?.queued?Qe.success(l("taskBoard.taskDialog.runReviewerSuccess")):Qe.info(l("taskBoard.taskDialog.runReviewerAlreadyRunning")),onError:h=>Qe.error(h.message||l("taskBoard.taskDialog.runReviewerError"))}),e[2]=r,e[3]=l,e[4]=u):u=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(fl,{size:14,className:"shrink-0"}),e[5]=f):f=e[5];let m;e[6]!==l?(m=l("taskBoard.taskDialog.runReviewerButton"),e[6]=l,e[7]=m):m=e[7];let p;return e[8]!==r.isPending||e[9]!==d||e[10]!==u||e[11]!==m?(p=n.jsxs(re,{type:"button",variant:"ghost",size:"sm",disabled:c,title:d,className:"gap-1.5 px-2 font-normal text-muted-foreground",onClick:u,children:[f,m]}),e[8]=r.isPending,e[9]=d,e[10]=u,e[11]=m,e[12]=p):p=e[12],p}function xm(t){return t.title}function jm(t){const e=R.c(28),{item:s,members:l,onOpenThread:i}=t,a=X(),{data:r}=vo(s.id),{org:o}=tt(),{data:c}=vi.useSession(),d=new Map(l.map(Tm)),u={id:c?.user?.id??"me",name:c?.user?.name??a("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=Vi(s.id),[m,p]=Ao(),[h,j]=W.useState(null),x=Io(f.threads),k=s.threads.filter(_i),b=k.filter(Dm),y=Cm;let g;e[0]!==f.threads?(g=F=>F.filter(q=>!f.threads.some(le=>le.threadId===q.threadId)).length,e[0]=f.threads,e[1]=g):g=e[1];const v=g,N=y(f.threads)-y(x)+v(k)-v(b),B=F=>s.threads.find(q=>q.threadId===F),w=F=>{const q=B(F);return q&&i?()=>i(q):void 0},D=(F,q)=>{if(F===Ie){const de=B(q),pe=!!de&&to(de.title,"reviewer");return{id:F,name:a(pe?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel"),isAgent:!0,isReviewer:pe}}if(F===u.id)return u;const le=d.get(F);return{id:F,name:le?.user?.name??F,image:le?.user?.image}},C=m?f.threads:x,S=async F=>{const q=await fetch(`/api/${o.slug}/decopilot/cancel/${F}`,{method:"POST",credentials:"include"});if(q.ok)return;const le=await q.json().catch(Bm);throw Qe.error(le.message??a("taskBoard.agentThread.stopFailed")),new Error(le.message??"stop failed")},T=k.find(Sm),_=F=>{const q=B(F);if(q)return{status:q.status==="in_progress"?"running":q.status==="requires_action"?"waiting":q.failureKind==="cancelled"?"stopped":q.status==="failed"||q.status==="expired"?"failed":"done",onOpen:w(F),onStop:()=>S(q.threadId)}},z=C.map(F=>({id:F.id,threadId:F.threadId,author:D(F.authorId,F.threadId),run:_(F.threadId),onOpenThread:_(F.threadId)?void 0:w(F.threadId),internal:F.audience==="internal",body:F.body,createdAt:F.createdAt,resolved:F.resolved,replies:F.replies.map(q=>({id:q.id,threadId:q.threadId,author:D(q.authorId,q.threadId),onOpenThread:w(q.threadId),internal:q.audience==="internal",body:q.body,createdAt:q.createdAt,replies:[]}))})),I=[...(r??[]).filter(Rd).map(Nm),...(m?k:b).filter(F=>!C.some(q=>q.threadId===F.threadId)).map(vm),...z.map(ym)].sort(km),$=[],E=bm;for(const F of I){if(F.kind==="thread"){$.push({type:"thread",thread:F.thread});continue}if(F.kind==="comment"){$.push({type:"comment",comment:F.comment});continue}const q=$[$.length-1];q?.type==="timeline"&&E(q).toDateString()===new Date(F.at).toDateString()?q.items.push(F.activity):$.push({type:"timeline",items:[F.activity]})}const O="flex flex-col gap-5";let L;e[2]!==a?(L=a("taskBoard.conversation.replies"),e[2]=a,e[3]=L):L=e[3];let U;e[4]!==L?(U=n.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:L}),e[4]=L,e[5]=U):U=e[5];let G;e[6]!==m||e[7]!==N||e[8]!==p||e[9]!==a?(G=(m||N>0)&&n.jsx(re,{type:"button",variant:"ghost",size:"sm",onClick:()=>p(!m),className:"px-2 font-normal text-muted-foreground",children:m?a("taskBoard.conversation.hideBehindTheScenes"):a("taskBoard.conversation.showBehindTheScenes",{count:N})}),e[6]=m,e[7]=N,e[8]=p,e[9]=a,e[10]=G):G=e[10];let P;e[11]!==s?(P=n.jsx(hm,{item:s}),e[11]=s,e[12]=P):P=e[12];let J;e[13]!==s.id||e[14]!==l?(J=n.jsx(Ef,{itemId:s.id,members:l}),e[13]=s.id,e[14]=l,e[15]=J):J=e[15];let H;e[16]!==G||e[17]!==P||e[18]!==J?(H=n.jsxs("div",{className:"flex items-center gap-1",children:[G,P,J]}),e[16]=G,e[17]=P,e[18]=J,e[19]=H):H=e[19];let se;e[20]!==U||e[21]!==H?(se=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[U,H]}),e[20]=U,e[21]=H,e[22]=se):se=e[22];const V="flex flex-col gap-1",ee=$.map((F,q)=>{const le=E(F),de=$[q-1],pe=!de||E(de).toDateString()!==le.toDateString(),Se=()=>F.type==="timeline"?n.jsx(Im,{className:"py-2",items:F.items,memberByUserId:d}):F.type==="comment"?n.jsx(yf,{thread:F.comment,me:u,onEdit:async(oe,ge)=>{try{return await f.edit.mutateAsync({id:oe,body:ge}),!0}catch(ye){const he=ye;return Qe.error(he instanceof Error?he.message:a("taskBoard.taskDialog.commentEditFailed")),!1}},onDelete:oe=>f.remove.mutate(oe),onReply:async oe=>{try{return await f.post.mutateAsync({body:oe,parentId:F.comment.id}),!0}catch(ge){const ye=ge;return Qe.error(ye instanceof Error?ye.message:a("taskBoard.conversation.sendFailed")),!1}},continuation:!pe&&de?.type==="comment"&&To(de.comment,F.comment),replying:h===F.comment.id,onReplyingChange:oe=>j(ge=>oe?F.comment.id:ge===F.comment.id?null:ge),liveRunElsewhere:!!T&&F.comment.run?.status!=="running"&&F.comment.run?.status!=="waiting"},`comment-${F.comment.id}`):n.jsx(nm,{thread:F.thread,onOpen:i},`thread-${F.thread.threadId}`),Be=F.type==="timeline"?F.items[0].id:F.type==="thread"?F.thread.threadId:F.comment.id;return n.jsxs(W.Fragment,{children:[pe&&n.jsxs("div",{className:"text-meta flex items-center gap-3 pt-4 pb-1",children:[n.jsx("span",{className:"h-px flex-1 bg-border"}),n.jsx("time",{dateTime:le.toISOString(),children:le.toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"})}),n.jsx("span",{className:"h-px flex-1 bg-border"})]}),Se()]},`${F.type}-${Be}`)});let ie;e[23]!==ee?(ie=n.jsx("div",{className:V,children:ee}),e[23]=ee,e[24]=ie):ie=e[24];let ne;return e[25]!==ie||e[26]!==se?(ne=n.jsxs("section",{className:O,children:[se,ie]}),e[25]=ie,e[26]=se,e[27]=ne):ne=e[27],ne}function bm(t){return new Date(t.type==="timeline"?t.items[0].occurredAt:t.type==="thread"?t.thread.createdAt:t.comment.createdAt)}function km(t,e){return t.at-e.at}function ym(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function vm(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function Nm(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function Sm(t){return t.status==="in_progress"||t.status==="requires_action"}function Bm(){return{}}function Cm(t){return t.reduce(wm,0)}function wm(t,e){return t+1+e.replies.length}function Dm(t){return t.status==="requires_action"}function Tm(t){return[t.userId,t]}function Fs(t){const e=R.c(7),{icon:s,label:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"ml-1 mr-1 inline-flex h-[1lh] items-center align-top",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("span",{className:"mr-1",children:l}),e[2]=l,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs(n.Fragment,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}const _l="\0";function vl(t){return`${_l}${t}${_l}`}function ks(t,e){return t.split(new RegExp(`${_l}(\\w+)${_l}`)).map((s,l)=>n.jsx(W.Fragment,{children:l%2===0?s:e[s]},l))}function Fa(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function _m(t,e,s){const l=p=>{const h=typeof p=="string"?Od[p]:void 0;if(!h)return String(p??"");const j=h.icon;return n.jsx(Fs,{icon:n.jsx(j,{size:14,className:h.iconClassName}),label:e(h.labelKey)})},i=p=>{const h=typeof p=="string"?et[p]:void 0;return h?n.jsx(Fs,{icon:n.jsx("span",{className:K("size-2 rounded-full",h.dotClassName)}),label:e(h.labelKey)}):String(p??"")},a=p=>{const h=zo(typeof p=="string"?p:null);return h?n.jsx(Fs,{icon:n.jsx(Ws,{size:14,className:"text-muted-foreground"}),label:$o.format(h)}):""},r=p=>!Array.isArray(p)||p.length===0?null:p.map((h,j)=>{const x=h;return n.jsx(Fs,{icon:n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:en(x.color)}}),label:x.name??""},x.id??j)}),o=p=>{if(p===Ie)return n.jsx(Fs,{icon:n.jsx(ct,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const h=typeof p=="string"?s.get(p):void 0;return n.jsx(Fs,{icon:n.jsx(ot,{url:h?.user?.image??void 0,fallback:h?.user?.name??"?",shape:"circle",size:"2xs"}),label:h?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=p=>{const h=p&&typeof p=="object"&&"name"in p?p.name:null;return n.jsx(Fs,{icon:n.jsx(Wt,{size:14,className:"text-muted-foreground"}),label:typeof h=="string"?h:e("taskBoard.sprints.goneLabel")})},d=p=>n.jsx(Fs,{icon:n.jsx(fl,{size:14}),label:Fa(p,e)}),u=t.data,f=vl("from"),m=vl("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"duplicate_reported":{const p=typeof u.title=="string"?u.title:null;return p?e("taskBoard.taskDialog.activityDuplicateReportedTitled",{title:p}):e("taskBoard.taskDialog.activityDuplicateReported")}case"finding_resolved":return e("taskBoard.taskDialog.activityFindingResolved",{url:String(u.url??"")});case"status_changed":{const p=Y1(u.reason);return typeof u.retry=="number"?e("taskBoard.taskDialog.activityRetryScheduled",{attempt:String(u.retry),of:String(u.of??u.retry),reason:p}):typeof u.retriesSpent=="number"&&u.retriesSpent>0?ks(e("taskBoard.taskDialog.activityRetriesExhausted",{to:m,count:String(u.retriesSpent),reason:p}),{to:l(u.to)}):ks(u.from?e("taskBoard.taskDialog.activityMovedFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityMovedTo",{to:m}),{from:l(u.from),to:l(u.to)})}case"assignee_changed":return u.to==null?e("taskBoard.taskDialog.activityUnassigned"):ks(e(u.to===Ie?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:vl("name")}),{name:o(u.to)});case"type_changed":return u.from?e("taskBoard.taskDialog.activityTypeFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityTypeSet",{to:m});case"priority_changed":return u.to==="none"?e("taskBoard.taskDialog.activityPriorityCleared"):ks(!u.from||u.from==="none"?e("taskBoard.taskDialog.activityPrioritySet",{to:m}):e("taskBoard.taskDialog.activityPriorityFromTo",{from:f,to:m}),{from:i(u.from),to:i(u.to)});case"due_date_changed":return u.to==null?e("taskBoard.taskDialog.activityDueDateCleared"):ks(u.from==null?e("taskBoard.taskDialog.activityDueDateSet",{to:m}):e("taskBoard.taskDialog.activityDueDateFromTo",{from:f,to:m}),{from:a(u.from),to:a(u.to)});case"title_changed":return e("taskBoard.taskDialog.activityRenamed",{to:String(u.to??"")});case"description_changed":return e("taskBoard.taskDialog.activityDescriptionUpdated");case"sprint_changed":return u.to==null?ks(e("taskBoard.sprints.activityToBacklog",{from:f}),{from:c(u.from)}):ks(u.from==null?e("taskBoard.sprints.activitySet",{to:m}):e("taskBoard.sprints.activityFromTo",{from:f,to:m}),{from:c(u.from),to:c(u.to)});case"tags_changed":return!Array.isArray(u.to)||u.to.length===0?e("taskBoard.taskDialog.activityTagsCleared"):ks(e("taskBoard.taskDialog.activityTagsSet",{to:m}),{to:r(u.to)});case"review_requested":return ks(e("taskBoard.taskDialog.activityDelegated",{name:vl("name")}),{name:d(u.reviewer)});case"review_approved":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Fa(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Fa(u.reviewer,e)});case"review_changes_requested":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Fa(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Fa(u.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Fa(u.reviewer,e)});case"merge_conflict_resolution":return e("taskBoard.taskDialog.activityMergeConflictResolution");case"merge_failed":{const p=typeof u.detail=="string"?u.detail:"";switch(u.reason){case"no_pr":return e("taskBoard.taskDialog.activityMergeFailedNoPr");case"checks_failing":return e("taskBoard.taskDialog.activityMergeFailedChecksFailing");case"no_connection":return p?e("taskBoard.taskDialog.activityMergeFailedNoConnection",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed");case"rate_limited":return e("taskBoard.taskDialog.activityMergeFailedRateLimited");case"conflict":return e("taskBoard.taskDialog.activityMergeFailedConflict");case"refused":return p?e("taskBoard.taskDialog.activityMergeFailedRefused",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed");default:return p?e("taskBoard.taskDialog.activityMergeFailedError",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed")}}default:{const p=t.action;return String(p)}}}function Sr(t){return!t||t===Ie}function Br(t){return t.action==="finding_resolved"||t.action==="status_changed"&&t.data.reason==="finding_resolved"}function Im(t){const e=R.c(32),{items:s,memberByUserId:l,className:i}=t,a=X(),[r,o]=W.useState(!1);let c;e[0]!==l||e[1]!==a?(c=g=>Br(g)?a("taskBoard.taskDialog.createdBySystemLabel"):Sr(g.actorId)?a("taskBoard.taskDialog.superAgentLabel"):l.get(g.actorId)?.user?.name??a("taskBoard.taskDialog.someoneLabel"),e[0]=l,e[1]=a,e[2]=c):c=e[2];const d=c;let u;e[3]!==l?(u=g=>{const v=g.actorId;if(Br(g))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(It,{size:14,className:"text-muted-foreground"})});if(Sr(v))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(ct,{size:16})});const N=l.get(v);return n.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:n.jsx(ot,{url:N?.user?.image??void 0,fallback:N?.user?.name??"?",shape:"circle",size:"2xs"})})},e[3]=l,e[4]=u):u=e[4];const f=u,m=s.length>yr&&!r;let p;e[5]!==m||e[6]!==s?(p=m?s.slice(0,vr):s,e[5]=m,e[6]=s,e[7]=p):p=e[7];const h=p;let j;e[8]!==i?(j=K("relative flex flex-col gap-4",i),e[8]=i,e[9]=j):j=e[9];let x;e[10]!==h.length?(x=h.length>1&&n.jsx("span",{"aria-hidden":!0,className:"absolute bottom-5 left-2 top-5 w-px bg-border"}),e[10]=h.length,e[11]=x):x=e[11];let k;if(e[12]!==f||e[13]!==d||e[14]!==l||e[15]!==a||e[16]!==h){let g;e[18]!==f||e[19]!==d||e[20]!==l||e[21]!==a?(g=v=>n.jsxs("div",{className:"relative flex items-center gap-2.5",children:[f(v),n.jsxs("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:[d(v)," ",_m(v,a,l),n.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",Al(new Date(v.occurredAt))]})]})]},v.id),e[18]=f,e[19]=d,e[20]=l,e[21]=a,e[22]=g):g=e[22],k=h.map(g),e[12]=f,e[13]=d,e[14]=l,e[15]=a,e[16]=h,e[17]=k}else k=e[17];let b;e[23]!==r||e[24]!==s.length||e[25]!==a?(b=s.length>yr&&n.jsxs("button",{type:"button",onClick:()=>o(Am),className:"relative flex items-center gap-2.5 text-left",children:[n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center rounded-full bg-background text-muted-foreground/60",children:n.jsx(Ys,{size:14})}),n.jsx("span",{className:"text-xs text-muted-foreground/60 hover:text-foreground",children:r?a("taskBoard.taskDialog.timelineFoldLess"):a("taskBoard.taskDialog.timelineFoldMore",{count:String(s.length-vr)})})]}),e[23]=r,e[24]=s.length,e[25]=a,e[26]=b):b=e[26];let y;return e[27]!==j||e[28]!==x||e[29]!==k||e[30]!==b?(y=n.jsxs("div",{className:j,children:[x,k,b]}),e[27]=j,e[28]=x,e[29]=k,e[30]=b,e[31]=y):y=e[31],y}function Am(t){return!t}function zm(t){const e=R.c(59),{item:s,orgSlug:l,onRerun:i}=t,a=X(),{data:r}=vo(s.id),{data:o}=ro();let c;e[0]!==r?(c=r??[],e[0]=r,e[1]=c):c=e[1];let d;e[2]!==c?(d=Q1(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===ur.githubNotAuthenticated,m=u.code===ur.githubConnectionMissing;let p,h,j,x,k,b,y,g,v,N;if(e[4]!==m||e[5]!==u.message||e[6]!==s||e[7]!==f||e[8]!==l||e[9]!==o||e[10]!==a){h=X1({orgSlug:l,repo:s.repo,repositories:o??[],returnTo:Wr(l,s)}),p=Qd,N="destructive",j="mt-2 flex-col",g="flex items-start gap-3",e[21]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(rs,{}),e[21]=v):v=e[21],x="flex flex-col gap-1";let _;e[22]!==a?(_=a("taskBoard.taskDialog.runFailedTitle"),e[22]=a,e[23]=_):_=e[23],e[24]!==_?(k=n.jsx(Xd,{children:_}),e[24]=_,e[25]=k):k=e[25];let z;e[26]!==m||e[27]!==u.message||e[28]!==f||e[29]!==a?(z=m?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[26]=m,e[27]=u.message,e[28]=f,e[29]=a,e[30]=z):z=e[30],e[31]!==z?(b=n.jsx(cr,{children:z}),e[31]=z,e[32]=b):b=e[32],y=f&&h.ownerOnly&&h.owner&&n.jsx(cr,{children:a("taskBoard.taskDialog.runFailedGithubOwnerOnly",{owner:h.owner})}),e[4]=m,e[5]=u.message,e[6]=s,e[7]=f,e[8]=l,e[9]=o,e[10]=a,e[11]=p,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b,e[17]=y,e[18]=g,e[19]=v,e[20]=N}else p=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16],y=e[17],g=e[18],v=e[19],N=e[20];let B;e[33]!==x||e[34]!==k||e[35]!==b||e[36]!==y?(B=n.jsxs("div",{className:x,children:[k,b,y]}),e[33]=x,e[34]=k,e[35]=b,e[36]=y,e[37]=B):B=e[37];let w;e[38]!==B||e[39]!==g||e[40]!==v?(w=n.jsxs("div",{className:g,children:[v,B]}),e[38]=B,e[39]=g,e[40]=v,e[41]=w):w=e[41];let D;e[42]!==m||e[43]!==f||e[44]!==h||e[45]!==a?(D=(f||m)&&n.jsx(re,{size:"sm",asChild:!0,children:n.jsx("a",{href:h.url,children:a(m?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[42]=m,e[43]=f,e[44]=h,e[45]=a,e[46]=D):D=e[46];let C;e[47]!==i||e[48]!==a?(C=i&&n.jsxs(re,{size:"sm",variant:"outline",onClick:i,children:[n.jsx(zl,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[47]=i,e[48]=a,e[49]=C):C=e[49];let S;e[50]!==D||e[51]!==C?(S=n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[D,C]}),e[50]=D,e[51]=C,e[52]=S):S=e[52];let T;return e[53]!==p||e[54]!==j||e[55]!==w||e[56]!==S||e[57]!==N?(T=n.jsxs(p,{variant:N,className:j,children:[w,S]}),e[53]=p,e[54]=j,e[55]=w,e[56]=S,e[57]=N,e[58]=T):T=e[58],T}const $m=new Set(["completed","failed","expired"]);function Rm(t){return t.threads.some(e=>e.status!==null&&!$m.has(e.status))}function Em(t){const e=R.c(43),{items:s,pending:l,onOpenChange:i,onConfirm:a}=t,r=X(),o=s.length;let c;e[0]!==s?(c=s.some(Rm),e[0]=s,e[1]=c):c=e[1];const d=c,u=o>0;let f;e[2]!==o||e[3]!==r?(f=o>1?r("taskBoard.rerun.titleMany",{count:o}):r("taskBoard.rerun.title"),e[2]=o,e[3]=r,e[4]=f):f=e[4];let m;e[5]!==f?(m=n.jsx(ll,{children:f}),e[5]=f,e[6]=m):m=e[6];let p;e[7]!==o||e[8]!==r||e[9]!==d?(p=o>1?r("taskBoard.rerun.descriptionMany",{count:o}):r(d?"taskBoard.rerun.descriptionTakeover":"taskBoard.rerun.description"),e[7]=o,e[8]=r,e[9]=d,e[10]=p):p=e[10];let h;e[11]!==p?(h=n.jsx(Bl,{children:p}),e[11]=p,e[12]=h):h=e[12];let j;e[13]!==m||e[14]!==h?(j=n.jsxs(Sl,{children:[m,h]}),e[13]=m,e[14]=h,e[15]=j):j=e[15];let x;e[16]!==i?(x=()=>i(!1),e[16]=i,e[17]=x):x=e[17];let k;e[18]!==r?(k=r("taskBoard.rerun.cancel"),e[18]=r,e[19]=k):k=e[19];let b;e[20]!==l||e[21]!==x||e[22]!==k?(b=n.jsx(re,{variant:"outline",onClick:x,disabled:l,children:k}),e[20]=l,e[21]=x,e[22]=k,e[23]=b):b=e[23];let y;e[24]!==l?(y=l&&n.jsx(xt,{className:"size-4"}),e[24]=l,e[25]=y):y=e[25];let g;e[26]!==r?(g=r("taskBoard.rerun.confirm"),e[26]=r,e[27]=g):g=e[27];let v;e[28]!==a||e[29]!==l||e[30]!==y||e[31]!==g?(v=n.jsxs(re,{onClick:a,disabled:l,children:[y,g]}),e[28]=a,e[29]=l,e[30]=y,e[31]=g,e[32]=v):v=e[32];let N;e[33]!==b||e[34]!==v?(N=n.jsxs(ki,{children:[b,v]}),e[33]=b,e[34]=v,e[35]=N):N=e[35];let B;e[36]!==N||e[37]!==j?(B=n.jsxs(al,{className:"max-w-md",children:[j,N]}),e[36]=N,e[37]=j,e[38]=B):B=e[38];let w;return e[39]!==i||e[40]!==B||e[41]!==u?(w=n.jsx(nl,{open:u,onOpenChange:i,children:B}),e[39]=i,e[40]=B,e[41]=u,e[42]=w):w=e[42],w}const Cr=380,Om=90,wr=5,Lm="cubic-bezier(0.22, 0.61, 0.36, 1)";function Fm(t,e,s,l=!0){const i=W.useRef(new Map),a=W.useRef(new Map),r=W.useRef(!1);W.useLayoutEffect(()=>{const o=t.current;if(!o)return;if(!l){r.current=!0;return}const c=r.current;r.current=!1;const d=o.querySelectorAll("[data-flip-id]"),u=new Map,f=i.current;i.current=u;const m=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,p=[];for(const g of d){const v=g.dataset.flipId;if(!v)continue;const N=g.getBoundingClientRect(),B=g.dataset.flipLane;if(u.set(v,{rect:N,lane:B}),!s||c)continue;const w=f.get(v);if(!w)continue;const D=w.rect.left-N.left,C=w.rect.top-N.top;(D||C)&&p.push({el:g,dx:D,dy:C,lane:w.lane!==B})}if(!s||m||p.length===0)return;const h=a.current,j=g=>{g instanceof HTMLElement&&(h.set(g,(h.get(g)??0)+1),g.style.overflow="visible")},x=g=>{if(!(g instanceof HTMLElement))return;const v=(h.get(g)??1)-1;if(v>0){h.set(g,v);return}h.delete(g),g.style.overflow=""};for(const g of p){const v=g.lane?` rotate(${g.dx>0?wr:-wr}deg)`:"";g.el.style.transition="none",g.el.style.transform=`translate(${g.dx}px, ${g.dy}px)${v}`,g.lane&&(g.el.style.zIndex="10",j(g.el.closest("[data-lane-scroll]")))}let k=0;const b=[],y=requestAnimationFrame(()=>{for(const g of p){const v=g.lane?k++*Om:0;g.el.style.transition=`transform ${Cr}ms ${Lm} ${v}ms`,g.el.style.transform="",b.push(window.setTimeout(()=>{g.el.style.transition="",g.el.style.transform="",g.el.style.zIndex="",g.lane&&x(g.el.closest("[data-lane-scroll]"))},Cr+v+30))}});return()=>{cancelAnimationFrame(y);for(const g of b)clearTimeout(g);for(const g of p)g.el.style.transition="",g.el.style.transform="",g.el.style.zIndex="",g.lane&&x(g.el.closest("[data-lane-scroll]"))}},[e,t,s,l])}function Pm(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
4
+ `)),N=o&&!r;if(!N&&(!r||r.length===0)&&v.length===0){k=null;break e}let B;e[21]!==s.status?(B=nf(s.status),e[21]=s.status,e[22]=B):B=e[22];const w=B;let D;e[23]!==d||e[24]!==a?(D=()=>d.mutate(void 0,{onSuccess:I=>I?.merged?Qe.success(a("taskBoard.taskDialog.shipSuccess")):Qe.error(a("taskBoard.taskDialog.shipError")),onError:()=>Qe.error(a("taskBoard.taskDialog.shipError"))}),e[23]=d,e[24]=a,e[25]=D):D=e[25];const C=D;let S;e[26]!==u||e[27]!==a?(S=I=>u.mutate(I,{onSuccess:()=>Qe.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>Qe.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[26]=u,e[27]=a,e[28]=S):S=e[28];const T=S;let _;e[29]!==s.threads||e[30]!==i?(_=i?s.threads.find(mm):void 0,e[29]=s.threads,e[30]=i,e[31]=_):_=e[31];const z=_;m=Gf,e[32]!==a?(x=a("taskBoard.taskDialog.linksLabel"),e[32]=a,e[33]=x):x=e[33],p="flex flex-col gap-1",e[34]!==s.previewRoutes||e[35]!==N||e[36]!==i||e[37]!==T||e[38]!==C||e[39]!==z||e[40]!==d||e[41]!==r||e[42]!==c||e[43]!==w||e[44]!==u?(h=N?n.jsx(dm,{}):(r??[]).map(I=>n.jsx(om,{pr:I,routes:s.previewRoutes??[],revalidating:c,previewThread:z,readyToShip:w,shipPending:d.isPending,resolvePending:u.isPending,onShip:C,onResolveConflict:()=>T(I.number),onOpenPreview:i},I.url)),e[34]=s.previewRoutes,e[35]=N,e[36]=i,e[37]=T,e[38]=C,e[39]=z,e[40]=d,e[41]=r,e[42]=c,e[43]=w,e[44]=u,e[45]=h):h=e[45],j=v.map(fm)}e[0]=f.threads,e[1]=l,e[2]=s.previewRoutes,e[3]=s.status,e[4]=s.threads,e[5]=i,e[6]=d,e[7]=r,e[8]=c,e[9]=o,e[10]=u,e[11]=a,e[12]=m,e[13]=p,e[14]=h,e[15]=j,e[16]=x,e[17]=k}else m=e[12],p=e[13],h=e[14],j=e[15],x=e[16],k=e[17];if(k!==Symbol.for("react.early_return_sentinel"))return k;let b;e[46]!==p||e[47]!==h||e[48]!==j?(b=n.jsxs("div",{className:p,children:[h,j]}),e[46]=p,e[47]=h,e[48]=j,e[49]=b):b=e[49];let y;return e[50]!==m||e[51]!==x||e[52]!==b?(y=n.jsx(m,{label:x,children:b}),e[50]=m,e[51]=x,e[52]=b,e[53]=y):y=e[53],y}function fm(t){return n.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-accent",children:[n.jsx(ui,{size:15,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),n.jsx(Ma,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function mm(t){return t.hasPreview&&t.virtualMcpId}function pm(t){return[t.body,...t.replies.map(gm)]}function gm(t){return t.body}function hm(t){const e=R.c(13),{item:s}=t,l=X(),i=ao(),{data:a}=Ei(s.id),r=ef(s.id);if(!Wd({reviewerEnabled:i,hasPullRequest:(a??[]).length>0,threadTitles:s.threads.map(xm)}))return null;const c=r.isPending;let d;e[0]!==l?(d=l("taskBoard.taskDialog.runReviewerTitle"),e[0]=l,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==l?(u=()=>r.mutate(void 0,{onSuccess:h=>h?.queued?Qe.success(l("taskBoard.taskDialog.runReviewerSuccess")):Qe.info(l("taskBoard.taskDialog.runReviewerAlreadyRunning")),onError:h=>Qe.error(h.message||l("taskBoard.taskDialog.runReviewerError"))}),e[2]=r,e[3]=l,e[4]=u):u=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(fl,{size:14,className:"shrink-0"}),e[5]=f):f=e[5];let m;e[6]!==l?(m=l("taskBoard.taskDialog.runReviewerButton"),e[6]=l,e[7]=m):m=e[7];let p;return e[8]!==r.isPending||e[9]!==d||e[10]!==u||e[11]!==m?(p=n.jsxs(re,{type:"button",variant:"ghost",size:"sm",disabled:c,title:d,className:"gap-1.5 px-2 font-normal text-muted-foreground",onClick:u,children:[f,m]}),e[8]=r.isPending,e[9]=d,e[10]=u,e[11]=m,e[12]=p):p=e[12],p}function xm(t){return t.title}function jm(t){const e=R.c(28),{item:s,members:l,onOpenThread:i}=t,a=X(),{data:r}=vo(s.id),{org:o}=tt(),{data:c}=vi.useSession(),d=new Map(l.map(Tm)),u={id:c?.user?.id??"me",name:c?.user?.name??a("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=Vi(s.id),[m,p]=Ao(),[h,j]=W.useState(null),x=Io(f.threads),k=s.threads.filter(_i),b=k.filter(Dm),y=Cm;let g;e[0]!==f.threads?(g=F=>F.filter(q=>!f.threads.some(le=>le.threadId===q.threadId)).length,e[0]=f.threads,e[1]=g):g=e[1];const v=g,N=y(f.threads)-y(x)+v(k)-v(b),B=F=>s.threads.find(q=>q.threadId===F),w=F=>{const q=B(F);return q&&i?()=>i(q):void 0},D=(F,q)=>{if(F===Ie){const de=B(q),pe=!!de&&to(de.title,"reviewer");return{id:F,name:a(pe?"taskBoard.conversation.reviewer":"taskBoard.taskDialog.superAgentLabel"),isAgent:!0,isReviewer:pe}}if(F===u.id)return u;const le=d.get(F);return{id:F,name:le?.user?.name??F,image:le?.user?.image}},C=m?f.threads:x,S=async F=>{const q=await fetch(`/api/${o.slug}/decopilot/cancel/${F}`,{method:"POST",credentials:"include"});if(q.ok)return;const le=await q.json().catch(Bm);throw Qe.error(le.message??a("taskBoard.agentThread.stopFailed")),new Error(le.message??"stop failed")},T=k.find(Sm),_=F=>{const q=B(F);if(q)return{status:q.status==="in_progress"?"running":q.status==="requires_action"?"waiting":q.failureKind==="cancelled"?"stopped":q.status==="failed"||q.status==="expired"?"failed":"done",onOpen:w(F),onStop:()=>S(q.threadId)}},z=C.map(F=>({id:F.id,threadId:F.threadId,author:D(F.authorId,F.threadId),run:_(F.threadId),onOpenThread:_(F.threadId)?void 0:w(F.threadId),internal:F.audience==="internal",body:F.body,createdAt:F.createdAt,resolved:F.resolved,replies:F.replies.map(q=>({id:q.id,threadId:q.threadId,author:D(q.authorId,q.threadId),onOpenThread:w(q.threadId),internal:q.audience==="internal",body:q.body,createdAt:q.createdAt,replies:[]}))})),I=[...(r??[]).filter(Rd).map(Nm),...(m?k:b).filter(F=>!C.some(q=>q.threadId===F.threadId)).map(vm),...z.map(ym)].sort(km),$=[],E=bm;for(const F of I){if(F.kind==="thread"){$.push({type:"thread",thread:F.thread});continue}if(F.kind==="comment"){$.push({type:"comment",comment:F.comment});continue}const q=$[$.length-1];q?.type==="timeline"&&E(q).toDateString()===new Date(F.at).toDateString()?q.items.push(F.activity):$.push({type:"timeline",items:[F.activity]})}const O="flex flex-col gap-5";let L;e[2]!==a?(L=a("taskBoard.conversation.replies"),e[2]=a,e[3]=L):L=e[3];let U;e[4]!==L?(U=n.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:L}),e[4]=L,e[5]=U):U=e[5];let G;e[6]!==m||e[7]!==N||e[8]!==p||e[9]!==a?(G=(m||N>0)&&n.jsx(re,{type:"button",variant:"ghost",size:"sm",onClick:()=>p(!m),className:"px-2 font-normal text-muted-foreground",children:m?a("taskBoard.conversation.hideBehindTheScenes"):a("taskBoard.conversation.showBehindTheScenes",{count:N})}),e[6]=m,e[7]=N,e[8]=p,e[9]=a,e[10]=G):G=e[10];let P;e[11]!==s?(P=n.jsx(hm,{item:s}),e[11]=s,e[12]=P):P=e[12];let Z;e[13]!==s.id||e[14]!==l?(Z=n.jsx(Ef,{itemId:s.id,members:l}),e[13]=s.id,e[14]=l,e[15]=Z):Z=e[15];let H;e[16]!==G||e[17]!==P||e[18]!==Z?(H=n.jsxs("div",{className:"flex items-center gap-1",children:[G,P,Z]}),e[16]=G,e[17]=P,e[18]=Z,e[19]=H):H=e[19];let se;e[20]!==U||e[21]!==H?(se=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[U,H]}),e[20]=U,e[21]=H,e[22]=se):se=e[22];const V="flex flex-col gap-1",ee=$.map((F,q)=>{const le=E(F),de=$[q-1],pe=!de||E(de).toDateString()!==le.toDateString(),Se=()=>F.type==="timeline"?n.jsx(Im,{className:"py-2",items:F.items,memberByUserId:d}):F.type==="comment"?n.jsx(yf,{thread:F.comment,me:u,onEdit:async(oe,ge)=>{try{return await f.edit.mutateAsync({id:oe,body:ge}),!0}catch(ye){const he=ye;return Qe.error(he instanceof Error?he.message:a("taskBoard.taskDialog.commentEditFailed")),!1}},onDelete:oe=>f.remove.mutate(oe),onReply:async oe=>{try{return await f.post.mutateAsync({body:oe,parentId:F.comment.id}),!0}catch(ge){const ye=ge;return Qe.error(ye instanceof Error?ye.message:a("taskBoard.conversation.sendFailed")),!1}},continuation:!pe&&de?.type==="comment"&&To(de.comment,F.comment),replying:h===F.comment.id,onReplyingChange:oe=>j(ge=>oe?F.comment.id:ge===F.comment.id?null:ge),liveRunElsewhere:!!T&&F.comment.run?.status!=="running"&&F.comment.run?.status!=="waiting"},`comment-${F.comment.id}`):n.jsx(nm,{thread:F.thread,onOpen:i},`thread-${F.thread.threadId}`),Be=F.type==="timeline"?F.items[0].id:F.type==="thread"?F.thread.threadId:F.comment.id;return n.jsxs(W.Fragment,{children:[pe&&n.jsxs("div",{className:"text-meta flex items-center gap-3 pt-4 pb-1",children:[n.jsx("span",{className:"h-px flex-1 bg-border"}),n.jsx("time",{dateTime:le.toISOString(),children:le.toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"})}),n.jsx("span",{className:"h-px flex-1 bg-border"})]}),Se()]},`${F.type}-${Be}`)});let ie;e[23]!==ee?(ie=n.jsx("div",{className:V,children:ee}),e[23]=ee,e[24]=ie):ie=e[24];let ne;return e[25]!==ie||e[26]!==se?(ne=n.jsxs("section",{className:O,children:[se,ie]}),e[25]=ie,e[26]=se,e[27]=ne):ne=e[27],ne}function bm(t){return new Date(t.type==="timeline"?t.items[0].occurredAt:t.type==="thread"?t.thread.createdAt:t.comment.createdAt)}function km(t,e){return t.at-e.at}function ym(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function vm(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function Nm(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function Sm(t){return t.status==="in_progress"||t.status==="requires_action"}function Bm(){return{}}function Cm(t){return t.reduce(wm,0)}function wm(t,e){return t+1+e.replies.length}function Dm(t){return t.status==="requires_action"}function Tm(t){return[t.userId,t]}function Fs(t){const e=R.c(7),{icon:s,label:l}=t;let i;e[0]!==s?(i=n.jsx("span",{className:"ml-1 mr-1 inline-flex h-[1lh] items-center align-top",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==l?(a=n.jsx("span",{className:"mr-1",children:l}),e[2]=l,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs(n.Fragment,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}const _l="\0";function vl(t){return`${_l}${t}${_l}`}function ks(t,e){return t.split(new RegExp(`${_l}(\\w+)${_l}`)).map((s,l)=>n.jsx(W.Fragment,{children:l%2===0?s:e[s]},l))}function Fa(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function _m(t,e,s){const l=p=>{const h=typeof p=="string"?Od[p]:void 0;if(!h)return String(p??"");const j=h.icon;return n.jsx(Fs,{icon:n.jsx(j,{size:14,className:h.iconClassName}),label:e(h.labelKey)})},i=p=>{const h=typeof p=="string"?et[p]:void 0;return h?n.jsx(Fs,{icon:n.jsx("span",{className:K("size-2 rounded-full",h.dotClassName)}),label:e(h.labelKey)}):String(p??"")},a=p=>{const h=zo(typeof p=="string"?p:null);return h?n.jsx(Fs,{icon:n.jsx(Ws,{size:14,className:"text-muted-foreground"}),label:$o.format(h)}):""},r=p=>!Array.isArray(p)||p.length===0?null:p.map((h,j)=>{const x=h;return n.jsx(Fs,{icon:n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:en(x.color)}}),label:x.name??""},x.id??j)}),o=p=>{if(p===Ie)return n.jsx(Fs,{icon:n.jsx(ct,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const h=typeof p=="string"?s.get(p):void 0;return n.jsx(Fs,{icon:n.jsx(ot,{url:h?.user?.image??void 0,fallback:h?.user?.name??"?",shape:"circle",size:"2xs"}),label:h?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=p=>{const h=p&&typeof p=="object"&&"name"in p?p.name:null;return n.jsx(Fs,{icon:n.jsx(Wt,{size:14,className:"text-muted-foreground"}),label:typeof h=="string"?h:e("taskBoard.sprints.goneLabel")})},d=p=>n.jsx(Fs,{icon:n.jsx(fl,{size:14}),label:Fa(p,e)}),u=t.data,f=vl("from"),m=vl("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"duplicate_reported":{const p=typeof u.title=="string"?u.title:null;return p?e("taskBoard.taskDialog.activityDuplicateReportedTitled",{title:p}):e("taskBoard.taskDialog.activityDuplicateReported")}case"finding_resolved":return e("taskBoard.taskDialog.activityFindingResolved",{url:String(u.url??"")});case"status_changed":{const p=Y1(u.reason);return typeof u.retry=="number"?e("taskBoard.taskDialog.activityRetryScheduled",{attempt:String(u.retry),of:String(u.of??u.retry),reason:p}):typeof u.retriesSpent=="number"&&u.retriesSpent>0?ks(e("taskBoard.taskDialog.activityRetriesExhausted",{to:m,count:String(u.retriesSpent),reason:p}),{to:l(u.to)}):ks(u.from?e("taskBoard.taskDialog.activityMovedFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityMovedTo",{to:m}),{from:l(u.from),to:l(u.to)})}case"assignee_changed":return u.to==null?e("taskBoard.taskDialog.activityUnassigned"):ks(e(u.to===Ie?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:vl("name")}),{name:o(u.to)});case"type_changed":return u.from?e("taskBoard.taskDialog.activityTypeFromTo",{from:f,to:m}):e("taskBoard.taskDialog.activityTypeSet",{to:m});case"priority_changed":return u.to==="none"?e("taskBoard.taskDialog.activityPriorityCleared"):ks(!u.from||u.from==="none"?e("taskBoard.taskDialog.activityPrioritySet",{to:m}):e("taskBoard.taskDialog.activityPriorityFromTo",{from:f,to:m}),{from:i(u.from),to:i(u.to)});case"due_date_changed":return u.to==null?e("taskBoard.taskDialog.activityDueDateCleared"):ks(u.from==null?e("taskBoard.taskDialog.activityDueDateSet",{to:m}):e("taskBoard.taskDialog.activityDueDateFromTo",{from:f,to:m}),{from:a(u.from),to:a(u.to)});case"title_changed":return e("taskBoard.taskDialog.activityRenamed",{to:String(u.to??"")});case"description_changed":return e("taskBoard.taskDialog.activityDescriptionUpdated");case"sprint_changed":return u.to==null?ks(e("taskBoard.sprints.activityToBacklog",{from:f}),{from:c(u.from)}):ks(u.from==null?e("taskBoard.sprints.activitySet",{to:m}):e("taskBoard.sprints.activityFromTo",{from:f,to:m}),{from:c(u.from),to:c(u.to)});case"tags_changed":return!Array.isArray(u.to)||u.to.length===0?e("taskBoard.taskDialog.activityTagsCleared"):ks(e("taskBoard.taskDialog.activityTagsSet",{to:m}),{to:r(u.to)});case"review_requested":return ks(e("taskBoard.taskDialog.activityDelegated",{name:vl("name")}),{name:d(u.reviewer)});case"review_approved":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Fa(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Fa(u.reviewer,e)});case"review_changes_requested":return typeof u.notes=="string"&&u.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Fa(u.reviewer,e),notes:u.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Fa(u.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Fa(u.reviewer,e)});case"merge_conflict_resolution":return e("taskBoard.taskDialog.activityMergeConflictResolution");case"merge_failed":{const p=typeof u.detail=="string"?u.detail:"";switch(u.reason){case"no_pr":return e("taskBoard.taskDialog.activityMergeFailedNoPr");case"checks_failing":return e("taskBoard.taskDialog.activityMergeFailedChecksFailing");case"no_connection":return p?e("taskBoard.taskDialog.activityMergeFailedNoConnection",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed");case"rate_limited":return e("taskBoard.taskDialog.activityMergeFailedRateLimited");case"conflict":return e("taskBoard.taskDialog.activityMergeFailedConflict");case"refused":return p?e("taskBoard.taskDialog.activityMergeFailedRefused",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed");default:return p?e("taskBoard.taskDialog.activityMergeFailedError",{detail:p}):e("taskBoard.taskDialog.activityMergeFailed")}}default:{const p=t.action;return String(p)}}}function Sr(t){return!t||t===Ie}function Br(t){return t.action==="finding_resolved"||t.action==="status_changed"&&t.data.reason==="finding_resolved"}function Im(t){const e=R.c(32),{items:s,memberByUserId:l,className:i}=t,a=X(),[r,o]=W.useState(!1);let c;e[0]!==l||e[1]!==a?(c=g=>Br(g)?a("taskBoard.taskDialog.createdBySystemLabel"):Sr(g.actorId)?a("taskBoard.taskDialog.superAgentLabel"):l.get(g.actorId)?.user?.name??a("taskBoard.taskDialog.someoneLabel"),e[0]=l,e[1]=a,e[2]=c):c=e[2];const d=c;let u;e[3]!==l?(u=g=>{const v=g.actorId;if(Br(g))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(It,{size:14,className:"text-muted-foreground"})});if(Sr(v))return n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:n.jsx(ct,{size:16})});const N=l.get(v);return n.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:n.jsx(ot,{url:N?.user?.image??void 0,fallback:N?.user?.name??"?",shape:"circle",size:"2xs"})})},e[3]=l,e[4]=u):u=e[4];const f=u,m=s.length>yr&&!r;let p;e[5]!==m||e[6]!==s?(p=m?s.slice(0,vr):s,e[5]=m,e[6]=s,e[7]=p):p=e[7];const h=p;let j;e[8]!==i?(j=K("relative flex flex-col gap-4",i),e[8]=i,e[9]=j):j=e[9];let x;e[10]!==h.length?(x=h.length>1&&n.jsx("span",{"aria-hidden":!0,className:"absolute bottom-5 left-2 top-5 w-px bg-border"}),e[10]=h.length,e[11]=x):x=e[11];let k;if(e[12]!==f||e[13]!==d||e[14]!==l||e[15]!==a||e[16]!==h){let g;e[18]!==f||e[19]!==d||e[20]!==l||e[21]!==a?(g=v=>n.jsxs("div",{className:"relative flex items-center gap-2.5",children:[f(v),n.jsxs("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:[d(v)," ",_m(v,a,l),n.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",Al(new Date(v.occurredAt))]})]})]},v.id),e[18]=f,e[19]=d,e[20]=l,e[21]=a,e[22]=g):g=e[22],k=h.map(g),e[12]=f,e[13]=d,e[14]=l,e[15]=a,e[16]=h,e[17]=k}else k=e[17];let b;e[23]!==r||e[24]!==s.length||e[25]!==a?(b=s.length>yr&&n.jsxs("button",{type:"button",onClick:()=>o(Am),className:"relative flex items-center gap-2.5 text-left",children:[n.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center rounded-full bg-background text-muted-foreground/60",children:n.jsx(Ys,{size:14})}),n.jsx("span",{className:"text-xs text-muted-foreground/60 hover:text-foreground",children:r?a("taskBoard.taskDialog.timelineFoldLess"):a("taskBoard.taskDialog.timelineFoldMore",{count:String(s.length-vr)})})]}),e[23]=r,e[24]=s.length,e[25]=a,e[26]=b):b=e[26];let y;return e[27]!==j||e[28]!==x||e[29]!==k||e[30]!==b?(y=n.jsxs("div",{className:j,children:[x,k,b]}),e[27]=j,e[28]=x,e[29]=k,e[30]=b,e[31]=y):y=e[31],y}function Am(t){return!t}function zm(t){const e=R.c(59),{item:s,orgSlug:l,onRerun:i}=t,a=X(),{data:r}=vo(s.id),{data:o}=ro();let c;e[0]!==r?(c=r??[],e[0]=r,e[1]=c):c=e[1];let d;e[2]!==c?(d=Q1(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===ur.githubNotAuthenticated,m=u.code===ur.githubConnectionMissing;let p,h,j,x,k,b,y,g,v,N;if(e[4]!==m||e[5]!==u.message||e[6]!==s||e[7]!==f||e[8]!==l||e[9]!==o||e[10]!==a){h=X1({orgSlug:l,repo:s.repo,repositories:o??[],returnTo:Wr(l,s)}),p=Qd,N="destructive",j="mt-2 flex-col",g="flex items-start gap-3",e[21]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(rs,{}),e[21]=v):v=e[21],x="flex flex-col gap-1";let _;e[22]!==a?(_=a("taskBoard.taskDialog.runFailedTitle"),e[22]=a,e[23]=_):_=e[23],e[24]!==_?(k=n.jsx(Xd,{children:_}),e[24]=_,e[25]=k):k=e[25];let z;e[26]!==m||e[27]!==u.message||e[28]!==f||e[29]!==a?(z=m?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[26]=m,e[27]=u.message,e[28]=f,e[29]=a,e[30]=z):z=e[30],e[31]!==z?(b=n.jsx(cr,{children:z}),e[31]=z,e[32]=b):b=e[32],y=f&&h.ownerOnly&&h.owner&&n.jsx(cr,{children:a("taskBoard.taskDialog.runFailedGithubOwnerOnly",{owner:h.owner})}),e[4]=m,e[5]=u.message,e[6]=s,e[7]=f,e[8]=l,e[9]=o,e[10]=a,e[11]=p,e[12]=h,e[13]=j,e[14]=x,e[15]=k,e[16]=b,e[17]=y,e[18]=g,e[19]=v,e[20]=N}else p=e[11],h=e[12],j=e[13],x=e[14],k=e[15],b=e[16],y=e[17],g=e[18],v=e[19],N=e[20];let B;e[33]!==x||e[34]!==k||e[35]!==b||e[36]!==y?(B=n.jsxs("div",{className:x,children:[k,b,y]}),e[33]=x,e[34]=k,e[35]=b,e[36]=y,e[37]=B):B=e[37];let w;e[38]!==B||e[39]!==g||e[40]!==v?(w=n.jsxs("div",{className:g,children:[v,B]}),e[38]=B,e[39]=g,e[40]=v,e[41]=w):w=e[41];let D;e[42]!==m||e[43]!==f||e[44]!==h||e[45]!==a?(D=(f||m)&&n.jsx(re,{size:"sm",asChild:!0,children:n.jsx("a",{href:h.url,children:a(m?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[42]=m,e[43]=f,e[44]=h,e[45]=a,e[46]=D):D=e[46];let C;e[47]!==i||e[48]!==a?(C=i&&n.jsxs(re,{size:"sm",variant:"outline",onClick:i,children:[n.jsx(zl,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[47]=i,e[48]=a,e[49]=C):C=e[49];let S;e[50]!==D||e[51]!==C?(S=n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[D,C]}),e[50]=D,e[51]=C,e[52]=S):S=e[52];let T;return e[53]!==p||e[54]!==j||e[55]!==w||e[56]!==S||e[57]!==N?(T=n.jsxs(p,{variant:N,className:j,children:[w,S]}),e[53]=p,e[54]=j,e[55]=w,e[56]=S,e[57]=N,e[58]=T):T=e[58],T}const $m=new Set(["completed","failed","expired"]);function Rm(t){return t.threads.some(e=>e.status!==null&&!$m.has(e.status))}function Em(t){const e=R.c(43),{items:s,pending:l,onOpenChange:i,onConfirm:a}=t,r=X(),o=s.length;let c;e[0]!==s?(c=s.some(Rm),e[0]=s,e[1]=c):c=e[1];const d=c,u=o>0;let f;e[2]!==o||e[3]!==r?(f=o>1?r("taskBoard.rerun.titleMany",{count:o}):r("taskBoard.rerun.title"),e[2]=o,e[3]=r,e[4]=f):f=e[4];let m;e[5]!==f?(m=n.jsx(ll,{children:f}),e[5]=f,e[6]=m):m=e[6];let p;e[7]!==o||e[8]!==r||e[9]!==d?(p=o>1?r("taskBoard.rerun.descriptionMany",{count:o}):r(d?"taskBoard.rerun.descriptionTakeover":"taskBoard.rerun.description"),e[7]=o,e[8]=r,e[9]=d,e[10]=p):p=e[10];let h;e[11]!==p?(h=n.jsx(Bl,{children:p}),e[11]=p,e[12]=h):h=e[12];let j;e[13]!==m||e[14]!==h?(j=n.jsxs(Sl,{children:[m,h]}),e[13]=m,e[14]=h,e[15]=j):j=e[15];let x;e[16]!==i?(x=()=>i(!1),e[16]=i,e[17]=x):x=e[17];let k;e[18]!==r?(k=r("taskBoard.rerun.cancel"),e[18]=r,e[19]=k):k=e[19];let b;e[20]!==l||e[21]!==x||e[22]!==k?(b=n.jsx(re,{variant:"outline",onClick:x,disabled:l,children:k}),e[20]=l,e[21]=x,e[22]=k,e[23]=b):b=e[23];let y;e[24]!==l?(y=l&&n.jsx(xt,{className:"size-4"}),e[24]=l,e[25]=y):y=e[25];let g;e[26]!==r?(g=r("taskBoard.rerun.confirm"),e[26]=r,e[27]=g):g=e[27];let v;e[28]!==a||e[29]!==l||e[30]!==y||e[31]!==g?(v=n.jsxs(re,{onClick:a,disabled:l,children:[y,g]}),e[28]=a,e[29]=l,e[30]=y,e[31]=g,e[32]=v):v=e[32];let N;e[33]!==b||e[34]!==v?(N=n.jsxs(ki,{children:[b,v]}),e[33]=b,e[34]=v,e[35]=N):N=e[35];let B;e[36]!==N||e[37]!==j?(B=n.jsxs(al,{className:"max-w-md",children:[j,N]}),e[36]=N,e[37]=j,e[38]=B):B=e[38];let w;return e[39]!==i||e[40]!==B||e[41]!==u?(w=n.jsx(nl,{open:u,onOpenChange:i,children:B}),e[39]=i,e[40]=B,e[41]=u,e[42]=w):w=e[42],w}const Cr=380,Om=90,wr=5,Lm="cubic-bezier(0.22, 0.61, 0.36, 1)";function Fm(t,e,s,l=!0){const i=W.useRef(new Map),a=W.useRef(new Map),r=W.useRef(!1);W.useLayoutEffect(()=>{const o=t.current;if(!o)return;if(!l){r.current=!0;return}const c=r.current;r.current=!1;const d=o.querySelectorAll("[data-flip-id]"),u=new Map,f=i.current;i.current=u;const m=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,p=[];for(const g of d){const v=g.dataset.flipId;if(!v)continue;const N=g.getBoundingClientRect(),B=g.dataset.flipLane;if(u.set(v,{rect:N,lane:B}),!s||c)continue;const w=f.get(v);if(!w)continue;const D=w.rect.left-N.left,C=w.rect.top-N.top;(D||C)&&p.push({el:g,dx:D,dy:C,lane:w.lane!==B})}if(!s||m||p.length===0)return;const h=a.current,j=g=>{g instanceof HTMLElement&&(h.set(g,(h.get(g)??0)+1),g.style.overflow="visible")},x=g=>{if(!(g instanceof HTMLElement))return;const v=(h.get(g)??1)-1;if(v>0){h.set(g,v);return}h.delete(g),g.style.overflow=""};for(const g of p){const v=g.lane?` rotate(${g.dx>0?wr:-wr}deg)`:"";g.el.style.transition="none",g.el.style.transform=`translate(${g.dx}px, ${g.dy}px)${v}`,g.lane&&(g.el.style.zIndex="10",j(g.el.closest("[data-lane-scroll]")))}let k=0;const b=[],y=requestAnimationFrame(()=>{for(const g of p){const v=g.lane?k++*Om:0;g.el.style.transition=`transform ${Cr}ms ${Lm} ${v}ms`,g.el.style.transform="",b.push(window.setTimeout(()=>{g.el.style.transition="",g.el.style.transform="",g.el.style.zIndex="",g.lane&&x(g.el.closest("[data-lane-scroll]"))},Cr+v+30))}});return()=>{cancelAnimationFrame(y);for(const g of b)clearTimeout(g);for(const g of p)g.el.style.transition="",g.el.style.transform="",g.el.style.zIndex="",g.lane&&x(g.el.closest("[data-lane-scroll]"))}},[e,t,s,l])}function Pm(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
5
5
 
6
6
  `)];if(e.length>0){const l=e.map(i=>{const a=i.merged?"merged":i.state??(i.draft?"draft":"open"),r=i.title?.trim()||`${i.repoOwner}/${i.repoName}`;return`- #${i.number} ${r} [${a}] ${i.url}`});s.push(["## Linked pull requests",...l].join(`
7
7
  `))}if(t.threads.length>0){const l=t.threads.map(i=>{const a=i.title?.trim()||"Untitled chat";return i.status?`- ${a} [${i.status}]`:`- ${a}`});s.push(["## Other chats on this task",...l].join(`
8
8
  `))}return s.join(`
9
9
 
10
- `)}const Mm=["sprint","assignee","priority","due","tags","project"];function Eo(t,e,s){return Mm.filter(l=>{switch(l){case"assignee":return t.assignee!==null;case"priority":return t.priority!==null;case"due":return t.due!==null;case"tags":return t.tags.length>0;case"project":return ku(t.project,e);case"sprint":return t.sprint!==null&&t.sprint!==s;default:return l}})}function Km(t,e,s){switch(e){case"assignee":return{...t,assignee:null};case"priority":return{...t,priority:null};case"due":return{...t,due:null};case"tags":return{...t,tags:[]};case"project":return{...t,project:null};case"sprint":return{...t,sprint:s};default:return e}}const Oo=["status","assignee","priority","tags","project"];function Dr(t){return Oo.includes(t)}const Um=["customer_approval","qa","in_review","ready_for_deployment","in_progress","todo","triage","post_deploy_validation","done","archived"],xi="__no_tag__";function qm(t,e){return t===null?[]:e===null||e===t?[t]:[t,e]}function Lo(t,e,s,l=""){const[i,...a]=e;if(i===void 0)return[];const{keysOf:r,order:o,last:c}=Gm(i,s),d=new Map;for(const m of t)for(const p of r(m)){const h=d.get(p);h?h.push(m):d.set(p,[m])}const u=[...d.keys()],f=m=>{if(m===c)return Number.MAX_SAFE_INTEGER;const p=o.indexOf(m);return p!==-1?p:o.length+u.indexOf(m)};return u.sort((m,p)=>f(m)-f(p)).map(m=>{const p=d.get(m)??[],h=`${l}/${i}:${m}`;return{groupBy:i,key:m,path:h,items:p,collapsedByDefault:i==="status"&&Jr.includes(m),children:a.length>0?Lo(p,a,s,h):null}})}function Gm(t,e){switch(t){case"status":return{keysOf:s=>[s.status],order:Um};case"priority":return{keysOf:s=>[s.priority],order:[...Ts].reverse()};case"assignee":return{keysOf:s=>[s.assigneeId??qs],order:[Ie,...e.memberIds],last:qs};case"tags":return{keysOf:s=>s.tags.length>0?s.tags.map(l=>l.id):[xi],order:e.tagIds,last:xi};case"project":return{keysOf:s=>[Oi(s,e.index)?.id??Xs],order:e.index.options.map(s=>s.id),last:Xs};default:return t}}function Fo(t,e){return e.get(t.path)??!t.collapsedByDefault}function Vm(t,e,s,l){const i=new Map(t),a=!Fo(e,t);for(const r of l?s:[e])i.set(r.path,a);return i}const Po=["assignee","due","tags","project","priority"];function Hm(t){return Po.includes(t)}function Yi(t){return t==="priority"?"desc":"asc"}function Ym(t,e,s,l){const i=Qm(e,l),a=s==="asc"?1:-1;return t.map(r=>({item:r,key:i(r)})).sort((r,o)=>r.key===null||o.key===null?r.key===o.key?0:r.key===null?1:-1:a*Wm(r.key,o.key)).map(({item:r})=>r)}function Wm(t,e){return typeof t=="number"&&typeof e=="number"?t-e:String(t).localeCompare(String(e),void 0,{sensitivity:"base"})}function Qm(t,e){switch(t){case"assignee":return s=>s.assigneeId?s.assigneeId===Ie?e.superAgentName:e.memberNames.get(s.assigneeId)??s.assigneeId:null;case"due":return s=>s.dueDate?Date.parse(s.dueDate):null;case"tags":return s=>s.tags.length>0?s.tags.map(l=>l.name).sort((l,i)=>l.localeCompare(i))[0]:null;case"project":return s=>Oi(s,e.index)?.title??null;case"priority":return s=>s.priority==="none"?null:Ts.indexOf(s.priority);default:return t}}function Mo(t){const e=R.c(4),{priority:s}=t,l=et[s];let i;e[0]!==l.dotClassName?(i=K("size-2 shrink-0 rounded-full",l.dotClassName),e[0]=l.dotClassName,e[1]=i):i=e[1];let a;return e[2]!==i?(a=n.jsx("span",{className:i}),e[2]=i,e[3]=a):a=e[3],a}function Ko(t){const e=R.c(4),{color:s}=t;let l;e[0]!==s?(l=en(s),e[0]=s,e[1]=l):l=e[1];let i;return e[2]!==l?(i=n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l}}),e[2]=l,e[3]=i):i=e[3],i}function oi(t,e){return[...t].sort((s,l)=>e(s).localeCompare(e(l),void 0,{sensitivity:"base"}))}function Uo(t){const e=R.c(113),{members:s,tags:l,sprints:i,index:a,scoped:r}=t,o=r===void 0?!1:r,c=X();let d;e[0]!==s?(d=Q=>s.find(fe=>fe.userId===Q),e[0]=s,e[1]=d):d=e[1];const u=d;let f;e[2]!==u||e[3]!==c?(f=Q=>u(Q)?.user?.name??c("taskBoard.taskFilters.assigneeMember"),e[2]=u,e[3]=c,e[4]=f):f=e[4];const m=f;let p;e[5]!==c?(p=c("taskBoard.taskFilters.assigneeLabel"),e[5]=c,e[6]=p):p=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vs,{size:14,className:"shrink-0"}),e[7]=h):h=e[7];let j;e[8]!==c?(j=c("taskBoard.taskFilters.assigneeUnassigned"),e[8]=c,e[9]=j):j=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Vs,{size:14,className:"shrink-0 text-muted-foreground"}),e[10]=x):x=e[10];let k;e[11]!==j?(k={id:qs,label:j,glyph:x,apply:p2,isSelected:m2},e[11]=j,e[12]=k):k=e[12];let b;e[13]!==c?(b=c("taskBoard.taskFilters.assigneeSuperAgent"),e[13]=c,e[14]=b):b=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ct,{size:14}),e[15]=y):y=e[15];let g;e[16]!==b?(g={id:Ie,label:b,glyph:y,apply:f2,isSelected:u2},e[16]=b,e[17]=g):g=e[17];let v;e[18]!==s||e[19]!==g||e[20]!==k?(v=[k,g,...oi(s,d2).map(c2)],e[18]=s,e[19]=g,e[20]=k,e[21]=v):v=e[21];let N;e[22]!==m||e[23]!==c?(N=Q=>Q.assignee===qs?c("taskBoard.taskFilters.assigneeUnassigned"):Q.assignee===Ie?c("taskBoard.taskFilters.assigneeSuperAgent"):Q.assignee?m(Q.assignee):"",e[22]=m,e[23]=c,e[24]=N):N=e[24];let B;e[25]!==u?(B=Q=>{if(Q.assignee===Ie)return n.jsx(ct,{size:14});const fe=Q.assignee?u(Q.assignee):void 0;return fe?n.jsx(ot,{url:fe.user?.image??void 0,fallback:fe.user?.name??"?",shape:"circle",size:"2xs"}):n.jsx(Vs,{size:14,className:"shrink-0"})},e[25]=u,e[26]=B):B=e[26];let w;e[27]!==v||e[28]!==N||e[29]!==B||e[30]!==p?(w={id:"assignee",label:p,icon:h,options:v,valueLabel:N,valueGlyph:B},e[27]=v,e[28]=N,e[29]=B,e[30]=p,e[31]=w):w=e[31];const D=w;let C;e[32]!==c?(C=c("taskBoard.taskFilters.priorityLabel"),e[32]=c,e[33]=C):C=e[33];let S;e[34]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ur,{size:14,className:"shrink-0"}),e[34]=S):S=e[34];let T;e[35]!==c?(T=Ts.map(Q=>({id:Q,label:c(et[Q].labelKey),glyph:n.jsx(Mo,{priority:Q}),apply:fe=>({...fe,priority:Q}),isSelected:fe=>fe.priority===Q})),e[35]=c,e[36]=T):T=e[36];let _;e[37]!==c?(_=Q=>Q.priority?c(et[Q.priority].labelKey):"",e[37]=c,e[38]=_):_=e[38];let z;e[39]!==C||e[40]!==T||e[41]!==_?(z={id:"priority",label:C,icon:S,options:T,valueLabel:_,valueGlyph:o2},e[39]=C,e[40]=T,e[41]=_,e[42]=z):z=e[42];const I=z;let $;e[43]!==c?($=c("taskBoard.taskFilters.dueDateLabel"),e[43]=c,e[44]=$):$=e[44];let E;e[45]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ws,{size:14,className:"shrink-0"}),e[45]=E):E=e[45];let O;e[46]!==c?(O=Ad.map(Q=>({id:Q,label:c(ir(Q)),glyph:n.jsx(Ws,{size:14,className:K("shrink-0",Q==="overdue"?"text-destructive":"text-muted-foreground")}),apply:fe=>({...fe,due:Q}),isSelected:fe=>fe.due===Q})),e[46]=c,e[47]=O):O=e[47];let L;e[48]!==c?(L=Q=>Q.due?c(ir(Q.due)):"",e[48]=c,e[49]=L):L=e[49];let U;e[50]!==$||e[51]!==O||e[52]!==L?(U={id:"due",label:$,icon:E,options:O,valueLabel:L,valueGlyph:r2},e[50]=$,e[51]=O,e[52]=L,e[53]=U):U=e[53];const G=U;let P;e[54]!==c?(P=c("taskBoard.taskFilters.tagsLabel"),e[54]=c,e[55]=P):P=e[55];let J;e[56]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(Cl,{size:14,className:"shrink-0"}),e[56]=J):J=e[56];let H;e[57]!==l?(H=oi(l,i2).map(l2),e[57]=l,e[58]=H):H=e[58];let se;e[59]!==c||e[60]!==l?(se=Q=>Q.tags.length===1?l.find(fe=>fe.id===Q.tags[0])?.name??c("taskBoard.taskFilters.tagsLabel"):c("taskBoard.taskFilters.tagsSelectedCount",{count:Q.tags.length}),e[59]=c,e[60]=l,e[61]=se):se=e[61];let V;e[62]!==l?(V=Q=>Q.tags.length===1?n.jsx(Ko,{color:l.find(fe=>fe.id===Q.tags[0])?.color}):n.jsx(Cl,{size:14,className:"shrink-0"}),e[62]=l,e[63]=V):V=e[63];let ee;e[64]!==P||e[65]!==H||e[66]!==se||e[67]!==V?(ee={id:"tags",label:P,icon:J,multi:!0,options:H,valueLabel:se,valueGlyph:V},e[64]=P,e[65]=H,e[66]=se,e[67]=V,e[68]=ee):ee=e[68];const ie=ee;let ne;e[69]!==c?(ne=c("taskBoard.taskFilters.projectLabel"),e[69]=c,e[70]=ne):ne=e[70];let F;e[71]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(ls,{entry:void 0}),e[71]=F):F=e[71];let q;e[72]!==c?(q=c("taskBoard.taskFilters.projectNone"),e[72]=c,e[73]=q):q=e[73];let le;e[74]===Symbol.for("react.memo_cache_sentinel")?(le=n.jsx(ls,{entry:void 0}),e[74]=le):le=e[74];let de;e[75]!==q?(de={id:Xs,label:q,glyph:le,apply:a2,isSelected:n2},e[75]=q,e[76]=de):de=e[76];let pe;e[77]!==a.options||e[78]!==de?(pe=[de,...oi(a.options,s2).map(t2)],e[77]=a.options,e[78]=de,e[79]=pe):pe=e[79];let Se;e[80]!==a||e[81]!==c?(Se=Q=>Q.project===Xs?c("taskBoard.taskFilters.projectNone"):Q.project?Ua(Q.project,a)?.title??Q.project:"",e[80]=a,e[81]=c,e[82]=Se):Se=e[82];let Be;e[83]!==a?(Be=Q=>n.jsx(ls,{entry:Q.project?Ua(Q.project,a):void 0}),e[83]=a,e[84]=Be):Be=e[84];let oe;e[85]!==ne||e[86]!==pe||e[87]!==Se||e[88]!==Be?(oe={id:"project",label:ne,icon:F,options:pe,valueLabel:Se,valueGlyph:Be},e[85]=ne,e[86]=pe,e[87]=Se,e[88]=Be,e[89]=oe):oe=e[89];const ge=oe;let ye;e[90]!==i?(ye=new Map(i.map(e2)),e[90]=i,e[91]=ye):ye=e[91];const he=ye;let ae;e[92]!==c?(ae=c("taskBoard.sprints.label"),e[92]=c,e[93]=ae):ae=e[93];let we;e[94]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(Wt,{size:14,className:"shrink-0"}),e[94]=we):we=e[94];let ce;e[95]!==i||e[96]!==c?(ce=i.length===0?[]:[{id:Bs,label:c("taskBoard.sprints.backlog"),glyph:n.jsx(dl,{size:14,className:"shrink-0 text-muted-foreground"}),apply:Zm,isSelected:Jm},...i.map(Q=>({id:Q.id,label:ol(Q,c),glyph:n.jsx(Wt,{size:14,className:K("shrink-0",Q.state==="active"?"text-foreground":"text-muted-foreground")}),apply:fe=>({...fe,sprint:Q.id}),isSelected:fe=>fe.sprint===Q.id}))],e[95]=i,e[96]=c,e[97]=ce):ce=e[97];let xe;e[98]!==he||e[99]!==c?(xe=Q=>Q.sprint===Bs?c("taskBoard.sprints.backlog"):Q.sprint?he.get(Q.sprint)?.name??"":"",e[98]=he,e[99]=c,e[100]=xe):xe=e[100];let be;e[101]!==ae||e[102]!==ce||e[103]!==xe?(be={id:"sprint",label:ae,icon:we,options:ce,valueLabel:xe,valueGlyph:Xm},e[101]=ae,e[102]=ce,e[103]=xe,e[104]=be):be=e[104];const ue=be;let ze;return e[105]!==D||e[106]!==G||e[107]!==I||e[108]!==ge||e[109]!==o||e[110]!==ue||e[111]!==ie?(ze=o?[ue,D,I,G,ie]:[ue,D,I,G,ie,ge],e[105]=D,e[106]=G,e[107]=I,e[108]=ge,e[109]=o,e[110]=ue,e[111]=ie,e[112]=ze):ze=e[112],ze}function Xm(t){return t.sprint===Bs?n.jsx(dl,{size:14,className:"shrink-0"}):n.jsx(Wt,{size:14,className:"shrink-0"})}function Jm(t){return t.sprint===Bs}function Zm(t){return{...t,sprint:Bs}}function e2(t){return[t.id,t]}function t2(t){return{id:t.id,label:t.title,glyph:n.jsx(ls,{entry:t}),apply:e=>({...e,project:t.id}),isSelected:e=>e.project===t.id}}function s2(t){return t.title}function n2(t){return t.project===Xs}function a2(t){return{...t,project:Xs}}function l2(t){return{id:t.id,label:t.name,glyph:n.jsx(Ko,{color:t.color}),apply:e=>({...e,tags:e.tags.includes(t.id)?e.tags.filter(s=>s!==t.id):[...e.tags,t.id]}),isSelected:e=>e.tags.includes(t.id)}}function i2(t){return t.name}function r2(){return n.jsx(Ws,{size:14,className:"shrink-0"})}function o2(t){return t.priority?n.jsx(Mo,{priority:t.priority}):null}function c2(t){return{id:t.userId,label:t.user?.name??t.userId,glyph:n.jsx(ot,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"2xs"}),apply:e=>({...e,assignee:t.userId}),isSelected:e=>e.assignee===t.userId}}function d2(t){return t.user?.name??t.userId}function u2(t){return t.assignee===Ie}function f2(t){return{...t,assignee:Ie}}function m2(t){return t.assignee===qs}function p2(t){return{...t,assignee:qs}}function Wi(t){const e=R.c(5),{count:s}=t,l=X();let i;e[0]!==s||e[1]!==l?(i=l("taskBoard.viewControls.matchCount",{count:s}),e[0]=s,e[1]=l,e[2]=i):i=e[2];let a;return e[3]!==i?(a=n.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=a):a=e[4],a}function Js(t){const e=R.c(2),{children:s}=t;let l;return e[0]!==s?(l=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s}),e[0]=s,e[1]=l):l=e[1],l}function g2(t){const e=R.c(22),{field:s,open:l,countFor:i,onSelect:a}=t;let r;e[0]!==s.icon?(r=n.jsx(Js,{children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let o;e[2]!==s.label?(o=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Va,{size:12,className:"ml-auto shrink-0 text-muted-foreground/60"}),e[4]=c):c=e[4];let d;e[5]!==s.label||e[6]!==r||e[7]!==o?(d=n.jsx(pd,{asChild:!0,children:n.jsxs(Hs,{value:s.label,children:[r,o,c]})}),e[5]=s.label,e[6]=r,e[7]=o,e[8]=d):d=e[8];let u;if(e[9]!==i||e[10]!==s.options||e[11]!==a){let p;e[13]!==i||e[14]!==a?(p=h=>n.jsx(j2,{option:h,count:i(h),onSelect:()=>a(h)},h.id),e[13]=i,e[14]=a,e[15]=p):p=e[15],u=s.options.map(p),e[9]=i,e[10]=s.options,e[11]=a,e[12]=u}else u=e[12];let f;e[16]!==u?(f=n.jsx(as,{side:"right",align:"start",alignOffset:-5,className:"max-h-72 w-64 overflow-y-auto p-1",onOpenAutoFocus:x2,onCloseAutoFocus:h2,children:u}),e[16]=u,e[17]=f):f=e[17];let m;return e[18]!==l||e[19]!==d||e[20]!==f?(m=n.jsxs(ns,{open:l,children:[d,f]}),e[18]=l,e[19]=d,e[20]=f,e[21]=m):m=e[21],m}function h2(t){return t.preventDefault()}function x2(t){return t.preventDefault()}function j2(t){const e=R.c(12),{option:s,count:l,onSelect:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=K(fo({highlight:"hover"})),e[0]=a):a=e[0];let r;e[1]!==s.glyph?(r=n.jsx(Js,{children:s.glyph}),e[1]=s.glyph,e[2]=r):r=e[2];let o;e[3]!==s.label?(o=n.jsx("span",{className:"truncate",children:s.label}),e[3]=s.label,e[4]=o):o=e[4];let c;e[5]!==l?(c=n.jsx(Wi,{count:l}),e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o||e[10]!==c?(d=n.jsxs("button",{type:"button",className:a,onClick:i,children:[r,o,c]}),e[7]=i,e[8]=r,e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function b2(t){const e=R.c(19),{field:s,option:l,count:i,onSelect:a}=t,r=`${s.label} ${l.label}`;let o;e[0]!==s.icon?(o=n.jsx(Js,{children:s.icon}),e[0]=s.icon,e[1]=o):o=e[1];let c;e[2]!==s.label?(c=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.label}),e[2]=s.label,e[3]=c):c=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground/60"}),e[4]=d):d=e[4];let u;e[5]!==l.glyph?(u=n.jsx(Js,{children:l.glyph}),e[5]=l.glyph,e[6]=u):u=e[6];let f;e[7]!==l.label?(f=n.jsx("span",{className:"truncate",children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let m;e[9]!==i?(m=n.jsx(Wi,{count:i}),e[9]=i,e[10]=m):m=e[10];let p;return e[11]!==a||e[12]!==r||e[13]!==o||e[14]!==c||e[15]!==u||e[16]!==f||e[17]!==m?(p=n.jsxs(Hs,{value:r,onSelect:a,children:[o,c,d,u,f,m]}),e[11]=a,e[12]=r,e[13]=o,e[14]=c,e[15]=u,e[16]=f,e[17]=m,e[18]=p):p=e[18],p}const k2=new Set(["ArrowDown","ArrowUp","ArrowRight"]);function y2(t){const e=R.c(50),{filters:s,items:l,index:i,fields:a,onChange:r,onClose:o}=t,c=X(),[d,u]=W.useState(""),[f,m]=W.useState(""),[p,h]=W.useState(!1);let j;e[0]!==s||e[1]!==r||e[2]!==o?(j=(z,I)=>{r(I.apply(s)),z.multi||o()},e[0]=s,e[1]=r,e[2]=o,e[3]=j):j=e[3];const x=j;let k;e[4]!==s||e[5]!==i||e[6]!==l?(k=z=>l.filter(I=>Di(I,z.apply(s),i)).length,e[4]=s,e[5]=i,e[6]=l,e[7]=k):k=e[7];const b=k;let y,g,v,N,B,w,D,C,S;if(e[8]!==f||e[9]!==p||e[10]!==b||e[11]!==a||e[12]!==d||e[13]!==x||e[14]!==c){const z=a.filter(v2);g=Mi,w=f,D=m,e[24]===Symbol.for("react.memo_cache_sentinel")?(C=O=>{k2.has(O.key)&&h(!0)},e[24]=C):C=e[24];let I;e[25]!==c?(I=c("taskBoard.viewControls.addFilter"),e[25]=c,e[26]=I):I=e[26];let $;e[27]!==c?($=c("taskBoard.viewControls.addFilter"),e[27]=c,e[28]=$):$=e[28],e[29]!==d||e[30]!==I||e[31]!==$?(S=n.jsx(Li,{size:"sm",value:d,onValueChange:u,placeholder:I,"aria-label":$,className:"h-9"}),e[29]=d,e[30]=I,e[31]=$,e[32]=S):S=e[32],y=Pi,e[33]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h(!0),e[33]=v):v=e[33];let E;e[34]!==c?(E=c("taskBoard.viewControls.noMatches"),e[34]=c,e[35]=E):E=e[35],e[36]!==E?(N=n.jsx(Fi,{children:E}),e[36]=E,e[37]=N):N=e[37],B=d.trim()===""?n.jsx(qa,{children:z.map(O=>n.jsx(g2,{field:O,open:p&&f===O.label,countFor:b,onSelect:L=>x(O,L)},O.id))}):n.jsx(qa,{children:z.flatMap(O=>O.options.map(L=>n.jsx(b2,{field:O,option:L,count:b(L),onSelect:()=>x(O,L)},`${O.id}:${L.id}`)))}),e[8]=f,e[9]=p,e[10]=b,e[11]=a,e[12]=d,e[13]=x,e[14]=c,e[15]=y,e[16]=g,e[17]=v,e[18]=N,e[19]=B,e[20]=w,e[21]=D,e[22]=C,e[23]=S}else y=e[15],g=e[16],v=e[17],N=e[18],B=e[19],w=e[20],D=e[21],C=e[22],S=e[23];let T;e[38]!==y||e[39]!==v||e[40]!==N||e[41]!==B?(T=n.jsxs(y,{onPointerMove:v,children:[N,B]}),e[38]=y,e[39]=v,e[40]=N,e[41]=B,e[42]=T):T=e[42];let _;return e[43]!==g||e[44]!==T||e[45]!==w||e[46]!==D||e[47]!==C||e[48]!==S?(_=n.jsxs(g,{value:w,onValueChange:D,onKeyDown:C,children:[S,T]}),e[43]=g,e[44]=T,e[45]=w,e[46]=D,e[47]=C,e[48]=S,e[49]=_):_=e[49],_}function v2(t){return t.options.length>0&&t.id!=="sprint"}function qo(t){const e=R.c(14);let s,l;e[0]!==t?({trigger:l,...s}=t,e[0]=t,e[1]=s,e[2]=l):(s=e[1],l=e[2]);const[i,a]=W.useState(!1);let r;e[3]!==l?(r=n.jsx(ss,{asChild:!0,children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==s||e[6]!==i?(o=i&&n.jsx(y2,{...s,onClose:()=>a(!1)}),e[5]=s,e[6]=i,e[7]=o):o=e[7];let c;e[8]!==o?(c=n.jsx(as,{align:"end",className:"w-72 p-0",children:o}),e[8]=o,e[9]=c):c=e[9];let d;return e[10]!==i||e[11]!==r||e[12]!==c?(d=n.jsxs(ns,{open:i,onOpenChange:a,children:[r,c]}),e[10]=i,e[11]=r,e[12]=c,e[13]=d):d=e[13],d}function N2(t){const e=R.c(23),{filters:s,items:l,members:i,tags:a,sprints:r,index:o,scoped:c,onChange:d}=t,u=X();let f;e[0]!==o||e[1]!==i||e[2]!==c||e[3]!==r||e[4]!==a?(f={members:i,tags:a,sprints:r,index:o,scoped:c},e[0]=o,e[1]=i,e[2]=c,e[3]=r,e[4]=a,e[5]=f):f=e[5];const m=Uo(f);let p;e[6]!==s||e[7]!==o||e[8]!==r?(p=Eo(s,o,wi(r)),e[6]=s,e[7]=o,e[8]=r,e[9]=p):p=e[9];const h=p.length>0;let j;e[10]!==u?(j=u("taskBoard.viewControls.filterLabel"),e[10]=u,e[11]=j):j=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(nd,{}),e[12]=x):x=e[12];let k;e[13]!==h||e[14]!==j?(k=n.jsx(Bt,{label:j,tooltipSide:"bottom",variant:"outline","aria-pressed":h,children:x}),e[13]=h,e[14]=j,e[15]=k):k=e[15];let b;return e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==l||e[20]!==d||e[21]!==k?(b=n.jsx(qo,{filters:s,items:l,index:o,fields:m,onChange:d,trigger:k}),e[16]=m,e[17]=s,e[18]=o,e[19]=l,e[20]=d,e[21]=k,e[22]=b):b=e[22],b}function Il(t){const e=R.c(28),{icon:s,label:l,value:i,options:a,onSelect:r,disabled:o}=t;let c;if(e[0]!==a||e[1]!==i){let b;e[3]!==i?(b=y=>y.value===i,e[3]=i,e[4]=b):b=e[4],c=a.find(b),e[0]=a,e[1]=i,e[2]=c}else c=e[2];const d=c;let u;e[5]!==s?(u=n.jsx(Js,{children:s}),e[5]=s,e[6]=u):u=e[6];let f;e[7]!==l?(f=n.jsx("span",{className:"truncate",children:l}),e[7]=l,e[8]=f):f=e[8];const m=d?.label;let p;e[9]!==m?(p=n.jsx("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:m}),e[9]=m,e[10]=p):p=e[10];let h;e[11]!==o||e[12]!==u||e[13]!==f||e[14]!==p?(h=n.jsxs(vs,{disabled:o,className:"gap-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",children:[u,f,p]}),e[11]=o,e[12]=u,e[13]=f,e[14]=p,e[15]=h):h=e[15];let j;if(e[16]!==r||e[17]!==a||e[18]!==i){let b;e[20]!==r||e[21]!==i?(b=y=>n.jsxs(Ne,{className:"gap-2",onSelect:()=>r(y.value),children:[n.jsx(Js,{children:y.icon}),n.jsx("span",{className:"truncate",children:y.label}),y.value===i&&n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},String(y.value)),e[20]=r,e[21]=i,e[22]=b):b=e[22],j=a.map(b),e[16]=r,e[17]=a,e[18]=i,e[19]=j}else j=e[19];let x;e[23]!==j?(x=n.jsx(Ns,{className:"w-52",children:j}),e[23]=j,e[24]=x):x=e[24];let k;return e[25]!==h||e[26]!==x?(k=n.jsxs(ys,{children:[h,x]}),e[25]=h,e[26]=x,e[27]=k):k=e[27],k}const Go={status:n.jsx(_c,{size:14,className:"shrink-0"}),assignee:n.jsx(Vs,{size:14,className:"shrink-0"}),priority:n.jsx(Ur,{size:14,className:"shrink-0"}),due:n.jsx(Ws,{size:14,className:"shrink-0"}),tags:n.jsx(Cl,{size:14,className:"shrink-0"}),project:n.jsx(ls,{entry:void 0})};function Vo(t){const e=R.c(34),{groupBy:s,subgroupBy:l,onGroupByChange:i,onSubgroupByChange:a,align:r}=t,o=X();let c;e[0]!==o?(c=o("taskBoard.viewControls.groupByNone"),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==c?(d={value:null,label:c},e[2]=c,e[3]=d):d=e[3];const u=d;let f;e[4]!==o?(f=B=>Oo.filter(w=>w!==B).map(w=>({value:w,label:o(ji[w]),icon:Go[w]})),e[4]=o,e[5]=f):f=e[5];const m=f;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(wl,{size:14,className:"shrink-0"}),e[6]=p):p=e[6];let h;e[7]!==o?(h=o("taskBoard.viewControls.groupingLabel"),e[7]=o,e[8]=h):h=e[8];let j;e[9]!==m||e[10]!==u?(j=[u,...m(null)],e[9]=m,e[10]=u,e[11]=j):j=e[11];let x;e[12]!==s||e[13]!==i||e[14]!==h||e[15]!==j?(x=n.jsx(Il,{icon:p,label:h,value:s,options:j,onSelect:i}),e[12]=s,e[13]=i,e[14]=h,e[15]=j,e[16]=x):x=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(wl,{size:14,className:"shrink-0"}),e[17]=k):k=e[17];let b;e[18]!==o?(b=o("taskBoard.viewControls.subgroupingLabel"),e[18]=o,e[19]=b):b=e[19];let y;e[20]!==m||e[21]!==s||e[22]!==u?(y=[u,...m(s)],e[20]=m,e[21]=s,e[22]=u,e[23]=y):y=e[23];const g=s===null;let v;e[24]!==a||e[25]!==l||e[26]!==y||e[27]!==g||e[28]!==b?(v=n.jsx(Il,{icon:k,label:b,value:l,options:y,onSelect:a,disabled:g}),e[24]=a,e[25]=l,e[26]=y,e[27]=g,e[28]=b,e[29]=v):v=e[29];let N;return e[30]!==r||e[31]!==v||e[32]!==x?(N=n.jsxs(qe,{align:r,className:"w-72",children:[x,v]}),e[30]=r,e[31]=v,e[32]=x,e[33]=N):N=e[33],N}function Ho(t){const e=R.c(45),{sortBy:s,sortDirection:l,onSortByChange:i,onSortDirectionChange:a,align:r}=t,o=X();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ci,{size:14,className:"shrink-0"}),e[0]=c):c=e[0];let d;e[1]!==o?(d=o("taskBoard.viewControls.sortingLabel"),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==o?(u=o("taskBoard.viewControls.sortNone"),e[3]=o,e[4]=u):u=e[4];let f;e[5]!==u?(f={value:null,label:u},e[5]=u,e[6]=f):f=e[6];let m;if(e[7]!==o||e[8]!==f){let C;e[10]!==o?(C=S=>({value:S,label:o(Yo[S]),icon:Go[S]}),e[10]=o,e[11]=C):C=e[11],m=[f,...Po.map(C)],e[7]=o,e[8]=f,e[9]=m}else m=e[9];let p;e[12]!==i||e[13]!==s||e[14]!==d||e[15]!==m?(p=n.jsx(Il,{icon:c,label:d,value:s,options:m,onSelect:i}),e[12]=i,e[13]=s,e[14]=d,e[15]=m,e[16]=p):p=e[16];let h;e[17]!==l?(h=l==="asc"?n.jsx(fi,{size:14,className:"shrink-0"}):n.jsx(mi,{size:14,className:"shrink-0"}),e[17]=l,e[18]=h):h=e[18];let j;e[19]!==o?(j=o("taskBoard.viewControls.sortDirectionLabel"),e[19]=o,e[20]=j):j=e[20];let x;e[21]!==o?(x=o("taskBoard.viewControls.sortAscending"),e[21]=o,e[22]=x):x=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(fi,{size:14,className:"shrink-0"}),e[23]=k):k=e[23];let b;e[24]!==x?(b={value:"asc",label:x,icon:k},e[24]=x,e[25]=b):b=e[25];let y;e[26]!==o?(y=o("taskBoard.viewControls.sortDescending"),e[26]=o,e[27]=y):y=e[27];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(mi,{size:14,className:"shrink-0"}),e[28]=g):g=e[28];let v;e[29]!==y?(v={value:"desc",label:y,icon:g},e[29]=y,e[30]=v):v=e[30];let N;e[31]!==b||e[32]!==v?(N=[b,v],e[31]=b,e[32]=v,e[33]=N):N=e[33];const B=s===null;let w;e[34]!==a||e[35]!==l||e[36]!==N||e[37]!==B||e[38]!==h||e[39]!==j?(w=n.jsx(Il,{icon:h,label:j,value:l,options:N,onSelect:a,disabled:B}),e[34]=a,e[35]=l,e[36]=N,e[37]=B,e[38]=h,e[39]=j,e[40]=w):w=e[40];let D;return e[41]!==r||e[42]!==w||e[43]!==p?(D=n.jsxs(qe,{align:r,className:"w-72",children:[p,w]}),e[41]=r,e[42]=w,e[43]=p,e[44]=D):D=e[44],D}function S2(t){const e=R.c(11),s=X();let l;e[0]!==s?(l=s("taskBoard.viewControls.groupByLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.groupBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(wl,{}),e[2]=a):a=e[2];let r;e[3]!==l||e[4]!==i?(r=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=r):r=e[5];let o;e[6]!==t?(o=n.jsx(Vo,{...t,align:"end"}),e[6]=t,e[7]=o):o=e[7];let c;return e[8]!==r||e[9]!==o?(c=n.jsxs(Me,{children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10],c}function B2(t){const e=R.c(21),{all:s,hidden:l,onToggle:i}=t,a=X();let r;e[0]!==a?(r=a("taskBoard.taskBoard.columnsLabel"),e[0]=a,e[1]=r):r=e[1];const o=l.length>0;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ad,{}),e[2]=c):c=e[2];let d;e[3]!==r||e[4]!==o?(d=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:r,tooltipSide:"bottom",variant:"secondary","aria-pressed":o,children:c})}),e[3]=r,e[4]=o,e[5]=d):d=e[5];let u;if(e[6]!==s||e[7]!==l||e[8]!==i||e[9]!==a){let p;e[11]!==s.length||e[12]!==l||e[13]!==i||e[14]!==a?(p=h=>{const j=!l.includes(h);return n.jsx(Tc,{checked:j,disabled:j&&s.length-l.length<=1,onSelect:C2,onCheckedChange:x=>i(h,x),children:dt(h,a).label},h)},e[11]=s.length,e[12]=l,e[13]=i,e[14]=a,e[15]=p):p=e[15],u=s.map(p),e[6]=s,e[7]=l,e[8]=i,e[9]=a,e[10]=u}else u=e[10];let f;e[16]!==u?(f=n.jsx(qe,{align:"end",children:u}),e[16]=u,e[17]=f):f=e[17];let m;return e[18]!==d||e[19]!==f?(m=n.jsxs(Me,{children:[d,f]}),e[18]=d,e[19]=f,e[20]=m):m=e[20],m}function C2(t){return t.preventDefault()}function w2(t){const e=R.c(11),s=X();let l;e[0]!==s?(l=s("taskBoard.viewControls.sortLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.sortBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ci,{}),e[2]=a):a=e[2];let r;e[3]!==l||e[4]!==i?(r=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=r):r=e[5];let o;e[6]!==t?(o=n.jsx(Ho,{...t,align:"end"}),e[6]=t,e[7]=o):o=e[7];let c;return e[8]!==r||e[9]!==o?(c=n.jsxs(Me,{children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10],c}const ji={status:"taskBoard.viewControls.groupByStatus",assignee:"taskBoard.taskFilters.assigneeLabel",priority:"taskBoard.taskFilters.priorityLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel"},Yo={assignee:"taskBoard.taskFilters.assigneeLabel",due:"taskBoard.taskFilters.dueDateLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel",priority:"taskBoard.taskFilters.priorityLabel"};function Tr(t){const e=R.c(18),{icon:s,label:l,value:i,menu:a,extra:r,removeLabel:o,onRemove:c}=t;let d;e[0]!==s||e[1]!==l?(d=n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[s,l]}),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Pa,{orientation:"vertical"}),e[3]=u):u=e[3];let f;e[4]!==i?(f=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:"flex h-full max-w-[16rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:i})}),e[4]=i,e[5]=f):f=e[5];let m;e[6]!==a||e[7]!==f?(m=n.jsxs(Me,{children:[f,a]}),e[6]=a,e[7]=f,e[8]=m):m=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(il,{}),e[9]=p):p=e[9];let h;e[10]!==c||e[11]!==o?(h=n.jsx(Bt,{label:o,size:"icon-sm",onClick:c,children:p}),e[10]=c,e[11]=o,e[12]=h):h=e[12];let j;return e[13]!==r||e[14]!==d||e[15]!==m||e[16]!==h?(j=n.jsxs(Ka,{variant:"outline",size:"segmented",children:[d,u,m,r,h]}),e[13]=r,e[14]=d,e[15]=m,e[16]=h,e[17]=j):j=e[17],j}function D2(t){const e=R.c(14),{grouping:s,sorting:l}=t,i=X(),{groupBy:a,subgroupBy:r}=s,{sortBy:o,sortDirection:c}=l,d=c==="asc"?fi:mi;let u;e[0]!==a||e[1]!==s||e[2]!==r||e[3]!==i?(u=a!==null&&n.jsx(Tr,{icon:n.jsx(wl,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.groupedBy"),value:n.jsxs(n.Fragment,{children:[i(ji[a]),r!==null&&n.jsxs(n.Fragment,{children:[n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground"}),i(ji[r])]})]}),menu:n.jsx(Vo,{...s,align:"start"}),removeLabel:i("taskBoard.viewControls.removeGrouping"),onRemove:()=>s.onGroupByChange(null)}),e[0]=a,e[1]=s,e[2]=r,e[3]=i,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==o||e[7]!==c||e[8]!==l||e[9]!==i?(f=o!==null&&n.jsx(Tr,{icon:n.jsx(Ci,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.sortedBy"),value:i(Yo[o]),menu:n.jsx(Ho,{...l,align:"start"}),extra:n.jsxs(n.Fragment,{children:[n.jsx(Pa,{orientation:"vertical"}),n.jsx(Bt,{label:i("taskBoard.viewControls.reverseSort"),size:"icon-sm",onClick:()=>l.onSortDirectionChange(c==="asc"?"desc":"asc"),children:n.jsx(d,{})})]}),removeLabel:i("taskBoard.viewControls.removeSorting"),onRemove:()=>l.onSortByChange(null)}),e[5]=d,e[6]=o,e[7]=c,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs(n.Fragment,{children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function T2(t){const e=R.c(29),{field:s,filters:l,items:i,index:a,onChange:r,onClose:o}=t;let c;if(e[0]!==s.label||e[1]!==s.multi||e[2]!==s.options||e[3]!==l||e[4]!==a||e[5]!==i||e[6]!==r||e[7]!==o){let d;e[9]!==l?(d=g=>g.isSelected(l),e[9]=l,e[10]=d):d=e[10];const u=s.options.filter(d);let f;e[11]!==l?(f=g=>!g.isSelected(l),e[11]=l,e[12]=f):f=e[12];const m=s.options.filter(f);let p;e[13]!==s.multi||e[14]!==l||e[15]!==r||e[16]!==o?(p=g=>{r(g.apply(l)),s.multi||o()},e[13]=s.multi,e[14]=l,e[15]=r,e[16]=o,e[17]=p):p=e[17];const h=p;let j;e[18]!==l||e[19]!==a||e[20]!==i||e[21]!==h?(j=(g,v)=>n.jsxs("button",{type:"button",className:K(fo({highlight:"hover"})),onClick:()=>h(g),children:[n.jsx(Js,{children:g.glyph}),n.jsx("span",{className:"truncate",children:g.label}),v?n.jsx(Wi,{count:i.filter(N=>Di(N,g.apply(l),a)).length}):n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},g.id),e[18]=l,e[19]=a,e[20]=i,e[21]=h,e[22]=j):j=e[22];const x=j;let k;e[23]!==s.label?(k=n.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:s.label}),e[23]=s.label,e[24]=k):k=e[24];let b;e[25]!==x?(b=g=>x(g,!1),e[25]=x,e[26]=b):b=e[26];let y;e[27]!==x?(y=g=>x(g,!0),e[27]=x,e[28]=y):y=e[28],c=n.jsxs("div",{className:"flex max-h-72 flex-col overflow-y-auto p-1",children:[k,u.map(b),u.length>0&&m.length>0&&n.jsx(Pa,{className:"my-1"}),m.map(y)]}),e[0]=s.label,e[1]=s.multi,e[2]=s.options,e[3]=l,e[4]=a,e[5]=i,e[6]=r,e[7]=o,e[8]=c}else c=e[8];return c}function _2(t){const e=R.c(22),{field:s,filters:l,items:i,index:a,onChange:r}=t,[o,c]=W.useState(!1);let d;e[0]!==s||e[1]!==l?(d=s.valueGlyph(l),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==s||e[4]!==l?(u=s.valueLabel(l),e[3]=s,e[4]=l,e[5]=u):u=e[5];let f;e[6]!==d||e[7]!==u?(f=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex h-full max-w-[12rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:[d,u]})}),e[6]=d,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==i||e[13]!==r||e[14]!==o?(m=o&&n.jsx(T2,{field:s,filters:l,items:i,index:a,onChange:r,onClose:()=>c(!1)}),e[9]=s,e[10]=l,e[11]=a,e[12]=i,e[13]=r,e[14]=o,e[15]=m):m=e[15];let p;e[16]!==m?(p=n.jsx(as,{align:"start",className:"w-64 p-0",children:m}),e[16]=m,e[17]=p):p=e[17];let h;return e[18]!==o||e[19]!==f||e[20]!==p?(h=n.jsxs(ns,{open:o,onOpenChange:c,children:[f,p]}),e[18]=o,e[19]=f,e[20]=p,e[21]=h):h=e[21],h}function I2(t){const e=R.c(46),{filters:s,items:l,members:i,tags:a,sprints:r,index:o,onChange:c,view:d}=t,u=X();let f;e[0]!==o||e[1]!==i||e[2]!==r||e[3]!==a?(f={members:i,tags:a,sprints:r,index:o},e[0]=o,e[1]=i,e[2]=r,e[3]=a,e[4]=f):f=e[4];const m=Uo(f);let p,h,j,x,k,b;if(e[5]!==m||e[6]!==s||e[7]!==o||e[8]!==l||e[9]!==c||e[10]!==r||e[11]!==u||e[12]!==d){b=Symbol.for("react.early_return_sentinel");e:{h=wi(r),p=Eo(s,o,h);const D=d!==void 0&&(d.grouping.groupBy!==null||d.sorting.sortBy!==null);if(p.length===0&&!D){b=null;break e}j="mx-3 flex h-11 shrink-0 items-center gap-2 overflow-x-auto rounded-xl border border-border px-2 no-scrollbar",e[19]!==D||e[20]!==d?(x=d&&D&&n.jsxs(n.Fragment,{children:[n.jsx(D2,{...d}),n.jsx(Pa,{orientation:"vertical",className:"mx-1 h-5"})]}),e[19]=D,e[20]=d,e[21]=x):x=e[21],k=p.map(C=>{const S=m.find(T=>T.id===C);return S?n.jsxs(Ka,{variant:"outline",size:"segmented",children:[n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[S.icon,S.label]}),n.jsx(Pa,{orientation:"vertical"}),n.jsx("span",{className:"px-2 text-muted-foreground",children:S.multi?u("taskBoard.viewControls.isAnyOf"):u("taskBoard.viewControls.is")}),n.jsx(Pa,{orientation:"vertical"}),n.jsx(_2,{field:S,filters:s,items:l,index:o,onChange:c}),n.jsx(Bt,{label:u("taskBoard.viewControls.removeFilter",{field:S.label}),size:"icon-sm",onClick:()=>c(Km(s,C,h)),children:n.jsx(il,{})})]},C):null})}e[5]=m,e[6]=s,e[7]=o,e[8]=l,e[9]=c,e[10]=r,e[11]=u,e[12]=d,e[13]=p,e[14]=h,e[15]=j,e[16]=x,e[17]=k,e[18]=b}else p=e[13],h=e[14],j=e[15],x=e[16],k=e[17],b=e[18];if(b!==Symbol.for("react.early_return_sentinel"))return b;let y;e[22]!==u?(y=u("taskBoard.viewControls.addAnotherFilter"),e[22]=u,e[23]=y):y=e[23];let g;e[24]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(is,{}),e[24]=g):g=e[24];let v;e[25]!==y?(v=n.jsx(Bt,{label:y,children:g}),e[25]=y,e[26]=v):v=e[26];let N;e[27]!==m||e[28]!==s||e[29]!==o||e[30]!==l||e[31]!==c||e[32]!==v?(N=n.jsx(qo,{filters:s,items:l,index:o,fields:m,onChange:c,trigger:v}),e[27]=m,e[28]=s,e[29]=o,e[30]=l,e[31]=c,e[32]=v,e[33]=N):N=e[33];let B;e[34]!==p.length||e[35]!==h||e[36]!==s||e[37]!==c||e[38]!==u?(B=p.length>0&&n.jsx("div",{className:"ml-auto",children:n.jsx(re,{variant:"ghost",size:"sm",onClick:()=>c({...Qr,search:s.search,sprint:h}),children:u("taskBoard.viewControls.clear")})}),e[34]=p.length,e[35]=h,e[36]=s,e[37]=c,e[38]=u,e[39]=B):B=e[39];let w;return e[40]!==B||e[41]!==j||e[42]!==x||e[43]!==k||e[44]!==N?(w=n.jsxs("div",{className:j,children:[x,k,N,B]}),e[40]=B,e[41]=j,e[42]=x,e[43]=k,e[44]=N,e[45]=w):w=e[45],w}function A2(t){const e=R.c(7),{onClick:s,label:l}=t,i=X();let a;e[0]!==l||e[1]!==i?(a=l??i("taskBoard.taskFilters.boardSettingsLabel"),e[0]=l,e[1]=i,e[2]=a):a=e[2];const r=a;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(qr,{}),e[3]=o):o=e[3];let c;return e[4]!==r||e[5]!==s?(c=n.jsx(Bt,{label:r,tooltipSide:"bottom",variant:"outline",onClick:s,children:o}),e[4]=r,e[5]=s,e[6]=c):c=e[6],c}const z2=["board","list","feed","epics"],$2=["overdue","today","week","none"],Gs=t=>typeof t=="string"&&t!==""?t:null,Wo={layout:"board",assignee:null,groupBy:null,sprint:null},Qo="any",Xo="any",R2="none";function E2(t,e){return typeof t!="string"||t===""?null:t===qs||t===Ie||e===null||e.has(t)?t:null}function O2(t,e=Wo){const s=Gs(t.priority),l=Gs(t.due),i=Gs(t.tags),a=t.group===void 0?e.groupBy:Dr(t.group)?t.group:null,r=Hm(t.sort)?t.sort:null;return{layout:z2.includes(t.view)?t.view:e.layout,groupBy:a,subgroupBy:a!==null&&Dr(t.subgroup)&&t.subgroup!==a?t.subgroup:null,sortBy:r,sortDirection:t.dir==="asc"||t.dir==="desc"?t.dir:r!==null?Yi(r):"asc",filters:{search:Gs(t.q)??"",assignee:t.assignee===void 0?e.assignee:t.assignee===Qo?null:Gs(t.assignee),priority:Ts.includes(s)?s:null,due:$2.includes(l)?l:null,tags:i?i.split(",").filter(Boolean):[],project:Gs(t.repo),sprint:t.sprint===void 0?e.sprint:t.sprint===Xo?null:Gs(t.sprint)}}}function L2({filters:t,layout:e,groupBy:s,subgroupBy:l,sortBy:i,sortDirection:a},r=Wo){return{view:e===r.layout?void 0:e,group:s===r.groupBy?void 0:s??R2,subgroup:s!==null?l??void 0:void 0,sort:i??void 0,dir:i!==null&&a!==Yi(i)?a:void 0,q:t.search===""?void 0:t.search,assignee:t.assignee===r.assignee?void 0:t.assignee??Qo,priority:t.priority??void 0,due:t.due??void 0,tags:t.tags.length>0?t.tags.join(","):void 0,repo:t.project??void 0,sprint:t.sprint===r.sprint?void 0:t.sprint??Xo}}function F2(t,e){const s=new Set(e.map(l=>l.id));return new Set([...t].filter(l=>s.has(l)))}function P2(t,e){const s=R.c(30);let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},s[0]=l):l=s[0];const i=Rr(l),a=bi();let r;s[1]!==t||s[2]!==i?(r=O2(i,t),s[1]=t,s[2]=i,s[3]=r):r=s[3];const o=r,{groupBy:c,subgroupBy:d}=o;let u;s[4]!==t||s[5]!==a||s[6]!==o?(u=y=>a({to:".",search:g=>({...g,...L2({...o,...y},t)}),replace:!0}),s[4]=t,s[5]=a,s[6]=o,s[7]=u):u=s[7];const f=u;let m;s[8]!==e||s[9]!==o.filters||s[10]!==f?(m=y=>{y.assignee!==o.filters.assignee&&e(y.assignee),f({filters:y})},s[8]=e,s[9]=o.filters,s[10]=f,s[11]=m):m=s[11];let p;s[12]!==f?(p=y=>f({layout:y}),s[12]=f,s[13]=p):p=s[13];let h;s[14]!==c||s[15]!==d||s[16]!==f?(h=y=>f({groupBy:y,subgroupBy:y!==null&&y===d?c:d}),s[14]=c,s[15]=d,s[16]=f,s[17]=h):h=s[17];let j,x,k;s[18]!==f?(j=y=>f({subgroupBy:y}),x=y=>f({sortBy:y,sortDirection:y!==null?Yi(y):"asc"}),k=y=>f({sortDirection:y}),s[18]=f,s[19]=j,s[20]=x,s[21]=k):(j=s[19],x=s[20],k=s[21]);let b;return s[22]!==m||s[23]!==p||s[24]!==h||s[25]!==j||s[26]!==x||s[27]!==k||s[28]!==o?(b={...o,setFilters:m,setLayout:p,setGroupBy:h,setSubgroupBy:j,setSortBy:x,setSortDirection:k},s[22]=m,s[23]=p,s[24]=h,s[25]=j,s[26]=x,s[27]=k,s[28]=o,s[29]=b):b=s[29],b}const M2=5e3;function K2(t){if(Ti(t))return"blocked";const e=Rl(t);if(e==="running")return"running";if(e==="failed")return"failed";if(Zr(t))return"handed";if(t.status==="done")return"done";if(t.status==="post_deploy_validation")return"delivered";if(t.status==="in_review")return"review";const s=Date.parse(t.updatedAt)-Date.parse(t.createdAt);return Number.isFinite(s)&&s<M2?"created":"updated"}function U2(t){const e=`${t.getMonth()+1}`.padStart(2,"0"),s=`${t.getDate()}`.padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}function q2(t,e){const s=l=>new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime();return Math.round((s(t)-s(e))/864e5)}function G2(t,e){const s=new Map,l=t.map(i=>({item:i,at:new Date(i.updatedAt)})).filter(({at:i})=>Number.isFinite(i.getTime())).sort((i,a)=>a.at.getTime()-i.at.getTime());for(const{item:i,at:a}of l){const r=U2(a),o=s.get(r);if(o){o.items.push(i);continue}const c=q2(e,a);s.set(r,{key:r,date:a,relative:c===0?"today":c===1?"yesterday":null,items:[i]})}return[...s.values()]}function V2({items:t,scopeId:e,project:s,projects:l,isLoading:i}){if(!e)return{items:[...t],isLoading:i};if(!s||l.length===0)return{items:[],isLoading:!0};const a=l.some(r=>r.id===s.id)?l:[...l,s];return{items:yu(t,co(a),e),isLoading:i}}Ic(()=>import("./route-BA7jjOjA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156])).catch(()=>{});const H2=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),os="inline-flex items-center gap-1 rounded-full border-[length:var(--border-hairline)] border-border px-2 py-0.5 text-xs font-medium text-muted-foreground",ci="inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",Jo="opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",Za="flex size-6 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",sn=12,ml="size-3.5",Ds=2;function Y2(){const t=R.c(9),e=X();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=K(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx($l,{size:sn}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=a):a=t[5];let r;return t[6]!==l||t[7]!==a?(r=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=r):r=t[8],r}function W2(){const t=R.c(9),e=X();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=K(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.handedToHumanBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx($l,{size:sn}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsYou"),t[4]=e,t[5]=a):a=t[5];let r;return t[6]!==l||t[7]!==a?(r=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=r):r=t[8],r}function Zo(t){const e=R.c(20),{priority:s,onChange:l}=t,i=X(),a=et[s];let r;e[0]!==a.labelKey||e[1]!==i?(r=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=r):r=e[2];const o=r,c=a.icon;let d;e[3]!==a.iconClassName?(d=K(ml,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==o?(h=n.jsx(Fl,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==s||e[14]!==i?(m=Ts.map(h=>{const j=et[h].icon;return n.jsxs(Ne,{onSelect:()=>l(h),className:K("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:sn,className:K("shrink-0",et[h].iconClassName)}),i(et[h].labelKey)]},h)}),e[12]=l,e[13]=s,e[14]=i,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==o||e[18]!==m?(p=n.jsx(ec,{label:o,glyph:f,children:m}),e[16]=f,e[17]=o,e[18]=m,e[19]=p):p=e[19],p}function ec(t){const e=R.c(8),{label:s,glyph:l,children:i}=t;let a;e[0]!==l||e[1]!==s?(a=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:J2,onPointerDown:X2,className:"-m-1.5",children:l})}),e[0]=l,e[1]=s,e[2]=a):a=e[2];let r;e[3]!==i?(r=n.jsx(qe,{align:"start",className:"w-36",onClick:Q2,children:i}),e[3]=i,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=n.jsxs(Me,{children:[a,r]}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function Q2(t){return t.stopPropagation()}function X2(t){return t.stopPropagation()}function J2(t){return t.stopPropagation()}function Fl(t){const e=R.c(7),{label:s,children:l}=t;let i;e[0]!==l?(i=n.jsx(Ks,{asChild:!0,children:n.jsx("span",{className:"flex shrink-0 items-center",children:l})}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==s?(a=n.jsx(Us,{side:"top",children:s}),e[2]=s,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs(Ms,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}function Z2(t){const e=R.c(20),{type:s,onChange:l}=t,i=X(),a=At[s];let r;e[0]!==a.labelKey||e[1]!==i?(r=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=r):r=e[2];const o=r,c=a.icon;let d;e[3]!==a.iconClassName?(d=K(ml,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==o?(h=n.jsx(Fl,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==i||e[14]!==s?(m=Ii.map(h=>{const j=At[h].icon;return n.jsxs(Ne,{onSelect:()=>l(h),className:K("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:sn,className:K("shrink-0",At[h].iconClassName)}),i(At[h].labelKey)]},h)}),e[12]=l,e[13]=i,e[14]=s,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==o||e[18]!==m?(p=n.jsx(ec,{label:o,glyph:f,children:m}),e[16]=f,e[17]=o,e[18]=m,e[19]=p):p=e[19],p}function tc(t){const e=R.c(58),{iso:s,onChange:l}=t,i=X();let a;e[0]!==s?(a=s?Vd(s):null,e[0]=s,e[1]=a):a=e[1];const r=a;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ws,{className:K(ml,"shrink-0")}),e[2]=o):o=e[2];let c;e[3]!==s?(c=s&&n.jsx("span",{className:"truncate",children:H2.format(new Date(s))}),e[3]=s,e[4]=c):c=e[4];let d;e[5]!==c?(d=n.jsxs(n.Fragment,{children:[o,c]}),e[5]=c,e[6]=d):d=e[6];const u=d;let f,m,p,h,j,x,k,b,y,g,v,N;if(e[7]!==u||e[8]!==s||e[9]!==l||e[10]!==i||e[11]!==r){k=Symbol.for("react.early_return_sentinel");e:{const z=K("min-w-0 shrink items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground/70",r==="overdue"&&"text-destructive",r==="soon"&&"text-warning");if(!l){k=n.jsx("span",{className:K("flex",z),children:u});break e}p=Me,m=Ke,x=!0,f=re,b="ghost",y="sm",e[24]!==s||e[25]!==i?(g=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[24]=s,e[25]=i,e[26]=g):g=e[26],e[27]!==s||e[28]!==i?(v=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[27]=s,e[28]=i,e[29]=v):v=e[29],N=sp,h=tp,j=K("-mx-1.5 h-auto px-1.5 py-1 font-medium",z,!s&&Jo)}e[7]=u,e[8]=s,e[9]=l,e[10]=i,e[11]=r,e[12]=f,e[13]=m,e[14]=p,e[15]=h,e[16]=j,e[17]=x,e[18]=k,e[19]=b,e[20]=y,e[21]=g,e[22]=v,e[23]=N}else f=e[12],m=e[13],p=e[14],h=e[15],j=e[16],x=e[17],k=e[18],b=e[19],y=e[20],g=e[21],v=e[22],N=e[23];if(k!==Symbol.for("react.early_return_sentinel"))return k;let B;e[30]!==f||e[31]!==u||e[32]!==h||e[33]!==j||e[34]!==b||e[35]!==y||e[36]!==g||e[37]!==v||e[38]!==N?(B=n.jsx(f,{variant:b,size:y,"aria-label":g,title:v,onClick:N,onPointerDown:h,className:j,children:u}),e[30]=f,e[31]=u,e[32]=h,e[33]=j,e[34]=b,e[35]=y,e[36]=g,e[37]=v,e[38]=N,e[39]=B):B=e[39];let w;e[40]!==m||e[41]!==x||e[42]!==B?(w=n.jsx(m,{asChild:x,children:B}),e[40]=m,e[41]=x,e[42]=B,e[43]=w):w=e[43];let D;e[44]!==s?(D=s?new Date(s):void 0,e[44]=s,e[45]=D):D=e[45];let C;e[46]!==s?(C=s?new Date(s):void 0,e[46]=s,e[47]=C):C=e[47];let S;e[48]!==l?(S=z=>z&&l(Hi(z)),e[48]=l,e[49]=S):S=e[49];let T;e[50]!==D||e[51]!==C||e[52]!==S?(T=n.jsx(qe,{align:"start",className:"w-auto p-0",onClick:ep,children:n.jsx($i,{mode:"single",selected:D,defaultMonth:C,onSelect:S,initialFocus:!0})}),e[50]=D,e[51]=C,e[52]=S,e[53]=T):T=e[53];let _;return e[54]!==p||e[55]!==w||e[56]!==T?(_=n.jsxs(p,{children:[w,T]}),e[54]=p,e[55]=w,e[56]=T,e[57]=_):_=e[57],_}function ep(t){return t.stopPropagation()}function tp(t){return t.stopPropagation()}function sp(t){return t.stopPropagation()}function np(t){const e=R.c(8),{action:s}=t;let l;e[0]!==s?(l=r=>{r.stopPropagation(),s.onClick()},e[0]=s,e[1]=l):l=e[1];let i;e[2]!==s.icon?(i=n.jsx(s.icon,{className:ml}),e[2]=s.icon,e[3]=i):i=e[3];let a;return e[4]!==s.label||e[5]!==l||e[6]!==i?(a=n.jsxs(re,{variant:"outline",size:"xs",onClick:l,onPointerDown:lp,ref:ap,className:"absolute -top-0.5 right-0 gap-1.5 font-medium pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",children:[i,s.label]}),e[4]=s.label,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function ap(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function lp(t){return t.stopPropagation()}function sc(t){const e=R.c(38),{item:s,checks:l,assignee:i,assignedBy:a,members:r,leading:o,trailing:c,onAssign:d,onPriorityChange:u,onTypeChange:f,onDueDateChange:m}=t,{org:p}=tt();let h;e[0]!==s.keySeq||e[1]!==p.slug?(h=tn(p.slug,s.keySeq),e[0]=s.keySeq,e[1]=p.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s.type||e[4]!==f?(x=n.jsx(Z2,{type:s.type,onChange:f}),e[3]=s.type,e[4]=f,e[5]=x):x=e[5];let k;e[6]!==j?(k=n.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/70",children:j}),e[6]=j,e[7]=k):k=e[7];let b;e[8]!==x||e[9]!==k?(b=n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[x,k]}),e[8]=x,e[9]=k,e[10]=b):b=e[10];let y;e[11]!==s.dueDate||e[12]!==m?(y=s.dueDate&&n.jsx(tc,{iso:s.dueDate,onChange:m}),e[11]=s.dueDate,e[12]=m,e[13]=y):y=e[13];let g;e[14]!==o||e[15]!==b||e[16]!==y?(g=n.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[b,y,o]}),e[14]=o,e[15]=b,e[16]=y,e[17]=g):g=e[17];let v;e[18]!==s.priority||e[19]!==u?(v=(s.priority!=="none"||u)&&n.jsx(Zo,{priority:s.priority,onChange:u}),e[18]=s.priority,e[19]=u,e[20]=v):v=e[20];let N;e[21]!==l||e[22]!==s.reviewVerdicts?(N=l&&n.jsx(op,{summary:l.summary,verdicts:s.reviewVerdicts,enabled:l.enabled}),e[21]=l,e[22]=s.reviewVerdicts,e[23]=N):N=e[23];let B;e[24]!==a||e[25]!==i||e[26]!==s||e[27]!==r||e[28]!==d?(B=n.jsx(ic,{item:s,assignee:i,assignedBy:a,members:r,onAssign:d,showDelegation:!1}),e[24]=a,e[25]=i,e[26]=s,e[27]=r,e[28]=d,e[29]=B):B=e[29];let w;e[30]!==v||e[31]!==N||e[32]!==B||e[33]!==c?(w=n.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[v,N,B,c]}),e[30]=v,e[31]=N,e[32]=B,e[33]=c,e[34]=w):w=e[34];let D;return e[35]!==w||e[36]!==g?(D=n.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[g,w]}),e[35]=w,e[36]=g,e[37]=D):D=e[37],D}function ip(t){const e=R.c(20),{status:s,since:l}=t,i=X(),[a]=W.useState(rp);let r,o,c,d,u,f;if(e[0]!==a||e[1]!==l||e[2]!==s||e[3]!==i){const h=Hd(l,a),j=dt(s,i).label;o=Ms,u=400;let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(id,{size:sn}),e[10]=x):x=e[10],f=n.jsx(Ks,{asChild:!0,children:n.jsxs("span",{className:os,children:[x,h===0?i("taskBoard.taskBoard.statusAgeToday"):i("taskBoard.taskBoard.statusAgeDays",{count:h})]})}),r=Us,c="top",d=h===0?i("taskBoard.taskBoard.statusAgeTodayHint",{status:j}):i("taskBoard.taskBoard.statusAgeDaysHint",{status:j,count:h}),e[0]=a,e[1]=l,e[2]=s,e[3]=i,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f}else r=e[4],o=e[5],c=e[6],d=e[7],u=e[8],f=e[9];let m;e[11]!==r||e[12]!==c||e[13]!==d?(m=n.jsx(r,{side:c,children:d}),e[11]=r,e[12]=c,e[13]=d,e[14]=m):m=e[14];let p;return e[15]!==o||e[16]!==u||e[17]!==f||e[18]!==m?(p=n.jsxs(o,{delayDuration:u,children:[f,m]}),e[15]=o,e[16]=u,e[17]=f,e[18]=m,e[19]=p):p=e[19],p}function rp(){return Date.now()}function nc(t){const e=R.c(9),{sprintId:s}=t,l=Ll();let i;if(e[0]!==s||e[1]!==l){let d;e[3]!==s?(d=u=>u.id===s,e[3]=s,e[4]=d):d=e[4],i=l.find(d),e[0]=s,e[1]=l,e[2]=i}else i=e[2];const a=i;if(!a)return null;let r,o;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=K(os,"text-foreground"),o=n.jsx(Wt,{size:10,className:"shrink-0 text-muted-foreground"}),e[5]=r,e[6]=o):(r=e[5],o=e[6]);let c;return e[7]!==a.name?(c=n.jsxs("span",{className:r,children:[o,a.name]}),e[7]=a.name,e[8]=c):c=e[8],c}function Qi(t){const e=R.c(8),{tag:s}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=K(os,"text-foreground"),e[0]=l):l=e[0];let i;e[1]!==s.color?(i=en(s.color),e[1]=s.color,e[2]=i):i=e[2];let a;e[3]!==i?(a={borderColor:i},e[3]=i,e[4]=a):a=e[4];let r;return e[5]!==a||e[6]!==s.name?(r=n.jsx("span",{className:l,style:a,children:s.name}),e[5]=a,e[6]=s.name,e[7]=r):r=e[7],r}function op(t){const e=R.c(26),{summary:s,verdicts:l,enabled:i}=t,a=X();let r;if(e[0]!==i||e[1]!==a||e[2]!==l){let y;e[4]!==a||e[5]!==l?(y=g=>{const v=l.find(w=>w.reviewer===g),N=a("taskBoard.taskDialog.reviewerLabel"),B=v?v.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(v.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return n.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[n.jsx(fl,{size:12}),N," — ",B]},g)},e[4]=a,e[5]=l,e[6]=y):y=e[6],r=i.map(y),e[0]=i,e[1]=a,e[2]=l,e[3]=r}else r=e[3];let o;e[7]!==r?(o=n.jsx("span",{className:"flex flex-col gap-0.5",children:r}),e[7]=r,e[8]=o):o=e[8];const c=o,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let m;e[9]!==d||e[10]!==u||e[11]!==f?(m=K("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=m):m=e[12];const p=String(s.passed),h=String(s.total);let j;e[13]!==a||e[14]!==p||e[15]!==h?(j=a("taskBoard.taskBoard.checksLabel",{passed:p,total:h}),e[13]=a,e[14]=p,e[15]=h,e[16]=j):j=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ha,{className:ml}),e[17]=x):x=e[17];let k;e[18]!==s.passed||e[19]!==s.total||e[20]!==m||e[21]!==j?(k=n.jsxs("span",{className:m,"aria-label":j,children:[x,s.passed,"/",s.total]}),e[18]=s.passed,e[19]=s.total,e[20]=m,e[21]=j,e[22]=k):k=e[22];let b;return e[23]!==c||e[24]!==k?(b=n.jsx(Fl,{label:c,children:k}),e[23]=c,e[24]=k,e[25]=b):b=e[25],b}function ac(t){const e=R.c(14),{state:s}=t,l=X(),i=s==="running",a=i?"taskBoard.taskBoard.agentRunning":"taskBoard.taskBoard.agentFailed";let r;e[0]!==l||e[1]!==a?(r=l(a),e[0]=l,e[1]=a,e[2]=r):r=e[2];const o=r;let c;e[3]!==o||e[4]!==i?(c=i?n.jsx(xt,{className:"size-3.5 text-primary",label:o}):n.jsx(Rc,{size:14,className:"shrink-0 text-destructive","aria-label":o}),e[3]=o,e[4]=i,e[5]=c):c=e[5];let d;e[6]!==o||e[7]!==c?(d=n.jsx(Fl,{label:o,children:c}),e[6]=o,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==o?(u=n.jsx("span",{className:"sr-only",children:o}),e[9]=o,e[10]=u):u=e[10];let f;return e[11]!==d||e[12]!==u?(f=n.jsxs("span",{className:"mt-px flex shrink-0 items-center",children:[d,u]}),e[11]=d,e[12]=u,e[13]=f):f=e[13],f}function lc(t){const e=R.c(3),s=tf(ao());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const l=sf(t.reviewVerdicts,s);let i;return e[0]!==s||e[1]!==l?(i=l?{summary:l,enabled:s}:null,e[0]=s,e[1]=l,e[2]=i):i=e[2],i}function ic(t){const e=R.c(27),{item:s,assignee:l,assignedBy:i,members:a,onAssign:r,showDelegation:o}=t,c=o===void 0?!0:o,d=X(),[u,f]=W.useState(!1);let m=null;if(s.assigneeId===Ie){let k;e[0]!==i||e[1]!==d?(k=i?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:i.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=i,e[1]=d,e[2]=k):k=e[2];const b=k;if(c){let y;e[6]!==i?(y=i&&n.jsx(ot,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[6]=i,e[7]=y):y=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ct,{size:20,className:"ring-2 ring-background"}),e[8]=g):g=e[8];let v;e[9]!==y||e[10]!==b?(v=n.jsxs("span",{className:"inline-flex items-center",title:b,children:[y,g]}),e[9]=y,e[10]=b,e[11]=v):v=e[11],m=v}else{let y;e[3]!==i||e[4]!==b?(y=i?n.jsx(ot,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",title:b}):null,e[3]=i,e[4]=b,e[5]=y):y=e[5],m=y}}else if(l){const k=l.user?.image??void 0,b=l.user?.name??"?";let y;e[12]!==k||e[13]!==b?(y=n.jsx(ot,{url:k,fallback:b,shape:"circle",size:"xs"}),e[12]=k,e[13]=b,e[14]=y):y=e[14],m=y}if(!r||!a?.length)return m;let p;e[15]!==m||e[16]!==d?(p=n.jsx(ss,{asChild:!0,children:m?n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},onPointerDown:dp,className:"flex shrink-0 items-center rounded-full transition-opacity hover:opacity-80",children:m}):n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},className:K("flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 opacity-0 transition-[color,border-color,opacity] group-hover:opacity-100 hover:border-muted-foreground hover:text-muted-foreground focus-visible:opacity-100 data-[state=open]:opacity-100","-ml-2 w-0 scale-75 overflow-hidden border-0 transition-[color,border-color,opacity,width,margin,scale] duration-150 ease-out group-hover:ml-0 group-hover:w-6 group-hover:scale-100 group-hover:border focus-visible:ml-0 focus-visible:w-6 focus-visible:scale-100 focus-visible:border data-[state=open]:ml-0 data-[state=open]:w-6 data-[state=open]:scale-100 data-[state=open]:border motion-reduce:transition-none"),children:n.jsx(Kr,{size:13})})}),e[15]=m,e[16]=d,e[17]=p):p=e[17];let h;e[18]!==r?(h=k=>{r(k),f(!1)},e[18]=r,e[19]=h):h=e[19];let j;e[20]!==a||e[21]!==h?(j=n.jsx(as,{className:"w-56 p-0",align:"end",side:"bottom",onClick:cp,children:n.jsx(qi,{members:a,onSelect:h})}),e[20]=a,e[21]=h,e[22]=j):j=e[22];let x;return e[23]!==u||e[24]!==p||e[25]!==j?(x=n.jsxs(ns,{open:u,onOpenChange:f,children:[p,j]}),e[23]=u,e[24]=p,e[25]=j,e[26]=x):x=e[26],x}function cp(t){return t.stopPropagation()}function dp(t){return t.stopPropagation()}function bh(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(s1,{children:n.jsx(up,{})}),t[0]=e):e=t[0],e}function up(){const t=R.c(138),e=X(),{org:s,locator:l}=tt(),{items:i,demoFrozenItemIds:a,isLoading:r,isFetching:o}=Vr(),{scopeId:c,project:d,projects:u}=Su();let f;t[0]!==r||t[1]!==i||t[2]!==u||t[3]!==c||t[4]!==d?(f=V2({items:i,scopeId:c,project:d,projects:u,isLoading:r}),t[0]=r,t[1]=i,t[2]=u,t[3]=c,t[4]=d,t[5]=f):f=t[5];const{items:m,isLoading:p}=f,{data:h}=El();let j;t[6]!==h?(j=h===void 0?[]:h,t[6]=h,t[7]=j):j=t[7];const x=j,k=Ll();c1();const b=kd(),y=ro();let g,v;if(t[8]!==y.data){const A=(y.data??[]).filter(Sp);g=A.length>0,v=A.map(Np),t[8]=y.data,t[9]=g,t[10]=v}else g=t[9],v=t[10];const N=v,[B,w]=W.useState(!1);let D;t[11]!==g?(D=A=>A===Ie&&!g?(w(!0),!0):!1,t[11]=g,t[12]=D):D=t[12];const C=D;let S;t[13]!==e?(S=A=>{Qe.error(A.message||e("taskBoard.taskBoard.actionError"))},t[13]=e,t[14]=S):S=t[14];const T=S;let _;t[15]!==s.id?(_=A=>{!A||A.dataset.tracked==="true"||(A.dataset.tracked="true",zc("task_board_opened",{organization_id:s.id}))},t[15]=s.id,t[16]=_):_=t[16];const z=_;let I;t[17]===Symbol.for("react.memo_cache_sentinel")?(I=[],t[17]=I):I=t[17];const[$,E]=W.useState(I),O=()=>{if($.length!==0){if(C(Ie)){E([]);return}for(const A of $)b.rerun.mutate({id:A.id},{onError:Z=>T(Z)});E([]),De()}},{data:L}=vi.useSession(),{data:U}=yi(),G=U?.data?.members??[],P=new Map(G.map(vp)),J=L?.user?.id??null;let H;t[18]!==s.id||t[19]!==J?(H=Or.taskBoardAssignee(s.id,J??""),t[18]=s.id,t[19]=J,t[20]=H):H=t[20];const[se,V]=Er(H,null);let ee;t[21]!==V||t[22]!==J?(ee=A=>{J!==null&&V(A)},t[21]=V,t[22]=J,t[23]=ee):ee=t[23];const{filters:ie,setFilters:ne,layout:F,setLayout:q,groupBy:le,subgroupBy:de,setGroupBy:pe,setSubgroupBy:Se,sortBy:Be,sortDirection:oe,setSortBy:ge,setSortDirection:ye}=P2({layout:"board",assignee:J===null?null:E2(se,U?new Set(P.keys()):null),groupBy:"status",sprint:wi(k)},ee),he={...ie,sprint:zd(ie.sprint,k),project:c?null:ie.project},ae=k.find(A=>A.id===he.sprint&&A.state!=="closed")?.id??null;let we;t[24]!==le||t[25]!==pe||t[26]!==Se||t[27]!==de?(we={groupBy:le,subgroupBy:de,onGroupByChange:pe,onSubgroupByChange:Se},t[24]=le,t[25]=pe,t[26]=Se,t[27]=de,t[28]=we):we=t[28];const ce=we;let xe;t[29]!==ge||t[30]!==ye||t[31]!==Be||t[32]!==oe?(xe={sortBy:Be,sortDirection:oe,onSortByChange:ge,onSortDirectionChange:ye},t[29]=ge,t[30]=ye,t[31]=Be,t[32]=oe,t[33]=xe):xe=t[33];const be=xe;let ue;t[34]===Symbol.for("react.memo_cache_sentinel")?(ue=new Map,t[34]=ue):ue=t[34];const[ze,Q]=W.useState(ue),fe=No(m,N);let Oe;t[35]!==fe?(Oe=uo(fe),t[35]=fe,t[36]=Oe):Oe=t[36];const Ge=Oe,Ue=d?{repo:bu(d),virtualMcpId:d.id}:rl(he.project?Ua(he.project,fe)??null:null),[Y]=Ni(),te=rc();let me;t[37]===Symbol.for("react.memo_cache_sentinel")?(me=new Set,t[37]=me):me=t[37];const[Ce,ke]=W.useState(me);let Fe;t[38]===Symbol.for("react.memo_cache_sentinel")?(Fe=A=>ke(Z=>{const Ee=new Set(Z);return Ee.has(A)?Ee.delete(A):Ee.add(A),Ee}),t[38]=Fe):Fe=t[38];const st=Fe,nt=A=>ke(Z=>{const Ee=new Set(Z);for(const Xe of Re)Xe.status===A&&Ee.add(Xe.id);return Ee}),De=()=>ke(new Set),Ve=A=>{ne(A),De()},[$e,Je]=W.useState(!1),[wt,at]=W.useState(null);od();const{setTaskId:ut}=Uu(),{create:Te}=qu(),He=Qt(),Le=bi();let Ye;t[39]!==Le||t[40]!==s.slug||t[41]!==d?(Ye=()=>{if(d){Le({to:"/$org/projects/$agentId/settings",params:{org:s.slug,agentId:d.id}});return}Le({to:"/$org/settings/task-board",params:{org:s.slug}})},t[39]=Le,t[40]=s.slug,t[41]=d,t[42]=Ye):Ye=t[42];const Xt=Ye;let jt;t[43]!==d||t[44]!==e?(jt=d?e("taskBoard.taskFilters.projectSettingsLabel"):void 0,t[43]=d,t[44]=e,t[45]=jt):jt=t[45];const Jt=jt;let bt;t[46]===Symbol.for("react.memo_cache_sentinel")?(bt={strict:!1},t[46]=bt):bt=t[46];const{taskKey:Zt}=cl(bt),it=Zt,Dt=kp,ve=$d(i,it)??null,zt=!!it&&!ve&&!p&&!o,rt=ve?pi(s.slug,ve):null;let kt;t[47]!==Le||t[48]!==it?(kt=()=>{it&&Le({to:".",...Dt(void 0),replace:!0})},t[47]=Le,t[48]=it,t[49]=kt):kt=t[49];const gt=kt;let yt;t[50]!==b.link||t[51]!==Te||t[52]!==l||t[53]!==s.id||t[54]!==ut||t[55]!==He?(yt=async A=>{const Z=crypto.randomUUID(),Ee=$c(s.id).id,Xe=await He.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:A.id}).then(bp).catch(jp),Rt=Pm(A,Xe),ts={type:"doc",content:[{type:"paragraph",content:[Pu({id:A.id,name:A.title,char:"@",kind:"task",metadata:{title:A.title,description:A.description,context:Rt}}),{type:"text",text:" "}]}]};Gu(sessionStorage,l,Z,ts);try{await Te({id:Z,virtual_mcp_id:Ee}),await b.link.mutateAsync({id:A.id,linkThreadId:Z})}catch{}ut(Z,Ee)},t[50]=b.link,t[51]=Te,t[52]=l,t[53]=s.id,t[54]=ut,t[55]=He,t[56]=yt):yt=t[56];const ft=yt,Re=m.filter(A=>Di(A,he,fe)),_e=F2(Ce,Re),mt=qm(le,de),je=mt.includes("status")?Re:Re.filter(A=>!Jr.includes(A.status)||Ld(A.status,Y.taskBoardLaneVisibility)),Tt=Be===null?je:Ym(je,Be,oe,{memberNames:new Map(G.map(xp)),superAgentName:e("taskBoard.taskFilters.assigneeSuperAgent"),index:fe}),Pe=A=>{const Z=vu(A,he.project,fe);Z!==he.project&&ne({...he,project:Z})};let pt;t[57]===Symbol.for("react.memo_cache_sentinel")?(pt=()=>{at(null),Je(!0)},t[57]=pt):pt=t[57];const Ot=pt;let vt;t[58]===Symbol.for("react.memo_cache_sentinel")?(vt=A=>{at(A),Je(!0)},t[58]=vt):vt=t[58];const Nt=vt;let ds;t[59]!==Le||t[60]!==s.slug?(ds=A=>{Le({to:".",...Dt(pi(s.slug,A))})},t[59]=Le,t[60]=s.slug,t[61]=ds):ds=t[61];const es=ds;let us;t[62]!==e?(us=A=>Qe.error(A instanceof Error&&A.message?A.message:e("taskBoard.taskBoard.actionError")),t[62]=e,t[63]=us):us=t[63];const $t=us;let fs;t[64]!==b.update?(fs=(A,Z)=>b.update.mutate({id:A,status:Z}),t[64]=b.update,t[65]=fs):fs=t[65];let _s,ms;t[66]!==b.update||t[67]!==$t?(_s=(A,Z)=>b.update.mutate({id:A,parentId:Z},{onError:$t}),ms=(A,Z)=>b.update.mutate({id:A,isEpic:Z},{onError:$t}),t[66]=b.update,t[67]=$t,t[68]=_s,t[69]=ms):(_s=t[68],ms=t[69]);let Is;t[70]!==Le?(Is=()=>{const A=Dt(void 0);Le({to:".",params:A.params,search:Z=>({...A.search(Z),view:"epics"})})},t[70]=Le,t[71]=Is):Is=t[71];let _t;t[72]!==b.create||t[73]!==$t?(_t=(A,Z)=>b.create.mutateAsync({title:Z,status:"todo",repo:A.repo,virtualMcpId:A.virtualMcpId,parentId:A.id}).catch($t),t[72]=b.create,t[73]=$t,t[74]=_t):_t=t[74];const nn={items:m,memberByUserId:P,onSetStatus:fs,orgSlug:s.slug,setParent:_s,setEpic:ms,onOpen:es,onShowEpics:Is,onCreateChild:_t},an=()=>b.create.mutateAsync({title:e("taskBoard.epics.newEpicTitle"),status:"todo",isEpic:!0,...Ue}).then(A=>{const{item:Z}=A;return es(Z)},$t);let ps;t[75]===Symbol.for("react.memo_cache_sentinel")?(ps=()=>{Je(!1),at(null)},t[75]=ps):ps=t[75];const ht=ps;if(p&&m.length===0){let A;return t[76]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(xt,{className:"size-5 text-muted-foreground"})}),t[76]=A):A=t[76],A}if(zt){let A;return t[77]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Ji,{to:".",...Dt(void 0),replace:!0}),t[77]=A):A=t[77],A}if(rt&&rt!==it)return n.jsx(Ji,{to:".",...Dt(rt),replace:!0});let gs;t[78]!==e?(gs=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.feedView")}),t[78]=e,t[79]=gs):gs=t[79];let Lt;t[80]!==e?(Lt=e("common.taskBoard.feedView"),t[80]=e,t[81]=Lt):Lt=t[81];const As=F==="board";let lt;t[82]!==e?(lt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.boardView")}),t[82]=e,t[83]=lt):lt=t[83];let Ft;t[84]!==q?(Ft=()=>q("board"),t[84]=q,t[85]=Ft):Ft=t[85];let Ze;t[86]!==e?(Ze=e("common.taskBoard.boardView"),t[86]=e,t[87]=Ze):Ze=t[87];let hs;t[88]!==As||t[89]!==lt||t[90]!==Ft||t[91]!==Ze?(hs=n.jsx(Ss.Tab,{active:As,"aria-label":lt,onClick:Ft,children:Ze}),t[88]=As,t[89]=lt,t[90]=Ft,t[91]=Ze,t[92]=hs):hs=t[92];let Pt;t[93]!==e?(Pt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.listView")}),t[93]=e,t[94]=Pt):Pt=t[94];let xs;t[95]!==e?(xs=e("common.taskBoard.listView"),t[95]=e,t[96]=xs):xs=t[96];let zs;t[97]!==e?(zs=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("taskBoard.epics.tab")}),t[97]=e,t[98]=zs):zs=t[98];let Mt;t[99]!==e?(Mt=e("taskBoard.epics.tab"),t[99]=e,t[100]=Mt):Mt=t[100];const $s=n.jsxs(Ss.Tabs,{children:[n.jsx(Ss.Tab,{active:F==="feed","aria-label":gs,onClick:()=>{q("feed"),De()},children:Lt}),hs,n.jsx(Ss.Tab,{active:F==="list","aria-label":Pt,onClick:()=>{q("list"),De()},children:xs}),n.jsx(Ss.Tab,{active:F==="epics","aria-label":zs,onClick:()=>{q("epics"),De()},children:Mt})]}),js=A=>n.jsx(og,{item:A,assignee:A.assigneeId?P.get(A.assigneeId):void 0,assignedBy:A.assignedBy?P.get(A.assignedBy):void 0,members:G,onOpen:()=>es(A),onStatusChange:Z=>b.update.mutate({id:A.id,status:Z}),onRename:Z=>b.update.mutate({id:A.id,title:Z}),onPriorityChange:Z=>b.update.mutate({id:A.id,priority:Z}),onTagsChange:Z=>b.update.mutate({id:A.id,tagIds:Z}),onDueDateChange:Z=>b.update.mutate({id:A.id,dueDate:Z}),onAssign:Z=>{C(Z)||b.update.mutate({id:A.id,assigneeId:Z},{onError:T})}},A.id);let Kt;t[101]===Symbol.for("react.memo_cache_sentinel")?(Kt=n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 sm:px-8",children:n.jsx(n1,{})}),t[101]=Kt):Kt=t[101];let Ut;t[102]!==ce||t[103]!==F||t[104]!==be?(Ut=F==="list"?{grouping:ce,sorting:be}:void 0,t[102]=ce,t[103]=F,t[104]=be,t[105]=Ut):Ut=t[105];const ln=n.jsxs(n.Fragment,{children:[!ve&&n.jsxs(n.Fragment,{children:[n.jsx(Ss.Title,{children:e("sidebar.navDestinations.spineTasks")}),n.jsxs(Ss.Actions,{secondary:n.jsxs(n.Fragment,{children:[n.jsx(x1,{sprints:k,value:he.sprint,onChange:A=>Ve({...he,sprint:A})}),m.length>0&&F!=="epics"&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(fd,{value:he.search,onChange:A=>Ve({...he,search:A}),label:e("taskBoard.taskFilters.searchLabel"),placeholder:e("taskBoard.taskFilters.searchPlaceholder"),clearLabel:e("taskBoard.taskFilters.searchClearLabel")}),n.jsx(N2,{filters:he,items:m,members:G,tags:x,sprints:k,index:fe,scoped:c!==null,onChange:Ve}),n.jsx("div",{className:"contents max-md:hidden",children:F==="list"?n.jsxs(n.Fragment,{children:[n.jsx(S2,{...ce}),n.jsx(w2,{...be})]}):n.jsx(B2,{all:ws,hidden:te.hidden,onToggle:te.setLaneShown})})]})}),n.jsx(A2,{onClick:Xt,label:Jt})]}),children:[n.jsx(a1,{}),n.jsx(r1,{isDemoBoard:a.length>0}),n.jsx(i1,{project:c}),F==="epics"?n.jsxs(re,{size:"sm",onClick:an,children:[n.jsx(is,{size:16}),e("taskBoard.epics.newEpic")]}):n.jsxs(re,{size:"sm",onClick:Ot,children:[n.jsx(is,{size:16}),n.jsx("span",{className:"max-md:sr-only",children:e("taskBoard.taskBoard.newTask")})]})]}),n.jsx(Zi.Toolbar.Left.Portal,{children:$s}),n.jsx(Zi.Toolbar.Right.Portal,{children:n.jsx(Kp,{items:m,onOpen:es})})]}),Kt,n.jsx(I2,{filters:he,items:m,members:G,tags:x,sprints:k,index:fe,onChange:Ve,view:Ut}),m.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:e("taskBoard.taskBoard.noTasksYet")})}):Re.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsxs("div",{className:"flex flex-col items-center gap-3 surface px-4 py-12 text-center text-sm text-muted-foreground",children:[e("taskBoard.taskBoard.noTasksMatch"),n.jsx(re,{variant:"outline",size:"sm",onClick:()=>Ve(Qr),children:e("taskBoard.taskBoard.clearFilters")})]})}):F==="feed"?n.jsx(Zp,{items:Tt,index:fe,memberByUserId:P,onCompose:A=>b.create.mutate({...A,...d?Ue:{}}),onOpen:es}):F==="epics"?n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto w-full max-w-[960px]",children:n.jsx(z1,{})})}):F==="board"?n.jsx(Tp,{visible:!ve,items:D1(Re,m),members:G,memberByUserId:P,selectedIds:_e,onToggleSelect:st,onSelectAllInLane:nt,onOpen:es,onCreate:Nt,onMove:(A,Z,Ee,Xe,Rt)=>{const ts=gi(Ee,A.length);A.forEach((Ht,Ja)=>b.update.mutate({id:Ht,status:Z,sortOrder:ts[Ja],...Xe.has(Ht)&&{priority:Xe.get(Ht)}},{onSettled:()=>Rt(Ht)}))},onAssign:(A,Z)=>{C(Z)||b.update.mutate({id:A,assigneeId:Z},{onError:T})},onPriorityChange:(A,Z)=>b.update.mutate({id:A,priority:Z}),onTypeChange:(A,Z)=>b.update.mutate({id:A,type:Z}),onDueDateChange:(A,Z)=>b.update.mutate({id:A,dueDate:Z}),onAutoFix:A=>{C(Ie)||b.update.mutate({id:A.id,assigneeId:Ie},{onError:T})},onRerun:A=>E([A])}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-2",children:le===null?Tt.map(js):n.jsx(dc,{groups:Lo(Tt,mt,{memberIds:G.map(hp),tagIds:x.map(gp),index:fe}),depth:0,toggled:ze,onToggle:(A,Z,Ee)=>Q(Xe=>Vm(Xe,A,Z,Ee)),renderRow:js,heading:{memberByUserId:P,orgTags:x,index:fe}})})})]}),Rs=$e?`new-${wt??"default"}`:"closed",Es=wt??void 0;let qt;t[106]!==b.create||t[107]!==C||t[108]!==ht||t[109]!==Pe?(qt=A=>{if(C(A.assigneeId)){ht();return}b.create.mutate(A),Pe(A),ht()},t[106]=b.create,t[107]=C,t[108]=ht,t[109]=Pe,t[110]=qt):qt=t[110];let bs;t[111]!==b.create.isPending||t[112]!==Ue||t[113]!==ae||t[114]!==ht||t[115]!==$e||t[116]!==Rs||t[117]!==Es||t[118]!==qt?(bs=n.jsx(em,{open:$e,onClose:ht,defaultStatus:Es,defaultProject:Ue,defaultSprintId:ae,isSaving:b.create.isPending,onSubmit:qt},Rs),t[111]=b.create.isPending,t[112]=Ue,t[113]=ae,t[114]=ht,t[115]=$e,t[116]=Rs,t[117]=Es,t[118]=qt,t[119]=bs):bs=t[119];let Gt;t[120]!==B?(Gt=n.jsx(yd,{mode:"link",open:B,onOpenChange:w}),t[120]=B,t[121]=Gt):Gt=t[121];let Os;t[122]===Symbol.for("react.memo_cache_sentinel")?(Os=A=>!A&&E([]),t[122]=Os):Os=t[122];let Vt;t[123]!==b.rerun.isPending||t[124]!==O||t[125]!==$?(Vt=n.jsx(Em,{items:$,pending:b.rerun.isPending,onOpenChange:Os,onConfirm:O}),t[123]=b.rerun.isPending,t[124]=O,t[125]=$,t[126]=Vt):Vt=t[126];let Ls;t[127]!==b.removeMany||t[128]!==b.update||t[129]!==C||t[130]!==De||t[131]!==m||t[132]!==G||t[133]!==T||t[134]!==ve||t[135]!==Ge||t[136]!==_e?(Ls=_e.size>0&&!ve&&n.jsx(Bp,{count:_e.size,members:G,projectEntries:Ge,onSetProject:A=>{for(const Z of _e)b.update.mutate({id:Z,...A});De()},onMoveTo:A=>{for(const Z of _e)b.update.mutate({id:Z,status:A});De()},onSetSprint:A=>{for(const Z of _e)b.update.mutate({id:Z,sprintId:A});De()},onSetPriority:A=>{for(const Z of _e)b.update.mutate({id:Z,priority:A});De()},onAddTag:A=>{for(const Z of _e){const Ee=m.find(Rt=>Rt.id===Z);if(!Ee)continue;const Xe=Ee.tags.map(mp);Xe.includes(A)||b.update.mutate({id:Z,tagIds:[...Xe,A]})}De()},onAssign:A=>{if(!C(A)){for(const Z of _e)b.update.mutate({id:Z,assigneeId:A},{onError:T});De()}},onSetDueDate:A=>{const Z=Hi(A);for(const Ee of _e)b.update.mutate({id:Ee,dueDate:Z});De()},onAutoFix:_e.size>0&&Array.from(_e).every(A=>{const Z=m.find(Ee=>Ee.id===A);return Z&&(Z.status==="triage"||Z.status==="todo")&&Z.assigneeId!==Ie})?()=>{if(!C(Ie)){for(const A of _e)b.update.mutate({id:A,assigneeId:Ie},{onError:T});De()}}:void 0,onRerun:(()=>{const A=Array.from(_e).flatMap(Z=>{const Ee=m.find(Xe=>Xe.id===Z);return Ee?[Ee]:[]});return A.length===_e.size&&A.every(fp)?()=>E(A):void 0})(),onDelete:()=>{b.removeMany.mutate(Array.from(_e)),De()},onClear:De}),t[127]=b.removeMany,t[128]=b.update,t[129]=C,t[130]=De,t[131]=m,t[132]=G,t[133]=T,t[134]=ve,t[135]=Ge,t[136]=_e,t[137]=Ls):Ls=t[137];const Xa=n.jsxs("div",{ref:z,className:"relative flex min-h-0 flex-1 flex-col",children:[n.jsx("div",{className:K("flex min-h-0 flex-1 flex-col",ve&&"hidden"),children:ln}),ve&&n.jsx(tm,{item:ve,onClose:()=>gt(),isSaving:b.update.isPending,onSetSprint:A=>b.update.mutate({id:ve.id,sprintId:A},{onError:T}),onSubmit:A=>{if(C(A.assigneeId)){gt();return}b.update.mutate({id:ve.id,...A},{onError:T})},onDelete:()=>{b.remove.mutate(ve.id),gt()},onClone:()=>{b.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:ve.title}),description:ve.description,status:ve.status,priority:ve.priority,repo:ve.repo,virtualMcpId:ve.virtualMcpId,dueDate:ve.dueDate,tagIds:ve.tags.map(pp),sprintId:k.find(A=>A.id===ve.sprintId&&A.state!=="closed")?.id??null}),Pe(ve),Qe.success(e("taskBoard.taskDialog.cloneSuccess")),gt()},onArchive:()=>{b.update.mutate({id:ve.id,status:"archived"}),Qe.success(e("taskBoard.taskDialog.archiveSuccess")),gt()},onNewChat:()=>{ft(ve)},onAutoFix:()=>{C(Ie)||(b.update.mutate({id:ve.id,assigneeId:Ie},{onError:T}),gt())},onRerun:()=>{gt(),E([ve])},onOpenPreview:a.includes(ve.id)?void 0:A=>{A.virtualMcpId&&ut(A.threadId,A.virtualMcpId,{panel:"site-editor"})}},ve.id),bs,Gt,Vt,Ls]});return n.jsx(T1,{value:nn,children:Xa})}function fp(t){return t.assigneeId===Ie&&t.status!=="done"}function mp(t){return t.id}function pp(t){return t.id}function gp(t){return t.id}function hp(t){return t.userId}function xp(t){return[t.userId,t.user?.name??t.userId]}function jp(){return[]}function bp(t){return t.prs}function kp(t){return{params:e=>({...e,taskKey:t}),search:yp}}function yp(t){return t}function vp(t){return[t.userId,t]}function Np(t){return t.path}function Sp(t){return t.usable}function Bp(t){const e=R.c(124),{count:s,members:l,projectEntries:i,onSetProject:a,onMoveTo:r,onSetSprint:o,onSetPriority:c,onAddTag:d,onAssign:u,onSetDueDate:f,onAutoFix:m,onRerun:p,onDelete:h,onClear:j}=t,x=X(),{data:k}=El();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const y=b,g=Ll();let v,N,B,w,D,C,S,T,_,z;if(e[2]!==s||e[3]!==r||e[4]!==o||e[5]!==x||e[6]!==g){const ce=g.filter(Cp);w="pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",z="pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 shadow-edge";let xe;e[17]!==s||e[18]!==x?(xe=x("taskBoard.taskBoard.selectedCount",{count:s}),e[17]=s,e[18]=x,e[19]=xe):xe=e[19],e[20]!==xe?(B=n.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:xe}),e[20]=xe,e[21]=B):B=e[21],N=Me;let be;e[22]!==x?(be=x("taskBoard.taskBoard.actionsButton"),e[22]=x,e[23]=be):be=e[23],e[24]!==be?(_=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"outline",size:"sm",children:be})}),e[24]=be,e[25]=_):_=e[25],v=qe,D="center",C="top";let ue;e[26]!==x?(ue=x("taskBoard.taskBoard.moveToButton"),e[26]=x,e[27]=ue):ue=e[27];let ze;e[28]!==ue?(ze=n.jsx(vs,{children:ue}),e[28]=ue,e[29]=ze):ze=e[29];let Q;e[30]!==r||e[31]!==x?(Q=ws.map(Oe=>n.jsx(Ne,{onClick:()=>r(Oe),children:dt(Oe,x).label},Oe)),e[30]=r,e[31]=x,e[32]=Q):Q=e[32];let fe;e[33]!==Q?(fe=n.jsx(Ns,{children:Q}),e[33]=Q,e[34]=fe):fe=e[34],e[35]!==ze||e[36]!==fe?(S=n.jsxs(ys,{children:[ze,fe]}),e[35]=ze,e[36]=fe,e[37]=S):S=e[37],T=ce.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.sprints.moveToSprint")}),n.jsxs(Ns,{className:"w-56",children:[n.jsxs(Ne,{onClick:()=>o(null),children:[n.jsx(dl,{size:14,className:"text-muted-foreground"}),x("taskBoard.sprints.backlog")]}),ce.map(Oe=>n.jsxs(Ne,{onClick:()=>o(Oe.id),children:[n.jsx(Wt,{size:14,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:ol(Oe,x)})]},Oe.id))]})]}),e[2]=s,e[3]=r,e[4]=o,e[5]=x,e[6]=g,e[7]=v,e[8]=N,e[9]=B,e[10]=w,e[11]=D,e[12]=C,e[13]=S,e[14]=T,e[15]=_,e[16]=z}else v=e[7],N=e[8],B=e[9],w=e[10],D=e[11],C=e[12],S=e[13],T=e[14],_=e[15],z=e[16];let I;e[38]!==x?(I=x("taskBoard.taskBoard.changePriorityButton"),e[38]=x,e[39]=I):I=e[39];let $;e[40]!==I?($=n.jsx(vs,{children:I}),e[40]=I,e[41]=$):$=e[41];let E;e[42]!==c||e[43]!==x?(E=Ts.map(ce=>n.jsxs(Ne,{onClick:()=>c(ce),children:[n.jsx("span",{className:K("size-2 rounded-full",et[ce].dotClassName)}),x(et[ce].labelKey)]},ce)),e[42]=c,e[43]=x,e[44]=E):E=e[44];let O;e[45]!==E?(O=n.jsx(Ns,{children:E}),e[45]=E,e[46]=O):O=e[46];let L;e[47]!==$||e[48]!==O?(L=n.jsxs(ys,{children:[$,O]}),e[47]=$,e[48]=O,e[49]=L):L=e[49];let U;e[50]!==x?(U=x("taskBoard.taskBoard.assignButton"),e[50]=x,e[51]=U):U=e[51];let G;e[52]!==U?(G=n.jsx(vs,{children:U}),e[52]=U,e[53]=G):G=e[53];let P;e[54]!==l||e[55]!==u?(P=n.jsx(Ns,{className:"w-56 p-0",children:n.jsx(qi,{members:l,onSelect:u})}),e[54]=l,e[55]=u,e[56]=P):P=e[56];let J;e[57]!==G||e[58]!==P?(J=n.jsxs(ys,{children:[G,P]}),e[57]=G,e[58]=P,e[59]=J):J=e[59];let H;e[60]!==a||e[61]!==i||e[62]!==x?(H=i.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.taskBoard.assignProjectButton")}),n.jsxs(Ns,{className:"w-64",children:[n.jsx(Ne,{onClick:()=>a(rl(null)),children:x("taskBoard.taskDialog.noProject")}),i.map(ce=>n.jsx(Ne,{className:"gap-2",onClick:()=>a(rl(ce)),children:n.jsx(Bo,{entry:ce})},ce.id))]})]}),e[60]=a,e[61]=i,e[62]=x,e[63]=H):H=e[63];let se;e[64]!==x?(se=x("taskBoard.taskBoard.dueDateButton"),e[64]=x,e[65]=se):se=e[65];let V;e[66]!==se?(V=n.jsx(vs,{children:se}),e[66]=se,e[67]=V):V=e[67];let ee;e[68]!==f?(ee=n.jsx(Ns,{className:"w-auto p-0",children:n.jsx($i,{mode:"single",onSelect:ce=>ce&&f(ce),initialFocus:!0})}),e[68]=f,e[69]=ee):ee=e[69];let ie;e[70]!==V||e[71]!==ee?(ie=n.jsxs(ys,{children:[V,ee]}),e[70]=V,e[71]=ee,e[72]=ie):ie=e[72];let ne;e[73]!==d||e[74]!==y||e[75]!==x?(ne=y.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.taskBoard.addTagButton")}),n.jsx(Ns,{children:y.map(ce=>n.jsxs(Ne,{onClick:()=>d(ce.id),children:[n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:en(ce.color)}}),ce.name]},ce.id))})]}),e[73]=d,e[74]=y,e[75]=x,e[76]=ne):ne=e[76];let F;e[77]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(sl,{}),e[77]=F):F=e[77];let q;e[78]!==x?(q=x("taskBoard.taskBoard.deleteSelectedButton"),e[78]=x,e[79]=q):q=e[79];let le;e[80]!==h||e[81]!==q?(le=n.jsx(Ne,{variant:"destructive",onClick:h,children:q}),e[80]=h,e[81]=q,e[82]=le):le=e[82];let de;e[83]!==v||e[84]!==L||e[85]!==J||e[86]!==H||e[87]!==ie||e[88]!==ne||e[89]!==le||e[90]!==D||e[91]!==C||e[92]!==S||e[93]!==T?(de=n.jsxs(v,{align:D,side:C,children:[S,T,L,J,H,ie,ne,F,le]}),e[83]=v,e[84]=L,e[85]=J,e[86]=H,e[87]=ie,e[88]=ne,e[89]=le,e[90]=D,e[91]=C,e[92]=S,e[93]=T,e[94]=de):de=e[94];let pe;e[95]!==N||e[96]!==de||e[97]!==_?(pe=n.jsxs(N,{children:[_,de]}),e[95]=N,e[96]=de,e[97]=_,e[98]=pe):pe=e[98];let Se;e[99]!==m||e[100]!==x?(Se=m&&n.jsxs(re,{variant:"outline",size:"sm",onClick:m,children:[n.jsx(It,{className:"size-3.5"}),x("taskBoard.taskBoard.autoFix")]}),e[99]=m,e[100]=x,e[101]=Se):Se=e[101];let Be;e[102]!==p||e[103]!==x?(Be=p&&n.jsxs(re,{variant:"outline",size:"sm",onClick:p,children:[n.jsx(zl,{className:"size-3.5"}),x("taskBoard.taskBoard.rerun")]}),e[102]=p,e[103]=x,e[104]=Be):Be=e[104];let oe;e[105]!==x?(oe=x("taskBoard.taskBoard.clearSelectionButton"),e[105]=x,e[106]=oe):oe=e[106];let ge;e[107]!==x?(ge=x("taskBoard.taskBoard.clearSelectionButton"),e[107]=x,e[108]=ge):ge=e[108];let ye;e[109]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(il,{size:16}),e[109]=ye):ye=e[109];let he;e[110]!==j||e[111]!==oe||e[112]!==ge?(he=n.jsx(re,{variant:"ghost",size:"icon","aria-label":oe,title:ge,onClick:j,className:"shrink-0 text-muted-foreground",children:ye}),e[110]=j,e[111]=oe,e[112]=ge,e[113]=he):he=e[113];let ae;e[114]!==B||e[115]!==pe||e[116]!==Se||e[117]!==Be||e[118]!==he||e[119]!==z?(ae=n.jsxs("div",{className:z,children:[B,pe,Se,Be,he]}),e[114]=B,e[115]=pe,e[116]=Se,e[117]=Be,e[118]=he,e[119]=z,e[120]=ae):ae=e[120];let we;return e[121]!==w||e[122]!==ae?(we=n.jsx("div",{className:w,children:ae}),e[121]=w,e[122]=ae,e[123]=we):we=e[123],we}function Cp(t){return t.state!=="closed"}function wp(t,e){return t.sortOrder-e.sortOrder}function rc(){const t=R.c(8),[e,s]=Ni();let l;t[0]!==e.taskBoardLaneVisibility?(l=Fd(e.taskBoardLaneVisibility),t[0]=e.taskBoardLaneVisibility,t[1]=l):l=t[1];const{lanes:i,hidden:a}=l;let r;t[2]!==s?(r=(d,u)=>s(f=>({...f,taskBoardLaneVisibility:{...f.taskBoardLaneVisibility,[d]:u}})),t[2]=s,t[3]=r):r=t[3];const o=r;let c;return t[4]!==a||t[5]!==i||t[6]!==o?(c={lanes:i,hidden:a,setLaneShown:o},t[4]=a,t[5]=i,t[6]=o,t[7]=c):c=t[7],c}function _r(t,e){return Number(Qs(e))-Number(Qs(t))||wp(t,e)}function Dp(t){return t.startsWith(Ai)||t.startsWith(zi)}function Tp(t){const e=R.c(35),{items:s,members:l,memberByUserId:i,selectedIds:a,onToggleSelect:r,onSelectAllInLane:o,onOpen:c,onCreate:d,onMove:u,onAutoFix:f,onRerun:m,onAssign:p,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,visible:k}=t,[b,y]=W.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[v,N]=W.useState(g);let B;e[1]===Symbol.for("react.memo_cache_sentinel")?(B=new Map,e[1]=B):B=e[1];const[w,D]=W.useState(B),[C,S]=Ni(),T=W.useRef(null);let _;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=Y=>{if(T.current=Y,!Y)return;const te=me=>{if(me.deltaX!==0||me.deltaY===0||Y.scrollWidth<=Y.clientWidth||Y.scrollHeight>Y.clientHeight)return;for(let ke=me.target;ke&&ke!==Y;ke=ke.parentElement)if(ke.hasAttribute("data-lane-scroll"))return;me.preventDefault();const Ce=me.deltaMode===1?16:me.deltaMode===2?Y.clientWidth:1;Y.scrollLeft=Y.scrollLeft+me.deltaY*Ce};return Y.addEventListener("wheel",te,{passive:!1}),()=>{T.current=null,Y.removeEventListener("wheel",te)}},e[2]=_):_=e[2];const z=_,I=w.size>0?s.map(Y=>{const te=w.get(Y.id);return te?{...Y,...te}:Y}):s;if(w.size>0&&!b){const Y=[...w].filter(te=>{const[me,Ce]=te,ke=s.find(Fe=>Fe.id===me);return ke?.status===Ce.status&&ke.sortOrder===Ce.sortOrder&&(!Ce.priority||ke.priority===Ce.priority)});Y.length>0&&D(te=>{const me=new Map(te);for(const[Ce]of Y)me.delete(Ce);return me})}Fm(T,I.map(zp).join(","),b===null,k);const $=Y=>I.filter(te=>te.status===Y).sort(_r),{lanes:E,hidden:O,setLaneShown:L}=rc(),U=C.collapsedTaskBoardLanes,G=I.some(Qs);let P;if(e[3]!==E||e[4]!==U){let Y;e[6]!==U?(Y=te=>!U.includes(te),e[6]=U,e[7]=Y):Y=e[7],P=E.find(Y),e[3]=E,e[4]=U,e[5]=P}else P=e[5];const J=P;let H;e[8]!==S?(H=Y=>S(te=>({...te,collapsedTaskBoardLanes:te.collapsedTaskBoardLanes.includes(Y)?te.collapsedTaskBoardLanes.filter(me=>me!==Y):[...te.collapsedTaskBoardLanes,Y]})),e[8]=S,e[9]=H):H=e[9];const se=H,V=Y=>qd({overId:Y,statusOf:te=>I.find(me=>me.id===te)?.status});let ee;e[10]!==a?(ee=Y=>a.has(Y)&&a.size>1?[Y,...Array.from(a).filter(te=>te!==Y)]:[Y],e[10]=a,e[11]=ee):ee=e[11];const ie=ee;let ne;e[12]!==s?(ne=(Y,te,me,Ce)=>{const ke=Ce===void 0?null:Ce,Fe=gi(me,Y.length);D(st=>{const nt=new Map(st);return Y.forEach((De,Ve)=>{const $e=s.find(wt=>wt.id===De),Je=$e&&ke&&ai($e,ke);nt.set(De,{status:te,sortOrder:Fe[Ve],...Je&&{priority:Je}})}),nt})},e[12]=s,e[13]=ne):ne=e[13];const F=ne;let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q={activationConstraint:{distance:4}},e[14]=q):q=e[14];let le;e[15]===Symbol.for("react.memo_cache_sentinel")?(le={coordinateGetter:Vc},e[15]=le):le=e[15];const de=Pc(er(Kc,q),er(Mc,le)),pe=(Y,te,me)=>{const Ce=s.find(ke=>ke.id===te);return Ce?Gd({overId:Y,itemOf:ke=>I.find(Fe=>Fe.id===ke),fromStatus:Ce.status,toStatus:me,dragged:ie(te)}):null},Se=Y=>{const te=String(Y.active.id),me=V(Y.over?.id),Ce=I.find($e=>$e.id===te),ke=s.find($e=>$e.id===te);if(!me||!Ce||!ke)return;const Fe=pe(Y.over?.id,te,me),st=Fe&&ai(ke,Fe)||void 0;if(Ce.status===me&&w.get(te)?.priority===st)return;const nt=ie(te),De=String(Y.over?.id??""),Ve=$(me).filter($e=>!nt.includes($e.id));F(nt,me,rr(Ve,Dp(De)?null:De,te),Fe)},Be=Y=>{const te=String(Y.active.id);y(null);const me=V(Y.over?.id)??I.find(Te=>Te.id===te)?.status;if(!me){D(new Map);return}const Ce=ie(te),ke=$(me),Fe=String(Y.over?.id??""),st=ke.findIndex(Te=>Te.id===te),nt=Fe.startsWith(zi)?ke.filter(Te=>Qs(Te)&&Te.id!==te).length:Fe.startsWith(Ai)?ke.length-1:ke.findIndex(Te=>Te.id===Fe),De=st===-1||nt===-1?ke:Hc(ke,st,Math.min(nt,ke.length-1)),Ve=pe(Y.over?.id,te,me),$e=new Map;for(const Te of Ce){const He=s.find(Ye=>Ye.id===Te),Le=He&&Ve&&ai(He,Ve);Le&&$e.set(Te,Le)}const Je=s.filter(Te=>Te.status===me).sort(_r).map(Ap).join();if($e.size===0&&Je===De.map(Ip).join()){D(new Map);return}const wt=De.slice(De.findIndex(Te=>Te.id===te)+1).find(Te=>!Ce.includes(Te.id)),at=rr(ke.filter(Te=>!Ce.includes(Te.id)),wt?.id??null,te);F(Ce,me,at,Ve),N(Ce);const ut=new Map(gi(at,Ce.length).map((Te,He)=>[Ce[He],Te]));u(Ce,me,at,$e,Te=>D(He=>{const Le=He.get(Te);if(!Le||Le.status!==me||Le.sortOrder!==ut.get(Te))return He;const Ye=new Map(He);return Ye.delete(Te),Ye}))},oe=b?I.find(Y=>Y.id===b):null,ge=b?ie(b):[],ye=Y=>ge.length>0&&ge.every(te=>{const me=s.find(Ce=>Ce.id===te);return!!me&&!me.assigneeId&&me.status!==Y});let he;e[16]===Symbol.for("react.memo_cache_sentinel")?(he=Y=>{y(String(Y.active.id)),N([])},e[16]=he):he=e[16];let ae;e[17]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{y(null),D(new Map)},e[17]=ae):ae=e[17];let we;e[18]===Symbol.for("react.memo_cache_sentinel")?(we=K("mx-auto grid w-full max-w-[1680px]","min-h-full grid-rows-[auto_auto_1fr] gap-x-3 pb-6","px-4 pt-6 sm:px-8"),e[18]=we):we=e[18];const ce=O.length>0;let xe;e[19]!==E||e[20]!==U||e[21]!==ce?(xe=Pd({lanes:E,collapsed:U,hasHiddenTail:ce}),e[19]=E,e[20]=U,e[21]=ce,e[22]=xe):xe=e[22];let be;e[23]!==xe?(be={gridTemplateColumns:xe},e[23]=xe,e[24]=be):be=e[24];let ue;e[25]!==O||e[26]!==$||e[27]!==L?(ue=O.length>0&&n.jsx($p,{statuses:O,countOf:Y=>$(Y).length,onShow:Y=>L(Y,!0)}),e[25]=O,e[26]=$,e[27]=L,e[28]=ue):ue=e[28];const ze=Ac.createPortal,Q=Uc,fe=null,Oe=oe&&n.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[n.jsx(cc,{item:oe,assignee:oe.assigneeId?i.get(oe.assigneeId):void 0,assignedBy:oe.assignedBy?i.get(oe.assignedBy):void 0,selected:a.has(oe.id),onOpen:_p,className:"w-full shadow-lift"}),ge.length>1&&n.jsx("span",{className:"absolute -top-2 -right-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-foreground px-1.5 text-2xs font-semibold text-background",children:ge.length})]});let Ge;e[29]!==Q||e[30]!==Oe?(Ge=n.jsx(Q,{dropAnimation:fe,children:Oe}),e[29]=Q,e[30]=Oe,e[31]=Ge):Ge=e[31];let Ue;return e[32]!==ze||e[33]!==Ge?(Ue=ze(Ge,document.body),e[32]=ze,e[33]=Ge,e[34]=Ue):Ue=e[34],n.jsxs(qc,{sensors:de,collisionDetection:Md,onDragStart:he,onDragOver:Se,onDragEnd:Be,onDragCancel:ae,children:[n.jsx("div",{ref:z,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:n.jsxs("div",{className:we,style:be,children:[E.map(Y=>n.jsx(Rp,{status:Y,items:$(Y),members:l,memberByUserId:i,selectedIds:a,isTarget:oe?.status===Y,firesOnDrop:oe?.status===Y&&ye(Y),draggedCount:ge.length,hiddenIds:ge,landedIds:v,onToggleSelect:r,onSelectAllInLane:o,onOpen:c,onCreate:d,onAutoFix:f,onRerun:m,onAssign:p,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,onHide:E.length>1?()=>L(Y,!1):void 0,collapsed:U.includes(Y),onToggleCollapsed:()=>se(Y),labelled:Y===J,anyCritical:G},Y)),ue]})}),Ue]})}function _p(){}function Ip(t){return t.id}function Ap(t){return t.id}function zp(t){return`${t.id}:${t.status}`}function $p(t){const e=R.c(19),{statuses:s,countOf:l,onShow:i}=t,a=X();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Va,{size:14,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=r):r=e[0];let o;e[1]!==a?(o=a("taskBoard.taskBoard.hiddenColumns"),e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[r,o]}),e[3]=o,e[4]=c):c=e[4];let d;if(e[5]!==l||e[6]!==i||e[7]!==s||e[8]!==a){let m;e[10]!==l||e[11]!==i||e[12]!==a?(m=p=>{const{label:h,visual:j}=dt(p,a),x=j.icon;return n.jsxs("div",{"data-hidden-lane":p,className:"surface flex items-center gap-2 px-3 py-2.5",children:[n.jsx(x,{size:15,className:K("shrink-0",j.iconClassName)}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:h}),n.jsx("span",{className:"ml-auto text-2xs font-medium text-muted-foreground",children:l(p)}),n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-xs","aria-label":a("taskBoard.taskBoard.laneMenuAriaLabel",{lane:h}),className:"shrink-0 text-muted-foreground",children:n.jsx(Ys,{className:"size-3.75"})})}),n.jsx(qe,{align:"end",children:n.jsx(Ne,{onClick:()=>i(p),children:a("taskBoard.taskBoard.showColumn")})})]})]},p)},e[10]=l,e[11]=i,e[12]=a,e[13]=m):m=e[13],d=s.map(m),e[5]=l,e[6]=i,e[7]=s,e[8]=a,e[9]=d}else d=e[9];let u;e[14]!==d?(u=n.jsx("div",{className:"flex flex-col gap-2 px-1 pt-1",children:d}),e[14]=d,e[15]=u):u=e[15];let f;return e[16]!==c||e[17]!==u?(f=n.jsxs("details",{className:"group row-span-3 h-full min-w-0 py-1",children:[c,u]}),e[16]=c,e[17]=u,e[18]=f):f=e[18],f}function Rp(t){const e=R.c(155),{status:s,items:l,members:i,memberByUserId:a,selectedIds:r,isTarget:o,firesOnDrop:c,draggedCount:d,hiddenIds:u,landedIds:f,onToggleSelect:m,onSelectAllInLane:p,onOpen:h,onCreate:j,onAutoFix:x,onRerun:k,onAssign:b,onPriorityChange:y,onTypeChange:g,onDueDateChange:v,onHide:N,collapsed:B,onToggleCollapsed:w,labelled:D,anyCritical:C}=t,S=X(),{label:T,visual:_}=dt(s,S),z=_.icon,[I,$]=W.useState(!1),E=cd(s),O=dd(s).filter(Pp).map(Fp),L=c&&O.length>0,U=`${Ai}${s}`;let G;e[0]!==U?(G={id:U},e[0]=U,e[1]=G):G=e[1];const{setNodeRef:P}=tr(G);let J;e[2]!==s?(J=Ud(s),e[2]=s,e[3]=J):J=e[3];const H=J,se=`${zi}${s}`,V=!H||!C;let ee;e[4]!==se||e[5]!==V?(ee={id:se,disabled:V},e[4]=se,e[5]=V,e[6]=ee):ee=e[6];const{setNodeRef:ie}=tr(ee),ne=l.filter(Qs),F=l.filter(Lp);let q;e[7]!==u||e[8]!==f||e[9]!==a||e[10]!==i||e[11]!==b||e[12]!==x||e[13]!==v||e[14]!==h||e[15]!==y||e[16]!==k||e[17]!==m||e[18]!==g||e[19]!==r?(q=Re=>n.jsx(qp,{item:Re,assignee:Re.assigneeId?a.get(Re.assigneeId):void 0,assignedBy:Re.assignedBy?a.get(Re.assignedBy):void 0,members:i,selected:r.has(Re.id),hidden:u.includes(Re.id),landed:f.includes(Re.id),onToggleSelect:()=>m(Re.id),onOpen:()=>h(Re),onAutoFix:x?()=>x(Re):void 0,onRerun:k?()=>k(Re):void 0,onAssign:b?_e=>b(Re.id,_e):void 0,onPriorityChange:y?_e=>y(Re.id,_e):void 0,onTypeChange:g?_e=>g(Re.id,_e):void 0,onDueDateChange:v?_e=>v(Re.id,_e):void 0},Re.id),e[7]=u,e[8]=f,e[9]=a,e[10]=i,e[11]=b,e[12]=x,e[13]=v,e[14]=h,e[15]=y,e[16]=k,e[17]=m,e[18]=g,e[19]=r,e[20]=q):q=e[20];const le=q;if(B){const Re=o?"bg-muted":"bg-muted/50";let _e;e[21]!==Re?(_e=K("flex w-full flex-col items-center gap-2 rounded-xl px-1 py-3 transition-colors",Re),e[21]=Re,e[22]=_e):_e=e[22];let mt;e[23]!==l.length?(mt=n.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:l.length}),e[23]=l.length,e[24]=mt):mt=e[24];let je;e[25]!==T||e[26]!==S?(je=S("taskBoard.taskBoard.expandColumnAriaLabel",{lane:T}),e[25]=T,e[26]=S,e[27]=je):je=e[27];let Tt;e[28]===Symbol.for("react.memo_cache_sentinel")?(Tt=n.jsx(Vu,{size:15}),e[28]=Tt):Tt=e[28];let Pe;e[29]!==w||e[30]!==je?(Pe=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":je,onClick:w,className:Za,children:Tt})}),e[29]=w,e[30]=je,e[31]=Pe):Pe=e[31];let pt;e[32]!==S?(pt=S("taskBoard.taskBoard.expandColumn"),e[32]=S,e[33]=pt):pt=e[33];let Ot;e[34]!==pt?(Ot=n.jsx(Us,{side:"right",children:pt}),e[34]=pt,e[35]=Ot):Ot=e[35];let vt;return e[36]!==Pe||e[37]!==Ot?(vt=n.jsxs(Ms,{children:[Pe,Ot]}),e[36]=Pe,e[37]=Ot,e[38]=vt):vt=e[38],n.jsx("div",{ref:P,"data-lane":s,"data-lane-collapsed":"","data-drop-target":o||void 0,className:"group/lane row-span-3 flex h-full min-h-0 min-w-0 flex-col items-center py-1",children:n.jsxs("div",{className:_e,children:[n.jsx(z,{size:15,className:K("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{className:"text-sm font-medium text-foreground [writing-mode:vertical-rl]",children:T}),mt,vt]})})}const de=L?"bg-special/15 ring-1 ring-inset ring-special/30":o&&"bg-muted/50";let pe;e[39]!==de?(pe=K("group/lane min-h-0 min-w-0 rounded-xl py-1 transition-colors","row-span-3 grid grid-rows-subgrid max-md:flex max-md:flex-col",de),e[39]=de,e[40]=pe):pe=e[40];const Se=o?"bg-muted":"bg-background";let Be;e[41]!==Se?(Be=K("sticky top-0 z-10 flex min-w-0 flex-col transition-colors",Se),e[41]=Se,e[42]=Be):Be=e[42];let oe;e[43]!==l.length?(oe=n.jsx("span",{className:"rounded-md bg-muted px-1.5 text-2xs font-medium text-muted-foreground",children:l.length}),e[43]=l.length,e[44]=oe):oe=e[44];const ge=o?"from-muted from-70%":"from-background from-70%";let ye;e[45]!==ge?(ye=K("absolute inset-y-0 right-1 flex items-center gap-0.5 bg-linear-to-l to-transparent pl-8 opacity-0 transition-opacity group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-within:opacity-100 has-data-[state=open]:opacity-100",ge),e[45]=ge,e[46]=ye):ye=e[46];const he=E&&n.jsxs(Ms,{children:[n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":S("taskBoard.columnRules.menuItem"),onClick:()=>$(!0),className:Za,children:n.jsx(ld,{size:13})})}),n.jsx(Us,{side:"bottom",className:"max-w-64",children:S(E)})]});let ae;e[47]!==T||e[48]!==S?(ae=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[47]=T,e[48]=S,e[49]=ae):ae=e[49];let we;e[50]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(Ys,{size:15}),e[50]=we):we=e[50];let ce;e[51]!==ae?(ce=n.jsx(Ks,{asChild:!0,children:n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":ae,className:Za,children:we})})}),e[51]=ae,e[52]=ce):ce=e[52];let xe;e[53]!==T||e[54]!==S?(xe=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[53]=T,e[54]=S,e[55]=xe):xe=e[55];let be;e[56]!==xe?(be=n.jsx(Us,{side:"top",children:xe}),e[56]=xe,e[57]=be):be=e[57];let ue;e[58]!==ce||e[59]!==be?(ue=n.jsxs(Ms,{children:[ce,be]}),e[58]=ce,e[59]=be,e[60]=ue):ue=e[60];let ze;e[61]!==$?(ze=()=>$(!0),e[61]=$,e[62]=ze):ze=e[62];let Q;e[63]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(ni,{size:14}),e[63]=Q):Q=e[63];let fe;e[64]!==S?(fe=S("taskBoard.columnRules.menuItem"),e[64]=S,e[65]=fe):fe=e[65];let Oe;e[66]!==ze||e[67]!==fe?(Oe=n.jsxs(Ne,{onClick:ze,children:[Q,fe]}),e[66]=ze,e[67]=fe,e[68]=Oe):Oe=e[68];let Ge;e[69]!==p||e[70]!==s?(Ge=()=>p(s),e[69]=p,e[70]=s,e[71]=Ge):Ge=e[71];let Ue;e[72]!==S?(Ue=S("taskBoard.taskBoard.selectAllInLane"),e[72]=S,e[73]=Ue):Ue=e[73];let Y;e[74]!==Ge||e[75]!==Ue?(Y=n.jsx(Ne,{onClick:Ge,children:Ue}),e[74]=Ge,e[75]=Ue,e[76]=Y):Y=e[76];let te;e[77]!==N||e[78]!==S?(te=N&&n.jsx(Ne,{onClick:N,children:S("taskBoard.taskBoard.hideColumn")}),e[77]=N,e[78]=S,e[79]=te):te=e[79];let me;e[80]!==Oe||e[81]!==Y||e[82]!==te?(me=n.jsxs(qe,{align:"end",children:[Oe,Y,te]}),e[80]=Oe,e[81]=Y,e[82]=te,e[83]=me):me=e[83];let Ce;e[84]!==ue||e[85]!==me?(Ce=n.jsxs(Me,{children:[ue,me]}),e[84]=ue,e[85]=me,e[86]=Ce):Ce=e[86];let ke;e[87]!==T||e[88]!==S?(ke=S("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:T}),e[87]=T,e[88]=S,e[89]=ke):ke=e[89];let Fe;e[90]!==j||e[91]!==s?(Fe=()=>j(s),e[90]=j,e[91]=s,e[92]=Fe):Fe=e[92];let st;e[93]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(is,{size:15}),e[93]=st):st=e[93];let nt;e[94]!==ke||e[95]!==Fe?(nt=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":ke,onClick:Fe,className:Za,children:st})}),e[94]=ke,e[95]=Fe,e[96]=nt):nt=e[96];let De;e[97]!==T||e[98]!==S?(De=S("taskBoard.taskBoard.newTaskInLaneTitle",{lane:T}),e[97]=T,e[98]=S,e[99]=De):De=e[99];let Ve;e[100]!==De?(Ve=n.jsx(Us,{side:"top",children:De}),e[100]=De,e[101]=Ve):Ve=e[101];let $e;e[102]!==nt||e[103]!==Ve?($e=n.jsxs(Ms,{children:[nt,Ve]}),e[102]=nt,e[103]=Ve,e[104]=$e):$e=e[104];let Je;e[105]!==T||e[106]!==S?(Je=S("taskBoard.taskBoard.collapseColumnAriaLabel",{lane:T}),e[105]=T,e[106]=S,e[107]=Je):Je=e[107];let wt;e[108]===Symbol.for("react.memo_cache_sentinel")?(wt=n.jsx(Hu,{size:15}),e[108]=wt):wt=e[108];let at;e[109]!==w||e[110]!==Je?(at=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":Je,onClick:w,className:Za,children:wt})}),e[109]=w,e[110]=Je,e[111]=at):at=e[111];let ut;e[112]!==S?(ut=S("taskBoard.taskBoard.collapseColumn"),e[112]=S,e[113]=ut):ut=e[113];let Te;e[114]!==ut?(Te=n.jsx(Us,{side:"top",children:ut}),e[114]=ut,e[115]=Te):Te=e[115];let He;e[116]!==at||e[117]!==Te?(He=n.jsxs(Ms,{children:[at,Te]}),e[116]=at,e[117]=Te,e[118]=He):He=e[118];let Le;e[119]!==ye||e[120]!==he||e[121]!==Ce||e[122]!==$e||e[123]!==He?(Le=n.jsxs("div",{className:ye,children:[he,Ce,$e,He]}),e[119]=ye,e[120]=he,e[121]=Ce,e[122]=$e,e[123]=He,e[124]=Le):Le=e[124];const Ye=C?n.jsxs("div",{className:K("flex min-h-0 min-w-0 flex-col gap-3 px-1 pt-4.5",!H&&"invisible"),children:[n.jsx(Ar,{visible:D,icon:Pr,iconClassName:"text-destructive",label:S("taskBoard.taskBoard.swimlaneCritical")}),n.jsx("div",{ref:ie,"data-lane-scroll":H?s:void 0,className:Ir,children:n.jsx(sr,{items:ne.map(Op),strategy:nr,children:ne.map(le)})})]}):n.jsx("div",{}),Xt=C?"pt-7":"pt-4.5";let jt;e[125]!==Xt?(jt=K("flex min-h-0 min-w-0 flex-col gap-3 px-1 pb-1",Xt),e[125]=Xt,e[126]=jt):jt=e[126];let Jt;e[127]!==S?(Jt=S("taskBoard.taskBoard.swimlaneImprovements"),e[127]=S,e[128]=Jt):Jt=e[128];let bt;e[129]!==D||e[130]!==Jt?(bt=n.jsx(Ar,{visible:D,icon:ni,iconClassName:"text-muted-foreground",label:Jt}),e[129]=D,e[130]=Jt,e[131]=bt):bt=e[131];let Zt;e[132]===Symbol.for("react.memo_cache_sentinel")?(Zt=K(Ir,"pb-16"),e[132]=Zt):Zt=e[132];const it=F.map(Ep),Dt=F.map(le);let ve;e[133]!==it||e[134]!==Dt?(ve=n.jsx(sr,{items:it,strategy:nr,children:Dt}),e[133]=it,e[134]=Dt,e[135]=ve):ve=e[135];let zt;e[136]!==P||e[137]!==s||e[138]!==ve?(zt=n.jsx("div",{ref:P,"data-lane-scroll":s,className:Zt,children:ve}),e[136]=P,e[137]=s,e[138]=ve,e[139]=zt):zt=e[139];let rt;e[140]!==jt||e[141]!==bt||e[142]!==zt?(rt=n.jsxs("div",{className:jt,children:[bt,zt]}),e[140]=jt,e[141]=bt,e[142]=zt,e[143]=rt):rt=e[143];let kt;e[144]!==Ye||e[145]!==rt?(kt=n.jsxs(n.Fragment,{children:[Ye,rt]}),e[144]=Ye,e[145]=rt,e[146]=kt):kt=e[146];const gt=ud,yt=_.iconClassName.replace(/\banimate-\S+\b/g,"").trim();let ft;return e[147]!==z||e[148]!==gt||e[149]!==T||e[150]!==I||e[151]!==$||e[152]!==s||e[153]!==yt?(ft=n.jsx(gt,{columnKey:s,label:T,icon:z,iconClassName:yt,open:I,onOpenChange:$}),e[147]=z,e[148]=gt,e[149]=T,e[150]=I,e[151]=$,e[152]=s,e[153]=yt,e[154]=ft):ft=e[154],n.jsxs("div",{"data-lane":s,"data-drop-target":o||void 0,className:pe,children:[n.jsxs("div",{className:Be,children:[n.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1.5",children:[n.jsx(z,{size:15,className:K("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{title:T,className:"min-w-0 truncate text-sm font-medium text-foreground",children:T}),oe,Le]}),L&&n.jsxs("div",{role:"status",className:"mx-1 mb-1.5 flex items-center gap-2 rounded-lg border border-special/30 bg-background px-3 py-2 text-xs text-special",children:[n.jsx(ni,{size:14,className:"shrink-0"}),n.jsx("span",{children:S(d>1?"taskBoard.dropHint.pickUpMany":"taskBoard.dropHint.pickUp",{names:O.join(", ")})})]})]}),kt,ft]})}function Ep(t){return t.id}function Op(t){return t.id}function Lp(t){return!Qs(t)}function Fp(t){return t.name}function Pp(t){return t.active}const Ir="flex flex-1 flex-col gap-3 rounded-xl bg-muted/50 p-2";function Mp(t){const e=Date.parse(t);if(Number.isNaN(e))return"";const s=Math.max(0,Math.floor((Date.now()-e)/6e4));if(s<60)return`${s}m`;const l=Math.floor(s/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function Kp(t){const e=R.c(47),{items:s,onOpen:l}=t,i=X(),{org:a}=tt(),[r,o]=W.useState(!1);let c,d,u,f,m,p,h,j,x,k,b,y,g;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==a||e[4]!==i){m=Symbol.for("react.early_return_sentinel");e:{const w=Hr(s);if(w.length===0){m=null;break e}d=ns,y=r,g=o;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(ct,{size:18}),e[18]=D):D=e[18];const C=n.jsx(Ka,{asChild:!0,variant:"brand",size:"control",children:n.jsxs("button",{type:"button",children:[D,w.length===1?i("taskBoard.taskBoard.agentsRunningOne"):i("taskBoard.taskBoard.agentsRunningMany",{count:w.length})]})});e[19]!==C?(f=n.jsx(ss,{asChild:!0,children:C}),e[19]=C,e[20]=f):f=e[20],c=as,h="w-[400px] p-0",j="end",x="bottom",k=Up;let S;e[21]!==i?(S=i("taskBoard.taskBoard.agentsRunningHeading"),e[21]=i,e[22]=S):S=e[22];let T;e[23]!==S?(T=n.jsx("span",{className:"text-sm font-medium text-foreground",children:S}),e[23]=S,e[24]=T):T=e[24],b=n.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3.5 pb-1.5",children:[T,n.jsx("span",{className:"text-sm tabular-nums text-muted-foreground",children:w.length})]}),u="flex max-h-[420px] flex-col overflow-y-auto p-1.5";let _;e[25]!==s||e[26]!==l||e[27]!==a||e[28]!==i?(_=z=>{const I=s.find(L=>L.id===z.taskId);if(!I)return null;const{label:$,visual:E}=dt(I.status,i),O=E.icon;return n.jsxs("button",{type:"button",onClick:()=>{o(!1),l(I)},className:"flex w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none transition-colors hover:bg-accent focus-visible:bg-accent",children:[n.jsx(xt,{className:"size-4 shrink-0 text-muted-foreground"}),n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:z.runTitle??z.taskTitle}),n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx(O,{size:13,className:K("shrink-0",E.iconClassName)}),n.jsx("span",{className:"shrink-0",children:$}),n.jsx("span",{"aria-hidden":!0,children:"·"}),n.jsx("span",{className:"truncate",children:z.runTitle&&z.runTitle!==z.taskTitle?z.taskTitle:tn(a.slug,I.keySeq)})]})]}),n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Mp(z.startedAt)})]},z.threadId)},e[25]=s,e[26]=l,e[27]=a,e[28]=i,e[29]=_):_=e[29],p=w.map(_)}e[0]=s,e[1]=l,e[2]=r,e[3]=a,e[4]=i,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m,e[10]=p,e[11]=h,e[12]=j,e[13]=x,e[14]=k,e[15]=b,e[16]=y,e[17]=g}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9],p=e[10],h=e[11],j=e[12],x=e[13],k=e[14],b=e[15],y=e[16],g=e[17];if(m!==Symbol.for("react.early_return_sentinel"))return m;let v;e[30]!==u||e[31]!==p?(v=n.jsx("div",{className:u,children:p}),e[30]=u,e[31]=p,e[32]=v):v=e[32];let N;e[33]!==c||e[34]!==v||e[35]!==h||e[36]!==j||e[37]!==x||e[38]!==k||e[39]!==b?(N=n.jsxs(c,{className:h,align:j,side:x,onOpenAutoFocus:k,children:[b,v]}),e[33]=c,e[34]=v,e[35]=h,e[36]=j,e[37]=x,e[38]=k,e[39]=b,e[40]=N):N=e[40];let B;return e[41]!==d||e[42]!==f||e[43]!==N||e[44]!==y||e[45]!==g?(B=n.jsxs(d,{open:y,onOpenChange:g,children:[f,N]}),e[41]=d,e[42]=f,e[43]=N,e[44]=y,e[45]=g,e[46]=B):B=e[46],B}function Up(t){return t.preventDefault()}function Ar(t){const e=R.c(12),{visible:s,icon:l,iconClassName:i,label:a}=t,r=!s||void 0,o=!s&&"invisible";let c;e[0]!==o?(c=K("flex items-center gap-2 px-1 py-0.5 text-sm font-medium text-muted-foreground",o),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==i?(d=K("shrink-0",i),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==l||e[5]!==d?(u=n.jsx(l,{size:15,className:d}),e[4]=l,e[5]=d,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==r||e[9]!==c||e[10]!==u?(f=n.jsxs("span",{"aria-hidden":r,className:c,children:[u,a]}),e[7]=a,e[8]=r,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function qp(t){const e=R.c(33);let s,l,i,a;e[0]!==t?({item:l,hidden:s,landed:i,...a}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=i,e[4]=a):(s=e[1],l=e[2],i=e[3],a=e[4]);const r=!!cs()&&l.isEpic;let o;e[5]!==r||e[6]!==l.id?(o={id:l.id,disabled:r},e[5]=r,e[6]=l.id,e[7]=o):o=e[7];const{attributes:c,listeners:d,setNodeRef:u,transform:f,transition:m,isDragging:p}=Yc(o),h=l.id,j=l.status;let x;e[8]!==c||e[9]!==d?(x={attributes:c,listeners:d},e[8]=c,e[9]=d,e[10]=x):x=e[10];const k=i&&"animate-card-land";let b;e[11]!==k?(b=K("w-full",k),e[11]=k,e[12]=b):b=e[12];let y;e[13]!==f?(y=Gc.Translate.toString(f),e[13]=f,e[14]=y):y=e[14];const g=p||s?0:void 0;let v;e[15]!==y||e[16]!==g||e[17]!==m?(v={transform:y,transition:m,opacity:g},e[15]=y,e[16]=g,e[17]=m,e[18]=v):v=e[18];let N;e[19]!==l||e[20]!==a||e[21]!==u||e[22]!==x||e[23]!==b||e[24]!==v?(N=n.jsx(cc,{...a,item:l,dragRef:u,bindings:x,className:b,style:v}),e[19]=l,e[20]=a,e[21]=u,e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let B;e[26]!==l.id||e[27]!==l.status||e[28]!==N?(B=n.jsx("div",{className:"flex","data-flip-id":h,"data-flip-lane":j,children:N}),e[26]=l.id,e[27]=l.status,e[28]=N,e[29]=B):B=e[29];let w;return e[30]!==l||e[31]!==B?(w=n.jsx(oc,{item:l,children:B}),e[30]=l,e[31]=B,e[32]=w):w=e[32],w}function oc(t){const e=R.c(15),{item:s,children:l}=t,i=X(),a=Ec(),{org:r}=tt();let o;e[0]!==s||e[1]!==r||e[2]!==a?(o=()=>{const{href:h}=a.buildLocation({to:".",params:j=>({...j,taskKey:pi(r.slug,s)}),search:Gp});window.open(h,"_blank","noopener")},e[0]=s,e[1]=r,e[2]=a,e[3]=o):o=e[3];const c=o;let d;e[4]!==l?(d=n.jsx(gd,{asChild:!0,children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ma,{}),e[6]=u):u=e[6];let f;e[7]!==i?(f=i("taskBoard.taskBoard.openInNewTab"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==c||e[10]!==f?(m=n.jsx(hd,{children:n.jsxs(xd,{onSelect:c,children:[u,f]})}),e[9]=c,e[10]=f,e[11]=m):m=e[11];let p;return e[12]!==d||e[13]!==m?(p=n.jsxs(jd,{children:[d,m]}),e[12]=d,e[13]=m,e[14]=p):p=e[14],p}function Gp(t){return t}function cc(t){const e=R.c(77),{item:s,assignee:l,assignedBy:i,members:a,selected:r,className:o,dragRef:c,bindings:d,style:u,onToggleSelect:f,onOpen:m,onAutoFix:p,onRerun:h,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}=t,y=X(),g=lc(s),v=cs();let N;e[0]!==v||e[1]!==s.id||e[2]!==s.isEpic||e[3]!==s.parentId?(N=!!v&&(s.isEpic||!!s.parentId||v.items.some(q=>q.parentId===s.id)),e[0]=v,e[1]=s.id,e[2]=s.isEpic,e[3]=s.parentId,e[4]=N):N=e[4];const B=N;let w;e[5]!==s?(w=Rl(s),e[5]=s,e[6]=w):w=e[6];const D=w;let C,S,T,_,z,I,$,E,O,L,U,G;if(e[7]!==d?.attributes||e[8]!==d?.listeners||e[9]!==o||e[10]!==c||e[11]!==s||e[12]!==p||e[13]!==m||e[14]!==h||e[15]!==f||e[16]!==D||e[17]!==r||e[18]!==u||e[19]!==y){S=Kd(s)?y("taskBoard.taskBoard.blockedBadgeTitle"):null;const q=p&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Ie,le=h&&!q&&s.assigneeId===Ie&&s.status!=="done";C=q?{icon:It,label:y("taskBoard.taskBoard.autoFix"),onClick:p}:le?{icon:zl,label:y("taskBoard.taskBoard.rerun"),onClick:h}:null,O="button",L=c,U=u,G=d?.attributes,T=d?.listeners,e[32]!==m||e[33]!==f?(_=de=>{de.shiftKey&&f?f():m()},e[32]=m,e[33]=f,e[34]=_):_=e[34],z=K("group relative flex shrink-0 cursor-grab flex-col gap-3 rounded-xl px-3.5 pt-3.5 pb-2.5 text-left shadow-edge active:cursor-grabbing",r?"bg-accent hover:bg-secondary-hover":S?"bg-warning/10 hover:bg-warning/15":"bg-card surface-interactive",D==="failed"?"shadow-edge-destructive":S&&"shadow-edge-warning",o),E="flex items-start gap-2",$="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",I=K("block text-foreground line-clamp-2 wrap-anywhere",C&&"group-hover:fade-text-end"),e[7]=d?.attributes,e[8]=d?.listeners,e[9]=o,e[10]=c,e[11]=s,e[12]=p,e[13]=m,e[14]=h,e[15]=f,e[16]=D,e[17]=r,e[18]=u,e[19]=y,e[20]=C,e[21]=S,e[22]=T,e[23]=_,e[24]=z,e[25]=I,e[26]=$,e[27]=E,e[28]=O,e[29]=L,e[30]=U,e[31]=G}else C=e[20],S=e[21],T=e[22],_=e[23],z=e[24],I=e[25],$=e[26],E=e[27],O=e[28],L=e[29],U=e[30],G=e[31];let P;e[35]!==s.title||e[36]!==I?(P=n.jsx("span",{className:I,children:s.title}),e[35]=s.title,e[36]=I,e[37]=P):P=e[37];let J;e[38]!==C?(J=C&&n.jsx(np,{action:C}),e[38]=C,e[39]=J):J=e[39];let H;e[40]!==P||e[41]!==J||e[42]!==$?(H=n.jsxs("div",{className:$,children:[P,J]}),e[40]=P,e[41]=J,e[42]=$,e[43]=H):H=e[43];let se;e[44]!==S?(se=S&&n.jsx("span",{className:"sr-only",children:S}),e[44]=S,e[45]=se):se=e[45];let V;e[46]!==D?(V=D&&n.jsx(ac,{state:D}),e[46]=D,e[47]=V):V=e[47];let ee;e[48]!==H||e[49]!==se||e[50]!==V||e[51]!==E?(ee=n.jsxs("div",{className:E,children:[H,se,V]}),e[48]=H,e[49]=se,e[50]=V,e[51]=E,e[52]=ee):ee=e[52];let ie;e[53]!==B||e[54]!==s?(ie=(s.tags.length>0||s.sprintId||B)&&n.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[n.jsx(I1,{item:s}),n.jsx(_1,{item:s}),n.jsx(A1,{item:s}),n.jsx(nc,{sprintId:s.sprintId}),s.tags.slice(0,Ds).map(Vp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[53]=B,e[54]=s,e[55]=ie):ie=e[55];let ne;e[56]!==i||e[57]!==l||e[58]!==g||e[59]!==s||e[60]!==a||e[61]!==j||e[62]!==b||e[63]!==x||e[64]!==k?(ne=n.jsx(sc,{item:s,checks:g,assignee:l,assignedBy:i,members:a,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}),e[56]=i,e[57]=l,e[58]=g,e[59]=s,e[60]=a,e[61]=j,e[62]=b,e[63]=x,e[64]=k,e[65]=ne):ne=e[65];let F;return e[66]!==T||e[67]!==_||e[68]!==z||e[69]!==ee||e[70]!==ie||e[71]!==ne||e[72]!==O||e[73]!==L||e[74]!==U||e[75]!==G?(F=n.jsxs("button",{type:O,ref:L,style:U,...G,...T,onClick:_,className:z,children:[ee,ie,ne]}),e[66]=T,e[67]=_,e[68]=z,e[69]=ee,e[70]=ie,e[71]=ne,e[72]=O,e[73]=L,e[74]=U,e[75]=G,e[76]=F):F=e[76],F}function Vp(t){return n.jsx(Qi,{tag:t},t.id)}const Hp={blocked:{labelKey:"taskBoard.feed.eventBlocked",badgeClassName:"border-warning/40 text-warning"},handed:{labelKey:"taskBoard.feed.eventHanded",badgeClassName:"border-warning/40 text-warning"},running:{labelKey:"taskBoard.feed.eventRunning",badgeClassName:"border-primary/40 text-primary"},failed:{labelKey:"taskBoard.feed.eventFailed",badgeClassName:"border-destructive/40 text-destructive"},done:{labelKey:"taskBoard.feed.eventDone",badgeClassName:"border-success/40 text-success",namesLane:!0},delivered:{labelKey:"taskBoard.feed.eventDelivered",badgeClassName:"border-success/40 text-success"},review:{labelKey:"taskBoard.feed.eventReview",badgeClassName:"border-border text-muted-foreground",namesLane:!0}},Yp=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),Wp=new Intl.DateTimeFormat(void 0,{weekday:"long",month:"short",day:"numeric"});function Qp(t){const e=R.c(50),{item:s,bucket:l,author:i,assignee:a,onOpen:r}=t,o=X(),c=Hp[K2(s)];let d;e[0]!==s.status||e[1]!==o?(d=dt(s.status,o),e[0]=s.status,e[1]=o,e[2]=d):d=e[2];const u=d,f=u.visual.icon;let m;e[3]!==s.description||e[4]!==s.threads?(m=s.threads.filter(_i)[0]?.lastMessage??s.description,e[3]=s.description,e[4]=s.threads,e[5]=m):m=e[5];const p=m,h=!i&&s.assigneeId===Ie;let j;e[6]!==a?.user?.name||e[7]!==i?.user?.name||e[8]!==h||e[9]!==o?(j=h?o("taskBoard.taskDialog.superAgentLabel"):i?.user?.name??a?.user?.name,e[6]=a?.user?.name,e[7]=i?.user?.name,e[8]=h,e[9]=o,e[10]=j):j=e[10];const x=j,k=ko(s.threads),b=lc(s),y="button",g="surface surface-interactive flex w-full flex-col gap-3 p-4 text-left";let v;e[11]!==c||e[12]!==s.tags||e[13]!==o?(v=(s.tags.length>0||c)&&n.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[c&&n.jsx("span",{className:K(os,"shrink-0",c.badgeClassName),children:o(c.labelKey)}),s.tags.slice(0,Ds).map(Xp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[11]=c,e[12]=s.tags,e[13]=o,e[14]=v):v=e[14];let N;e[15]!==s.title?(N=n.jsx("span",{className:"text-base leading-snug font-medium text-foreground",children:s.title}),e[15]=s.title,e[16]=N):N=e[16];let B;e[17]!==p||e[18]!==x?(B=p&&n.jsxs("span",{className:"truncate text-sm leading-relaxed text-muted-foreground",children:[x&&n.jsxs("span",{className:"font-medium text-foreground",children:[x,": "]}),p]}),e[17]=p,e[18]=x,e[19]=B):B=e[19];let w;e[20]!==N||e[21]!==B?(w=n.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[N,B]}),e[20]=N,e[21]=B,e[22]=w):w=e[22];const D=sc;let C;e[23]!==s.updatedAt?(C=Yp.format(new Date(s.updatedAt)),e[23]=s.updatedAt,e[24]=C):C=e[24];let S;e[25]!==C?(S=n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:C}),e[25]=C,e[26]=S):S=e[26];let T;e[27]!==l?(T=l&&n.jsxs("span",{className:K(ci,"text-foreground"),children:[n.jsx(ls,{entry:l}),l.title]}),e[27]=l,e[28]=T):T=e[28];let _;e[29]!==f||e[30]!==c?.namesLane||e[31]!==u.label||e[32]!==u.visual.iconClassName?(_=!c?.namesLane&&n.jsxs("span",{className:ci,children:[n.jsx(f,{size:sn,className:u.visual.iconClassName}),u.label]}),e[29]=f,e[30]=c?.namesLane,e[31]=u.label,e[32]=u.visual.iconClassName,e[33]=_):_=e[33];const z=k&&n.jsx("span",{className:K(ci,"tabular-nums"),title:o(k.runCount===1?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural",{runs:String(k.runCount)}),children:k.total.toLocaleString(void 0,{style:"currency",currency:"USD"})});let I;e[34]!==T||e[35]!==_||e[36]!==z?(I=n.jsxs(n.Fragment,{children:[T,_,z]}),e[34]=T,e[35]=_,e[36]=z,e[37]=I):I=e[37];let $;e[38]!==D||e[39]!==a||e[40]!==b||e[41]!==s||e[42]!==S||e[43]!==I?($=n.jsx(D,{item:s,checks:b,assignee:a,trailing:S,leading:I}),e[38]=D,e[39]=a,e[40]=b,e[41]=s,e[42]=S,e[43]=I,e[44]=$):$=e[44];let E;return e[45]!==r||e[46]!==$||e[47]!==v||e[48]!==w?(E=n.jsxs("button",{type:y,onClick:r,className:g,children:[v,w,$]}),e[45]=r,e[46]=$,e[47]=v,e[48]=w,e[49]=E):E=e[49],E}function Xp(t){return n.jsx(Qi,{tag:t},t.id)}function Jp(t){const e=R.c(90),{onCreated:s}=t,l=X(),[i,a]=W.useState(""),[r,o]=W.useState(""),[c,d]=W.useState(ws[0]),[u,f]=W.useState("medium"),[m,p]=W.useState(Tl),[h,j]=W.useState(!1);let x;e[0]!==i?(x=i.trim(),e[0]=i,e[1]=x):x=e[1];const k=x;let b;e[2]!==r||e[3]!==s||e[4]!==u||e[5]!==c||e[6]!==k||e[7]!==m?(b=()=>{k&&(s({title:k,description:r.trim(),status:c,priority:u,type:m}),a(""),o(""),d(ws[0]),f("medium"),p(Tl),j(!1))},e[2]=r,e[3]=s,e[4]=u,e[5]=c,e[6]=k,e[7]=m,e[8]=b):b=e[8];const y=b;let g;e[9]!==c||e[10]!==l?(g=dt(c,l),e[9]=c,e[10]=l,e[11]=g):g=e[11];const v=g,N=v.visual.icon,B=et[u],w=B.icon,D=At[m],C=D.icon;let S,T;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=ae=>a(ae.target.value),T=()=>j(!0),e[12]=S,e[13]=T):(S=e[12],T=e[13]);let _;e[14]!==y?(_=ae=>{ae.key==="Enter"&&!ae.shiftKey&&(ae.preventDefault(),y())},e[14]=y,e[15]=_):_=e[15];let z;e[16]!==l?(z=l("taskBoard.feed.composerPlaceholder"),e[16]=l,e[17]=z):z=e[17];let I;e[18]!==_||e[19]!==z||e[20]!==i?(I=n.jsx("input",{value:i,onChange:S,onFocus:T,onKeyDown:_,placeholder:z,className:"w-full bg-transparent text-base font-medium text-foreground outline-none placeholder:text-muted-foreground"}),e[18]=_,e[19]=z,e[20]=i,e[21]=I):I=e[21];let $;e[22]!==r||e[23]!==h||e[24]!==l?($=(h||r)&&n.jsx("textarea",{value:r,onChange:ae=>o(ae.target.value),rows:2,placeholder:l("taskBoard.feed.composerDescriptionPlaceholder"),className:"w-full resize-none bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"}),e[22]=r,e[23]=h,e[24]=l,e[25]=$):$=e[25];let E;e[26]!==I||e[27]!==$?(E=n.jsxs("div",{className:"flex flex-col gap-1 px-4 pt-4 pb-4",children:[I,$]}),e[26]=I,e[27]=$,e[28]=E):E=e[28];let O;e[29]!==N||e[30]!==v.visual.iconClassName?(O=n.jsx(N,{size:14,className:v.visual.iconClassName}),e[29]=N,e[30]=v.visual.iconClassName,e[31]=O):O=e[31];let L;e[32]!==v.label||e[33]!==O?(L=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[O,v.label]})}),e[32]=v.label,e[33]=O,e[34]=L):L=e[34];let U;e[35]!==l?(U=ws.map(ae=>{const{label:we,visual:ce}=dt(ae,l),xe=ce.icon;return n.jsxs(Ne,{onSelect:()=>d(ae),className:"gap-2",children:[n.jsx(xe,{size:16,className:ce.iconClassName}),we]},ae)}),e[35]=l,e[36]=U):U=e[36];let G;e[37]!==U?(G=n.jsx(qe,{align:"start",className:"w-44",children:U}),e[37]=U,e[38]=G):G=e[38];let P;e[39]!==L||e[40]!==G?(P=n.jsxs(Me,{children:[L,G]}),e[39]=L,e[40]=G,e[41]=P):P=e[41];let J;e[42]!==C||e[43]!==D.iconClassName?(J=n.jsx(C,{size:14,className:D.iconClassName}),e[42]=C,e[43]=D.iconClassName,e[44]=J):J=e[44];let H;e[45]!==l||e[46]!==D.labelKey?(H=l(D.labelKey),e[45]=l,e[46]=D.labelKey,e[47]=H):H=e[47];let se;e[48]!==J||e[49]!==H?(se=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[J,H]})}),e[48]=J,e[49]=H,e[50]=se):se=e[50];let V;e[51]!==l?(V=Ii.map(ae=>{const we=At[ae].icon;return n.jsxs(Ne,{onSelect:()=>p(ae),className:"gap-2",children:[n.jsx(we,{size:16,className:At[ae].iconClassName}),l(At[ae].labelKey)]},ae)}),e[51]=l,e[52]=V):V=e[52];let ee;e[53]!==V?(ee=n.jsx(qe,{align:"start",className:"w-44",children:V}),e[53]=V,e[54]=ee):ee=e[54];let ie;e[55]!==se||e[56]!==ee?(ie=n.jsxs(Me,{children:[se,ee]}),e[55]=se,e[56]=ee,e[57]=ie):ie=e[57];let ne;e[58]!==w||e[59]!==B.iconClassName?(ne=n.jsx(w,{size:14,className:B.iconClassName}),e[58]=w,e[59]=B.iconClassName,e[60]=ne):ne=e[60];let F;e[61]!==B.labelKey||e[62]!==l?(F=l(B.labelKey),e[61]=B.labelKey,e[62]=l,e[63]=F):F=e[63];let q;e[64]!==ne||e[65]!==F?(q=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[ne,F]})}),e[64]=ne,e[65]=F,e[66]=q):q=e[66];let le;e[67]!==l?(le=Ts.map(ae=>{const we=et[ae].icon;return n.jsxs(Ne,{onSelect:()=>f(ae),className:"gap-2",children:[n.jsx(we,{size:16,className:et[ae].iconClassName}),l(et[ae].labelKey)]},ae)}),e[67]=l,e[68]=le):le=e[68];let de;e[69]!==le?(de=n.jsx(qe,{align:"start",className:"w-40",children:le}),e[69]=le,e[70]=de):de=e[70];let pe;e[71]!==q||e[72]!==de?(pe=n.jsxs(Me,{children:[q,de]}),e[71]=q,e[72]=de,e[73]=pe):pe=e[73];let Se;e[74]!==P||e[75]!==ie||e[76]!==pe?(Se=n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[P,ie,pe]}),e[74]=P,e[75]=ie,e[76]=pe,e[77]=Se):Se=e[77];const Be=!k;let oe;e[78]!==l?(oe=l("taskBoard.feed.composerSubmit"),e[78]=l,e[79]=oe):oe=e[79];let ge;e[80]!==y||e[81]!==Be||e[82]!==oe?(ge=n.jsx(re,{size:"sm",disabled:Be,onClick:y,children:oe}),e[80]=y,e[81]=Be,e[82]=oe,e[83]=ge):ge=e[83];let ye;e[84]!==Se||e[85]!==ge?(ye=n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-border px-3 py-3",children:[Se,ge]}),e[84]=Se,e[85]=ge,e[86]=ye):ye=e[86];let he;return e[87]!==E||e[88]!==ye?(he=n.jsxs("div",{className:"surface focus-within-ring flex flex-col",children:[E,ye]}),e[87]=E,e[88]=ye,e[89]=he):he=e[89],he}function Zp(t){const e=R.c(32),{items:s,index:l,memberByUserId:i,onCompose:a,onOpen:r}=t,o=X();let c,d,u,f,m,p;if(e[0]!==l||e[1]!==s||e[2]!==i||e[3]!==a||e[4]!==r||e[5]!==o){const y=G2(s,new Date);p="flex min-h-0 flex-1 flex-col px-4 pt-6 sm:px-8",m="mx-auto flex min-h-0 w-full max-w-[760px] flex-1 flex-col gap-6",u="flex min-h-0 min-w-0 flex-1 flex-col",e[12]!==a?(f=n.jsx(Jp,{onCreated:a}),e[12]=a,e[13]=f):f=e[13],c="min-h-0 flex-1 overflow-y-auto -mx-2 px-2 pt-5 pb-16 [mask-image:linear-gradient(to_bottom,transparent,#000_20px)]";let g;e[14]!==l||e[15]!==i||e[16]!==r||e[17]!==o?(g=v=>n.jsxs("section",{className:"flex flex-col",children:[n.jsx("h2",{className:"mt-3 mb-4 px-1 text-xs font-medium text-muted-foreground",children:v.relative==="today"?o("taskBoard.feed.today"):v.relative==="yesterday"?o("taskBoard.feed.yesterday"):Wp.format(v.date)}),n.jsx("div",{className:"flex flex-col gap-2",children:v.items.map(N=>n.jsx(Qp,{item:N,bucket:Oi(N,l),assignee:N.assigneeId?i.get(N.assigneeId):void 0,author:i.get(N.updatedBy),onOpen:()=>r(N)},N.id))})]},v.key),e[14]=l,e[15]=i,e[16]=r,e[17]=o,e[18]=g):g=e[18],d=y.map(g),e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=p}else c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],p=e[11];let h;e[19]!==c||e[20]!==d?(h=n.jsx("div",{className:c,children:d}),e[19]=c,e[20]=d,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==f||e[24]!==h?(j=n.jsxs("div",{className:u,children:[f,h]}),e[22]=u,e[23]=f,e[24]=h,e[25]=j):j=e[25];let x;e[26]!==m||e[27]!==j?(x=n.jsx("div",{className:m,children:j}),e[26]=m,e[27]=j,e[28]=x):x=e[28];let k;return e[29]!==p||e[30]!==x?(k=n.jsx("div",{className:p,children:x}),e[29]=p,e[30]=x,e[31]=k):k=e[31],k}function dc(t){const e=R.c(8),{groups:s,depth:l,toggled:i,onToggle:a,renderRow:r,heading:o}=t,c=X();let d;return e[0]!==l||e[1]!==s||e[2]!==o||e[3]!==a||e[4]!==r||e[5]!==c||e[6]!==i?(d=s.map(u=>{const f=Fo(u,i),{glyph:m,label:p}=eg(u,{...o,t:c});return n.jsxs("section",{"data-list-group":u.path,className:"flex flex-col gap-2",children:[n.jsxs(Ms,{delayDuration:600,children:[n.jsx(Ks,{asChild:!0,children:n.jsxs("button",{type:"button","aria-expanded":f,onClick:h=>a(u,s,h.altKey),className:K("flex items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium text-foreground transition-colors",l===0?"bg-muted/60 hover:bg-accent":"bg-muted/30 hover:bg-accent"),children:[n.jsx(Va,{size:14,className:K("shrink-0 text-muted-foreground transition-transform",f&&"rotate-90")}),n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),n.jsx("span",{className:"truncate",children:p}),n.jsx("span",{className:"text-muted-foreground",children:u.items.length})]})}),n.jsx(Us,{side:"top",align:"start",children:c("taskBoard.viewControls.groupToggleAllHint")})]}),f&&n.jsx("div",{className:"ml-[18px] flex flex-col gap-2 border-l-[1.5px] border-muted-foreground/30 pl-3",children:u.children?n.jsx(dc,{groups:u.children,depth:l+1,toggled:i,onToggle:a,renderRow:r,heading:o}):u.items.map(r)})]},u.path)}),e[0]=l,e[1]=s,e[2]=o,e[3]=a,e[4]=r,e[5]=c,e[6]=i,e[7]=d):d=e[7],d}function eg(t,{memberByUserId:e,orgTags:s,index:l,t:i}){const{key:a,groupBy:r}=t;switch(r){case"status":{const{label:o,visual:c}=dt(a,i),d=c.icon;return{glyph:n.jsx(d,{size:15,className:K("shrink-0",c.iconClassName)}),label:o}}case"priority":{const o=Ts.find(u=>u===a);if(!o)return{glyph:null,label:a};const c=et[o],d=c.icon;return{glyph:n.jsx(d,{size:15,className:K("shrink-0",c.iconClassName)}),label:i(c.labelKey)}}case"assignee":{if(a===Ie)return{glyph:n.jsx(ct,{size:16}),label:i("taskBoard.taskFilters.assigneeSuperAgent")};if(a===qs)return{glyph:n.jsx(Vs,{size:15,className:"shrink-0 text-muted-foreground"}),label:i("taskBoard.taskFilters.assigneeUnassigned")};const o=e.get(a);return{glyph:n.jsx(ot,{url:o?.user?.image??void 0,fallback:o?.user?.name??"?",shape:"circle",size:"2xs"}),label:o?.user?.name??i("taskBoard.taskFilters.assigneeMember")}}case"tags":{if(a===xi)return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full border border-muted-foreground/50"}),label:i("taskBoard.viewControls.groupNoTags")};const o=s.find(c=>c.id===a)??t.items[0]?.tags.find(c=>c.id===a);return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(o?.color)}}),label:o?.name??a}}case"project":{if(a===Xs)return{glyph:n.jsx(ls,{entry:void 0}),label:i("taskBoard.taskFilters.projectNone")};const o=Ua(a,l);return{glyph:n.jsx(ls,{entry:o}),label:o?.title??a}}default:return r}}function tg(t){const e=R.c(22),{item:s,onStatusChange:l}=t,i=X();let a;e[0]!==s.status?(a=Dl(s.status),e[0]=s.status,e[1]=a):a=e[1];const r=a.icon;let o;e[2]!==s.status||e[3]!==i?(o=i("taskBoard.taskBoard.changeStatusLabel",{status:dt(s.status,i).label}),e[2]=s.status,e[3]=i,e[4]=o):o=e[4];let c;e[5]!==s?(c=K(Xr(s)),e[5]=s,e[6]=c):c=e[6];let d;e[7]!==r||e[8]!==c?(d=n.jsx(r,{size:16,className:c}),e[7]=r,e[8]=c,e[9]=d):d=e[9];let u;e[10]!==o||e[11]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"shrink-0 rounded-md p-1 transition-colors hover:bg-accent",children:d})}),e[10]=o,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s.status||e[14]!==l||e[15]!==i?(f=ws.map(h=>{const{label:j,visual:x}=dt(h,i),k=x.icon;return n.jsxs(Ne,{className:"gap-2",onSelect:()=>{h!==s.status&&l(h)},children:[n.jsx(k,{size:16,className:x.iconClassName}),j,h===s.status&&n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},h)}),e[13]=s.status,e[14]=l,e[15]=i,e[16]=f):f=e[16];let m;e[17]!==f?(m=n.jsx(qe,{align:"start",className:"w-48",children:f}),e[17]=f,e[18]=m):m=e[18];let p;return e[19]!==u||e[20]!==m?(p=n.jsxs(Me,{children:[u,m]}),e[19]=u,e[20]=m,e[21]=p):p=e[21],p}const sg=250;function ng(t){const e=R.c(18),{title:s,onOpen:l,onRename:i}=t,a=X(),[r,o]=W.useState(!1),c=W.useRef(void 0);if(r){let m;e[0]!==a?(m=a("taskBoard.taskBoard.renameTaskLabel"),e[0]=a,e[1]=m):m=e[1];let p;e[2]!==i||e[3]!==s?(p=x=>{o(!1);const k=x.currentTarget.value.trim();k&&k!==s&&i(k)},e[2]=i,e[3]=s,e[4]=p):p=e[4];let h;e[5]!==s?(h=x=>{x.key==="Enter"&&x.currentTarget.blur(),x.key==="Escape"&&(x.stopPropagation(),x.currentTarget.value=s,x.currentTarget.blur())},e[5]=s,e[6]=h):h=e[6];let j;return e[7]!==m||e[8]!==p||e[9]!==h||e[10]!==s?(j=n.jsx("input",{autoFocus:!0,defaultValue:s,"aria-label":m,onFocus:ag,onBlur:p,onKeyDown:h,className:"min-w-0 flex-1 rounded-sm bg-transparent text-sm text-foreground outline-none ring-1 ring-ring"}),e[7]=m,e[8]=p,e[9]=h,e[10]=s,e[11]=j):j=e[11],j}let d;e[12]!==l?(d=m=>{clearTimeout(c.current),m.detail===0?l():m.detail===1&&(c.current=setTimeout(l,sg))},e[12]=l,e[13]=d):d=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{clearTimeout(c.current),o(!0)},e[14]=u):u=e[14];let f;return e[15]!==d||e[16]!==s?(f=n.jsx("button",{type:"button",onClick:d,onDoubleClick:u,className:"min-w-0 flex-1 truncate text-left text-sm text-foreground",children:s}),e[15]=d,e[16]=s,e[17]=f):f=e[17],f}function ag(t){return t.currentTarget.select()}function lg(t){const e=R.c(40),{tags:s,onChange:l}=t,i=X(),{data:a}=El();let r;e[0]!==a?(r=a===void 0?[]:a,e[0]=a,e[1]=r):r=e[1];const o=r,c=so(),d=no();let u;e[2]!==s?(u=s.map(rg),e[2]=s,e[3]=u):u=e[3];const f=u;let m;e[4]!==i?(m=i("taskBoard.taskBoard.editTagsLabel"),e[4]=i,e[5]=m):m=e[5];let p;e[6]!==i?(p=i("taskBoard.taskBoard.editTagsLabel"),e[6]=i,e[7]=p):p=e[7];const h=s.length===0&&Jo;let j;e[8]!==h?(j=K("hidden shrink-0 items-center gap-1.5 rounded-full sm:inline-flex",h),e[8]=h,e[9]=j):j=e[9];let x;e[10]!==s?(x=s.length===0?n.jsx("span",{className:os,children:n.jsx(is,{size:sn})}):n.jsxs(n.Fragment,{children:[s.slice(0,Ds).map(ig),s.length>Ds&&n.jsxs("span",{className:os,children:["+",s.length-Ds]})]}),e[10]=s,e[11]=x):x=e[11];let k;e[12]!==m||e[13]!==p||e[14]!==j||e[15]!==x?(k=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":m,title:p,className:j,children:x})}),e[12]=m,e[13]=p,e[14]=j,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==o.length?(b=eo(o.length),e[17]=o.length,e[18]=b):b=e[18];let y;e[19]!==l||e[20]!==f?(y=w=>l(f.includes(w)?f.filter(D=>D!==w):[...f,w]),e[19]=l,e[20]=f,e[21]=y):y=e[21];let g;e[22]!==c||e[23]!==l||e[24]!==f?(g=async(w,D)=>{const C=await c.mutateAsync({name:w,color:D});l([...f,C.id])},e[22]=c,e[23]=l,e[24]=f,e[25]=g):g=e[25];let v;e[26]!==d||e[27]!==l||e[28]!==f?(v=w=>{d.mutate(w),f.includes(w)&&l(f.filter(D=>D!==w))},e[26]=d,e[27]=l,e[28]=f,e[29]=v):v=e[29];let N;e[30]!==o||e[31]!==b||e[32]!==y||e[33]!==g||e[34]!==v||e[35]!==f?(N=n.jsx(as,{align:"end",className:"w-56 p-0",children:n.jsx(Co,{tags:o,selectedIds:f,defaultColor:b,onToggle:y,onCreate:g,onDelete:v})}),e[30]=o,e[31]=b,e[32]=y,e[33]=g,e[34]=v,e[35]=f,e[36]=N):N=e[36];let B;return e[37]!==N||e[38]!==k?(B=n.jsxs(ns,{children:[k,N]}),e[37]=N,e[38]=k,e[39]=B):B=e[39],B}function ig(t){return n.jsx(Qi,{tag:t},t.id)}function rg(t){return t.id}function og(t){const e=R.c(61),{item:s,assignee:l,assignedBy:i,members:a,onOpen:r,onStatusChange:o,onRename:c,onPriorityChange:d,onTagsChange:u,onDueDateChange:f,onAssign:m}=t,{org:p}=tt();let h;e[0]!==s.keySeq||e[1]!==p.slug?(h=tn(p.slug,s.keySeq),e[0]=s.keySeq,e[1]=p.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s?(x=Rl(s),e[3]=s,e[4]=x):x=e[4];const k=x;let b;e[5]!==s||e[6]!==o?(b=n.jsx(tg,{item:s,onStatusChange:o}),e[5]=s,e[6]=o,e[7]=b):b=e[7];let y;e[8]!==s.priority||e[9]!==d?(y=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Zo,{priority:s.priority,onChange:d})}),e[8]=s.priority,e[9]=d,e[10]=y):y=e[10];let g;e[11]!==j?(g=j&&n.jsx("span",{className:"hidden w-16 shrink-0 font-mono text-xs text-muted-foreground sm:inline",children:j}),e[11]=j,e[12]=g):g=e[12];let v;e[13]!==s.title||e[14]!==r||e[15]!==c?(v=n.jsx(ng,{title:s.title,onOpen:r,onRename:c}),e[13]=s.title,e[14]=r,e[15]=c,e[16]=v):v=e[16];let N;e[17]!==k?(N=k&&n.jsx(ac,{state:k}),e[17]=k,e[18]=N):N=e[18];let B;e[19]!==s?(B=Ti(s)&&n.jsx(Y2,{}),e[19]=s,e[20]=B):B=e[20];let w;e[21]!==s?(w=Zr(s)&&n.jsx(W2,{}),e[21]=s,e[22]=w):w=e[22];let D;e[23]!==s.sprintId?(D=s.sprintId&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(nc,{sprintId:s.sprintId})}),e[23]=s.sprintId,e[24]=D):D=e[24];let C;e[25]!==s.tags||e[26]!==u?(C=n.jsx(lg,{tags:s.tags,onChange:u}),e[25]=s.tags,e[26]=u,e[27]=C):C=e[27];let S;e[28]!==s.status||e[29]!==s.statusSince?(S=s.statusSince&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(ip,{status:s.status,since:s.statusSince})}),e[28]=s.status,e[29]=s.statusSince,e[30]=S):S=e[30];let T;e[31]!==s.dueDate||e[32]!==f?(T=n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(tc,{iso:s.dueDate,onChange:f})}),e[31]=s.dueDate,e[32]=f,e[33]=T):T=e[33];let _;e[34]!==i||e[35]!==l||e[36]!==s||e[37]!==a||e[38]!==m?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(ic,{item:s,assignee:l,assignedBy:i,members:a,onAssign:m})}),e[34]=i,e[35]=l,e[36]=s,e[37]=a,e[38]=m,e[39]=_):_=e[39];let z;e[40]!==s.createdAt?(z=Al(new Date(s.createdAt)),e[40]=s.createdAt,e[41]=z):z=e[41];let I;e[42]!==z?(I=n.jsx("span",{className:"hidden w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground sm:inline",children:z}),e[42]=z,e[43]=I):I=e[43];let $;e[44]!==D||e[45]!==C||e[46]!==S||e[47]!==T||e[48]!==_||e[49]!==I||e[50]!==b||e[51]!==y||e[52]!==g||e[53]!==v||e[54]!==N||e[55]!==B||e[56]!==w?($=n.jsxs("div",{className:"group flex h-11 items-center gap-3 px-3 transition-colors hover:bg-accent",children:[b,y,g,v,N,B,w,D,C,S,T,_,I]}),e[44]=D,e[45]=C,e[46]=S,e[47]=T,e[48]=_,e[49]=I,e[50]=b,e[51]=y,e[52]=g,e[53]=v,e[54]=N,e[55]=B,e[56]=w,e[57]=$):$=e[57];let E;return e[58]!==s||e[59]!==$?(E=n.jsx(oc,{item:s,children:$}),e[58]=s,e[59]=$,e[60]=E):E=e[60],E}function kh(t){const e=R.c(5),{seed:s,children:l}=t;let i;e[0]!==s?(i=()=>{const o=new Oc({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(o),o},e[0]=s,e[1]=i):i=e[1];const[a]=W.useState(i);let r;return e[2]!==l||e[3]!==a?(r=n.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:n.jsx(Lc,{fallback:null,children:n.jsx(W.Suspense,{fallback:null,children:n.jsx(Fc,{client:a,children:l})})})}),e[2]=l,e[3]=a,e[4]=r):r=e[4],r}const zr=new Date().toISOString();function Ps(t,e,s,l,i,a){return{harnessId:"claude-code",parentId:null,isEpic:!1,id:t,organizationId:"preview",title:e,description:null,repositoryId:null,virtualMcpId:null,sprintId:null,status:s,priority:i,type:l,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],statusSince:null,createdBy:"preview",createdAt:zr,updatedBy:"preview",updatedAt:zr}}function yh(){return{items:[Ps("p1","Fix checkout shipping estimate","triage","bug","high",1),Ps("p2","Add size guide to product page","triage","feature","medium",2),Ps("p3","Compress hero images","triage","chore","low",3),Ps("p4","Rewrite category descriptions","in_progress","feature","medium",4),Ps("p5","Audit broken redirects","in_progress","chore","high",5),Ps("p6","New arrivals landing page","in_review","feature","high",6),Ps("p7","Speed up search results","qa","chore","medium",7),Ps("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[],demoFrozenItemIds:[]}}export{kh as P,bh as T,yh as m};
10
+ `)}const Mm=["sprint","assignee","priority","due","tags","project"];function Eo(t,e,s){return Mm.filter(l=>{switch(l){case"assignee":return t.assignee!==null;case"priority":return t.priority!==null;case"due":return t.due!==null;case"tags":return t.tags.length>0;case"project":return ku(t.project,e);case"sprint":return t.sprint!==null&&t.sprint!==s;default:return l}})}function Km(t,e,s){switch(e){case"assignee":return{...t,assignee:null};case"priority":return{...t,priority:null};case"due":return{...t,due:null};case"tags":return{...t,tags:[]};case"project":return{...t,project:null};case"sprint":return{...t,sprint:s};default:return e}}const Oo=["status","assignee","priority","tags","project"];function Dr(t){return Oo.includes(t)}const Um=["customer_approval","qa","in_review","ready_for_deployment","in_progress","todo","triage","post_deploy_validation","done","archived"],xi="__no_tag__";function qm(t,e){return t===null?[]:e===null||e===t?[t]:[t,e]}function Lo(t,e,s,l=""){const[i,...a]=e;if(i===void 0)return[];const{keysOf:r,order:o,last:c}=Gm(i,s),d=new Map;for(const m of t)for(const p of r(m)){const h=d.get(p);h?h.push(m):d.set(p,[m])}const u=[...d.keys()],f=m=>{if(m===c)return Number.MAX_SAFE_INTEGER;const p=o.indexOf(m);return p!==-1?p:o.length+u.indexOf(m)};return u.sort((m,p)=>f(m)-f(p)).map(m=>{const p=d.get(m)??[],h=`${l}/${i}:${m}`;return{groupBy:i,key:m,path:h,items:p,collapsedByDefault:i==="status"&&Zr.includes(m),children:a.length>0?Lo(p,a,s,h):null}})}function Gm(t,e){switch(t){case"status":return{keysOf:s=>[s.status],order:Um};case"priority":return{keysOf:s=>[s.priority],order:[...Ts].reverse()};case"assignee":return{keysOf:s=>[s.assigneeId??qs],order:[Ie,...e.memberIds],last:qs};case"tags":return{keysOf:s=>s.tags.length>0?s.tags.map(l=>l.id):[xi],order:e.tagIds,last:xi};case"project":return{keysOf:s=>[Oi(s,e.index)?.id??Xs],order:e.index.options.map(s=>s.id),last:Xs};default:return t}}function Fo(t,e){return e.get(t.path)??!t.collapsedByDefault}function Vm(t,e,s,l){const i=new Map(t),a=!Fo(e,t);for(const r of l?s:[e])i.set(r.path,a);return i}const Po=["assignee","due","tags","project","priority"];function Hm(t){return Po.includes(t)}function Yi(t){return t==="priority"?"desc":"asc"}function Ym(t,e,s,l){const i=Qm(e,l),a=s==="asc"?1:-1;return t.map(r=>({item:r,key:i(r)})).sort((r,o)=>r.key===null||o.key===null?r.key===o.key?0:r.key===null?1:-1:a*Wm(r.key,o.key)).map(({item:r})=>r)}function Wm(t,e){return typeof t=="number"&&typeof e=="number"?t-e:String(t).localeCompare(String(e),void 0,{sensitivity:"base"})}function Qm(t,e){switch(t){case"assignee":return s=>s.assigneeId?s.assigneeId===Ie?e.superAgentName:e.memberNames.get(s.assigneeId)??s.assigneeId:null;case"due":return s=>s.dueDate?Date.parse(s.dueDate):null;case"tags":return s=>s.tags.length>0?s.tags.map(l=>l.name).sort((l,i)=>l.localeCompare(i))[0]:null;case"project":return s=>Oi(s,e.index)?.title??null;case"priority":return s=>s.priority==="none"?null:Ts.indexOf(s.priority);default:return t}}function Mo(t){const e=R.c(4),{priority:s}=t,l=et[s];let i;e[0]!==l.dotClassName?(i=K("size-2 shrink-0 rounded-full",l.dotClassName),e[0]=l.dotClassName,e[1]=i):i=e[1];let a;return e[2]!==i?(a=n.jsx("span",{className:i}),e[2]=i,e[3]=a):a=e[3],a}function Ko(t){const e=R.c(4),{color:s}=t;let l;e[0]!==s?(l=en(s),e[0]=s,e[1]=l):l=e[1];let i;return e[2]!==l?(i=n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l}}),e[2]=l,e[3]=i):i=e[3],i}function oi(t,e){return[...t].sort((s,l)=>e(s).localeCompare(e(l),void 0,{sensitivity:"base"}))}function Uo(t){const e=R.c(113),{members:s,tags:l,sprints:i,index:a,scoped:r}=t,o=r===void 0?!1:r,c=X();let d;e[0]!==s?(d=Q=>s.find(fe=>fe.userId===Q),e[0]=s,e[1]=d):d=e[1];const u=d;let f;e[2]!==u||e[3]!==c?(f=Q=>u(Q)?.user?.name??c("taskBoard.taskFilters.assigneeMember"),e[2]=u,e[3]=c,e[4]=f):f=e[4];const m=f;let p;e[5]!==c?(p=c("taskBoard.taskFilters.assigneeLabel"),e[5]=c,e[6]=p):p=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vs,{size:14,className:"shrink-0"}),e[7]=h):h=e[7];let j;e[8]!==c?(j=c("taskBoard.taskFilters.assigneeUnassigned"),e[8]=c,e[9]=j):j=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Vs,{size:14,className:"shrink-0 text-muted-foreground"}),e[10]=x):x=e[10];let k;e[11]!==j?(k={id:qs,label:j,glyph:x,apply:p2,isSelected:m2},e[11]=j,e[12]=k):k=e[12];let b;e[13]!==c?(b=c("taskBoard.taskFilters.assigneeSuperAgent"),e[13]=c,e[14]=b):b=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ct,{size:14}),e[15]=y):y=e[15];let g;e[16]!==b?(g={id:Ie,label:b,glyph:y,apply:f2,isSelected:u2},e[16]=b,e[17]=g):g=e[17];let v;e[18]!==s||e[19]!==g||e[20]!==k?(v=[k,g,...oi(s,d2).map(c2)],e[18]=s,e[19]=g,e[20]=k,e[21]=v):v=e[21];let N;e[22]!==m||e[23]!==c?(N=Q=>Q.assignee===qs?c("taskBoard.taskFilters.assigneeUnassigned"):Q.assignee===Ie?c("taskBoard.taskFilters.assigneeSuperAgent"):Q.assignee?m(Q.assignee):"",e[22]=m,e[23]=c,e[24]=N):N=e[24];let B;e[25]!==u?(B=Q=>{if(Q.assignee===Ie)return n.jsx(ct,{size:14});const fe=Q.assignee?u(Q.assignee):void 0;return fe?n.jsx(ot,{url:fe.user?.image??void 0,fallback:fe.user?.name??"?",shape:"circle",size:"2xs"}):n.jsx(Vs,{size:14,className:"shrink-0"})},e[25]=u,e[26]=B):B=e[26];let w;e[27]!==v||e[28]!==N||e[29]!==B||e[30]!==p?(w={id:"assignee",label:p,icon:h,options:v,valueLabel:N,valueGlyph:B},e[27]=v,e[28]=N,e[29]=B,e[30]=p,e[31]=w):w=e[31];const D=w;let C;e[32]!==c?(C=c("taskBoard.taskFilters.priorityLabel"),e[32]=c,e[33]=C):C=e[33];let S;e[34]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ur,{size:14,className:"shrink-0"}),e[34]=S):S=e[34];let T;e[35]!==c?(T=Ts.map(Q=>({id:Q,label:c(et[Q].labelKey),glyph:n.jsx(Mo,{priority:Q}),apply:fe=>({...fe,priority:Q}),isSelected:fe=>fe.priority===Q})),e[35]=c,e[36]=T):T=e[36];let _;e[37]!==c?(_=Q=>Q.priority?c(et[Q.priority].labelKey):"",e[37]=c,e[38]=_):_=e[38];let z;e[39]!==C||e[40]!==T||e[41]!==_?(z={id:"priority",label:C,icon:S,options:T,valueLabel:_,valueGlyph:o2},e[39]=C,e[40]=T,e[41]=_,e[42]=z):z=e[42];const I=z;let $;e[43]!==c?($=c("taskBoard.taskFilters.dueDateLabel"),e[43]=c,e[44]=$):$=e[44];let E;e[45]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ws,{size:14,className:"shrink-0"}),e[45]=E):E=e[45];let O;e[46]!==c?(O=Ad.map(Q=>({id:Q,label:c(ir(Q)),glyph:n.jsx(Ws,{size:14,className:K("shrink-0",Q==="overdue"?"text-destructive":"text-muted-foreground")}),apply:fe=>({...fe,due:Q}),isSelected:fe=>fe.due===Q})),e[46]=c,e[47]=O):O=e[47];let L;e[48]!==c?(L=Q=>Q.due?c(ir(Q.due)):"",e[48]=c,e[49]=L):L=e[49];let U;e[50]!==$||e[51]!==O||e[52]!==L?(U={id:"due",label:$,icon:E,options:O,valueLabel:L,valueGlyph:r2},e[50]=$,e[51]=O,e[52]=L,e[53]=U):U=e[53];const G=U;let P;e[54]!==c?(P=c("taskBoard.taskFilters.tagsLabel"),e[54]=c,e[55]=P):P=e[55];let Z;e[56]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(Cl,{size:14,className:"shrink-0"}),e[56]=Z):Z=e[56];let H;e[57]!==l?(H=oi(l,i2).map(l2),e[57]=l,e[58]=H):H=e[58];let se;e[59]!==c||e[60]!==l?(se=Q=>Q.tags.length===1?l.find(fe=>fe.id===Q.tags[0])?.name??c("taskBoard.taskFilters.tagsLabel"):c("taskBoard.taskFilters.tagsSelectedCount",{count:Q.tags.length}),e[59]=c,e[60]=l,e[61]=se):se=e[61];let V;e[62]!==l?(V=Q=>Q.tags.length===1?n.jsx(Ko,{color:l.find(fe=>fe.id===Q.tags[0])?.color}):n.jsx(Cl,{size:14,className:"shrink-0"}),e[62]=l,e[63]=V):V=e[63];let ee;e[64]!==P||e[65]!==H||e[66]!==se||e[67]!==V?(ee={id:"tags",label:P,icon:Z,multi:!0,options:H,valueLabel:se,valueGlyph:V},e[64]=P,e[65]=H,e[66]=se,e[67]=V,e[68]=ee):ee=e[68];const ie=ee;let ne;e[69]!==c?(ne=c("taskBoard.taskFilters.projectLabel"),e[69]=c,e[70]=ne):ne=e[70];let F;e[71]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(ls,{entry:void 0}),e[71]=F):F=e[71];let q;e[72]!==c?(q=c("taskBoard.taskFilters.projectNone"),e[72]=c,e[73]=q):q=e[73];let le;e[74]===Symbol.for("react.memo_cache_sentinel")?(le=n.jsx(ls,{entry:void 0}),e[74]=le):le=e[74];let de;e[75]!==q?(de={id:Xs,label:q,glyph:le,apply:a2,isSelected:n2},e[75]=q,e[76]=de):de=e[76];let pe;e[77]!==a.options||e[78]!==de?(pe=[de,...oi(a.options,s2).map(t2)],e[77]=a.options,e[78]=de,e[79]=pe):pe=e[79];let Se;e[80]!==a||e[81]!==c?(Se=Q=>Q.project===Xs?c("taskBoard.taskFilters.projectNone"):Q.project?Ua(Q.project,a)?.title??Q.project:"",e[80]=a,e[81]=c,e[82]=Se):Se=e[82];let Be;e[83]!==a?(Be=Q=>n.jsx(ls,{entry:Q.project?Ua(Q.project,a):void 0}),e[83]=a,e[84]=Be):Be=e[84];let oe;e[85]!==ne||e[86]!==pe||e[87]!==Se||e[88]!==Be?(oe={id:"project",label:ne,icon:F,options:pe,valueLabel:Se,valueGlyph:Be},e[85]=ne,e[86]=pe,e[87]=Se,e[88]=Be,e[89]=oe):oe=e[89];const ge=oe;let ye;e[90]!==i?(ye=new Map(i.map(e2)),e[90]=i,e[91]=ye):ye=e[91];const he=ye;let ae;e[92]!==c?(ae=c("taskBoard.sprints.label"),e[92]=c,e[93]=ae):ae=e[93];let we;e[94]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(Wt,{size:14,className:"shrink-0"}),e[94]=we):we=e[94];let ce;e[95]!==i||e[96]!==c?(ce=i.length===0?[]:[{id:Bs,label:c("taskBoard.sprints.backlog"),glyph:n.jsx(dl,{size:14,className:"shrink-0 text-muted-foreground"}),apply:Jm,isSelected:Zm},...i.map(Q=>({id:Q.id,label:ol(Q,c),glyph:n.jsx(Wt,{size:14,className:K("shrink-0",Q.state==="active"?"text-foreground":"text-muted-foreground")}),apply:fe=>({...fe,sprint:Q.id}),isSelected:fe=>fe.sprint===Q.id}))],e[95]=i,e[96]=c,e[97]=ce):ce=e[97];let xe;e[98]!==he||e[99]!==c?(xe=Q=>Q.sprint===Bs?c("taskBoard.sprints.backlog"):Q.sprint?he.get(Q.sprint)?.name??"":"",e[98]=he,e[99]=c,e[100]=xe):xe=e[100];let be;e[101]!==ae||e[102]!==ce||e[103]!==xe?(be={id:"sprint",label:ae,icon:we,options:ce,valueLabel:xe,valueGlyph:Xm},e[101]=ae,e[102]=ce,e[103]=xe,e[104]=be):be=e[104];const ue=be;let ze;return e[105]!==D||e[106]!==G||e[107]!==I||e[108]!==ge||e[109]!==o||e[110]!==ue||e[111]!==ie?(ze=o?[ue,D,I,G,ie]:[ue,D,I,G,ie,ge],e[105]=D,e[106]=G,e[107]=I,e[108]=ge,e[109]=o,e[110]=ue,e[111]=ie,e[112]=ze):ze=e[112],ze}function Xm(t){return t.sprint===Bs?n.jsx(dl,{size:14,className:"shrink-0"}):n.jsx(Wt,{size:14,className:"shrink-0"})}function Zm(t){return t.sprint===Bs}function Jm(t){return{...t,sprint:Bs}}function e2(t){return[t.id,t]}function t2(t){return{id:t.id,label:t.title,glyph:n.jsx(ls,{entry:t}),apply:e=>({...e,project:t.id}),isSelected:e=>e.project===t.id}}function s2(t){return t.title}function n2(t){return t.project===Xs}function a2(t){return{...t,project:Xs}}function l2(t){return{id:t.id,label:t.name,glyph:n.jsx(Ko,{color:t.color}),apply:e=>({...e,tags:e.tags.includes(t.id)?e.tags.filter(s=>s!==t.id):[...e.tags,t.id]}),isSelected:e=>e.tags.includes(t.id)}}function i2(t){return t.name}function r2(){return n.jsx(Ws,{size:14,className:"shrink-0"})}function o2(t){return t.priority?n.jsx(Mo,{priority:t.priority}):null}function c2(t){return{id:t.userId,label:t.user?.name??t.userId,glyph:n.jsx(ot,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"2xs"}),apply:e=>({...e,assignee:t.userId}),isSelected:e=>e.assignee===t.userId}}function d2(t){return t.user?.name??t.userId}function u2(t){return t.assignee===Ie}function f2(t){return{...t,assignee:Ie}}function m2(t){return t.assignee===qs}function p2(t){return{...t,assignee:qs}}function Wi(t){const e=R.c(5),{count:s}=t,l=X();let i;e[0]!==s||e[1]!==l?(i=l("taskBoard.viewControls.matchCount",{count:s}),e[0]=s,e[1]=l,e[2]=i):i=e[2];let a;return e[3]!==i?(a=n.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=a):a=e[4],a}function Zs(t){const e=R.c(2),{children:s}=t;let l;return e[0]!==s?(l=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s}),e[0]=s,e[1]=l):l=e[1],l}function g2(t){const e=R.c(22),{field:s,open:l,countFor:i,onSelect:a}=t;let r;e[0]!==s.icon?(r=n.jsx(Zs,{children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let o;e[2]!==s.label?(o=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Va,{size:12,className:"ml-auto shrink-0 text-muted-foreground/60"}),e[4]=c):c=e[4];let d;e[5]!==s.label||e[6]!==r||e[7]!==o?(d=n.jsx(pd,{asChild:!0,children:n.jsxs(Hs,{value:s.label,children:[r,o,c]})}),e[5]=s.label,e[6]=r,e[7]=o,e[8]=d):d=e[8];let u;if(e[9]!==i||e[10]!==s.options||e[11]!==a){let p;e[13]!==i||e[14]!==a?(p=h=>n.jsx(j2,{option:h,count:i(h),onSelect:()=>a(h)},h.id),e[13]=i,e[14]=a,e[15]=p):p=e[15],u=s.options.map(p),e[9]=i,e[10]=s.options,e[11]=a,e[12]=u}else u=e[12];let f;e[16]!==u?(f=n.jsx(as,{side:"right",align:"start",alignOffset:-5,className:"max-h-72 w-64 overflow-y-auto p-1",onOpenAutoFocus:x2,onCloseAutoFocus:h2,children:u}),e[16]=u,e[17]=f):f=e[17];let m;return e[18]!==l||e[19]!==d||e[20]!==f?(m=n.jsxs(ns,{open:l,children:[d,f]}),e[18]=l,e[19]=d,e[20]=f,e[21]=m):m=e[21],m}function h2(t){return t.preventDefault()}function x2(t){return t.preventDefault()}function j2(t){const e=R.c(12),{option:s,count:l,onSelect:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=K(fo({highlight:"hover"})),e[0]=a):a=e[0];let r;e[1]!==s.glyph?(r=n.jsx(Zs,{children:s.glyph}),e[1]=s.glyph,e[2]=r):r=e[2];let o;e[3]!==s.label?(o=n.jsx("span",{className:"truncate",children:s.label}),e[3]=s.label,e[4]=o):o=e[4];let c;e[5]!==l?(c=n.jsx(Wi,{count:l}),e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o||e[10]!==c?(d=n.jsxs("button",{type:"button",className:a,onClick:i,children:[r,o,c]}),e[7]=i,e[8]=r,e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function b2(t){const e=R.c(19),{field:s,option:l,count:i,onSelect:a}=t,r=`${s.label} ${l.label}`;let o;e[0]!==s.icon?(o=n.jsx(Zs,{children:s.icon}),e[0]=s.icon,e[1]=o):o=e[1];let c;e[2]!==s.label?(c=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.label}),e[2]=s.label,e[3]=c):c=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground/60"}),e[4]=d):d=e[4];let u;e[5]!==l.glyph?(u=n.jsx(Zs,{children:l.glyph}),e[5]=l.glyph,e[6]=u):u=e[6];let f;e[7]!==l.label?(f=n.jsx("span",{className:"truncate",children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let m;e[9]!==i?(m=n.jsx(Wi,{count:i}),e[9]=i,e[10]=m):m=e[10];let p;return e[11]!==a||e[12]!==r||e[13]!==o||e[14]!==c||e[15]!==u||e[16]!==f||e[17]!==m?(p=n.jsxs(Hs,{value:r,onSelect:a,children:[o,c,d,u,f,m]}),e[11]=a,e[12]=r,e[13]=o,e[14]=c,e[15]=u,e[16]=f,e[17]=m,e[18]=p):p=e[18],p}const k2=new Set(["ArrowDown","ArrowUp","ArrowRight"]);function y2(t){const e=R.c(50),{filters:s,items:l,index:i,fields:a,onChange:r,onClose:o}=t,c=X(),[d,u]=W.useState(""),[f,m]=W.useState(""),[p,h]=W.useState(!1);let j;e[0]!==s||e[1]!==r||e[2]!==o?(j=(z,I)=>{r(I.apply(s)),z.multi||o()},e[0]=s,e[1]=r,e[2]=o,e[3]=j):j=e[3];const x=j;let k;e[4]!==s||e[5]!==i||e[6]!==l?(k=z=>l.filter(I=>Di(I,z.apply(s),i)).length,e[4]=s,e[5]=i,e[6]=l,e[7]=k):k=e[7];const b=k;let y,g,v,N,B,w,D,C,S;if(e[8]!==f||e[9]!==p||e[10]!==b||e[11]!==a||e[12]!==d||e[13]!==x||e[14]!==c){const z=a.filter(v2);g=Mi,w=f,D=m,e[24]===Symbol.for("react.memo_cache_sentinel")?(C=O=>{k2.has(O.key)&&h(!0)},e[24]=C):C=e[24];let I;e[25]!==c?(I=c("taskBoard.viewControls.addFilter"),e[25]=c,e[26]=I):I=e[26];let $;e[27]!==c?($=c("taskBoard.viewControls.addFilter"),e[27]=c,e[28]=$):$=e[28],e[29]!==d||e[30]!==I||e[31]!==$?(S=n.jsx(Li,{size:"sm",value:d,onValueChange:u,placeholder:I,"aria-label":$,className:"h-9"}),e[29]=d,e[30]=I,e[31]=$,e[32]=S):S=e[32],y=Pi,e[33]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h(!0),e[33]=v):v=e[33];let E;e[34]!==c?(E=c("taskBoard.viewControls.noMatches"),e[34]=c,e[35]=E):E=e[35],e[36]!==E?(N=n.jsx(Fi,{children:E}),e[36]=E,e[37]=N):N=e[37],B=d.trim()===""?n.jsx(qa,{children:z.map(O=>n.jsx(g2,{field:O,open:p&&f===O.label,countFor:b,onSelect:L=>x(O,L)},O.id))}):n.jsx(qa,{children:z.flatMap(O=>O.options.map(L=>n.jsx(b2,{field:O,option:L,count:b(L),onSelect:()=>x(O,L)},`${O.id}:${L.id}`)))}),e[8]=f,e[9]=p,e[10]=b,e[11]=a,e[12]=d,e[13]=x,e[14]=c,e[15]=y,e[16]=g,e[17]=v,e[18]=N,e[19]=B,e[20]=w,e[21]=D,e[22]=C,e[23]=S}else y=e[15],g=e[16],v=e[17],N=e[18],B=e[19],w=e[20],D=e[21],C=e[22],S=e[23];let T;e[38]!==y||e[39]!==v||e[40]!==N||e[41]!==B?(T=n.jsxs(y,{onPointerMove:v,children:[N,B]}),e[38]=y,e[39]=v,e[40]=N,e[41]=B,e[42]=T):T=e[42];let _;return e[43]!==g||e[44]!==T||e[45]!==w||e[46]!==D||e[47]!==C||e[48]!==S?(_=n.jsxs(g,{value:w,onValueChange:D,onKeyDown:C,children:[S,T]}),e[43]=g,e[44]=T,e[45]=w,e[46]=D,e[47]=C,e[48]=S,e[49]=_):_=e[49],_}function v2(t){return t.options.length>0&&t.id!=="sprint"}function qo(t){const e=R.c(14);let s,l;e[0]!==t?({trigger:l,...s}=t,e[0]=t,e[1]=s,e[2]=l):(s=e[1],l=e[2]);const[i,a]=W.useState(!1);let r;e[3]!==l?(r=n.jsx(ss,{asChild:!0,children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==s||e[6]!==i?(o=i&&n.jsx(y2,{...s,onClose:()=>a(!1)}),e[5]=s,e[6]=i,e[7]=o):o=e[7];let c;e[8]!==o?(c=n.jsx(as,{align:"end",className:"w-72 p-0",children:o}),e[8]=o,e[9]=c):c=e[9];let d;return e[10]!==i||e[11]!==r||e[12]!==c?(d=n.jsxs(ns,{open:i,onOpenChange:a,children:[r,c]}),e[10]=i,e[11]=r,e[12]=c,e[13]=d):d=e[13],d}function N2(t){const e=R.c(23),{filters:s,items:l,members:i,tags:a,sprints:r,index:o,scoped:c,onChange:d}=t,u=X();let f;e[0]!==o||e[1]!==i||e[2]!==c||e[3]!==r||e[4]!==a?(f={members:i,tags:a,sprints:r,index:o,scoped:c},e[0]=o,e[1]=i,e[2]=c,e[3]=r,e[4]=a,e[5]=f):f=e[5];const m=Uo(f);let p;e[6]!==s||e[7]!==o||e[8]!==r?(p=Eo(s,o,wi(r)),e[6]=s,e[7]=o,e[8]=r,e[9]=p):p=e[9];const h=p.length>0;let j;e[10]!==u?(j=u("taskBoard.viewControls.filterLabel"),e[10]=u,e[11]=j):j=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(nd,{}),e[12]=x):x=e[12];let k;e[13]!==h||e[14]!==j?(k=n.jsx(Bt,{label:j,tooltipSide:"bottom",variant:"outline","aria-pressed":h,children:x}),e[13]=h,e[14]=j,e[15]=k):k=e[15];let b;return e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==l||e[20]!==d||e[21]!==k?(b=n.jsx(qo,{filters:s,items:l,index:o,fields:m,onChange:d,trigger:k}),e[16]=m,e[17]=s,e[18]=o,e[19]=l,e[20]=d,e[21]=k,e[22]=b):b=e[22],b}function Il(t){const e=R.c(28),{icon:s,label:l,value:i,options:a,onSelect:r,disabled:o}=t;let c;if(e[0]!==a||e[1]!==i){let b;e[3]!==i?(b=y=>y.value===i,e[3]=i,e[4]=b):b=e[4],c=a.find(b),e[0]=a,e[1]=i,e[2]=c}else c=e[2];const d=c;let u;e[5]!==s?(u=n.jsx(Zs,{children:s}),e[5]=s,e[6]=u):u=e[6];let f;e[7]!==l?(f=n.jsx("span",{className:"truncate",children:l}),e[7]=l,e[8]=f):f=e[8];const m=d?.label;let p;e[9]!==m?(p=n.jsx("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:m}),e[9]=m,e[10]=p):p=e[10];let h;e[11]!==o||e[12]!==u||e[13]!==f||e[14]!==p?(h=n.jsxs(vs,{disabled:o,className:"gap-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",children:[u,f,p]}),e[11]=o,e[12]=u,e[13]=f,e[14]=p,e[15]=h):h=e[15];let j;if(e[16]!==r||e[17]!==a||e[18]!==i){let b;e[20]!==r||e[21]!==i?(b=y=>n.jsxs(Ne,{className:"gap-2",onSelect:()=>r(y.value),children:[n.jsx(Zs,{children:y.icon}),n.jsx("span",{className:"truncate",children:y.label}),y.value===i&&n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},String(y.value)),e[20]=r,e[21]=i,e[22]=b):b=e[22],j=a.map(b),e[16]=r,e[17]=a,e[18]=i,e[19]=j}else j=e[19];let x;e[23]!==j?(x=n.jsx(Ns,{className:"w-52",children:j}),e[23]=j,e[24]=x):x=e[24];let k;return e[25]!==h||e[26]!==x?(k=n.jsxs(ys,{children:[h,x]}),e[25]=h,e[26]=x,e[27]=k):k=e[27],k}const Go={status:n.jsx(_c,{size:14,className:"shrink-0"}),assignee:n.jsx(Vs,{size:14,className:"shrink-0"}),priority:n.jsx(Ur,{size:14,className:"shrink-0"}),due:n.jsx(Ws,{size:14,className:"shrink-0"}),tags:n.jsx(Cl,{size:14,className:"shrink-0"}),project:n.jsx(ls,{entry:void 0})};function Vo(t){const e=R.c(34),{groupBy:s,subgroupBy:l,onGroupByChange:i,onSubgroupByChange:a,align:r}=t,o=X();let c;e[0]!==o?(c=o("taskBoard.viewControls.groupByNone"),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==c?(d={value:null,label:c},e[2]=c,e[3]=d):d=e[3];const u=d;let f;e[4]!==o?(f=B=>Oo.filter(w=>w!==B).map(w=>({value:w,label:o(ji[w]),icon:Go[w]})),e[4]=o,e[5]=f):f=e[5];const m=f;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(wl,{size:14,className:"shrink-0"}),e[6]=p):p=e[6];let h;e[7]!==o?(h=o("taskBoard.viewControls.groupingLabel"),e[7]=o,e[8]=h):h=e[8];let j;e[9]!==m||e[10]!==u?(j=[u,...m(null)],e[9]=m,e[10]=u,e[11]=j):j=e[11];let x;e[12]!==s||e[13]!==i||e[14]!==h||e[15]!==j?(x=n.jsx(Il,{icon:p,label:h,value:s,options:j,onSelect:i}),e[12]=s,e[13]=i,e[14]=h,e[15]=j,e[16]=x):x=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(wl,{size:14,className:"shrink-0"}),e[17]=k):k=e[17];let b;e[18]!==o?(b=o("taskBoard.viewControls.subgroupingLabel"),e[18]=o,e[19]=b):b=e[19];let y;e[20]!==m||e[21]!==s||e[22]!==u?(y=[u,...m(s)],e[20]=m,e[21]=s,e[22]=u,e[23]=y):y=e[23];const g=s===null;let v;e[24]!==a||e[25]!==l||e[26]!==y||e[27]!==g||e[28]!==b?(v=n.jsx(Il,{icon:k,label:b,value:l,options:y,onSelect:a,disabled:g}),e[24]=a,e[25]=l,e[26]=y,e[27]=g,e[28]=b,e[29]=v):v=e[29];let N;return e[30]!==r||e[31]!==v||e[32]!==x?(N=n.jsxs(qe,{align:r,className:"w-72",children:[x,v]}),e[30]=r,e[31]=v,e[32]=x,e[33]=N):N=e[33],N}function Ho(t){const e=R.c(45),{sortBy:s,sortDirection:l,onSortByChange:i,onSortDirectionChange:a,align:r}=t,o=X();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ci,{size:14,className:"shrink-0"}),e[0]=c):c=e[0];let d;e[1]!==o?(d=o("taskBoard.viewControls.sortingLabel"),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==o?(u=o("taskBoard.viewControls.sortNone"),e[3]=o,e[4]=u):u=e[4];let f;e[5]!==u?(f={value:null,label:u},e[5]=u,e[6]=f):f=e[6];let m;if(e[7]!==o||e[8]!==f){let C;e[10]!==o?(C=S=>({value:S,label:o(Yo[S]),icon:Go[S]}),e[10]=o,e[11]=C):C=e[11],m=[f,...Po.map(C)],e[7]=o,e[8]=f,e[9]=m}else m=e[9];let p;e[12]!==i||e[13]!==s||e[14]!==d||e[15]!==m?(p=n.jsx(Il,{icon:c,label:d,value:s,options:m,onSelect:i}),e[12]=i,e[13]=s,e[14]=d,e[15]=m,e[16]=p):p=e[16];let h;e[17]!==l?(h=l==="asc"?n.jsx(fi,{size:14,className:"shrink-0"}):n.jsx(mi,{size:14,className:"shrink-0"}),e[17]=l,e[18]=h):h=e[18];let j;e[19]!==o?(j=o("taskBoard.viewControls.sortDirectionLabel"),e[19]=o,e[20]=j):j=e[20];let x;e[21]!==o?(x=o("taskBoard.viewControls.sortAscending"),e[21]=o,e[22]=x):x=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(fi,{size:14,className:"shrink-0"}),e[23]=k):k=e[23];let b;e[24]!==x?(b={value:"asc",label:x,icon:k},e[24]=x,e[25]=b):b=e[25];let y;e[26]!==o?(y=o("taskBoard.viewControls.sortDescending"),e[26]=o,e[27]=y):y=e[27];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(mi,{size:14,className:"shrink-0"}),e[28]=g):g=e[28];let v;e[29]!==y?(v={value:"desc",label:y,icon:g},e[29]=y,e[30]=v):v=e[30];let N;e[31]!==b||e[32]!==v?(N=[b,v],e[31]=b,e[32]=v,e[33]=N):N=e[33];const B=s===null;let w;e[34]!==a||e[35]!==l||e[36]!==N||e[37]!==B||e[38]!==h||e[39]!==j?(w=n.jsx(Il,{icon:h,label:j,value:l,options:N,onSelect:a,disabled:B}),e[34]=a,e[35]=l,e[36]=N,e[37]=B,e[38]=h,e[39]=j,e[40]=w):w=e[40];let D;return e[41]!==r||e[42]!==w||e[43]!==p?(D=n.jsxs(qe,{align:r,className:"w-72",children:[p,w]}),e[41]=r,e[42]=w,e[43]=p,e[44]=D):D=e[44],D}function S2(t){const e=R.c(11),s=X();let l;e[0]!==s?(l=s("taskBoard.viewControls.groupByLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.groupBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(wl,{}),e[2]=a):a=e[2];let r;e[3]!==l||e[4]!==i?(r=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=r):r=e[5];let o;e[6]!==t?(o=n.jsx(Vo,{...t,align:"end"}),e[6]=t,e[7]=o):o=e[7];let c;return e[8]!==r||e[9]!==o?(c=n.jsxs(Me,{children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10],c}function B2(t){const e=R.c(21),{all:s,hidden:l,onToggle:i}=t,a=X();let r;e[0]!==a?(r=a("taskBoard.taskBoard.columnsLabel"),e[0]=a,e[1]=r):r=e[1];const o=l.length>0;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ad,{}),e[2]=c):c=e[2];let d;e[3]!==r||e[4]!==o?(d=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:r,tooltipSide:"bottom",variant:"secondary","aria-pressed":o,children:c})}),e[3]=r,e[4]=o,e[5]=d):d=e[5];let u;if(e[6]!==s||e[7]!==l||e[8]!==i||e[9]!==a){let p;e[11]!==s.length||e[12]!==l||e[13]!==i||e[14]!==a?(p=h=>{const j=!l.includes(h);return n.jsx(Tc,{checked:j,disabled:j&&s.length-l.length<=1,onSelect:C2,onCheckedChange:x=>i(h,x),children:dt(h,a).label},h)},e[11]=s.length,e[12]=l,e[13]=i,e[14]=a,e[15]=p):p=e[15],u=s.map(p),e[6]=s,e[7]=l,e[8]=i,e[9]=a,e[10]=u}else u=e[10];let f;e[16]!==u?(f=n.jsx(qe,{align:"end",children:u}),e[16]=u,e[17]=f):f=e[17];let m;return e[18]!==d||e[19]!==f?(m=n.jsxs(Me,{children:[d,f]}),e[18]=d,e[19]=f,e[20]=m):m=e[20],m}function C2(t){return t.preventDefault()}function w2(t){const e=R.c(11),s=X();let l;e[0]!==s?(l=s("taskBoard.viewControls.sortLabel"),e[0]=s,e[1]=l):l=e[1];const i=t.sortBy!==null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ci,{}),e[2]=a):a=e[2];let r;e[3]!==l||e[4]!==i?(r=n.jsx(Ke,{asChild:!0,children:n.jsx(Bt,{label:l,tooltipSide:"bottom",variant:"outline","aria-pressed":i,children:a})}),e[3]=l,e[4]=i,e[5]=r):r=e[5];let o;e[6]!==t?(o=n.jsx(Ho,{...t,align:"end"}),e[6]=t,e[7]=o):o=e[7];let c;return e[8]!==r||e[9]!==o?(c=n.jsxs(Me,{children:[r,o]}),e[8]=r,e[9]=o,e[10]=c):c=e[10],c}const ji={status:"taskBoard.viewControls.groupByStatus",assignee:"taskBoard.taskFilters.assigneeLabel",priority:"taskBoard.taskFilters.priorityLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel"},Yo={assignee:"taskBoard.taskFilters.assigneeLabel",due:"taskBoard.taskFilters.dueDateLabel",tags:"taskBoard.taskFilters.tagsLabel",project:"taskBoard.taskFilters.projectLabel",priority:"taskBoard.taskFilters.priorityLabel"};function Tr(t){const e=R.c(18),{icon:s,label:l,value:i,menu:a,extra:r,removeLabel:o,onRemove:c}=t;let d;e[0]!==s||e[1]!==l?(d=n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[s,l]}),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Pa,{orientation:"vertical"}),e[3]=u):u=e[3];let f;e[4]!==i?(f=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button",className:"flex h-full max-w-[16rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:i})}),e[4]=i,e[5]=f):f=e[5];let m;e[6]!==a||e[7]!==f?(m=n.jsxs(Me,{children:[f,a]}),e[6]=a,e[7]=f,e[8]=m):m=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(il,{}),e[9]=p):p=e[9];let h;e[10]!==c||e[11]!==o?(h=n.jsx(Bt,{label:o,size:"icon-sm",onClick:c,children:p}),e[10]=c,e[11]=o,e[12]=h):h=e[12];let j;return e[13]!==r||e[14]!==d||e[15]!==m||e[16]!==h?(j=n.jsxs(Ka,{variant:"outline",size:"segmented",children:[d,u,m,r,h]}),e[13]=r,e[14]=d,e[15]=m,e[16]=h,e[17]=j):j=e[17],j}function D2(t){const e=R.c(14),{grouping:s,sorting:l}=t,i=X(),{groupBy:a,subgroupBy:r}=s,{sortBy:o,sortDirection:c}=l,d=c==="asc"?fi:mi;let u;e[0]!==a||e[1]!==s||e[2]!==r||e[3]!==i?(u=a!==null&&n.jsx(Tr,{icon:n.jsx(wl,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.groupedBy"),value:n.jsxs(n.Fragment,{children:[i(ji[a]),r!==null&&n.jsxs(n.Fragment,{children:[n.jsx(Va,{size:12,className:"shrink-0 text-muted-foreground"}),i(ji[r])]})]}),menu:n.jsx(Vo,{...s,align:"start"}),removeLabel:i("taskBoard.viewControls.removeGrouping"),onRemove:()=>s.onGroupByChange(null)}),e[0]=a,e[1]=s,e[2]=r,e[3]=i,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==o||e[7]!==c||e[8]!==l||e[9]!==i?(f=o!==null&&n.jsx(Tr,{icon:n.jsx(Ci,{size:14,className:"shrink-0"}),label:i("taskBoard.viewControls.sortedBy"),value:i(Yo[o]),menu:n.jsx(Ho,{...l,align:"start"}),extra:n.jsxs(n.Fragment,{children:[n.jsx(Pa,{orientation:"vertical"}),n.jsx(Bt,{label:i("taskBoard.viewControls.reverseSort"),size:"icon-sm",onClick:()=>l.onSortDirectionChange(c==="asc"?"desc":"asc"),children:n.jsx(d,{})})]}),removeLabel:i("taskBoard.viewControls.removeSorting"),onRemove:()=>l.onSortByChange(null)}),e[5]=d,e[6]=o,e[7]=c,e[8]=l,e[9]=i,e[10]=f):f=e[10];let m;return e[11]!==u||e[12]!==f?(m=n.jsxs(n.Fragment,{children:[u,f]}),e[11]=u,e[12]=f,e[13]=m):m=e[13],m}function T2(t){const e=R.c(29),{field:s,filters:l,items:i,index:a,onChange:r,onClose:o}=t;let c;if(e[0]!==s.label||e[1]!==s.multi||e[2]!==s.options||e[3]!==l||e[4]!==a||e[5]!==i||e[6]!==r||e[7]!==o){let d;e[9]!==l?(d=g=>g.isSelected(l),e[9]=l,e[10]=d):d=e[10];const u=s.options.filter(d);let f;e[11]!==l?(f=g=>!g.isSelected(l),e[11]=l,e[12]=f):f=e[12];const m=s.options.filter(f);let p;e[13]!==s.multi||e[14]!==l||e[15]!==r||e[16]!==o?(p=g=>{r(g.apply(l)),s.multi||o()},e[13]=s.multi,e[14]=l,e[15]=r,e[16]=o,e[17]=p):p=e[17];const h=p;let j;e[18]!==l||e[19]!==a||e[20]!==i||e[21]!==h?(j=(g,v)=>n.jsxs("button",{type:"button",className:K(fo({highlight:"hover"})),onClick:()=>h(g),children:[n.jsx(Zs,{children:g.glyph}),n.jsx("span",{className:"truncate",children:g.label}),v?n.jsx(Wi,{count:i.filter(N=>Di(N,g.apply(l),a)).length}):n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},g.id),e[18]=l,e[19]=a,e[20]=i,e[21]=h,e[22]=j):j=e[22];const x=j;let k;e[23]!==s.label?(k=n.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:s.label}),e[23]=s.label,e[24]=k):k=e[24];let b;e[25]!==x?(b=g=>x(g,!1),e[25]=x,e[26]=b):b=e[26];let y;e[27]!==x?(y=g=>x(g,!0),e[27]=x,e[28]=y):y=e[28],c=n.jsxs("div",{className:"flex max-h-72 flex-col overflow-y-auto p-1",children:[k,u.map(b),u.length>0&&m.length>0&&n.jsx(Pa,{className:"my-1"}),m.map(y)]}),e[0]=s.label,e[1]=s.multi,e[2]=s.options,e[3]=l,e[4]=a,e[5]=i,e[6]=r,e[7]=o,e[8]=c}else c=e[8];return c}function _2(t){const e=R.c(22),{field:s,filters:l,items:i,index:a,onChange:r}=t,[o,c]=W.useState(!1);let d;e[0]!==s||e[1]!==l?(d=s.valueGlyph(l),e[0]=s,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==s||e[4]!==l?(u=s.valueLabel(l),e[3]=s,e[4]=l,e[5]=u):u=e[5];let f;e[6]!==d||e[7]!==u?(f=n.jsx(ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex h-full max-w-[12rem] items-center gap-1.5 truncate px-2.5 text-foreground hover:bg-accent",children:[d,u]})}),e[6]=d,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==i||e[13]!==r||e[14]!==o?(m=o&&n.jsx(T2,{field:s,filters:l,items:i,index:a,onChange:r,onClose:()=>c(!1)}),e[9]=s,e[10]=l,e[11]=a,e[12]=i,e[13]=r,e[14]=o,e[15]=m):m=e[15];let p;e[16]!==m?(p=n.jsx(as,{align:"start",className:"w-64 p-0",children:m}),e[16]=m,e[17]=p):p=e[17];let h;return e[18]!==o||e[19]!==f||e[20]!==p?(h=n.jsxs(ns,{open:o,onOpenChange:c,children:[f,p]}),e[18]=o,e[19]=f,e[20]=p,e[21]=h):h=e[21],h}function I2(t){const e=R.c(46),{filters:s,items:l,members:i,tags:a,sprints:r,index:o,onChange:c,view:d}=t,u=X();let f;e[0]!==o||e[1]!==i||e[2]!==r||e[3]!==a?(f={members:i,tags:a,sprints:r,index:o},e[0]=o,e[1]=i,e[2]=r,e[3]=a,e[4]=f):f=e[4];const m=Uo(f);let p,h,j,x,k,b;if(e[5]!==m||e[6]!==s||e[7]!==o||e[8]!==l||e[9]!==c||e[10]!==r||e[11]!==u||e[12]!==d){b=Symbol.for("react.early_return_sentinel");e:{h=wi(r),p=Eo(s,o,h);const D=d!==void 0&&(d.grouping.groupBy!==null||d.sorting.sortBy!==null);if(p.length===0&&!D){b=null;break e}j="mx-3 flex h-11 shrink-0 items-center gap-2 overflow-x-auto rounded-xl border border-border px-2 no-scrollbar",e[19]!==D||e[20]!==d?(x=d&&D&&n.jsxs(n.Fragment,{children:[n.jsx(D2,{...d}),n.jsx(Pa,{orientation:"vertical",className:"mx-1 h-5"})]}),e[19]=D,e[20]=d,e[21]=x):x=e[21],k=p.map(C=>{const S=m.find(T=>T.id===C);return S?n.jsxs(Ka,{variant:"outline",size:"segmented",children:[n.jsxs("span",{className:"flex h-full items-center gap-1.5 px-2.5 text-foreground",children:[S.icon,S.label]}),n.jsx(Pa,{orientation:"vertical"}),n.jsx("span",{className:"px-2 text-muted-foreground",children:S.multi?u("taskBoard.viewControls.isAnyOf"):u("taskBoard.viewControls.is")}),n.jsx(Pa,{orientation:"vertical"}),n.jsx(_2,{field:S,filters:s,items:l,index:o,onChange:c}),n.jsx(Bt,{label:u("taskBoard.viewControls.removeFilter",{field:S.label}),size:"icon-sm",onClick:()=>c(Km(s,C,h)),children:n.jsx(il,{})})]},C):null})}e[5]=m,e[6]=s,e[7]=o,e[8]=l,e[9]=c,e[10]=r,e[11]=u,e[12]=d,e[13]=p,e[14]=h,e[15]=j,e[16]=x,e[17]=k,e[18]=b}else p=e[13],h=e[14],j=e[15],x=e[16],k=e[17],b=e[18];if(b!==Symbol.for("react.early_return_sentinel"))return b;let y;e[22]!==u?(y=u("taskBoard.viewControls.addAnotherFilter"),e[22]=u,e[23]=y):y=e[23];let g;e[24]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(is,{}),e[24]=g):g=e[24];let v;e[25]!==y?(v=n.jsx(Bt,{label:y,children:g}),e[25]=y,e[26]=v):v=e[26];let N;e[27]!==m||e[28]!==s||e[29]!==o||e[30]!==l||e[31]!==c||e[32]!==v?(N=n.jsx(qo,{filters:s,items:l,index:o,fields:m,onChange:c,trigger:v}),e[27]=m,e[28]=s,e[29]=o,e[30]=l,e[31]=c,e[32]=v,e[33]=N):N=e[33];let B;e[34]!==p.length||e[35]!==h||e[36]!==s||e[37]!==c||e[38]!==u?(B=p.length>0&&n.jsx("div",{className:"ml-auto",children:n.jsx(re,{variant:"ghost",size:"sm",onClick:()=>c({...Qr,search:s.search,sprint:h}),children:u("taskBoard.viewControls.clear")})}),e[34]=p.length,e[35]=h,e[36]=s,e[37]=c,e[38]=u,e[39]=B):B=e[39];let w;return e[40]!==B||e[41]!==j||e[42]!==x||e[43]!==k||e[44]!==N?(w=n.jsxs("div",{className:j,children:[x,k,N,B]}),e[40]=B,e[41]=j,e[42]=x,e[43]=k,e[44]=N,e[45]=w):w=e[45],w}function A2(t){const e=R.c(7),{onClick:s,label:l}=t,i=X();let a;e[0]!==l||e[1]!==i?(a=l??i("taskBoard.taskFilters.boardSettingsLabel"),e[0]=l,e[1]=i,e[2]=a):a=e[2];const r=a;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(qr,{}),e[3]=o):o=e[3];let c;return e[4]!==r||e[5]!==s?(c=n.jsx(Bt,{label:r,tooltipSide:"bottom",variant:"outline",onClick:s,children:o}),e[4]=r,e[5]=s,e[6]=c):c=e[6],c}const z2=["board","list","feed","epics"],$2=["overdue","today","week","none"],Gs=t=>typeof t=="string"&&t!==""?t:null,Wo={layout:"board",assignee:null,groupBy:null,sprint:null},Qo="any",Xo="any",R2="none";function E2(t,e){return typeof t!="string"||t===""?null:t===qs||t===Ie||e===null||e.has(t)?t:null}function O2(t,e=Wo){const s=Gs(t.priority),l=Gs(t.due),i=Gs(t.tags),a=t.group===void 0?e.groupBy:Dr(t.group)?t.group:null,r=Hm(t.sort)?t.sort:null;return{layout:z2.includes(t.view)?t.view:e.layout,groupBy:a,subgroupBy:a!==null&&Dr(t.subgroup)&&t.subgroup!==a?t.subgroup:null,sortBy:r,sortDirection:t.dir==="asc"||t.dir==="desc"?t.dir:r!==null?Yi(r):"asc",filters:{search:Gs(t.q)??"",assignee:t.assignee===void 0?e.assignee:t.assignee===Qo?null:Gs(t.assignee),priority:Ts.includes(s)?s:null,due:$2.includes(l)?l:null,tags:i?i.split(",").filter(Boolean):[],project:Gs(t.repo),sprint:t.sprint===void 0?e.sprint:t.sprint===Xo?null:Gs(t.sprint)}}}function L2({filters:t,layout:e,groupBy:s,subgroupBy:l,sortBy:i,sortDirection:a},r=Wo){return{view:e===r.layout?void 0:e,group:s===r.groupBy?void 0:s??R2,subgroup:s!==null?l??void 0:void 0,sort:i??void 0,dir:i!==null&&a!==Yi(i)?a:void 0,q:t.search===""?void 0:t.search,assignee:t.assignee===r.assignee?void 0:t.assignee??Qo,priority:t.priority??void 0,due:t.due??void 0,tags:t.tags.length>0?t.tags.join(","):void 0,repo:t.project??void 0,sprint:t.sprint===r.sprint?void 0:t.sprint??Xo}}function F2(t,e){const s=new Set(e.map(l=>l.id));return new Set([...t].filter(l=>s.has(l)))}function P2(t,e){const s=R.c(30);let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},s[0]=l):l=s[0];const i=Rr(l),a=bi();let r;s[1]!==t||s[2]!==i?(r=O2(i,t),s[1]=t,s[2]=i,s[3]=r):r=s[3];const o=r,{groupBy:c,subgroupBy:d}=o;let u;s[4]!==t||s[5]!==a||s[6]!==o?(u=y=>a({to:".",search:g=>({...g,...L2({...o,...y},t)}),replace:!0}),s[4]=t,s[5]=a,s[6]=o,s[7]=u):u=s[7];const f=u;let m;s[8]!==e||s[9]!==o.filters||s[10]!==f?(m=y=>{y.assignee!==o.filters.assignee&&e(y.assignee),f({filters:y})},s[8]=e,s[9]=o.filters,s[10]=f,s[11]=m):m=s[11];let p;s[12]!==f?(p=y=>f({layout:y}),s[12]=f,s[13]=p):p=s[13];let h;s[14]!==c||s[15]!==d||s[16]!==f?(h=y=>f({groupBy:y,subgroupBy:y!==null&&y===d?c:d}),s[14]=c,s[15]=d,s[16]=f,s[17]=h):h=s[17];let j,x,k;s[18]!==f?(j=y=>f({subgroupBy:y}),x=y=>f({sortBy:y,sortDirection:y!==null?Yi(y):"asc"}),k=y=>f({sortDirection:y}),s[18]=f,s[19]=j,s[20]=x,s[21]=k):(j=s[19],x=s[20],k=s[21]);let b;return s[22]!==m||s[23]!==p||s[24]!==h||s[25]!==j||s[26]!==x||s[27]!==k||s[28]!==o?(b={...o,setFilters:m,setLayout:p,setGroupBy:h,setSubgroupBy:j,setSortBy:x,setSortDirection:k},s[22]=m,s[23]=p,s[24]=h,s[25]=j,s[26]=x,s[27]=k,s[28]=o,s[29]=b):b=s[29],b}const M2=5e3;function K2(t){if(Ti(t))return"blocked";const e=Rl(t);if(e==="running")return"running";if(e==="failed")return"failed";if(Jr(t))return"handed";if(t.status==="done")return"done";if(t.status==="post_deploy_validation")return"delivered";if(t.status==="in_review")return"review";const s=Date.parse(t.updatedAt)-Date.parse(t.createdAt);return Number.isFinite(s)&&s<M2?"created":"updated"}function U2(t){const e=`${t.getMonth()+1}`.padStart(2,"0"),s=`${t.getDate()}`.padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}function q2(t,e){const s=l=>new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime();return Math.round((s(t)-s(e))/864e5)}function G2(t,e){const s=new Map,l=t.map(i=>({item:i,at:new Date(i.updatedAt)})).filter(({at:i})=>Number.isFinite(i.getTime())).sort((i,a)=>a.at.getTime()-i.at.getTime());for(const{item:i,at:a}of l){const r=U2(a),o=s.get(r);if(o){o.items.push(i);continue}const c=q2(e,a);s.set(r,{key:r,date:a,relative:c===0?"today":c===1?"yesterday":null,items:[i]})}return[...s.values()]}function V2({items:t,scopeId:e,project:s,projects:l,isLoading:i}){if(!e)return{items:[...t],isLoading:i};if(!s||l.length===0)return{items:[],isLoading:!0};const a=l.some(r=>r.id===s.id)?l:[...l,s];return{items:yu(t,co(a),e),isLoading:i}}Ic(()=>import("./route-PbputQp9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159])).catch(()=>{});const H2=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),os="inline-flex items-center gap-1 rounded-full border-[length:var(--border-hairline)] border-border px-2 py-0.5 text-xs font-medium text-muted-foreground",ci="inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",Zo="opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",Ja="flex size-6 shrink-0 items-center justify-center rounded-lg text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",sn=12,ml="size-3.5",Ds=2;function Y2(){const t=R.c(9),e=X();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=K(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx($l,{size:sn}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=a):a=t[5];let r;return t[6]!==l||t[7]!==a?(r=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=r):r=t[8],r}function W2(){const t=R.c(9),e=X();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=K(os,"border-warning/50 text-warning"),t[0]=s):s=t[0];let l;t[1]!==e?(l=e("taskBoard.taskBoard.handedToHumanBadgeTitle"),t[1]=e,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx($l,{size:sn}),t[3]=i):i=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsYou"),t[4]=e,t[5]=a):a=t[5];let r;return t[6]!==l||t[7]!==a?(r=n.jsxs("span",{className:s,title:l,children:[i,a]}),t[6]=l,t[7]=a,t[8]=r):r=t[8],r}function Jo(t){const e=R.c(20),{priority:s,onChange:l}=t,i=X(),a=et[s];let r;e[0]!==a.labelKey||e[1]!==i?(r=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=r):r=e[2];const o=r,c=a.icon;let d;e[3]!==a.iconClassName?(d=K(ml,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==o?(h=n.jsx(Fl,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==s||e[14]!==i?(m=Ts.map(h=>{const j=et[h].icon;return n.jsxs(Ne,{onSelect:()=>l(h),className:K("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:sn,className:K("shrink-0",et[h].iconClassName)}),i(et[h].labelKey)]},h)}),e[12]=l,e[13]=s,e[14]=i,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==o||e[18]!==m?(p=n.jsx(ec,{label:o,glyph:f,children:m}),e[16]=f,e[17]=o,e[18]=m,e[19]=p):p=e[19],p}function ec(t){const e=R.c(8),{label:s,glyph:l,children:i}=t;let a;e[0]!==l||e[1]!==s?(a=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:Z2,onPointerDown:X2,className:"-m-1.5",children:l})}),e[0]=l,e[1]=s,e[2]=a):a=e[2];let r;e[3]!==i?(r=n.jsx(qe,{align:"start",className:"w-36",onClick:Q2,children:i}),e[3]=i,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=n.jsxs(Me,{children:[a,r]}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function Q2(t){return t.stopPropagation()}function X2(t){return t.stopPropagation()}function Z2(t){return t.stopPropagation()}function Fl(t){const e=R.c(7),{label:s,children:l}=t;let i;e[0]!==l?(i=n.jsx(Ks,{asChild:!0,children:n.jsx("span",{className:"flex shrink-0 items-center",children:l})}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==s?(a=n.jsx(Us,{side:"top",children:s}),e[2]=s,e[3]=a):a=e[3];let r;return e[4]!==i||e[5]!==a?(r=n.jsxs(Ms,{children:[i,a]}),e[4]=i,e[5]=a,e[6]=r):r=e[6],r}function J2(t){const e=R.c(20),{type:s,onChange:l}=t,i=X(),a=At[s];let r;e[0]!==a.labelKey||e[1]!==i?(r=i(a.labelKey),e[0]=a.labelKey,e[1]=i,e[2]=r):r=e[2];const o=r,c=a.icon;let d;e[3]!==a.iconClassName?(d=K(ml,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=n.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!l){let h;return e[9]!==f||e[10]!==o?(h=n.jsx(Fl,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=h):h=e[11],h}let m;e[12]!==l||e[13]!==i||e[14]!==s?(m=Ii.map(h=>{const j=At[h].icon;return n.jsxs(Ne,{onSelect:()=>l(h),className:K("gap-2",h===s&&"bg-accent"),children:[n.jsx(j,{size:sn,className:K("shrink-0",At[h].iconClassName)}),i(At[h].labelKey)]},h)}),e[12]=l,e[13]=i,e[14]=s,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==o||e[18]!==m?(p=n.jsx(ec,{label:o,glyph:f,children:m}),e[16]=f,e[17]=o,e[18]=m,e[19]=p):p=e[19],p}function tc(t){const e=R.c(58),{iso:s,onChange:l}=t,i=X();let a;e[0]!==s?(a=s?Vd(s):null,e[0]=s,e[1]=a):a=e[1];const r=a;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ws,{className:K(ml,"shrink-0")}),e[2]=o):o=e[2];let c;e[3]!==s?(c=s&&n.jsx("span",{className:"truncate",children:H2.format(new Date(s))}),e[3]=s,e[4]=c):c=e[4];let d;e[5]!==c?(d=n.jsxs(n.Fragment,{children:[o,c]}),e[5]=c,e[6]=d):d=e[6];const u=d;let f,m,p,h,j,x,k,b,y,g,v,N;if(e[7]!==u||e[8]!==s||e[9]!==l||e[10]!==i||e[11]!==r){k=Symbol.for("react.early_return_sentinel");e:{const z=K("min-w-0 shrink items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground/70",r==="overdue"&&"text-destructive",r==="soon"&&"text-warning");if(!l){k=n.jsx("span",{className:K("flex",z),children:u});break e}p=Me,m=Ke,x=!0,f=re,b="ghost",y="sm",e[24]!==s||e[25]!==i?(g=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[24]=s,e[25]=i,e[26]=g):g=e[26],e[27]!==s||e[28]!==i?(v=s?void 0:i("taskBoard.taskBoard.dueDateButton"),e[27]=s,e[28]=i,e[29]=v):v=e[29],N=sp,h=tp,j=K("-mx-1.5 h-auto px-1.5 py-1 font-medium",z,!s&&Zo)}e[7]=u,e[8]=s,e[9]=l,e[10]=i,e[11]=r,e[12]=f,e[13]=m,e[14]=p,e[15]=h,e[16]=j,e[17]=x,e[18]=k,e[19]=b,e[20]=y,e[21]=g,e[22]=v,e[23]=N}else f=e[12],m=e[13],p=e[14],h=e[15],j=e[16],x=e[17],k=e[18],b=e[19],y=e[20],g=e[21],v=e[22],N=e[23];if(k!==Symbol.for("react.early_return_sentinel"))return k;let B;e[30]!==f||e[31]!==u||e[32]!==h||e[33]!==j||e[34]!==b||e[35]!==y||e[36]!==g||e[37]!==v||e[38]!==N?(B=n.jsx(f,{variant:b,size:y,"aria-label":g,title:v,onClick:N,onPointerDown:h,className:j,children:u}),e[30]=f,e[31]=u,e[32]=h,e[33]=j,e[34]=b,e[35]=y,e[36]=g,e[37]=v,e[38]=N,e[39]=B):B=e[39];let w;e[40]!==m||e[41]!==x||e[42]!==B?(w=n.jsx(m,{asChild:x,children:B}),e[40]=m,e[41]=x,e[42]=B,e[43]=w):w=e[43];let D;e[44]!==s?(D=s?new Date(s):void 0,e[44]=s,e[45]=D):D=e[45];let C;e[46]!==s?(C=s?new Date(s):void 0,e[46]=s,e[47]=C):C=e[47];let S;e[48]!==l?(S=z=>z&&l(Hi(z)),e[48]=l,e[49]=S):S=e[49];let T;e[50]!==D||e[51]!==C||e[52]!==S?(T=n.jsx(qe,{align:"start",className:"w-auto p-0",onClick:ep,children:n.jsx($i,{mode:"single",selected:D,defaultMonth:C,onSelect:S,initialFocus:!0})}),e[50]=D,e[51]=C,e[52]=S,e[53]=T):T=e[53];let _;return e[54]!==p||e[55]!==w||e[56]!==T?(_=n.jsxs(p,{children:[w,T]}),e[54]=p,e[55]=w,e[56]=T,e[57]=_):_=e[57],_}function ep(t){return t.stopPropagation()}function tp(t){return t.stopPropagation()}function sp(t){return t.stopPropagation()}function np(t){const e=R.c(8),{action:s}=t;let l;e[0]!==s?(l=r=>{r.stopPropagation(),s.onClick()},e[0]=s,e[1]=l):l=e[1];let i;e[2]!==s.icon?(i=n.jsx(s.icon,{className:ml}),e[2]=s.icon,e[3]=i):i=e[3];let a;return e[4]!==s.label||e[5]!==l||e[6]!==i?(a=n.jsxs(re,{variant:"outline",size:"xs",onClick:l,onPointerDown:lp,ref:ap,className:"absolute -top-0.5 right-0 gap-1.5 font-medium pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",children:[i,s.label]}),e[4]=s.label,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function ap(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function lp(t){return t.stopPropagation()}function sc(t){const e=R.c(38),{item:s,checks:l,assignee:i,assignedBy:a,members:r,leading:o,trailing:c,onAssign:d,onPriorityChange:u,onTypeChange:f,onDueDateChange:m}=t,{org:p}=tt();let h;e[0]!==s.keySeq||e[1]!==p.slug?(h=tn(p.slug,s.keySeq),e[0]=s.keySeq,e[1]=p.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s.type||e[4]!==f?(x=n.jsx(J2,{type:s.type,onChange:f}),e[3]=s.type,e[4]=f,e[5]=x):x=e[5];let k;e[6]!==j?(k=n.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/70",children:j}),e[6]=j,e[7]=k):k=e[7];let b;e[8]!==x||e[9]!==k?(b=n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[x,k]}),e[8]=x,e[9]=k,e[10]=b):b=e[10];let y;e[11]!==s.dueDate||e[12]!==m?(y=s.dueDate&&n.jsx(tc,{iso:s.dueDate,onChange:m}),e[11]=s.dueDate,e[12]=m,e[13]=y):y=e[13];let g;e[14]!==o||e[15]!==b||e[16]!==y?(g=n.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[b,y,o]}),e[14]=o,e[15]=b,e[16]=y,e[17]=g):g=e[17];let v;e[18]!==s.priority||e[19]!==u?(v=(s.priority!=="none"||u)&&n.jsx(Jo,{priority:s.priority,onChange:u}),e[18]=s.priority,e[19]=u,e[20]=v):v=e[20];let N;e[21]!==l||e[22]!==s.reviewVerdicts?(N=l&&n.jsx(op,{summary:l.summary,verdicts:s.reviewVerdicts,enabled:l.enabled}),e[21]=l,e[22]=s.reviewVerdicts,e[23]=N):N=e[23];let B;e[24]!==a||e[25]!==i||e[26]!==s||e[27]!==r||e[28]!==d?(B=n.jsx(ic,{item:s,assignee:i,assignedBy:a,members:r,onAssign:d,showDelegation:!1}),e[24]=a,e[25]=i,e[26]=s,e[27]=r,e[28]=d,e[29]=B):B=e[29];let w;e[30]!==v||e[31]!==N||e[32]!==B||e[33]!==c?(w=n.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[v,N,B,c]}),e[30]=v,e[31]=N,e[32]=B,e[33]=c,e[34]=w):w=e[34];let D;return e[35]!==w||e[36]!==g?(D=n.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[g,w]}),e[35]=w,e[36]=g,e[37]=D):D=e[37],D}function ip(t){const e=R.c(20),{status:s,since:l}=t,i=X(),[a]=W.useState(rp);let r,o,c,d,u,f;if(e[0]!==a||e[1]!==l||e[2]!==s||e[3]!==i){const h=Hd(l,a),j=dt(s,i).label;o=Ms,u=400;let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(id,{size:sn}),e[10]=x):x=e[10],f=n.jsx(Ks,{asChild:!0,children:n.jsxs("span",{className:os,children:[x,h===0?i("taskBoard.taskBoard.statusAgeToday"):i("taskBoard.taskBoard.statusAgeDays",{count:h})]})}),r=Us,c="top",d=h===0?i("taskBoard.taskBoard.statusAgeTodayHint",{status:j}):i("taskBoard.taskBoard.statusAgeDaysHint",{status:j,count:h}),e[0]=a,e[1]=l,e[2]=s,e[3]=i,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f}else r=e[4],o=e[5],c=e[6],d=e[7],u=e[8],f=e[9];let m;e[11]!==r||e[12]!==c||e[13]!==d?(m=n.jsx(r,{side:c,children:d}),e[11]=r,e[12]=c,e[13]=d,e[14]=m):m=e[14];let p;return e[15]!==o||e[16]!==u||e[17]!==f||e[18]!==m?(p=n.jsxs(o,{delayDuration:u,children:[f,m]}),e[15]=o,e[16]=u,e[17]=f,e[18]=m,e[19]=p):p=e[19],p}function rp(){return Date.now()}function nc(t){const e=R.c(9),{sprintId:s}=t,l=Ll();let i;if(e[0]!==s||e[1]!==l){let d;e[3]!==s?(d=u=>u.id===s,e[3]=s,e[4]=d):d=e[4],i=l.find(d),e[0]=s,e[1]=l,e[2]=i}else i=e[2];const a=i;if(!a)return null;let r,o;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=K(os,"text-foreground"),o=n.jsx(Wt,{size:10,className:"shrink-0 text-muted-foreground"}),e[5]=r,e[6]=o):(r=e[5],o=e[6]);let c;return e[7]!==a.name?(c=n.jsxs("span",{className:r,children:[o,a.name]}),e[7]=a.name,e[8]=c):c=e[8],c}function Qi(t){const e=R.c(8),{tag:s}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=K(os,"text-foreground"),e[0]=l):l=e[0];let i;e[1]!==s.color?(i=en(s.color),e[1]=s.color,e[2]=i):i=e[2];let a;e[3]!==i?(a={borderColor:i},e[3]=i,e[4]=a):a=e[4];let r;return e[5]!==a||e[6]!==s.name?(r=n.jsx("span",{className:l,style:a,children:s.name}),e[5]=a,e[6]=s.name,e[7]=r):r=e[7],r}function op(t){const e=R.c(26),{summary:s,verdicts:l,enabled:i}=t,a=X();let r;if(e[0]!==i||e[1]!==a||e[2]!==l){let y;e[4]!==a||e[5]!==l?(y=g=>{const v=l.find(w=>w.reviewer===g),N=a("taskBoard.taskDialog.reviewerLabel"),B=v?v.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(v.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return n.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[n.jsx(fl,{size:12}),N," — ",B]},g)},e[4]=a,e[5]=l,e[6]=y):y=e[6],r=i.map(y),e[0]=i,e[1]=a,e[2]=l,e[3]=r}else r=e[3];let o;e[7]!==r?(o=n.jsx("span",{className:"flex flex-col gap-0.5",children:r}),e[7]=r,e[8]=o):o=e[8];const c=o,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let m;e[9]!==d||e[10]!==u||e[11]!==f?(m=K("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=m):m=e[12];const p=String(s.passed),h=String(s.total);let j;e[13]!==a||e[14]!==p||e[15]!==h?(j=a("taskBoard.taskBoard.checksLabel",{passed:p,total:h}),e[13]=a,e[14]=p,e[15]=h,e[16]=j):j=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ha,{className:ml}),e[17]=x):x=e[17];let k;e[18]!==s.passed||e[19]!==s.total||e[20]!==m||e[21]!==j?(k=n.jsxs("span",{className:m,"aria-label":j,children:[x,s.passed,"/",s.total]}),e[18]=s.passed,e[19]=s.total,e[20]=m,e[21]=j,e[22]=k):k=e[22];let b;return e[23]!==c||e[24]!==k?(b=n.jsx(Fl,{label:c,children:k}),e[23]=c,e[24]=k,e[25]=b):b=e[25],b}function ac(t){const e=R.c(14),{state:s}=t,l=X(),i=s==="running",a=i?"taskBoard.taskBoard.agentRunning":"taskBoard.taskBoard.agentFailed";let r;e[0]!==l||e[1]!==a?(r=l(a),e[0]=l,e[1]=a,e[2]=r):r=e[2];const o=r;let c;e[3]!==o||e[4]!==i?(c=i?n.jsx(xt,{className:"size-3.5 text-primary",label:o}):n.jsx(Rc,{size:14,className:"shrink-0 text-destructive","aria-label":o}),e[3]=o,e[4]=i,e[5]=c):c=e[5];let d;e[6]!==o||e[7]!==c?(d=n.jsx(Fl,{label:o,children:c}),e[6]=o,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==o?(u=n.jsx("span",{className:"sr-only",children:o}),e[9]=o,e[10]=u):u=e[10];let f;return e[11]!==d||e[12]!==u?(f=n.jsxs("span",{className:"mt-px flex shrink-0 items-center",children:[d,u]}),e[11]=d,e[12]=u,e[13]=f):f=e[13],f}function lc(t){const e=R.c(3),s=tf(ao());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const l=sf(t.reviewVerdicts,s);let i;return e[0]!==s||e[1]!==l?(i=l?{summary:l,enabled:s}:null,e[0]=s,e[1]=l,e[2]=i):i=e[2],i}function ic(t){const e=R.c(27),{item:s,assignee:l,assignedBy:i,members:a,onAssign:r,showDelegation:o}=t,c=o===void 0?!0:o,d=X(),[u,f]=W.useState(!1);let m=null;if(s.assigneeId===Ie){let k;e[0]!==i||e[1]!==d?(k=i?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:i.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=i,e[1]=d,e[2]=k):k=e[2];const b=k;if(c){let y;e[6]!==i?(y=i&&n.jsx(ot,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[6]=i,e[7]=y):y=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ct,{size:20,className:"ring-2 ring-background"}),e[8]=g):g=e[8];let v;e[9]!==y||e[10]!==b?(v=n.jsxs("span",{className:"inline-flex items-center",title:b,children:[y,g]}),e[9]=y,e[10]=b,e[11]=v):v=e[11],m=v}else{let y;e[3]!==i||e[4]!==b?(y=i?n.jsx(ot,{url:i.user?.image??void 0,fallback:i.user?.name??"?",shape:"circle",size:"xs",title:b}):null,e[3]=i,e[4]=b,e[5]=y):y=e[5],m=y}}else if(l){const k=l.user?.image??void 0,b=l.user?.name??"?";let y;e[12]!==k||e[13]!==b?(y=n.jsx(ot,{url:k,fallback:b,shape:"circle",size:"xs"}),e[12]=k,e[13]=b,e[14]=y):y=e[14],m=y}if(!r||!a?.length)return m;let p;e[15]!==m||e[16]!==d?(p=n.jsx(ss,{asChild:!0,children:m?n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},onPointerDown:dp,className:"flex shrink-0 items-center rounded-full transition-opacity hover:opacity-80",children:m}):n.jsx("button",{type:"button",title:d("taskBoard.taskBoard.assignButton"),"aria-label":d("taskBoard.taskBoard.assignButton"),onClick:k=>{k.stopPropagation(),f(!0)},className:K("flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 opacity-0 transition-[color,border-color,opacity] group-hover:opacity-100 hover:border-muted-foreground hover:text-muted-foreground focus-visible:opacity-100 data-[state=open]:opacity-100","-ml-2 w-0 scale-75 overflow-hidden border-0 transition-[color,border-color,opacity,width,margin,scale] duration-150 ease-out group-hover:ml-0 group-hover:w-6 group-hover:scale-100 group-hover:border focus-visible:ml-0 focus-visible:w-6 focus-visible:scale-100 focus-visible:border data-[state=open]:ml-0 data-[state=open]:w-6 data-[state=open]:scale-100 data-[state=open]:border motion-reduce:transition-none"),children:n.jsx(Kr,{size:13})})}),e[15]=m,e[16]=d,e[17]=p):p=e[17];let h;e[18]!==r?(h=k=>{r(k),f(!1)},e[18]=r,e[19]=h):h=e[19];let j;e[20]!==a||e[21]!==h?(j=n.jsx(as,{className:"w-56 p-0",align:"end",side:"bottom",onClick:cp,children:n.jsx(qi,{members:a,onSelect:h})}),e[20]=a,e[21]=h,e[22]=j):j=e[22];let x;return e[23]!==u||e[24]!==p||e[25]!==j?(x=n.jsxs(ns,{open:u,onOpenChange:f,children:[p,j]}),e[23]=u,e[24]=p,e[25]=j,e[26]=x):x=e[26],x}function cp(t){return t.stopPropagation()}function dp(t){return t.stopPropagation()}function bh(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(s1,{children:n.jsx(up,{})}),t[0]=e):e=t[0],e}function up(){const t=R.c(138),e=X(),{org:s,locator:l}=tt(),{items:i,demoFrozenItemIds:a,isLoading:r,isFetching:o}=Vr(),{scopeId:c,project:d,projects:u}=Su();let f;t[0]!==r||t[1]!==i||t[2]!==u||t[3]!==c||t[4]!==d?(f=V2({items:i,scopeId:c,project:d,projects:u,isLoading:r}),t[0]=r,t[1]=i,t[2]=u,t[3]=c,t[4]=d,t[5]=f):f=t[5];const{items:m,isLoading:p}=f,{data:h}=El();let j;t[6]!==h?(j=h===void 0?[]:h,t[6]=h,t[7]=j):j=t[7];const x=j,k=Ll();c1();const b=kd(),y=ro();let g,v;if(t[8]!==y.data){const A=(y.data??[]).filter(Sp);g=A.length>0,v=A.map(Np),t[8]=y.data,t[9]=g,t[10]=v}else g=t[9],v=t[10];const N=v,[B,w]=W.useState(!1);let D;t[11]!==g?(D=A=>A===Ie&&!g?(w(!0),!0):!1,t[11]=g,t[12]=D):D=t[12];const C=D;let S;t[13]!==e?(S=A=>{Qe.error(A.message||e("taskBoard.taskBoard.actionError"))},t[13]=e,t[14]=S):S=t[14];const T=S;let _;t[15]!==s.id?(_=A=>{!A||A.dataset.tracked==="true"||(A.dataset.tracked="true",zc("task_board_opened",{organization_id:s.id}))},t[15]=s.id,t[16]=_):_=t[16];const z=_;let I;t[17]===Symbol.for("react.memo_cache_sentinel")?(I=[],t[17]=I):I=t[17];const[$,E]=W.useState(I),O=()=>{if($.length!==0){if(C(Ie)){E([]);return}for(const A of $)b.rerun.mutate({id:A.id},{onError:J=>T(J)});E([]),De()}},{data:L}=vi.useSession(),{data:U}=yi(),G=U?.data?.members??[],P=new Map(G.map(vp)),Z=L?.user?.id??null;let H;t[18]!==s.id||t[19]!==Z?(H=Or.taskBoardAssignee(s.id,Z??""),t[18]=s.id,t[19]=Z,t[20]=H):H=t[20];const[se,V]=Er(H,null);let ee;t[21]!==V||t[22]!==Z?(ee=A=>{Z!==null&&V(A)},t[21]=V,t[22]=Z,t[23]=ee):ee=t[23];const{filters:ie,setFilters:ne,layout:F,setLayout:q,groupBy:le,subgroupBy:de,setGroupBy:pe,setSubgroupBy:Se,sortBy:Be,sortDirection:oe,setSortBy:ge,setSortDirection:ye}=P2({layout:"board",assignee:Z===null?null:E2(se,U?new Set(P.keys()):null),groupBy:"status",sprint:wi(k)},ee),he={...ie,sprint:zd(ie.sprint,k),project:c?null:ie.project},ae=k.find(A=>A.id===he.sprint&&A.state!=="closed")?.id??null;let we;t[24]!==le||t[25]!==pe||t[26]!==Se||t[27]!==de?(we={groupBy:le,subgroupBy:de,onGroupByChange:pe,onSubgroupByChange:Se},t[24]=le,t[25]=pe,t[26]=Se,t[27]=de,t[28]=we):we=t[28];const ce=we;let xe;t[29]!==ge||t[30]!==ye||t[31]!==Be||t[32]!==oe?(xe={sortBy:Be,sortDirection:oe,onSortByChange:ge,onSortDirectionChange:ye},t[29]=ge,t[30]=ye,t[31]=Be,t[32]=oe,t[33]=xe):xe=t[33];const be=xe;let ue;t[34]===Symbol.for("react.memo_cache_sentinel")?(ue=new Map,t[34]=ue):ue=t[34];const[ze,Q]=W.useState(ue),fe=No(m,N);let Oe;t[35]!==fe?(Oe=uo(fe),t[35]=fe,t[36]=Oe):Oe=t[36];const Ge=Oe,Ue=d?{repo:bu(d),virtualMcpId:d.id}:rl(he.project?Ua(he.project,fe)??null:null),[Y]=Ni(),te=rc();let me;t[37]===Symbol.for("react.memo_cache_sentinel")?(me=new Set,t[37]=me):me=t[37];const[Ce,ke]=W.useState(me);let Fe;t[38]===Symbol.for("react.memo_cache_sentinel")?(Fe=A=>ke(J=>{const Ee=new Set(J);return Ee.has(A)?Ee.delete(A):Ee.add(A),Ee}),t[38]=Fe):Fe=t[38];const st=Fe,nt=A=>ke(J=>{const Ee=new Set(J);for(const Xe of Re)Xe.status===A&&Ee.add(Xe.id);return Ee}),De=()=>ke(new Set),Ve=A=>{ne(A),De()},[$e,Ze]=W.useState(!1),[wt,at]=W.useState(null);od();const{setTaskId:ut}=Uu(),{create:Te}=qu(),He=Qt(),Le=bi();let Ye;t[39]!==Le||t[40]!==s.slug||t[41]!==d?(Ye=()=>{if(d){Le({to:"/$org/projects/$agentId/settings",params:{org:s.slug,agentId:d.id}});return}Le({to:"/$org/settings/task-board",params:{org:s.slug}})},t[39]=Le,t[40]=s.slug,t[41]=d,t[42]=Ye):Ye=t[42];const Xt=Ye;let jt;t[43]!==d||t[44]!==e?(jt=d?e("taskBoard.taskFilters.projectSettingsLabel"):void 0,t[43]=d,t[44]=e,t[45]=jt):jt=t[45];const Zt=jt;let bt;t[46]===Symbol.for("react.memo_cache_sentinel")?(bt={strict:!1},t[46]=bt):bt=t[46];const{taskKey:Jt}=cl(bt),it=Jt,Dt=kp,ve=$d(i,it)??null,zt=!!it&&!ve&&!p&&!o,rt=ve?pi(s.slug,ve):null;let kt;t[47]!==Le||t[48]!==it?(kt=()=>{it&&Le({to:".",...Dt(void 0),replace:!0})},t[47]=Le,t[48]=it,t[49]=kt):kt=t[49];const gt=kt;let yt;t[50]!==b.link||t[51]!==Te||t[52]!==l||t[53]!==s.id||t[54]!==ut||t[55]!==He?(yt=async A=>{const J=crypto.randomUUID(),Ee=$c(s.id).id,Xe=await He.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:A.id}).then(bp).catch(jp),Rt=Pm(A,Xe),ts={type:"doc",content:[{type:"paragraph",content:[Pu({id:A.id,name:A.title,char:"@",kind:"task",metadata:{title:A.title,description:A.description,context:Rt}}),{type:"text",text:" "}]}]};Gu(sessionStorage,l,J,ts);try{await Te({id:J,virtual_mcp_id:Ee}),await b.link.mutateAsync({id:A.id,linkThreadId:J})}catch{}ut(J,Ee)},t[50]=b.link,t[51]=Te,t[52]=l,t[53]=s.id,t[54]=ut,t[55]=He,t[56]=yt):yt=t[56];const ft=yt,Re=m.filter(A=>Di(A,he,fe)),_e=F2(Ce,Re),mt=qm(le,de),je=mt.includes("status")?Re:Re.filter(A=>!Zr.includes(A.status)||Ld(A.status,Y.taskBoardLaneVisibility)),Tt=Be===null?je:Ym(je,Be,oe,{memberNames:new Map(G.map(xp)),superAgentName:e("taskBoard.taskFilters.assigneeSuperAgent"),index:fe}),Pe=A=>{const J=vu(A,he.project,fe);J!==he.project&&ne({...he,project:J})};let pt;t[57]===Symbol.for("react.memo_cache_sentinel")?(pt=()=>{at(null),Ze(!0)},t[57]=pt):pt=t[57];const Ot=pt;let vt;t[58]===Symbol.for("react.memo_cache_sentinel")?(vt=A=>{at(A),Ze(!0)},t[58]=vt):vt=t[58];const Nt=vt;let ds;t[59]!==Le||t[60]!==s.slug?(ds=A=>{Le({to:".",...Dt(pi(s.slug,A))})},t[59]=Le,t[60]=s.slug,t[61]=ds):ds=t[61];const es=ds;let us;t[62]!==e?(us=A=>Qe.error(A instanceof Error&&A.message?A.message:e("taskBoard.taskBoard.actionError")),t[62]=e,t[63]=us):us=t[63];const $t=us;let fs;t[64]!==b.update?(fs=(A,J)=>b.update.mutate({id:A,status:J}),t[64]=b.update,t[65]=fs):fs=t[65];let _s,ms;t[66]!==b.update||t[67]!==$t?(_s=(A,J)=>b.update.mutate({id:A,parentId:J},{onError:$t}),ms=(A,J)=>b.update.mutate({id:A,isEpic:J},{onError:$t}),t[66]=b.update,t[67]=$t,t[68]=_s,t[69]=ms):(_s=t[68],ms=t[69]);let Is;t[70]!==Le?(Is=()=>{const A=Dt(void 0);Le({to:".",params:A.params,search:J=>({...A.search(J),view:"epics"})})},t[70]=Le,t[71]=Is):Is=t[71];let _t;t[72]!==b.create||t[73]!==$t?(_t=(A,J)=>b.create.mutateAsync({title:J,status:"todo",repo:A.repo,virtualMcpId:A.virtualMcpId,parentId:A.id}).catch($t),t[72]=b.create,t[73]=$t,t[74]=_t):_t=t[74];const nn={items:m,memberByUserId:P,onSetStatus:fs,orgSlug:s.slug,setParent:_s,setEpic:ms,onOpen:es,onShowEpics:Is,onCreateChild:_t},an=()=>b.create.mutateAsync({title:e("taskBoard.epics.newEpicTitle"),status:"todo",isEpic:!0,...Ue}).then(A=>{const{item:J}=A;return es(J)},$t);let ps;t[75]===Symbol.for("react.memo_cache_sentinel")?(ps=()=>{Ze(!1),at(null)},t[75]=ps):ps=t[75];const ht=ps;if(p&&m.length===0){let A;return t[76]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(xt,{className:"size-5 text-muted-foreground"})}),t[76]=A):A=t[76],A}if(zt){let A;return t[77]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Zi,{to:".",...Dt(void 0),replace:!0}),t[77]=A):A=t[77],A}if(rt&&rt!==it)return n.jsx(Zi,{to:".",...Dt(rt),replace:!0});let gs;t[78]!==e?(gs=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.feedView")}),t[78]=e,t[79]=gs):gs=t[79];let Lt;t[80]!==e?(Lt=e("common.taskBoard.feedView"),t[80]=e,t[81]=Lt):Lt=t[81];const As=F==="board";let lt;t[82]!==e?(lt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.boardView")}),t[82]=e,t[83]=lt):lt=t[83];let Ft;t[84]!==q?(Ft=()=>q("board"),t[84]=q,t[85]=Ft):Ft=t[85];let Je;t[86]!==e?(Je=e("common.taskBoard.boardView"),t[86]=e,t[87]=Je):Je=t[87];let hs;t[88]!==As||t[89]!==lt||t[90]!==Ft||t[91]!==Je?(hs=n.jsx(Ss.Tab,{active:As,"aria-label":lt,onClick:Ft,children:Je}),t[88]=As,t[89]=lt,t[90]=Ft,t[91]=Je,t[92]=hs):hs=t[92];let Pt;t[93]!==e?(Pt=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("common.taskBoard.listView")}),t[93]=e,t[94]=Pt):Pt=t[94];let xs;t[95]!==e?(xs=e("common.taskBoard.listView"),t[95]=e,t[96]=xs):xs=t[96];let zs;t[97]!==e?(zs=e("taskBoard.taskBoard.layoutViewAriaLabel",{label:e("taskBoard.epics.tab")}),t[97]=e,t[98]=zs):zs=t[98];let Mt;t[99]!==e?(Mt=e("taskBoard.epics.tab"),t[99]=e,t[100]=Mt):Mt=t[100];const $s=n.jsxs(Ss.Tabs,{children:[n.jsx(Ss.Tab,{active:F==="feed","aria-label":gs,onClick:()=>{q("feed"),De()},children:Lt}),hs,n.jsx(Ss.Tab,{active:F==="list","aria-label":Pt,onClick:()=>{q("list"),De()},children:xs}),n.jsx(Ss.Tab,{active:F==="epics","aria-label":zs,onClick:()=>{q("epics"),De()},children:Mt})]}),js=A=>n.jsx(og,{item:A,assignee:A.assigneeId?P.get(A.assigneeId):void 0,assignedBy:A.assignedBy?P.get(A.assignedBy):void 0,members:G,onOpen:()=>es(A),onStatusChange:J=>b.update.mutate({id:A.id,status:J}),onRename:J=>b.update.mutate({id:A.id,title:J}),onPriorityChange:J=>b.update.mutate({id:A.id,priority:J}),onTagsChange:J=>b.update.mutate({id:A.id,tagIds:J}),onDueDateChange:J=>b.update.mutate({id:A.id,dueDate:J}),onAssign:J=>{C(J)||b.update.mutate({id:A.id,assigneeId:J},{onError:T})}},A.id);let Kt;t[101]===Symbol.for("react.memo_cache_sentinel")?(Kt=n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 sm:px-8",children:n.jsx(n1,{})}),t[101]=Kt):Kt=t[101];let Ut;t[102]!==ce||t[103]!==F||t[104]!==be?(Ut=F==="list"?{grouping:ce,sorting:be}:void 0,t[102]=ce,t[103]=F,t[104]=be,t[105]=Ut):Ut=t[105];const ln=n.jsxs(n.Fragment,{children:[!ve&&n.jsxs(n.Fragment,{children:[n.jsx(Ss.Title,{children:e("sidebar.navDestinations.spineTasks")}),n.jsxs(Ss.Actions,{secondary:n.jsxs(n.Fragment,{children:[n.jsx(x1,{sprints:k,value:he.sprint,onChange:A=>Ve({...he,sprint:A})}),m.length>0&&F!=="epics"&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(fd,{value:he.search,onChange:A=>Ve({...he,search:A}),label:e("taskBoard.taskFilters.searchLabel"),placeholder:e("taskBoard.taskFilters.searchPlaceholder"),clearLabel:e("taskBoard.taskFilters.searchClearLabel")}),n.jsx(N2,{filters:he,items:m,members:G,tags:x,sprints:k,index:fe,scoped:c!==null,onChange:Ve}),n.jsx("div",{className:"contents max-md:hidden",children:F==="list"?n.jsxs(n.Fragment,{children:[n.jsx(S2,{...ce}),n.jsx(w2,{...be})]}):n.jsx(B2,{all:ws,hidden:te.hidden,onToggle:te.setLaneShown})})]})}),n.jsx(A2,{onClick:Xt,label:Zt})]}),children:[n.jsx(a1,{}),n.jsx(r1,{isDemoBoard:a.length>0}),n.jsx(i1,{project:c}),F==="epics"?n.jsxs(re,{size:"sm",onClick:an,children:[n.jsx(is,{size:16}),e("taskBoard.epics.newEpic")]}):n.jsxs(re,{size:"sm",onClick:Ot,children:[n.jsx(is,{size:16}),n.jsx("span",{className:"max-md:sr-only",children:e("taskBoard.taskBoard.newTask")})]})]}),n.jsx(Ji.Toolbar.Left.Portal,{children:$s}),n.jsx(Ji.Toolbar.Right.Portal,{children:n.jsx(Kp,{items:m,onOpen:es})})]}),Kt,n.jsx(I2,{filters:he,items:m,members:G,tags:x,sprints:k,index:fe,onChange:Ve,view:Ut}),m.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"surface px-4 py-12 text-center text-sm text-muted-foreground",children:e("taskBoard.taskBoard.noTasksYet")})}):Re.length===0?n.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:n.jsxs("div",{className:"flex flex-col items-center gap-3 surface px-4 py-12 text-center text-sm text-muted-foreground",children:[e("taskBoard.taskBoard.noTasksMatch"),n.jsx(re,{variant:"outline",size:"sm",onClick:()=>Ve(Qr),children:e("taskBoard.taskBoard.clearFilters")})]})}):F==="feed"?n.jsx(Jp,{items:Tt,index:fe,memberByUserId:P,onCompose:A=>b.create.mutate({...A,...d?Ue:{}}),onOpen:es}):F==="epics"?n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto w-full max-w-[960px]",children:n.jsx(z1,{})})}):F==="board"?n.jsx(Tp,{visible:!ve,items:D1(Re,m),members:G,memberByUserId:P,selectedIds:_e,onToggleSelect:st,onSelectAllInLane:nt,onOpen:es,onCreate:Nt,onMove:(A,J,Ee,Xe,Rt)=>{const ts=gi(Ee,A.length);A.forEach((Ht,Za)=>b.update.mutate({id:Ht,status:J,sortOrder:ts[Za],...Xe.has(Ht)&&{priority:Xe.get(Ht)}},{onSettled:()=>Rt(Ht)}))},onAssign:(A,J)=>{C(J)||b.update.mutate({id:A,assigneeId:J},{onError:T})},onPriorityChange:(A,J)=>b.update.mutate({id:A,priority:J}),onTypeChange:(A,J)=>b.update.mutate({id:A,type:J}),onDueDateChange:(A,J)=>b.update.mutate({id:A,dueDate:J}),onAutoFix:A=>{C(Ie)||b.update.mutate({id:A.id,assigneeId:Ie},{onError:T})},onRerun:A=>E([A])}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-16 px-4 pt-6 sm:px-8",children:n.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-2",children:le===null?Tt.map(js):n.jsx(dc,{groups:Lo(Tt,mt,{memberIds:G.map(hp),tagIds:x.map(gp),index:fe}),depth:0,toggled:ze,onToggle:(A,J,Ee)=>Q(Xe=>Vm(Xe,A,J,Ee)),renderRow:js,heading:{memberByUserId:P,orgTags:x,index:fe}})})})]}),Rs=$e?`new-${wt??"default"}`:"closed",Es=wt??void 0;let qt;t[106]!==b.create||t[107]!==C||t[108]!==ht||t[109]!==Pe?(qt=A=>{if(C(A.assigneeId)){ht();return}b.create.mutate(A),Pe(A),ht()},t[106]=b.create,t[107]=C,t[108]=ht,t[109]=Pe,t[110]=qt):qt=t[110];let bs;t[111]!==b.create.isPending||t[112]!==Ue||t[113]!==ae||t[114]!==ht||t[115]!==$e||t[116]!==Rs||t[117]!==Es||t[118]!==qt?(bs=n.jsx(em,{open:$e,onClose:ht,defaultStatus:Es,defaultProject:Ue,defaultSprintId:ae,isSaving:b.create.isPending,onSubmit:qt},Rs),t[111]=b.create.isPending,t[112]=Ue,t[113]=ae,t[114]=ht,t[115]=$e,t[116]=Rs,t[117]=Es,t[118]=qt,t[119]=bs):bs=t[119];let Gt;t[120]!==B?(Gt=n.jsx(yd,{mode:"link",open:B,onOpenChange:w}),t[120]=B,t[121]=Gt):Gt=t[121];let Os;t[122]===Symbol.for("react.memo_cache_sentinel")?(Os=A=>!A&&E([]),t[122]=Os):Os=t[122];let Vt;t[123]!==b.rerun.isPending||t[124]!==O||t[125]!==$?(Vt=n.jsx(Em,{items:$,pending:b.rerun.isPending,onOpenChange:Os,onConfirm:O}),t[123]=b.rerun.isPending,t[124]=O,t[125]=$,t[126]=Vt):Vt=t[126];let Ls;t[127]!==b.removeMany||t[128]!==b.update||t[129]!==C||t[130]!==De||t[131]!==m||t[132]!==G||t[133]!==T||t[134]!==ve||t[135]!==Ge||t[136]!==_e?(Ls=_e.size>0&&!ve&&n.jsx(Bp,{count:_e.size,members:G,projectEntries:Ge,onSetProject:A=>{for(const J of _e)b.update.mutate({id:J,...A});De()},onMoveTo:A=>{for(const J of _e)b.update.mutate({id:J,status:A});De()},onSetSprint:A=>{for(const J of _e)b.update.mutate({id:J,sprintId:A});De()},onSetPriority:A=>{for(const J of _e)b.update.mutate({id:J,priority:A});De()},onAddTag:A=>{for(const J of _e){const Ee=m.find(Rt=>Rt.id===J);if(!Ee)continue;const Xe=Ee.tags.map(mp);Xe.includes(A)||b.update.mutate({id:J,tagIds:[...Xe,A]})}De()},onAssign:A=>{if(!C(A)){for(const J of _e)b.update.mutate({id:J,assigneeId:A},{onError:T});De()}},onSetDueDate:A=>{const J=Hi(A);for(const Ee of _e)b.update.mutate({id:Ee,dueDate:J});De()},onAutoFix:_e.size>0&&Array.from(_e).every(A=>{const J=m.find(Ee=>Ee.id===A);return J&&(J.status==="triage"||J.status==="todo")&&J.assigneeId!==Ie})?()=>{if(!C(Ie)){for(const A of _e)b.update.mutate({id:A,assigneeId:Ie},{onError:T});De()}}:void 0,onRerun:(()=>{const A=Array.from(_e).flatMap(J=>{const Ee=m.find(Xe=>Xe.id===J);return Ee?[Ee]:[]});return A.length===_e.size&&A.every(fp)?()=>E(A):void 0})(),onDelete:()=>{b.removeMany.mutate(Array.from(_e)),De()},onClear:De}),t[127]=b.removeMany,t[128]=b.update,t[129]=C,t[130]=De,t[131]=m,t[132]=G,t[133]=T,t[134]=ve,t[135]=Ge,t[136]=_e,t[137]=Ls):Ls=t[137];const Xa=n.jsxs("div",{ref:z,className:"relative flex min-h-0 flex-1 flex-col",children:[n.jsx("div",{className:K("flex min-h-0 flex-1 flex-col",ve&&"hidden"),children:ln}),ve&&n.jsx(tm,{item:ve,onClose:()=>gt(),isSaving:b.update.isPending,onSetSprint:A=>b.update.mutate({id:ve.id,sprintId:A},{onError:T}),onSubmit:A=>{if(C(A.assigneeId)){gt();return}b.update.mutate({id:ve.id,...A},{onError:T})},onDelete:()=>{b.remove.mutate(ve.id),gt()},onClone:()=>{b.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:ve.title}),description:ve.description,status:ve.status,priority:ve.priority,repo:ve.repo,virtualMcpId:ve.virtualMcpId,dueDate:ve.dueDate,tagIds:ve.tags.map(pp),sprintId:k.find(A=>A.id===ve.sprintId&&A.state!=="closed")?.id??null}),Pe(ve),Qe.success(e("taskBoard.taskDialog.cloneSuccess")),gt()},onArchive:()=>{b.update.mutate({id:ve.id,status:"archived"}),Qe.success(e("taskBoard.taskDialog.archiveSuccess")),gt()},onNewChat:()=>{ft(ve)},onAutoFix:()=>{C(Ie)||(b.update.mutate({id:ve.id,assigneeId:Ie},{onError:T}),gt())},onRerun:()=>{gt(),E([ve])},onOpenPreview:a.includes(ve.id)?void 0:A=>{A.virtualMcpId&&ut(A.threadId,A.virtualMcpId,{panel:"site-editor"})}},ve.id),bs,Gt,Vt,Ls]});return n.jsx(T1,{value:nn,children:Xa})}function fp(t){return t.assigneeId===Ie&&t.status!=="done"}function mp(t){return t.id}function pp(t){return t.id}function gp(t){return t.id}function hp(t){return t.userId}function xp(t){return[t.userId,t.user?.name??t.userId]}function jp(){return[]}function bp(t){return t.prs}function kp(t){return{params:e=>({...e,taskKey:t}),search:yp}}function yp(t){return t}function vp(t){return[t.userId,t]}function Np(t){return t.path}function Sp(t){return t.usable}function Bp(t){const e=R.c(124),{count:s,members:l,projectEntries:i,onSetProject:a,onMoveTo:r,onSetSprint:o,onSetPriority:c,onAddTag:d,onAssign:u,onSetDueDate:f,onAutoFix:m,onRerun:p,onDelete:h,onClear:j}=t,x=X(),{data:k}=El();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const y=b,g=Ll();let v,N,B,w,D,C,S,T,_,z;if(e[2]!==s||e[3]!==r||e[4]!==o||e[5]!==x||e[6]!==g){const ce=g.filter(Cp);w="pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",z="pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 shadow-edge";let xe;e[17]!==s||e[18]!==x?(xe=x("taskBoard.taskBoard.selectedCount",{count:s}),e[17]=s,e[18]=x,e[19]=xe):xe=e[19],e[20]!==xe?(B=n.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:xe}),e[20]=xe,e[21]=B):B=e[21],N=Me;let be;e[22]!==x?(be=x("taskBoard.taskBoard.actionsButton"),e[22]=x,e[23]=be):be=e[23],e[24]!==be?(_=n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"outline",size:"sm",children:be})}),e[24]=be,e[25]=_):_=e[25],v=qe,D="center",C="top";let ue;e[26]!==x?(ue=x("taskBoard.taskBoard.moveToButton"),e[26]=x,e[27]=ue):ue=e[27];let ze;e[28]!==ue?(ze=n.jsx(vs,{children:ue}),e[28]=ue,e[29]=ze):ze=e[29];let Q;e[30]!==r||e[31]!==x?(Q=ws.map(Oe=>n.jsx(Ne,{onClick:()=>r(Oe),children:dt(Oe,x).label},Oe)),e[30]=r,e[31]=x,e[32]=Q):Q=e[32];let fe;e[33]!==Q?(fe=n.jsx(Ns,{children:Q}),e[33]=Q,e[34]=fe):fe=e[34],e[35]!==ze||e[36]!==fe?(S=n.jsxs(ys,{children:[ze,fe]}),e[35]=ze,e[36]=fe,e[37]=S):S=e[37],T=ce.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.sprints.moveToSprint")}),n.jsxs(Ns,{className:"w-56",children:[n.jsxs(Ne,{onClick:()=>o(null),children:[n.jsx(dl,{size:14,className:"text-muted-foreground"}),x("taskBoard.sprints.backlog")]}),ce.map(Oe=>n.jsxs(Ne,{onClick:()=>o(Oe.id),children:[n.jsx(Wt,{size:14,className:"text-muted-foreground"}),n.jsx("span",{className:"truncate",children:ol(Oe,x)})]},Oe.id))]})]}),e[2]=s,e[3]=r,e[4]=o,e[5]=x,e[6]=g,e[7]=v,e[8]=N,e[9]=B,e[10]=w,e[11]=D,e[12]=C,e[13]=S,e[14]=T,e[15]=_,e[16]=z}else v=e[7],N=e[8],B=e[9],w=e[10],D=e[11],C=e[12],S=e[13],T=e[14],_=e[15],z=e[16];let I;e[38]!==x?(I=x("taskBoard.taskBoard.changePriorityButton"),e[38]=x,e[39]=I):I=e[39];let $;e[40]!==I?($=n.jsx(vs,{children:I}),e[40]=I,e[41]=$):$=e[41];let E;e[42]!==c||e[43]!==x?(E=Ts.map(ce=>n.jsxs(Ne,{onClick:()=>c(ce),children:[n.jsx("span",{className:K("size-2 rounded-full",et[ce].dotClassName)}),x(et[ce].labelKey)]},ce)),e[42]=c,e[43]=x,e[44]=E):E=e[44];let O;e[45]!==E?(O=n.jsx(Ns,{children:E}),e[45]=E,e[46]=O):O=e[46];let L;e[47]!==$||e[48]!==O?(L=n.jsxs(ys,{children:[$,O]}),e[47]=$,e[48]=O,e[49]=L):L=e[49];let U;e[50]!==x?(U=x("taskBoard.taskBoard.assignButton"),e[50]=x,e[51]=U):U=e[51];let G;e[52]!==U?(G=n.jsx(vs,{children:U}),e[52]=U,e[53]=G):G=e[53];let P;e[54]!==l||e[55]!==u?(P=n.jsx(Ns,{className:"w-56 p-0",children:n.jsx(qi,{members:l,onSelect:u})}),e[54]=l,e[55]=u,e[56]=P):P=e[56];let Z;e[57]!==G||e[58]!==P?(Z=n.jsxs(ys,{children:[G,P]}),e[57]=G,e[58]=P,e[59]=Z):Z=e[59];let H;e[60]!==a||e[61]!==i||e[62]!==x?(H=i.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.taskBoard.assignProjectButton")}),n.jsxs(Ns,{className:"w-64",children:[n.jsx(Ne,{onClick:()=>a(rl(null)),children:x("taskBoard.taskDialog.noProject")}),i.map(ce=>n.jsx(Ne,{className:"gap-2",onClick:()=>a(rl(ce)),children:n.jsx(Bo,{entry:ce})},ce.id))]})]}),e[60]=a,e[61]=i,e[62]=x,e[63]=H):H=e[63];let se;e[64]!==x?(se=x("taskBoard.taskBoard.dueDateButton"),e[64]=x,e[65]=se):se=e[65];let V;e[66]!==se?(V=n.jsx(vs,{children:se}),e[66]=se,e[67]=V):V=e[67];let ee;e[68]!==f?(ee=n.jsx(Ns,{className:"w-auto p-0",children:n.jsx($i,{mode:"single",onSelect:ce=>ce&&f(ce),initialFocus:!0})}),e[68]=f,e[69]=ee):ee=e[69];let ie;e[70]!==V||e[71]!==ee?(ie=n.jsxs(ys,{children:[V,ee]}),e[70]=V,e[71]=ee,e[72]=ie):ie=e[72];let ne;e[73]!==d||e[74]!==y||e[75]!==x?(ne=y.length>0&&n.jsxs(ys,{children:[n.jsx(vs,{children:x("taskBoard.taskBoard.addTagButton")}),n.jsx(Ns,{children:y.map(ce=>n.jsxs(Ne,{onClick:()=>d(ce.id),children:[n.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:en(ce.color)}}),ce.name]},ce.id))})]}),e[73]=d,e[74]=y,e[75]=x,e[76]=ne):ne=e[76];let F;e[77]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(sl,{}),e[77]=F):F=e[77];let q;e[78]!==x?(q=x("taskBoard.taskBoard.deleteSelectedButton"),e[78]=x,e[79]=q):q=e[79];let le;e[80]!==h||e[81]!==q?(le=n.jsx(Ne,{variant:"destructive",onClick:h,children:q}),e[80]=h,e[81]=q,e[82]=le):le=e[82];let de;e[83]!==v||e[84]!==L||e[85]!==Z||e[86]!==H||e[87]!==ie||e[88]!==ne||e[89]!==le||e[90]!==D||e[91]!==C||e[92]!==S||e[93]!==T?(de=n.jsxs(v,{align:D,side:C,children:[S,T,L,Z,H,ie,ne,F,le]}),e[83]=v,e[84]=L,e[85]=Z,e[86]=H,e[87]=ie,e[88]=ne,e[89]=le,e[90]=D,e[91]=C,e[92]=S,e[93]=T,e[94]=de):de=e[94];let pe;e[95]!==N||e[96]!==de||e[97]!==_?(pe=n.jsxs(N,{children:[_,de]}),e[95]=N,e[96]=de,e[97]=_,e[98]=pe):pe=e[98];let Se;e[99]!==m||e[100]!==x?(Se=m&&n.jsxs(re,{variant:"outline",size:"sm",onClick:m,children:[n.jsx(It,{className:"size-3.5"}),x("taskBoard.taskBoard.autoFix")]}),e[99]=m,e[100]=x,e[101]=Se):Se=e[101];let Be;e[102]!==p||e[103]!==x?(Be=p&&n.jsxs(re,{variant:"outline",size:"sm",onClick:p,children:[n.jsx(zl,{className:"size-3.5"}),x("taskBoard.taskBoard.rerun")]}),e[102]=p,e[103]=x,e[104]=Be):Be=e[104];let oe;e[105]!==x?(oe=x("taskBoard.taskBoard.clearSelectionButton"),e[105]=x,e[106]=oe):oe=e[106];let ge;e[107]!==x?(ge=x("taskBoard.taskBoard.clearSelectionButton"),e[107]=x,e[108]=ge):ge=e[108];let ye;e[109]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(il,{size:16}),e[109]=ye):ye=e[109];let he;e[110]!==j||e[111]!==oe||e[112]!==ge?(he=n.jsx(re,{variant:"ghost",size:"icon","aria-label":oe,title:ge,onClick:j,className:"shrink-0 text-muted-foreground",children:ye}),e[110]=j,e[111]=oe,e[112]=ge,e[113]=he):he=e[113];let ae;e[114]!==B||e[115]!==pe||e[116]!==Se||e[117]!==Be||e[118]!==he||e[119]!==z?(ae=n.jsxs("div",{className:z,children:[B,pe,Se,Be,he]}),e[114]=B,e[115]=pe,e[116]=Se,e[117]=Be,e[118]=he,e[119]=z,e[120]=ae):ae=e[120];let we;return e[121]!==w||e[122]!==ae?(we=n.jsx("div",{className:w,children:ae}),e[121]=w,e[122]=ae,e[123]=we):we=e[123],we}function Cp(t){return t.state!=="closed"}function wp(t,e){return t.sortOrder-e.sortOrder}function rc(){const t=R.c(8),[e,s]=Ni();let l;t[0]!==e.taskBoardLaneVisibility?(l=Fd(e.taskBoardLaneVisibility),t[0]=e.taskBoardLaneVisibility,t[1]=l):l=t[1];const{lanes:i,hidden:a}=l;let r;t[2]!==s?(r=(d,u)=>s(f=>({...f,taskBoardLaneVisibility:{...f.taskBoardLaneVisibility,[d]:u}})),t[2]=s,t[3]=r):r=t[3];const o=r;let c;return t[4]!==a||t[5]!==i||t[6]!==o?(c={lanes:i,hidden:a,setLaneShown:o},t[4]=a,t[5]=i,t[6]=o,t[7]=c):c=t[7],c}function _r(t,e){return Number(Qs(e))-Number(Qs(t))||wp(t,e)}function Dp(t){return t.startsWith(Ai)||t.startsWith(zi)}function Tp(t){const e=R.c(35),{items:s,members:l,memberByUserId:i,selectedIds:a,onToggleSelect:r,onSelectAllInLane:o,onOpen:c,onCreate:d,onMove:u,onAutoFix:f,onRerun:m,onAssign:p,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,visible:k}=t,[b,y]=W.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[v,N]=W.useState(g);let B;e[1]===Symbol.for("react.memo_cache_sentinel")?(B=new Map,e[1]=B):B=e[1];const[w,D]=W.useState(B),[C,S]=Ni(),T=W.useRef(null);let _;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=Y=>{if(T.current=Y,!Y)return;const te=me=>{if(me.deltaX!==0||me.deltaY===0||Y.scrollWidth<=Y.clientWidth||Y.scrollHeight>Y.clientHeight)return;for(let ke=me.target;ke&&ke!==Y;ke=ke.parentElement)if(ke.hasAttribute("data-lane-scroll"))return;me.preventDefault();const Ce=me.deltaMode===1?16:me.deltaMode===2?Y.clientWidth:1;Y.scrollLeft=Y.scrollLeft+me.deltaY*Ce};return Y.addEventListener("wheel",te,{passive:!1}),()=>{T.current=null,Y.removeEventListener("wheel",te)}},e[2]=_):_=e[2];const z=_,I=w.size>0?s.map(Y=>{const te=w.get(Y.id);return te?{...Y,...te}:Y}):s;if(w.size>0&&!b){const Y=[...w].filter(te=>{const[me,Ce]=te,ke=s.find(Fe=>Fe.id===me);return ke?.status===Ce.status&&ke.sortOrder===Ce.sortOrder&&(!Ce.priority||ke.priority===Ce.priority)});Y.length>0&&D(te=>{const me=new Map(te);for(const[Ce]of Y)me.delete(Ce);return me})}Fm(T,I.map(zp).join(","),b===null,k);const $=Y=>I.filter(te=>te.status===Y).sort(_r),{lanes:E,hidden:O,setLaneShown:L}=rc(),U=C.collapsedTaskBoardLanes,G=I.some(Qs);let P;if(e[3]!==E||e[4]!==U){let Y;e[6]!==U?(Y=te=>!U.includes(te),e[6]=U,e[7]=Y):Y=e[7],P=E.find(Y),e[3]=E,e[4]=U,e[5]=P}else P=e[5];const Z=P;let H;e[8]!==S?(H=Y=>S(te=>({...te,collapsedTaskBoardLanes:te.collapsedTaskBoardLanes.includes(Y)?te.collapsedTaskBoardLanes.filter(me=>me!==Y):[...te.collapsedTaskBoardLanes,Y]})),e[8]=S,e[9]=H):H=e[9];const se=H,V=Y=>qd({overId:Y,statusOf:te=>I.find(me=>me.id===te)?.status});let ee;e[10]!==a?(ee=Y=>a.has(Y)&&a.size>1?[Y,...Array.from(a).filter(te=>te!==Y)]:[Y],e[10]=a,e[11]=ee):ee=e[11];const ie=ee;let ne;e[12]!==s?(ne=(Y,te,me,Ce)=>{const ke=Ce===void 0?null:Ce,Fe=gi(me,Y.length);D(st=>{const nt=new Map(st);return Y.forEach((De,Ve)=>{const $e=s.find(wt=>wt.id===De),Ze=$e&&ke&&ai($e,ke);nt.set(De,{status:te,sortOrder:Fe[Ve],...Ze&&{priority:Ze}})}),nt})},e[12]=s,e[13]=ne):ne=e[13];const F=ne;let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q={activationConstraint:{distance:4}},e[14]=q):q=e[14];let le;e[15]===Symbol.for("react.memo_cache_sentinel")?(le={coordinateGetter:Vc},e[15]=le):le=e[15];const de=Pc(er(Kc,q),er(Mc,le)),pe=(Y,te,me)=>{const Ce=s.find(ke=>ke.id===te);return Ce?Gd({overId:Y,itemOf:ke=>I.find(Fe=>Fe.id===ke),fromStatus:Ce.status,toStatus:me,dragged:ie(te)}):null},Se=Y=>{const te=String(Y.active.id),me=V(Y.over?.id),Ce=I.find($e=>$e.id===te),ke=s.find($e=>$e.id===te);if(!me||!Ce||!ke)return;const Fe=pe(Y.over?.id,te,me),st=Fe&&ai(ke,Fe)||void 0;if(Ce.status===me&&w.get(te)?.priority===st)return;const nt=ie(te),De=String(Y.over?.id??""),Ve=$(me).filter($e=>!nt.includes($e.id));F(nt,me,rr(Ve,Dp(De)?null:De,te),Fe)},Be=Y=>{const te=String(Y.active.id);y(null);const me=V(Y.over?.id)??I.find(Te=>Te.id===te)?.status;if(!me){D(new Map);return}const Ce=ie(te),ke=$(me),Fe=String(Y.over?.id??""),st=ke.findIndex(Te=>Te.id===te),nt=Fe.startsWith(zi)?ke.filter(Te=>Qs(Te)&&Te.id!==te).length:Fe.startsWith(Ai)?ke.length-1:ke.findIndex(Te=>Te.id===Fe),De=st===-1||nt===-1?ke:Hc(ke,st,Math.min(nt,ke.length-1)),Ve=pe(Y.over?.id,te,me),$e=new Map;for(const Te of Ce){const He=s.find(Ye=>Ye.id===Te),Le=He&&Ve&&ai(He,Ve);Le&&$e.set(Te,Le)}const Ze=s.filter(Te=>Te.status===me).sort(_r).map(Ap).join();if($e.size===0&&Ze===De.map(Ip).join()){D(new Map);return}const wt=De.slice(De.findIndex(Te=>Te.id===te)+1).find(Te=>!Ce.includes(Te.id)),at=rr(ke.filter(Te=>!Ce.includes(Te.id)),wt?.id??null,te);F(Ce,me,at,Ve),N(Ce);const ut=new Map(gi(at,Ce.length).map((Te,He)=>[Ce[He],Te]));u(Ce,me,at,$e,Te=>D(He=>{const Le=He.get(Te);if(!Le||Le.status!==me||Le.sortOrder!==ut.get(Te))return He;const Ye=new Map(He);return Ye.delete(Te),Ye}))},oe=b?I.find(Y=>Y.id===b):null,ge=b?ie(b):[],ye=Y=>ge.length>0&&ge.every(te=>{const me=s.find(Ce=>Ce.id===te);return!!me&&!me.assigneeId&&me.status!==Y});let he;e[16]===Symbol.for("react.memo_cache_sentinel")?(he=Y=>{y(String(Y.active.id)),N([])},e[16]=he):he=e[16];let ae;e[17]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{y(null),D(new Map)},e[17]=ae):ae=e[17];let we;e[18]===Symbol.for("react.memo_cache_sentinel")?(we=K("mx-auto grid w-full max-w-[1680px]","min-h-full grid-rows-[auto_auto_1fr] gap-x-3 pb-6","px-4 pt-6 sm:px-8"),e[18]=we):we=e[18];const ce=O.length>0;let xe;e[19]!==E||e[20]!==U||e[21]!==ce?(xe=Pd({lanes:E,collapsed:U,hasHiddenTail:ce}),e[19]=E,e[20]=U,e[21]=ce,e[22]=xe):xe=e[22];let be;e[23]!==xe?(be={gridTemplateColumns:xe},e[23]=xe,e[24]=be):be=e[24];let ue;e[25]!==O||e[26]!==$||e[27]!==L?(ue=O.length>0&&n.jsx($p,{statuses:O,countOf:Y=>$(Y).length,onShow:Y=>L(Y,!0)}),e[25]=O,e[26]=$,e[27]=L,e[28]=ue):ue=e[28];const ze=Ac.createPortal,Q=Uc,fe=null,Oe=oe&&n.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[n.jsx(cc,{item:oe,assignee:oe.assigneeId?i.get(oe.assigneeId):void 0,assignedBy:oe.assignedBy?i.get(oe.assignedBy):void 0,selected:a.has(oe.id),onOpen:_p,className:"w-full shadow-lift"}),ge.length>1&&n.jsx("span",{className:"absolute -top-2 -right-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-foreground px-1.5 text-2xs font-semibold text-background",children:ge.length})]});let Ge;e[29]!==Q||e[30]!==Oe?(Ge=n.jsx(Q,{dropAnimation:fe,children:Oe}),e[29]=Q,e[30]=Oe,e[31]=Ge):Ge=e[31];let Ue;return e[32]!==ze||e[33]!==Ge?(Ue=ze(Ge,document.body),e[32]=ze,e[33]=Ge,e[34]=Ue):Ue=e[34],n.jsxs(qc,{sensors:de,collisionDetection:Md,onDragStart:he,onDragOver:Se,onDragEnd:Be,onDragCancel:ae,children:[n.jsx("div",{ref:z,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:n.jsxs("div",{className:we,style:be,children:[E.map(Y=>n.jsx(Rp,{status:Y,items:$(Y),members:l,memberByUserId:i,selectedIds:a,isTarget:oe?.status===Y,firesOnDrop:oe?.status===Y&&ye(Y),draggedCount:ge.length,hiddenIds:ge,landedIds:v,onToggleSelect:r,onSelectAllInLane:o,onOpen:c,onCreate:d,onAutoFix:f,onRerun:m,onAssign:p,onPriorityChange:h,onTypeChange:j,onDueDateChange:x,onHide:E.length>1?()=>L(Y,!1):void 0,collapsed:U.includes(Y),onToggleCollapsed:()=>se(Y),labelled:Y===Z,anyCritical:G},Y)),ue]})}),Ue]})}function _p(){}function Ip(t){return t.id}function Ap(t){return t.id}function zp(t){return`${t.id}:${t.status}`}function $p(t){const e=R.c(19),{statuses:s,countOf:l,onShow:i}=t,a=X();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Va,{size:14,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=r):r=e[0];let o;e[1]!==a?(o=a("taskBoard.taskBoard.hiddenColumns"),e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[r,o]}),e[3]=o,e[4]=c):c=e[4];let d;if(e[5]!==l||e[6]!==i||e[7]!==s||e[8]!==a){let m;e[10]!==l||e[11]!==i||e[12]!==a?(m=p=>{const{label:h,visual:j}=dt(p,a),x=j.icon;return n.jsxs("div",{"data-hidden-lane":p,className:"surface flex items-center gap-2 px-3 py-2.5",children:[n.jsx(x,{size:15,className:K("shrink-0",j.iconClassName)}),n.jsx("span",{className:"text-sm font-medium text-foreground",children:h}),n.jsx("span",{className:"ml-auto text-2xs font-medium text-muted-foreground",children:l(p)}),n.jsxs(Me,{children:[n.jsx(Ke,{asChild:!0,children:n.jsx(re,{variant:"ghost",size:"icon-xs","aria-label":a("taskBoard.taskBoard.laneMenuAriaLabel",{lane:h}),className:"shrink-0 text-muted-foreground",children:n.jsx(Ys,{className:"size-3.75"})})}),n.jsx(qe,{align:"end",children:n.jsx(Ne,{onClick:()=>i(p),children:a("taskBoard.taskBoard.showColumn")})})]})]},p)},e[10]=l,e[11]=i,e[12]=a,e[13]=m):m=e[13],d=s.map(m),e[5]=l,e[6]=i,e[7]=s,e[8]=a,e[9]=d}else d=e[9];let u;e[14]!==d?(u=n.jsx("div",{className:"flex flex-col gap-2 px-1 pt-1",children:d}),e[14]=d,e[15]=u):u=e[15];let f;return e[16]!==c||e[17]!==u?(f=n.jsxs("details",{className:"group row-span-3 h-full min-w-0 py-1",children:[c,u]}),e[16]=c,e[17]=u,e[18]=f):f=e[18],f}function Rp(t){const e=R.c(155),{status:s,items:l,members:i,memberByUserId:a,selectedIds:r,isTarget:o,firesOnDrop:c,draggedCount:d,hiddenIds:u,landedIds:f,onToggleSelect:m,onSelectAllInLane:p,onOpen:h,onCreate:j,onAutoFix:x,onRerun:k,onAssign:b,onPriorityChange:y,onTypeChange:g,onDueDateChange:v,onHide:N,collapsed:B,onToggleCollapsed:w,labelled:D,anyCritical:C}=t,S=X(),{label:T,visual:_}=dt(s,S),z=_.icon,[I,$]=W.useState(!1),E=cd(s),O=dd(s).filter(Pp).map(Fp),L=c&&O.length>0,U=`${Ai}${s}`;let G;e[0]!==U?(G={id:U},e[0]=U,e[1]=G):G=e[1];const{setNodeRef:P}=tr(G);let Z;e[2]!==s?(Z=Ud(s),e[2]=s,e[3]=Z):Z=e[3];const H=Z,se=`${zi}${s}`,V=!H||!C;let ee;e[4]!==se||e[5]!==V?(ee={id:se,disabled:V},e[4]=se,e[5]=V,e[6]=ee):ee=e[6];const{setNodeRef:ie}=tr(ee),ne=l.filter(Qs),F=l.filter(Lp);let q;e[7]!==u||e[8]!==f||e[9]!==a||e[10]!==i||e[11]!==b||e[12]!==x||e[13]!==v||e[14]!==h||e[15]!==y||e[16]!==k||e[17]!==m||e[18]!==g||e[19]!==r?(q=Re=>n.jsx(qp,{item:Re,assignee:Re.assigneeId?a.get(Re.assigneeId):void 0,assignedBy:Re.assignedBy?a.get(Re.assignedBy):void 0,members:i,selected:r.has(Re.id),hidden:u.includes(Re.id),landed:f.includes(Re.id),onToggleSelect:()=>m(Re.id),onOpen:()=>h(Re),onAutoFix:x?()=>x(Re):void 0,onRerun:k?()=>k(Re):void 0,onAssign:b?_e=>b(Re.id,_e):void 0,onPriorityChange:y?_e=>y(Re.id,_e):void 0,onTypeChange:g?_e=>g(Re.id,_e):void 0,onDueDateChange:v?_e=>v(Re.id,_e):void 0},Re.id),e[7]=u,e[8]=f,e[9]=a,e[10]=i,e[11]=b,e[12]=x,e[13]=v,e[14]=h,e[15]=y,e[16]=k,e[17]=m,e[18]=g,e[19]=r,e[20]=q):q=e[20];const le=q;if(B){const Re=o?"bg-muted":"bg-muted/50";let _e;e[21]!==Re?(_e=K("flex w-full flex-col items-center gap-2 rounded-xl px-1 py-3 transition-colors",Re),e[21]=Re,e[22]=_e):_e=e[22];let mt;e[23]!==l.length?(mt=n.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:l.length}),e[23]=l.length,e[24]=mt):mt=e[24];let je;e[25]!==T||e[26]!==S?(je=S("taskBoard.taskBoard.expandColumnAriaLabel",{lane:T}),e[25]=T,e[26]=S,e[27]=je):je=e[27];let Tt;e[28]===Symbol.for("react.memo_cache_sentinel")?(Tt=n.jsx(Vu,{size:15}),e[28]=Tt):Tt=e[28];let Pe;e[29]!==w||e[30]!==je?(Pe=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":je,onClick:w,className:Ja,children:Tt})}),e[29]=w,e[30]=je,e[31]=Pe):Pe=e[31];let pt;e[32]!==S?(pt=S("taskBoard.taskBoard.expandColumn"),e[32]=S,e[33]=pt):pt=e[33];let Ot;e[34]!==pt?(Ot=n.jsx(Us,{side:"right",children:pt}),e[34]=pt,e[35]=Ot):Ot=e[35];let vt;return e[36]!==Pe||e[37]!==Ot?(vt=n.jsxs(Ms,{children:[Pe,Ot]}),e[36]=Pe,e[37]=Ot,e[38]=vt):vt=e[38],n.jsx("div",{ref:P,"data-lane":s,"data-lane-collapsed":"","data-drop-target":o||void 0,className:"group/lane row-span-3 flex h-full min-h-0 min-w-0 flex-col items-center py-1",children:n.jsxs("div",{className:_e,children:[n.jsx(z,{size:15,className:K("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{className:"text-sm font-medium text-foreground [writing-mode:vertical-rl]",children:T}),mt,vt]})})}const de=L?"bg-special/15 ring-1 ring-inset ring-special/30":o&&"bg-muted/50";let pe;e[39]!==de?(pe=K("group/lane min-h-0 min-w-0 rounded-xl py-1 transition-colors","row-span-3 grid grid-rows-subgrid max-md:flex max-md:flex-col",de),e[39]=de,e[40]=pe):pe=e[40];const Se=o?"bg-muted":"bg-background";let Be;e[41]!==Se?(Be=K("sticky top-0 z-10 flex min-w-0 flex-col transition-colors",Se),e[41]=Se,e[42]=Be):Be=e[42];let oe;e[43]!==l.length?(oe=n.jsx("span",{className:"rounded-md bg-muted px-1.5 text-2xs font-medium text-muted-foreground",children:l.length}),e[43]=l.length,e[44]=oe):oe=e[44];const ge=o?"from-muted from-70%":"from-background from-70%";let ye;e[45]!==ge?(ye=K("absolute inset-y-0 right-1 flex items-center gap-0.5 bg-linear-to-l to-transparent pl-8 opacity-0 transition-opacity group-hover/lane:opacity-100 group-data-[drop-target]/lane:opacity-100 focus-within:opacity-100 has-data-[state=open]:opacity-100",ge),e[45]=ge,e[46]=ye):ye=e[46];const he=E&&n.jsxs(Ms,{children:[n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":S("taskBoard.columnRules.menuItem"),onClick:()=>$(!0),className:Ja,children:n.jsx(ld,{size:13})})}),n.jsx(Us,{side:"bottom",className:"max-w-64",children:S(E)})]});let ae;e[47]!==T||e[48]!==S?(ae=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[47]=T,e[48]=S,e[49]=ae):ae=e[49];let we;e[50]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx(Ys,{size:15}),e[50]=we):we=e[50];let ce;e[51]!==ae?(ce=n.jsx(Ks,{asChild:!0,children:n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":ae,className:Ja,children:we})})}),e[51]=ae,e[52]=ce):ce=e[52];let xe;e[53]!==T||e[54]!==S?(xe=S("taskBoard.taskBoard.laneMenuAriaLabel",{lane:T}),e[53]=T,e[54]=S,e[55]=xe):xe=e[55];let be;e[56]!==xe?(be=n.jsx(Us,{side:"top",children:xe}),e[56]=xe,e[57]=be):be=e[57];let ue;e[58]!==ce||e[59]!==be?(ue=n.jsxs(Ms,{children:[ce,be]}),e[58]=ce,e[59]=be,e[60]=ue):ue=e[60];let ze;e[61]!==$?(ze=()=>$(!0),e[61]=$,e[62]=ze):ze=e[62];let Q;e[63]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(ni,{size:14}),e[63]=Q):Q=e[63];let fe;e[64]!==S?(fe=S("taskBoard.columnRules.menuItem"),e[64]=S,e[65]=fe):fe=e[65];let Oe;e[66]!==ze||e[67]!==fe?(Oe=n.jsxs(Ne,{onClick:ze,children:[Q,fe]}),e[66]=ze,e[67]=fe,e[68]=Oe):Oe=e[68];let Ge;e[69]!==p||e[70]!==s?(Ge=()=>p(s),e[69]=p,e[70]=s,e[71]=Ge):Ge=e[71];let Ue;e[72]!==S?(Ue=S("taskBoard.taskBoard.selectAllInLane"),e[72]=S,e[73]=Ue):Ue=e[73];let Y;e[74]!==Ge||e[75]!==Ue?(Y=n.jsx(Ne,{onClick:Ge,children:Ue}),e[74]=Ge,e[75]=Ue,e[76]=Y):Y=e[76];let te;e[77]!==N||e[78]!==S?(te=N&&n.jsx(Ne,{onClick:N,children:S("taskBoard.taskBoard.hideColumn")}),e[77]=N,e[78]=S,e[79]=te):te=e[79];let me;e[80]!==Oe||e[81]!==Y||e[82]!==te?(me=n.jsxs(qe,{align:"end",children:[Oe,Y,te]}),e[80]=Oe,e[81]=Y,e[82]=te,e[83]=me):me=e[83];let Ce;e[84]!==ue||e[85]!==me?(Ce=n.jsxs(Me,{children:[ue,me]}),e[84]=ue,e[85]=me,e[86]=Ce):Ce=e[86];let ke;e[87]!==T||e[88]!==S?(ke=S("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:T}),e[87]=T,e[88]=S,e[89]=ke):ke=e[89];let Fe;e[90]!==j||e[91]!==s?(Fe=()=>j(s),e[90]=j,e[91]=s,e[92]=Fe):Fe=e[92];let st;e[93]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(is,{size:15}),e[93]=st):st=e[93];let nt;e[94]!==ke||e[95]!==Fe?(nt=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":ke,onClick:Fe,className:Ja,children:st})}),e[94]=ke,e[95]=Fe,e[96]=nt):nt=e[96];let De;e[97]!==T||e[98]!==S?(De=S("taskBoard.taskBoard.newTaskInLaneTitle",{lane:T}),e[97]=T,e[98]=S,e[99]=De):De=e[99];let Ve;e[100]!==De?(Ve=n.jsx(Us,{side:"top",children:De}),e[100]=De,e[101]=Ve):Ve=e[101];let $e;e[102]!==nt||e[103]!==Ve?($e=n.jsxs(Ms,{children:[nt,Ve]}),e[102]=nt,e[103]=Ve,e[104]=$e):$e=e[104];let Ze;e[105]!==T||e[106]!==S?(Ze=S("taskBoard.taskBoard.collapseColumnAriaLabel",{lane:T}),e[105]=T,e[106]=S,e[107]=Ze):Ze=e[107];let wt;e[108]===Symbol.for("react.memo_cache_sentinel")?(wt=n.jsx(Hu,{size:15}),e[108]=wt):wt=e[108];let at;e[109]!==w||e[110]!==Ze?(at=n.jsx(Ks,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":Ze,onClick:w,className:Ja,children:wt})}),e[109]=w,e[110]=Ze,e[111]=at):at=e[111];let ut;e[112]!==S?(ut=S("taskBoard.taskBoard.collapseColumn"),e[112]=S,e[113]=ut):ut=e[113];let Te;e[114]!==ut?(Te=n.jsx(Us,{side:"top",children:ut}),e[114]=ut,e[115]=Te):Te=e[115];let He;e[116]!==at||e[117]!==Te?(He=n.jsxs(Ms,{children:[at,Te]}),e[116]=at,e[117]=Te,e[118]=He):He=e[118];let Le;e[119]!==ye||e[120]!==he||e[121]!==Ce||e[122]!==$e||e[123]!==He?(Le=n.jsxs("div",{className:ye,children:[he,Ce,$e,He]}),e[119]=ye,e[120]=he,e[121]=Ce,e[122]=$e,e[123]=He,e[124]=Le):Le=e[124];const Ye=C?n.jsxs("div",{className:K("flex min-h-0 min-w-0 flex-col gap-3 px-1 pt-4.5",!H&&"invisible"),children:[n.jsx(Ar,{visible:D,icon:Pr,iconClassName:"text-destructive",label:S("taskBoard.taskBoard.swimlaneCritical")}),n.jsx("div",{ref:ie,"data-lane-scroll":H?s:void 0,className:Ir,children:n.jsx(sr,{items:ne.map(Op),strategy:nr,children:ne.map(le)})})]}):n.jsx("div",{}),Xt=C?"pt-7":"pt-4.5";let jt;e[125]!==Xt?(jt=K("flex min-h-0 min-w-0 flex-col gap-3 px-1 pb-1",Xt),e[125]=Xt,e[126]=jt):jt=e[126];let Zt;e[127]!==S?(Zt=S("taskBoard.taskBoard.swimlaneImprovements"),e[127]=S,e[128]=Zt):Zt=e[128];let bt;e[129]!==D||e[130]!==Zt?(bt=n.jsx(Ar,{visible:D,icon:ni,iconClassName:"text-muted-foreground",label:Zt}),e[129]=D,e[130]=Zt,e[131]=bt):bt=e[131];let Jt;e[132]===Symbol.for("react.memo_cache_sentinel")?(Jt=K(Ir,"pb-16"),e[132]=Jt):Jt=e[132];const it=F.map(Ep),Dt=F.map(le);let ve;e[133]!==it||e[134]!==Dt?(ve=n.jsx(sr,{items:it,strategy:nr,children:Dt}),e[133]=it,e[134]=Dt,e[135]=ve):ve=e[135];let zt;e[136]!==P||e[137]!==s||e[138]!==ve?(zt=n.jsx("div",{ref:P,"data-lane-scroll":s,className:Jt,children:ve}),e[136]=P,e[137]=s,e[138]=ve,e[139]=zt):zt=e[139];let rt;e[140]!==jt||e[141]!==bt||e[142]!==zt?(rt=n.jsxs("div",{className:jt,children:[bt,zt]}),e[140]=jt,e[141]=bt,e[142]=zt,e[143]=rt):rt=e[143];let kt;e[144]!==Ye||e[145]!==rt?(kt=n.jsxs(n.Fragment,{children:[Ye,rt]}),e[144]=Ye,e[145]=rt,e[146]=kt):kt=e[146];const gt=ud,yt=_.iconClassName.replace(/\banimate-\S+\b/g,"").trim();let ft;return e[147]!==z||e[148]!==gt||e[149]!==T||e[150]!==I||e[151]!==$||e[152]!==s||e[153]!==yt?(ft=n.jsx(gt,{columnKey:s,label:T,icon:z,iconClassName:yt,open:I,onOpenChange:$}),e[147]=z,e[148]=gt,e[149]=T,e[150]=I,e[151]=$,e[152]=s,e[153]=yt,e[154]=ft):ft=e[154],n.jsxs("div",{"data-lane":s,"data-drop-target":o||void 0,className:pe,children:[n.jsxs("div",{className:Be,children:[n.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1.5",children:[n.jsx(z,{size:15,className:K("shrink-0",_.iconClassName.replace(/\banimate-\S+\b/g,"").trim())}),n.jsx("span",{title:T,className:"min-w-0 truncate text-sm font-medium text-foreground",children:T}),oe,Le]}),L&&n.jsxs("div",{role:"status",className:"mx-1 mb-1.5 flex items-center gap-2 rounded-lg border border-special/30 bg-background px-3 py-2 text-xs text-special",children:[n.jsx(ni,{size:14,className:"shrink-0"}),n.jsx("span",{children:S(d>1?"taskBoard.dropHint.pickUpMany":"taskBoard.dropHint.pickUp",{names:O.join(", ")})})]})]}),kt,ft]})}function Ep(t){return t.id}function Op(t){return t.id}function Lp(t){return!Qs(t)}function Fp(t){return t.name}function Pp(t){return t.active}const Ir="flex flex-1 flex-col gap-3 rounded-xl bg-muted/50 p-2";function Mp(t){const e=Date.parse(t);if(Number.isNaN(e))return"";const s=Math.max(0,Math.floor((Date.now()-e)/6e4));if(s<60)return`${s}m`;const l=Math.floor(s/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function Kp(t){const e=R.c(47),{items:s,onOpen:l}=t,i=X(),{org:a}=tt(),[r,o]=W.useState(!1);let c,d,u,f,m,p,h,j,x,k,b,y,g;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==a||e[4]!==i){m=Symbol.for("react.early_return_sentinel");e:{const w=Hr(s);if(w.length===0){m=null;break e}d=ns,y=r,g=o;let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(ct,{size:18}),e[18]=D):D=e[18];const C=n.jsx(Ka,{asChild:!0,variant:"brand",size:"control",children:n.jsxs("button",{type:"button",children:[D,w.length===1?i("taskBoard.taskBoard.agentsRunningOne"):i("taskBoard.taskBoard.agentsRunningMany",{count:w.length})]})});e[19]!==C?(f=n.jsx(ss,{asChild:!0,children:C}),e[19]=C,e[20]=f):f=e[20],c=as,h="w-[400px] p-0",j="end",x="bottom",k=Up;let S;e[21]!==i?(S=i("taskBoard.taskBoard.agentsRunningHeading"),e[21]=i,e[22]=S):S=e[22];let T;e[23]!==S?(T=n.jsx("span",{className:"text-sm font-medium text-foreground",children:S}),e[23]=S,e[24]=T):T=e[24],b=n.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3.5 pb-1.5",children:[T,n.jsx("span",{className:"text-sm tabular-nums text-muted-foreground",children:w.length})]}),u="flex max-h-[420px] flex-col overflow-y-auto p-1.5";let _;e[25]!==s||e[26]!==l||e[27]!==a||e[28]!==i?(_=z=>{const I=s.find(L=>L.id===z.taskId);if(!I)return null;const{label:$,visual:E}=dt(I.status,i),O=E.icon;return n.jsxs("button",{type:"button",onClick:()=>{o(!1),l(I)},className:"flex w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none transition-colors hover:bg-accent focus-visible:bg-accent",children:[n.jsx(xt,{className:"size-4 shrink-0 text-muted-foreground"}),n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[n.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:z.runTitle??z.taskTitle}),n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx(O,{size:13,className:K("shrink-0",E.iconClassName)}),n.jsx("span",{className:"shrink-0",children:$}),n.jsx("span",{"aria-hidden":!0,children:"·"}),n.jsx("span",{className:"truncate",children:z.runTitle&&z.runTitle!==z.taskTitle?z.taskTitle:tn(a.slug,I.keySeq)})]})]}),n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Mp(z.startedAt)})]},z.threadId)},e[25]=s,e[26]=l,e[27]=a,e[28]=i,e[29]=_):_=e[29],p=w.map(_)}e[0]=s,e[1]=l,e[2]=r,e[3]=a,e[4]=i,e[5]=c,e[6]=d,e[7]=u,e[8]=f,e[9]=m,e[10]=p,e[11]=h,e[12]=j,e[13]=x,e[14]=k,e[15]=b,e[16]=y,e[17]=g}else c=e[5],d=e[6],u=e[7],f=e[8],m=e[9],p=e[10],h=e[11],j=e[12],x=e[13],k=e[14],b=e[15],y=e[16],g=e[17];if(m!==Symbol.for("react.early_return_sentinel"))return m;let v;e[30]!==u||e[31]!==p?(v=n.jsx("div",{className:u,children:p}),e[30]=u,e[31]=p,e[32]=v):v=e[32];let N;e[33]!==c||e[34]!==v||e[35]!==h||e[36]!==j||e[37]!==x||e[38]!==k||e[39]!==b?(N=n.jsxs(c,{className:h,align:j,side:x,onOpenAutoFocus:k,children:[b,v]}),e[33]=c,e[34]=v,e[35]=h,e[36]=j,e[37]=x,e[38]=k,e[39]=b,e[40]=N):N=e[40];let B;return e[41]!==d||e[42]!==f||e[43]!==N||e[44]!==y||e[45]!==g?(B=n.jsxs(d,{open:y,onOpenChange:g,children:[f,N]}),e[41]=d,e[42]=f,e[43]=N,e[44]=y,e[45]=g,e[46]=B):B=e[46],B}function Up(t){return t.preventDefault()}function Ar(t){const e=R.c(12),{visible:s,icon:l,iconClassName:i,label:a}=t,r=!s||void 0,o=!s&&"invisible";let c;e[0]!==o?(c=K("flex items-center gap-2 px-1 py-0.5 text-sm font-medium text-muted-foreground",o),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==i?(d=K("shrink-0",i),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==l||e[5]!==d?(u=n.jsx(l,{size:15,className:d}),e[4]=l,e[5]=d,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==r||e[9]!==c||e[10]!==u?(f=n.jsxs("span",{"aria-hidden":r,className:c,children:[u,a]}),e[7]=a,e[8]=r,e[9]=c,e[10]=u,e[11]=f):f=e[11],f}function qp(t){const e=R.c(33);let s,l,i,a;e[0]!==t?({item:l,hidden:s,landed:i,...a}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=i,e[4]=a):(s=e[1],l=e[2],i=e[3],a=e[4]);const r=!!cs()&&l.isEpic;let o;e[5]!==r||e[6]!==l.id?(o={id:l.id,disabled:r},e[5]=r,e[6]=l.id,e[7]=o):o=e[7];const{attributes:c,listeners:d,setNodeRef:u,transform:f,transition:m,isDragging:p}=Yc(o),h=l.id,j=l.status;let x;e[8]!==c||e[9]!==d?(x={attributes:c,listeners:d},e[8]=c,e[9]=d,e[10]=x):x=e[10];const k=i&&"animate-card-land";let b;e[11]!==k?(b=K("w-full",k),e[11]=k,e[12]=b):b=e[12];let y;e[13]!==f?(y=Gc.Translate.toString(f),e[13]=f,e[14]=y):y=e[14];const g=p||s?0:void 0;let v;e[15]!==y||e[16]!==g||e[17]!==m?(v={transform:y,transition:m,opacity:g},e[15]=y,e[16]=g,e[17]=m,e[18]=v):v=e[18];let N;e[19]!==l||e[20]!==a||e[21]!==u||e[22]!==x||e[23]!==b||e[24]!==v?(N=n.jsx(cc,{...a,item:l,dragRef:u,bindings:x,className:b,style:v}),e[19]=l,e[20]=a,e[21]=u,e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let B;e[26]!==l.id||e[27]!==l.status||e[28]!==N?(B=n.jsx("div",{className:"flex","data-flip-id":h,"data-flip-lane":j,children:N}),e[26]=l.id,e[27]=l.status,e[28]=N,e[29]=B):B=e[29];let w;return e[30]!==l||e[31]!==B?(w=n.jsx(oc,{item:l,children:B}),e[30]=l,e[31]=B,e[32]=w):w=e[32],w}function oc(t){const e=R.c(15),{item:s,children:l}=t,i=X(),a=Ec(),{org:r}=tt();let o;e[0]!==s||e[1]!==r||e[2]!==a?(o=()=>{const{href:h}=a.buildLocation({to:".",params:j=>({...j,taskKey:pi(r.slug,s)}),search:Gp});window.open(h,"_blank","noopener")},e[0]=s,e[1]=r,e[2]=a,e[3]=o):o=e[3];const c=o;let d;e[4]!==l?(d=n.jsx(gd,{asChild:!0,children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ma,{}),e[6]=u):u=e[6];let f;e[7]!==i?(f=i("taskBoard.taskBoard.openInNewTab"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==c||e[10]!==f?(m=n.jsx(hd,{children:n.jsxs(xd,{onSelect:c,children:[u,f]})}),e[9]=c,e[10]=f,e[11]=m):m=e[11];let p;return e[12]!==d||e[13]!==m?(p=n.jsxs(jd,{children:[d,m]}),e[12]=d,e[13]=m,e[14]=p):p=e[14],p}function Gp(t){return t}function cc(t){const e=R.c(77),{item:s,assignee:l,assignedBy:i,members:a,selected:r,className:o,dragRef:c,bindings:d,style:u,onToggleSelect:f,onOpen:m,onAutoFix:p,onRerun:h,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}=t,y=X(),g=lc(s),v=cs();let N;e[0]!==v||e[1]!==s.id||e[2]!==s.isEpic||e[3]!==s.parentId?(N=!!v&&(s.isEpic||!!s.parentId||v.items.some(q=>q.parentId===s.id)),e[0]=v,e[1]=s.id,e[2]=s.isEpic,e[3]=s.parentId,e[4]=N):N=e[4];const B=N;let w;e[5]!==s?(w=Rl(s),e[5]=s,e[6]=w):w=e[6];const D=w;let C,S,T,_,z,I,$,E,O,L,U,G;if(e[7]!==d?.attributes||e[8]!==d?.listeners||e[9]!==o||e[10]!==c||e[11]!==s||e[12]!==p||e[13]!==m||e[14]!==h||e[15]!==f||e[16]!==D||e[17]!==r||e[18]!==u||e[19]!==y){S=Kd(s)?y("taskBoard.taskBoard.blockedBadgeTitle"):null;const q=p&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Ie,le=h&&!q&&s.assigneeId===Ie&&s.status!=="done";C=q?{icon:It,label:y("taskBoard.taskBoard.autoFix"),onClick:p}:le?{icon:zl,label:y("taskBoard.taskBoard.rerun"),onClick:h}:null,O="button",L=c,U=u,G=d?.attributes,T=d?.listeners,e[32]!==m||e[33]!==f?(_=de=>{de.shiftKey&&f?f():m()},e[32]=m,e[33]=f,e[34]=_):_=e[34],z=K("group relative flex shrink-0 cursor-grab flex-col gap-3 rounded-xl px-3.5 pt-3.5 pb-2.5 text-left shadow-edge active:cursor-grabbing",r?"bg-accent hover:bg-secondary-hover":S?"bg-warning/10 hover:bg-warning/15":"bg-card surface-interactive",D==="failed"?"shadow-edge-destructive":S&&"shadow-edge-warning",o),E="flex items-start gap-2",$="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",I=K("block text-foreground line-clamp-2 wrap-anywhere",C&&"group-hover:fade-text-end"),e[7]=d?.attributes,e[8]=d?.listeners,e[9]=o,e[10]=c,e[11]=s,e[12]=p,e[13]=m,e[14]=h,e[15]=f,e[16]=D,e[17]=r,e[18]=u,e[19]=y,e[20]=C,e[21]=S,e[22]=T,e[23]=_,e[24]=z,e[25]=I,e[26]=$,e[27]=E,e[28]=O,e[29]=L,e[30]=U,e[31]=G}else C=e[20],S=e[21],T=e[22],_=e[23],z=e[24],I=e[25],$=e[26],E=e[27],O=e[28],L=e[29],U=e[30],G=e[31];let P;e[35]!==s.title||e[36]!==I?(P=n.jsx("span",{className:I,children:s.title}),e[35]=s.title,e[36]=I,e[37]=P):P=e[37];let Z;e[38]!==C?(Z=C&&n.jsx(np,{action:C}),e[38]=C,e[39]=Z):Z=e[39];let H;e[40]!==P||e[41]!==Z||e[42]!==$?(H=n.jsxs("div",{className:$,children:[P,Z]}),e[40]=P,e[41]=Z,e[42]=$,e[43]=H):H=e[43];let se;e[44]!==S?(se=S&&n.jsx("span",{className:"sr-only",children:S}),e[44]=S,e[45]=se):se=e[45];let V;e[46]!==D?(V=D&&n.jsx(ac,{state:D}),e[46]=D,e[47]=V):V=e[47];let ee;e[48]!==H||e[49]!==se||e[50]!==V||e[51]!==E?(ee=n.jsxs("div",{className:E,children:[H,se,V]}),e[48]=H,e[49]=se,e[50]=V,e[51]=E,e[52]=ee):ee=e[52];let ie;e[53]!==B||e[54]!==s?(ie=(s.tags.length>0||s.sprintId||B)&&n.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[n.jsx(I1,{item:s}),n.jsx(_1,{item:s}),n.jsx(A1,{item:s}),n.jsx(nc,{sprintId:s.sprintId}),s.tags.slice(0,Ds).map(Vp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[53]=B,e[54]=s,e[55]=ie):ie=e[55];let ne;e[56]!==i||e[57]!==l||e[58]!==g||e[59]!==s||e[60]!==a||e[61]!==j||e[62]!==b||e[63]!==x||e[64]!==k?(ne=n.jsx(sc,{item:s,checks:g,assignee:l,assignedBy:i,members:a,onAssign:j,onPriorityChange:x,onTypeChange:k,onDueDateChange:b}),e[56]=i,e[57]=l,e[58]=g,e[59]=s,e[60]=a,e[61]=j,e[62]=b,e[63]=x,e[64]=k,e[65]=ne):ne=e[65];let F;return e[66]!==T||e[67]!==_||e[68]!==z||e[69]!==ee||e[70]!==ie||e[71]!==ne||e[72]!==O||e[73]!==L||e[74]!==U||e[75]!==G?(F=n.jsxs("button",{type:O,ref:L,style:U,...G,...T,onClick:_,className:z,children:[ee,ie,ne]}),e[66]=T,e[67]=_,e[68]=z,e[69]=ee,e[70]=ie,e[71]=ne,e[72]=O,e[73]=L,e[74]=U,e[75]=G,e[76]=F):F=e[76],F}function Vp(t){return n.jsx(Qi,{tag:t},t.id)}const Hp={blocked:{labelKey:"taskBoard.feed.eventBlocked",badgeClassName:"border-warning/40 text-warning"},handed:{labelKey:"taskBoard.feed.eventHanded",badgeClassName:"border-warning/40 text-warning"},running:{labelKey:"taskBoard.feed.eventRunning",badgeClassName:"border-primary/40 text-primary"},failed:{labelKey:"taskBoard.feed.eventFailed",badgeClassName:"border-destructive/40 text-destructive"},done:{labelKey:"taskBoard.feed.eventDone",badgeClassName:"border-success/40 text-success",namesLane:!0},delivered:{labelKey:"taskBoard.feed.eventDelivered",badgeClassName:"border-success/40 text-success"},review:{labelKey:"taskBoard.feed.eventReview",badgeClassName:"border-border text-muted-foreground",namesLane:!0}},Yp=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}),Wp=new Intl.DateTimeFormat(void 0,{weekday:"long",month:"short",day:"numeric"});function Qp(t){const e=R.c(50),{item:s,bucket:l,author:i,assignee:a,onOpen:r}=t,o=X(),c=Hp[K2(s)];let d;e[0]!==s.status||e[1]!==o?(d=dt(s.status,o),e[0]=s.status,e[1]=o,e[2]=d):d=e[2];const u=d,f=u.visual.icon;let m;e[3]!==s.description||e[4]!==s.threads?(m=s.threads.filter(_i)[0]?.lastMessage??s.description,e[3]=s.description,e[4]=s.threads,e[5]=m):m=e[5];const p=m,h=!i&&s.assigneeId===Ie;let j;e[6]!==a?.user?.name||e[7]!==i?.user?.name||e[8]!==h||e[9]!==o?(j=h?o("taskBoard.taskDialog.superAgentLabel"):i?.user?.name??a?.user?.name,e[6]=a?.user?.name,e[7]=i?.user?.name,e[8]=h,e[9]=o,e[10]=j):j=e[10];const x=j,k=ko(s.threads),b=lc(s),y="button",g="surface surface-interactive flex w-full flex-col gap-3 p-4 text-left";let v;e[11]!==c||e[12]!==s.tags||e[13]!==o?(v=(s.tags.length>0||c)&&n.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[c&&n.jsx("span",{className:K(os,"shrink-0",c.badgeClassName),children:o(c.labelKey)}),s.tags.slice(0,Ds).map(Xp),s.tags.length>Ds&&n.jsxs("span",{className:os,children:["+",s.tags.length-Ds]})]}),e[11]=c,e[12]=s.tags,e[13]=o,e[14]=v):v=e[14];let N;e[15]!==s.title?(N=n.jsx("span",{className:"text-base leading-snug font-medium text-foreground",children:s.title}),e[15]=s.title,e[16]=N):N=e[16];let B;e[17]!==p||e[18]!==x?(B=p&&n.jsxs("span",{className:"truncate text-sm leading-relaxed text-muted-foreground",children:[x&&n.jsxs("span",{className:"font-medium text-foreground",children:[x,": "]}),p]}),e[17]=p,e[18]=x,e[19]=B):B=e[19];let w;e[20]!==N||e[21]!==B?(w=n.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[N,B]}),e[20]=N,e[21]=B,e[22]=w):w=e[22];const D=sc;let C;e[23]!==s.updatedAt?(C=Yp.format(new Date(s.updatedAt)),e[23]=s.updatedAt,e[24]=C):C=e[24];let S;e[25]!==C?(S=n.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:C}),e[25]=C,e[26]=S):S=e[26];let T;e[27]!==l?(T=l&&n.jsxs("span",{className:K(ci,"text-foreground"),children:[n.jsx(ls,{entry:l}),l.title]}),e[27]=l,e[28]=T):T=e[28];let _;e[29]!==f||e[30]!==c?.namesLane||e[31]!==u.label||e[32]!==u.visual.iconClassName?(_=!c?.namesLane&&n.jsxs("span",{className:ci,children:[n.jsx(f,{size:sn,className:u.visual.iconClassName}),u.label]}),e[29]=f,e[30]=c?.namesLane,e[31]=u.label,e[32]=u.visual.iconClassName,e[33]=_):_=e[33];const z=k&&n.jsx("span",{className:K(ci,"tabular-nums"),title:o(k.runCount===1?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural",{runs:String(k.runCount)}),children:k.total.toLocaleString(void 0,{style:"currency",currency:"USD"})});let I;e[34]!==T||e[35]!==_||e[36]!==z?(I=n.jsxs(n.Fragment,{children:[T,_,z]}),e[34]=T,e[35]=_,e[36]=z,e[37]=I):I=e[37];let $;e[38]!==D||e[39]!==a||e[40]!==b||e[41]!==s||e[42]!==S||e[43]!==I?($=n.jsx(D,{item:s,checks:b,assignee:a,trailing:S,leading:I}),e[38]=D,e[39]=a,e[40]=b,e[41]=s,e[42]=S,e[43]=I,e[44]=$):$=e[44];let E;return e[45]!==r||e[46]!==$||e[47]!==v||e[48]!==w?(E=n.jsxs("button",{type:y,onClick:r,className:g,children:[v,w,$]}),e[45]=r,e[46]=$,e[47]=v,e[48]=w,e[49]=E):E=e[49],E}function Xp(t){return n.jsx(Qi,{tag:t},t.id)}function Zp(t){const e=R.c(90),{onCreated:s}=t,l=X(),[i,a]=W.useState(""),[r,o]=W.useState(""),[c,d]=W.useState(ws[0]),[u,f]=W.useState("medium"),[m,p]=W.useState(Tl),[h,j]=W.useState(!1);let x;e[0]!==i?(x=i.trim(),e[0]=i,e[1]=x):x=e[1];const k=x;let b;e[2]!==r||e[3]!==s||e[4]!==u||e[5]!==c||e[6]!==k||e[7]!==m?(b=()=>{k&&(s({title:k,description:r.trim(),status:c,priority:u,type:m}),a(""),o(""),d(ws[0]),f("medium"),p(Tl),j(!1))},e[2]=r,e[3]=s,e[4]=u,e[5]=c,e[6]=k,e[7]=m,e[8]=b):b=e[8];const y=b;let g;e[9]!==c||e[10]!==l?(g=dt(c,l),e[9]=c,e[10]=l,e[11]=g):g=e[11];const v=g,N=v.visual.icon,B=et[u],w=B.icon,D=At[m],C=D.icon;let S,T;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=ae=>a(ae.target.value),T=()=>j(!0),e[12]=S,e[13]=T):(S=e[12],T=e[13]);let _;e[14]!==y?(_=ae=>{ae.key==="Enter"&&!ae.shiftKey&&(ae.preventDefault(),y())},e[14]=y,e[15]=_):_=e[15];let z;e[16]!==l?(z=l("taskBoard.feed.composerPlaceholder"),e[16]=l,e[17]=z):z=e[17];let I;e[18]!==_||e[19]!==z||e[20]!==i?(I=n.jsx("input",{value:i,onChange:S,onFocus:T,onKeyDown:_,placeholder:z,className:"w-full bg-transparent text-base font-medium text-foreground outline-none placeholder:text-muted-foreground"}),e[18]=_,e[19]=z,e[20]=i,e[21]=I):I=e[21];let $;e[22]!==r||e[23]!==h||e[24]!==l?($=(h||r)&&n.jsx("textarea",{value:r,onChange:ae=>o(ae.target.value),rows:2,placeholder:l("taskBoard.feed.composerDescriptionPlaceholder"),className:"w-full resize-none bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"}),e[22]=r,e[23]=h,e[24]=l,e[25]=$):$=e[25];let E;e[26]!==I||e[27]!==$?(E=n.jsxs("div",{className:"flex flex-col gap-1 px-4 pt-4 pb-4",children:[I,$]}),e[26]=I,e[27]=$,e[28]=E):E=e[28];let O;e[29]!==N||e[30]!==v.visual.iconClassName?(O=n.jsx(N,{size:14,className:v.visual.iconClassName}),e[29]=N,e[30]=v.visual.iconClassName,e[31]=O):O=e[31];let L;e[32]!==v.label||e[33]!==O?(L=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[O,v.label]})}),e[32]=v.label,e[33]=O,e[34]=L):L=e[34];let U;e[35]!==l?(U=ws.map(ae=>{const{label:we,visual:ce}=dt(ae,l),xe=ce.icon;return n.jsxs(Ne,{onSelect:()=>d(ae),className:"gap-2",children:[n.jsx(xe,{size:16,className:ce.iconClassName}),we]},ae)}),e[35]=l,e[36]=U):U=e[36];let G;e[37]!==U?(G=n.jsx(qe,{align:"start",className:"w-44",children:U}),e[37]=U,e[38]=G):G=e[38];let P;e[39]!==L||e[40]!==G?(P=n.jsxs(Me,{children:[L,G]}),e[39]=L,e[40]=G,e[41]=P):P=e[41];let Z;e[42]!==C||e[43]!==D.iconClassName?(Z=n.jsx(C,{size:14,className:D.iconClassName}),e[42]=C,e[43]=D.iconClassName,e[44]=Z):Z=e[44];let H;e[45]!==l||e[46]!==D.labelKey?(H=l(D.labelKey),e[45]=l,e[46]=D.labelKey,e[47]=H):H=e[47];let se;e[48]!==Z||e[49]!==H?(se=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[Z,H]})}),e[48]=Z,e[49]=H,e[50]=se):se=e[50];let V;e[51]!==l?(V=Ii.map(ae=>{const we=At[ae].icon;return n.jsxs(Ne,{onSelect:()=>p(ae),className:"gap-2",children:[n.jsx(we,{size:16,className:At[ae].iconClassName}),l(At[ae].labelKey)]},ae)}),e[51]=l,e[52]=V):V=e[52];let ee;e[53]!==V?(ee=n.jsx(qe,{align:"start",className:"w-44",children:V}),e[53]=V,e[54]=ee):ee=e[54];let ie;e[55]!==se||e[56]!==ee?(ie=n.jsxs(Me,{children:[se,ee]}),e[55]=se,e[56]=ee,e[57]=ie):ie=e[57];let ne;e[58]!==w||e[59]!==B.iconClassName?(ne=n.jsx(w,{size:14,className:B.iconClassName}),e[58]=w,e[59]=B.iconClassName,e[60]=ne):ne=e[60];let F;e[61]!==B.labelKey||e[62]!==l?(F=l(B.labelKey),e[61]=B.labelKey,e[62]=l,e[63]=F):F=e[63];let q;e[64]!==ne||e[65]!==F?(q=n.jsx(Ke,{asChild:!0,children:n.jsxs(re,{variant:"outline",size:"sm",children:[ne,F]})}),e[64]=ne,e[65]=F,e[66]=q):q=e[66];let le;e[67]!==l?(le=Ts.map(ae=>{const we=et[ae].icon;return n.jsxs(Ne,{onSelect:()=>f(ae),className:"gap-2",children:[n.jsx(we,{size:16,className:et[ae].iconClassName}),l(et[ae].labelKey)]},ae)}),e[67]=l,e[68]=le):le=e[68];let de;e[69]!==le?(de=n.jsx(qe,{align:"start",className:"w-40",children:le}),e[69]=le,e[70]=de):de=e[70];let pe;e[71]!==q||e[72]!==de?(pe=n.jsxs(Me,{children:[q,de]}),e[71]=q,e[72]=de,e[73]=pe):pe=e[73];let Se;e[74]!==P||e[75]!==ie||e[76]!==pe?(Se=n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[P,ie,pe]}),e[74]=P,e[75]=ie,e[76]=pe,e[77]=Se):Se=e[77];const Be=!k;let oe;e[78]!==l?(oe=l("taskBoard.feed.composerSubmit"),e[78]=l,e[79]=oe):oe=e[79];let ge;e[80]!==y||e[81]!==Be||e[82]!==oe?(ge=n.jsx(re,{size:"sm",disabled:Be,onClick:y,children:oe}),e[80]=y,e[81]=Be,e[82]=oe,e[83]=ge):ge=e[83];let ye;e[84]!==Se||e[85]!==ge?(ye=n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-border px-3 py-3",children:[Se,ge]}),e[84]=Se,e[85]=ge,e[86]=ye):ye=e[86];let he;return e[87]!==E||e[88]!==ye?(he=n.jsxs("div",{className:"surface focus-within-ring flex flex-col",children:[E,ye]}),e[87]=E,e[88]=ye,e[89]=he):he=e[89],he}function Jp(t){const e=R.c(32),{items:s,index:l,memberByUserId:i,onCompose:a,onOpen:r}=t,o=X();let c,d,u,f,m,p;if(e[0]!==l||e[1]!==s||e[2]!==i||e[3]!==a||e[4]!==r||e[5]!==o){const y=G2(s,new Date);p="flex min-h-0 flex-1 flex-col px-4 pt-6 sm:px-8",m="mx-auto flex min-h-0 w-full max-w-[760px] flex-1 flex-col gap-6",u="flex min-h-0 min-w-0 flex-1 flex-col",e[12]!==a?(f=n.jsx(Zp,{onCreated:a}),e[12]=a,e[13]=f):f=e[13],c="min-h-0 flex-1 overflow-y-auto -mx-2 px-2 pt-5 pb-16 [mask-image:linear-gradient(to_bottom,transparent,#000_20px)]";let g;e[14]!==l||e[15]!==i||e[16]!==r||e[17]!==o?(g=v=>n.jsxs("section",{className:"flex flex-col",children:[n.jsx("h2",{className:"mt-3 mb-4 px-1 text-xs font-medium text-muted-foreground",children:v.relative==="today"?o("taskBoard.feed.today"):v.relative==="yesterday"?o("taskBoard.feed.yesterday"):Wp.format(v.date)}),n.jsx("div",{className:"flex flex-col gap-2",children:v.items.map(N=>n.jsx(Qp,{item:N,bucket:Oi(N,l),assignee:N.assigneeId?i.get(N.assigneeId):void 0,author:i.get(N.updatedBy),onOpen:()=>r(N)},N.id))})]},v.key),e[14]=l,e[15]=i,e[16]=r,e[17]=o,e[18]=g):g=e[18],d=y.map(g),e[0]=l,e[1]=s,e[2]=i,e[3]=a,e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=u,e[9]=f,e[10]=m,e[11]=p}else c=e[6],d=e[7],u=e[8],f=e[9],m=e[10],p=e[11];let h;e[19]!==c||e[20]!==d?(h=n.jsx("div",{className:c,children:d}),e[19]=c,e[20]=d,e[21]=h):h=e[21];let j;e[22]!==u||e[23]!==f||e[24]!==h?(j=n.jsxs("div",{className:u,children:[f,h]}),e[22]=u,e[23]=f,e[24]=h,e[25]=j):j=e[25];let x;e[26]!==m||e[27]!==j?(x=n.jsx("div",{className:m,children:j}),e[26]=m,e[27]=j,e[28]=x):x=e[28];let k;return e[29]!==p||e[30]!==x?(k=n.jsx("div",{className:p,children:x}),e[29]=p,e[30]=x,e[31]=k):k=e[31],k}function dc(t){const e=R.c(8),{groups:s,depth:l,toggled:i,onToggle:a,renderRow:r,heading:o}=t,c=X();let d;return e[0]!==l||e[1]!==s||e[2]!==o||e[3]!==a||e[4]!==r||e[5]!==c||e[6]!==i?(d=s.map(u=>{const f=Fo(u,i),{glyph:m,label:p}=eg(u,{...o,t:c});return n.jsxs("section",{"data-list-group":u.path,className:"flex flex-col gap-2",children:[n.jsxs(Ms,{delayDuration:600,children:[n.jsx(Ks,{asChild:!0,children:n.jsxs("button",{type:"button","aria-expanded":f,onClick:h=>a(u,s,h.altKey),className:K("flex items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium text-foreground transition-colors",l===0?"bg-muted/60 hover:bg-accent":"bg-muted/30 hover:bg-accent"),children:[n.jsx(Va,{size:14,className:K("shrink-0 text-muted-foreground transition-transform",f&&"rotate-90")}),n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),n.jsx("span",{className:"truncate",children:p}),n.jsx("span",{className:"text-muted-foreground",children:u.items.length})]})}),n.jsx(Us,{side:"top",align:"start",children:c("taskBoard.viewControls.groupToggleAllHint")})]}),f&&n.jsx("div",{className:"ml-[18px] flex flex-col gap-2 border-l-[1.5px] border-muted-foreground/30 pl-3",children:u.children?n.jsx(dc,{groups:u.children,depth:l+1,toggled:i,onToggle:a,renderRow:r,heading:o}):u.items.map(r)})]},u.path)}),e[0]=l,e[1]=s,e[2]=o,e[3]=a,e[4]=r,e[5]=c,e[6]=i,e[7]=d):d=e[7],d}function eg(t,{memberByUserId:e,orgTags:s,index:l,t:i}){const{key:a,groupBy:r}=t;switch(r){case"status":{const{label:o,visual:c}=dt(a,i),d=c.icon;return{glyph:n.jsx(d,{size:15,className:K("shrink-0",c.iconClassName)}),label:o}}case"priority":{const o=Ts.find(u=>u===a);if(!o)return{glyph:null,label:a};const c=et[o],d=c.icon;return{glyph:n.jsx(d,{size:15,className:K("shrink-0",c.iconClassName)}),label:i(c.labelKey)}}case"assignee":{if(a===Ie)return{glyph:n.jsx(ct,{size:16}),label:i("taskBoard.taskFilters.assigneeSuperAgent")};if(a===qs)return{glyph:n.jsx(Vs,{size:15,className:"shrink-0 text-muted-foreground"}),label:i("taskBoard.taskFilters.assigneeUnassigned")};const o=e.get(a);return{glyph:n.jsx(ot,{url:o?.user?.image??void 0,fallback:o?.user?.name??"?",shape:"circle",size:"2xs"}),label:o?.user?.name??i("taskBoard.taskFilters.assigneeMember")}}case"tags":{if(a===xi)return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full border border-muted-foreground/50"}),label:i("taskBoard.viewControls.groupNoTags")};const o=s.find(c=>c.id===a)??t.items[0]?.tags.find(c=>c.id===a);return{glyph:n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:en(o?.color)}}),label:o?.name??a}}case"project":{if(a===Xs)return{glyph:n.jsx(ls,{entry:void 0}),label:i("taskBoard.taskFilters.projectNone")};const o=Ua(a,l);return{glyph:n.jsx(ls,{entry:o}),label:o?.title??a}}default:return r}}function tg(t){const e=R.c(22),{item:s,onStatusChange:l}=t,i=X();let a;e[0]!==s.status?(a=Dl(s.status),e[0]=s.status,e[1]=a):a=e[1];const r=a.icon;let o;e[2]!==s.status||e[3]!==i?(o=i("taskBoard.taskBoard.changeStatusLabel",{status:dt(s.status,i).label}),e[2]=s.status,e[3]=i,e[4]=o):o=e[4];let c;e[5]!==s?(c=K(Xr(s)),e[5]=s,e[6]=c):c=e[6];let d;e[7]!==r||e[8]!==c?(d=n.jsx(r,{size:16,className:c}),e[7]=r,e[8]=c,e[9]=d):d=e[9];let u;e[10]!==o||e[11]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"shrink-0 rounded-md p-1 transition-colors hover:bg-accent",children:d})}),e[10]=o,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s.status||e[14]!==l||e[15]!==i?(f=ws.map(h=>{const{label:j,visual:x}=dt(h,i),k=x.icon;return n.jsxs(Ne,{className:"gap-2",onSelect:()=>{h!==s.status&&l(h)},children:[n.jsx(k,{size:16,className:x.iconClassName}),j,h===s.status&&n.jsx(Cs,{size:14,className:"ml-auto shrink-0"})]},h)}),e[13]=s.status,e[14]=l,e[15]=i,e[16]=f):f=e[16];let m;e[17]!==f?(m=n.jsx(qe,{align:"start",className:"w-48",children:f}),e[17]=f,e[18]=m):m=e[18];let p;return e[19]!==u||e[20]!==m?(p=n.jsxs(Me,{children:[u,m]}),e[19]=u,e[20]=m,e[21]=p):p=e[21],p}const sg=250;function ng(t){const e=R.c(18),{title:s,onOpen:l,onRename:i}=t,a=X(),[r,o]=W.useState(!1),c=W.useRef(void 0);if(r){let m;e[0]!==a?(m=a("taskBoard.taskBoard.renameTaskLabel"),e[0]=a,e[1]=m):m=e[1];let p;e[2]!==i||e[3]!==s?(p=x=>{o(!1);const k=x.currentTarget.value.trim();k&&k!==s&&i(k)},e[2]=i,e[3]=s,e[4]=p):p=e[4];let h;e[5]!==s?(h=x=>{x.key==="Enter"&&x.currentTarget.blur(),x.key==="Escape"&&(x.stopPropagation(),x.currentTarget.value=s,x.currentTarget.blur())},e[5]=s,e[6]=h):h=e[6];let j;return e[7]!==m||e[8]!==p||e[9]!==h||e[10]!==s?(j=n.jsx("input",{autoFocus:!0,defaultValue:s,"aria-label":m,onFocus:ag,onBlur:p,onKeyDown:h,className:"min-w-0 flex-1 rounded-sm bg-transparent text-sm text-foreground outline-none ring-1 ring-ring"}),e[7]=m,e[8]=p,e[9]=h,e[10]=s,e[11]=j):j=e[11],j}let d;e[12]!==l?(d=m=>{clearTimeout(c.current),m.detail===0?l():m.detail===1&&(c.current=setTimeout(l,sg))},e[12]=l,e[13]=d):d=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{clearTimeout(c.current),o(!0)},e[14]=u):u=e[14];let f;return e[15]!==d||e[16]!==s?(f=n.jsx("button",{type:"button",onClick:d,onDoubleClick:u,className:"min-w-0 flex-1 truncate text-left text-sm text-foreground",children:s}),e[15]=d,e[16]=s,e[17]=f):f=e[17],f}function ag(t){return t.currentTarget.select()}function lg(t){const e=R.c(40),{tags:s,onChange:l}=t,i=X(),{data:a}=El();let r;e[0]!==a?(r=a===void 0?[]:a,e[0]=a,e[1]=r):r=e[1];const o=r,c=so(),d=no();let u;e[2]!==s?(u=s.map(rg),e[2]=s,e[3]=u):u=e[3];const f=u;let m;e[4]!==i?(m=i("taskBoard.taskBoard.editTagsLabel"),e[4]=i,e[5]=m):m=e[5];let p;e[6]!==i?(p=i("taskBoard.taskBoard.editTagsLabel"),e[6]=i,e[7]=p):p=e[7];const h=s.length===0&&Zo;let j;e[8]!==h?(j=K("hidden shrink-0 items-center gap-1.5 rounded-full sm:inline-flex",h),e[8]=h,e[9]=j):j=e[9];let x;e[10]!==s?(x=s.length===0?n.jsx("span",{className:os,children:n.jsx(is,{size:sn})}):n.jsxs(n.Fragment,{children:[s.slice(0,Ds).map(ig),s.length>Ds&&n.jsxs("span",{className:os,children:["+",s.length-Ds]})]}),e[10]=s,e[11]=x):x=e[11];let k;e[12]!==m||e[13]!==p||e[14]!==j||e[15]!==x?(k=n.jsx(ss,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":m,title:p,className:j,children:x})}),e[12]=m,e[13]=p,e[14]=j,e[15]=x,e[16]=k):k=e[16];let b;e[17]!==o.length?(b=eo(o.length),e[17]=o.length,e[18]=b):b=e[18];let y;e[19]!==l||e[20]!==f?(y=w=>l(f.includes(w)?f.filter(D=>D!==w):[...f,w]),e[19]=l,e[20]=f,e[21]=y):y=e[21];let g;e[22]!==c||e[23]!==l||e[24]!==f?(g=async(w,D)=>{const C=await c.mutateAsync({name:w,color:D});l([...f,C.id])},e[22]=c,e[23]=l,e[24]=f,e[25]=g):g=e[25];let v;e[26]!==d||e[27]!==l||e[28]!==f?(v=w=>{d.mutate(w),f.includes(w)&&l(f.filter(D=>D!==w))},e[26]=d,e[27]=l,e[28]=f,e[29]=v):v=e[29];let N;e[30]!==o||e[31]!==b||e[32]!==y||e[33]!==g||e[34]!==v||e[35]!==f?(N=n.jsx(as,{align:"end",className:"w-56 p-0",children:n.jsx(Co,{tags:o,selectedIds:f,defaultColor:b,onToggle:y,onCreate:g,onDelete:v})}),e[30]=o,e[31]=b,e[32]=y,e[33]=g,e[34]=v,e[35]=f,e[36]=N):N=e[36];let B;return e[37]!==N||e[38]!==k?(B=n.jsxs(ns,{children:[k,N]}),e[37]=N,e[38]=k,e[39]=B):B=e[39],B}function ig(t){return n.jsx(Qi,{tag:t},t.id)}function rg(t){return t.id}function og(t){const e=R.c(61),{item:s,assignee:l,assignedBy:i,members:a,onOpen:r,onStatusChange:o,onRename:c,onPriorityChange:d,onTagsChange:u,onDueDateChange:f,onAssign:m}=t,{org:p}=tt();let h;e[0]!==s.keySeq||e[1]!==p.slug?(h=tn(p.slug,s.keySeq),e[0]=s.keySeq,e[1]=p.slug,e[2]=h):h=e[2];const j=h;let x;e[3]!==s?(x=Rl(s),e[3]=s,e[4]=x):x=e[4];const k=x;let b;e[5]!==s||e[6]!==o?(b=n.jsx(tg,{item:s,onStatusChange:o}),e[5]=s,e[6]=o,e[7]=b):b=e[7];let y;e[8]!==s.priority||e[9]!==d?(y=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Jo,{priority:s.priority,onChange:d})}),e[8]=s.priority,e[9]=d,e[10]=y):y=e[10];let g;e[11]!==j?(g=j&&n.jsx("span",{className:"hidden w-16 shrink-0 font-mono text-xs text-muted-foreground sm:inline",children:j}),e[11]=j,e[12]=g):g=e[12];let v;e[13]!==s.title||e[14]!==r||e[15]!==c?(v=n.jsx(ng,{title:s.title,onOpen:r,onRename:c}),e[13]=s.title,e[14]=r,e[15]=c,e[16]=v):v=e[16];let N;e[17]!==k?(N=k&&n.jsx(ac,{state:k}),e[17]=k,e[18]=N):N=e[18];let B;e[19]!==s?(B=Ti(s)&&n.jsx(Y2,{}),e[19]=s,e[20]=B):B=e[20];let w;e[21]!==s?(w=Jr(s)&&n.jsx(W2,{}),e[21]=s,e[22]=w):w=e[22];let D;e[23]!==s.sprintId?(D=s.sprintId&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(nc,{sprintId:s.sprintId})}),e[23]=s.sprintId,e[24]=D):D=e[24];let C;e[25]!==s.tags||e[26]!==u?(C=n.jsx(lg,{tags:s.tags,onChange:u}),e[25]=s.tags,e[26]=u,e[27]=C):C=e[27];let S;e[28]!==s.status||e[29]!==s.statusSince?(S=s.statusSince&&n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(ip,{status:s.status,since:s.statusSince})}),e[28]=s.status,e[29]=s.statusSince,e[30]=S):S=e[30];let T;e[31]!==s.dueDate||e[32]!==f?(T=n.jsx("span",{className:"hidden sm:inline-flex",children:n.jsx(tc,{iso:s.dueDate,onChange:f})}),e[31]=s.dueDate,e[32]=f,e[33]=T):T=e[33];let _;e[34]!==i||e[35]!==l||e[36]!==s||e[37]!==a||e[38]!==m?(_=n.jsx("span",{className:"flex w-5 shrink-0 justify-center",children:n.jsx(ic,{item:s,assignee:l,assignedBy:i,members:a,onAssign:m})}),e[34]=i,e[35]=l,e[36]=s,e[37]=a,e[38]=m,e[39]=_):_=e[39];let z;e[40]!==s.createdAt?(z=Al(new Date(s.createdAt)),e[40]=s.createdAt,e[41]=z):z=e[41];let I;e[42]!==z?(I=n.jsx("span",{className:"hidden w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground sm:inline",children:z}),e[42]=z,e[43]=I):I=e[43];let $;e[44]!==D||e[45]!==C||e[46]!==S||e[47]!==T||e[48]!==_||e[49]!==I||e[50]!==b||e[51]!==y||e[52]!==g||e[53]!==v||e[54]!==N||e[55]!==B||e[56]!==w?($=n.jsxs("div",{className:"group flex h-11 items-center gap-3 px-3 transition-colors hover:bg-accent",children:[b,y,g,v,N,B,w,D,C,S,T,_,I]}),e[44]=D,e[45]=C,e[46]=S,e[47]=T,e[48]=_,e[49]=I,e[50]=b,e[51]=y,e[52]=g,e[53]=v,e[54]=N,e[55]=B,e[56]=w,e[57]=$):$=e[57];let E;return e[58]!==s||e[59]!==$?(E=n.jsx(oc,{item:s,children:$}),e[58]=s,e[59]=$,e[60]=E):E=e[60],E}function kh(t){const e=R.c(5),{seed:s,children:l}=t;let i;e[0]!==s?(i=()=>{const o=new Oc({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(o),o},e[0]=s,e[1]=i):i=e[1];const[a]=W.useState(i);let r;return e[2]!==l||e[3]!==a?(r=n.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:n.jsx(Lc,{fallback:null,children:n.jsx(W.Suspense,{fallback:null,children:n.jsx(Fc,{client:a,children:l})})})}),e[2]=l,e[3]=a,e[4]=r):r=e[4],r}const zr=new Date().toISOString();function Ps(t,e,s,l,i,a){return{harnessId:"claude-code",parentId:null,isEpic:!1,id:t,organizationId:"preview",title:e,description:null,repositoryId:null,virtualMcpId:null,sprintId:null,status:s,priority:i,type:l,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],statusSince:null,createdBy:"preview",createdAt:zr,updatedBy:"preview",updatedAt:zr}}function yh(){return{items:[Ps("p1","Fix checkout shipping estimate","triage","bug","high",1),Ps("p2","Add size guide to product page","triage","feature","medium",2),Ps("p3","Compress hero images","triage","chore","low",3),Ps("p4","Rewrite category descriptions","in_progress","feature","medium",4),Ps("p5","Audit broken redirects","in_progress","chore","high",5),Ps("p6","New arrivals landing page","in_review","feature","high",6),Ps("p7","Speed up search results","qa","chore","medium",7),Ps("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[],demoFrozenItemIds:[]}}export{kh as P,bh as T,yh as m};