decocms 4.325.1 → 4.325.3

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 (274) hide show
  1. package/dist/client/assets/{AlertCircle-Bs6oknH_.js → AlertCircle-Wbx84J6P.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B4QZuiFF.js → AreaChart-Cld_d890.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BWSnRuGm.js → ArrowLeft-BJlpl6z3.js} +1 -1
  4. package/dist/client/assets/{ArrowUp--KPYS_Zx.js → ArrowUp-BSj9TnDQ.js} +1 -1
  5. package/dist/client/assets/{Check-tzg1v70M.js → Check-AnkVYvzC.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-8VMJtbLE.js → CheckCircle-DwmOpGug.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-CiQ4250Y.js → ChevronRight-pYTAY0dL.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-BoLsghjN.js → ChevronSelectorVertical-BbsmXbxd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CdsnYS3o.js → ChevronUp-3g3WN6eT.js} +1 -1
  10. package/dist/client/assets/{Copy01-BMb_uucS.js → Copy01-sos155fT.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CYcMMyuv.js → CreditCard01-VG7XqKoo.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Csr6l19K.js → DotsVertical-DuuOH2An.js} +1 -1
  13. package/dist/client/assets/{Download01-DC7Ed5MF.js → Download01-DcuqUkne.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-CWInPftf.js → ErrorBarContext-BM4rcvvu.js} +1 -1
  15. package/dist/client/assets/{Eye-D3-C_xXn.js → Eye-UqfDVX8c.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-BBK46z_T.js → GitBranch01-DLsJ2eA8.js} +1 -1
  17. package/dist/client/assets/{Globe01-DZmHtz0b.js → Globe01-g_WhroPz.js} +1 -1
  18. package/dist/client/assets/{HardDrive-C5hOZFs-.js → HardDrive-DZFCo6aQ.js} +1 -1
  19. package/dist/client/assets/{Image01-DwIAdAUT.js → Image01-BZ7eP3sg.js} +1 -1
  20. package/dist/client/assets/{Key01-bUGu_NLF.js → Key01-ladeKbIs.js} +1 -1
  21. package/dist/client/assets/{Link01-CYHfOeCn.js → Link01-Cx-fsoFK.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-ItrpBJnM.js → LinkExternal01-Ct6ls10Y.js} +1 -1
  23. package/dist/client/assets/{Monitor01-B8OxufXb.js → Monitor01-CHYJhnW7.js} +1 -1
  24. package/dist/client/assets/{Package-B1Q6V5jC.js → Package-DlB0zfSe.js} +1 -1
  25. package/dist/client/assets/{Palette-CmDDPB-1.js → Palette-Cwg4Tz5U.js} +1 -1
  26. package/dist/client/assets/{Play-Cebbxrf7.js → Play-CNXxnEyG.js} +1 -1
  27. package/dist/client/assets/{Plus-DluN38us.js → Plus-CjjCgafZ.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Dtd4_W0w.js → SearchMd-CZf0Jno3.js} +1 -1
  29. package/dist/client/assets/{Sector-jDW2HqNy.js → Sector-D6LGQ5el.js} +1 -1
  30. package/dist/client/assets/{Settings02-CdkkNZQs.js → Settings02-DA_70bcH.js} +1 -1
  31. package/dist/client/assets/{Share07-CQi_kYTg.js → Share07-B_yFA1PQ.js} +1 -1
  32. package/dist/client/assets/{Shield01-nF6J5QH3.js → Shield01-P1rLU6cR.js} +1 -1
  33. package/dist/client/assets/{Stars01-BkXOAWkF.js → Stars01-izYFmAbe.js} +1 -1
  34. package/dist/client/assets/{Sun-DqwL2RBY.js → Sun-DwCUi13i.js} +1 -1
  35. package/dist/client/assets/{Tool01-UNDZEmAI.js → Tool01-Z3QYZ79t.js} +1 -1
  36. package/dist/client/assets/{Tool02-DLBy4do6.js → Tool02-BQmdN0LJ.js} +1 -1
  37. package/dist/client/assets/{Trash01-BiGnC-j2.js → Trash01-B8XVvUnv.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-DQn6MXk1.js → TrendUp01-CP0vQywV.js} +1 -1
  39. package/dist/client/assets/{Upload01-CEzfFT4A.js → Upload01-CbAoc2QM.js} +1 -1
  40. package/dist/client/assets/{User01-C7HywlOg.js → User01-Ct0i24vv.js} +1 -1
  41. package/dist/client/assets/{UserSquare-hx_yDjx2.js → UserSquare-BYbdOYH9.js} +1 -1
  42. package/dist/client/assets/{Users01-DSJGRawE.js → Users01-BYaxTYGQ.js} +1 -1
  43. package/dist/client/assets/{Users03-D0VbxK_7.js → Users03-jn24Kly8.js} +1 -1
  44. package/dist/client/assets/{XCircle-DpU-0ryx.js → XCircle-DlF5M8M0.js} +1 -1
  45. package/dist/client/assets/{XClose-BPl5N5wQ.js → XClose-CakjP9Y8.js} +1 -1
  46. package/dist/client/assets/{Zap-9WaWy-XB.js → Zap-Bf8uxQjq.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-JTfIuUYt.js → ZoomOut-fURlNFfr.js} +1 -1
  48. package/dist/client/assets/{access-gate-C43dXf2x.js → access-gate-65i3zTD_.js} +1 -1
  49. package/dist/client/assets/{agent-icon-72FlHM-8.js → agent-icon-Sp3pGLLY.js} +1 -1
  50. package/dist/client/assets/agents-list-BZ7PpN5S.js +1 -0
  51. package/dist/client/assets/ai-providers-DlXNHZZI.js +1 -0
  52. package/dist/client/assets/{alert-DPh9CuwD.js → alert-Covq9TpT.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-DY5pueun.js → alert-dialog-Cj0fNCkE.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-BUjurxUV.js → analytics-tab-BGfMFYes.js} +1 -1
  55. package/dist/client/assets/{api-keys-BfTxJZ5X.js → api-keys-CwoRMmEY.js} +1 -1
  56. package/dist/client/assets/api-keys-Dcjx1Kt1.js +1 -0
  57. package/dist/client/assets/app-editor-BXmBcjlO.js +1 -0
  58. package/dist/client/assets/{auth-CRRmnvXP.js → auth-DzRAXSGB.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-CHovBt0N.js → auth-catchall-C0obfXjs.js} +1 -1
  60. package/dist/client/assets/{auth-entry-BMs-KpEE.js → auth-entry-DpCTb7jI.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-RvH6q9Np.js → auth-split-layout-TPhGW0ur.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-D6lfMerI.js → authenticate-and-persist-oauth-B1cWso3x.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-PO_mCBtT.js → automation-list-row-BR_7Wuv2.js} +1 -1
  64. package/dist/client/assets/{automation-runs-CzvbjIvf.js → automation-runs-Bt1_onfP.js} +1 -1
  65. package/dist/client/assets/automations-qhDCv6KW.js +1 -0
  66. package/dist/client/assets/{avatar-Br5BYZeI.js → avatar-B5NKRFBP.js} +1 -1
  67. package/dist/client/assets/{badge-BXMUzYIE.js → badge-BmwbVsh5.js} +1 -1
  68. package/dist/client/assets/{block-document-D1scmISJ.js → block-document-DsxmquN5.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-CXuS6gNw.js → breadcrumb-B_bU6eJc.js} +1 -1
  70. package/dist/client/assets/{buckets-CwnhCBpn.js → buckets-CJXf1hSG.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-GXmEs2lp.js → bulk-category-panel-CEbuB3eE.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-ClieXywX.js → capability-load-error-Du-FbaTG.js} +1 -1
  73. package/dist/client/assets/{cards-O9HwAVOg.js → cards-D4AMs5hh.js} +1 -1
  74. package/dist/client/assets/category-editor-Q8mnyuVW.js +1 -0
  75. package/dist/client/assets/{cdn-tab-CX4QEdwN.js → cdn-tab-YI9cEF0c.js} +1 -1
  76. package/dist/client/assets/{chart-B9GbOmAC.js → chart-Dodu1xOc.js} +1 -1
  77. package/dist/client/assets/chat-context-C0gBnrEt.js +35 -0
  78. package/dist/client/assets/{checkbox-HAQ_nhYr.js → checkbox-DnuAdak3.js} +1 -1
  79. package/dist/client/assets/{choose-editor-D3HFCFTx.js → choose-editor-z_RSHVAe.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-D2QQP4Pz.js → cli-auth-success-B04DqfZh.js} +1 -1
  81. package/dist/client/assets/{client-icons-BaBjOI1p.js → client-icons-DyKPA_If.js} +1 -1
  82. package/dist/client/assets/collection-detail-Bmgm6Xpz.js +1 -0
  83. package/dist/client/assets/{collection-display-button-BY4YA6Dx.js → collection-display-button-BjYcW4FZ.js} +1 -1
  84. package/dist/client/assets/{collection-search-BrUxTz45.js → collection-search-CDZk-ZPx.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-DnbZ0Kcw.js → collection-table-wrapper-CGGQrcHR.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-DsyRDJCm.js → collection-tabs-D1lKbsAt.js} +1 -1
  87. package/dist/client/assets/{command-CdGnJ_4A.js → command-Ci-j3lot.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-CWKskFIZ.js → commerce-onboarding-Q76OphjB.js} +1 -1
  89. package/dist/client/assets/{connect-BuKUuVUR.js → connect-CE0PvrLj.js} +1 -1
  90. package/dist/client/assets/{connect-layout-DrkT05cr.js → connect-layout-CmPm31Qh.js} +1 -1
  91. package/dist/client/assets/{connection-card-CB2F5qRw.js → connection-card-Cuu-NGPd.js} +1 -1
  92. package/dist/client/assets/connection-detail-CQJhxj9a.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-zpf3c404.js → connection-form-helpers-CBOILzhO.js} +1 -1
  94. package/dist/client/assets/{connection-Cdt4e_MW.js → connection-gqBIrJrp.js} +1 -1
  95. package/dist/client/assets/{connections-o8DS2PkE.js → connections-k4235kPb.js} +1 -1
  96. package/dist/client/assets/{create-organization-dialog-CAXMeKuh.js → create-organization-dialog-C3yQmz3P.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-CU_zK481.js → decopilot-sse-pool-CdJPh08p.js} +1 -1
  98. package/dist/client/assets/{dialog-DMyJgxgJ.js → dialog-CWKQw2WC.js} +1 -1
  99. package/dist/client/assets/{domain-settings-DygUFpUg.js → domain-settings-BSba6mpG.js} +1 -1
  100. package/dist/client/assets/download-app-dialog-BEy2Wnzj.js +1 -0
  101. package/dist/client/assets/{drawer-DYxoRn2r.js → drawer-ClX3akJx.js} +1 -1
  102. package/dist/client/assets/{dropdown-menu-Yn3mK79I.js → dropdown-menu-DUEIZWiX.js} +1 -1
  103. package/dist/client/assets/e2e-tab-DC0rCpOL.js +1 -0
  104. package/dist/client/assets/{editor-B0bws0TS.js → editor-DeUxecc_.js} +1 -1
  105. package/dist/client/assets/{empty-state-DTBt1PEx.js → empty-state-C-9VdPkJ.js} +1 -1
  106. package/dist/client/assets/{empty-state-BxVwjQ2y.js → empty-state-DYE3rkmB.js} +1 -1
  107. package/dist/client/assets/{extract-connection-data-BJMOxVAc.js → extract-connection-data-KaTj8mHV.js} +1 -1
  108. package/dist/client/assets/file-explorer-D4SVt02z.js +2 -0
  109. package/dist/client/assets/{file-type-icon-BYEG4qUb.js → file-type-icon-CB7H_Wiy.js} +1 -1
  110. package/dist/client/assets/{folder-icon-Dhr9f8sV.js → folder-icon-C6cEeAnl.js} +1 -1
  111. package/dist/client/assets/{form-7uhYa81Z.js → form-CUXIC19o.js} +1 -1
  112. package/dist/client/assets/{general-Dfo1MRMx.js → general-DW9bVist.js} +1 -1
  113. package/dist/client/assets/github-repo-picker-9AcEQIzR.js +1 -0
  114. package/dist/client/assets/hooks-DquOZ-Xk.js +15 -0
  115. package/dist/client/assets/{hosting-tab-CPEQL5Zn.js → hosting-tab-fN4y3bIT.js} +1 -1
  116. package/dist/client/assets/{index-Bwv8rTxR.js → index-BRMuylL4.js} +1 -1
  117. package/dist/client/assets/{index-BQSq2G-I.js → index-BfWwYPwx.js} +1 -1
  118. package/dist/client/assets/{index-PqfClboL.js → index-BkawI5he.js} +3 -3
  119. package/dist/client/assets/{index-XRXk-Rxu.js → index-Cdu9R7BQ.js} +1 -1
  120. package/dist/client/assets/index-CiiXjYYX.css +1 -0
  121. package/dist/client/assets/index-CnZuejsK.js +1 -0
  122. package/dist/client/assets/index-D-9OW3Wb.js +823 -0
  123. package/dist/client/assets/{index-POPUMVNy.js → index-D821QKnk.js} +1 -1
  124. package/dist/client/assets/{index-ChsC-xtq.js → index-DGNeXmXN.js} +1 -1
  125. package/dist/client/assets/index-Dpj-HbFs.js +1 -0
  126. package/dist/client/assets/{index-DSfaX8ZJ.js → index-m6p9dAul.js} +2 -2
  127. package/dist/client/assets/{index-redirect-D3VpT043.js → index-redirect-1cfJeTJH.js} +1 -1
  128. package/dist/client/assets/{infra-billing-nit3ydE6.js → infra-billing-H5rZU-k1.js} +1 -1
  129. package/dist/client/assets/{input-D7VtAJjJ.js → input-fTgot4-g.js} +1 -1
  130. package/dist/client/assets/{integration-icon-lLjfXy11.js → integration-icon-BLOQWR7d.js} +1 -1
  131. package/dist/client/assets/{invite-member-dialog-BJIBOFoX.js → invite-member-dialog-BIgrWqr7.js} +1 -1
  132. package/dist/client/assets/{label-QKhMkhs7.js → label-CDt53aWD.js} +1 -1
  133. package/dist/client/assets/{layout-DOq1GsRD.js → layout-C_t6Nu2o.js} +1 -1
  134. package/dist/client/assets/{login-BBnes1GR.js → login-C7qvLy5B.js} +1 -1
  135. package/dist/client/assets/{markdown-Cxpdg1Ih.js → markdown-Dzj7KfMq.js} +1 -1
  136. package/dist/client/assets/{mcp-oauth-EPG_9QaY.js → mcp-oauth-PBuEj92n.js} +1 -1
  137. package/dist/client/assets/{members-BlESIwlU.js → members-D_XPbFzI.js} +1 -1
  138. package/dist/client/assets/{monaco-editor-Dh9B6hNJ.js → monaco-editor-DAtKorVX.js} +1 -1
  139. package/dist/client/assets/{monitoring-stats-row-DywkwDMi.js → monitoring-stats-row-zC9HU0u6.js} +1 -1
  140. package/dist/client/assets/{multi-select-Bz32pXhp.js → multi-select-Dnr7PAJj.js} +1 -1
  141. package/dist/client/assets/{oauth-callback-DhO6sCUj.js → oauth-callback-Cyp9j0ys.js} +1 -1
  142. package/dist/client/assets/{oauth-callback-ai-provider-DulaWBfe.js → oauth-callback-ai-provider-BkDqDLNZ.js} +1 -1
  143. package/dist/client/assets/{onboarding-ByioA-uf.js → onboarding-CvnwGB6M.js} +1 -1
  144. package/dist/client/assets/org-layout-DItAI5Di.js +1 -0
  145. package/dist/client/assets/{organization-choice-BCHO8vJQ.js → organization-choice-Brz54IKk.js} +1 -1
  146. package/dist/client/assets/{orgs-Bvnh03Bo.js → orgs-CcUI9HgJ.js} +1 -1
  147. package/dist/client/assets/{page-seo-form-Bt8Zizqh.js → page-seo-form-OTDku7Z1.js} +1 -1
  148. package/dist/client/assets/{popover-B2EbEKJC.js → popover-DjscXujA.js} +1 -1
  149. package/dist/client/assets/post-calendar-BcunQFOG.js +1 -0
  150. package/dist/client/assets/post-editor-N40xpPkk.js +1 -0
  151. package/dist/client/assets/{primitives-Bo7_tdMO.js → primitives-_Vnzju1y.js} +1 -1
  152. package/dist/client/assets/{profile-DsU0NYMZ.js → profile-B_l90EbD.js} +1 -1
  153. package/dist/client/assets/project-app-view-Dq7iYeXJ.js +1 -0
  154. package/dist/client/assets/{project-icon-B6DBvpFP.js → project-icon-D7jcmH3z.js} +1 -1
  155. package/dist/client/assets/{prompts-a208VJ3D.js → prompts-fLxWWgz-.js} +1 -1
  156. package/dist/client/assets/record-editor-Ci_NDgeT.js +1 -0
  157. package/dist/client/assets/redirect-editor-BePOP1Ph.js +1 -0
  158. package/dist/client/assets/registry-Bh5jhzbl.js +2 -0
  159. package/dist/client/assets/{registry-layout-wVidPSJE.js → registry-layout-CLY27ukG.js} +1 -1
  160. package/dist/client/assets/{reports-D6HjeWJ9.js → reports-CGghkfg_.js} +1 -1
  161. package/dist/client/assets/{require-capability-Dg6MWzmr.js → require-capability-D2jyLdx0.js} +1 -1
  162. package/dist/client/assets/{required-auth-layout-yWBNl8Cx.js → required-auth-layout-ZGcoBsTU.js} +1 -1
  163. package/dist/client/assets/{reset-password-DCP1Kpo3.js → reset-password-Dkrm3cHn.js} +1 -1
  164. package/dist/client/assets/{review-settings-BU6OU9b2.js → review-settings-DLtdjNmr.js} +1 -1
  165. package/dist/client/assets/{roles-DYdC1C9F.js → roles-CcvMkry_.js} +1 -1
  166. package/dist/client/assets/{schema-CExEiY9w.js → schema-C5E0ePqu.js} +1 -1
  167. package/dist/client/assets/{scroll-area-DWesqnEX.js → scroll-area-F200w2mh.js} +1 -1
  168. package/dist/client/assets/{search-input-DzDwGhUj.js → search-input-DJIbu8BB.js} +1 -1
  169. package/dist/client/assets/{secrets-CdlnUVmb.js → secrets-DMZxvEj_.js} +1 -1
  170. package/dist/client/assets/{sections-editor-BeCO13DA.js → sections-editor-DwiAEnZ7.js} +2 -2
  171. package/dist/client/assets/{select-fQpkdmCP.js → select-aD2SqHOW.js} +1 -1
  172. package/dist/client/assets/{select-model-B87liE0s.js → select-model-BAm7L9iK.js} +1 -1
  173. package/dist/client/assets/{self-tool-result-CI9lePBq.js → self-tool-result-j5kSv4ca.js} +1 -1
  174. package/dist/client/assets/seo-editor-Cm_lDZye.js +1 -0
  175. package/dist/client/assets/settings-layout-DLlpPiRj.js +1 -0
  176. package/dist/client/assets/{settings-sidebar-BK0qHuDP.js → settings-sidebar-CFckzuH2.js} +1 -1
  177. package/dist/client/assets/{shell-controls-CjEodxq6.js → shell-controls-B6jpfAPG.js} +1 -1
  178. package/dist/client/assets/shell-layout-BBeCMSA6.js +1 -0
  179. package/dist/client/assets/{skill-preview-JM1C9U_u.js → skill-preview-Crvic_gM.js} +1 -1
  180. package/dist/client/assets/{skills-Df3FjNOT.js → skills-CJys28KJ.js} +1 -1
  181. package/dist/client/assets/{sso-CdbC3Fg8.js → sso-BbCXtvEm.js} +1 -1
  182. package/dist/client/assets/{store-hf3sk0kY.js → store-DxhB5rKM.js} +1 -1
  183. package/dist/client/assets/store-registry-DECUw0kw.js +2 -0
  184. package/dist/client/assets/{switch-CXvibrMM.js → switch-BImv-gvt.js} +1 -1
  185. package/dist/client/assets/synced-repos-Y5DAHAzN.js +1 -0
  186. package/dist/client/assets/{table-kp1XE9dT.js → table-svMfP7N5.js} +1 -1
  187. package/dist/client/assets/{tabs-B3JjqSsa.js → tabs-DX2hIJ3b.js} +1 -1
  188. package/dist/client/assets/{task-board-Cu8abk2x.js → task-board-CU2obT3r.js} +1 -1
  189. package/dist/client/assets/task-route-DCBGrQpz.js +1 -0
  190. package/dist/client/assets/{tasks-N9V2sftX.js → tasks-g-5mQjJo.js} +1 -1
  191. package/dist/client/assets/{textarea-CiJM1au8.js → textarea-DJdAgtmk.js} +1 -1
  192. package/dist/client/assets/{toggle-group-B-2KCs2i.js → toggle-group-BtNaSJHm.js} +1 -1
  193. package/dist/client/assets/{toolbar-icon-button-DsVbEvkI.js → toolbar-icon-button-DI6yIlPy.js} +1 -1
  194. package/dist/client/assets/{toolbar-CUoJwayP.js → toolbar-kq9Y7nNF.js} +1 -1
  195. package/dist/client/assets/{track-DnpAx3e3.js → track-X0YKsDzo.js} +1 -1
  196. package/dist/client/assets/{types-ZeUbZJLS.js → types-BeDjBiKO.js} +1 -1
  197. package/dist/client/assets/{use-ai-providers-d40kZQC-.js → use-ai-providers-AGwxnFdj.js} +1 -1
  198. package/dist/client/assets/{use-automations-_m8whHp0.js → use-automations-CmwM0DEc.js} +1 -1
  199. package/dist/client/assets/{use-autosave-BIsH8JCz.js → use-autosave-lN3i2RtH.js} +1 -1
  200. package/dist/client/assets/{use-connection-amUUqPK2.js → use-connection-CsZlLbEZ.js} +1 -1
  201. package/dist/client/assets/{use-copy-24vRYGpf.js → use-copy-DHyeBoZ8.js} +1 -1
  202. package/dist/client/assets/{use-create-virtual-mcp-CZJOLPMm.js → use-create-virtual-mcp-BOvsC0DW.js} +1 -1
  203. package/dist/client/assets/{use-debounced-autosave-zxAYDFyH.js → use-debounced-autosave-8VnwrEMs.js} +1 -1
  204. package/dist/client/assets/{use-debounced-value-Bp44IQzu.js → use-debounced-value-3IbXIZAk.js} +1 -1
  205. package/dist/client/assets/{use-decopilot-events-2Ng0Wxeb.js → use-decopilot-events-WOaP0SQC.js} +1 -1
  206. package/dist/client/assets/{use-delete-connection-DcTxrCff.js → use-delete-connection-Df_yxWGf.js} +1 -1
  207. package/dist/client/assets/{use-deployment-admin-BiVz722u.js → use-deployment-admin-CMRSZLUJ.js} +1 -1
  208. package/dist/client/assets/{use-destination-route-C9WCN5J4.js → use-destination-route-B2O150Yr.js} +1 -1
  209. package/dist/client/assets/{use-file-configs-DBg-_83I.js → use-file-configs-B45QMkT9.js} +1 -1
  210. package/dist/client/assets/{use-infinite-scroll-BMWJMaLX.js → use-infinite-scroll-PS5OvGme.js} +1 -1
  211. package/dist/client/assets/{use-join-requests-Di5GolzA.js → use-join-requests-DPn5Hwkp.js} +1 -1
  212. package/dist/client/assets/{use-mcp-auth-status-8HlvMX_V.js → use-mcp-auth-status-CaPfR8Sa.js} +1 -1
  213. package/dist/client/assets/{use-mcp-client-DJ1XmaTL.js → use-mcp-client-DxE4Ab64.js} +1 -1
  214. package/dist/client/assets/{use-mcp-prompts-BsTT4HpT.js → use-mcp-prompts-BNrqL_f0.js} +1 -1
  215. package/dist/client/assets/{use-members-CH0-g0gG.js → use-members-Nvqy7Dzy.js} +1 -1
  216. package/dist/client/assets/use-navigate-to-agent-Cf-IaJUb.js +5 -0
  217. package/dist/client/assets/{use-org-auth-client-YfM297vM.js → use-org-auth-client-BR0PCT04.js} +1 -1
  218. package/dist/client/assets/{use-org-sso-BlX-8VL5.js → use-org-sso-CblCPla_.js} +1 -1
  219. package/dist/client/assets/{use-organization-roles-BpyMQI7X.js → use-organization-roles-PibAy9Wd.js} +1 -1
  220. package/dist/client/assets/{use-organization-settings-YKFwQGNn.js → use-organization-settings-BV17wl2V.js} +1 -1
  221. package/dist/client/assets/{use-panel-navigate-CIgiHkeA.js → use-panel-navigate-BG-ooS17.js} +1 -1
  222. package/dist/client/assets/{use-registry-connections-zd4c05Ap.js → use-registry-connections-CdSZH0XX.js} +1 -1
  223. package/dist/client/assets/{use-secrets-BTq66_-S.js → use-secrets-BjE52mie.js} +1 -1
  224. package/dist/client/assets/{use-section-preview-base-DqvXqLZC.js → use-section-preview-base-BmQOZ8go.js} +1 -1
  225. package/dist/client/assets/{use-status-sounds-DgQE41Lh.js → use-status-sounds-tS7pmMWO.js} +1 -1
  226. package/dist/client/assets/{use-tags-DGA6n_kJ.js → use-tags-B-KgG3zC.js} +1 -1
  227. package/dist/client/assets/{use-view-mode-DSzG493O.js → use-view-mode-DRYLjqJC.js} +1 -1
  228. package/dist/client/assets/{use-virtual-mcp-BksmT3bT.js → use-virtual-mcp-DT_fCnuE.js} +1 -1
  229. package/dist/client/assets/useInfiniteQuery-Din4IYlF.js +1 -0
  230. package/dist/client/assets/useSuspenseInfiniteQuery-BeASDmXg.js +1 -0
  231. package/dist/client/assets/{users-BPr-fuIf.js → users-ByFjNqYU.js} +1 -1
  232. package/dist/client/assets/variant-calendar-CJr-jUZm.js +1 -0
  233. package/dist/client/assets/{view-mode-toggle-C67UxAXH.js → view-mode-toggle-DTFhAaHw.js} +1 -1
  234. package/dist/client/index.html +2 -2
  235. package/dist/server/cli.js +1 -1
  236. package/dist/server/server.js +1 -1
  237. package/package.json +1 -1
  238. package/dist/client/assets/agents-list-BUPE60si.js +0 -1
  239. package/dist/client/assets/ai-providers-DmDe6Gty.js +0 -1
  240. package/dist/client/assets/api-keys-Bd9DYtgW.js +0 -1
  241. package/dist/client/assets/app-editor-BJKUCNC6.js +0 -1
  242. package/dist/client/assets/automations-nRglVV0y.js +0 -1
  243. package/dist/client/assets/category-editor-Di1MXTcN.js +0 -1
  244. package/dist/client/assets/chat-context-Cy0rls8c.js +0 -35
  245. package/dist/client/assets/collection-detail-DYHHeZVM.js +0 -1
  246. package/dist/client/assets/connection-detail-DAkCIdQD.js +0 -1
  247. package/dist/client/assets/e2e-tab-BXDm7nmf.js +0 -1
  248. package/dist/client/assets/file-explorer-t_U5CroL.js +0 -2
  249. package/dist/client/assets/github-repo-picker-EcTfqXw_.js +0 -1
  250. package/dist/client/assets/hooks-g1jnmSoE.js +0 -15
  251. package/dist/client/assets/index-jEPflMqW.js +0 -1
  252. package/dist/client/assets/index-qz9ifuG0.js +0 -1
  253. package/dist/client/assets/index-yssuKkag.css +0 -1
  254. package/dist/client/assets/index-z2239Bry.js +0 -827
  255. package/dist/client/assets/org-layout-Dvo2y_Om.js +0 -1
  256. package/dist/client/assets/post-calendar-38SpOhqM.js +0 -1
  257. package/dist/client/assets/post-editor-CVqw01s1.js +0 -1
  258. package/dist/client/assets/project-app-view-U3CUTPtn.js +0 -1
  259. package/dist/client/assets/record-editor-Bu1_BZdU.js +0 -1
  260. package/dist/client/assets/redirect-editor-Cm6r-l-h.js +0 -1
  261. package/dist/client/assets/registry-5rcVxBcm.js +0 -2
  262. package/dist/client/assets/seo-editor-CLInI0zF.js +0 -1
  263. package/dist/client/assets/settings-layout-Cp7g61nX.js +0 -1
  264. package/dist/client/assets/shell-layout-CyEhpljU.js +0 -1
  265. package/dist/client/assets/store-registry-BmzDbcKr.js +0 -2
  266. package/dist/client/assets/synced-repos-CtKGkEKp.js +0 -1
  267. package/dist/client/assets/task-route-DOCtDdvo.js +0 -1
  268. package/dist/client/assets/thread-intent-BXltPzDX.js +0 -1
  269. package/dist/client/assets/thread-route-CqJiATkn.js +0 -1
  270. package/dist/client/assets/use-mcp-tools-DrikIu-o.js +0 -1
  271. package/dist/client/assets/use-navigate-to-agent-C-nz-Qsl.js +0 -1
  272. package/dist/client/assets/useInfiniteQuery-ZaOAcalc.js +0 -1
  273. package/dist/client/assets/useSuspenseInfiniteQuery-Er-flM0P.js +0 -1
  274. package/dist/client/assets/variant-calendar-f0A7QMqN.js +0 -1
@@ -1 +0,0 @@
1
- import{bW as Us,c as O,l as J,j as n,h as Qe,r as G,I as ss,G as Gs,o as oe,b as Q,b5 as Hs,W as le,d as ns,a6 as os,_ as is,L as Qs,a1 as Le,a2 as Me,a4 as Re,a as Dt,F as qs,ar as Ws,as as Ys,B as ye,t as de,H as Xs,J as Js,K as fe,n as at,a7 as At,m as lt,bv as Zs,e as Oe,bl as en,ap as tn}from"./index-PqfClboL.js";import{c as rs,u as sn,d as as}from"./thread-route-CqJiATkn.js";import{t as Ge}from"./ChevronUp-CdsnYS3o.js";import{A as ls,N as nn,s as jt,aJ as on,aK as rn,aL as Kt,aM as an,t as ln,aN as cn,a6 as dn,aO as un,p as fn,aP as mn,a4 as bt,a3 as pn,aa as gn}from"./agent-icon-72FlHM-8.js";import{a as cs,i as hn,e as xn,S as jn,f as bn}from"./constants-DNuUCxmW.js";import{b as Tt,u as yn}from"./use-virtual-mcp-BksmT3bT.js";import{g as vn,p as Cn,r as kn}from"./github-repo-COLY3wWI.js";import{T as ds}from"./toolbar-icon-button-DsVbEvkI.js";import{P as ct,a as Ue,b as dt}from"./popover-B2EbEKJC.js";import{D as It,a as Ft,b as Bt,c as Nn,e as Sn,f as us,g as fs,d as wn}from"./drawer-DYxoRn2r.js";import{i as _n}from"./SearchMd-Dtd4_W0w.js";import{i as qe}from"./Check-tzg1v70M.js";import{s as Ye}from"./Plus-DluN38us.js";import{G as ms,a as Dn}from"./github-repo-picker-EcTfqXw_.js";import{g as An,u as Tn,b as ps}from"./hooks-g1jnmSoE.js";import{g as In,b as gs,P as Fn}from"./project-icon-B6DBvpFP.js";import{u as hs}from"./shell-layout-CyEhpljU.js";import{a as Bn}from"./use-navigate-to-agent-C-nz-Qsl.js";import{d as Pn}from"./thread-intent-BXltPzDX.js";import{C as En}from"./collection-search-BrUxTz45.js";import{g as Vn,b as $n,a as On,e as Ln}from"./extract-connection-data-BJMOxVAc.js";import{u as xs,a as js,g as Mn,C as yt}from"./connection-card-CB2F5qRw.js";import{D as bs,b as ys,c as vs,d as Cs,h as Rn,e as Kn}from"./dialog-DMyJgxgJ.js";import{d as pe,a as ge,e as he,b as xe,c as je,F as zt}from"./form-7uhYa81Z.js";import{I as Se}from"./input-D7VtAJjJ.js";import{S as zn,a as Un,b as Gn,c as Hn,d as He}from"./select-fQpkdmCP.js";import{T as Qn}from"./textarea-CiJM1au8.js";import{b as ks}from"./use-connection-amUUqPK2.js";import{n as ot,a as vt,i as Ns}from"./Tool02-DLBy4do6.js";import{b as qn,d as Wn}from"./UserSquare-hx_yDjx2.js";import{s as Yn}from"./XClose-BPl5N5wQ.js";import{c as Xn,i as et,a as Ut,E as Jn,p as Zn,b as eo,d as to}from"./connection-form-helpers-zpf3c404.js";import{a as Ct}from"./authenticate-and-persist-oauth-D6lfMerI.js";import{g as so}from"./connection-slug-CITJ0kGN.js";import{C as no}from"./collection-tabs-DsyRDJCm.js";import{u as Gt}from"./use-infinite-scroll-BMWJMaLX.js";import{B as tt}from"./badge-BXMUzYIE.js";import{u as oo}from"./useSuspenseInfiniteQuery-Er-flM0P.js";import{u as io}from"./use-mcp-client-DJ1XmaTL.js";import{g as it}from"./metadata-dUsYcpuu.js";import{u as ro}from"./use-ai-providers-d40kZQC-.js";import{a as ao}from"./use-file-configs-DBg-_83I.js";import{d as lo}from"./use-organization-settings-YKFwQGNn.js";import{r as co}from"./site-slug-uya6Wp4-.js";import{T as uo,C as Pt,c as fo,d as mo,S as Nt}from"./task-board-Cu8abk2x.js";import{t as po}from"./decopilot-sse-pool-CU_zK481.js";import{u as go}from"./use-decopilot-events-2Ng0Wxeb.js";import{A as Ht}from"./avatar-Br5BYZeI.js";import{h as rt,D as Ss,b as ws,g as _s,c as Ds}from"./dropdown-menu-Yn3mK79I.js";import{e as Ke,a as Et,c as Vt,d as Ce,b as $t,C as Ot}from"./command-CdGnJ_4A.js";import{s as ho}from"./TrendUp01-DQn6MXk1.js";import{a as xo}from"./Settings02-CdkkNZQs.js";import{s as Qt}from"./User01-C7HywlOg.js";import{g as qt}from"./get-initials-D-f_fDFw.js";import{i as jo}from"./AlertCircle-Bs6oknH_.js";import{i as bo}from"./CheckCircle-8VMJtbLE.js";import{a as As}from"./DotsVertical-Csr6l19K.js";import{s as yo}from"./Eye-D3-C_xXn.js";import{i as vo}from"./Shield01-nF6J5QH3.js";const Co=Us("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function ko(t){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:r,className:i,isSearching:c,disabled:l}=t,f=a===void 0?"Search...":a;let u;e[0]!==i?(u=J("shrink-0 w-full border-b border-border h-12",i),e[0]=i,e[1]=u):u=e[1];const m=l?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==m?(d=J("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=d):d=e[3];let p;e[4]!==c?(p=c?n.jsx(Qe,{className:"size-4 text-muted-foreground shrink-0"}):n.jsx(_n,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=p):p=e[5];let g;e[6]!==o?(g=N=>o(N.target.value),e[6]=o,e[7]=g):g=e[7];let h;e[8]!==l||e[9]!==r||e[10]!==f||e[11]!==g||e[12]!==s?(h=n.jsx("input",{type:"text",value:s,onChange:g,onKeyDown:r,placeholder:f,disabled:l,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=l,e[9]=r,e[10]=f,e[11]=g,e[12]=s,e[13]=h):h=e[13];let x;e[14]!==d||e[15]!==p||e[16]!==h?(x=n.jsxs("label",{className:d,children:[p,h]}),e[14]=d,e[15]=p,e[16]=h,e[17]=x):x=e[17];let j;return e[18]!==u||e[19]!==x?(j=n.jsx("div",{className:u,children:x}),e[18]=u,e[19]=x,e[20]=j):j=e[20],j}function No(t,e,s){if(!s)return null;const o=An(t,e);return o?o.threads.get().find(r=>r.id===s)?.branch??null:null}const Ts=G.createContext(null);function aa(t){const e=O.c(5),{children:s}=t,[o,a]=G.useState(!1);let r;e[0]!==o?(r={empty:o,setEmpty:a},e[0]=o,e[1]=r):r=e[1];let i;return e[2]!==s||e[3]!==r?(i=n.jsx(Ts.Provider,{value:r,children:s}),e[2]=s,e[3]=r,e[4]=i):i=e[4],i}function So(){return G.useContext(Ts)?.empty??!1}function wo(t){const e=O.c(6),{value:s,onChange:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=r):r=e[1];let i;return e[2]!==o||e[3]!==r||e[4]!==s?(i=n.jsx(ko,{value:s,onChange:o,placeholder:r}),e[2]=o,e[3]=r,e[4]=s,e[5]=i):i=e[5],i}function _o(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Do(t){const e=O.c(10),{org:s,onClose:o}=t,a=Q();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==o?(i=()=>o(),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==r||e[7]!==i||e[8]!==c?(l=n.jsx("div",{className:"border-t border-border px-3 py-2.5",children:n.jsx(Qs,{to:"/$org/settings/agents",params:r,onClick:i,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=r,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function Ao(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Is,{children:s}),t[2]=s,t[3]=o):o=t[3],o}function To(t){const e=O.c(11),{onImportFromGithub:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ms,{className:"size-3.5"}),e[0]=a):a=e[0];let r;e[1]!==o?(r=o("sidebar.agentsSection.import"),e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s||e[4]!==r?(i=n.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,r]}),e[3]=s,e[4]=r,e[5]=i):i=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let l;return e[8]!==i||e[9]!==c?(l=n.jsx(Is,{action:i,children:c}),e[8]=i,e[9]=c,e[10]=l):l=e[10],l}function Io(t){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J(o),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==s?(c=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{className:"size-4"}),e[6]=l):l=e[6];let f;return e[7]!==r||e[8]!==i||e[9]!==c?(f=n.jsx(ds,{"aria-label":r,className:i,onClick:c,children:l}),e[7]=r,e[8]=i,e[9]=c,e[10]=f):f=e[10],f}function Fo(t){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==s?(l=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=l):l=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ye,{}),e[7]=f):f=e[7];let u;e[8]!==r?(u=r("sidebar.agentsSection.newAgent"),e[8]=r,e[9]=u):u=e[9];let m;e[10]!==u?(m=n.jsx("span",{children:u}),e[10]=u,e[11]=m):m=e[11];let d;return e[12]!==i||e[13]!==c||e[14]!==l||e[15]!==m?(d=n.jsx(os,{children:n.jsxs(is,{tooltip:i,className:c,onClick:l,children:[f,m]})}),e[12]=i,e[13]=c,e[14]=l,e[15]=m,e[16]=d):d=e[16],d}function Bo(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Bt,{className:"sr-only",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Po(t){const e=O.c(8),{emptyCtaClass:s}=t,o=Q();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let r;e[2]!==s?(r=J(s),e[2]=s,e[3]=r):r=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ye,{className:"size-4"}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==r?(c=n.jsx(ds,{"aria-label":a,className:r,children:i}),e[5]=a,e[6]=r,e[7]=c):c=e[7],c}function Eo(t){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{}),e[5]=l):l=e[5];let f;e[6]!==r?(f=r("sidebar.agentsSection.newAgent"),e[6]=r,e[7]=f):f=e[7];let u;e[8]!==f?(u=n.jsx("span",{children:f}),e[8]=f,e[9]=u):u=e[9];let m;e[10]!==i||e[11]!==c||e[12]!==u?(m=n.jsx(Ue,{asChild:!0,children:n.jsxs(is,{tooltip:i,className:c,children:[l,u]})}),e[10]=i,e[11]=c,e[12]=u,e[13]=m):m=e[13];let d;e[14]!==m||e[15]!==s?(d=s(m),e[14]=m,e[15]=s,e[16]=d):d=e[16];let p;return e[17]!==d?(p=n.jsx(os,{children:d}),e[17]=d,e[18]=p):p=e[18],p}function Vo(t){const e=O.c(9),{children:s}=t,o=Q();let a;e[0]!==s?(a=n.jsx(Le,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==o?(r=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=r):r=e[3];let i;e[4]!==r?(i=n.jsx(Me,{side:"right",sideOffset:8,children:r}),e[4]=r,e[5]=i):i=e[5];let c;return e[6]!==a||e[7]!==i?(c=n.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[a,i]}),e[6]=a,e[7]=i,e[8]=c):c=e[8],c}function $o(t){const e=ns(),{create:s}=Tn(),{locator:o}=le(),a=rs(),r=sn();return async i=>{const c=crypto.randomUUID(),l=i===r?No(t,o,a??""):null;try{await s({id:c,virtual_mcp_id:i,...l?{branch:l}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:c},search:{virtualmcpid:i}})}}function kt(t){const e=O.c(20),{agent:s,selected:o,onClick:a}=t,r=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let i;e[0]!==r?(i=J("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=i):i=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=n.jsx(ls,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let l;e[5]!==s.title?(l=n.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=l):l=e[6];let f;e[7]!==s.description?(f=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=f):f=e[8];let u;e[9]!==l||e[10]!==f?(u=n.jsxs("div",{className:"flex-1 min-w-0",children:[l,f]}),e[9]=l,e[10]=f,e[11]=u):u=e[11];let m;e[12]!==o?(m=o&&n.jsx(qe,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=m):m=e[13];let d;return e[14]!==a||e[15]!==i||e[16]!==c||e[17]!==u||e[18]!==m?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[c,u,m]}),e[14]=a,e[15]=i,e[16]=c,e[17]=u,e[18]=m,e[19]=d):d=e[19],d}function Is(t){const e=O.c(5),{children:s,action:o}=t;let a;e[0]!==s?(a=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let r;return e[2]!==o||e[3]!==a?(r=n.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=r):r=e[4],r}function Oo(t){const e=O.c(43),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:r}=t,[i,c]=G.useState(""),l=G.useDeferredValue(i),f=l||void 0;let u;e[0]!==f?(u={searchTerm:f},e[0]=f,e[1]=u):u=e[1];const m=Tt(u),d=m??[],{org:p}=le(),g=$o(p.slug),h=In(m),x=l.toLowerCase(),j=d.filter(Ko).filter(z=>!h.has(z.id)).filter(Ro),N=j.filter(Mo),y=j.filter(Lo),v=cs(p.id),k=!l||v.title.toLowerCase().includes(x),C=!!(o&&k);let D;e[2]!==s||e[3]!==o?(D=()=>{o?.(null),s(),c("")},e[2]=s,e[3]=o,e[4]=D):D=e[4];const b=D;let w;e[5]!==g||e[6]!==s||e[7]!==o?(w=z=>{if(o){o(z.id),s(),c("");return}s(),c(""),g(z.id)},e[5]=g,e[6]=s,e[7]=o,e[8]=w):w=e[8];const _=w,I="flex flex-col max-h-[min(640px,80dvh)]";let P;e[9]!==i?(P=n.jsx(wo,{value:i,onChange:c}),e[9]=i,e[10]=P):P=e[10];const S="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let A;e[11]!==v||e[12]!==o||e[13]!==b||e[14]!==a||e[15]!==k?(A=o&&k&&v&&n.jsx(kt,{agent:v,selected:!a||a===v.id,onClick:b}),e[11]=v,e[12]=o,e[13]=b,e[14]=a,e[15]=k,e[16]=A):A=e[16];const T=(N.length>0||!l)&&n.jsx(To,{onImportFromGithub:r});let R;e[17]!==_||e[18]!==o||e[19]!==a?(R=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[17]=_,e[18]=o,e[19]=a,e[20]=R):R=e[20];const E=N.map(R),F=y.length>0&&n.jsx(Ao,{});let L;e[21]!==_||e[22]!==o||e[23]!==a?(L=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[21]=_,e[22]=o,e[23]=a,e[24]=L):L=e[24];const q=y.map(L);let B;e[25]!==C||e[26]!==l||e[27]!==j.length?(B=j.length===0&&!C&&l&&n.jsx(_o,{}),e[25]=C,e[26]=l,e[27]=j.length,e[28]=B):B=e[28];let U;e[29]!==E||e[30]!==F||e[31]!==q||e[32]!==B||e[33]!==A||e[34]!==T?(U=n.jsxs("div",{className:S,children:[A,T,E,F,q,B]}),e[29]=E,e[30]=F,e[31]=q,e[32]=B,e[33]=A,e[34]=T,e[35]=U):U=e[35];let $;e[36]!==s||e[37]!==p?($=n.jsx(Do,{org:p,onClose:s}),e[36]=s,e[37]=p,e[38]=$):$=e[38];let H;return e[39]!==U||e[40]!==$||e[41]!==P?(H=n.jsxs("div",{className:I,children:[P,U,$]}),e[39]=U,e[40]=$,e[41]=P,e[42]=H):H=e[42],H}function Lo(t){return!gs(t.metadata)}function Mo(t){return gs(t.metadata)}function Ro(t){return!xn(t.id)}function Ko(t){return!hn(t.id)}function zo(t){const e=O.c(14),{compact:s,trigger:o,onSelectAgent:a,selectedAgentId:r,side:i,align:c}=t===void 0?{}:t,l=s===void 0?!1:s,f=i===void 0?"right":i,u=c===void 0?"start":c,[m,d]=G.useState(!1),[p,g]=G.useState(!1),h=ss(),{setOpenMobile:x}=Gs(),j=So(),N=j?"border border-border":void 0;let y;e[0]!==j?(y=S=>j?n.jsx(Vo,{children:S}):S,e[0]=j,e[1]=y):y=e[1];const v=y;let k;e[2]!==h||e[3]!==x?(k=()=>{d(!1),h&&x(!1)},e[2]=h,e[3]=x,e[4]=k):k=e[4];const C=k;let D;e[5]!==C||e[6]!==g?(D=()=>{C(),g(!0)},e[5]=C,e[6]=g,e[7]=D):D=e[7];const b=D,w=m&&n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Hs,{className:"h-4 w-24"})}),children:n.jsx(Oo,{onClose:C,onSelectAgent:a,selectedAgentId:r,onImportFromGithub:b})}),_=h?n.jsxs(n.Fragment,{children:[o?G.cloneElement(o,{onClick:S=>{o.props.onClick?.(S),d(!0)}}):l?v(n.jsx(Io,{setOpen:d,emptyCtaClass:N})):n.jsx(Fo,{setOpen:d,highlightEmpty:j,emptyCtaClass:N}),n.jsx(It,{open:m,onOpenChange:d,direction:"bottom",children:n.jsxs(Ft,{className:"max-h-[85dvh] p-0",children:[n.jsx(Bo,{}),w]})})]}):n.jsxs(ct,{open:m,onOpenChange:S=>{S&&!m&&oe("agent_browser_opened",{surface:"desktop_popover"}),d(S)},children:[o?n.jsx(Ue,{asChild:!0,children:o}):l?v(n.jsx(Ue,{asChild:!0,children:n.jsx(Po,{emptyCtaClass:N})})):n.jsx(Eo,{wrapEmptyHint:v,highlightEmpty:j,emptyCtaClass:N}),n.jsx(dt,{className:"w-[380px] p-0 overflow-hidden",side:f,align:u,children:w})]});let I;e[8]!==p||e[9]!==g?(I=n.jsx(Dn,{open:p,onOpenChange:g,mode:"agent"}),e[8]=p,e[9]=g,e[10]=I):I=e[10];let P;return e[11]!==_||e[12]!==I?(P=n.jsxs(n.Fragment,{children:[_,I]}),e[11]=_,e[12]=I,e[13]=P):P=e[13],P}function Uo(){const t=O.c(2),e=Tt()??[];let s;return t[0]!==e?(s=o=>{if(!o)return;const a=e.find(r=>r.id===o);return a?Pn(a.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}const Go="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ho(t){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:r}=t,i=Q(),c=yn(s)??o??null;let l,f,u,m,d;e[0]!==c?.title||e[1]!==a||e[2]!==i?(d=c?.title??i("header.shellBreadcrumb.superAgentDefaultName"),m="flex min-w-0 items-center gap-0",l="button",f=a,u=i("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=i,e[3]=l,e[4]=f,e[5]=u,e[6]=m,e[7]=d):(l=e[3],f=e[4],u=e[5],m=e[6],d=e[7]);const p=c?.icon??null;let g;e[8]!==p||e[9]!==d?(g=n.jsx(ls,{icon:p,name:d,size:"xs"}),e[8]=p,e[9]=d,e[10]=g):g=e[10];let h;e[11]!==l||e[12]!==f||e[13]!==u||e[14]!==g?(h=n.jsx("button",{type:l,onClick:f,"aria-label":u,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:g}),e[11]=l,e[12]=f,e[13]=u,e[14]=g,e[15]=h):h=e[15];let x;e[16]!==d?(x=n.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let N;e[19]!==x?(N=n.jsxs("button",{type:"button",className:Go,children:[x,j]}),e[19]=x,e[20]=N):N=e[20];let y;e[21]!==s||e[22]!==r||e[23]!==N?(y=n.jsx(zo,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:r,trigger:N}),e[21]=s,e[22]=r,e[23]=N,e[24]=y):y=e[24];let v;return e[25]!==y||e[26]!==m||e[27]!==h?(v=n.jsxs("div",{className:m,children:[h,y]}),e[25]=y,e[26]=m,e[27]=h,e[28]=v):v=e[28],v}function la(t){const e=O.c(22);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=le(),{threads:r}=ps(),i=Tt(),{data:c}=Dt.useSession(),{setTaskId:l,createNewTask:f}=hs(),u=Uo();let m;e[2]!==a.id?(m=cs(a.id),e[2]=a.id,e[3]=m):m=e[3];const d=m,p=d.id,g=as();let h;e[4]!==i||e[5]!==f||e[6]!==p||e[7]!==o||e[8]!==u||e[9]!==c?.user?.id||e[10]!==l||e[11]!==r?(h=k=>{const C=k??p,D=(i??[]).find(w=>w.id===C),b=Bn(r,C,c?.user?.id,u(C),!!(D&&vn(D)));b?l(b.id,C):f(C),o?.()},e[4]=i,e[5]=f,e[6]=p,e[7]=o,e[8]=u,e[9]=c?.user?.id,e[10]=l,e[11]=r,e[12]=h):h=e[12];const x=h;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=j):j=e[13];const N=g===p?d:void 0;let y;e[14]!==g||e[15]!==x?(y=()=>x(g),e[14]=g,e[15]=x,e[16]=y):y=e[16];let v;return e[17]!==g||e[18]!==x||e[19]!==N||e[20]!==y?(v=n.jsx(G.Suspense,{fallback:j,children:n.jsx(Ho,{agentId:g,fallback:N,onOpenHome:y,onPick:x})}),e[17]=g,e[18]=x,e[19]=N,e[20]=y,e[21]=v):v=e[21],v}function ca(){const t=O.c(20),e=Q(),{threads:s}=ps(),{createNewTask:o}=hs(),a=as(),r=rs();let i;t[0]!==r||t[1]!==s?(i=s.find(x=>x.id===r)?.branch??null,t[0]=r,t[1]=s,t[2]=i):i=t[2];const c=i;let l;t[3]!==a||t[4]!==o||t[5]!==c?(l=()=>{o(a,c)},t[3]=a,t[4]=o,t[5]=c,t[6]=l):l=t[6];const f=l;let u;t[7]!==e?(u=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=u):u=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(nn,{size:16}),t[9]=m):m=t[9];let d;t[10]!==f||t[11]!==u?(d=n.jsx(Le,{asChild:!0,children:n.jsx("button",{type:"button",onClick:f,"aria-label":u,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m})}),t[10]=f,t[11]=u,t[12]=d):d=t[12];let p;t[13]!==e?(p=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=p):p=t[14];let g;t[15]!==p?(g=n.jsx(Me,{side:"bottom",children:p}),t[15]=p,t[16]=g):g=t[16];let h;return t[17]!==d||t[18]!==g?(h=n.jsxs(Re,{children:[d,g]}),t[17]=d,t[18]=g,t[19]=h):h=t[19],h}function Qo({open:t,onOpenChange:e,onCreated:s}){const o=Q(),{org:a}=le(),{data:r}=Dt.useSession(),{stdioEnabled:i}=qs(),c=ss(),l=ks(),f=xs(),m=js(f,"").items,d=Ws({resolver:Ys(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=d.watch("ui_type"),g=d.watch("connection_url"),h=d.watch("npx_package"),x=et({uiType:p,connectionUrl:g??"",npxPackage:h??""})??Ut({uiType:p,connectionUrl:g??"",registryItems:m}),j=b=>{const w=b.trim();if(!w)return;const _=!!d.formState.dirtyFields.title,I=!!d.formState.dirtyFields.description,P=!!d.formState.dirtyFields.env_vars,S=T=>{if(T&&(!_&&!d.getValues("title").trim()&&T.title&&d.setValue("title",T.title,{shouldDirty:!1}),!I&&!(d.getValues("description")??"").trim()&&T.description&&d.setValue("description",T.description,{shouldDirty:!1}),!P&&T.envVarKeys?.length)){const R=d.getValues("env_vars")??[],E=new Set(R.map(L=>L.key)),F=T.envVarKeys.filter(L=>!E.has(L));F.length>0&&d.setValue("env_vars",[...R,...F.map(L=>({key:L,value:""}))],{shouldDirty:!0})}},A=Zn(w);if(A&&i){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(et({uiType:"NPX",npxPackage:A.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const T=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";d.setValue("ui_type",T,{shouldDirty:!0}),d.setValue("connection_url",w,{shouldDirty:!0}),S(et({uiType:T,connectionUrl:w})??Ut({uiType:T,connectionUrl:w,registryItems:m}));return}p==="NPX"&&S(et({uiType:"NPX",npxPackage:w}))},N=b=>{b||d.reset(),e(b)},y=async b=>{let w,_=null,I=null,P=null;b.ui_type==="NPX"?(w="STDIO",_="",P=eo(b.npx_package||"",b.env_vars||[])):b.ui_type==="STDIO"?(w="STDIO",_="",P=to(b.stdio_command||"",b.stdio_args||"",b.stdio_cwd,b.env_vars||[])):(w=b.ui_type,_=b.connection_url||"",I=b.connection_token||null);const S=Vn("conn");try{await l.create.mutateAsync({id:S,title:b.title,description:b.description||null,connection_type:w,connection_url:_,connection_token:I,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:a.id,icon:b.icon??null,app_name:null,app_id:null,connection_headers:P,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(S)}catch{de.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},v=o("connections.createConnectionDialog.title"),k=o("connections.createConnectionDialog.description"),C=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),D=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(pe,{control:d.control,name:"ui_type",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.typeLabel")}),n.jsxs(zn,{value:b.value,onValueChange:b.onChange,children:[n.jsx(xe,{children:n.jsx(Un,{children:n.jsx(Gn,{})})}),n.jsxs(Hn,{children:[n.jsx(He,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),n.jsx(He,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),n.jsx(He,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),i&&n.jsxs(n.Fragment,{children:[n.jsx(He,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(ot,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),n.jsx(He,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(qn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),n.jsx(je,{})]})}),p==="NPX"&&n.jsx(pe,{control:d.control,name:"npx_package",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.npmPackageLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("npx_package",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),p==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(pe,{control:d.control,name:"stdio_command",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.commandLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"stdio_args",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.argumentsLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"stdio_cwd",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...b,value:b.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),n.jsx(je,{})]})})]}),(p==="NPX"||p==="STDIO")&&n.jsx(pe,{control:d.control,name:"env_vars",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),n.jsx(xe,{children:n.jsx(Jn,{value:b.value??[],onChange:b.onChange})}),n.jsx(je,{})]})}),p!=="NPX"&&p!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(pe,{control:d.control,name:"connection_url",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.urlLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("connection_url",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"connection_token",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:x?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),n.jsx(xe,{children:n.jsx(Se,{type:"password",placeholder:x?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...b,value:b.value??""})}),x?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"title",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.nameLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...b})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"description",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.descriptionLabel")}),n.jsx(xe,{children:n.jsx(Qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...b,value:b.value??""})}),n.jsx(je,{})]})})]});return c?n.jsx(It,{open:t,onOpenChange:N,children:n.jsxs(Ft,{className:"max-h-[90vh]",children:[n.jsx(Nn,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Bt,{children:v}),n.jsx(Sn,{className:"mt-1",children:k})]}),n.jsx(us,{asChild:!0,children:n.jsx(ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Yn,{size:16})})})]})}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:D}),n.jsx(fs,{children:n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):n.jsx(bs,{open:t,onOpenChange:N,children:n.jsxs(ys,{className:"sm:max-w-[525px]",children:[n.jsxs(vs,{children:[n.jsx(Cs,{children:v}),n.jsx(Rn,{children:k})]}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"py-4",children:D}),n.jsxs(Kn,{children:[n.jsx(ye,{type:"button",variant:"outline",onClick:()=>N(!1),children:o("connections.createConnectionDialog.cancelButton")}),n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function qo(t){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:r,onCloneAndAdd:i,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:u,onBrowseNavigate:m,defaultTab:d}=t,p=s===void 0?"add":s,g=d===void 0?"connected":d,h=Q(),{org:x}=le(),j=G.useDeferredValue(f),N=f!==j;let y;e[0]!==j?(y=j.trim().toLowerCase(),e[0]=j,e[1]=y):y=e[1];const v=y;let k;e[2]!==g?(k=V=>V??g,e[2]=g,e[3]=k):k=e[3];const[C,D]=Xs(Js.connectionsTab(x.slug)+(g==="all"?":home-modal":":agent-modal"),k);let b;e[4]!==C||e[5]!==D?(b=V=>{V!==C&&oe("connections_dialog_tab_changed",{to_tab:V}),D(V)},e[4]=C,e[5]=D,e[6]=b):b=e[6];const w=b;let _;e[7]!==x.id||e[8]!==x.slug?(_={connectionId:jn,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=_):_=e[9];const I=io(_),P=j?.trim().split(/\s+/).filter(Boolean)??[],S=P.length>0?{operator:"or",conditions:P.flatMap(si)}:void 0,A={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:R,fetchNextPage:E,hasNextPage:F,isFetchingNextPage:L}=oo({queryKey:fe.collectionListInfinite(I,x.id,"","CONNECTIONS",T),queryFn:async V=>{const{pageParam:X}=V,be=X===void 0?0:X;return(await I.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:be}})).structuredContent},initialPageParam:0,getNextPageParam:ei,staleTime:3e4}),q=R?.pages.flatMap(Zo)??[],B=Mn(q),U=new Set(q.filter(Jo).map(Xo)),$=xs(),H=js($,j),z=Gt(H.loadMore,H.hasMore,H.isLoadingMore),se=Gt(E,F??!1,L),W=C==="all"||!!v,ie=W?H.items.filter(V=>{const X=$n(V);if(X&&U.has(X))return!1;if(!v)return!0;const be=it(V._meta),ke=[V.title,V.description,V.name,V.server?.title,V.server?.description,V.server?.name,be?.friendly_name,be?.friendlyName].filter(Boolean).join(" ").toLowerCase();return P.some(me=>ke.includes(me.toLowerCase()))}):[],Z=ie.filter(Yo),ee=ie.filter(Wo);let te;e[10]!==a?(te=V=>V.some(X=>a.has(X.id)),e[10]=a,e[11]=te):te=e[11];const ne=te;let re;e[12]!==a||e[13]!==o||e[14]!==l||e[15]!==ne||e[16]!==p||e[17]!==r||e[18]!==m||e[19]!==i||e[20]!==h?(re=(V,X,be,ke,me)=>{const Ze=ne(me),$e=me.find(Ne=>!a.has(Ne.id)),ce=me[0];if(p==="browse"){const Ne=so(ce);return n.jsx(yt,{connection:{title:X,icon:be,description:me.length>1?`${me.length} instances`:ke??void 0},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{oe("connection_browse_clicked",{app_name:ce.app_name??null,connection_id:ce.id,instances_count:me.length}),m?.(Ne)}},V)}return n.jsx(yt,{connection:{title:X,icon:be,description:ke},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),$e?(oe("connection_add_clicked",{action:"use_existing",app_name:ce.app_name??null,connection_id:$e.id}),o&&oe("agent_connection_attached",{agent_id:o,connection_id:$e.id,app_name:ce.app_name??null,mode:"existing"}),r($e.id)):(oe("connection_add_clicked",{action:"clone",app_name:ce.app_name??null,base_connection_id:ce.id}),i(ce))},children:h("virtualMcp.connectionDialogContent.add")})]})},V)},e[12]=a,e[13]=o,e[14]=l,e[15]=ne,e[16]=p,e[17]=r,e[18]=m,e[19]=i,e[20]=h,e[21]=re):re=e[21];const M=re;let K;e[22]!==l||e[23]!==p||e[24]!==c||e[25]!==h?(K=V=>{const X=it(V._meta),be=X?.friendlyName||X?.friendly_name||V.server?.title||V.title||V.server?.name||V.name||V.id||"",ke=V.server?.description||V.description||null,me=V.server?.icons?.[0]?.src||On(V.server?.repository)||null,Ze=X?.official===!0,$e=X?.verified===!0,ce=X?.owner==="deco";return n.jsx(yt,{connection:{title:be,description:ke,icon:me},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[ce&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ce&&Ze&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ce&&!Ze&&$e&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),oe("connection_add_clicked",{action:"connect_new",registry_item_id:V.id,app_name:X?.friendlyName||V.server?.name||V.name||null}),c(V)},children:l===V.id?n.jsx(Qe,{className:"size-3.5"}):h(p==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${V.id}`)},e[22]=l,e[23]=p,e[24]=c,e[25]=h,e[26]=K):K=e[26];const ae=K;let Y;e[27]!==C||e[28]!==w||e[29]!==u||e[30]!==v||e[31]!==h?(Y=!v&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(no,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:V=>w(V)}),n.jsxs(ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{oe("connections_dialog_custom_clicked"),u()},children:[n.jsx(Ye,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=w,e[29]=u,e[30]=v,e[31]=h,e[32]=Y):Y=e[32];const ve=N&&"opacity-50 pointer-events-none";let ue;e[33]!==ve?(ue=J("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=ue):ue=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Ae;e[35]!==M?(Ae=V=>{if(V.type==="group")return M(V.key,V.title,V.icon,null,V.connections);const X=V.connection;return M(X.id,X.title,X.icon,X.description??null,[X])},e[35]=M,e[36]=Ae):Ae=e[36];const mt=B.map(Ae);let Te;e[37]!==se?(Te=n.jsx("div",{ref:se,className:"col-span-full h-1"}),e[37]=se,e[38]=Te):Te=e[38];let Ie;e[39]!==L?(Ie=L&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[39]=L,e[40]=Ie):Ie=e[40];const pt=W&&Z.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(vt,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),gt=W&&Z.map(ae),ht=W&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),xt=W&&ee.map(ae);let Fe;e[41]!==z||e[42]!==$||e[43]!==W?(Fe=W&&$.length>0&&n.jsx("div",{ref:z,className:"col-span-full h-1"}),e[41]=z,e[42]=$,e[43]=W,e[44]=Fe):Fe=e[44];let Be;e[45]!==H.isLoadingMore||e[46]!==W?(Be=W&&H.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[45]=H.isLoadingMore,e[46]=W,e[47]=Be):Be=e[47];let Pe;e[48]!==mt||e[49]!==Te||e[50]!==Ie||e[51]!==pt||e[52]!==gt||e[53]!==ht||e[54]!==xt||e[55]!==Fe||e[56]!==Be?(Pe=n.jsxs("div",{className:De,children:[mt,Te,Ie,pt,gt,ht,xt,Fe,Be]}),e[48]=mt,e[49]=Te,e[50]=Ie,e[51]=pt,e[52]=gt,e[53]=ht,e[54]=xt,e[55]=Fe,e[56]=Be,e[57]=Pe):Pe=e[57];let Ee;e[58]!==C||e[59]!==B.length||e[60]!==ee||e[61]!==f||e[62]!==h||e[63]!==Z?(Ee=B.length===0&&Z.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:f}):h(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=B.length,e[60]=ee,e[61]=f,e[62]=h,e[63]=Z,e[64]=Ee):Ee=e[64];let Ve;e[65]!==ue||e[66]!==Pe||e[67]!==Ee?(Ve=n.jsxs("div",{className:ue,children:[Pe,Ee]}),e[65]=ue,e[66]=Pe,e[67]=Ee,e[68]=Ve):Ve=e[68];let Je;return e[69]!==Y||e[70]!==Ve?(Je=n.jsxs(n.Fragment,{children:[Y,Ve]}),e[69]=Y,e[70]=Ve,e[71]=Je):Je=e[71],Je}function Wo(t){return!t.verified&&!it(t._meta)?.verified&&!t.meta?.verified}function Yo(t){return t.verified||it(t._meta)?.verified||t.meta?.verified}function Xo(t){return t.app_name}function Jo(t){return t.app_name}function Zo(t){return t?.items??[]}function ei(t,e){if(t?.hasMore)return e.reduce(ti,0)}function ti(t,e){return t+(e?.items?.length??0)}function si(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function da({open:t,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const r=Q(),i=a.mode??"add",c="agentId"in a?a.agentId:void 0,l="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,f="onAdd"in a&&a.onAdd?a.onAdd:S=>{},u=(S,A,T)=>{c&&oe("agent_connection_attached",{agent_id:c,connection_id:S,app_name:A,mode:T})},[m,d]=G.useState(null),[p,g]=G.useState(o),[h,x]=G.useState(!1),[j,N]=G.useState(t);t!==j&&(N(t),t&&g(o));const{org:y}=le(),{data:v}=Dt.useSession(),k=ks(),C=at(),D=ns(),b=S=>{e(!1),D({to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:S}})},w=()=>{C.invalidateQueries({predicate:S=>{const A=S.queryKey;return A[1]===y.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},_=async(S,A)=>{oe("connection_oauth_succeeded",{connection_id:S,flow:A});const T=new URL(`/api/${y.slug}/mcp/${S}`,window.location.origin);await C.invalidateQueries({queryKey:fe.isMCPAuthenticated(T.href,null)}),w()},I=async S=>{d(S.app_name??S.id);try{const T=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,E=(await k.create.mutateAsync({title:T,description:S.description??null,connection_type:S.connection_type,connection_url:S.connection_url??null,connection_token:null,icon:S.icon??null,app_name:S.app_name??null,app_id:S.app_id??null,connection_headers:S.connection_headers??null})).id,F=await Ct({connectionId:E,orgId:y.id,orgSlug:y.slug,persistFallback:L=>k.update.mutateAsync({id:E,data:{connection_token:L}}).then(()=>{})});if(F.ran&&!F.ok){oe("connection_oauth_failed",{connection_id:E,flow:"clone",error:F.error??"no_token"}),de.error(r("virtualMcp.addConnectionDialog.authenticationFailedError",{error:F.error??"no token received"})),await k.delete.mutateAsync(E);return}F.ran&&await _(E,"clone"),u(E,S.app_name??null,"clone"),f(E)}catch(A){console.error("Failed to add connection:",A),de.error(r("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async S=>{if(!(!y||!v?.user?.id)){d(S.id);try{const A=Ln(S,y.id,v.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",R=!!A.connection_url,E=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!R&&!E){de.error(r("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:F}=await k.create.mutateAsync(A),L=await Ct({connectionId:F,orgId:y.id,orgSlug:y.slug,persistFallback:q=>k.update.mutateAsync({id:F,data:{connection_token:q}}).then(()=>{})});if(L.ran&&!L.ok){oe("connection_oauth_failed",{connection_id:F,flow:"connect_new",error:L.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:L.error??"no token received"})}),u(F,A.app_name??null,"new"),f(F);return}L.ran?(await _(F,"connect_new"),de.success(r("virtualMcp.addConnectionDialog.connectedAuthenticated"))):de.success(r("virtualMcp.addConnectionDialog.connected")),u(F,A.app_name??null,"new"),f(F)}catch(A){console.error("Failed to connect:",A),de.error(r("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return n.jsxs(bs,{open:t,onOpenChange:e,children:[n.jsxs(ys,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(vs,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Cs,{className:"text-base font-semibold",children:r(i==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(En,{value:p,onChange:g,placeholder:r("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),children:n.jsx(qo,{mode:i,agentId:c,addedConnectionIds:l,onAdd:f,onCloneAndAdd:I,onConnectAndAdd:P,connectingItemId:m,search:p,onCreateConnection:()=>x(!0),onBrowseNavigate:b,defaultTab:s})})]}),n.jsx(Qo,{open:h,onOpenChange:x,onCreated:async S=>{x(!1);const A=await Ct({connectionId:S,orgId:y.id,orgSlug:y.slug,persistFallback:T=>k.update.mutateAsync({id:S,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){oe("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:A.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),u(S,null,"custom"),f(S),e(!1);return}A.ran&&await _(S,"custom_create"),u(S,null,"custom"),f(S),e(!1)}})]})}const Wt=new Map;function ua(){const{org:t}=le(),e=At(),s=ro(),o=s.find(x=>x.providerId==="deco"),{data:a,isLoading:r,refetch:i,isFetching:c}=lt({queryKey:fe.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=a?.balanceCents??null,f=l!=null?l/100:null,u=G.useRef(new Map);if(l!=null){const x=Wt.get(t.id);u.current.get(t.id)&&x!=null&&l>x&&oe("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-x,previous_balance_cents:x,new_balance_cents:l}),Wt.set(t.id,l),u.current.set(t.id,!0)}const m=!!o,d=l!=null&&l>0,p=l!=null&&l===0,g=l!=null&&l===200,h=s.length>0&&s.every(x=>x.providerId==="deco");return{hasDecoKey:m,decoKeyId:o?.id??null,balanceCents:l,balanceDollars:f,hasCredits:d,isZeroBalance:p,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:r,isFetching:c,refetch:i}}const ni=4,oi="TASK";function ii(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,ni)||oi}function ri(t,e){return e==null?null:`${ii(t)}-${String(e).padStart(2,"0")}`}const ai=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function li(t){const e=ai.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function Yt(t){const e=O.c(8),{size:s,className:o}=t,a=s===void 0?16:s;let r;e[0]!==a?(r={width:a,height:a},e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=i):i=e[3];let c;return e[4]!==a||e[5]!==r||e[6]!==i?(c=n.jsx("img",{src:bn,alt:"Super Agent",width:a,height:a,style:r,className:i}),e[4]=a,e[5]=r,e[6]=i,e[7]=c):c=e[7],c}const Xe=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],ci=["overview","reports","board","site-editor"],Lt=1,di=["assets","hosting","e2e","analytics","cdn"];function fa(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const o=e?.id===t?e:s?.id===t?s:null;return{project:o,resolvedScopeId:o?t:null}}function ma(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function Fs(t,e){const s=new Set(t??[]);if(e!==Lt)for(const o of ci)s.add(o);return Xe.filter(o=>s.has(o))}function ui(t){return Xe.some(e=>e===t)}function fi(t){return di.some(e=>e===t)}function mi(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function pa(t,e,s){const o=mi(e,s);return t?o:{...o,overview:!0,reports:!0,board:!0}}function ga(t,e,s){const o=new Set(Fs(t,s));return Xe.filter(a=>e[a]&&o.has(a))}function ha(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function xa(t){return Xe.filter(e=>t[e])}function pi(t,e,s){return!ui(t)||e[t]?!1:fi(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function ja(t,e,s,o,a){return pi(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!o.includes("content")||t==="code"&&a&&!o.includes("code")}function ba(t,e,s,o){const a=new Set(Fs(t,o));return s?a.add(e):a.delete(e),Xe.filter(r=>a.has(r))}function We(t,e){return fe.optimisticProjectSidebarViews(t,e)}function st(t){return typeof t=="object"&&t!==null}function Bs(t,e){return t[1]===e&&t[3]==="collection"&&t[4]==="VIRTUAL_MCP"}function gi(t,e){if(!st(t))return t;if("item"in t&&st(t.item)&&t.item.id===e.id)return{...t,item:e};if(!("structuredContent"in t)||!st(t.structuredContent))return t;const s=t.structuredContent.items;if(!Array.isArray(s))return t;let o=!1;const a=s.map(r=>!st(r)||r.id!==e.id?r:(o=!0,e));return o?{...t,structuredContent:{...t.structuredContent,items:a}}:t}function ya(t,e,s){t.setQueriesData({predicate:o=>Bs(o.queryKey,e)},o=>gi(o,s))}function va(t,e,s){const o=t.getQueriesData({predicate:a=>Bs(a.queryKey,e)&&a.queryKey[5]===s});for(const[,a]of o)if(a?.item?.id===s)return a.item;return null}function Mt(t,e,s){return t.getQueryData(We(e,s))??null}function hi(t,e){if(e)return{sidebarViews:[...e.views],sidebarViewsVersion:Lt};const s=t?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:t?.sidebarViewsVersion}}function Ca(t,e,s){return e?{sidebarViews:[...e.views],sidebarViewsVersion:Lt}:s===void 0?{sidebarViews:t.sidebarViews===null?null:t.sidebarViews?[...t.sidebarViews]:void 0,sidebarViewsVersion:t.sidebarViewsVersion}:hi(s,null)}function xi(t,e,s,o,a){const r=Mt(t,e,s),i={revision:(r?.revision??0)+1,views:[...o],rollbackViews:r?[...r.rollbackViews]:[...a]};return t.setQueryData(We(e,s),i),{revision:i.revision,views:[...i.views],persistedViews:[...i.rollbackViews]}}function ji(t,e,s){const o=Mt(t,e,s);return o?{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}:null}function Ps(t,e){const s=new Set(t),o=new Set(e);return s.size===o.size&&[...s].every(a=>o.has(a))}function ka(t){return t?!Ps(t.views,t.persistedViews):!1}function bi(t,e,s,{snapshot:o,saved:a,authoritativeViews:r}){if(!o)return{settledLatest:!1,reconciledViews:null};const i=Mt(t,e,s);if(!i||o.revision>i.revision)return{settledLatest:!1,reconciledViews:null};const c=r!==void 0?[...r]:a?[...o.views]:null,l={...i,rollbackViews:c??i.rollbackViews};return l.rollbackViews!==i.rollbackViews&&t.setQueryData(We(e,s),l),o.revision!==i.revision?{settledLatest:!1,reconciledViews:null}:(t.setQueryData(We(e,s),null),{settledLatest:!0,reconciledViews:a?c&&!Ps(c,o.views)?c:null:[...l.rollbackViews]})}function Na(t){const e=O.c(5),{org:s}=le(),o=t??"";let a;e[0]!==s.id||e[1]!==o?(a=We(s.id,o),e[0]=s.id,e[1]=o,e[2]=a):a=e[2];let r;e[3]!==a?(r={queryKey:a,queryFn:yi,enabled:!1,staleTime:Number.POSITIVE_INFINITY},e[3]=a,e[4]=r):r=e[4];const{data:i}=lt(r);return i?.views}async function yi(){return null}function Sa(t){const e=O.c(4),{org:s}=le(),o=at();let a;return e[0]!==s||e[1]!==o||e[2]!==t?(a={stage:(r,i)=>xi(o,s.id,t,r,i),snapshot:()=>ji(o,s.id,t),settle:r=>bi(o,s.id,t,r)},e[0]=s,e[1]=o,e[2]=t,e[3]=a):a=e[3],a}function vi(t,e){if(!e)return null;const s=e.toLowerCase();return t.find(o=>{const a=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}function wa(t){const e=O.c(10),{org:s}=le(),o=Zs(),a=lo(),r=ao(),i=co(t),c=o.hostingEnabled===!0,l=o.monitorEnabled===!0||o.auth.localMode===!0,f=(c||l)&&!!i,u=lt({queryKey:fe.hostingAccess(s.slug,i??""),queryFn:async()=>{const k=await fetch(`/api/${s.slug}/hosting/${encodeURIComponent(i??"")}/access`);return k.ok?await k.json():{owned:!1,canWrite:!1}},enabled:f,staleTime:6e4}),m=u.data?.owned===!0,d=!!vi(r.data?.configs??[],i),p=c&&m&&a.hosting,g=c&&m&&a.e2e,h=c&&m&&a.analytics,x=l&&m&&a.monitor;let j;e[0]!==d||e[1]!==p||e[2]!==g||e[3]!==h||e[4]!==x?(j={assets:d,hosting:p,e2e:g,analytics:h,cdn:x},e[0]=d,e[1]=p,e[2]=g,e[3]=h,e[4]=x,e[5]=j):j=e[5];const N=!!i&&r.isPending,y=f&&u.isPending;let v;return e[6]!==j||e[7]!==N||e[8]!==y?(v={presence:j,assetsPending:N,siteAccessPending:y},e[6]=j,e[7]=N,e[8]=y,e[9]=v):v=e[9],v}const Xt=()=>0;function Ci(t){const{orgSlug:e,enabled:s=!0,onUpdate:o,onDelete:a,onResync:r}=t,i=G.useRef(o);i.current=o;const c=G.useRef(a);c.current=a;const l=G.useRef(r);l.current=r;const f=G.useRef(null),u=G.useRef(s),m=G.useRef(e);(!f.current||u.current!==s||m.current!==e)&&(u.current=s,m.current=e,f.current=p=>{if(!s||!e)return()=>{};const g=h=>{let x;try{x=JSON.parse(h.data)}catch{return}x.data&&(h.type===uo?c.current?.(x.data.id):i.current(x.data)),p()};return po.subscribe(e,g,()=>l.current?.())}),G.useSyncExternalStore(f.current,Xt,Xt)}function ki(t,e){return{queryKey:fe.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:s}}}}function Ni(){const t=O.c(21),{org:e,locator:s}=le(),o=at();let a;t[0]!==s?(a=fe.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const r=a;let i;t[2]!==s||t[3]!==o||t[4]!==r?(i=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.some(g=>g.id===d.id)?p.items.map(g=>g.id===d.id?d:g):[d,...p.items]}),o.invalidateQueries({queryKey:fe.taskBoardActivity(s,d.id)})},t[2]=s,t[3]=o,t[4]=r,t[5]=i):i=t[5];let c,l;t[6]!==o||t[7]!==r?(c=()=>{o.invalidateQueries({queryKey:r})},l=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.filter(g=>g.id!==d)})},t[6]=o,t[7]=r,t[8]=c,t[9]=l):(c=t[8],l=t[9]);let f;t[10]!==e.slug||t[11]!==i||t[12]!==c||t[13]!==l?(f={orgSlug:e.slug,onUpdate:i,onResync:c,onDelete:l},t[10]=e.slug,t[11]=i,t[12]=c,t[13]=l,t[14]=f):f=t[14],Ci(f);let u;t[15]!==o||t[16]!==r?(u=d=>{const p=d.subject,g=d.data.status;o.cancelQueries({queryKey:r}),o.setQueryData(r,h=>h&&{...h,items:h.items.map(x=>x.threads.some(j=>j.threadId===p)?{...x,threads:x.threads.map(j=>j.threadId===p?{...j,status:g}:j)}:x)})},t[15]=o,t[16]=r,t[17]=u):u=t[17];let m;t[18]!==e.slug||t[19]!==u?(m={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=m):m=t[20],go(m)}function _a(){const t=O.c(9),{locator:e}=le(),s=At();let o;t[0]!==e||t[1]!==s?(o=ki(e,s),t[0]=e,t[1]=s,t[2]=o):o=t[2];const a=lt(o);Ni();let r;t[3]!==a.data?.items?(r=a.data?.items??[],t[3]=a.data?.items,t[4]=r):r=t[4];let i;return t[5]!==a.error||t[6]!==a.isLoading||t[7]!==r?(i={items:r,isLoading:a.isLoading,error:a.error},t[5]=a.error,t[6]=a.isLoading,t[7]=r,t[8]=i):i=t[8],i}function Da(){const t=O.c(70),{org:e,locator:s}=le(),o=At(),a=at(),r=Q();let i;t[0]!==s?(i=fe.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const c=i;let l;t[2]!==a||t[3]!==c?(l=()=>a.invalidateQueries({queryKey:c}),t[2]=a,t[3]=c,t[4]=l):l=t[4];const f=l;let u;t[5]!==o?(u=B=>o.call("TASK_BOARD_ITEM_CREATE",B),t[5]=o,t[6]=u):u=t[6];let m;t[7]!==f||t[8]!==u?(m={mutationFn:u,onSuccess:f},t[7]=f,t[8]=u,t[9]=m):m=t[9];const d=Oe(m);let p;t[10]!==o?(p=B=>o.call("TASK_BOARD_ITEM_UPDATE",B),t[10]=o,t[11]=p):p=t[11];let g;t[12]!==a||t[13]!==c?(g=async B=>{await a.cancelQueries({queryKey:c});const U=a.getQueryData(c);return a.setQueryData(c,$=>$&&{...$,items:$.items.map(H=>H.id===B.id?{...H,...B}:H)}),{previous:U}},t[12]=a,t[13]=c,t[14]=g):g=t[14];let h;t[15]!==e?(h=(B,U)=>{U.status==="done"&&oe("task_marked_done",{organization_id:e.id,task_board_item_id:U.id})},t[15]=e,t[16]=h):h=t[16];let x;t[17]!==a||t[18]!==c?(x=(B,U,$)=>{$?.previous&&a.setQueryData(c,$.previous)},t[17]=a,t[18]=c,t[19]=x):x=t[19];let j;t[20]!==f||t[21]!==s||t[22]!==a?(j=(B,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[20]=f,t[21]=s,t[22]=a,t[23]=j):j=t[23];let N;t[24]!==p||t[25]!==g||t[26]!==h||t[27]!==x||t[28]!==j?(N={mutationFn:p,onMutate:g,onSuccess:h,onError:x,onSettled:j},t[24]=p,t[25]=g,t[26]=h,t[27]=x,t[28]=j,t[29]=N):N=t[29];const y=Oe(N);let v;t[30]!==o?(v=B=>o.call("TASK_BOARD_ITEM_DELETE",{id:B}),t[30]=o,t[31]=v):v=t[31];let k;t[32]!==f||t[33]!==r?(k=B=>{de.error(B instanceof Error&&B.message?B.message:r("taskBoard.taskBoard.deleteError")),f()},t[32]=f,t[33]=r,t[34]=k):k=t[34];let C;t[35]!==f||t[36]!==v||t[37]!==k?(C={mutationFn:v,onSuccess:f,onError:k},t[35]=f,t[36]=v,t[37]=k,t[38]=C):C=t[38];const D=Oe(C);let b;t[39]!==o?(b=async B=>{const U=await Promise.allSettled(B.map($=>o.call("TASK_BOARD_ITEM_DELETE",{id:$})));return{total:B.length,failed:U.filter(Si).length}},t[39]=o,t[40]=b):b=t[40];let w,_;t[41]!==r?(w=B=>{const{total:U,failed:$}=B;$!==0&&de.error(r("taskBoard.taskBoard.deleteBulkError",{failed:String($),total:String(U)}))},_=()=>de.error(r("taskBoard.taskBoard.deleteError")),t[41]=r,t[42]=w,t[43]=_):(w=t[42],_=t[43]);let I;t[44]!==f||t[45]!==b||t[46]!==w||t[47]!==_?(I={mutationFn:b,onSuccess:w,onError:_,onSettled:f},t[44]=f,t[45]=b,t[46]=w,t[47]=_,t[48]=I):I=t[48];const P=Oe(I);let S;t[49]!==o?(S=B=>o.call("TASK_BOARD_ITEM_UPDATE",B),t[49]=o,t[50]=S):S=t[50];let A;t[51]!==f||t[52]!==S?(A={mutationFn:S,onSuccess:f},t[51]=f,t[52]=S,t[53]=A):A=t[53];const T=Oe(A);let R;t[54]!==o?(R=B=>o.call("TASK_BOARD_ITEM_RERUN",B),t[54]=o,t[55]=R):R=t[55];let E;t[56]!==f||t[57]!==s||t[58]!==a?(E=(B,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[56]=f,t[57]=s,t[58]=a,t[59]=E):E=t[59];let F;t[60]!==R||t[61]!==E?(F={mutationFn:R,onSettled:E},t[60]=R,t[61]=E,t[62]=F):F=t[62];const L=Oe(F);let q;return t[63]!==d||t[64]!==T||t[65]!==D||t[66]!==P||t[67]!==L||t[68]!==y?(q={create:d,update:y,remove:D,removeMany:P,link:T,rerun:L},t[63]=d,t[64]=T,t[65]=D,t[66]=P,t[67]=L,t[68]=y,t[69]=q):q=t[69],q}function Si(t){return t.status==="rejected"}const wi=["ended_after_delivery","superseded"];function _i(t){return!!t&&wi.includes(t)}function Aa(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function Ta(t){return t.failureKind!=="superseded"}function Es(t){return t.threads.some(e=>e.status==="requires_action")}function Ia(t){return t.status==="in_review"&&!t.assigneeId}function Fa(t){return Es(t)}function Ba(t){return t.status==="in_progress"&&Es(t)?"text-warning animate-pulse":$s(t.status).iconClassName}function Pa(t){return t.threads.some(s=>s.status==="in_progress")?"running":t.threads.some(s=>s.status==="failed"&&!_i(s.failureKind))?"failed":null}function Ea(t,e,s){const o=t.findIndex(u=>u.id===s),a=e===s?t[o+1]?.id??null:e,r=t.filter(u=>u.id!==s),i=a?r.findIndex(u=>u.id===a):-1,c=i===-1?r.length:i,l=r[c-1],f=r[c];return l&&f?(l.sortOrder+f.sortOrder)/2:l?l.sortOrder+1:f?f.sortOrder-1:0}function Va(t,e){return Array.from({length:e},(s,o)=>t-(e-1-o)*1e-4)}const Di=["archived"],Vs={triage:{labelKey:"taskBoard.config.statusBacklog",icon:jo,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:As,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:dn,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:yo,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:cn,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Wn,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:ln,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:bo,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:en,iconClassName:"text-muted-foreground"}},Ai={icon:As,iconClassName:"text-muted-foreground"},Ti=Vs;function $s(t){return Ti[t]??Ai}function $a(t,e){const s=Vs[t];return{label:s?e(s.labelKey):t,visual:$s(t)}}const Oa=["bug","feature","chore","spike","security"],La={bug:{labelKey:"taskBoard.config.typeBug",icon:Co,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:mn,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:fn,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:un,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:vo,iconClassName:"text-purple-500"}};function St(t){return mo.includes(t)}function Ma(t){return Pt.filter(e=>t||!St(e))}function Ra({deliveryEnabled:t,shownLanes:e,occupied:s}){const o=Pt.filter(i=>t||!St(i)||s.includes(i)),a=o.filter(i=>Di.includes(i)||!t&&St(i)),r=a.filter(i=>!e.includes(i));return{lanes:o.filter(i=>!r.includes(i)),hidden:r,hideable:a}}const Jt="lane:";function Ii(t){return Pt.includes(t)}function Ka({overId:t,statusOf:e}){if(t===void 0)return null;const s=String(t),o=s.startsWith(Jt)?s.slice(Jt.length):e(s);return o!==void 0&&Ii(o)?o:null}const Fi=["none","low","medium","high","urgent"],nt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Kt,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:an,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Kt,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:rn,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:on,iconClassName:"text-destructive"}};function za(t,e=Date.now()){const s=new Date(t).getTime();return Number.isNaN(s)?null:s<e?"overdue":s-e<=Bi*864e5?"soon":null}const Bi=3;function Zt(t){return`color-mix(in oklab, ${t??fo} var(--user-color-strength), transparent)`}function Os(t){return t?.projects.length===1?t.projects[0]:void 0}function Pi(t){return Os(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function Ls(t){const e=O.c(6),{entry:s}=t;let o;e[0]!==s?(o=Os(s),e[0]=s,e[1]=o):o=e[1];const a=o;if(a){let i;return e[2]!==a.icon||e[3]!==a.title?(i=n.jsx(Fn,{icon:a.icon,name:a.title}),e[2]=a.icon,e[3]=a.title,e[4]=i):i=e[4],i}let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(ms,{className:"size-3"})}),e[5]=r):r=e[5],r}function Ei(t){const e=O.c(14),{entry:s}=t;let o;e[0]!==s?(o=Pi(s),e[0]=s,e[1]=o):o=e[1];const a=o;let r;e[2]!==s?(r=n.jsx(Ls,{entry:s}),e[2]=s,e[3]=r):r=e[3];let i;e[4]!==s.title?(i=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=i):i=e[5];let c;e[6]!==a?(c=a&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:a}),e[6]=a,e[7]=c):c=e[7];let l;e[8]!==i||e[9]!==c?(l=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[i,c]}),e[8]=i,e[9]=c,e[10]=l):l=e[10];let f;return e[11]!==r||e[12]!==l?(f=n.jsxs(n.Fragment,{children:[r,l]}),e[11]=r,e[12]=l,e[13]=f):f=e[13],f}const ut="__no_repo__";function we(t){return(t??"").trim().toLowerCase()}function Vi(t,e){const s=(t.created_at??"").localeCompare(e.created_at??"");return s!==0?s:t.id.localeCompare(e.id)}function $i(t){return t.projects.length===1?t.projects[0]?.title??t.repo??t.id:t.repo??t.id}function Ua(t,e=[]){const s=new Map,o=new Map,a=[],r=u=>{const m=we(u),d=s.get(m);if(d)return d;const p={id:m,kind:"repo",repo:u.trim(),title:u.trim(),projects:[]};return s.set(m,p),p};for(const u of t){const m=Cn(u);if(m){const p=r(m);p.projects.push(u),o.set(u.id,p);continue}const d={id:u.id,kind:"project",repo:null,title:u.title,projects:[u]};a.push(d),o.set(u.id,d)}for(const u of e){const m=(u??"").trim();m&&r(m)}for(const u of s.values())u.projects.sort(Vi),u.title=$i(u);const i=[...s.values()].filter(u=>u.projects.length>0),c=[...s.values()].filter(u=>u.projects.length===0),l=(u,m)=>u.title.localeCompare(m.title),f=[...[...i,...a].sort(l),...c.sort(l)];return{entries:f,byId:new Map(f.map(u=>[u.id,u])),byRepo:s,byProject:o}}function wt(t,e){for(const o of t.threads??[]){const a=o.virtualMcpId?e.byProject.get(o.virtualMcpId):void 0;if(a)return a}const s=we(t.repo);return(s?e.byRepo.get(s):void 0)??null}function Oi(t,e){const s=wt(t,e);if(!s)return[];if(s.projects.length<=1)return s.projects;for(const o of t.threads??[]){const a=o.virtualMcpId?s.projects.find(r=>r.id===o.virtualMcpId):void 0;if(a)return[a]}return s.projects}function Ga(t,e){const s=Oi(t,e);return s.length===1?s[0]??null:null}function Rt(t,e){return e.byId.get(t)??e.byRepo.get(we(t))??e.byProject.get(t)}function Ms(t,e,s){if(e===null)return!0;if(e===ut)return wt(t,s)===null;const o=Rt(e,s);return o?o.repo&&we(t.repo)===we(o.repo)?!0:wt(t,s)===o:e.includes("/")?we(t.repo)===we(e):!0}function ft(t,e){return t===null?!1:t===ut?!0:!!Rt(t,e)||t.includes("/")}function Ha(t,e,s){return e===null?null:Ms(t,e,s)?e:null}function Qa(t){return t.entries.filter(e=>e.repo!==null&&(e.projects.length===0||e.projects.some(s=>kn(s).status!=="detached")))}const _t="__unassigned__",ze="__any__",Rs={assignee:null,priority:null,due:null,tags:[],project:null,search:""};function Li(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||ft(t.project,e)||t.search.trim()!==""}function Mi(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(ft(t.project,e)?1:0)+(t.search.trim()!==""?1:0)}const Ri=864e5;function Ki(t,e){const s=new Date(t),o=new Date(e);return s.getFullYear()===o.getFullYear()&&s.getMonth()===o.getMonth()&&s.getDate()===o.getDate()}function Ks(t,e){const s=t.trim();return s===""?!1:e!=null&&li(s)===e}function zi(t,e){return t.assigneeId===e?!0:t.assigneeId===Nt&&t.assignedBy===e}function qa(t,e,s){const o=e.search.trim().toLowerCase();if(o!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(o)&&!Ks(o,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===_t){if(t.assigneeId!==null)return!1}else if(!zi(t,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 a=new Date(t.dueDate).getTime(),r=Date.now();if(e.due==="overdue"&&a>=r||e.due==="today"&&!Ki(a,r)||e.due==="week"&&(a<r||a>r+7*Ri))return!1}if(e.tags.length>0){const a=t.tags.map(r=>r.id);if(!e.tags.some(r=>a.includes(r)))return!1}return!!Ms(t,e.project,s)}const es={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function _e(t,e=!1){return J("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",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 Ui(t){const e=O.c(107),{value:s,members:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=f):f=e[0];let u=f,m;e[1]!==i?(m=i("taskBoard.taskFilters.assigneeLabel"),e[1]=i,e[2]=m):m=e[2];let d=m;if(s===_t){let M;e[3]!==i?(M=i("taskBoard.taskFilters.assigneeUnassigned"),e[3]=i,e[4]=M):M=e[4],d=M}else if(s===Nt){let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(Yt,{size:14}),e[5]=M):M=e[5],u=M;let K;e[6]!==i?(K=i("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=i,e[7]=K):K=e[7],d=K}else if(s){let M,K,ae,Y;if(e[8]!==o||e[9]!==s){let De;e[14]!==s?(De=Ae=>Ae.userId===s,e[14]=s,e[15]=De):De=e[15],K=o.find(De),M=Ht,ae=K?.user?.image??void 0,Y=qt(K?.user?.name),e[8]=o,e[9]=s,e[10]=M,e[11]=K,e[12]=ae,e[13]=Y}else M=e[10],K=e[11],ae=e[12],Y=e[13];let ve;e[16]!==M||e[17]!==ae||e[18]!==Y?(ve=n.jsx(M,{url:ae,fallback:Y,shape:"circle",size:"2xs"}),e[16]=M,e[17]=ae,e[18]=Y,e[19]=ve):ve=e[19],u=ve;let ue;e[20]!==K?.user?.name||e[21]!==i?(ue=K?.user?.name??i("taskBoard.taskFilters.assigneeMember"),e[20]=K?.user?.name,e[21]=i,e[22]=ue):ue=e[22],d=ue}let p;e[23]!==a?(p=M=>{a(M),l(!1)},e[23]=a,e[24]=p):p=e[24];const g=p,h=s!==null;let x;e[25]!==r||e[26]!==h?(x=_e(h,r),e[25]=r,e[26]=h,e[27]=x):x=e[27];const j=x,N=r&&"ml-auto";let y;e[28]!==N?(y=J("shrink-0 opacity-60",N),e[28]=N,e[29]=y):y=e[29];const v=y;let k;e[30]!==d?(k=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[30]=d,e[31]=k):k=e[31];let C;e[32]!==v?(C=n.jsx(Ge,{size:12,className:v}),e[32]=v,e[33]=C):C=e[33];let D;e[34]!==u||e[35]!==k||e[36]!==C||e[37]!==j?(D=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:j,children:[u,k,C]})}),e[34]=u,e[35]=k,e[36]=C,e[37]=j,e[38]=D):D=e[38];let b;e[39]!==i?(b=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=i,e[40]=b):b=e[40];let w;e[41]!==i?(w=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=i,e[42]=w):w=e[42];let _;e[43]!==b||e[44]!==w?(_=n.jsx(Et,{placeholder:b,"aria-label":w,className:"h-9"}),e[43]=b,e[44]=w,e[45]=_):_=e[45];let I;e[46]!==i?(I=i("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=i,e[47]=I):I=e[47];let P;e[48]!==I?(P=n.jsx(Vt,{children:I}),e[48]=I,e[49]=P):P=e[49];let S;e[50]!==i?(S=i("taskBoard.taskFilters.assigneeAnyone"),e[50]=i,e[51]=S):S=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==i?(T=i("taskBoard.taskFilters.assigneeAnyone"),e[54]=i,e[55]=T):T=e[55];let R;e[56]!==S||e[57]!==A||e[58]!==T?(R=n.jsx(Ce,{value:S,onSelect:A,children:T}),e[56]=S,e[57]=A,e[58]=T,e[59]=R):R=e[59];let E;e[60]!==i?(E=i("taskBoard.taskFilters.assigneeUnassigned"),e[60]=i,e[61]=E):E=e[61];let F;e[62]!==g?(F=()=>g(_t),e[62]=g,e[63]=F):F=e[63];let L;e[64]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[64]=L):L=e[64];let q;e[65]!==i?(q=i("taskBoard.taskFilters.assigneeUnassigned"),e[65]=i,e[66]=q):q=e[66];let B;e[67]!==E||e[68]!==F||e[69]!==q?(B=n.jsxs(Ce,{value:E,onSelect:F,className:"gap-2",children:[L,q]}),e[67]=E,e[68]=F,e[69]=q,e[70]=B):B=e[70];let U;e[71]!==i?(U=i("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=i,e[72]=U):U=e[72];let $;e[73]!==g?($=()=>g(Nt),e[73]=g,e[74]=$):$=e[74];let H;e[75]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(Yt,{size:16}),e[75]=H):H=e[75];let z;e[76]!==i?(z=i("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=i,e[77]=z):z=e[77];let se;e[78]!==U||e[79]!==$||e[80]!==z?(se=n.jsxs(Ce,{value:U,onSelect:$,className:"gap-2",children:[H,z]}),e[78]=U,e[79]=$,e[80]=z,e[81]=se):se=e[81];let W;e[82]!==R||e[83]!==B||e[84]!==se?(W=n.jsxs(Ke,{children:[R,B,se]}),e[82]=R,e[83]=B,e[84]=se,e[85]=W):W=e[85];let ie;e[86]!==i?(ie=i("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=i,e[87]=ie):ie=e[87];let Z;if(e[88]!==o||e[89]!==g){let M;e[91]!==g?(M=K=>n.jsxs(Ce,{value:K.user?.name??K.userId,onSelect:()=>g(K.userId),className:"gap-2",children:[n.jsx(Ht,{url:K.user?.image??void 0,fallback:qt(K.user?.name),shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[91]=g,e[92]=M):M=e[92],Z=o.map(M),e[88]=o,e[89]=g,e[90]=Z}else Z=e[90];let ee;e[93]!==ie||e[94]!==Z?(ee=n.jsx(Ke,{heading:ie,children:Z}),e[93]=ie,e[94]=Z,e[95]=ee):ee=e[95];let te;e[96]!==P||e[97]!==W||e[98]!==ee?(te=n.jsxs($t,{children:[P,W,ee]}),e[96]=P,e[97]=W,e[98]=ee,e[99]=te):te=e[99];let ne;e[100]!==_||e[101]!==te?(ne=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[_,te]})}),e[100]=_,e[101]=te,e[102]=ne):ne=e[102];let re;return e[103]!==c||e[104]!==D||e[105]!==ne?(re=n.jsxs(ct,{open:c,onOpenChange:l,children:[D,ne]}),e[103]=c,e[104]=D,e[105]=ne,e[106]=re):re=e[106],re}function Gi(t){const e=O.c(33),{value:s,onChange:o,block:a}=t,r=Q(),i=s!==null;let c;e[0]!==a||e[1]!==i?(c=_e(i,a),e[0]=a,e[1]=i,e[2]=c):c=e[2];const l=c,f=a&&"ml-auto";let u;e[3]!==f?(u=J("shrink-0 opacity-60",f),e[3]=f,e[4]=u):u=e[4];const m=u;let d;e[5]!==s?(d=s?n.jsx("span",{className:J("size-2 shrink-0 rounded-full",nt[s].dotClassName)}):n.jsx(ho,{size:14,className:"shrink-0"}),e[5]=s,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==s?(p=r(s?nt[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=r,e[8]=s,e[9]=p):p=e[9];let g;e[10]!==m?(g=n.jsx(Ge,{size:12,className:m}),e[10]=m,e[11]=g):g=e[11];let h;e[12]!==d||e[13]!==p||e[14]!==g||e[15]!==l?(h=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:l,children:[d,p,g]})}),e[12]=d,e[13]=p,e[14]=g,e[15]=l,e[16]=h):h=e[16];const x=s??ze;let j;e[17]!==o?(j=D=>o(D===ze?null:D),e[17]=o,e[18]=j):j=e[18];let N;e[19]!==r?(N=r("taskBoard.taskFilters.priorityAnyPriority"),e[19]=r,e[20]=N):N=e[20];let y;e[21]!==N?(y=n.jsx(rt,{value:ze,children:N}),e[21]=N,e[22]=y):y=e[22];let v;e[23]!==r?(v=Fi.map(D=>n.jsxs(rt,{value:D,className:"gap-2",children:[n.jsx("span",{className:J("size-2 rounded-full",nt[D].dotClassName)}),r(nt[D].labelKey)]},D)),e[23]=r,e[24]=v):v=e[24];let k;e[25]!==j||e[26]!==y||e[27]!==v||e[28]!==x?(k=n.jsx(ws,{align:"start",className:"w-40",children:n.jsxs(_s,{value:x,onValueChange:j,children:[y,v]})}),e[25]=j,e[26]=y,e[27]=v,e[28]=x,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==h?(C=n.jsxs(Ds,{children:[h,k]}),e[30]=k,e[31]=h,e[32]=C):C=e[32],C}function Hi(t){const e=O.c(35),{value:s,onChange:o,block:a}=t,r=Q();let i;e[0]!==r||e[1]!==s?(i=s?r(es[s]):void 0,e[0]=r,e[1]=s,e[2]=i):i=e[2];const c=i,l=s!==null;let f;e[3]!==a||e[4]!==l?(f=_e(l,a),e[3]=a,e[4]=l,e[5]=f):f=e[5];const u=f,m=a&&"ml-auto";let d;e[6]!==m?(d=J("shrink-0 opacity-60",m),e[6]=m,e[7]=d):d=e[7];const p=d;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(bt,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==c||e[10]!==r?(h=c??r("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=r,e[11]=h):h=e[11];let x;e[12]!==p?(x=n.jsx(Ge,{size:12,className:p}),e[12]=p,e[13]=x):x=e[13];let j;e[14]!==h||e[15]!==x||e[16]!==u?(j=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:u,children:[g,h,x]})}),e[14]=h,e[15]=x,e[16]=u,e[17]=j):j=e[17];const N=s??ze;let y;e[18]!==o?(y=_=>o(_===ze?null:_),e[18]=o,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bt,{size:16,className:"text-muted-foreground"}),e[20]=v):v=e[20];let k;e[21]!==r?(k=r("taskBoard.taskFilters.dueDateAnyTime"),e[21]=r,e[22]=k):k=e[22];let C;e[23]!==k?(C=n.jsxs(rt,{value:ze,className:"gap-2",children:[v,k]}),e[23]=k,e[24]=C):C=e[24];let D;e[25]!==r?(D=Object.entries(es).map(_=>{const[I,P]=_,S=I==="overdue";return n.jsxs(rt,{value:I,className:J("gap-2",S&&"text-destructive"),children:[n.jsx(bt,{size:16,className:J("shrink-0",S?"text-destructive":"text-muted-foreground")}),r(P)]},I)}),e[25]=r,e[26]=D):D=e[26];let b;e[27]!==N||e[28]!==y||e[29]!==C||e[30]!==D?(b=n.jsx(ws,{align:"start",className:"w-44",children:n.jsxs(_s,{value:N,onValueChange:y,children:[C,D]})}),e[27]=N,e[28]=y,e[29]=C,e[30]=D,e[31]=b):b=e[31];let w;return e[32]!==b||e[33]!==j?(w=n.jsxs(Ds,{children:[j,b]}),e[32]=b,e[33]=j,e[34]=w):w=e[34],w}function Qi(t){const e=O.c(56),{value:s,tags:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]!==a||e[1]!==s?(f=E=>a(s.includes(E)?s.filter(F=>F!==E):[...s,E]),e[0]=a,e[1]=s,e[2]=f):f=e[2];const u=f;let m;e[3]!==i||e[4]!==o||e[5]!==s[0]||e[6]!==s.length?(m=s.length===0?i("taskBoard.taskFilters.tagsLabel"):s.length===1?o.find(E=>E.id===s[0])?.name??i("taskBoard.taskFilters.tagsLabel"):i("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=i,e[4]=o,e[5]=s[0],e[6]=s.length,e[7]=m):m=e[7];const d=m,p=s.length>0;let g;e[8]!==r||e[9]!==p?(g=_e(p,r),e[8]=r,e[9]=p,e[10]=g):g=e[10];const h=g,x=r&&"ml-auto";let j;e[11]!==x?(j=J("shrink-0 opacity-60",x),e[11]=x,e[12]=j):j=e[12];const N=j;let y;e[13]!==o||e[14]!==s[0]||e[15]!==s.length?(y=s.length===1?n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(o.find(E=>E.id===s[0])?.color)}}):n.jsx(pn,{size:14,className:"shrink-0"}),e[13]=o,e[14]=s[0],e[15]=s.length,e[16]=y):y=e[16];let v;e[17]!==d?(v=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==N?(k=n.jsx(Ge,{size:12,className:N}),e[19]=N,e[20]=k):k=e[20];let C;e[21]!==y||e[22]!==v||e[23]!==k||e[24]!==h?(C=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:h,children:[y,v,k]})}),e[21]=y,e[22]=v,e[23]=k,e[24]=h,e[25]=C):C=e[25];let D;e[26]!==i?(D=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=i,e[27]=D):D=e[27];let b;e[28]!==i?(b=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=i,e[29]=b):b=e[29];let w;e[30]!==D||e[31]!==b?(w=n.jsx(Et,{placeholder:D,"aria-label":b,className:"h-9"}),e[30]=D,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==i?(_=i("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=i,e[34]=_):_=e[34];let I;e[35]!==_?(I=n.jsx(Vt,{children:_}),e[35]=_,e[36]=I):I=e[36];let P;if(e[37]!==o||e[38]!==u||e[39]!==s){let E;e[41]!==u||e[42]!==s?(E=F=>n.jsxs(Ce,{value:F.name,onSelect:()=>u(F.id),className:"gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(F.color)}}),n.jsx("span",{className:"flex-1 truncate",children:F.name}),s.includes(F.id)&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"})]},F.id),e[41]=u,e[42]=s,e[43]=E):E=e[43],P=o.map(E),e[37]=o,e[38]=u,e[39]=s,e[40]=P}else P=e[40];let S;e[44]!==P?(S=n.jsx(Ke,{children:P}),e[44]=P,e[45]=S):S=e[45];let A;e[46]!==I||e[47]!==S?(A=n.jsxs($t,{children:[I,S]}),e[46]=I,e[47]=S,e[48]=A):A=e[48];let T;e[49]!==w||e[50]!==A?(T=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[w,A]})}),e[49]=w,e[50]=A,e[51]=T):T=e[51];let R;return e[52]!==c||e[53]!==C||e[54]!==T?(R=n.jsxs(ct,{open:c,onOpenChange:l,children:[C,T]}),e[52]=c,e[53]=C,e[54]=T,e[55]=R):R=e[55],R}function ts(t){const e=O.c(11),{entry:s,selected:o,onSelect:a}=t,r=s.id,i=s.title;let c;e[0]!==s.projects?(c=s.projects.map(qi).join(" "),e[0]=s.projects,e[1]=c):c=e[1];const l=`${r} ${i} ${s.repo??""} ${c}`;let f;e[2]!==s?(f=n.jsx(Ei,{entry:s}),e[2]=s,e[3]=f):f=e[3];let u;e[4]!==o?(u=o&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"}),e[4]=o,e[5]=u):u=e[5];let m;return e[6]!==a||e[7]!==l||e[8]!==f||e[9]!==u?(m=n.jsxs(Ce,{value:l,onSelect:a,className:"gap-2",children:[f,u]}),e[6]=a,e[7]=l,e[8]=f,e[9]=u,e[10]=m):m=e[10],m}function qi(t){return t.title}function Wi(t,e,s,o){return t===null||!s?o("taskBoard.taskFilters.projectLabel"):t===ut?o("taskBoard.taskFilters.projectNone"):e?.title??t}function Yi(t){const e=O.c(90),{value:s,index:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f,u,m,d,p,g,h,x,j,N,y,v,k,C;if(e[0]!==r||e[1]!==o||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==s){const I=s===null?void 0:Rt(s,o),P=ft(s,o),S=Wi(s,I,P,i);let A;e[20]!==a?(A=Y=>{a(Y),l(!1)},e[20]=a,e[21]=A):A=e[21];const T=A,R=o.entries.filter(Ji),E=o.entries.filter(Xi),F=_e(P,r),L=r&&"ml-auto";let q;e[22]!==L?(q=J("shrink-0 opacity-60",L),e[22]=L,e[23]=q):q=e[23];const B=q;d=ct,k=c,C=l;const U=P?I:void 0;let $;e[24]!==U?($=n.jsx(Ls,{entry:U}),e[24]=U,e[25]=$):$=e[25];let H;e[26]!==S?(H=n.jsx("span",{className:"max-w-[12rem] truncate",children:S}),e[26]=S,e[27]=H):H=e[27];let z;e[28]!==B?(z=n.jsx(Ge,{size:12,className:B}),e[28]=B,e[29]=z):z=e[29],e[30]!==$||e[31]!==H||e[32]!==z||e[33]!==F?(g=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:F,children:[$,H,z]})}),e[30]=$,e[31]=H,e[32]=z,e[33]=F,e[34]=g):g=e[34],m=dt,y="start",v="w-72 p-0",u=Ot;let se;e[35]!==i?(se=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[35]=i,e[36]=se):se=e[36];let W;e[37]!==i?(W=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[37]=i,e[38]=W):W=e[38],e[39]!==se||e[40]!==W?(N=n.jsx(Et,{placeholder:se,"aria-label":W,className:"h-9"}),e[39]=se,e[40]=W,e[41]=N):N=e[41],f=$t;let ie;e[42]!==i?(ie=i("taskBoard.taskFilters.projectNoneFound"),e[42]=i,e[43]=ie):ie=e[43],e[44]!==ie?(p=n.jsx(Vt,{children:ie}),e[44]=ie,e[45]=p):p=e[45];let Z;e[46]!==i?(Z=i("taskBoard.taskFilters.projectAny"),e[46]=i,e[47]=Z):Z=e[47];let ee;e[48]!==T?(ee=()=>T(null),e[48]=T,e[49]=ee):ee=e[49];let te;e[50]!==i?(te=i("taskBoard.taskFilters.projectAny"),e[50]=i,e[51]=te):te=e[51];let ne;e[52]!==Z||e[53]!==ee||e[54]!==te?(ne=n.jsx(Ce,{value:Z,onSelect:ee,children:te}),e[52]=Z,e[53]=ee,e[54]=te,e[55]=ne):ne=e[55];let re;e[56]!==i?(re=i("taskBoard.taskFilters.projectNone"),e[56]=i,e[57]=re):re=e[57];let M;e[58]!==T?(M=()=>T(ut),e[58]=T,e[59]=M):M=e[59];let K;e[60]!==i?(K=i("taskBoard.taskFilters.projectNone"),e[60]=i,e[61]=K):K=e[61];let ae;e[62]!==re||e[63]!==M||e[64]!==K?(ae=n.jsx(Ce,{value:re,onSelect:M,children:K}),e[62]=re,e[63]=M,e[64]=K,e[65]=ae):ae=e[65],e[66]!==ne||e[67]!==ae?(h=n.jsxs(Ke,{children:[ne,ae]}),e[66]=ne,e[67]=ae,e[68]=h):h=e[68],x=R.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupProjects"),children:R.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),j=E.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupRepos"),children:E.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),e[0]=r,e[1]=o,e[2]=a,e[3]=c,e[4]=i,e[5]=s,e[6]=f,e[7]=u,e[8]=m,e[9]=d,e[10]=p,e[11]=g,e[12]=h,e[13]=x,e[14]=j,e[15]=N,e[16]=y,e[17]=v,e[18]=k,e[19]=C}else f=e[6],u=e[7],m=e[8],d=e[9],p=e[10],g=e[11],h=e[12],x=e[13],j=e[14],N=e[15],y=e[16],v=e[17],k=e[18],C=e[19];let D;e[69]!==f||e[70]!==p||e[71]!==h||e[72]!==x||e[73]!==j?(D=n.jsxs(f,{children:[p,h,x,j]}),e[69]=f,e[70]=p,e[71]=h,e[72]=x,e[73]=j,e[74]=D):D=e[74];let b;e[75]!==u||e[76]!==D||e[77]!==N?(b=n.jsxs(u,{children:[N,D]}),e[75]=u,e[76]=D,e[77]=N,e[78]=b):b=e[78];let w;e[79]!==m||e[80]!==b||e[81]!==y||e[82]!==v?(w=n.jsx(m,{align:y,className:v,children:b}),e[79]=m,e[80]=b,e[81]=y,e[82]=v,e[83]=w):w=e[83];let _;return e[84]!==d||e[85]!==g||e[86]!==w||e[87]!==k||e[88]!==C?(_=n.jsxs(d,{open:k,onOpenChange:C,children:[g,w]}),e[84]=d,e[85]=g,e[86]=w,e[87]=k,e[88]=C,e[89]=_):_=e[89],_}function Xi(t){return t.projects.length===0}function Ji(t){return t.projects.length>0}function Zi(t){const e=O.c(25),{value:s,onChange:o,block:a}=t,r=Q(),[i,c]=G.useState(s!==""),[l,f]=G.useState(!1),[u,m]=G.useState(s);s!==u&&(m(s),s===""&&!l&&c(!1));const d=i||a,p=d?"w-32 sm:w-44":"w-8 px-0 justify-center",g=a&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==p||e[1]!==g?(h=J("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",p,g),e[0]=p,e[1]=g,e[2]=h):h=e[2];let x;e[3]!==r?(x=r("taskBoard.taskFilters.searchLabel"),e[3]=r,e[4]=x):x=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>c(!0),e[5]=j):j=e[5];let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(gn,{size:14}),e[6]=N):N=e[6];let y;e[7]!==x?(y=n.jsx("button",{type:"button","aria-label":x,onClick:j,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:N}),e[7]=x,e[8]=y):y=e[8];let v;e[9]!==a||e[10]!==d||e[11]!==o||e[12]!==r||e[13]!==s?(v=d&&n.jsx("input",{autoFocus:!a,value:s,onChange:D=>o(D.target.value),onFocus:()=>f(!0),onBlur:()=>{f(!1),s===""&&c(!1)},placeholder:r("taskBoard.taskFilters.searchPlaceholder"),"aria-label":r("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=a,e[10]=d,e[11]=o,e[12]=r,e[13]=s,e[14]=v):v=e[14];let k;e[15]!==a||e[16]!==o||e[17]!==r||e[18]!==s?(k=s!==""&&n.jsx("button",{type:"button","aria-label":r("taskBoard.taskFilters.searchClearLabel"),onMouseDown:er,onClick:()=>{o(""),a||c(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:n.jsx(tn,{size:14})}),e[15]=a,e[16]=o,e[17]=r,e[18]=s,e[19]=k):k=e[19];let C;return e[20]!==h||e[21]!==y||e[22]!==v||e[23]!==k?(C=n.jsxs("div",{className:h,children:[y,v,k]}),e[20]=h,e[21]=y,e[22]=v,e[23]=k,e[24]=C):C=e[24],C}function er(t){return t.preventDefault()}function tr(t){const e=O.c(20),{block:s,onClick:o}=t,a=Q();let r;e[0]!==a?(r=a("taskBoard.taskFilters.boardSettingsLabel"),e[0]=a,e[1]=r):r=e[1];const i=r;let c;e[2]!==s?(c=J(_e(!1,s),s?"h-10 w-full":"w-8 justify-center px-0"),e[2]=s,e[3]=c):c=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(xo,{size:14,className:"shrink-0"}),e[4]=l):l=e[4];let f;e[5]!==s||e[6]!==i?(f=s&&n.jsx("span",{children:i}),e[5]=s,e[6]=i,e[7]=f):f=e[7];let u;e[8]!==i||e[9]!==o||e[10]!==c||e[11]!==f?(u=n.jsxs("button",{type:"button",onClick:o,"aria-label":i,className:c,children:[l,f]}),e[8]=i,e[9]=o,e[10]=c,e[11]=f,e[12]=u):u=e[12];const m=u;if(s)return m;let d;e[13]!==m?(d=n.jsx(Le,{asChild:!0,children:m}),e[13]=m,e[14]=d):d=e[14];let p;e[15]!==i?(p=n.jsx(Me,{side:"top",children:i}),e[15]=i,e[16]=p):p=e[16];let g;return e[17]!==d||e[18]!==p?(g=n.jsxs(Re,{children:[d,p]}),e[17]=d,e[18]=p,e[19]=g):g=e[19],g}function zs(t){const e=O.c(53),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c,block:l}=t;let f;e[0]!==s||e[1]!==i?(f=C=>i({...s,search:C}),e[0]=s,e[1]=i,e[2]=f):f=e[2];let u;e[3]!==l||e[4]!==s.search||e[5]!==f?(u=n.jsx(Zi,{block:l,value:s.search,onChange:f}),e[3]=l,e[4]=s.search,e[5]=f,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==i?(m=C=>i({...s,assignee:C}),e[7]=s,e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l||e[11]!==s.assignee||e[12]!==o||e[13]!==m?(d=n.jsx(Ui,{block:l,value:s.assignee,members:o,onChange:m}),e[10]=l,e[11]=s.assignee,e[12]=o,e[13]=m,e[14]=d):d=e[14];let p;e[15]!==s||e[16]!==i?(p=C=>i({...s,priority:C}),e[15]=s,e[16]=i,e[17]=p):p=e[17];let g;e[18]!==l||e[19]!==s.priority||e[20]!==p?(g=n.jsx(Gi,{block:l,value:s.priority,onChange:p}),e[18]=l,e[19]=s.priority,e[20]=p,e[21]=g):g=e[21];let h;e[22]!==s||e[23]!==i?(h=C=>i({...s,due:C}),e[22]=s,e[23]=i,e[24]=h):h=e[24];let x;e[25]!==l||e[26]!==s.due||e[27]!==h?(x=n.jsx(Hi,{block:l,value:s.due,onChange:h}),e[25]=l,e[26]=s.due,e[27]=h,e[28]=x):x=e[28];let j;e[29]!==s||e[30]!==i?(j=C=>i({...s,tags:C}),e[29]=s,e[30]=i,e[31]=j):j=e[31];let N;e[32]!==l||e[33]!==s.tags||e[34]!==j||e[35]!==a?(N=n.jsx(Qi,{block:l,value:s.tags,tags:a,onChange:j}),e[32]=l,e[33]=s.tags,e[34]=j,e[35]=a,e[36]=N):N=e[36];let y;e[37]!==l||e[38]!==s||e[39]!==r||e[40]!==i?(y=(r.entries.length>0||ft(s.project,r))&&n.jsx(Yi,{block:l,value:s.project,index:r,onChange:C=>i({...s,project:C})}),e[37]=l,e[38]=s,e[39]=r,e[40]=i,e[41]=y):y=e[41];let v;e[42]!==l||e[43]!==c?(v=n.jsx(tr,{block:l,onClick:c}),e[42]=l,e[43]=c,e[44]=v):v=e[44];let k;return e[45]!==N||e[46]!==y||e[47]!==v||e[48]!==u||e[49]!==d||e[50]!==g||e[51]!==x?(k=n.jsxs(n.Fragment,{children:[u,d,g,x,N,y,v]}),e[45]=N,e[46]=y,e[47]=v,e[48]=u,e[49]=d,e[50]=g,e[51]=x,e[52]=k):k=e[52],k}function Wa(t){const e=O.c(16),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ns,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];let u;e[1]!==s||e[2]!==r||e[3]!==o||e[4]!==i||e[5]!==c||e[6]!==a?(u=n.jsx(zs,{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}),e[1]=s,e[2]=r,e[3]=o,e[4]=i,e[5]=c,e[6]=a,e[7]=u):u=e[7];let m;e[8]!==s||e[9]!==r||e[10]!==i||e[11]!==l?(m=Li(s,r)&&n.jsx("button",{type:"button",onClick:()=>i(Rs),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[8]=s,e[9]=r,e[10]=i,e[11]=l,e[12]=m):m=e[12];let d;return e[13]!==u||e[14]!==m?(d=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f,u,m]}),e[13]=u,e[14]=m,e[15]=d):d=e[15],d}function Ya(t){const e=O.c(41),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q(),[f,u]=G.useState(!1),m=Mi(s,r),d=m>0;let p;e[0]!==d?(p=_e(d),e[0]=d,e[1]=p):p=e[1];const g=p;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ns,{size:14,className:"shrink-0"}),e[2]=h):h=e[2];let x;e[3]!==l?(x=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=x):x=e[4];let j;e[5]!==m?(j=m>0&&n.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:m}),e[5]=m,e[6]=j):j=e[6];let N;e[7]!==x||e[8]!==j||e[9]!==g?(N=n.jsx(wn,{asChild:!0,children:n.jsxs("button",{type:"button",className:g,children:[h,x,j]})}),e[7]=x,e[8]=j,e[9]=g,e[10]=N):N=e[10];let y;e[11]!==l?(y=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=y):y=e[12];let v;e[13]!==y?(v=n.jsx(Bt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:y}),e[13]=y,e[14]=v):v=e[14];let k;e[15]!==s||e[16]!==r||e[17]!==o||e[18]!==i||e[19]!==c||e[20]!==a?(k=n.jsx("div",{className:"flex flex-col gap-2 p-4",children:n.jsx(zs,{block:!0,filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c})}),e[15]=s,e[16]=r,e[17]=o,e[18]=i,e[19]=c,e[20]=a,e[21]=k):k=e[21];let C;e[22]!==m||e[23]!==i||e[24]!==l?(C=m>0&&n.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>i(Rs),children:l("taskBoard.taskFilters.clearAllButton")}),e[22]=m,e[23]=i,e[24]=l,e[25]=C):C=e[25];let D;e[26]!==l?(D=l("taskBoard.taskFilters.doneButton"),e[26]=l,e[27]=D):D=e[27];let b;e[28]!==D?(b=n.jsx(us,{asChild:!0,children:n.jsx(ye,{className:"flex-1",children:D})}),e[28]=D,e[29]=b):b=e[29];let w;e[30]!==C||e[31]!==b?(w=n.jsxs(fs,{className:"flex-row gap-2",children:[C,b]}),e[30]=C,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==w||e[34]!==v||e[35]!==k?(_=n.jsxs(Ft,{className:"p-0",children:[v,k,w]}),e[33]=w,e[34]=v,e[35]=k,e[36]=_):_=e[36];let I;return e[37]!==f||e[38]!==_||e[39]!==N?(I=n.jsxs(It,{open:f,onOpenChange:u,direction:"bottom",children:[N,_]}),e[37]=f,e[38]=_,e[39]=N,e[40]=I):I=e[40],I}function Xa(t,e){return ri(t,e.keySeq)??e.id}function Ja(t,e){const s=e?.trim();if(s)return t.find(o=>Ks(s,o.keySeq))??t.find(o=>o.id===s)}export{_i as $,da as A,va as B,Ca as C,ya as D,Bs as E,Lt as F,Ni as G,wt as H,Ga as I,$a as J,nt as K,Rt as L,Da as M,Fi as N,Oa as O,di as P,Zt as Q,Qa as R,Yt as S,La as T,Ba as U,$s as V,Ma as W,Ls as X,Ei as Y,Aa as Z,Ta as _,Na as a,Vs as a0,_a as a1,Ja as a2,Ya as a3,Wa as a4,Va as a5,Ra as a6,Rs as a7,Pa as a8,Fa as a9,Jt as aa,Ea as ab,Ka as ac,qa as ad,Di as ae,Ha as af,za as ag,vi as ah,Uo as ai,ca as aj,wa as b,Ua as c,Oi as d,Fs as e,Xa as f,Ia as g,ki as h,Es as i,aa as j,la as k,fa as l,pa as m,ja as n,pi as o,mi as p,Sa as q,ma as r,ga as s,ri as t,ua as u,xa as v,ba as w,ha as x,hi as y,ka as z};
@@ -1 +0,0 @@
1
- import{s as h}from"./slugify-CEUa2lfQ.js";import{J as m}from"./index-PqfClboL.js";function c(r){const t=r?.trim();if(!t)return null;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:n.href}catch{return null}}function d(r){return c(r?.previewServerUrl)??c(r?.productionUrl)}function I(r){return r?.find(t=>t.production)?.domain??r?.[0]?.domain}function p(r){const t=r?.trim();if(!t)return null;const n=/^https?:\/\//i.test(t)?t:`https://${t}`;return c(n)}function S(r){const t=h(r??"");return t?p(`${t}.deco.site`):null}function l(r){return r==="cms"||r==="sandbox"?r:null}function w(r){return!!d(r)&&r?.fastPreview===!0}function y(r){return w(r)?"cms":"sandbox"}function T(r,t){return l(r?.runtime)??y(t)}function a(r,t){return m.chatThreadIntent(r,t)}function U(r,t,n,e){if(!(!e.runtime&&!e.branch))try{r.setItem(a(t,n),JSON.stringify(e))}catch{}}function g(r,t,n){try{r.removeItem(a(t,n))}catch{}}function P(r,t,n){const e=a(t,n);let u=null;try{u=r.getItem(e),r.removeItem(e)}catch{return{}}if(!u)return{};let i;try{i=JSON.parse(u)}catch{return{}}if(!i||typeof i!="object")return{};const o=i,s=l(o.runtime),f=typeof o.branch=="string"&&o.branch?o.branch:void 0;return{...s?{runtime:s}:{},...f?{branch:f}:{}}}export{d as a,p as b,P as c,y as d,g as e,S as f,I as g,l as p,T as r,c as s,U as w};
@@ -1 +0,0 @@
1
- import{c as y,b as T,j as i,B as L,r as O,J as U,u as k,f as D,W as E,d as V,Z as H,y as z,dz as B}from"./index-PqfClboL.js";import{d as J,h as K,c as F,b as G,D as W}from"./dialog-DMyJgxgJ.js";import{i as Y}from"./Check-tzg1v70M.js";import{a as Q}from"./Copy01-BMb_uucS.js";import{n as X}from"./Download01-DC7Ed5MF.js";import{u as M,D as j}from"./use-destination-route-C9WCN5J4.js";import{a as $}from"./constants-DNuUCxmW.js";const Z="https://github.com/decocms/studio/releases";function q(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function ee(e){return`https://github.com/decocms/studio/releases/download/native-v${e}/deco-${e}-linux-x86_64.AppImage`}function we(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function te(){return typeof navigator<"u"&&/Linux/.test(navigator.platform)&&!/Android/.test(navigator.userAgent)&&!("ontouchend"in document)}async function ne(e,t){if(!e)return!1;try{return await e.writeText(t),!0}catch{return!1}}function P(e){const t=y.c(12),{copiedLabel:n}=e,s=T(),[o,r]=O.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=q(),t[0]=l):l=t[0];const a=l;let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:a}),t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{ne(navigator.clipboard,a).then(p=>{p&&(r(!0),setTimeout(()=>r(!1),2e3))})},t[2]=d):d=t[2];let u;t[3]!==o?(u=o?i.jsx(Y,{size:16}):i.jsx(Q,{size:16}),t[3]=o,t[4]=u):u=t[4];let f;t[5]!==o||t[6]!==n||t[7]!==s?(f=o?n:s("downloadApp.copyLabel"),t[5]=o,t[6]=n,t[7]=s,t[8]=f):f=t[8];let m;return t[9]!==u||t[10]!==f?(m=i.jsxs("div",{className:"flex flex-col gap-3",children:[c,i.jsxs(L,{type:"button",className:"w-full gap-2",onClick:d,children:[u,f]})]}),t[9]=u,t[10]=f,t[11]=m):m=t[11],m}function oe(){const e=y.c(18),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabel"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.terminalHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.appleSiliconNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;return e[15]!==s||e[16]!==c?(d=i.jsxs(i.Fragment,{children:[s,c]}),e[15]=s,e[16]=c,e[17]=d):d=e[17],d}function se(){const e=y.c(42),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabelLinux"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.linuxInstallerHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.linuxArchNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;e[15]!==t?(d=t("downloadApp.linuxDirectDownloadHint"),e[15]=t,e[16]=d):d=e[16];let u;e[17]!==d?(u=i.jsx("p",{children:d}),e[17]=d,e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=ee("4.325.1"),e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(X,{size:14}),e[20]=m):m=e[20];let p;e[21]!==t?(p=t("downloadApp.downloadAppImage"),e[21]=t,e[22]=p):p=e[22];let h;e[23]!==p?(h=i.jsx(L,{asChild:!0,variant:"outline",size:"sm",className:"gap-2",children:i.jsxs("a",{href:f,rel:"noreferrer",children:[m,p]})}),e[23]=p,e[24]=h):h=e[24];let S;e[25]!==t?(S=t("downloadApp.linuxChmodHint"),e[25]=t,e[26]=S):S=e[26];let I;e[27]!==S?(I=i.jsx("p",{children:S}),e[27]=S,e[28]=I):I=e[28];let g;e[29]!==t?(g=t("downloadApp.allReleases"),e[29]=t,e[30]=g):g=e[30];let x;e[31]!==g?(x=i.jsx("a",{href:Z,target:"_blank",rel:"noreferrer",className:"underline-offset-2 hover:text-foreground hover:underline",children:g}),e[31]=g,e[32]=x):x=e[32];let A;e[33]!==h||e[34]!==I||e[35]!==x||e[36]!==u?(A=i.jsxs("div",{className:"flex flex-col items-start gap-2 border-t pt-4 text-xs text-muted-foreground",children:[u,h,I,x]}),e[33]=h,e[34]=I,e[35]=x,e[36]=u,e[37]=A):A=e[37];let _;return e[38]!==s||e[39]!==A||e[40]!==c?(_=i.jsxs(i.Fragment,{children:[s,c,A]}),e[38]=s,e[39]=A,e[40]=c,e[41]=_):_=e[41],_}function je(e){const t=y.c(19),{open:n,onOpenChange:s}=e,o=T();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=te(),t[0]=r):r=t[0];const l=r;let a;t[1]!==o?(a=o("downloadApp.title"),t[1]=o,t[2]=a):a=t[2];let c;t[3]!==a?(c=i.jsx(J,{children:a}),t[3]=a,t[4]=c):c=t[4];let d;t[5]!==o?(d=o(l?"downloadApp.linuxDescription":"downloadApp.description"),t[5]=o,t[6]=d):d=t[6];let u;t[7]!==d?(u=i.jsx(K,{children:d}),t[7]=d,t[8]=u):u=t[8];let f;t[9]!==c||t[10]!==u?(f=i.jsxs(F,{children:[c,u]}),t[9]=c,t[10]=u,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=l?i.jsx(se,{}):i.jsx(oe,{}),t[12]=m):m=t[12];let p;t[13]!==f?(p=i.jsxs(G,{className:"sm:max-w-md",children:[f,m]}),t[13]=f,t[14]=p):p=t[14];let h;return t[15]!==s||t[16]!==n||t[17]!==p?(h=i.jsx(W,{open:n,onOpenChange:s,children:p}),t[15]=s,t[16]=n,t[17]=p,t[18]=h):h=t[18],h}const re=1e4,Te="true",R=2;function N(e,t){return U.chatAutosend(e,t)}function ae(e){return e==="pending"||e==="sending"}function le(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let s=0;n.status==="sending"?s=n.retryAt===void 0?1:R:n.retryAt!==void 0&&(s=1);const o=n.attempt===void 0?s:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!ae(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof o!="number"||!Number.isInteger(o)||o<0||o>R?null:{...t,attempt:o}}function De(e,t,n,s,o=Date.now()){const r={message:s,createdAt:o,status:"pending",attempt:0};return e.setItem(N(t,n),JSON.stringify(r)),r}function ie(e,t,n){const s=N(t,n),o=le(e.getItem(s));return o||(e.removeItem(s),null)}function Ne(e,t,n,s=Date.now()){const o=N(t,n),r=ie(e,t,n);if(!r||r.status!=="pending")return null;if(r.attempt>=R)return e.removeItem(o),null;const l=r.retryAt??r.createdAt;if(s-l>=re)return e.removeItem(o),null;const a={...r,status:"sending",attempt:r.attempt+1};return e.setItem(o,JSON.stringify(a)),{message:a.message,createdAt:a.createdAt,attempt:a.attempt}}function Re(e,t,n){e.removeItem(N(t,n))}const ce="/shell/$org/org-shell/agent-shell";function de(e){return e.threadInSearch||!e.threadId?{to:"."}:{to:"/$org/$taskId",params:{org:e.orgSlug,taskId:e.threadId}}}function ue(e){return e.taskIdParam??e.threadSearch??null}function ke(){const e=y.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const o=k(s);let r;return e[2]!==n.taskId||e[3]!==o.thread?(r=ue({taskIdParam:n.taskId,threadSearch:o.thread}),e[2]=n.taskId,e[3]=o.thread,e[4]=r):r=e[4],r}function fe(e){return(e.onAgentsRoute||e.onHomeRoute||e.legacyRoute)&&e.virtualMcpIdSearch||void 0}function me(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0],D(t).taskId!==void 0}function pe(){const e=y.c(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=k(t),s=M(),o=me(),r=s===j.agents,l=s===j.home;let a;return e[1]!==o||e[2]!==n.virtualmcpid||e[3]!==r||e[4]!==l?(a=fe({virtualMcpIdSearch:n.virtualmcpid,onAgentsRoute:r,onHomeRoute:l,legacyRoute:o}),e[1]=o,e[2]=n.virtualmcpid,e[3]=r,e[4]=l,e[5]=a):a=e[5],a}function Le(){const e=y.c(3),{org:t}=E(),n=pe();let s;return e[0]!==t||e[1]!==n?(s=n??$(t.id).id,e[0]=t,e[1]=n,e[2]=s):s=e[2],s}function he(e){const{virtualmcpid:t,...n}=e.changes;return{...e.prev,...n,thread:e.threadId}}function Ee(e){return e.routeAgentId??e.threadVirtualMcpId??null}function ge(e){if(e.targetVirtualMcpId===void 0)return{kind:"stay",project:e.currentProject};const t=e.targetVirtualMcpId===e.decopilotId?void 0:e.targetVirtualMcpId;return t!==void 0&&e.currentProject===void 0?{kind:"relocate",project:t}:{kind:"stay",project:t}}function xe(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s={from:ce,shouldThrow:!1},e[1]=s):s=e[1],!!H(s)&&n.taskId===void 0}function Me(){const e=y.c(12),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const s=D(n),o=xe(),{org:r}=E(),l=s.org??"",a=M()===j.agents;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const d=k(c),u=a?d.virtualmcpid:void 0,f=s.panel;let m;e[2]!==r.id?(m=$(r.id),e[2]=r.id,e[3]=m):m=e[3];const p=m.id;let h;return e[4]!==f||e[5]!==u||e[6]!==p||e[7]!==t||e[8]!==a||e[9]!==l||e[10]!==o?(h=(S,I,g)=>{const x=de({threadInSearch:o,orgSlug:l,threadId:S}),A=g?.replace??!1;if(x.to==="/$org/$taskId")return t({to:x.to,params:x.params,search:I,replace:A});const _=ge({currentProject:u,targetVirtualMcpId:g?.virtualMcpId,decopilotId:p}),w=g?.view&&g.view.tabId!==void 0?z(g.view.tabId):g?.view?{panel:void 0,payload:B()}:null,C=_.kind==="relocate"&&!a,b=v=>he({prev:C?{sidepanel:v.sidepanel}:v,changes:{...I(v),...w?.payload??{}},threadId:S});return _.kind==="relocate"?t({to:j.agents,params:{org:l,panel:w?w.panel:f},search:v=>({...typeof b=="function"?b(v):b,virtualmcpid:_.project}),replace:A}):t({to:".",params:v=>w?{...v,panel:w.panel}:v,search:v=>({...typeof b=="function"?b(v):b,...a?{virtualmcpid:_.project}:{}}),replace:A})},e[4]=f,e[5]=u,e[6]=p,e[7]=t,e[8]=a,e[9]=l,e[10]=o,e[11]=h):h=e[11],h}export{Te as A,je as D,te as a,Me as b,ke as c,Le as d,Ne as e,Re as f,we as i,Ee as r,pe as u,De as w};
@@ -1 +0,0 @@
1
- import{c as m,m as p,x as q,K as T}from"./index-PqfClboL.js";function C(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],q(i)}function K(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],p(i)}function O(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{K as a,C as b,O as c,w as u};
@@ -1 +0,0 @@
1
- import{c as R,d as w,W as E,n as v,a as D,y as O}from"./index-PqfClboL.js";import{D as N}from"./use-destination-route-C9WCN5J4.js";import{d as S,g as P}from"./use-virtual-mcp-BksmT3bT.js";import{a as U}from"./hooks-g1jnmSoE.js";import{p as _,d as y,w as k}from"./thread-intent-BXltPzDX.js";import{g as F}from"./github-repo-COLY3wWI.js";function C(t,n){if(!n)return!0;if(t.partial)return!1;const e=_(t.metadata?.runtime);return e===null||e===n}function L(t,n,e,i){let a=null;for(const r of t)r.virtual_mcp_id===n&&r.created_by===e&&(r.hidden||C(r,i)&&(!a||r.updated_at>a.updated_at)&&(a=r));return a}function A(t,n,e,i){return t.find(a=>!a.hidden&&a.virtual_mcp_id===n&&a.created_by===e&&a.title==="New chat"&&!a.harness_id&&C(a,i))}function V(t,n,e,i,a){return a?L(t,n,e,i)??A(t,n,e,i):A(t,n,e,i)}const j=[];function x(){const t=R.c(12),n=w(),{org:e,locator:i}=E(),a=v(),r=S(),{data:h}=D.useSession(),g=U();let d;t[0]!==r||t[1]!==i||t[2]!==g?.threads||t[3]!==n||t[4]!==e.slug||t[5]!==h?.user?.id?(d=(o,u,m)=>{const s=(r??[]).find(b=>b.id===o),l=V(g?.threads.get()??j,o,h?.user?.id,m??(s?y(s.metadata):void 0),!!(s&&F(s))),p=l?.id??crypto.randomUUID();!l&&u?.runtime&&k(sessionStorage,i,p,{runtime:u.runtime});const T=u?.panel?O(u.panel):null;if(!T?.panel){n({to:N.home,params:{org:e.slug},search:{virtualmcpid:o,thread:p}});return}n({to:N.agents,params:{org:e.slug,panel:T.panel},search:{...T.payload,virtualmcpid:o,thread:p}})},t[0]=r,t[1]=i,t[2]=g?.threads,t[3]=n,t[4]=e.slug,t[5]=h?.user?.id,t[6]=d):d=t[6];const c=d;let f;return t[7]!==r||t[8]!==c||t[9]!==e||t[10]!==a?(f=(o,u)=>{const m=r.find(s=>s.id===o);if(u?.runtime)return c(o,u,u.runtime);if(m)return c(o,u,y(m.metadata));P(a,e).then(s=>s.find(l=>l.id===o)).catch(q).then(s=>c(o,u,s?y(s.metadata):void 0))},t[7]=r,t[8]=c,t[9]=e,t[10]=a,t[11]=f):f=t[11],f}function q(){}export{V as a,A as f,x as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-BMWJMaLX.js";import{fg as i}from"./index-PqfClboL.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-BMWJMaLX.js";import{fg as u,bU as n}from"./index-PqfClboL.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-PqfClboL.js";import{z as gt,a4 as at,aF as bt}from"./agent-icon-72FlHM-8.js";import{i as vt}from"./ChevronRight-CiQ4250Y.js";import{L as yt}from"./label-QKhMkhs7.js";import{S as lt}from"./scroll-area-DWesqnEX.js";import{S as jt}from"./switch-CXvibrMM.js";import{V as Tt}from"./view-mode-toggle-C67UxAXH.js";import{bv as ct,bw as mt,bx as Nt,by as _t,bz as kt,bA as U,bB as wt}from"./index-z2239Bry.js";import"./AlertCircle-Bs6oknH_.js";import"./Tool01-UNDZEmAI.js";import"./ArrowUp--KPYS_Zx.js";import"./ArrowLeft-BWSnRuGm.js";import"./Tool02-DLBy4do6.js";import"./XCircle-DpU-0ryx.js";import"./TrendUp01-DQn6MXk1.js";import"./ZoomOut-JTfIuUYt.js";import"./Users03-D0VbxK_7.js";import"./CheckCircle-8VMJtbLE.js";import"./Check-tzg1v70M.js";import"./ChevronUp-CdsnYS3o.js";import"./ChevronSelectorVertical-BoLsghjN.js";import"./DotsVertical-Csr6l19K.js";import"./UserSquare-hx_yDjx2.js";import"./Copy01-BMb_uucS.js";import"./CreditCard01-CYcMMyuv.js";import"./Download01-DC7Ed5MF.js";import"./Settings02-CdkkNZQs.js";import"./Eye-D3-C_xXn.js";import"./Share07-CQi_kYTg.js";import"./GitBranch01-BBK46z_T.js";import"./Globe01-DZmHtz0b.js";import"./XClose-BPl5N5wQ.js";import"./HardDrive-C5hOZFs-.js";import"./Image01-DwIAdAUT.js";import"./Key01-bUGu_NLF.js";import"./Link01-CYHfOeCn.js";import"./LinkExternal01-ItrpBJnM.js";import"./Monitor01-B8OxufXb.js";import"./Sun-DqwL2RBY.js";import"./Package-B1Q6V5jC.js";import"./Palette-CmDDPB-1.js";import"./Play-Cebbxrf7.js";import"./Plus-DluN38us.js";import"./SearchMd-Dtd4_W0w.js";import"./Shield01-nF6J5QH3.js";import"./Stars01-BkXOAWkF.js";import"./Trash01-BiGnC-j2.js";import"./Upload01-CEzfFT4A.js";import"./User01-C7HywlOg.js";import"./Users01-DSJGRawE.js";import"./Zap-9WaWy-XB.js";import"./select-fQpkdmCP.js";import"./chat-context-Cy0rls8c.js";import"./use-panel-navigate-CIgiHkeA.js";import"./use-destination-route-C9WCN5J4.js";import"./thread-route-CqJiATkn.js";import"./dialog-DMyJgxgJ.js";import"./constants-DNuUCxmW.js";import"./thread-intent-BXltPzDX.js";import"./slugify-CEUa2lfQ.js";import"./hooks-g1jnmSoE.js";import"./use-mcp-client-DJ1XmaTL.js";import"./auth-CRRmnvXP.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CU_zK481.js";import"./task-board-Cu8abk2x.js";import"./schema-CExEiY9w.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BksmT3bT.js";import"./use-ai-providers-d40kZQC-.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-2Ng0Wxeb.js";import"./use-organization-settings-YKFwQGNn.js";import"./automation-runs-CzvbjIvf.js";import"./useInfiniteQuery-ZaOAcalc.js";import"./use-infinite-scroll-BMWJMaLX.js";import"./use-connection-amUUqPK2.js";import"./table-kp1XE9dT.js";import"./empty-state-DTBt1PEx.js";import"./use-members-CH0-g0gG.js";import"./use-org-auth-client-YfM297vM.js";import"./use-automations-_m8whHp0.js";import"./useSuspenseInfiniteQuery-Er-flM0P.js";import"./avatar-Br5BYZeI.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-24vRYGpf.js";import"./markdown-Cxpdg1Ih.js";import"./monaco-editor-Dh9B6hNJ.js";import"./editor-B0bws0TS.js";import"./types-ZeUbZJLS.js";import"./shell-layout-CyEhpljU.js";import"./project-icon-B6DBvpFP.js";import"./github-repo-COLY3wWI.js";import"./command-CdGnJ_4A.js";import"./index-Bwv8rTxR.js";import"./required-auth-layout-yWBNl8Cx.js";import"./use-org-sso-BlX-8VL5.js";import"./integration-icon-lLjfXy11.js";import"./use-navigate-to-agent-C-nz-Qsl.js";import"./use-mcp-prompts-BsTT4HpT.js";import"./form-7uhYa81Z.js";import"./input-D7VtAJjJ.js";import"./file-type-icon-BYEG4qUb.js";import"./drawer-DYxoRn2r.js";import"./collection-search-BrUxTz45.js";import"./use-mcp-tools-DrikIu-o.js";import"./tabs-B3JjqSsa.js";import"./toggle-group-B-2KCs2i.js";import"./task-route-DOCtDdvo.js";import"./toolbar-icon-button-DsVbEvkI.js";import"./popover-B2EbEKJC.js";import"./github-repo-picker-EcTfqXw_.js";import"./use-debounced-value-Bp44IQzu.js";import"./authenticate-and-persist-oauth-D6lfMerI.js";import"./mcp-oauth-EPG_9QaY.js";import"./extract-connection-data-BJMOxVAc.js";import"./metadata-dUsYcpuu.js";import"./connection-Cdt4e_MW.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-CB2F5qRw.js";import"./use-registry-connections-zd4c05Ap.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CiJM1au8.js";import"./connection-form-helpers-zpf3c404.js";import"./collection-tabs-DsyRDJCm.js";import"./badge-BXMUzYIE.js";import"./use-file-configs-DBg-_83I.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-Yn3mK79I.js";import"./get-initials-D-f_fDFw.js";import"./select-model-B87liE0s.js";import"./checkbox-HAQ_nhYr.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Dhr9f8sV.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DgQE41Lh.js";import"./toolbar-CUoJwayP.js";import"./skill-preview-JM1C9U_u.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DY5pueun.js";import"./use-debounced-autosave-zxAYDFyH.js";import"./search-input-DzDwGhUj.js";import"./use-mcp-auth-status-8HlvMX_V.js";import"./use-secrets-BTq66_-S.js";import"./client-icons-BaBjOI1p.js";import"./connect-layout-DrkT05cr.js";import"./self-tool-result-CI9lePBq.js";import"./track-DnpAx3e3.js";import"./use-tags-DGA6n_kJ.js";import"./breadcrumb-CXuS6gNw.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-PO_mCBtT.js";import"./site-error--i37Vnuw.js";import"./cards-O9HwAVOg.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function tn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:H,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,H=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{tn as VariantCalendar};