decocms 4.263.2 → 4.263.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/client/assets/{AlertCircle-DL3U1yq7.js → AlertCircle-C8ZNKM0T.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DTwkuP_y.js → AreaChart-BYK2gWYF.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BDtQVDZJ.js → ArrowLeft-C4S3t4gh.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DUua93WQ.js → ArrowUp-BjteiNgF.js} +1 -1
  5. package/dist/client/assets/{Check-CFdAuLVR.js → Check-7fxTQqwV.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Ccs86bUg.js → CheckCircle-Ds0VlJAl.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Bh9AZv82.js → ChevronDown-DC3VmpPs.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Bt0Ps5hy.js → ChevronRight-DB1jERJP.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-CbP69kXl.js → ChevronSelectorVertical-B9rG_ZYr.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CYbM4ZwP.js → ChevronUp-DklUcnpq.js} +1 -1
  11. package/dist/client/assets/{Copy01-CKmyRUyl.js → Copy01-0rsYyxBd.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-DXJKk1Wt.js → CreditCard01-C02kJIQ-.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-C5qhPHKZ.js → DotsVertical-CtEAbV8O.js} +1 -1
  14. package/dist/client/assets/{Download01-DZdiDQUS.js → Download01-B_W2m-uX.js} +1 -1
  15. package/dist/client/assets/{Eye-DFHNhYtx.js → Eye-CCl0QwVV.js} +1 -1
  16. package/dist/client/assets/{FilterLines-C01-F8gV.js → FilterLines-v44MczT5.js} +1 -1
  17. package/dist/client/assets/{Globe01-qBOiIpcJ.js → Globe01-Dr2wIPy6.js} +1 -1
  18. package/dist/client/assets/{Globe04-DyPo8R4R.js → Globe04-BlbLK8Qh.js} +1 -1
  19. package/dist/client/assets/{HardDrive-DMA6WwJi.js → HardDrive-DKQRwLSP.js} +1 -1
  20. package/dist/client/assets/{Key01-CQ2Pckpa.js → Key01-kpUUZaqy.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CDWxDAhW.js → LinkExternal01-NyjdMVf7.js} +1 -1
  22. package/dist/client/assets/{LockUnlocked01-BJDlnHNP.js → LockUnlocked01-DsKz0Xl2.js} +1 -1
  23. package/dist/client/assets/{LogOut01-DYTwrIyB.js → LogOut01-Dd8QdhEu.js} +1 -1
  24. package/dist/client/assets/{Monitor01-CW9D8oQR.js → Monitor01-CCXNZQlH.js} +1 -1
  25. package/dist/client/assets/{Palette-CYMwYnzJ.js → Palette-BffjPXio.js} +1 -1
  26. package/dist/client/assets/{Play-D5VBgg81.js → Play-D8AheaUt.js} +1 -1
  27. package/dist/client/assets/{Plus-DJBOKCXM.js → Plus-DfL6u6I_.js} +1 -1
  28. package/dist/client/assets/{SearchLg-D05XfMH4.js → SearchLg-D1p_gJI8.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Bvk6cmtM.js → SearchMd-DVItXoZb.js} +1 -1
  30. package/dist/client/assets/{Settings02-BXfVk1mb.js → Settings02-Bvo1tVwA.js} +1 -1
  31. package/dist/client/assets/{Share07-DRhhhSu7.js → Share07-3Y0P_W3_.js} +1 -1
  32. package/dist/client/assets/{Shield01--vYJckXn.js → Shield01-C4putjAN.js} +1 -1
  33. package/dist/client/assets/{Stars01-Cfn7XpKF.js → Stars01-ClK-g0zk.js} +1 -1
  34. package/dist/client/assets/{Stars02-BEZaBHTc.js → Stars02-DTCJxH0_.js} +1 -1
  35. package/dist/client/assets/{Sun-CxlEqCDi.js → Sun-DBnfC6xb.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-BPoIdNhd.js → SwitchHorizontal01-CQZ9t4Uh.js} +1 -1
  37. package/dist/client/assets/{Tool01-D15DzDIB.js → Tool01-K1KtrUp3.js} +1 -1
  38. package/dist/client/assets/{Tool02-DcVuymPV.js → Tool02-CaMOVLUq.js} +1 -1
  39. package/dist/client/assets/{Trash01-rd-vb1MA.js → Trash01-Hh3vb-pV.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-BBA3UF71.js → TrendUp01-Cpu4_O9X.js} +1 -1
  41. package/dist/client/assets/{Upload01-CURnTiOx.js → Upload01-PO1Z12J3.js} +1 -1
  42. package/dist/client/assets/{User01-CGWss5jM.js → User01-ClQH_5NK.js} +1 -1
  43. package/dist/client/assets/{UserSquare-DNzPXyDT.js → UserSquare-DtGKXF0N.js} +1 -1
  44. package/dist/client/assets/{Users01-B043Q3B_.js → Users01-Bvqsn2Z0.js} +1 -1
  45. package/dist/client/assets/{Users03-CeFJXyBc.js → Users03-C1f0X_bD.js} +1 -1
  46. package/dist/client/assets/{XCircle-vpb-OIYV.js → XCircle-qXvFFF3a.js} +1 -1
  47. package/dist/client/assets/{XClose-Ca1B07wN.js → XClose-F4_KA-E6.js} +1 -1
  48. package/dist/client/assets/{YAxis-CEmbkD2K.js → YAxis-Bwjlsmrn.js} +1 -1
  49. package/dist/client/assets/{Zap-DoBPpnDg.js → Zap-DK06ViId.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-B52zBMI0.js → ZapSquare-B8eYKtXE.js} +1 -1
  51. package/dist/client/assets/{access-gate-BT3_V_pA.js → access-gate-C5Y4THSz.js} +1 -1
  52. package/dist/client/assets/{agent-icon-Dt8TTBNR.js → agent-icon-BRsJ64Gp.js} +1 -1
  53. package/dist/client/assets/{agents-list-BVmLhzQp.js → agents-list-Cb5QyV0J.js} +1 -1
  54. package/dist/client/assets/{ai-providers-nCIA03hu.js → ai-providers-F9sUAX3N.js} +1 -1
  55. package/dist/client/assets/{alert-CVrfLuO_.js → alert-DjabJJJC.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-COKsRPdB.js → alert-dialog-C6uvTNV5.js} +1 -1
  57. package/dist/client/assets/{api-keys-B2kzULLm.js → api-keys-DmdCnjmd.js} +1 -1
  58. package/dist/client/assets/{app-editor-Bq3jQAI6.js → app-editor-CCEPa5_q.js} +1 -1
  59. package/dist/client/assets/{auth-Dff1xvcy.js → auth-BjDvWFq6.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-BXu-XwcE.js → auth-catchall-CpusPL_F.js} +1 -1
  61. package/dist/client/assets/{auth-entry-BjUIXBC9.js → auth-entry-DhkykqHc.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-DyTFtZvs.js → auth-split-layout-BvVQruwK.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-BpXFlbw1.js → authenticate-and-persist-oauth-CfcfVqDI.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-BcptvIDe.js → automation-list-row-BO2X7Ov7.js} +1 -1
  65. package/dist/client/assets/{automation-runs-l52V2CDe.js → automation-runs-BQpimZeU.js} +1 -1
  66. package/dist/client/assets/{automations-A1r9cPLm.js → automations-CYoHIEOo.js} +1 -1
  67. package/dist/client/assets/{avatar-CKLVepem.js → avatar-CiQyTRfd.js} +1 -1
  68. package/dist/client/assets/{badge-B2mtA9Oj.js → badge-Dp3mR27V.js} +1 -1
  69. package/dist/client/assets/{block-document-CTUlzaXj.js → block-document-By6966PS.js} +1 -1
  70. package/dist/client/assets/{buckets-CqwW0fPK.js → buckets-BtAjuTXp.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-DOf0qDJu.js → bulk-category-panel-Crj0FXFd.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-Bu1DMqyM.js → capability-load-error-DcN5DOFH.js} +1 -1
  73. package/dist/client/assets/{cards-CnXEidEU.js → cards-BKUYovMU.js} +1 -1
  74. package/dist/client/assets/{category-editor-C2Penmxb.js → category-editor-BrklTiAF.js} +1 -1
  75. package/dist/client/assets/{chart-mQfq8dm_.js → chart-56471C1Y.js} +1 -1
  76. package/dist/client/assets/{chat-context-IctGRlpl.js → chat-context-_CA_JeeY.js} +1 -1
  77. package/dist/client/assets/{checkbox-DjvUsSry.js → checkbox-C1bUrPvW.js} +1 -1
  78. package/dist/client/assets/{choose-editor-D2hlr7Vq.js → choose-editor-nese6qE5.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-odBhJDfC.js → cli-auth-success-CCmWyNoP.js} +1 -1
  80. package/dist/client/assets/{collection-detail-EdlXGuH5.js → collection-detail-B90a00NV.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-BeWwcB8v.js → collection-display-button-FKEWPN7M.js} +1 -1
  82. package/dist/client/assets/{collection-search-BcNT9wqV.js → collection-search-Bd6xu3h9.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-DEX-95qA.js → collection-table-wrapper-15zlEhjP.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-QBx9fiO8.js → collection-tabs-3ta98PDW.js} +1 -1
  85. package/dist/client/assets/{command-Bciip2fK.js → command-pFth6-af.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-BrgV_E6e.js → commerce-onboarding-BQlfD3LU.js} +1 -1
  87. package/dist/client/assets/{connect-CJeRXYpO.js → connect-DMudoU2M.js} +1 -1
  88. package/dist/client/assets/{connection-CIVlVP4z.js → connection-QHosBlKh.js} +1 -1
  89. package/dist/client/assets/{connection-card-DLmi_xFL.js → connection-card-DXUN0HbG.js} +1 -1
  90. package/dist/client/assets/{connection-detail-DLHrsg7S.js → connection-detail-BQZMFHWj.js} +1 -1
  91. package/dist/client/assets/{connection-form-helpers-Bd1zJpcE.js → connection-form-helpers-Dw_uRR_o.js} +1 -1
  92. package/dist/client/assets/{connections-CaZTNlzO.js → connections-Cdozilw9.js} +1 -1
  93. package/dist/client/assets/{decopilot-sse-pool-0EWVughz.js → decopilot-sse-pool-B2gldwFf.js} +1 -1
  94. package/dist/client/assets/{dialog-BVOhf6JL.js → dialog-CLVbCjMu.js} +1 -1
  95. package/dist/client/assets/{domain-settings-1pFiPcDs.js → domain-settings-DoR6E0N1.js} +1 -1
  96. package/dist/client/assets/{drawer-ygpURzdE.js → drawer-Ckbm2CWJ.js} +1 -1
  97. package/dist/client/assets/{dropdown-menu-BpdWhSA7.js → dropdown-menu-D2aUCLYk.js} +1 -1
  98. package/dist/client/assets/{empty-state-CMCoRH7w.js → empty-state-BF41trPY.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-BRWpOoZu.js → extract-connection-data-A9qAyYQA.js} +1 -1
  100. package/dist/client/assets/{file-explorer-DLBtkOjU.js → file-explorer-ws1ucCZl.js} +1 -1
  101. package/dist/client/assets/{file-type-icon-DQDAdTqu.js → file-type-icon-wuRfMh_5.js} +1 -1
  102. package/dist/client/assets/{form-DJoSkHk7.js → form-BI3-Eb2L.js} +1 -1
  103. package/dist/client/assets/{general-CBRT6s1c.js → general-Dkq5x-QZ.js} +1 -1
  104. package/dist/client/assets/{github-repo-picker-CPPjWOCA.js → github-repo-picker-BMkV5srU.js} +1 -1
  105. package/dist/client/assets/{hooks-CtnSCLIe.js → hooks-DlPXzzl8.js} +1 -1
  106. package/dist/client/assets/{index-BJiFP4oP.js → index-B1veCTx1.js} +1 -1
  107. package/dist/client/assets/{index-DTM9lZbn.js → index-B_Ad5QPQ.js} +1 -1
  108. package/dist/client/assets/{index-CVkGlHYs.js → index-C2XLHMiw.js} +1 -1
  109. package/dist/client/assets/{index-D9nsJyXn.js → index-CV8Bfh5R.js} +43 -43
  110. package/dist/client/assets/{index-BeW-gOXM.js → index-Cssg9t23.js} +1 -1
  111. package/dist/client/assets/{index-Bks1FS3f.js → index-DAPcjavx.js} +1 -1
  112. package/dist/client/assets/{index-xXm-vpSs.js → index-DJM5ojUf.js} +1 -1
  113. package/dist/client/assets/{index-fZpMDfe6.js → index-DS_PtpmP.js} +3 -3
  114. package/dist/client/assets/{index-DZsKkAKU.js → index-Dh9w3kQB.js} +1 -1
  115. package/dist/client/assets/{index-AZvP0lkz.js → index-Dl5uUBVr.js} +1 -1
  116. package/dist/client/assets/{index-redirect-iRkpwVGO.js → index-redirect-DO74fkKf.js} +1 -1
  117. package/dist/client/assets/{infra-billing-DFpE7R9j.js → infra-billing-DLGhuOLw.js} +1 -1
  118. package/dist/client/assets/{input-v4c8p5Ob.js → input-Dsyfk4jo.js} +1 -1
  119. package/dist/client/assets/{integration-icon-DKqG-Mpx.js → integration-icon-DQzHhbi_.js} +1 -1
  120. package/dist/client/assets/{invite-member-dialog-3-Aihs7O.js → invite-member-dialog-6MS0bODt.js} +1 -1
  121. package/dist/client/assets/{label-DOL_dkX5.js → label-AZH9h-dP.js} +1 -1
  122. package/dist/client/assets/{layout-DHLrZup9.js → layout-jQzTnGd2.js} +1 -1
  123. package/dist/client/assets/login-B5ShBVQi.js +1 -0
  124. package/dist/client/assets/{mcp-oauth-MtFdjicX.js → mcp-oauth-CV7iuGWl.js} +1 -1
  125. package/dist/client/assets/{members-jHzwIadJ.js → members-DyI3pT9y.js} +1 -1
  126. package/dist/client/assets/{monaco-editor-DOnHAZIR.js → monaco-editor-CEXQCwfP.js} +1 -1
  127. package/dist/client/assets/{monitoring-stats-row-8XgEvO3D.js → monitoring-stats-row-C3Te4mdv.js} +1 -1
  128. package/dist/client/assets/{multi-select-DxScFuSI.js → multi-select-DPBlx32W.js} +1 -1
  129. package/dist/client/assets/{oauth-callback-DTWHq_Fr.js → oauth-callback-CrdVqleB.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-ai-provider-DjoClVq8.js → oauth-callback-ai-provider-KyQ1PZrQ.js} +1 -1
  131. package/dist/client/assets/{onboarding-CyYYA_IO.js → onboarding-BslW1pcP.js} +1 -1
  132. package/dist/client/assets/{org-layout-DsGm5b87.js → org-layout-CO6jG1v2.js} +1 -1
  133. package/dist/client/assets/{organization-choice-WY-H2NEY.js → organization-choice-CoM8gu7M.js} +1 -1
  134. package/dist/client/assets/{orgs-DggiyP30.js → orgs-CwehcPGm.js} +1 -1
  135. package/dist/client/assets/{page-seo-form-BoZrAFLO.js → page-seo-form-9OJihF4x.js} +1 -1
  136. package/dist/client/assets/{popover-DSZP75un.js → popover-BRZicoZW.js} +1 -1
  137. package/dist/client/assets/{post-calendar-BTuD64kJ.js → post-calendar-hEguUc5o.js} +1 -1
  138. package/dist/client/assets/{post-editor-Dwh3Mrlh.js → post-editor-pLSbc6mp.js} +1 -1
  139. package/dist/client/assets/{primitives-aZbwao0Z.js → primitives-CtBKfa_X.js} +1 -1
  140. package/dist/client/assets/{profile-B_6pDwzu.js → profile-n9hx6gY-.js} +1 -1
  141. package/dist/client/assets/{project-app-view-LijoL6le.js → project-app-view-DoK4zGoF.js} +1 -1
  142. package/dist/client/assets/record-editor-BiTWcS2C.js +1 -0
  143. package/dist/client/assets/{redirect-editor-bt0UR5sd.js → redirect-editor-feQIS-ih.js} +1 -1
  144. package/dist/client/assets/{registry-layout-Da3tVRcY.js → registry-layout-DaMCQA8V.js} +1 -1
  145. package/dist/client/assets/registry-zK072Ecp.js +2 -0
  146. package/dist/client/assets/{reports-DjBTZdT2.js → reports-DGCK2_12.js} +1 -1
  147. package/dist/client/assets/{require-capability-CF9r_mzF.js → require-capability-BuB0VaIt.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-XqEbPK8M.js → required-auth-layout-C8K6T2Dl.js} +1 -1
  149. package/dist/client/assets/{reset-password-DEL_G7hS.js → reset-password-Bv3lK8g1.js} +1 -1
  150. package/dist/client/assets/{roles-DDOKq874.js → roles-04svMQ-w.js} +1 -1
  151. package/dist/client/assets/{search-input-4SLm_iMt.js → search-input-BMFjaZW8.js} +1 -1
  152. package/dist/client/assets/{secrets-CJLKcRa3.js → secrets-CAom0Pas.js} +1 -1
  153. package/dist/client/assets/{sections-editor-CLwG1W2k.js → sections-editor-DYATNkxM.js} +1 -1
  154. package/dist/client/assets/{select-model-pYcHYqNY.js → select-model-DbrnwWTj.js} +1 -1
  155. package/dist/client/assets/{select-D9OtHuoQ.js → select-v0HyS5wV.js} +1 -1
  156. package/dist/client/assets/{self-tool-result-C2SaSBOS.js → self-tool-result-r1jsmu7J.js} +1 -1
  157. package/dist/client/assets/{seo-editor-DGd5xF_D.js → seo-editor-BqjKMW9L.js} +1 -1
  158. package/dist/client/assets/{settings-layout-UMPp-PK8.js → settings-layout-D3s-EDDq.js} +1 -1
  159. package/dist/client/assets/{shell-controls-CEjTnZRA.js → shell-controls-BH090Ymi.js} +1 -1
  160. package/dist/client/assets/{shell-layout-0_Y9WTC5.js → shell-layout-Ca7ET_6R.js} +1 -1
  161. package/dist/client/assets/{spinner-DnK6LAO-.js → spinner-Dzoa8exR.js} +1 -1
  162. package/dist/client/assets/{sprints-DTKQS9tP.js → sprints-BDnw_QJc.js} +1 -1
  163. package/dist/client/assets/{sso-Bj9k9yp_.js → sso-Br3gVbj4.js} +1 -1
  164. package/dist/client/assets/{store-DofhpRf4.js → store-TksVzK51.js} +1 -1
  165. package/dist/client/assets/store-registry-CH-meU9J.js +2 -0
  166. package/dist/client/assets/{switch-Dd8SWBtK.js → switch-CPOt6c8D.js} +1 -1
  167. package/dist/client/assets/{synced-repos-0UH9NuJE.js → synced-repos-DMsM8gK7.js} +1 -1
  168. package/dist/client/assets/{tab-id-W4sfonX1.js → tab-id-BOj9dZWT.js} +1 -1
  169. package/dist/client/assets/{table-B28U6WCV.js → table-yXN-B6JM.js} +1 -1
  170. package/dist/client/assets/{tabs-CNvz9wkq.js → tabs-DMoGi1te.js} +1 -1
  171. package/dist/client/assets/{task-key-CTiJU5_h.js → task-key-C2W_oYAM.js} +1 -1
  172. package/dist/client/assets/{tasks-BsRXKJkD.js → tasks-BrWj9zEH.js} +1 -1
  173. package/dist/client/assets/{textarea-BmWik9O5.js → textarea-CegtzxU_.js} +1 -1
  174. package/dist/client/assets/{toggle-group-B1ujv-Tj.js → toggle-group-5omFh11U.js} +1 -1
  175. package/dist/client/assets/{toolbar-Cos-gS1a.js → toolbar-DORhO8If.js} +1 -1
  176. package/dist/client/assets/{track-Cth4u5b_.js → track-B8qKGWO9.js} +1 -1
  177. package/dist/client/assets/{types-Da-6shE5.js → types-CE4AuZSY.js} +1 -1
  178. package/dist/client/assets/{use-ai-providers-bDkOAByr.js → use-ai-providers-DAYMp9NI.js} +1 -1
  179. package/dist/client/assets/{use-api-keys-Bi2l36nz.js → use-api-keys-DnFSxnvy.js} +1 -1
  180. package/dist/client/assets/{use-automations-BeKjYp7F.js → use-automations-DWv6iLeU.js} +1 -1
  181. package/dist/client/assets/{use-autosave-ImljMikW.js → use-autosave-iV8J_MuB.js} +1 -1
  182. package/dist/client/assets/{use-clock-tick-BIn9fxJl.js → use-clock-tick-BuVoJTdT.js} +1 -1
  183. package/dist/client/assets/{use-commerce-diagnostic-UqRl5JGR.js → use-commerce-diagnostic-KLE4UXiE.js} +1 -1
  184. package/dist/client/assets/{use-connection-DJ5BvXkS.js → use-connection-BJir_wda.js} +1 -1
  185. package/dist/client/assets/{use-copy-BHeXFKUG.js → use-copy-Ddcpb0Jm.js} +1 -1
  186. package/dist/client/assets/{use-create-virtual-mcp-CTghZh27.js → use-create-virtual-mcp-D0oAOlYC.js} +1 -1
  187. package/dist/client/assets/{use-debounced-autosave-BEoE5zu3.js → use-debounced-autosave-DYJOZB4t.js} +1 -1
  188. package/dist/client/assets/{use-debounced-value-d2xvAJAf.js → use-debounced-value-DXPF8RW0.js} +1 -1
  189. package/dist/client/assets/{use-decopilot-events-U00f_DNo.js → use-decopilot-events-CUYP3xa6.js} +1 -1
  190. package/dist/client/assets/{use-delete-connection-KttG6pDD.js → use-delete-connection-CaYWV75o.js} +1 -1
  191. package/dist/client/assets/{use-deployment-admin-BxGtVq0R.js → use-deployment-admin-DiSPyrP4.js} +1 -1
  192. package/dist/client/assets/{use-file-configs-ivKLtwVT.js → use-file-configs-BZNx7FRl.js} +1 -1
  193. package/dist/client/assets/{use-infinite-scroll-C3woVgJJ.js → use-infinite-scroll-DGa9MpTS.js} +1 -1
  194. package/dist/client/assets/{use-join-requests-Ce2D10xE.js → use-join-requests-_j9mGSpf.js} +1 -1
  195. package/dist/client/assets/{use-mcp-client-BixLZLmc.js → use-mcp-client-Zz1TwEAh.js} +1 -1
  196. package/dist/client/assets/{use-mcp-tools-DhYUR3cu.js → use-mcp-tools-CXwtpaPy.js} +1 -1
  197. package/dist/client/assets/{use-members-DqBCB9wB.js → use-members--D0gY-Nz.js} +1 -1
  198. package/dist/client/assets/{use-navigate-to-agent-COcz3Nee.js → use-navigate-to-agent-BTDz1KOs.js} +1 -1
  199. package/dist/client/assets/{use-org-auth-client-Bm7ydyvS.js → use-org-auth-client-C8dt2CEh.js} +1 -1
  200. package/dist/client/assets/{use-org-repo-syncs-B_4SIVWY.js → use-org-repo-syncs-BMPkdDGr.js} +1 -1
  201. package/dist/client/assets/{use-org-sso-9a_THghN.js → use-org-sso-DAANUxzR.js} +1 -1
  202. package/dist/client/assets/{use-organization-roles-CNEl3NFe.js → use-organization-roles-C4JrUmJs.js} +1 -1
  203. package/dist/client/assets/{use-organization-settings-B4nKr0f2.js → use-organization-settings-BZyz9Mop.js} +1 -1
  204. package/dist/client/assets/{use-registry-connections-C7LyRS1M.js → use-registry-connections-DrNpncD0.js} +1 -1
  205. package/dist/client/assets/{use-secrets-Chh3ojOY.js → use-secrets-XCXR_vh8.js} +1 -1
  206. package/dist/client/assets/{use-section-preview-base-Db24sM6t.js → use-section-preview-base-BuCg0_G0.js} +1 -1
  207. package/dist/client/assets/{use-status-sounds-DFis4MWx.js → use-status-sounds-CjE1Nwyt.js} +1 -1
  208. package/dist/client/assets/{use-tags-DSiXReOW.js → use-tags-CtHBcu1c.js} +1 -1
  209. package/dist/client/assets/{use-view-mode-5S7L8whl.js → use-view-mode-D2QnCor3.js} +1 -1
  210. package/dist/client/assets/{use-virtual-mcp-CxECG99q.js → use-virtual-mcp-BHOLpD1P.js} +1 -1
  211. package/dist/client/assets/useInfiniteQuery-DrLMltTg.js +1 -0
  212. package/dist/client/assets/useSuspenseInfiniteQuery-bgdhkmFx.js +1 -0
  213. package/dist/client/assets/{users-DegqgBxw.js → users-BdTetp54.js} +1 -1
  214. package/dist/client/assets/{variant-calendar-Ca_JbtN7.js → variant-calendar-OvwXqvaE.js} +1 -1
  215. package/dist/client/assets/{view-mode-toggle-rkJlH4vl.js → view-mode-toggle-DYMYSHNc.js} +1 -1
  216. package/dist/client/index.html +1 -1
  217. package/dist/server/cli.js +456 -452
  218. package/dist/server/migrate.js +113 -109
  219. package/dist/server/server.js +4 -4
  220. package/package.json +1 -1
  221. package/dist/client/assets/login-BAB1aLje.js +0 -1
  222. package/dist/client/assets/record-editor-BJycqOk0.js +0 -1
  223. package/dist/client/assets/registry-D7lhOlQc.js +0 -2
  224. package/dist/client/assets/store-registry-Cuo4Kfxl.js +0 -2
  225. package/dist/client/assets/useInfiniteQuery-D6nR9UJf.js +0 -1
  226. package/dist/client/assets/useSuspenseInfiniteQuery-BfIWoPo8.js +0 -1
@@ -1 +1 @@
1
- import{c as j,a5 as P,b as k,j as t,ad as D,ae as F,af as J,bF as Q,bG as U,C as V,f as X,m as Z,r as T,H as K,n as _,bH as Y,U as z,W as C,X as w,_ as q,Z as O,L as I,q as N,a1 as ee,a2 as se,a7 as L,a as R,k as te,bI as ne,O as le}from"./index-fZpMDfe6.js";import{n as ie,a as ae,b as oe,c as re}from"./ZapSquare-B52zBMI0.js";import{t as ce,a as M}from"./Users03-CeFJXyBc.js";import{t as me}from"./ChevronDown-Bh9AZv82.js";import{i as de}from"./ChevronRight-Bt0Ps5hy.js";import{i as fe}from"./CreditCard01-DXJKk1Wt.js";import{i as ge}from"./HardDrive-DMA6WwJi.js";import{i as ue}from"./Key01-CQ2Pckpa.js";import{n as xe}from"./LinkExternal01-CDWxDAhW.js";import{i as A}from"./LogOut01-DYTwrIyB.js";import{s as be}from"./User01-CGWss5jM.js";import{i as pe}from"./Zap-DoBPpnDg.js";import{u as he}from"./use-join-requests-Ce2D10xE.js";import{u as je}from"./use-status-sounds-DFis4MWx.js";import{a as S}from"./toolbar-Cos-gS1a.js";import{S as ve,M as ye}from"./shell-controls-CEjTnZRA.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-U00f_DNo.js";import"./decopilot-sse-pool-0EWVughz.js";import"./backoff-CrEUbyZT.js";function G(){const e=j.c(8),s=k(),{capabilities:n,isPrivileged:l,loading:a,error:o}=Q(),r=he().length,i=U();let f;return e[0]!==n||e[1]!==o||e[2]!==l||e[3]!==r||e[4]!==a||e[5]!==s||e[6]!==i?(f=[{key:"account",label:"",items:[{key:"profile",label:s("settings.nav.profile"),icon:t.jsx(be,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:t.jsx(ce,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:s("settings.nav.billing"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:s("settings.nav.connect"),icon:t.jsx(xe,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:s("settings.nav.tasks"),icon:t.jsx(ie,{size:14}),to:"/$org/settings/tasks",requires:"org:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:t.jsx(ae,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:t.jsx(M,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:t.jsx(pe,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:t.jsx(oe,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:t.jsx(M,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:s("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:s("settings.nav.secrets"),icon:t.jsx(ue,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:s("settings.nav.storage"),icon:t.jsx(ge,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:s("settings.nav.store"),icon:t.jsx(re,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:s("settings.nav.security"),icon:t.jsx(V,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(d=>({...d,items:d.items.flatMap(c=>{if(c.group){const[g]=i[c.group];return g?[{...c,to:g.to}]:[]}return a||o?[c]:c.privilegedOnly?l?[c]:[]:c.requires?l||n[c.requires]?[c]:[]:[c]})})).filter(Se),e[0]=n,e[1]=o,e[2]=l,e[3]=r,e[4]=a,e[5]=s,e[6]=i,e[7]=f):f=e[7],f}function Se(e){return e.items.length>0}function H(e){const s=j.c(5),{icon:n,badge:l}=e;let a;s[0]!==l?(a=l?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=l,s[1]=a):a=s[1];let o;return s[2]!==n||s[3]!==a?(o=t.jsxs("span",{className:"relative shrink-0",children:[n,a]}),s[2]=n,s[3]=a,s[4]=o):o=s[4],o}function $(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:n}=X(s);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:_e},e[1]=l):l=e[1];const a=Z(l);let o;if(e[2]!==n||e[3]!==a){const f=m=>{const d=m.replace("$org",n);return a===d||a.startsWith(`${d}/`)};o=m=>(m.group?Y(m.group):[m.to]).some(f),e[2]=n,e[3]=a,e[4]=o}else o=e[4];const r=o;let i;return e[5]!==r||e[6]!==n?(i={org:n,isActive:r},e[5]=r,e[6]=n,e[7]=i):i=e[7],i}function _e(e){return e.location.pathname}function E(){const e=j.c(9),{isActive:s}=$();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={},e[0]=n):n=e[0];const[l,a]=T.useState(n);let o;e[1]!==s||e[2]!==l?(o=d=>l[d.key]??(!d.collapsible||d.items.some(s)),e[1]=s,e[2]=l,e[3]=o):o=e[3];const r=o;let i;e[4]!==r?(i=d=>a(c=>({...c,[d.key]:!r(d)})),e[4]=r,e[5]=i):i=e[5];const f=i;let m;return e[6]!==r||e[7]!==f?(m={isOpen:r,toggle:f},e[6]=r,e[7]=f,e[8]=m):m=e[8],m}function B(e){const s=j.c(21),{group:n,open:l,onToggle:a,className:o}=e;let r,i,f,m,d;if(s[0]!==o||s[1]!==n.collapsible||s[2]!==n.label||s[3]!==a||s[4]!==l){d=Symbol.for("react.early_return_sentinel");e:{const b=_("text-xs font-medium text-muted-foreground/60 truncate",o);if(!n.collapsible){d=t.jsx("p",{className:b,children:n.label});break e}r="button",i=a,f=l,m=_("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",b)}s[0]=o,s[1]=n.collapsible,s[2]=n.label,s[3]=a,s[4]=l,s[5]=r,s[6]=i,s[7]=f,s[8]=m,s[9]=d}else r=s[5],i=s[6],f=s[7],m=s[8],d=s[9];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;s[10]!==l?(c=l?t.jsx(me,{size:12}):t.jsx(de,{size:12}),s[10]=l,s[11]=c):c=s[11];let g;s[12]!==n.label?(g=t.jsx("span",{className:"truncate",children:n.label}),s[12]=n.label,s[13]=g):g=s[13];let u;return s[14]!==r||s[15]!==i||s[16]!==f||s[17]!==m||s[18]!==c||s[19]!==g?(u=t.jsxs("button",{type:r,onClick:i,"aria-expanded":f,className:m,children:[c,g]}),s[14]=r,s[15]=i,s[16]=f,s[17]=m,s[18]=c,s[19]=g,s[20]=u):u=s[20],u}function ke(){const e=j.c(23),s=k(),n=G(),{org:l,isActive:a}=$(),{isOpen:o,toggle:r}=E();let i;if(e[0]!==n||e[1]!==a||e[2]!==o||e[3]!==l||e[4]!==r){let h;e[6]!==a||e[7]!==o||e[8]!==l||e[9]!==r?(h=(p,v)=>t.jsxs(z,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&t.jsx(B,{group:p,open:o(p),onToggle:()=>r(p),className:_("px-2 pt-1.5 pb-0.5",v>0&&"mt-3")}),o(p)&&t.jsx(C,{children:t.jsx(w,{className:"gap-0.5",children:p.items.map(x=>t.jsx(q,{children:t.jsx(O,{asChild:!0,isActive:a(x),children:t.jsxs(I,{to:x.to,params:{org:l},onClick:()=>N("settings_nav_clicked",{section_key:x.key,group_key:p.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(H,{icon:x.icon,badge:x.badge}),t.jsx("span",{className:"truncate",children:x.label})]})})},x.key))})})]},p.key),e[6]=a,e[7]=o,e[8]=l,e[9]=r,e[10]=h):h=e[10],i=n.map(h),e[0]=n,e[1]=a,e[2]=o,e[3]=l,e[4]=r,e[5]=i}else i=e[5];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[11]=f):f=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(A,{size:14})}),e[12]=m):m=e[12];let d;e[13]!==s?(d=s("settings.nav.signOut"),e[13]=s,e[14]=d):d=e[14];let c;e[15]!==d?(c=t.jsxs(z,{className:"mt-auto pt-0 pr-0 pb-0 pl-0",children:[f,t.jsx(C,{children:t.jsx(w,{className:"gap-0.5",children:t.jsx(q,{children:t.jsxs(O,{onClick:Ne,className:"flex items-center gap-2.5 text-sm",children:[m,t.jsx("span",{className:"truncate",children:d})]})})})})]}),e[15]=d,e[16]=c):c=e[16];let g;e[17]!==i||e[18]!==c?(g=t.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[17]=i,e[18]=c,e[19]=g):g=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.263.2"]})}),e[20]=u):u=e[20];let b;return e[21]!==g?(b=t.jsxs(se,{variant:"sidebar",children:[g,u]}),e[21]=g,e[22]=b):b=e[22],b}function Ne(){N("signed_out",{source:"settings_sidebar"}),L(),R.signOut()}function $e(e){const s=j.c(25),{onClose:n}=e,l=k(),a=G(),{org:o,isActive:r}=$(),{isOpen:i,toggle:f}=E();let m;if(s[0]!==a||s[1]!==r||s[2]!==i||s[3]!==n||s[4]!==o||s[5]!==f){let v;s[7]!==r||s[8]!==i||s[9]!==n||s[10]!==o||s[11]!==f?(v=(x,W)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[x.label&&t.jsx(B,{group:x,open:i(x),onToggle:()=>f(x),className:_("px-3 pt-1.5 pb-0.5",W>0&&"mt-3")}),i(x)&&x.items.map(y=>t.jsxs(I,{to:y.to,params:{org:o},onClick:n,className:_("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",r(y)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(H,{icon:y.icon,badge:y.badge}),t.jsx("span",{className:"truncate",children:y.label})]},y.key))]},x.key),s[7]=r,s[8]=i,s[9]=n,s[10]=o,s[11]=f,s[12]=v):v=s[12],m=a.map(v),s[0]=a,s[1]=r,s[2]=i,s[3]=n,s[4]=o,s[5]=f,s[6]=m}else m=s[6];let d;s[13]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[13]=d):d=s[13];let c;s[14]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("span",{className:"shrink-0",children:t.jsx(A,{size:14})}),s[14]=c):c=s[14];let g;s[15]!==l?(g=l("settings.nav.signOut"),s[15]=l,s[16]=g):g=s[16];let u;s[17]!==g?(u=t.jsxs("div",{className:"mt-auto flex flex-col gap-0.5",children:[d,t.jsxs("button",{type:"button",onClick:ze,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:[c,t.jsx("span",{className:"truncate",children:g})]})]}),s[17]=g,s[18]=u):u=s[18];let b;s[19]!==m||s[20]!==u?(b=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[m,u]}),s[19]=m,s[20]=u,s[21]=b):b=s[21];let h;s[22]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.263.2"]})}),s[22]=h):h=s[22];let p;return s[23]!==b?(p=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,h]}),s[23]=b,s[24]=p):p=s[24],p}function ze(){N("signed_out",{source:"settings_sidebar"}),L(),R.signOut()}function Ce(){const e=j.c(4),s=P(),{org:n}=K();je(n.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(te,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(T.Suspense,{fallback:l,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(ne,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(le,{})})})})}),e[1]=a):a=e[1];const o=a;if(s){let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=i):i=e[2],i}let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:_("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=r):r=e[3],r}function Xe(){const e=j.c(21),s=P();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(S.LogoLink,{}),e[0]=n):n=e[0];let l;e[1]!==s?(l=s&&t.jsx(ve,{}),e[1]=s,e[2]=l):l=e[2];let a;e[3]!==l?(a=t.jsxs(S.LeftColumn,{children:[n,l]}),e[3]=l,e[4]=a):a=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(S.CenterSlot,{}),e[5]=o):o=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(S.RightColumn,{children:t.jsx("span",{})}),e[6]=r):r=e[6];let i;e[7]!==a?(i=t.jsxs(S.Header,{children:[a,o,r]}),e[7]=a,e[8]=i):i=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f={"--sidebar-width-icon":"3.125rem"},e[9]=f):f=e[9];let m;e[10]!==s?(m=!s&&t.jsx(ke,{}),e[10]=s,e[11]=m):m=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(D,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(Ce,{})}),e[12]=d):d=e[12];let c;e[13]!==m?(c=t.jsxs(F,{className:"flex-1 bg-sidebar min-h-0",style:f,children:[m,d]}),e[13]=m,e[14]=c):c=e[14];let g;e[15]!==s?(g=s&&t.jsx(ye,{renderSidebar:we}),e[15]=s,e[16]=g):g=e[16];let u;return e[17]!==g||e[18]!==i||e[19]!==c?(u=t.jsx(S.Provider,{children:t.jsx(J,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,c,g]})})}),e[17]=g,e[18]=i,e[19]=c,e[20]=u):u=e[20],u}function we(e){const{onClose:s}=e;return t.jsx($e,{onClose:s})}export{ke as SettingsSidebar,$e as SettingsSidebarMobile,Xe as default};
1
+ import{c as j,a5 as P,b as k,j as t,ad as D,ae as F,af as J,bF as Q,bG as U,C as V,f as X,m as Z,r as T,H as K,n as _,bH as Y,U as z,W as C,X as w,_ as q,Z as O,L as I,q as N,a1 as ee,a2 as se,a7 as L,a as R,k as te,bI as ne,O as le}from"./index-DS_PtpmP.js";import{n as ie,a as ae,b as oe,c as re}from"./ZapSquare-B8eYKtXE.js";import{t as ce,a as M}from"./Users03-C1f0X_bD.js";import{t as me}from"./ChevronDown-DC3VmpPs.js";import{i as de}from"./ChevronRight-DB1jERJP.js";import{i as fe}from"./CreditCard01-C02kJIQ-.js";import{i as ge}from"./HardDrive-DKQRwLSP.js";import{i as ue}from"./Key01-kpUUZaqy.js";import{n as xe}from"./LinkExternal01-NyjdMVf7.js";import{i as A}from"./LogOut01-Dd8QdhEu.js";import{s as be}from"./User01-ClQH_5NK.js";import{i as pe}from"./Zap-DK06ViId.js";import{u as he}from"./use-join-requests-_j9mGSpf.js";import{u as je}from"./use-status-sounds-CjE1Nwyt.js";import{a as S}from"./toolbar-DORhO8If.js";import{S as ve,M as ye}from"./shell-controls-BH090Ymi.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CUYP3xa6.js";import"./decopilot-sse-pool-B2gldwFf.js";import"./backoff-CrEUbyZT.js";function G(){const e=j.c(8),s=k(),{capabilities:n,isPrivileged:l,loading:a,error:o}=Q(),r=he().length,i=U();let f;return e[0]!==n||e[1]!==o||e[2]!==l||e[3]!==r||e[4]!==a||e[5]!==s||e[6]!==i?(f=[{key:"account",label:"",items:[{key:"profile",label:s("settings.nav.profile"),icon:t.jsx(be,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:t.jsx(ce,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:s("settings.nav.billing"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:s("settings.nav.connect"),icon:t.jsx(xe,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:s("settings.nav.tasks"),icon:t.jsx(ie,{size:14}),to:"/$org/settings/tasks",requires:"org:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:t.jsx(ae,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:t.jsx(M,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:t.jsx(pe,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:t.jsx(oe,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:t.jsx(M,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:s("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:s("settings.nav.secrets"),icon:t.jsx(ue,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:s("settings.nav.storage"),icon:t.jsx(ge,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:s("settings.nav.store"),icon:t.jsx(re,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:s("settings.nav.security"),icon:t.jsx(V,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(d=>({...d,items:d.items.flatMap(c=>{if(c.group){const[g]=i[c.group];return g?[{...c,to:g.to}]:[]}return a||o?[c]:c.privilegedOnly?l?[c]:[]:c.requires?l||n[c.requires]?[c]:[]:[c]})})).filter(Se),e[0]=n,e[1]=o,e[2]=l,e[3]=r,e[4]=a,e[5]=s,e[6]=i,e[7]=f):f=e[7],f}function Se(e){return e.items.length>0}function H(e){const s=j.c(5),{icon:n,badge:l}=e;let a;s[0]!==l?(a=l?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=l,s[1]=a):a=s[1];let o;return s[2]!==n||s[3]!==a?(o=t.jsxs("span",{className:"relative shrink-0",children:[n,a]}),s[2]=n,s[3]=a,s[4]=o):o=s[4],o}function $(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:n}=X(s);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:_e},e[1]=l):l=e[1];const a=Z(l);let o;if(e[2]!==n||e[3]!==a){const f=m=>{const d=m.replace("$org",n);return a===d||a.startsWith(`${d}/`)};o=m=>(m.group?Y(m.group):[m.to]).some(f),e[2]=n,e[3]=a,e[4]=o}else o=e[4];const r=o;let i;return e[5]!==r||e[6]!==n?(i={org:n,isActive:r},e[5]=r,e[6]=n,e[7]=i):i=e[7],i}function _e(e){return e.location.pathname}function E(){const e=j.c(9),{isActive:s}=$();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={},e[0]=n):n=e[0];const[l,a]=T.useState(n);let o;e[1]!==s||e[2]!==l?(o=d=>l[d.key]??(!d.collapsible||d.items.some(s)),e[1]=s,e[2]=l,e[3]=o):o=e[3];const r=o;let i;e[4]!==r?(i=d=>a(c=>({...c,[d.key]:!r(d)})),e[4]=r,e[5]=i):i=e[5];const f=i;let m;return e[6]!==r||e[7]!==f?(m={isOpen:r,toggle:f},e[6]=r,e[7]=f,e[8]=m):m=e[8],m}function B(e){const s=j.c(21),{group:n,open:l,onToggle:a,className:o}=e;let r,i,f,m,d;if(s[0]!==o||s[1]!==n.collapsible||s[2]!==n.label||s[3]!==a||s[4]!==l){d=Symbol.for("react.early_return_sentinel");e:{const b=_("text-xs font-medium text-muted-foreground/60 truncate",o);if(!n.collapsible){d=t.jsx("p",{className:b,children:n.label});break e}r="button",i=a,f=l,m=_("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",b)}s[0]=o,s[1]=n.collapsible,s[2]=n.label,s[3]=a,s[4]=l,s[5]=r,s[6]=i,s[7]=f,s[8]=m,s[9]=d}else r=s[5],i=s[6],f=s[7],m=s[8],d=s[9];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;s[10]!==l?(c=l?t.jsx(me,{size:12}):t.jsx(de,{size:12}),s[10]=l,s[11]=c):c=s[11];let g;s[12]!==n.label?(g=t.jsx("span",{className:"truncate",children:n.label}),s[12]=n.label,s[13]=g):g=s[13];let u;return s[14]!==r||s[15]!==i||s[16]!==f||s[17]!==m||s[18]!==c||s[19]!==g?(u=t.jsxs("button",{type:r,onClick:i,"aria-expanded":f,className:m,children:[c,g]}),s[14]=r,s[15]=i,s[16]=f,s[17]=m,s[18]=c,s[19]=g,s[20]=u):u=s[20],u}function ke(){const e=j.c(23),s=k(),n=G(),{org:l,isActive:a}=$(),{isOpen:o,toggle:r}=E();let i;if(e[0]!==n||e[1]!==a||e[2]!==o||e[3]!==l||e[4]!==r){let h;e[6]!==a||e[7]!==o||e[8]!==l||e[9]!==r?(h=(p,v)=>t.jsxs(z,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&t.jsx(B,{group:p,open:o(p),onToggle:()=>r(p),className:_("px-2 pt-1.5 pb-0.5",v>0&&"mt-3")}),o(p)&&t.jsx(C,{children:t.jsx(w,{className:"gap-0.5",children:p.items.map(x=>t.jsx(q,{children:t.jsx(O,{asChild:!0,isActive:a(x),children:t.jsxs(I,{to:x.to,params:{org:l},onClick:()=>N("settings_nav_clicked",{section_key:x.key,group_key:p.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(H,{icon:x.icon,badge:x.badge}),t.jsx("span",{className:"truncate",children:x.label})]})})},x.key))})})]},p.key),e[6]=a,e[7]=o,e[8]=l,e[9]=r,e[10]=h):h=e[10],i=n.map(h),e[0]=n,e[1]=a,e[2]=o,e[3]=l,e[4]=r,e[5]=i}else i=e[5];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[11]=f):f=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(A,{size:14})}),e[12]=m):m=e[12];let d;e[13]!==s?(d=s("settings.nav.signOut"),e[13]=s,e[14]=d):d=e[14];let c;e[15]!==d?(c=t.jsxs(z,{className:"mt-auto pt-0 pr-0 pb-0 pl-0",children:[f,t.jsx(C,{children:t.jsx(w,{className:"gap-0.5",children:t.jsx(q,{children:t.jsxs(O,{onClick:Ne,className:"flex items-center gap-2.5 text-sm",children:[m,t.jsx("span",{className:"truncate",children:d})]})})})})]}),e[15]=d,e[16]=c):c=e[16];let g;e[17]!==i||e[18]!==c?(g=t.jsxs(ee,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[i,c]}),e[17]=i,e[18]=c,e[19]=g):g=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.263.3"]})}),e[20]=u):u=e[20];let b;return e[21]!==g?(b=t.jsxs(se,{variant:"sidebar",children:[g,u]}),e[21]=g,e[22]=b):b=e[22],b}function Ne(){N("signed_out",{source:"settings_sidebar"}),L(),R.signOut()}function $e(e){const s=j.c(25),{onClose:n}=e,l=k(),a=G(),{org:o,isActive:r}=$(),{isOpen:i,toggle:f}=E();let m;if(s[0]!==a||s[1]!==r||s[2]!==i||s[3]!==n||s[4]!==o||s[5]!==f){let v;s[7]!==r||s[8]!==i||s[9]!==n||s[10]!==o||s[11]!==f?(v=(x,W)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[x.label&&t.jsx(B,{group:x,open:i(x),onToggle:()=>f(x),className:_("px-3 pt-1.5 pb-0.5",W>0&&"mt-3")}),i(x)&&x.items.map(y=>t.jsxs(I,{to:y.to,params:{org:o},onClick:n,className:_("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",r(y)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(H,{icon:y.icon,badge:y.badge}),t.jsx("span",{className:"truncate",children:y.label})]},y.key))]},x.key),s[7]=r,s[8]=i,s[9]=n,s[10]=o,s[11]=f,s[12]=v):v=s[12],m=a.map(v),s[0]=a,s[1]=r,s[2]=i,s[3]=n,s[4]=o,s[5]=f,s[6]=m}else m=s[6];let d;s[13]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[13]=d):d=s[13];let c;s[14]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("span",{className:"shrink-0",children:t.jsx(A,{size:14})}),s[14]=c):c=s[14];let g;s[15]!==l?(g=l("settings.nav.signOut"),s[15]=l,s[16]=g):g=s[16];let u;s[17]!==g?(u=t.jsxs("div",{className:"mt-auto flex flex-col gap-0.5",children:[d,t.jsxs("button",{type:"button",onClick:ze,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:[c,t.jsx("span",{className:"truncate",children:g})]})]}),s[17]=g,s[18]=u):u=s[18];let b;s[19]!==m||s[20]!==u?(b=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[m,u]}),s[19]=m,s[20]=u,s[21]=b):b=s[21];let h;s[22]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.263.3"]})}),s[22]=h):h=s[22];let p;return s[23]!==b?(p=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,h]}),s[23]=b,s[24]=p):p=s[24],p}function ze(){N("signed_out",{source:"settings_sidebar"}),L(),R.signOut()}function Ce(){const e=j.c(4),s=P(),{org:n}=K();je(n.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(te,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(T.Suspense,{fallback:l,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(ne,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(le,{})})})})}),e[1]=a):a=e[1];const o=a;if(s){let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=i):i=e[2],i}let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:_("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=r):r=e[3],r}function Xe(){const e=j.c(21),s=P();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(S.LogoLink,{}),e[0]=n):n=e[0];let l;e[1]!==s?(l=s&&t.jsx(ve,{}),e[1]=s,e[2]=l):l=e[2];let a;e[3]!==l?(a=t.jsxs(S.LeftColumn,{children:[n,l]}),e[3]=l,e[4]=a):a=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(S.CenterSlot,{}),e[5]=o):o=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(S.RightColumn,{children:t.jsx("span",{})}),e[6]=r):r=e[6];let i;e[7]!==a?(i=t.jsxs(S.Header,{children:[a,o,r]}),e[7]=a,e[8]=i):i=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f={"--sidebar-width-icon":"3.125rem"},e[9]=f):f=e[9];let m;e[10]!==s?(m=!s&&t.jsx(ke,{}),e[10]=s,e[11]=m):m=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(D,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(Ce,{})}),e[12]=d):d=e[12];let c;e[13]!==m?(c=t.jsxs(F,{className:"flex-1 bg-sidebar min-h-0",style:f,children:[m,d]}),e[13]=m,e[14]=c):c=e[14];let g;e[15]!==s?(g=s&&t.jsx(ye,{renderSidebar:we}),e[15]=s,e[16]=g):g=e[16];let u;return e[17]!==g||e[18]!==i||e[19]!==c?(u=t.jsx(S.Provider,{children:t.jsx(J,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[i,c,g]})})}),e[17]=g,e[18]=i,e[19]=c,e[20]=u):u=e[20],u}function we(e){const{onClose:s}=e;return t.jsx($e,{onClose:s})}export{ke as SettingsSidebar,$e as SettingsSidebarMobile,Xe as default};
@@ -1 +1 @@
1
- import{c as u,b as d,M as h,j as f,a3 as S,aZ as p,b0 as x,b1 as g}from"./index-fZpMDfe6.js";import{T as j}from"./toolbar-Cos-gS1a.js";function M(m){const e=u.c(7),{className:o}=m,n=d(),{toggleSidebar:i}=h();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(S,{size:16}),e[2]=s):s=e[2];let l;return e[3]!==o||e[4]!==t||e[5]!==i?(l=f.jsx(j,{onClick:i,"aria-label":t,className:o,children:s}),e[3]=o,e[4]=t,e[5]=i,e[6]=l):l=e[6],l}function y(m){const e=u.c(16),{renderSidebar:o}=m,n=d(),{openMobile:i,setOpenMobile:t}=h();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=f.jsx(p,{className:"sr-only",children:s}),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let r;e[6]!==o||e[7]!==a?(r=o({onClose:a}),e[6]=o,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==l||e[10]!==r?(c=f.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[l,r]}),e[9]=l,e[10]=r,e[11]=c):c=e[11];let b;return e[12]!==i||e[13]!==t||e[14]!==c?(b=f.jsx(g,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=b):b=e[15],b}export{y as M,M as S};
1
+ import{c as u,b as d,M as h,j as f,a3 as S,aZ as p,b0 as x,b1 as g}from"./index-DS_PtpmP.js";import{T as j}from"./toolbar-DORhO8If.js";function M(m){const e=u.c(7),{className:o}=m,n=d(),{toggleSidebar:i}=h();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(S,{size:16}),e[2]=s):s=e[2];let l;return e[3]!==o||e[4]!==t||e[5]!==i?(l=f.jsx(j,{onClick:i,"aria-label":t,className:o,children:s}),e[3]=o,e[4]=t,e[5]=i,e[6]=l):l=e[6],l}function y(m){const e=u.c(16),{renderSidebar:o}=m,n=d(),{openMobile:i,setOpenMobile:t}=h();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=f.jsx(p,{className:"sr-only",children:s}),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let r;e[6]!==o||e[7]!==a?(r=o({onClose:a}),e[6]=o,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==l||e[10]!==r?(c=f.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[l,r]}),e[9]=l,e[10]=r,e[11]=c):c=e[11];let b;return e[12]!==i||e[13]!==t||e[14]!==c?(b=f.jsx(g,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=b):b=e[15],b}export{y as M,M as S};
@@ -1 +1 @@
1
- import{c as P,b as H,e as ne,j as n,B as $,t as te,cx as ee,C as Ne,a as Z,y as qe,z as Ae,K as ce,cy as Be,cz as He,I as X,n as ue,r as B,o as re,aX as he,x as Ue,cA as Je,q as pe,cB as Ke,cC as Ge,cD as Ve,d as We,H as Qe,f as _e,u as Ye,a4 as Xe,bS as Ze,cE as et,cF as ye,cG as tt,cH as nt,S as st,O as ot,cI as it}from"./index-fZpMDfe6.js";import{A as de}from"./avatar-CKLVepem.js";import{t as Te,a as at}from"./Users03-CeFJXyBc.js";import{i as rt}from"./SearchLg-D05XfMH4.js";import{i as lt,s as ct,a as U,b as dt,n as ut}from"./Stars02-BEZaBHTc.js";import{s as mt}from"./XClose-Ca1B07wN.js";import{D as ft,t as gt,A as ht}from"./tab-id-W4sfonX1.js";import{i as J}from"./CheckCircle-Ccs86bUg.js";import{i as be}from"./FilterLines-C01-F8gV.js";import{i as xe}from"./Monitor01-CW9D8oQR.js";import{i as K}from"./Zap-DoBPpnDg.js";import{a as Oe,b as Ce,d as Ee,e as Le,h as pt,c as yt}from"./dialog-BVOhf6JL.js";import{u as bt}from"./use-is-desktop-app-BNujXJc_.js";import{R as xt}from"./required-auth-layout-XqEbPK8M.js";import{m as wt}from"./use-mcp-client-BixLZLmc.js";import{a as we,S as St}from"./constants-_08zpzmT.js";import{b as vt}from"./hooks-CtnSCLIe.js";import{i as jt}from"./use-organization-settings-B4nKr0f2.js";import{u as kt}from"./use-org-sso-9a_THghN.js";function Nt(t){const e=P.c(49),{orgName:s,orgSlug:i,orgLogo:l,domain:r}=t,a=H();let o;e[0]!==i||e[1]!==a?(o=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:i})}),O=await k.json();if(!k.ok||!O.success)throw new Error(O.error??a("common.autoDomainJoinScreen.joinError"));return O},e[0]=i,e[1]=a,e[2]=o):o=e[2];let d;e[3]!==i?(d=k=>{window.location.href=`/${k.slug??i}`},e[3]=i,e[4]=d):d=e[4];let f;e[5]!==a?(f=k=>{te.error(k instanceof Error?k.message:a("common.autoDomainJoinScreen.joinError"))},e[5]=a,e[6]=f):f=e[6];let b;e[7]!==o||e[8]!==d||e[9]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[7]=o,e[8]=d,e[9]=f,e[10]=b):b=e[10];const c=ne(b),v=At;let m;e[11]!==l||e[12]!==s?(m=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=s,e[13]=m):m=e[13];let u;e[14]!==s||e[15]!==a?(u=a("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=a,e[16]=u):u=e[16];let p;e[17]!==u?(p=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=p):p=e[18];let g;e[19]!==r||e[20]!==a?(g=a("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=a,e[21]=g):g=e[21];let h;e[22]!==g?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[22]=g,e[23]=h):h=e[23];let w;e[24]!==p||e[25]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[p,h]}),e[24]=p,e[25]=h,e[26]=w):w=e[26];let x;e[27]!==c?(x=()=>c.mutate(),e[27]=c,e[28]=x):x=e[28];let S;e[29]!==c.isPending||e[30]!==s||e[31]!==a?(S=c.isPending?a("common.autoDomainJoinScreen.joining"):a("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=a,e[32]=S):S=e[32];let N;e[33]!==c.isPending||e[34]!==x||e[35]!==S?(N=n.jsx($,{onClick:x,disabled:c.isPending,children:S}),e[33]=c.isPending,e[34]=x,e[35]=S,e[36]=N):N=e[36];const j=c.isPending;let A;e[37]!==a?(A=a("common.autoDomainJoinScreen.goHome"),e[37]=a,e[38]=A):A=e[38];let y;e[39]!==c.isPending||e[40]!==A?(y=n.jsx($,{variant:"ghost",onClick:v,disabled:j,children:A}),e[39]=c.isPending,e[40]=A,e[41]=y):y=e[41];let T;e[42]!==N||e[43]!==y?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,y]}),e[42]=N,e[43]=y,e[44]=T):T=e[44];let _;return e[45]!==w||e[46]!==T||e[47]!==m?(_=n.jsxs(ee,{children:[m,w,T]}),e[45]=w,e[46]=T,e[47]=m,e[48]=_):_=e[48],_}function At(){window.location.href="/"}function Se(t){const e=P.c(25),{orgSlug:s,orgName:i,reason:l}=t,r=H(),a=_t,o=l==="not-found",d=o?rt:Ne;let f;e[0]!==o||e[1]!==r?(f=r(o?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=o,e[1]=r,e[2]=f):f=e[2];const b=f;let c;e[3]!==o||e[4]!==i||e[5]!==s||e[6]!==r?(c=o?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:i??s}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=o,e[4]=i,e[5]=s,e[6]=r,e[7]=c):c=e[7];const v=c;let m;e[8]!==d?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=m):m=e[9];let u;e[10]!==b?(u=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[10]=b,e[11]=u):u=e[11];let p;e[12]!==v?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[12]=v,e[13]=p):p=e[13];let g;e[14]!==u||e[15]!==p?(g=n.jsxs("div",{className:"space-y-2",children:[u,p]}),e[14]=u,e[15]=p,e[16]=g):g=e[16];let h;e[17]!==r?(h=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=h):h=e[18];let w;e[19]!==h?(w=n.jsx($,{onClick:a,children:h}),e[19]=h,e[20]=w):w=e[20];let x;return e[21]!==m||e[22]!==g||e[23]!==w?(x=n.jsxs(ee,{children:[m,g,w]}),e[21]=m,e[22]=g,e[23]=w,e[24]=x):x=e[24],x}function _t(){window.location.href="/"}function Tt(t){const e=P.c(59),{invitationId:s,orgName:i,orgSlug:l,orgLogo:r}=t,a=H();let o;e[0]!==s?(o=async()=>{const E=await Z.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=o):o=e[1];let d;e[2]!==l?(d=()=>{qe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let f;e[4]!==a?(f=E=>{te.error(E instanceof Error?E.message:a("common.pendingInviteScreen.failedToAccept"))},e[4]=a,e[5]=f):f=e[5];let b;e[6]!==o||e[7]!==d||e[8]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[6]=o,e[7]=d,e[8]=f,e[9]=b):b=e[9];const c=ne(b);let v;e[10]!==s?(v=async()=>{const E=await Z.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=v):v=e[11];let m,u;e[12]!==a?(m=()=>{te.success(a("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=E=>{te.error(E instanceof Error?E.message:a("common.pendingInviteScreen.failedToDecline"))},e[12]=a,e[13]=m,e[14]=u):(m=e[13],u=e[14]);let p;e[15]!==v||e[16]!==m||e[17]!==u?(p={mutationFn:v,onSuccess:m,onError:u},e[15]=v,e[16]=m,e[17]=u,e[18]=p):p=e[18];const g=ne(p),h=c.isPending||g.isPending;let w;e[19]!==r||e[20]!==i?(w=r?n.jsx(de,{url:r,fallback:i.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(lt,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=i,e[21]=w):w=e[21];let x;e[22]!==i||e[23]!==a?(x=a("common.pendingInviteScreen.invitedTo",{orgName:i}),e[22]=i,e[23]=a,e[24]=x):x=e[24];let S;e[25]!==x?(S=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=S):S=e[26];let N;e[27]!==a?(N=a("common.pendingInviteScreen.acceptDescription"),e[27]=a,e[28]=N):N=e[28];let j;e[29]!==N?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=j):j=e[30];let A;e[31]!==S||e[32]!==j?(A=n.jsxs("div",{className:"space-y-2",children:[S,j]}),e[31]=S,e[32]=j,e[33]=A):A=e[33];let y;e[34]!==c?(y=()=>c.mutate(),e[34]=c,e[35]=y):y=e[35];let T;e[36]!==c.isPending||e[37]!==a?(T=c.isPending?a("common.pendingInviteScreen.acceptingButton"):a("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=a,e[38]=T):T=e[38];let _;e[39]!==h||e[40]!==y||e[41]!==T?(_=n.jsx($,{onClick:y,disabled:h,children:T}),e[39]=h,e[40]=y,e[41]=T,e[42]=_):_=e[42];let k;e[43]!==g?(k=()=>g.mutate(),e[43]=g,e[44]=k):k=e[44];let O;e[45]!==g.isPending||e[46]!==a?(O=g.isPending?a("common.pendingInviteScreen.decliningButton"):a("common.pendingInviteScreen.declineButton"),e[45]=g.isPending,e[46]=a,e[47]=O):O=e[47];let L;e[48]!==h||e[49]!==k||e[50]!==O?(L=n.jsx($,{variant:"ghost",onClick:k,disabled:h,children:O}),e[48]=h,e[49]=k,e[50]=O,e[51]=L):L=e[51];let C;e[52]!==_||e[53]!==L?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,L]}),e[52]=_,e[53]=L,e[54]=C):C=e[54];let D;return e[55]!==A||e[56]!==C||e[57]!==w?(D=n.jsxs(ee,{children:[w,A,C]}),e[55]=A,e[56]=C,e[57]=w,e[58]=D):D=e[58],D}function Ot(t){const e=P.c(23),{orgName:s,orgLogo:i}=t,l=H();let r;e[0]!==i||e[1]!==s?(r=i?n.jsx(de,{url:i,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ct,{className:"h-6 w-6 text-primary"})}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let a;e[3]!==l?(a=l("common.requestPendingScreen.title"),e[3]=l,e[4]=a):a=e[4];let o;e[5]!==a?(o=n.jsx("h3",{className:"text-lg font-medium",children:a}),e[5]=a,e[6]=o):o=e[6];let d;e[7]!==s||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=l,e[9]=d):d=e[9];let f;e[10]!==d?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=f):f=e[11];let b;e[12]!==o||e[13]!==f?(b=n.jsxs("div",{className:"space-y-2",children:[o,f]}),e[12]=o,e[13]=f,e[14]=b):b=e[14];let c;e[15]!==l?(c=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=c):c=e[16];let v;e[17]!==c?(v=n.jsx($,{variant:"ghost",onClick:Ct,children:c}),e[17]=c,e[18]=v):v=e[18];let m;return e[19]!==r||e[20]!==b||e[21]!==v?(m=n.jsxs(ee,{children:[r,b,v]}),e[19]=r,e[20]=b,e[21]=v,e[22]=m):m=e[22],m}function Ct(){window.location.href="/"}function Et(t){const e=P.c(45),{orgName:s,orgSlug:i,orgLogo:l,domain:r}=t,a=H();let o;e[0]!==i?(o=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:i})}),k=await _.json();if(!_.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=i,e[1]=o):o=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=It,e[2]=d):d=e[2];let f;e[3]!==a?(f=_=>{te.error(_ instanceof Error?_.message:a("common.requestToJoinScreen.failedToRequest"))},e[3]=a,e[4]=f):f=e[4];let b;e[5]!==o||e[6]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[5]=o,e[6]=f,e[7]=b):b=e[7];const c=ne(b);let v;e[8]!==l||e[9]!==s?(v=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=s,e[10]=v):v=e[10];let m;e[11]!==s||e[12]!==a?(m=a("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=a,e[13]=m):m=e[13];let u;e[14]!==m?(u=n.jsx("h3",{className:"text-lg font-medium",children:m}),e[14]=m,e[15]=u):u=e[15];let p;e[16]!==r||e[17]!==a?(p=a("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=a,e[18]=p):p=e[18];let g;e[19]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let h;e[21]!==u||e[22]!==g?(h=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[21]=u,e[22]=g,e[23]=h):h=e[23];let w;e[24]!==c?(w=()=>c.mutate(),e[24]=c,e[25]=w):w=e[25];let x;e[26]!==c.isPending||e[27]!==a?(x=c.isPending?a("common.requestToJoinScreen.requesting"):a("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=a,e[28]=x):x=e[28];let S;e[29]!==c.isPending||e[30]!==w||e[31]!==x?(S=n.jsx($,{onClick:w,disabled:c.isPending,children:x}),e[29]=c.isPending,e[30]=w,e[31]=x,e[32]=S):S=e[32];const N=c.isPending;let j;e[33]!==a?(j=a("common.requestToJoinScreen.goToHome"),e[33]=a,e[34]=j):j=e[34];let A;e[35]!==c.isPending||e[36]!==j?(A=n.jsx($,{variant:"ghost",onClick:Lt,disabled:N,children:j}),e[35]=c.isPending,e[36]=j,e[37]=A):A=e[37];let y;e[38]!==S||e[39]!==A?(y=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[S,A]}),e[38]=S,e[39]=A,e[40]=y):y=e[40];let T;return e[41]!==h||e[42]!==y||e[43]!==v?(T=n.jsxs(ee,{children:[v,h,y]}),e[41]=h,e[42]=y,e[43]=v,e[44]=T):T=e[44],T}function Lt(){window.location.href="/"}function It(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Dt(t){const e=P.c(7);let s;e[0]!==t?(s=ce.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let i;e[2]!==t?(i=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=i):i=e[3];let l;return e[4]!==s||e[5]!==i?(l={queryKey:s,queryFn:i,refetchOnWindowFocus:!1},e[4]=s,e[5]=i,e[6]=l):l=e[6],Ae(l)}function Pt({orgSlug:t}){const{data:e}=Dt(t);if(e.status!=="member"){Be()?.org===t&&He();const s=localStorage.getItem(X.lastOrgSlug())===t;if(s&&localStorage.removeItem(X.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Tt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Et,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Ot,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ie(t){const e=P.c(42),{ariaLabel:s,dismissLabel:i,eyebrow:l,title:r,description:a,icon:o,children:d,footerLeading:f,actions:b,onDismiss:c,tone:v}=t,m=v===void 0?"neutral":v,u=f||b;let p;e[0]!==m?(p=m==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=m,e[1]=p):p=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(mt,{size:14}),e[2]=g):g=e[2];let h;e[3]!==i||e[4]!==c?(h=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":i,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:g}),e[3]=i,e[4]=c,e[5]=h):h=e[5];const w=o&&"flex items-start gap-3",x=d&&"pb-3";let S;e[6]!==w||e[7]!==x?(S=ue("p-4 pr-11",w,x),e[6]=w,e[7]=x,e[8]=S):S=e[8];let N;e[9]!==o?(N=o&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:o}),e[9]=o,e[10]=N):N=e[10];let j;e[11]!==l?(j=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=j):j=e[12];let A;e[13]!==r?(A=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=A):A=e[14];let y;e[15]!==a?(y=a&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:a}),e[15]=a,e[16]=y):y=e[16];let T;e[17]!==A||e[18]!==y||e[19]!==j?(T=n.jsxs("div",{children:[j,A,y]}),e[17]=A,e[18]=y,e[19]=j,e[20]=T):T=e[20];let _;e[21]!==d?(_=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=_):_=e[22];let k;e[23]!==T||e[24]!==_?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]}),e[23]=T,e[24]=_,e[25]=k):k=e[25];let O;e[26]!==k||e[27]!==S||e[28]!==N?(O=n.jsxs("div",{className:S,children:[N,k]}),e[26]=k,e[27]=S,e[28]=N,e[29]=O):O=e[29];let L;e[30]!==b||e[31]!==f||e[32]!==u||e[33]!==m?(L=u&&n.jsxs("div",{className:ue("flex items-center justify-between gap-3 px-4 py-2.5",m==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:f}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:b})]}),e[30]=b,e[31]=f,e[32]=u,e[33]=m,e[34]=L):L=e[34];let C;return e[35]!==s||e[36]!==O||e[37]!==L||e[38]!==p||e[39]!==h||e[40]!==m?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":m,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[p,h,O,L]}),e[35]=s,e[36]=O,e[37]=L,e[38]=p,e[39]=h,e[40]=m,e[41]=C):C=e[41],C}const $t=[{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:xe,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:J,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:K,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:K,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:U,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:dt,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:xe,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:J,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:K,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:J,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:K,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:J,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:U,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:K,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:U,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:J,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:K,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:U,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:J,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:K,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:U,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:be,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:J,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:at,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:K,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:J,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:U,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:be,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:U,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:ut,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],De=$t,le="studio.release-feed.v1",me=new Set;let V="",W={},fe=!1;function zt(){if(fe)return V||"{}";try{return localStorage.getItem(le)??"{}"}catch{return V||"{}"}}function Pe(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ve(){const t=zt();return t!==V&&(V=t,W=Pe(t)),W}function Mt(t){me.add(t);const e=s=>{if(!(s.key!==le&&s.key!==null)){try{const i=localStorage.getItem(le)??"{}",r={...Pe(i),...W};W=r,V=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{me.delete(t),window.removeEventListener("storage",e)}}function Ft(t){W=t,V=JSON.stringify(t);try{localStorage.setItem(le,V),fe=!1}catch{fe=!0}me.forEach(e=>e())}function Rt(){const t=P.c(7),e=B.useSyncExternalStore(Mt,ve,ve);let s;t[0]!==e?(s=d=>!!e[d],t[0]=e,t[1]=s):s=t[1];const i=s,l=qt;let r;t[2]!==e?(r=De.reduce((d,f)=>e[f.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let o;return t[4]!==i||t[5]!==a?(o={isSeen:i,markSeen:l,unseenCount:a},t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function qt(t){W[t]||Ft({...W,[t]:{seenAt:new Date().toISOString()}})}const Bt=720*60*60*1e3,Ht=10080*60*1e3;function Ut(t){const[e,s,i]=t.split("-").map(Number);return!e||!s||!i?new Date(t).getTime():new Date(e,s-1,i).getTime()}function Jt(t){const e=De[0];if(!e)return null;const s=Ut(e.date),i=t-s;return i<0||i>Bt?null:e}function Kt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Gt(t,e){const s=Kt(t);return s===null?!1:e-s>=Ht}function Vt(){const t=P.c(41),e=H(),{data:s}=Z.useSession(),{isSeen:i,markSeen:l}=Rt(),[r,a]=B.useState(!1);let o,d,f;if(t[0]!==i||t[1]!==s?.user?.createdAt){f=Symbol.for("react.early_return_sentinel");e:{const j=Date.now();if(o=Jt(j),!o){f=null;break e}if(!Gt(s?.user?.createdAt,j)){f=null;break e}d=i(o.id)}t[0]=i,t[1]=s?.user?.createdAt,t[2]=o,t[3]=d,t[4]=f}else o=t[2],d=t[3],f=t[4];if(f!==Symbol.for("react.early_return_sentinel"))return f;if(d)return null;let b;t[5]!==e?(b=e("announcements.release.ariaLabel"),t[5]=e,t[6]=b):b=t[6];let c;t[7]!==e?(c=e("announcements.release.dismiss"),t[7]=e,t[8]=c):c=t[8];const v=o.eyebrow,m=o.title;let u;t[9]!==o.id||t[10]!==l?(u=()=>l(o.id),t[9]=o.id,t[10]=l,t[11]=u):u=t[11];let p;t[12]!==o.id||t[13]!==o.learnMoreHref||t[14]!==l||t[15]!==e?(p=o.learnMoreHref?n.jsx("a",{href:o.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(o.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=o.id,t[13]=o.learnMoreHref,t[14]=l,t[15]=e,t[16]=p):p=t[16];let g;t[17]!==o.cta||t[18]!==o.id||t[19]!==l?(g=o.cta?"href"in o.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(o.id),children:n.jsx("a",{href:o.cta.href,children:o.cta.label})}):n.jsx($,{size:"sm",onClick:()=>a(!0),children:o.cta.label}):null,t[17]=o.cta,t[18]=o.id,t[19]=l,t[20]=g):g=t[20];let h;t[21]!==o.bullets?(h=o.bullets.map(Wt),t[21]=o.bullets,t[22]=h):h=t[22];let w;t[23]!==h?(w=n.jsx("ul",{className:"flex flex-col gap-3",children:h}),t[23]=h,t[24]=w):w=t[24];let x;t[25]!==o.id||t[26]!==l?(x=j=>{a(j),j||l(o.id)},t[25]=o.id,t[26]=l,t[27]=x):x=t[27];let S;t[28]!==r||t[29]!==x?(S=n.jsx(ft,{open:r,onOpenChange:x}),t[28]=r,t[29]=x,t[30]=S):S=t[30];let N;return t[31]!==o.eyebrow||t[32]!==o.title||t[33]!==w||t[34]!==S||t[35]!==b||t[36]!==c||t[37]!==u||t[38]!==p||t[39]!==g?(N=n.jsxs(Ie,{ariaLabel:b,dismissLabel:c,eyebrow:v,title:m,onDismiss:u,footerLeading:p,actions:g,children:[w,S]}),t[31]=o.eyebrow,t[32]=o.title,t[33]=w,t[34]=S,t[35]=b,t[36]=c,t[37]=u,t[38]=p,t[39]=g,t[40]=N):N=t[40],N}function Wt(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const $e=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),G=$e?"⌘":"Ctrl",F={keyboardShortcuts:{keys:[G,"K"],description:"Keyboard shortcuts"},back:{keys:[G,"["],description:"Back to previous"},focusChatInput:{keys:[G,"L"],description:"Focus chat input"},saveAndFormat:{keys:[G,"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:[G,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[G,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",G,"S"],description:"New task"},toggleDaemon:{keys:[G,"D"],description:"Toggle daemon logs"}},Qt=[{label:"General",shortcuts:[F.keyboardShortcuts,F.back,F.newTask,F.toggleDaemon]},{label:"Editor",shortcuts:[F.saveAndFormat]},{label:"Chat",shortcuts:[F.focusChatInput,F.togglePlanMode,F.sendMessage,F.newLine]},{label:"Questions",shortcuts:[F.selectOption]},{label:"Monitoring",shortcuts:[F.applyFilter]}];function je(t){return $e?t.metaKey:t.ctrlKey}function Yt(t){const e=P.c(11),{open:s,onOpenChange:i}=t,l=H();let r;e[0]!==l?(r=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=r):r=e[1];let a;e[2]!==r?(a=n.jsx(Oe,{children:n.jsx(Ce,{children:r})}),e[2]=r,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-4",children:Qt.map(Xt)}),e[4]=o):o=e[4];let d;e[5]!==a?(d=n.jsxs(Ee,{className:"sm:max-w-md",children:[a,o]}),e[5]=a,e[6]=d):d=e[6];let f;return e[7]!==i||e[8]!==s||e[9]!==d?(f=n.jsx(Le,{open:s,onOpenChange:i,children:d}),e[7]=i,e[8]=s,e[9]=d,e[10]=f):f=e[10],f}function Xt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Zt)})]},t.label)}function Zt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(en)})]},t.description)}function en(t){return n.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)}const tn=300*1e3,nn=2;function sn(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function on(t,e){return t.count>=nn&&t.version!==null&&t.version!==e}function an(){const t=P.c(43),e=H(),s=bt();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={mutationFn:ln},t[0]=i):i=t[0];const l=ne(i);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:ce.appVersionCheck(),queryFn:rn,refetchInterval:tn,refetchIntervalInBackground:!0,staleTime:0},t[1]=r):r=t[1];const{data:a,dataUpdatedAt:o}=re(r),[d,f]=B.useState(0);let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={version:null,count:0},t[2]=b):b=t[2];const[c,v]=B.useState(b);o!==d&&(f(o),v(R=>sn(R,a,"4.263.2")));const[m,u]=B.useState(null),p=s;let g;t[3]!==s||t[4]!==l?(g=()=>window.location.reload(),t[3]=s,t[4]=l,t[5]=g):g=t[5];const h=g,w="announcements.version.refresh";if(!on(c,m))return null;let x;t[6]!==e?(x=e("announcements.version.ariaLabel"),t[6]=e,t[7]=x):x=t[7];let S;t[8]!==e?(S=e("announcements.version.dismiss"),t[8]=e,t[9]=S):S=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let j;t[12]!==e?(j=e("announcements.version.title"),t[12]=e,t[13]=j):j=t[13];const A="announcements.version.description";let y;t[14]!==e||t[15]!==A?(y=e(A),t[14]=e,t[15]=A,t[16]=y):y=t[16];let T;t[17]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(he,{size:16}),t[17]=T):T=t[17];let _;t[18]!==c.version?(_=()=>u(c.version),t[18]=c.version,t[19]=_):_=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.263.2"}),t[20]=e,t[21]=k):k=t[21];let O;t[22]!==w||t[23]!==e?(O=e(w),t[22]=w,t[23]=e,t[24]=O):O=t[24];const L=p;let C;t[25]!==L?(C=ue(L),t[25]=L,t[26]=C):C=t[26];let D;t[27]!==C?(D=n.jsx(he,{size:14,className:C}),t[27]=C,t[28]=D):D=t[28];let E;t[29]!==h||t[30]!==p||t[31]!==O||t[32]!==D?(E=n.jsxs($,{size:"sm",disabled:p,onClick:h,children:[O,D]}),t[29]=h,t[30]=p,t[31]=O,t[32]=D,t[33]=E):E=t[33];let M;return t[34]!==_||t[35]!==k||t[36]!==E||t[37]!==x||t[38]!==S||t[39]!==N||t[40]!==j||t[41]!==y?(M=n.jsx(Ie,{ariaLabel:x,dismissLabel:S,eyebrow:N,title:j,description:y,icon:T,tone:"system",onDismiss:_,footerLeading:k,actions:E}),t[34]=_,t[35]=k,t[36]=E,t[37]=x,t[38]=S,t[39]=N,t[40]=j,t[41]=y,t[42]=M):M=t[42],M}async function rn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ln(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function cn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const dn=Date.parse("2026-07-21T00:00:00Z"),ke=t=>cn(X.ptBrAnnouncementSeen(t));function un(){const t=P.c(35),e=H(),[s,i]=Ue(),{data:l,isPending:r}=Z.useSession(),a=l?.user,o=a?.id,d=a?.createdAt,f=d!=null&&new Date(d).getTime()<dn,b=Je()==="pt-BR",c=!r&&!!o&&f&&b&&s.language==="en"&&!ke(o).has(),[v,m]=B.useState(!1),[u,p]=B.useState(!1);!v&&!r&&(m(!0),c&&o&&(ke(o).mark(),i(fn),p(!0),pe("pt_br_auto_switch_shown")));let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=q=>{pe("pt_br_auto_switch_closed",{action:q}),p(!1)},t[0]=g):g=t[0];const h=g;let w;t[1]!==i?(w=()=>{i(mn),h("switch-back")},t[1]=i,t[2]=w):w=t[2];const x=w;let S;t[3]===Symbol.for("react.memo_cache_sentinel")?(S=q=>!q&&h("dismiss"),t[3]=S):S=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let j;t[5]!==e?(j=e("announcements.ptBr.title"),t[5]=e,t[6]=j):j=t[6];let A;t[7]!==j?(A=n.jsx(Ce,{children:j}),t[7]=j,t[8]=A):A=t[8];let y;t[9]!==e?(y=e("announcements.ptBr.description"),t[9]=e,t[10]=y):y=t[10];let T;t[11]!==y?(T=n.jsx(pt,{children:y}),t[11]=y,t[12]=T):T=t[12];let _;t[13]!==A||t[14]!==T?(_=n.jsxs(Oe,{children:[A,T]}),t[13]=A,t[14]=T,t[15]=_):_=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let O;t[18]!==x||t[19]!==k?(O=n.jsx($,{variant:"outline",onClick:x,children:k}),t[18]=x,t[19]=k,t[20]=O):O=t[20];let L;t[21]===Symbol.for("react.memo_cache_sentinel")?(L=()=>h("ok"),t[21]=L):L=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:L,children:C}),t[24]=C,t[25]=D):D=t[25];let E;t[26]!==O||t[27]!==D?(E=n.jsxs(yt,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=E):E=t[28];let M;t[29]!==E||t[30]!==_?(M=n.jsxs(Ee,{className:"sm:max-w-md",children:[N,_,E]}),t[29]=E,t[30]=_,t[31]=M):M=t[31];let R;return t[32]!==u||t[33]!==M?(R=n.jsx(Le,{open:u,onOpenChange:S,children:M}),t[32]=u,t[33]=M,t[34]=R):R=t[34],R}function mn(t){return{...t,language:"en"}}function fn(t){return{...t,language:"pt-BR"}}function gn(t){const e=Ke(t);return typeof e=="string"?e:void 0}function hn(){return gn("experiment-pipeline-check"),null}function pn(t){const e=P.c(1),{activeOrg:s}=t;if(!s)return null;Ge(s.id,{name:s.name??void 0,slug:s.slug??void 0}),Ve();let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(hn,{}),e[0]=i):i=e[0],i}function yn(t){const{prev:e,virtualMcpId:s,decopilotId:i,savedLayout:l,opts:r,autosendValue:a}=t,o={};s?o.virtualmcpid=s:e.virtualmcpid&&(o.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:i,b=(s??d)!==d;let c;if(r?.main)o.main=r.main;else if(l)l.main!==void 0&&(o.main=l.main),l.sidepanel!==void 0&&(c=l.sidepanel);else if(!b){const v=e.main;v&&typeof v=="string"&&!gt(v)&&(o.main=v)}return c!==void 0&&(o.sidepanel=c),r?.autosend&&(o.autosend=a),o}const ze="studio:thread-layout:v1",bn=50;function Me(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function xn(t,e,s,i=bn){const l=t.filter(([r])=>r!==e);for(l.push([e,Me(s)]);l.length>i;)l.shift();return l}function ge(){try{const t=sessionStorage.getItem(ze);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Fe(t){try{sessionStorage.setItem(ze,JSON.stringify(t))}catch{}}function wn(t,e){t&&Fe(xn(ge(),t,e))}function Sn(t){if(!t)return null;const e=ge().find(([s])=>s===t);return e?Me(e[1]):null}function Vn(t){if(!t)return;const e=ge(),s=e.filter(([i])=>i!==t);s.length!==e.length&&Fe(s)}function Re(t){return{queryKey:ce.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 Wn(t){const e=P.c(10);let s;e[0]!==t?(s=Re(t),e[0]=t,e[1]=s):s=e[1];const i=re(s);let l;e[2]!==i.data?.prompts?(l=i.data?.prompts??[],e[2]=i.data?.prompts,e[3]=l):l=e[3];let r;e[4]!==i.data?.tiles?(r=i.data?.tiles??[],e[4]=i.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==i.isLoading||e[7]!==l||e[8]!==r?(a={isLoading:i.isLoading,prompts:l,tiles:r},e[6]=i.isLoading,e[7]=l,e[8]=r,e[9]=a):a=e[9],a}function vn(t){const e=P.c(31),{orgSlug:s,orgName:i,domain:l}=t,r=H();let a;e[0]!==s?(a=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=a):a=e[1];const o=a,d=jn;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ne,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let b;e[3]!==r?(b=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=b):b=e[4];let c;e[5]!==b?(c=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[5]=b,e[6]=c):c=e[6];let v;e[7]!==l||e[8]!==i||e[9]!==r?(v=i?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:i})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${r("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=i,e[9]=r,e[10]=v):v=e[10];let m;e[11]!==v?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=m):m=e[12];let u;e[13]!==c||e[14]!==m?(u=n.jsxs("div",{className:"space-y-2",children:[c,m]}),e[13]=c,e[14]=m,e[15]=u):u=e[15];let p;e[16]!==r?(p=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=p):p=e[17];let g;e[18]!==o||e[19]!==p?(g=n.jsx($,{onClick:o,children:p}),e[18]=o,e[19]=p,e[20]=g):g=e[20];let h;e[21]!==r?(h=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=h):h=e[22];let w;e[23]!==h?(w=n.jsx($,{variant:"ghost",onClick:d,children:h}),e[23]=h,e[24]=w):w=e[24];let x;e[25]!==w||e[26]!==g?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,w]}),e[25]=w,e[26]=g,e[27]=x):x=e[27];let S;return e[28]!==x||e[29]!==u?(S=n.jsxs(ee,{children:[f,u,x]}),e[28]=x,e[29]=u,e[30]=S):S=e[30],S}function jn(){window.location.href="/"}function kn(t){const e=P.c(8),{org:s,children:i}=t,r=jt(s.id,s.slug)?.enabled_plugins??null;let a;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(a={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=a):a=e[3];const o=a;let d;return e[4]!==i||e[5]!==s||e[6]!==o?(d=n.jsx(it,{org:s,project:o,children:i}),e[4]=i,e[5]=s,e[6]=o,e[7]=d):d=e[7],d}function Nn(){const t=We(),e=vt(),{org:s}=Qe(),i=_e({strict:!1}),l=Ye({strict:!1}),r=i.org??"",a=i.taskId??"",o=(m,u,p=!0)=>t({to:"/$org/$taskId",params:{org:r,taskId:m},search:u,replace:p}),d=(m,u=!0)=>o(a,m,u),f=m=>d(u=>({...u,sidepanel:m})),b=(m,u,p)=>{const g=!!a&&a===m;a&&!g&&wn(a,{main:l.main,sidepanel:l.sidepanel});const h=g?null:Sn(m),w=we(s.id).id;return o(m,x=>yn({prev:x,virtualMcpId:u,decopilotId:w,savedLayout:h,opts:p,autosendValue:ht}),!1)};return{openSidePanel:f,setTaskId:b,createNewTask:async(m,u,p)=>{const g=crypto.randomUUID(),h=m??l.virtualmcpid??we(s.id).id;try{await e?.create({id:g,virtual_mcp_id:h,...u?{branch:u}:{}})}catch{}b(g,h,p)},openTab:m=>o(a||crypto.randomUUID(),u=>({...u,main:m}))}}function An(){const t=P.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const i=Xe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:r}=_e(l),[a,o]=B.useState(!1),d=Ze(),f=i??"";let b;t[2]!==f?(b=Re(f),t[2]=f,t[3]=b):b=t[3];const c=!!i&&!r;let v;t[4]!==b||t[5]!==c?(v={...b,enabled:c},t[4]=b,t[5]=c,t[6]=v):v=t[6],re(v);const{data:m}=Z.useSession(),u=m?.user?.id;let p;t[7]!==i||t[8]!==u?(p=i&&u?et(u,i):null,t[7]=i,t[8]=u,t[9]=p):p=t[9];const g=p;let h,w;t[10]!==d?(h=()=>{const I=z=>{if(je(z)&&z.code==="KeyK"){z.preventDefault(),o(!0);return}je(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},w=[d],t[10]=d,t[11]=h,t[12]=w):(h=t[11],w=t[12]),B.useEffect(h,w);let x;t[13]!==i?(x=ce.activeOrganization(i),t[13]=i,t[14]=x):x=t[14];let S;t[15]!==i||t[16]!==u?(S=async()=>{if(!i)return null;performance.mark("mesh:active-org-fetch:start");const{data:I}=await Z.organization.getFullOrganization({query:{organizationSlug:i}}).finally(_n),z=ye(I);return I&&!z&&localStorage.setItem(X.lastOrgSlug(),i),u&&I&&nt(u,i,I),I},t[15]=i,t[16]=u,t[17]=S):S=t[17];const N=g?g.data:void 0,j=g?.updatedAt;let A;t[18]!==S||t[19]!==N||t[20]!==j||t[21]!==x?(A={queryKey:x,queryFn:S,initialData:N,initialDataUpdatedAt:j,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=S,t[19]=N,t[20]=j,t[21]=x,t[22]=A):A=t[22];const{data:y}=Ae(A),T=y?.id,_=y?.slug,{data:k}=kt(T,_),O=T??"",L=_??"";let C;t[23]!==O||t[24]!==L?(C=wt({connectionId:St,orgId:O,orgSlug:L}),t[23]=O,t[24]=L,t[25]=C):C=t[25];const D=!!T&&!!_;let E;if(t[26]!==C||t[27]!==D?(E={...C,enabled:D},t[26]=C,t[27]=D,t[28]=E):E=t[28],re(E),!y){let I;t[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(st,{}),t[29]=I):I=t[29];let z;return t[30]!==i?(z=n.jsx(B.Suspense,{fallback:I,children:n.jsx(Pt,{orgSlug:i})}),t[30]=i,t[31]=z):z=t[31],z}if(ye(y)){localStorage.getItem(X.lastOrgSlug())===i&&localStorage.removeItem(X.lastOrgSlug());let I;return t[32]!==y.name?(I=n.jsx(tt,{orgName:y.name}),t[32]=y.name,t[33]=I):I=t[33],I}if(k?.ssoRequired&&!k.authenticated){let I;return t[34]!==y.id||t[35]!==y.name||t[36]!==y.slug||t[37]!==k.domain?(I=n.jsx(vn,{orgId:y.id,orgSlug:y.slug,orgName:y.name,domain:k.domain}),t[34]=y.id,t[35]=y.name,t[36]=y.slug,t[37]=k.domain,t[38]=I):I=t[38],I}const R=y.logo??null;let q;t[39]!==y||t[40]!==R?(q={...y,logo:R},t[39]=y,t[40]=R,t[41]=q):q=t[41];let Q;t[42]!==y?(Q=n.jsx(pn,{activeOrg:y}),t[42]=y,t[43]=Q):Q=t[43];let se;t[44]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ot,{}),t[44]=se):se=t[44];let oe;t[45]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Vt,{}),n.jsx(an,{})]}),t[45]=oe):oe=t[45];let Y;t[46]!==a?(Y=n.jsx(Yt,{open:a,onOpenChange:o}),t[46]=a,t[47]=Y):Y=t[47];let ie;t[48]===Symbol.for("react.memo_cache_sentinel")?(ie=n.jsx(un,{}),t[48]=ie):ie=t[48];let ae;return t[49]!==q||t[50]!==Q||t[51]!==Y?(ae=n.jsxs(kn,{org:q,children:[Q,se,oe,Y,ie]}),t[49]=q,t[50]=Q,t[51]=Y,t[52]=ae):ae=t[52],ae}function _n(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Tn(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{children:n.jsx(An,{})}),t[0]=e):e=t[0],e}const Qn=Object.freeze(Object.defineProperty({__proto__:null,default:Tn,usePanelActions:Nn},Symbol.toStringTag,{value:"Module"}));export{F as K,Wn as a,Vn as f,je as i,cn as m,Qn as s,Nn as u};
1
+ import{c as P,b as H,e as ne,j as n,B as $,t as te,cx as ee,C as Ne,a as Z,y as qe,z as Ae,K as ce,cy as Be,cz as He,I as X,n as ue,r as B,o as re,aX as he,x as Ue,cA as Je,q as pe,cB as Ke,cC as Ge,cD as Ve,d as We,H as Qe,f as _e,u as Ye,a4 as Xe,bS as Ze,cE as et,cF as ye,cG as tt,cH as nt,S as st,O as ot,cI as it}from"./index-DS_PtpmP.js";import{A as de}from"./avatar-CiQyTRfd.js";import{t as Te,a as at}from"./Users03-C1f0X_bD.js";import{i as rt}from"./SearchLg-D1p_gJI8.js";import{i as lt,s as ct,a as U,b as dt,n as ut}from"./Stars02-DTCJxH0_.js";import{s as mt}from"./XClose-F4_KA-E6.js";import{D as ft,t as gt,A as ht}from"./tab-id-BOj9dZWT.js";import{i as J}from"./CheckCircle-Ds0VlJAl.js";import{i as be}from"./FilterLines-v44MczT5.js";import{i as xe}from"./Monitor01-CCXNZQlH.js";import{i as K}from"./Zap-DK06ViId.js";import{a as Oe,b as Ce,d as Ee,e as Le,h as pt,c as yt}from"./dialog-CLVbCjMu.js";import{u as bt}from"./use-is-desktop-app-BNujXJc_.js";import{R as xt}from"./required-auth-layout-C8K6T2Dl.js";import{m as wt}from"./use-mcp-client-Zz1TwEAh.js";import{a as we,S as St}from"./constants-_08zpzmT.js";import{b as vt}from"./hooks-DlPXzzl8.js";import{i as jt}from"./use-organization-settings-BZyz9Mop.js";import{u as kt}from"./use-org-sso-DAANUxzR.js";function Nt(t){const e=P.c(49),{orgName:s,orgSlug:i,orgLogo:l,domain:r}=t,a=H();let o;e[0]!==i||e[1]!==a?(o=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:i})}),O=await k.json();if(!k.ok||!O.success)throw new Error(O.error??a("common.autoDomainJoinScreen.joinError"));return O},e[0]=i,e[1]=a,e[2]=o):o=e[2];let d;e[3]!==i?(d=k=>{window.location.href=`/${k.slug??i}`},e[3]=i,e[4]=d):d=e[4];let f;e[5]!==a?(f=k=>{te.error(k instanceof Error?k.message:a("common.autoDomainJoinScreen.joinError"))},e[5]=a,e[6]=f):f=e[6];let b;e[7]!==o||e[8]!==d||e[9]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[7]=o,e[8]=d,e[9]=f,e[10]=b):b=e[10];const c=ne(b),v=At;let m;e[11]!==l||e[12]!==s?(m=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=s,e[13]=m):m=e[13];let u;e[14]!==s||e[15]!==a?(u=a("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=a,e[16]=u):u=e[16];let p;e[17]!==u?(p=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=p):p=e[18];let g;e[19]!==r||e[20]!==a?(g=a("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=a,e[21]=g):g=e[21];let h;e[22]!==g?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[22]=g,e[23]=h):h=e[23];let w;e[24]!==p||e[25]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[p,h]}),e[24]=p,e[25]=h,e[26]=w):w=e[26];let x;e[27]!==c?(x=()=>c.mutate(),e[27]=c,e[28]=x):x=e[28];let S;e[29]!==c.isPending||e[30]!==s||e[31]!==a?(S=c.isPending?a("common.autoDomainJoinScreen.joining"):a("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=a,e[32]=S):S=e[32];let N;e[33]!==c.isPending||e[34]!==x||e[35]!==S?(N=n.jsx($,{onClick:x,disabled:c.isPending,children:S}),e[33]=c.isPending,e[34]=x,e[35]=S,e[36]=N):N=e[36];const j=c.isPending;let A;e[37]!==a?(A=a("common.autoDomainJoinScreen.goHome"),e[37]=a,e[38]=A):A=e[38];let y;e[39]!==c.isPending||e[40]!==A?(y=n.jsx($,{variant:"ghost",onClick:v,disabled:j,children:A}),e[39]=c.isPending,e[40]=A,e[41]=y):y=e[41];let T;e[42]!==N||e[43]!==y?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,y]}),e[42]=N,e[43]=y,e[44]=T):T=e[44];let _;return e[45]!==w||e[46]!==T||e[47]!==m?(_=n.jsxs(ee,{children:[m,w,T]}),e[45]=w,e[46]=T,e[47]=m,e[48]=_):_=e[48],_}function At(){window.location.href="/"}function Se(t){const e=P.c(25),{orgSlug:s,orgName:i,reason:l}=t,r=H(),a=_t,o=l==="not-found",d=o?rt:Ne;let f;e[0]!==o||e[1]!==r?(f=r(o?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=o,e[1]=r,e[2]=f):f=e[2];const b=f;let c;e[3]!==o||e[4]!==i||e[5]!==s||e[6]!==r?(c=o?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:i??s}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=o,e[4]=i,e[5]=s,e[6]=r,e[7]=c):c=e[7];const v=c;let m;e[8]!==d?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=m):m=e[9];let u;e[10]!==b?(u=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[10]=b,e[11]=u):u=e[11];let p;e[12]!==v?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[12]=v,e[13]=p):p=e[13];let g;e[14]!==u||e[15]!==p?(g=n.jsxs("div",{className:"space-y-2",children:[u,p]}),e[14]=u,e[15]=p,e[16]=g):g=e[16];let h;e[17]!==r?(h=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=h):h=e[18];let w;e[19]!==h?(w=n.jsx($,{onClick:a,children:h}),e[19]=h,e[20]=w):w=e[20];let x;return e[21]!==m||e[22]!==g||e[23]!==w?(x=n.jsxs(ee,{children:[m,g,w]}),e[21]=m,e[22]=g,e[23]=w,e[24]=x):x=e[24],x}function _t(){window.location.href="/"}function Tt(t){const e=P.c(59),{invitationId:s,orgName:i,orgSlug:l,orgLogo:r}=t,a=H();let o;e[0]!==s?(o=async()=>{const E=await Z.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=o):o=e[1];let d;e[2]!==l?(d=()=>{qe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let f;e[4]!==a?(f=E=>{te.error(E instanceof Error?E.message:a("common.pendingInviteScreen.failedToAccept"))},e[4]=a,e[5]=f):f=e[5];let b;e[6]!==o||e[7]!==d||e[8]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[6]=o,e[7]=d,e[8]=f,e[9]=b):b=e[9];const c=ne(b);let v;e[10]!==s?(v=async()=>{const E=await Z.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=v):v=e[11];let m,u;e[12]!==a?(m=()=>{te.success(a("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=E=>{te.error(E instanceof Error?E.message:a("common.pendingInviteScreen.failedToDecline"))},e[12]=a,e[13]=m,e[14]=u):(m=e[13],u=e[14]);let p;e[15]!==v||e[16]!==m||e[17]!==u?(p={mutationFn:v,onSuccess:m,onError:u},e[15]=v,e[16]=m,e[17]=u,e[18]=p):p=e[18];const g=ne(p),h=c.isPending||g.isPending;let w;e[19]!==r||e[20]!==i?(w=r?n.jsx(de,{url:r,fallback:i.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(lt,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=i,e[21]=w):w=e[21];let x;e[22]!==i||e[23]!==a?(x=a("common.pendingInviteScreen.invitedTo",{orgName:i}),e[22]=i,e[23]=a,e[24]=x):x=e[24];let S;e[25]!==x?(S=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=S):S=e[26];let N;e[27]!==a?(N=a("common.pendingInviteScreen.acceptDescription"),e[27]=a,e[28]=N):N=e[28];let j;e[29]!==N?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=j):j=e[30];let A;e[31]!==S||e[32]!==j?(A=n.jsxs("div",{className:"space-y-2",children:[S,j]}),e[31]=S,e[32]=j,e[33]=A):A=e[33];let y;e[34]!==c?(y=()=>c.mutate(),e[34]=c,e[35]=y):y=e[35];let T;e[36]!==c.isPending||e[37]!==a?(T=c.isPending?a("common.pendingInviteScreen.acceptingButton"):a("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=a,e[38]=T):T=e[38];let _;e[39]!==h||e[40]!==y||e[41]!==T?(_=n.jsx($,{onClick:y,disabled:h,children:T}),e[39]=h,e[40]=y,e[41]=T,e[42]=_):_=e[42];let k;e[43]!==g?(k=()=>g.mutate(),e[43]=g,e[44]=k):k=e[44];let O;e[45]!==g.isPending||e[46]!==a?(O=g.isPending?a("common.pendingInviteScreen.decliningButton"):a("common.pendingInviteScreen.declineButton"),e[45]=g.isPending,e[46]=a,e[47]=O):O=e[47];let L;e[48]!==h||e[49]!==k||e[50]!==O?(L=n.jsx($,{variant:"ghost",onClick:k,disabled:h,children:O}),e[48]=h,e[49]=k,e[50]=O,e[51]=L):L=e[51];let C;e[52]!==_||e[53]!==L?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,L]}),e[52]=_,e[53]=L,e[54]=C):C=e[54];let D;return e[55]!==A||e[56]!==C||e[57]!==w?(D=n.jsxs(ee,{children:[w,A,C]}),e[55]=A,e[56]=C,e[57]=w,e[58]=D):D=e[58],D}function Ot(t){const e=P.c(23),{orgName:s,orgLogo:i}=t,l=H();let r;e[0]!==i||e[1]!==s?(r=i?n.jsx(de,{url:i,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ct,{className:"h-6 w-6 text-primary"})}),e[0]=i,e[1]=s,e[2]=r):r=e[2];let a;e[3]!==l?(a=l("common.requestPendingScreen.title"),e[3]=l,e[4]=a):a=e[4];let o;e[5]!==a?(o=n.jsx("h3",{className:"text-lg font-medium",children:a}),e[5]=a,e[6]=o):o=e[6];let d;e[7]!==s||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=l,e[9]=d):d=e[9];let f;e[10]!==d?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=f):f=e[11];let b;e[12]!==o||e[13]!==f?(b=n.jsxs("div",{className:"space-y-2",children:[o,f]}),e[12]=o,e[13]=f,e[14]=b):b=e[14];let c;e[15]!==l?(c=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=c):c=e[16];let v;e[17]!==c?(v=n.jsx($,{variant:"ghost",onClick:Ct,children:c}),e[17]=c,e[18]=v):v=e[18];let m;return e[19]!==r||e[20]!==b||e[21]!==v?(m=n.jsxs(ee,{children:[r,b,v]}),e[19]=r,e[20]=b,e[21]=v,e[22]=m):m=e[22],m}function Ct(){window.location.href="/"}function Et(t){const e=P.c(45),{orgName:s,orgSlug:i,orgLogo:l,domain:r}=t,a=H();let o;e[0]!==i?(o=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:i})}),k=await _.json();if(!_.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=i,e[1]=o):o=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=It,e[2]=d):d=e[2];let f;e[3]!==a?(f=_=>{te.error(_ instanceof Error?_.message:a("common.requestToJoinScreen.failedToRequest"))},e[3]=a,e[4]=f):f=e[4];let b;e[5]!==o||e[6]!==f?(b={mutationFn:o,onSuccess:d,onError:f},e[5]=o,e[6]=f,e[7]=b):b=e[7];const c=ne(b);let v;e[8]!==l||e[9]!==s?(v=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=s,e[10]=v):v=e[10];let m;e[11]!==s||e[12]!==a?(m=a("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=a,e[13]=m):m=e[13];let u;e[14]!==m?(u=n.jsx("h3",{className:"text-lg font-medium",children:m}),e[14]=m,e[15]=u):u=e[15];let p;e[16]!==r||e[17]!==a?(p=a("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=a,e[18]=p):p=e[18];let g;e[19]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let h;e[21]!==u||e[22]!==g?(h=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[21]=u,e[22]=g,e[23]=h):h=e[23];let w;e[24]!==c?(w=()=>c.mutate(),e[24]=c,e[25]=w):w=e[25];let x;e[26]!==c.isPending||e[27]!==a?(x=c.isPending?a("common.requestToJoinScreen.requesting"):a("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=a,e[28]=x):x=e[28];let S;e[29]!==c.isPending||e[30]!==w||e[31]!==x?(S=n.jsx($,{onClick:w,disabled:c.isPending,children:x}),e[29]=c.isPending,e[30]=w,e[31]=x,e[32]=S):S=e[32];const N=c.isPending;let j;e[33]!==a?(j=a("common.requestToJoinScreen.goToHome"),e[33]=a,e[34]=j):j=e[34];let A;e[35]!==c.isPending||e[36]!==j?(A=n.jsx($,{variant:"ghost",onClick:Lt,disabled:N,children:j}),e[35]=c.isPending,e[36]=j,e[37]=A):A=e[37];let y;e[38]!==S||e[39]!==A?(y=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[S,A]}),e[38]=S,e[39]=A,e[40]=y):y=e[40];let T;return e[41]!==h||e[42]!==y||e[43]!==v?(T=n.jsxs(ee,{children:[v,h,y]}),e[41]=h,e[42]=y,e[43]=v,e[44]=T):T=e[44],T}function Lt(){window.location.href="/"}function It(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Dt(t){const e=P.c(7);let s;e[0]!==t?(s=ce.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let i;e[2]!==t?(i=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=i):i=e[3];let l;return e[4]!==s||e[5]!==i?(l={queryKey:s,queryFn:i,refetchOnWindowFocus:!1},e[4]=s,e[5]=i,e[6]=l):l=e[6],Ae(l)}function Pt({orgSlug:t}){const{data:e}=Dt(t);if(e.status!=="member"){Be()?.org===t&&He();const s=localStorage.getItem(X.lastOrgSlug())===t;if(s&&localStorage.removeItem(X.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Tt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Et,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Ot,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ie(t){const e=P.c(42),{ariaLabel:s,dismissLabel:i,eyebrow:l,title:r,description:a,icon:o,children:d,footerLeading:f,actions:b,onDismiss:c,tone:v}=t,m=v===void 0?"neutral":v,u=f||b;let p;e[0]!==m?(p=m==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=m,e[1]=p):p=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(mt,{size:14}),e[2]=g):g=e[2];let h;e[3]!==i||e[4]!==c?(h=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":i,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:g}),e[3]=i,e[4]=c,e[5]=h):h=e[5];const w=o&&"flex items-start gap-3",x=d&&"pb-3";let S;e[6]!==w||e[7]!==x?(S=ue("p-4 pr-11",w,x),e[6]=w,e[7]=x,e[8]=S):S=e[8];let N;e[9]!==o?(N=o&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:o}),e[9]=o,e[10]=N):N=e[10];let j;e[11]!==l?(j=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=j):j=e[12];let A;e[13]!==r?(A=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=A):A=e[14];let y;e[15]!==a?(y=a&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:a}),e[15]=a,e[16]=y):y=e[16];let T;e[17]!==A||e[18]!==y||e[19]!==j?(T=n.jsxs("div",{children:[j,A,y]}),e[17]=A,e[18]=y,e[19]=j,e[20]=T):T=e[20];let _;e[21]!==d?(_=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=_):_=e[22];let k;e[23]!==T||e[24]!==_?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]}),e[23]=T,e[24]=_,e[25]=k):k=e[25];let O;e[26]!==k||e[27]!==S||e[28]!==N?(O=n.jsxs("div",{className:S,children:[N,k]}),e[26]=k,e[27]=S,e[28]=N,e[29]=O):O=e[29];let L;e[30]!==b||e[31]!==f||e[32]!==u||e[33]!==m?(L=u&&n.jsxs("div",{className:ue("flex items-center justify-between gap-3 px-4 py-2.5",m==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:f}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:b})]}),e[30]=b,e[31]=f,e[32]=u,e[33]=m,e[34]=L):L=e[34];let C;return e[35]!==s||e[36]!==O||e[37]!==L||e[38]!==p||e[39]!==h||e[40]!==m?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":m,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[p,h,O,L]}),e[35]=s,e[36]=O,e[37]=L,e[38]=p,e[39]=h,e[40]=m,e[41]=C):C=e[41],C}const $t=[{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:xe,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:J,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:K,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:K,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:U,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:dt,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:xe,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:J,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:K,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:J,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:K,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:J,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:U,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:K,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:U,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:J,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:K,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:U,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:J,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:K,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:U,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:be,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:J,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:at,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:K,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:J,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:U,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:be,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:U,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:ut,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],De=$t,le="studio.release-feed.v1",me=new Set;let V="",W={},fe=!1;function zt(){if(fe)return V||"{}";try{return localStorage.getItem(le)??"{}"}catch{return V||"{}"}}function Pe(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ve(){const t=zt();return t!==V&&(V=t,W=Pe(t)),W}function Mt(t){me.add(t);const e=s=>{if(!(s.key!==le&&s.key!==null)){try{const i=localStorage.getItem(le)??"{}",r={...Pe(i),...W};W=r,V=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{me.delete(t),window.removeEventListener("storage",e)}}function Ft(t){W=t,V=JSON.stringify(t);try{localStorage.setItem(le,V),fe=!1}catch{fe=!0}me.forEach(e=>e())}function Rt(){const t=P.c(7),e=B.useSyncExternalStore(Mt,ve,ve);let s;t[0]!==e?(s=d=>!!e[d],t[0]=e,t[1]=s):s=t[1];const i=s,l=qt;let r;t[2]!==e?(r=De.reduce((d,f)=>e[f.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let o;return t[4]!==i||t[5]!==a?(o={isSeen:i,markSeen:l,unseenCount:a},t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function qt(t){W[t]||Ft({...W,[t]:{seenAt:new Date().toISOString()}})}const Bt=720*60*60*1e3,Ht=10080*60*1e3;function Ut(t){const[e,s,i]=t.split("-").map(Number);return!e||!s||!i?new Date(t).getTime():new Date(e,s-1,i).getTime()}function Jt(t){const e=De[0];if(!e)return null;const s=Ut(e.date),i=t-s;return i<0||i>Bt?null:e}function Kt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Gt(t,e){const s=Kt(t);return s===null?!1:e-s>=Ht}function Vt(){const t=P.c(41),e=H(),{data:s}=Z.useSession(),{isSeen:i,markSeen:l}=Rt(),[r,a]=B.useState(!1);let o,d,f;if(t[0]!==i||t[1]!==s?.user?.createdAt){f=Symbol.for("react.early_return_sentinel");e:{const j=Date.now();if(o=Jt(j),!o){f=null;break e}if(!Gt(s?.user?.createdAt,j)){f=null;break e}d=i(o.id)}t[0]=i,t[1]=s?.user?.createdAt,t[2]=o,t[3]=d,t[4]=f}else o=t[2],d=t[3],f=t[4];if(f!==Symbol.for("react.early_return_sentinel"))return f;if(d)return null;let b;t[5]!==e?(b=e("announcements.release.ariaLabel"),t[5]=e,t[6]=b):b=t[6];let c;t[7]!==e?(c=e("announcements.release.dismiss"),t[7]=e,t[8]=c):c=t[8];const v=o.eyebrow,m=o.title;let u;t[9]!==o.id||t[10]!==l?(u=()=>l(o.id),t[9]=o.id,t[10]=l,t[11]=u):u=t[11];let p;t[12]!==o.id||t[13]!==o.learnMoreHref||t[14]!==l||t[15]!==e?(p=o.learnMoreHref?n.jsx("a",{href:o.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(o.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=o.id,t[13]=o.learnMoreHref,t[14]=l,t[15]=e,t[16]=p):p=t[16];let g;t[17]!==o.cta||t[18]!==o.id||t[19]!==l?(g=o.cta?"href"in o.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(o.id),children:n.jsx("a",{href:o.cta.href,children:o.cta.label})}):n.jsx($,{size:"sm",onClick:()=>a(!0),children:o.cta.label}):null,t[17]=o.cta,t[18]=o.id,t[19]=l,t[20]=g):g=t[20];let h;t[21]!==o.bullets?(h=o.bullets.map(Wt),t[21]=o.bullets,t[22]=h):h=t[22];let w;t[23]!==h?(w=n.jsx("ul",{className:"flex flex-col gap-3",children:h}),t[23]=h,t[24]=w):w=t[24];let x;t[25]!==o.id||t[26]!==l?(x=j=>{a(j),j||l(o.id)},t[25]=o.id,t[26]=l,t[27]=x):x=t[27];let S;t[28]!==r||t[29]!==x?(S=n.jsx(ft,{open:r,onOpenChange:x}),t[28]=r,t[29]=x,t[30]=S):S=t[30];let N;return t[31]!==o.eyebrow||t[32]!==o.title||t[33]!==w||t[34]!==S||t[35]!==b||t[36]!==c||t[37]!==u||t[38]!==p||t[39]!==g?(N=n.jsxs(Ie,{ariaLabel:b,dismissLabel:c,eyebrow:v,title:m,onDismiss:u,footerLeading:p,actions:g,children:[w,S]}),t[31]=o.eyebrow,t[32]=o.title,t[33]=w,t[34]=S,t[35]=b,t[36]=c,t[37]=u,t[38]=p,t[39]=g,t[40]=N):N=t[40],N}function Wt(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const $e=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),G=$e?"⌘":"Ctrl",F={keyboardShortcuts:{keys:[G,"K"],description:"Keyboard shortcuts"},back:{keys:[G,"["],description:"Back to previous"},focusChatInput:{keys:[G,"L"],description:"Focus chat input"},saveAndFormat:{keys:[G,"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:[G,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[G,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",G,"S"],description:"New task"},toggleDaemon:{keys:[G,"D"],description:"Toggle daemon logs"}},Qt=[{label:"General",shortcuts:[F.keyboardShortcuts,F.back,F.newTask,F.toggleDaemon]},{label:"Editor",shortcuts:[F.saveAndFormat]},{label:"Chat",shortcuts:[F.focusChatInput,F.togglePlanMode,F.sendMessage,F.newLine]},{label:"Questions",shortcuts:[F.selectOption]},{label:"Monitoring",shortcuts:[F.applyFilter]}];function je(t){return $e?t.metaKey:t.ctrlKey}function Yt(t){const e=P.c(11),{open:s,onOpenChange:i}=t,l=H();let r;e[0]!==l?(r=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=r):r=e[1];let a;e[2]!==r?(a=n.jsx(Oe,{children:n.jsx(Ce,{children:r})}),e[2]=r,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-4",children:Qt.map(Xt)}),e[4]=o):o=e[4];let d;e[5]!==a?(d=n.jsxs(Ee,{className:"sm:max-w-md",children:[a,o]}),e[5]=a,e[6]=d):d=e[6];let f;return e[7]!==i||e[8]!==s||e[9]!==d?(f=n.jsx(Le,{open:s,onOpenChange:i,children:d}),e[7]=i,e[8]=s,e[9]=d,e[10]=f):f=e[10],f}function Xt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Zt)})]},t.label)}function Zt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(en)})]},t.description)}function en(t){return n.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)}const tn=300*1e3,nn=2;function sn(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function on(t,e){return t.count>=nn&&t.version!==null&&t.version!==e}function an(){const t=P.c(43),e=H(),s=bt();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={mutationFn:ln},t[0]=i):i=t[0];const l=ne(i);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:ce.appVersionCheck(),queryFn:rn,refetchInterval:tn,refetchIntervalInBackground:!0,staleTime:0},t[1]=r):r=t[1];const{data:a,dataUpdatedAt:o}=re(r),[d,f]=B.useState(0);let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={version:null,count:0},t[2]=b):b=t[2];const[c,v]=B.useState(b);o!==d&&(f(o),v(R=>sn(R,a,"4.263.3")));const[m,u]=B.useState(null),p=s;let g;t[3]!==s||t[4]!==l?(g=()=>window.location.reload(),t[3]=s,t[4]=l,t[5]=g):g=t[5];const h=g,w="announcements.version.refresh";if(!on(c,m))return null;let x;t[6]!==e?(x=e("announcements.version.ariaLabel"),t[6]=e,t[7]=x):x=t[7];let S;t[8]!==e?(S=e("announcements.version.dismiss"),t[8]=e,t[9]=S):S=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let j;t[12]!==e?(j=e("announcements.version.title"),t[12]=e,t[13]=j):j=t[13];const A="announcements.version.description";let y;t[14]!==e||t[15]!==A?(y=e(A),t[14]=e,t[15]=A,t[16]=y):y=t[16];let T;t[17]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(he,{size:16}),t[17]=T):T=t[17];let _;t[18]!==c.version?(_=()=>u(c.version),t[18]=c.version,t[19]=_):_=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.263.3"}),t[20]=e,t[21]=k):k=t[21];let O;t[22]!==w||t[23]!==e?(O=e(w),t[22]=w,t[23]=e,t[24]=O):O=t[24];const L=p;let C;t[25]!==L?(C=ue(L),t[25]=L,t[26]=C):C=t[26];let D;t[27]!==C?(D=n.jsx(he,{size:14,className:C}),t[27]=C,t[28]=D):D=t[28];let E;t[29]!==h||t[30]!==p||t[31]!==O||t[32]!==D?(E=n.jsxs($,{size:"sm",disabled:p,onClick:h,children:[O,D]}),t[29]=h,t[30]=p,t[31]=O,t[32]=D,t[33]=E):E=t[33];let M;return t[34]!==_||t[35]!==k||t[36]!==E||t[37]!==x||t[38]!==S||t[39]!==N||t[40]!==j||t[41]!==y?(M=n.jsx(Ie,{ariaLabel:x,dismissLabel:S,eyebrow:N,title:j,description:y,icon:T,tone:"system",onDismiss:_,footerLeading:k,actions:E}),t[34]=_,t[35]=k,t[36]=E,t[37]=x,t[38]=S,t[39]=N,t[40]=j,t[41]=y,t[42]=M):M=t[42],M}async function rn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ln(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function cn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const dn=Date.parse("2026-07-21T00:00:00Z"),ke=t=>cn(X.ptBrAnnouncementSeen(t));function un(){const t=P.c(35),e=H(),[s,i]=Ue(),{data:l,isPending:r}=Z.useSession(),a=l?.user,o=a?.id,d=a?.createdAt,f=d!=null&&new Date(d).getTime()<dn,b=Je()==="pt-BR",c=!r&&!!o&&f&&b&&s.language==="en"&&!ke(o).has(),[v,m]=B.useState(!1),[u,p]=B.useState(!1);!v&&!r&&(m(!0),c&&o&&(ke(o).mark(),i(fn),p(!0),pe("pt_br_auto_switch_shown")));let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=q=>{pe("pt_br_auto_switch_closed",{action:q}),p(!1)},t[0]=g):g=t[0];const h=g;let w;t[1]!==i?(w=()=>{i(mn),h("switch-back")},t[1]=i,t[2]=w):w=t[2];const x=w;let S;t[3]===Symbol.for("react.memo_cache_sentinel")?(S=q=>!q&&h("dismiss"),t[3]=S):S=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let j;t[5]!==e?(j=e("announcements.ptBr.title"),t[5]=e,t[6]=j):j=t[6];let A;t[7]!==j?(A=n.jsx(Ce,{children:j}),t[7]=j,t[8]=A):A=t[8];let y;t[9]!==e?(y=e("announcements.ptBr.description"),t[9]=e,t[10]=y):y=t[10];let T;t[11]!==y?(T=n.jsx(pt,{children:y}),t[11]=y,t[12]=T):T=t[12];let _;t[13]!==A||t[14]!==T?(_=n.jsxs(Oe,{children:[A,T]}),t[13]=A,t[14]=T,t[15]=_):_=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let O;t[18]!==x||t[19]!==k?(O=n.jsx($,{variant:"outline",onClick:x,children:k}),t[18]=x,t[19]=k,t[20]=O):O=t[20];let L;t[21]===Symbol.for("react.memo_cache_sentinel")?(L=()=>h("ok"),t[21]=L):L=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:L,children:C}),t[24]=C,t[25]=D):D=t[25];let E;t[26]!==O||t[27]!==D?(E=n.jsxs(yt,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=E):E=t[28];let M;t[29]!==E||t[30]!==_?(M=n.jsxs(Ee,{className:"sm:max-w-md",children:[N,_,E]}),t[29]=E,t[30]=_,t[31]=M):M=t[31];let R;return t[32]!==u||t[33]!==M?(R=n.jsx(Le,{open:u,onOpenChange:S,children:M}),t[32]=u,t[33]=M,t[34]=R):R=t[34],R}function mn(t){return{...t,language:"en"}}function fn(t){return{...t,language:"pt-BR"}}function gn(t){const e=Ke(t);return typeof e=="string"?e:void 0}function hn(){return gn("experiment-pipeline-check"),null}function pn(t){const e=P.c(1),{activeOrg:s}=t;if(!s)return null;Ge(s.id,{name:s.name??void 0,slug:s.slug??void 0}),Ve();let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(hn,{}),e[0]=i):i=e[0],i}function yn(t){const{prev:e,virtualMcpId:s,decopilotId:i,savedLayout:l,opts:r,autosendValue:a}=t,o={};s?o.virtualmcpid=s:e.virtualmcpid&&(o.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:i,b=(s??d)!==d;let c;if(r?.main)o.main=r.main;else if(l)l.main!==void 0&&(o.main=l.main),l.sidepanel!==void 0&&(c=l.sidepanel);else if(!b){const v=e.main;v&&typeof v=="string"&&!gt(v)&&(o.main=v)}return c!==void 0&&(o.sidepanel=c),r?.autosend&&(o.autosend=a),o}const ze="studio:thread-layout:v1",bn=50;function Me(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function xn(t,e,s,i=bn){const l=t.filter(([r])=>r!==e);for(l.push([e,Me(s)]);l.length>i;)l.shift();return l}function ge(){try{const t=sessionStorage.getItem(ze);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Fe(t){try{sessionStorage.setItem(ze,JSON.stringify(t))}catch{}}function wn(t,e){t&&Fe(xn(ge(),t,e))}function Sn(t){if(!t)return null;const e=ge().find(([s])=>s===t);return e?Me(e[1]):null}function Vn(t){if(!t)return;const e=ge(),s=e.filter(([i])=>i!==t);s.length!==e.length&&Fe(s)}function Re(t){return{queryKey:ce.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 Wn(t){const e=P.c(10);let s;e[0]!==t?(s=Re(t),e[0]=t,e[1]=s):s=e[1];const i=re(s);let l;e[2]!==i.data?.prompts?(l=i.data?.prompts??[],e[2]=i.data?.prompts,e[3]=l):l=e[3];let r;e[4]!==i.data?.tiles?(r=i.data?.tiles??[],e[4]=i.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==i.isLoading||e[7]!==l||e[8]!==r?(a={isLoading:i.isLoading,prompts:l,tiles:r},e[6]=i.isLoading,e[7]=l,e[8]=r,e[9]=a):a=e[9],a}function vn(t){const e=P.c(31),{orgSlug:s,orgName:i,domain:l}=t,r=H();let a;e[0]!==s?(a=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=a):a=e[1];const o=a,d=jn;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ne,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let b;e[3]!==r?(b=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=b):b=e[4];let c;e[5]!==b?(c=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[5]=b,e[6]=c):c=e[6];let v;e[7]!==l||e[8]!==i||e[9]!==r?(v=i?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:i})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${r("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=i,e[9]=r,e[10]=v):v=e[10];let m;e[11]!==v?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=m):m=e[12];let u;e[13]!==c||e[14]!==m?(u=n.jsxs("div",{className:"space-y-2",children:[c,m]}),e[13]=c,e[14]=m,e[15]=u):u=e[15];let p;e[16]!==r?(p=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=p):p=e[17];let g;e[18]!==o||e[19]!==p?(g=n.jsx($,{onClick:o,children:p}),e[18]=o,e[19]=p,e[20]=g):g=e[20];let h;e[21]!==r?(h=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=h):h=e[22];let w;e[23]!==h?(w=n.jsx($,{variant:"ghost",onClick:d,children:h}),e[23]=h,e[24]=w):w=e[24];let x;e[25]!==w||e[26]!==g?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,w]}),e[25]=w,e[26]=g,e[27]=x):x=e[27];let S;return e[28]!==x||e[29]!==u?(S=n.jsxs(ee,{children:[f,u,x]}),e[28]=x,e[29]=u,e[30]=S):S=e[30],S}function jn(){window.location.href="/"}function kn(t){const e=P.c(8),{org:s,children:i}=t,r=jt(s.id,s.slug)?.enabled_plugins??null;let a;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(a={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=a):a=e[3];const o=a;let d;return e[4]!==i||e[5]!==s||e[6]!==o?(d=n.jsx(it,{org:s,project:o,children:i}),e[4]=i,e[5]=s,e[6]=o,e[7]=d):d=e[7],d}function Nn(){const t=We(),e=vt(),{org:s}=Qe(),i=_e({strict:!1}),l=Ye({strict:!1}),r=i.org??"",a=i.taskId??"",o=(m,u,p=!0)=>t({to:"/$org/$taskId",params:{org:r,taskId:m},search:u,replace:p}),d=(m,u=!0)=>o(a,m,u),f=m=>d(u=>({...u,sidepanel:m})),b=(m,u,p)=>{const g=!!a&&a===m;a&&!g&&wn(a,{main:l.main,sidepanel:l.sidepanel});const h=g?null:Sn(m),w=we(s.id).id;return o(m,x=>yn({prev:x,virtualMcpId:u,decopilotId:w,savedLayout:h,opts:p,autosendValue:ht}),!1)};return{openSidePanel:f,setTaskId:b,createNewTask:async(m,u,p)=>{const g=crypto.randomUUID(),h=m??l.virtualmcpid??we(s.id).id;try{await e?.create({id:g,virtual_mcp_id:h,...u?{branch:u}:{}})}catch{}b(g,h,p)},openTab:m=>o(a||crypto.randomUUID(),u=>({...u,main:m}))}}function An(){const t=P.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const i=Xe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:r}=_e(l),[a,o]=B.useState(!1),d=Ze(),f=i??"";let b;t[2]!==f?(b=Re(f),t[2]=f,t[3]=b):b=t[3];const c=!!i&&!r;let v;t[4]!==b||t[5]!==c?(v={...b,enabled:c},t[4]=b,t[5]=c,t[6]=v):v=t[6],re(v);const{data:m}=Z.useSession(),u=m?.user?.id;let p;t[7]!==i||t[8]!==u?(p=i&&u?et(u,i):null,t[7]=i,t[8]=u,t[9]=p):p=t[9];const g=p;let h,w;t[10]!==d?(h=()=>{const I=z=>{if(je(z)&&z.code==="KeyK"){z.preventDefault(),o(!0);return}je(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},w=[d],t[10]=d,t[11]=h,t[12]=w):(h=t[11],w=t[12]),B.useEffect(h,w);let x;t[13]!==i?(x=ce.activeOrganization(i),t[13]=i,t[14]=x):x=t[14];let S;t[15]!==i||t[16]!==u?(S=async()=>{if(!i)return null;performance.mark("mesh:active-org-fetch:start");const{data:I}=await Z.organization.getFullOrganization({query:{organizationSlug:i}}).finally(_n),z=ye(I);return I&&!z&&localStorage.setItem(X.lastOrgSlug(),i),u&&I&&nt(u,i,I),I},t[15]=i,t[16]=u,t[17]=S):S=t[17];const N=g?g.data:void 0,j=g?.updatedAt;let A;t[18]!==S||t[19]!==N||t[20]!==j||t[21]!==x?(A={queryKey:x,queryFn:S,initialData:N,initialDataUpdatedAt:j,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=S,t[19]=N,t[20]=j,t[21]=x,t[22]=A):A=t[22];const{data:y}=Ae(A),T=y?.id,_=y?.slug,{data:k}=kt(T,_),O=T??"",L=_??"";let C;t[23]!==O||t[24]!==L?(C=wt({connectionId:St,orgId:O,orgSlug:L}),t[23]=O,t[24]=L,t[25]=C):C=t[25];const D=!!T&&!!_;let E;if(t[26]!==C||t[27]!==D?(E={...C,enabled:D},t[26]=C,t[27]=D,t[28]=E):E=t[28],re(E),!y){let I;t[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(st,{}),t[29]=I):I=t[29];let z;return t[30]!==i?(z=n.jsx(B.Suspense,{fallback:I,children:n.jsx(Pt,{orgSlug:i})}),t[30]=i,t[31]=z):z=t[31],z}if(ye(y)){localStorage.getItem(X.lastOrgSlug())===i&&localStorage.removeItem(X.lastOrgSlug());let I;return t[32]!==y.name?(I=n.jsx(tt,{orgName:y.name}),t[32]=y.name,t[33]=I):I=t[33],I}if(k?.ssoRequired&&!k.authenticated){let I;return t[34]!==y.id||t[35]!==y.name||t[36]!==y.slug||t[37]!==k.domain?(I=n.jsx(vn,{orgId:y.id,orgSlug:y.slug,orgName:y.name,domain:k.domain}),t[34]=y.id,t[35]=y.name,t[36]=y.slug,t[37]=k.domain,t[38]=I):I=t[38],I}const R=y.logo??null;let q;t[39]!==y||t[40]!==R?(q={...y,logo:R},t[39]=y,t[40]=R,t[41]=q):q=t[41];let Q;t[42]!==y?(Q=n.jsx(pn,{activeOrg:y}),t[42]=y,t[43]=Q):Q=t[43];let se;t[44]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(ot,{}),t[44]=se):se=t[44];let oe;t[45]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Vt,{}),n.jsx(an,{})]}),t[45]=oe):oe=t[45];let Y;t[46]!==a?(Y=n.jsx(Yt,{open:a,onOpenChange:o}),t[46]=a,t[47]=Y):Y=t[47];let ie;t[48]===Symbol.for("react.memo_cache_sentinel")?(ie=n.jsx(un,{}),t[48]=ie):ie=t[48];let ae;return t[49]!==q||t[50]!==Q||t[51]!==Y?(ae=n.jsxs(kn,{org:q,children:[Q,se,oe,Y,ie]}),t[49]=q,t[50]=Q,t[51]=Y,t[52]=ae):ae=t[52],ae}function _n(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Tn(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{children:n.jsx(An,{})}),t[0]=e):e=t[0],e}const Qn=Object.freeze(Object.defineProperty({__proto__:null,default:Tn,usePanelActions:Nn},Symbol.toStringTag,{value:"Module"}));export{F as K,Wn as a,Vn as f,je as i,cn as m,Qn as s,Nn as u};
@@ -1 +1 @@
1
- import{c as C,n as d,bo as u,j as l}from"./index-fZpMDfe6.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{c as C,n as d,bo as u,j as l}from"./index-DS_PtpmP.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
@@ -1 +1 @@
1
- import{p as D}from"./use-organization-settings-B4nKr0f2.js";const u=864e5,d=2,p=[1,2,3,4],w=20,S=2,T=Date.UTC(9999,11,31);function i(t){return t.toISOString().slice(0,10)}function M(t){const s=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n=new Date(s).getUTCDay(),r=n===0?6:n-1;return i(new Date(s-r*u))}function m(t,s){const n=D(t.startDate);if(n===null||t.weeks<1)return null;const r=t.weeks*7*u,a=s.getTime()-n;return a<0?1:Math.floor(a/r)+1}function k(t,s){const n=D(t.startDate);if(n===null||t.weeks<1||s<1)return null;const r=t.weeks*7*u,a=n+(s-1)*r,o=a+r-u;return o>T?null:{start:i(new Date(a)),end:i(new Date(o))}}function C(t,s,n=[],{past:r=S,future:a}={}){const o=a??Math.ceil(w/Math.max(1,t.weeks)),c=m(t,s),l=new Set;if(c!==null)for(let e=c-r;e<=c+o;e++)e>=1&&l.add(e);for(const e of n)typeof e=="number"&&e>=1&&l.add(e);return[...l].sort((e,f)=>e-f)}export{d as D,p as S,m as a,C as b,M as m,k as s};
1
+ import{p as D}from"./use-organization-settings-BZyz9Mop.js";const u=864e5,d=2,p=[1,2,3,4],w=20,S=2,T=Date.UTC(9999,11,31);function i(t){return t.toISOString().slice(0,10)}function M(t){const s=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n=new Date(s).getUTCDay(),r=n===0?6:n-1;return i(new Date(s-r*u))}function m(t,s){const n=D(t.startDate);if(n===null||t.weeks<1)return null;const r=t.weeks*7*u,a=s.getTime()-n;return a<0?1:Math.floor(a/r)+1}function k(t,s){const n=D(t.startDate);if(n===null||t.weeks<1||s<1)return null;const r=t.weeks*7*u,a=n+(s-1)*r,o=a+r-u;return o>T?null:{start:i(new Date(a)),end:i(new Date(o))}}function C(t,s,n=[],{past:r=S,future:a}={}){const o=a??Math.ceil(w/Math.max(1,t.weeks)),c=m(t,s),l=new Set;if(c!==null)for(let e=c-r;e<=c+o;e++)e>=1&&l.add(e);for(const e of n)typeof e=="number"&&e>=1&&l.add(e);return[...l].sort((e,f)=>e-f)}export{d as D,p as S,m as a,C as b,M as m,k as s};
@@ -1 +1 @@
1
- import{b as B,H as L,r as v,j as e,P as x,d9 as k,d6 as y,d7 as E,d8 as a,eU as D,B as u,q as C,t as c,c as z}from"./index-fZpMDfe6.js";import{D as T}from"./domain-settings-1pFiPcDs.js";import{A as O,a as R,b as q,c as F,e as U,f as M,g as H}from"./alert-dialog-COKsRPdB.js";import{I as d}from"./input-v4c8p5Ob.js";import{S as $}from"./switch-Dd8SWBtK.js";import{a as G,b as J,c as K,d as Q}from"./use-org-sso-9a_THghN.js";import{s as V}from"./Trash01-rd-vb1MA.js";import{R as W}from"./require-capability-CF9r_mzF.js";import"./badge-B2mtA9Oj.js";import"./select-D9OtHuoQ.js";import"./Check-CFdAuLVR.js";import"./ChevronDown-Bh9AZv82.js";import"./ChevronUp-CYbM4ZwP.js";import"./access-gate-BT3_V_pA.js";import"./capability-load-error-Bu1DMqyM.js";function X(){const s=B(),{org:o}=L(),{data:h,isLoading:P}=G(o.id,o.slug),f=J(o.id,o.slug),S=K(o.id,o.slug),b=Q(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[I,j]=v.useState(!1),m=h?.configured&&h.config,n=h?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await f.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:f.isPending,size:"sm",children:f.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:I,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(U,{children:[e.jsx(M,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(H,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{ue as default};
1
+ import{b as B,H as L,r as v,j as e,P as x,d9 as k,d6 as y,d7 as E,d8 as a,eU as D,B as u,q as C,t as c,c as z}from"./index-DS_PtpmP.js";import{D as T}from"./domain-settings-DoR6E0N1.js";import{A as O,a as R,b as q,c as F,e as U,f as M,g as H}from"./alert-dialog-C6uvTNV5.js";import{I as d}from"./input-Dsyfk4jo.js";import{S as $}from"./switch-CPOt6c8D.js";import{a as G,b as J,c as K,d as Q}from"./use-org-sso-DAANUxzR.js";import{s as V}from"./Trash01-Hh3vb-pV.js";import{R as W}from"./require-capability-BuB0VaIt.js";import"./badge-Dp3mR27V.js";import"./select-v0HyS5wV.js";import"./Check-7fxTQqwV.js";import"./ChevronDown-DC3VmpPs.js";import"./ChevronUp-DklUcnpq.js";import"./access-gate-C5Y4THSz.js";import"./capability-load-error-DcN5DOFH.js";function X(){const s=B(),{org:o}=L(),{data:h,isLoading:P}=G(o.id,o.slug),f=J(o.id,o.slug),S=K(o.id,o.slug),b=Q(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[I,j]=v.useState(!1),m=h?.configured&&h.config,n=h?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await f.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:f.isPending,size:"sm",children:f.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:I,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(U,{children:[e.jsx(M,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(H,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{ue as default};
@@ -1 +1 @@
1
- import{c as J,b as Z,j as i,P as te,r as V,d9 as ue,Y as pe,E as xe,H as Se,p as he,d8 as W,B as X,d as ye,f as je,q as ae,K as ve,d7 as ie,d6 as re,e as Ce,t as ge}from"./index-fZpMDfe6.js";import{i as _e}from"./AlertCircle-DL3U1yq7.js";import{i as be}from"./ChevronRight-Bt0Ps5hy.js";import{s as Re}from"./Plus-DJBOKCXM.js";import{s as ke}from"./Trash01-rd-vb1MA.js";import{I as ne}from"./input-v4c8p5Ob.js";import{S as de}from"./switch-Dd8SWBtK.js";import{A as me}from"./avatar-CKLVepem.js";import{P as Ne,a as Pe,b as Te}from"./popover-DSZP75un.js";import{b as fe}from"./use-connection-DJ5BvXkS.js";import{W as le}from"./constants-_08zpzmT.js";import{u as we}from"./use-registry-connections-C7LyRS1M.js";import{m as Ae,q as ze}from"./use-organization-settings-B4nKr0f2.js";import{R as Ee}from"./require-capability-CF9r_mzF.js";import"./User01-CGWss5jM.js";import"./use-mcp-client-BixLZLmc.js";import"./auth-Dff1xvcy.js";import"./access-gate-BT3_V_pA.js";import"./capability-load-error-Bu1DMqyM.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(_e,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,p]=V.useState(""),[a,A]=V.useState(""),[x,b]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==x||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=x,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let S;e[9]!==s?(S=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=S):S=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==S?(m={mutationFn:j,onSuccess:d,onError:S},e[11]=j,e[12]=d,e[13]=S,e[14]=m):m=e[14];const{mutate:v,isPending:g}=Ce(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let u;e[19]===Symbol.for("react.memo_cache_sentinel")?(u=y=>p(y.target.value),e[19]=u):u=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(ne,{placeholder:f,value:r,onChange:u,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(W,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let K;e[28]!==s?(K=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=K):K=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=y=>A(y.target.value),e[30]=O):O=e[30];let U;e[31]!==K||e[32]!==a?(U=i.jsx(ne,{placeholder:K,value:a,onChange:O,className:"w-[280px]"}),e[31]=K,e[32]=a,e[33]=U):U=e[33];let Y;e[34]!==F||e[35]!==U?(Y=i.jsx(W,{title:F,action:U}),e[34]=F,e[35]=U,e[36]=Y):Y=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let _;e[39]!==s?(_=s("settings.orgStore.optional"),e[39]=s,e[40]=_):_=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let B;e[43]===Symbol.for("react.memo_cache_sentinel")?(B=y=>b(y.target.value),e[43]=B):B=e[43];let M;e[44]!==E||e[45]!==x?(M=i.jsx(ne,{type:"password",placeholder:E,value:x,onChange:B,className:"w-[280px]"}),e[44]=E,e[45]=x,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==_||e[49]!==M?(I=i.jsx(W,{title:z,description:_,action:M}),e[47]=z,e[48]=_,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==Y||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,Y,I,w]}),e[69]=Y,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:p,href:a}=t,A=Z(),x=ye();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={from:"/shell/$org"},e[0]=b):b=e[0];const{org:j}=je(b);let d;e[1]!==o||e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==j?(d=()=>{a?x({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=x,e[4]=r,e[5]=j,e[6]=d):d=e[6];const S=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==p||e[11]!==A?(v=p&&i.jsxs(Ne,{children:[i.jsx(Pe,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(ke,{size:14})})}),i.jsx(Te,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),p()},children:A("settings.orgStore.remove")})]})})]}),e[10]=p,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(be,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let u;e[20]!==v||e[21]!==h||e[22]!==f?(u=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=u):u=e[23];let C;return e[24]!==c||e[25]!==S||e[26]!==l||e[27]!==m||e[28]!==u?(C=i.jsx(W,{title:l,description:c,onClick:S,icon:m,action:u}),e[24]=c,e[25]=S,e[26]=l,e[27]=m,e[28]=u,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=Se(),c=we(),s=fe(),o=Ae(),{mutateAsync:r}=ze(),p=he(),[a,A]=V.useState(!1);let x,b,j,d,S,m;if(t[0]!==s||t[1]!==l.id||t[2]!==p||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=le.REGISTRY(l.id),u=n=>{if(!o)return n===f;const q=o.registries[n];return q?q.enabled:n===f},C=le.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),K=F?.id??C,O=le.SELF(l.id),U=new Set([f,C,"community-registry",O]),Y=c.filter(n=>!U.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,q)=>{ae("store_registry_toggled",{connection_id:n,enabled:q});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:q}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const _=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==p?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),p.invalidateQueries({queryKey:ve.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=p,t[20]=E):E=t[20];const B=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const q=o??{registries:{},blockedMcps:[]};await r({...q,registries:{...q.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:u(f),onToggle:n=>_(f,n)}):i.jsx(W,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(S=i.jsx(re,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=S):S=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(Re,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==u?(y=u("self"),t[43]=u,t[44]=y):y=t[44];let G;t[45]!==_?(G=n=>_("self",n),t[45]=_,t[46]=G):G=t[46];let H;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(H=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=H):H=t[51];let ee;t[52]!==B||t[53]!==_||t[54]!==u||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:u(n.id),onToggle:q=>_(n.id,q),onDelete:()=>B(n.id)},n.id),t[52]=B,t[53]=_,t[54]=u,t[55]=e,t[56]=ee):ee=t[56];const oe=Y.map(ee);let Q;t[57]!==H||t[58]!==oe?(Q=i.jsxs(ie,{children:[H,oe]}),t[57]=H,t[58]=oe,t[59]=Q):Q=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==Q?(m=i.jsxs(re,{title:L,actions:P,children:[T,Q]}),t[60]=L,t[61]=P,t[62]=T,t[63]=Q,t[64]=m):m=t[64],b=re,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],x=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:u(K),onToggle:n=>_(K,n)}):i.jsx(W,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=p,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=x,t[9]=b,t[10]=j,t[11]=d,t[12]=S,t[13]=m}else x=t[8],b=t[9],j=t[10],d=t[11],S=t[12],m=t[13];let v;t[67]!==x||t[68]!==j?(v=i.jsx(x,{children:j}),t[67]=x,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==b||t[71]!==d||t[72]!==v?(g=i.jsx(b,{title:d,children:v}),t[70]=b,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==S||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[S,m,g]}),t[74]=S,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function qe(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:x}=A;return i.jsx(Me,{error:x??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(pe,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let p;t[8]!==o?(p=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ue,{children:[o,r]})})})})}),t[8]=o,t[9]=p):p=t[9];let a;return t[10]!==l||t[11]!==p?(a=i.jsx(xe,{fallback:l,children:p}),t[10]=l,t[11]=p,t[12]=a):a=t[12],a}function nt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(qe,{})}),t[0]=e):e=t[0],e}export{nt as default};
1
+ import{c as J,b as Z,j as i,P as te,r as V,d9 as ue,Y as pe,E as xe,H as Se,p as he,d8 as W,B as X,d as ye,f as je,q as ae,K as ve,d7 as ie,d6 as re,e as Ce,t as ge}from"./index-DS_PtpmP.js";import{i as _e}from"./AlertCircle-C8ZNKM0T.js";import{i as be}from"./ChevronRight-DB1jERJP.js";import{s as Re}from"./Plus-DfL6u6I_.js";import{s as ke}from"./Trash01-Hh3vb-pV.js";import{I as ne}from"./input-Dsyfk4jo.js";import{S as de}from"./switch-CPOt6c8D.js";import{A as me}from"./avatar-CiQyTRfd.js";import{P as Ne,a as Pe,b as Te}from"./popover-BRZicoZW.js";import{b as fe}from"./use-connection-BJir_wda.js";import{W as le}from"./constants-_08zpzmT.js";import{u as we}from"./use-registry-connections-DrNpncD0.js";import{m as Ae,q as ze}from"./use-organization-settings-BZyz9Mop.js";import{R as Ee}from"./require-capability-BuB0VaIt.js";import"./User01-ClQH_5NK.js";import"./use-mcp-client-Zz1TwEAh.js";import"./auth-BjDvWFq6.js";import"./access-gate-C5Y4THSz.js";import"./capability-load-error-DcN5DOFH.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(_e,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,p]=V.useState(""),[a,A]=V.useState(""),[x,b]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==x||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=x,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let S;e[9]!==s?(S=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=S):S=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==S?(m={mutationFn:j,onSuccess:d,onError:S},e[11]=j,e[12]=d,e[13]=S,e[14]=m):m=e[14];const{mutate:v,isPending:g}=Ce(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let u;e[19]===Symbol.for("react.memo_cache_sentinel")?(u=y=>p(y.target.value),e[19]=u):u=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(ne,{placeholder:f,value:r,onChange:u,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(W,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let K;e[28]!==s?(K=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=K):K=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=y=>A(y.target.value),e[30]=O):O=e[30];let U;e[31]!==K||e[32]!==a?(U=i.jsx(ne,{placeholder:K,value:a,onChange:O,className:"w-[280px]"}),e[31]=K,e[32]=a,e[33]=U):U=e[33];let Y;e[34]!==F||e[35]!==U?(Y=i.jsx(W,{title:F,action:U}),e[34]=F,e[35]=U,e[36]=Y):Y=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let _;e[39]!==s?(_=s("settings.orgStore.optional"),e[39]=s,e[40]=_):_=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let B;e[43]===Symbol.for("react.memo_cache_sentinel")?(B=y=>b(y.target.value),e[43]=B):B=e[43];let M;e[44]!==E||e[45]!==x?(M=i.jsx(ne,{type:"password",placeholder:E,value:x,onChange:B,className:"w-[280px]"}),e[44]=E,e[45]=x,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==_||e[49]!==M?(I=i.jsx(W,{title:z,description:_,action:M}),e[47]=z,e[48]=_,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==Y||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,Y,I,w]}),e[69]=Y,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:p,href:a}=t,A=Z(),x=ye();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={from:"/shell/$org"},e[0]=b):b=e[0];const{org:j}=je(b);let d;e[1]!==o||e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==j?(d=()=>{a?x({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=x,e[4]=r,e[5]=j,e[6]=d):d=e[6];const S=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==p||e[11]!==A?(v=p&&i.jsxs(Ne,{children:[i.jsx(Pe,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(ke,{size:14})})}),i.jsx(Te,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),p()},children:A("settings.orgStore.remove")})]})})]}),e[10]=p,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(be,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let u;e[20]!==v||e[21]!==h||e[22]!==f?(u=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=u):u=e[23];let C;return e[24]!==c||e[25]!==S||e[26]!==l||e[27]!==m||e[28]!==u?(C=i.jsx(W,{title:l,description:c,onClick:S,icon:m,action:u}),e[24]=c,e[25]=S,e[26]=l,e[27]=m,e[28]=u,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=Se(),c=we(),s=fe(),o=Ae(),{mutateAsync:r}=ze(),p=he(),[a,A]=V.useState(!1);let x,b,j,d,S,m;if(t[0]!==s||t[1]!==l.id||t[2]!==p||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=le.REGISTRY(l.id),u=n=>{if(!o)return n===f;const q=o.registries[n];return q?q.enabled:n===f},C=le.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),K=F?.id??C,O=le.SELF(l.id),U=new Set([f,C,"community-registry",O]),Y=c.filter(n=>!U.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,q)=>{ae("store_registry_toggled",{connection_id:n,enabled:q});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:q}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const _=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==p?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),p.invalidateQueries({queryKey:ve.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=p,t[20]=E):E=t[20];const B=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const q=o??{registries:{},blockedMcps:[]};await r({...q,registries:{...q.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:u(f),onToggle:n=>_(f,n)}):i.jsx(W,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(S=i.jsx(re,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=S):S=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(Re,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==u?(y=u("self"),t[43]=u,t[44]=y):y=t[44];let G;t[45]!==_?(G=n=>_("self",n),t[45]=_,t[46]=G):G=t[46];let H;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(H=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=H):H=t[51];let ee;t[52]!==B||t[53]!==_||t[54]!==u||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:u(n.id),onToggle:q=>_(n.id,q),onDelete:()=>B(n.id)},n.id),t[52]=B,t[53]=_,t[54]=u,t[55]=e,t[56]=ee):ee=t[56];const oe=Y.map(ee);let Q;t[57]!==H||t[58]!==oe?(Q=i.jsxs(ie,{children:[H,oe]}),t[57]=H,t[58]=oe,t[59]=Q):Q=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==Q?(m=i.jsxs(re,{title:L,actions:P,children:[T,Q]}),t[60]=L,t[61]=P,t[62]=T,t[63]=Q,t[64]=m):m=t[64],b=re,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],x=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:u(K),onToggle:n=>_(K,n)}):i.jsx(W,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=p,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=x,t[9]=b,t[10]=j,t[11]=d,t[12]=S,t[13]=m}else x=t[8],b=t[9],j=t[10],d=t[11],S=t[12],m=t[13];let v;t[67]!==x||t[68]!==j?(v=i.jsx(x,{children:j}),t[67]=x,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==b||t[71]!==d||t[72]!==v?(g=i.jsx(b,{title:d,children:v}),t[70]=b,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==S||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[S,m,g]}),t[74]=S,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function qe(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:x}=A;return i.jsx(Me,{error:x??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(pe,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let p;t[8]!==o?(p=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ue,{children:[o,r]})})})})}),t[8]=o,t[9]=p):p=t[9];let a;return t[10]!==l||t[11]!==p?(a=i.jsx(xe,{fallback:l,children:p}),t[10]=l,t[11]=p,t[12]=a):a=t[12],a}function nt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(qe,{})}),t[0]=e):e=t[0],e}export{nt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DaMCQA8V.js","assets/index-DS_PtpmP.js","assets/index-DfOjcoHJ.css","assets/Tool02-CaMOVLUq.js","assets/CheckCircle-Ds0VlJAl.js","assets/Settings02-Bvo1tVwA.js","assets/use-mcp-client-Zz1TwEAh.js","assets/constants-_08zpzmT.js","assets/auth-BjDvWFq6.js","assets/useInfiniteQuery-DrLMltTg.js","assets/use-infinite-scroll-DGa9MpTS.js","assets/badge-Dp3mR27V.js","assets/input-Dsyfk4jo.js","assets/dropdown-menu-D2aUCLYk.js","assets/Check-7fxTQqwV.js","assets/ChevronRight-DB1jERJP.js","assets/DotsVertical-CtEAbV8O.js","assets/table-yXN-B6JM.js","assets/toggle-group-5omFh11U.js","assets/use-view-mode-D2QnCor3.js","assets/FilterLines-v44MczT5.js","assets/Globe01-Dr2wIPy6.js","assets/SearchMd-DVItXoZb.js","assets/dialog-CLVbCjMu.js","assets/AlertCircle-C8ZNKM0T.js","assets/Download01-B_W2m-uX.js","assets/Upload01-PO1Z12J3.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-C6uvTNV5.js","assets/Trash01-Hh3vb-pV.js","assets/label-AZH9h-dP.js","assets/select-v0HyS5wV.js","assets/ChevronDown-DC3VmpPs.js","assets/ChevronUp-DklUcnpq.js","assets/switch-CPOt6c8D.js","assets/textarea-CegtzxU_.js","assets/ArrowLeft-C4S3t4gh.js","assets/XCircle-qXvFFF3a.js","assets/checkbox-C1bUrPvW.js","assets/Eye-CCl0QwVV.js","assets/LinkExternal01-NyjdMVf7.js","assets/use-copy-Ddcpb0Jm.js","assets/Copy01-0rsYyxBd.js","assets/Key01-kpUUZaqy.js","assets/Plus-DfL6u6I_.js","assets/mcp-oauth-CV7iuGWl.js","assets/Play-D8AheaUt.js"])))=>i.map(i=>d[i]);
2
+ import{c,d as n,f as m,j as t,k as f,r as l,bc as p}from"./index-DS_PtpmP.js";import{R as u}from"./require-capability-BuB0VaIt.js";import"./access-gate-C5Y4THSz.js";import"./capability-load-error-DcN5DOFH.js";const g=l.lazy(()=>p(()=>import("./registry-layout-DaMCQA8V.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function h(){const e=c.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=m(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{h as default};
@@ -1 +1 @@
1
- import{r as c,j as i,bd as C,bh as y,bg as T,bj as I,cj as M,ci as H,bf as z,c as A,n as g}from"./index-fZpMDfe6.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":_(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",j=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":_(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});j.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function _(a){return a?"checked":"unchecked"}var $=E,D=j;function W(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,bd as C,bh as y,bg as T,bj as I,cj as M,ci as H,bf as z,c as A,n as g}from"./index-DS_PtpmP.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":_(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",j=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":_(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});j.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function _(a){return a?"checked":"unchecked"}var $=E,D=j;function W(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{c as te,j as s,da as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-fZpMDfe6.js";import{s as ge}from"./Plus-DJBOKCXM.js";import{c as Re,d as ve,b as Se,f as Ne,g as De,e as _e,a as Ce,A as Pe}from"./alert-dialog-COKsRPdB.js";import{b as Ae,h as ke,a as we,c as Oe,d as ze,e as Ee}from"./dialog-BVOhf6JL.js";import{I as Ie}from"./input-v4c8p5Ob.js";import{G as xe,a as $e}from"./github-repo-picker-CPPjWOCA.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-B_4SIVWY.js";import{t as He}from"./cards-CnXEidEU.js";import{R as Be}from"./require-capability-CF9r_mzF.js";import"./collection-search-BcNT9wqV.js";import"./SearchMd-Bvk6cmtM.js";import"./use-debounced-value-d2xvAJAf.js";import"./use-connection-DJ5BvXkS.js";import"./use-mcp-client-BixLZLmc.js";import"./constants-_08zpzmT.js";import"./auth-Dff1xvcy.js";import"./authenticate-and-persist-oauth-BpXFlbw1.js";import"./mcp-oauth-MtFdjicX.js";import"./ArrowLeft-BDtQVDZJ.js";import"./LinkExternal01-CDWxDAhW.js";import"./LockUnlocked01-BJDlnHNP.js";import"./use-mcp-tools-DhYUR3cu.js";import"./extract-connection-data-BRWpOoZu.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-COcz3Nee.js";import"./use-virtual-mcp-CxECG99q.js";import"./hooks-CtnSCLIe.js";import"./decopilot-sse-pool-0EWVughz.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./session-runtime-wVXsCwcJ.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./DotsVertical-C5qhPHKZ.js";import"./Download01-DZdiDQUS.js";import"./Share07-DRhhhSu7.js";import"./Globe01-qBOiIpcJ.js";import"./Key01-CQ2Pckpa.js";import"./Palette-CYMwYnzJ.js";import"./Trash01-rd-vb1MA.js";import"./Zap-DoBPpnDg.js";import"./dropdown-menu-BpdWhSA7.js";import"./Check-CFdAuLVR.js";import"./ChevronRight-Bt0Ps5hy.js";import"./file-type-icon-DQDAdTqu.js";import"./Eye-DFHNhYtx.js";import"./access-gate-BT3_V_pA.js";import"./capability-load-error-Bu1DMqyM.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const f=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=f.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let p;t[14]!==l.volume||t[15]!==c?(p=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=p):p=t[16];let y;t[17]!==f.label||t[18]!==d||t[19]!==p?(y=s.jsxs("p",{className:d,children:[p," ·"," ",f.label]}),t[17]=f.label,t[18]=d,t[19]=p,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let f;t[3]!==u?(f=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=f):f=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==f||t[10]!==a?(n=s.jsxs("div",{children:[f,a]}),t[9]=f,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,f]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let p;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(p=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=p):p=e[4];const y=p;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let N;e[16]!==b||e[17]!==t?(N=b.length===0?s.jsx(Ye,{onAdd:()=>f(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>f(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=N):N=e[18];let D;e[19]!==t?(D=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=D):D=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{f(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==D?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:f,title:D,onImportComplete:se}),e[22]=u,e[23]=D,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const fe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const pe=m?.volume??"";let q;e[71]!==t||e[72]!==pe?(q=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(Ne,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(De,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==fe||e[99]!==X?(Z=s.jsx(Pe,{open:fe,onOpenChange:oe,children:X}),e[98]=fe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==N||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,N,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=N,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function qt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{qt as default};
1
+ import{c as te,j as s,da as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-DS_PtpmP.js";import{s as ge}from"./Plus-DfL6u6I_.js";import{c as Re,d as ve,b as Se,f as Ne,g as De,e as _e,a as Ce,A as Pe}from"./alert-dialog-C6uvTNV5.js";import{b as Ae,h as ke,a as we,c as Oe,d as ze,e as Ee}from"./dialog-CLVbCjMu.js";import{I as Ie}from"./input-Dsyfk4jo.js";import{G as xe,a as $e}from"./github-repo-picker-BMkV5srU.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-BMPkdDGr.js";import{t as He}from"./cards-BKUYovMU.js";import{R as Be}from"./require-capability-BuB0VaIt.js";import"./collection-search-Bd6xu3h9.js";import"./SearchMd-DVItXoZb.js";import"./use-debounced-value-DXPF8RW0.js";import"./use-connection-BJir_wda.js";import"./use-mcp-client-Zz1TwEAh.js";import"./constants-_08zpzmT.js";import"./auth-BjDvWFq6.js";import"./authenticate-and-persist-oauth-CfcfVqDI.js";import"./mcp-oauth-CV7iuGWl.js";import"./ArrowLeft-C4S3t4gh.js";import"./LinkExternal01-NyjdMVf7.js";import"./LockUnlocked01-DsKz0Xl2.js";import"./use-mcp-tools-CXwtpaPy.js";import"./extract-connection-data-A9qAyYQA.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-BTDz1KOs.js";import"./use-virtual-mcp-BHOLpD1P.js";import"./hooks-DlPXzzl8.js";import"./decopilot-sse-pool-B2gldwFf.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./session-runtime-wVXsCwcJ.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./DotsVertical-CtEAbV8O.js";import"./Download01-B_W2m-uX.js";import"./Share07-3Y0P_W3_.js";import"./Globe01-Dr2wIPy6.js";import"./Key01-kpUUZaqy.js";import"./Palette-BffjPXio.js";import"./Trash01-Hh3vb-pV.js";import"./Zap-DK06ViId.js";import"./dropdown-menu-D2aUCLYk.js";import"./Check-7fxTQqwV.js";import"./ChevronRight-DB1jERJP.js";import"./file-type-icon-wuRfMh_5.js";import"./Eye-CCl0QwVV.js";import"./access-gate-C5Y4THSz.js";import"./capability-load-error-DcN5DOFH.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const f=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=f.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let p;t[14]!==l.volume||t[15]!==c?(p=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=p):p=t[16];let y;t[17]!==f.label||t[18]!==d||t[19]!==p?(y=s.jsxs("p",{className:d,children:[p," ·"," ",f.label]}),t[17]=f.label,t[18]=d,t[19]=p,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let f;t[3]!==u?(f=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=f):f=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==f||t[10]!==a?(n=s.jsxs("div",{children:[f,a]}),t[9]=f,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,f]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let p;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(p=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=p):p=e[4];const y=p;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let N;e[16]!==b||e[17]!==t?(N=b.length===0?s.jsx(Ye,{onAdd:()=>f(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>f(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=N):N=e[18];let D;e[19]!==t?(D=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=D):D=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{f(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==D?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:f,title:D,onImportComplete:se}),e[22]=u,e[23]=D,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const fe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const pe=m?.volume??"";let q;e[71]!==t||e[72]!==pe?(q=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(Ne,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(De,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==fe||e[99]!==X?(Z=s.jsx(Pe,{open:fe,onOpenChange:oe,children:X}),e[98]=fe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==N||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,N,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=N,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function qt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{qt as default};
@@ -1 +1 @@
1
- import{c as w,b as S,j as l,B as C,r as I,I as E}from"./index-fZpMDfe6.js";import{b as L,h as N,a as O,d as k,e as R}from"./dialog-BVOhf6JL.js";import{i as U}from"./Check-CFdAuLVR.js";import{a as $}from"./Copy01-CKmyRUyl.js";import{n as W}from"./Download01-DZdiDQUS.js";const M="https://github.com/decocms/studio/releases";function F(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function P(e){return`https://github.com/decocms/studio/releases/download/native-v${e}/deco-${e}-linux-x86_64.AppImage`}function le(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function B(){return typeof navigator<"u"&&/Linux/.test(navigator.platform)&&!/Android/.test(navigator.userAgent)&&!("ontouchend"in document)}async function V(e,t){if(!e)return!1;try{return await e.writeText(t),!0}catch{return!1}}function D(e){const t=w.c(12),{copiedLabel:n}=e,s=S(),[r,i]=I.useState(!1);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=F(),t[0]=c):c=t[0];const o=c;let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:o}),t[1]=a):a=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{V(navigator.clipboard,o).then(p=>{p&&(i(!0),setTimeout(()=>i(!1),2e3))})},t[2]=u):u=t[2];let d;t[3]!==r?(d=r?l.jsx(U,{size:16}):l.jsx($,{size:16}),t[3]=r,t[4]=d):d=t[4];let f;t[5]!==r||t[6]!==n||t[7]!==s?(f=r?n:s("downloadApp.copyLabel"),t[5]=r,t[6]=n,t[7]=s,t[8]=f):f=t[8];let m;return t[9]!==d||t[10]!==f?(m=l.jsxs("div",{className:"flex flex-col gap-3",children:[a,l.jsxs(C,{type:"button",className:"w-full gap-2",onClick:u,children:[d,f]})]}),t[9]=d,t[10]=f,t[11]=m):m=t[11],m}function Y(){const e=w.c(18),t=S();let n;e[0]!==t?(n=t("downloadApp.copiedLabel"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=l.jsx(D,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let r;e[4]!==t?(r=t("downloadApp.terminalHint"),e[4]=t,e[5]=r):r=e[5];let i;e[6]!==r?(i=l.jsx("p",{children:r}),e[6]=r,e[7]=i):i=e[7];let c;e[8]!==t?(c=t("downloadApp.appleSiliconNote"),e[8]=t,e[9]=c):c=e[9];let o;e[10]!==c?(o=l.jsx("p",{children:c}),e[10]=c,e[11]=o):o=e[11];let a;e[12]!==i||e[13]!==o?(a=l.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[i,o]}),e[12]=i,e[13]=o,e[14]=a):a=e[14];let u;return e[15]!==s||e[16]!==a?(u=l.jsxs(l.Fragment,{children:[s,a]}),e[15]=s,e[16]=a,e[17]=u):u=e[17],u}function H(){const e=w.c(42),t=S();let n;e[0]!==t?(n=t("downloadApp.copiedLabelLinux"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=l.jsx(D,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let r;e[4]!==t?(r=t("downloadApp.linuxInstallerHint"),e[4]=t,e[5]=r):r=e[5];let i;e[6]!==r?(i=l.jsx("p",{children:r}),e[6]=r,e[7]=i):i=e[7];let c;e[8]!==t?(c=t("downloadApp.linuxArchNote"),e[8]=t,e[9]=c):c=e[9];let o;e[10]!==c?(o=l.jsx("p",{children:c}),e[10]=c,e[11]=o):o=e[11];let a;e[12]!==i||e[13]!==o?(a=l.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[i,o]}),e[12]=i,e[13]=o,e[14]=a):a=e[14];let u;e[15]!==t?(u=t("downloadApp.linuxDirectDownloadHint"),e[15]=t,e[16]=u):u=e[16];let d;e[17]!==u?(d=l.jsx("p",{children:u}),e[17]=u,e[18]=d):d=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=P("4.263.2"),e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(W,{size:14}),e[20]=m):m=e[20];let p;e[21]!==t?(p=t("downloadApp.downloadAppImage"),e[21]=t,e[22]=p):p=e[22];let h;e[23]!==p?(h=l.jsx(C,{asChild:!0,variant:"outline",size:"sm",className:"gap-2",children:l.jsxs("a",{href:f,rel:"noreferrer",children:[m,p]})}),e[23]=p,e[24]=h):h=e[24];let g;e[25]!==t?(g=t("downloadApp.linuxChmodHint"),e[25]=t,e[26]=g):g=e[26];let x;e[27]!==g?(x=l.jsx("p",{children:g}),e[27]=g,e[28]=x):x=e[28];let A;e[29]!==t?(A=t("downloadApp.allReleases"),e[29]=t,e[30]=A):A=e[30];let y;e[31]!==A?(y=l.jsx("a",{href:M,target:"_blank",rel:"noreferrer",className:"underline-offset-2 hover:text-foreground hover:underline",children:A}),e[31]=A,e[32]=y):y=e[32];let T;e[33]!==h||e[34]!==x||e[35]!==y||e[36]!==d?(T=l.jsxs("div",{className:"flex flex-col items-start gap-2 border-t pt-4 text-xs text-muted-foreground",children:[d,h,x,y]}),e[33]=h,e[34]=x,e[35]=y,e[36]=d,e[37]=T):T=e[37];let b;return e[38]!==s||e[39]!==T||e[40]!==a?(b=l.jsxs(l.Fragment,{children:[s,a,T]}),e[38]=s,e[39]=T,e[40]=a,e[41]=b):b=e[41],b}function oe(e){const t=w.c(19),{open:n,onOpenChange:s}=e,r=S();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=B(),t[0]=i):i=t[0];const c=i;let o;t[1]!==r?(o=r("downloadApp.title"),t[1]=r,t[2]=o):o=t[2];let a;t[3]!==o?(a=l.jsx(L,{children:o}),t[3]=o,t[4]=a):a=t[4];let u;t[5]!==r?(u=r(c?"downloadApp.linuxDescription":"downloadApp.description"),t[5]=r,t[6]=u):u=t[6];let d;t[7]!==u?(d=l.jsx(N,{children:u}),t[7]=u,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==d?(f=l.jsxs(O,{children:[a,d]}),t[9]=a,t[10]=d,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=c?l.jsx(H,{}):l.jsx(Y,{}),t[12]=m):m=t[12];let p;t[13]!==f?(p=l.jsxs(k,{className:"sm:max-w-md",children:[f,m]}),t[13]=f,t[14]=p):p=t[14];let h;return t[15]!==s||t[16]!==n||t[17]!==p?(h=l.jsx(R,{open:n,onOpenChange:s,children:p}),t[15]=s,t[16]=n,t[17]=p,t[18]=h):h=t[18],h}const z=1e4,ae="true",j=2;function v(e,t){return E.chatAutosend(e,t)}function G(e){return e==="pending"||e==="sending"}function J(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let s=0;n.status==="sending"?s=n.retryAt===void 0?1:j:n.retryAt!==void 0&&(s=1);const r=n.attempt===void 0?s:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!G(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>j?null:{...t,attempt:r}}function ce(e,t,n,s,r=Date.now()){const i={message:s,createdAt:r,status:"pending",attempt:0};return e.setItem(v(t,n),JSON.stringify(i)),i}function X(e,t,n){const s=v(t,n),r=J(e.getItem(s));return r||(e.removeItem(s),null)}function ue(e,t,n,s=Date.now()){const r=v(t,n),i=X(e,t,n);if(!i||i.status!=="pending")return null;if(i.attempt>=j)return e.removeItem(r),null;const c=i.retryAt??i.createdAt;if(s-c>=z)return e.removeItem(r),null;const o={...i,status:"sending",attempt:i.attempt+1};return e.setItem(r,JSON.stringify(o)),{message:o.message,createdAt:o.createdAt,attempt:o.attempt}}function de(e,t,n){e.removeItem(v(t,n))}function K(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function q(e,t){return`app:${e}:${t}`}function fe(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const s=t.slice(0,n),r=t.slice(n+1);return!s||!r?null:{connectionId:s,toolName:r}}function pe(e){return`deck:${encodeURIComponent(e)}`}function me(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function he(e){return`file:${encodeURIComponent(e)}`}function ge(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function xe(e){return`library-file:${encodeURIComponent(e)}`}function Ae(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function ye(e){return`code:${encodeURIComponent(e)}`}function Te(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const Q=["overview","settings","automations","preview","code","content","assets","git"],Z=new Set(Q),be=new Set(["board","files","connect-sources","reports"]);function we(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const _=new Set(["instructions","connections","layout","settings"]);function Se(e){return!!e&&_.has(e)}function ee(e){const t=e?.defaultMainView??null;if(!t||_.has(t.type))return"settings";if(Z.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return q(t.id,t.toolName);const n=e?.tabs?.map(s=>s.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function ve(e){const t=e.mainParam===0?"0":e.mainParam,n=ee(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const s=e.metadata?.defaultMainView??null;return{mainOpen:!(s==null||s.type==="chat"),activeTab:n}}return _.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function je(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function _e(e){return e.mainOpen?e.activeTab==="automations"?!0:K(e.activeTab)!==null:!1}function Ce(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{ae as A,oe as D,Q as F,be as O,B as a,ve as b,ge as c,me as d,Ae as e,q as f,je as g,ye as h,le as i,xe as j,Se as k,Te as l,fe as m,_e as n,Ce as o,K as p,pe as q,ee as r,he as s,we as t,ue as u,de as v,ce as w};
1
+ import{c as w,b as S,j as l,B as C,r as I,I as E}from"./index-DS_PtpmP.js";import{b as L,h as N,a as O,d as k,e as R}from"./dialog-CLVbCjMu.js";import{i as U}from"./Check-7fxTQqwV.js";import{a as $}from"./Copy01-0rsYyxBd.js";import{n as W}from"./Download01-B_W2m-uX.js";const M="https://github.com/decocms/studio/releases";function F(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function P(e){return`https://github.com/decocms/studio/releases/download/native-v${e}/deco-${e}-linux-x86_64.AppImage`}function le(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function B(){return typeof navigator<"u"&&/Linux/.test(navigator.platform)&&!/Android/.test(navigator.userAgent)&&!("ontouchend"in document)}async function V(e,t){if(!e)return!1;try{return await e.writeText(t),!0}catch{return!1}}function D(e){const t=w.c(12),{copiedLabel:n}=e,s=S(),[r,i]=I.useState(!1);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=F(),t[0]=c):c=t[0];const o=c;let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:o}),t[1]=a):a=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{V(navigator.clipboard,o).then(p=>{p&&(i(!0),setTimeout(()=>i(!1),2e3))})},t[2]=u):u=t[2];let d;t[3]!==r?(d=r?l.jsx(U,{size:16}):l.jsx($,{size:16}),t[3]=r,t[4]=d):d=t[4];let f;t[5]!==r||t[6]!==n||t[7]!==s?(f=r?n:s("downloadApp.copyLabel"),t[5]=r,t[6]=n,t[7]=s,t[8]=f):f=t[8];let m;return t[9]!==d||t[10]!==f?(m=l.jsxs("div",{className:"flex flex-col gap-3",children:[a,l.jsxs(C,{type:"button",className:"w-full gap-2",onClick:u,children:[d,f]})]}),t[9]=d,t[10]=f,t[11]=m):m=t[11],m}function Y(){const e=w.c(18),t=S();let n;e[0]!==t?(n=t("downloadApp.copiedLabel"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=l.jsx(D,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let r;e[4]!==t?(r=t("downloadApp.terminalHint"),e[4]=t,e[5]=r):r=e[5];let i;e[6]!==r?(i=l.jsx("p",{children:r}),e[6]=r,e[7]=i):i=e[7];let c;e[8]!==t?(c=t("downloadApp.appleSiliconNote"),e[8]=t,e[9]=c):c=e[9];let o;e[10]!==c?(o=l.jsx("p",{children:c}),e[10]=c,e[11]=o):o=e[11];let a;e[12]!==i||e[13]!==o?(a=l.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[i,o]}),e[12]=i,e[13]=o,e[14]=a):a=e[14];let u;return e[15]!==s||e[16]!==a?(u=l.jsxs(l.Fragment,{children:[s,a]}),e[15]=s,e[16]=a,e[17]=u):u=e[17],u}function H(){const e=w.c(42),t=S();let n;e[0]!==t?(n=t("downloadApp.copiedLabelLinux"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=l.jsx(D,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let r;e[4]!==t?(r=t("downloadApp.linuxInstallerHint"),e[4]=t,e[5]=r):r=e[5];let i;e[6]!==r?(i=l.jsx("p",{children:r}),e[6]=r,e[7]=i):i=e[7];let c;e[8]!==t?(c=t("downloadApp.linuxArchNote"),e[8]=t,e[9]=c):c=e[9];let o;e[10]!==c?(o=l.jsx("p",{children:c}),e[10]=c,e[11]=o):o=e[11];let a;e[12]!==i||e[13]!==o?(a=l.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[i,o]}),e[12]=i,e[13]=o,e[14]=a):a=e[14];let u;e[15]!==t?(u=t("downloadApp.linuxDirectDownloadHint"),e[15]=t,e[16]=u):u=e[16];let d;e[17]!==u?(d=l.jsx("p",{children:u}),e[17]=u,e[18]=d):d=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=P("4.263.3"),e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(W,{size:14}),e[20]=m):m=e[20];let p;e[21]!==t?(p=t("downloadApp.downloadAppImage"),e[21]=t,e[22]=p):p=e[22];let h;e[23]!==p?(h=l.jsx(C,{asChild:!0,variant:"outline",size:"sm",className:"gap-2",children:l.jsxs("a",{href:f,rel:"noreferrer",children:[m,p]})}),e[23]=p,e[24]=h):h=e[24];let g;e[25]!==t?(g=t("downloadApp.linuxChmodHint"),e[25]=t,e[26]=g):g=e[26];let x;e[27]!==g?(x=l.jsx("p",{children:g}),e[27]=g,e[28]=x):x=e[28];let A;e[29]!==t?(A=t("downloadApp.allReleases"),e[29]=t,e[30]=A):A=e[30];let y;e[31]!==A?(y=l.jsx("a",{href:M,target:"_blank",rel:"noreferrer",className:"underline-offset-2 hover:text-foreground hover:underline",children:A}),e[31]=A,e[32]=y):y=e[32];let T;e[33]!==h||e[34]!==x||e[35]!==y||e[36]!==d?(T=l.jsxs("div",{className:"flex flex-col items-start gap-2 border-t pt-4 text-xs text-muted-foreground",children:[d,h,x,y]}),e[33]=h,e[34]=x,e[35]=y,e[36]=d,e[37]=T):T=e[37];let b;return e[38]!==s||e[39]!==T||e[40]!==a?(b=l.jsxs(l.Fragment,{children:[s,a,T]}),e[38]=s,e[39]=T,e[40]=a,e[41]=b):b=e[41],b}function oe(e){const t=w.c(19),{open:n,onOpenChange:s}=e,r=S();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=B(),t[0]=i):i=t[0];const c=i;let o;t[1]!==r?(o=r("downloadApp.title"),t[1]=r,t[2]=o):o=t[2];let a;t[3]!==o?(a=l.jsx(L,{children:o}),t[3]=o,t[4]=a):a=t[4];let u;t[5]!==r?(u=r(c?"downloadApp.linuxDescription":"downloadApp.description"),t[5]=r,t[6]=u):u=t[6];let d;t[7]!==u?(d=l.jsx(N,{children:u}),t[7]=u,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==d?(f=l.jsxs(O,{children:[a,d]}),t[9]=a,t[10]=d,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=c?l.jsx(H,{}):l.jsx(Y,{}),t[12]=m):m=t[12];let p;t[13]!==f?(p=l.jsxs(k,{className:"sm:max-w-md",children:[f,m]}),t[13]=f,t[14]=p):p=t[14];let h;return t[15]!==s||t[16]!==n||t[17]!==p?(h=l.jsx(R,{open:n,onOpenChange:s,children:p}),t[15]=s,t[16]=n,t[17]=p,t[18]=h):h=t[18],h}const z=1e4,ae="true",j=2;function v(e,t){return E.chatAutosend(e,t)}function G(e){return e==="pending"||e==="sending"}function J(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let s=0;n.status==="sending"?s=n.retryAt===void 0?1:j:n.retryAt!==void 0&&(s=1);const r=n.attempt===void 0?s:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!G(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>j?null:{...t,attempt:r}}function ce(e,t,n,s,r=Date.now()){const i={message:s,createdAt:r,status:"pending",attempt:0};return e.setItem(v(t,n),JSON.stringify(i)),i}function X(e,t,n){const s=v(t,n),r=J(e.getItem(s));return r||(e.removeItem(s),null)}function ue(e,t,n,s=Date.now()){const r=v(t,n),i=X(e,t,n);if(!i||i.status!=="pending")return null;if(i.attempt>=j)return e.removeItem(r),null;const c=i.retryAt??i.createdAt;if(s-c>=z)return e.removeItem(r),null;const o={...i,status:"sending",attempt:i.attempt+1};return e.setItem(r,JSON.stringify(o)),{message:o.message,createdAt:o.createdAt,attempt:o.attempt}}function de(e,t,n){e.removeItem(v(t,n))}function K(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function q(e,t){return`app:${e}:${t}`}function fe(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const s=t.slice(0,n),r=t.slice(n+1);return!s||!r?null:{connectionId:s,toolName:r}}function pe(e){return`deck:${encodeURIComponent(e)}`}function me(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function he(e){return`file:${encodeURIComponent(e)}`}function ge(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function xe(e){return`library-file:${encodeURIComponent(e)}`}function Ae(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function ye(e){return`code:${encodeURIComponent(e)}`}function Te(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const Q=["overview","settings","automations","preview","code","content","assets","git"],Z=new Set(Q),be=new Set(["board","files","connect-sources","reports"]);function we(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const _=new Set(["instructions","connections","layout","settings"]);function Se(e){return!!e&&_.has(e)}function ee(e){const t=e?.defaultMainView??null;if(!t||_.has(t.type))return"settings";if(Z.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return q(t.id,t.toolName);const n=e?.tabs?.map(s=>s.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function ve(e){const t=e.mainParam===0?"0":e.mainParam,n=ee(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const s=e.metadata?.defaultMainView??null;return{mainOpen:!(s==null||s.type==="chat"),activeTab:n}}return _.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function je(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function _e(e){return e.mainOpen?e.activeTab==="automations"?!0:K(e.activeTab)!==null:!1}function Ce(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{ae as A,oe as D,Q as F,be as O,B as a,ve as b,ge as c,me as d,Ae as e,q as f,je as g,ye as h,le as i,xe as j,Se as k,Te as l,fe as m,_e as n,Ce as o,K as p,pe as q,ee as r,he as s,we as t,ue as u,de as v,ce as w};