decocms 4.74.12 → 4.74.13

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 (234) hide show
  1. package/dist/client/assets/{AlertCircle-2jurQKhk.js → AlertCircle-CoMkLPYZ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BewasAtp.js → AreaChart-2jarxGEM.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-D103r2K-.js → ArrowUp-C8ZuZGYN.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-CNQXFv9P.js → ArrowUpRight-DRyV5caw.js} +1 -1
  5. package/dist/client/assets/{Check-LT_cwi6B.js → Check-B9L3Ctfx.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CkmhXKXX.js → CheckCircle-VCLTuEyV.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-KHjOGrD9.js → ChevronDown-Dg-cESk6.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-dZQYt_cC.js → ChevronRight-COgx0R1b.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DN52maKJ.js → ChevronUp-kjji0ksd.js} +1 -1
  10. package/dist/client/assets/{Circle-DQCX2H0G.js → Circle-CV9Iar2I.js} +1 -1
  11. package/dist/client/assets/{Copy01-DVQGX_kS.js → Copy01-CIfJ2CWy.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CWO-rRmS.js → DotsVertical-DOOKh2UC.js} +1 -1
  13. package/dist/client/assets/{Eye-8ZhOiW7-.js → Eye-BFgP-2fZ.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DPPrUVP2.js → FilterLines-nOSo0w2R.js} +1 -1
  15. package/dist/client/assets/{Flag01-DUxpNG46.js → Flag01-Bp__n1vu.js} +1 -1
  16. package/dist/client/assets/{Globe01-DhetY-Bd.js → Globe01-BTyxZV0a.js} +1 -1
  17. package/dist/client/assets/{Globe04-CGE4GAMx.js → Globe04-VeC01HgQ.js} +1 -1
  18. package/dist/client/assets/{HardDrive-_cIYkw12.js → HardDrive-BY_ap45O.js} +1 -1
  19. package/dist/client/assets/{Key01-Cvy03JKa.js → Key01-BO8j2bJt.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DtwphR7R.js → LayoutLeft-Ds1Bnqod.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-QzLVgAwK.js → LinkExternal01-H7tJOo3z.js} +1 -1
  22. package/dist/client/assets/{List-DQvBfG-H.js → List-DBmlFXSu.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CQQrxgjG.js → Monitor01-CCfL6VXF.js} +1 -1
  24. package/dist/client/assets/{Package-Bp-gCp2T.js → Package-CmANPXcP.js} +1 -1
  25. package/dist/client/assets/{Palette-DN35OGVN.js → Palette-mTfP_tjW.js} +1 -1
  26. package/dist/client/assets/{Play-DmyUjTxG.js → Play-CfT11ORS.js} +1 -1
  27. package/dist/client/assets/{Plus-BPetnJZB.js → Plus-CEFSqmDE.js} +1 -1
  28. package/dist/client/assets/{SearchLg-ClmWMMYa.js → SearchLg-DDrU9DfP.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Bv2yLPLt.js → SearchMd-COG_cfAf.js} +1 -1
  30. package/dist/client/assets/{Settings02-DxrU02y9.js → Settings02-BCk-4F1r.js} +1 -1
  31. package/dist/client/assets/{Shield01-DKpieCIa.js → Shield01-BPzTEBmD.js} +1 -1
  32. package/dist/client/assets/{Star01-CJEBeeXH.js → Star01-B_hs24dd.js} +1 -1
  33. package/dist/client/assets/{Stars01-C3ZvOrDi.js → Stars01-POGtbKvF.js} +1 -1
  34. package/dist/client/assets/{Stars02-Ctf7Frb4.js → Stars02-Day0NxDs.js} +1 -1
  35. package/dist/client/assets/{Sun-jBdlUA9W.js → Sun-DFTbE-HI.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-BYBnOJTm.js → SwitchHorizontal01-pvfyuxd3.js} +1 -1
  37. package/dist/client/assets/{Tool01-BBLo9a3Q.js → Tool01-Dg3rq5Vw.js} +1 -1
  38. package/dist/client/assets/{Tool02-CIcuxsjc.js → Tool02-Df3abBJF.js} +1 -1
  39. package/dist/client/assets/{Trash01-BlEBGTBm.js → Trash01-BHY0zG6c.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-DhTZNTl7.js → TrendUp01-BRt_MOTs.js} +1 -1
  41. package/dist/client/assets/{Upload01-BsCyAZ7c.js → Upload01-R2qlYcTu.js} +1 -1
  42. package/dist/client/assets/{User01-CabtufW7.js → User01-Cbnom0b9.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-DwXUEWG3.js → UserPlus01-Ckdv_SP0.js} +1 -1
  44. package/dist/client/assets/{Users01-DaZKFETD.js → Users01-CuC_Un02.js} +1 -1
  45. package/dist/client/assets/{Users03-BqNZwhmE.js → Users03-B1PvTS45.js} +1 -1
  46. package/dist/client/assets/{X-Bv5eNeMh.js → X-D9y8h5bN.js} +1 -1
  47. package/dist/client/assets/{XCircle-B-Ww64Yj.js → XCircle-DxrM3oM4.js} +1 -1
  48. package/dist/client/assets/{XClose-CC80cbse.js → XClose-pja7DdTc.js} +1 -1
  49. package/dist/client/assets/{Zap-DfU6Os0p.js → Zap-fLF5olBD.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-fSPFQQtW.js → ZapSquare-DY-Y5vF0.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-DMlDPqRk.js → ZoomOut-B0UZXMMj.js} +1 -1
  52. package/dist/client/assets/{access-gate-CZoYnt3i.js → access-gate-C6dghQEH.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-XxYiq5cg.js → add-section-modal-ByPmmJIR.js} +1 -1
  54. package/dist/client/assets/{agent-icon-B8y023fO.js → agent-icon-CiWkt4Fr.js} +1 -1
  55. package/dist/client/assets/{agents-list-BjfttKXl.js → agents-list-B0qlImwm.js} +1 -1
  56. package/dist/client/assets/{ai-providers-YdHWDhPI.js → ai-providers-C_h3BYsI.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-D7W-4T1K.js → alert-dialog-B4Mgc7VK.js} +1 -1
  58. package/dist/client/assets/{alert-mmSHMB0r.js → alert-gkEdwlL2.js} +1 -1
  59. package/dist/client/assets/app-editor-Dnyt8Dje.js +1 -0
  60. package/dist/client/assets/{auth-Dq5_3BM8.js → auth-CDrg40fF.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-C-XHgXbw.js → auth-catchall-CkK34Vsz.js} +1 -1
  62. package/dist/client/assets/{auth-entry-dKjk-ZUq.js → auth-entry-D-67xmf4.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-DjbDFcUu.js → auth-split-layout-BBN6kINn.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-C5BkK2mJ.js → authenticate-and-persist-oauth-C5RfRLXv.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-CEMzmeMb.js → automation-list-row-D88PJ6v3.js} +1 -1
  66. package/dist/client/assets/{automation-runs-BnZCGXq7.js → automation-runs-DudUTkFf.js} +1 -1
  67. package/dist/client/assets/automations-b4voqn2T.js +1 -0
  68. package/dist/client/assets/{autosend-CASw5cTt.js → autosend-B5vQah6Z.js} +1 -1
  69. package/dist/client/assets/{avatar-p6d-1E48.js → avatar-Cxrd5VrY.js} +1 -1
  70. package/dist/client/assets/{badge-CkYeHqRc.js → badge-pNnA-bf4.js} +1 -1
  71. package/dist/client/assets/{block-document-DBkfetVN.js → block-document-BWFTOys-.js} +1 -1
  72. package/dist/client/assets/{brand-context-Bdxi18oK.js → brand-context-DCHjQbvd.js} +1 -1
  73. package/dist/client/assets/{buckets-BJ_aGp6C.js → buckets-CMWT68rw.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-BUWSMFvy.js → bulk-category-panel-DXF3I4fl.js} +1 -1
  75. package/dist/client/assets/{calendar-DqE8Gycn.js → calendar-CBPHJMpv.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-DG7WWyPD.js → capability-load-error-DFvcNfN5.js} +1 -1
  77. package/dist/client/assets/{card-DYuc4WCe.js → card-fNZ7-6Ft.js} +1 -1
  78. package/dist/client/assets/{category-editor-dOqPY0I5.js → category-editor-Xv7hlZ7F.js} +1 -1
  79. package/dist/client/assets/{chat-context-CiIVUyi7.js → chat-context-5GcrkjU_.js} +1 -1
  80. package/dist/client/assets/{checkbox-CEN1MXm4.js → checkbox-B_Dg3P58.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-DUAGbPk_.js → cli-auth-success-DdxD8-Oi.js} +1 -1
  82. package/dist/client/assets/{collection-detail-Bt8d-IVI.js → collection-detail-BU0t9frC.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-BdM9KLqc.js → collection-display-button-BxiuHSxI.js} +1 -1
  84. package/dist/client/assets/{collection-search-bqD4Na42.js → collection-search-B5FAoOba.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-CQB_dHht.js → collection-table-wrapper-t3bqLqS1.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-D99IhIo3.js → collection-tabs-Chh3-dis.js} +1 -1
  87. package/dist/client/assets/{command-Cn4XyR6D.js → command-D1JmubF9.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-D8rfeQra.js → commerce-onboarding-DIbQNsZU.js} +1 -1
  89. package/dist/client/assets/{companions-core-DaPFyfar.js → companions-core-CRmk8liS.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-CPqX3vyC.js → connect-desktop-dialog-BxuIVzop.js} +1 -1
  91. package/dist/client/assets/{connection-card-CQNEEOdX.js → connection-card-DuFuh5IN.js} +1 -1
  92. package/dist/client/assets/{connection-detail-CET6EcfF.js → connection-detail-DJjSUbxN.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-DshTnlxw.js → connection-form-helpers-C4Nm5Nzm.js} +1 -1
  94. package/dist/client/assets/{connections-CqqPNdKH.js → connections-KFqVsxm4.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-D_J29ibn.js → decopilot-sse-pool-DZc3N0ZE.js} +1 -1
  96. package/dist/client/assets/{dialog-BCSiXXgK.js → dialog-Dlr1m8SN.js} +1 -1
  97. package/dist/client/assets/{domain-settings-Dbc9Fo6n.js → domain-settings-Bj5Z7DQO.js} +1 -1
  98. package/dist/client/assets/{drawer-Mz-syzNH.js → drawer-BRYxPnMu.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-WWst57wD.js → dropdown-menu-VaFb6Xm_.js} +1 -1
  100. package/dist/client/assets/{empty-state-BdGOxGgJ.js → empty-state-BrJLgIKj.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-rsSYZOBB.js → extract-connection-data-Bl07HDer.js} +1 -1
  102. package/dist/client/assets/{file-explorer-ezS0tFJ0.js → file-explorer-DcByRbKM.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-B2sY71ls.js → file-type-icon-B2w6oDIO.js} +1 -1
  104. package/dist/client/assets/{files-DLZfU5Cj.js → files-WeZmksXt.js} +1 -1
  105. package/dist/client/assets/{form-C-7BVP2B.js → form-BK4CR2Ok.js} +1 -1
  106. package/dist/client/assets/{general-Dd9PZUl9.js → general-ChMhmq0O.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-C92TWwoi.js → github-repo-picker-Dkwp10Pn.js} +1 -1
  108. package/dist/client/assets/{hooks-BW8I5QSD.js → hooks-BkiREXsK.js} +1 -1
  109. package/dist/client/assets/{index-Cq8Qg57G.js → index-A8rWnNu1.js} +1 -1
  110. package/dist/client/assets/{index-Cw3rb0CY.js → index-BjA99mym.js} +3 -3
  111. package/dist/client/assets/{index-BDnGvDL6.js → index-Bn42m9nP.js} +5 -5
  112. package/dist/client/assets/{index-DrL-PFmo.js → index-Btn45kVj.js} +1 -1
  113. package/dist/client/assets/{index-BY4umBvA.js → index-CAbWxmrm.js} +2 -2
  114. package/dist/client/assets/{index-dWJwI92H.js → index-CGqe-QXq.js} +1 -1
  115. package/dist/client/assets/{index-A56VPcDE.js → index-CLopVhSn.js} +1 -1
  116. package/dist/client/assets/{index-DXE2Jy9D.js → index-COwqX8g-.js} +1 -1
  117. package/dist/client/assets/{index-BlG5PAfm.js → index-D9yP1AQv.js} +1 -1
  118. package/dist/client/assets/{index-ztErrW5j.js → index-DaCoUJoi.js} +1 -1
  119. package/dist/client/assets/{index-m9BWu3xZ.js → index-Di7Mw2tn.js} +1 -1
  120. package/dist/client/assets/{index-BJfjEE72.js → index-Du9qKPxu.js} +1 -1
  121. package/dist/client/assets/{index-BupeqvAe.js → index-DxX7BhOF.js} +1 -1
  122. package/dist/client/assets/{index-B1HbCjqo.js → index-j-O6oyAm.js} +1 -1
  123. package/dist/client/assets/{index-redirect-DpwiItex.js → index-redirect-D4ktzpAS.js} +1 -1
  124. package/dist/client/assets/{input-BMv-guKc.js → input-2p0SJVaJ.js} +1 -1
  125. package/dist/client/assets/{integration-icon-DhU6PpGL.js → integration-icon-BzGxo36b.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-8D6Gc9Hg.js → invite-member-dialog-4AwAFjMF.js} +1 -1
  127. package/dist/client/assets/{label-DEmb7que.js → label-BmyWsYVU.js} +1 -1
  128. package/dist/client/assets/{layout-D6Qs7hcd.js → layout-SjwCKPR8.js} +1 -1
  129. package/dist/client/assets/{login-Budo_tww.js → login-BJGqPf4E.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-B1rEzsfb.js → mcp-oauth-DLeICbDJ.js} +1 -1
  131. package/dist/client/assets/{members-Ch9U-_wq.js → members-DIYxw4Su.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-BgQg4n0n.js → monaco-editor-B7i8SRa6.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-WLa96ewK.js → monitoring-stats-row-CHiNcGta.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-sKqQzx4Z.js → oauth-callback-Co02hOX8.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-Lodua7ZF.js → oauth-callback-ai-provider-DAY8HeAy.js} +1 -1
  136. package/dist/client/assets/{onboarding-ClOtcbAt.js → onboarding-b_ViWD94.js} +1 -1
  137. package/dist/client/assets/{org-install-D-g72Phv.js → org-install-ThvHWgFb.js} +1 -1
  138. package/dist/client/assets/{org-layout-Ffh9rpWg.js → org-layout-Pr0LEjTu.js} +1 -1
  139. package/dist/client/assets/{organization-choice-D9XWi2P9.js → organization-choice-4aVuSMEl.js} +1 -1
  140. package/dist/client/assets/{orgs-Mvsktix2.js → orgs-COC60fXw.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-DimUwvHR.js → page-seo-form-CNqAWmhN.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-DFWw_ljR.js +1 -0
  143. package/dist/client/assets/{popover-BLh2HiPz.js → popover-CKFLhO7y.js} +1 -1
  144. package/dist/client/assets/{post-editor-bfciZ03-.js → post-editor-BtpzYvQE.js} +1 -1
  145. package/dist/client/assets/{primitives-cRAG49GG.js → primitives-BuzQQYuL.js} +1 -1
  146. package/dist/client/assets/{profile-DQEV-9Am.js → profile-07qw1-vh.js} +1 -1
  147. package/dist/client/assets/project-app-view-CVl6DD4z.js +1 -0
  148. package/dist/client/assets/record-editor-DDe5VvzH.js +1 -0
  149. package/dist/client/assets/redirect-editor-CMVoKSMm.js +1 -0
  150. package/dist/client/assets/registry-Cza325qS.js +2 -0
  151. package/dist/client/assets/{registry-layout-Z1bzp-KG.js → registry-layout-Bp2ZDvg0.js} +1 -1
  152. package/dist/client/assets/{reports-Dki2bv5Z.js → reports-30pXNEe2.js} +1 -1
  153. package/dist/client/assets/{require-capability-C-1wwgvt.js → require-capability-BXwZYnfg.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-CqJE5lOb.js → required-auth-layout-BbBzFz8U.js} +1 -1
  155. package/dist/client/assets/{reset-password-D9Hrfc2s.js → reset-password-C50kxyB2.js} +1 -1
  156. package/dist/client/assets/{roles-BZhViI26.js → roles-D-I3b4GS.js} +1 -1
  157. package/dist/client/assets/{search-input-CiaSr8Pp.js → search-input-Bl-AK5Ip.js} +1 -1
  158. package/dist/client/assets/{secrets-Nn8_2jqn.js → secrets-BEPk7NC4.js} +1 -1
  159. package/dist/client/assets/{sections-editor-3rpBpOuf.js → sections-editor-FbmqWVeB.js} +1 -1
  160. package/dist/client/assets/{select-DVsN-k2X.js → select-C38jiIx6.js} +1 -1
  161. package/dist/client/assets/{select-model-B2-3mkZy.js → select-model-F8T2Eftn.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-BkQfpfOX.js → self-tool-result-DbF_QEjy.js} +1 -1
  163. package/dist/client/assets/{seo-editor-DX55nmcN.js → seo-editor-aJl9Ci6G.js} +1 -1
  164. package/dist/client/assets/{settings-layout-DEf5luhN.js → settings-layout-C9mILh7Z.js} +1 -1
  165. package/dist/client/assets/{settings-section-DnlgoQwW.js → settings-section-BMW5QXEC.js} +1 -1
  166. package/dist/client/assets/{shell-controls-muiO1-jI.js → shell-controls-0YSmB8qx.js} +1 -1
  167. package/dist/client/assets/{shell-layout-BEVkd4ol.js → shell-layout-DS-oG0dR.js} +1 -1
  168. package/dist/client/assets/{sidebar-h6qoVbH0.js → sidebar-BtLxIN0X.js} +1 -1
  169. package/dist/client/assets/{skeleton-Thf9bMzT.js → skeleton-DNTKkske.js} +1 -1
  170. package/dist/client/assets/{sso-C5PkGQGc.js → sso-B4vOqdBz.js} +1 -1
  171. package/dist/client/assets/{store-iU8eB18i.js → store-DFkS77Sk.js} +1 -1
  172. package/dist/client/assets/store-registry-Cs1ONr3N.js +2 -0
  173. package/dist/client/assets/{studio-tools-DA9fS_3N.js → studio-tools-BV50QJsF.js} +1 -1
  174. package/dist/client/assets/{switch-C7Q2A8Ys.js → switch-BcezFNrZ.js} +1 -1
  175. package/dist/client/assets/{table-CsPWO9c_.js → table-AKjHrNxt.js} +1 -1
  176. package/dist/client/assets/{tabs-CF6qRu1V.js → tabs-ZV1zF7YG.js} +1 -1
  177. package/dist/client/assets/{textarea-BLFMR312.js → textarea-joqKgdpX.js} +1 -1
  178. package/dist/client/assets/{toggle-group-CVodu526.js → toggle-group-DwuCFBil.js} +1 -1
  179. package/dist/client/assets/{toolbar-CWtK3Y_M.js → toolbar-B-lbazc3.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-CZK62KWl.js → toolbar-icon-button-BeLQ-KBq.js} +1 -1
  181. package/dist/client/assets/{tools-list-CdgTD7j4.js → tools-list-CM2o5NwA.js} +1 -1
  182. package/dist/client/assets/{tooltip-CopKItWz.js → tooltip-BOdaaz8D.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-BUUn59Dg.js → use-ai-providers-BSIkFHe_.js} +1 -1
  184. package/dist/client/assets/{use-automations-BU1X6X_q.js → use-automations-D5WMzBt3.js} +1 -1
  185. package/dist/client/assets/{use-autosave-wPC-Pbv8.js → use-autosave-Ccgy--yy.js} +1 -1
  186. package/dist/client/assets/{use-capability-CpK6Y8Ek.js → use-capability-CVDmnnAd.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BfJv01Rt.js → use-clock-tick-Dw69rdkf.js} +1 -1
  188. package/dist/client/assets/{use-collections-B0xwmRaZ.js → use-collections-D9Vclmxz.js} +1 -1
  189. package/dist/client/assets/{use-connection-Bs6Ag7o6.js → use-connection-CzLSKf3i.js} +1 -1
  190. package/dist/client/assets/{use-copy-DzULKZqD.js → use-copy-g8nddtMC.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-BiMeS1TU.js → use-create-virtual-mcp-IbO57kWy.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-C5r8JSt-.js → use-debounced-autosave-B-2_mvpX.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-Bni9dGfQ.js → use-debounced-value-CjrbNm_X.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-7rG1gSE6.js → use-deco-credits-CXKTbfDa.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-DXRkXYjm.js → use-decopilot-events-x2M8wr5H.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-C30LVIVI.js → use-delete-connection-k6uyuo-b.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-CJbICshE.js → use-deployment-admin-FAjOqhBe.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-BEf4MYt-.js → use-file-configs-D2XcXxzG.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-C3Aih4BM.js → use-infinite-scroll-DySJeYWA.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-ClIciHoN.js → use-join-requests-B8n_ILin.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-DIiptzGj.js → use-mcp-client-ByfO-SOi.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-Cpcz8w7L.js → use-mcp-tools-D01ovxx0.js} +1 -1
  203. package/dist/client/assets/{use-members-DXUTOMyu.js → use-members-ChwmWODj.js} +1 -1
  204. package/dist/client/assets/{use-mobile-CWspwsRY.js → use-mobile-B7ewum1J.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-SJiiALqa.js → use-navigate-to-agent-OWYhqIhY.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-Uv_p1hhi.js → use-org-auth-client-Didx1OUx.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-CruyhZ_K.js → use-org-sso-CGcGhJdc.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-DMHrak66.js → use-organization-roles-CHvCg2E4.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-D-oHliKf.js → use-organization-settings-CVOJkT70.js} +1 -1
  210. package/dist/client/assets/{use-registry-connections-UENON7F5.js → use-registry-connections-DT78tsl3.js} +1 -1
  211. package/dist/client/assets/{use-secrets-jTVlpv8o.js → use-secrets-Dj1WK4lB.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-qSAe4B8m.js → use-status-sounds-xw9gR1E4.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-CsMPzSuD.js → use-view-mode-BgQKfE2L.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-DojqH0fL.js → use-virtual-mcp-F5qdfs0o.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-BkAR5Pxk.js +1 -0
  216. package/dist/client/assets/{useRouterState-vaElkk3h.js → useRouterState-CNNzU1n3.js} +1 -1
  217. package/dist/client/assets/useSuspenseInfiniteQuery-BiqhNDYa.js +1 -0
  218. package/dist/client/assets/{users-CqYpkztC.js → users-D8zcdKgD.js} +1 -1
  219. package/dist/client/assets/{variant-calendar-74QG3PsN.js → variant-calendar-JZjAzZGm.js} +1 -1
  220. package/dist/client/assets/{view-mode-toggle-ByggSH5e.js → view-mode-toggle-qkJhbePP.js} +1 -1
  221. package/dist/client/index.html +1 -1
  222. package/dist/server/cli.js +1 -1
  223. package/dist/server/server.js +1 -1
  224. package/package.json +1 -1
  225. package/dist/client/assets/app-editor-CYO9AV1B.js +0 -1
  226. package/dist/client/assets/automations-D1Wptd9F.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-Cfx2v-Po.js +0 -1
  228. package/dist/client/assets/project-app-view-Bk9x3Z2s.js +0 -1
  229. package/dist/client/assets/record-editor-YrpnQycO.js +0 -1
  230. package/dist/client/assets/redirect-editor-Dddm82Mc.js +0 -1
  231. package/dist/client/assets/registry-BZttfw8B.js +0 -2
  232. package/dist/client/assets/store-registry-n4v7ysH6.js +0 -2
  233. package/dist/client/assets/useInfiniteQuery-1uepIbby.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-BV83pAlo.js +0 -1
@@ -1 +1 @@
1
- import{r as h}from"./index-Cw3rb0CY.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-BjA99mym.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BDnGvDL6.js","assets/index-Cw3rb0CY.js","assets/index-BIxXN72h.css","assets/ArrowUp-D103r2K-.js","assets/chat-context-CiIVUyi7.js","assets/autosend-CASw5cTt.js","assets/hooks-BW8I5QSD.js","assets/use-mcp-client-DIiptzGj.js","assets/constants-D_FQAPnt.js","assets/auth-Dq5_3BM8.js","assets/decopilot-sse-pool-D_J29ibn.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-DA9fS_3N.js","assets/use-virtual-mcp-DojqH0fL.js","assets/use-collections-B0xwmRaZ.js","assets/use-ai-providers-BUUn59Dg.js","assets/use-decopilot-events-DXRkXYjm.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-D-oHliKf.js","assets/automation-runs-BnZCGXq7.js","assets/select-DVsN-k2X.js","assets/tooltip-CopKItWz.js","assets/Check-LT_cwi6B.js","assets/ChevronDown-KHjOGrD9.js","assets/ChevronUp-DN52maKJ.js","assets/useInfiniteQuery-1uepIbby.js","assets/use-infinite-scroll-C3Aih4BM.js","assets/use-connection-Bs6Ag7o6.js","assets/card-DYuc4WCe.js","assets/sidebar-h6qoVbH0.js","assets/LayoutLeft-DtwphR7R.js","assets/use-mobile-CWspwsRY.js","assets/X-Bv5eNeMh.js","assets/table-CsPWO9c_.js","assets/empty-state-BdGOxGgJ.js","assets/use-members-DXUTOMyu.js","assets/use-org-auth-client-Uv_p1hhi.js","assets/use-clock-tick-BfJv01Rt.js","assets/AlertCircle-2jurQKhk.js","assets/CheckCircle-CkmhXKXX.js","assets/Circle-DQCX2H0G.js","assets/agent-icon-B8y023fO.js","assets/UserPlus01-DwXUEWG3.js","assets/Tool01-BBLo9a3Q.js","assets/Settings02-DxrU02y9.js","assets/Tool02-CIcuxsjc.js","assets/XCircle-B-Ww64Yj.js","assets/ArrowUpRight-CNQXFv9P.js","assets/TrendUp01-DhTZNTl7.js","assets/ZapSquare-fSPFQQtW.js","assets/Users03-BqNZwhmE.js","assets/ChevronRight-dZQYt_cC.js","assets/Stars02-Ctf7Frb4.js","assets/Copy01-DVQGX_kS.js","assets/ZoomOut-DMlDPqRk.js","assets/DotsVertical-CWO-rRmS.js","assets/Globe01-DhetY-Bd.js","assets/Eye-8ZhOiW7-.js","assets/FilterLines-DPPrUVP2.js","assets/Flag01-DUxpNG46.js","assets/Star01-CJEBeeXH.js","assets/Globe04-CGE4GAMx.js","assets/SwitchHorizontal01-BYBnOJTm.js","assets/HardDrive-_cIYkw12.js","assets/Key01-Cvy03JKa.js","assets/LinkExternal01-QzLVgAwK.js","assets/List-DQvBfG-H.js","assets/Monitor01-CQQrxgjG.js","assets/Sun-jBdlUA9W.js","assets/Package-Bp-gCp2T.js","assets/Palette-DN35OGVN.js","assets/Play-DmyUjTxG.js","assets/Plus-BPetnJZB.js","assets/SearchLg-ClmWMMYa.js","assets/SearchMd-Bv2yLPLt.js","assets/Shield01-DKpieCIa.js","assets/Stars01-C3ZvOrDi.js","assets/Trash01-BlEBGTBm.js","assets/Upload01-BsCyAZ7c.js","assets/User01-CabtufW7.js","assets/Users01-DaZKFETD.js","assets/XClose-CC80cbse.js","assets/Zap-DfU6Os0p.js","assets/use-automations-BU1X6X_q.js","assets/useSuspenseInfiniteQuery-BV83pAlo.js","assets/badge-CkYeHqRc.js","assets/checkbox-CEN1MXm4.js","assets/command-Cn4XyR6D.js","assets/index-A56VPcDE.js","assets/dialog-BCSiXXgK.js","assets/popover-BLh2HiPz.js","assets/avatar-p6d-1E48.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DzULKZqD.js","assets/file-type-icon-B2sY71ls.js","assets/monaco-editor-BgQg4n0n.js","assets/index-ztErrW5j.js","assets/index-BJfjEE72.js","assets/shell-layout-BEVkd4ol.js","assets/alert-dialog-D7W-4T1K.js","assets/required-auth-layout-CqJE5lOb.js","assets/use-org-sso-CruyhZ_K.js","assets/integration-icon-DhU6PpGL.js","assets/use-navigate-to-agent-SJiiALqa.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-BewasAtp.js","assets/form-C-7BVP2B.js","assets/label-DEmb7que.js","assets/input-BMv-guKc.js","assets/drawer-Mz-syzNH.js","assets/collection-search-bqD4Na42.js","assets/tabs-CF6qRu1V.js","assets/toggle-group-CVodu526.js","assets/use-deco-credits-7rG1gSE6.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-CQNEEOdX.js","assets/use-registry-connections-UENON7F5.js","assets/extract-connection-data-rsSYZOBB.js","assets/collection-tabs-D99IhIo3.js","assets/textarea-BLFMR312.js","assets/connection-form-helpers-DshTnlxw.js","assets/authenticate-and-persist-oauth-C5BkK2mJ.js","assets/mcp-oauth-B1rEzsfb.js","assets/connect-desktop-dialog-CPqX3vyC.js","assets/select-model-B2-3mkZy.js","assets/skeleton-Thf9bMzT.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-DnlgoQwW.js","assets/dropdown-menu-WWst57wD.js","assets/index-dWJwI92H.js","assets/toolbar-CWtK3Y_M.js","assets/use-debounced-value-Bni9dGfQ.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-qSAe4B8m.js","assets/use-mcp-tools-Cpcz8w7L.js","assets/use-capability-CpK6Y8Ek.js","assets/tools-list-CdgTD7j4.js","assets/switch-C7Q2A8Ys.js","assets/use-debounced-autosave-C5r8JSt-.js","assets/index-DXE2Jy9D.js","assets/search-input-CiaSr8Pp.js","assets/github-repo-picker-C92TWwoi.js","assets/provision-repo-scoped-github-connection-CB4ICKHq.js","assets/use-secrets-jTVlpv8o.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-DaPFyfar.js","assets/toolbar-icon-button-CZK62KWl.js","assets/calendar-DqE8Gycn.js","assets/use-file-configs-BEf4MYt-.js","assets/automation-list-row-CEMzmeMb.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
2
- import{c as $,l as D,j as s,r as A,C as At,n as Qt,m as Yt,d as _t,K as $t,B as ue,aX as us,i as fs}from"./index-Cw3rb0CY.js";import{g as ae}from"./get-initials-D-f_fDFw.js";import{A as re}from"./avatar-p6d-1E48.js";import{d as Et,i as xs,t as ps,e as gs,f as mt,a as Xe,s as hs,b as Ht,g as bs,c as js}from"./UserPlus01-DwXUEWG3.js";import{i as Ns}from"./List-DQvBfG-H.js";import{s as Ot}from"./Plus-BPetnJZB.js";import{e as ys}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-DXUTOMyu.js";import{u as Bt}from"./studio-tools-DA9fS_3N.js";import{t as vs,S as Je}from"./decopilot-sse-pool-D_J29ibn.js";import{u as Ss}from"./use-decopilot-events-DXRkXYjm.js";import{a as Cs}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-2jurQKhk.js";import{i as Jt}from"./CheckCircle-CkmhXKXX.js";import{i as _s}from"./Circle-DQCX2H0G.js";import{s as ws}from"./Eye-8ZhOiW7-.js";import{a as Ds,d as ks,e as Is}from"./dialog-BCSiXXgK.js";import{a as ut,c as ft,d as He,D as xt}from"./dropdown-menu-WWst57wD.js";import{P as wt,a as Dt,b as kt}from"./popover-BLh2HiPz.js";import{b as Wt,C as Zt,a as me,e as pt,d as es,c as ts}from"./command-Cn4XyR6D.js";import{C as Ts}from"./calendar-DqE8Gycn.js";import{u as zs}from"./use-copy-DzULKZqD.js";import{i as As}from"./Check-LT_cwi6B.js";import{i as $s}from"./ChevronRight-dZQYt_cC.js";import{a as Es}from"./Copy01-DVQGX_kS.js";import{n as Os}from"./LinkExternal01-QzLVgAwK.js";import{s as It}from"./User01-CabtufW7.js";import{i as Pt}from"./X-Bv5eNeMh.js";import{g as Bs,b as Fs,e as Rs,f as Ps,a as Ms,D as Ls}from"./drawer-Mz-syzNH.js";import{t as Ft}from"./ChevronDown-KHjOGrD9.js";import{i as ss}from"./FilterLines-DPPrUVP2.js";import{s as Us}from"./Flag01-DUxpNG46.js";import{u as qs}from"./shell-layout-BEVkd4ol.js";function ce(t){const e=$.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let i;e[2]!==a?(i=D("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=i):i=e[3];let o;return e[4]!==n||e[5]!==r||e[6]!==i?(o=s.jsx("img",{src:ys,alt:"Super Agent",width:n,height:n,style:r,className:i}),e[4]=n,e[5]=r,e[6]=i,e[7]=o):o=e[7],o}const Mt=()=>0;function Gs(t){const{orgSlug:e,enabled:l=!0,onUpdate:a}=t,n=A.useRef(a);n.current=a;const r=A.useRef(null),i=A.useRef(l),o=A.useRef(e);(!r.current||i.current!==l||o.current!==e)&&(i.current=l,o.current=e,r.current=f=>{if(!l||!e)return()=>{};const m=x=>{let c;try{c=JSON.parse(x.data)}catch{return}c.data&&n.current(c.data),f()};return vs.subscribe(e,m)}),A.useSyncExternalStore(r.current,Mt,Mt)}function Ks(){const t=$.c(25),{org:e,locator:l}=At(),a=Bt(),n=Qt();let r;t[0]!==l?(r=$t.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const i=r;let o;t[2]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=o):o=t[3];let d;t[4]!==i||t[5]!==o?(d={queryKey:i,queryFn:o},t[4]=i,t[5]=o,t[6]=d):d=t[6];const f=Yt(d);let m;t[7]!==n||t[8]!==i?(m=h=>{n.setQueryData(i,b=>{const j=b??[],N=h;return j.some(y=>y.id===N.id)?j.map(y=>y.id===N.id?N:y):[N,...j]})},t[7]=n,t[8]=i,t[9]=m):m=t[9];let x;t[10]!==e.slug||t[11]!==m?(x={orgSlug:e.slug,onUpdate:m},t[10]=e.slug,t[11]=m,t[12]=x):x=t[12],Gs(x);let c;t[13]!==n||t[14]!==i?(c=h=>{const b=h.subject,j=h.data.status;n.setQueryData(i,N=>N?.map(y=>y.threads.some(v=>v.threadId===b)?{...y,threads:y.threads.map(v=>v.threadId===b?{...v,status:j}:v)}:y))},t[13]=n,t[14]=i,t[15]=c):c=t[15];let u;t[16]!==e.slug||t[17]!==c?(u={orgSlug:e.slug,onTaskStatus:c},t[16]=e.slug,t[17]=c,t[18]=u):u=t[18],Ss(u);let p;t[19]!==f.data?(p=f.data??[],t[19]=f.data,t[20]=p):p=t[20];let g;return t[21]!==f.error||t[22]!==f.isLoading||t[23]!==p?(g={items:p,isLoading:f.isLoading,error:f.error},t[21]=f.error,t[22]=f.isLoading,t[23]=p,t[24]=g):g=t[24],g}function Qs(){const t=$.c(30),{locator:e}=At(),l=Bt(),a=Qt();let n;t[0]!==e?(n=$t.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let i;t[2]!==a||t[3]!==r?(i=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=i):i=t[4];const o=i;let d;t[5]!==l?(d=y=>l.call("TASK_BOARD_ITEM_CREATE",y),t[5]=l,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==d?(f={mutationFn:d,onSuccess:o},t[7]=o,t[8]=d,t[9]=f):f=t[9];const m=_t(f);let x;t[10]!==l?(x=y=>l.call("TASK_BOARD_ITEM_UPDATE",y),t[10]=l,t[11]=x):x=t[11];let c,u;t[12]!==a||t[13]!==r?(c=async y=>{await a.cancelQueries({queryKey:r});const v=a.getQueryData(r);return a.setQueryData(r,I=>I?.map(C=>C.id===y.id?{...C,...y}:C)),{previous:v}},u=(y,v,I)=>{I?.previous&&a.setQueryData(r,I.previous)},t[12]=a,t[13]=r,t[14]=c,t[15]=u):(c=t[14],u=t[15]);let p;t[16]!==o||t[17]!==x||t[18]!==c||t[19]!==u?(p={mutationFn:x,onMutate:c,onError:u,onSettled:o},t[16]=o,t[17]=x,t[18]=c,t[19]=u,t[20]=p):p=t[20];const g=_t(p);let h;t[21]!==l?(h=y=>l.call("TASK_BOARD_ITEM_DELETE",{id:y}),t[21]=l,t[22]=h):h=t[22];let b;t[23]!==o||t[24]!==h?(b={mutationFn:h,onSuccess:o},t[23]=o,t[24]=h,t[25]=b):b=t[25];const j=_t(b);let N;return t[26]!==m||t[27]!==j||t[28]!==g?(N={create:m,update:g,remove:j},t[26]=m,t[27]=j,t[28]=g,t[29]=N):N=t[29],N}function Tt(t){return t.threads.some(e=>e.status==="requires_action")}function ls(t){return t.threads[0]}const ns=["triage","todo","in_progress","in_review","done"],ne={triage:{label:"Backlog",icon:Xt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:_s,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Et,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:ws,iconClassName:"text-warning"},done:{label:"Done",icon:Jt,iconClassName:"text-green-600"}},as=["none","low","medium","high","urgent"],ie={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-orange-500",dotClassName:"bg-orange-500"},urgent:{label:"Urgent",flagClassName:"text-red-500",dotClassName:"bg-red-500"}};function Ys(t){const e=$.c(10),{locator:l}=At(),a=Bt();let n;e[0]!==t||e[1]!==l?(n=$t.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const r=!!t;let i;e[3]!==t||e[4]!==a?(i=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=i):i=e[5];let o;return e[6]!==n||e[7]!==r||e[8]!==i?(o={queryKey:n,enabled:r,queryFn:i},e[6]=n,e[7]=r,e[8]=i,e[9]=o):o=e[9],Yt(o)}function Hs(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function Lt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Vs=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Ve="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Xs={failed:{label:"Error",className:"text-red-600",icon:bs},requires_action:{label:"Needs input",className:"text-amber-600",icon:Ht},in_progress:{label:"Running",className:"text-blue-600",icon:Et,spin:!0},completed:{label:"Completed",className:"text-green-600",icon:Jt},expired:{label:"Expired",className:"text-muted-foreground",icon:Xt}};function Js(t){const e=$.c(164),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:i,onDelete:o,onOpenThread:d,isSaving:f}=t,{data:m}=Vt();let x;e[0]!==m?.data?.members?(x=m?.data?.members??[],e[0]=m?.data?.members,e[1]=x):x=e[1];const c=x,{handleCopy:u,copied:p}=zs(),[g,h]=A.useState(n?.title??""),[b,j]=A.useState(n?.description??""),[N,y]=A.useState(n?.status??r??"triage"),[v,I]=A.useState(n?.priority??"medium"),[C,O]=A.useState(n?.assigneeId??null),q=n?.dueDate;let Q;e[2]!==q?(Q=Lt(q),e[2]=q,e[3]=Q):Q=e[3];const[T,F]=A.useState(Q),[U,M]=A.useState(!1),[R,L]=A.useState(!1);let z;e[4]!==r||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(z=()=>{h(n?.title??""),j(n?.description??""),y(n?.status??r??"triage"),I(n?.priority??"medium"),O(n?.assigneeId??null),F(Lt(n?.dueDate))},e[4]=r,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=z):z=e[11];const G=z;let K;e[12]!==a||e[13]!==G?(K=()=>{a(),G()},e[12]=a,e[13]=G,e[14]=K):K=e[14];const _=K;let k;e[15]!==C||e[16]!==b||e[17]!==T||e[18]!==i||e[19]!==v||e[20]!==N||e[21]!==g?(k=()=>{const S=g.trim();S&&i({title:S,description:b.trim()||null,status:N,priority:v,assigneeId:C,dueDate:T?Hs(T):null})},e[15]=C,e[16]=b,e[17]=T,e[18]=i,e[19]=v,e[20]=N,e[21]=g,e[22]=k):k=e[22];const H=k,B=C===Je;let te;if(e[23]!==C||e[24]!==c){let S;e[26]!==C?(S=V=>V.userId===C,e[26]=C,e[27]=S):S=e[27],te=c.find(S),e[23]=C,e[24]=c,e[25]=te}else te=e[25];const P=te;let X;e[28]!==n||e[29]!==c?(X=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,e[28]=n,e[29]=c,e[30]=X):X=e[30];const E=X,de=ne[N].icon;let le;e[31]!==n?(le=n?ls(n):void 0,e[31]=n,e[32]=le):le=e[32];const J=le;let se;e[33]!==_?(se=S=>!S&&_(),e[33]=_,e[34]=se):se=e[34];const oe=n?"Edit task":"New task";let Y;e[35]!==oe?(Y=s.jsx(Ds,{className:"sr-only",children:oe}),e[35]=oe,e[36]=Y):Y=e[36];let W;e[37]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Pt,{size:16}),e[37]=W):W=e[37];let Z;e[38]!==_?(Z=s.jsx("button",{type:"button","aria-label":"Close",onClick:_,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:W}),e[38]=_,e[39]=Z):Z=e[39];let ee;e[40]===Symbol.for("react.memo_cache_sentinel")?(ee=S=>h(S.target.value),e[40]=ee):ee=e[40];let w;e[41]!==g?(w=s.jsx("input",{value:g,onChange:ee,placeholder:"Task title...",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-medium text-foreground outline-none placeholder:text-foreground/30"}),e[41]=g,e[42]=w):w=e[42];let fe;e[43]===Symbol.for("react.memo_cache_sentinel")?(fe=S=>j(S.target.value),e[43]=fe):fe=e[43];let xe;e[44]!==b?(xe=s.jsx("textarea",{value:b,onChange:fe,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=b,e[45]=xe):xe=e[45];let pe;e[46]!==p||e[47]!==b||e[48]!==u?(pe=b&&s.jsx(ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>u(b),children:p?s.jsx(As,{size:14}):s.jsx(Es,{size:14})}),e[46]=p,e[47]=b,e[48]=u,e[49]=pe):pe=e[49];let ge;e[50]!==xe||e[51]!==pe?(ge=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[xe,pe]}),e[50]=xe,e[51]=pe,e[52]=ge):ge=e[52];let he;e[53]!==E||e[54]!==P||e[55]!==d||e[56]!==J?(he=J&&s.jsx(Ws,{thread:J,startedBy:E??P,onOpen:d}),e[53]=E,e[54]=P,e[55]=d,e[56]=J,e[57]=he):he=e[57];let be;e[58]!==n?(be=n?.id&&s.jsx(tl,{itemId:n.id}),e[58]=n,e[59]=be):be=e[59];let je;e[60]!==w||e[61]!==ge||e[62]!==he||e[63]!==be?(je=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[w,ge,he,be]}),e[60]=w,e[61]=ge,e[62]=he,e[63]=be,e[64]=je):je=e[64];let We;e[65]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[65]=We):We=e[65];const bt=ne[N];let Ne;e[66]!==de||e[67]!==bt.iconClassName?(Ne=s.jsx(de,{size:16,className:bt.iconClassName}),e[66]=de,e[67]=bt.iconClassName,e[68]=Ne):Ne=e[68];const jt=ne[N];let ye;e[69]!==Ne||e[70]!==jt.label?(ye=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ve,children:[Ne,jt.label]})}),e[69]=Ne,e[70]=jt.label,e[71]=ye):ye=e[71];let Ze;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsx(ft,{align:"start",className:"w-44",children:ns.map(S=>{const V=ne[S].icon;return s.jsxs(He,{onSelect:()=>y(S),className:"gap-2",children:[s.jsx(V,{size:16,className:ne[S].iconClassName}),ne[S].label]},S)})}),e[72]=Ze):Ze=e[72];let ve;e[73]!==ye?(ve=s.jsxs(xt,{children:[ye,Ze]}),e[73]=ye,e[74]=ve):ve=e[74];const Nt=v==="none"&&"text-muted-foreground";let Se;e[75]!==Nt?(Se=D(Ve,Nt),e[75]=Nt,e[76]=Se):Se=e[76];let Ce;e[77]!==v?(Ce=v==="none"?s.jsxs(s.Fragment,{children:[s.jsx(xs,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:D("size-2 rounded-full",ie[v].dotClassName)}),ie[v].label]}),e[77]=v,e[78]=Ce):Ce=e[78];let _e;e[79]!==Se||e[80]!==Ce?(_e=s.jsx(ut,{asChild:!0,children:s.jsx("button",{type:"button",className:Se,children:Ce})}),e[79]=Se,e[80]=Ce,e[81]=_e):_e=e[81];let et;e[82]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(ft,{align:"start",className:"w-40",children:as.map(S=>s.jsxs(He,{onSelect:()=>I(S),children:[s.jsx("span",{className:D("size-2 rounded-full",ie[S].dotClassName)}),ie[S].label]},S))}),e[82]=et):et=e[82];let we;e[83]!==_e?(we=s.jsxs(xt,{children:[_e,et]}),e[83]=_e,e[84]=we):we=e[84];const yt=!C&&"text-muted-foreground";let De;e[85]!==yt?(De=D(Ve,yt),e[85]=yt,e[86]=De):De=e[86];let ke;e[87]!==E||e[88]!==P||e[89]!==B?(ke=B&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(re,{url:E.user?.image??void 0,fallback:ae(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(re,{url:E.user?.image??void 0,fallback:ae(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(ce,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):B?s.jsxs(s.Fragment,{children:[s.jsx(ce,{size:16}),"Super Agent"]}):P?s.jsxs(s.Fragment,{children:[s.jsx(re,{url:P.user?.image??void 0,fallback:ae(P.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:P.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ps,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[87]=E,e[88]=P,e[89]=B,e[90]=ke):ke=e[90];let Ie;e[91]!==De||e[92]!==ke?(Ie=s.jsx(wt,{asChild:!0,children:s.jsx("button",{type:"button",className:De,children:ke})}),e[91]=De,e[92]=ke,e[93]=Ie):Ie=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsx(Wt,{placeholder:"Assign to…",className:"h-9"}),e[94]=tt):tt=e[94];let st;e[95]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Zt,{children:"No members found."}),e[95]=st):st=e[95];let lt;e[96]===Symbol.for("react.memo_cache_sentinel")?(lt=()=>{O(Je),L(!1)},e[96]=lt):lt=e[96];let nt;e[97]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsxs(me,{value:"Super Agent",onSelect:lt,className:"gap-2",children:[s.jsx(ce,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[97]=nt):nt=e[97];let at;e[98]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{O(null),L(!1)},e[98]=at):at=e[98];let rt;e[99]===Symbol.for("react.memo_cache_sentinel")?(rt=s.jsxs(pt,{children:[nt,s.jsxs(me,{value:"Unassigned",onSelect:at,className:"gap-2",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[99]=rt):rt=e[99];let Te;if(e[100]!==c){let S;e[102]===Symbol.for("react.memo_cache_sentinel")?(S=V=>s.jsxs(me,{value:V.user?.name??V.userId,onSelect:()=>{O(V.userId),L(!1)},className:"gap-2",children:[s.jsx(re,{url:V.user?.image??void 0,fallback:ae(V.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:V.user?.name??V.userId})]},V.userId),e[102]=S):S=e[102],Te=c.map(S),e[100]=c,e[101]=Te}else Te=e[101];let ze;e[103]!==Te?(ze=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[tt,s.jsxs(ts,{children:[st,rt,s.jsx(pt,{heading:"Members",children:Te})]})]})}),e[103]=Te,e[104]=ze):ze=e[104];let Ae;e[105]!==R||e[106]!==Ie||e[107]!==ze?(Ae=s.jsxs(kt,{open:R,onOpenChange:L,children:[Ie,ze]}),e[105]=R,e[106]=Ie,e[107]=ze,e[108]=Ae):Ae=e[108];let $e;e[109]!==E||e[110]!==B?($e=B&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.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"}),s.jsxs("span",{className:D(Ve,"pointer-events-none"),children:[s.jsx(ce,{size:16}),"Super Agent"]})]}),e[109]=E,e[110]=B,e[111]=$e):$e=e[111];let Ee;e[112]!==Ae||e[113]!==$e?(Ee=s.jsxs("div",{className:"flex flex-col",children:[Ae,$e]}),e[112]=Ae,e[113]=$e,e[114]=Ee):Ee=e[114];const vt=!T&&"text-muted-foreground";let Oe;e[115]!==vt?(Oe=D(Ve,vt),e[115]=vt,e[116]=Oe):Oe=e[116];let it;e[117]===Symbol.for("react.memo_cache_sentinel")?(it=s.jsx(Xe,{size:16,className:"text-muted-foreground"}),e[117]=it):it=e[117];let Be;e[118]!==T?(Be=T?Vs.format(T):"Due date",e[118]=T,e[119]=Be):Be=e[119];let Fe;e[120]!==T?(Fe=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),F(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),F(null))},children:s.jsx(Pt,{size:12})}),e[120]=T,e[121]=Fe):Fe=e[121];let Re;e[122]!==Oe||e[123]!==Be||e[124]!==Fe?(Re=s.jsx(wt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Oe,children:[it,Be,Fe]})}),e[122]=Oe,e[123]=Be,e[124]=Fe,e[125]=Re):Re=e[125];const St=T??void 0;let ot;e[126]===Symbol.for("react.memo_cache_sentinel")?(ot=S=>{F(S??null),S&&M(!1)},e[126]=ot):ot=e[126];let Pe;e[127]!==St?(Pe=s.jsx(Dt,{className:"w-auto p-0",align:"start",children:s.jsx(Ts,{mode:"single",selected:St,onSelect:ot,initialFocus:!0})}),e[127]=St,e[128]=Pe):Pe=e[128];let Me;e[129]!==U||e[130]!==Re||e[131]!==Pe?(Me=s.jsxs(kt,{open:U,onOpenChange:M,children:[Re,Pe]}),e[129]=U,e[130]=Re,e[131]=Pe,e[132]=Me):Me=e[132];let Le;e[133]!==ve||e[134]!==we||e[135]!==Ee||e[136]!==Me?(Le=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[We,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[ve,we,Ee,Me]})]}),e[133]=ve,e[134]=we,e[135]=Ee,e[136]=Me,e[137]=Le):Le=e[137];let Ue;e[138]!==je||e[139]!==Le?(Ue=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[je,Le]}),e[138]=je,e[139]=Le,e[140]=Ue):Ue=e[140];let qe;e[141]!==n||e[142]!==o?(qe=n&&o?s.jsx(ue,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:o,children:s.jsx(hs,{size:16})}):s.jsx("span",{}),e[141]=n,e[142]=o,e[143]=qe):qe=e[143];let Ge;e[144]!==f||e[145]!==g?(Ge=!g.trim()||f,e[144]=f,e[145]=g,e[146]=Ge):Ge=e[146];let ct;e[147]===Symbol.for("react.memo_cache_sentinel")?(ct=s.jsx(Ot,{size:16}),e[147]=ct):ct=e[147];const Ct=n?"Save":"Create task";let Ke;e[148]!==H||e[149]!==Ge||e[150]!==Ct?(Ke=s.jsxs(ue,{size:"sm",disabled:Ge,onClick:H,children:[ct,Ct]}),e[148]=H,e[149]=Ge,e[150]=Ct,e[151]=Ke):Ke=e[151];let Qe;e[152]!==qe||e[153]!==Ke?(Qe=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[qe,Ke]}),e[152]=qe,e[153]=Ke,e[154]=Qe):Qe=e[154];let Ye;e[155]!==Y||e[156]!==Z||e[157]!==Ue||e[158]!==Qe?(Ye=s.jsxs(ks,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[Y,Z,Ue,Qe]}),e[155]=Y,e[156]=Z,e[157]=Ue,e[158]=Qe,e[159]=Ye):Ye=e[159];let dt;return e[160]!==l||e[161]!==se||e[162]!==Ye?(dt=s.jsx(Is,{open:l,onOpenChange:se,children:Ye}),e[160]=l,e[161]=se,e[162]=Ye,e[163]=dt):dt=e[163],dt}function Ws(t){const e=$.c(14),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Xs[l.status]:null,i=l.lastMessage??l.title;let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let f;e[2]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(re,{url:a.user?.image??void 0,fallback:ae(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[o,d,f]}),e[4]=f,e[5]=m):m=e[5];let x;e[6]!==i||e[7]!==n||e[8]!==r||e[9]!==l?(x=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:D("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:D(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),i&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:i}),n&&s.jsx($s,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=i,e[7]=n,e[8]=r,e[9]=l,e[10]=x):x=e[10];let c;return e[11]!==m||e[12]!==x?(c=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[m,x]}),e[11]=m,e[12]=x,e[13]=c):c=e[13],c}function Zs(t){return t.merged?{label:"Merged",className:"text-purple-600",icon:gs}:t.state==="closed"?{label:"Closed",className:"text-red-600",icon:mt}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:mt}:{label:"Open",className:"text-green-600",icon:mt}}function el(t){const e=$.c(38),{pr:l}=t;let a,n,r,i,o,d,f,m;if(e[0]!==l){n=Zs(l);let v;e[9]!==l.body?(v=l.body?.trim(),e[9]=l.body,e[10]=v):v=e[10],a=v,o=l.url,d="_blank",f="noreferrer",m="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",i="flex items-center gap-2",r=D("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=r,e[4]=i,e[5]=o,e[6]=d,e[7]=f,e[8]=m}else a=e[1],n=e[2],r=e[3],i=e[4],o=e[5],d=e[6],f=e[7],m=e[8];let x;e[11]!==n.icon?(x=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=x):x=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let u;e[15]!==r||e[16]!==x||e[17]!==c?(u=s.jsxs("span",{className:r,children:[x,c]}),e[15]=r,e[16]=x,e[17]=c,e[18]=u):u=e[18];const p=l.title??`${l.repoOwner}/${l.repoName}`;let g;e[19]!==p?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let h;e[21]!==l.number?(h=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=h):h=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Os,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=b):b=e[23];let j;e[24]!==g||e[25]!==h||e[26]!==i||e[27]!==u?(j=s.jsxs("span",{className:i,children:[u,g,h,b]}),e[24]=g,e[25]=h,e[26]=i,e[27]=u,e[28]=j):j=e[28];let N;e[29]!==a?(N=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=N):N=e[30];let y;return e[31]!==j||e[32]!==N||e[33]!==o||e[34]!==d||e[35]!==f||e[36]!==m?(y=s.jsxs("a",{href:o,target:d,rel:f,className:m,children:[j,N]}),e[31]=j,e[32]=N,e[33]=o,e[34]=d,e[35]=f,e[36]=m,e[37]=y):y=e[37],y}function tl(t){const e=$.c(5),{itemId:l}=t,{data:a,isLoading:n}=Ys(l);if(!n&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(mt,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=r):r=e[0];let i;e[1]!==a?(i=a?a.map(sl):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Et,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=i):i=e[2];let o;return e[3]!==i?(o=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[r,i]}),e[3]=i,e[4]=o):o=e[4],o}function sl(t){return s.jsx(el,{pr:t},t.url)}const zt="__unassigned__",gt={assignee:null,priority:null,due:null};function ll(t){return t.assignee!==null||t.priority!==null||t.due!==null}function nl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const al=864e5;function rl(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function il(t,e){if(e.assignee!==null){if(e.assignee===zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!rl(l,a)||e.due==="week"&&(l<a||l>a+7*al))return!1}return!0}const Ut=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function ht(t,e=!1){return D("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function ol(t){const e=$.c(62),{value:l,members:a,onChange:n,block:r}=t,[i,o]=A.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(It,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let f=d,m="Assignee";if(l===zt)m="Unassigned";else if(l===Je){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ce,{size:14}),e[1]=_):_=e[1],f=_,m="Super Agent"}else if(l){let _,k,H,B;if(e[2]!==a||e[3]!==l){let P;e[8]!==l?(P=X=>X.userId===l,e[8]=l,e[9]=P):P=e[9],k=a.find(P),_=re,H=k?.user?.image??void 0,B=ae(k?.user?.name),e[2]=a,e[3]=l,e[4]=_,e[5]=k,e[6]=H,e[7]=B}else _=e[4],k=e[5],H=e[6],B=e[7];let te;e[10]!==_||e[11]!==H||e[12]!==B?(te=s.jsx(_,{url:H,fallback:B,shape:"circle",size:"2xs"}),e[10]=_,e[11]=H,e[12]=B,e[13]=te):te=e[13],f=te,m=k?.user?.name??"Member"}let x;e[14]!==n?(x=_=>{n(_),o(!1)},e[14]=n,e[15]=x):x=e[15];const c=x,u=l!==null;let p;e[16]!==r||e[17]!==u?(p=ht(u,r),e[16]=r,e[17]=u,e[18]=p):p=e[18];const g=p,h=r&&"ml-auto";let b;e[19]!==h?(b=D("shrink-0 opacity-60",h),e[19]=h,e[20]=b):b=e[20];const j=b;let N;e[21]!==m?(N=s.jsx("span",{className:"max-w-[10rem] truncate",children:m}),e[21]=m,e[22]=N):N=e[22];let y;e[23]!==j?(y=s.jsx(Ft,{size:12,className:j}),e[23]=j,e[24]=y):y=e[24];let v;e[25]!==f||e[26]!==N||e[27]!==y||e[28]!==g?(v=s.jsx(wt,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[f,N,y]})}),e[25]=f,e[26]=N,e[27]=y,e[28]=g,e[29]=v):v=e[29];let I;e[30]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Wt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=I):I=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Zt,{children:"No members found."}),e[31]=C):C=e[31];let O;e[32]!==c?(O=s.jsx(me,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=O):O=e[33];let q;e[34]!==c?(q=()=>c(zt),e[34]=c,e[35]=q):q=e[35];let Q;e[36]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(It,{size:16,className:"text-muted-foreground"}),e[36]=Q):Q=e[36];let T;e[37]!==q?(T=s.jsxs(me,{value:"Unassigned",onSelect:q,className:"gap-2",children:[Q,"Unassigned"]}),e[37]=q,e[38]=T):T=e[38];let F;e[39]!==c?(F=()=>c(Je),e[39]=c,e[40]=F):F=e[40];let U;e[41]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),e[41]=U):U=e[41];let M;e[42]!==F?(M=s.jsxs(me,{value:"Super Agent",onSelect:F,className:"gap-2",children:[U,"Super Agent"]}),e[42]=F,e[43]=M):M=e[43];let R;e[44]!==O||e[45]!==T||e[46]!==M?(R=s.jsxs(pt,{children:[O,T,M]}),e[44]=O,e[45]=T,e[46]=M,e[47]=R):R=e[47];let L;if(e[48]!==a||e[49]!==c){let _;e[51]!==c?(_=k=>s.jsxs(me,{value:k.user?.name??k.userId,onSelect:()=>c(k.userId),className:"gap-2",children:[s.jsx(re,{url:k.user?.image??void 0,fallback:ae(k.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:k.user?.name??k.userId})]},k.userId),e[51]=c,e[52]=_):_=e[52],L=a.map(_),e[48]=a,e[49]=c,e[50]=L}else L=e[50];let z;e[53]!==L?(z=s.jsx(pt,{heading:"Members",children:L}),e[53]=L,e[54]=z):z=e[54];let G;e[55]!==R||e[56]!==z?(G=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[I,s.jsxs(ts,{children:[C,R,z]})]})}),e[55]=R,e[56]=z,e[57]=G):G=e[57];let K;return e[58]!==i||e[59]!==G||e[60]!==v?(K=s.jsxs(kt,{open:i,onOpenChange:o,children:[v,G]}),e[58]=i,e[59]=G,e[60]=v,e[61]=K):K=e[61],K}function cl(t){const e=$.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let i;e[0]!==n||e[1]!==r?(i=ht(r,n),e[0]=n,e[1]=r,e[2]=i):i=e[2];const o=i,d=n&&"ml-auto";let f;e[3]!==d?(f=D("shrink-0 opacity-60",d),e[3]=d,e[4]=f):f=e[4];const m=f;let x;e[5]!==l?(x=l?s.jsx("span",{className:D("size-2 shrink-0 rounded-full",ie[l].dotClassName)}):s.jsx(Us,{size:14,className:"shrink-0"}),e[5]=l,e[6]=x):x=e[6];const c=l?ie[l].label:"Priority";let u;e[7]!==m?(u=s.jsx(Ft,{size:12,className:m}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==x||e[10]!==c||e[11]!==u||e[12]!==o?(p=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[x,c,u]})}),e[9]=x,e[10]=c,e[11]=u,e[12]=o,e[13]=p):p=e[13];let g,h;e[14]!==a?(h=s.jsx(He,{onSelect:()=>a(null),children:"Any priority"}),g=as.map(N=>s.jsxs(He,{onSelect:()=>a(N),className:"gap-2",children:[s.jsx("span",{className:D("size-2 rounded-full",ie[N].dotClassName)}),ie[N].label]},N)),e[14]=a,e[15]=g,e[16]=h):(g=e[15],h=e[16]);let b;e[17]!==g||e[18]!==h?(b=s.jsxs(ft,{align:"start",className:"w-40",children:[h,g]}),e[17]=g,e[18]=h,e[19]=b):b=e[19];let j;return e[20]!==b||e[21]!==p?(j=s.jsxs(xt,{children:[p,b]}),e[20]=b,e[21]=p,e[22]=j):j=e[22],j}function dl(t){const e=$.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=Ut.find(C=>C.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const i=r,o=l!==null;let d;e[2]!==n||e[3]!==o?(d=ht(o,n),e[2]=n,e[3]=o,e[4]=d):d=e[4];const f=d,m=n&&"ml-auto";let x;e[5]!==m?(x=D("shrink-0 opacity-60",m),e[5]=m,e[6]=x):x=e[6];const c=x;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Xe,{size:14,className:"shrink-0"}),e[7]=u):u=e[7];const p=i??"Due date";let g;e[8]!==c?(g=s.jsx(Ft,{size:12,className:c}),e[8]=c,e[9]=g):g=e[9];let h;e[10]!==p||e[11]!==g||e[12]!==f?(h=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,p,g]})}),e[10]=p,e[11]=g,e[12]=f,e[13]=h):h=e[13];let b;e[14]!==a?(b=()=>a(null),e[14]=a,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Xe,{size:16,className:"text-muted-foreground"}),e[16]=j):j=e[16];let N;e[17]!==b?(N=s.jsxs(He,{onSelect:b,className:"gap-2",children:[j,"Any time"]}),e[17]=b,e[18]=N):N=e[18];let y;e[19]!==a?(y=Ut.map(C=>{const O=C.value==="overdue";return s.jsxs(He,{onSelect:()=>a(C.value),className:D("gap-2",O&&"text-destructive"),children:[s.jsx(Xe,{size:16,className:D("shrink-0",O?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=y):y=e[20];let v;e[21]!==N||e[22]!==y?(v=s.jsxs(ft,{align:"start",className:"w-44",children:[N,y]}),e[21]=N,e[22]=y,e[23]=v):v=e[23];let I;return e[24]!==v||e[25]!==h?(I=s.jsxs(xt,{children:[h,v]}),e[24]=v,e[25]=h,e[26]=I):I=e[26],I}function rs(t){const e=$.c(26),{filters:l,members:a,onChange:n,block:r}=t;let i;e[0]!==l||e[1]!==n?(i=u=>n({...l,assignee:u}),e[0]=l,e[1]=n,e[2]=i):i=e[2];let o;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==i?(o=s.jsx(ol,{block:r,value:l.assignee,members:a,onChange:i}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=i,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==n?(d=u=>n({...l,priority:u}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let f;e[11]!==r||e[12]!==l.priority||e[13]!==d?(f=s.jsx(cl,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=f):f=e[14];let m;e[15]!==l||e[16]!==n?(m=u=>n({...l,due:u}),e[15]=l,e[16]=n,e[17]=m):m=e[17];let x;e[18]!==r||e[19]!==l.due||e[20]!==m?(x=s.jsx(dl,{block:r,value:l.due,onChange:m}),e[18]=r,e[19]=l.due,e[20]=m,e[21]=x):x=e[21];let c;return e[22]!==o||e[23]!==f||e[24]!==x?(c=s.jsxs(s.Fragment,{children:[o,f,x]}),e[22]=o,e[23]=f,e[24]=x,e[25]=c):c=e[25],c}function ml(t){const e=$.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ss,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==l||e[2]!==a||e[3]!==n?(i=s.jsx(rs,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=i):i=e[4];let o;e[5]!==l||e[6]!==n?(o=ll(l)&&s.jsx("button",{type:"button",onClick:()=>n(gt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=o):o=e[7];let d;return e[8]!==i||e[9]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,i,o]}),e[8]=i,e[9]=o,e[10]=d):d=e[10],d}function ul(t){const e=$.c(26),{filters:l,members:a,onChange:n}=t,[r,i]=A.useState(!1),o=nl(l),d=o>0;let f;e[0]!==d?(f=ht(d),e[0]=d,e[1]=f):f=e[1];const m=f;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ss,{size:14,className:"shrink-0"}),e[2]=x):x=e[2];let c;e[3]!==o?(c=o>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:o}),e[3]=o,e[4]=c):c=e[4];let u;e[5]!==c||e[6]!==m?(u=s.jsx(Bs,{asChild:!0,children:s.jsxs("button",{type:"button",className:m,children:[x,"Filters",c]})}),e[5]=c,e[6]=m,e[7]=u):u=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Fs,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=p):p=e[8];let g;e[9]!==l||e[10]!==a||e[11]!==n?(g=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(rs,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=g):g=e[12];let h;e[13]!==o||e[14]!==n?(h=o>0&&s.jsx(ue,{variant:"outline",className:"flex-1",onClick:()=>n(gt),children:"Clear all"}),e[13]=o,e[14]=n,e[15]=h):h=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Rs,{asChild:!0,children:s.jsx(ue,{className:"flex-1",children:"Done"})}),e[16]=b):b=e[16];let j;e[17]!==h?(j=s.jsxs(Ps,{className:"flex-row gap-2",children:[h,b]}),e[17]=h,e[18]=j):j=e[18];let N;e[19]!==j||e[20]!==g?(N=s.jsxs(Ms,{className:"p-0",children:[p,g,j]}),e[19]=j,e[20]=g,e[21]=N):N=e[21];let y;return e[22]!==r||e[23]!==N||e[24]!==u?(y=s.jsxs(Ls,{open:r,onOpenChange:i,direction:"bottom",children:[u,N]}),e[22]=r,e[23]=N,e[24]=u,e[25]=y):y=e[25],y}const qt=380,fl=90,Gt=5,xl="cubic-bezier(0.22, 0.61, 0.36, 1)",pl=8;function gl(t,e){const l=A.useRef(new Map);A.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,i=new Map,o=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const u=c.dataset.flipId;if(!u)continue;const p=c.getBoundingClientRect();i.set(u,p);const g=r.get(u);if(!g)continue;const h=g.left-p.left,b=g.top-p.top;(h||b)&&d.push({el:c,dx:h,dy:b,lane:Math.abs(h)>pl})}if(l.current=i,o||d.length===0)return;for(const c of d){const u=c.lane?` rotate(${c.dx>0?Gt:-Gt}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${u}`,c.lane&&(c.el.style.zIndex="10")}let f=0;const m=[],x=requestAnimationFrame(()=>{for(const c of d){const u=c.lane?f++*fl:0;c.el.style.transition=`transform ${qt}ms ${xl} ${u}ms`,c.el.style.transform="",m.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},qt+u+30))}});return()=>{cancelAnimationFrame(x);for(const c of m)clearTimeout(c)}},[e,t])}us(()=>import("./index-BDnGvDL6.js").then(t=>t.aY),__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])).catch(()=>{});function hl(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ms,{})})})}),t[0]=e):e=t[0],e}const bl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function jl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:bl.format(e),overdue:l}}const Rt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function is(){const t=$.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=D(Rt,"border-amber-500/30 text-amber-600"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Ht,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function os(t){const e=$.c(7),{priority:l}=t,a=ie[l];let n;e[0]!==a.dotClassName?(n=D("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let i;return e[4]!==a.label||e[5]!==r?(i=s.jsxs("span",{className:Rt,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=i):i=e[6],i}function cs(t){const e=$.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:o,overdue:d}=jl(l);a=o,n=D(Rt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Xe,{size:14}),e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==n?(i=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=i):i=e[6],i}function ds(t){const e=$.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===Je){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let i;e[0]!==n?(i=n&&s.jsx(re,{url:n.user?.image??void 0,fallback:ae(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=i):i=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{size:16,className:"ring-2 ring-background"}),e[2]=o):o=e[2];let d;return e[3]!==r||e[4]!==i?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[i,o]}),e[3]=r,e[4]=i,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,i=a.user?.name;let o;e[6]!==i?(o=ae(i),e[6]=i,e[7]=o):o=e[7];let d;return e[8]!==r||e[9]!==o?(d=s.jsx(re,{url:r,fallback:o,shape:"circle",size:"2xs"}),e[8]=r,e[9]=o,e[10]=d):d=e[10],d}return null}function ms(){const t=$.c(64),{items:e,isLoading:l}=Ks(),a=Qs(),{data:n}=Vt();let r,i;t[0]!==n?.data?.members?(r=n?.data?.members??[],i=new Map(r.map(Nl)),t[0]=n?.data?.members,t[1]=r,t[2]=i):(r=t[1],i=t[2]);const o=i,[d,f]=A.useState("board"),[m,x]=A.useState(gt),[c,u]=A.useState(!1),[p,g]=A.useState(null),[h,b]=A.useState(null),{setTaskId:j}=qs();let N,y,v,I;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==d||t[8]!==o||t[9]!==r){I=Symbol.for("react.early_return_sentinel");e:{let z;t[14]!==m?(z=w=>il(w,m),t[14]=m,t[15]=z):z=t[15];const G=e.filter(z);let K;t[16]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{g(null),b(null),u(!0)},t[16]=K):K=t[16];const _=K;let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k=w=>{g(null),b(w),u(!0)},t[17]=k):k=t[17];const H=k;let B;t[18]===Symbol.for("react.memo_cache_sentinel")?(B=w=>{g(w),u(!0)},t[18]=B):B=t[18];const P=B;if(l&&e.length===0){let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[19]=w):w=t[19],I=w;break e}N="flex min-h-0 flex-1 flex-col";let X;t[20]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[20]=X):X=t[20];let E;t[21]!==m||t[22]!==e.length||t[23]!==r?(E=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(ul,{filters:m,members:r,onChange:x})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(ml,{filters:m,members:r,onChange:x})})]}),t[21]=m,t[22]=e.length,t[23]=r,t[24]=E):E=t[24];const de=d==="list";let le;t[25]===Symbol.for("react.memo_cache_sentinel")?(le=()=>f("list"),t[25]=le):le=t[25];let J;t[26]!==de?(J=s.jsx(Kt,{active:de,onClick:le,icon:Ns,label:"List"}),t[26]=de,t[27]=J):J=t[27];const se=d==="board";let oe;t[28]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>f("board"),t[28]=oe):oe=t[28];let Y;t[29]!==se?(Y=s.jsx(Kt,{active:se,onClick:oe,icon:js,label:"Board"}),t[29]=se,t[30]=Y):Y=t[30];let W;t[31]!==J||t[32]!==Y?(W=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[J,Y]}),t[31]=J,t[32]=Y,t[33]=W):W=t[33];let Z;t[34]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(ue,{size:"sm",onClick:_,children:[s.jsx(Ot,{size:16}),"New task"]}),t[34]=Z):Z=t[34];let ee;t[35]!==W?(ee=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[W,Z]}),t[35]=W,t[36]=ee):ee=t[36],t[37]!==E||t[38]!==ee?(y=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[X,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[E,ee]})]}),t[37]=E,t[38]=ee,t[39]=y):y=t[39],v=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):G.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(ue,{variant:"outline",size:"sm",onClick:()=>x(gt),children:"Clear filters"})]})}):d==="board"?s.jsx(yl,{items:G,memberByUserId:o,onOpen:P,onCreate:H,onMove:(w,fe)=>a.update.mutate({id:w,status:fe})}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:G.map(w=>s.jsx(Cl,{item:w,assignee:w.assigneeId?o.get(w.assigneeId):void 0,assignedBy:w.assignedBy?o.get(w.assignedBy):void 0,onOpen:()=>P(w)},w.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=d,t[8]=o,t[9]=r,t[10]=N,t[11]=y,t[12]=v,t[13]=I}else N=t[10],y=t[11],v=t[12],I=t[13];if(I!==Symbol.for("react.early_return_sentinel"))return I;const C=c?p?.id??`new-${h??"default"}`:"closed";let O;t[40]===Symbol.for("react.memo_cache_sentinel")?(O=()=>u(!1),t[40]=O):O=t[40];const q=p??void 0,Q=h??void 0,T=a.create.isPending||a.update.isPending;let F;t[41]!==a.create||t[42]!==a.update||t[43]!==p?(F=z=>{p?a.update.mutate({id:p.id,...z}):a.create.mutate(z),u(!1)},t[41]=a.create,t[42]=a.update,t[43]=p,t[44]=F):F=t[44];let U;t[45]!==a.remove||t[46]!==p?(U=p?()=>{a.remove.mutate(p.id),u(!1)}:void 0,t[45]=a.remove,t[46]=p,t[47]=U):U=t[47];let M;t[48]!==j?(M=z=>{z.virtualMcpId&&(u(!1),j(z.threadId,z.virtualMcpId,{main:z.hasPreview?"preview":"board"}))},t[48]=j,t[49]=M):M=t[49];let R;t[50]!==c||t[51]!==F||t[52]!==U||t[53]!==M||t[54]!==C||t[55]!==q||t[56]!==Q||t[57]!==T?(R=s.jsx(Js,{open:c,onClose:O,item:q,defaultStatus:Q,isSaving:T,onSubmit:F,onDelete:U,onOpenThread:M},C),t[50]=c,t[51]=F,t[52]=U,t[53]=M,t[54]=C,t[55]=q,t[56]=Q,t[57]=T,t[58]=R):R=t[58];let L;return t[59]!==N||t[60]!==R||t[61]!==y||t[62]!==v?(L=s.jsxs("div",{className:N,children:[y,v,R]}),t[59]=N,t[60]=R,t[61]=y,t[62]=v,t[63]=L):L=t[63],L}function Nl(t){return[t.userId,t]}function Kt(t){const e=$.c(11),{active:l,onClick:a,icon:n,label:r}=t,i=`${r} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==o?(d=D("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=d):d=e[1];let f;e[2]!==n?(f=s.jsx(n,{size:14}),e[2]=n,e[3]=f):f=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==i||e[8]!==d||e[9]!==f?(m=s.jsxs("button",{type:"button",onClick:a,"aria-label":i,"aria-pressed":l,className:d,children:[f,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=i,e[8]=d,e[9]=f,e[10]=m):m=e[10],m}function yl(t){const e=$.c(11),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:i}=t,[o,d]=A.useState(null),f=A.useRef(null);let m;e[0]!==l?(m=l.map(vl).join(","),e[0]=l,e[1]=m):m=e[1],gl(f,m);let c;e[2]!==l||e[3]!==a||e[4]!==r||e[5]!==i||e[6]!==n||e[7]!==o?(c=ns.map(p=>{const g=l.filter(j=>j.status===p),h=ne[p],b=h.icon;return s.jsxs("div",{onDragOver:j=>{j.preventDefault(),d(p)},onDragLeave:j=>{j.currentTarget.contains(j.relatedTarget)||d(null)},onDrop:j=>{j.preventDefault();const N=j.dataTransfer.getData("text/plain");N&&i(N,p),d(null)},className:D("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",o===p&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(b,{size:15,className:D("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:g.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>r(p),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Ot,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:g.map(j=>s.jsx(Sl,{item:j,assignee:j.assigneeId?a.get(j.assigneeId):void 0,assignedBy:j.assignedBy?a.get(j.assignedBy):void 0,onOpen:()=>n(j)},j.id))})]},p)}),e[2]=l,e[3]=a,e[4]=r,e[5]=i,e[6]=n,e[7]=o,e[8]=c):c=e[8];let u;return e[9]!==c?(u=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:c})}),e[9]=c,e[10]=u):u=e[10],u}function vl(t){return`${t.id}:${t.status}`}function Sl(t){const e=$.c(29),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,i=ne[l.status],o=i.icon,d=ls(l)?.lastMessage,f=l.id;let m;e[0]!==l.id?(m=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=m):m=e[1];const x=l.title;let c;e[2]!==i.iconClassName?(c=D("mt-px shrink-0",i.iconClassName),e[2]=i.iconClassName,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==c?(u=s.jsx(o,{size:16,className:c}),e[4]=o,e[5]=c,e[6]=u):u=e[6];let p;e[7]!==l.title?(p=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=p):p=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==l?(g=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=g):g=e[12];let h;e[13]!==u||e[14]!==p||e[15]!==g?(h=s.jsxs("div",{className:"flex items-start gap-2",children:[u,p,g]}),e[13]=u,e[14]=p,e[15]=g,e[16]=h):h=e[16];let b;e[17]!==d?(b=d&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:d}),e[17]=d,e[18]=b):b=e[18];let j;e[19]!==l?(j=(Tt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Tt(l)&&s.jsx(is,{}),l.priority!=="none"&&s.jsx(os,{priority:l.priority}),l.dueDate&&s.jsx(cs,{iso:l.dueDate})]}),e[19]=l,e[20]=j):j=e[20];let N;return e[21]!==l.id||e[22]!==l.title||e[23]!==r||e[24]!==j||e[25]!==m||e[26]!==h||e[27]!==b?(N=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":f,onDragStart:m,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[h,b,j]}),e[21]=l.id,e[22]=l.title,e[23]=r,e[24]=j,e[25]=m,e[26]=h,e[27]=b,e[28]=N):N=e[28],N}function Cl(t){const e=$.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,i=ne[l.status],o=i.icon;let d;e[0]!==i.iconClassName?(d=D("shrink-0",i.iconClassName),e[0]=i.iconClassName,e[1]=d):d=e[1];let f;e[2]!==o||e[3]!==d?(f=s.jsx(o,{size:16,className:d}),e[2]=o,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==l.title?(m=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=m):m=e[6];let x;e[7]!==l?(x=Tt(l)&&s.jsx(is,{}),e[7]=l,e[8]=x):x=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(os,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let u;e[11]!==l.dueDate?(u=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(cs,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=u):u=e[12];let p;e[13]!==n||e[14]!==a||e[15]!==l?(p=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=p):p=e[16];let g;e[17]!==l.createdAt?(g=Cs(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=g):g=e[18];let h;e[19]!==g?(h=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:g}),e[19]=g,e[20]=h):h=e[20];let b;return e[21]!==r||e[22]!==f||e[23]!==m||e[24]!==x||e[25]!==c||e[26]!==u||e[27]!==p||e[28]!==h?(b=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[f,m,x,c,u,p,h]}),e[21]=r,e[22]=f,e[23]=m,e[24]=x,e[25]=c,e[26]=u,e[27]=p,e[28]=h,e[29]=b):b=e[29],b}const nn=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ms,default:hl},Symbol.toStringTag,{value:"Module"}));export{ie as P,ne as S,Js as T,Qs as a,ce as b,ms as c,nn as i,Ks as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bn42m9nP.js","assets/index-BjA99mym.js","assets/index-BIxXN72h.css","assets/ArrowUp-C8ZuZGYN.js","assets/chat-context-5GcrkjU_.js","assets/autosend-B5vQah6Z.js","assets/hooks-BkiREXsK.js","assets/use-mcp-client-ByfO-SOi.js","assets/constants-D_FQAPnt.js","assets/auth-CDrg40fF.js","assets/decopilot-sse-pool-DZc3N0ZE.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-BV50QJsF.js","assets/use-virtual-mcp-F5qdfs0o.js","assets/use-collections-D9Vclmxz.js","assets/use-ai-providers-BSIkFHe_.js","assets/use-decopilot-events-x2M8wr5H.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-CVOJkT70.js","assets/automation-runs-DudUTkFf.js","assets/select-C38jiIx6.js","assets/tooltip-BOdaaz8D.js","assets/Check-B9L3Ctfx.js","assets/ChevronDown-Dg-cESk6.js","assets/ChevronUp-kjji0ksd.js","assets/useInfiniteQuery-BkAR5Pxk.js","assets/use-infinite-scroll-DySJeYWA.js","assets/use-connection-CzLSKf3i.js","assets/card-fNZ7-6Ft.js","assets/sidebar-BtLxIN0X.js","assets/LayoutLeft-Ds1Bnqod.js","assets/use-mobile-B7ewum1J.js","assets/X-D9y8h5bN.js","assets/table-AKjHrNxt.js","assets/empty-state-BrJLgIKj.js","assets/use-members-ChwmWODj.js","assets/use-org-auth-client-Didx1OUx.js","assets/use-clock-tick-Dw69rdkf.js","assets/AlertCircle-CoMkLPYZ.js","assets/CheckCircle-VCLTuEyV.js","assets/Circle-CV9Iar2I.js","assets/agent-icon-CiWkt4Fr.js","assets/UserPlus01-Ckdv_SP0.js","assets/Tool01-Dg3rq5Vw.js","assets/Settings02-BCk-4F1r.js","assets/Tool02-Df3abBJF.js","assets/XCircle-DxrM3oM4.js","assets/ArrowUpRight-DRyV5caw.js","assets/TrendUp01-BRt_MOTs.js","assets/ZapSquare-DY-Y5vF0.js","assets/Users03-B1PvTS45.js","assets/ChevronRight-COgx0R1b.js","assets/Stars02-Day0NxDs.js","assets/Copy01-CIfJ2CWy.js","assets/ZoomOut-B0UZXMMj.js","assets/DotsVertical-DOOKh2UC.js","assets/Globe01-BTyxZV0a.js","assets/Eye-BFgP-2fZ.js","assets/FilterLines-nOSo0w2R.js","assets/Flag01-Bp__n1vu.js","assets/Star01-B_hs24dd.js","assets/Globe04-VeC01HgQ.js","assets/SwitchHorizontal01-pvfyuxd3.js","assets/HardDrive-BY_ap45O.js","assets/Key01-BO8j2bJt.js","assets/LinkExternal01-H7tJOo3z.js","assets/List-DBmlFXSu.js","assets/Monitor01-CCfL6VXF.js","assets/Sun-DFTbE-HI.js","assets/Package-CmANPXcP.js","assets/Palette-mTfP_tjW.js","assets/Play-CfT11ORS.js","assets/Plus-CEFSqmDE.js","assets/SearchLg-DDrU9DfP.js","assets/SearchMd-COG_cfAf.js","assets/Shield01-BPzTEBmD.js","assets/Stars01-POGtbKvF.js","assets/Trash01-BHY0zG6c.js","assets/Upload01-R2qlYcTu.js","assets/User01-Cbnom0b9.js","assets/Users01-CuC_Un02.js","assets/XClose-pja7DdTc.js","assets/Zap-fLF5olBD.js","assets/use-automations-D5WMzBt3.js","assets/useSuspenseInfiniteQuery-BiqhNDYa.js","assets/badge-pNnA-bf4.js","assets/checkbox-B_Dg3P58.js","assets/command-D1JmubF9.js","assets/index-CLopVhSn.js","assets/dialog-Dlr1m8SN.js","assets/popover-CKFLhO7y.js","assets/avatar-Cxrd5VrY.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-g8nddtMC.js","assets/file-type-icon-B2w6oDIO.js","assets/monaco-editor-B7i8SRa6.js","assets/index-DaCoUJoi.js","assets/index-Du9qKPxu.js","assets/shell-layout-DS-oG0dR.js","assets/alert-dialog-B4Mgc7VK.js","assets/required-auth-layout-BbBzFz8U.js","assets/use-org-sso-CGcGhJdc.js","assets/integration-icon-BzGxo36b.js","assets/use-navigate-to-agent-OWYhqIhY.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-2jarxGEM.js","assets/form-BK4CR2Ok.js","assets/label-BmyWsYVU.js","assets/input-2p0SJVaJ.js","assets/drawer-BRYxPnMu.js","assets/collection-search-B5FAoOba.js","assets/tabs-ZV1zF7YG.js","assets/toggle-group-DwuCFBil.js","assets/use-deco-credits-CXKTbfDa.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-DuFuh5IN.js","assets/use-registry-connections-DT78tsl3.js","assets/extract-connection-data-Bl07HDer.js","assets/collection-tabs-Chh3-dis.js","assets/textarea-joqKgdpX.js","assets/connection-form-helpers-C4Nm5Nzm.js","assets/authenticate-and-persist-oauth-C5RfRLXv.js","assets/mcp-oauth-DLeICbDJ.js","assets/connect-desktop-dialog-BxuIVzop.js","assets/select-model-F8T2Eftn.js","assets/skeleton-DNTKkske.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-BMW5QXEC.js","assets/dropdown-menu-VaFb6Xm_.js","assets/index-CGqe-QXq.js","assets/toolbar-B-lbazc3.js","assets/use-debounced-value-CjrbNm_X.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-xw9gR1E4.js","assets/use-mcp-tools-D01ovxx0.js","assets/use-capability-CVDmnnAd.js","assets/tools-list-CM2o5NwA.js","assets/switch-BcezFNrZ.js","assets/use-debounced-autosave-B-2_mvpX.js","assets/index-COwqX8g-.js","assets/search-input-Bl-AK5Ip.js","assets/github-repo-picker-Dkwp10Pn.js","assets/provision-repo-scoped-github-connection-CB4ICKHq.js","assets/use-secrets-Dj1WK4lB.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-CRmk8liS.js","assets/toolbar-icon-button-BeLQ-KBq.js","assets/calendar-CBPHJMpv.js","assets/use-file-configs-D2XcXxzG.js","assets/automation-list-row-D88PJ6v3.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
2
+ import{c as $,l as D,j as s,r as A,C as At,n as Qt,m as Yt,d as _t,K as $t,B as ue,aX as us,i as fs}from"./index-BjA99mym.js";import{g as ae}from"./get-initials-D-f_fDFw.js";import{A as re}from"./avatar-Cxrd5VrY.js";import{d as Et,i as xs,t as ps,e as gs,f as mt,a as Xe,s as hs,b as Ht,g as bs,c as js}from"./UserPlus01-Ckdv_SP0.js";import{i as Ns}from"./List-DBmlFXSu.js";import{s as Ot}from"./Plus-CEFSqmDE.js";import{e as ys}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-ChwmWODj.js";import{u as Bt}from"./studio-tools-BV50QJsF.js";import{t as vs,S as Je}from"./decopilot-sse-pool-DZc3N0ZE.js";import{u as Ss}from"./use-decopilot-events-x2M8wr5H.js";import{a as Cs}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-CoMkLPYZ.js";import{i as Jt}from"./CheckCircle-VCLTuEyV.js";import{i as _s}from"./Circle-CV9Iar2I.js";import{s as ws}from"./Eye-BFgP-2fZ.js";import{a as Ds,d as ks,e as Is}from"./dialog-Dlr1m8SN.js";import{a as ut,c as ft,d as He,D as xt}from"./dropdown-menu-VaFb6Xm_.js";import{P as wt,a as Dt,b as kt}from"./popover-CKFLhO7y.js";import{b as Wt,C as Zt,a as me,e as pt,d as es,c as ts}from"./command-D1JmubF9.js";import{C as Ts}from"./calendar-CBPHJMpv.js";import{u as zs}from"./use-copy-g8nddtMC.js";import{i as As}from"./Check-B9L3Ctfx.js";import{i as $s}from"./ChevronRight-COgx0R1b.js";import{a as Es}from"./Copy01-CIfJ2CWy.js";import{n as Os}from"./LinkExternal01-H7tJOo3z.js";import{s as It}from"./User01-Cbnom0b9.js";import{i as Pt}from"./X-D9y8h5bN.js";import{g as Bs,b as Fs,e as Rs,f as Ps,a as Ms,D as Ls}from"./drawer-BRYxPnMu.js";import{t as Ft}from"./ChevronDown-Dg-cESk6.js";import{i as ss}from"./FilterLines-nOSo0w2R.js";import{s as Us}from"./Flag01-Bp__n1vu.js";import{u as qs}from"./shell-layout-DS-oG0dR.js";function ce(t){const e=$.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let r;e[0]!==n?(r={width:n,height:n},e[0]=n,e[1]=r):r=e[1];let i;e[2]!==a?(i=D("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=i):i=e[3];let o;return e[4]!==n||e[5]!==r||e[6]!==i?(o=s.jsx("img",{src:ys,alt:"Super Agent",width:n,height:n,style:r,className:i}),e[4]=n,e[5]=r,e[6]=i,e[7]=o):o=e[7],o}const Mt=()=>0;function Gs(t){const{orgSlug:e,enabled:l=!0,onUpdate:a}=t,n=A.useRef(a);n.current=a;const r=A.useRef(null),i=A.useRef(l),o=A.useRef(e);(!r.current||i.current!==l||o.current!==e)&&(i.current=l,o.current=e,r.current=f=>{if(!l||!e)return()=>{};const m=x=>{let c;try{c=JSON.parse(x.data)}catch{return}c.data&&n.current(c.data),f()};return vs.subscribe(e,m)}),A.useSyncExternalStore(r.current,Mt,Mt)}function Ks(){const t=$.c(25),{org:e,locator:l}=At(),a=Bt(),n=Qt();let r;t[0]!==l?(r=$t.taskBoardItems(l),t[0]=l,t[1]=r):r=t[1];const i=r;let o;t[2]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=o):o=t[3];let d;t[4]!==i||t[5]!==o?(d={queryKey:i,queryFn:o},t[4]=i,t[5]=o,t[6]=d):d=t[6];const f=Yt(d);let m;t[7]!==n||t[8]!==i?(m=h=>{n.setQueryData(i,b=>{const j=b??[],N=h;return j.some(y=>y.id===N.id)?j.map(y=>y.id===N.id?N:y):[N,...j]})},t[7]=n,t[8]=i,t[9]=m):m=t[9];let x;t[10]!==e.slug||t[11]!==m?(x={orgSlug:e.slug,onUpdate:m},t[10]=e.slug,t[11]=m,t[12]=x):x=t[12],Gs(x);let c;t[13]!==n||t[14]!==i?(c=h=>{const b=h.subject,j=h.data.status;n.setQueryData(i,N=>N?.map(y=>y.threads.some(v=>v.threadId===b)?{...y,threads:y.threads.map(v=>v.threadId===b?{...v,status:j}:v)}:y))},t[13]=n,t[14]=i,t[15]=c):c=t[15];let u;t[16]!==e.slug||t[17]!==c?(u={orgSlug:e.slug,onTaskStatus:c},t[16]=e.slug,t[17]=c,t[18]=u):u=t[18],Ss(u);let p;t[19]!==f.data?(p=f.data??[],t[19]=f.data,t[20]=p):p=t[20];let g;return t[21]!==f.error||t[22]!==f.isLoading||t[23]!==p?(g={items:p,isLoading:f.isLoading,error:f.error},t[21]=f.error,t[22]=f.isLoading,t[23]=p,t[24]=g):g=t[24],g}function Qs(){const t=$.c(30),{locator:e}=At(),l=Bt(),a=Qt();let n;t[0]!==e?(n=$t.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const r=n;let i;t[2]!==a||t[3]!==r?(i=()=>a.invalidateQueries({queryKey:r}),t[2]=a,t[3]=r,t[4]=i):i=t[4];const o=i;let d;t[5]!==l?(d=y=>l.call("TASK_BOARD_ITEM_CREATE",y),t[5]=l,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==d?(f={mutationFn:d,onSuccess:o},t[7]=o,t[8]=d,t[9]=f):f=t[9];const m=_t(f);let x;t[10]!==l?(x=y=>l.call("TASK_BOARD_ITEM_UPDATE",y),t[10]=l,t[11]=x):x=t[11];let c,u;t[12]!==a||t[13]!==r?(c=async y=>{await a.cancelQueries({queryKey:r});const v=a.getQueryData(r);return a.setQueryData(r,I=>I?.map(C=>C.id===y.id?{...C,...y}:C)),{previous:v}},u=(y,v,I)=>{I?.previous&&a.setQueryData(r,I.previous)},t[12]=a,t[13]=r,t[14]=c,t[15]=u):(c=t[14],u=t[15]);let p;t[16]!==o||t[17]!==x||t[18]!==c||t[19]!==u?(p={mutationFn:x,onMutate:c,onError:u,onSettled:o},t[16]=o,t[17]=x,t[18]=c,t[19]=u,t[20]=p):p=t[20];const g=_t(p);let h;t[21]!==l?(h=y=>l.call("TASK_BOARD_ITEM_DELETE",{id:y}),t[21]=l,t[22]=h):h=t[22];let b;t[23]!==o||t[24]!==h?(b={mutationFn:h,onSuccess:o},t[23]=o,t[24]=h,t[25]=b):b=t[25];const j=_t(b);let N;return t[26]!==m||t[27]!==j||t[28]!==g?(N={create:m,update:g,remove:j},t[26]=m,t[27]=j,t[28]=g,t[29]=N):N=t[29],N}function Tt(t){return t.threads.some(e=>e.status==="requires_action")}function ls(t){return t.threads[0]}const ns=["triage","todo","in_progress","in_review","done"],ne={triage:{label:"Backlog",icon:Xt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:_s,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Et,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:ws,iconClassName:"text-warning"},done:{label:"Done",icon:Jt,iconClassName:"text-success"}},as=["none","low","medium","high","urgent"],ie={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Ys(t){const e=$.c(10),{locator:l}=At(),a=Bt();let n;e[0]!==t||e[1]!==l?(n=$t.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const r=!!t;let i;e[3]!==t||e[4]!==a?(i=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=i):i=e[5];let o;return e[6]!==n||e[7]!==r||e[8]!==i?(o={queryKey:n,enabled:r,queryFn:i},e[6]=n,e[7]=r,e[8]=i,e[9]=o):o=e[9],Yt(o)}function Hs(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function Lt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Vs=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Ve="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Xs={failed:{label:"Error",className:"text-red-600",icon:bs},requires_action:{label:"Needs input",className:"text-amber-600",icon:Ht},in_progress:{label:"Running",className:"text-blue-600",icon:Et,spin:!0},completed:{label:"Completed",className:"text-green-600",icon:Jt},expired:{label:"Expired",className:"text-muted-foreground",icon:Xt}};function Js(t){const e=$.c(164),{open:l,onClose:a,item:n,defaultStatus:r,onSubmit:i,onDelete:o,onOpenThread:d,isSaving:f}=t,{data:m}=Vt();let x;e[0]!==m?.data?.members?(x=m?.data?.members??[],e[0]=m?.data?.members,e[1]=x):x=e[1];const c=x,{handleCopy:u,copied:p}=zs(),[g,h]=A.useState(n?.title??""),[b,j]=A.useState(n?.description??""),[N,y]=A.useState(n?.status??r??"triage"),[v,I]=A.useState(n?.priority??"medium"),[C,O]=A.useState(n?.assigneeId??null),q=n?.dueDate;let Q;e[2]!==q?(Q=Lt(q),e[2]=q,e[3]=Q):Q=e[3];const[T,F]=A.useState(Q),[U,M]=A.useState(!1),[R,L]=A.useState(!1);let z;e[4]!==r||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(z=()=>{h(n?.title??""),j(n?.description??""),y(n?.status??r??"triage"),I(n?.priority??"medium"),O(n?.assigneeId??null),F(Lt(n?.dueDate))},e[4]=r,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=z):z=e[11];const G=z;let K;e[12]!==a||e[13]!==G?(K=()=>{a(),G()},e[12]=a,e[13]=G,e[14]=K):K=e[14];const _=K;let k;e[15]!==C||e[16]!==b||e[17]!==T||e[18]!==i||e[19]!==v||e[20]!==N||e[21]!==g?(k=()=>{const S=g.trim();S&&i({title:S,description:b.trim()||null,status:N,priority:v,assigneeId:C,dueDate:T?Hs(T):null})},e[15]=C,e[16]=b,e[17]=T,e[18]=i,e[19]=v,e[20]=N,e[21]=g,e[22]=k):k=e[22];const H=k,B=C===Je;let te;if(e[23]!==C||e[24]!==c){let S;e[26]!==C?(S=V=>V.userId===C,e[26]=C,e[27]=S):S=e[27],te=c.find(S),e[23]=C,e[24]=c,e[25]=te}else te=e[25];const P=te;let X;e[28]!==n||e[29]!==c?(X=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,e[28]=n,e[29]=c,e[30]=X):X=e[30];const E=X,de=ne[N].icon;let le;e[31]!==n?(le=n?ls(n):void 0,e[31]=n,e[32]=le):le=e[32];const J=le;let se;e[33]!==_?(se=S=>!S&&_(),e[33]=_,e[34]=se):se=e[34];const oe=n?"Edit task":"New task";let Y;e[35]!==oe?(Y=s.jsx(Ds,{className:"sr-only",children:oe}),e[35]=oe,e[36]=Y):Y=e[36];let W;e[37]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Pt,{size:16}),e[37]=W):W=e[37];let Z;e[38]!==_?(Z=s.jsx("button",{type:"button","aria-label":"Close",onClick:_,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:W}),e[38]=_,e[39]=Z):Z=e[39];let ee;e[40]===Symbol.for("react.memo_cache_sentinel")?(ee=S=>h(S.target.value),e[40]=ee):ee=e[40];let w;e[41]!==g?(w=s.jsx("input",{value:g,onChange:ee,placeholder:"Task title...",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-medium text-foreground outline-none placeholder:text-foreground/30"}),e[41]=g,e[42]=w):w=e[42];let fe;e[43]===Symbol.for("react.memo_cache_sentinel")?(fe=S=>j(S.target.value),e[43]=fe):fe=e[43];let xe;e[44]!==b?(xe=s.jsx("textarea",{value:b,onChange:fe,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=b,e[45]=xe):xe=e[45];let pe;e[46]!==p||e[47]!==b||e[48]!==u?(pe=b&&s.jsx(ue,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>u(b),children:p?s.jsx(As,{size:14}):s.jsx(Es,{size:14})}),e[46]=p,e[47]=b,e[48]=u,e[49]=pe):pe=e[49];let ge;e[50]!==xe||e[51]!==pe?(ge=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[xe,pe]}),e[50]=xe,e[51]=pe,e[52]=ge):ge=e[52];let he;e[53]!==E||e[54]!==P||e[55]!==d||e[56]!==J?(he=J&&s.jsx(Ws,{thread:J,startedBy:E??P,onOpen:d}),e[53]=E,e[54]=P,e[55]=d,e[56]=J,e[57]=he):he=e[57];let be;e[58]!==n?(be=n?.id&&s.jsx(tl,{itemId:n.id}),e[58]=n,e[59]=be):be=e[59];let je;e[60]!==w||e[61]!==ge||e[62]!==he||e[63]!==be?(je=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[w,ge,he,be]}),e[60]=w,e[61]=ge,e[62]=he,e[63]=be,e[64]=je):je=e[64];let We;e[65]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[65]=We):We=e[65];const bt=ne[N];let Ne;e[66]!==de||e[67]!==bt.iconClassName?(Ne=s.jsx(de,{size:16,className:bt.iconClassName}),e[66]=de,e[67]=bt.iconClassName,e[68]=Ne):Ne=e[68];const jt=ne[N];let ye;e[69]!==Ne||e[70]!==jt.label?(ye=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:Ve,children:[Ne,jt.label]})}),e[69]=Ne,e[70]=jt.label,e[71]=ye):ye=e[71];let Ze;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsx(ft,{align:"start",className:"w-44",children:ns.map(S=>{const V=ne[S].icon;return s.jsxs(He,{onSelect:()=>y(S),className:"gap-2",children:[s.jsx(V,{size:16,className:ne[S].iconClassName}),ne[S].label]},S)})}),e[72]=Ze):Ze=e[72];let ve;e[73]!==ye?(ve=s.jsxs(xt,{children:[ye,Ze]}),e[73]=ye,e[74]=ve):ve=e[74];const Nt=v==="none"&&"text-muted-foreground";let Se;e[75]!==Nt?(Se=D(Ve,Nt),e[75]=Nt,e[76]=Se):Se=e[76];let Ce;e[77]!==v?(Ce=v==="none"?s.jsxs(s.Fragment,{children:[s.jsx(xs,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:D("size-2 rounded-full",ie[v].dotClassName)}),ie[v].label]}),e[77]=v,e[78]=Ce):Ce=e[78];let _e;e[79]!==Se||e[80]!==Ce?(_e=s.jsx(ut,{asChild:!0,children:s.jsx("button",{type:"button",className:Se,children:Ce})}),e[79]=Se,e[80]=Ce,e[81]=_e):_e=e[81];let et;e[82]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(ft,{align:"start",className:"w-40",children:as.map(S=>s.jsxs(He,{onSelect:()=>I(S),children:[s.jsx("span",{className:D("size-2 rounded-full",ie[S].dotClassName)}),ie[S].label]},S))}),e[82]=et):et=e[82];let we;e[83]!==_e?(we=s.jsxs(xt,{children:[_e,et]}),e[83]=_e,e[84]=we):we=e[84];const yt=!C&&"text-muted-foreground";let De;e[85]!==yt?(De=D(Ve,yt),e[85]=yt,e[86]=De):De=e[86];let ke;e[87]!==E||e[88]!==P||e[89]!==B?(ke=B&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(re,{url:E.user?.image??void 0,fallback:ae(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(re,{url:E.user?.image??void 0,fallback:ae(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(ce,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):B?s.jsxs(s.Fragment,{children:[s.jsx(ce,{size:16}),"Super Agent"]}):P?s.jsxs(s.Fragment,{children:[s.jsx(re,{url:P.user?.image??void 0,fallback:ae(P.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:P.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ps,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[87]=E,e[88]=P,e[89]=B,e[90]=ke):ke=e[90];let Ie;e[91]!==De||e[92]!==ke?(Ie=s.jsx(wt,{asChild:!0,children:s.jsx("button",{type:"button",className:De,children:ke})}),e[91]=De,e[92]=ke,e[93]=Ie):Ie=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsx(Wt,{placeholder:"Assign to…",className:"h-9"}),e[94]=tt):tt=e[94];let st;e[95]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Zt,{children:"No members found."}),e[95]=st):st=e[95];let lt;e[96]===Symbol.for("react.memo_cache_sentinel")?(lt=()=>{O(Je),L(!1)},e[96]=lt):lt=e[96];let nt;e[97]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsxs(me,{value:"Super Agent",onSelect:lt,className:"gap-2",children:[s.jsx(ce,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[97]=nt):nt=e[97];let at;e[98]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{O(null),L(!1)},e[98]=at):at=e[98];let rt;e[99]===Symbol.for("react.memo_cache_sentinel")?(rt=s.jsxs(pt,{children:[nt,s.jsxs(me,{value:"Unassigned",onSelect:at,className:"gap-2",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[99]=rt):rt=e[99];let Te;if(e[100]!==c){let S;e[102]===Symbol.for("react.memo_cache_sentinel")?(S=V=>s.jsxs(me,{value:V.user?.name??V.userId,onSelect:()=>{O(V.userId),L(!1)},className:"gap-2",children:[s.jsx(re,{url:V.user?.image??void 0,fallback:ae(V.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:V.user?.name??V.userId})]},V.userId),e[102]=S):S=e[102],Te=c.map(S),e[100]=c,e[101]=Te}else Te=e[101];let ze;e[103]!==Te?(ze=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[tt,s.jsxs(ts,{children:[st,rt,s.jsx(pt,{heading:"Members",children:Te})]})]})}),e[103]=Te,e[104]=ze):ze=e[104];let Ae;e[105]!==R||e[106]!==Ie||e[107]!==ze?(Ae=s.jsxs(kt,{open:R,onOpenChange:L,children:[Ie,ze]}),e[105]=R,e[106]=Ie,e[107]=ze,e[108]=Ae):Ae=e[108];let $e;e[109]!==E||e[110]!==B?($e=B&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.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"}),s.jsxs("span",{className:D(Ve,"pointer-events-none"),children:[s.jsx(ce,{size:16}),"Super Agent"]})]}),e[109]=E,e[110]=B,e[111]=$e):$e=e[111];let Ee;e[112]!==Ae||e[113]!==$e?(Ee=s.jsxs("div",{className:"flex flex-col",children:[Ae,$e]}),e[112]=Ae,e[113]=$e,e[114]=Ee):Ee=e[114];const vt=!T&&"text-muted-foreground";let Oe;e[115]!==vt?(Oe=D(Ve,vt),e[115]=vt,e[116]=Oe):Oe=e[116];let it;e[117]===Symbol.for("react.memo_cache_sentinel")?(it=s.jsx(Xe,{size:16,className:"text-muted-foreground"}),e[117]=it):it=e[117];let Be;e[118]!==T?(Be=T?Vs.format(T):"Due date",e[118]=T,e[119]=Be):Be=e[119];let Fe;e[120]!==T?(Fe=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),F(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),F(null))},children:s.jsx(Pt,{size:12})}),e[120]=T,e[121]=Fe):Fe=e[121];let Re;e[122]!==Oe||e[123]!==Be||e[124]!==Fe?(Re=s.jsx(wt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Oe,children:[it,Be,Fe]})}),e[122]=Oe,e[123]=Be,e[124]=Fe,e[125]=Re):Re=e[125];const St=T??void 0;let ot;e[126]===Symbol.for("react.memo_cache_sentinel")?(ot=S=>{F(S??null),S&&M(!1)},e[126]=ot):ot=e[126];let Pe;e[127]!==St?(Pe=s.jsx(Dt,{className:"w-auto p-0",align:"start",children:s.jsx(Ts,{mode:"single",selected:St,onSelect:ot,initialFocus:!0})}),e[127]=St,e[128]=Pe):Pe=e[128];let Me;e[129]!==U||e[130]!==Re||e[131]!==Pe?(Me=s.jsxs(kt,{open:U,onOpenChange:M,children:[Re,Pe]}),e[129]=U,e[130]=Re,e[131]=Pe,e[132]=Me):Me=e[132];let Le;e[133]!==ve||e[134]!==we||e[135]!==Ee||e[136]!==Me?(Le=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[We,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[ve,we,Ee,Me]})]}),e[133]=ve,e[134]=we,e[135]=Ee,e[136]=Me,e[137]=Le):Le=e[137];let Ue;e[138]!==je||e[139]!==Le?(Ue=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[je,Le]}),e[138]=je,e[139]=Le,e[140]=Ue):Ue=e[140];let qe;e[141]!==n||e[142]!==o?(qe=n&&o?s.jsx(ue,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:o,children:s.jsx(hs,{size:16})}):s.jsx("span",{}),e[141]=n,e[142]=o,e[143]=qe):qe=e[143];let Ge;e[144]!==f||e[145]!==g?(Ge=!g.trim()||f,e[144]=f,e[145]=g,e[146]=Ge):Ge=e[146];let ct;e[147]===Symbol.for("react.memo_cache_sentinel")?(ct=s.jsx(Ot,{size:16}),e[147]=ct):ct=e[147];const Ct=n?"Save":"Create task";let Ke;e[148]!==H||e[149]!==Ge||e[150]!==Ct?(Ke=s.jsxs(ue,{size:"sm",disabled:Ge,onClick:H,children:[ct,Ct]}),e[148]=H,e[149]=Ge,e[150]=Ct,e[151]=Ke):Ke=e[151];let Qe;e[152]!==qe||e[153]!==Ke?(Qe=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[qe,Ke]}),e[152]=qe,e[153]=Ke,e[154]=Qe):Qe=e[154];let Ye;e[155]!==Y||e[156]!==Z||e[157]!==Ue||e[158]!==Qe?(Ye=s.jsxs(ks,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[Y,Z,Ue,Qe]}),e[155]=Y,e[156]=Z,e[157]=Ue,e[158]=Qe,e[159]=Ye):Ye=e[159];let dt;return e[160]!==l||e[161]!==se||e[162]!==Ye?(dt=s.jsx(Is,{open:l,onOpenChange:se,children:Ye}),e[160]=l,e[161]=se,e[162]=Ye,e[163]=dt):dt=e[163],dt}function Ws(t){const e=$.c(14),{thread:l,startedBy:a,onOpen:n}=t,r=l.status?Xs[l.status]:null,i=l.lastMessage??l.title;let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let f;e[2]!==a?(f=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(re,{url:a.user?.image??void 0,fallback:ae(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=f):f=e[3];let m;e[4]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[o,d,f]}),e[4]=f,e[5]=m):m=e[5];let x;e[6]!==i||e[7]!==n||e[8]!==r||e[9]!==l?(x=r&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:D("flex items-center gap-1.5",r.className),children:[s.jsx(r.icon,{size:16,className:D(r.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:r.label})]}),i&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:i}),n&&s.jsx($s,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=i,e[7]=n,e[8]=r,e[9]=l,e[10]=x):x=e[10];let c;return e[11]!==m||e[12]!==x?(c=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[m,x]}),e[11]=m,e[12]=x,e[13]=c):c=e[13],c}function Zs(t){return t.merged?{label:"Merged",className:"text-purple-600",icon:gs}:t.state==="closed"?{label:"Closed",className:"text-red-600",icon:mt}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:mt}:{label:"Open",className:"text-green-600",icon:mt}}function el(t){const e=$.c(38),{pr:l}=t;let a,n,r,i,o,d,f,m;if(e[0]!==l){n=Zs(l);let v;e[9]!==l.body?(v=l.body?.trim(),e[9]=l.body,e[10]=v):v=e[10],a=v,o=l.url,d="_blank",f="noreferrer",m="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",i="flex items-center gap-2",r=D("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=r,e[4]=i,e[5]=o,e[6]=d,e[7]=f,e[8]=m}else a=e[1],n=e[2],r=e[3],i=e[4],o=e[5],d=e[6],f=e[7],m=e[8];let x;e[11]!==n.icon?(x=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=x):x=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let u;e[15]!==r||e[16]!==x||e[17]!==c?(u=s.jsxs("span",{className:r,children:[x,c]}),e[15]=r,e[16]=x,e[17]=c,e[18]=u):u=e[18];const p=l.title??`${l.repoOwner}/${l.repoName}`;let g;e[19]!==p?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let h;e[21]!==l.number?(h=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=h):h=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Os,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=b):b=e[23];let j;e[24]!==g||e[25]!==h||e[26]!==i||e[27]!==u?(j=s.jsxs("span",{className:i,children:[u,g,h,b]}),e[24]=g,e[25]=h,e[26]=i,e[27]=u,e[28]=j):j=e[28];let N;e[29]!==a?(N=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=N):N=e[30];let y;return e[31]!==j||e[32]!==N||e[33]!==o||e[34]!==d||e[35]!==f||e[36]!==m?(y=s.jsxs("a",{href:o,target:d,rel:f,className:m,children:[j,N]}),e[31]=j,e[32]=N,e[33]=o,e[34]=d,e[35]=f,e[36]=m,e[37]=y):y=e[37],y}function tl(t){const e=$.c(5),{itemId:l}=t,{data:a,isLoading:n}=Ys(l);if(!n&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(mt,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=r):r=e[0];let i;e[1]!==a?(i=a?a.map(sl):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Et,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=i):i=e[2];let o;return e[3]!==i?(o=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[r,i]}),e[3]=i,e[4]=o):o=e[4],o}function sl(t){return s.jsx(el,{pr:t},t.url)}const zt="__unassigned__",gt={assignee:null,priority:null,due:null};function ll(t){return t.assignee!==null||t.priority!==null||t.due!==null}function nl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const al=864e5;function rl(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function il(t,e){if(e.assignee!==null){if(e.assignee===zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!rl(l,a)||e.due==="week"&&(l<a||l>a+7*al))return!1}return!0}const Ut=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function ht(t,e=!1){return D("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function ol(t){const e=$.c(62),{value:l,members:a,onChange:n,block:r}=t,[i,o]=A.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(It,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let f=d,m="Assignee";if(l===zt)m="Unassigned";else if(l===Je){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ce,{size:14}),e[1]=_):_=e[1],f=_,m="Super Agent"}else if(l){let _,k,H,B;if(e[2]!==a||e[3]!==l){let P;e[8]!==l?(P=X=>X.userId===l,e[8]=l,e[9]=P):P=e[9],k=a.find(P),_=re,H=k?.user?.image??void 0,B=ae(k?.user?.name),e[2]=a,e[3]=l,e[4]=_,e[5]=k,e[6]=H,e[7]=B}else _=e[4],k=e[5],H=e[6],B=e[7];let te;e[10]!==_||e[11]!==H||e[12]!==B?(te=s.jsx(_,{url:H,fallback:B,shape:"circle",size:"2xs"}),e[10]=_,e[11]=H,e[12]=B,e[13]=te):te=e[13],f=te,m=k?.user?.name??"Member"}let x;e[14]!==n?(x=_=>{n(_),o(!1)},e[14]=n,e[15]=x):x=e[15];const c=x,u=l!==null;let p;e[16]!==r||e[17]!==u?(p=ht(u,r),e[16]=r,e[17]=u,e[18]=p):p=e[18];const g=p,h=r&&"ml-auto";let b;e[19]!==h?(b=D("shrink-0 opacity-60",h),e[19]=h,e[20]=b):b=e[20];const j=b;let N;e[21]!==m?(N=s.jsx("span",{className:"max-w-[10rem] truncate",children:m}),e[21]=m,e[22]=N):N=e[22];let y;e[23]!==j?(y=s.jsx(Ft,{size:12,className:j}),e[23]=j,e[24]=y):y=e[24];let v;e[25]!==f||e[26]!==N||e[27]!==y||e[28]!==g?(v=s.jsx(wt,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[f,N,y]})}),e[25]=f,e[26]=N,e[27]=y,e[28]=g,e[29]=v):v=e[29];let I;e[30]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Wt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=I):I=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Zt,{children:"No members found."}),e[31]=C):C=e[31];let O;e[32]!==c?(O=s.jsx(me,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=O):O=e[33];let q;e[34]!==c?(q=()=>c(zt),e[34]=c,e[35]=q):q=e[35];let Q;e[36]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(It,{size:16,className:"text-muted-foreground"}),e[36]=Q):Q=e[36];let T;e[37]!==q?(T=s.jsxs(me,{value:"Unassigned",onSelect:q,className:"gap-2",children:[Q,"Unassigned"]}),e[37]=q,e[38]=T):T=e[38];let F;e[39]!==c?(F=()=>c(Je),e[39]=c,e[40]=F):F=e[40];let U;e[41]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ce,{size:16}),e[41]=U):U=e[41];let M;e[42]!==F?(M=s.jsxs(me,{value:"Super Agent",onSelect:F,className:"gap-2",children:[U,"Super Agent"]}),e[42]=F,e[43]=M):M=e[43];let R;e[44]!==O||e[45]!==T||e[46]!==M?(R=s.jsxs(pt,{children:[O,T,M]}),e[44]=O,e[45]=T,e[46]=M,e[47]=R):R=e[47];let L;if(e[48]!==a||e[49]!==c){let _;e[51]!==c?(_=k=>s.jsxs(me,{value:k.user?.name??k.userId,onSelect:()=>c(k.userId),className:"gap-2",children:[s.jsx(re,{url:k.user?.image??void 0,fallback:ae(k.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:k.user?.name??k.userId})]},k.userId),e[51]=c,e[52]=_):_=e[52],L=a.map(_),e[48]=a,e[49]=c,e[50]=L}else L=e[50];let z;e[53]!==L?(z=s.jsx(pt,{heading:"Members",children:L}),e[53]=L,e[54]=z):z=e[54];let G;e[55]!==R||e[56]!==z?(G=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[I,s.jsxs(ts,{children:[C,R,z]})]})}),e[55]=R,e[56]=z,e[57]=G):G=e[57];let K;return e[58]!==i||e[59]!==G||e[60]!==v?(K=s.jsxs(kt,{open:i,onOpenChange:o,children:[v,G]}),e[58]=i,e[59]=G,e[60]=v,e[61]=K):K=e[61],K}function cl(t){const e=$.c(23),{value:l,onChange:a,block:n}=t,r=l!==null;let i;e[0]!==n||e[1]!==r?(i=ht(r,n),e[0]=n,e[1]=r,e[2]=i):i=e[2];const o=i,d=n&&"ml-auto";let f;e[3]!==d?(f=D("shrink-0 opacity-60",d),e[3]=d,e[4]=f):f=e[4];const m=f;let x;e[5]!==l?(x=l?s.jsx("span",{className:D("size-2 shrink-0 rounded-full",ie[l].dotClassName)}):s.jsx(Us,{size:14,className:"shrink-0"}),e[5]=l,e[6]=x):x=e[6];const c=l?ie[l].label:"Priority";let u;e[7]!==m?(u=s.jsx(Ft,{size:12,className:m}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==x||e[10]!==c||e[11]!==u||e[12]!==o?(p=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[x,c,u]})}),e[9]=x,e[10]=c,e[11]=u,e[12]=o,e[13]=p):p=e[13];let g,h;e[14]!==a?(h=s.jsx(He,{onSelect:()=>a(null),children:"Any priority"}),g=as.map(N=>s.jsxs(He,{onSelect:()=>a(N),className:"gap-2",children:[s.jsx("span",{className:D("size-2 rounded-full",ie[N].dotClassName)}),ie[N].label]},N)),e[14]=a,e[15]=g,e[16]=h):(g=e[15],h=e[16]);let b;e[17]!==g||e[18]!==h?(b=s.jsxs(ft,{align:"start",className:"w-40",children:[h,g]}),e[17]=g,e[18]=h,e[19]=b):b=e[19];let j;return e[20]!==b||e[21]!==p?(j=s.jsxs(xt,{children:[p,b]}),e[20]=b,e[21]=p,e[22]=j):j=e[22],j}function dl(t){const e=$.c(27),{value:l,onChange:a,block:n}=t;let r;e[0]!==l?(r=Ut.find(C=>C.value===l)?.label,e[0]=l,e[1]=r):r=e[1];const i=r,o=l!==null;let d;e[2]!==n||e[3]!==o?(d=ht(o,n),e[2]=n,e[3]=o,e[4]=d):d=e[4];const f=d,m=n&&"ml-auto";let x;e[5]!==m?(x=D("shrink-0 opacity-60",m),e[5]=m,e[6]=x):x=e[6];const c=x;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Xe,{size:14,className:"shrink-0"}),e[7]=u):u=e[7];const p=i??"Due date";let g;e[8]!==c?(g=s.jsx(Ft,{size:12,className:c}),e[8]=c,e[9]=g):g=e[9];let h;e[10]!==p||e[11]!==g||e[12]!==f?(h=s.jsx(ut,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,p,g]})}),e[10]=p,e[11]=g,e[12]=f,e[13]=h):h=e[13];let b;e[14]!==a?(b=()=>a(null),e[14]=a,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Xe,{size:16,className:"text-muted-foreground"}),e[16]=j):j=e[16];let N;e[17]!==b?(N=s.jsxs(He,{onSelect:b,className:"gap-2",children:[j,"Any time"]}),e[17]=b,e[18]=N):N=e[18];let y;e[19]!==a?(y=Ut.map(C=>{const O=C.value==="overdue";return s.jsxs(He,{onSelect:()=>a(C.value),className:D("gap-2",O&&"text-destructive"),children:[s.jsx(Xe,{size:16,className:D("shrink-0",O?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=y):y=e[20];let v;e[21]!==N||e[22]!==y?(v=s.jsxs(ft,{align:"start",className:"w-44",children:[N,y]}),e[21]=N,e[22]=y,e[23]=v):v=e[23];let I;return e[24]!==v||e[25]!==h?(I=s.jsxs(xt,{children:[h,v]}),e[24]=v,e[25]=h,e[26]=I):I=e[26],I}function rs(t){const e=$.c(26),{filters:l,members:a,onChange:n,block:r}=t;let i;e[0]!==l||e[1]!==n?(i=u=>n({...l,assignee:u}),e[0]=l,e[1]=n,e[2]=i):i=e[2];let o;e[3]!==r||e[4]!==l.assignee||e[5]!==a||e[6]!==i?(o=s.jsx(ol,{block:r,value:l.assignee,members:a,onChange:i}),e[3]=r,e[4]=l.assignee,e[5]=a,e[6]=i,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==n?(d=u=>n({...l,priority:u}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let f;e[11]!==r||e[12]!==l.priority||e[13]!==d?(f=s.jsx(cl,{block:r,value:l.priority,onChange:d}),e[11]=r,e[12]=l.priority,e[13]=d,e[14]=f):f=e[14];let m;e[15]!==l||e[16]!==n?(m=u=>n({...l,due:u}),e[15]=l,e[16]=n,e[17]=m):m=e[17];let x;e[18]!==r||e[19]!==l.due||e[20]!==m?(x=s.jsx(dl,{block:r,value:l.due,onChange:m}),e[18]=r,e[19]=l.due,e[20]=m,e[21]=x):x=e[21];let c;return e[22]!==o||e[23]!==f||e[24]!==x?(c=s.jsxs(s.Fragment,{children:[o,f,x]}),e[22]=o,e[23]=f,e[24]=x,e[25]=c):c=e[25],c}function ml(t){const e=$.c(11),{filters:l,members:a,onChange:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ss,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==l||e[2]!==a||e[3]!==n?(i=s.jsx(rs,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=i):i=e[4];let o;e[5]!==l||e[6]!==n?(o=ll(l)&&s.jsx("button",{type:"button",onClick:()=>n(gt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=o):o=e[7];let d;return e[8]!==i||e[9]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,i,o]}),e[8]=i,e[9]=o,e[10]=d):d=e[10],d}function ul(t){const e=$.c(26),{filters:l,members:a,onChange:n}=t,[r,i]=A.useState(!1),o=nl(l),d=o>0;let f;e[0]!==d?(f=ht(d),e[0]=d,e[1]=f):f=e[1];const m=f;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ss,{size:14,className:"shrink-0"}),e[2]=x):x=e[2];let c;e[3]!==o?(c=o>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:o}),e[3]=o,e[4]=c):c=e[4];let u;e[5]!==c||e[6]!==m?(u=s.jsx(Bs,{asChild:!0,children:s.jsxs("button",{type:"button",className:m,children:[x,"Filters",c]})}),e[5]=c,e[6]=m,e[7]=u):u=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Fs,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=p):p=e[8];let g;e[9]!==l||e[10]!==a||e[11]!==n?(g=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(rs,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=g):g=e[12];let h;e[13]!==o||e[14]!==n?(h=o>0&&s.jsx(ue,{variant:"outline",className:"flex-1",onClick:()=>n(gt),children:"Clear all"}),e[13]=o,e[14]=n,e[15]=h):h=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Rs,{asChild:!0,children:s.jsx(ue,{className:"flex-1",children:"Done"})}),e[16]=b):b=e[16];let j;e[17]!==h?(j=s.jsxs(Ps,{className:"flex-row gap-2",children:[h,b]}),e[17]=h,e[18]=j):j=e[18];let N;e[19]!==j||e[20]!==g?(N=s.jsxs(Ms,{className:"p-0",children:[p,g,j]}),e[19]=j,e[20]=g,e[21]=N):N=e[21];let y;return e[22]!==r||e[23]!==N||e[24]!==u?(y=s.jsxs(Ls,{open:r,onOpenChange:i,direction:"bottom",children:[u,N]}),e[22]=r,e[23]=N,e[24]=u,e[25]=y):y=e[25],y}const qt=380,fl=90,Gt=5,xl="cubic-bezier(0.22, 0.61, 0.36, 1)",pl=8;function gl(t,e){const l=A.useRef(new Map);A.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),r=l.current,i=new Map,o=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const u=c.dataset.flipId;if(!u)continue;const p=c.getBoundingClientRect();i.set(u,p);const g=r.get(u);if(!g)continue;const h=g.left-p.left,b=g.top-p.top;(h||b)&&d.push({el:c,dx:h,dy:b,lane:Math.abs(h)>pl})}if(l.current=i,o||d.length===0)return;for(const c of d){const u=c.lane?` rotate(${c.dx>0?Gt:-Gt}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${u}`,c.lane&&(c.el.style.zIndex="10")}let f=0;const m=[],x=requestAnimationFrame(()=>{for(const c of d){const u=c.lane?f++*fl:0;c.el.style.transition=`transform ${qt}ms ${xl} ${u}ms`,c.el.style.transform="",m.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},qt+u+30))}});return()=>{cancelAnimationFrame(x);for(const c of m)clearTimeout(c)}},[e,t])}us(()=>import("./index-Bn42m9nP.js").then(t=>t.aY),__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])).catch(()=>{});function hl(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ms,{})})})}),t[0]=e):e=t[0],e}const bl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function jl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:bl.format(e),overdue:l}}const Rt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function is(){const t=$.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=D(Rt,"border-amber-500/30 text-amber-600"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Ht,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function os(t){const e=$.c(7),{priority:l}=t,a=ie[l];let n;e[0]!==a.dotClassName?(n=D("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let r;e[2]!==n?(r=s.jsx("span",{className:n}),e[2]=n,e[3]=r):r=e[3];let i;return e[4]!==a.label||e[5]!==r?(i=s.jsxs("span",{className:Rt,children:[r,a.label]}),e[4]=a.label,e[5]=r,e[6]=i):i=e[6],i}function cs(t){const e=$.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:o,overdue:d}=jl(l);a=o,n=D(Rt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Xe,{size:14}),e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==n?(i=s.jsxs("span",{className:n,children:[r,a]}),e[4]=a,e[5]=n,e[6]=i):i=e[6],i}function ds(t){const e=$.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===Je){const r=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let i;e[0]!==n?(i=n&&s.jsx(re,{url:n.user?.image??void 0,fallback:ae(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=i):i=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{size:16,className:"ring-2 ring-background"}),e[2]=o):o=e[2];let d;return e[3]!==r||e[4]!==i?(d=s.jsxs("span",{className:"inline-flex items-center",title:r,children:[i,o]}),e[3]=r,e[4]=i,e[5]=d):d=e[5],d}if(a){const r=a.user?.image??void 0,i=a.user?.name;let o;e[6]!==i?(o=ae(i),e[6]=i,e[7]=o):o=e[7];let d;return e[8]!==r||e[9]!==o?(d=s.jsx(re,{url:r,fallback:o,shape:"circle",size:"2xs"}),e[8]=r,e[9]=o,e[10]=d):d=e[10],d}return null}function ms(){const t=$.c(64),{items:e,isLoading:l}=Ks(),a=Qs(),{data:n}=Vt();let r,i;t[0]!==n?.data?.members?(r=n?.data?.members??[],i=new Map(r.map(Nl)),t[0]=n?.data?.members,t[1]=r,t[2]=i):(r=t[1],i=t[2]);const o=i,[d,f]=A.useState("board"),[m,x]=A.useState(gt),[c,u]=A.useState(!1),[p,g]=A.useState(null),[h,b]=A.useState(null),{setTaskId:j}=qs();let N,y,v,I;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==d||t[8]!==o||t[9]!==r){I=Symbol.for("react.early_return_sentinel");e:{let z;t[14]!==m?(z=w=>il(w,m),t[14]=m,t[15]=z):z=t[15];const G=e.filter(z);let K;t[16]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{g(null),b(null),u(!0)},t[16]=K):K=t[16];const _=K;let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k=w=>{g(null),b(w),u(!0)},t[17]=k):k=t[17];const H=k;let B;t[18]===Symbol.for("react.memo_cache_sentinel")?(B=w=>{g(w),u(!0)},t[18]=B):B=t[18];const P=B;if(l&&e.length===0){let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[19]=w):w=t[19],I=w;break e}N="flex min-h-0 flex-1 flex-col";let X;t[20]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[20]=X):X=t[20];let E;t[21]!==m||t[22]!==e.length||t[23]!==r?(E=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(ul,{filters:m,members:r,onChange:x})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(ml,{filters:m,members:r,onChange:x})})]}),t[21]=m,t[22]=e.length,t[23]=r,t[24]=E):E=t[24];const de=d==="list";let le;t[25]===Symbol.for("react.memo_cache_sentinel")?(le=()=>f("list"),t[25]=le):le=t[25];let J;t[26]!==de?(J=s.jsx(Kt,{active:de,onClick:le,icon:Ns,label:"List"}),t[26]=de,t[27]=J):J=t[27];const se=d==="board";let oe;t[28]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>f("board"),t[28]=oe):oe=t[28];let Y;t[29]!==se?(Y=s.jsx(Kt,{active:se,onClick:oe,icon:js,label:"Board"}),t[29]=se,t[30]=Y):Y=t[30];let W;t[31]!==J||t[32]!==Y?(W=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[J,Y]}),t[31]=J,t[32]=Y,t[33]=W):W=t[33];let Z;t[34]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(ue,{size:"sm",onClick:_,children:[s.jsx(Ot,{size:16}),"New task"]}),t[34]=Z):Z=t[34];let ee;t[35]!==W?(ee=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[W,Z]}),t[35]=W,t[36]=ee):ee=t[36],t[37]!==E||t[38]!==ee?(y=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[X,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[E,ee]})]}),t[37]=E,t[38]=ee,t[39]=y):y=t[39],v=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):G.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(ue,{variant:"outline",size:"sm",onClick:()=>x(gt),children:"Clear filters"})]})}):d==="board"?s.jsx(yl,{items:G,memberByUserId:o,onOpen:P,onCreate:H,onMove:(w,fe)=>a.update.mutate({id:w,status:fe})}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:G.map(w=>s.jsx(Cl,{item:w,assignee:w.assigneeId?o.get(w.assigneeId):void 0,assignedBy:w.assignedBy?o.get(w.assignedBy):void 0,onOpen:()=>P(w)},w.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=d,t[8]=o,t[9]=r,t[10]=N,t[11]=y,t[12]=v,t[13]=I}else N=t[10],y=t[11],v=t[12],I=t[13];if(I!==Symbol.for("react.early_return_sentinel"))return I;const C=c?p?.id??`new-${h??"default"}`:"closed";let O;t[40]===Symbol.for("react.memo_cache_sentinel")?(O=()=>u(!1),t[40]=O):O=t[40];const q=p??void 0,Q=h??void 0,T=a.create.isPending||a.update.isPending;let F;t[41]!==a.create||t[42]!==a.update||t[43]!==p?(F=z=>{p?a.update.mutate({id:p.id,...z}):a.create.mutate(z),u(!1)},t[41]=a.create,t[42]=a.update,t[43]=p,t[44]=F):F=t[44];let U;t[45]!==a.remove||t[46]!==p?(U=p?()=>{a.remove.mutate(p.id),u(!1)}:void 0,t[45]=a.remove,t[46]=p,t[47]=U):U=t[47];let M;t[48]!==j?(M=z=>{z.virtualMcpId&&(u(!1),j(z.threadId,z.virtualMcpId,{main:z.hasPreview?"preview":"board"}))},t[48]=j,t[49]=M):M=t[49];let R;t[50]!==c||t[51]!==F||t[52]!==U||t[53]!==M||t[54]!==C||t[55]!==q||t[56]!==Q||t[57]!==T?(R=s.jsx(Js,{open:c,onClose:O,item:q,defaultStatus:Q,isSaving:T,onSubmit:F,onDelete:U,onOpenThread:M},C),t[50]=c,t[51]=F,t[52]=U,t[53]=M,t[54]=C,t[55]=q,t[56]=Q,t[57]=T,t[58]=R):R=t[58];let L;return t[59]!==N||t[60]!==R||t[61]!==y||t[62]!==v?(L=s.jsxs("div",{className:N,children:[y,v,R]}),t[59]=N,t[60]=R,t[61]=y,t[62]=v,t[63]=L):L=t[63],L}function Nl(t){return[t.userId,t]}function Kt(t){const e=$.c(11),{active:l,onClick:a,icon:n,label:r}=t,i=`${r} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==o?(d=D("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=d):d=e[1];let f;e[2]!==n?(f=s.jsx(n,{size:14}),e[2]=n,e[3]=f):f=e[3];let m;return e[4]!==l||e[5]!==r||e[6]!==a||e[7]!==i||e[8]!==d||e[9]!==f?(m=s.jsxs("button",{type:"button",onClick:a,"aria-label":i,"aria-pressed":l,className:d,children:[f,r]}),e[4]=l,e[5]=r,e[6]=a,e[7]=i,e[8]=d,e[9]=f,e[10]=m):m=e[10],m}function yl(t){const e=$.c(11),{items:l,memberByUserId:a,onOpen:n,onCreate:r,onMove:i}=t,[o,d]=A.useState(null),f=A.useRef(null);let m;e[0]!==l?(m=l.map(vl).join(","),e[0]=l,e[1]=m):m=e[1],gl(f,m);let c;e[2]!==l||e[3]!==a||e[4]!==r||e[5]!==i||e[6]!==n||e[7]!==o?(c=ns.map(p=>{const g=l.filter(j=>j.status===p),h=ne[p],b=h.icon;return s.jsxs("div",{onDragOver:j=>{j.preventDefault(),d(p)},onDragLeave:j=>{j.currentTarget.contains(j.relatedTarget)||d(null)},onDrop:j=>{j.preventDefault();const N=j.dataTransfer.getData("text/plain");N&&i(N,p),d(null)},className:D("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",o===p&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(b,{size:15,className:D("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:g.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>r(p),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Ot,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:g.map(j=>s.jsx(Sl,{item:j,assignee:j.assigneeId?a.get(j.assigneeId):void 0,assignedBy:j.assignedBy?a.get(j.assignedBy):void 0,onOpen:()=>n(j)},j.id))})]},p)}),e[2]=l,e[3]=a,e[4]=r,e[5]=i,e[6]=n,e[7]=o,e[8]=c):c=e[8];let u;return e[9]!==c?(u=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:c})}),e[9]=c,e[10]=u):u=e[10],u}function vl(t){return`${t.id}:${t.status}`}function Sl(t){const e=$.c(29),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,i=ne[l.status],o=i.icon,d=ls(l)?.lastMessage,f=l.id;let m;e[0]!==l.id?(m=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=m):m=e[1];const x=l.title;let c;e[2]!==i.iconClassName?(c=D("mt-px shrink-0",i.iconClassName),e[2]=i.iconClassName,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==c?(u=s.jsx(o,{size:16,className:c}),e[4]=o,e[5]=c,e[6]=u):u=e[6];let p;e[7]!==l.title?(p=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=p):p=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==l?(g=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=g):g=e[12];let h;e[13]!==u||e[14]!==p||e[15]!==g?(h=s.jsxs("div",{className:"flex items-start gap-2",children:[u,p,g]}),e[13]=u,e[14]=p,e[15]=g,e[16]=h):h=e[16];let b;e[17]!==d?(b=d&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:d}),e[17]=d,e[18]=b):b=e[18];let j;e[19]!==l?(j=(Tt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Tt(l)&&s.jsx(is,{}),l.priority!=="none"&&s.jsx(os,{priority:l.priority}),l.dueDate&&s.jsx(cs,{iso:l.dueDate})]}),e[19]=l,e[20]=j):j=e[20];let N;return e[21]!==l.id||e[22]!==l.title||e[23]!==r||e[24]!==j||e[25]!==m||e[26]!==h||e[27]!==b?(N=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":f,onDragStart:m,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[h,b,j]}),e[21]=l.id,e[22]=l.title,e[23]=r,e[24]=j,e[25]=m,e[26]=h,e[27]=b,e[28]=N):N=e[28],N}function Cl(t){const e=$.c(30),{item:l,assignee:a,assignedBy:n,onOpen:r}=t,i=ne[l.status],o=i.icon;let d;e[0]!==i.iconClassName?(d=D("shrink-0",i.iconClassName),e[0]=i.iconClassName,e[1]=d):d=e[1];let f;e[2]!==o||e[3]!==d?(f=s.jsx(o,{size:16,className:d}),e[2]=o,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==l.title?(m=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=m):m=e[6];let x;e[7]!==l?(x=Tt(l)&&s.jsx(is,{}),e[7]=l,e[8]=x):x=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(os,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let u;e[11]!==l.dueDate?(u=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(cs,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=u):u=e[12];let p;e[13]!==n||e[14]!==a||e[15]!==l?(p=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=p):p=e[16];let g;e[17]!==l.createdAt?(g=Cs(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=g):g=e[18];let h;e[19]!==g?(h=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:g}),e[19]=g,e[20]=h):h=e[20];let b;return e[21]!==r||e[22]!==f||e[23]!==m||e[24]!==x||e[25]!==c||e[26]!==u||e[27]!==p||e[28]!==h?(b=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[f,m,x,c,u,p,h]}),e[21]=r,e[22]=f,e[23]=m,e[24]=x,e[25]=c,e[26]=u,e[27]=p,e[28]=h,e[29]=b):b=e[29],b}const nn=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ms,default:hl},Symbol.toStringTag,{value:"Module"}));export{ie as P,ne as S,Js as T,Qs as a,ce as b,ms as c,nn as i,Ks as u};
@@ -1,4 +1,4 @@
1
- import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-Cw3rb0CY.js";import{i as Es}from"./ChevronRight-dZQYt_cC.js";import{s as Cn}from"./Eye-8ZhOiW7-.js";import{n as Ve,i as yt}from"./Globe01-DhetY-Bd.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-DMlDPqRk.js";import{a as ht}from"./Palette-DN35OGVN.js";import{s as Os}from"./Plus-BPetnJZB.js";import{i as Rs}from"./SearchLg-ClmWMMYa.js";import{t as As}from"./Stars01-C3ZvOrDi.js";import{i as mt}from"./Upload01-BsCyAZ7c.js";import{s as Pn}from"./XClose-CC80cbse.js";import{i as qt}from"./Zap-DfU6Os0p.js";import{u as En}from"./use-mobile-CWspwsRY.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-D7W-4T1K.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-BCSiXXgK.js";import{I as Xe}from"./input-BMv-guKc.js";import{S as ae}from"./skeleton-Thf9bMzT.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-B2sY71ls.js";import{T as Qs}from"./toolbar-CWtK3Y_M.js";import{a as Ys}from"./Package-Bp-gCp2T.js";import{u as Zs}from"./use-debounced-value-Bni9dGfQ.js";import{i as vt}from"./DotsVertical-CWO-rRmS.js";import{i as Mn}from"./Key01-Cvy03JKa.js";import{s as wt}from"./Trash01-BlEBGTBm.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-WWst57wD.js";import{T as Js}from"./textarea-BLFMR312.js";import{t as el}from"./ChevronDown-KHjOGrD9.js";import{n as tl}from"./ChevronUp-DN52maKJ.js";import{i as pt}from"./X-Bv5eNeMh.js";import{P as nl,b as sl,a as ll}from"./popover-BLh2HiPz.js";import{b as ye,T as ve,a as we}from"./tooltip-CopKItWz.js";import{i as rl}from"./Check-LT_cwi6B.js";import{a as il}from"./Copy01-DVQGX_kS.js";import{n as In}from"./LinkExternal01-QzLVgAwK.js";import{l as ol,F as al}from"./index-ztErrW5j.js";import{i as cl}from"./LayoutLeft-DtwphR7R.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
1
+ import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-BjA99mym.js";import{i as Es}from"./ChevronRight-COgx0R1b.js";import{s as Cn}from"./Eye-BFgP-2fZ.js";import{n as Ve,i as yt}from"./Globe01-BTyxZV0a.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-B0UZXMMj.js";import{a as ht}from"./Palette-mTfP_tjW.js";import{s as Os}from"./Plus-CEFSqmDE.js";import{i as Rs}from"./SearchLg-DDrU9DfP.js";import{t as As}from"./Stars01-POGtbKvF.js";import{i as mt}from"./Upload01-R2qlYcTu.js";import{s as Pn}from"./XClose-pja7DdTc.js";import{i as qt}from"./Zap-fLF5olBD.js";import{u as En}from"./use-mobile-B7ewum1J.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-B4Mgc7VK.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-Dlr1m8SN.js";import{I as Xe}from"./input-2p0SJVaJ.js";import{S as ae}from"./skeleton-DNTKkske.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-B2w6oDIO.js";import{T as Qs}from"./toolbar-B-lbazc3.js";import{a as Ys}from"./Package-CmANPXcP.js";import{u as Zs}from"./use-debounced-value-CjrbNm_X.js";import{i as vt}from"./DotsVertical-DOOKh2UC.js";import{i as Mn}from"./Key01-BO8j2bJt.js";import{s as wt}from"./Trash01-BHY0zG6c.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-VaFb6Xm_.js";import{T as Js}from"./textarea-joqKgdpX.js";import{t as el}from"./ChevronDown-Dg-cESk6.js";import{n as tl}from"./ChevronUp-kjji0ksd.js";import{i as pt}from"./X-D9y8h5bN.js";import{P as nl,b as sl,a as ll}from"./popover-CKFLhO7y.js";import{b as ye,T as ve,a as we}from"./tooltip-BOdaaz8D.js";import{i as rl}from"./Check-B9L3Ctfx.js";import{a as il}from"./Copy01-CIfJ2CWy.js";import{n as In}from"./LinkExternal01-H7tJOo3z.js";import{l as ol,F as al}from"./index-DaCoUJoi.js";import{i as cl}from"./LayoutLeft-Ds1Bnqod.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
2
2
  `).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
3
3
  `)}ol.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=or(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=l.jsx(al,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function os(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function as(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ae,{className:"h-3 w-full"}),l.jsx(ae,{className:"h-3 w-5/6"}),l.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=os(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(as,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=l.jsx(cr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=l.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ve,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:a,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:a,download:r,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
4
4
  `:""}${t.documentElement.outerHTML}