decocms 3.34.3 → 3.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/dist/client/assets/{AlertCircle-B5QG7wg7.js → AlertCircle-DfCrgvbm.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-Ce95HJs8.js → ArrowUpRight-BZPL9Pks.js} +1 -1
  3. package/dist/client/assets/{Check-CV74Rqqs.js → Check-CQSOJf1l.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BiLWpS6e.js → CheckCircle-oP-mqP5v.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-XKMoQgX6.js → ChevronDown-DaBswAjS.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-rORK5a-Y.js → ChevronLeft-BGAK4Zdv.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-Betyx6_9.js → ChevronRight-Bwn2E0SF.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-CGfhqWp1.js → ChevronUp-BiGhh8Mf.js} +1 -1
  9. package/dist/client/assets/{Container-Byi81M5N.js → Container-C7dE1uq6.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CuchmOf0.js → DotsVertical-Ddm9sNM7.js} +1 -1
  11. package/dist/client/assets/{Eye-RSaOlPZv.js → Eye-CJqEY9Bp.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DuHSJmFt.js → FilterLines-B_l1Wkux.js} +1 -1
  13. package/dist/client/assets/{Globe01-Ds0ZgQYM.js → Globe01-CZ8FVUUU.js} +1 -1
  14. package/dist/client/assets/{HardDrive-C0JdZ_DO.js → HardDrive-CsWNNss4.js} +1 -1
  15. package/dist/client/assets/{Key01-CStdo5WX.js → Key01-CuoD3w0e.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-BdQI12mG.js → LayoutLeft-DkBHny3R.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-D7swM7zC.js → LinkExternal01-j7-s92dF.js} +1 -1
  18. package/dist/client/assets/{Monitor01-CaSeRueL.js → Monitor01-BKcboobL.js} +1 -1
  19. package/dist/client/assets/{Palette-gIYgJ3Wn.js → Palette-DX6Dwn47.js} +1 -1
  20. package/dist/client/assets/{Play-1bLCgUWF.js → Play-DF7j7sPZ.js} +1 -1
  21. package/dist/client/assets/{Plus-wat9tYeJ.js → Plus-DW0XqVol.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-D-1V89vv.js → RefreshCcw01-Csm4yVOO.js} +1 -1
  23. package/dist/client/assets/{SearchMd-BoptgjAM.js → SearchMd-DZ6aIwIg.js} +1 -1
  24. package/dist/client/assets/{Settings02-8XjUg3gM.js → Settings02-D5me1w67.js} +1 -1
  25. package/dist/client/assets/{Shield01-CjOnx-7R.js → Shield01-kWYSVjnp.js} +1 -1
  26. package/dist/client/assets/{Star01-Dsaeuwpa.js → Star01-Co_EFaK6.js} +1 -1
  27. package/dist/client/assets/{Stars01-DDkk5qux.js → Stars01-M9lSQCUv.js} +1 -1
  28. package/dist/client/assets/{Stars02-ChPYLNIJ.js → Stars02-C-4orbjJ.js} +1 -1
  29. package/dist/client/assets/{Sun-BUoG5bs4.js → Sun-D3s8g6wD.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-CkdIfbJ1.js → SwitchHorizontal01-CRsSfTt7.js} +1 -1
  31. package/dist/client/assets/{Tool01-Be5AVc1v.js → Tool01-CmnBi-ns.js} +1 -1
  32. package/dist/client/assets/{Trash01-YuwiLEVo.js → Trash01-DdLe4vdc.js} +1 -1
  33. package/dist/client/assets/{Upload01-aGUy8jUM.js → Upload01-B_SjMibr.js} +1 -1
  34. package/dist/client/assets/{User01-CUMpCZVS.js → User01-DXJ1fbKo.js} +1 -1
  35. package/dist/client/assets/{Users01-BGw9h7dE.js → Users01-j12rIRFD.js} +1 -1
  36. package/dist/client/assets/{Users03-Cf3_qQGc.js → Users03-CIMcoZEN.js} +1 -1
  37. package/dist/client/assets/{X-D1kqmcok.js → X-BNvE6MEM.js} +1 -1
  38. package/dist/client/assets/{XCircle-Ds6l9Vuw.js → XCircle-DxeB44sm.js} +1 -1
  39. package/dist/client/assets/{XClose-CwNjmDWz.js → XClose-SVLNQiVU.js} +1 -1
  40. package/dist/client/assets/{Zap-j2XVmCfk.js → Zap-Bgg4Oev9.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-DMmAEMvR.js → ZapSquare-CBHt5u2b.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-C6xbqN0H.js → ZoomOut-CiW88kaG.js} +1 -1
  43. package/dist/client/assets/{access-gate-DfmEpXgP.js → access-gate-D-y2d9t8.js} +1 -1
  44. package/dist/client/assets/{accordion-B4RSATFh.js → accordion-zpPrX7CV.js} +1 -1
  45. package/dist/client/assets/add-section-modal-DAWzDKwe.js +1 -0
  46. package/dist/client/assets/{agent-capabilities-UHQXEFqt.js → agent-capabilities-CPytCHGh.js} +2 -2
  47. package/dist/client/assets/{agent-icon-BAU0Nn5Q.js → agent-icon-CR2BOYIt.js} +1 -1
  48. package/dist/client/assets/{agent-icons-CMqOumOa.js → agent-icons-DnVG8vkz.js} +2 -2
  49. package/dist/client/assets/agents-list-DwVMk1n-.js +1 -0
  50. package/dist/client/assets/ai-providers-mE8ABjTw.js +1 -0
  51. package/dist/client/assets/{alert-CeTPCPF-.js → alert-B8OrVPLn.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-nDI1xJhR.js → alert-dialog-BN8wMw1R.js} +1 -1
  53. package/dist/client/assets/app-editor-Bbf1K7Id.js +1 -0
  54. package/dist/client/assets/{auth-catchall-BHc3WJmM.js → auth-catchall-DHwYEi7u.js} +1 -1
  55. package/dist/client/assets/auth-ottC0wHr.js +1 -0
  56. package/dist/client/assets/{auth-split-layout-By3wB5zH.js → auth-split-layout-CxpQ1x33.js} +1 -1
  57. package/dist/client/assets/{automation-list-row-C-im7Cyh.js → automation-list-row-BEJwS8Vh.js} +1 -1
  58. package/dist/client/assets/{automation-runs-BYZ99hni.js → automation-runs-DhzB2pEa.js} +1 -1
  59. package/dist/client/assets/automations-D61pNajM.js +1 -0
  60. package/dist/client/assets/{avatar-BZq-o3M_.js → avatar-CdZJe3C8.js} +1 -1
  61. package/dist/client/assets/{badge-DBQKr8ze.js → badge-C7EEpKuN.js} +1 -1
  62. package/dist/client/assets/brand-context-CNpbI5Wl.js +1 -0
  63. package/dist/client/assets/buckets-CdV7wLzR.js +1 -0
  64. package/dist/client/assets/{calendar-D0ZGZM9k.js → calendar-DFbEMX6r.js} +1 -1
  65. package/dist/client/assets/{capability-load-error-BqquNR5_.js → capability-load-error-Cl1kq3iF.js} +1 -1
  66. package/dist/client/assets/{card-_9LUJQRQ.js → card-CDrd0DTi.js} +1 -1
  67. package/dist/client/assets/{chat-context-BGBybCr0.js → chat-context-DG8MYWh9.js} +6 -6
  68. package/dist/client/assets/{checkbox-BoVEsaTu.js → checkbox-BGw-FQHn.js} +1 -1
  69. package/dist/client/assets/{cli-auth-success-BYlIpapz.js → cli-auth-success-DtIVHpOK.js} +1 -1
  70. package/dist/client/assets/collection-detail-FqeWA-st.js +1 -0
  71. package/dist/client/assets/{collection-display-button-C331HXzj.js → collection-display-button-C7zc09ko.js} +1 -1
  72. package/dist/client/assets/{collection-search-D2zd2w_6.js → collection-search-p8x92ubf.js} +1 -1
  73. package/dist/client/assets/{collection-table-wrapper-D_JocMSh.js → collection-table-wrapper-Cnh8Wpna.js} +1 -1
  74. package/dist/client/assets/{collection-tabs-Et7HpQI-.js → collection-tabs-CkYCGOii.js} +1 -1
  75. package/dist/client/assets/{collections-BEkDC2fV.js → collections-DyJP_FmO.js} +1 -1
  76. package/dist/client/assets/{command-DjRT1inC.js → command-BWTUFK3g.js} +1 -1
  77. package/dist/client/assets/{connect-desktop-dialog-C7P5AZy7.js → connect-desktop-dialog-BozHMyNF.js} +1 -1
  78. package/dist/client/assets/{connection-card-C6z8X3mv.js → connection-card-D4ICX_rU.js} +1 -1
  79. package/dist/client/assets/{connection-detail-DWcaSH3b.js → connection-detail-ucWXxoPl.js} +1 -1
  80. package/dist/client/assets/{connection-form-helpers-CJ-3PHD0.js → connection-form-helpers-8awFltv-.js} +1 -1
  81. package/dist/client/assets/{connections-plRLUbCm.js → connections-iQ8Bv6Z6.js} +1 -1
  82. package/dist/client/assets/decopilot-sse-pool-DR3EOQSz.js +1 -0
  83. package/dist/client/assets/{dialog-DilC5A4p.js → dialog-DDaCuEXe.js} +1 -1
  84. package/dist/client/assets/domain-settings-DTybx0PS.js +1 -0
  85. package/dist/client/assets/{drawer-PqoucHj8.js → drawer-iJuY2KNl.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-CCeLALQe.js → dropdown-menu-Bbmpm5z3.js} +1 -1
  87. package/dist/client/assets/dynamic-plugin-layout-fiDb4X6H.js +1 -0
  88. package/dist/client/assets/{empty-state-cuRG9xrS.js → empty-state-Cdm1CYyS.js} +1 -1
  89. package/dist/client/assets/{empty-state-C0m3QPuD.js → empty-state-D-Pxp7j0.js} +1 -1
  90. package/dist/client/assets/{extract-connection-data-zlBEIx4x.js → extract-connection-data-SrWlxhIa.js} +1 -1
  91. package/dist/client/assets/features-Cwh1Qv1Z.js +1 -0
  92. package/dist/client/assets/file-explorer--zdN4Zrz.js +2 -0
  93. package/dist/client/assets/{file-type-icon-CBlaUM9a.js → file-type-icon-B4-le7-M.js} +1 -1
  94. package/dist/client/assets/{files-De7CB1eQ.js → files-DFiPv_6i.js} +1 -1
  95. package/dist/client/assets/{form-DcfAV72q.js → form-3ozPMiDy.js} +1 -1
  96. package/dist/client/assets/general-BBvPcHvJ.js +1 -0
  97. package/dist/client/assets/generate-id-B9GOZfm-.js +1 -0
  98. package/dist/client/assets/{github-repo-picker-CIreZixy.js → github-repo-picker-CLz-6KHT.js} +2 -2
  99. package/dist/client/assets/{header-tab-button-CNFRl9p4.js → header-tab-button-KOmUg_0n.js} +3 -3
  100. package/dist/client/assets/{hover-card-Bizl54yc.js → hover-card-BdET2LVl.js} +1 -1
  101. package/dist/client/assets/{image-field-Btc7vZ_B.js → image-field-jDtV8hKH.js} +1 -1
  102. package/dist/client/assets/{index-CoxAwU4M.js → index-7nVwqMEY.js} +1 -1
  103. package/dist/client/assets/{index-CeH9NvWc.js → index-B1J4YXFH.js} +13 -13
  104. package/dist/client/assets/{index-DOV0yCSN.js → index-B8Zn3P3M.js} +1 -1
  105. package/dist/client/assets/{index-B6U1MHPz.js → index-BRNlnl29.js} +1 -1
  106. package/dist/client/assets/{index-Dr3ZvAAC.js → index-Bg-8akWr.js} +2 -2
  107. package/dist/client/assets/{index-WAvrfxHO.js → index-BnzjjyUc.js} +1 -1
  108. package/dist/client/assets/index-ByDZ7Ijt.js +1 -0
  109. package/dist/client/assets/{index-C_YL5c1Q.js → index-C6TcjGKf.js} +1 -1
  110. package/dist/client/assets/{index-KCjld4_L.js → index-CKiY6q7v.js} +3 -3
  111. package/dist/client/assets/{index-NuAPKwye.js → index-CMT1KgDi.js} +1 -1
  112. package/dist/client/assets/{index-DxLTuX83.js → index-CR2BsklH.js} +34 -34
  113. package/dist/client/assets/{index-DM719JZt.js → index-DB-iXjqO.js} +1 -1
  114. package/dist/client/assets/{index-EffHR3rD.js → index-jguHAjxa.js} +1 -1
  115. package/dist/client/assets/{index-VW961Pbw.js → index-lVjgiIsy.js} +1 -1
  116. package/dist/client/assets/{index-redirect-BoGD6xOD.js → index-redirect-0OmXb9MX.js} +1 -1
  117. package/dist/client/assets/index-sGHofokC.js +1 -0
  118. package/dist/client/assets/{input-3FcnQKag.js → input-BXKnvLhL.js} +1 -1
  119. package/dist/client/assets/{integration-icon-C2c_G7v_.js → integration-icon-Bw8f7ZPI.js} +1 -1
  120. package/dist/client/assets/{label-Cv-qQXYd.js → label-CjPScbhz.js} +1 -1
  121. package/dist/client/assets/{layout-2bgJD0NS.js → layout-Di1CCr2Q.js} +1 -1
  122. package/dist/client/assets/{login-DDLq_BK-.js → login-5GQvHYAE.js} +1 -1
  123. package/dist/client/assets/mcp-oauth-BRWfHEzR.js +1 -0
  124. package/dist/client/assets/{members-BlttLAcq.js → members-QwMU-3Ki.js} +2 -2
  125. package/dist/client/assets/{monaco-editor-BenQSBIk.js → monaco-editor-Cg1EQRnF.js} +1 -1
  126. package/dist/client/assets/{monitoring-stats-row-BcGGFk75.js → monitoring-stats-row-CNaJGhPf.js} +1 -1
  127. package/dist/client/assets/oauth-callback-D9zCuUON.js +1 -0
  128. package/dist/client/assets/{oauth-callback-ai-provider-BF79mlu4.js → oauth-callback-ai-provider-hDwaAL5R.js} +1 -1
  129. package/dist/client/assets/{onboarding-Dd72TDGl.js → onboarding-DlrXj6YO.js} +1 -1
  130. package/dist/client/assets/{org-install-Bv_VZKPn.js → org-install-Bu5JllIi.js} +1 -1
  131. package/dist/client/assets/{org-layout-CTAm8_WK.js → org-layout-BbJy_b93.js} +1 -1
  132. package/dist/client/assets/org-plugin-layout-B9FRU2Is.js +1 -0
  133. package/dist/client/assets/{page-seo-form-B0n1eGFy.js → page-seo-form-_9ZP3QBG.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-E9iDhskP.js +1 -0
  135. package/dist/client/assets/{pair-DU07s2Yy.js → pair-gQKhMMDb.js} +6 -6
  136. package/dist/client/assets/{plugin-empty-state-CVzEQ5Cm.js → plugin-empty-state-BZknPdIb.js} +1 -1
  137. package/dist/client/assets/{plugin-header-B7b_y-0E.js → plugin-header-DkjZWp_i.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-Bwwo9Dmw.js → plugin-layout-BdqEclCD.js} +1 -1
  139. package/dist/client/assets/{popover-DpnBmU5u.js → popover-BTmtXv14.js} +1 -1
  140. package/dist/client/assets/{post-editor-DOuE35_z.js → post-editor-CH5fTOhb.js} +2 -2
  141. package/dist/client/assets/{primitives-DCRAmGAV.js → primitives-CKu1vpZw.js} +1 -1
  142. package/dist/client/assets/profile-Dko06RsO.js +1 -0
  143. package/dist/client/assets/project-app-view-Cd-36Jgd.js +1 -0
  144. package/dist/client/assets/record-editor-DT2U_m_t.js +1 -0
  145. package/dist/client/assets/{registry-layout-BMV-48W2.js → registry-layout-C-Rhe1GR.js} +4 -4
  146. package/dist/client/assets/registry-lt8SPDA4.js +2 -0
  147. package/dist/client/assets/{require-capability-BolUdzxs.js → require-capability-CvIZOTUa.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-Ce12SDHB.js → required-auth-layout-B00155Vc.js} +1 -1
  149. package/dist/client/assets/{reset-password-BUAFUG-w.js → reset-password-NK-zyZWv.js} +1 -1
  150. package/dist/client/assets/{resizable-CDtszfkc.js → resizable-DmhfTA5q.js} +1 -1
  151. package/dist/client/assets/roles-BUjXqBF2.js +1 -0
  152. package/dist/client/assets/save-referenced-block-CNwoR_kv.js +1 -0
  153. package/dist/client/assets/{save-status-CrbNr3Yt.js → save-status-DbsdUBrs.js} +1 -1
  154. package/dist/client/assets/{schema-form-DF5JNe2x.js → schema-form-DzfWzqPW.js} +1 -1
  155. package/dist/client/assets/{scroll-area-DtVZtiV9.js → scroll-area-CLZP3_5w.js} +1 -1
  156. package/dist/client/assets/{search-input-B5QgW7DO.js → search-input-MJliZ4jI.js} +1 -1
  157. package/dist/client/assets/{secrets-vyIYAehl.js → secrets-D4QL_fAR.js} +1 -1
  158. package/dist/client/assets/{sections-editor-ChsSqsQp.js → sections-editor-FDdDi8FD.js} +2 -2
  159. package/dist/client/assets/{select-C0Tyz9qJ.js → select-BFSfYXlX.js} +1 -1
  160. package/dist/client/assets/{select-model-qL2AwJh1.js → select-model-BbRpf076.js} +1 -1
  161. package/dist/client/assets/seo-editor-DwVV4QI0.js +1 -0
  162. package/dist/client/assets/settings-layout-B9A_ZqDS.js +1 -0
  163. package/dist/client/assets/{settings-section-BxOSnd7f.js → settings-section-C-Pwj2mI.js} +1 -1
  164. package/dist/client/assets/{sheet-BZaR5cN8.js → sheet-tO1j8MLX.js} +1 -1
  165. package/dist/client/assets/{shell-controls-B_EeVM1l.js → shell-controls-Bym8A09n.js} +1 -1
  166. package/dist/client/assets/{shell-layout-DSw-nDR6.js → shell-layout-CVwlRsIR.js} +1 -1
  167. package/dist/client/assets/shell-route-loading-I4t8prq1.js +1 -0
  168. package/dist/client/assets/{sidebar-DILd2AwV.js → sidebar-B1ZxuBN_.js} +1 -1
  169. package/dist/client/assets/{skeleton-Dvzf2GQP.js → skeleton-DJEW9jDp.js} +1 -1
  170. package/dist/client/assets/{sortable.esm-DhgyheK_.js → sortable.esm-LeLAN_LP.js} +2 -2
  171. package/dist/client/assets/{spinner-CIUpakvk.js → spinner-CDjEeRHa.js} +1 -1
  172. package/dist/client/assets/{sso-BYueQDf4.js → sso-DCBE9NzY.js} +1 -1
  173. package/dist/client/assets/store-BZj3mNA3.js +1 -0
  174. package/dist/client/assets/store-registry-Bh2zZ5xN.js +2 -0
  175. package/dist/client/assets/{studio-tools-qhNYzbg-.js → studio-tools-BgmLlqq0.js} +1 -1
  176. package/dist/client/assets/{switch-B2R8Oovd.js → switch-fOoBffiM.js} +1 -1
  177. package/dist/client/assets/{tab-id-BEXPtrYn.js → tab-id-DF4EtVz0.js} +1 -1
  178. package/dist/client/assets/{table-BHblf7Co.js → table-B7zPFKH4.js} +1 -1
  179. package/dist/client/assets/{tabs-BEFEoOMo.js → tabs-DwCivvg2.js} +1 -1
  180. package/dist/client/assets/{task-status-17hQtONR.js → task-status-Do0N2yEZ.js} +1 -1
  181. package/dist/client/assets/{textarea-CZOXZ6_T.js → textarea-C0PLb8A1.js} +1 -1
  182. package/dist/client/assets/{toggle-group-DzrJraBm.js → toggle-group-Bn94xmD3.js} +1 -1
  183. package/dist/client/assets/{toolbar-A-Rw_MZF.js → toolbar-D1E6jsA-.js} +1 -1
  184. package/dist/client/assets/tools-list-BXq3S6hl.js +1 -0
  185. package/dist/client/assets/{tooltip-D1D9JHhD.js → tooltip-CLG87qyy.js} +1 -1
  186. package/dist/client/assets/{types-DsYUq_UX.js → types-CBP_wAn8.js} +3 -3
  187. package/dist/client/assets/{use-ai-providers-CIvGzfXg.js → use-ai-providers-B-vDc98I.js} +1 -1
  188. package/dist/client/assets/{use-automations-CP8543px.js → use-automations-BPoyZBdX.js} +1 -1
  189. package/dist/client/assets/{use-capability-DDDjfOOE.js → use-capability-B_PDwTk3.js} +1 -1
  190. package/dist/client/assets/{use-clock-tick-DufrTL6j.js → use-clock-tick-dBvSZsql.js} +1 -1
  191. package/dist/client/assets/use-collections-C_yZKgDo.js +1 -0
  192. package/dist/client/assets/{use-connection-DIX015NP.js → use-connection-BGirJeWX.js} +1 -1
  193. package/dist/client/assets/{use-copy-B_iKACkn.js → use-copy-vy8ApQ-I.js} +1 -1
  194. package/dist/client/assets/{use-create-virtual-mcp-BiFjwqV_.js → use-create-virtual-mcp-BjqcuHoP.js} +1 -1
  195. package/dist/client/assets/{use-debounced-autosave-CsGRGmM0.js → use-debounced-autosave-D3nmvc0o.js} +1 -1
  196. package/dist/client/assets/use-delete-connection-hy9eBOJA.js +1 -0
  197. package/dist/client/assets/{use-file-configs-CzVPvQ04.js → use-file-configs-Rh_uaFMZ.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-BmPWzVgW.js → use-infinite-scroll-DzA4PJqc.js} +1 -1
  199. package/dist/client/assets/{use-list-state-BxWtfKJF.js → use-list-state-BKFx4oGM.js} +1 -1
  200. package/dist/client/assets/use-mcp-client-WRUNhji3.js +10 -0
  201. package/dist/client/assets/{use-mcp-prompts-B8H3Sb8-.js → use-mcp-prompts-D8_D9pv7.js} +1 -1
  202. package/dist/client/assets/use-mcp-tools-C9n7HK44.js +1 -0
  203. package/dist/client/assets/{use-members-D33brPm2.js → use-members-CRFHIxPI.js} +1 -1
  204. package/dist/client/assets/{use-navigate-to-agent-BpOmxFKV.js → use-navigate-to-agent-S7VbkvxA.js} +1 -1
  205. package/dist/client/assets/{use-org-auth-client-B3bhhuY4.js → use-org-auth-client-CSi9369v.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-qcLKm5I7.js → use-org-sso-BpQsq_SJ.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-DV7FcWv5.js → use-organization-roles-D_SSRrwH.js} +1 -1
  208. package/dist/client/assets/{use-organization-settings-mMiPWte8.js → use-organization-settings-CGN7GbnQ.js} +1 -1
  209. package/dist/client/assets/use-registry-connections-UhNQSvBW.js +1 -0
  210. package/dist/client/assets/{use-secrets-CMyn_SAh.js → use-secrets-pnJMJ9Be.js} +1 -1
  211. package/dist/client/assets/use-status-sounds-Dz4RsXmq.js +1 -0
  212. package/dist/client/assets/{use-view-mode-CQiQ9BoV.js → use-view-mode-Gu7r5Cby.js} +1 -1
  213. package/dist/client/assets/{use-virtual-mcp-BHCygv1Q.js → use-virtual-mcp-CYog3nxZ.js} +1 -1
  214. package/dist/client/assets/useInfiniteQuery-BSkLeLWA.js +1 -0
  215. package/dist/client/assets/{useRouterState-CPOZ6kYF.js → useRouterState-D4-J_KM9.js} +1 -1
  216. package/dist/client/assets/useSuspenseInfiniteQuery-VzK0S1M9.js +1 -0
  217. package/dist/client/assets/{user-BHiBl7KY.js → user-BiR0-i8i.js} +1 -1
  218. package/dist/client/assets/{view-mode-toggle-C4AuqTiF.js → view-mode-toggle-YSQkkoIu.js} +1 -1
  219. package/dist/client/assets/{watch-sse-pool-BEICArze.js → watch-sse-pool-D-9b4N8J.js} +1 -1
  220. package/dist/client/assets/workflow-D9qNodRH.js +1 -0
  221. package/dist/client/assets/workflow-detail-CmQwmqlu.js +1 -0
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +458 -458
  224. package/dist/server/migrate.js +95 -95
  225. package/dist/server/server.js +335 -335
  226. package/package.json +1 -1
  227. package/dist/client/assets/add-section-modal-DGPmEqVH.js +0 -1
  228. package/dist/client/assets/agents-list-f6dvlBDo.js +0 -1
  229. package/dist/client/assets/ai-providers-CIni-0nv.js +0 -1
  230. package/dist/client/assets/app-editor-Dd3wbzna.js +0 -1
  231. package/dist/client/assets/automations-BKZFJOPp.js +0 -1
  232. package/dist/client/assets/brand-context-CpadUeMB.js +0 -1
  233. package/dist/client/assets/buckets-BWDxlk4n.js +0 -1
  234. package/dist/client/assets/collection-detail-C5awVm7D.js +0 -1
  235. package/dist/client/assets/decopilot-sse-pool-Cu7Nizzp.js +0 -1
  236. package/dist/client/assets/domain-settings-BUYR_el1.js +0 -1
  237. package/dist/client/assets/dynamic-plugin-layout-b5WMDmEL.js +0 -1
  238. package/dist/client/assets/features-1PDTV_2R.js +0 -1
  239. package/dist/client/assets/file-explorer-CBKgCWMC.js +0 -2
  240. package/dist/client/assets/general-DCkCuFZl.js +0 -1
  241. package/dist/client/assets/generate-id-N17blLwS.js +0 -1
  242. package/dist/client/assets/index-4vxs0ZGV.js +0 -1
  243. package/dist/client/assets/index-CQQJ5UaG.js +0 -1
  244. package/dist/client/assets/oauth-callback-CdBo7Kde.js +0 -1
  245. package/dist/client/assets/org-plugin-layout-KpgdAlfM.js +0 -1
  246. package/dist/client/assets/page-seo-sheet-Bo7n8Dbw.js +0 -1
  247. package/dist/client/assets/profile-DvJYJ7rR.js +0 -1
  248. package/dist/client/assets/project-app-view-DQhfhWs_.js +0 -1
  249. package/dist/client/assets/record-editor-BYnzNxDd.js +0 -1
  250. package/dist/client/assets/registry-469wEK7T.js +0 -2
  251. package/dist/client/assets/roles-ChM1uml4.js +0 -1
  252. package/dist/client/assets/save-referenced-block-p44kfiVf.js +0 -1
  253. package/dist/client/assets/seo-editor-BdvXc5GQ.js +0 -1
  254. package/dist/client/assets/settings-layout-Cd7DSf19.js +0 -1
  255. package/dist/client/assets/shell-route-loading-DGAtAFWm.js +0 -1
  256. package/dist/client/assets/store-DRNbauSU.js +0 -1
  257. package/dist/client/assets/store-registry-Cj3hC5ms.js +0 -2
  258. package/dist/client/assets/tools-list-CmTd7_Mb.js +0 -1
  259. package/dist/client/assets/use-collections-CUoYyXrz.js +0 -1
  260. package/dist/client/assets/use-delete-connection-C2rrW8fa.js +0 -1
  261. package/dist/client/assets/use-mcp-client-B7YSHa6V.js +0 -10
  262. package/dist/client/assets/use-mcp-tools-Bb7rwoEF.js +0 -1
  263. package/dist/client/assets/use-registry-connections-BIDj-EVl.js +0 -1
  264. package/dist/client/assets/use-status-sounds-FktjeAga.js +0 -1
  265. package/dist/client/assets/useInfiniteQuery-Du3dTl6W.js +0 -1
  266. package/dist/client/assets/useSuspenseInfiniteQuery-BHnbmrEl.js +0 -1
  267. package/dist/client/assets/workflow-CqlkVMXi.js +0 -1
  268. package/dist/client/assets/workflow-detail-CqR4Jdyr.js +0 -1
@@ -0,0 +1 @@
1
+ import{e as F,j as t,r as Q,B as je,l as Se}from"./index-CR2BsklH.js";import{i as be}from"./ChevronRight-Bwn2E0SF.js";import{F as fe}from"./agent-icon-CR2BOYIt.js";import{S as ue}from"./scroll-area-CLZP3_5w.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Fe,f as Te,P as Re,S as Ee}from"./page-seo-form-_9ZP3QBG.js";import{n as ze}from"./index-B1J4YXFH.js";import{a as ge}from"./Tool01-CmnBi-ns.js";import{s as xe}from"./schema-form-DzfWzqPW.js";import"./AlertCircle-DfCrgvbm.js";import"./SwitchHorizontal01-CRsSfTt7.js";import"./RefreshCcw01-Csm4yVOO.js";import"./XCircle-DxeB44sm.js";import"./ArrowUpRight-BZPL9Pks.js";import"./ZapSquare-CBHt5u2b.js";import"./Users03-CIMcoZEN.js";import"./CheckCircle-oP-mqP5v.js";import"./Check-CQSOJf1l.js";import"./ChevronDown-DaBswAjS.js";import"./ChevronLeft-BGAK4Zdv.js";import"./ChevronUp-BiGhh8Mf.js";import"./DotsVertical-Ddm9sNM7.js";import"./Container-C7dE1uq6.js";import"./Eye-CJqEY9Bp.js";import"./ZoomOut-CiW88kaG.js";import"./Globe01-CZ8FVUUU.js";import"./FilterLines-B_l1Wkux.js";import"./Star01-Co_EFaK6.js";import"./Palette-DX6Dwn47.js";import"./HardDrive-CsWNNss4.js";import"./Stars02-C-4orbjJ.js";import"./Key01-CuoD3w0e.js";import"./LayoutLeft-DkBHny3R.js";import"./LinkExternal01-j7-s92dF.js";import"./Monitor01-BKcboobL.js";import"./Sun-D3s8g6wD.js";import"./Play-DF7j7sPZ.js";import"./Plus-DW0XqVol.js";import"./SearchMd-DZ6aIwIg.js";import"./Settings02-D5me1w67.js";import"./Shield01-kWYSVjnp.js";import"./Stars01-M9lSQCUv.js";import"./Trash01-DdLe4vdc.js";import"./Upload01-B_SjMibr.js";import"./User01-DXJ1fbKo.js";import"./Users01-j12rIRFD.js";import"./XClose-SVLNQiVU.js";import"./X-BNvE6MEM.js";import"./Zap-Bgg4Oev9.js";import"./select-BFSfYXlX.js";import"./tooltip-CLG87qyy.js";import"./label-CjPScbhz.js";import"./switch-fOoBffiM.js";import"./agent-capabilities-CPytCHGh.js";import"./chat-context-DG8MYWh9.js";import"./tab-id-DF4EtVz0.js";import"./use-mcp-client-WRUNhji3.js";import"./auth-ottC0wHr.js";import"./watch-sse-pool-D-9b4N8J.js";import"./decopilot-sse-pool-DR3EOQSz.js";import"./studio-tools-BgmLlqq0.js";import"./use-virtual-mcp-CYog3nxZ.js";import"./use-collections-C_yZKgDo.js";import"./use-ai-providers-B-vDc98I.js";import"./use-organization-settings-CGN7GbnQ.js";import"./pair-gQKhMMDb.js";import"./use-clock-tick-dBvSZsql.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-vy8ApQ-I.js";import"./file-type-icon-B4-le7-M.js";import"./dialog-DDaCuEXe.js";import"./content-blocks-o63cs2vh.js";import"./types-CBP_wAn8.js";import"./shell-layout-CVwlRsIR.js";import"./avatar-CdZJe3C8.js";import"./required-auth-layout-B00155Vc.js";import"./useRouterState-D4-J_KM9.js";import"./use-org-sso-BpQsq_SJ.js";import"./integration-icon-Bw8f7ZPI.js";import"./use-navigate-to-agent-S7VbkvxA.js";import"./use-connection-BGirJeWX.js";import"./use-mcp-prompts-D8_D9pv7.js";import"./form-3ozPMiDy.js";import"./input-BXKnvLhL.js";import"./spinner-CDjEeRHa.js";import"./drawer-iJuY2KNl.js";import"./collection-search-p8x92ubf.js";import"./tabs-DwCivvg2.js";import"./toggle-group-Bn94xmD3.js";import"./sortable.esm-LeLAN_LP.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-D4ICX_rU.js";import"./use-registry-connections-UhNQSvBW.js";import"./useInfiniteQuery-BSkLeLWA.js";import"./use-infinite-scroll-DzA4PJqc.js";import"./extract-connection-data-SrWlxhIa.js";import"./generate-id-B9GOZfm-.js";import"./collections-DyJP_FmO.js";import"./card-CDrd0DTi.js";import"./collection-tabs-CkYCGOii.js";import"./badge-C7EEpKuN.js";import"./textarea-C0PLb8A1.js";import"./connection-form-helpers-8awFltv-.js";import"./useSuspenseInfiniteQuery-VzK0S1M9.js";import"./mcp-oauth-BRWfHEzR.js";import"./connect-desktop-dialog-BozHMyNF.js";import"./agent-icons-DnVG8vkz.js";import"./checkbox-BGw-FQHn.js";import"./skeleton-DJEW9jDp.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C-Pwj2mI.js";import"./popover-BTmtXv14.js";import"./command-BWTUFK3g.js";import"./index-BRNlnl29.js";import"./index-CMT1KgDi.js";import"./dropdown-menu-Bbmpm5z3.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-I4t8prq1.js";import"./sidebar-B1ZxuBN_.js";import"./sheet-tO1j8MLX.js";import"./toolbar-D1E6jsA-.js";import"./use-create-virtual-mcp-BjqcuHoP.js";import"./github-repo-picker-CLz-6KHT.js";import"./use-mcp-tools-C9n7HK44.js";import"./alert-dialog-BN8wMw1R.js";import"./index-7nVwqMEY.js";import"./use-org-auth-client-CSi9369v.js";import"./hover-card-BdET2LVl.js";import"./task-status-Do0N2yEZ.js";import"./use-status-sounds-Dz4RsXmq.js";import"./empty-state-Cdm1CYyS.js";import"./resizable-DmhfTA5q.js";import"./use-capability-B_PDwTk3.js";import"./header-tab-button-KOmUg_0n.js";import"./index-BnzjjyUc.js";import"./user-BiR0-i8i.js";import"./tools-list-BXq3S6hl.js";import"./use-debounced-autosave-D3nmvc0o.js";import"./index-DB-iXjqO.js";import"./search-input-MJliZ4jI.js";import"./use-secrets-pnJMJ9Be.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-zpPrX7CV.js";import"./view-mode-toggle-YSQkkoIu.js";import"./select-model-BbRpf076.js";import"./use-automations-BPoyZBdX.js";import"./monaco-editor-Cg1EQRnF.js";import"./automation-runs-DhzB2pEa.js";import"./table-B7zPFKH4.js";import"./use-members-CRFHIxPI.js";import"./automation-list-row-BEJwS8Vh.js";import"./calendar-DFbEMX6r.js";import"./image-field-jDtV8hKH.js";import"./use-file-configs-Rh_uaFMZ.js";function U(a){return typeof a=="string"&&a.trim()?a:void 0}function he(a,e){if(a){if(e)try{const i=new URL(a,e).href;return xe(i)}catch{return}return xe(a)}}function Pe(a){if(!a)return{};const e=U(a.title),i=U(a.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(a.description),image:U(a.image),favicon:U(a.favicon)}}function Oe(a){if(!a)return"example.com";try{return new URL(a).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(a){const e=F.c(10),{src:i,className:r,iconSize:h}=a,n=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==n?(o=t.jsx(ge,{size:n}),e[5]=n,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(a){const e=F.c(27),{seo:i,host:r,path:h}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={background:"#fff",border:"1px solid #dadce0"},e[0]=n):n=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:n,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(a){const e=F.c(20),{seo:i,host:r}=a;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let n;e[1]!==i.image?(n=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=n):n=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==n?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[n,x]}),e[17]=x,e[18]=n,e[19]=u):u=e[19],u}function Ie(a){const e=F.c(23),{seo:i,host:r,accent:h}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={background:"#f0f2f5"},e[0]=n):n=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:n,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(a){const e=F.c(33),{seo:i,host:r,accent:h,dark:n}=a,s=n?"#2b2d31":"#fff",o=n?"#00a8fc":"#1264a3",l=n?"#dbdee1":"#3b4045",m=n?"#949ba4":"#8a9099",p=n?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(a){const e=F.c(17),{platform:i,seo:r,host:h,path:n}=a;let s;e[0]!==h||e[1]!==n||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:n}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:n}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:n,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:n,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=n,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(a){const e=F.c(17),{seo:i,url:r,path:h}=a,n=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=n==="/"?"":n;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ii(a){const e=F.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:n,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=a,c=Ne(n,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},T=c?we(w,c):null,z=T&&(!K||Ce(B))?ze(T,s):null;let M;e[0]!==s?(M=Fe(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==n||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Te(n,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=n,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ne=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ae=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ne||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ne,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ne,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==T||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ae||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:T,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&T&&t.jsx(Ee,{schema:z,resolveType:T,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ae,path:P})})})]}),e[38]=T,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ae,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(a){return a+1}function Me(a){return a+1}function Ge(a,e){try{return new URL(a,e).href}catch{return e}}function Ve(a,e){const i=e.__resolveType,r=a.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...a};for(const[n,s]of Object.entries(e))n!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[n]=s));return h}export{Ii as SeoEditor};
@@ -0,0 +1 @@
1
+ import{e as S,g as T,j as s,p as W,b4 as X,c as w,D as Y,I as D,t as H,$ as Q,b as F,l as Z,r as ee,O as se}from"./index-CR2BsklH.js";import{u as J}from"./useRouterState-D4-J_KM9.js";import{S as te,a as le,b as re,e as I,f as A,g as L,c as B,d as R,i as ie,j as ne}from"./sidebar-B1ZxuBN_.js";import{a as oe}from"./index-DB-iXjqO.js";import{n as ae,b as ce,a as me,c as fe,d as de,i as K}from"./ZapSquare-CBHt5u2b.js";import{t as be,a as E}from"./Users03-CIMcoZEN.js";import{i as xe}from"./HardDrive-CsWNNss4.js";import{i as ue}from"./Key01-CuoD3w0e.js";import{i as he}from"./Shield01-kWYSVjnp.js";import{s as ge}from"./User01-DXJ1fbKo.js";import{i as G}from"./Zap-Bgg4Oev9.js";import{a as pe}from"./use-capability-B_PDwTk3.js";import{u as U}from"./tooltip-CLG87qyy.js";import{u as je}from"./use-status-sounds-Dz4RsXmq.js";import{a as y}from"./toolbar-D1E6jsA-.js";import{S as _e,M as ye}from"./shell-controls-Bym8A09n.js";import"./LayoutLeft-DkBHny3R.js";import"./sheet-tO1j8MLX.js";import"./X-BNvE6MEM.js";import"./question-004-sINsf4GQ.js";import"./watch-sse-pool-D-9b4N8J.js";import"./decopilot-sse-pool-DR3EOQSz.js";import"./ChevronLeft-BGAK4Zdv.js";import"./ChevronRight-Bwn2E0SF.js";function V(){const e=S.c(26),t=W().project;let n;e[0]!==t.enabledPlugins?(n=t.enabledPlugins??[],e[0]=t.enabledPlugins,e[1]=n):n=e[1];const l=n,{capabilities:i,isPrivileged:r,loading:o,error:a}=pe();let c,d;if(e[2]!==i||e[3]!==l||e[4]!==a||e[5]!==r||e[6]!==o){d=Symbol.for("react.early_return_sentinel");e:{let m;e[9]!==l?(m=q=>l.includes(q.pluginId),e[9]=l,e[10]=m):m=e[10];const h=X.filter(m).map(ve);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(be,{size:14}),e[11]=b):b=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ae,{size:14}),e[12]=f):f=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[13]=x):x=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ue,{size:14}),e[14]=g):g=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[15]=p):p=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(E,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(G,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(fe,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(E,{size:14}),e[21]=k):k=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(he,{size:14}),e[22]=$):$=e[22];let z;e[23]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Y,{size:14}),e[23]=z):z=e[23];let C;e[24]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(G,{size:14}),e[24]=C):C=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(ge,{size:14}),e[25]=P):P=e[25];const O=[{label:"Organization",items:[{key:"general",label:"General",icon:b,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:x,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:g,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:p,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:u,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:_,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:j,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:v,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:N,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:k,to:"/$org/settings/members",requires:"members:manage"},{key:"roles",label:"Roles",icon:$,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:z,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Extensions",items:[{key:"features",label:"Plugins",icon:C,to:"/$org/settings/features",requires:"org:manage"},...h]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:P,to:"/$org/settings/profile"}]}];if(o||a){d=O;break e}c=O.map(q=>({...q,items:q.items.filter(M=>M.privilegedOnly?r:M.requires?r||i[M.requires]:!0)})).filter(Se)}e[2]=i,e[3]=l,e[4]=a,e[5]=r,e[6]=o,e[7]=c,e[8]=d}else c=e[7],d=e[8];return d!==Symbol.for("react.early_return_sentinel")?d:c}function Se(e){return e.items.length>0}function ve(e){const{key:t,label:n,icon:l,to:i}=e;return{key:t,label:n,icon:l,to:i}}function Ne(){const e=S.c(19),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:l}=T(n);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:$e},e[1]=i):i=e[1];const r=J(i);let o;e[2]!==l||e[3]!==r?(o=x=>{const g=x.replace("$org",l);return r.startsWith(g)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const a=o;let c;if(e[5]!==t||e[6]!==a||e[7]!==l){let x;e[9]!==a||e[10]!==l?(x=(g,p)=>s.jsxs(I,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&s.jsx("p",{className:w("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",p>0&&"mt-3"),children:g.label}),s.jsx(A,{children:s.jsx(L,{className:"gap-0.5",children:g.items.map(u=>s.jsx(B,{children:s.jsx(R,{asChild:!0,isActive:a(u.to),children:s.jsxs(D,{to:u.to,params:{org:l},onClick:()=>H("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:g.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:u.icon}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${g.label}-${p}`),e[9]=a,e[10]=l,e[11]=x):x=e[11],c=t.map(x),e[5]=t,e[6]=a,e[7]=l,e[8]=c}else c=e[8];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=d):d=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(I,{className:"pt-0 pr-0 pb-0 pl-0",children:[d,s.jsx(A,{children:s.jsx(L,{className:"gap-0.5",children:s.jsx(B,{children:s.jsxs(R,{onClick:ke,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(K,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=m):m=e[13];let h;e[14]!==c?(h=s.jsxs(ie,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[c,m]}),e[14]=c,e[15]=h):h=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.35.0"]})}),e[16]=b):b=e[16];let f;return e[17]!==h?(f=s.jsxs(ne,{variant:"sidebar",children:[h,b]}),e[17]=h,e[18]=f):f=e[18],f}function ke(){H("signed_out",{source:"settings_sidebar"}),Q(),F.signOut()}function $e(e){return e.location.pathname}function ze(e){const t=S.c(21),{onClose:n}=e,l=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:r}=T(i);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:Pe},t[1]=o):o=t[1];const a=J(o);let c;t[2]!==r||t[3]!==a?(c=p=>{const u=p.replace("$org",r);return a.startsWith(u)},t[2]=r,t[3]=a,t[4]=c):c=t[4];const d=c;let m;if(t[5]!==l||t[6]!==d||t[7]!==n||t[8]!==r){let p;t[10]!==d||t[11]!==n||t[12]!==r?(p=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:w("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(D,{to:j.to,params:{org:r},onClick:n,className:w("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",d(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsx("span",{className:"shrink-0",children:j.icon}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=d,t[11]=n,t[12]=r,t[13]=p):p=t[13],m=l.map(p),t[5]=l,t[6]=d,t[7]=n,t[8]=r,t[9]=m}else m=t[9];let h;t[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=h):h=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h,s.jsxs("button",{type:"button",onClick:Ce,className:"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",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(K,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=b):b=t[15];let f;t[16]!==m?(f=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[m,b]}),t[16]=m,t[17]=f):f=t[17];let x;t[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.35.0"]})}),t[18]=x):x=t[18];let g;return t[19]!==f?(g=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[f,x]}),t[19]=f,t[20]=g):g=t[20],g}function Ce(){Q(),F.signOut()}function Pe(e){return e.location.pathname}function qe(){const e=S.c(4),t=U(),{org:n}=W();je(n.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Z,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ee.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(oe,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(se,{})})})})}),e[1]=i):i=e[1];const r=i;if(t){let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=a):a=e[2],a}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:w("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function ts(){const e=S.c(22),t=U();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.LogoLink,{}),e[0]=n):n=e[0];let l;e[1]!==t?(l=t&&s.jsx(_e,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=i):i=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[n,l,i]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=a):a=e[7];let c;e[8]!==r?(c=s.jsxs(y.Header,{children:[r,o,a]}),e[8]=r,e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d={"--sidebar-width-icon":"3.5rem"},e[10]=d):d=e[10];let m;e[11]!==t?(m=!t&&s.jsx(Ne,{}),e[11]=t,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(te,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(qe,{})}),e[13]=h):h=e[13];let b;e[14]!==m?(b=s.jsxs(le,{className:"flex-1 bg-sidebar min-h-0",style:d,children:[m,h]}),e[14]=m,e[15]=b):b=e[15];let f;e[16]!==t?(f=t&&s.jsx(ye,{renderSidebar:we}),e[16]=t,e[17]=f):f=e[17];let x;return e[18]!==b||e[19]!==f||e[20]!==c?(x=s.jsx(y.Provider,{children:s.jsx(re,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,b,f]})})}),e[18]=b,e[19]=f,e[20]=c,e[21]=x):x=e[21],x}function we(e){const{onClose:t}=e;return s.jsx(ze,{onClose:t})}export{Ne as SettingsSidebar,ze as SettingsSidebarMobile,ts as default};
@@ -1 +1 @@
1
- import{e as v,c as N,j as r,r as S}from"./index-DxLTuX83.js";import{C as w}from"./card-_9LUJQRQ.js";import{i as E}from"./ArrowUpRight-Ce95HJs8.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
1
+ import{e as v,c as N,j as r,r as S}from"./index-CR2BsklH.js";import{C as w}from"./card-CDrd0DTi.js";import{i as E}from"./ArrowUpRight-BZPL9Pks.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
@@ -1 +1 @@
1
- import{e as n,c as f,j as i,de as N,cz as y,bE as S,df as v,cA as $,dg as C,cB as w}from"./index-DxLTuX83.js";import{i as z}from"./X-D1kqmcok.js";function D(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function B(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(B,{}),e[6]=m):m=e[6];const x=p==="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",g=p==="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",b=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="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 r;e[7]!==s||e[8]!==x||e[9]!==g||e[10]!==b||e[11]!==j?(r=f("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",x,g,b,j,s),e[7]=s,e[8]=x,e[9]=g,e[10]=b,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(C,{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:[i.jsx(z,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(k,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,D as b,_ as c,P as d};
1
+ import{e as n,c as f,j as i,dm as N,cw as y,bB as S,dn as v,cx as $,dp as w,cy as C}from"./index-CR2BsklH.js";import{i as k}from"./X-BNvE6MEM.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function B(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(C,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(B,{}),e[6]=m):m=e[6];const x=p==="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",b=p==="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",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="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 r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("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",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(w,{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:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,E as b,_ as c,P as d};
@@ -1 +1 @@
1
- import{e as f,j as a}from"./index-DxLTuX83.js";import{S as d,a as p,b as S}from"./sheet-BZaR5cN8.js";import{u as b}from"./sidebar-DILd2AwV.js";import{i as h}from"./LayoutLeft-BdQI12mG.js";import{T as u}from"./toolbar-A-Rw_MZF.js";function M(){const t=f.c(3),{toggleSidebar:e}=b();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),t[0]=o):o=t[0];let s;return t[1]!==e?(s=a.jsx(u,{onClick:e,"aria-label":"Toggle sidebar",children:o}),t[1]=e,t[2]=s):s=t[2],s}function _(t){const e=f.c(12),{renderSidebar:o}=t,{openMobile:s,setOpenMobile:i}=b();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(d,{className:"sr-only",children:"Navigation"}),e[0]=c):c=e[0];let l;e[1]!==i?(l=()=>i(!1),e[1]=i,e[2]=l):l=e[2];let r;e[3]!==o||e[4]!==l?(r=o({onClose:l}),e[3]=o,e[4]=l,e[5]=r):r=e[5];let n;e[6]!==r?(n=a.jsxs(p,{side:"left",hideCloseButton:!0,className:"w-[calc(100vw-3rem)] sm:max-w-md! p-0",children:[c,r]}),e[6]=r,e[7]=n):n=e[7];let m;return e[8]!==s||e[9]!==i||e[10]!==n?(m=a.jsx(S,{open:s,onOpenChange:i,children:n}),e[8]=s,e[9]=i,e[10]=n,e[11]=m):m=e[11],m}export{_ as M,M as S};
1
+ import{e as f,j as a}from"./index-CR2BsklH.js";import{S as d,a as p,b as S}from"./sheet-tO1j8MLX.js";import{u as b}from"./sidebar-B1ZxuBN_.js";import{i as h}from"./LayoutLeft-DkBHny3R.js";import{T as u}from"./toolbar-D1E6jsA-.js";function M(){const t=f.c(3),{toggleSidebar:e}=b();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(h,{size:16}),t[0]=o):o=t[0];let s;return t[1]!==e?(s=a.jsx(u,{onClick:e,"aria-label":"Toggle sidebar",children:o}),t[1]=e,t[2]=s):s=t[2],s}function _(t){const e=f.c(12),{renderSidebar:o}=t,{openMobile:s,setOpenMobile:i}=b();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(d,{className:"sr-only",children:"Navigation"}),e[0]=c):c=e[0];let l;e[1]!==i?(l=()=>i(!1),e[1]=i,e[2]=l):l=e[2];let r;e[3]!==o||e[4]!==l?(r=o({onClose:l}),e[3]=o,e[4]=l,e[5]=r):r=e[5];let n;e[6]!==r?(n=a.jsxs(p,{side:"left",hideCloseButton:!0,className:"w-[calc(100vw-3rem)] sm:max-w-md! p-0",children:[c,r]}),e[6]=r,e[7]=n):n=e[7];let m;return e[8]!==s||e[9]!==i||e[10]!==n?(m=a.jsx(S,{open:s,onOpenChange:i,children:n}),e[8]=s,e[9]=i,e[10]=n,e[11]=m):m=e[11],m}export{_ as M,M as S};
@@ -1 +1 @@
1
- import{e as k,a as se,j as o,B as z,bJ as X,o as Z,F as me,b as Y,a4 as we,s as fe,K as re,bK as Se,bL as je,L as U,r as Q,bM as ve,bN as ke,n as oe,f as Ne,q as Oe,g as he,d as _e,$ as Ae,bO as Ce,bP as le,bQ as Ee,bR as Te,S as $e,O as ze,bS as Me}from"./index-DxLTuX83.js";import{A as ge}from"./avatar-BZq-o3M_.js";import{t as Ie,a as Le}from"./Users03-Cf3_qQGc.js";import{i as Fe,a as Pe,s as q,n as De}from"./Stars02-ChPYLNIJ.js";import{s as Re}from"./XClose-CwNjmDWz.js";import{i as K}from"./CheckCircle-BiLWpS6e.js";import{i as ce}from"./FilterLines-DuHSJmFt.js";import{i as J}from"./Zap-j2XVmCfk.js";import{a as qe,b as Ke,c as Ue,D as He}from"./dialog-DilC5A4p.js";import{R as Ge}from"./required-auth-layout-Ce12SDHB.js";import{o as Be,l as We,q as Je,A as Qe}from"./tab-id-BEXPtrYn.js";import{g as Ye,m as Ve,a as Xe}from"./use-mcp-client-B7YSHa6V.js";import{c as Ze}from"./use-organization-settings-mMiPWte8.js";import{u as et}from"./use-org-sso-qcLKm5I7.js";function tt(t){const e=k.c(27),{orgName:n,orgSlug:s,orgLogo:r,domain:a}=t;let i;e[0]!==s?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:s})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??s}`},onError:st},e[0]=s,e[1]=i):i=e[1];const l=se(i),d=nt;let c;e[2]!==r||e[3]!==n?(c=r?o.jsx(ge,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=o.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",o.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=o.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l?(g=()=>l.mutate(),e[12]=l,e[13]=g):g=e[13];const y=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==g||e[16]!==y?(f=o.jsx(z,{onClick:g,disabled:l.isPending,children:y}),e[14]=l.isPending,e[15]=g,e[16]=y,e[17]=f):f=e[17];let h;e[18]!==l.isPending?(h=o.jsx(z,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=h):h=e[19];let b;e[20]!==f||e[21]!==h?(b=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,h]}),e[20]=f,e[21]=h,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==p?(S=o.jsxs(X,{children:[c,p,b]}),e[23]=b,e[24]=c,e[25]=p,e[26]=S):S=e[26],S}function nt(){window.location.href="/"}function st(t){Z.error(t instanceof Error?t.message:"Failed to join organization")}function de(t){const e=k.c(17),{orgSlug:n,orgName:s,reason:r}=t,a=ot,i=r==="not-found",l=i?Fe:me,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==s||e[2]!==n?(c=i?o.jsxs(o.Fragment,{children:["We couldn't find an organization called ",o.jsx("strong",{children:n}),"."]}):o.jsxs(o.Fragment,{children:["You don't have access to ",o.jsx("strong",{children:s??n}),".",o.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=s,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=o.jsx("div",{className:"bg-muted p-3 rounded-full",children:o.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=o.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let g;e[8]!==m?(g=o.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==p||e[11]!==g?(y=o.jsxs("div",{className:"space-y-2",children:[p,g]}),e[10]=p,e[11]=g,e[12]=y):y=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(z,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==y?(h=o.jsxs(X,{children:[u,y,f]}),e[14]=u,e[15]=y,e[16]=h):h=e[16],h}function ot(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:s,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const O=await Y.organization.acceptInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{we(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:lt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=se(d);let m;e[7]!==n?(m=async()=>{const O=await Y.organization.rejectInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=rt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:it},e[10]=m,e[11]=p):p=e[11];const g=se(p),y=c.isPending||g.isPending;let f;e[12]!==a||e[13]!==s?(f=a?o.jsx(ge,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Pe,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=s,e[14]=f):f=e[14];let h;e[15]!==s?(h=o.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",o.jsx("strong",{children:s})]}),e[15]=s,e[16]=h):h=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==h?(S=o.jsxs("div",{className:"space-y-2",children:[h,b]}),e[18]=h,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let _;e[22]!==y||e[23]!==x||e[24]!==v?(_=o.jsx(z,{onClick:x,disabled:y,children:v}),e[22]=y,e[23]=x,e[24]=v,e[25]=_):_=e[25];let N;e[26]!==g?(N=()=>g.mutate(),e[26]=g,e[27]=N):N=e[27];const w=g.isPending?"Declining…":"Decline";let A;e[28]!==y||e[29]!==N||e[30]!==w?(A=o.jsx(z,{variant:"ghost",onClick:N,disabled:y,children:w}),e[28]=y,e[29]=N,e[30]=w,e[31]=A):A=e[31];let C;e[32]!==_||e[33]!==A?(C=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,A]}),e[32]=_,e[33]=A,e[34]=C):C=e[34];let E;return e[35]!==S||e[36]!==C||e[37]!==f?(E=o.jsxs(X,{children:[f,S,C]}),e[35]=S,e[36]=C,e[37]=f,e[38]=E):E=e[38],E}function it(t){Z.error(t instanceof Error?t.message:"Failed to decline invitation")}function rt(){Z.success("Invitation declined"),window.location.href="/"}function lt(t){Z.error(t instanceof Error?t.message:"Failed to accept invitation")}function ct(t){const e=k.c(7);let n;e[0]!==t?(n=re.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=s):s=e[3];let r;return e[4]!==n||e[5]!==s?(r={queryKey:n,queryFn:s,refetchOnWindowFocus:!1},e[4]=n,e[5]=s,e[6]=r):r=e[6],fe(r)}function dt({orgSlug:t}){const{data:e}=ct(t);return(e.status==="not-found"||e.status==="no-access")&&(Se()?.org===t&&je(),localStorage.getItem(U.lastOrgSlug())===t)?(localStorage.removeItem(U.lastOrgSlug()),window.location.href="/",null):e.status==="not-found"?o.jsx(de,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?o.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?o.jsx(tt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="member"?(window.location.reload(),null):o.jsx(de,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function ut(t){const e=k.c(20),{release:n,onCtaClick:s,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=o.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=o.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(mt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=o.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==s||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&o.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?o.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):o.jsx("span",{}),n.cta&&o.jsx(z,{asChild:!0,size:"sm",onClick:s,children:o.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=s,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=o.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function mt(t,e){return o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const pe=[{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:q,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:J,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:q,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:K,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:q,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:K,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:q,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ce,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:K,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:J,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:K,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:q,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ce,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:q,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:De,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],V="studio.release-feed.v1",ae=new Set;let I="",L={},ie=!1;function ft(){if(ie)return I||"{}";try{return localStorage.getItem(V)??"{}"}catch{return I||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ue(){const t=ft();return t!==I&&(I=t,L=ye(t)),L}function ht(t){ae.add(t);const e=n=>{if(!(n.key!==V&&n.key!==null)){try{const s=localStorage.getItem(V)??"{}",a={...ye(s),...L};L=a,I=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function gt(t){L=t,I=JSON.stringify(t);try{localStorage.setItem(V,I),ie=!1}catch{ie=!0}ae.forEach(e=>e())}function pt(){const t=k.c(7),e=Q.useSyncExternalStore(ht,ue,ue);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const s=n,r=yt;let a;t[2]!==e?(a=pe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==s||t[5]!==i?(l={isSeen:s,markSeen:r,unseenCount:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],l}function yt(t){L[t]||gt({...L,[t]:{seenAt:new Date().toISOString()}})}const bt=720*60*60*1e3;function xt(t){const[e,n,s]=t.split("-").map(Number);return!e||!n||!s?new Date(t).getTime():new Date(e,n-1,s).getTime()}function wt(t){const e=pe[0];if(!e)return null;const n=xt(e.date),s=t-n;return s<0||s>bt?null:e}function St(){const t=k.c(21),{isSeen:e,markSeen:n}=pt();let s,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(s=wt(Date.now()),!s){a=null;break e}r=e(s.id)}t[0]=e,t[1]=s,t[2]=r,t[3]=a}else s=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==s.id||t[5]!==n?(i=()=>n(s.id),t[4]=s.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Re,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=o.jsx(z,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==s.id||t[11]!==n?(c=()=>n(s.id),m=()=>n(s.id),t[10]=s.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==s||t[15]!==c||t[16]!==m?(u=o.jsx(ut,{release:s,onCtaClick:c,onLearnMoreClick:m}),t[14]=s,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=o.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),M=be?"⌘":"Ctrl",$={keyboardShortcuts:{keys:[M,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[M,"L"],description:"Focus chat input"},saveAndFormat:{keys:[M,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[M,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[M,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",M,"S"],description:"New task"},toggleDaemon:{keys:[M,"D"],description:"Toggle daemon logs"}},jt=[{label:"General",shortcuts:[$.keyboardShortcuts,$.newTask,$.toggleDaemon]},{label:"Editor",shortcuts:[$.saveAndFormat]},{label:"Chat",shortcuts:[$.focusChatInput,$.togglePlanMode,$.sendMessage,$.newLine]},{label:"Questions",shortcuts:[$.selectOption]},{label:"Monitoring",shortcuts:[$.applyFilter]}];function vt(t){return be?t.metaKey:t.ctrlKey}function kt(t){const e=k.c(5),{open:n,onOpenChange:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Ke,{children:o.jsx(Ue,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(qe,{className:"sm:max-w-md",children:[r,o.jsx("div",{className:"flex flex-col gap-4",children:jt.map(Nt)})]}),e[1]=a):a=e[1];let i;return e[2]!==s||e[3]!==n?(i=o.jsx(He,{open:n,onOpenChange:s,children:a}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i}function Nt(t){return o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),o.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ot)})]},t.label)}function Ot(t){return o.jsxs("div",{className:"flex items-center justify-between py-1",children:[o.jsx("span",{className:"text-sm",children:t.description}),o.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_t)})]},t.description)}function _t(t){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function At({activeOrg:t}){return t&&(ve(t.id,{name:t.name??void 0,slug:t.slug??void 0}),ke()),null}function Ct(t,e,n){if(!n)return null;const s=Be(t,e);return s?s.threads.get().find(a=>a.id===n)?.branch??null:null}function xe(t){return{queryKey:re.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Xt(t){const e=k.c(10);let n;e[0]!==t?(n=xe(t),e[0]=t,e[1]=n):n=e[1];const s=oe(n);let r;e[2]!==s.data?.prompts?(r=s.data?.prompts??[],e[2]=s.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==s.data?.tiles?(a=s.data?.tiles??[],e[4]=s.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==s.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:s.isLoading,prompts:r,tiles:a},e[6]=s.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Et(t){const e=k.c(17),{orgSlug:n,orgName:s,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=Tt;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(me,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==s?(m=s?o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:s})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=s,e[6]=m):m=e[6];let u;e[7]!==m?(u=o.jsxs("div",{className:"space-y-2",children:[c,o.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=o.jsx(z,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(z,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=g):g=e[11];let y;e[12]!==p?(y=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,g]}),e[12]=p,e[13]=y):y=e[13];let f;return e[14]!==u||e[15]!==y?(f=o.jsxs(X,{children:[d,u,y]}),e[14]=u,e[15]=y,e[16]=f):f=e[16],f}function Tt(){window.location.href="/"}function $t(t){const e=k.c(8),{org:n,children:s}=t,a=Ze(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==s||e[5]!==n||e[6]!==l?(d=o.jsx(Me,{org:n,project:l,children:s}),e[4]=s,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function zt(){const t=Ne(),e=We(),{org:n,locator:s}=Oe(),r=he({strict:!1}),a=_e({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,h,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:h,replace:b}),c=(f,h=!0)=>d(l,f,h),m=f=>c(h=>({...h,chat:f?1:0})),u=(f,h,b)=>d(f,S=>{const x={chat:1};h?x.virtualmcpid=h:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid);const v=S.main;return v&&typeof v=="string"&&!Je(v)&&(x.main=v),b?.autosend&&(x.autosend=Qe),x},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const h=crypto.randomUUID(),b=f??a.virtualmcpid??Ye(n.id).id,x=b===a.virtualmcpid?Ct(n.slug,s,l):null;try{await e?.create({id:h,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}u(h,b)},openTab:f=>d(l||crypto.randomUUID(),h=>({...h,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const b={...f};return delete b.main,b})}}function Mt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const s=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=Q.useState(!1),d=s??"";let c;t[2]!==d?(c=xe(d),t[2]=d,t[3]=c):c=t[3];const m=!!s&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],oe(u);const{data:p}=Y.useSession(),g=p?.user?.id;let y;t[7]!==s||t[8]!==g?(y=s&&g?Ce(g,s):null,t[7]=s,t[8]=g,t[9]=y):y=t[9];const f=y;let h,b;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const j=T=>{vt(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[],t[10]=h,t[11]=b):(h=t[10],b=t[11]),Q.useEffect(h,b);let S;t[12]!==s?(S=re.activeOrganization(s),t[12]=s,t[13]=S):S=t[13];let x;t[14]!==s||t[15]!==g?(x=async()=>{if(!s)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:s}}).finally(It),T=le(j);return j&&!T&&localStorage.setItem(U.lastOrgSlug(),s),g&&j&&Te(g,s,j),j},t[14]=s,t[15]=g,t[16]=x):x=t[16];const v=f?f.data:void 0,_=f?.updatedAt;let N;t[17]!==x||t[18]!==v||t[19]!==_||t[20]!==S?(N={queryKey:S,queryFn:x,initialData:v,initialDataUpdatedAt:_,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=x,t[18]=v,t[19]=_,t[20]=S,t[21]=N):N=t[21];const{data:w}=fe(N),A=w?.id,C=w?.slug,{data:E}=et(A,C),O=A??"",ee=C??"";let F;t[22]!==O||t[23]!==ee?(F=Ve({connectionId:Xe,orgId:O,orgSlug:ee}),t[22]=O,t[23]=ee,t[24]=F):F=t[24];const te=!!A&&!!C;let H;if(t[25]!==F||t[26]!==te?(H={...F,enabled:te},t[25]=F,t[26]=te,t[27]=H):H=t[27],oe(H),!w){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx($e,{}),t[28]=j):j=t[28];let T;return t[29]!==s?(T=o.jsx(Q.Suspense,{fallback:j,children:o.jsx(dt,{orgSlug:s})}),t[29]=s,t[30]=T):T=t[30],T}if(le(w)){localStorage.getItem(U.lastOrgSlug())===s&&localStorage.removeItem(U.lastOrgSlug());let j;return t[31]!==w.name?(j=o.jsx(Ee,{orgName:w.name}),t[31]=w.name,t[32]=j):j=t[32],j}if(E?.ssoRequired&&!E.authenticated){let j;return t[33]!==w.id||t[34]!==w.name||t[35]!==w.slug||t[36]!==E.domain?(j=o.jsx(Et,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:E.domain}),t[33]=w.id,t[34]=w.name,t[35]=w.slug,t[36]=E.domain,t[37]=j):j=t[37],j}const ne=w.logo??null;let P;t[38]!==w||t[39]!==ne?(P={...w,logo:ne},t[38]=w,t[39]=ne,t[40]=P):P=t[40];let D;t[41]!==w?(D=o.jsx(At,{activeOrg:w}),t[41]=w,t[42]=D):D=t[42];let G,B;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=o.jsx(ze,{}),B=o.jsx(St,{}),t[43]=G,t[44]=B):(G=t[43],B=t[44]);let R;t[45]!==i?(R=o.jsx(kt,{open:i,onOpenChange:l}),t[45]=i,t[46]=R):R=t[46];let W;return t[47]!==P||t[48]!==D||t[49]!==R?(W=o.jsxs($t,{org:P,children:[D,G,B,R]}),t[47]=P,t[48]=D,t[49]=R,t[50]=W):W=t[50],W}function It(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Lt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Ge,{children:o.jsx(Mt,{})}),t[0]=e):e=t[0],e}const Zt=Object.freeze(Object.defineProperty({__proto__:null,default:Lt,usePanelActions:zt},Symbol.toStringTag,{value:"Module"}));export{$ as K,pe as R,pt as a,ut as b,Xt as c,xe as h,vt as i,Ct as r,Zt as s,zt as u};
1
+ import{e as k,a as se,j as o,B as z,bG as X,n as Z,D as me,b as Q,a1 as we,q as fe,K as re,bH as Se,bI as je,L as H,r as Y,bJ as ve,bK as ke,m as oe,f as Ne,p as Oe,g as he,d as _e,X as Ae,bL as Ce,bM as le,bN as Ee,bO as Te,S as $e,O as ze,bP as Ie}from"./index-CR2BsklH.js";import{A as ge}from"./avatar-CdZJe3C8.js";import{t as Me,a as Le}from"./Users03-CIMcoZEN.js";import{i as Fe,a as Pe,s as q,n as De}from"./Stars02-C-4orbjJ.js";import{s as Re}from"./XClose-SVLNQiVU.js";import{i as K}from"./CheckCircle-oP-mqP5v.js";import{i as ce}from"./FilterLines-B_l1Wkux.js";import{i as J}from"./Zap-Bgg4Oev9.js";import{a as qe,b as Ke,c as He,D as Ue}from"./dialog-DDaCuEXe.js";import{R as Ge}from"./required-auth-layout-B00155Vc.js";import{o as Be,l as We,q as Je,A as Ye}from"./tab-id-DF4EtVz0.js";import{g as Qe,m as Ve,a as Xe}from"./use-mcp-client-WRUNhji3.js";import{c as Ze}from"./use-organization-settings-CGN7GbnQ.js";import{u as et}from"./use-org-sso-BpQsq_SJ.js";function tt(t){const e=k.c(27),{orgName:n,orgSlug:s,orgLogo:r,domain:a}=t;let i;e[0]!==s?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:s})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??s}`},onError:st},e[0]=s,e[1]=i):i=e[1];const l=se(i),d=nt;let c;e[2]!==r||e[3]!==n?(c=r?o.jsx(ge,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Me,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=o.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",o.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=o.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l?(g=()=>l.mutate(),e[12]=l,e[13]=g):g=e[13];const y=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==g||e[16]!==y?(f=o.jsx(z,{onClick:g,disabled:l.isPending,children:y}),e[14]=l.isPending,e[15]=g,e[16]=y,e[17]=f):f=e[17];let h;e[18]!==l.isPending?(h=o.jsx(z,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=h):h=e[19];let b;e[20]!==f||e[21]!==h?(b=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,h]}),e[20]=f,e[21]=h,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==p?(S=o.jsxs(X,{children:[c,p,b]}),e[23]=b,e[24]=c,e[25]=p,e[26]=S):S=e[26],S}function nt(){window.location.href="/"}function st(t){Z.error(t instanceof Error?t.message:"Failed to join organization")}function de(t){const e=k.c(17),{orgSlug:n,orgName:s,reason:r}=t,a=ot,i=r==="not-found",l=i?Fe:me,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==s||e[2]!==n?(c=i?o.jsxs(o.Fragment,{children:["We couldn't find an organization called ",o.jsx("strong",{children:n}),"."]}):o.jsxs(o.Fragment,{children:["You don't have access to ",o.jsx("strong",{children:s??n}),".",o.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=s,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=o.jsx("div",{className:"bg-muted p-3 rounded-full",children:o.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=o.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let g;e[8]!==m?(g=o.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==p||e[11]!==g?(y=o.jsxs("div",{className:"space-y-2",children:[p,g]}),e[10]=p,e[11]=g,e[12]=y):y=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(z,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==y?(h=o.jsxs(X,{children:[u,y,f]}),e[14]=u,e[15]=y,e[16]=h):h=e[16],h}function ot(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:s,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const O=await Q.organization.acceptInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{we(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:lt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=se(d);let m;e[7]!==n?(m=async()=>{const O=await Q.organization.rejectInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=rt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:it},e[10]=m,e[11]=p):p=e[11];const g=se(p),y=c.isPending||g.isPending;let f;e[12]!==a||e[13]!==s?(f=a?o.jsx(ge,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Pe,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=s,e[14]=f):f=e[14];let h;e[15]!==s?(h=o.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",o.jsx("strong",{children:s})]}),e[15]=s,e[16]=h):h=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==h?(S=o.jsxs("div",{className:"space-y-2",children:[h,b]}),e[18]=h,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let _;e[22]!==y||e[23]!==x||e[24]!==v?(_=o.jsx(z,{onClick:x,disabled:y,children:v}),e[22]=y,e[23]=x,e[24]=v,e[25]=_):_=e[25];let N;e[26]!==g?(N=()=>g.mutate(),e[26]=g,e[27]=N):N=e[27];const w=g.isPending?"Declining…":"Decline";let A;e[28]!==y||e[29]!==N||e[30]!==w?(A=o.jsx(z,{variant:"ghost",onClick:N,disabled:y,children:w}),e[28]=y,e[29]=N,e[30]=w,e[31]=A):A=e[31];let C;e[32]!==_||e[33]!==A?(C=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,A]}),e[32]=_,e[33]=A,e[34]=C):C=e[34];let E;return e[35]!==S||e[36]!==C||e[37]!==f?(E=o.jsxs(X,{children:[f,S,C]}),e[35]=S,e[36]=C,e[37]=f,e[38]=E):E=e[38],E}function it(t){Z.error(t instanceof Error?t.message:"Failed to decline invitation")}function rt(){Z.success("Invitation declined"),window.location.href="/"}function lt(t){Z.error(t instanceof Error?t.message:"Failed to accept invitation")}function ct(t){const e=k.c(7);let n;e[0]!==t?(n=re.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=s):s=e[3];let r;return e[4]!==n||e[5]!==s?(r={queryKey:n,queryFn:s,refetchOnWindowFocus:!1},e[4]=n,e[5]=s,e[6]=r):r=e[6],fe(r)}function dt({orgSlug:t}){const{data:e}=ct(t);return(e.status==="not-found"||e.status==="no-access")&&(Se()?.org===t&&je(),localStorage.getItem(H.lastOrgSlug())===t)?(localStorage.removeItem(H.lastOrgSlug()),window.location.href="/",null):e.status==="not-found"?o.jsx(de,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?o.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?o.jsx(tt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="member"?(window.location.reload(),null):o.jsx(de,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function ut(t){const e=k.c(20),{release:n,onCtaClick:s,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=o.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=o.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(mt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=o.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==s||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&o.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?o.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):o.jsx("span",{}),n.cta&&o.jsx(z,{asChild:!0,size:"sm",onClick:s,children:o.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=s,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=o.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function mt(t,e){return o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const pe=[{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:q,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:J,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:q,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:K,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:q,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:K,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:q,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ce,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:K,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:J,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:K,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:q,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ce,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:q,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:De,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],V="studio.release-feed.v1",ae=new Set;let M="",L={},ie=!1;function ft(){if(ie)return M||"{}";try{return localStorage.getItem(V)??"{}"}catch{return M||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ue(){const t=ft();return t!==M&&(M=t,L=ye(t)),L}function ht(t){ae.add(t);const e=n=>{if(!(n.key!==V&&n.key!==null)){try{const s=localStorage.getItem(V)??"{}",a={...ye(s),...L};L=a,M=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function gt(t){L=t,M=JSON.stringify(t);try{localStorage.setItem(V,M),ie=!1}catch{ie=!0}ae.forEach(e=>e())}function pt(){const t=k.c(7),e=Y.useSyncExternalStore(ht,ue,ue);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const s=n,r=yt;let a;t[2]!==e?(a=pe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==s||t[5]!==i?(l={isSeen:s,markSeen:r,unseenCount:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],l}function yt(t){L[t]||gt({...L,[t]:{seenAt:new Date().toISOString()}})}const bt=720*60*60*1e3;function xt(t){const[e,n,s]=t.split("-").map(Number);return!e||!n||!s?new Date(t).getTime():new Date(e,n-1,s).getTime()}function wt(t){const e=pe[0];if(!e)return null;const n=xt(e.date),s=t-n;return s<0||s>bt?null:e}function St(){const t=k.c(21),{isSeen:e,markSeen:n}=pt();let s,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(s=wt(Date.now()),!s){a=null;break e}r=e(s.id)}t[0]=e,t[1]=s,t[2]=r,t[3]=a}else s=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==s.id||t[5]!==n?(i=()=>n(s.id),t[4]=s.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Re,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=o.jsx(z,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==s.id||t[11]!==n?(c=()=>n(s.id),m=()=>n(s.id),t[10]=s.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==s||t[15]!==c||t[16]!==m?(u=o.jsx(ut,{release:s,onCtaClick:c,onLearnMoreClick:m}),t[14]=s,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=o.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),I=be?"⌘":"Ctrl",$={keyboardShortcuts:{keys:[I,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[I,"L"],description:"Focus chat input"},saveAndFormat:{keys:[I,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[I,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[I,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",I,"S"],description:"New task"},toggleDaemon:{keys:[I,"D"],description:"Toggle daemon logs"}},jt=[{label:"General",shortcuts:[$.keyboardShortcuts,$.newTask,$.toggleDaemon]},{label:"Editor",shortcuts:[$.saveAndFormat]},{label:"Chat",shortcuts:[$.focusChatInput,$.togglePlanMode,$.sendMessage,$.newLine]},{label:"Questions",shortcuts:[$.selectOption]},{label:"Monitoring",shortcuts:[$.applyFilter]}];function vt(t){return be?t.metaKey:t.ctrlKey}function kt(t){const e=k.c(5),{open:n,onOpenChange:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Ke,{children:o.jsx(He,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(qe,{className:"sm:max-w-md",children:[r,o.jsx("div",{className:"flex flex-col gap-4",children:jt.map(Nt)})]}),e[1]=a):a=e[1];let i;return e[2]!==s||e[3]!==n?(i=o.jsx(Ue,{open:n,onOpenChange:s,children:a}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i}function Nt(t){return o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),o.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ot)})]},t.label)}function Ot(t){return o.jsxs("div",{className:"flex items-center justify-between py-1",children:[o.jsx("span",{className:"text-sm",children:t.description}),o.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_t)})]},t.description)}function _t(t){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function At({activeOrg:t}){return t&&(ve(t.id,{name:t.name??void 0,slug:t.slug??void 0}),ke()),null}function Ct(t,e,n){if(!n)return null;const s=Be(t,e);return s?s.threads.get().find(a=>a.id===n)?.branch??null:null}function xe(t){return{queryKey:re.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Xt(t){const e=k.c(10);let n;e[0]!==t?(n=xe(t),e[0]=t,e[1]=n):n=e[1];const s=oe(n);let r;e[2]!==s.data?.prompts?(r=s.data?.prompts??[],e[2]=s.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==s.data?.tiles?(a=s.data?.tiles??[],e[4]=s.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==s.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:s.isLoading,prompts:r,tiles:a},e[6]=s.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Et(t){const e=k.c(17),{orgSlug:n,orgName:s,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=Tt;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(me,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==s?(m=s?o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:s})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=s,e[6]=m):m=e[6];let u;e[7]!==m?(u=o.jsxs("div",{className:"space-y-2",children:[c,o.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=o.jsx(z,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(z,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=g):g=e[11];let y;e[12]!==p?(y=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,g]}),e[12]=p,e[13]=y):y=e[13];let f;return e[14]!==u||e[15]!==y?(f=o.jsxs(X,{children:[d,u,y]}),e[14]=u,e[15]=y,e[16]=f):f=e[16],f}function Tt(){window.location.href="/"}function $t(t){const e=k.c(8),{org:n,children:s}=t,a=Ze(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==s||e[5]!==n||e[6]!==l?(d=o.jsx(Ie,{org:n,project:l,children:s}),e[4]=s,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function zt(){const t=Ne(),e=We(),{org:n,locator:s}=Oe(),r=he({strict:!1}),a=_e({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,h,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:h,replace:b}),c=(f,h=!0)=>d(l,f,h),m=f=>c(h=>({...h,chat:f?1:0})),u=(f,h,b)=>d(f,S=>{const x={chat:1};h?x.virtualmcpid=h:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid);const v=S.main;return v&&typeof v=="string"&&!Je(v)&&(x.main=v),b?.autosend&&(x.autosend=Ye),x},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const h=crypto.randomUUID(),b=f??a.virtualmcpid??Qe(n.id).id,x=b===a.virtualmcpid?Ct(n.slug,s,l):null;try{await e?.create({id:h,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}u(h,b)},openTab:f=>d(l||crypto.randomUUID(),h=>({...h,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const b={...f};return delete b.main,b})}}function It(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const s=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=Y.useState(!1),d=s??"";let c;t[2]!==d?(c=xe(d),t[2]=d,t[3]=c):c=t[3];const m=!!s&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],oe(u);const{data:p}=Q.useSession(),g=p?.user?.id;let y;t[7]!==s||t[8]!==g?(y=s&&g?Ce(g,s):null,t[7]=s,t[8]=g,t[9]=y):y=t[9];const f=y;let h,b;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const j=T=>{vt(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[],t[10]=h,t[11]=b):(h=t[10],b=t[11]),Y.useEffect(h,b);let S;t[12]!==s?(S=re.activeOrganization(s),t[12]=s,t[13]=S):S=t[13];let x;t[14]!==s||t[15]!==g?(x=async()=>{if(!s)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Q.organization.getFullOrganization({query:{organizationSlug:s}}).finally(Mt),T=le(j);return j&&!T&&localStorage.setItem(H.lastOrgSlug(),s),g&&j&&Te(g,s,j),j},t[14]=s,t[15]=g,t[16]=x):x=t[16];const v=f?f.data:void 0,_=f?.updatedAt;let N;t[17]!==x||t[18]!==v||t[19]!==_||t[20]!==S?(N={queryKey:S,queryFn:x,initialData:v,initialDataUpdatedAt:_,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=x,t[18]=v,t[19]=_,t[20]=S,t[21]=N):N=t[21];const{data:w}=fe(N),A=w?.id,C=w?.slug,{data:E}=et(A,C),O=A??"",ee=C??"";let F;t[22]!==O||t[23]!==ee?(F=Ve({connectionId:Xe,orgId:O,orgSlug:ee}),t[22]=O,t[23]=ee,t[24]=F):F=t[24];const te=!!A&&!!C;let U;if(t[25]!==F||t[26]!==te?(U={...F,enabled:te},t[25]=F,t[26]=te,t[27]=U):U=t[27],oe(U),!w){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx($e,{}),t[28]=j):j=t[28];let T;return t[29]!==s?(T=o.jsx(Y.Suspense,{fallback:j,children:o.jsx(dt,{orgSlug:s})}),t[29]=s,t[30]=T):T=t[30],T}if(le(w)){localStorage.getItem(H.lastOrgSlug())===s&&localStorage.removeItem(H.lastOrgSlug());let j;return t[31]!==w.name?(j=o.jsx(Ee,{orgName:w.name}),t[31]=w.name,t[32]=j):j=t[32],j}if(E?.ssoRequired&&!E.authenticated){let j;return t[33]!==w.id||t[34]!==w.name||t[35]!==w.slug||t[36]!==E.domain?(j=o.jsx(Et,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:E.domain}),t[33]=w.id,t[34]=w.name,t[35]=w.slug,t[36]=E.domain,t[37]=j):j=t[37],j}const ne=w.logo??null;let P;t[38]!==w||t[39]!==ne?(P={...w,logo:ne},t[38]=w,t[39]=ne,t[40]=P):P=t[40];let D;t[41]!==w?(D=o.jsx(At,{activeOrg:w}),t[41]=w,t[42]=D):D=t[42];let G,B;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=o.jsx(ze,{}),B=o.jsx(St,{}),t[43]=G,t[44]=B):(G=t[43],B=t[44]);let R;t[45]!==i?(R=o.jsx(kt,{open:i,onOpenChange:l}),t[45]=i,t[46]=R):R=t[46];let W;return t[47]!==P||t[48]!==D||t[49]!==R?(W=o.jsxs($t,{org:P,children:[D,G,B,R]}),t[47]=P,t[48]=D,t[49]=R,t[50]=W):W=t[50],W}function Mt(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Lt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Ge,{children:o.jsx(It,{})}),t[0]=e):e=t[0],e}const Zt=Object.freeze(Object.defineProperty({__proto__:null,default:Lt,usePanelActions:zt},Symbol.toStringTag,{value:"Module"}));export{$ as K,pe as R,pt as a,ut as b,Xt as c,xe as h,vt as i,Ct as r,Zt as s,zt as u};
@@ -0,0 +1 @@
1
+ import{e as N,c as K,j as s,l as Wt,r as O,t as Z,p as fe,b as Ce,T as _s,K as Vt,m as qt,f as Te,g as Ns,d as zn,I as Pn,U as Rn,W as Dn,P as En,R as Fn,H as Gn,G as Bn,a as Ln,B as $t,X as Hn,Y as Un,n as Ae,Z as Kn,$ as Wn,a0 as Vn,F as qn,a1 as Yn,a2 as Xn,a3 as Qn,a4 as Zn,a5 as xt,a6 as Jn,a7 as er,a8 as tr,a9 as sr,aa as nr,ab as rr,ac as Cs,ad as or,ae as ir,af as lr,ag as ar,ah as cr,ai as dr,aj as ur,ak as mr,al as fr,am as xr,an as hr,o as pr,E as ws}from"./index-CR2BsklH.js";import{u as gr}from"./useRouterState-D4-J_KM9.js";import{c as br,i as jr,a as vr}from"./ZoomOut-CiW88kaG.js";import{u as Xe,c as xe,d as ke,e as zt,f as Pt,g as $e,h as ks,i as Is,j as yr,k as Sr,l as Lt}from"./sidebar-B1ZxuBN_.js";import{T as we}from"./toolbar-D1E6jsA-.js";import{u as Ms,T as We,a as Ve,b as qe,c as ts}from"./tooltip-CLG87qyy.js";import{S as _e}from"./skeleton-DJEW9jDp.js";import{P as Rt,a as ut,b as Dt}from"./popover-BTmtXv14.js";import{b as As,a as $s,D as Os}from"./drawer-iJuY2KNl.js";import{i as Ts}from"./SearchMd-DZ6aIwIg.js";import{s as _r}from"./Star01-Co_EFaK6.js";import{s as Ne}from"./Plus-DW0XqVol.js";import{i as Nr,g as Cr}from"./use-mcp-client-WRUNhji3.js";import{a as zs,u as ht,b as wr}from"./use-virtual-mcp-CYog3nxZ.js";import{u as kr}from"./use-create-virtual-mcp-BjqcuHoP.js";import{I as Ir,a as Mr,u as Ar,W as $r,H as Or,S as Tr,G as zr}from"./github-repo-picker-CLz-6KHT.js";import{A as Oe,W as ss,X as ns,Y as Ps,Z as Pr,_ as Rr,$ as Dr}from"./agent-icon-CR2BOYIt.js";import{u as Rs,d as Er,k as Ds}from"./tab-id-DF4EtVz0.js";import{r as Fr,a as Gr,R as Br,b as Lr,u as Es}from"./shell-layout-CVwlRsIR.js";import{u as Hr,a as Ur,b as Kr,s as Wr,c as Vr,r as qr,d as Yr,e as Xr,f as Qr,p as Zr,T as Fs,g as Jr,h as eo,i as to,j as so,k as no,l as ro,m as oo,n as io,S as rs,o as Gs}from"./use-navigate-to-agent-S7VbkvxA.js";import{A as os}from"./avatar-CdZJe3C8.js";import{i as Bs}from"./Check-CQSOJf1l.js";import{a as is}from"./Eye-CJqEY9Bp.js";import{n as lo,i as ao}from"./Globe01-CZ8FVUUU.js";import{i as co,a as Ls}from"./ZapSquare-CBHt5u2b.js";import{i as uo}from"./Monitor01-BKcboobL.js";import{n as mo,a as fo}from"./Sun-D3s8g6wD.js";import{a as pt}from"./Settings02-D5me1w67.js";import{i as xo}from"./Shield01-kWYSVjnp.js";import{a as ho}from"./Users03-CIMcoZEN.js";import{s as Hs}from"./XClose-SVLNQiVU.js";import{f as po,a as go,b as bo,c as jo,d as vo,e as yo,A as So}from"./alert-dialog-BN8wMw1R.js";import{F as _o,a as No,b as Co,c as wo,d as ko,e as Io,f as Mo}from"./form-3ozPMiDy.js";import{I as Ao}from"./input-BXKnvLhL.js";import{S as $o}from"./spinner-CDjEeRHa.js";import"./index-7nVwqMEY.js";import{i as Oo,a as To}from"./RefreshCcw01-Csm4yVOO.js";import{n as Yt}from"./Stars02-C-4orbjJ.js";import{u as Us,A as Ks,g as zo,a as Po,b as ls,K as Ro,P as Do,s as Eo,S as Fo,v as Go,D as Bo,c as Lo,d as Ho,C as Uo}from"./sortable.esm-LeLAN_LP.js";import{i as Xt}from"./ChevronRight-Bwn2E0SF.js";import{i as Ko}from"./FilterLines-B_l1Wkux.js";import{t as Wo}from"./Users01-j12rIRFD.js";import{b as as,c as Ws,S as cs,a as ds,d as us}from"./select-BFSfYXlX.js";import{b as Vo,c as qo,e as Yo,a as Xo,D as Qo}from"./dialog-DDaCuEXe.js";import{C as Zo,e as Jo,c as ei,d as ti,b as si}from"./command-BWTUFK3g.js";import{u as Vs}from"./studio-tools-BgmLlqq0.js";import{i as qs}from"./Zap-Bgg4Oev9.js";import{u as ni}from"./use-org-auth-client-CSi9369v.js";import{H as ri,a as oi,b as ii}from"./hover-card-BdET2LVl.js";import{g as li,S as ai}from"./task-status-Do0N2yEZ.js";import{u as ci,f as di}from"./use-clock-tick-dBvSZsql.js";import{t as Ys}from"./ChevronDown-DaBswAjS.js";function ui(t){const e=N.c(21),{value:n,onChange:r,placeholder:o,onKeyDown:i,className:a,isSearching:l,disabled:c}=t,d=o===void 0?"Search...":o;let u;e[0]!==a?(u=K("shrink-0 w-full border-b border-border h-12",a),e[0]=a,e[1]=u):u=e[1];const m=c?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==m?(f=K("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==l?(g=l?s.jsx(Wt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(Ts,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=l,e[5]=g):g=e[5];let p;e[6]!==r?(p=j=>r(j.target.value),e[6]=r,e[7]=p):p=e[7];let x;e[8]!==c||e[9]!==i||e[10]!==d||e[11]!==p||e[12]!==n?(x=s.jsx("input",{type:"text",value:n,onChange:p,onKeyDown:i,placeholder:d,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=d,e[11]=p,e[12]=n,e[13]=x):x=e[13];let h;e[14]!==f||e[15]!==g||e[16]!==x?(h=s.jsxs("label",{className:f,children:[g,x]}),e[14]=f,e[15]=g,e[16]=x,e[17]=h):h=e[17];let v;return e[18]!==u||e[19]!==h?(v=s.jsx("div",{className:u,children:h}),e[18]=u,e[19]=h,e[20]=v):v=e[20],v}const mi="Select an existing agent";function fi(t){const e=N.c(5),{children:n}=t;let r;e[0]!==n?(r=s.jsx(We,{asChild:!0,children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ve,{side:"right",sideOffset:8,children:mi}),e[2]=o):o=e[2];let i;return e[3]!==r?(i=s.jsxs(qe,{defaultOpen:!0,delayDuration:0,children:[r,o]}),e[3]=r,e[4]=i):i=e[4],i}function xi(){const t=N.c(5),{enableDecoImport:e}=_s(),{data:n}=Ce.useSession();let r;t[0]!==n?.user?.email?(r=Vt.decoProfile(n?.user?.email),t[0]=n?.user?.email,t[1]=r):r=t[1];const o=!!e&&!!n?.user?.email;let i;t[2]!==r||t[3]!==o?(i={queryKey:r,queryFn:hi,enabled:o,staleTime:3e5},t[2]=r,t[3]=o,t[4]=i):i=t[4];const{data:a}=qt(i);return a?.isDecoUser??!1}async function hi(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function pi(t){const e=Te(),{create:n}=Rs(),{locator:r}=fe(),o=Ns({strict:!1}),i=zn({strict:!1});return async a=>{const l=crypto.randomUUID(),c=a===i.virtualmcpid?Fr(t,r,o.taskId??""):null;try{await n({id:l,virtual_mcp_id:a,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:l},search:{virtualmcpid:a}})}}function gi(t){const e=N.c(9),{agent:n,onClick:r}=t;let o;e[0]!==n.icon||e[1]!==n.title?(o=s.jsx(Oe,{icon:n.icon,name:n.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=n.icon,e[1]=n.title,e[2]=o):o=e[2];let i;e[3]!==n.title?(i=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:n.title}),e[3]=n.title,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==o||e[7]!==i?(a=s.jsxs("button",{type:"button",onClick:r,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[o,i]}),e[5]=r,e[6]=o,e[7]=i,e[8]=a):a=e[8],a}function bi(t){const e=N.c(65),{onClose:n,onOpenImportDeco:r,onOpenGithubImport:o}=t,[i,a]=O.useState(""),l=zs(),{org:c}=fe(),{data:d}=Ce.useSession(),u=d?.user?.id??"anon",m=l.filter(yi).map(vi),f=Ur();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={navigateOnCreate:!0},e[0]=g):g=e[0];const{createVirtualMCP:p,isCreating:x}=kr(g),{createFromTemplate:h,isCreating:v}=Ar(),j=xi(),y=pi(c.slug),b=i.toLowerCase(),S=l.filter(ji).filter(le=>!i||le.title.toLowerCase().includes(b)),k=le=>{Kr({orgId:c.id,userId:u},le.id,m),f(),n(),a(""),y(le.id)},_="flex flex-col max-h-[min(640px,80dvh)]";let C;e[1]!==i?(C=s.jsx(ui,{value:i,onChange:a,placeholder:"Search agents..."}),e[1]=i,e[2]=C):C=e[2];const I="overflow-y-auto flex-1 min-h-0 px-3 pb-3";let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("div",{className:"px-1 pt-3 pb-2",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[3]=A):A=e[3];const P="grid grid-cols-3 gap-1";let $;e[4]!==p||e[5]!==n?($=async()=>{Z("agent_create_new_clicked",{source:"browse_popover"}),await p(),n()},e[4]=p,e[5]=n,e[6]=$):$=e[6];let w,z;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Ne,{size:16,className:"text-muted-foreground"})}),z=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[7]=w,e[8]=z):(w=e[7],z=e[8]);let H;e[9]!==x||e[10]!==$?(H=s.jsxs("button",{type:"button",disabled:x,onClick:$,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[w,z]}),e[9]=x,e[10]=$,e[11]=H):H=e[11];let T;e[12]!==h||e[13]!==n?(T=async()=>{Z("agent_create_clicked",{source:"browse_popover",method:"website"}),await h($r),n()},e[12]=h,e[13]=n,e[14]=T):T=e[14];let B,R;e[15]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(_r,{className:"size-5 text-muted-foreground"})}),R=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Start Website"}),e[15]=B,e[16]=R):(B=e[15],R=e[16]);let L;e[17]!==v||e[18]!==T?(L=s.jsxs("button",{type:"button",disabled:v,onClick:T,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[B,R]}),e[17]=v,e[18]=T,e[19]=L):L=e[19];let D;e[20]!==h||e[21]!==n?(D=async()=>{Z("agent_create_clicked",{source:"browse_popover",method:"hydrogen"}),await h(Or),n()},e[20]=h,e[21]=n,e[22]=D):D=e[22];let G,F;e[23]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:Tr,alt:"",className:"size-5 object-contain"})}),F=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Shopify Headless Store"}),e[23]=G,e[24]=F):(G=e[23],F=e[24]);let E;e[25]!==v||e[26]!==D?(E=s.jsxs("button",{type:"button",disabled:v,onClick:D,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[G,F]}),e[25]=v,e[26]=D,e[27]=E):E=e[27];let W;e[28]!==n||e[29]!==o?(W=()=>{Z("agent_import_clicked",{source:"github"}),o(),n()},e[28]=n,e[29]=o,e[30]=W):W=e[30];let V,X;e[31]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(zr,{className:"size-5 text-muted-foreground"})}),X=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"}),e[31]=V,e[32]=X):(V=e[31],X=e[32]);let re;e[33]!==W?(re=s.jsxs("button",{type:"button",onClick:W,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[V,X]}),e[33]=W,e[34]=re):re=e[34];let Y;e[35]!==j||e[36]!==n||e[37]!==r?(Y=j&&s.jsxs("button",{type:"button",onClick:()=>{Z("agent_import_clicked",{source:"deco"}),r(),n()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"",className:"size-5 object-contain"})}),s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import deco.cx"})]}),e[35]=j,e[36]=n,e[37]=r,e[38]=Y):Y=e[38];const oe=S.map(le=>s.jsx(gi,{agent:le,onClick:()=>k(le)},le.id));let q;e[39]!==H||e[40]!==L||e[41]!==E||e[42]!==re||e[43]!==Y||e[44]!==oe?(q=s.jsxs("div",{className:P,children:[H,L,E,re,Y,oe]}),e[39]=H,e[40]=L,e[41]=E,e[42]=re,e[43]=Y,e[44]=oe,e[45]=q):q=e[45];let J;e[46]!==x||e[47]!==i||e[48]!==S.length?(J=S.length===0&&!x&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[46]=x,e[47]=i,e[48]=S.length,e[49]=J):J=e[49];let Q;e[50]!==q||e[51]!==J||e[52]!==A?(Q=s.jsxs("div",{className:I,children:[A,q,J]}),e[50]=q,e[51]=J,e[52]=A,e[53]=Q):Q=e[53];let ee;e[54]!==c.slug?(ee={org:c.slug},e[54]=c.slug,e[55]=ee):ee=e[55];let te;e[56]!==n?(te=()=>n(),e[56]=n,e[57]=te):te=e[57];let se;e[58]!==ee||e[59]!==te?(se=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Pn,{to:"/$org/settings/agents",params:ee,onClick:te,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[58]=ee,e[59]=te,e[60]=se):se=e[60];let ie;return e[61]!==Q||e[62]!==C||e[63]!==se?(ie=s.jsxs("div",{className:_,children:[C,Q,se]}),e[61]=Q,e[62]=C,e[63]=se,e[64]=ie):ie=e[64],ie}function ji(t){return!Nr(t.id)}function vi(t){return t.id}function yi(t){return t.pinned}function Xs(t){const e=N.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:r}=n,o=r===void 0?!1:r,[i,a]=O.useState(!1),[l,c]=O.useState(!1),[d,u]=O.useState(!1),m=Ms(),{setOpenMobile:f}=Xe(),g=Hr(),p=g?"border border-border":void 0;let x;e[2]!==g?(x=I=>g?s.jsx(fi,{children:I}):I,e[2]=g,e[3]=x):x=e[3];const h=x;let v;e[4]!==m||e[5]!==f?(v=()=>{a(!1),m&&f(!1)},e[4]=m,e[5]=f,e[6]=v):v=e[6];const j=v;let y;e[7]!==j||e[8]!==i?(y=i&&s.jsx(O.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(_e,{className:"h-4 w-24"})}),children:s.jsx(bi,{onClose:j,onOpenImportDeco:()=>c(!0),onOpenGithubImport:()=>{u(!0),j()}})}),e[7]=j,e[8]=i,e[9]=y):y=e[9];const b=y;let S;e[10]!==o||e[11]!==p||e[12]!==g||e[13]!==m||e[14]!==i||e[15]!==b||e[16]!==h?(S=m?s.jsxs(s.Fragment,{children:[o?h(s.jsx(we,{"aria-label":"Browse agents",className:K(p),onClick:()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),a(!0)},children:s.jsx(Ne,{className:"size-4"})})):s.jsx(xe,{children:h(s.jsxs(ke,{tooltip:g?void 0:"Browse agents",className:K(p),onClick:()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),a(!0)},children:[s.jsx(Ne,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(As,{open:i,onOpenChange:a,direction:"bottom",children:s.jsxs($s,{className:"max-h-[85dvh] p-0",children:[s.jsx(Os,{className:"sr-only",children:"Browse agents"}),b]})})]}):s.jsxs(Rt,{open:i,onOpenChange:I=>{I&&!i&&Z("agent_browser_opened",{surface:"desktop_popover"}),a(I)},children:[o?h(s.jsx(ut,{asChild:!0,children:s.jsx(we,{"aria-label":"Browse agents",className:K(p),children:s.jsx(Ne,{className:"size-4"})})})):s.jsx(xe,{children:h(s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:g?void 0:"Browse agents",className:K(p),children:[s.jsx(Ne,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Dt,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:b})]}),e[10]=o,e[11]=p,e[12]=g,e[13]=m,e[14]=i,e[15]=b,e[16]=h,e[17]=S):S=e[17];let k;e[18]!==l?(k=s.jsx(Ir,{open:l,onOpenChange:c}),e[18]=l,e[19]=k):k=e[19];let _;e[20]!==d?(_=s.jsx(Mr,{open:d,onOpenChange:u}),e[20]=d,e[21]=_):_=e[21];let C;return e[22]!==S||e[23]!==k||e[24]!==_?(C=s.jsxs(s.Fragment,{children:[S,k,_]}),e[22]=S,e[23]=k,e[24]=_,e[25]=C):C=e[25],C}function Qs(){const t=N.c(24),{org:e}=fe(),n=Te(),o=gr().location.pathname,i=e.slug,{state:a,isMobile:l}=Xe(),c=!l&&a==="collapsed";let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(br,{className:"size-4!"}),t[0]=d):d=t[0];const u=o===`/${i}`||o===`/${i}/`;let m;t[1]!==n||t[2]!==i?(m=()=>{n({to:"/$org",params:{org:i}})},t[1]=n,t[2]=i,t[3]=m):m=t[3];let f;t[4]!==u||t[5]!==m?(f={key:"home",label:"Home",icon:d,isActive:u,onClick:m},t[4]=u,t[5]=m,t[6]=f):f=t[6];const g=f;let p;t[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(jr,{className:"size-4!"}),t[7]=p):p=t[7];let x;t[8]!==o||t[9]!==i?(x=o.startsWith(`/${i}/files`),t[8]=o,t[9]=i,t[10]=x):x=t[10];let h;t[11]!==n||t[12]!==i?(h=()=>{n({to:"/$org/files",params:{org:i}})},t[11]=n,t[12]=i,t[13]=h):h=t[13];let v;t[14]!==x||t[15]!==h?(v={key:"files",label:"Library",icon:p,isActive:x,onClick:h},t[14]=x,t[15]=h,t[16]=v):v=t[16];const j=v;let y;t[17]!==j||t[18]!==g?(y={type:"items",items:[g,j]},t[17]=j,t[18]=g,t[19]=y):y=t[19];let b;if(t[20]!==c||t[21]!==y){if(b=[y],c){let S;t[23]===Symbol.for("react.memo_cache_sentinel")?(S={type:"custom",key:"new-task",content:s.jsx(zt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Pt,{children:s.jsx($e,{className:"gap-1.5",children:s.jsx(Xs,{})})})})},t[23]=S):S=t[23],b.push(S)}t[20]=c,t[21]=y,t[22]=b}else b=t[22];return b}function Ot(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,orientation:o,decorative:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const a=o===void 0?"horizontal":o,l=i===void 0?!0:i;let c;e[5]!==n?(c=K("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==a||e[9]!==r||e[10]!==c?(d=s.jsx(Rn,{"data-slot":"separator-root",decorative:l,orientation:a,className:c,...r}),e[7]=l,e[8]=a,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}function Zs(t){const e=N.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=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]=r):r=e[0];let o;return e[1]!==n?(o=s.jsxs(zt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[r,s.jsx(Pt,{children:s.jsx($e,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Js(t){const e=N.c(18),{item:n}=t,{isMobile:r,setOpenMobile:o}=Xe();let i;e[0]!==r||e[1]!==n||e[2]!==o?(i=()=>{Z("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:r}),n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=i):i=e[3];const a=i,l=n.key,c=n.isActive&&"z-10";let d;e[4]!==c?(d=K(c),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==a||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(ke,{onClick:a,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=a,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==d||e[16]!==m?(f=s.jsx(xe,{className:d,children:m},l),e[14]=n.key,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Si(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ks,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(Ni),e[2]=n.group.items,e[3]=i):i=e[3];let a;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(a=s.jsx(Zs,{label:r,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=a):a=e[7],a}case"items":{let r;e[8]!==n.items?(r=n.items.map(_i),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(zt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Pt,{children:s.jsx($e,{className:"gap-1.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}case"custom":return n.content}}function _i(t){return s.jsx(Js,{item:t},t.key)}function Ni(t){return s.jsx(Js,{item:t},t.key)}function Ci(t){const e=N.c(14),{sections:n,footer:r,additionalContent:o,variant:i,contentClassName:a}=t,l=i===void 0?"sidebar":i;let c;e[0]!==a?(c=K("flex flex-col flex-1 px-2 py-2 gap-0.5",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==n?(d=n.map(wi),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==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[4]=o,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==d||e[8]!==u?(m=s.jsxs(Is,{className:c,children:[d,u]}),e[6]=c,e[7]=d,e[8]=u,e[9]=m):m=e[9];let f;return e[10]!==r||e[11]!==m||e[12]!==l?(f=s.jsxs(yr,{variant:l,children:[m,r]}),e[10]=r,e[11]=m,e[12]=l,e[13]=f):f=e[13],f}function wi(t,e){return s.jsx(Si,{section:t},e)}function en(t){const e=N.c(2);let n;return e[0]!==t?(n=s.jsx(Ci,{...t}),e[0]=t,e[1]=n):n=e[1],n}en.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(_e,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ki(){const t=N.c(7),n=_s().logo??Dn,r=typeof n=="string"?n:n.light,o=typeof n=="string"?n:n.dark;let i;t[0]!==r?(i=s.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=r,t[1]=i):i=t[1];let a;t[2]!==o?(a=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=o,t[3]=a):a=t[3];let l;return t[4]!==i||t[5]!==a?(l=s.jsxs(Sr,{className:"flex flex-row items-center shrink-0 h-12 px-3 pb-0",children:[i,a]}),t[4]=i,t[5]=a,t[6]=l):l=t[6],l}function ms(t){const e=N.c(18),{item:n,onClose:r}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=K(o),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==n||e[3]!==r?(a=()=>{n.onClick?.(),r()},e[2]=n,e[3]=r,e[4]=a):a=e[4];let l;e[5]!==n.icon?(l=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=l):l=e[6];let c;e[7]!==n.label?(c=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=c):c=e[8];let d;e[9]!==n.isActive||e[10]!==n.label||e[11]!==a||e[12]!==l||e[13]!==c?(d=s.jsxs(ke,{onClick:a,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[l,c]}),e[9]=n.isActive,e[10]=n.label,e[11]=a,e[12]=l,e[13]=c,e[14]=d):d=e[14];let u;return e[15]!==i||e[16]!==d?(u=s.jsx(xe,{className:i,children:d}),e[15]=i,e[16]=d,e[17]=u):u=e[17],u}function Ii(t){const e=N.c(18),{section:n,onClose:r}=t;switch(n.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=n.group.label,i=n.group.defaultExpanded;let a;if(e[2]!==r||e[3]!==n.group.items){let c;e[5]!==r?(c=d=>s.jsx(ms,{item:d,onClose:r},d.key),e[5]=r,e[6]=c):c=e[6],a=n.group.items.map(c),e[2]=r,e[3]=n.group.items,e[4]=a}else a=e[4];let l;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==a?(l=s.jsx(Zs,{label:o,defaultExpanded:i,children:a}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=a,e[10]=l):l=e[10],l}case"items":{let o;if(e[11]!==r||e[12]!==n.items){let a;e[14]!==r?(a=l=>s.jsx(ms,{item:l,onClose:r},l.key),e[14]=r,e[15]=a):a=e[15],o=n.items.map(a),e[11]=r,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(zt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Pt,{children:s.jsx($e,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function Mi(t){const e=N.c(14),{sections:n,onClose:r,footer:o,additionalContent:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(O.Suspense,{fallback:s.jsx("div",{className:"h-10 shrink-0"}),children:s.jsx(ki,{})}),e[0]=a):a=e[0];let l;if(e[1]!==r||e[2]!==n){let m;e[4]!==r?(m=(f,g)=>s.jsx(Ii,{section:f,onClose:r},g),e[4]=r,e[5]=m):m=e[5],l=n.map(m),e[1]=r,e[2]=n,e[3]=l}else l=e[3];let c;e[6]!==i?(c=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[6]=i,e[7]=c):c=e[7];let d;e[8]!==l||e[9]!==c?(d=s.jsxs(Is,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[l,c]}),e[8]=l,e[9]=c,e[10]=d):d=e[10];let u;return e[11]!==o||e[12]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,d,o]}),e[11]=o,e[12]=d,e[13]=u):u=e[13],u}function tn(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ai=En({name:Fn().min(2,"Organization name is required")});function $i(t){const e=N.c(41),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={resolver:Gn(Ai),defaultValues:{name:""}},e[0]=o):o=e[0];const i=Bn(o);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:Ti,onSuccess:Oi},e[1]=a):a=e[1];const l=Ln(a),c=l.error instanceof Error?l.error.message:l.error?"Failed to create organization.":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(bo,{children:[s.jsx(jo,{children:"Create a new organization"}),s.jsx(vo,{children:"Set up a new organization to collaborate with others."})]}),e[2]=d):d=e[2];let u;if(e[3]!==l||e[4]!==i){let _;e[6]!==l?(_=C=>l.mutateAsync(C),e[6]=l,e[7]=_):_=e[7],u=i.handleSubmit(_),e[3]=l,e[4]=i,e[5]=u}else u=e[5];let m;e[8]!==i.formState.isSubmitting?(m=_=>{const{field:C}=_;return s.jsxs(Co,{children:[s.jsx(wo,{children:"Organization Name"}),s.jsx(ko,{children:s.jsx(Ao,{...C,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(Io,{children:"The name of your company or organization"}),C.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",tn(C.value)]})]}),s.jsx(Mo,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=s.jsx(_o,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let g;e[13]!==c?(g=c&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,e[14]=g):g=e[14];let p;e[15]!==l||e[16]!==i?(p=()=>{l.reset(),i.reset()},e[15]=l,e[16]=i,e[17]=p):p=e[17];let x;e[18]!==i.formState.isSubmitting||e[19]!==p?(x=s.jsx(po,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=x):x=e[20];const h=!i.formState.isValid||i.formState.isSubmitting;let v;e[21]!==i.formState.isSubmitting?(v=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx($o,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=v):v=e[22];let j;e[23]!==h||e[24]!==v?(j=s.jsx($t,{type:"submit",variant:"default",disabled:h,children:v}),e[23]=h,e[24]=v,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==x?(y=s.jsxs(yo,{children:[x,j]}),e[26]=j,e[27]=x,e[28]=y):y=e[28];let b;e[29]!==y||e[30]!==u||e[31]!==f||e[32]!==g?(b=s.jsxs("form",{className:"space-y-6",onSubmit:u,autoComplete:"off",children:[f,g,y]}),e[29]=y,e[30]=u,e[31]=f,e[32]=g,e[33]=b):b=e[33];let S;e[34]!==i||e[35]!==b?(S=s.jsxs(go,{children:[d,s.jsx(No,{...i,children:b})]}),e[34]=i,e[35]=b,e[36]=S):S=e[36];let k;return e[37]!==r||e[38]!==n||e[39]!==S?(k=s.jsx(So,{open:n,onOpenChange:r,children:S}),e[37]=r,e[38]=n,e[39]=S,e[40]=k):k=e[40],k}function Oi(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Ti(t){const e=tn(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await Ce.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const r=n?.data?.slug??e;if(!r)throw new Error("Failed to create organization");return{orgSlug:r}}function Ht(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function zi(t){const e=N.c(13),{org:n,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=K(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==n.logo||e[3]!==n.name?(c=n.logo?void 0:Ht(n.name),e[2]=n.logo,e[3]=n.name,e[4]=c):c=e[4];let d;e[5]!==n.logo||e[6]!==n.name||e[7]!==a?(d=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold leading-none",a),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=a,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=s.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function wt(t){const e=N.c(22),{item:n,onClose:r}=t;if(n.href){const c=n.external?"_blank":void 0,d=n.external?"noopener noreferrer":void 0;let u;e[0]!==n.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=u):u=e[1];let m;e[2]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=m):m=e[3];let f;return e[4]!==n.href||e[5]!==r||e[6]!==c||e[7]!==d||e[8]!==u||e[9]!==m?(f=s.jsxs("a",{href:n.href,target:c,rel:d,className:"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",onClick:r,children:[u,m]}),e[4]=n.href,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m,e[10]=f):f=e[10],f}let o;e[11]!==n||e[12]!==r?(o=()=>{n.onClick?.(),r()},e[11]=n,e[12]=r,e[13]=o):o=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let a;e[16]!==n.label?(a=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=a):a=e[17];let l;return e[18]!==o||e[19]!==i||e[20]!==a?(l=s.jsxs("button",{type:"button",onClick:o,className:"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",children:[i,a]}),e[18]=o,e[19]=i,e[20]=a,e[21]=l):l=e[21],l}function fs(t){const e=N.c(31),{orgParam:n,onSelectOrg:r,onCreateOrg:o}=t,{data:i}=Vn();let a;e[0]!==n?(a=(w,z)=>w.slug===n?-1:z.slug===n?1:w.name.localeCompare(z.name),e[0]=n,e[1]=a):a=e[1];const l=[...i??[]].sort(a),[c,d]=O.useState(!1),[u,m]=O.useState(""),f=u.toLowerCase(),g=f?l.filter(w=>w.name.toLowerCase().includes(f)||w.slug.toLowerCase().includes(f)):l;let p;e[2]!==c?(p=function(){c&&m(""),d(Pi)},e[2]=c,e[3]=p):p=e[3];const x=p;let h;e[4]!==u||e[5]!==c||e[6]!==x?(h=c?s.jsx("input",{autoFocus:!0,type:"text",value:u,onChange:w=>m(w.target.value),onKeyDown:w=>w.key==="Escape"&&x(),placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}):s.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[4]=u,e[5]=c,e[6]=x,e[7]=h):h=e[7];let v;e[8]!==c?(v=c?s.jsx(Hs,{size:16}):s.jsx(Ts,{size:16}),e[8]=c,e[9]=v):v=e[9];let j;e[10]!==v||e[11]!==x?(j=s.jsx("button",{type:"button",onClick:x,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:v}),e[10]=v,e[11]=x,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ne,{size:16}),e[13]=y):y=e[13];let b;e[14]!==o?(b=s.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:y}),e[14]=o,e[15]=b):b=e[15];let S;e[16]!==j||e[17]!==b?(S=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,b]}),e[16]=j,e[17]=b,e[18]=S):S=e[18];let k;e[19]!==h||e[20]!==S?(k=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[h,S]}),e[19]=h,e[20]=S,e[21]=k):k=e[21];const _="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",C=g.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:u?`No organizations match "${u}"`:"No organizations available"});let I;e[22]!==r||e[23]!==n?(I=w=>s.jsxs("button",{type:"button",onClick:()=>r(w.slug),className:K("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",w.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(zi,{org:w,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:w.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:w.slug})]}),w.slug===n&&s.jsx(Bs,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},w.id),e[22]=r,e[23]=n,e[24]=I):I=e[24];const A=g.map(I);let P;e[25]!==C||e[26]!==A?(P=s.jsxs("div",{className:_,children:[C,A]}),e[25]=C,e[26]=A,e[27]=P):P=e[27];let $;return e[28]!==P||e[29]!==k?($=s.jsxs(s.Fragment,{children:[k,P]}),e[28]=P,e[29]=k,e[30]=$):$=e[30],$}function Pi(t){return!t}function xs(t){const e=N.c(142),{user:n,userImage:r,menuItems:o,signOutItem:i,themeOptions:a,preferences:l,setPreferences:c,orgParam:d,onSelectOrg:u,onCreateOrg:m,close:f,isMobile:g,open:p}=t;if(g){const q=n?.name??"U";let J;e[0]!==q||e[1]!==r?(J=s.jsx(os,{url:r,fallback:q,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=q,e[1]=r,e[2]=J):J=e[2];const Q=n?.name??"User";let ee;e[3]!==Q?(ee=s.jsx("p",{className:"text-sm font-medium truncate",children:Q}),e[3]=Q,e[4]=ee):ee=e[4];const te=n?.email;let se;e[5]!==te?(se=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:te}),e[5]=te,e[6]=se):se=e[6];let ie;e[7]!==ee||e[8]!==se?(ie=s.jsxs("div",{className:"flex-1 min-w-0",children:[ee,se]}),e[7]=ee,e[8]=se,e[9]=ie):ie=e[9];let le;e[10]!==n?(le=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fi)},e[10]=n,e[11]=le):le=e[11];let Ie;e[12]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(is,{size:14}),e[12]=Ie):Ie=e[12];let ze;e[13]!==le?(ze=s.jsx(We,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:le,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:Ie})}),e[13]=le,e[14]=ze):ze=e[14];let Pe;e[15]===Symbol.for("react.memo_cache_sentinel")?(Pe=s.jsx(Ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=Pe):Pe=e[15];let he;e[16]!==ze?(he=s.jsx(ts,{delayDuration:300,children:s.jsxs(qe,{children:[ze,Pe]})}),e[16]=ze,e[17]=he):he=e[17];let Re;e[18]!==he||e[19]!==J||e[20]!==ie?(Re=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,ie,he]}),e[18]=he,e[19]=J,e[20]=ie,e[21]=Re):Re=e[21];const mt=String(p);let De;e[22]!==m||e[23]!==u||e[24]!==d||e[25]!==mt?(De=s.jsx("div",{className:"border-b border-border pb-2",children:s.jsx(fs,{orgParam:d,onSelectOrg:u,onCreateOrg:m},mt)}),e[22]=m,e[23]=u,e[24]=d,e[25]=mt,e[26]=De):De=e[26];let Ee;if(e[27]!==f||e[28]!==o){let de;e[30]!==f?(de=He=>s.jsx(wt,{item:He,onClose:f},He.key),e[30]=f,e[31]=de):de=e[31],Ee=o.map(de),e[27]=f,e[28]=o,e[29]=Ee}else Ee=e[29];let Me;e[32]!==f||e[33]!==i?(Me=s.jsx(wt,{item:i,onClose:f}),e[32]=f,e[33]=i,e[34]=Me):Me=e[34];let ae;e[35]!==Ee||e[36]!==Me?(ae=s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[Ee,Me]}),e[35]=Ee,e[36]=Me,e[37]=ae):ae=e[37];let Fe;e[38]!==De||e[39]!==ae?(Fe=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[De,ae]}),e[38]=De,e[39]=ae,e[40]=Fe):Fe=e[40];let Ge;if(e[41]!==l.theme||e[42]!==c||e[43]!==a){let de;e[45]!==l.theme||e[46]!==c?(de=He=>{const{value:ye,icon:Ue,label:Ke}=He;return s.jsx("button",{type:"button","aria-label":Ke,onClick:()=>c(Qe=>({...Qe,theme:ye})),className:K("size-8 rounded-md flex items-center justify-center transition-colors",l.theme===ye?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Ue},ye)},e[45]=l.theme,e[46]=c,e[47]=de):de=e[47],Ge=a.map(de),e[41]=l.theme,e[42]=c,e[43]=a,e[44]=Ge}else Ge=e[44];let Ye;e[48]!==Ge?(Ye=s.jsx("div",{className:"flex items-center gap-0.5",children:Ge}),e[48]=Ge,e[49]=Ye):Ye=e[49];const ft=l.enableSounds?"Disable sounds":"Enable sounds";let be;e[50]!==c?(be=()=>c(Ei),e[50]=c,e[51]=be):be=e[51];const je=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let ue;e[52]!==je?(ue=K("size-8 rounded-md flex items-center justify-center transition-colors",je),e[52]=je,e[53]=ue):ue=e[53];let pe;e[54]!==l.enableSounds?(pe=l.enableSounds?s.jsx(ss,{size:14}):s.jsx(ns,{size:14}),e[54]=l.enableSounds,e[55]=pe):pe=e[55];let me;e[56]!==ft||e[57]!==be||e[58]!==ue||e[59]!==pe?(me=s.jsx("button",{type:"button","aria-label":ft,onClick:be,className:ue,children:pe}),e[56]=ft,e[57]=be,e[58]=ue,e[59]=pe,e[60]=me):me=e[60];let Be;e[61]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.35.0"]}),e[61]=Be):Be=e[61];let ge;e[62]!==me?(ge=s.jsxs("div",{className:"flex items-center gap-2",children:[me,Be]}),e[62]=me,e[63]=ge):ge=e[63];let ve;e[64]!==Ye||e[65]!==ge?(ve=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ye,ge]}),e[64]=Ye,e[65]=ge,e[66]=ve):ve=e[66];let Le;return e[67]!==Re||e[68]!==Fe||e[69]!==ve?(Le=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[Re,Fe,ve]}),e[67]=Re,e[68]=Fe,e[69]=ve,e[70]=Le):Le=e[70],Le}const x=n?.name??"U";let h;e[71]!==x||e[72]!==r?(h=s.jsx(os,{url:r,fallback:x,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=x,e[72]=r,e[73]=h):h=e[73];const v=n?.name??"User";let j;e[74]!==v?(j=s.jsx("p",{className:"text-sm font-medium truncate",children:v}),e[74]=v,e[75]=j):j=e[75];const y=n?.email;let b;e[76]!==y?(b=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[76]=y,e[77]=b):b=e[77];let S;e[78]!==j||e[79]!==b?(S=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,b]}),e[78]=j,e[79]=b,e[80]=S):S=e[80];let k;e[81]!==n?(k=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Di)},e[81]=n,e[82]=k):k=e[82];let _;e[83]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(is,{size:14}),e[83]=_):_=e[83];let C;e[84]!==k?(C=s.jsx(We,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:k,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[84]=k,e[85]=C):C=e[85];let I;e[86]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=I):I=e[86];let A;e[87]!==C?(A=s.jsx(ts,{delayDuration:300,children:s.jsxs(qe,{children:[C,I]})}),e[87]=C,e[88]=A):A=e[88];let P;e[89]!==A||e[90]!==h||e[91]!==S?(P=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[h,S,A]}),e[89]=A,e[90]=h,e[91]=S,e[92]=P):P=e[92];let $;if(e[93]!==f||e[94]!==o){let q;e[96]!==f?(q=J=>s.jsx(wt,{item:J,onClose:f},J.key),e[96]=f,e[97]=q):q=e[97],$=o.map(q),e[93]=f,e[94]=o,e[95]=$}else $=e[95];let w;e[98]!==f||e[99]!==i?(w=s.jsx(wt,{item:i,onClose:f}),e[98]=f,e[99]=i,e[100]=w):w=e[100];let z;e[101]!==$||e[102]!==w?(z=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[$,w]}),e[101]=$,e[102]=w,e[103]=z):z=e[103];let H;if(e[104]!==l.theme||e[105]!==c||e[106]!==a){let q;e[108]!==l.theme||e[109]!==c?(q=J=>{const{value:Q,icon:ee,label:te}=J;return s.jsx("button",{type:"button","aria-label":te,onClick:()=>c(se=>({...se,theme:Q})),className:K("size-7 rounded-md flex items-center justify-center transition-colors",l.theme===Q?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ee},Q)},e[108]=l.theme,e[109]=c,e[110]=q):q=e[110],H=a.map(q),e[104]=l.theme,e[105]=c,e[106]=a,e[107]=H}else H=e[107];let T;e[111]!==H?(T=s.jsx("div",{className:"flex items-center gap-0.5",children:H}),e[111]=H,e[112]=T):T=e[112];const B=l.enableSounds?"Disable sounds":"Enable sounds";let R;e[113]!==c?(R=()=>c(Ri),e[113]=c,e[114]=R):R=e[114];const L=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let D;e[115]!==L?(D=K("size-7 rounded-md flex items-center justify-center transition-colors",L),e[115]=L,e[116]=D):D=e[116];let G;e[117]!==l.enableSounds?(G=l.enableSounds?s.jsx(ss,{size:14}):s.jsx(ns,{size:14}),e[117]=l.enableSounds,e[118]=G):G=e[118];let F;e[119]!==B||e[120]!==R||e[121]!==D||e[122]!==G?(F=s.jsx("button",{type:"button","aria-label":B,onClick:R,className:D,children:G}),e[119]=B,e[120]=R,e[121]=D,e[122]=G,e[123]=F):F=e[123];let E;e[124]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.35.0"]}),e[124]=E):E=e[124];let W;e[125]!==F?(W=s.jsxs("div",{className:"flex items-center gap-2",children:[F,E]}),e[125]=F,e[126]=W):W=e[126];let V;e[127]!==T||e[128]!==W?(V=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[T,W]}),e[127]=T,e[128]=W,e[129]=V):V=e[129];let X;e[130]!==P||e[131]!==z||e[132]!==V?(X=s.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[P,z,V]}),e[130]=P,e[131]=z,e[132]=V,e[133]=X):X=e[133];const re=String(p);let Y;e[134]!==m||e[135]!==u||e[136]!==d||e[137]!==re?(Y=s.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:s.jsx(fs,{orgParam:d,onSelectOrg:u,onCreateOrg:m},re)}),e[134]=m,e[135]=u,e[136]=d,e[137]=re,e[138]=Y):Y=e[138];let oe;return e[139]!==X||e[140]!==Y?(oe=s.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[X,Y]}),e[139]=X,e[140]=Y,e[141]=oe):oe=e[141],oe}function Ri(t){return{...t,enableSounds:!t.enableSounds}}function Di(){Ae.success("User ID copied")}function Ei(t){return{...t,enableSounds:!t.enableSounds}}function Fi(){Ae.success("User ID copied")}function Ut(){const t=N.c(44),{data:e}=Ce.useSession(),{org:n}=fe(),r=Te();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org",shouldThrow:!1},t[0]=o):o=t[0];const a=Hn(o)?.params.org,[l,c]=Un(),d=Ms(),[u,m]=O.useState(!1),[f,g]=O.useState(!1),p=e?.user,x=p?.image;let h;t[1]!==r?(h=X=>{m(!1),r({to:"/$org",params:{org:X}})},t[1]=r,t[2]=h):h=t[2];const v=h;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(!1),t[3]=j):j=t[3];const y=j;let b;t[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(pt,{size:16}),t[4]=b):b=t[4];let S;t[5]!==r||t[6]!==a?(S={key:"preferences",label:"Preferences",icon:b,onClick:()=>{r({to:"/$org/settings/profile",params:{org:a??""}})}},t[5]=r,t[6]=a,t[7]=S):S=t[7];let k;t[8]!==n||t[9]!==r?(k=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(lo,{size:16}),onClick:()=>{r({to:"/$org/install",params:{org:n.slug}})}}]:[],t[8]=n,t[9]=r,t[10]=k):k=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={key:"terms",label:"Terms of Use",icon:s.jsx(vr,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[11]=_):_=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(xo,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[12]=C):C=t[12];let I;t[13]===Symbol.for("react.memo_cache_sentinel")?(I={key:"github",label:"decocms/studio",icon:s.jsx(Kn,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[13]=I):I=t[13];let A;t[14]===Symbol.for("react.memo_cache_sentinel")?(A={key:"community",label:"Community",icon:s.jsx(ho,{size:16}),href:"https://decocms.com/discord",external:!0},t[14]=A):A=t[14];let P;t[15]===Symbol.for("react.memo_cache_sentinel")?(P={key:"homepage",label:"Homepage",icon:s.jsx(ao,{size:16}),href:"https://decocms.com",external:!0},t[15]=P):P=t[15];let $;t[16]!==S||t[17]!==k?($=[S,...k,_,C,I,A,P],t[16]=S,t[17]=k,t[18]=$):$=t[18];const w=$;let z;t[19]===Symbol.for("react.memo_cache_sentinel")?(z={key:"logout",label:"Sign out",icon:s.jsx(co,{size:16}),onClick:Bi},t[19]=z):z=t[19];const H=z;let T;t[20]===Symbol.for("react.memo_cache_sentinel")?(T={value:"light",icon:s.jsx(mo,{size:14}),label:"Light theme"},t[20]=T):T=t[20];let B;t[21]===Symbol.for("react.memo_cache_sentinel")?(B={value:"dark",icon:s.jsx(fo,{size:14}),label:"Dark theme"},t[21]=B):B=t[21];let R;t[22]===Symbol.for("react.memo_cache_sentinel")?(R=[T,B,{value:"system",icon:s.jsx(uo,{size:14}),label:"System theme"}],t[22]=R):R=t[22];const L=R;let D;t[23]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{m(!1),g(!0)},t[23]=D):D=t[23];let G;t[24]!==v||t[25]!==d||t[26]!==w||t[27]!==u||t[28]!==a||t[29]!==l||t[30]!==c||t[31]!==p||t[32]!==x?(G={user:p,userImage:x,menuItems:w,signOutItem:H,themeOptions:L,preferences:l,setPreferences:c,orgParam:a,onSelectOrg:v,onCreateOrg:D,close:y,isMobile:d,open:u},t[24]=v,t[25]=d,t[26]=w,t[27]=u,t[28]=a,t[29]=l,t[30]=c,t[31]=p,t[32]=x,t[33]=G):G=t[33];const F=G;let E;t[34]!==n||t[35]!==d||t[36]!==u||t[37]!==F?(E=d?s.jsxs(As,{open:u,onOpenChange:m,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>m(!0),className:"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",children:[s.jsx("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:Ht(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]}),s.jsxs($s,{className:"h-[80dvh] p-0",children:[s.jsx(Os,{className:"sr-only",children:"Account"}),s.jsx(xs,{...F})]})]}):s.jsxs(Rt,{open:u,onOpenChange:m,children:[s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:n?.name??"Account",className:"rounded-md",children:[s.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:Ht(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]})}),s.jsx(Dt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:Gi,children:s.jsx(xs,{...F})})]}),t[34]=n,t[35]=d,t[36]=u,t[37]=F,t[38]=E):E=t[38];let W;t[39]!==f?(W=s.jsx($i,{open:f,onOpenChange:g}),t[39]=f,t[40]=W):W=t[40];let V;return t[41]!==E||t[42]!==W?(V=s.jsxs(s.Fragment,{children:[E,W]}),t[41]=E,t[42]=W,t[43]=V):V=t[43],V}function Gi(t){return t.preventDefault()}function Bi(){Z("signed_out",{source:"account_popover"}),Wn(),Ce.signOut()}function Li({invitation:t}){const[e,n]=O.useState(!1),[r,o]=O.useState(!1),i=qn(),a=async()=>{n(!0);try{const d=await Ce.organization.acceptInvitation({invitationId:t.id});if(d.error){Ae.error(d.error.message),n(!1);return}}catch{Ae.error("Failed to accept invitation"),n(!1);return}Ae.success("Invitation accepted!"),Yn();let c;try{c=(await Ce.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await Ce.organization.rejectInvitation({invitationId:t.id});c.error?(Ae.error(c.error.message),o(!1)):(Ae.success("Invitation declined"),i.invalidateQueries())}catch{Ae.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx($t,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:a,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(Bs,{size:14})}),s.jsx($t,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:l,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(Hs,{size:14})})]})]})}function Hi(t){const e=N.c(14),{release:n,isSeen:r,onSelect:o}=t;let i;e[0]!==r?(i=!r&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==n.eyebrow?(a=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=a):a=e[3];let l;e[4]!==n.title?(l=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=l):l=e[5];let c;e[6]!==a||e[7]!==l?(c=s.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[6]=a,e[7]=l,e[8]=c):c=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==i||e[12]!==c?(u=s.jsxs("button",{type:"button",onClick:o,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,c,d]}),e[10]=o,e[11]=i,e[12]=c,e[13]=u):u=e[13],u}function Ui(){const t=O.useContext(Xn),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}function sn(){const t=N.c(10),{isSeen:e,markSeen:n,unseenCount:r}=Gr(),o=Ui();let i;if(t[0]!==e||t[1]!==o){const c=[...o].sort(Vi).map(Wi);let d;t[3]!==e?(d=m=>({type:"release",release:m,isSeen:e(m.id)}),t[3]=e,t[4]=d):d=t[4];const u=[...Br].sort(Ki).map(d);i=[...c,...u],t[0]=e,t[1]=o,t[2]=i}else i=t[2];const a=r+o.length;let l;return t[5]!==n||t[6]!==o||t[7]!==i||t[8]!==a?(l={items:i,pendingInvitations:o,redDotCount:a,markReleaseSeen:n},t[5]=n,t[6]=o,t[7]=i,t[8]=a,t[9]=l):l=t[9],l}function Ki(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function Wi(t){return{type:"invitation",invitation:t}}function Vi(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}class nn extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function rn(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function qi(){const t=N.c(17),e=Te(),{org:n}=fe(),{hasDecoKey:r,balanceDollars:o}=Us();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let a;t[2]!==o?(a=K(o!=null&&rn(o)),t[2]=o,t[3]=a):a=t[3];let l;t[4]!==e||t[5]!==n.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ps,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=s.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==a||t[14]!==l||t[15]!==u?(m=s.jsx($e,{children:s.jsx(xe,{children:s.jsxs(ke,{tooltip:i,className:a,onClick:l,children:[c,u]})})}),t[12]=i,t[13]=a,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}function Yi(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nn,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(qi,{})})}),t[0]=e):e=t[0],e}function Xi(){const t=N.c(17),e=Te(),{org:n}=fe(),{hasDecoKey:r,balanceDollars:o}=Us();if(!r)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];const a=i;let l;t[2]!==e||t[3]!==n.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[2]=e,t[3]=n.slug,t[4]=l):l=t[4];let c;t[5]!==o?(c=K(o!=null&&rn(o)),t[5]=o,t[6]=c):c=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ps,{className:"size-4"}),t[7]=d):d=t[7];let u;t[8]!==l||t[9]!==c||t[10]!==a?(u=s.jsx(We,{asChild:!0,children:s.jsx(we,{"aria-label":a,onClick:l,className:c,children:d})}),t[8]=l,t[9]=c,t[10]=a,t[11]=u):u=t[11];let m;t[12]!==a?(m=s.jsx(Ve,{side:"top",children:a}),t[12]=a,t[13]=m):m=t[13];let f;return t[14]!==u||t[15]!==m?(f=s.jsxs(qe,{delayDuration:300,children:[u,m]}),t[14]=u,t[15]=m,t[16]=f):f=t[16],f}function Qi(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nn,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(Xi,{})})}),t[0]=e):e=t[0],e}function on(t){const e=N.c(15),{children:n}=t,{items:r,markReleaseSeen:o}=sn(),[i,a]=O.useState(null);let l;if(e[0]!==r||e[1]!==i){let x;e[3]!==i?(x=h=>h.type==="release"&&h.release.id===i,e[3]=i,e[4]=x):x=e[4],l=r.find(x),e[0]=r,e[1]=i,e[2]=l}else l=e[2];const c=l,d=c?.type==="release"?c.release:null;let u;e[5]!==o?(u=x=>{a(x),o(x)},e[5]=o,e[6]=u):u=e[6];const m=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=x=>{x||a(null)},e[7]=f):f=e[7];let g;e[8]!==m||e[9]!==r||e[10]!==d?(g=s.jsx(Dt,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx($t,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>a(null),children:s.jsx(Oo,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:d.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(Lr,{release:d})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Yt,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:r.map(x=>x.type==="invitation"?s.jsx(Li,{invitation:x.invitation},`inv-${x.invitation.id}`):s.jsx(Hi,{release:x.release,isSeen:x.isSeen,onSelect:()=>m(x.release.id)},`rel-${x.release.id}`))})]})}),e[8]=m,e[9]=r,e[10]=d,e[11]=g):g=e[11];let p;return e[12]!==n||e[13]!==g?(p=s.jsxs(Rt,{onOpenChange:f,children:[n,g]}),e[12]=n,e[13]=g,e[14]=p):p=e[14],p}function ln(){const{redDotCount:t}=sn();return t>0}function Zi(){const t=N.c(6),e=ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{children:"Inbox"}),t[3]=o):o=t[3];let i;return t[4]!==r?(i=s.jsx(on,{children:s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:"Inbox",className:"relative",children:[n,r,o]})})}),t[4]=r,t[5]=i):i=t[5],i}function Ji(){const t=N.c(8),e=ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{className:"size-4"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]!==r?(o=s.jsx(ut,{asChild:!0,children:s.jsx(We,{asChild:!0,children:s.jsxs(we,{"aria-label":"Inbox",children:[n,r]})})}),t[3]=r,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ve,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let a;return t[6]!==o?(a=s.jsx(on,{children:s.jsxs(qe,{delayDuration:300,children:[o,i]})}),t[6]=o,t[7]=a):a=t[7],a}function el(){const t=N.c(3),[e,n]=O.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(ke,{tooltip:"Connections",onClick:()=>{Z("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:[s.jsx(Ls,{}),s.jsx("span",{children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(Ks,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function tl(){const t=N.c(3),[e,n]=O.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(qe,{delayDuration:300,children:[s.jsx(We,{asChild:!0,children:s.jsx(we,{"aria-label":"Connections",onClick:()=>{Z("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:s.jsx(Ls,{className:"size-4"})})}),s.jsx(Ve,{side:"top",children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(Ks,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function sl(){const t=N.c(7),e=Te(),{org:n}=fe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pt,{}),i=s.jsx("span",{children:"Settings"}),t[3]=o,t[4]=i):(o=t[3],i=t[4]);let a;return t[5]!==r?(a=s.jsxs(ke,{tooltip:"Settings",onClick:r,children:[o,i]}),t[5]=r,t[6]=a):a=t[6],a}function nl(){const t=N.c(9),e=Te(),{org:n}=fe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pt,{className:"size-4"}),t[3]=o):o=t[3];let i;t[4]!==r?(i=s.jsx(We,{asChild:!0,children:s.jsx(we,{"aria-label":"Settings",onClick:r,children:o})}),t[4]=r,t[5]=i):i=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ve,{side:"top",children:"Settings"}),t[6]=a):a=t[6];let l;return t[7]!==i?(l=s.jsxs(qe,{delayDuration:300,children:[i,a]}),t[7]=i,t[8]=l):l=t[8],l}function rl(){const t=N.c(6),{state:e}=Xe();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Yi,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(xe,{children:s.jsx(el,{})}),t[1]=i):i=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(xe,{children:s.jsx(Zi,{})}),t[2]=a):a=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(xe,{children:s.jsx(sl,{})}),t[3]=l):l=t[3];let c;return t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Lt,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs($e,{children:[i,a,l,s.jsx(xe,{children:s.jsx(Ut,{})})]})]}),t[4]=c):c=t[4],c}let r;return t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Lt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx($e,{children:s.jsx(xe,{children:s.jsx(Ut,{})})})}),s.jsx(nl,{}),s.jsx(Ji,{}),s.jsx(tl,{}),s.jsx(Qi,{})]})}),t[5]=r):r=t[5],r}function ol(){const t=N.c(8),e=Te(),{org:n}=fe(),{setOpenMobile:r}=Xe();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx($e,{children:s.jsx(xe,{children:s.jsx(Ut,{})})})}),t[0]=o):o=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==r?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),r(!1)},t[1]=e,t[2]=n.slug,t[3]=r,t[4]=i):i=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(pt,{className:"size-4"}),t[5]=a):a=t[5];let l;return t[6]!==i?(l=s.jsx(Lt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[o,s.jsx(we,{"aria-label":"Settings",onClick:i,children:a})]})}),t[6]=i,t[7]=l):l=t[7],l}function il(t){const e=N.c(8),{virtualMcpId:n,size:r,showAutomationBadge:o}=t,i=r===void 0?"sm":r;let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(ll,{virtualMcpId:n,size:i}):s.jsx(Oe,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==o?(l=o&&s.jsx("span",{"aria-label":"Automation-triggered",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]=l):l=e[4];let c;return e[5]!==a||e[6]!==l?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function ll(t){const e=N.c(6),{virtualMcpId:n,size:r}=t,o=ht(n);if(!o){let l;return e[0]!==r?(l=s.jsx(Oe,{icon:null,name:"?",size:r}),e[0]=r,e[1]=l):l=e[1],l}const i=o.icon??null;let a;return e[2]!==o.title||e[3]!==r||e[4]!==i?(a=s.jsx(Oe,{icon:i,name:o.title,size:r}),e[2]=o.title,e[3]=r,e[4]=i,e[5]=a):a=e[5],a}function al(t){const e=N.c(36),{open:n,onOpenChange:r}=t,[o,i]=O.useState(""),{org:a}=fe(),{setTaskId:l}=Es(),c=Vs();let d,u,m;e[0]!==a.id||e[1]!==o?(m=o.trim(),u=qt,d=Vt.globalSearch(a.id,m),e[0]=a.id,e[1]=o,e[2]=d,e[3]=u,e[4]=m):(d=e[2],u=e[3],m=e[4]);const f=n&&m.length>0;let g;e[5]!==c||e[6]!==m?(g=async()=>await c.call("GLOBAL_SEARCH",{query:m,limit:20}),e[5]=c,e[6]=m,e[7]=g):g=e[7];let p;e[8]!==d||e[9]!==f||e[10]!==g?(p={queryKey:d,enabled:f,queryFn:g,staleTime:1e4},e[8]=d,e[9]=f,e[10]=g,e[11]=p):p=e[11];const{data:x,isFetching:h}=u(p);let v;e[12]!==x?.items?(v=x?.items??[],e[12]=x?.items,e[13]=v):v=e[13];const j=v;let y;e[14]!==r?(y=w=>{w||i(""),r(w)},e[14]=r,e[15]=y):y=e[15];const b=y;let S;e[16]!==b||e[17]!==l?(S=w=>{b(!1),l(w.id,w.virtual_mcp_id??void 0)},e[16]=b,e[17]=l,e[18]=S):S=e[18];const k=S;let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(Vo,{className:"sr-only",children:[s.jsx(qo,{children:"Search"}),s.jsx(Yo,{children:"Search across your organization's resources."})]}),e[19]=_):_=e[19];let C;e[20]!==o?(C=s.jsx(ei,{value:o,onValueChange:i,placeholder:"Search..."}),e[20]=o,e[21]=C):C=e[21];let I;e[22]!==k||e[23]!==h||e[24]!==j||e[25]!==m?(I=m?h&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Zo,{children:"No results."}):j.map(w=>w.type==="thread"?s.jsxs(Jo,{value:`thread:${w.id}:${w.title}`,onSelect:()=>k(w),className:"gap-2.5",children:[s.jsx(il,{virtualMcpId:w.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:w.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(w.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${w.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=k,e[23]=h,e[24]=j,e[25]=m,e[26]=I):I=e[26];let A;e[27]!==I?(A=s.jsx(ti,{children:I}),e[27]=I,e[28]=A):A=e[28];let P;e[29]!==C||e[30]!==A?(P=s.jsxs(Xo,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[_,s.jsxs(si,{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:[C,A]})]}),e[29]=C,e[30]=A,e[31]=P):P=e[31];let $;return e[32]!==b||e[33]!==n||e[34]!==P?($=s.jsx(Qo,{open:n,onOpenChange:b,children:P}),e[32]=b,e[33]=n,e[34]=P,e[35]=$):$=e[35],$}function cl(t){return t==="owner"||t==="admin"}function dl(){const t=N.c(11),{locator:e}=fe(),n=ni(),{data:r}=Ce.useSession(),o=r?.user?.id;let i;t[0]!==e?(i=Vt.members(e),t[0]=e,t[1]=i):i=t[1];let a;t[2]!==n?(a=()=>n.organization.listMembers(),t[2]=n,t[3]=a):a=t[3];const l=!!o;let c;t[4]!==i||t[5]!==a||t[6]!==l?(c={queryKey:i,queryFn:a,enabled:l,staleTime:6e4},t[4]=i,t[5]=a,t[6]=l,t[7]=c):c=t[7];const{data:d}=qt(c);let u;if(t[8]!==d?.data?.members||t[9]!==o){const f=(d?.data?.members??[]).find(g=>g.userId===o)?.role;u=cl(f??void 0),t[8]=d?.data?.members,t[9]=o,t[10]=u}else u=t[10];return u}var Qt="ContextMenu",[ul]=or(Qt,[Cs]),ce=Cs(),[ml,an]=ul(Qt),cn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:i=!0}=t,[a,l]=O.useState(!1),c=ce(e),d=nr(r),u=O.useCallback(m=>{l(m),d(m)},[d]);return s.jsx(ml,{scope:e,open:a,onOpenChange:u,modal:i,children:s.jsx(rr,{...c,dir:o,open:a,onOpenChange:u,modal:i,children:n})})};cn.displayName=Qt;var dn="ContextMenuTrigger",un=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,i=an(dn,n),a=ce(n),l=O.useRef({x:0,y:0}),c=O.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l.current})}),d=O.useRef(0),u=O.useCallback(()=>window.clearTimeout(d.current),[]),m=f=>{l.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return O.useEffect(()=>u,[u]),O.useEffect(()=>{r&&u()},[r,u]),s.jsxs(s.Fragment,{children:[s.jsx(Qn,{...a,virtualRef:c}),s.jsx(Zn.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:xt(t.onContextMenu,f=>{u(),m(f),f.preventDefault()}),onPointerDown:r?t.onPointerDown:xt(t.onPointerDown,kt(f=>{u(),d.current=window.setTimeout(()=>m(f),700)})),onPointerMove:r?t.onPointerMove:xt(t.onPointerMove,kt(u)),onPointerCancel:r?t.onPointerCancel:xt(t.onPointerCancel,kt(u)),onPointerUp:r?t.onPointerUp:xt(t.onPointerUp,kt(u))})]})});un.displayName=dn;var fl="ContextMenuPortal",mn=t=>{const{__scopeContextMenu:e,...n}=t,r=ce(e);return s.jsx(tr,{...r,...n})};mn.displayName=fl;var fn="ContextMenuContent",xn=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=an(fn,n),i=ce(n),a=O.useRef(!1);return s.jsx(sr,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:l=>{t.onCloseAutoFocus?.(l),!l.defaultPrevented&&a.current&&l.preventDefault(),a.current=!1},onInteractOutside:l=>{t.onInteractOutside?.(l),!l.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xn.displayName=fn;var xl="ContextMenuGroup",hl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(ir,{...o,...r,ref:e})});hl.displayName=xl;var pl="ContextMenuLabel",gl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(lr,{...o,...r,ref:e})});gl.displayName=pl;var bl="ContextMenuItem",hn=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(Jn,{...o,...r,ref:e})});hn.displayName=bl;var jl="ContextMenuCheckboxItem",vl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(ar,{...o,...r,ref:e})});vl.displayName=jl;var yl="ContextMenuRadioGroup",Sl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(cr,{...o,...r,ref:e})});Sl.displayName=yl;var _l="ContextMenuRadioItem",Nl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(dr,{...o,...r,ref:e})});Nl.displayName=_l;var Cl="ContextMenuItemIndicator",wl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(ur,{...o,...r,ref:e})});wl.displayName=Cl;var kl="ContextMenuSeparator",pn=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(er,{...o,...r,ref:e})});pn.displayName=kl;var Il="ContextMenuArrow",Ml=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(mr,{...o,...r,ref:e})});Ml.displayName=Il;var Al="ContextMenuSubTrigger",$l=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(fr,{...o,...r,ref:e})});$l.displayName=Al;var Ol="ContextMenuSubContent",Tl=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(xr,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Tl.displayName=Ol;function kt(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var zl=cn,Pl=un,Rl=mn,Dl=xn,El=hn,Fl=pn;function gn(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(zl,{"data-slot":"context-menu",...n}),e[2]=n,e[3]=r):r=e[3],r}function bn(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pl,{"data-slot":"context-menu-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function jn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=K("bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==r||e[6]!==o?(i=s.jsx(Rl,{children:s.jsx(Dl,{"data-slot":"context-menu-content",className:o,...r})}),e[5]=r,e[6]=o,e[7]=i):i=e[7],i}function It(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,inset:r,variant:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const a=i===void 0?"default":i;let l;e[5]!==n?(l=K("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=l):l=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==a?(c=s.jsx(El,{"data-slot":"context-menu-item","data-inset":r,"data-variant":a,className:l,...o}),e[7]=r,e[8]=o,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}function hs(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=K("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==r||e[6]!==o?(i=s.jsx(Fl,{"data-slot":"context-menu-separator",className:o,...r}),e[5]=r,e[6]=o,e[7]=i):i=e[7],i}function vn(t){const e=N.c(26),{virtualMcpId:n,isOrgPinned:r,canManageOrgPin:o,onNewTaskInGroup:i,onShowSettings:a,onToggleOrgPin:l,onHideGroup:c}=t;let d;e[0]!==i||e[1]!==n?(d=()=>i(n),e[0]=i,e[1]=n,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ne,{size:14,className:"mr-2"}),e[3]=u):u=e[3];let m;e[4]!==d?(m=s.jsxs(It,{onSelect:d,children:[u,"New task"]}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==n?(f=()=>a(n),e[6]=a,e[7]=n,e[8]=f):f=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(pt,{size:14,className:"mr-2"}),e[9]=g):g=e[9];let p;e[10]!==f?(p=s.jsxs(It,{onSelect:f,children:[g,"Settings"]}),e[10]=f,e[11]=p):p=e[11];let x;e[12]!==o||e[13]!==r||e[14]!==l||e[15]!==n?(x=o&&s.jsxs(s.Fragment,{children:[s.jsx(hs,{}),s.jsxs(It,{onSelect:()=>l(n,!r),children:[s.jsx(Pr,{size:14,className:"mr-2"}),r?"Unpin for all members":"Pin for all members"]})]}),e[12]=o,e[13]=r,e[14]=l,e[15]=n,e[16]=x):x=e[16];let h;e[17]!==r||e[18]!==c||e[19]!==n?(h=!r&&s.jsxs(s.Fragment,{children:[s.jsx(hs,{}),s.jsxs(It,{onSelect:()=>c(n),children:[s.jsx(To,{size:14,className:"mr-2"}),"Hide"]})]}),e[17]=r,e[18]=c,e[19]=n,e[20]=h):h=e[20];let v;return e[21]!==m||e[22]!==p||e[23]!==x||e[24]!==h?(v=s.jsxs(s.Fragment,{children:[m,p,x,h]}),e[21]=m,e[22]=p,e[23]=x,e[24]=h,e[25]=v):v=e[25],v}function Gl(t){return t==="ephemeral"||t.startsWith("thread:")}function Et(t){const e=N.c(45),{task:n,isActive:r,onClick:o,onArchive:i,showAutomationBadge:a,showAgentIcon:l,hideStatusIdle:c}=t,d=li(n.status),u=d.icon,m=n.metadata?.kind==="tool_call_run",f=ht(m?void 0:n.virtual_mcp_id);let g;e[0]!==f?(g=zo(f),e[0]=f,e[1]=g):g=e[1];const p=g;ci(6e4);const x=a||!!n.trigger_id,h=n.id,v="button",j=0;let y;e[2]!==o?(y=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),o())},e[2]=o,e[3]=y):y=e[3];const b=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==b?(S=K("group/row flex items-center gap-2 px-2 py-1.5 rounded-md cursor-pointer transition-colors","focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",b),e[4]=b,e[5]=S):S=e[5];let k;e[6]!==m||e[7]!==l||e[8]!==f?.icon||e[9]!==f?.title?(k=l&&!m&&s.jsx(Oe,{icon:f?.icon??null,name:f?.title??"?",size:"2xs"}),e[6]=m,e[7]=l,e[8]=f?.icon,e[9]=f?.title,e[10]=k):k=e[10];let _;e[11]!==x?(_=x&&s.jsx(qs,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[11]=x,e[12]=_):_=e[12];const C=n.title||"Untitled task";let I;e[13]!==C?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[13]=C,e[14]=I):I=e[14];let A;e[15]!==I||e[16]!==_?(A=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[_,I]}),e[15]=I,e[16]=_,e[17]=A):A=e[17];let P;e[18]!==p||e[19]!==r||e[20]!==n.branch||e[21]!==n.updated_at?(P=n.updated_at&&s.jsxs("div",{className:K("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Gl(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):p?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[p.owner,"/",p.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:di(new Date(n.updated_at))})]}),e[18]=p,e[19]=r,e[20]=n.branch,e[21]=n.updated_at,e[22]=P):P=e[22];let $;e[23]!==A||e[24]!==P?($=s.jsxs("div",{className:"flex-1 min-w-0",children:[A,P]}),e[23]=A,e[24]=P,e[25]=$):$=e[25];const w="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",z=!c&&s.jsx("span",{className:"[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity group-hover/row:opacity-0","aria-label":d.label,children:s.jsx(u,{size:14,className:K(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let H;e[26]!==i?(H=F=>{F.stopPropagation(),i()},e[26]=i,e[27]=H):H=e[27];let T;e[28]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(hr,{size:14}),e[28]=T):T=e[28];let B;e[29]!==H?(B=s.jsx(We,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H,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-7 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:T})}),e[29]=H,e[30]=B):B=e[30];let R;e[31]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ve,{side:"right",children:"Archive"}),e[31]=R):R=e[31];let L;e[32]!==B?(L=s.jsxs(qe,{children:[B,R]}),e[32]=B,e[33]=L):L=e[33];let D;e[34]!==z||e[35]!==L?(D=s.jsxs("div",{className:w,children:[z,L]}),e[34]=z,e[35]=L,e[36]=D):D=e[36];let G;return e[37]!==o||e[38]!==$||e[39]!==D||e[40]!==y||e[41]!==S||e[42]!==k||e[43]!==n.id?(G=s.jsxs("div",{"data-task-id":h,role:v,tabIndex:j,onClick:o,onKeyDown:y,className:S,children:[k,$,D]}),e[37]=o,e[38]=$,e[39]=D,e[40]=y,e[41]=S,e[42]=k,e[43]=n.id,e[44]=G):G=e[44],G}function Zt(t){const e=N.c(10),{onClick:n,isFetching:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=K("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-muted-foreground","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[0]=o):o=e[0];let i;e[1]!==r?(i=r&&s.jsx(Wt,{size:14,className:"animate-spin"}),e[1]=r,e[2]=i):i=e[2];const a=r?"Loading…":"Show more";let l;e[3]!==a?(l=s.jsx("span",{children:a}),e[3]=a,e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==n||e[7]!==i||e[8]!==l?(c=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:r,className:o,children:[i,l]}),e[5]=r,e[6]=n,e[7]=i,e[8]=l,e[9]=c):c=e[9],c}function Bl(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function Ll(t){return t.member==="mine"&&!t.currentUserId}const yn=4;let At=0;const Kt=[];function Hl(){for(;At<yn&&Kt.length>0;){const t=Kt.shift();t&&t()}}function Sn(t){return new Promise((e,n)=>{const r=()=>{At++,t().then(e,n).finally(()=>{At--,Hl()})};At<yn?r():Kt.push(r)})}const Ft=10;function ps(t,e,n,r,o){const i={hidden:!1};t==="agent"&&(i.virtual_mcp_id=e),r.member==="mine"&&r.currentUserId&&(i.created_by=r.currentUserId),r.type==="automation"&&(i.has_trigger=!0),r.type==="manual"&&(i.has_trigger=!1);const a={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return t==="status"&&(a.status=e),a}function Ul(t,e,n,r){let o=0;for(const i of t)Jt(i,e,n,r)&&o++;return o}function Bt(t,e,n,r){return Ul(t,e,n,r)}function Kl(t,e,n){const r=new Map;for(const o of t){const i=o.virtual_mcp_id;i&&Jt(o,e,i,n)&&r.set(i,(r.get(i)??0)+1)}return r}function Wl(t,e){return!!(t>=Ft||t===0&&e)}function gs(t,e){return t<e}function Vl(t,e){return e===!1?!1:e===!0?!0:t}function Jt(t,e,n,r){return!(t.hidden||e==="agent"&&t.virtual_mcp_id!==n||e==="status"&&(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Tt=new Map,Mt=new Map;function ql(t,e){return e?t>=Ft?!0:null:!1}function bs(t){return Tt.get(t)}function Yl(t,e){Tt.set(t,e)}function Xl(t,e,n){const r=Tt.get(t);if(r!==void 0){n(r);return}let o=Mt.get(t);o||(o=Sn(e).then(i=>(Tt.set(t,i),Mt.delete(t),i)).catch(()=>(Mt.delete(t),Promise.reject(new Error("group probe failed")))),Mt.set(t,o)),o.then(n,()=>n(!1))}function js(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ft,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ql(t,e,n,r,o){let i=0;for(const a of t)e.has(a.id)||Jt(a,n,r,o)&&i++;return i}function es(t,e,n,r){const o=N.c(8),{org:i}=fe(),a=Bl(i.id,t,e,n);let l;o[0]!==n?(l=Ll(n),o[0]=n,o[1]=l):l=o[1];const c=l,[d,u]=O.useState({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});d.identity!==a&&u({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});const m=Er(),{threads:f,hasMore:g}=Ds(),p=r??Bt(f,t,e,n),x=Wl(p,g),h=ql(p,g),v=Vs();if(d.identity===a&&d.serverHasMore===null){const _=h??bs(a);_!==void 0&&u({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:d.probeSubscribedIdentity,serverHasMore:_})}!c&&d.identity===a&&d.serverHasMore===null&&h===null&&bs(a)===void 0&&d.probeSubscribedIdentity!==a&&(u(_=>_.identity===a?{..._,isProbing:!0,probeSubscribedIdentity:a}:_),Xl(a,async()=>{const _=ps(t,e,0,n,1),C=await v.call("COLLECTION_THREADS_LIST",_),{totalCount:I}=js(C),A=Bt(m.threads.get(),t,e,n);return I===void 0?!1:gs(A,I)},_=>{u(C=>C.identity!==a?C:{...C,isProbing:!1,serverHasMore:_})}));const y=async function(){if(d.isFetching||d.isProbing||c)return;const C=a;u(I=>I.identity===C?{...I,isFetching:!0}:I);try{const I=Bt(f,t,e,n),A=ps(t,e,I,n,Ft),P=await Sn(()=>v.call("COLLECTION_THREADS_LIST",A)),{items:$,hasMore:w,totalCount:z}=js(P),H=new Set(f.map(Zl)),T=Ql($,H,t,e,n),B=I;m.mergeThreads($),u(R=>{if(R.identity!==C)return R;let L;return z!==void 0?L=gs(B+T,z):L=$.length===0||T===0?!1:w,Yl(C,L),{...R,isFetching:!1,serverHasMore:L}})}catch(I){const A=I,P=A instanceof Error?A.message:String(A);Ae.error(`Could not load more tasks: ${P}`),u($=>$.identity===C?{...$,isFetching:!1}:$)}},b=d.isFetching||d.isProbing,S=!c&&!b&&Vl(x,d.serverHasMore);let k;return o[2]!==b||o[3]!==y||o[4]!==S||o[5]!==d.isProbing||o[6]!==d.serverHasMore?(k={hasMore:S,isFetching:b,isProbing:d.isProbing,serverHasMore:d.serverHasMore,loadMore:y},o[2]=b,o[3]=y,o[4]=S,o[5]=d.isProbing,o[6]=d.serverHasMore,o[7]=k):k=o[7],k}function Zl(t){return t.id}function _n(t){const e=N.c(61),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,onSelectTask:a,onArchiveTask:l,onNewTaskInGroup:c,onShowSettings:d,onHideGroup:u,isOrgPinned:m,canManageOrgPin:f,onToggleOrgPin:g,sortable:p,groupVisibleCount:x}=t,h=m===void 0?!1:m,v=f===void 0?!1:f,j=ht(n),y=r[0];let b;e[0]!==y||e[1]!==c||e[2]!==a||e[3]!==n?(b=()=>{y?a(y):c(n)},e[0]=y,e[1]=c,e[2]=a,e[3]=n,e[4]=b):b=e[4];const S=b,k=p?.isDragging?!1:void 0;let _;e[5]!==p?.isDragging||e[6]!==n?(_=q=>{p?.isDragging||q&&Z("sidebar_group_hover_popover_opened",{virtual_mcp_id:n})},e[5]=p?.isDragging,e[6]=n,e[7]=_):_=e[7];const C=!!(y&&o&&y.id===o),I=p?"Drag to reorder":void 0;let A;e[8]!==p?(A=p?{...p.attributes,...p.listeners}:{},e[8]=p,e[9]=A):A=e[9];const P=p&&"cursor-pointer active:cursor-grabbing touch-none",$=p?.isDragging&&"cursor-grabbing";let w;e[10]!==$||e[11]!==P?(w=K("group-data-[state=collapsed]/sidebar:!size-10 group-data-[state=collapsed]/sidebar:!max-w-none group-data-[state=collapsed]/sidebar:!overflow-visible group-data-[state=collapsed]/sidebar:[&_svg]:opacity-100",P,$),e[10]=$,e[11]=P,e[12]=w):w=e[12];const z=j?.icon??null,H=j?.title??"?";let T;e[13]!==z||e[14]!==H?(T=s.jsx(Oe,{icon:z,name:H,size:"sm+",className:"rounded-lg"}),e[13]=z,e[14]=H,e[15]=T):T=e[15];let B;e[16]!==S||e[17]!==w||e[18]!==T||e[19]!==C||e[20]!==I||e[21]!==A?(B=s.jsx(xe,{children:s.jsx(bn,{asChild:!0,children:s.jsx(ri,{asChild:!0,children:s.jsx(ke,{onClick:S,isActive:C,title:I,...A,className:w,children:T})})})}),e[16]=S,e[17]=w,e[18]=T,e[19]=C,e[20]=I,e[21]=A,e[22]=B):B=e[22];const R=g??Jl;let L;e[23]!==v||e[24]!==h||e[25]!==u||e[26]!==c||e[27]!==d||e[28]!==R||e[29]!==n?(L=s.jsx(jn,{className:"w-56",children:s.jsx(vn,{virtualMcpId:n,isOrgPinned:h,canManageOrgPin:v,onNewTaskInGroup:c,onShowSettings:d,onToggleOrgPin:R,onHideGroup:u})}),e[23]=v,e[24]=h,e[25]=u,e[26]=c,e[27]=d,e[28]=R,e[29]=n,e[30]=L):L=e[30];let D;e[31]!==B||e[32]!==L?(D=s.jsxs(gn,{children:[B,L]}),e[31]=B,e[32]=L,e[33]=D):D=e[33];const G=j?.title??"Agent";let F;e[34]!==G?(F=s.jsx("span",{className:"truncate",children:G}),e[34]=G,e[35]=F):F=e[35];let E;e[36]!==c||e[37]!==n?(E=()=>c(n),e[36]=c,e[37]=n,e[38]=E):E=e[38];let W;e[39]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Ne,{size:14}),e[39]=W):W=e[39];let V;e[40]!==E?(V=s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:E,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground",children:W}),e[40]=E,e[41]=V):V=e[41];let X;e[42]!==F||e[43]!==V?(X=s.jsxs("div",{className:"flex items-center justify-between px-1 pb-1 text-xs font-medium",children:[F,V]}),e[42]=F,e[43]=V,e[44]=X):X=e[44];let re;e[45]!==o||e[46]!==i||e[47]!==x||e[48]!==l||e[49]!==a||e[50]!==r||e[51]!==n?(re=s.jsx(ea,{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:x,onSelectTask:a,onArchiveTask:l}),e[45]=o,e[46]=i,e[47]=x,e[48]=l,e[49]=a,e[50]=r,e[51]=n,e[52]=re):re=e[52];let Y;e[53]!==X||e[54]!==re?(Y=s.jsxs(oi,{side:"right",align:"start",sideOffset:8,className:"w-72 p-2",children:[X,re]}),e[53]=X,e[54]=re,e[55]=Y):Y=e[55];let oe;return e[56]!==D||e[57]!==Y||e[58]!==k||e[59]!==_?(oe=s.jsxs(ii,{open:k,openDelay:120,closeDelay:150,onOpenChange:_,children:[D,Y]}),e[56]=D,e[57]=Y,e[58]=k,e[59]=_,e[60]=oe):oe=e[60],oe}function Jl(){}function ea(t){const e=N.c(6),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:a,onSelectTask:l,onArchiveTask:c}=t,d=es("agent",n,i,a);let u;return e[0]!==o||e[1]!==c||e[2]!==l||e[3]!==d||e[4]!==r?(u=s.jsx("div",{className:"flex flex-col gap-0.5 max-h-[60vh] overflow-y-auto",children:r.length===0&&!d.hasMore&&!d.isFetching?s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No tasks yet"}):s.jsxs(s.Fragment,{children:[r.map(m=>s.jsx(Et,{task:m,isActive:o===m.id,onClick:()=>l(m),onArchive:()=>c(m),showAutomationBadge:!!m.trigger_id},m.id)),(d.hasMore||d.isFetching)&&s.jsx(Zt,{onClick:()=>{d.loadMore()},isFetching:d.isFetching})]})}),e[0]=o,e[1]=c,e[2]=l,e[3]=d,e[4]=r,e[5]=u):u=e[5],u}function ta(t,e,n,r,o,i,a){const l=N.c(18),c=a===void 0?"expanded":a;let d;l[0]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:8}},l[0]=d):d=l[0];let u;l[1]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:Eo},l[1]=u):u=l[1];const m=Po(ls(Do,d),ls(Ro,u));let f;l[2]!==r||l[3]!==o||l[4]!==e||l[5]!==t?(f=Wr(t,e,r,o),l[2]=r,l[3]=o,l[4]=e,l[5]=t,l[6]=f):f=l[6];const g=f;let p;l[7]!==i||l[8]!==n||l[9]!==o||l[10]!==e||l[11]!==g||l[12]!==c?(p=v=>{const{active:j,over:y}=v;if(!y||j.id===y.id)return;const b=String(j.id),S=String(y.id);if(!Vr(b,S,o))return;const k=qr(g,b,S),_=Yr(e,n,o,k);e==="org"?Xr(n.orgId,_):Qr(n,_),Z("sidebar_group_reordered",{virtual_mcp_id:b,over_virtual_mcp_id:S,surface:c,section:e}),i()},l[7]=i,l[8]=n,l[9]=o,l[10]=e,l[11]=g,l[12]=c,l[13]=p):p=l[13];const x=p;let h;return l[14]!==x||l[15]!==m||l[16]!==g?(h={sensors:m,sortableIds:g,handleDragEnd:x},l[14]=x,l[15]=m,l[16]=g,l[17]=h):h=l[17],h}function sa(t){const e=N.c(2),{collapsed:n}=t;if(n===void 0?!1:n){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"mx-auto my-1 h-px w-6 shrink-0 bg-border"}),e[0]=i):i=e[0],i}let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"my-1.5 h-px w-full shrink-0 bg-border"}),e[1]=o):o=e[1],o}function na(t){const e=N.c(12),{id:n,children:r}=t;let o;e[0]!==n?(o={id:n},e[0]=n,e[1]=o):o=e[1];const{attributes:i,listeners:a,setNodeRef:l,transform:c,transition:d,isDragging:u}=Ho(o);let m;if(e[2]!==i||e[3]!==r||e[4]!==u||e[5]!==a||e[6]!==l||e[7]!==c||e[8]!==d){const g={transform:Uo.Transform.toString(c),transition:d,zIndex:u?100:void 0};m=r({setNodeRef:l,style:g,isDragging:u,attributes:i,listeners:a}),e[2]=i,e[3]=r,e[4]=u,e[5]=a,e[6]=l,e[7]=c,e[8]=d,e[9]=m}else m=e[9];let f;return e[10]!==m?(f=s.jsx(s.Fragment,{children:m}),e[10]=m,e[11]=f):f=e[11],f}function vs(t){const e=N.c(18),{section:n,groups:r,orderScope:o,decopilotId:i,orgPinnedIds:a,onReorder:l,surface:c,renderGroup:d,renderSortable:u,renderFixed:m}=t,{sensors:f,sortableIds:g,handleDragEnd:p}=ta(r,n,o,i,a,l,c);if(r.length===0)return null;const x=g;let h;if(e[0]!==r||e[1]!==m||e[2]!==d||e[3]!==u||e[4]!==g){let y;e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==g?(y=b=>{const S=d(b);return g.includes(b.virtualMcpId)?s.jsx(na,{id:b.virtualMcpId,children:k=>{const{setNodeRef:_,style:C,isDragging:I,attributes:A,listeners:P}=k;return s.jsx("div",{ref:_,style:C,className:K(I&&"opacity-50"),children:u(S,{attributes:A,listeners:P,isDragging:I})})}},b.virtualMcpId):s.jsx("div",{children:m(S)},b.virtualMcpId)},e[6]=m,e[7]=d,e[8]=u,e[9]=g,e[10]=y):y=e[10],h=r.map(y),e[0]=r,e[1]=m,e[2]=d,e[3]=u,e[4]=g,e[5]=h}else h=e[5];let v;e[11]!==x||e[12]!==h?(v=s.jsx(Fo,{items:x,strategy:Go,children:h}),e[11]=x,e[12]=h,e[13]=v):v=e[13];let j;return e[14]!==p||e[15]!==f||e[16]!==v?(j=s.jsx(Bo,{sensors:f,collisionDetection:Lo,onDragEnd:p,children:v}),e[14]=p,e[15]=f,e[16]=v,e[17]=j):j=e[17],j}function Nn(t){const e=N.c(23),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,surface:l,collapsedSeparator:c,renderGroup:d,renderSortable:u,renderFixed:m}=t;let f;if(e[0]!==c||e[1]!==o||e[2]!==n||e[3]!==a||e[4]!==r||e[5]!==i||e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==l){const{decopilot:g,orgPinned:p,user:x,toolCallRuns:h}=Zr(n,o,i),v=p.length>0&&x.length>0;let j;e[11]!==o||e[12]!==a||e[13]!==r||e[14]!==i||e[15]!==m||e[16]!==d||e[17]!==u||e[18]!==l?(j={orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,surface:l,renderGroup:d,renderSortable:u,renderFixed:m},e[11]=o,e[12]=a,e[13]=r,e[14]=i,e[15]=m,e[16]=d,e[17]=u,e[18]=l,e[19]=j):j=e[19];const y=j;let b;e[20]!==c||e[21]!==v?(b=v&&s.jsx(sa,{collapsed:c}),e[20]=c,e[21]=v,e[22]=b):b=e[22],f=s.jsxs(s.Fragment,{children:[g&&m(d(g)),s.jsx(vs,{section:"org",groups:p,...y}),b,s.jsx(vs,{section:"user",groups:x,...y}),h&&m(d(h))]}),e[0]=c,e[1]=o,e[2]=n,e[3]=a,e[4]=r,e[5]=i,e[6]=m,e[7]=d,e[8]=u,e[9]=l,e[10]=f}else f=e[10];return f}function ra(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,renderGroup:l}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==a||e[3]!==r||e[4]!==i||e[5]!==l?(c=s.jsx(Nn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,surface:"collapsed_rail",collapsedSeparator:!0,renderGroup:l,renderFixed:ia,renderSortable:oa}),e[0]=o,e[1]=n,e[2]=a,e[3]=r,e[4]=i,e[5]=l,e[6]=c):c=e[6],c}function oa(t,e){return s.jsx(_n,{...t,sortable:{attributes:e.attributes,listeners:e.listeners,isDragging:e.isDragging}},t.virtualMcpId)}function ia(t){return s.jsx(_n,{...t},t.virtualMcpId)}const la="sidebar.group.expanded.";function Cn(t,e){const n=N.c(3),[r,o]=pr(`${la}${t}`,e);let i;return n[0]!==r||n[1]!==o?(i=[r,o],n[0]=r,n[1]=o,n[2]=i):i=n[2],i}function wn(t){const e=N.c(59),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,onNewTaskInGroup:l,onShowSettings:c,onHideGroup:d,isOrgPinned:u,canManageOrgPin:m,onToggleOrgPin:f,filters:g,groupVisibleCount:p,sortable:x}=t,h=u===void 0?!1:u,v=m===void 0?!1:m,[j,y]=Cn(n,!1),b=n===Fs,S=x?.isDragging??!1;let k;e[0]!==j||e[1]!==y?(k=function(){y(!j)},e[0]=j,e[1]=y,e[2]=k):k=e[2];const _=k;let C;e[3]!==b||e[4]!==x?(C=x&&!b?{...x.attributes,...x.listeners}:{},e[3]=b,e[4]=x,e[5]=C):C=e[5];let I;e[6]!==_?(I=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_())},e[6]=_,e[7]=I):I=e[7];const A=x&&!b&&"touch-none active:cursor-grabbing",P=S&&"shadow-md bg-accent/40 cursor-grabbing";let $;e[8]!==A||e[9]!==P?($=K("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",A,P),e[8]=A,e[9]=P,e[10]=$):$=e[10];let w;e[11]!==b||e[12]!==n?(w=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(ca,{virtualMcpId:n,isToolCallRuns:b})}),e[11]=b,e[12]=n,e[13]=w):w=e[13];let z;e[14]!==j?(z=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:j?s.jsx(Ys,{size:14}):s.jsx(Xt,{size:14})}),e[14]=j,e[15]=z):z=e[15];let H;e[16]!==z||e[17]!==w?(H=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[w,z]}),e[16]=z,e[17]=w,e[18]=H):H=e[18];let T;e[19]!==b||e[20]!==n?(T=s.jsx("span",{className:"flex-1 truncate",children:s.jsx(ua,{virtualMcpId:n,isToolCallRuns:b})}),e[19]=b,e[20]=n,e[21]=T):T=e[21];let B;e[22]!==b||e[23]!==l||e[24]!==n?(B=!b&&s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:E=>{E.stopPropagation(),l(n)},className:"opacity-0 group-hover/group:opacity-100 focus-visible:opacity-100 transition-opacity flex size-7 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(Ne,{size:14})}),e[22]=b,e[23]=l,e[24]=n,e[25]=B):B=e[25];let R;e[26]!==j||e[27]!==_||e[28]!==H||e[29]!==T||e[30]!==B||e[31]!==C||e[32]!==I||e[33]!==$?(R=s.jsxs("div",{...C,role:"button",tabIndex:0,"aria-expanded":j,onClick:_,onKeyDown:I,className:$,children:[H,T,B]}),e[26]=j,e[27]=_,e[28]=H,e[29]=T,e[30]=B,e[31]=C,e[32]=I,e[33]=$,e[34]=R):R=e[34];const L=R;let D;e[35]!==v||e[36]!==L||e[37]!==h||e[38]!==b||e[39]!==d||e[40]!==l||e[41]!==c||e[42]!==f||e[43]!==n?(D=b?L:s.jsxs(gn,{children:[s.jsx(bn,{asChild:!0,children:L}),s.jsx(jn,{className:"w-56",children:s.jsx(vn,{virtualMcpId:n,isOrgPinned:h,canManageOrgPin:v,onNewTaskInGroup:l,onShowSettings:c,onToggleOrgPin:f??aa,onHideGroup:d})})]}),e[35]=v,e[36]=L,e[37]=h,e[38]=b,e[39]=d,e[40]=l,e[41]=c,e[42]=f,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==o||e[46]!==j||e[47]!==g||e[48]!==p||e[49]!==b||e[50]!==a||e[51]!==l||e[52]!==i||e[53]!==r||e[54]!==n?(G=j&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:b?r.map(E=>s.jsx(Et,{task:E,isActive:o===E.id,onClick:()=>i(E),onArchive:()=>a(E),showAutomationBadge:!!E.trigger_id},E.id)):s.jsx(fa,{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,onNewTaskInGroup:l,filters:g,groupVisibleCount:p})}),e[45]=o,e[46]=j,e[47]=g,e[48]=p,e[49]=b,e[50]=a,e[51]=l,e[52]=i,e[53]=r,e[54]=n,e[55]=G):G=e[55];let F;return e[56]!==D||e[57]!==G?(F=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[D,G]}),e[56]=D,e[57]=G,e[58]=F):F=e[58],F}function aa(){}function ca(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Oe,{icon:null,name:"⚙",size:"2xs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(da,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function da(t){const e=N.c(4),{virtualMcpId:n}=t,r=ht(n);if(!r){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Oe,{icon:null,name:"?",size:"2xs"}),e[0]=a):a=e[0],a}const o=r.icon??null;let i;return e[1]!==r.title||e[2]!==o?(i=s.jsx(Oe,{icon:o,name:r.title,size:"2xs"}),e[1]=r.title,e[2]=o,e[3]=i):i=e[3],i}function ua(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(s.Fragment,{children:"Automation runs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(ma,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function ma(t){const e=N.c(2),{virtualMcpId:n}=t,o=ht(n)?.title??"Agent";let i;return e[0]!==o?(i=s.jsx(s.Fragment,{children:o}),e[0]=o,e[1]=i):i=e[1],i}function fa(t){const e=N.c(10),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,onNewTaskInGroup:l,filters:c,groupVisibleCount:d}=t,u=es("agent",n,c,d),{isFetching:m,isProbing:f,loadMore:g,serverHasMore:p}=u,[x,h]=O.useState(!1);!x&&r.length===0&&p===!0&&!m&&!f&&(h(!0),queueMicrotask(()=>{g()}));const{hasMore:v}=u;let j;return e[0]!==o||e[1]!==v||e[2]!==m||e[3]!==g||e[4]!==a||e[5]!==l||e[6]!==i||e[7]!==r||e[8]!==n?(j=s.jsx(s.Fragment,{children:r.length===0?s.jsxs("button",{type:"button",onClick:()=>l(n),className:"flex items-center gap-2 px-2 py-1.5 rounded-md cursor-pointer text-sm text-muted-foreground hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[s.jsx(Ne,{size:14}),s.jsx("span",{children:"New thread"})]}):s.jsxs(s.Fragment,{children:[r.map(y=>s.jsx(Et,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>a(y),showAutomationBadge:!!y.trigger_id},y.id)),(v||m)&&s.jsx(Zt,{onClick:()=>{g()},isFetching:m})]})}),e[0]=o,e[1]=v,e[2]=m,e[3]=g,e[4]=a,e[5]=l,e[6]=i,e[7]=r,e[8]=n,e[9]=j):j=e[9],j}function xa(t){const e=N.c(16),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,filters:l}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:m,serverHasMore:f}=es("status",n,l),[g,p]=O.useState(!1);!g&&r.length===0&&f===!0&&!c&&!d&&(p(!0),queueMicrotask(()=>{u()}));let x;if(e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==r){let j;e[5]!==o||e[6]!==a||e[7]!==i?(j=y=>s.jsx(Et,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>a(y),showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0},y.id),e[5]=o,e[6]=a,e[7]=i,e[8]=j):j=e[8],x=r.map(j),e[0]=o,e[1]=a,e[2]=i,e[3]=r,e[4]=x}else x=e[4];let h;e[9]!==m||e[10]!==c||e[11]!==u?(h=(m||c)&&s.jsx(Zt,{onClick:()=>{u()},isFetching:c}),e[9]=m,e[10]=c,e[11]=u,e[12]=h):h=e[12];let v;return e[13]!==x||e[14]!==h?(v=s.jsxs(s.Fragment,{children:[x,h]}),e[13]=x,e[14]=h,e[15]=v):v=e[15],v}function ha(t){const e=N.c(35),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,filters:l}=t,c=ai[n],d=c.icon,[u,m]=Cn(`status-${n}`,!1);let f;e[0]!==u||e[1]!==m?(f=function(){m(!u)},e[0]=u,e[1]=m,e[2]=f):f=e[2];const g=f;let p;e[3]!==g?(p=_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),g())},e[3]=g,e[4]=p):p=e[4];let x;e[5]!==d||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(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=x):x=e[7];let h;e[8]!==u?(h=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:u?s.jsx(Ys,{size:14}):s.jsx(Xt,{size:14})}),e[8]=u,e[9]=h):h=e[9];let v;e[10]!==x||e[11]!==h?(v=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,h]}),e[10]=x,e[11]=h,e[12]=v):v=e[12];let j;e[13]!==c.label?(j=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=j):j=e[14];let y;e[15]!==r.length?(y=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:r.length})}),e[15]=r.length,e[16]=y):y=e[16];let b;e[17]!==u||e[18]!==g||e[19]!==p||e[20]!==v||e[21]!==j||e[22]!==y?(b=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:g,onKeyDown:p,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:[v,j,y]}),e[17]=u,e[18]=g,e[19]=p,e[20]=v,e[21]=j,e[22]=y,e[23]=b):b=e[23];let S;e[24]!==o||e[25]!==u||e[26]!==l||e[27]!==a||e[28]!==i||e[29]!==n||e[30]!==r?(S=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(xa,{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:a,filters:l})}),e[24]=o,e[25]=u,e[26]=l,e[27]=a,e[28]=i,e[29]=n,e[30]=r,e[31]=S):S=e[31];let k;return e[32]!==b||e[33]!==S?(k=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[b,S]}),e[32]=b,e[33]=S,e[34]=k):k=e[34],k}function pa(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,renderGroup:l}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==a||e[3]!==r||e[4]!==i||e[5]!==l?(c=s.jsx(Nn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:a,surface:"expanded",renderGroup:l,renderFixed:ba,renderSortable:ga}),e[0]=o,e[1]=n,e[2]=a,e[3]=r,e[4]=i,e[5]=l,e[6]=c):c=e[6],c}function ga(t,e){return s.jsx(wn,{...t,sortable:e},t.virtualMcpId)}function ba(t){return s.jsx(wn,{...t},t.virtualMcpId)}function ja(t,e,n,r){return[t.orgId,t.userId,r,n.slice().sort().join(","),e.map(o=>o.virtualMcpId).sort().join(",")].join("|")}function va(t,e,n,r,o){const i=N.c(5),a=ja(t,e,r,o),[l,c]=O.useState("");l!==a&&(Jr(t,e,n,r),c(a));let d;return i[0]!==n||i[1]!==r||i[2]!==t||i[3]!==e?(d=eo(t,e,n,r),i[0]=n,i[1]=r,i[2]=t,i[3]=e,i[4]=d):d=i[4],d}const kn={all:"All tasks",manual:"Chats",automation:"Automation"},In={all:"All members",mine:"Mine only"},ys={agent:"Agent",status:"Status"};function Mn(){const t=N.c(92),{data:e}=Ce.useSession(),n=e?.user?.id,r=n??"anon",{org:o}=fe(),i=Cr(o.id).id,l=zs().filter($a).map(Aa),c=dl(),d=wr();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={},t[0]=u):u=t[0];const[m,f]=O.useState(u),g=new Set(l),p={},x=[];let h;t[1]!==m?(h=Object.entries(m),t[1]=m,t[2]=h):h=t[2];for(const[M,U]of h)g.has(M)!==U?p[M]=U:x.push(M);x.length>0&&f(M=>{const U={...M};for(const ne of x)delete U[ne];return U});const v=new Set(l);for(const[M,U]of Object.entries(p))U?v.add(M):v.delete(M);const j=[...v],y=new Set(j),{threads:b}=Ds(),S=b.filter(Ma),{hide:k}=Rs(),_=Te(),{setTaskId:C,createNewTask:I}=Es();let A;t[3]===Symbol.for("react.memo_cache_sentinel")?(A={strict:!1},t[3]=A):A=t[3];const $=Ns(A).taskId??null,w=[...S].sort(Ia),[z,H]=O.useState("all"),[T,B]=O.useState("mine"),[R,L]=O.useState("agent"),[D,G]=O.useState(!1),[F,E]=O.useState(!1),[W,V]=O.useState(0),X=to(),re=W+X;let Y;t[4]!==o.id||t[5]!==r?(Y={orgId:o.id,userId:r},t[4]=o.id,t[5]=r,t[6]=Y):Y=t[6];const oe=Y,q={type:z,member:T,currentUserId:n??null},J=Kl(w,"agent",q),Q=va(oe,so(w,i),i,j,re);let ee;t[7]!==n||t[8]!==T?(ee=M=>T==="mine"&&n?M.filter(U=>U.created_by===n):M,t[7]=n,t[8]=T,t[9]=ee):ee=t[9];const te=ee;let se;t[10]!==z?(se=M=>z==="automation"?M.filter(ka):z==="manual"?M.filter(wa):M,t[10]=z,t[11]=se):se=t[11];const ie=se,le=M=>{const U=M.id===$;if(k(M.id),!U)return;const ne=w.find(Se=>Se.id!==M.id&&Se.virtual_mcp_id===M.virtual_mcp_id);ne?C(ne.id,ne.virtual_mcp_id):_({to:"/$org",params:{org:o.slug}})};let Ie;t[12]!==I?(Ie=M=>{Z("sidebar_group_new_clicked",{virtual_mcp_id:M}),I(M)},t[12]=I,t[13]=Ie):Ie=t[13];const ze=Ie,Pe=no();let he;t[14]!==Pe?(he=M=>{Z("sidebar_group_settings_clicked",{virtual_mcp_id:M}),Pe(M,{search:{main:"instructions"}})},t[14]=Pe,t[15]=he):he=t[15];const Re=he,mt=M=>{if(y.has(M))return;Z("sidebar_group_hide_clicked",{virtual_mcp_id:M});const U=Q.find(ne=>ne.virtualMcpId===M);if(U)for(const ne of U.threads)k(ne.id);oo(oe,M,j),V(Ca)},De=async(M,U)=>{if(c&&p[M]===void 0){Z("sidebar_group_org_pin_toggled",{virtual_mcp_id:M,pinned:U}),f(ne=>({...ne,[M]:U}));try{await d.update.mutateAsync({id:M,data:{pinned:U}})}catch{io(oe,M,!U),f(ne=>{const Se={...ne};return delete Se[M],Se})}}},Ee=M=>{const U=M===i||M===Fs;return{isOrgPinned:y.has(M),canManageOrgPin:U?!1:c,onToggleOrgPin:U?void 0:De}},Me=M=>{const U=ie(te(M.threads));return{virtualMcpId:M.virtualMcpId,threads:U,activeTaskId:$,filters:q,groupVisibleCount:J.get(M.virtualMcpId)??0,onSelectTask:ne=>C(ne.id,ne.virtual_mcp_id),onArchiveTask:le,onNewTaskInGroup:ze,onShowSettings:Re,onHideGroup:mt,...Ee(M.virtualMcpId)}},ae=z!=="all"||T!=="mine",{state:Fe,isMobile:Ge}=Xe();if(Fe==="collapsed"&&!Ge){let M;if(t[16]!==ae||t[17]!==Q||t[18]!==te||t[19]!==ie){let dt;t[21]!==ae||t[22]!==te||t[23]!==ie?(dt=On=>{const Tn=ie(te(On.threads));return!(ae&&Tn.length===0)},t[21]=ae,t[22]=te,t[23]=ie,t[24]=dt):dt=t[24],M=Q.filter(dt),t[16]=ae,t[17]=Q,t[18]=te,t[19]=ie,t[20]=M}else M=t[20];const U=M,ne=R==="agent"&&Q.length===0;let Se;t[25]!==ne?(Se=s.jsx(rs,{value:ne}),t[25]=ne,t[26]=Se):Se=t[26];let Ct;return t[27]===Symbol.for("react.memo_cache_sentinel")?(Ct=()=>V(Na),t[27]=Ct):Ct=t[27],s.jsxs(s.Fragment,{children:[Se,s.jsx($e,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:s.jsx(ra,{groups:U,orderScope:oe,decopilotId:i,orgPinnedIds:j,onReorder:Ct,renderGroup:dt=>Me(dt)})})]})}const ft="flex flex-col h-full min-h-0",be=R==="agent"&&Q.length===0;let je;t[28]!==be?(je=s.jsx(rs,{value:be}),t[28]=be,t[29]=je):je=t[29];let ue;t[30]!==G?(ue=()=>{Z("tasks_panel_search_opened"),E(!0),G(!0)},t[30]=G,t[31]=ue):ue=t[31];let pe;t[32]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Rr,{size:16}),t[32]=pe):pe=t[32];let me;t[33]!==ue?(me=s.jsx(we,{"aria-label":"Search threads",onClick:ue,children:pe}),t[33]=ue,t[34]=me):me=t[34];const Be=ys[R==="agent"?"status":"agent"];let ge;t[35]!==Be?(ge=Be.toLowerCase(),t[35]=Be,t[36]=ge):ge=t[36];const ve=`Group by ${ge}`,Le=ys[R];let de;t[37]!==Le?(de=Le.toLowerCase(),t[37]=Le,t[38]=de):de=t[38];const He=`Grouped by ${de}`;let ye,Ue;t[39]!==R?(ye=()=>{const M=R==="agent"?"status":"agent";Z("tasks_panel_group_by_changed",{to_value:M}),L(M)},Ue=R==="agent"?s.jsx(Wo,{size:16}):s.jsx(Dr,{size:16}),t[39]=R,t[40]=ye,t[41]=Ue):(ye=t[40],Ue=t[41]);let Ke;t[42]!==ve||t[43]!==He||t[44]!==ye||t[45]!==Ue?(Ke=s.jsx(we,{"aria-label":ve,title:He,onClick:ye,children:Ue}),t[42]=ve,t[43]=He,t[44]=ye,t[45]=Ue,t[46]=Ke):Ke=t[46];let Qe;t[47]===Symbol.for("react.memo_cache_sentinel")?(Qe=s.jsx(Ko,{size:16}),t[47]=Qe):Qe=t[47];let Ze;t[48]!==ae?(Ze=ae&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 ring-1 ring-sidebar pointer-events-none"}),t[48]=ae,t[49]=Ze):Ze=t[49];let Je;t[50]!==Ze?(Je=s.jsx(ut,{asChild:!0,children:s.jsxs(we,{"aria-label":"Filter tasks",children:[Qe,Ze]})}),t[50]=Ze,t[51]=Je):Je=t[51];let et;t[52]!==T?(et=M=>{const U=M;U!==T&&Z("tasks_panel_member_filter_changed",{to_value:U}),B(U)},t[52]=T,t[53]=et):et=t[53];let gt;t[54]===Symbol.for("react.memo_cache_sentinel")?(gt=s.jsx(cs,{size:"sm",className:"w-full",children:s.jsx(ds,{})}),t[54]=gt):gt=t[54];let bt;t[55]===Symbol.for("react.memo_cache_sentinel")?(bt=Object.keys(In),t[55]=bt):bt=t[55];let jt;t[56]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(as,{children:bt.map(_a)}),t[56]=jt):jt=t[56];let tt;t[57]!==T||t[58]!==et?(tt=s.jsx(Ss,{label:"Members",children:s.jsxs(us,{value:T,onValueChange:et,children:[gt,jt]})}),t[57]=T,t[58]=et,t[59]=tt):tt=t[59];let st;t[60]!==z?(st=M=>{const U=M;U!==z&&Z("tasks_panel_filter_changed",{to_value:U}),H(U)},t[60]=z,t[61]=st):st=t[61];let vt;t[62]===Symbol.for("react.memo_cache_sentinel")?(vt=s.jsx(cs,{size:"sm",className:"w-full",children:s.jsx(ds,{})}),t[62]=vt):vt=t[62];let yt;t[63]===Symbol.for("react.memo_cache_sentinel")?(yt=Object.keys(kn),t[63]=yt):yt=t[63];let St;t[64]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(as,{children:yt.map(Sa)}),t[64]=St):St=t[64];let nt;t[65]!==st||t[66]!==z?(nt=s.jsx(Ss,{label:"Type",children:s.jsxs(us,{value:z,onValueChange:st,children:[vt,St]})}),t[65]=st,t[66]=z,t[67]=nt):nt=t[67];let rt;t[68]!==tt||t[69]!==nt?(rt=s.jsx(Dt,{align:"start",sideOffset:8,collisionPadding:16,className:"w-72 p-3",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[tt,nt]})}),t[68]=tt,t[69]=nt,t[70]=rt):rt=t[70];let ot;t[71]!==Je||t[72]!==rt?(ot=s.jsxs(Rt,{children:[Je,rt]}),t[71]=Je,t[72]=rt,t[73]=ot):ot=t[73];let it;t[74]!==me||t[75]!==Ke||t[76]!==ot?(it=s.jsxs("div",{className:"flex items-center gap-0.5",children:[me,Ke,ot]}),t[74]=me,t[75]=Ke,t[76]=ot,t[77]=it):it=t[77];let _t;t[78]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Xs,{compact:!0}),t[78]=_t):_t=t[78];let lt;t[79]!==it?(lt=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[it,_t]}),t[79]=it,t[80]=lt):lt=t[80];const $n="flex-1 min-h-0 overflow-y-auto overscroll-contain flex flex-col gap-0.5 -mr-2 pr-2",Gt=R==="status"?s.jsx(s.Fragment,{children:ro(ie(te(w))).map(M=>s.jsx(ha,{status:M.status,threads:M.threads,activeTaskId:$,onSelectTask:U=>C(U.id,U.virtual_mcp_id),onArchiveTask:le,filters:q},M.status))}):s.jsx(pa,{groups:Q,orderScope:oe,decopilotId:i,orgPinnedIds:j,onReorder:()=>V(ya),renderGroup:M=>({...Me(M)})});let at;t[81]!==Gt?(at=s.jsx("div",{className:$n,children:Gt}),t[81]=Gt,t[82]=at):at=t[82];let ct;t[83]!==F||t[84]!==D||t[85]!==G?(ct=F&&s.jsx(al,{open:D,onOpenChange:G}),t[83]=F,t[84]=D,t[85]=G,t[86]=ct):ct=t[86];let Nt;return t[87]!==je||t[88]!==lt||t[89]!==at||t[90]!==ct?(Nt=s.jsxs("div",{className:ft,children:[je,lt,at,ct]}),t[87]=je,t[88]=lt,t[89]=at,t[90]=ct,t[91]=Nt):Nt=t[91],Nt}function ya(t){return t+1}function Sa(t){return s.jsx(Ws,{value:t,children:kn[t]},t)}function _a(t){return s.jsx(Ws,{value:t,children:In[t]},t)}function Na(t){return t+1}function Ca(t){return t+1}function wa(t){return!t.trigger_id}function ka(t){return!!t.trigger_id}function Ia(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ma(t){return!t.hidden}function Aa(t){return t.id}function $a(t){return t.pinned}function Ss(t){const e=N.c(7),{label:n,children:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==r?(i=s.jsx("div",{className:"w-36 shrink-0",children:r}),e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==i?(a=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,i]}),e[4]=o,e[5]=i,e[6]=a):a=e[6],a}const Oa=5,Ta=[{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 An(){const t=N.c(3),{state:e}=Xe();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:Oa}).map(Ra)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=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(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"})]}),s.jsx(_e,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Ta.map(za)})]}),t[2]=r):r=t[2],r}function za(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(_e,{className:"size-5 rounded-full shrink-0"}),s.jsx(_e,{className:K("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(Pa)})]},e)}function Pa(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(_e,{className:"h-3 flex-1 rounded-sm"})},e)}function Ra(t,e){return s.jsx(_e,{className:"size-10 rounded-lg mx-auto"},e)}function Pc(){const t=N.c(4),e=Qs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(rl,{}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ws,{children:s.jsxs(O.Suspense,{fallback:s.jsxs(s.Fragment,{children:[s.jsx(Ot,{className:"mb-2"}),s.jsx(An,{})]}),children:[s.jsx(Ot,{className:"mb-2"}),s.jsx(Mn,{})]})}),t[1]=r):r=t[1];let o;return t[2]!==e?(o=s.jsx(Gs,{children:s.jsx(en,{sections:e,footer:n,additionalContent:r})}),t[2]=e,t[3]=o):o=t[3],o}function Rc(t){const e=N.c(5),{onClose:n}=t,r=Qs();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ol,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ws,{children:s.jsxs(O.Suspense,{fallback:s.jsxs(s.Fragment,{children:[s.jsx(Ot,{className:"mb-2"}),s.jsx(An,{})]}),children:[s.jsx(Ot,{className:"mb-2"}),s.jsx(Mn,{})]})}),e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==r?(a=s.jsx(Gs,{children:s.jsx(Mi,{sections:r,onClose:n,footer:o,additionalContent:i})}),e[2]=n,e[3]=r,e[4]=a):a=e[4],a}function Dc(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 flex items-center justify-center",children:s.jsx(Wt,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{bn as C,Pc as S,Rc as a,Dc as b,It as c,hs as d,jn as e,gn as f};