decocms 4.150.12 → 4.150.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/client/assets/{AlertCircle-DkUSF8S9.js → AlertCircle-B91-aNwq.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B7P5iILx.js → AreaChart-C3lLe-TO.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-CwxMxJ_X.js → ArrowUp-Cn7neu_D.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-Fn4hisEQ.js → ArrowUpRight-4ON7683p.js} +1 -1
  5. package/dist/client/assets/{Check-CaWO08Ol.js → Check-Cw5nys_P.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Ce06Dt0r.js → CheckCircle-CvK6qQD1.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-dQW8AtGI.js → ChevronDown-CFrsDGDp.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BK_QoWDW.js → ChevronRight-CSfYVYCd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-ClNBV1ML.js → ChevronUp-poM-SIFg.js} +1 -1
  10. package/dist/client/assets/{Copy01-D0rsTdyc.js → Copy01-DAfIqFmi.js} +1 -1
  11. package/dist/client/assets/{CpuChip01-EpnURADx.js → CpuChip01-D-1zqWEP.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BISxlJ7z.js → DotsVertical-Db0Ic0C_.js} +1 -1
  13. package/dist/client/assets/{Eye-CHWgme6t.js → Eye-B4xf2XfM.js} +1 -1
  14. package/dist/client/assets/{FilterLines-2nONIGaK.js → FilterLines-Do81h0db.js} +1 -1
  15. package/dist/client/assets/{HardDrive--H6xeB9a.js → HardDrive-BJwWSvdh.js} +1 -1
  16. package/dist/client/assets/{Key01-DGgsccNk.js → Key01-CDx4-itV.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-Cl0i-UMj.js → LayoutLeft-C54Zd3v3.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DLruoFNK.js → LinkExternal01-BMWoL9cX.js} +1 -1
  19. package/dist/client/assets/{LogOut01-Cu8U0s7_.js → LogOut01-DnW0PXgG.js} +1 -1
  20. package/dist/client/assets/{Monitor01-CDpPX-EA.js → Monitor01-ClNoinKc.js} +1 -1
  21. package/dist/client/assets/{Palette-C9-u1HL2.js → Palette-DrK1WdFE.js} +1 -1
  22. package/dist/client/assets/{Play-3ZXTDwaq.js → Play-uJQecXtC.js} +1 -1
  23. package/dist/client/assets/{Plus-BJivuRWZ.js → Plus-BUQ_ZClP.js} +1 -1
  24. package/dist/client/assets/{SearchLg-DehWCYuP.js → SearchLg-D1RJLuDz.js} +1 -1
  25. package/dist/client/assets/{SearchMd-Dxz9PRr9.js → SearchMd-CBewQIvn.js} +1 -1
  26. package/dist/client/assets/{Settings02-jyt4Cg5Z.js → Settings02-BiO67z5n.js} +1 -1
  27. package/dist/client/assets/{Shield01-D8NQC667.js → Shield01-_WXbYKas.js} +1 -1
  28. package/dist/client/assets/{Star01-Dwm5Prxz.js → Star01-ZJ4rnXKf.js} +1 -1
  29. package/dist/client/assets/{Stars01-Cr6jH6bn.js → Stars01-Bik9Ugxe.js} +1 -1
  30. package/dist/client/assets/{Stars02-BvkKgu1r.js → Stars02-DaESD09_.js} +1 -1
  31. package/dist/client/assets/{Sun-BmSr6mcR.js → Sun-Bfx3j4KE.js} +1 -1
  32. package/dist/client/assets/{SwitchHorizontal01-Cocp1NCJ.js → SwitchHorizontal01-C1V7p22w.js} +1 -1
  33. package/dist/client/assets/{Tool01-B43_tnd4.js → Tool01-DTGcj4gI.js} +1 -1
  34. package/dist/client/assets/{Tool02-B1k57A59.js → Tool02-BPYivh6T.js} +1 -1
  35. package/dist/client/assets/{Trash01-Bij2sBQa.js → Trash01-Yia2FbxW.js} +1 -1
  36. package/dist/client/assets/{TrendUp01-DNUroovp.js → TrendUp01-RRDYPFKj.js} +1 -1
  37. package/dist/client/assets/{Upload01-DjH022N7.js → Upload01-BBKw6S0o.js} +1 -1
  38. package/dist/client/assets/{User01-ZmPLIjFd.js → User01-XCN4nng1.js} +1 -1
  39. package/dist/client/assets/{Users01-BVLWlI1e.js → Users01-Cw6_yNSf.js} +1 -1
  40. package/dist/client/assets/{Users03-BJvAVnZb.js → Users03-dKCb2h3Y.js} +1 -1
  41. package/dist/client/assets/{X-BRRsujeq.js → X-ab3eO-rs.js} +1 -1
  42. package/dist/client/assets/{XCircle-CCKIXuSl.js → XCircle-D7fA26xB.js} +1 -1
  43. package/dist/client/assets/{XClose-x59ADxdn.js → XClose-CEZC5ftU.js} +1 -1
  44. package/dist/client/assets/{Zap-5T12Qisd.js → Zap-Bnq6xGd1.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-BnJ2CyTX.js → ZapSquare-B_ajjEhK.js} +1 -1
  46. package/dist/client/assets/{access-gate-DtqxGB-6.js → access-gate-D4Hh5FVh.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-Bpcf-n0v.js → add-section-modal-CvOwBfxj.js} +1 -1
  48. package/dist/client/assets/{agent-icon-CX57MHZN.js → agent-icon-BUu7SJOh.js} +1 -1
  49. package/dist/client/assets/agents-list-D4CPAK9X.js +1 -0
  50. package/dist/client/assets/{ai-providers-D4M2XSvx.js → ai-providers-EhzLkNiR.js} +1 -1
  51. package/dist/client/assets/{alert-Coj2IknE.js → alert-DtU_bvr8.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-DMgETmzD.js → alert-dialog-zLyeS92X.js} +2 -2
  53. package/dist/client/assets/{app-editor-BLK6ix0D.js → app-editor-DO1eS78p.js} +1 -1
  54. package/dist/client/assets/{auth-Bxvu_2Ac.js → auth-IA0Wt4Bs.js} +1 -1
  55. package/dist/client/assets/{auth-catchall-BLVM76qH.js → auth-catchall-Bi6p1Ud-.js} +1 -1
  56. package/dist/client/assets/{auth-entry-hR1VkCsv.js → auth-entry-Cf5TR3Q3.js} +1 -1
  57. package/dist/client/assets/{auth-split-layout-Bq7vmRP1.js → auth-split-layout-QuPERvo-.js} +1 -1
  58. package/dist/client/assets/{authenticate-and-persist-oauth-iGLSyEy7.js → authenticate-and-persist-oauth-4QL_KMam.js} +1 -1
  59. package/dist/client/assets/{automation-list-row-KsI-CvB5.js → automation-list-row-CtIVsj_5.js} +1 -1
  60. package/dist/client/assets/{automation-runs-B7jzZApT.js → automation-runs-BuBLPadb.js} +1 -1
  61. package/dist/client/assets/{automations-BGn1AtyZ.js → automations-BhzxbiZ6.js} +1 -1
  62. package/dist/client/assets/{avatar-JWYe9tuD.js → avatar-DgcrciBf.js} +1 -1
  63. package/dist/client/assets/{badge-D7PXFjPU.js → badge-COsNQLUw.js} +1 -1
  64. package/dist/client/assets/{block-document-ClcxUvCd.js → block-document-T6uBj3ms.js} +1 -1
  65. package/dist/client/assets/{brand-context-DA0HdnVu.js → brand-context-CVZ_cStr.js} +1 -1
  66. package/dist/client/assets/{buckets-1I5fO_OM.js → buckets-Ds5bb2Zd.js} +1 -1
  67. package/dist/client/assets/{bulk-category-panel-FNvOtMsi.js → bulk-category-panel-Pm1Yz9Zw.js} +1 -1
  68. package/dist/client/assets/{calendar-CyE49Lc6.js → calendar-Dpf15FtT.js} +1 -1
  69. package/dist/client/assets/{capability-load-error-_6TFDt_Z.js → capability-load-error-B5z2_UsL.js} +1 -1
  70. package/dist/client/assets/{card-soYQdPhw.js → card-BNBA4cwH.js} +1 -1
  71. package/dist/client/assets/{category-editor-Dl0UGGun.js → category-editor-BA0Xc6on.js} +1 -1
  72. package/dist/client/assets/{chat-context-DOruUose.js → chat-context-BcKRD-qD.js} +1 -1
  73. package/dist/client/assets/{checkbox-0q9FnTIX.js → checkbox-BL555xYH.js} +1 -1
  74. package/dist/client/assets/{cli-auth-success-CR_KdW_E.js → cli-auth-success-Bd5Du6DE.js} +1 -1
  75. package/dist/client/assets/{collection-detail-CwGX6_bW.js → collection-detail-Ck4V0vb_.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-CNua0OQw.js → collection-display-button-D-rssnYt.js} +1 -1
  77. package/dist/client/assets/{collection-search-Dpng8LoC.js → collection-search-DGVCb7gA.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-BEablUll.js → collection-table-wrapper-CojajOCR.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-BIyQDwrD.js → collection-tabs-BK4jiFiJ.js} +1 -1
  80. package/dist/client/assets/{command-lV9P9VCb.js → command-DZI3kP4g.js} +1 -1
  81. package/dist/client/assets/{commerce-onboarding-d5Ckriwp.js → commerce-onboarding-DQP4ReNS.js} +1 -1
  82. package/dist/client/assets/{companions-core-T8xKIDs8.js → companions-core-DWa4u1b0.js} +1 -1
  83. package/dist/client/assets/{connect-CBvQSyjS.js → connect-DGFBfdn3.js} +1 -1
  84. package/dist/client/assets/{connection-Cn5mPZjc.js → connection-BRPkDcWg.js} +1 -1
  85. package/dist/client/assets/{connection-card-M--ClGzW.js → connection-card-cUEom3hx.js} +1 -1
  86. package/dist/client/assets/{connection-detail-CKiwpwQw.js → connection-detail-CTTCkN-R.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-SRVklhqj.js → connection-form-helpers-B-oUsYK9.js} +1 -1
  88. package/dist/client/assets/{connections-Bn8tLKRu.js → connections-BOxnUR6z.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-DfiSaS6Z.js → decopilot-sse-pool-C_01nXFf.js} +1 -1
  90. package/dist/client/assets/{dialog-B9oegZDu.js → dialog-BKADi3bx.js} +1 -1
  91. package/dist/client/assets/{domain-settings-BamKNkfv.js → domain-settings-DgqnFb0l.js} +1 -1
  92. package/dist/client/assets/{drawer-gCdKlKyC.js → drawer-D7Oy8gIG.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-BYWILVSv.js → dropdown-menu-CNiSo_qs.js} +1 -1
  94. package/dist/client/assets/{empty-state-DI5SVsDm.js → empty-state-DqSQaubj.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-BiZHVUW1.js → extract-connection-data-DW5ENvhS.js} +1 -1
  96. package/dist/client/assets/{file-explorer-MajU3dSY.js → file-explorer-BSNQq6hn.js} +1 -1
  97. package/dist/client/assets/{form-DbQjm3RG.js → form-Fzb0rJTW.js} +1 -1
  98. package/dist/client/assets/{general-BL1n62uN.js → general-1GBG93xy.js} +1 -1
  99. package/dist/client/assets/github-repo-picker-BYSh6D5p.js +1 -0
  100. package/dist/client/assets/{hooks-Cdi0T6NA.js → hooks-4mRuOKRy.js} +5 -5
  101. package/dist/client/assets/{index-Dsg3QMPc.js → index-Bts1u0J_.js} +1 -1
  102. package/dist/client/assets/{index-BcxH3g_P.js → index-BztDXv-J.js} +3 -3
  103. package/dist/client/assets/{index-BtOilzE5.js → index-CI6Q_QAk.js} +1 -1
  104. package/dist/client/assets/{index-4jt5IRNL.js → index-CR8JsTmS.js} +1 -1
  105. package/dist/client/assets/{index-CB06aXrK.js → index-CRmv56i2.js} +1 -1
  106. package/dist/client/assets/index-CWTjeYOh.js +1 -0
  107. package/dist/client/assets/{index-BAZmyVC-.css → index-CbTRSuOH.css} +1 -1
  108. package/dist/client/assets/{index-BBJRaxX8.js → index-D6eR-lCa.js} +1 -1
  109. package/dist/client/assets/{index-DD0t6510.js → index-DB_ltYEd.js} +6 -6
  110. package/dist/client/assets/{index-yzqlSPEW.js → index-DWVYmT2K.js} +1 -1
  111. package/dist/client/assets/{index-CLgyj0Ph.js → index-cIDyPB3B.js} +41 -41
  112. package/dist/client/assets/{index-Bn5LDRj0.js → index-pf9WIzdb.js} +1 -1
  113. package/dist/client/assets/{index-redirect-BiiMfl6M.js → index-redirect-_GLliss8.js} +1 -1
  114. package/dist/client/assets/{input-BwMPytZi.js → input-HN_bxtAQ.js} +1 -1
  115. package/dist/client/assets/{integration-icon-BSizUwtM.js → integration-icon-BjzWQyhn.js} +1 -1
  116. package/dist/client/assets/{invite-member-dialog-C0XaeElw.js → invite-member-dialog-DAtZKWFO.js} +1 -1
  117. package/dist/client/assets/{label-DFGmypV5.js → label-WEwHbgNa.js} +1 -1
  118. package/dist/client/assets/{layout-DxXYx71Y.js → layout-CLv1bCzT.js} +1 -1
  119. package/dist/client/assets/{login-Bz-2wgDI.js → login-XCWqN1gF.js} +1 -1
  120. package/dist/client/assets/{mcp-oauth-DNSOSAwY.js → mcp-oauth-Bna-E66_.js} +1 -1
  121. package/dist/client/assets/{members-f5WGmg4S.js → members-ovr8p4aB.js} +1 -1
  122. package/dist/client/assets/{monaco-editor-nBV34MRL.js → monaco-editor-xaI7s5kF.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-B42ZD2Pr.js → monitoring-stats-row-CmdFUB4i.js} +1 -1
  124. package/dist/client/assets/{multi-select-BXdAwEJ3.js → multi-select-B0qocmeY.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-Dj3lFY5c.js → oauth-callback-ai-provider-Cx6PyJQv.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-ChT-RlHe.js → oauth-callback-g6ZHZC-H.js} +1 -1
  127. package/dist/client/assets/{onboarding-wXglYyah.js → onboarding-Crb1jiVb.js} +1 -1
  128. package/dist/client/assets/{org-layout-CWltwFJ8.js → org-layout-DZBP-2GO.js} +1 -1
  129. package/dist/client/assets/{organization-choice-t5wYtE_x.js → organization-choice-C_akLq78.js} +1 -1
  130. package/dist/client/assets/{orgs-BIX-r_Bs.js → orgs-B_89Kdou.js} +1 -1
  131. package/dist/client/assets/{page-seo-form-Hdn6H-EE.js → page-seo-form-D9rc6Mye.js} +1 -1
  132. package/dist/client/assets/{popover-DmPP_Wum.js → popover-Mcyd1rJW.js} +1 -1
  133. package/dist/client/assets/{post-editor-OyGhf2Ka.js → post-editor-B4wUDwBb.js} +1 -1
  134. package/dist/client/assets/{primitives-CaH5RBnr.js → primitives-Cg_9YIfi.js} +1 -1
  135. package/dist/client/assets/{profile-B2VY0ZS8.js → profile-PO6imsIY.js} +1 -1
  136. package/dist/client/assets/project-app-view-DZMl5lBQ.js +1 -0
  137. package/dist/client/assets/provision-repo-scoped-github-connection-C2RHf8fG.js +1 -0
  138. package/dist/client/assets/record-editor-DD85VkKs.js +1 -0
  139. package/dist/client/assets/{redirect-editor-C96uMcWu.js → redirect-editor-DBR2nOIY.js} +1 -1
  140. package/dist/client/assets/registry-D-iopBq7.js +2 -0
  141. package/dist/client/assets/{registry-layout-JmQNDspa.js → registry-layout-DXcfcP7u.js} +1 -1
  142. package/dist/client/assets/{reports-Bl0iJBbV.js → reports-DD0UMnsc.js} +2 -2
  143. package/dist/client/assets/{require-capability-APhfyAbM.js → require-capability-Duuzb-1_.js} +1 -1
  144. package/dist/client/assets/{required-auth-layout-D68OOUEY.js → required-auth-layout-PQuo7896.js} +1 -1
  145. package/dist/client/assets/{reset-password-DL8RfFE6.js → reset-password-CU6E7Bhy.js} +1 -1
  146. package/dist/client/assets/{roles-Cm81NQ5G.js → roles-BB2l3MZv.js} +1 -1
  147. package/dist/client/assets/{search-input-CVQs7RpL.js → search-input-BOnpigZ_.js} +1 -1
  148. package/dist/client/assets/{secrets-CCvK4loO.js → secrets-Dqkkx2T1.js} +1 -1
  149. package/dist/client/assets/{sections-editor-DkBwWst3.js → sections-editor-vVXk2bQB.js} +1 -1
  150. package/dist/client/assets/{select-DiBMx0I6.js → select-BNOwmKae.js} +1 -1
  151. package/dist/client/assets/{select-model-U0NH-03Z.js → select-model-Clsr7M33.js} +1 -1
  152. package/dist/client/assets/{self-tool-result-Dmty8b-9.js → self-tool-result-DfFc8ew3.js} +1 -1
  153. package/dist/client/assets/{seo-editor-Cv5a7w20.js → seo-editor-QGR4jMSw.js} +1 -1
  154. package/dist/client/assets/{settings-layout-DTUqWdZq.js → settings-layout-DKgu9jEA.js} +1 -1
  155. package/dist/client/assets/{settings-section-CJi2U3py.js → settings-section-CGHdGROt.js} +1 -1
  156. package/dist/client/assets/{shell-controls-BtDc9Y-D.js → shell-controls-BCKV1NvA.js} +1 -1
  157. package/dist/client/assets/{shell-layout-CZMSsz_J.js → shell-layout-DJnG6tBW.js} +1 -1
  158. package/dist/client/assets/sidebar-C0kiKg50.js +1 -0
  159. package/dist/client/assets/{skeleton-YNL4Gfyh.js → skeleton-BgYjZjTE.js} +1 -1
  160. package/dist/client/assets/{spinner-cWHEuKxp.js → spinner-Dl88nySH.js} +1 -1
  161. package/dist/client/assets/{sso-BIp8LA3w.js → sso-JSunbF6z.js} +1 -1
  162. package/dist/client/assets/{store-R2rNmTrf.js → store-DcVw_Ezl.js} +1 -1
  163. package/dist/client/assets/store-registry-lJb1V408.js +2 -0
  164. package/dist/client/assets/{studio-tools-DIB17zFH.js → studio-tools-BVEjmDQb.js} +1 -1
  165. package/dist/client/assets/{switch-CbcK-jGL.js → switch-_5lfqgQ6.js} +1 -1
  166. package/dist/client/assets/{tab-id-7b3wA9i7.js → tab-id-BleB6Ron.js} +1 -1
  167. package/dist/client/assets/{table-DBYSBeR3.js → table-CNfTtf-n.js} +1 -1
  168. package/dist/client/assets/{tabs-BrFyu0Ld.js → tabs-kRgqoap0.js} +1 -1
  169. package/dist/client/assets/{textarea-BGf8-22U.js → textarea-D1aVc8E7.js} +1 -1
  170. package/dist/client/assets/{toggle-group-CjS_UJ7P.js → toggle-group-DvK-vqBY.js} +1 -1
  171. package/dist/client/assets/toolbar-CxCN0jhr.js +1 -0
  172. package/dist/client/assets/{tooltip-Boyng34D.js → tooltip-Cn1IcDmc.js} +1 -1
  173. package/dist/client/assets/{use-ai-providers-BrI62wxb.js → use-ai-providers-BYGZHRPH.js} +1 -1
  174. package/dist/client/assets/{use-automations-CwH1KDVN.js → use-automations-BEOa2pC2.js} +1 -1
  175. package/dist/client/assets/{use-autosave-D4pq6CN0.js → use-autosave-BIJ2p_MC.js} +1 -1
  176. package/dist/client/assets/{use-capability-BWY6g3Hm.js → use-capability-BxJkR1VB.js} +1 -1
  177. package/dist/client/assets/{use-clock-tick-CGEs0Tg3.js → use-clock-tick-BrU-wGRy.js} +1 -1
  178. package/dist/client/assets/{use-connection-DpTbs6D3.js → use-connection-BNKQq_v1.js} +1 -1
  179. package/dist/client/assets/{use-copy-BjAla8BE.js → use-copy-7m3Ed17j.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-SW1VWhqm.js → use-create-virtual-mcp-_D1SJTWG.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-pWgqt4Hv.js → use-debounced-autosave-D0cLeexL.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-MHaS7My_.js → use-debounced-value-BY8ovYWq.js} +1 -1
  183. package/dist/client/assets/use-deco-credits-3FINi23O.js +1 -0
  184. package/dist/client/assets/{use-decopilot-events-DIQe_rcp.js → use-decopilot-events-B47pZ2AI.js} +1 -1
  185. package/dist/client/assets/{use-delete-connection-XG9nVuEY.js → use-delete-connection-CyuPr25u.js} +1 -1
  186. package/dist/client/assets/{use-deployment-admin-QHseVn26.js → use-deployment-admin-CbEdVnhP.js} +1 -1
  187. package/dist/client/assets/{use-file-configs-C3YngRho.js → use-file-configs-BCgCMPp3.js} +1 -1
  188. package/dist/client/assets/{use-infinite-scroll-CfKncOiK.js → use-infinite-scroll-INj7iNdP.js} +1 -1
  189. package/dist/client/assets/{use-join-requests-BG4xsWYG.js → use-join-requests-DSkrOZR8.js} +1 -1
  190. package/dist/client/assets/{use-mcp-auth-status-qaat6Jvn.js → use-mcp-auth-status-C1MLJaDO.js} +1 -1
  191. package/dist/client/assets/{use-mcp-client-BEwkzQUP.js → use-mcp-client-Zm5H8-Zl.js} +2 -2
  192. package/dist/client/assets/{use-mcp-tools-gn9osu_Q.js → use-mcp-tools-Do7r-2lV.js} +1 -1
  193. package/dist/client/assets/{use-members-DTeBeYXQ.js → use-members-B11q_xQz.js} +1 -1
  194. package/dist/client/assets/{use-mobile-ClQdbPYE.js → use-mobile-BengO0lS.js} +1 -1
  195. package/dist/client/assets/{use-navigate-to-agent-DvK4hzMp.js → use-navigate-to-agent-DmiY1Q8V.js} +1 -1
  196. package/dist/client/assets/{use-org-auth-client-DHBscDoc.js → use-org-auth-client-C8Z6Cidd.js} +1 -1
  197. package/dist/client/assets/{use-org-sso-R6aJskDC.js → use-org-sso-O3jknVxq.js} +1 -1
  198. package/dist/client/assets/{use-organization-roles-CSIbmHE0.js → use-organization-roles-CQv8oHgS.js} +1 -1
  199. package/dist/client/assets/{use-organization-settings-3l3-PWZ-.js → use-organization-settings-Oq0J09-V.js} +1 -1
  200. package/dist/client/assets/{use-registry-connections-m_NzqSHw.js → use-registry-connections-CI3I17-c.js} +1 -1
  201. package/dist/client/assets/{use-secrets-CmAxrjv8.js → use-secrets-DjYfC3W_.js} +1 -1
  202. package/dist/client/assets/{use-status-sounds-D4JT9F25.js → use-status-sounds-DTAB4Phc.js} +1 -1
  203. package/dist/client/assets/{use-tags-BauEp0vd.js → use-tags-Dj1xCgYD.js} +1 -1
  204. package/dist/client/assets/{use-view-mode-9NHwOyEs.js → use-view-mode-CKxVad5H.js} +1 -1
  205. package/dist/client/assets/{use-virtual-mcp-BnHBU3_3.js → use-virtual-mcp-Cm3s396Y.js} +1 -1
  206. package/dist/client/assets/useInfiniteQuery-C5nBw6Jw.js +1 -0
  207. package/dist/client/assets/{useQueries-DF7muCkz.js → useQueries-C4YD28d8.js} +1 -1
  208. package/dist/client/assets/{useRouterState-CO6LbiMl.js → useRouterState-D1i-KnUG.js} +1 -1
  209. package/dist/client/assets/useSuspenseInfiniteQuery-ClXYbJmm.js +1 -0
  210. package/dist/client/assets/{users-CcQPcfAb.js → users-BoMbND0s.js} +1 -1
  211. package/dist/client/assets/{variant-calendar-BOnCE7y-.js → variant-calendar-qTp_LhSU.js} +1 -1
  212. package/dist/client/assets/{view-mode-toggle-CNPz7BwP.js → view-mode-toggle-D5GwXJYe.js} +1 -1
  213. package/dist/client/index.html +6 -16
  214. package/dist/server/cli.js +259 -259
  215. package/dist/server/server.js +108 -108
  216. package/package.json +1 -1
  217. package/dist/client/assets/agents-list-gFzIi7tp.js +0 -1
  218. package/dist/client/assets/github-repo-picker-Bu5y6cUR.js +0 -1
  219. package/dist/client/assets/index-DYdINzCW.js +0 -1
  220. package/dist/client/assets/org-install-BGhxaoAp.js +0 -1
  221. package/dist/client/assets/project-app-view-C18r3lmY.js +0 -1
  222. package/dist/client/assets/provision-repo-scoped-github-connection-DWINBxtd.js +0 -1
  223. package/dist/client/assets/record-editor-DJRW6Y3d.js +0 -1
  224. package/dist/client/assets/registry-BQ5mVg5k.js +0 -2
  225. package/dist/client/assets/sidebar-DeKVeH2K.js +0 -1
  226. package/dist/client/assets/store-registry-DbqduPMQ.js +0 -2
  227. package/dist/client/assets/toolbar-BZigRKxC.js +0 -1
  228. package/dist/client/assets/use-deco-credits-D_UnpHIS.js +0 -1
  229. package/dist/client/assets/useInfiniteQuery-P1Iqwjod.js +0 -1
  230. package/dist/client/assets/useSuspenseInfiniteQuery-dT7ERMWt.js +0 -1
  231. package/dist/client/icons/apple-touch-icon-180.png +0 -0
  232. package/dist/client/icons/icon-192.png +0 -0
  233. package/dist/client/icons/icon-512.png +0 -0
  234. package/dist/client/manifest.webmanifest +0 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.150.12",
3
+ "version": "4.150.14",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as ge,b as me,j as o,v as Ae,t as le,B as ie,F as De,o as Ie,a as Le,r as W,n as Te,K as de,e as Ee,p as K,G as Fe,m as ke}from"./index-CLgyj0Ph.js";import{a as ne,b as ye,D as ue,c as pe}from"./dropdown-menu-BYWILVSv.js";import{a as Me}from"./Users03-BJvAVnZb.js";import{G as we,b as Ge,a as Oe}from"./github-repo-picker-Bu5y6cUR.js";import{a as Pe,b as ze,c as Be}from"./use-virtual-mcp-BnHBU3_3.js";import{P as ce}from"./index-Dsg3QMPc.js";import{a as Re}from"./DotsVertical-BISxlJ7z.js";import{A as Ue,H as fe,aZ as $e}from"./agent-icon-CX57MHZN.js";import{a as He,b as Ve}from"./Settings02-jyt4Cg5Z.js";import{s as Ke}from"./Trash01-Bij2sBQa.js";import{p as qe,f as he}from"./pt-BR-CLy76QW2.js";import{c as Se}from"./use-navigate-to-agent-DvK4hzMp.js";import{e as Qe,h as Je}from"./use-organization-settings-3l3-PWZ-.js";import{u as _e}from"./use-capability-BWY6g3Hm.js";import{C as Ye}from"./card-soYQdPhw.js";import{E as We}from"./empty-state-DI5SVsDm.js";import{u as Ze}from"./use-create-virtual-mcp-SW1VWhqm.js";import{u as Xe}from"./use-connection-DpTbs6D3.js";import{u as xe,S as et}from"./use-mcp-client-BEwkzQUP.js";import{p as tt,a as je}from"./deco-site-production-url-CaKZ7xBn.js";import{g as ot,f as st,a as it,p as nt}from"./provision-repo-scoped-github-connection-DWINBxtd.js";import{e as rt,d as lt,a as at,b as ct,c as mt}from"./dialog-B9oegZDu.js";import{C as dt}from"./collection-search-Dpng8LoC.js";import{c as ut,d as pt,b as gt,f as ft,g as ht,e as xt,a as jt,A as Ct}from"./alert-dialog-DMgETmzD.js";import{S as bt}from"./search-input-CVQs7RpL.js";import{s as Ce}from"./Plus-BJivuRWZ.js";import"./Check-CaWO08Ol.js";import"./ChevronRight-BK_QoWDW.js";import"./use-debounced-value-MHaS7My_.js";import"./authenticate-and-persist-oauth-iGLSyEy7.js";import"./mcp-oauth-DNSOSAwY.js";import"./auth-Bxvu_2Ac.js";import"./LinkExternal01-DLruoFNK.js";import"./use-mcp-tools-gn9osu_Q.js";import"./extract-connection-data-BiZHVUW1.js";import"./metadata-dUsYcpuu.js";import"./sidebar-DeKVeH2K.js";import"./LayoutLeft-Cl0i-UMj.js";import"./use-mobile-ClQdbPYE.js";import"./X-BRRsujeq.js";import"./tooltip-Boyng34D.js";import"./AlertCircle-DkUSF8S9.js";import"./Tool01-B43_tnd4.js";import"./ArrowUp-CwxMxJ_X.js";import"./Tool02-B1k57A59.js";import"./XCircle-CCKIXuSl.js";import"./ArrowUpRight-Fn4hisEQ.js";import"./TrendUp01-DNUroovp.js";import"./ZapSquare-BnJ2CyTX.js";import"./CheckCircle-Ce06Dt0r.js";import"./ChevronDown-dQW8AtGI.js";import"./ChevronUp-ClNBV1ML.js";import"./Stars02-BvkKgu1r.js";import"./Copy01-D0rsTdyc.js";import"./CpuChip01-EpnURADx.js";import"./Eye-CHWgme6t.js";import"./FilterLines-2nONIGaK.js";import"./Star01-Dwm5Prxz.js";import"./Palette-C9-u1HL2.js";import"./SwitchHorizontal01-Cocp1NCJ.js";import"./HardDrive--H6xeB9a.js";import"./Key01-DGgsccNk.js";import"./LogOut01-Cu8U0s7_.js";import"./Monitor01-CDpPX-EA.js";import"./Sun-BmSr6mcR.js";import"./Play-3ZXTDwaq.js";import"./SearchLg-DehWCYuP.js";import"./SearchMd-Dxz9PRr9.js";import"./Shield01-D8NQC667.js";import"./Stars01-Cr6jH6bn.js";import"./Upload01-DjH022N7.js";import"./User01-ZmPLIjFd.js";import"./Users01-BVLWlI1e.js";import"./XClose-x59ADxdn.js";import"./Zap-5T12Qisd.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./hooks-Cdi0T6NA.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DfiSaS6Z.js";import"./reusable-new-chat-CouMjkYR.js";import"./studio-tools-DIB17zFH.js";function be(t){const e=ge.c(28),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:r,isCreating:f,align:c,side:G,showBetaBadge:j}=t,O=c===void 0?"end":c,d=me();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Me,{size:14}),e[0]=T):T=e[0];let m;e[1]!==d?(m=d("common.createAgentDropdown.createFromScratch"),e[1]=d,e[2]=m):m=e[2];let D;e[3]!==f||e[4]!==i||e[5]!==m?(D=o.jsxs(ne,{disabled:f,onClick:i,children:[T,m]}),e[3]=f,e[4]=i,e[5]=m,e[6]=D):D=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(we,{className:"size-3.5"}),e[7]=C):C=e[7];let y;e[8]!==d?(y=d("common.createAgentDropdown.importFromGitHub"),e[8]=d,e[9]=y):y=e[9];let a;e[10]!==j?(a=j&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=j,e[11]=a):a=e[11];let l;e[12]!==n||e[13]!==y||e[14]!==a?(l=o.jsxs(ne,{onClick:n,children:[C,y,a]}),e[12]=n,e[13]=y,e[14]=a,e[15]=l):l=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=h):h=e[16];let b;e[17]!==d?(b=d("common.createAgentDropdown.importFromDeco"),e[17]=d,e[18]=b):b=e[18];let w;e[19]!==r||e[20]!==b?(w=o.jsxs(ne,{onClick:r,children:[h,b]}),e[19]=r,e[20]=b,e[21]=w):w=e[21];let u;return e[22]!==O||e[23]!==G||e[24]!==w||e[25]!==D||e[26]!==l?(u=o.jsxs(ye,{side:G,align:O,className:"w-48",children:[D,l,w]}),e[22]=O,e[23]=G,e[24]=w,e[25]=D,e[26]=l,e[27]=u):u=e[27],u}function Dt(t){const e=ge.c(65),{project:i,lastUsedAt:n,onDeleteClick:r}=t,f=Se(),c=me(),[G]=Ae(),j=G.language==="pt-BR"?qe:void 0,{mainAgentId:O}=Qe(),d=Je(),{granted:T}=_e("org:manage"),m=O===i.id;let D;e[0]!==m||e[1]!==i.id||e[2]!==i.title||e[3]!==d||e[4]!==c?(D=()=>{const A=m?null:i.id;d.mutate(A,{onSuccess:()=>le.success(m?c("home.projectCard.mainAgentUnset",{title:i.title}):c("home.projectCard.mainAgentSet",{title:i.title})),onError:()=>le.error(c("home.projectCard.mainAgentError"))})},e[0]=m,e[1]=i.id,e[2]=i.title,e[3]=d,e[4]=c,e[5]=D):D=e[5];const C=D;let y;e[6]!==f||e[7]!==i.id?(y=()=>f(i.id),e[6]=f,e[7]=i.id,e[8]=y):y=e[8];let a;e[9]!==i.title||e[10]!==y?(a=o.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[9]=i.title,e[10]=y,e[11]=a):a=e[11];let l;e[12]!==i.icon||e[13]!==i.title?(l=o.jsx(Ue,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[12]=i.icon,e[13]=i.title,e[14]=l):l=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Re,{size:20})})}),e[15]=h):h=e[15];let b;e[16]!==f||e[17]!==i.id?(b=()=>f(i.id,{search:{main:"settings"}}),e[16]=f,e[17]=i.id,e[18]=b):b=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(He,{size:16}),e[19]=w):w=e[19];let u;e[20]!==b?(u=o.jsxs(ne,{onClick:b,children:[w,"Settings"]}),e[20]=b,e[21]=u):u=e[21];let B;e[22]!==T||e[23]!==m||e[24]!==c||e[25]!==C?(B=T&&o.jsxs(ne,{onClick:A=>{A.stopPropagation(),C()},children:[o.jsx(fe,{size:16}),c(m?"home.projectCard.unsetMainAgent":"home.projectCard.setAsMainAgent")]}),e[22]=T,e[23]=m,e[24]=c,e[25]=C,e[26]=B):B=e[26];let E;e[27]!==r?(E=r&&o.jsxs(ne,{variant:"destructive",onClick:A=>{A.stopPropagation(),r(A)},children:[o.jsx(Ke,{size:16}),"Delete"]}),e[27]=r,e[28]=E):E=e[28];let R;e[29]!==E||e[30]!==u||e[31]!==B?(R=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(ye,{align:"end",children:[u,B,E]})]})}),e[29]=E,e[30]=u,e[31]=B,e[32]=R):R=e[32];let S;e[33]!==R||e[34]!==l?(S=o.jsxs("div",{className:"flex items-start justify-between",children:[l,R]}),e[33]=R,e[34]=l,e[35]=S):S=e[35];let _;e[36]!==i.title?(_=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[36]=i.title,e[37]=_):_=e[37];let N;e[38]!==m||e[39]!==c?(N=m&&o.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(fe,{size:12}),c("home.projectCard.mainAgentBadge")]}),e[38]=m,e[39]=c,e[40]=N):N=e[40];let P;e[41]!==_||e[42]!==N?(P=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[_,N]}),e[41]=_,e[42]=N,e[43]=P):P=e[43];const F=i.description||"No description";let s;e[44]!==F?(s=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:F}),e[44]=F,e[45]=s):s=e[45];let p;e[46]!==P||e[47]!==s?(p=o.jsxs("div",{className:"flex flex-col gap-1",children:[P,s]}),e[46]=P,e[47]=s,e[48]=p):p=e[48];let x;e[49]!==S||e[50]!==p?(x=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[S,p]}),e[49]=S,e[50]=p,e[51]=x):x=e[51];let L;e[52]!==n||e[53]!==j||e[54]!==i.updated_at||e[55]!==c?(L=n?c("home.projectCard.lastUsed",{time:he(new Date(n),{addSuffix:!0,locale:j})}):c("home.projectCard.updated",{time:he(new Date(i.updated_at),{addSuffix:!0,locale:j})}),e[52]=n,e[53]=j,e[54]=i.updated_at,e[55]=c,e[56]=L):L=e[56];let g;e[57]!==L?(g=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:L})})}),e[57]=L,e[58]=g):g=e[58];let v;e[59]!==x||e[60]!==g?(v=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[x,g]}),e[59]=x,e[60]=g,e[61]=v):v=e[61];let k;return e[62]!==v||e[63]!==a?(k=o.jsxs(Ye,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[a,v]}),e[62]=v,e[63]=a,e[64]=k):k=e[64],k}const yt="deco-sites";function wt(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function St(t,e){const i=e?wt(e):null,n=i?.owner??yt,r=i?.repo??t;return{owner:n,name:r,url:`https://github.com/${n}/${r}`}}function _t(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function Ne(t,e,i){const n=await fetch(t,e),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`${i} (${n.status})`);return r}function Nt(t){return Ne(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function vt({open:t,onOpenChange:e,onBack:i}){const n=me(),{org:r}=De(),f=Se(),c=Ie(),{data:G}=Le.useSession(),[j,O]=W.useState(null),[d,T]=W.useState(null),[m,D]=W.useState(""),C=xe({connectionId:et,orgId:r.id,orgSlug:r.slug}),y=Xe({slug:"mcp-github"}),a=ot(y),l=Ge({enabled:t&&a.length===0}),h=a.length===1?a[0]??null:d,b=a.length>1&&!h,w=xe({connectionId:h?.id??"",orgId:r.id,orgSlug:r.slug}),u=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:B,isLoading:E,error:R}=Te({queryKey:de.decoSites(G?.user?.email),queryFn:()=>Nt(r.slug),enabled:t&&!!G?.user?.email,staleTime:6e4,retry:!1}),S=B?.sites??[],_=s=>{s||(O(null),T(null),D("")),e(s)},N=S.filter(s=>s.name.toLowerCase().includes(m.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),P=!j||N.some(s=>s.name===j),F=Ee({mutationFn:async s=>{if(!h)throw new Error(n("common.importFromDecoDialog.githubNotConnected"));K("deco_site_import_started",{site_name:s});const{installations:p,appSlug:x}=await st(M=>C.callTool(M),h.id),L=S.find(M=>M.name===s);if(!L)throw new Error(n("common.importFromDecoDialog.siteNoLongerAvailable"));const g=St(s,L.metadata),v=it(p,g.owner);if(!v){const M=x?`https://github.com/apps/${x}/installations/new`:"https://github.com/settings/installations";throw new Error(n("common.importFromDecoDialog.installGithubApp",{owner:g.owner,installUrl:M}))}let k=null,A=null,$=null;const re=async()=>{$&&await C.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:$}}).catch(()=>{}),A&&await C.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{}),k&&await C.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:k,force:!0}}).catch(()=>{})};try{const M=await Ne(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},n("common.importFromDecoDialog.failedToCreateConnection")),z=M.connId;if(!z)throw new Error(n("common.importFromDecoDialog.noConnectionId"));k=z;const{childConnectionId:H}=await nt({orgSlug:r.slug,sourceConnection:h,installationId:v.installationId,owner:g.owner,repo:g.name,githubCallTool:V=>w.callTool(V),selfCallTool:V=>C.callTool(V)});A=H;const q=M.icon??null,Z=_t(s),J=s.toLowerCase(),Y=tt(je(L.domains)),Q=await C.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:q??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:J,productionUrl:Y,githubRepo:{owner:g.owner,name:g.name,url:g.url,installationId:v.installationId,connectionId:H},ui:{banner:null,bannerColor:"#22C55E",icon:q,themeColor:"#22C55E",slug:Z,pinnedViews:[{connectionId:z,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:z,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:z},{connection_id:H}]}}}),U=Q.structuredContent??Q;if(!U.item?.id)throw new Error(n("common.importFromDecoDialog.failedToCreateAgent"));return $=U.item.id,{slug:Z,virtualMcpId:U.item.id,connId:z,item:U.item}}catch(M){throw await re(),M}},onSuccess:({slug:s,virtualMcpId:p,item:x})=>{K("deco_site_import_succeeded",{site_name:x.title,virtual_mcp_id:p,slug:s}),c.setQueryData(de.collectionItem(C,r.id,"","VIRTUAL_MCP",p),{item:x}),c.invalidateQueries({predicate:L=>{const g=L.queryKey;return g[1]===r.id&&g[3]==="collection"&&g[4]==="VIRTUAL_MCP"}}),c.invalidateQueries({queryKey:de.projects(r.id)}),le.success(n("common.importFromDecoDialog.importSuccess",{slug:s})),_(!1),localStorage.setItem(Fe.sidebarOpen(),JSON.stringify(!1)),f(p)},onError:s=>{K("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),le.error(n("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:n("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(rt,{open:t,onOpenChange:_,children:o.jsxs(lt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(at,{className:"sr-only",children:o.jsx(ct,{children:n("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&o.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":n("common.importFromDecoDialog.goBack"),children:o.jsx(Ve,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:n("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(dt,{value:m,onChange:D,placeholder:n("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&D("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??n("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ie,{variant:"outline",size:"sm",onClick:l.retry,children:n("common.importFromDecoDialog.retryGithubSetup")})]}),u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.settingUpGithub")}),b&&!u&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>T(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(we,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),E&&!u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.loadingSites")}),!E&&!u&&!b&&l.status!=="error"&&!R&&S.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.noSitesFound")}),!E&&!u&&!b&&l.status!=="error"&&S.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[N.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:n("common.importFromDecoDialog.noSitesMatch",{search:m})}),N.map(s=>{const p=je(s.domains),x=j===s.name;return o.jsxs("button",{type:"button",onClick:()=>O(s.name),className:ke("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",x?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),p&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p})]})]},s.name)})]})]}),o.jsxs(mt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ie,{variant:"outline",onClick:()=>_(!1),disabled:F.isPending,children:n("common.importFromDecoDialog.cancel")}),o.jsx(ie,{disabled:!j||!P||F.isPending||E||u||b||!h||l.status==="error",onClick:()=>j&&F.mutate(j),children:F.isPending?n("common.importFromDecoDialog.importing"):n("common.importFromDecoDialog.import")})]})]})})}function is(){const t=ge.c(77),e=me(),{org:i}=De(),n=Pe(),r=ze(),[f,c]=W.useState("");let G;t[0]===Symbol.for("react.memo_cache_sentinel")?(G={navigateOnCreate:!0},t[0]=G):G=t[0];const{createVirtualMCP:j,isCreating:O}=Ze(G),[d,T]=W.useState(null),[m,D]=W.useState(!1),[C,y]=W.useState(!1),{granted:a}=_e("agents:manage"),l=f.toLowerCase(),h=n.filter(I=>I.id!==i.id&&(I.title.toLowerCase().includes(l)||I.description?.toLowerCase().includes(l))),{data:b}=Be(h.map(At));let w;t[1]!==r||t[2]!==d||t[3]!==e?(w=async()=>{if(!d)return;const{id:I,title:ve}=d;T(null);try{await r.delete.mutateAsync(I),K("agent_deleted",{agent_id:I,source:"agents_list"}),le.success(e("routes.agentsList.deletedAgent",{title:ve}))}catch{}},t[1]=r,t[2]=d,t[3]=e,t[4]=w):w=t[4];const u=w,B=ce,E=ce,R=ce;let S;t[5]!==e?(S=e("routes.agentsList.title"),t[5]=e,t[6]=S):S=t[6];let _;t[7]!==S?(_=o.jsx(ce.Title,{children:S}),t[7]=S,t[8]=_):_=t[8];let N;t[9]!==e?(N=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=N):N=t[10];let P;t[11]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{I.key==="Escape"&&(c(""),I.target.blur())},t[11]=P):P=t[11];let F;t[12]!==f||t[13]!==N?(F=o.jsx(bt,{value:f,onChange:c,placeholder:N,className:"w-full md:w-[375px]",onKeyDown:P}),t[12]=f,t[13]=N,t[14]=F):F=t[14];let s;t[15]!==a||t[16]!==j||t[17]!==O||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{K("agent_create_clicked",{source:"agents_list",method:"scratch"}),j()},onImportGitHub:()=>{K("agent_create_clicked",{source:"agents_list",method:"github"}),y(!0)},onImportDeco:()=>{K("agent_create_clicked",{source:"agents_list",method:"deco"}),D(!0)},isCreating:O,align:"end"})]}),t[15]=a,t[16]=j,t[17]=O,t[18]=e,t[19]=s):s=t[19];let p;t[20]!==F||t[21]!==s?(p=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[F,s]}),t[20]=F,t[21]=s,t[22]=p):p=t[22];let x;t[23]!==p||t[24]!==_?(x=o.jsxs("div",{className:"flex flex-col gap-6",children:[_,p]}),t[23]=p,t[24]=_,t[25]=x):x=t[25];const L=h.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(We,{image:o.jsx($e,{size:48,className:"text-muted-foreground"}),title:e(f?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:f?e("routes.agentsList.noAgentsMatchSearch",{search:f}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!f&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{K("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),j()},onImportGitHub:()=>{K("agent_create_clicked",{source:"agents_list_empty",method:"github"}),y(!0)},onImportDeco:()=>{K("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),D(!0)},isCreating:O,align:"center",showBetaBadge:!0})]})})}),g=h.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:h.map(I=>o.jsx(Dt,{project:I,lastUsedAt:b?.get(I.id)?.last_used_at,onDeleteClick:a?()=>T({id:I.id,title:I.title}):void 0},I.id))})]});let v;t[26]!==x||t[27]!==L||t[28]!==g||t[29]!==R.Body?(v=o.jsxs(R.Body,{children:[x,L,g]}),t[26]=x,t[27]=L,t[28]=g,t[29]=R.Body,t[30]=v):v=t[30];let k;t[31]!==v||t[32]!==E.Content?(k=o.jsx(E.Content,{children:v}),t[31]=v,t[32]=E.Content,t[33]=k):k=t[33];let A;t[34]!==C?(A=o.jsx(Oe,{open:C,onOpenChange:y}),t[34]=C,t[35]=A):A=t[35];let $;t[36]!==m?($=o.jsx(vt,{open:m,onOpenChange:D}),t[36]=m,t[37]=$):$=t[37];const re=!!d;let M;t[38]===Symbol.for("react.memo_cache_sentinel")?(M=I=>!I&&T(null),t[38]=M):M=t[38];let z;t[39]!==e?(z=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=z):z=t[40];let H;t[41]!==z?(H=o.jsx(ut,{children:z}),t[41]=z,t[42]=H):H=t[42];let q;t[43]!==e?(q=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=q):q=t[44];const Z=d?.title;let J;t[45]!==Z?(J=o.jsx("span",{className:"font-medium text-foreground",children:Z}),t[45]=Z,t[46]=J):J=t[46];let Y;t[47]!==q||t[48]!==J?(Y=o.jsxs(pt,{children:[q," ",J,"."]}),t[47]=q,t[48]=J,t[49]=Y):Y=t[49];let Q;t[50]!==H||t[51]!==Y?(Q=o.jsxs(gt,{children:[H,Y]}),t[50]=H,t[51]=Y,t[52]=Q):Q=t[52];let U;t[53]!==e?(U=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=U):U=t[54];let V;t[55]!==U?(V=o.jsx(ft,{children:U}),t[55]=U,t[56]=V):V=t[56];let X;t[57]!==e?(X=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=X):X=t[58];let ee;t[59]!==u||t[60]!==X?(ee=o.jsx(ht,{onClick:u,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:X}),t[59]=u,t[60]=X,t[61]=ee):ee=t[61];let te;t[62]!==V||t[63]!==ee?(te=o.jsxs(xt,{children:[V,ee]}),t[62]=V,t[63]=ee,t[64]=te):te=t[64];let oe;t[65]!==Q||t[66]!==te?(oe=o.jsxs(jt,{children:[Q,te]}),t[65]=Q,t[66]=te,t[67]=oe):oe=t[67];let se;t[68]!==re||t[69]!==oe?(se=o.jsx(Ct,{open:re,onOpenChange:M,children:oe}),t[68]=re,t[69]=oe,t[70]=se):se=t[70];let ae;return t[71]!==B||t[72]!==k||t[73]!==A||t[74]!==$||t[75]!==se?(ae=o.jsxs(B,{children:[k,A,$,se]}),t[71]=B,t[72]=k,t[73]=A,t[74]=$,t[75]=se,t[76]=ae):ae=t[76],ae}function At(t){return t.id}export{is as default};
@@ -1 +0,0 @@
1
- import{c as q,j as t,F as me,a as ye,o as fe,r as D,$ as le,b as te,k as ee,e as ge,t as re,dS as Ne,K as se,G as ve,n as ke,m as ue,B as ce,x as Ce,y as Re}from"./index-CLgyj0Ph.js";import{a as we,b as Se,d as Pe,e as Ie}from"./dialog-B9oegZDu.js";import{C as _e}from"./collection-search-Dpng8LoC.js";import{u as Te}from"./use-debounced-value-MHaS7My_.js";import{b as he,u as Ee}from"./use-connection-DpTbs6D3.js";import{W as Ae,u as ne,S as pe}from"./use-mcp-client-BEwkzQUP.js";import{a as be}from"./authenticate-and-persist-oauth-iGLSyEy7.js";import{b as de}from"./Settings02-jyt4Cg5Z.js";import{n as ze}from"./LinkExternal01-DLruoFNK.js";import{U as Le}from"./agent-icon-CX57MHZN.js";import{u as Ge}from"./use-mcp-tools-gn9osu_Q.js";import{e as Oe}from"./extract-connection-data-BiZHVUW1.js";import{c as Fe}from"./use-navigate-to-agent-DvK4hzMp.js";import{g as Ue,p as xe,f as $e}from"./provision-repo-scoped-github-connection-DWINBxtd.js";function M(k){const e=q.c(4),{size:n,className:l}=k;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:h}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function De(k,e){const n=q.c(12),{org:l}=me();let h;n[0]!==l.id?(h=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=h):h=n[1];const o=h;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==k?(s={name:k},n[6]=k,n[7]=s):s=n[7];const u=e?.enabled??!0;let y;return n[8]!==r||n[9]!==s||n[10]!==u?(y={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:He},n[8]=r,n[9]=s,n[10]=u,n[11]=y):y=n[11],Ge(y)}function He(k){return k.structuredContent?.item??null}const Me="deco/mcp-github";function qe(k){const{org:e}=me(),{data:n}=ye.useSession(),l=he(),h=fe(),[o,a]=D.useState("idle"),[r,s]=D.useState(null),[u,y]=D.useState(null),{data:N,isLoading:w}=De(Me,{enabled:k.enabled}),f=D.useRef(!1);k.enabled&&N&&!w&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!N||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(N,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(h,e.id),y(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),y(null),f.current=!1}return k.enabled&&w&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(k){const e=q.c(27),{open:n,onOpenChange:l,title:h,onImportComplete:o,mode:a}=k,r=a===void 0?"agent":a,s=te();let u;e[0]!==r||e[1]!==s||e[2]!==h?(u=h??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=h,e[3]=u):u=e[3];const y=u,[N,w]=D.useState(null);let f;e[4]!==y?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Se,{children:y})}),e[4]=y,e[5]=f):f=e[5];let d;e[6]!==y||e[7]!==N||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:N?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(de,{size:16})}),t.jsx("img",{src:N.avatarUrl,alt:N.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(M,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:y})]})}),e[6]=y,e[7]=N,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let p;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==N||e[17]!==c?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(D.Suspense,{fallback:m,children:t.jsx(Qe,{open:n,onComplete:c,selectedInstallation:N,onSelectInstallation:w,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=N,e[17]=c,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==n||e[25]!==g?(j=t.jsx(Ie,{open:n,onOpenChange:l,children:g}),e[23]=l,e[24]=n,e[25]=g,e[26]=j):j=e[26],j}function Qe({open:k,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:h,mode:o="agent"}){const a=te(),{org:r}=me(),s=fe(),u=Fe(),[y,N]=D.useState(null),w=Ee({slug:"mcp-github"}),f=Ue(w),d=qe({enabled:k&&f.length===0}),m=f.length===1?f[0]??null:y,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),p=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,v)=>{try{const S=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:v}});if(S.isError)return null;const P=S.content?.find(I=>I.type==="resource")?.resource?.text;if(!P)return null;try{const I=JSON.parse(P);return typeof I=="string"?I:JSON.stringify(I)}catch{return P}}catch{return null}},j=(i,v)=>{Promise.all([g(v,"AGENTS.md"),g(v,"CLAUDE.md")]).then(async([C,S])=>{const R=C??S??null;R&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:R}}}}),le(s,r.id))}).catch(C=>{console.error("GitHub instructions fetch failed:",C)})},x=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(o==="connection"){const{childConnectionId:R}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:P=>c.callTool(P),selfCallTool:P=>p.callTool(P),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:C}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>p.callTool(R)});let S=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:v,connectionId:C},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:C}]}}}),P=R.structuredContent??R,I=P.item?.id;if(!P.item||!I)throw new Error("Failed to create the imported agent");return S=I,{virtualMcpId:I,repo:i,connectionId:C,item:P.item}}catch(R){throw S&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:S}}).catch(()=>{}),await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:C,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:v,connectionId:C,item:S})=>{if(o==="connection"||!i||!S){le(s,r.id),Ne(s,r.id),re.success(a("common.githubRepoPicker.addedRepo",{name:v.name})),e();return}if(s.setQueryData(se.collectionItem(p,r.id,"","VIRTUAL_MCP",i),{item:S}),le(s,r.id),j(i,v),h){h({virtualMcpId:i,repo:v,connectionId:C});return}re.success(a("common.githubRepoPicker.importedRepo",{name:v.name})),e(),localStorage.setItem(ve.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:i=>{re.error(a("common.githubRepoPicker.failedImport",{error:i instanceof Error?i.message:a("common.githubRepoPicker.unknownError")}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ae,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ae,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ae,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>N(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(M,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>N(null)}):null}function Be(k){const e=q.c(126),{connectionId:n,orgId:l,orgSlug:h,onSelect:o,showBackButton:a,onBack:r}=k,s=te();let u;e[0]!==l||e[1]!==h?(u={connectionId:pe,orgId:l,orgSlug:h},e[0]=l,e[1]=h,e[2]=u):u=e[2];const y=ne(u),N=fe(),w=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==y?(d=()=>$e(b=>y.callTool(b),n),e[6]=n,e[7]=y,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ke(m);let p;e[12]!==w||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==h||e[17]!==N?(p=async()=>{const b=await be({connectionId:n,orgId:l,orgSlug:h,persistFallback:A=>w.update.mutateAsync({id:n,data:{connection_token:A}}).then(Ve)});if(b.ran&&!b.ok)throw new Error(b.error??"no token received");const _=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await N.invalidateQueries({queryKey:se.isMCPAuthenticated(_.href,null)}),await N.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=w,e[13]=n,e[14]=c,e[15]=l,e[16]=h,e[17]=N,e[18]=p):p=e[18];let g;e[19]!==s?(g=b=>{re.error(s("common.githubRepoPicker.failedReconnect",{error:b instanceof Error?b.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let b;return e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=b):b=e[24],b}if(c.isError){let b;e[25]!==s?(b=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=b):b=e[26];let _;e[27]!==b?(_=t.jsx("p",{className:"text-sm text-destructive",children:b}),e[27]=b,e[28]=_):_=e[28];let A;e[29]!==s?(A=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=A):A=e[30];let z;e[31]!==A?(z=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:A}),e[31]=A,e[32]=z):z=e[32];let L;e[33]!==x?(L=()=>x.mutate(),e[33]=x,e[34]=L):L=e[34];const H=x.isPending;let G;e[35]!==x.isPending?(G=x.isPending?t.jsx(ee,{size:14,className:"animate-spin"}):t.jsx(M,{className:"size-3.5"}),e[35]=x.isPending,e[36]=G):G=e[36];let O;e[37]!==s?(O=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=O):O=e[38];let F;e[39]!==x.isPending||e[40]!==L||e[41]!==G||e[42]!==O?(F=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:L,disabled:H,children:[G,O]}),e[39]=x.isPending,e[40]=L,e[41]=G,e[42]=O,e[43]=F):F=e[43];let $;return e[44]!==z||e[45]!==F||e[46]!==_?($=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[_,z,F]}),e[44]=z,e[45]=F,e[46]=_,e[47]=$):$=e[47],$}const i=c.data;if(!i)return null;const v=i.appSlug?`https://github.com/apps/${i.appSlug}/installations/new`:"https://github.com/settings/installations";if(i.installations.length===0){let b;e[48]!==r||e[49]!==a||e[50]!==s?(b=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=b):b=e[51];let _;e[52]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-8 text-foreground"})}),e[52]=_):_=e[52];let A;e[53]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=A):A=e[53];let z;e[54]!==s?(z=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=z):z=e[55];let L;e[56]!==z?(L=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[A,z]}),e[56]=z,e[57]=L):L=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let G;e[60]!==H?(G=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=G):G=e[61];let O;e[62]!==s?(O=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=O):O=e[63];let F;e[64]!==O?(F=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:O}),e[64]=O,e[65]=F):F=e[65];let $;e[66]!==s?($=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=$):$=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let Q;e[69]!==v||e[70]!==$?(Q=t.jsx(ce,{asChild:!0,size:"sm",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",children:[$,ie]})}),e[69]=v,e[70]=$,e[71]=Q):Q=e[71];let B;e[72]!==c?(B=()=>{c.refetch()},e[72]=c,e[73]=B):B=e[73];const je=c.isFetching;let V;e[74]!==c.isFetching?(V=c.isFetching&&t.jsx(ee,{size:14,className:"animate-spin"}),e[74]=c.isFetching,e[75]=V):V=e[75];let K;e[76]!==s?(K=s("common.githubRepoPicker.checkAgain"),e[76]=s,e[77]=K):K=e[77];let J;e[78]!==c.isFetching||e[79]!==B||e[80]!==V||e[81]!==K?(J=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:B,disabled:je,children:[V,K]}),e[78]=c.isFetching,e[79]=B,e[80]=V,e[81]=K,e[82]=J):J=e[82];let W;e[83]!==Q||e[84]!==J?(W=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[Q,J]}),e[83]=Q,e[84]=J,e[85]=W):W=e[85];let Y;e[86]!==s?(Y=s("common.githubRepoPicker.repositoryAccessNote"),e[86]=s,e[87]=Y):Y=e[87];let X;e[88]!==Y?(X=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:Y}),e[88]=Y,e[89]=X):X=e[89];let Z;e[90]!==L||e[91]!==G||e[92]!==F||e[93]!==W||e[94]!==X?(Z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[_,L,G,F,W,X]}),e[90]=L,e[91]=G,e[92]=F,e[93]=W,e[94]=X,e[95]=Z):Z=e[95];let oe;return e[96]!==Z||e[97]!==b?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,Z]}),e[96]=Z,e[97]=b,e[98]=oe):oe=e[98],oe}let C;e[99]!==r||e[100]!==a||e[101]!==s?(C=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[99]=r,e[100]=a,e[101]=s,e[102]=C):C=e[102];let S;if(e[103]!==i.installations||e[104]!==o||e[105]!==s){let b;e[107]!==o||e[108]!==s?(b=_=>t.jsxs("button",{type:"button",onClick:()=>o(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},_.installationId),e[107]=o,e[108]=s,e[109]=b):b=e[109],S=i.installations.map(b),e[103]=i.installations,e[104]=o,e[105]=s,e[106]=S}else S=e[106];let R;e[110]!==S?(R=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:S}),e[110]=S,e[111]=R):R=e[111];let P;e[112]!==s?(P=s("common.githubRepoPicker.accountNotListed"),e[112]=s,e[113]=P):P=e[113];let I;e[114]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[114]=s,e[115]=I):I=e[115];let T;e[116]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[116]=I,e[117]=T):T=e[117];let E;e[118]!==v||e[119]!==P||e[120]!==T?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[P," ",T]})}),e[118]=v,e[119]=P,e[120]=T,e[121]=E):E=e[121];let U;return e[122]!==R||e[123]!==E||e[124]!==C?(U=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[C,R,E]}),e[122]=R,e[123]=E,e[124]=C,e[125]=U):U=e[125],U}function Ve(){}function Ke(k){const e=q.c(23),{connectionId:n,orgId:l,orgSlug:h,installation:o,onSelectRepo:a,isSaving:r}=k,s=te(),[u,y]=D.useState(""),N=Te(u,300),w=D.useDeferredValue(N),f=u!==w;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:y,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let p;e[6]!==c?(p=ue("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==n||e[10]!==w||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==h?(j=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:h,installation:o,query:w,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=w,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=h,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(k){const e=q.c(36),{connectionId:n,orgId:l,orgSlug:h,installation:o,query:a,onSelectRepo:r,isSaving:s}=k,u=te();let y;e[0]!==n||e[1]!==l||e[2]!==h?(y={connectionId:n,orgId:l,orgSlug:h},e[0]=n,e[1]=l,e[2]=h,e[3]=y):y=e[3];const N=ne(y),w=o.type==="User"?"user":"org",f=a?`${w}:${o.login} ${a} in:name`:`${w}:${o.login}`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==N||e[10]!==f?(m=async x=>{const{signal:i}=x,C=(await N.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!C)throw new Error("No response from search_repositories");return(JSON.parse(C).items??[]).map(We)},e[9]=N,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:p}=Ce(c);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let v;e[19]!==a||e[20]!==u?(v=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=v):v=e[21];let C;return e[22]!==i||e[23]!==v?(C=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,v]}),e[22]=i,e[23]=v,e[24]=C):C=e[24],C}let g;if(e[25]!==s||e[26]!==r||e[27]!==p||e[28]!==u){let x;e[30]!==s||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(M,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:i.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=s,e[26]=r,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(k){return{name:k.name,fullName:k.full_name,owner:k.full_name.split("/")[0]??"",url:k.html_url,private:k.private,description:k.description,updatedAt:k.updated_at}}function ae(k){const e=q.c(51),{status:n,error:l,retry:h}=k,o=te();if(n==="error"){let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-destructive"})}),e[0]=C):C=e[0];let S;e[1]!==o?(S=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=S):S=e[2];let R;e[3]!==S?(R=t.jsx("p",{className:"text-sm font-medium",children:S}),e[3]=S,e[4]=R):R=e[4];let P;e[5]!==l||e[6]!==o?(P=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=P):P=e[7];let I;e[8]!==P?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:P}),e[8]=P,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let E;e[13]!==o?(E=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=E):E=e[14];let U;e[15]!==h||e[16]!==E?(U=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:E}),e[15]=h,e[16]=E,e[17]=U):U=e[17];let b;return e[18]!==T||e[19]!==U?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[C,T,U]}),e[18]=T,e[19]=U,e[20]=b):b=e[20],b}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ee,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let y;e[26]!==u?(y=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=y):y=e[27];let N;e[28]!==a||e[29]!==o?(N=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=N):N=e[30];let w;e[31]!==N?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[31]=N,e[32]=w):w=e[32];let f;e[33]!==y||e[34]!==w?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[y,w]}),e[33]=y,e[34]=w,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ue("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const p=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ue("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let v;return e[48]!==i||e[49]!==f?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=v):v=e[50],v}export{M as G,dt as a,qe as b,De as u};
@@ -1 +0,0 @@
1
- import{c as C,b as H,j as s,y as il,B as Ns,d as ve,F as re,G as rl,r as B,E as Zt,H as al,x as cl,K as ws,e as is,p as oe,I as Ot,m as G,a as $t,J as dl,v as ml,t as es,M as fl,P as ul,n as pl,R as hl,k as xl,f as gl,u as Cs,O as bl,U as jl}from"./index-CLgyj0Ph.js";import{u as xt,S as ts,a as ss,b as ie,c as ne,d as ee,e as ks,f as vl,g as Ms,h as yl,i as Vt,j as _l,k as Sl,l as Nl}from"./sidebar-DeKVeH2K.js";import{u as Ts}from"./use-mobile-ClQdbPYE.js";import{C as wl,p as Ut,s as Cl,a as kl,n as Ml}from"./self-tool-result-Dmty8b-9.js";import{f as Tl,b as Is,e as Ps,g as Il,h as Pl,a as $l,d as Al}from"./dialog-B9oegZDu.js";import{f as zl}from"./tab-id-7b3wA9i7.js";import{C as Ol,W as $s,g as El,u as Rl,S as Fl,a as Dl}from"./use-mcp-client-BEwkzQUP.js";import{i as As}from"./XCircle-CCKIXuSl.js";import{u as Ll,a as ls}from"./use-organization-settings-3l3-PWZ-.js";import{i as zs}from"./ChevronRight-BK_QoWDW.js";import{i as Gl}from"./X-BRRsujeq.js";import{s as Hl,a as Bl,t as Ul,i as Wl,b as ql,c as Kl,d as Vl,e as Os,A as At,f as rs,g as Yl,h as Xl,j as Ql}from"./agent-icon-CX57MHZN.js";import{S as me}from"./skeleton-YNL4Gfyh.js";import{i as Es}from"./LayoutLeft-Cl0i-UMj.js";import{O as Yt,A as os,u as Jl,a as Zl,b as eo,c as to}from"./use-deco-credits-D_UnpHIS.js";import{T as Et,a as pt}from"./toolbar-BZigRKxC.js";import{P as Rs,a as Fs,b as Ds}from"./popover-DmPP_Wum.js";import{D as so,a as lo,b as oo}from"./drawer-gCdKlKyC.js";import{A as Xt}from"./avatar-JWYe9tuD.js";import{T as Rt,a as Ft,b as Ls,c as Dt}from"./tooltip-Boyng34D.js";import{a as no}from"./Copy01-D0rsTdyc.js";import{n as io,i as ro}from"./Tool02-B1k57A59.js";import{n as ao}from"./LinkExternal01-DLruoFNK.js";import{i as as}from"./LogOut01-Cu8U0s7_.js";import{i as co}from"./Monitor01-CDpPX-EA.js";import{n as mo,a as fo}from"./Sun-BmSr6mcR.js";import{a as Lt}from"./Settings02-jyt4Cg5Z.js";import{i as uo}from"./Shield01-D8NQC667.js";import{a as po}from"./Users03-BJvAVnZb.js";import{u as ho}from"./use-deployment-admin-QHseVn26.js";import"./index-BBJRaxX8.js";import{a as xo}from"./ZapSquare-BnJ2CyTX.js";import{I as Gs}from"./invite-member-dialog-C0XaeElw.js";import{i as go}from"./FilterLines-2nONIGaK.js";import{T as bo,a as jo}from"./toggle-group-CjS_UJ7P.js";import{u as vo,a as Hs,b as yo,T as _o}from"./hooks-Cdi0T6NA.js";import{u as Bs,f as So}from"./shell-layout-CZMSsz_J.js";import{C as No,a as wo,b as Co,c as ko,d as Mo,e as To}from"./command-lV9P9VCb.js";import{u as Us}from"./studio-tools-DIB17zFH.js";import{u as Ws}from"./use-virtual-mcp-BnHBU3_3.js";import{i as qs}from"./Zap-5T12Qisd.js";import{S as Ks,M as Io}from"./shell-controls-BtDc9Y-D.js";import{n as Po}from"./Stars02-BvkKgu1r.js";import{g as $o,u as Ao,S as zo}from"./use-clock-tick-CGEs0Tg3.js";import{a as Oo}from"./format-time-BnbuEtat.js";import{g as Eo}from"./agent-capabilities-cXfbMfjV.js";import{t as Ro}from"./ChevronDown-dQW8AtGI.js";import{S as Vs}from"./use-navigate-to-agent-DvK4hzMp.js";import{C as Fo}from"./chat-context-DOruUose.js";import"./integration-icon-BSizUwtM.js";import"./companions-core-T8xKIDs8.js";import"./extract-connection-data-BiZHVUW1.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./CheckCircle-Ce06Dt0r.js";import"./form-DbQjm3RG.js";import"./label-DFGmypV5.js";import"./input-BwMPytZi.js";import"./Check-CaWO08Ol.js";import"./Eye-CHWgme6t.js";import"./use-debounced-value-MHaS7My_.js";import"./useQueries-DF7muCkz.js";import"./authenticate-and-persist-oauth-iGLSyEy7.js";import"./mcp-oauth-DNSOSAwY.js";import"./auth-Bxvu_2Ac.js";import"./AlertCircle-DkUSF8S9.js";import"./Tool01-B43_tnd4.js";import"./ArrowUp-CwxMxJ_X.js";import"./ArrowUpRight-Fn4hisEQ.js";import"./TrendUp01-DNUroovp.js";import"./ChevronUp-ClNBV1ML.js";import"./DotsVertical-BISxlJ7z.js";import"./CpuChip01-EpnURADx.js";import"./Star01-Dwm5Prxz.js";import"./Palette-C9-u1HL2.js";import"./SwitchHorizontal01-Cocp1NCJ.js";import"./HardDrive--H6xeB9a.js";import"./Key01-DGgsccNk.js";import"./Play-3ZXTDwaq.js";import"./Plus-BJivuRWZ.js";import"./SearchLg-DehWCYuP.js";import"./SearchMd-Dxz9PRr9.js";import"./Stars01-Cr6jH6bn.js";import"./Trash01-Bij2sBQa.js";import"./Upload01-DjH022N7.js";import"./User01-ZmPLIjFd.js";import"./Users01-BVLWlI1e.js";import"./XClose-x59ADxdn.js";import"./alert-dialog-DMgETmzD.js";import"./spinner-cWHEuKxp.js";import"./github-repo-picker-Bu5y6cUR.js";import"./collection-search-Dpng8LoC.js";import"./use-connection-DpTbs6D3.js";import"./use-mcp-tools-gn9osu_Q.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-M--ClGzW.js";import"./use-registry-connections-m_NzqSHw.js";import"./useInfiniteQuery-P1Iqwjod.js";import"./use-infinite-scroll-CfKncOiK.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-soYQdPhw.js";import"./select-DiBMx0I6.js";import"./textarea-BGf8-22U.js";import"./connection-form-helpers-SRVklhqj.js";import"./collection-tabs-BIyQDwrD.js";import"./badge-D7PXFjPU.js";import"./useSuspenseInfiniteQuery-dT7ERMWt.js";import"./use-ai-providers-BrI62wxb.js";import"./use-org-auth-client-DHBscDoc.js";import"./use-organization-roles-CSIbmHE0.js";import"./decopilot-sse-pool-DfiSaS6Z.js";import"./required-auth-layout-D68OOUEY.js";import"./use-org-sso-R6aJskDC.js";import"./index-Bn5LDRj0.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DIQe_rcp.js";const Do="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Lo(){const t=C.c(13),e=H();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("img",{src:Do,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=r):r=t[5];let i;t[6]!==e?(i=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=i):i=t[7];let a;t[8]!==i?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[r,s.jsx("span",{className:"text-base font-medium",children:i})]}),t[8]=i,t[9]=a):a=t[9];let d;return t[10]!==o||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,a]}),t[10]=o,t[11]=a,t[12]=d):d=t[12],d}function Go(){const t=C.c(19),e=H();let l;t[0]!==e?(l=e("routes.commerceOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:Hl,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.commerceOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let r;t[6]!==o?(r={Icon:il,label:o},t[6]=o,t[7]=r):r=t[7];let i;t[8]!==e?(i=e("routes.commerceOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=i):i=t[9];let a;t[10]!==i?(a={Icon:Bl,label:i},t[10]=i,t[11]=a):a=t[11];let d;t[12]!==n||t[13]!==r||t[14]!==a?(d=[n,r,a],t[12]=n,t[13]=r,t[14]=a,t[15]=d):d=t[15];const c=d;let m;t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=m):m=t[16];let f;return t[17]!==c?(f=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:c.map(Ho)})]}),t[17]=c,t[18]=f):f=t[18],f}function Ho(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function Bo(t){const e=C.c(22),{siteHost:l,footer:n,onClose:o,children:r}=t,i=H(),a=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let d;e[0]!==o||e[1]!==i?(d=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":i("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(Gl,{size:18})}),e[0]=o,e[1]=i,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let f;e[5]!==a||e[6]!==l?(f=l&&s.jsxs(s.Fragment,{children:[s.jsx(zs,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=a,e[6]=l,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,f]}),e[8]=f,e[9]=u):u=e[9];let h;e[10]!==n?(h=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=h):h=e[11];let p;e[12]!==r||e[13]!==u||e[14]!==h?(p=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[u,r,h]}),e[12]=r,e[13]=u,e[14]=h,e[15]=p):p=e[15];let b,x;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),x=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=b,e[17]=x):(b=e[16],x=e[17]);let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[b,x,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx(Lo,{}),s.jsx("div",{className:"flex-1"}),s.jsx(Go,{})]})]}),e[18]=g):g=e[18];let j;return e[19]!==d||e[20]!==p?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,p,g]}),e[19]=d,e[20]=p,e[21]=j):j=e[21],j}function Uo(t){const e=C.c(5),{ready:l,pending:n,label:o,onClick:r,children:i}=t,a=n||!l,d=l&&!n?i:null;let c;return e[0]!==o||e[1]!==r||e[2]!==a||e[3]!==d?(c=s.jsxs(Ns,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:r,disabled:a,children:[o,d]}),e[0]=o,e[1]=r,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function Wo(t){const e=C.c(22),{siteUrl:l}=t,n=ve(),{org:o}=re(),r=H();let i;e[0]!==n||e[1]!==o.id||e[2]!==o.slug?(i=()=>{localStorage.setItem(rl.sidebarOpen(),JSON.stringify(!1)),n({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:El(o.id),main:zl($s.COMMERCE_DISCOVERY(o.id),Ol),sidepanel:0}})},e[0]=n,e[1]=o.id,e[2]=o.slug,e[3]=i):i=e[3];const a=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Tl,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==r?(c=r("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=r,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(Is,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==r?(f=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Ns,{type:"button",size:"xl",className:"w-full",onClick:a,children:[r("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(As,{size:18})]})]}),e[9]=a,e[10]=r,e[11]=f):f=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wl,{}),e[12]=u):u=e[12];let h;e[13]!==a||e[14]!==l?(h=s.jsx(B.Suspense,{fallback:u,children:s.jsx(Yo,{siteUrlFromUrl:l,onComplete:a})}),e[13]=a,e[14]=l,e[15]=h):h=e[15];let p;e[16]!==f||e[17]!==h?(p=s.jsx(Zt,{fallback:f,children:h}),e[16]=f,e[17]=h,e[18]=p):p=e[18];let b;return e[19]!==m||e[20]!==p?(b=s.jsx(Ps,{open:!0,children:s.jsxs(Il,{children:[d,s.jsxs(al,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vo,onPointerDownOutside:Ko,onInteractOutside:qo,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,p]})]})}),e[19]=m,e[20]=p,e[21]=b):b=e[21],b}function qo(t){return t.preventDefault()}function Ko(t){return t.preventDefault()}function Vo(t){return t.preventDefault()}function Yo({siteUrlFromUrl:t,onComplete:e}){const l=H(),{org:n}=re(),o=$s.COMMERCE_DISCOVERY(n.id),r=Rl({connectionId:Fl,orgId:n.id,orgSlug:n.slug}),a=cl({queryKey:ws.commerceDiscoveryConnection(n.id,o),queryFn:async()=>{const v=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return Ut(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=Cl(c),[f,u]=B.useState(!0),[h,p]=B.useState(null),b=is({mutationFn:async v=>Ut(await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),x=is({mutationFn:async v=>Ut(await r.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),g=async()=>{p(null),oe("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:n.id});const v=c?Ml(c):null;if(v?.ok)try{let S=await x.mutateAsync(v.value);if(S.triggered||(oe("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:n.id,reason:S.reason??"not_upgraded"}),await b.mutateAsync(v.value),S=await x.mutateAsync(v.value)),!S.triggered){oe("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:n.id,error:S.reason??"not_triggered"}),p(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(S){oe("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:n.id,error:S instanceof Error?S.message:String(S)}),p(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=Ll("demo_mode"),_=f||j;return s.jsx(Bo,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[h?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:h}):null,s.jsx(Uo,{ready:_,pending:x.isPending,label:x.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l(_?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{g()},children:s.jsx(As,{size:18})})]}),children:s.jsx(kl,{org:n,cdConnectionId:o,siteUrl:c,onReadinessChange:u})})}function Xo(t){const e=C.c(11),{onPointerDown:l,onDoubleClick:n}=t,o=H(),{state:r,isMobile:i}=xt();if(i||r==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let f;return e[6]!==n||e[7]!==l||e[8]!==a||e[9]!==d?(f=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:l,onDoubleClick:n,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=n,e[7]=l,e[8]=a,e[9]=d,e[10]=f):f=e[10],f}const ns=240,Qo=400,Jo="sidebar.width";function vt(t){return Math.max(ns,Math.min(Qo,t))}function Zo(){const t=C.c(11),[e,l]=Ot(Jo,en),n=B.useRef(null);let o;t[0]!==l||t[1]!==e?(o=m=>{m.preventDefault();const f=m.clientX,u=vt(e),h=n.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of p)g.style.transition="none";const b=g=>{const j=vt(u+(g.clientX-f));h?.style.setProperty("--sidebar-width",`${j}px`)},x=g=>{const j=vt(u+(g.clientX-f));l(j);for(const _ of p)_.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},t[0]=l,t[1]=e,t[2]=o):o=t[2];const r=o;let i;t[3]!==l?(i=()=>{l(ns)},t[3]=l,t[4]=i):i=t[4];const a=i;let d;t[5]!==e?(d=vt(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:n,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function en(t){return typeof t=="number"?vt(t):ns}function Ys(){return[]}function Xs(t){const e=C.c(3),{children:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=n):n=e[0];let o;return e[1]!==l?(o=s.jsxs(ts,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[n,s.jsx(ss,{children:s.jsx(ie,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=o):o=e[2],o}function Qs(t){const e=C.c(18),{item:l}=t,{isMobile:n,setOpenMobile:o}=xt();let r;e[0]!==n||e[1]!==l||e[2]!==o?(r=()=>{oe("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:n}),l.onClick?.(),n&&o(!1)},e[0]=n,e[1]=l,e[2]=o,e[3]=r):r=e[3];const i=r,a=l.key,d=l.isActive&&"z-10";let c;e[4]!==d?(c=G(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==l.label?(m=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=m):m=e[7];let f;e[8]!==i||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==m?(f=s.jsxs(ne,{onClick:i,isActive:l.isActive,tooltip:l.label,children:[l.icon,m]}),e[8]=i,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l.key||e[15]!==c||e[16]!==f?(u=s.jsx(ee,{className:c,children:f},a),e[14]=l.key,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function tn(t){const e=C.c(12),{section:l}=t;switch(l.type){case"divider":{let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ks,{className:"my-2"}),e[0]=n):n=e[0],n}case"spacer":{let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1"}),e[1]=n):n=e[1],n}case"group":{const n=l.group.label,o=l.group.defaultExpanded;let r;e[2]!==l.group.items?(r=l.group.items.map(ln),e[2]=l.group.items,e[3]=r):r=e[3];let i;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==r?(i=s.jsx(Xs,{label:n,defaultExpanded:o,children:r}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=r,e[7]=i):i=e[7],i}case"items":{let n;e[8]!==l.items?(n=l.items.map(sn),e[8]=l.items,e[9]=n):n=e[9];let o;return e[10]!==n?(o=s.jsx(ts,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ss,{children:s.jsx(ie,{className:"gap-1.5",children:n})})}),e[10]=n,e[11]=o):o=e[11],o}case"custom":return l.content}}function sn(t){return s.jsx(Qs,{item:t},t.key)}function ln(t){return s.jsx(Qs,{item:t},t.key)}function on(t){const e=C.c(17),{sections:l,footer:n,additionalContent:o,header:r,variant:i,contentClassName:a}=t,d=i===void 0?"sidebar":i;let c;e[0]!==r?(c=r&&s.jsx(vl,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:r}),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==a?(m=G("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==l?(f=l.map(nn),e[4]=l,e[5]=f):f=e[5];let u;e[6]!==o?(u=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=u):u=e[7];let h;e[8]!==m||e[9]!==f||e[10]!==u?(h=s.jsxs(Ms,{className:m,children:[f,u]}),e[8]=m,e[9]=f,e[10]=u,e[11]=h):h=e[11];let p;return e[12]!==n||e[13]!==c||e[14]!==h||e[15]!==d?(p=s.jsxs(yl,{variant:d,children:[c,h,n]}),e[12]=n,e[13]=c,e[14]=h,e[15]=d,e[16]=p):p=e[16],p}function nn(t,e){return s.jsx(tn,{section:t},e)}function Js(t){const e=C.c(2);let l;return e[0]!==t?(l=s.jsx(on,{...t}),e[0]=t,e[1]=l):l=e[1],l}Js.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(me,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function cs(t){const e=C.c(18),{item:l,onClose:n}=t,o=l.isActive&&"z-10";let r;e[0]!==o?(r=G(o),e[0]=o,e[1]=r):r=e[1];let i;e[2]!==l||e[3]!==n?(i=()=>{l.onClick?.(),n()},e[2]=l,e[3]=n,e[4]=i):i=e[4];let a;e[5]!==l.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=a):a=e[6];let d;e[7]!==l.label?(d=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=d):d=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==i||e[12]!==a||e[13]!==d?(c=s.jsxs(ne,{onClick:i,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=l.isActive,e[10]=l.label,e[11]=i,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(ee,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function rn(t){const e=C.c(18),{section:l,onClose:n}=t;switch(l.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ks,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=l.group.label,r=l.group.defaultExpanded;let i;if(e[2]!==n||e[3]!==l.group.items){let d;e[5]!==n?(d=c=>s.jsx(cs,{item:c,onClose:n},c.key),e[5]=n,e[6]=d):d=e[6],i=l.group.items.map(d),e[2]=n,e[3]=l.group.items,e[4]=i}else i=e[4];let a;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==i?(a=s.jsx(Xs,{label:o,defaultExpanded:r,children:i}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=i,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==n||e[12]!==l.items){let i;e[14]!==n?(i=a=>s.jsx(cs,{item:a,onClose:n},a.key),e[14]=n,e[15]=i):i=e[15],o=l.items.map(i),e[11]=n,e[12]=l.items,e[13]=o}else o=e[13];let r;return e[16]!==o?(r=s.jsx(ts,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ss,{children:s.jsx(ie,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=r):r=e[17],r}case"custom":return l.content}}function an(t){const e=C.c(27),{sections:l,onClose:n,footer:o,additionalContent:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Yt,{}),e[0]=i):i=e[0];let a;e[1]!==n?(a=s.jsx(os,{onNavigate:n}),e[1]=n,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=H();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Es,{size:16}),e[6]=f):f=e[6];let u;e[7]!==n||e[8]!==m?(u=s.jsx(Et,{onClick:n,"aria-label":m,children:f}),e[7]=n,e[8]=m,e[9]=u):u=e[9];let h;e[10]!==a||e[11]!==u?(h=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[i,a,d,u]}),e[10]=a,e[11]=u,e[12]=h):h=e[12];let p;if(e[13]!==n||e[14]!==l){let j;e[16]!==n?(j=(_,v)=>s.jsx(rn,{section:_,onClose:n},v),e[16]=n,e[17]=j):j=e[17],p=l.map(j),e[13]=n,e[14]=l,e[15]=p}else p=e[15];let b;e[18]!==r?(b=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[18]=r,e[19]=b):b=e[19];let x;e[20]!==b||e[21]!==p?(x=s.jsxs(Ms,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[p,b]}),e[20]=b,e[21]=p,e[22]=x):x=e[22];let g;return e[23]!==o||e[24]!==x||e[25]!==h?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[h,x,o]}),e[23]=o,e[24]=x,e[25]=h,e[26]=g):g=e[26],g}function ht(t){const e=C.c(26),{item:l,onClose:n}=t;let o;e[0]!==l.className?(o=G("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=o):o=e[1];const r=o;if(l.href){const m=l.external?"_blank":void 0,f=l.external?"noopener noreferrer":void 0;let u;e[2]!==l.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=u):u=e[3];let h;e[4]!==l.label?(h=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=h):h=e[5];let p;return e[6]!==r||e[7]!==l.href||e[8]!==n||e[9]!==m||e[10]!==f||e[11]!==u||e[12]!==h?(p=s.jsxs("a",{href:l.href,target:m,rel:f,className:r,onClick:n,children:[u,h]}),e[6]=r,e[7]=l.href,e[8]=n,e[9]=m,e[10]=f,e[11]=u,e[12]=h,e[13]=p):p=e[13],p}let i;e[14]!==l||e[15]!==n?(i=()=>{l.onClick?.(),n()},e[14]=l,e[15]=n,e[16]=i):i=e[16];let a;e[17]!==l.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=a):a=e[18];let d;e[19]!==l.label?(d=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=d):d=e[20];let c;return e[21]!==r||e[22]!==i||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:i,className:r,children:[a,d]}),e[21]=r,e[22]=i,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function cn(){const t=C.c(4),e=H();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let n;return t[2]!==l?(n=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=n):n=t[3],n}function ds(t){const e=C.c(38),{user:l,userImage:n,isImpersonating:o,isMobile:r}=t,i=H(),a=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=G("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=l?.name??"U";let m;e[2]!==c||e[3]!==n?(m=s.jsx(Xt,{url:n,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=n,e[4]=m):m=e[4];let f;e[5]!==i||e[6]!==l?.name?(f=l?.name??i("common.accountPopover.defaultUserName"),e[5]=i,e[6]=l?.name,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=u):u=e[9];let h;e[10]!==o?(h=o&&s.jsx(cn,{}),e[10]=o,e[11]=h):h=e[11];let p;e[12]!==u||e[13]!==h?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[u,h]}),e[12]=u,e[13]=h,e[14]=p):p=e[14];const b=l?.email;let x;e[15]!==b?(x=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=x):x=e[16];let g;e[17]!==x||e[18]!==p?(g=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,x]}),e[17]=x,e[18]=p,e[19]=g):g=e[19];let j;e[20]!==i||e[21]!==l?(j=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{es.success(i("common.accountPopover.userIdCopied"))})},e[20]=i,e[21]=l,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(no,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=s.jsx(Rt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let S;e[26]!==i?(S=i("common.accountPopover.copyUserId"),e[26]=i,e[27]=S):S=e[27];let w;e[28]!==S?(w=s.jsx(Ft,{side:"right",children:s.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=w):w=e[29];let N;e[30]!==v||e[31]!==w?(N=s.jsx(Ls,{delayDuration:300,children:s.jsxs(Dt,{children:[v,w]})}),e[30]=v,e[31]=w,e[32]=N):N=e[32];let y;return e[33]!==g||e[34]!==N||e[35]!==d||e[36]!==m?(y=s.jsxs("div",{className:d,children:[m,g,N]}),e[33]=g,e[34]=N,e[35]=d,e[36]=m,e[37]=y):y=e[37],y}function ms(t){const e=C.c(35),{themeOptions:l,preferences:n,setPreferences:o,isMobile:r}=t,i=H(),a=r?"size-8":"size-7",d=r?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=G("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==n.theme||e[4]!==o||e[5]!==l){let S;e[7]!==a||e[8]!==n.theme||e[9]!==o?(S=w=>{const{value:N,icon:y,label:k}=w;return s.jsx("button",{type:"button","aria-label":k,onClick:()=>o(T=>({...T,theme:N})),className:G(a,"rounded-md flex items-center justify-center transition-colors",n.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:y},N)},e[7]=a,e[8]=n.theme,e[9]=o,e[10]=S):S=e[10],m=l.map(S),e[2]=a,e[3]=n.theme,e[4]=o,e[5]=l,e[6]=m}else m=e[6];let f;e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=f):f=e[12];let u;e[13]!==n.enableSounds||e[14]!==i?(u=n.enableSounds?i("common.accountPopover.disableSounds"):i("common.accountPopover.enableSounds"),e[13]=n.enableSounds,e[14]=i,e[15]=u):u=e[15];let h;e[16]!==o?(h=()=>o(dn),e[16]=o,e[17]=h):h=e[17];const p=n.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==p?(b=G(a,"rounded-md flex items-center justify-center transition-colors",p),e[18]=a,e[19]=p,e[20]=b):b=e[20];let x;e[21]!==n.enableSounds?(x=n.enableSounds?s.jsx(ql,{size:14}):s.jsx(Kl,{size:14}),e[21]=n.enableSounds,e[22]=x):x=e[22];let g;e[23]!==u||e[24]!==h||e[25]!==b||e[26]!==x?(g=s.jsx("button",{type:"button","aria-label":u,onClick:h,className:b,children:x}),e[23]=u,e[24]=h,e[25]=b,e[26]=x,e[27]=g):g=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.150.12"]}),e[28]=j):j=e[28];let _;e[29]!==g?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[g,j]}),e[29]=g,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==f?(v=s.jsxs("div",{className:c,children:[f,_]}),e[31]=_,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function dn(t){return{...t,enableSounds:!t.enableSounds}}function fs(t){const e=C.c(54),{user:l,userImage:n,menuItems:o,signOutItem:r,stopImpersonatingItem:i,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:f,isMobile:u}=t;if(u){let v;e[0]!==a||e[1]!==l||e[2]!==n?(v=s.jsx(ds,{user:l,userImage:n,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=l,e[2]=n,e[3]=v):v=e[3];let S;if(e[4]!==f||e[5]!==o){let A;e[7]!==f?(A=I=>s.jsx(ht,{item:I,onClose:f},I.key),e[7]=f,e[8]=A):A=e[8],S=o.map(A),e[4]=f,e[5]=o,e[6]=S}else S=e[6];let w;e[9]!==f||e[10]!==i?(w=i&&s.jsx(ht,{item:i,onClose:f}),e[9]=f,e[10]=i,e[11]=w):w=e[11];let N;e[12]!==f||e[13]!==r?(N=s.jsx(ht,{item:r,onClose:f}),e[12]=f,e[13]=r,e[14]=N):N=e[14];let y;e[15]!==S||e[16]!==w||e[17]!==N?(y=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,w,N]})}),e[15]=S,e[16]=w,e[17]=N,e[18]=y):y=e[18];let k;e[19]!==c||e[20]!==m||e[21]!==d?(k=s.jsx(ms,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=k):k=e[22];let T;return e[23]!==v||e[24]!==y||e[25]!==k?(T=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,y,k]}),e[23]=v,e[24]=y,e[25]=k,e[26]=T):T=e[26],T}let h;e[27]!==a||e[28]!==l||e[29]!==n?(h=s.jsx(ds,{user:l,userImage:n,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=l,e[29]=n,e[30]=h):h=e[30];let p;if(e[31]!==f||e[32]!==o){let v;e[34]!==f?(v=S=>s.jsx(ht,{item:S,onClose:f},S.key),e[34]=f,e[35]=v):v=e[35],p=o.map(v),e[31]=f,e[32]=o,e[33]=p}else p=e[33];let b;e[36]!==f||e[37]!==i?(b=i&&s.jsx(ht,{item:i,onClose:f}),e[36]=f,e[37]=i,e[38]=b):b=e[38];let x;e[39]!==f||e[40]!==r?(x=s.jsx(ht,{item:r,onClose:f}),e[39]=f,e[40]=r,e[41]=x):x=e[41];let g;e[42]!==p||e[43]!==b||e[44]!==x?(g=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[p,b,x]}),e[42]=p,e[43]=b,e[44]=x,e[45]=g):g=e[45];let j;e[46]!==c||e[47]!==m||e[48]!==d?(j=s.jsx(ms,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=j):j=e[49];let _;return e[50]!==h||e[51]!==g||e[52]!==j?(_=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[h,g,j]})}),e[50]=h,e[51]=g,e[52]=j,e[53]=_):_=e[53],_}function Qt(){const t=C.c(99),e=H(),{data:l}=$t.useSession(),{org:n}=re(),o=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const a=dl(r)?.params.org,[d,c]=ml(),m=Ts(),{isAdmin:f}=ho(),[u,h]=B.useState(!1),p=l?.user,b=p?.image,x=!!l?.session?.impersonatedBy;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!1),t[1]=g):g=t[1];const j=g;let _;t[2]!==e?(_=e("common.accountPopover.preferences"),t[2]=e,t[3]=_):_=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Lt,{size:16}),t[4]=v):v=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let w;t[8]!==_||t[9]!==S?(w={key:"preferences",label:_,icon:v,onClick:S},t[8]=_,t[9]=S,t[10]=w):w=t[10];let N;t[11]!==n||t[12]!==o||t[13]!==e?(N=n?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(io,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:n.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(ao,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:n.slug}})}}]:[],t[11]=n,t[12]=o,t[13]=e,t[14]=N):N=t[14];let y;t[15]!==e?(y=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=y):y=t[16];let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Wl,{size:16}),t[17]=k):k=t[17];let T;t[18]!==y?(T={key:"terms",label:y,icon:k,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=y,t[19]=T):T=t[19];let A;t[20]!==e?(A=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=A):A=t[21];let I;t[22]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(uo,{size:16}),t[22]=I):I=t[22];let O;t[23]!==A?(O={key:"privacy",label:A,icon:I,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=A,t[24]=O):O=t[24];let P;t[25]!==e?(P=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=P):P=t[26];let E;t[27]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(fl,{className:"w-4 h-4"}),t[27]=E):E=t[27];let z;t[28]!==P?(z={key:"github",label:P,icon:E,href:"https://github.com/decocms/studio",external:!0},t[28]=P,t[29]=z):z=t[29];let R;t[30]!==e?(R=e("common.accountPopover.community"),t[30]=e,t[31]=R):R=t[31];let $;t[32]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(po,{size:16}),t[32]=$):$=t[32];let D;t[33]!==R?(D={key:"community",label:R,icon:$,href:"https://decocms.com/discord",external:!0},t[33]=R,t[34]=D):D=t[34];let L;t[35]!==e?(L=e("common.accountPopover.homepage"),t[35]=e,t[36]=L):L=t[36];let F;t[37]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ro,{size:16}),t[37]=F):F=t[37];let q;t[38]!==L?(q={key:"homepage",label:L,icon:F,href:"https://decocms.com",external:!0},t[38]=L,t[39]=q):q=t[39];let Y;t[40]!==f||t[41]!==o||t[42]!==e?(Y=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Ul,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=f,t[41]=o,t[42]=e,t[43]=Y):Y=t[43];let fe;t[44]!==O||t[45]!==z||t[46]!==D||t[47]!==q||t[48]!==Y||t[49]!==w||t[50]!==N||t[51]!==T?(fe=[w,...N,T,O,z,D,q,...Y],t[44]=O,t[45]=z,t[46]=D,t[47]=q,t[48]=Y,t[49]=w,t[50]=N,t[51]=T,t[52]=fe):fe=t[52];const ue=fe;let X;t[53]!==e?(X=e("common.accountPopover.signOut"),t[53]=e,t[54]=X):X=t[54];let be;t[55]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16}),t[55]=be):be=t[55];let ae;t[56]!==X?(ae={key:"logout",label:X,icon:be,onClick:fn},t[56]=X,t[57]=ae):ae=t[57];const gt=ae;let ce;t[58]!==x||t[59]!==e?(ce=x?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(as,{size:16}),onClick:async()=>{const{error:K}=await $t.admin.stopImpersonating();if(K){es.error(K.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=x,t[59]=e,t[60]=ce):ce=t[60];const ye=ce;let _e;t[61]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(mo,{size:14}),t[61]=_e):_e=t[61];let pe;t[62]!==e?(pe=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=pe):pe=t[63];let he;t[64]!==pe?(he={value:"light",icon:_e,label:pe},t[64]=pe,t[65]=he):he=t[65];let V;t[66]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(fo,{size:14}),t[66]=V):V=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let Q;t[69]!==te?(Q={value:"dark",icon:V,label:te},t[69]=te,t[70]=Q):Q=t[70];let de;t[71]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsx(co,{size:14}),t[71]=de):de=t[71];let J;t[72]!==e?(J=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=J):J=t[73];let se;t[74]!==J?(se={value:"system",icon:de,label:J},t[74]=J,t[75]=se):se=t[75];let xe;t[76]!==he||t[77]!==Q||t[78]!==se?(xe=[he,Q,se],t[76]=he,t[77]=Q,t[78]=se,t[79]=xe):xe=t[79];const bt=xe;let je;t[80]!==x||t[81]!==m||t[82]!==ue||t[83]!==d||t[84]!==c||t[85]!==gt||t[86]!==ye||t[87]!==bt||t[88]!==p||t[89]!==b?(je={user:p,userImage:b,menuItems:ue,signOutItem:gt,stopImpersonatingItem:ye,isImpersonating:x,themeOptions:bt,preferences:d,setPreferences:c,close:j,isMobile:m},t[80]=x,t[81]=m,t[82]=ue,t[83]=d,t[84]=c,t[85]=gt,t[86]=ye,t[87]=bt,t[88]=p,t[89]=b,t[90]=je):je=t[90];const ge=je;let jt;return t[91]!==x||t[92]!==m||t[93]!==u||t[94]!==ge||t[95]!==e||t[96]!==p?.name||t[97]!==b?(jt=s.jsx(s.Fragment,{children:m?s.jsxs(so,{open:u,onOpenChange:h,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>h(!0),className:G("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",x&&"border-2 border-dashed border-warning"),children:[s.jsx(Xt,{url:b,fallback:p?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(lo,{className:"h-[80dvh] p-0",children:[s.jsx(oo,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(fs,{...ge})]})]}):s.jsxs(Rs,{open:u,onOpenChange:h,children:[s.jsx(Fs,{asChild:!0,children:s.jsxs(ne,{tooltip:p?.name??e("common.accountPopover.defaultAccountLabel"),className:G("rounded-md",x&&"border-2 border-dashed border-warning"),children:[s.jsx(Xt,{url:b,fallback:p?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ds,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:mn,children:s.jsx(fs,{...ge})})]})}),t[91]=x,t[92]=m,t[93]=u,t[94]=ge,t[95]=e,t[96]=p?.name,t[97]=b,t[98]=jt):jt=t[98],jt}function mn(t){return t.preventDefault()}function fn(){oe("signed_out",{source:"account_popover"}),ul(),$t.signOut()}class un extends B.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function pn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function hn(){const t=C.c(17),e=ve(),{org:l}=re(),{hasDecoKey:n,balanceDollars:o}=Jl();if(!n)return null;let r;t[0]!==o?(r=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=r):r=t[1];let i;t[2]!==o?(i=G(o!=null&&pn(o)),t[2]=o,t[3]=i):i=t[3];let a;t[4]!==e||t[5]!==l.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Vl,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let f;return t[12]!==r||t[13]!==i||t[14]!==a||t[15]!==m?(f=s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs(ne,{tooltip:r,className:i,onClick:a,children:[d,m]})})}),t[12]=r,t[13]=i,t[14]=a,t[15]=m,t[16]=f):f=t[16],f}function us(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(un,{children:s.jsx(B.Suspense,{fallback:null,children:s.jsx(hn,{})})}),t[0]=e):e=t[0],e}function xn(){const t=C.c(14),e=H(),l=ve(),{org:n}=re();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==l||t[3]!==n.slug?(r=()=>l({to:"/$org/settings",params:{org:n.slug}}),t[2]=l,t[3]=n.slug,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{}),t[5]=i):i=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==r||t[12]!==d?(c=s.jsxs(ne,{tooltip:o,onClick:r,children:[i,d]}),t[10]=o,t[11]=r,t[12]=d,t[13]=c):c=t[13],c}function gn(){const t=C.c(9),e=H(),l=ve(),{org:n}=re();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==l||t[3]!==n.slug?(r=()=>l({to:"/$org/settings",params:{org:n.slug}}),t[2]=l,t[3]=n.slug,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{size:15}),t[5]=i):i=t[5];let a;return t[6]!==o||t[7]!==r?(a=s.jsx("button",{type:"button","aria-label":o,onClick:r,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:i}),t[6]=o,t[7]=r,t[8]=a):a=t[8],a}function ps(){const t=C.c(29),e=H(),[l,n]=B.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Os,{}),t[2]=r):r=t[2];let i;t[3]!==e?(i=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=i):i=t[4];let a;t[5]!==i?(a=s.jsx("span",{children:i}),t[5]=i,t[6]=a):a=t[6];let d;t[7]!==o||t[8]!==a?(d=s.jsx(ee,{children:s.jsx(Gs,{trigger:s.jsxs(ne,{tooltip:o,children:[r,a]})})}),t[7]=o,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let m,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=()=>n(!0),f=s.jsx(xo,{}),t[12]=m,t[13]=f):(m=t[12],f=t[13]);let u;t[14]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=u):u=t[15];let h;t[16]!==u?(h=s.jsx("span",{children:u}),t[16]=u,t[17]=h):h=t[17];let p;t[18]!==c||t[19]!==h?(p=s.jsx(ee,{children:s.jsxs(ne,{tooltip:c,onClick:m,children:[f,h]})}),t[18]=c,t[19]=h,t[20]=p):p=t[20];let b;t[21]!==p||t[22]!==d?(b=s.jsxs(ie,{className:"gap-0.5",children:[d,p]}),t[21]=p,t[22]=d,t[23]=b):b=t[23];let x;t[24]!==l?(x=s.jsx(Zl,{open:l,onOpenChange:n,mode:"browse"}),t[24]=l,t[25]=x):x=t[25];let g;return t[26]!==b||t[27]!==x?(g=s.jsxs(s.Fragment,{children:[b,x]}),t[26]=b,t[27]=x,t[28]=g):g=t[28],g}function hs(){const t=C.c(10),e=H();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Os,{}),t[2]=n):n=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let r;t[5]!==o?(r=s.jsx("span",{children:o}),t[5]=o,t[6]=r):r=t[6];let i;return t[7]!==l||t[8]!==r?(i=s.jsx(ie,{className:"gap-0.5",children:s.jsx(ee,{children:s.jsx(Gs,{trigger:s.jsxs(ne,{tooltip:l,children:[n,r]})})})}),t[7]=l,t[8]=r,t[9]=i):i=t[9],i}function bn(){const t=C.c(17),{state:e}=xt(),l=e==="collapsed",n=ls(),o=!n;if(l){let c;t[0]!==o?(c=o&&s.jsx(us,{}),t[0]=o,t[1]=c):c=t[1];let m;t[2]!==n?(m=n?s.jsx(hs,{}):s.jsx(ps,{}),t[2]=n,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ee,{children:s.jsx(xn,{})}),t[4]=f):f=t[4];let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(ie,{children:[f,s.jsx(ee,{children:s.jsx(Qt,{})})]}),t[5]=u):u=t[5];let h;return t[6]!==c||t[7]!==m?(h=s.jsxs(Vt,{className:"px-2 pb-3 gap-1",children:[c,m,u]}),t[6]=c,t[7]=m,t[8]=h):h=t[8],h}let r;t[9]!==o?(r=o&&s.jsx(us,{}),t[9]=o,t[10]=r):r=t[10];let i;t[11]!==n?(i=n?s.jsx(hs,{}):s.jsx(ps,{}),t[11]=n,t[12]=i):i=t[12];let a;t[13]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ie,{className:"gap-0.5",children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Qt,{})}),s.jsx(gn,{})]})})}),t[13]=a):a=t[13];let d;return t[14]!==r||t[15]!==i?(d=s.jsxs(Vt,{className:"px-2 pb-3 gap-0.5",children:[r,i,a]}),t[14]=r,t[15]=i,t[16]=d):d=t[16],d}function jn(){const t=C.c(11),e=H(),l=ve(),{org:n}=re(),{setOpenMobile:o}=xt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ie,{children:s.jsx(ee,{children:s.jsx(Qt,{})})})}),t[0]=r):r=t[0];let i;t[1]!==e?(i=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=i):i=t[2];let a;t[3]!==l||t[4]!==n.slug||t[5]!==o?(a=()=>{l({to:"/$org/settings",params:{org:n.slug}}),o(!1)},t[3]=l,t[4]=n.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Lt,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==i||t[9]!==a?(c=s.jsx(Vt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(Et,{"aria-label":i,onClick:a,children:d})]})}),t[8]=i,t[9]=a,t[10]=c):c=t[10],c}function xs(t){const e=C.c(15),{className:l,wrapperClassName:n,children:o}=t,[r,i]=B.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&i(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;i(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let f;e[2]!==n?(f=G("relative",n),e[2]=n,e[3]=f):f=e[3];let u;e[4]!==o||e[5]!==l?(u=s.jsx("div",{ref:d,onScroll:m,className:l,children:o}),e[4]=o,e[5]=l,e[6]=u):u=e[6];const h=r?"opacity-100":"opacity-0";let p;e[7]!==h?(p=G("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==p?(b=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=b):b=e[10];let x;return e[11]!==f||e[12]!==u||e[13]!==b?(x=s.jsxs("div",{className:f,children:[u,b]}),e[11]=f,e[12]=u,e[13]=b,e[14]=x):x=e[14],x}function vn(t){const e=C.c(9),{virtualMcpId:l,size:n,showAutomationBadge:o}=t,r=n===void 0?"sm":n,i=H();let a;e[0]!==r||e[1]!==l?(a=l?s.jsx(yn,{virtualMcpId:l,size:r}):s.jsx(At,{icon:null,name:"?",size:r}),e[0]=r,e[1]=l,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==i?(d=o&&s.jsx("span",{"aria-label":i("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(qs,{size:10,className:"text-white"})}),e[3]=o,e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function yn(t){const e=C.c(6),{virtualMcpId:l,size:n}=t,o=Ws(l);if(!o){let a;return e[0]!==n?(a=s.jsx(At,{icon:null,name:"?",size:n}),e[0]=n,e[1]=a):a=e[1],a}const r=o.icon??null;let i;return e[2]!==o.title||e[3]!==n||e[4]!==r?(i=s.jsx(At,{icon:r,name:o.title,size:n}),e[2]=o.title,e[3]=n,e[4]=r,e[5]=i):i=e[5],i}function Wt(t){const e=C.c(51),{open:l,onOpenChange:n}=t,[o,r]=B.useState(""),{org:i}=re(),{setTaskId:a}=Bs(),d=Us(),c=H();let m,f,u;e[0]!==i.id||e[1]!==o?(u=o.trim(),f=pl,m=ws.globalSearch(i.id,u),e[0]=i.id,e[1]=o,e[2]=m,e[3]=f,e[4]=u):(m=e[2],f=e[3],u=e[4]);let h;e[5]!==d||e[6]!==u?(h=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:u?20:10}),e[5]=d,e[6]=u,e[7]=h):h=e[7];let p;e[8]!==l||e[9]!==m||e[10]!==h?(p={queryKey:m,enabled:l,queryFn:h,staleTime:1e4},e[8]=l,e[9]=m,e[10]=h,e[11]=p):p=e[11];const{data:b,isFetching:x}=f(p);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let _;e[14]!==n?(_=$=>{$||r(""),n($)},e[14]=n,e[15]=_):_=e[15];const v=_;let S;e[16]!==v||e[17]!==a?(S=$=>{v(!1),a($.id,$.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=S):S=e[18];const w=S;let N;e[19]!==c?(N=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=N):N=e[20];let y;e[21]!==N?(y=s.jsx(Is,{children:N}),e[21]=N,e[22]=y):y=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let T;e[25]!==k?(T=s.jsx(Pl,{children:k}),e[25]=k,e[26]=T):T=e[26];let A;e[27]!==T||e[28]!==y?(A=s.jsxs($l,{className:"sr-only",children:[y,T]}),e[27]=T,e[28]=y,e[29]=A):A=e[29];let I;e[30]!==c?(I=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=I):I=e[31];let O;e[32]!==o||e[33]!==I?(O=s.jsx(Mo,{value:o,onValueChange:r,placeholder:I}),e[32]=o,e[33]=I,e[34]=O):O=e[34];let P;e[35]!==w||e[36]!==x||e[37]!==j||e[38]!==c||e[39]!==u?(P=s.jsx(No,{children:x&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(wo,{children:c("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Co,{heading:u?void 0:c("tasksPanel.globalSearchDialog.recent"),children:j.map($=>$.type==="thread"?s.jsxs(ko,{value:`thread:${$.id}:${$.title}`,onSelect:()=>w($),className:"gap-2.5",children:[s.jsx(vn,{virtualMcpId:$.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:$.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date($.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${$.id}`):null)})}),e[35]=w,e[36]=x,e[37]=j,e[38]=c,e[39]=u,e[40]=P):P=e[40];let E;e[41]!==O||e[42]!==P?(E=s.jsxs(To,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[O,P]}),e[41]=O,e[42]=P,e[43]=E):E=e[43];let z;e[44]!==A||e[45]!==E?(z=s.jsxs(Al,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[A,E]}),e[44]=A,e[45]=E,e[46]=z):z=e[46];let R;return e[47]!==v||e[48]!==l||e[49]!==z?(R=s.jsx(Ps,{open:l,onOpenChange:v,children:z}),e[47]=v,e[48]=l,e[49]=z,e[50]=R):R=e[50],R}function _n(t){return t==="ephemeral"||t.startsWith("thread:")}function Zs(t){const e=C.c(45),{task:l,isActive:n,onClick:o,onArchive:r,showAutomationBadge:i,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=H(),f=$o(l.status),u=f.icon,h=l.metadata?.kind==="tool_call_run",p=Ws(h?void 0:l.virtual_mcp_id);let b;e[0]!==p?(b=Eo(p),e[0]=p,e[1]=b):b=e[1];const x=b;Ao(6e4);const g=i||!!l.trigger_id,j=l.id,_="button",v=0;let S;e[2]!==o?(S=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),o())},e[2]=o,e[3]=S):S=e[3];const w=c?"-ml-4 pl-6":"pl-[7px]",N=n?"bg-accent text-accent-foreground":"hover:bg-accent/60";let y;e[4]!==w||e[5]!==N?(y=G("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=w,e[5]=N,e[6]=y):y=e[6];let k;e[7]!==h||e[8]!==a||e[9]!==p?.icon||e[10]!==p?.title?(k=a&&!h&&s.jsx(At,{icon:p?.icon??null,name:p?.title??"?",size:"2xs"}),e[7]=h,e[8]=a,e[9]=p?.icon,e[10]=p?.title,e[11]=k):k=e[11];let T;e[12]!==g||e[13]!==m?(T=g&&s.jsx(qs,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=g,e[13]=m,e[14]=T):T=e[14];let A;e[15]!==m||e[16]!==l.title?(A=l.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=l.title,e[17]=A):A=e[17];let I;e[18]!==A?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:A}),e[18]=A,e[19]=I):I=e[19];let O;e[20]!==T||e[21]!==I?(O=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[T,I]}),e[20]=T,e[21]=I,e[22]=O):O=e[22];let P;e[23]!==x||e[24]!==n||e[25]!==l.branch||e[26]!==l.updated_at?(P=l.updated_at&&s.jsxs("div",{className:G("flex items-center gap-1 text-[11px] min-w-0",n?"text-accent-foreground/70":"text-muted-foreground/60"),children:[l.branch&&!_n(l.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:l.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):x?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Oo(new Date(l.updated_at))})]}),e[23]=x,e[24]=n,e[25]=l.branch,e[26]=l.updated_at,e[27]=P):P=e[27];let E;e[28]!==O||e[29]!==P?(E=s.jsxs("div",{className:"flex-1 min-w-0",children:[O,P]}),e[28]=O,e[29]=P,e[30]=E):E=e[30];const z="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!d&&s.jsx("span",{className:G("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:f.label}),children:s.jsx(u,{size:14,className:G(f.iconClassName,l.status==="in_progress"&&"animate-spin")})});let $;e[31]!==r||e[32]!==m?($=r&&s.jsxs(Dt,{children:[s.jsx(Rt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:F=>{F.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(hl,{size:14})})}),s.jsx(Ft,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=r,e[32]=m,e[33]=$):$=e[33];let D;e[34]!==R||e[35]!==$?(D=s.jsxs("div",{className:z,children:[R,$]}),e[34]=R,e[35]=$,e[36]=D):D=e[36];let L;return e[37]!==o||e[38]!==E||e[39]!==D||e[40]!==S||e[41]!==y||e[42]!==k||e[43]!==l.id?(L=s.jsxs("div",{"data-task-id":j,role:_,tabIndex:v,onClick:o,onKeyDown:S,className:y,children:[k,E,D]}),e[37]=o,e[38]=E,e[39]=D,e[40]=S,e[41]=y,e[42]=k,e[43]=l.id,e[44]=L):L=e[44],L}const gs=["requires_action","in_progress","failed","expired","completed"];function Sn(t){const e=new Map(gs.map(l=>[l,[]]));for(const l of t){const n=l.status??"completed";(e.get(n)??e.get("completed")).push(l)}return gs.map(l=>({status:l,threads:e.get(l)}))}const Nn="sidebar.group.expanded.";function wn(t,e){const l=C.c(3),[n,o]=Ot(`${Nn}${t}`,e);let r;return l[0]!==n||l[1]!==o?(r=[n,o],l[0]=n,l[1]=o,l[2]=r):r=l[2],r}function el(t){const e=C.c(18),{onClick:l,isFetching:n,indented:o}=t,r=H();let i;e[0]!==r?(i=r("sidebar.showMoreButton.ariaLabel"),e[0]=r,e[1]=i):i=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=G("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==n?(c=n&&s.jsx(xl,{size:14,className:"animate-spin"}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n||e[7]!==r?(m=r(n?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=n,e[7]=r,e[8]=m):m=e[8];let f;e[9]!==m?(f=s.jsx("span",{children:m}),e[9]=m,e[10]=f):f=e[10];let u;return e[11]!==n||e[12]!==l||e[13]!==i||e[14]!==d||e[15]!==c||e[16]!==f?(u=s.jsxs("button",{type:"button","aria-label":i,onClick:l,disabled:n,className:d,children:[c,f]}),e[11]=n,e[12]=l,e[13]=i,e[14]=d,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Cn(t,e,l,n){return[t,e,l,n.type,n.member,n.currentUserId??""].join("|")}function kn(t){return t.member==="mine"&&!t.currentUserId}const tl=4;let Pt=0;const Jt=[];function Mn(){for(;Pt<tl&&Jt.length>0;){const t=Jt.shift();t&&t()}}function sl(t){return new Promise((e,l)=>{const n=()=>{Pt++,t().then(e,l).finally(()=>{Pt--,Mn()})};Pt<tl?n():Jt.push(n)})}const Gt=10;function bs(t,e,l,n,o){const r={hidden:!1};n.member==="mine"&&n.currentUserId&&(r.created_by=n.currentUserId),n.type==="automation"&&(r.has_trigger=!0),n.type==="manual"&&(r.has_trigger=!1);const i={where:r,limit:o,offset:l,orderBy:[{field:["updated_at"],direction:"desc"}]};return i.status=e,i}function Tn(t,e,l,n){let o=0;for(const r of t)ll(r,e,l,n)&&o++;return o}function qt(t,e,l,n){return Tn(t,e,l,n)}function In(t,e){return!!(t>=Gt||t===0&&e)}function js(t,e){return t<e}function Pn(t,e){return e===!1?!1:e===!0?!0:t}function ll(t,e,l,n){return!(t.hidden||(t.status??"completed")!==l||n.member==="mine"&&n.currentUserId&&t.created_by!==n.currentUserId||n.type==="automation"&&!t.trigger_id||n.type==="manual"&&t.trigger_id)}const zt=new Map,It=new Map;function $n(t,e){return e?t>=Gt?!0:null:!1}function vs(t){return zt.get(t)}function An(t,e){zt.set(t,e)}function zn(t,e,l){const n=zt.get(t);if(n!==void 0){l(n);return}let o=It.get(t);o||(o=sl(e).then(r=>(zt.set(t,r),It.delete(t),r)).catch(()=>(It.delete(t),Promise.reject(new Error("group probe failed")))),It.set(t,o)),o.then(l,()=>l(!1))}function ys(t){const e=t,l=Array.isArray(e.items)?e.items:[];return{items:l,hasMore:e.hasMore??l.length===Gt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function On(t,e,l,n,o){let r=0;for(const i of t)e.has(i.id)||ll(i,l,n,o)&&r++;return r}function En(t,e,l,n){const o=C.c(8),{org:r}=re(),i=Cn(r.id,t,e,l);let a;o[0]!==l?(a=kn(l),o[0]=l,o[1]=a):a=o[1];const d=a,[c,m]=B.useState({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==i&&m({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:null,serverHasMore:null});const f=vo(),{threads:u,hasMore:h}=Hs(),p=qt(u,t,e,l),b=In(p,h),x=$n(p,h),g=Us();if(c.identity===i&&c.serverHasMore===null){const N=x??vs(i);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===i&&c.serverHasMore===null&&x===null&&vs(i)===void 0&&c.probeSubscribedIdentity!==i&&(m(N=>N.identity===i?{...N,isProbing:!0,probeSubscribedIdentity:i}:N),zn(i,async()=>{const N=bs(t,e,0,l,1),y=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:k}=ys(y),T=qt(f.threads.get(),t,e,l);return k===void 0?!1:js(T,k)},N=>{m(y=>y.identity!==i?y:{...y,isProbing:!1,serverHasMore:N})}));const _=async function(){if(c.isFetching||c.isProbing||d)return;const y=i;m(k=>k.identity===y?{...k,isFetching:!0}:k);try{const k=qt(u,t,e,l),T=bs(t,e,k,l,Gt),A=await sl(()=>g.call("COLLECTION_THREADS_LIST",T)),{items:I,hasMore:O,totalCount:P}=ys(A),E=new Set(u.map(Rn)),z=On(I,E,t,e,l),R=k;f.mergeThreads(I),m($=>{if($.identity!==y)return $;let D;return P!==void 0?D=js(R+z,P):D=I.length===0||z===0?!1:O,An(y,D),{...$,isFetching:!1,serverHasMore:D}})}catch(k){const T=k,A=T instanceof Error?T.message:String(T);es.error(`Could not load more tasks: ${A}`),m(I=>I.identity===y?{...I,isFetching:!1}:I)}},v=c.isFetching||c.isProbing,S=!d&&!v&&Pn(b,c.serverHasMore);let w;return o[2]!==v||o[3]!==_||o[4]!==S||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(w={hasMore:S,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:_},o[2]=v,o[3]=_,o[4]=S,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=w):w=o[7],w}function Rn(t){return t.id}function Fn(t){const e=C.c(20),{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:f,hasMore:u,serverHasMore:h}=En("status",l,d),[p,b]=B.useState(!1);!p&&n.length===0&&h===!0&&!c&&!m&&(b(!0),queueMicrotask(()=>{f()}));let x;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==i||e[4]!==r||e[5]!==n){let _;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==i||e[11]!==r?(_=v=>s.jsx(Zs,{task:v,isActive:o===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===d.currentUserId?()=>i(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=o,e[8]=a,e[9]=d,e[10]=i,e[11]=r,e[12]=_):_=e[12],x=n.map(_),e[0]=o,e[1]=a,e[2]=d,e[3]=i,e[4]=r,e[5]=n,e[6]=x}else x=e[6];let g;e[13]!==u||e[14]!==c||e[15]!==f?(g=(u||c)&&s.jsx(el,{onClick:()=>{f()},isFetching:c,indented:!0}),e[13]=u,e[14]=c,e[15]=f,e[16]=g):g=e[16];let j;return e[17]!==x||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[x,g]}),e[17]=x,e[18]=g,e[19]=j):j=e[19],j}function Dn(t){const e=C.c(36),{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d}=t,c=zo[l],m=c.icon,[f,u]=wn(`status-${l}`,!1);let h;e[0]!==f||e[1]!==u?(h=function(){u(!f)},e[0]=f,e[1]=u,e[2]=h):h=e[2];const p=h;let b;e[3]!==p?(b=y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p())},e[3]=p,e[4]=b):b=e[4];let x;e[5]!==m||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=x):x=e[7];let g;e[8]!==f?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?s.jsx(Ro,{size:14}):s.jsx(zs,{size:14})}),e[8]=f,e[9]=g):g=e[9];let j;e[10]!==x||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,g]}),e[10]=x,e[11]=g,e[12]=j):j=e[12];let _;e[13]!==c.label?(_=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=_):_=e[14];let v;e[15]!==n.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:n.length})}),e[15]=n.length,e[16]=v):v=e[16];let S;e[17]!==f||e[18]!==p||e[19]!==b||e[20]!==j||e[21]!==_||e[22]!==v?(S=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,onClick:p,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,_,v]}),e[17]=f,e[18]=p,e[19]=b,e[20]=j,e[21]=_,e[22]=v,e[23]=S):S=e[23];let w;e[24]!==o||e[25]!==a||e[26]!==f||e[27]!==d||e[28]!==i||e[29]!==r||e[30]!==l||e[31]!==n?(w=f&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Fn,{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=f,e[27]=d,e[28]=i,e[29]=r,e[30]=l,e[31]=n,e[32]=w):w=e[32];let N;return e[33]!==S||e[34]!==w?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[S,w]}),e[33]=S,e[34]=w,e[35]=N):N=e[35],N}function _s(t){const e=C.c(38),{threads:l,groupBy:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:f}=t;if(l.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Po,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];const g=f?"No chats match your filters":"No chats yet";let j;return e[1]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=j):j=e[2],j}const u=l.length>1||d;if(n==="status"){let x;if(e[3]!==o||e[4]!==u||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==l){let j;e[10]!==o||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==r?(j=_=>s.jsx(Dn,{status:_.status,threads:_.threads,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:u,filters:a},_.status),e[10]=o,e[11]=u,e[12]=a,e[13]=i,e[14]=r,e[15]=j):j=e[15],x=Sn(l).map(j),e[3]=o,e[4]=u,e[5]=a,e[6]=i,e[7]=r,e[8]=l,e[9]=x}else x=e[9];let g;return e[16]!==x?(g=s.jsx(s.Fragment,{children:x}),e[16]=x,e[17]=g):g=e[17],g}let h;if(e[18]!==o||e[19]!==u||e[20]!==a||e[21]!==i||e[22]!==r||e[23]!==l){let x;e[25]!==o||e[26]!==u||e[27]!==a||e[28]!==i||e[29]!==r?(x=g=>s.jsx(Zs,{task:g,isActive:o===g.id,onClick:()=>r(g),onArchive:u&&g.created_by===a.currentUserId?()=>i(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=o,e[26]=u,e[27]=a,e[28]=i,e[29]=r,e[30]=x):x=e[30],h=l.map(x),e[18]=o,e[19]=u,e[20]=a,e[21]=i,e[22]=r,e[23]=l,e[24]=h}else h=e[24];let p;e[31]!==d||e[32]!==c||e[33]!==m?(p=(d||c)&&s.jsx(el,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=p):p=e[34];let b;return e[35]!==h||e[36]!==p?(b=s.jsxs(s.Fragment,{children:[h,p]}),e[35]=h,e[36]=p,e[37]=b):b=e[37],b}function Ln(t,e,l){if(!l)return;const n=t.findIndex(o=>o.id===e);if(n!==-1){for(let o=n+1;o<t.length;o++){const r=t[o];if(r?.created_by===l)return r}for(let o=n-1;o>=0;o--){const r=t[o];if(r?.created_by===l)return r}}}function Ss(t){const e=C.c(17),{label:l,onClick:n,active:o,children:r}=t,[i,a]=B.useState(!1);let d,c,m,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),f=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=f):(d=e[0],c=e[1],m=e[2],f=e[3]);const u=o&&"bg-sidebar-accent text-foreground";let h;e[4]!==u?(h=G("md:size-[34px] rounded-lg",u),e[4]=u,e[5]=h):h=e[5];let p;e[6]!==r||e[7]!==l||e[8]!==n||e[9]!==h?(p=s.jsx(Rt,{asChild:!0,children:s.jsx(Et,{"aria-label":l,onClick:n,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:f,className:h,children:r})}),e[6]=r,e[7]=l,e[8]=n,e[9]=h,e[10]=p):p=e[10];let b;e[11]!==l?(b=s.jsx(Ft,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let x;return e[13]!==i||e[14]!==p||e[15]!==b?(x=s.jsxs(Dt,{open:i,children:[p,b]}),e[13]=i,e[14]=p,e[15]=b,e[16]=x):x=e[16],x}function Kt(t){const e=C.c(13),{label:l,value:n,onChange:o,options:r}=t;let i;e[0]!==l?(i=s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==o?(a=f=>f&&o(f),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==r?(d=r.map(Gn),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==n?(c=s.jsx(jo,{type:"single",size:"sm",value:n,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=n,e[9]=c):c=e[9];let m;return e[10]!==i||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i,c]}),e[10]=i,e[11]=c,e[12]=m):m=e[12],m}function Gn(t){return s.jsxs(bo,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ol(t){const e=C.c(220);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:n}=l,o=H(),{data:r}=$t.useSession(),i=r?.user?.id,{org:a}=re();let d;e[2]!==a.id?(d=Dl(a.id),e[2]=a.id,e[3]=d):d=e[3];const c=d.id,{threads:m,hasMore:f,isFetchingMore:u,fetchNextPage:h}=Hs(),p=m.filter(Wn),{hide:b,setScope:x}=yo(),g=ve(),{setTaskId:j,createNewTask:_}=Bs();let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[4]=v):v=e[4];const S=gl(v);let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},e[5]=w):w=e[5];const N=Cs(w),y=S.taskId??null;let k;e[6]!==y||e[7]!==m||e[8]!==N.virtualmcpid?(k=N.virtualmcpid??m.find(M=>M.id===y)?.virtual_mcp_id??null,e[6]=y,e[7]=m,e[8]=N.virtualmcpid,e[9]=k):k=e[9];const T=k;let A;e[10]!==n?(A=()=>{n?.()},e[10]=n,e[11]=A):A=e[11];const I=A,O=[...p].sort(Un),[P,E]=B.useState("all"),[z,R]=B.useState("flat"),[$,D]=Ot("sidebar-threads-scope-all",!1),[L,F]=B.useState(!1),[q,Y]=B.useState(!1),fe=i??null;let ue;e[12]!==fe||e[13]!==P?(ue={type:P,member:"mine",currentUserId:fe},e[12]=fe,e[13]=P,e[14]=ue):ue=e[14];const X=ue,be={};$||(be.created_by="me"),x(be);let ae;e[15]!==i?(ae=M=>i?M.filter(U=>U.created_by===i):[],e[15]=i,e[16]=ae):ae=e[16];const gt=ae;let ce;e[17]!==P?(ce=M=>P==="automation"?M.filter(Bn):P==="manual"?M.filter(Hn):M,e[17]=P,e[18]=ce):ce=e[18];const ye=ce,_e=gt(O),pe=ye(_e),he=ye(O),V=$?he:pe;let te;e[19]!==y||e[20]!==I||e[21]!==i||e[22]!==b||e[23]!==g||e[24]!==a.slug||e[25]!==j||e[26]!==V?(te=M=>{if(i&&M.created_by&&M.created_by!==i)return;const U=M.id===y;if(b(M.id),So(M.id),!U)return;const W=Ln(V,M.id,i);I(),W?j(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:a.slug}})},e[19]=y,e[20]=I,e[21]=i,e[22]=b,e[23]=g,e[24]=a.slug,e[25]=j,e[26]=V,e[27]=te):te=e[27];const Q=te;let de;e[28]!==I||e[29]!==j?(de=M=>{I(),j(M.id,M.virtual_mcp_id)},e[28]=I,e[29]=j,e[30]=de):de=e[30];const J=de;let se;e[31]!==T||e[32]!==y||e[33]!==m||e[34]!==I||e[35]!==_||e[36]!==c?(se=()=>{const M=T??c,U=m.find(W=>W.id===y)?.branch??null;oe("sidebar_new_thread_clicked",{virtual_mcp_id:M}),I(),_(M,U)},e[31]=T,e[32]=y,e[33]=m,e[34]=I,e[35]=_,e[36]=c,e[37]=se):se=e[37];const xe=se,{state:bt,isMobile:je,toggleSidebar:ge}=xt();if(bt==="collapsed"&&!je){let M;e[38]!==a?(M=s.jsx(to,{org:a,size:"sm"}),e[38]=a,e[39]=M):M=e[39];let U;e[40]!==a.name||e[41]!==M?(U=s.jsx(ne,{tooltip:a.name,children:M}),e[40]=a.name,e[41]=M,e[42]=U):U=e[42];let W;e[43]!==a.slug||e[44]!==U?(W=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(eo,{orgParam:a.slug,side:"right",align:"start",trigger:U})}),e[43]=a.slug,e[44]=U,e[45]=W):W=e[45];let Z;e[46]!==o?(Z=o("sidebar.taskGroupsList.toggleSidebar"),e[46]=o,e[47]=Z):Z=e[47];let le;e[48]!==o?(le=o("sidebar.taskGroupsList.toggleSidebar"),e[48]=o,e[49]=le):le=e[49];let kt;e[50]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(Es,{size:16}),e[50]=kt):kt=e[50];let rt;e[51]!==Z||e[52]!==le||e[53]!==ge?(rt=s.jsx(ee,{children:s.jsx(ne,{"aria-label":Z,tooltip:le,onClick:ge,children:kt})}),e[51]=Z,e[52]=le,e[53]=ge,e[54]=rt):rt=e[54];let at;e[55]!==o?(at=o("sidebar.taskGroupsList.searchChats"),e[55]=o,e[56]=at):at=e[56];let ct;e[57]!==o?(ct=o("sidebar.taskGroupsList.searchChats"),e[57]=o,e[58]=ct):ct=e[58];let dt;e[59]!==Y||e[60]!==F?(dt=()=>{oe("tasks_panel_search_opened"),Y(!0),F(!0)},e[59]=Y,e[60]=F,e[61]=dt):dt=e[61];let Mt;e[62]===Symbol.for("react.memo_cache_sentinel")?(Mt=s.jsx(rs,{size:16}),e[62]=Mt):Mt=e[62];let mt;e[63]!==at||e[64]!==ct||e[65]!==dt?(mt=s.jsx(ee,{children:s.jsx(ne,{"aria-label":at,tooltip:ct,onClick:dt,children:Mt})}),e[63]=at,e[64]=ct,e[65]=dt,e[66]=mt):mt=e[66];let ft;e[67]!==rt||e[68]!==mt?(ft=s.jsxs(ie,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[rt,mt]}),e[67]=rt,e[68]=mt,e[69]=ft):ft=e[69];let ut;e[70]!==q||e[71]!==L||e[72]!==F?(ut=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[70]=q,e[71]=L,e[72]=F,e[73]=ut):ut=e[73];let Tt;return e[74]!==W||e[75]!==ft||e[76]!==ut?(Tt=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[W,ft,ut]}),e[74]=W,e[75]=ft,e[76]=ut,e[77]=Tt):Tt=e[77],Tt}const K=z!=="flat"||P!=="all"||$===!0;let Se;e[78]!==o?(Se=o("sidebar.taskGroupsList.filterChats"),e[78]=o,e[79]=Se):Se=e[79];let yt;e[80]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(go,{size:16}),e[80]=yt):yt=e[80];let Ne;e[81]!==K?(Ne=K&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[81]=K,e[82]=Ne):Ne=e[82];let we;e[83]!==K||e[84]!==Se||e[85]!==Ne?(we=s.jsx(Rt,{asChild:!0,children:s.jsx(Fs,{asChild:!0,children:s.jsxs(Et,{"aria-label":Se,active:K,className:"md:size-[34px] rounded-lg",children:[yt,Ne]})})}),e[83]=K,e[84]=Se,e[85]=Ne,e[86]=we):we=e[86];let Ce;e[87]!==o?(Ce=o("sidebar.taskGroupsList.filterChats"),e[87]=o,e[88]=Ce):Ce=e[88];let ke;e[89]!==Ce?(ke=s.jsx(Ft,{side:"bottom",children:Ce}),e[89]=Ce,e[90]=ke):ke=e[90];let Me;e[91]!==we||e[92]!==ke?(Me=s.jsxs(Dt,{children:[we,ke]}),e[91]=we,e[92]=ke,e[93]=Me):Me=e[93];let Te;e[94]!==o?(Te=o("sidebar.taskGroupsList.filterView"),e[94]=o,e[95]=Te):Te=e[95];let Ie;e[96]!==R?(Ie=M=>{oe("tasks_panel_group_by_changed",{to_value:M}),R(M)},e[96]=R,e[97]=Ie):Ie=e[97];let Pe;e[98]!==o?(Pe=o("sidebar.taskGroupsList.viewList"),e[98]=o,e[99]=Pe):Pe=e[99];let _t;e[100]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Yl,{size:13}),e[100]=_t):_t=e[100];let $e;e[101]!==Pe?($e={value:"flat",label:Pe,icon:_t},e[101]=Pe,e[102]=$e):$e=e[102];let Ae;e[103]!==o?(Ae=o("sidebar.taskGroupsList.viewStatus"),e[103]=o,e[104]=Ae):Ae=e[104];let St;e[105]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(Xl,{size:13}),e[105]=St):St=e[105];let ze;e[106]!==Ae?(ze={value:"status",label:Ae,icon:St},e[106]=Ae,e[107]=ze):ze=e[107];let Oe;e[108]!==$e||e[109]!==ze?(Oe=[$e,ze],e[108]=$e,e[109]=ze,e[110]=Oe):Oe=e[110];let Ee;e[111]!==z||e[112]!==Te||e[113]!==Ie||e[114]!==Oe?(Ee=s.jsx(Kt,{label:Te,value:z,onChange:Ie,options:Oe}),e[111]=z,e[112]=Te,e[113]=Ie,e[114]=Oe,e[115]=Ee):Ee=e[115];let Re;e[116]!==o?(Re=o("sidebar.taskGroupsList.filterType"),e[116]=o,e[117]=Re):Re=e[117];let Fe;e[118]!==E?(Fe=M=>{oe("tasks_panel_filter_changed",{to_value:M}),E(M)},e[118]=E,e[119]=Fe):Fe=e[119];let De;e[120]!==o?(De=o("sidebar.taskGroupsList.typeAll"),e[120]=o,e[121]=De):De=e[121];let Le;e[122]!==De?(Le={value:"all",label:De},e[122]=De,e[123]=Le):Le=e[123];let Ge;e[124]!==o?(Ge=o("sidebar.taskGroupsList.typeChats"),e[124]=o,e[125]=Ge):Ge=e[125];let He;e[126]!==Ge?(He={value:"manual",label:Ge},e[126]=Ge,e[127]=He):He=e[127];let Be;e[128]!==o?(Be=o("sidebar.taskGroupsList.typeAuto"),e[128]=o,e[129]=Be):Be=e[129];let Ue;e[130]!==Be?(Ue={value:"automation",label:Be},e[130]=Be,e[131]=Ue):Ue=e[131];let We;e[132]!==Le||e[133]!==He||e[134]!==Ue?(We=[Le,He,Ue],e[132]=Le,e[133]=He,e[134]=Ue,e[135]=We):We=e[135];let qe;e[136]!==Re||e[137]!==Fe||e[138]!==We||e[139]!==P?(qe=s.jsx(Kt,{label:Re,value:P,onChange:Fe,options:We}),e[136]=Re,e[137]=Fe,e[138]=We,e[139]=P,e[140]=qe):qe=e[140];let Ke;e[141]!==o?(Ke=o("sidebar.taskGroupsList.filterScope"),e[141]=o,e[142]=Ke):Ke=e[142];const Ht=$?"team":"mine";let Ve;e[143]!==D?(Ve=M=>D(M==="team"),e[143]=D,e[144]=Ve):Ve=e[144];let Ye;e[145]!==o?(Ye=o("sidebar.taskGroupsList.scopeMine"),e[145]=o,e[146]=Ye):Ye=e[146];let Xe;e[147]!==Ye?(Xe={value:"mine",label:Ye},e[147]=Ye,e[148]=Xe):Xe=e[148];let Qe;e[149]!==o?(Qe=o("sidebar.taskGroupsList.scopeTeam"),e[149]=o,e[150]=Qe):Qe=e[150];let Je;e[151]!==Qe?(Je={value:"team",label:Qe},e[151]=Qe,e[152]=Je):Je=e[152];let Ze;e[153]!==Xe||e[154]!==Je?(Ze=[Xe,Je],e[153]=Xe,e[154]=Je,e[155]=Ze):Ze=e[155];let et;e[156]!==Ke||e[157]!==Ht||e[158]!==Ve||e[159]!==Ze?(et=s.jsx(Kt,{label:Ke,value:Ht,onChange:Ve,options:Ze}),e[156]=Ke,e[157]=Ht,e[158]=Ve,e[159]=Ze,e[160]=et):et=e[160];let tt;e[161]!==Ee||e[162]!==qe||e[163]!==et?(tt=s.jsxs(Ds,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[Ee,qe,et]}),e[161]=Ee,e[162]=qe,e[163]=et,e[164]=tt):tt=e[164];let Nt;e[165]!==Me||e[166]!==tt?(Nt=s.jsxs(Rs,{children:[Me,tt]}),e[165]=Me,e[166]=tt,e[167]=Nt):Nt=e[167];const Bt=Nt;let wt;e[168]!==Bt||e[169]!==xe||e[170]!==Y||e[171]!==F||e[172]!==o?(wt=M=>s.jsx(Ls,{delayDuration:300,children:s.jsxs("div",{className:G("shrink-0 flex items-center justify-between",M?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!M&&s.jsx(Ks,{className:"md:size-[34px] rounded-lg"}),Bt]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Ss,{label:o("sidebar.taskGroupsList.searchChats"),onClick:()=>{oe("tasks_panel_search_opened"),Y(!0),F(!0)},children:s.jsx(rs,{size:16})}),s.jsx(Ss,{label:o("sidebar.taskGroupsList.newChat"),onClick:()=>{xe()},children:s.jsx(Ql,{size:16})})]})]})}),e[168]=Bt,e[169]=xe,e[170]=Y,e[171]=F,e[172]=o,e[173]=wt):wt=e[173];const st=wt;if(je){let M;e[174]!==st?(M=st(!0),e[174]=st,e[175]=M):M=e[175];let U;e[176]!==h?(U=()=>{h()},e[176]=h,e[177]=U):U=e[177];let W;e[178]!==y||e[179]!==X||e[180]!==K||e[181]!==z||e[182]!==Q||e[183]!==J||e[184]!==f||e[185]!==u||e[186]!==U||e[187]!==V?(W=s.jsx(xs,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(_s,{threads:V,groupBy:z,activeTaskId:y,onSelectTask:J,onArchiveTask:Q,filters:X,hasMore:f,isFetchingMore:u,onLoadMore:U,filtersActive:K})}),e[178]=y,e[179]=X,e[180]=K,e[181]=z,e[182]=Q,e[183]=J,e[184]=f,e[185]=u,e[186]=U,e[187]=V,e[188]=W):W=e[188];let Z;e[189]!==q||e[190]!==L||e[191]!==F?(Z=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[189]=q,e[190]=L,e[191]=F,e[192]=Z):Z=e[192];let le;return e[193]!==M||e[194]!==W||e[195]!==Z?(le=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[M,W,Z]}),e[193]=M,e[194]=W,e[195]=Z,e[196]=le):le=e[196],le}let lt;e[197]!==st?(lt=st(!1),e[197]=st,e[198]=lt):lt=e[198];let ot;e[199]!==h?(ot=()=>{h()},e[199]=h,e[200]=ot):ot=e[200];let nt;e[201]!==y||e[202]!==X||e[203]!==K||e[204]!==z||e[205]!==Q||e[206]!==J||e[207]!==f||e[208]!==u||e[209]!==ot||e[210]!==V?(nt=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(xs,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(_s,{threads:V,groupBy:z,activeTaskId:y,onSelectTask:J,onArchiveTask:Q,filters:X,hasMore:f,isFetchingMore:u,onLoadMore:ot,filtersActive:K})})}),e[201]=y,e[202]=X,e[203]=K,e[204]=z,e[205]=Q,e[206]=J,e[207]=f,e[208]=u,e[209]=ot,e[210]=V,e[211]=nt):nt=e[211];let it;e[212]!==q||e[213]!==L||e[214]!==F?(it=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[212]=q,e[213]=L,e[214]=F,e[215]=it):it=e[215];let Ct;return e[216]!==lt||e[217]!==nt||e[218]!==it?(Ct=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[lt,nt,it]}),e[216]=lt,e[217]=nt,e[218]=it,e[219]=Ct):Ct=e[219],Ct}function Hn(t){return!t.trigger_id}function Bn(t){return!!t.trigger_id}function Un(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Wn(t){return!t.hidden}const qn=5,Kn=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function nl(){const t=C.c(3),{state:e}=xt();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:qn}).map(Xn)}),t[0]=o):o=t[0],o}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(me,{className:"size-6 rounded-md"}),s.jsx(me,{className:"size-6 rounded-md"}),s.jsx(me,{className:"size-6 rounded-md"})]}),s.jsx(me,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let n;return t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:Kn.map(Vn)})]}),t[2]=n):n=t[2],n}function Vn(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(me,{className:"size-5 rounded-full shrink-0"}),s.jsx(me,{className:G("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Yn)})]},e)}function Yn(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(me,{className:"h-3 flex-1 rounded-sm"})},e)}function Xn(t,e){return s.jsx(me,{className:"size-10 rounded-lg mx-auto"},e)}function Qn(){const t=C.c(2);if(ls()){let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{showName:!0}),t[0]=n):n=t[0],n}let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(s.Fragment,{children:[s.jsx(Yt,{}),s.jsx(os,{})]}),t[1]=l):l=t[1],l}function Jn(){const t=C.c(5),e=Ys();let l,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(bn,{}),n=s.jsx(Qn,{}),t[0]=l,t[1]=n):(l=t[0],n=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Zt,{children:s.jsx(B.Suspense,{fallback:s.jsx(nl,{}),children:s.jsx(ol,{})})}),t[2]=o):o=t[2];let r;return t[3]!==e?(r=s.jsx(Vs,{children:s.jsx(Js,{sections:e,footer:l,header:n,additionalContent:o})}),t[3]=e,t[4]=r):r=t[4],r}function Zn(t){const e=C.c(8),{onClose:l}=t,n=Ys();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(jn,{}),e[0]=o):o=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(nl,{}),e[1]=r):r=e[1];let i;e[2]!==l?(i=s.jsx(Zt,{children:s.jsx(B.Suspense,{fallback:r,children:s.jsx(ol,{onNavigate:l})})}),e[2]=l,e[3]=i):i=e[3];let a;return e[4]!==l||e[5]!==n||e[6]!==i?(a=s.jsx(Vs,{children:s.jsx(an,{sections:n,onClose:l,footer:o,additionalContent:i})}),e[4]=l,e[5]=n,e[6]=i,e[7]=a):a=e[7],a}const ei="sidebar.open";function ti(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jl,{}),t[0]=e):e=t[0],e}function pa(){const t=C.c(36),e=Ts(),l=ls();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{connect:o,siteUrl:r}=Cs(n),i=o==="1",[a,d]=Ot(ei,!1),{width:c,wrapperRef:m,onStartResize:f,resetWidth:u}=Zo(),h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ks,{}),t[1]=p):p=t[1];let b;t[2]!==l?(b=!l&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(os,{})}),t[2]=l,t[3]=b):b=t[3];let x,g,j,_;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(pt.TogglesSlot,{}),g=s.jsx(pt.TabsSlot,{className:"shrink-0"}),j=s.jsx(pt.CenterSlot,{}),_=s.jsx(pt.RightSlot,{}),t[4]=x,t[5]=g,t[6]=j,t[7]=_):(x=t[4],g=t[5],j=t[6],_=t[7]);let v;t[8]!==b?(v=s.jsx(pt.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[p,b,x,g,j,_]})}),t[8]=b,t[9]=v):v=t[9];const S=v;let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w={background:"transparent",containerType:"inline-size"},t[10]=w):w=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(_l,{className:"flex flex-col min-h-0",style:w,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(B.Suspense,{fallback:s.jsx(ti,{}),children:s.jsx(bl,{})})})})}),t[11]=N):N=t[11];const y=N,k=h&&S,T=`${c}px`;let A;t[12]!==T?(A={"--sidebar-width":T,"--sidebar-width-icon":"3.125rem"},t[12]=T,t[13]=A):A=t[13];const I=A;let O;t[14]!==e||t[15]!==f||t[16]!==u?(O=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Jn,{}),s.jsx(Xo,{onPointerDown:f,onDoubleClick:u})]}),t[14]=e,t[15]=f,t[16]=u,t[17]=O):O=t[17];let P;t[18]!==I||t[19]!==O||t[20]!==m?(P=s.jsxs(Sl,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:I,children:[O,y]}),t[18]=I,t[19]=O,t[20]=m,t[21]=P):P=t[21];let E;t[22]!==e?(E=e&&s.jsx(Io,{renderSidebar:si}),t[22]=e,t[23]=E):E=t[23];let z;t[24]!==r||t[25]!==i?(z=i&&s.jsx(Wo,{siteUrl:r}),t[24]=r,t[25]=i,t[26]=z):z=t[26];let R;t[27]!==k||t[28]!==P||t[29]!==E||t[30]!==z?(R=s.jsx(Fo,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,P,E,z]})}),t[27]=k,t[28]=P,t[29]=E,t[30]=z,t[31]=R):R=t[31];let $;return t[32]!==d||t[33]!==a||t[34]!==R?($=s.jsx(_o,{children:s.jsx(pt.Provider,{children:s.jsx(Nl,{open:a,onOpenChange:d,children:R})})}),t[32]=d,t[33]=a,t[34]=R,t[35]=$):$=t[35],$}function si(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Zn,{onClose:e})})})}export{pa as default};
@@ -1 +0,0 @@
1
- import{c as S,r as P,a_ as $,f as D,s as U,b as M,a$ as H,j as a,L as q}from"./index-CLgyj0Ph.js";const B="#f6f4ed",F="#ffffff",G=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function J(e,n){const s=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...G],r={id:s,name:e.name,short_name:e.name,start_url:s,scope:s,display:"standalone",display_override:["window-controls-overlay"],background_color:F,theme_color:B,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(r))}`}function z(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const s=document.createElement("link");return s.rel=e,document.head.appendChild(s),s}function K(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const s=document.createElement("meta");return s.name=e,document.head.appendChild(s),s}function Q(e){const n=S.c(5),s=e?.name??"",i=e?.slug??"",r=e?.logo??"";let o,t;n[0]!==r||n[1]!==s||n[2]!==i?(o=()=>{if(!i||!s||typeof document>"u"||typeof window>"u")return;const u=z("manifest"),d=z("apple-touch-icon"),m=K("apple-mobile-web-app-title"),c={manifest:u.getAttribute("href"),appleIcon:d.getAttribute("href"),appleTitle:m.getAttribute("content"),title:document.title};return u.setAttribute("href",J({name:s,slug:i,logo:r||null},window.location.origin)),r&&d.setAttribute("href",r),m.setAttribute("content",s),document.title=s,$(),()=>{c.manifest!==null&&u.setAttribute("href",c.manifest),c.appleIcon!==null&&d.setAttribute("href",c.appleIcon),c.appleTitle!==null&&m.setAttribute("content",c.appleTitle),document.title=c.title,$()}},t=[s,i,r],n[0]=r,n[1]=s,n[2]=i,n[3]=o,n[4]=t):(o=n[3],t=n[4]),P.useLayoutEffect(o,t)}function W(){const e=S.c(50);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:s}=D(n),{data:i}=U();let r;e[1]!==i||e[2]!==s?(r=i?.find(A=>A.slug===s),e[1]=i,e[2]=s,e[3]=r):r=e[3];const o=r,t=M();let u;e[4]!==o?(u=o?{name:o.name,slug:o.slug,logo:o.logo??null}:null,e[4]=o,e[5]=u):u=e[5],Q(u);const{canPrompt:d,installed:m,ios:c,promptInstall:_}=H(),[O,C]=P.useState(null);let v;e[6]!==o?.name||e[7]!==t?(v=o?.name??t("routes.orgInstall.defaultOrgName"),e[6]=o?.name,e[7]=t,e[8]=v):v=e[8];const l=v,R=o?.logo;let w;e[9]!==l||e[10]!==_||e[11]!==t?(w=async()=>{const A=await _();C(A==="accepted"?t("routes.orgInstall.installing",{name:l}):A==="dismissed"?t("routes.orgInstall.installDismissed"):null)},e[9]=l,e[10]=_,e[11]=t,e[12]=w):w=e[12];const E=w,L=R||"/icons/icon-192.png";let f;e[13]!==l||e[14]!==L?(f=a.jsx("img",{src:L,alt:l,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[13]=l,e[14]=L,e[15]=f):f=e[15];let p;e[16]!==l||e[17]!==t?(p=t("routes.orgInstall.addToHomeScreen",{name:l}),e[16]=l,e[17]=t,e[18]=p):p=e[18];let g;e[19]!==p?(g=a.jsx("h1",{className:"text-xl font-semibold text-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let x;e[21]!==l||e[22]!==t?(x=t("routes.orgInstall.installDescription",{name:l}),e[21]=l,e[22]=t,e[23]=x):x=e[23];let h;e[24]!==x?(h=a.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[24]=x,e[25]=h):h=e[25];let b;e[26]!==h||e[27]!==g?(b=a.jsxs("div",{className:"flex flex-col gap-2",children:[g,h]}),e[26]=h,e[27]=g,e[28]=b):b=e[28];let y;e[29]!==d||e[30]!==E||e[31]!==m||e[32]!==c||e[33]!==l||e[34]!==O||e[35]!==t?(y=m?a.jsx("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:t("routes.orgInstall.alreadyInstalled",{name:l})}):c?a.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[a.jsx("p",{className:"font-medium",children:t("routes.orgInstall.installOnIos")}),a.jsx("p",{className:"text-muted-foreground",children:t("routes.orgInstall.iosInstructions")})]}):d?a.jsxs("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("button",{type:"button",onClick:E,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:t("routes.orgInstall.addToHomeScreenButton",{name:l})}),O&&a.jsx("p",{className:"text-sm text-muted-foreground",children:O})]}):a.jsx("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:t("routes.orgInstall.fallbackInstructions",{name:l})}),e[29]=d,e[30]=E,e[31]=m,e[32]=c,e[33]=l,e[34]=O,e[35]=t,e[36]=y):y=e[36];const T=s??"";let I;e[37]!==T?(I={org:T},e[37]=T,e[38]=I):I=e[38];let j;e[39]!==l||e[40]!==t?(j=t("routes.orgInstall.backLink",{name:l}),e[39]=l,e[40]=t,e[41]=j):j=e[41];let N;e[42]!==I||e[43]!==j?(N=a.jsx(q,{to:"/$org",params:I,className:"text-sm text-primary hover:underline",replace:!0,children:j}),e[42]=I,e[43]=j,e[44]=N):N=e[44];let k;return e[45]!==b||e[46]!==y||e[47]!==N||e[48]!==f?(k=a.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:a.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[f,b,y,N]})}),e[45]=b,e[46]=y,e[47]=N,e[48]=f,e[49]=k):k=e[49],k}export{W as default};
@@ -1 +0,0 @@
1
- import{c as L,F as H,j as U}from"./index-CLgyj0Ph.js";import{a as O,g as $,s as E}from"./automation-runs-B7jzZApT.js";import{r as k,u as B}from"./use-mcp-client-BEwkzQUP.js";import{b as V,c as Y}from"./use-mcp-tools-gn9osu_Q.js";import{u as q}from"./index-DD0t6510.js";import{c as G}from"./monaco-editor-nBV34MRL.js";import{g as F,M as K,a as D}from"./index-4jt5IRNL.js";import{a as W,u as z}from"./chat-context-DOruUose.js";import{u as J}from"./shell-layout-CZMSsz_J.js";import{O as Q}from"./tab-id-7b3wA9i7.js";import"./select-DiBMx0I6.js";import"./tooltip-Boyng34D.js";import"./Check-CaWO08Ol.js";import"./ChevronDown-dQW8AtGI.js";import"./ChevronUp-ClNBV1ML.js";import"./useInfiniteQuery-P1Iqwjod.js";import"./use-infinite-scroll-CfKncOiK.js";import"./use-connection-DpTbs6D3.js";import"./use-virtual-mcp-BnHBU3_3.js";import"./card-soYQdPhw.js";import"./sidebar-DeKVeH2K.js";import"./LayoutLeft-Cl0i-UMj.js";import"./use-mobile-ClQdbPYE.js";import"./X-BRRsujeq.js";import"./table-DBYSBeR3.js";import"./empty-state-DI5SVsDm.js";import"./use-members-DTeBeYXQ.js";import"./use-org-auth-client-DHBscDoc.js";import"./use-clock-tick-CGEs0Tg3.js";import"./AlertCircle-DkUSF8S9.js";import"./CheckCircle-Ce06Dt0r.js";import"./DotsVertical-BISxlJ7z.js";import"./agent-icon-CX57MHZN.js";import"./Tool01-B43_tnd4.js";import"./ArrowUp-CwxMxJ_X.js";import"./Settings02-jyt4Cg5Z.js";import"./Tool02-B1k57A59.js";import"./XCircle-CCKIXuSl.js";import"./ArrowUpRight-Fn4hisEQ.js";import"./TrendUp01-DNUroovp.js";import"./ZapSquare-BnJ2CyTX.js";import"./Users03-BJvAVnZb.js";import"./ChevronRight-BK_QoWDW.js";import"./Stars02-BvkKgu1r.js";import"./Copy01-D0rsTdyc.js";import"./CpuChip01-EpnURADx.js";import"./Eye-CHWgme6t.js";import"./FilterLines-2nONIGaK.js";import"./Star01-Dwm5Prxz.js";import"./Palette-C9-u1HL2.js";import"./SwitchHorizontal01-Cocp1NCJ.js";import"./HardDrive--H6xeB9a.js";import"./Key01-DGgsccNk.js";import"./LinkExternal01-DLruoFNK.js";import"./LogOut01-Cu8U0s7_.js";import"./Monitor01-CDpPX-EA.js";import"./Sun-BmSr6mcR.js";import"./Play-3ZXTDwaq.js";import"./Plus-BJivuRWZ.js";import"./SearchLg-DehWCYuP.js";import"./SearchMd-Dxz9PRr9.js";import"./Shield01-D8NQC667.js";import"./Stars01-Cr6jH6bn.js";import"./Trash01-Bij2sBQa.js";import"./Upload01-DjH022N7.js";import"./User01-ZmPLIjFd.js";import"./Users01-BVLWlI1e.js";import"./XClose-x59ADxdn.js";import"./Zap-5T12Qisd.js";import"./use-automations-CwH1KDVN.js";import"./studio-tools-DIB17zFH.js";import"./useSuspenseInfiniteQuery-dT7ERMWt.js";import"./avatar-JWYe9tuD.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BjAla8BE.js";import"./dialog-B9oegZDu.js";import"./hooks-Cdi0T6NA.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DfiSaS6Z.js";import"./calendar-CyE49Lc6.js";import"./integration-icon-BSizUwtM.js";import"./use-navigate-to-agent-DvK4hzMp.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B7P5iILx.js";import"./form-DbQjm3RG.js";import"./label-DFGmypV5.js";import"./input-BwMPytZi.js";import"./spinner-cWHEuKxp.js";import"./auth-Bxvu_2Ac.js";import"./drawer-gCdKlKyC.js";import"./collection-search-Dpng8LoC.js";import"./index-BcxH3g_P.js";import"./get-initials-D-f_fDFw.js";import"./popover-DmPP_Wum.js";import"./dropdown-menu-BYWILVSv.js";import"./github-repo-picker-Bu5y6cUR.js";import"./use-debounced-value-MHaS7My_.js";import"./authenticate-and-persist-oauth-iGLSyEy7.js";import"./mcp-oauth-DNSOSAwY.js";import"./extract-connection-data-BiZHVUW1.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./use-decopilot-events-DIQe_rcp.js";import"./use-tags-BauEp0vd.js";import"./command-lV9P9VCb.js";import"./index-Bn5LDRj0.js";import"./use-organization-settings-3l3-PWZ-.js";import"./companions-core-T8xKIDs8.js";import"./tabs-BrFyu0Ld.js";import"./toggle-group-CjS_UJ7P.js";import"./use-deco-credits-D_UnpHIS.js";import"./alert-dialog-DMgETmzD.js";import"./toolbar-BZigRKxC.js";import"./skeleton-YNL4Gfyh.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-M--ClGzW.js";import"./use-registry-connections-m_NzqSHw.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BGf8-22U.js";import"./connection-form-helpers-SRVklhqj.js";import"./collection-tabs-BIyQDwrD.js";import"./badge-D7PXFjPU.js";import"./use-ai-providers-BrI62wxb.js";import"./select-model-U0NH-03Z.js";import"./checkbox-0q9FnTIX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CJi2U3py.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D4JT9F25.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BWY6g3Hm.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-qaat6Jvn.js";import"./use-debounced-autosave-pWgqt4Hv.js";import"./index-Dsg3QMPc.js";import"./search-input-CVQs7RpL.js";import"./switch-CbcK-jGL.js";import"./use-secrets-CmAxrjv8.js";import"./useQueries-DF7muCkz.js";import"./use-file-configs-C3YngRho.js";import"./automation-list-row-KsI-CvB5.js";import"./required-auth-layout-D68OOUEY.js";import"./use-org-sso-R6aJskDC.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:e,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=W(),{setAppContext:f,clearAppContext:l}=z(),{openSidePanel:g,openTab:s}=J(),i=`${p}:${e.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==e.name||t[4]!==n?(u={client:o,toolName:e.name,toolArguments:n},t[2]=o,t[3]=e.name,t[4]=n,t[5]=u):u=t[5];const{data:r}=Y(u);let h;if(t[6]!==e._meta||t[7]!==e.name){const x=$(e._meta);h=E(e.name,x),t[6]=e._meta,t[7]=e.name,t[8]=h}else h=t[8];const A=h;let d;t[9]!==e.inputSchema?(d=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=d):d=t[10];let R;t[11]!==A||t[12]!==d||t[13]!==e?(R={...e,name:A,inputSchema:d},t[11]=A,t[12]=d,t[13]=e,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==f||t[22]!==i?(N=x=>f(i,x),t[21]=f,t[22]=i,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==i?(T=()=>l(i),t[24]=l,t[25]=i,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==r?(S=U.jsx(K,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:r,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=r,t[37]=S):S=t[37],S}function Ve(M){const t=L.c(24),{connectionId:o,toolName:I,args:e}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=k(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let f;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(f={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=f):f=t[7];const l=B(f);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let i,c,m;t[10]!==I||t[11]!==s.tools?(i=O(decodeURIComponent(I)),m=s.tools.find(r=>r.name===i)??s.tools.find(r=>{const h=$(r._meta);if(!h)return!1;if(E(r.name,h)===i)return!0;const d=E(i,h);return d!==i&&r.name===d}),c=m?._meta?F(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=i,t[13]=c,t[14]=m):(i=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let r;return t[15]!==i?(r=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',i,'" not found or has no UI']})}),t[15]=i,t[16]=r):r=t[16],r}let u;return t[17]!==e||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:e}),t[17]=e,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Ve as AppViewContent};
@@ -1 +0,0 @@
1
- const l={contents:"write",metadata:"read",pull_requests:"write",issues:"write",checks:"read"};function x(e){return e?/permission\s+"?checks"?\s+is not allowed/i.test(e)||/permissions exceed what the github app/i.test(e):!1}function G(e){const{checks:t,...o}=e;return o}async function L(e,t){const o={...t,checks:"read"},r=await e(o);if(r.isError&&x(r.content?.find(i=>i.type==="text")?.text)){const i=G(t);return{result:await e(i),grantedPermissions:i}}return{result:r,grantedPermissions:o}}function P(e){if(!e||typeof e!="object"||Array.isArray(e))return l;const t=e;return Object.values(t).some(o=>typeof o!="string")?l:t}function H(e){if(!(typeof e!="number"||!Number.isFinite(e)||!Number.isInteger(e)||e<=0))return e}function F(e){const t=e.metadata?.repoScope;if(!t||typeof t.installationId!="number"||!Number.isFinite(t.installationId)||!Number.isInteger(t.installationId)||t.installationId<=0||typeof t.owner!="string"||typeof t.repo!="string"||t.owner.length===0||t.repo.length===0)return null;const o=H(t.repositoryId);return{sourceConnectionId:typeof t.sourceConnectionId=="string"?t.sourceConnectionId:void 0,installationId:t.installationId,repositoryId:o,owner:t.owner,repo:t.repo,permissions:P(t.permissions),grantProvider:t.grantProvider==="github-mcp"?"github-mcp":void 0}}function $(e){return(e??[]).filter(t=>F(t)===null)}function D(e){return e.metadata?.orgShared===!0}async function j(e,t){const r=(await e({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:t}})).content?.[0]?.text;if(!r)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(r)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function B(e,t){const o=t.toLowerCase();return e.find(r=>r.login.toLowerCase()===o)}const b="GitHub MCP did not return refreshable repo grant metadata";function c(e){if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null}function A(e){try{const t=new URL(e);return(t.protocol==="http:"||t.protocol==="https:")&&!t.username&&!t.password}catch{return!1}}function v(e){return typeof e=="number"&&Number.isFinite(e)&&Number.isInteger(e)&&e>0?e:void 0}async function J(e){const{orgSlug:t,sourceConnection:o,installationId:r,owner:i,repo:s,githubCallTool:_,selfCallTool:m,orgShared:S}=e,{result:u,grantedPermissions:N}=await L(p=>_({name:"MINT_REPO_TOKEN",arguments:{installationId:r,owner:i,repo:s,permissions:p}}),l),n=u.structuredContent;if(u.isError||!n?.token){const p=u.content?.find(O=>O.type==="text")?.text;throw new Error(p?`Failed to mint a repo-scoped GitHub token: ${p}`:"Failed to mint a repo-scoped GitHub token")}const f=c(n.refreshToken),d=c(n.tokenEndpoint),h=c(n.clientId);if(!f||!d||!h)throw new Error(b);if(!A(d))throw new Error(b);const I=c(n.repository?.owner),w=c(n.repository?.name),g="GitHub MCP returned refresh metadata for a different repository";if(n.repository?.owner!==void 0&&(!I||I.toLowerCase()!==i.toLowerCase()))throw new Error(g);if(n.repository?.name!==void 0&&(!w||w.toLowerCase()!==s.toLowerCase()))throw new Error(g);const k=v(n.repository?.id),E=n.expiresAt?Date.parse(n.expiresAt):NaN,R=Number.isFinite(E)?Math.max(0,Math.floor((E-Date.now())/1e3)):null,T=(typeof n.expiresIn=="number"&&Number.isFinite(n.expiresIn)&&Number.isInteger(n.expiresIn)&&n.expiresIn>0?n.expiresIn:null)??R,y=await m({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${i}/${s}`,description:`Repo-scoped GitHub access for ${i}/${s}`,icon:o.icon,app_name:o.app_name,app_id:o.app_id,connection_type:o.connection_type,connection_url:o.connection_url,metadata:{...S?{orgShared:!0}:{},repoScope:{installationId:r,repositoryId:k,owner:i,repo:s,permissions:N,grantProvider:"github-mcp"}}}}}),C=y.structuredContent??y,a=C.item?.id??C.id;if(!a)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${t}/connections/${a}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:n.token,refreshToken:f,expiresIn:T,scope:n.scope??null,clientId:h,tokenEndpoint:d})})).ok)throw await m({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:a,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:a}}export{B as a,F as b,j as f,$ as g,D as i,J as p};
@@ -1 +0,0 @@
1
- import{c as L,b as A,j as r}from"./index-CLgyj0Ph.js";import{I as O}from"./input-BwMPytZi.js";import{L as F}from"./label-DFGmypV5.js";import{S as R,a as z,b as V,c as D,d as J}from"./select-DiBMx0I6.js";import{T as M}from"./textarea-BGf8-22U.js";import{O as Q,P as Y,Q as $,I as q,T as G,Y as H}from"./index-DD0t6510.js";import{s as I}from"./primitives-CaH5RBnr.js";import{u as U}from"./use-autosave-D4pq6CN0.js";import"./tooltip-Boyng34D.js";import"./Check-CaWO08Ol.js";import"./ChevronDown-dQW8AtGI.js";import"./ChevronUp-ClNBV1ML.js";import"./ArrowUp-CwxMxJ_X.js";import"./chat-context-DOruUose.js";import"./tab-id-7b3wA9i7.js";import"./dialog-B9oegZDu.js";import"./X-BRRsujeq.js";import"./Copy01-D0rsTdyc.js";import"./hooks-Cdi0T6NA.js";import"./use-mcp-client-BEwkzQUP.js";import"./auth-Bxvu_2Ac.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DfiSaS6Z.js";import"./studio-tools-DIB17zFH.js";import"./use-virtual-mcp-BnHBU3_3.js";import"./use-ai-providers-BrI62wxb.js";import"./use-decopilot-events-DIQe_rcp.js";import"./use-organization-settings-3l3-PWZ-.js";import"./automation-runs-B7jzZApT.js";import"./useInfiniteQuery-P1Iqwjod.js";import"./use-infinite-scroll-CfKncOiK.js";import"./use-connection-DpTbs6D3.js";import"./card-soYQdPhw.js";import"./sidebar-DeKVeH2K.js";import"./LayoutLeft-Cl0i-UMj.js";import"./use-mobile-ClQdbPYE.js";import"./table-DBYSBeR3.js";import"./empty-state-DI5SVsDm.js";import"./use-members-DTeBeYXQ.js";import"./use-org-auth-client-DHBscDoc.js";import"./use-clock-tick-CGEs0Tg3.js";import"./AlertCircle-DkUSF8S9.js";import"./CheckCircle-Ce06Dt0r.js";import"./DotsVertical-BISxlJ7z.js";import"./agent-icon-CX57MHZN.js";import"./Tool01-B43_tnd4.js";import"./Settings02-jyt4Cg5Z.js";import"./Tool02-B1k57A59.js";import"./XCircle-CCKIXuSl.js";import"./ArrowUpRight-Fn4hisEQ.js";import"./TrendUp01-DNUroovp.js";import"./ZapSquare-BnJ2CyTX.js";import"./Users03-BJvAVnZb.js";import"./ChevronRight-BK_QoWDW.js";import"./Stars02-BvkKgu1r.js";import"./CpuChip01-EpnURADx.js";import"./Eye-CHWgme6t.js";import"./FilterLines-2nONIGaK.js";import"./Star01-Dwm5Prxz.js";import"./Palette-C9-u1HL2.js";import"./SwitchHorizontal01-Cocp1NCJ.js";import"./HardDrive--H6xeB9a.js";import"./Key01-DGgsccNk.js";import"./LinkExternal01-DLruoFNK.js";import"./LogOut01-Cu8U0s7_.js";import"./Monitor01-CDpPX-EA.js";import"./Sun-BmSr6mcR.js";import"./Play-3ZXTDwaq.js";import"./Plus-BJivuRWZ.js";import"./SearchLg-DehWCYuP.js";import"./SearchMd-Dxz9PRr9.js";import"./Shield01-D8NQC667.js";import"./Stars01-Cr6jH6bn.js";import"./Trash01-Bij2sBQa.js";import"./Upload01-DjH022N7.js";import"./User01-ZmPLIjFd.js";import"./Users01-BVLWlI1e.js";import"./XClose-x59ADxdn.js";import"./Zap-5T12Qisd.js";import"./use-automations-CwH1KDVN.js";import"./useSuspenseInfiniteQuery-dT7ERMWt.js";import"./avatar-JWYe9tuD.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BjAla8BE.js";import"./monaco-editor-nBV34MRL.js";import"./spinner-cWHEuKxp.js";import"./index-4jt5IRNL.js";import"./calendar-CyE49Lc6.js";import"./shell-layout-CZMSsz_J.js";import"./required-auth-layout-D68OOUEY.js";import"./use-org-sso-R6aJskDC.js";import"./integration-icon-BSizUwtM.js";import"./use-navigate-to-agent-DvK4hzMp.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B7P5iILx.js";import"./form-DbQjm3RG.js";import"./drawer-gCdKlKyC.js";import"./collection-search-Dpng8LoC.js";import"./index-BcxH3g_P.js";import"./get-initials-D-f_fDFw.js";import"./popover-DmPP_Wum.js";import"./dropdown-menu-BYWILVSv.js";import"./github-repo-picker-Bu5y6cUR.js";import"./use-debounced-value-MHaS7My_.js";import"./authenticate-and-persist-oauth-iGLSyEy7.js";import"./mcp-oauth-DNSOSAwY.js";import"./use-mcp-tools-gn9osu_Q.js";import"./extract-connection-data-BiZHVUW1.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-DWINBxtd.js";import"./use-tags-BauEp0vd.js";import"./command-lV9P9VCb.js";import"./index-Bn5LDRj0.js";import"./companions-core-T8xKIDs8.js";import"./tabs-BrFyu0Ld.js";import"./toggle-group-CjS_UJ7P.js";import"./use-deco-credits-D_UnpHIS.js";import"./alert-dialog-DMgETmzD.js";import"./toolbar-BZigRKxC.js";import"./skeleton-YNL4Gfyh.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-M--ClGzW.js";import"./use-registry-connections-m_NzqSHw.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-SRVklhqj.js";import"./collection-tabs-BIyQDwrD.js";import"./badge-D7PXFjPU.js";import"./select-model-U0NH-03Z.js";import"./checkbox-0q9FnTIX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CJi2U3py.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D4JT9F25.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BWY6g3Hm.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-qaat6Jvn.js";import"./use-debounced-autosave-pWgqt4Hv.js";import"./index-Dsg3QMPc.js";import"./search-input-CVQs7RpL.js";import"./switch-CbcK-jGL.js";import"./use-secrets-CmAxrjv8.js";import"./useQueries-DF7muCkz.js";import"./use-file-configs-C3YngRho.js";import"./automation-list-row-KsI-CvB5.js";const W={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},X={authors:"sandbox.recordEditor.titleAuthor"};function Dr(C){const t=L.c(40),{orgSlug:K,virtualMcpId:h,branch:w,kind:a,blockKey:g,block:P}=C,i=A(),f=Q(h);let b;t[0]!==w||t[1]!==K||t[2]!==f||t[3]!==h?(b={orgSlug:K,virtualMcpId:h,branch:w,packagePath:f},t[0]=w,t[1]=K,t[2]=f,t[3]=h,t[4]=b):b=t[4];const p=Y(b);let k;t[5]!==P||t[6]!==a?(k=$(P,a),t[5]=P,t[6]=a,t[7]=k):k=t[7];const B=k;let v;t[8]!==g||t[9]!==a||t[10]!==p?(v=l=>{p.mutate({blockKey:g,data:G(g,a,l)})},t[8]=g,t[9]=a,t[10]=p,t[11]=v):v=t[11];const[e,S]=U(B,v);let j;t[12]!==e||t[13]!==S?(j=(l,o)=>S({...e,[l]:o}),t[12]=e,t[13]=S,t[14]=j):j=t[14];const s=j,T=X[a];let n;t[15]!==i||t[16]!==T?(n=i(T),t[15]=i,t[16]=T,t[17]=n):n=t[17];let c;t[18]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let d;t[20]!==p.isError||t[21]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[20]=p.isError,t[21]=p.isPending,t[22]=d):d=t[22];let y;t[23]!==c||t[24]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[23]=c,t[24]=d,t[25]=y):y=t[25];const N=W[a];let x;if(t[26]!==e||t[27]!==s||t[28]!==i||t[29]!==N){let l;t[31]!==e||t[32]!==s||t[33]!==i?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(H,{schema:{type:"string",format:"image-uri",title:i(o.labelKey)},value:e[o.key],onChange:m=>s(o.key,m),path:o.key,label:i(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),r.jsxs(R,{value:I(e[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(z,{id:o.key,className:"h-10 w-full",children:r.jsx(V,{placeholder:i(o.labelKey)})}),r.jsx(D,{children:(o.options??[]).map(m=>r.jsx(J,{value:m.value,children:i(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),o.widget==="textarea"?r.jsx(M,{id:o.key,value:I(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(O,{id:o.key,value:I(e[o.key]),placeholder:o.placeholderKey?i(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[31]=e,t[32]=s,t[33]=i,t[34]=l):l=t[34],x=N.map(l),t[26]=e,t[27]=s,t[28]=i,t[29]=N,t[30]=x}else x=t[30];let u;t[35]!==x?(u=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:x})}),t[35]=x,t[36]=u):u=t[36];let E;return t[37]!==y||t[38]!==u?(E=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[37]=y,t[38]=u,t[39]=E):E=t[39],E}export{Dr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-JmQNDspa.js","assets/index-CLgyj0Ph.js","assets/index-BAZmyVC-.css","assets/Tool02-B1k57A59.js","assets/CheckCircle-Ce06Dt0r.js","assets/Settings02-jyt4Cg5Z.js","assets/use-mcp-client-BEwkzQUP.js","assets/auth-Bxvu_2Ac.js","assets/useInfiniteQuery-P1Iqwjod.js","assets/use-infinite-scroll-CfKncOiK.js","assets/studio-tools-DIB17zFH.js","assets/badge-D7PXFjPU.js","assets/input-BwMPytZi.js","assets/dropdown-menu-BYWILVSv.js","assets/Check-CaWO08Ol.js","assets/ChevronRight-BK_QoWDW.js","assets/DotsVertical-BISxlJ7z.js","assets/table-DBYSBeR3.js","assets/toggle-group-CjS_UJ7P.js","assets/use-view-mode-9NHwOyEs.js","assets/use-mobile-ClQdbPYE.js","assets/FilterLines-2nONIGaK.js","assets/SearchMd-Dxz9PRr9.js","assets/dialog-B9oegZDu.js","assets/X-BRRsujeq.js","assets/AlertCircle-DkUSF8S9.js","assets/Upload01-DjH022N7.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-DMgETmzD.js","assets/card-soYQdPhw.js","assets/Trash01-Bij2sBQa.js","assets/label-DFGmypV5.js","assets/select-DiBMx0I6.js","assets/tooltip-Boyng34D.js","assets/ChevronDown-dQW8AtGI.js","assets/ChevronUp-ClNBV1ML.js","assets/switch-CbcK-jGL.js","assets/textarea-BGf8-22U.js","assets/XCircle-CCKIXuSl.js","assets/checkbox-0q9FnTIX.js","assets/Eye-CHWgme6t.js","assets/LinkExternal01-DLruoFNK.js","assets/use-copy-BjAla8BE.js","assets/Copy01-D0rsTdyc.js","assets/Key01-DGgsccNk.js","assets/Plus-BJivuRWZ.js","assets/mcp-oauth-DNSOSAwY.js","assets/Play-3ZXTDwaq.js"])))=>i.map(i=>d[i]);
2
- import{c as i,j as e,r as s,k as a,aG as o}from"./index-CLgyj0Ph.js";import{R as m}from"./require-capability-APhfyAbM.js";import"./use-capability-BWY6g3Hm.js";import"./access-gate-DtqxGB-6.js";import"./capability-load-error-_6TFDt_Z.js";const n=s.lazy(()=>o(()=>import("./registry-layout-JmQNDspa.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-CLgyj0Ph.js";import{i as J}from"./LayoutLeft-Cl0i-UMj.js";import{u as K}from"./use-mobile-ClQdbPYE.js";import{i as Q}from"./X-BRRsujeq.js";import{b as z,T as B,a as D,c as k}from"./tooltip-Boyng34D.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=I();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,I as u};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-JmQNDspa.js","assets/index-CLgyj0Ph.js","assets/index-BAZmyVC-.css","assets/Tool02-B1k57A59.js","assets/CheckCircle-Ce06Dt0r.js","assets/Settings02-jyt4Cg5Z.js","assets/use-mcp-client-BEwkzQUP.js","assets/auth-Bxvu_2Ac.js","assets/useInfiniteQuery-P1Iqwjod.js","assets/use-infinite-scroll-CfKncOiK.js","assets/studio-tools-DIB17zFH.js","assets/badge-D7PXFjPU.js","assets/input-BwMPytZi.js","assets/dropdown-menu-BYWILVSv.js","assets/Check-CaWO08Ol.js","assets/ChevronRight-BK_QoWDW.js","assets/DotsVertical-BISxlJ7z.js","assets/table-DBYSBeR3.js","assets/toggle-group-CjS_UJ7P.js","assets/use-view-mode-9NHwOyEs.js","assets/use-mobile-ClQdbPYE.js","assets/FilterLines-2nONIGaK.js","assets/SearchMd-Dxz9PRr9.js","assets/dialog-B9oegZDu.js","assets/X-BRRsujeq.js","assets/AlertCircle-DkUSF8S9.js","assets/Upload01-DjH022N7.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-DMgETmzD.js","assets/card-soYQdPhw.js","assets/Trash01-Bij2sBQa.js","assets/label-DFGmypV5.js","assets/select-DiBMx0I6.js","assets/tooltip-Boyng34D.js","assets/ChevronDown-dQW8AtGI.js","assets/ChevronUp-ClNBV1ML.js","assets/switch-CbcK-jGL.js","assets/textarea-BGf8-22U.js","assets/XCircle-CCKIXuSl.js","assets/checkbox-0q9FnTIX.js","assets/Eye-CHWgme6t.js","assets/LinkExternal01-DLruoFNK.js","assets/use-copy-BjAla8BE.js","assets/Copy01-D0rsTdyc.js","assets/Key01-DGgsccNk.js","assets/Plus-BJivuRWZ.js","assets/mcp-oauth-DNSOSAwY.js","assets/Play-3ZXTDwaq.js"])))=>i.map(i=>d[i]);
2
- import{c as m,d as n,f as c,j as t,k as f,r as l,aG as p}from"./index-CLgyj0Ph.js";import{R as u}from"./require-capability-APhfyAbM.js";import"./use-capability-BWY6g3Hm.js";import"./access-gate-DtqxGB-6.js";import"./capability-load-error-_6TFDt_Z.js";const g=l.lazy(()=>p(()=>import("./registry-layout-JmQNDspa.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{c as u,m as T,j as i,r as b,b as p,f as k,af as j,L as N,aI as y,aZ as L}from"./index-CLgyj0Ph.js";function B(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let g;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(g=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=g):g=e[13],g}const S=b.createContext(null);function h(){const t=b.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=b.useState(null),[n,r]=b.useState(null),[c,a]=b.useState(null),[f,g]=b.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:g},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let x;return e[5]!==l||e[6]!==d?(x=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=x):x=e[7],x}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function w(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(){const t=u.c(13),e=p(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let g;return t[10]!==c||t[11]!==f?(g=i.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=g):g=t[12],g}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(b.Suspense,{fallback:i.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:i.jsx(R,{})}),t[0]=e):e=t[0],e}function _(){const t=u.c(12),e=p();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=k(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(N,{to:"/$org",params:o,"aria-label":n,title:r,className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function z(){const t=u.c(2),{setCenterEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function P(t){const e=u.c(3),{children:l}=t,{centerEl:s}=h();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=j.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=h();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=h();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=j.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=h();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=w;m.Logo=E;m.LogoLink=_;m.CenterSlot=z;m.Center=P;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{B as T,m as a};