decocms 4.582.0 → 4.583.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (552) hide show
  1. package/dist/client/assets/{AlertCircle-D-4TK36c.js → AlertCircle-BfuEGc37.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CkFdSy1i.js → AreaChart-DR454FhG.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B34wRVvp.js → ArrowLeft-Ccyza8AK.js} +1 -1
  4. package/dist/client/assets/ArrowRight-BfJPk4p9.js +1 -0
  5. package/dist/client/assets/{ArrowUp-Cf_Jm-4W.js → ArrowUp-Cfwuhrfj.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-Cu2i97yZ.js → BookOpen01-vaPiqXWZ.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-gyi9lPG0.js → CartesianChart-Vg3-F_Bi.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-DplIvctj.js → CategoricalChart-gtbFaKuM.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-D-W30b_A.js → CheckCircle-WpYwhp7A.js} +1 -1
  10. package/dist/client/assets/ChevronDown-Kpzb5_P-.js +1 -0
  11. package/dist/client/assets/{ChevronSelectorVertical-BORaKUYt.js → ChevronSelectorVertical-DNPn4Jhl.js} +1 -1
  12. package/dist/client/assets/ChevronUp-CwLphDxo.js +1 -0
  13. package/dist/client/assets/{CreditCard01-C2QL2326.js → CreditCard01-CDUEuZ6_.js} +1 -1
  14. package/dist/client/assets/Eye-BeTcpGN-.js +1 -0
  15. package/dist/client/assets/File02-D8jC2XAm.js +1 -0
  16. package/dist/client/assets/{Globe04-dU-sELuJ.js → Globe04-CM5K7y4B.js} +1 -1
  17. package/dist/client/assets/Image01-0Jwady1a.js +1 -0
  18. package/dist/client/assets/{Key01-zay6mYZz.js → Key01-Dqvoolzt.js} +1 -1
  19. package/dist/client/assets/LayoutLeft-Nn_BPz0l.js +1 -0
  20. package/dist/client/assets/LinkBroken01-6J7zZ1XX.js +1 -0
  21. package/dist/client/assets/Minimize01-Dylk6LHz.js +1 -0
  22. package/dist/client/assets/{Minus-BikCplhC.js → Minus-BFZz-RWg.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DLndo6aP.js → Monitor01-ZIydqkip.js} +1 -1
  24. package/dist/client/assets/{Play-D_FIXuay.js → Play-CkrBckKV.js} +1 -1
  25. package/dist/client/assets/{Plus-D2V2-fTF.js → Plus-C8Idvwpa.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-BHHh91iS.js → ReferenceLine-2ZGA3m5C.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DUXCcvZJ.js → SearchMd-G9SUUXxg.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-Dak2svm7.js → ShoppingBag01-sbzM0fY9.js} +1 -1
  29. package/dist/client/assets/{Sun-BFXO9tQN.js → Sun-Bvg5JrAI.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-2Pb5aRtq.js → SwitchHorizontal01-BbD-SqO6.js} +1 -1
  31. package/dist/client/assets/Tool01-DOjdBvJ6.js +1 -0
  32. package/dist/client/assets/{Tooltip-D91NYjQw.js → Tooltip-buu7_uLC.js} +1 -1
  33. package/dist/client/assets/{Trash01-Bu2u0WVA.js → Trash01-BRIjyxCC.js} +1 -1
  34. package/dist/client/assets/TrendUp01-DLgSqdSd.js +1 -0
  35. package/dist/client/assets/{Upload01-mgXAmijc.js → Upload01-Dd-OapHB.js} +1 -1
  36. package/dist/client/assets/UserCheck01-DVOI9Qq6.js +1 -0
  37. package/dist/client/assets/{UserSquare-DE5Uc7_R.js → UserSquare-CRBGeews.js} +1 -1
  38. package/dist/client/assets/{Users01-C3CmvyvK.js → Users01-bZ_S-kH7.js} +1 -1
  39. package/dist/client/assets/{XClose-l5OHkJlr.js → XClose-CWGS9q3D.js} +1 -1
  40. package/dist/client/assets/{Zap-DN6rNQ1C.js → Zap-BxaAY56U.js} +1 -1
  41. package/dist/client/assets/{access-gate-CLxhnjg9.js → access-gate-BpukTmFQ.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-ZYFX175e.js → add-connection-dialog-BfsrivZp.js} +1 -1
  43. package/dist/client/assets/agent-app-ZmiqpLI8.js +1 -0
  44. package/dist/client/assets/agent-assets-CxDlSc-F.js +1 -0
  45. package/dist/client/assets/agent-automation-Cvq2MsBo.js +20 -0
  46. package/dist/client/assets/agent-automations-DqPMEPTu.js +1 -0
  47. package/dist/client/assets/agent-blog-CBUzxo-R.js +2 -0
  48. package/dist/client/assets/agent-blog-post-Bi0pzlIG.js +2 -0
  49. package/dist/client/assets/agent-calendar-D817wzif.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-DWTuevMP.js → agent-capabilities-COfZW6Pr.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-DEAtqQDn.js +1 -0
  52. package/dist/client/assets/agent-deck-DLJ_JEHY.js +1 -0
  53. package/dist/client/assets/agent-e2e-B_mxpyua.js +1 -0
  54. package/dist/client/assets/agent-experiments-CC4vS2Ak.js +1 -0
  55. package/dist/client/assets/agent-file-DaY3pEIy.js +1 -0
  56. package/dist/client/assets/agent-hosting-CNynwqai.js +1 -0
  57. package/dist/client/assets/agent-icon-DE4TWlDl.js +1 -0
  58. package/dist/client/assets/agent-library-53yJ_N0C.js +1 -0
  59. package/dist/client/assets/agent-library-file-CmdRdcgJ.js +1 -0
  60. package/dist/client/assets/agent-overview-Bjahi54k.js +1 -0
  61. package/dist/client/assets/agent-releases-De-C-EMX.js +2 -0
  62. package/dist/client/assets/agent-settings-Bmfo6yEF.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-LnCUJUlb.js → agent-site-editor-B5E5lU9u.js} +2 -2
  64. package/dist/client/assets/agent-site-editor-code-BzQzaZAE.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-D03NaTwn.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-wStmeJD1.js +1 -0
  67. package/dist/client/assets/agent-view-Dh2W4gDj.js +1 -0
  68. package/dist/client/assets/agent-view-guard-25E2XJRr.js +1 -0
  69. package/dist/client/assets/ai-providers-E4UhWu6J.js +1 -0
  70. package/dist/client/assets/{alert-I1_CrCmh.js → alert-GV95Dsn9.js} +1 -1
  71. package/dist/client/assets/analytics-sections-C9-8NbQC.js +1 -0
  72. package/dist/client/assets/api-keys-BU9wHAPs.js +1 -0
  73. package/dist/client/assets/api-keys-C8ArQ5p_.js +1 -0
  74. package/dist/client/assets/app-editor-kEra9PRa.js +1 -0
  75. package/dist/client/assets/{asset-utils-B-KuVMuY.js → asset-utils-DWvcPbEZ.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-DXrxcWBf.js → auth-catchall-Dy37bIqg.js} +1 -1
  77. package/dist/client/assets/{auth-entry-NtnP78Ol.js → auth-entry-BHlmJEBv.js} +1 -1
  78. package/dist/client/assets/{auth-Dh-2aYdX.js → auth-gL3R1YGn.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-FNYje5VL.js → auth-split-layout-ckQyQHcL.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-DOEkiQ_u.js → authenticate-and-persist-oauth-C7oT67KU.js} +1 -1
  81. package/dist/client/assets/automation-list-row-DriFJJzl.js +1 -0
  82. package/dist/client/assets/{automation-runs-C2quHBYd.js → automation-runs-C37do2Pw.js} +1 -1
  83. package/dist/client/assets/automations-tDs_UhVP.js +1 -0
  84. package/dist/client/assets/{badge-BGmWPELn.js → badge-BG-k6t3T.js} +1 -1
  85. package/dist/client/assets/{block-document-CuBMSVVn.js → block-document-pPtike34.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-MbfgZRXf.js → blocks-preview-workspace-context-BBjk2tme.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-DdvH_zgH.js → blocks-tab-states-GP0NCNYs.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-BoKhflQE.js → blog-preview-url-CwSXxQWr.js} +1 -1
  89. package/dist/client/assets/blog-schema-DOB707mb.js +1 -0
  90. package/dist/client/assets/{blog-source-gate-ChrbmkH2.js → blog-source-gate-3rG_0gJI.js} +1 -1
  91. package/dist/client/assets/blog-view-gate-Be4DtolQ.js +1 -0
  92. package/dist/client/assets/buckets-BZrhNTRn.js +1 -0
  93. package/dist/client/assets/{build-improve-prompt-doc-ZkNhFh73.js → build-improve-prompt-doc-DVbQXrhG.js} +1 -1
  94. package/dist/client/assets/calendar-CcuaFZRF.js +1 -0
  95. package/dist/client/assets/{capability-load-error-CmORVXZR.js → capability-load-error-Bcs21XUc.js} +1 -1
  96. package/dist/client/assets/category-editor-CnJqxifY.js +1 -0
  97. package/dist/client/assets/{category-tree-ArvPlYX5.js → category-tree-D2ejZxYL.js} +1 -1
  98. package/dist/client/assets/{chart-q3aX-DjJ.js → chart-B2B-jcI-.js} +1 -1
  99. package/dist/client/assets/chat-context-CiT7AzBS.js +43 -0
  100. package/dist/client/assets/{chat-draft-BsgbOfj3.js → chat-draft-BNZV2YjB.js} +1 -1
  101. package/dist/client/assets/{checkbox-JFndFNuZ.js → checkbox-DSC8VbDf.js} +1 -1
  102. package/dist/client/assets/choose-editor-uAW7DjQg.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-CTMmXIbK.js → cli-auth-success-B897Xynp.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-B4pAxgqZ.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-Cp0f_S-1.js → cms-store-drafts-CtClpzKs.js} +1 -1
  106. package/dist/client/assets/{collapsible-B4lmmxiu.js → collapsible-DrV9qsGN.js} +1 -1
  107. package/dist/client/assets/collection-detail-DucMHrT0.js +1 -0
  108. package/dist/client/assets/{collection-display-button-L-gJFCO8.js → collection-display-button-BHyM7wC2.js} +1 -1
  109. package/dist/client/assets/{collection-search-j-a5PWZI.js → collection-search-BbCHAL7t.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-BbdjpVWW.js → collection-table-wrapper-BlLHObjj.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-DHj6Urx3.js → collection-tabs-BXeEDC1Y.js} +1 -1
  112. package/dist/client/assets/{combobox-CBPCAqF_.js → combobox-DugO3-8Q.js} +1 -1
  113. package/dist/client/assets/{command-DCUf4RGf.js → command-Bo6EGcaE.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-C-0h9QLB.js → companion-mcps-section-CsXLIG2Z.js} +1 -1
  115. package/dist/client/assets/config-CdVwRL_a.js +1 -0
  116. package/dist/client/assets/{client-icons-CvP_xTjP.js → connect-key--cfk-fLm.js} +1 -1
  117. package/dist/client/assets/{connect-layout-BiGf7x_Q.js → connect-layout-BPppRISp.js} +1 -1
  118. package/dist/client/assets/connect-lufub1FU.js +9 -0
  119. package/dist/client/assets/{connect-source-dialog-C9cU78Fo.js → connect-source-dialog-CfsFTEbG.js} +1 -1
  120. package/dist/client/assets/{connection-CG7u8AbM.js → connection-BLQs5hMz.js} +1 -1
  121. package/dist/client/assets/{connection-card-C5XxA3Cv.js → connection-card-vLs08dR6.js} +1 -1
  122. package/dist/client/assets/connection-detail-CLkPYY1x.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-B2Vjms_B.js → connection-form-helpers-BSIh8Ep0.js} +1 -1
  124. package/dist/client/assets/connection-slug-CmPPcsjf.js +1 -0
  125. package/dist/client/assets/connections-C4ZbA0RY.js +1 -0
  126. package/dist/client/assets/{content-tab-Ct80gvFF.js → content-tab-C-pzFX10.js} +4 -4
  127. package/dist/client/assets/context-3bSluoDN.js +1 -0
  128. package/dist/client/assets/{context-menu-B7ywEyjT.js → context-menu-CzIORBDb.js} +1 -1
  129. package/dist/client/assets/{context-shell-C6vXZZrB.js → context-shell-3lL8N_R5.js} +4 -4
  130. package/dist/client/assets/{create-organization-dialog-CfD4gWck.js → create-organization-dialog-k086v-9Q.js} +1 -1
  131. package/dist/client/assets/daily-pulse-P6H0d8QI.js +1 -0
  132. package/dist/client/assets/{delete-copy-CPJVDDbB.js → delete-copy-BQaedVkX.js} +1 -1
  133. package/dist/client/assets/{device-hint-CwVsFX34.js → device-hint-CvnqGHIy.js} +1 -1
  134. package/dist/client/assets/discover-qzwfuJLu.js +1 -0
  135. package/dist/client/assets/{domain-settings-Dgpsy8Ru.js → domain-settings-y3u2iu2W.js} +1 -1
  136. package/dist/client/assets/{drawer-DRyRdlMw.js → drawer-CarQd6Jb.js} +1 -1
  137. package/dist/client/assets/{editor-FceeQfS7.js → editor-DYk_2MJQ.js} +1 -1
  138. package/dist/client/assets/{editor-classes-D9FopdtJ.js → editor-classes-DVIoQu74.js} +1 -1
  139. package/dist/client/assets/{empty-message-ILKuHEfQ.js → empty-message-C90DlePv.js} +1 -1
  140. package/dist/client/assets/{empty-state-BmCMJHsS.js → empty-state-B67nwURy.js} +1 -1
  141. package/dist/client/assets/{empty-state-GIO1CyUk.js → empty-state-XAK3RjVy.js} +1 -1
  142. package/dist/client/assets/experiments-tab-choice-D8ZqCESL.js +1 -0
  143. package/dist/client/assets/{extract-connection-data-BKW6jN3t.js → extract-connection-data-D6CjTXbp.js} +1 -1
  144. package/dist/client/assets/feature-gate-CCvZeJRu.js +1 -0
  145. package/dist/client/assets/{feature-paywall-DrXSdvNQ.js → feature-paywall-DzmzZ5s3.js} +1 -1
  146. package/dist/client/assets/file-explorer-BqxAkXtr.js +2 -0
  147. package/dist/client/assets/{file-preview-mmsBTOqH.js → file-preview-C0yEEExh.js} +1 -1
  148. package/dist/client/assets/file-share-button-CowSSkLB.js +3 -0
  149. package/dist/client/assets/{file-type-icon-CLz3IVP9.js → file-type-icon-CEP8k4gh.js} +1 -1
  150. package/dist/client/assets/folder-icon-CmtFeppJ.js +1 -0
  151. package/dist/client/assets/{form-B_7ux469.js → form-8GAe5FIZ.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-BFx5wDUC.js → frame-navigation-BpI5RQJq.js} +1 -1
  153. package/dist/client/assets/gateway-client-BqPME1T5.js +1 -0
  154. package/dist/client/assets/general-DbhKzHt5.js +1 -0
  155. package/dist/client/assets/{github-icon-1x8ZI6aO.js → github-icon-BH4kK9If.js} +1 -1
  156. package/dist/client/assets/{held-block-view-CwWI05W1.js → held-block-view-MI6LUwjK.js} +3 -3
  157. package/dist/client/assets/home-_NmLJi-9.js +1 -0
  158. package/dist/client/assets/home-overview-CTEEkh3w.js +1 -0
  159. package/dist/client/assets/{hosted-reconcile-J9x487tr.js → hosted-reconcile-BbIfIwl1.js} +1 -1
  160. package/dist/client/assets/{icon-button-DoWTRkdN.js → icon-button-Dd8gTd4-.js} +1 -1
  161. package/dist/client/assets/index-B-OtHlgY.js +4 -0
  162. package/dist/client/assets/{index-CITQS6NN.js → index-BRHz7VD8.js} +1 -1
  163. package/dist/client/assets/{index-BWer9hfc.js → index-BY10zRfl.js} +1 -1
  164. package/dist/client/assets/index-B_-z8Lrt.js +1 -0
  165. package/dist/client/assets/{index-CFoO-AVG.js → index-C17JTAPe.js} +2 -2
  166. package/dist/client/assets/{index-249EXZ6B.js → index-CADsC-mK.js} +2 -2
  167. package/dist/client/assets/{index-rmNLmONI.js → index-CYjM_f4V.js} +1 -1
  168. package/dist/client/assets/{index-BcW9W_hK.js → index-CZQ-Wgjf.js} +1 -1
  169. package/dist/client/assets/{index-D9wygnbU.js → index-CwntHk8S.js} +13 -13
  170. package/dist/client/assets/index-DClpdtOI.js +1 -0
  171. package/dist/client/assets/{index-3FmhyOXc.js → index-DEOQXzn-.js} +1 -1
  172. package/dist/client/assets/{index-BW4kEj0q.js → index-DIHnNoyA.js} +1 -1
  173. package/dist/client/assets/{index-DpIy5MwJ.js → index-DPCC7KEx.js} +1 -1
  174. package/dist/client/assets/{index-OqiiY1Yn.js → index-Dez-6rcd.js} +1 -1
  175. package/dist/client/assets/index-Dkr4Q9bE.js +1 -0
  176. package/dist/client/assets/{index-mxlRzmxc.js → index-Do3hK3is.js} +1 -1
  177. package/dist/client/assets/{index-B-Ig6PCZ.js → index-km18CQ4q.js} +1 -1
  178. package/dist/client/assets/index-pbgcO64n.css +1 -0
  179. package/dist/client/assets/{index-redirect-CJIC9mkE.js → index-redirect-CTR6WNPG.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-oJohchTM.js → infiniteQueryObserver-DdeQTeaz.js} +1 -1
  181. package/dist/client/assets/infra-billing-tXzfTwHJ.js +1 -0
  182. package/dist/client/assets/input-CxFJosPu.js +17 -0
  183. package/dist/client/assets/{input-BKW9wk8M.js → input-DXyNd1dE.js} +1 -1
  184. package/dist/client/assets/{integration-icon-BPaLmZuD.js → integration-icon-BCAGJ22m.js} +1 -1
  185. package/dist/client/assets/item-actions-B4f3ZYnI.js +1 -0
  186. package/dist/client/assets/{jira-icon-DjiAFXC-.js → jira-icon-B0PrtQPW.js} +1 -1
  187. package/dist/client/assets/{label-CzgbmbQw.js → label-BFX3DXnu.js} +1 -1
  188. package/dist/client/assets/{layout-CUqOdrCT.js → layout-GEd6141D.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-D_Hj5ND0.js → legacy-admin-welcome-dialog-CjbAHNU0.js} +1 -1
  190. package/dist/client/assets/legacy-agents-deep-BRMRDtxS.js +1 -0
  191. package/dist/client/assets/{legacy-main-redirect-DS2vLtmG.js → legacy-main-redirect-Cpcnm12P.js} +1 -1
  192. package/dist/client/assets/library-GlSV21no.js +1 -0
  193. package/dist/client/assets/{library-tab-CH65a0_i.js → library-tab-DiZQg1qQ.js} +2 -2
  194. package/dist/client/assets/{login-BB30sN9A.js → login-DUNIcOhP.js} +1 -1
  195. package/dist/client/assets/{markdown-Ck8Lzm4U.js → markdown-sWsq0zMA.js} +5 -5
  196. package/dist/client/assets/{mcp-app-renderer-Bo8RWBFo.js → mcp-app-renderer-DSMzeo3v.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-D2OwpRg0.js → mcp-oauth-Cal4irlG.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-3agwb6e9.js → mcp-oauth-DFWIYz5V.js} +1 -1
  199. package/dist/client/assets/members-D9DcuyAK.js +1 -0
  200. package/dist/client/assets/memory-DYN3365K.js +7 -0
  201. package/dist/client/assets/mock-board-llSJ1DSL.js +10 -0
  202. package/dist/client/assets/{monaco-editor-Dfffv6IO.js → monaco-editor-4_N5zBDQ.js} +1 -1
  203. package/dist/client/assets/{monitoring-CHShsrek.js → monitoring-5YgUKCBd.js} +2 -2
  204. package/dist/client/assets/{monitoring-stats-row-D7LX-cE_.js → monitoring-stats-row-BCaHkQz9.js} +1 -1
  205. package/dist/client/assets/multi-select-B4K-daTY.js +1 -0
  206. package/dist/client/assets/{mustache-DTIKPLCX.js → mustache-B8t03rZ4.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-DvAWHM_a.js → named-rule-step-P0BFUtVs.js} +1 -1
  208. package/dist/client/assets/named-rule-view-CvRYAekO.js +1 -0
  209. package/dist/client/assets/new-project-dialog-DI67z-Vr.js +1 -0
  210. package/dist/client/assets/new-project-store-DoliA5Iq.js +1 -0
  211. package/dist/client/assets/{oauth-callback-BAHxkyHL.js → oauth-callback-DtdbhW3N.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-0HSc9az8.js → oauth-callback-ai-provider-iNwVQAC1.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-B6XJ_dp8.js → oauth-consent-Co0jE424.js} +1 -1
  214. package/dist/client/assets/{onboarding-CpC02gHH.js → onboarding-Dn4ndntc.js} +1 -1
  215. package/dist/client/assets/openai-conversation-D43N7JcR.js +3 -0
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DEmaeFuw.js → optimistic-project-sidebar-views-PUKP14F8.js} +1 -1
  217. package/dist/client/assets/order-monitor-day-fHekYy64.js +1 -0
  218. package/dist/client/assets/{organization-choice-DJG3VWvN.js → organization-choice-Ctd80SL2.js} +1 -1
  219. package/dist/client/assets/orgs-BQeWnD4l.js +1 -0
  220. package/dist/client/assets/own-accounts-section-CwzdBIu0.js +1 -0
  221. package/dist/client/assets/pair-Du2wOAPA.js +48 -0
  222. package/dist/client/assets/{parse-sections-C45nXdFm.js → parse-sections-DUEfhNb0.js} +4 -4
  223. package/dist/client/assets/plan-BDh0er6r.js +1 -0
  224. package/dist/client/assets/{plan-ladder-ClYEg_1y.js → plan-ladder-cJHOFEt_.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-DmepxGNe.js → plan-usage-card-DnCWaNBs.js} +1 -1
  226. package/dist/client/assets/{popover-DbdL41A-.js → popover-XZWwzjJe.js} +1 -1
  227. package/dist/client/assets/post-calendar-Cq2VElZ4.js +1 -0
  228. package/dist/client/assets/{post-editor-CVR7WxMp.js → post-editor-ChZHYnmE.js} +2 -2
  229. package/dist/client/assets/preview-content-Ct9U0F_F.js +1 -0
  230. package/dist/client/assets/{preview-dialog-CAVf21hW.js → preview-dialog-BlN_MeAY.js} +1 -1
  231. package/dist/client/assets/{preview-panel-DcRdLvZD.js → preview-panel-CMaIBxrS.js} +1 -1
  232. package/dist/client/assets/preview-tab-rp6yyGU1.js +557 -0
  233. package/dist/client/assets/product-picker-dialog-Cp5iroCv.js +1 -0
  234. package/dist/client/assets/profile-BvhSJiAV.js +1 -0
  235. package/dist/client/assets/project-app-view-BPtWGCfo.js +1 -0
  236. package/dist/client/assets/project-apps-CDSLxQ6C.js +1 -0
  237. package/dist/client/assets/{project-icon-D3VravgB.js → project-icon-C_Qws_Ah.js} +1 -1
  238. package/dist/client/assets/{project-index-CZL_Bcej.js → project-index-dmu51Z_5.js} +1 -1
  239. package/dist/client/assets/project-reports-BVUPVqwF.js +1 -0
  240. package/dist/client/assets/project-tasks-i5QwXcB1.js +1 -0
  241. package/dist/client/assets/projects-9cB_xTYP.js +1 -0
  242. package/dist/client/assets/{projects-empty-state-ChOzUybQ.js → projects-empty-state-ZoaV8gjs.js} +1 -1
  243. package/dist/client/assets/{prompts-Cs8yzamL.js → prompts-DfPwtsSz.js} +1 -1
  244. package/dist/client/assets/record-editor-BQX3fl3B.js +1 -0
  245. package/dist/client/assets/redirect-editor-DmgDoBZW.js +1 -0
  246. package/dist/client/assets/{reports-DDPJwQn7.js → reports-B7Mq5ojT.js} +1 -1
  247. package/dist/client/assets/reports-Dmcxcdt8.js +1 -0
  248. package/dist/client/assets/reports-onboarding-DnVjGniS.js +1 -0
  249. package/dist/client/assets/reports-tab-D7WrLBuD.js +2 -0
  250. package/dist/client/assets/repositories-B6qJORdw.js +1 -0
  251. package/dist/client/assets/repositories-CKo-J8oc.js +1 -0
  252. package/dist/client/assets/{repository-binding-C2KfYomQ.js → repository-binding-Cqb4hBI0.js} +1 -1
  253. package/dist/client/assets/{repository-picker-BQc3OAcG.js → repository-picker-B967M4cj.js} +1 -1
  254. package/dist/client/assets/{require-capability-BQcAZUwY.js → require-capability-CnRgBqvn.js} +1 -1
  255. package/dist/client/assets/{required-auth-layout-BszE36jh.js → required-auth-layout-DwZV69de.js} +1 -1
  256. package/dist/client/assets/{reset-password-BVb2l5We.js → reset-password-DBlLRH7P.js} +1 -1
  257. package/dist/client/assets/resizable-Ddu9Pik_.js +1 -0
  258. package/dist/client/assets/resolve-tab-icon-C5v6XuFJ.js +1 -0
  259. package/dist/client/assets/{review-settings-BacW9etz.js → review-settings-_NtVHX9D.js} +1 -1
  260. package/dist/client/assets/{role-color-DUV_b0hq.js → role-color-CYCY1ZHM.js} +1 -1
  261. package/dist/client/assets/roles-BOIysbZW.js +1 -0
  262. package/dist/client/assets/route-B2eUAr3E.js +1 -0
  263. package/dist/client/assets/route-DjNFlT9m.js +1 -0
  264. package/dist/client/assets/route-l3dfZAcw.js +1 -0
  265. package/dist/client/assets/route-page-header-x4fiBRQK.js +1 -0
  266. package/dist/client/assets/{sandbox-git-api-Bxa573Th.js → sandbox-git-api-CX3IYPAX.js} +1 -1
  267. package/dist/client/assets/{sandbox-lifecycle-context-oW4CAFSP.js → sandbox-lifecycle-context-CsmYXarj.js} +1 -1
  268. package/dist/client/assets/save-status-DM-afM9Q.js +1 -0
  269. package/dist/client/assets/{schema-gnANfn26.js → schema-Bh0CFZUA.js} +1 -1
  270. package/dist/client/assets/{schema-DqcJORUD.js → schema-CsGAsuNy.js} +1 -1
  271. package/dist/client/assets/{scroll-area-mLdPDQZk.js → scroll-area-DkuLv9J_.js} +1 -1
  272. package/dist/client/assets/{search-input-DbkaTSNM.js → search-input-Yj0UUhbr.js} +1 -1
  273. package/dist/client/assets/{search-toggle-yUKGBwRs.js → search-toggle-CTqn74j5.js} +1 -1
  274. package/dist/client/assets/{secret-picker-C8Xe_qFX.js → secret-picker-FNSDTzDT.js} +1 -1
  275. package/dist/client/assets/secrets-DnkJAwly.js +1 -0
  276. package/dist/client/assets/{section-array-field-ah4STHLi.js → section-array-field-DbmoEjb3.js} +1 -1
  277. package/dist/client/assets/sections-Bk5O8laV.js +1 -0
  278. package/dist/client/assets/sections-editor-BYa3JqlT.js +1 -0
  279. package/dist/client/assets/select-DqZVtjvu.js +1 -0
  280. package/dist/client/assets/{select-model-CfeDs1cS.js → select-model-D_3F7ch9.js} +1 -1
  281. package/dist/client/assets/{seo-editor-BtwYLJ0f.js → seo-editor-alLFkZ3V.js} +1 -1
  282. package/dist/client/assets/{separator-D7JbMKRF.js → separator-DOH2DVT3.js} +1 -1
  283. package/dist/client/assets/session-runtime-DaEm9VzJ.js +1 -0
  284. package/dist/client/assets/settings-tab-Dnn9Ngte.js +1 -0
  285. package/dist/client/assets/{sheet-mGT77pmX.js → sheet-B3BCtfXu.js} +1 -1
  286. package/dist/client/assets/shell-layout-BMy93BCc.js +1 -0
  287. package/dist/client/assets/{site-draft-actions-BWcvrVJJ.js → site-draft-actions-C2zLtAMz.js} +5 -5
  288. package/dist/client/assets/site-draft-view-ikG8CMuB.js +1 -0
  289. package/dist/client/assets/site-editor-B8VlT5Kv.js +1 -0
  290. package/dist/client/assets/site-editor-toast-GAJZE2A0.js +1 -0
  291. package/dist/client/assets/skills-dIhMA0Ze.js +1 -0
  292. package/dist/client/assets/{slider-_L8nnrvM.js → slider-DirLi5JL.js} +1 -1
  293. package/dist/client/assets/{sortable.esm-Dw4xFH50.js → sortable.esm-B3zbNG6q.js} +1 -1
  294. package/dist/client/assets/sso-tZNmyRgp.js +1 -0
  295. package/dist/client/assets/{suggestion-CV5YiylC.js → suggestion-bCd1m59t.js} +1 -1
  296. package/dist/client/assets/{super-agent-icon-tF39Whlb.js → super-agent-icon-AJ6ZRe5V.js} +1 -1
  297. package/dist/client/assets/{switch-B0tv99B3.js → switch-BviC1co2.js} +1 -1
  298. package/dist/client/assets/{synced-repos-BOeEsDnA.js → synced-repos-DsEdkMaA.js} +1 -1
  299. package/dist/client/assets/{tab-icon-glyph-BgVegBho.js → tab-icon-glyph-DkjrfS6l.js} +1 -1
  300. package/dist/client/assets/{table-CV4RoALe.js → table-DX15DDx1.js} +1 -1
  301. package/dist/client/assets/{tabs-DgvT8Pj5.js → tabs-BiFBpWbA.js} +1 -1
  302. package/dist/client/assets/task-board-DD2iUGL4.js +1 -0
  303. package/dist/client/assets/{core.esm-B-QMfivo.js → task-key-DP7js_2-.js} +2 -2
  304. package/dist/client/assets/task-route-Bfb6XWlb.js +1 -0
  305. package/dist/client/assets/{task-status-B4zkOwKe.js → task-status-CBWakThc.js} +1 -1
  306. package/dist/client/assets/taskboard-analytics-B5XiM0gZ.js +1 -0
  307. package/dist/client/assets/{tasks-B0KKqEdX.js → tasks-BPwrQv5-.js} +3 -3
  308. package/dist/client/assets/tasks-ip1BqsyR.js +1 -0
  309. package/dist/client/assets/{textarea-DM0e8Qi7.js → textarea-BoSVR1xB.js} +1 -1
  310. package/dist/client/assets/thread-analytics-B3wSdPFK.js +1 -0
  311. package/dist/client/assets/thread-button-CIHD7120.js +1 -0
  312. package/dist/client/assets/{thread-intent-CaGJ1BhS.js → thread-intent-DpzwhK2y.js} +6 -6
  313. package/dist/client/assets/thread-route-Bdw4g7Hg.js +1 -0
  314. package/dist/client/assets/thread-route-D4mea9ep.js +1 -0
  315. package/dist/client/assets/thread-sheet-body-C1_HCALD.js +1 -0
  316. package/dist/client/assets/time-range-picker-B9_5lQqT.js +1 -0
  317. package/dist/client/assets/{toggle-group-Cu1mfNzX.js → toggle-group-l7lV2Oqp.js} +1 -1
  318. package/dist/client/assets/{tool-set-selector-CKA5xrb6.js → tool-set-selector-BQISxiF9.js} +1 -1
  319. package/dist/client/assets/{toolbar-icon-button-VHIAKSnc.js → toolbar-icon-button-CflJ2Qid.js} +1 -1
  320. package/dist/client/assets/{tooltip-CVxFMGcO.js → tooltip-BTd3W-2Z.js} +1 -1
  321. package/dist/client/assets/{tooltipContext-BptH8Zj7.js → tooltipContext-De8eALzu.js} +1 -1
  322. package/dist/client/assets/{track-vSgJeDn7.js → track-BBHYiJkY.js} +1 -1
  323. package/dist/client/assets/{types-Bz47I97G.js → types-C8b3acwX.js} +1 -1
  324. package/dist/client/assets/{url-slug-BR0vmMxN.js → url-slug-gNlq1cKV.js} +1 -1
  325. package/dist/client/assets/{usage-stats-Dr1e2NVB.js → usage-stats-Bk_1jh1-.js} +2 -2
  326. package/dist/client/assets/{use-ai-providers-DTX4zdTq.js → use-ai-providers-Cya2RotC.js} +1 -1
  327. package/dist/client/assets/use-api-keys-BdlPKuv4.js +1 -0
  328. package/dist/client/assets/use-apply-named-rule-CcoLpt-_.js +1 -0
  329. package/dist/client/assets/use-ask-in-chat-B_ARVX9A.js +1 -0
  330. package/dist/client/assets/{use-automations-8WbgZhli.js → use-automations-CerQ9Qaj.js} +1 -1
  331. package/dist/client/assets/{use-autosave-rNMlQ4zg.js → use-autosave-CQa7WbXM.js} +1 -1
  332. package/dist/client/assets/use-blocks-v8-project-BedqZgtc.js +1 -0
  333. package/dist/client/assets/use-blog-view-9s3Vkx1q.js +1 -0
  334. package/dist/client/assets/use-chat-layout-state-CWt5k1nY.js +1 -0
  335. package/dist/client/assets/{use-cms-publish-actions-B-aKIQS2.js → use-cms-publish-actions-7QluCfa8.js} +4 -4
  336. package/dist/client/assets/use-connect-companion-B8Oqj7MQ.js +1 -0
  337. package/dist/client/assets/{use-connection-Lv1GX4XO.js → use-connection-2s3z_IKD.js} +1 -1
  338. package/dist/client/assets/{use-content-sync-CSFDJJ2I.js → use-content-sync-DxzP8nN9.js} +1 -1
  339. package/dist/client/assets/{use-copy-B2pKd0TM.js → use-copy-sOY8Yuot.js} +1 -1
  340. package/dist/client/assets/use-current-view-EjRzX02x.js +1 -0
  341. package/dist/client/assets/{use-date-fns-locale-D1sid-Du.js → use-date-fns-locale-DjDbgiCF.js} +1 -1
  342. package/dist/client/assets/{use-debounced-autosave-yF8PgiVs.js → use-debounced-autosave--lHIRoNY.js} +1 -1
  343. package/dist/client/assets/{use-debounced-value-BAQPYGcf.js → use-debounced-value-RJW46-1q.js} +1 -1
  344. package/dist/client/assets/{use-deco-credits-DHv1UkQ9.js → use-deco-credits-d4Nbb0l0.js} +1 -1
  345. package/dist/client/assets/use-decopilot-events-BGpwG8Pb.js +1 -0
  346. package/dist/client/assets/use-delete-block-BR5smTsV.js +1 -0
  347. package/dist/client/assets/{use-delete-connection-TX_vnMiY.js → use-delete-connection-DHkW3H9t.js} +1 -1
  348. package/dist/client/assets/{use-deployment-admin-BTOwWmd_.js → use-deployment-admin-j92yIioi.js} +1 -1
  349. package/dist/client/assets/{use-entitlements-DpylFAUx.js → use-entitlements-DtyegfyM.js} +1 -1
  350. package/dist/client/assets/use-fast-preview-draft-url-B4HFa9pK.js +1 -0
  351. package/dist/client/assets/{use-file-configs-CG-6B_hv.js → use-file-configs-CzyibAGV.js} +1 -1
  352. package/dist/client/assets/{use-id-selection-DufR_IM-.js → use-id-selection-DSQKok9P.js} +1 -1
  353. package/dist/client/assets/use-in-settings-DLJEfljS.js +1 -0
  354. package/dist/client/assets/{use-inbox-feed-C9Mwe9dc.js → use-inbox-feed-BNnBKFlA.js} +1 -1
  355. package/dist/client/assets/{use-infinite-scroll-uPmbLXy7.js → use-infinite-scroll-D1tYrKq7.js} +1 -1
  356. package/dist/client/assets/{use-join-requests-C9270cag.js → use-join-requests-CSjMfH5p.js} +1 -1
  357. package/dist/client/assets/use-main-panel-tabs-CllMGKzI.js +1 -0
  358. package/dist/client/assets/use-mcp-auth-status-DS0pbV57.js +1 -0
  359. package/dist/client/assets/{use-mcp-client-BZnIK-Y4.js → use-mcp-client-Cvc3WWPF.js} +2 -2
  360. package/dist/client/assets/{use-mcp-prompts-Dtbvjt4h.js → use-mcp-prompts-Ck1uv43A.js} +1 -1
  361. package/dist/client/assets/{use-mcp-tools-ubXBMl6b.js → use-mcp-tools-BIzewITl.js} +1 -1
  362. package/dist/client/assets/{use-mobile-C5u1Qie9.js → use-mobile-CG2XwDbe.js} +1 -1
  363. package/dist/client/assets/{use-move-blocks-FpNNMdYb.js → use-move-blocks-Dv6zyDyx.js} +1 -1
  364. package/dist/client/assets/{use-navigate-to-agent-DtRhmnlg.js → use-navigate-to-agent-BFBISUMc.js} +1 -1
  365. package/dist/client/assets/use-never-published-D3zJmakm.js +1 -0
  366. package/dist/client/assets/{use-org-fs-Cd0Vep23.js → use-org-fs-BfE7L8cf.js} +1 -1
  367. package/dist/client/assets/use-org-notice-DghJzmC_.js +1 -0
  368. package/dist/client/assets/{use-org-repo-syncs-SJRy46mf.js → use-org-repo-syncs-CU3MGWk9.js} +1 -1
  369. package/dist/client/assets/{use-org-sso-COBiertF.js → use-org-sso-C8BMUr72.js} +1 -1
  370. package/dist/client/assets/{use-organization-settings-CRwm0586.js → use-organization-settings-Ddjh427l.js} +1 -1
  371. package/dist/client/assets/use-panel-navigate-V2MXWXLu.js +1 -0
  372. package/dist/client/assets/use-project-native-view-presence-EdJBeOw9.js +1 -0
  373. package/dist/client/assets/use-project-scope-COzEo5Zz.js +1 -0
  374. package/dist/client/assets/use-recent-apps-BpR_nbgz.js +1 -0
  375. package/dist/client/assets/{use-reports-diagnostic-DgRjbmEf.js → use-reports-diagnostic-DYf7sFCj.js} +1 -1
  376. package/dist/client/assets/use-sandbox-events-cbWqZuIm.js +2 -0
  377. package/dist/client/assets/{use-secrets-jhGB5cvg.js → use-secrets-BamKWPUs.js} +1 -1
  378. package/dist/client/assets/{use-section-preview-base-CxqwLEJO.js → use-section-preview-base-Cy_X_Jjl.js} +1 -1
  379. package/dist/client/assets/use-sidebar-collapsed-CGkkkrTj.js +1 -0
  380. package/dist/client/assets/{use-tags-CBIw_9wj.js → use-tags-staoqXQp.js} +1 -1
  381. package/dist/client/assets/{use-task-board-analytics-DVdYIVtB.js → use-task-board-analytics-C5Dsg-uV.js} +1 -1
  382. package/dist/client/assets/{use-task-board-item-prs-KjQVKJGy.js → use-task-board-item-prs-DsFjq28v.js} +1 -1
  383. package/dist/client/assets/use-task-board-items-OgSDu-ag.js +1 -0
  384. package/dist/client/assets/{use-task-board-prompts-5OmBV-BO.js → use-task-board-prompts-Bn4-yS6Z.js} +1 -1
  385. package/dist/client/assets/{use-task-metadata-xW_FzRqh.js → use-task-metadata-Bc8o5Sts.js} +1 -1
  386. package/dist/client/assets/{use-thread-outputs-CN7E968n.js → use-thread-outputs-Co5bznxQ.js} +1 -1
  387. package/dist/client/assets/use-view-draft-kind-BdwsMdex.js +1 -0
  388. package/dist/client/assets/use-voice-input-CwLNuWlo.js +1 -0
  389. package/dist/client/assets/useInfiniteQuery-BagPKS5m.js +1 -0
  390. package/dist/client/assets/{useQueries-BruvTC1j.js → useQueries-BjVZ4kPO.js} +1 -1
  391. package/dist/client/assets/useSuspenseInfiniteQuery-BUmkwIx5.js +1 -0
  392. package/dist/client/assets/{users-ByNwcAJI.js → users-CPRHIyd2.js} +1 -1
  393. package/dist/client/assets/utils-DPEBLDgi.js +4 -0
  394. package/dist/client/assets/variant-calendar-Dlw46bNO.js +1 -0
  395. package/dist/client/assets/{variant-matcher-override-CbZkMadE.js → variant-matcher-override-ChW3ijK5.js} +1 -1
  396. package/dist/client/assets/{view-header-tBobsCC8.js → view-header-D4oknAV1.js} +1 -1
  397. package/dist/client/assets/virtual-mcp-nhrh3mtw.js +1 -0
  398. package/dist/client/assets/{watch-sse-pool-HKLsGoUY.js → watch-sse-pool-CTgVk3NA.js} +1 -1
  399. package/dist/client/index.html +2 -2
  400. package/dist/server/server.js +1 -1
  401. package/package.json +1 -1
  402. package/dist/client/assets/ChevronUp-s7k4XU_p.js +0 -1
  403. package/dist/client/assets/LinkBroken01-D4Fzd5qu.js +0 -1
  404. package/dist/client/assets/Tool01-s83oNDoy.js +0 -1
  405. package/dist/client/assets/agent-app-Cimvv1NW.js +0 -1
  406. package/dist/client/assets/agent-assets-CXtexOn6.js +0 -1
  407. package/dist/client/assets/agent-automation-DnUzn_Xt.js +0 -20
  408. package/dist/client/assets/agent-automations-D4hO7Hf6.js +0 -1
  409. package/dist/client/assets/agent-blog-C6-P3uCx.js +0 -2
  410. package/dist/client/assets/agent-blog-post-tCR4iQAk.js +0 -2
  411. package/dist/client/assets/agent-calendar-DqwMJ6TI.js +0 -1
  412. package/dist/client/assets/agent-connect-sources-CQDMgwdR.js +0 -1
  413. package/dist/client/assets/agent-deck-CTEHtbNm.js +0 -1
  414. package/dist/client/assets/agent-e2e-CgIk5HXH.js +0 -1
  415. package/dist/client/assets/agent-experiments-DWa03yYa.js +0 -1
  416. package/dist/client/assets/agent-file-C8OplG41.js +0 -1
  417. package/dist/client/assets/agent-hosting-DZwc-hYc.js +0 -1
  418. package/dist/client/assets/agent-icon-DHk7TnW1.js +0 -1
  419. package/dist/client/assets/agent-library-Bhlc7QbZ.js +0 -1
  420. package/dist/client/assets/agent-library-file-NZe3W-xa.js +0 -1
  421. package/dist/client/assets/agent-overview-BjxnoHtS.js +0 -1
  422. package/dist/client/assets/agent-releases-DJXEsnr4.js +0 -2
  423. package/dist/client/assets/agent-settings-IyhNx_G4.js +0 -1
  424. package/dist/client/assets/agent-site-editor-code-B371nTRh.js +0 -2
  425. package/dist/client/assets/agent-site-editor-content-B6-iieBO.js +0 -1
  426. package/dist/client/assets/agent-site-editor-preview-Dt3bOYz8.js +0 -1
  427. package/dist/client/assets/agent-view-BIybMP8S.js +0 -1
  428. package/dist/client/assets/agent-view-guard-BkBbWqXx.js +0 -1
  429. package/dist/client/assets/ai-providers-CPyrRCb2.js +0 -1
  430. package/dist/client/assets/analytics-sections-BrNKTJt8.js +0 -1
  431. package/dist/client/assets/api-keys-BFjbEQH6.js +0 -1
  432. package/dist/client/assets/api-keys-CQiDxx3i.js +0 -1
  433. package/dist/client/assets/app-editor-Bu-6D-sg.js +0 -1
  434. package/dist/client/assets/automation-list-row-CE7SXhaQ.js +0 -1
  435. package/dist/client/assets/automations-DPaT01e7.js +0 -1
  436. package/dist/client/assets/blog-schema-EWcl-SDU.js +0 -1
  437. package/dist/client/assets/blog-view-gate-BPhH6bKz.js +0 -1
  438. package/dist/client/assets/buckets-lH8mvjw2.js +0 -1
  439. package/dist/client/assets/calendar-DD1b_D7F.js +0 -1
  440. package/dist/client/assets/category-editor-CIxCWDky.js +0 -1
  441. package/dist/client/assets/chat-context-B9rZ1ojJ.js +0 -39
  442. package/dist/client/assets/choose-editor-DvmC-iMO.js +0 -1
  443. package/dist/client/assets/cms-settings-editor-9nWJpKcE.js +0 -1
  444. package/dist/client/assets/collection-detail-DLSsSNsw.js +0 -1
  445. package/dist/client/assets/config-gK1vyYpA.js +0 -1
  446. package/dist/client/assets/connect-BjmhjHJY.js +0 -9
  447. package/dist/client/assets/connection-detail-DpiK53yx.js +0 -1
  448. package/dist/client/assets/connection-slug-C9_jBSFl.js +0 -1
  449. package/dist/client/assets/connections-COV9Ow5m.js +0 -1
  450. package/dist/client/assets/context-BvzzvYU9.js +0 -1
  451. package/dist/client/assets/discover-BoR_YGj-.js +0 -1
  452. package/dist/client/assets/experiments-tab-choice-CAU_bLj1.js +0 -1
  453. package/dist/client/assets/feature-gate-2lTAc4xs.js +0 -1
  454. package/dist/client/assets/file-explorer-SB0BRdQa.js +0 -2
  455. package/dist/client/assets/file-share-button-BmXIU90b.js +0 -3
  456. package/dist/client/assets/folder-icon-DczOK4X3.js +0 -1
  457. package/dist/client/assets/general-CPM5iXZa.js +0 -1
  458. package/dist/client/assets/home-CYIjoH-m.js +0 -1
  459. package/dist/client/assets/home-overview-BvhVg2vV.js +0 -1
  460. package/dist/client/assets/index-BtRGS8vq.css +0 -1
  461. package/dist/client/assets/index-CFMb9ZoK.js +0 -4
  462. package/dist/client/assets/index-D-5KT7YJ.js +0 -1
  463. package/dist/client/assets/index-D4fWOfQV.js +0 -1
  464. package/dist/client/assets/index-DT6cEtD6.js +0 -1
  465. package/dist/client/assets/infra-billing-BmRwy4ol.js +0 -1
  466. package/dist/client/assets/input-8RS_xi7t.js +0 -17
  467. package/dist/client/assets/item-actions-1298TOwC.js +0 -1
  468. package/dist/client/assets/legacy-agents-deep-CzKSWS31.js +0 -1
  469. package/dist/client/assets/library-Brt6n-TA.js +0 -1
  470. package/dist/client/assets/members-ChISvAMj.js +0 -1
  471. package/dist/client/assets/memory-C27haG4J.js +0 -7
  472. package/dist/client/assets/mock-board-BywyOk2L.js +0 -10
  473. package/dist/client/assets/multi-select-B4TjM0bb.js +0 -1
  474. package/dist/client/assets/named-rule-view-BNe6XoGj.js +0 -1
  475. package/dist/client/assets/new-project-dialog-MxeroDTr.js +0 -1
  476. package/dist/client/assets/openai-conversation-PDrYjlY3.js +0 -3
  477. package/dist/client/assets/order-monitor-day-CWMt_zZN.js +0 -1
  478. package/dist/client/assets/orgs-Dk0Ii4jK.js +0 -1
  479. package/dist/client/assets/own-accounts-section-h1niaKS8.js +0 -1
  480. package/dist/client/assets/pair-Cd8NH003.js +0 -48
  481. package/dist/client/assets/plan-D9R1-AZQ.js +0 -1
  482. package/dist/client/assets/post-calendar-BodpNGCL.js +0 -1
  483. package/dist/client/assets/preview-content-CAIaH_bT.js +0 -1
  484. package/dist/client/assets/preview-tab-Da5MFmuu.js +0 -557
  485. package/dist/client/assets/product-picker-dialog-n0_PqHbz.js +0 -1
  486. package/dist/client/assets/profile-C2zVoVuX.js +0 -1
  487. package/dist/client/assets/project-app-view-DL5XMDyp.js +0 -1
  488. package/dist/client/assets/project-apps-Oyn1Gnz0.js +0 -1
  489. package/dist/client/assets/project-reports-CC7ptk4l.js +0 -1
  490. package/dist/client/assets/project-tasks-DMyDSLCM.js +0 -1
  491. package/dist/client/assets/projects-3knV1Wr_.js +0 -1
  492. package/dist/client/assets/record-editor-CkMBdekB.js +0 -1
  493. package/dist/client/assets/redirect-editor-DhGl9GBV.js +0 -1
  494. package/dist/client/assets/reports-onboarding-DMi5ETfa.js +0 -1
  495. package/dist/client/assets/reports-tab-tHGof2FW.js +0 -2
  496. package/dist/client/assets/reports-x6uGEsmu.js +0 -1
  497. package/dist/client/assets/repositories-BTQbxkj9.js +0 -1
  498. package/dist/client/assets/repositories-W2INiIpb.js +0 -1
  499. package/dist/client/assets/resizable-B34lmUXk.js +0 -1
  500. package/dist/client/assets/resolve-tab-icon-DGM8yJyS.js +0 -1
  501. package/dist/client/assets/roles-Ce95RFET.js +0 -1
  502. package/dist/client/assets/route-ByQoYEQ1.js +0 -1
  503. package/dist/client/assets/route-CZrJA2Du.js +0 -1
  504. package/dist/client/assets/route-DwOjJhPU.js +0 -1
  505. package/dist/client/assets/save-status-Cf9701GC.js +0 -1
  506. package/dist/client/assets/secrets-7vsHBI_C.js +0 -1
  507. package/dist/client/assets/sections-DwAaRTqc.js +0 -1
  508. package/dist/client/assets/sections-editor-Cw7rVBET.js +0 -1
  509. package/dist/client/assets/select-C2TZ6w0T.js +0 -1
  510. package/dist/client/assets/settings-tab-Bt6v_h7A.js +0 -1
  511. package/dist/client/assets/shell-layout-DElHwXzP.js +0 -1
  512. package/dist/client/assets/site-draft-view-BYRbX7hq.js +0 -1
  513. package/dist/client/assets/site-editor-DtYKhDUe.js +0 -1
  514. package/dist/client/assets/site-editor-toast-fJQVfqa6.js +0 -1
  515. package/dist/client/assets/skills-BVBJsFpt.js +0 -1
  516. package/dist/client/assets/sso-jLEvOfRs.js +0 -1
  517. package/dist/client/assets/task-board-DvkfyL0D.js +0 -1
  518. package/dist/client/assets/task-key-BCHdFiOO.js +0 -1
  519. package/dist/client/assets/task-route-DvThF15k.js +0 -1
  520. package/dist/client/assets/taskboard-analytics-wmnzdjd1.js +0 -1
  521. package/dist/client/assets/tasks-x5QR56dC.js +0 -1
  522. package/dist/client/assets/thread-analytics-BhQM5Fjz.js +0 -1
  523. package/dist/client/assets/thread-route-B-GLI-gf.js +0 -1
  524. package/dist/client/assets/thread-route-DgzeVZc_.js +0 -1
  525. package/dist/client/assets/thread-sheet-body-CtA9qKg3.js +0 -1
  526. package/dist/client/assets/time-range-picker-CngcAO-k.js +0 -1
  527. package/dist/client/assets/tool-namespace-DBtCIV7f.js +0 -1
  528. package/dist/client/assets/use-apply-named-rule-OLP0GHWV.js +0 -1
  529. package/dist/client/assets/use-ask-in-chat-Dom4oae3.js +0 -1
  530. package/dist/client/assets/use-blocks-v8-project-Ol6SuT-M.js +0 -1
  531. package/dist/client/assets/use-chat-layout-state-DM5US5qS.js +0 -1
  532. package/dist/client/assets/use-connect-companion-BcVm5W-r.js +0 -1
  533. package/dist/client/assets/use-decopilot-events-DGoOKMj0.js +0 -1
  534. package/dist/client/assets/use-delete-block-y2vOypSK.js +0 -1
  535. package/dist/client/assets/use-fast-preview-draft-url-OHnSoOh2.js +0 -1
  536. package/dist/client/assets/use-main-panel-tabs-DUVnwi3u.js +0 -1
  537. package/dist/client/assets/use-mcp-auth-status-DENAEdO_.js +0 -1
  538. package/dist/client/assets/use-never-published-CqQvHtX-.js +0 -1
  539. package/dist/client/assets/use-project-native-view-presence-BnSN9oER.js +0 -1
  540. package/dist/client/assets/use-project-scope-lI2ukIh1.js +0 -1
  541. package/dist/client/assets/use-recent-apps-CnCq1w_A.js +0 -1
  542. package/dist/client/assets/use-sandbox-events-BZs_wcMW.js +0 -2
  543. package/dist/client/assets/use-sidebar-collapsed-BWtKakyD.js +0 -1
  544. package/dist/client/assets/use-task-board-events-n_cm8Gyp.js +0 -1
  545. package/dist/client/assets/use-task-board-items-gM-MOBw8.js +0 -1
  546. package/dist/client/assets/use-view-draft-kind-BsykP2yK.js +0 -1
  547. package/dist/client/assets/use-voice-input-seZQKt1s.js +0 -1
  548. package/dist/client/assets/useInfiniteQuery-Bz8irSN1.js +0 -1
  549. package/dist/client/assets/useSuspenseInfiniteQuery-DKXKbUjm.js +0 -1
  550. package/dist/client/assets/utils-BoDmGD4u.js +0 -4
  551. package/dist/client/assets/variant-calendar-BsyPkd78.js +0 -1
  552. package/dist/client/assets/virtual-mcp-BJ1dRL5Y.js +0 -1
@@ -1 +0,0 @@
1
- import{r as L,j as A,c as ve,m as He}from"./index-D9wygnbU.js";import{as as ft}from"./agent-icon-DHk7TnW1.js";function pt(e,t){const n=getComputedStyle(e),o=parseFloat(n.fontSize);return t*o}function ht(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),o=parseFloat(n.fontSize);return t*o}function gt(e){return e/100*window.innerHeight}function vt(e){return e/100*window.innerWidth}function mt(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function re({groupSize:e,panelElement:t,styleProp:n}){let o;const[r,a]=mt(n);switch(a){case"%":{o=r/100*e;break}case"px":{o=r;break}case"rem":{o=ht(t,r);break}case"em":{o=pt(t,r);break}case"vh":{o=gt(r);break}case"vw":{o=vt(r);break}}return o}function T(e){return parseFloat(e.toFixed(3))}function te({group:e}){const{orientation:t,panels:n}=e;return n.reduce((o,r)=>(o+=t==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,o),0)}function he(e){const{panels:t}=e,n=te({group:e});return n===0?t.map(o=>({groupResizeBehavior:o.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:o.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:o.panelConstraints.disabled,minSize:0,maxSize:100,panelId:o.id})):t.map(o=>{const{element:r,panelConstraints:a}=o;let l=0;if(a.collapsedSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.collapsedSize});l=T(c/n*100)}let s;if(a.defaultSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.defaultSize});s=T(c/n*100)}let i=0;if(a.minSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.minSize});i=T(c/n*100)}let u=100;if(a.maxSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.maxSize});u=T(c/n*100)}return{groupResizeBehavior:a.groupResizeBehavior,collapsedSize:l,collapsible:a.collapsible===!0,defaultSize:s,disabled:a.disabled,minSize:i,maxSize:u,panelId:o.id}})}function P(e,t="Assertion error"){if(!e)throw Error(t)}function ge(e,t){return Array.from(t).sort(e==="horizontal"?bt:yt)}function bt(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function yt(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Ve(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ue(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function zt({orientation:e,rects:t,targetRect:n}){const o={x:n.x+n.width/2,y:n.y+n.height/2};let r,a=Number.MAX_VALUE;for(const l of t){const{x:s,y:i}=Ue(o,l),u=e==="horizontal"?s:i;u<a&&(a=u,r=l)}return P(r,"No rect found"),r}let ue;function St(){return ue===void 0&&(typeof matchMedia=="function"?ue=!!matchMedia("(pointer:coarse)").matches:ue=!1),ue}function Ye(e){const{element:t,orientation:n,panels:o,separators:r}=e,a=ge(n,Array.from(t.children).filter(Ve).map(m=>({element:m}))).map(({element:m})=>m),l=[];let s=!1,i=!1,u=-1,c=-1,h=0,d,S=[];{let m=-1;for(const f of a)f.hasAttribute("data-panel")&&(m++,f.hasAttribute("data-disabled")||(h++,u===-1&&(u=m),c=m))}if(h>1){let m=-1;for(const f of a)if(f.hasAttribute("data-panel")){m++;const g=o.find(p=>p.element===f);if(g){if(d){const p=d.element.getBoundingClientRect(),y=f.getBoundingClientRect();let z;if(i){const b=n==="horizontal"?new DOMRect(p.right,p.top,0,p.height):new DOMRect(p.left,p.bottom,p.width,0),v=n==="horizontal"?new DOMRect(y.left,y.top,0,y.height):new DOMRect(y.left,y.top,y.width,0);switch(S.length){case 0:{z=[b,v];break}case 1:{const R=S[0],E=zt({orientation:n,rects:[p,y],targetRect:R.element.getBoundingClientRect()});z=[R,E===p?v:b];break}default:{z=S;break}}}else S.length?z=S:z=[n==="horizontal"?new DOMRect(p.right,y.top,y.left-p.right,y.height):new DOMRect(y.left,p.bottom,y.width,y.top-p.bottom)];for(const b of z){let v="width"in b?b:b.element.getBoundingClientRect();const R=St()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(v.width<R){const M=R-v.width;v=new DOMRect(v.x-M/2,v.y,v.width+M,v.height)}if(v.height<R){const M=R-v.height;v=new DOMRect(v.x,v.y-M/2,v.width,v.height+M)}const E=m<=u||m>c;!s&&!E&&l.push({group:e,groupSize:te({group:e}),panels:[d,g],separator:"width"in b?void 0:b,rect:v}),s=!1}}i=!1,d=g,S=[]}}else if(f.hasAttribute("data-separator")){f.ariaDisabled!==null&&(s=!0);const g=r.find(p=>p.element===f);g?S.push(g):(d=void 0,S=[])}else i=!0}return l}class Xe{#e={};addListener(t,n){const o=this.#e[t];return o===void 0?this.#e[t]=[n]:o.includes(n)||o.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const o=this.#e[t];if(o!==void 0)if(o.length===1)o[0].call(null,n);else{let r=!1,a=null;const l=Array.from(o);for(let s=0;s<l.length;s++){const i=l[s];try{i.call(null,n)}catch(u){a===null&&(r=!0,a=u)}}if(r)throw a}}removeAllListeners(){this.#e={}}removeListener(t,n){const o=this.#e[t];if(o!==void 0){const r=o.indexOf(n);r>=0&&o.splice(r,1)}}}let Q={cursorFlags:0,state:"inactive"};const me=new Xe;function U(){return Q}function wt(e){return me.addListener("change",e)}function xt(e){const t=Q,n={...Q};n.cursorFlags=e,Q=n,me.emit("change",{prev:t,next:n})}function ee(e){const t=Q;Q=e,me.emit("change",{prev:t,next:e})}const Ct=e=>e,pe=()=>{},_e=1,Je=2,qe=4,Ke=8,Le=3,Re=12;let ce;function Ee(){return ce===void 0&&(ce=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(ce=!0)),ce}function Pt({cursorFlags:e,groups:t,state:n}){let o=0,r=0;switch(n){case"active":case"hover":t.forEach(a=>{if(!a.mutableState.disableCursor)switch(a.orientation){case"horizontal":{o++;break}case"vertical":{r++;break}}})}if(!(o===0&&r===0)){switch(n){case"active":{if(e&&Ee()){const a=(e&_e)!==0,l=(e&Je)!==0,s=(e&qe)!==0,i=(e&Ke)!==0;if(a)return s?"se-resize":i?"ne-resize":"e-resize";if(l)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}break}}return Ee()?o>0&&r>0?"move":o>0?"ew-resize":"ns-resize":o>0&&r>0?"grab":o>0?"col-resize":"row-resize"}}const ke=new WeakMap;function be(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=ke.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const o=U();switch(o.state){case"active":case"hover":{const r=Pt({cursorFlags:o.cursorFlags,groups:o.hitRegions.map(l=>l.group),state:o.state}),a=`*, *:hover {cursor: ${r} !important; }`;if(t===a)return;t=a,r?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}ke.set(e,{prevStyle:t,styleSheet:n})}let F=new Map;const Ze=new Xe;function Lt(e){F=new Map(F),F.delete(e)}function Me(e,t){for(const[n]of F)if(n.id===e)return n}function H(e,t){for(const[n,o]of F)if(n.id===e)return o;if(t)throw Error(`Could not find data for Group with id ${e}`)}function _(){return F}function ye(e,t){return Ze.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function W(e,t,n){const o=F.get(e);F=new Map(F),F.set(e,t),Ze.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:o,next:t})}function Qe(e){const t=U();let n=!1;return t.state==="active"&&(ee({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(be(e),n=!0,t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})}))),n}function De(e){e.defaultPrevented||Qe(e.currentTarget)}function Rt(e,t,n){let o,r={x:1/0,y:1/0};for(const a of t){const l=Ue(n,a.rect);switch(e){case"horizontal":{l.x<=r.x&&(o=a,r=l);break}case"vertical":{l.y<=r.y&&(o=a,r=l);break}}}return o?{distance:r,hitRegion:o}:void 0}function Et(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function kt(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ne(e),b:Ne(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)o=n.a.pop(),n.b.pop();P(o,"Stacking order can only be calculated for elements with a common ancestor");const r={a:Te(Ie(n.a)),b:Te(Ie(n.b))};if(r.a===r.b){const a=o.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=a.length;for(;s--;){const i=a[s];if(i===l.a)return 1;if(i===l.b)return-1}}return Math.sign(r.a-r.b)}const Mt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dt(e){const t=getComputedStyle(et(e)??e).display;return t==="flex"||t==="inline-flex"}function It(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Dt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Mt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ie(e){let t=e.length;for(;t--;){const n=e[t];if(P(n,"Missing node"),It(n))return n}return null}function Te(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ne(e){const t=[];for(;e;)t.push(e),e=et(e);return t}function et(e){const{parentNode:t}=e;return Et(t)?t.host:t}function Tt(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Nt({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Ve(n)||n.contains(e)||e.contains(n))return!0;if(kt(n,e)>0){let o=n;for(;o;){if(o.contains(e))return!0;if(Tt(o.getBoundingClientRect(),t))return!1;o=o.parentElement}}return!0}function ze(e,t){const n=[];return t.forEach((o,r)=>{if(r.disabled)return;const a=Ye(r),l=Rt(r.orientation,a,{x:e.clientX,y:e.clientY});l&&l.distance.x<=0&&l.distance.y<=0&&Nt({groupElement:r.element,hitRegion:l.hitRegion.rect,pointerEventTarget:e.target})&&n.push(l.hitRegion)}),n}function jt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function I(e,t,n=0){return Math.abs(T(e)-T(t))<=n}function O(e,t){return I(e,t)?0:e>t?1:-1}function Z({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:o}){const{collapsedSize:r=0,collapsible:a,disabled:l,maxSize:s=100,minSize:i=0}=t;if(l&&!e)return n;if(O(o,i)<0)if(a){const u=(r+i)/2;O(o,u)<0?o=r:o=i}else o=i;return o=Math.min(s,o),o=T(o),o}function ie({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:r,trigger:a}){if(I(e,0))return t;const l=a==="imperative-api",s=Object.values(t),i=Object.values(r),u=[...s],[c,h]=o;P(c!=null,"Invalid first pivot index"),P(h!=null,"Invalid second pivot index");let d=0;switch(a){case"keyboard":{{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,p)){const v=z-b;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const f=e<0?c:h,g=n[f];P(g,`No panel constraints found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,z)){const v=b-p;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}break}default:{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const p=s[f],{collapsible:y,collapsedSize:z,minSize:b}=g;if(y&&O(p,b)<0)if(e>0){const v=b-z,R=v/2,E=p+e;O(E,b)<0&&(e=O(e,R)<=0?0:v)}else{const v=b-z,R=100-v/2,E=p-e;O(E,b)<0&&(e=O(100+e,R)>0?0:-v)}break}}{const f=e<0?1:-1;let g=e<0?h:c,p=0;for(;;){const z=s[g];P(z!=null,`Previous layout not found for panel index ${g}`);const b=Z({overrideDisabledPanels:l,panelConstraints:n[g],prevSize:z,size:100})-z;if(p+=b,g+=f,g<0||g>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-y:y}{let f=e<0?c:h;for(;f>=0&&f<n.length;){const g=Math.abs(e)-Math.abs(d),p=s[f];P(p!=null,`Previous layout not found for panel index ${f}`);const y=p-g,z=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:p,size:y});if(!I(p,z)&&(d+=p-z,u[f]=z,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(jt(i,u))return r;{const f=e<0?h:c,g=s[f];P(g!=null,`Previous layout not found for panel index ${f}`);const p=g+d,y=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:g,size:p});if(u[f]=y,!I(y,p)){let z=p-y,b=e<0?h:c;for(;b>=0&&b<n.length;){const v=u[b];P(v!=null,`Previous layout not found for panel index ${b}`);const R=v+z,E=Z({overrideDisabledPanels:l,panelConstraints:n[b],prevSize:v,size:R});if(I(v,E)||(z-=E-v,u[b]=E),I(z,0))break;e>0?b--:b++}}}const S=Object.values(u).reduce((f,g)=>g+f,0);if(!I(S,100,.1))return r;const m=Object.keys(r);return u.reduce((f,g,p)=>(f[m[p]]=g,f),{})}function Y(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||O(e[n],t[n])!==0)return!1;return!0}function X({layout:e,panelConstraints:t}){const n=Object.values(e),o=[...n],r=o.reduce((s,i)=>s+i,0);if(o.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${o.map(s=>`${s}%`).join(", ")}`);if(!I(r,100)&&o.length>0)for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=100/r*i;o[s]=u}let a=0;for(let s=0;s<t.length;s++){const i=n[s];P(i!=null,`No layout data found for index ${s}`);const u=o[s];P(u!=null,`No layout data found for index ${s}`);const c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});u!=c&&(a+=u-c,o[s]=c)}if(!I(a,0))for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=i+a,c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});if(i!==c&&(a-=c-i,o[s]=c,I(a,0)))break}const l=Object.keys(e);return o.reduce((s,i,u)=>(s[l[u]]=i,s),{})}function tt({groupId:e,panelId:t}){const n=()=>{const i=_();for(const[u,{defaultLayoutDeferred:c,derivedPanelConstraints:h,layout:d,groupSize:S,separatorToPanels:m}]of i)if(u.id===e)return{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:u,groupSize:S,layout:d,separatorToPanels:m};throw Error(`Group ${e} not found`)},o=()=>{const i=n().derivedPanelConstraints.find(u=>u.panelId===t);if(i!==void 0)return i;throw Error(`Panel constraints not found for Panel ${t}`)},r=()=>{const i=n().group.panels.find(u=>u.id===t);if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},a=()=>{const i=n().layout[t];if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},l=({nextSize:i,panels:u,prevLayout:c,derivedPanelConstraints:h})=>{const d=a(),S=u.findIndex(g=>g.id===t),m=S===0,f=S===u.length-1;if(f&&i<d&&(m||u.slice(0,S).every((g,p)=>{const y=h[p];return y?.collapsible&&I(y.collapsedSize,c[y.panelId])}))){const g=u.slice(0,S).reduce((p,y)=>p+c[y.id],0);return{...c,[t]:T(100-g)}}return ie({delta:f?d-i:i-d,initialLayout:c,panelConstraints:h,pivotIndices:f?[S-1,S]:[S,S+1],prevLayout:c,trigger:"imperative-api"})},s=i=>{const u=a();if(i===u)return;const{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:d,groupSize:S,layout:m,separatorToPanels:f}=n(),g=l({nextSize:i,panels:d.panels,prevLayout:m,derivedPanelConstraints:h}),p=X({layout:g,panelConstraints:h});Y(m,p)||W(d,{defaultLayoutDeferred:c,derivedPanelConstraints:h,groupSize:S,layout:p,separatorToPanels:f})};return{collapse:()=>{const{collapsible:i,collapsedSize:u}=o(),{mutableValues:c}=r(),h=a();i&&h!==u&&(c.expandToSize=h,s(u))},expand:()=>{const{collapsible:i,collapsedSize:u,minSize:c}=o(),{mutableValues:h}=r(),d=a();if(i&&d===u){let S=h.expandToSize??c;S===0&&(S=1),s(S)}},getSize:()=>{const{group:i}=n(),u=a(),{element:c}=r(),h=i.orientation==="horizontal"?c.offsetWidth:c.offsetHeight;return{asPercentage:u,inPixels:h}},isCollapsed:()=>{const{collapsible:i,collapsedSize:u}=o(),c=a();return i&&I(u,c)},resize:i=>{const{group:u}=n(),{element:c}=r(),h=te({group:u}),d=re({groupSize:h,panelElement:c,styleProp:i}),S=T(d/h*100);s(S)}}}function je(e){if(e.defaultPrevented)return;const t=_();ze(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const o=n.panels.find(r=>r.panelConstraints.defaultSize!==void 0);if(o){const r=o.panelConstraints.defaultSize,a=tt({groupId:n.group.id,panelId:o.id});a&&r!==void 0&&(a.resize(r),e.preventDefault())}}})}function de(e){const t=_();for(const[n]of t)if(n.separators.some(o=>o.element===e))return n;throw Error("Could not find parent Group for separator element")}function nt({groupId:e}){const t=()=>{const n=_();for(const[o,r]of n)if(o.id===e)return{group:o,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:o}=t();return n?{}:o},setLayout(n){const{defaultLayoutDeferred:o,derivedPanelConstraints:r,group:a,groupSize:l,layout:s,separatorToPanels:i}=t(),u=X({layout:n,panelConstraints:r});return o?s:(Y(s,u)||W(a,{defaultLayoutDeferred:o,derivedPanelConstraints:r,groupSize:l,layout:u,separatorToPanels:i}),u)}}}function V(e,t){const n=de(e),o=H(n.id,!0),r=n.separators.find(c=>c.element===e);P(r,"Matching separator not found");const a=o.separatorToPanels.get(r);P(a,"Matching panels not found");const l=a.map(c=>n.panels.indexOf(c)),s=nt({groupId:n.id}).getLayout(),i=ie({delta:t,initialLayout:s,panelConstraints:o.derivedPanelConstraints,pivotIndices:l,prevLayout:s,trigger:"keyboard"}),u=X({layout:i,panelConstraints:o.derivedPanelConstraints});Y(s,u)||W(n,{defaultLayoutDeferred:o.defaultLayoutDeferred,derivedPanelConstraints:o.derivedPanelConstraints,groupSize:o.groupSize,layout:u,separatorToPanels:o.separatorToPanels},{isUserInteraction:!0})}function Oe(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=de(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&V(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&V(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&V(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&V(t,-5);break}case"End":{e.preventDefault(),V(t,100);break}case"Enter":{e.preventDefault();const o=de(t),r=H(o.id,!0),{derivedPanelConstraints:a,layout:l,separatorToPanels:s}=r,i=o.separators.find(d=>d.element===t);P(i,"Matching separator not found");const u=s.get(i);P(u,"Matching panels not found");const c=u[0],h=a.find(d=>d.panelId===c.id);if(P(h,"Panel metadata not found"),h.collapsible){const d=l[c.id],S=h.collapsedSize===d?o.mutableState.expandedPanelSizes[c.id]??h.minSize:h.collapsedSize;V(t,S-d)}break}case"F6":{e.preventDefault();const o=de(t).separators.map(l=>l.element),r=Array.from(o).findIndex(l=>l===e.currentTarget);P(r!==null,"Index not found");const a=e.shiftKey?r>0?r-1:o.length-1:r+1<o.length?r+1:0;o[a].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),V(t,-100);break}}}function Fe(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=_(),n=ze(e,t),o=new Map;let r=!1;n.forEach(a=>{a.separator&&(r||(r=!0,a.separator.element.focus({focusVisible:!1,preventScroll:!0})));const l=t.get(a.group);l&&o.set(a.group,l.layout)}),ee({cursorFlags:0,hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function ot({document:e,event:t,hitRegions:n,initialLayoutMap:o,mountedGroups:r,pointerDownAtPoint:a,prevCursorFlags:l}){let s=0;n.forEach(u=>{const{group:c,groupSize:h}=u,{orientation:d,panels:S}=c,{disableCursor:m}=c.mutableState;let f=0;a?d==="horizontal"?f=(t.clientX-a.x)/h*100:f=(t.clientY-a.y)/h*100:d==="horizontal"?f=t.clientX<0?-100:100:f=t.clientY<0?-100:100;const g=o.get(c),p=r.get(c);if(!g||!p)return;const{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:v,separatorToPanels:R}=p;if(z&&v&&R){const E=ie({delta:f,initialLayout:g,panelConstraints:z,pivotIndices:u.panels.map(M=>S.indexOf(M)),prevLayout:v,trigger:"mouse-or-touch"});if(Y(E,v)){if(f!==0&&!m)switch(d){case"horizontal":{s|=f<0?_e:Je;break}case"vertical":{s|=f<0?qe:Ke;break}}}else W(u.group,{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:E,separatorToPanels:R})}});let i=0;t.movementX===0?i|=l&Le:i|=s&Le,t.movementY===0?i|=l&Re:i|=s&Re,xt(i),be(e)}function Ae(e){const t=_(),n=U();n.state==="active"&&ot({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function Ge(e){if(e.defaultPrevented)return;const t=U(),n=_();switch(t.state){case"active":{if(e.buttons===0){ee({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})});return}for(const o of t.hitRegions)if(o.separator){const{element:r}=o.separator;r.hasPointerCapture?.(e.pointerId)||r.setPointerCapture?.(e.pointerId)}ot({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const o=ze(e,n);o.length===0?t.state!=="inactive"&&ee({cursorFlags:0,state:"inactive"}):ee({cursorFlags:0,hitRegions:o,state:"hover"}),be(e.currentTarget);break}}}function $e(e){e.relatedTarget instanceof HTMLIFrameElement&&U().state==="hover"&&ee({cursorFlags:0,state:"inactive"})}function Be(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||Qe(e.currentTarget)&&e.preventDefault()}function We(e){let t=0,n=0;const o={};for(const a of e)if(a.defaultSize!==void 0){t++;const l=T(a.defaultSize);n+=l,o[a.panelId]=l}else o[a.panelId]=void 0;const r=e.length-t;if(r!==0){const a=T((100-n)/r);for(const l of e)l.defaultSize===void 0&&(o[l.panelId]=a)}return o}function Ot(e,t,n){if(!n[0])return;const o=e.panels.find(i=>i.element===t);if(!o||!o.onResize)return;const r=te({group:e}),a=e.orientation==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,l=o.mutableValues.prevSize,s={asPercentage:T(a/r*100),inPixels:a};o.mutableValues.prevSize=s,o.onResize(s,o.id,l)}function Ft(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function At({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:o}){if(n<=0||t<=0||n===t)return o;let r=0,a=0,l=!1;const s=new Map,i=[];for(const h of e.panels){const d=o[h.id]??0;if(h.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){l=!0;const S=d/100*n,m=T(S/t*100);s.set(h.id,m),r+=m}else i.push(h.id),a+=d}if(!l||i.length===0)return o;const u=100-r,c={...o};if(s.forEach((h,d)=>{c[d]=h}),a>0)for(const h of i){const d=o[h]??0;c[h]=T(d/a*u)}else{const h=T(u/i.length);for(const d of i)c[d]=h}return c}function Gt(e,t){const n=e.map(r=>r.id),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(!o.includes(r))return!1;return!0}const K=new Map;function $t(e){let t=!0;P(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,o=new Set,r=new Set,a=new n(m=>{for(const f of m){const{borderBoxSize:g,target:p}=f;if(p===e.element){if(t){const y=te({group:e});if(y===0)return;const z=H(e.id);if(!z)return;const b=he(e),v=z.defaultLayoutDeferred?We(b):z.layout,R=At({group:e,nextGroupSize:y,prevGroupSize:z.groupSize,prevLayout:v}),E=X({layout:R,panelConstraints:b});if(!z.defaultLayoutDeferred&&Y(z.layout,E)&&Ft(z.derivedPanelConstraints,b)&&z.groupSize===y)return;W(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:b,groupSize:y,layout:E,separatorToPanels:z.separatorToPanels})}}else Ot(e,p,g)}});a.observe(e.element),e.panels.forEach(m=>{P(!o.has(m.id),`Panel ids must be unique; id "${m.id}" was used more than once`),o.add(m.id),m.onResize&&a.observe(m.element)});const l=te({group:e}),s=he(e),i=e.panels.map(({id:m})=>m).join(",");let u=e.mutableState.defaultLayout;u&&(Gt(e.panels,u)||(u=void 0));const c=e.mutableState.layouts[i]??u??We(s),h=X({layout:c,panelConstraints:s}),d=e.element.ownerDocument;K.set(d,(K.get(d)??0)+1);const S=new Map;return Ye(e).forEach(m=>{m.separator&&S.set(m.separator,m.panels)}),W(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:s,groupSize:l,layout:h,separatorToPanels:S}),e.separators.forEach(m=>{P(!r.has(m.id),`Separator ids must be unique; id "${m.id}" was used more than once`),r.add(m.id),m.element.addEventListener("keydown",Oe)}),K.get(d)===1&&(d.addEventListener("contextmenu",De,!0),d.addEventListener("dblclick",je,!0),d.addEventListener("pointerdown",Fe,!0),d.addEventListener("pointerleave",Ae),d.addEventListener("pointermove",Ge),d.addEventListener("pointerout",$e),d.addEventListener("pointerup",Be,!0)),function(){t=!1,K.set(d,Math.max(0,(K.get(d)??0)-1)),Lt(e),e.separators.forEach(m=>{m.element.removeEventListener("keydown",Oe)}),K.get(d)||(d.removeEventListener("contextmenu",De,!0),d.removeEventListener("dblclick",je,!0),d.removeEventListener("pointerdown",Fe,!0),d.removeEventListener("pointerleave",Ae),d.removeEventListener("pointermove",Ge),d.removeEventListener("pointerout",$e),d.removeEventListener("pointerup",Be,!0)),a.disconnect()}}function Bt(){const[e,t]=L.useState({}),n=L.useCallback(()=>t({}),[]);return[e,n]}function Se(e){const t=L.useId();return`${e??t}`}const J=typeof window<"u"?L.useLayoutEffect:L.useEffect;function ae(e){const t=L.useRef(e);return J(()=>{t.current=e},[e]),L.useCallback((...n)=>t.current?.(...n),[t])}function we(...e){return ae(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function xe(e){const t=L.useRef({...e});return J(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const rt=L.createContext(null);function Wt(e,t){const n=L.useRef({getLayout:()=>({}),setLayout:Ct});L.useImperativeHandle(t,()=>n.current,[]),J(()=>{Object.assign(n.current,nt({groupId:e}))})}function at({children:e,className:t,defaultLayout:n,disableCursor:o,disabled:r,elementRef:a,groupRef:l,id:s,onLayoutChange:i,onLayoutChanged:u,orientation:c="horizontal",resizeTargetMinimumSize:h={coarse:20,fine:10},style:d,...S}){const m=L.useRef({onLayoutChange:{},onLayoutChanged:{}}),f=ae(w=>{Y(m.current.onLayoutChange,w)||(m.current.onLayoutChange=w,i?.(w))}),g=ae((w,x)=>{Y(m.current.onLayoutChanged,w)||(m.current.onLayoutChanged=w,u?.(w,{isUserInteraction:x}))}),p=Se(s),y=L.useRef(null),[z,b]=Bt(),v=L.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:h,separators:[]}),R=we(y,a);Wt(p,l);const E=ae((w,x)=>{const k=U(),C=Me(w),D=H(w);if(D){let N=!1;return k.state==="active"&&(N=k.hitRegions.some(ne=>ne.group===C)),{flexGrow:D.layout[x]??1,pointerEvents:N?"none":void 0}}if(n?.[x])return{flexGrow:n?.[x]}}),M=xe({defaultLayout:n,disableCursor:o}),j=L.useMemo(()=>({get disableCursor(){return!!M.disableCursor},getPanelStyles:E,id:p,orientation:c,registerPanel:w=>{const x=v.current;return x.panels=ge(c,[...x.panels,w]),b(),()=>{x.panels=x.panels.filter(k=>k!==w),b()}},registerSeparator:w=>{const x=v.current;return x.separators=ge(c,[...x.separators,w]),b(),()=>{x.separators=x.separators.filter(k=>k!==w),b()}},updatePanelProps:(w,{disabled:x})=>{const k=v.current.panels.find(N=>N.id===w);k&&(k.panelConstraints.disabled=x);const C=Me(p),D=H(p);C&&D&&W(C,{...D,derivedPanelConstraints:he(C)})},updateSeparatorProps:(w,{disabled:x,disableDoubleClick:k})=>{const C=v.current.separators.find(D=>D.id===w);C&&(C.disabled=x,C.disableDoubleClick=k)}}),[E,p,b,c,M]),G=L.useRef(null);return J(()=>{const w=y.current;if(w===null)return;const x=v.current;let k;if(M.defaultLayout!==void 0&&Object.keys(M.defaultLayout).length===x.panels.length){k={};for(const $ of x.panels){const q=M.defaultLayout[$.id];q!==void 0&&(k[$.id]=q)}}const C={disabled:!!r,element:w,id:p,mutableState:{defaultLayout:k,disableCursor:!!M.disableCursor,expandedPanelSizes:v.current.lastExpandedPanelSizes,layouts:v.current.layouts},orientation:c,panels:x.panels,resizeTargetMinimumSize:x.resizeTargetMinimumSize,separators:x.separators};G.current=C;const D=$t(C),{defaultLayoutDeferred:N,derivedPanelConstraints:ne,layout:se}=H(C.id,!0);!N&&ne.length>0&&(f(se),g(se,!1));const oe=ye(p,$=>{const{defaultLayoutDeferred:q,derivedPanelConstraints:Pe,layout:le}=$.next;if(q||Pe.length===0)return;const lt=C.panels.map(({id:B})=>B).join(",");C.mutableState.layouts[lt]=le,Pe.forEach(B=>{if(B.collapsible){const{layout:fe}=$.prev??{};if(fe){const ct=I(B.collapsedSize,le[B.panelId]),dt=I(B.collapsedSize,fe[B.panelId]);ct&&!dt&&(C.mutableState.expandedPanelSizes[B.panelId]=fe[B.panelId])}}});const ut=U().state!=="active";f(le),ut&&g(le,$.isUserInteraction)});return()=>{G.current=null,D(),oe()}},[r,p,g,f,c,z,M]),L.useEffect(()=>{const w=G.current;w&&(w.mutableState.defaultLayout=n,w.mutableState.disableCursor=!!o)}),A.jsx(rt.Provider,{value:j,children:A.jsx("div",{...S,className:t,"data-group":!0,"data-testid":p,id:p,ref:R,style:{height:"100%",width:"100%",overflow:"hidden",...d,display:"flex",flexDirection:c==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:c==="horizontal"?"pan-y":"pan-x"},children:e})})}at.displayName="Group";function Ce(){const e=L.useContext(rt);return P(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Ht(e,t){const{id:n}=Ce(),o=L.useRef({collapse:pe,expand:pe,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:pe});L.useImperativeHandle(t,()=>o.current,[]),J(()=>{Object.assign(o.current,tt({groupId:n,panelId:e}))})}function it({children:e,className:t,collapsedSize:n="0%",collapsible:o=!1,defaultSize:r,disabled:a,elementRef:l,groupResizeBehavior:s="preserve-relative-size",id:i,maxSize:u="100%",minSize:c="0%",onResize:h,panelRef:d,style:S,...m}){const f=!!i,g=Se(i),p=xe({disabled:a}),y=L.useRef(null),z=we(y,l),{getPanelStyles:b,id:v,orientation:R,registerPanel:E,updatePanelProps:M}=Ce(),j=h!==null,G=ae((C,D,N)=>{h?.(C,i,N)});J(()=>{const C=y.current;if(C!==null){const D={element:C,id:g,idIsStable:f,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:j?G:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:o,defaultSize:r,disabled:p.disabled,maxSize:u,minSize:c}};return E(D)}},[s,n,o,r,j,g,f,u,c,G,E,p]),L.useEffect(()=>{M(g,{disabled:a})},[a,g,M]),Ht(g,d);const w=()=>{const C=b(v,g);if(C)return JSON.stringify(C)},x=L.useSyncExternalStore(C=>ye(v,C),w,w);let k;return x?k=JSON.parse(x):r!==void 0?k={flexGrow:void 0,flexShrink:void 0,flexBasis:r}:k={flexGrow:1},A.jsx("div",{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:z,style:{...Vt,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...k},children:A.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...S,touchAction:R==="horizontal"?"pan-y":"pan-x"},children:e})})}it.displayName="Panel";const Vt={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Ut({layout:e,panelConstraints:t,panelId:n,panelIndex:o}){let r,a;const l=e[n],s=t.find(i=>i.panelId===n);if(s){const i=s.maxSize,u=s.collapsible?s.collapsedSize:s.minSize,c=[o,o+1];a=X({layout:ie({delta:u-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n],r=X({layout:ie({delta:i-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:r,valueMin:a,valueNow:l}}function st({children:e,className:t,disabled:n,disableDoubleClick:o,elementRef:r,id:a,style:l,...s}){const i=Se(a),u=xe({disabled:n,disableDoubleClick:o}),[c,h]=L.useState({}),[d,S]=L.useState("inactive"),[m,f]=L.useState(!1),g=L.useRef(null),p=we(g,r),{disableCursor:y,id:z,orientation:b,registerSeparator:v,updateSeparatorProps:R}=Ce(),E=b==="horizontal"?"vertical":"horizontal";J(()=>{const G=g.current;if(G!==null){const w={disabled:u.disabled,disableDoubleClick:u.disableDoubleClick,element:G,id:i},x=v(w),k=wt(D=>{S(D.next.state!=="inactive"&&D.next.hitRegions.some(N=>N.separator===w)?D.next.state:"inactive")}),C=ye(z,D=>{const{derivedPanelConstraints:N,layout:ne,separatorToPanels:se}=D.next,oe=se.get(w);if(oe){const $=oe[0],q=oe.indexOf($);h(Ut({layout:ne,panelConstraints:N,panelId:$.id,panelIndex:q}))}});return()=>{k(),C(),x()}}},[z,i,v,u]),L.useEffect(()=>{R(i,{disabled:n,disableDoubleClick:o})},[n,o,i,R]);let M;n&&!y&&(M="not-allowed");let j;return n?j="disabled":d==="active"?j="active":m?j="focus":j=d,A.jsx("div",{...s,"aria-controls":c.valueControls,"aria-disabled":n||void 0,"aria-orientation":E,"aria-valuemax":c.valueMax,"aria-valuemin":c.valueMin,"aria-valuenow":c.valueNow,children:e,className:t,"data-separator":j,"data-testid":i,id:i,onBlur:()=>f(!1),onFocus:()=>f(!0),ref:p,role:"separator",style:{flexBasis:"auto",cursor:M,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}st.displayName="Separator";function _t(e){const t=ve.c(10);let n,o,r;t[0]!==e?({className:n,ref:r,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("flex h-full w-full",n),t[4]=n,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==r||t[8]!==a?(l=A.jsx(at,{groupRef:r,"data-slot":"resizable-panel-group",className:a,...o}),t[6]=o,t[7]=r,t[8]=a,t[9]=l):l=t[9],l}function Jt(e){const t=ve.c(10);let n,o,r;t[0]!==e?({ref:o,style:r,...n}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==r?(a={overflow:"hidden",...r},t[4]=r,t[5]=a):a=t[5];let l;return t[6]!==n||t[7]!==o||t[8]!==a?(l=A.jsx(it,{panelRef:o,"data-slot":"resizable-panel",style:a,...n}),t[6]=n,t[7]=o,t[8]=a,t[9]=l):l=t[9],l}function qt(e){const t=ve.c(12);let n,o,r;t[0]!==e?({withHandle:r,className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("bg-border relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-ring aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90",n),t[4]=n,t[5]=a):a=t[5];let l;t[6]!==r?(l=r&&A.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:A.jsx(ft,{className:"size-2.5"})}),t[6]=r,t[7]=l):l=t[7];let s;return t[8]!==o||t[9]!==a||t[10]!==l?(s=A.jsx(st,{"data-slot":"resizable-handle",className:a,...o,children:l}),t[8]=o,t[9]=a,t[10]=l,t[11]=s):s=t[11],s}export{_t as R,Jt as a,qt as b};
@@ -1 +0,0 @@
1
- import{m as s,an as c,ak as f,u as l,v as u,N as d,P as p,ao as m,b as k,g as b,ap as I,h as $,aq as y,ar as C}from"./agent-icon-DHk7TnW1.js";import{n as S}from"./BookOpen01-Cu2i97yZ.js";import{ah as T}from"./index-D9wygnbU.js";const e={overview:$,settings:I,automations:b,"site-editor":k,code:m,content:p,blog:S,assets:d,releases:u,hosting:T,e2e:l,analytics:f,cdn:c,files:s};function v(n){return n in e}function a(n){const t=y(n);if(t.type==="icon"){const o=C(t.name);return o?{kind:"component",Component:o}:null}return t.type==="url"?{kind:"url",src:t.url}:null}function N(n){if(n.kind==="system")return v(n.tabId)?{kind:"component",Component:e[n.tabId]}:{kind:"fallback"};const t=a(n.iconUrl);if(t)return t;if(!n.appId)return{kind:"fallback"};const o=n.connections.find(r=>r.id===n.appId);if(!o)return{kind:"fallback"};const i=a(o.icon);return i||{kind:"fallback"}}export{N as r};
@@ -1 +0,0 @@
1
- import{aF as qe,bu as ae,aG as W,cn as Ge,dB as Xe,c as Y,a4 as Ye,hi as He,i as nt,j as s,b as ee,q as it,r as F,aE as Pt,aD as Dt,e as rt,t as Le,K as Ne,E as $e,dL as Lt,C as Mt,n as se,m as q,af as at,B as re,P as wt,h as we,gT as et,gf as tt,gg as st,a5 as yt,hd as ct,o as dt,b2 as lt,as as vt,aN as mt,aM as ut,aH as ft,aI as gt,aJ as _t,aK as Et,b5 as Tt,aL as ht,av as Gt,u as At,i2 as It,i6 as kt,R as Bt,d as Ut,_ as Kt,X as Vt,Z as Ft,Y as zt}from"./index-D9wygnbU.js";import{g as Rt,a as Yt,P as Ke,l as Ht,b as $t,C as Ve,d as Qt,p as Zt,c as Jt,e as Wt,u as qt}from"./role-color-DUV_b0hq.js";import{B as Me}from"./badge-BGmWPELn.js";import{a as Xt}from"./SwitchHorizontal01-2Pb5aRtq.js";import{s as Fe}from"./Plus-D2V2-fTF.js";import{s as es}from"./Trash01-Bu2u0WVA.js";import{C as ts}from"./collection-table-wrapper-BbdjpVWW.js";import{E as ot}from"./empty-state-GIO1CyUk.js";import{S as Qe}from"./search-input-DbkaTSNM.js";import{P as pt,D as xt}from"./ai-providers-logos-DD3qZ33J.js";import{a as ss}from"./tool-set-selector-CKA5xrb6.js";import{b as St}from"./use-connection-Lv1GX4XO.js";import{d as ls}from"./repository-binding-C2KfYomQ.js";import{u as os,h as ns}from"./use-ai-providers-DTX4zdTq.js";import{C as Ze}from"./checkbox-JFndFNuZ.js";import{S as ce}from"./switch-B0tv99B3.js";import{b as be,c as je,T as Pe,a as De}from"./tooltip-CVxFMGcO.js";import{I as Ot}from"./integration-icon-BPaLmZuD.js";import{P as is}from"./project-icon-D3VravgB.js";import{s as rs}from"./use-project-scope-lI2ukIh1.js";import{t as as}from"./Globe04-dU-sELuJ.js";import{t as cs}from"./ChevronUp-s7k4XU_p.js";import{bt as ds,m as ms}from"./agent-icon-DHk7TnW1.js";import{A as us}from"./access-gate-CLxhnjg9.js";import"./table-CV4RoALe.js";import"./ArrowUp-Cf_Jm-4W.js";import"./SearchMd-DUXCcvZJ.js";import"./use-infinite-scroll-uPmbLXy7.js";import"./ArrowLeft-B34wRVvp.js";import"./useSuspenseInfiniteQuery-DKXKbUjm.js";import"./infiniteQueryObserver-oJohchTM.js";import"./use-mcp-client-BZnIK-Y4.js";import"./auth-Dh-2aYdX.js";import"./collection-search-j-a5PWZI.js";import"./connection-CG7u8AbM.js";import"./url-slug-BR0vmMxN.js";import"./Minus-BikCplhC.js";import"./index-3FmhyOXc.js";import"./LinkBroken01-D4Fzd5qu.js";import"./AlertCircle-D-4TK36c.js";import"./Tool01-s83oNDoy.js";import"./BookOpen01-Cu2i97yZ.js";import"./CheckCircle-D-W30b_A.js";import"./ChevronSelectorVertical-BORaKUYt.js";import"./UserSquare-DE5Uc7_R.js";import"./CreditCard01-C2QL2326.js";import"./Key01-zay6mYZz.js";import"./Monitor01-DLndo6aP.js";import"./Sun-BFXO9tQN.js";import"./Play-D_FIXuay.js";import"./ShoppingBag01-Dak2svm7.js";import"./Upload01-mgXAmijc.js";import"./Users01-C3CmvyvK.js";import"./XClose-l5OHkJlr.js";import"./Zap-DN6rNQ1C.js";import"./capability-load-error-CmORVXZR.js";const Je="basic-usage",We=[{id:Je,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["CODEX_SUBSCRIPTION_CONNECT","CODEX_SUBSCRIPTION_STATUS","SUBSCRIPTION_USAGE_GET","CODEX_SUBSCRIPTION_DISCONNECT","CODEX_SUBSCRIPTION_SYNC","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","CONNECTION_TOOLS_SEARCH","CONNECTION_TOOL_CALL","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_LAST_USED_LIST","SIDEBAR_GET","SIDEBAR_PREFERENCES_SET","PROJECT_FOLDER_ENSURE","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","ORGANIZATION_BILLING_PLAN_PRICES","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","THREAD_SANDBOX_START","REPOSITORY_SEARCH_BRANCHES","GIT_PROVIDER_CAPABILITIES","GIT_ACCOUNT_LIST","REPOSITORY_LIST","REPOSITORY_SEARCH","CHANGE_REQUEST_STATE","CHANGE_REQUEST_LAST_MERGED","CHANGE_REQUEST_LIST_OPEN","CHANGE_REQUEST_CHECK_LOG","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","ORGANIZATION_HAS_SITE","ORGANIZATION_BLOCKS_EDITOR_SET","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_PROMPT_LIST","TASK_BOARD_PROMPT_UPSERT","TASK_BOARD_PROMPT_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_PREVIEW_PROBE","ANALYTICS_INSTALL","TASK_BOARD_ITEM_RERUN","TASK_BOARD_RUN_REVIEWER","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE","TASK_BOARD_SPRINT_LIST","TASK_BOARD_SPRINT_CREATE","TASK_BOARD_SPRINT_UPDATE","TASK_BOARD_SPRINT_START","TASK_BOARD_SPRINT_COMPLETE","TASK_BOARD_SPRINT_DELETE","TASK_BOARD_ADMIN_ORG_LIST","TASK_BOARD_DELIVERY","TASK_BOARD_OPERATION","TASK_BOARD_OPERATION_TASKS","TASK_BOARD_REWORK","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_QUALITY","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS","THREAD_ANALYTICS_ORG_LIST","THREAD_ANALYTICS_LIVE","THREAD_ANALYTICS_USAGE","THREAD_ANALYTICS_ERRORS","NOTIFICATION_LIST","NOTIFICATION_MARK_READ","NOTIFICATION_SUBSCRIPTION_SET","NOTIFICATION_SUBSCRIPTION_LIST","generate_image","web_search","deep_research","suggest_task","preview_navigate","update_interests"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_AUTOMATION_LIST","JIRA_AUTOMATION_UPSERT","JIRA_RUN_START"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_GET","ORGANIZATION_BILLING_PORTAL","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","REPORTS_SETUP","REPORTS_RUN","REPORTS_BIND","REPORTS_CONNECTION_STATUS","REPORTS_SET_REPOSITORY"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE","PROJECT_FOLDERS_SET"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","FILE_OBJECT_UPLOAD","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","AI_PLAN_SET","AI_PLAN_INVOICE_UPGRADE","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT","GITHUB_COPILOT_CONNECT","GITHUB_COPILOT_STATUS","GITHUB_COPILOT_DISCONNECT","GITHUB_COPILOT_SHARE"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"experiments:manage",label:"Manage experiments",description:"Create, update, and delete A/B experiments, and view results",section:"Experiments",tools:["EXPERIMENT_LIST","EXPERIMENT_GET","EXPERIMENT_CREATE","EXPERIMENT_SUGGEST","EXPERIMENT_IMPLEMENT","EXPERIMENT_IMPLEMENT_LOCAL","EXPERIMENT_PREVIEW_SYNC_LOCAL","EXPERIMENT_UPDATE","EXPERIMENT_DELETE","EXPERIMENT_RESULTS"],dangerous:!0},{id:"registry:manage",label:"Browse registry",description:"Browse the Deco MCP catalog",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"lake:read",label:"Query the data lake",description:"Run read-only SQL over the organization's own data lake (orders from connected stores)",section:"Developer",tools:["CUSTOMER_LAKE_QUERY"]}];[...We.find(t=>t.id===Je)?.tools??[]];const fs=["agents:manage","connections:manage"];new Set(We.filter(t=>fs.includes(t.id)).flatMap(t=>t.tools));function gs(){if(ke)return ke;const t=new Map;for(const e of We){if(e.id===Je)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return ke=Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l})),ke}function _s(t,e,l){if(l)return!0;const i=new Set(e);return t.tools.every(r=>i.has(r))}function Es(t,e,l){const i=new Set(e);for(const r of t.tools)l?i.add(r):i.delete(r);return Array.from(i)}let ke=null;const Ts=qe({role:qe({id:W().optional(),slug:W().optional(),label:W()}),allowAllStaticPermissions:Ge(),staticPermissions:ae(W()),toolSet:Xe(W(),ae(W())),allowAllModels:Ge(),modelSet:Xe(W(),ae(W())),allowAllProjects:Ge(),projectSet:ae(W()),projectExceptions:ae(W()),allowAllConnections:Ge(),connectionExceptions:ae(W()),memberIds:ae(W())});function ze(t,e,l,i){const r=s.jsx(ce,{checked:e,disabled:l,onCheckedChange:i});return l?s.jsx(be,{children:s.jsxs(je,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:r})}),s.jsx(De,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):r}function hs(t){const e=Y.c(41),{allowAllStaticPermissions:l,staticPermissions:i,onAllowAllChange:r,onPermissionsChange:n,readOnly:a,searchQuery:f}=t,_=a===void 0?!1:a,d=ee();let u;e[0]!==f?(u=f.trim().toLowerCase(),e[0]=f,e[1]=u):u=e[1];const m=F.useDeferredValue(u);let T;if(e[2]!==l||e[3]!==m||e[4]!==r||e[5]!==n||e[6]!==_||e[7]!==f||e[8]!==i||e[9]!==d){const E=gs(),c=(h,p)=>{if(!_){if(l&&p){const D=E.flatMap(Rs).flatMap(Is);r(!1),n(D.filter(o=>!h.tools.includes(o)));return}l||n(Es(h,i,!p))}};let g;e[11]!==m?(g=h=>{const{section:p,capabilities:D}=h;return{section:p,capabilities:D.filter(o=>!m||o.label.toLowerCase().includes(m)||o.description.toLowerCase().includes(m))}},e[11]=m,e[12]=g):g=e[12];const S=E.map(g).filter(As);let C;e[13]!==d?(C=d("settings.orgRoleDetail.general"),e[13]=d,e[14]=C):C=e[14];let I;e[15]!==d?(I=d("settings.orgRoleDetail.allOrgPermissions"),e[15]=d,e[16]=I):I=e[16];let N;e[17]!==d?(N=d("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=d,e[18]=N):N=e[18];let x;e[19]!==l||e[20]!==r||e[21]!==n?(x=()=>{r(!l),n([])},e[19]=l,e[20]=r,e[21]=n,e[22]=x):x=e[22];let b;e[23]!==l||e[24]!==_||e[25]!==d||e[26]!==x?(b=ze(d,l,_,x),e[23]=l,e[24]=_,e[25]=d,e[26]=x,e[27]=b):b=e[27];let R;e[28]!==l||e[29]!==r||e[30]!==n||e[31]!==_?(R=_?void 0:()=>{r(!l),n([])},e[28]=l,e[29]=r,e[30]=n,e[31]=_,e[32]=R):R=e[32];let O;e[33]!==R||e[34]!==I||e[35]!==N||e[36]!==b?(O=s.jsx(tt,{children:s.jsx(st,{title:I,description:N,action:b,onClick:R})}),e[33]=R,e[34]=I,e[35]=N,e[36]=b,e[37]=O):O=e[37];let j;e[38]!==O||e[39]!==C?(j=s.jsx(et,{title:C,children:O}),e[38]=O,e[39]=C,e[40]=j):j=e[40],T=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[j,S.length===0&&m?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:d("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:f})}):S.map(h=>{const{section:p,capabilities:D}=h;return s.jsx(et,{title:p,children:s.jsx(tt,{children:D.map(o=>{const A=_s(o,i,l);return s.jsx(st,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[o.label,o.dangerous&&s.jsx(yt,{size:12,className:"text-warning shrink-0"})]}),description:o.description,action:ze(d,A,_,()=>c(o,A)),onClick:_?void 0:()=>c(o,A)},o.id)})})},p)})]})}),e[2]=l,e[3]=m,e[4]=r,e[5]=n,e[6]=_,e[7]=f,e[8]=i,e[9]=d,e[10]=T}else T=e[10];return T}function As(t){return t.capabilities.length>0}function Is(t){return t.tools}function Rs(t){return t.capabilities}const Ct={anthropic:"Anthropic",openrouter:"OpenRouter"},ps={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function xs(t,e){const l=t.indexOf("/"),i=l>0?t.slice(0,l):e;return i.startsWith("~")?i.slice(1):i}function Ss(t){return ps[t]??Ct[t]??t}function Os(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const Nt=30;function Cs(t){const e=Y.c(40),{connectionId:l,subProviderId:i,subProviderName:r,groupLogo:n,models:a,allConnectionModelIds:f,selectedModels:_,allowAllModels:d,allConnectionModelsSelected:u,onToggleModel:m,onExitAllowAll:T,readOnly:E,defaultExpanded:c}=t,g=ee(),[S,C]=F.useState(c),I=c||S,N=C,[x,b]=F.useState(Nt);let R;e[0]!==u||e[1]!==d||e[2]!==_?(R=h=>d||u||_.includes("*")||_.includes(h),e[0]=u,e[1]=d,e[2]=_,e[3]=R):R=e[3];const O=R;let j;if(e[4]!==f||e[5]!==d||e[6]!==l||e[7]!==I||e[8]!==n||e[9]!==O||e[10]!==a||e[11]!==T||e[12]!==m||e[13]!==E||e[14]!==i||e[15]!==r||e[16]!==g||e[17]!==x){let h;e[19]!==O?(h=B=>O(B.id),e[19]=O,e[20]=h):h=e[20];const p=a.filter(h).length,D=a.slice(0,x),o=a.length>x;let A;e[21]===Symbol.for("react.memo_cache_sentinel")?(A=()=>N(Ps),e[21]=A):A=e[21];const M=n??pt[i]??xt;let P;e[22]!==r||e[23]!==M?(P=s.jsx(Ot,{icon:M,name:r,size:"sm"}),e[22]=r,e[23]=M,e[24]=P):P=e[24];let L;e[25]!==r?(L=s.jsx("span",{className:"text-sm font-medium truncate",children:r}),e[25]=r,e[26]=L):L=e[26];let y;e[27]!==P||e[28]!==L?(y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[P,L]}),e[27]=P,e[28]=L,e[29]=y):y=e[29];const U=g("settings.orgRoleDetail.enabledCount",{enabledCount:p,total:a.length});let G;e[30]!==U?(G=s.jsx(Me,{variant:"muted",children:U}),e[30]=U,e[31]=G):G=e[31];let K;e[32]!==I?(K=I?s.jsx(cs,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(vt,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=I,e[33]=K):K=e[33];let z;e[34]!==G||e[35]!==K?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[G,K]}),e[34]=G,e[35]=K,e[36]=z):z=e[36];let k;e[37]!==z||e[38]!==y?(k=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-accent cursor-pointer",onClick:A,children:[y,z]}),e[37]=z,e[38]=y,e[39]=k):k=e[39],j=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[k,I&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[D.map(B=>{const H=O(B.id),Q=()=>{if(!E){if(d){T(l,f,B.id);return}m(l,B.id)}};return s.jsxs("div",{className:q("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!E&&"hover:bg-accent cursor-pointer"),onClick:Q,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:js,children:E?s.jsx(be,{children:s.jsxs(je,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{checked:H,disabled:!0,onCheckedChange:bs})})}),s.jsx(De,{children:s.jsx("p",{children:g("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ce,{checked:H,onCheckedChange:Q})})]},B.id)}),o&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",onClick:()=>b(Ns),children:g("settings.orgRoleDetail.showMore",{remaining:a.length-x})})]})]}),e[4]=f,e[5]=d,e[6]=l,e[7]=I,e[8]=n,e[9]=O,e[10]=a,e[11]=T,e[12]=m,e[13]=E,e[14]=i,e[15]=r,e[16]=g,e[17]=x,e[18]=j}else j=e[18];return j}function Ns(t){return t+Nt}function bs(){}function js(t){return t.stopPropagation()}function Ps(t){return!t}function Ds(t){const e=Y.c(33),{connection:l,selectedModels:i,allowAllModels:r,onToggleModel:n,onExitAllowAll:a,allConnectionModelsSelected:f,searchQuery:_,readOnly:d}=t,u=ns(l.id);let m,T,E,c,g;if(e[0]!==f||e[1]!==r||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==a||e[6]!==n||e[7]!==u||e[8]!==d||e[9]!==_||e[10]!==i){g=Symbol.for("react.early_return_sentinel");e:{let I;e[16]!==l.label?(I=A=>({...A,id:A.modelId,provider:l.label}),e[16]=l.label,e[17]=I):I=e[17];const N=u.filter(ys).map(I),x=_.trim().toLowerCase(),b=x?N.filter(A=>A.title.toLowerCase().includes(x)||A.id.toLowerCase().includes(x)||A.provider?.toLowerCase().includes(x)):N;if(b.length===0){g=null;break e}const R=new Map;for(const A of b){const M=xs(A.id,l.providerId),P=R.get(M)??{models:[],logo:null};P.models.push({id:A.id,title:Os(A.title),logo:A.logo}),!P.logo&&A.logo&&(P.logo=A.logo),R.set(M,P)}const O=Array.from(R.entries()).map(ws).sort(Ms),j=O.length===1||x.length>0;E="flex flex-col gap-3";const h=pt[l.providerId]??xt;let p;e[18]!==l.providerId||e[19]!==h?(p=s.jsx("img",{src:h,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=h,e[20]=p):p=e[20];const D=Ct[l.providerId]??l.providerId;let o;e[21]!==D?(o=s.jsx("h4",{className:"text-sm font-medium",children:D}),e[21]=D,e[22]=o):o=e[22],e[23]!==o||e[24]!==p?(c=s.jsxs("div",{className:"flex items-center gap-2",children:[p,o]}),e[23]=o,e[24]=p,e[25]=c):c=e[25],m="flex flex-col gap-3",T=O.map(A=>s.jsx(Cs,{connectionId:l.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:N.map(Ls),selectedModels:i,allowAllModels:r,allConnectionModelsSelected:f,onToggleModel:n,onExitAllowAll:a,readOnly:d,defaultExpanded:j},A.id))}e[0]=f,e[1]=r,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=a,e[6]=n,e[7]=u,e[8]=d,e[9]=_,e[10]=i,e[11]=m,e[12]=T,e[13]=E,e[14]=c,e[15]=g}else m=e[11],T=e[12],E=e[13],c=e[14],g=e[15];if(g!==Symbol.for("react.early_return_sentinel"))return g;let S;e[26]!==m||e[27]!==T?(S=s.jsx("div",{className:m,children:T}),e[26]=m,e[27]=T,e[28]=S):S=e[28];let C;return e[29]!==E||e[30]!==c||e[31]!==S?(C=s.jsxs("div",{className:E,children:[c,S]}),e[29]=E,e[30]=c,e[31]=S,e[32]=C):C=e[32],C}function Ls(t){return t.id}function Ms(t,e){return t.name.localeCompare(e.name)}function ws(t){const[e,l]=t;return{id:e,name:Ss(e),logo:l.logo,models:l.models}}function ys(t,e,l){return l.findIndex(i=>i.modelId===t.modelId)===e}function vs(t){const e=Y.c(41),{allowAllModels:l,modelSet:i,onAllowAllChange:r,onModelSetChange:n,readOnly:a,searchQuery:f}=t,_=a===void 0?!1:a,d=ee(),u=F.useDeferredValue(f),m=os();let T;e[0]!==i||e[1]!==n?(T=(h,p)=>{const D=i[h]??[],o={...i};if(D.includes(p)){const A=D.filter(M=>M!==p);A.length===0?delete o[h]:o[h]=A}else o[h]=[...D,p];n(o)},e[0]=i,e[1]=n,e[2]=T):T=e[2];const E=T;let c;e[3]!==i||e[4]!==r||e[5]!==n?(c=(h,p,D)=>{r(!1),n({...i,[h]:p.filter(o=>o!==D)})},e[3]=i,e[4]=r,e[5]=n,e[6]=c):c=e[6];const g=c,S=!_&&"hover:bg-accent cursor-pointer";let C;e[7]!==S?(C=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",S),e[7]=S,e[8]=C):C=e[8];let I;e[9]!==l||e[10]!==r||e[11]!==n||e[12]!==_?(I=()=>{if(_)return;const h=!l;r(h),h&&n({})},e[9]=l,e[10]=r,e[11]=n,e[12]=_,e[13]=I):I=e[13];let N;e[14]!==d?(N=d("settings.orgRoleDetail.allModels"),e[14]=d,e[15]=N):N=e[15];let x;e[16]!==N?(x=s.jsx("span",{className:"text-sm font-medium",children:N}),e[16]=N,e[17]=x):x=e[17];let b;e[18]!==l||e[19]!==r||e[20]!==n||e[21]!==_||e[22]!==d?(b=s.jsx("div",{onClick:ks,children:_?s.jsx(be,{children:s.jsxs(je,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{checked:l,disabled:!0,onCheckedChange:Gs})})}),s.jsx(De,{children:s.jsx("p",{children:d("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ce,{checked:l,onCheckedChange:h=>{r(h),h&&n({})}})}),e[18]=l,e[19]=r,e[20]=n,e[21]=_,e[22]=d,e[23]=b):b=e[23];let R;e[24]!==C||e[25]!==I||e[26]!==x||e[27]!==b?(R=s.jsxs("div",{className:C,onClick:I,children:[x,b]}),e[24]=C,e[25]=I,e[26]=x,e[27]=b,e[28]=R):R=e[28];let O;e[29]!==m||e[30]!==l||e[31]!==u||e[32]!==g||e[33]!==i||e[34]!==_||e[35]!==d||e[36]!==E?(O=m.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:d("settings.orgRoleDetail.noLlmConnectionsConfigured")}):m.map(h=>s.jsx(F.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(we,{className:"size-4"}),d("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Ds,{connection:h,selectedModels:i[h.id]??[],allowAllModels:l,onToggleModel:E,onExitAllowAll:g,allConnectionModelsSelected:(i[h.id]??[]).includes("*"),searchQuery:u,readOnly:_})},h.id)),e[29]=m,e[30]=l,e[31]=u,e[32]=g,e[33]=i,e[34]=_,e[35]=d,e[36]=E,e[37]=O):O=e[37];let j;return e[38]!==R||e[39]!==O?(j=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[R,O]}),e[38]=R,e[39]=O,e[40]=j):j=e[40],j}function Gs(){}function ks(t){return t.stopPropagation()}function Bs(t){const e=Y.c(49),{allowAllProjects:l,projectSet:i,projectExceptions:r,onAllowAllChange:n,onProjectSetChange:a,onProjectExceptionsChange:f,readOnly:_,searchQuery:d}=t,u=_===void 0?!1:_,m=ee(),T=F.useDeferredValue(d),E=ls();let c;if(e[0]!==l||e[1]!==T||e[2]!==n||e[3]!==f||e[4]!==a||e[5]!==r||e[6]!==i||e[7]!==u||e[8]!==d||e[9]!==m||e[10]!==E){const g=rs(E),S=T.trim().toLowerCase(),C=S?g.filter(L=>L.title.toLowerCase().includes(S)):g;let I;e[12]!==l||e[13]!==f||e[14]!==a||e[15]!==r||e[16]!==i?(I=L=>{const[y,U]=l?[r,f]:[i,a];U(y.includes(L)?y.filter(G=>G!==L):[...y,L])},e[12]=l,e[13]=f,e[14]=a,e[15]=r,e[16]=i,e[17]=I):I=e[17];const N=I;let x;e[18]!==n||e[19]!==f||e[20]!==a?(x=L=>{n(L),a([]),f([])},e[18]=n,e[19]=f,e[20]=a,e[21]=x):x=e[21];const b=x,R=!u&&"hover:bg-accent cursor-pointer";let O;e[22]!==R?(O=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",R),e[22]=R,e[23]=O):O=e[23];let j;e[24]!==l||e[25]!==u||e[26]!==b?(j=()=>{u||b(!l)},e[24]=l,e[25]=u,e[26]=b,e[27]=j):j=e[27];let h;e[28]!==m?(h=m("settings.orgRoleDetail.allProjects"),e[28]=m,e[29]=h):h=e[29];let p;e[30]!==h?(p=s.jsx("span",{className:"text-sm font-medium",children:h}),e[30]=h,e[31]=p):p=e[31];let D;e[32]!==m?(D=m("settings.orgRoleDetail.allProjectsDescription"),e[32]=m,e[33]=D):D=e[33];let o;e[34]!==D?(o=s.jsx("span",{className:"text-xs text-muted-foreground",children:D}),e[34]=D,e[35]=o):o=e[35];let A;e[36]!==o||e[37]!==p?(A=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[p,o]}),e[36]=o,e[37]=p,e[38]=A):A=e[38];let M;e[39]!==l||e[40]!==u||e[41]!==b||e[42]!==m?(M=s.jsx("div",{onClick:Ks,children:u?s.jsx(be,{children:s.jsxs(je,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{checked:l,disabled:!0,onCheckedChange:Us})})}),s.jsx(De,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ce,{checked:l,onCheckedChange:b})}),e[39]=l,e[40]=u,e[41]=b,e[42]=m,e[43]=M):M=e[43];let P;e[44]!==A||e[45]!==M||e[46]!==O||e[47]!==j?(P=s.jsxs("div",{className:O,onClick:j,children:[A,M]}),e[44]=A,e[45]=M,e[46]=O,e[47]=j,e[48]=P):P=e[48],c=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 p-4",children:[P,g.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noProjectsAvailable")}):C.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noProjectsMatch",{searchQuery:d})}):s.jsx("div",{className:"flex flex-col gap-1",children:C.map(L=>{const y=l?!r.includes(L.id):i.includes(L.id);return s.jsxs("label",{className:q("flex items-center gap-3 px-3 py-2 rounded-lg border border-transparent",u?"cursor-default":"hover:bg-accent cursor-pointer"),children:[s.jsx(Ze,{checked:y,disabled:u,onCheckedChange:()=>{u||N(L.id)}}),s.jsx(is,{icon:L.icon,name:L.title}),s.jsx("span",{className:"text-sm truncate",children:L.title})]},L.id)})})]}),e[0]=l,e[1]=T,e[2]=n,e[3]=f,e[4]=a,e[5]=r,e[6]=i,e[7]=u,e[8]=d,e[9]=m,e[10]=E,e[11]=c}else c=e[11];return c}function Us(){}function Ks(t){return t.stopPropagation()}function Vs(t){const e=Y.c(48),{allowAllConnections:l,connectionExceptions:i,onAllowAllChange:r,onConnectionExceptionsChange:n,readOnly:a,searchQuery:f,children:_}=t,d=a===void 0?!1:a,u=ee(),m=F.useDeferredValue(f),T=St();let E;if(e[0]!==T||e[1]!==m){const P=m.trim().toLowerCase();E=P?T.filter(L=>L.title.toLowerCase().includes(P)):T,e[0]=T,e[1]=m,e[2]=E}else E=e[2];const c=E;let g;e[3]!==i||e[4]!==n?(g=P=>{n(i.includes(P)?i.filter(L=>L!==P):[...i,P])},e[3]=i,e[4]=n,e[5]=g):g=e[5];const S=g,C=!d&&"hover:bg-accent cursor-pointer";let I;e[6]!==C?(I=q("flex items-center justify-between px-4 py-3 border-b border-border",C),e[6]=C,e[7]=I):I=e[7];let N;e[8]!==l||e[9]!==r||e[10]!==d?(N=()=>{d||r(!l)},e[8]=l,e[9]=r,e[10]=d,e[11]=N):N=e[11];let x;e[12]!==u?(x=u("settings.orgRoleDetail.allConnections"),e[12]=u,e[13]=x):x=e[13];let b;e[14]!==x?(b=s.jsx("span",{className:"text-sm font-medium",children:x}),e[14]=x,e[15]=b):b=e[15];let R;e[16]!==u?(R=u("settings.orgRoleDetail.allConnectionsDescription"),e[16]=u,e[17]=R):R=e[17];let O;e[18]!==R?(O=s.jsx("span",{className:"text-xs text-muted-foreground",children:R}),e[18]=R,e[19]=O):O=e[19];let j;e[20]!==O||e[21]!==b?(j=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[b,O]}),e[20]=O,e[21]=b,e[22]=j):j=e[22];let h;e[23]!==l||e[24]!==r?(h=()=>r(!l),e[23]=l,e[24]=r,e[25]=h):h=e[25];let p;e[26]!==l||e[27]!==d||e[28]!==u||e[29]!==h?(p=ze(u,l,d,h),e[26]=l,e[27]=d,e[28]=u,e[29]=h,e[30]=p):p=e[30];let D;e[31]!==p?(D=s.jsx("div",{onClick:Fs,children:p}),e[31]=p,e[32]=D):D=e[32];let o;e[33]!==j||e[34]!==D||e[35]!==I||e[36]!==N?(o=s.jsxs("div",{className:I,onClick:N,children:[j,D]}),e[33]=j,e[34]=D,e[35]=I,e[36]=N,e[37]=o):o=e[37];let A;e[38]!==l||e[39]!==_||e[40]!==i||e[41]!==c||e[42]!==d||e[43]!==S?(A=l?s.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4 flex flex-col gap-1",children:c.map(P=>s.jsxs("label",{className:q("flex items-center gap-3 px-3 py-2 rounded-lg border border-transparent",d?"cursor-default":"hover:bg-accent cursor-pointer"),children:[s.jsx(Ze,{checked:!i.includes(P.id),disabled:d,onCheckedChange:()=>{d||S(P.id)}}),s.jsx(Ot,{icon:P.icon,name:P.title,size:"sm"}),s.jsx("span",{className:"text-sm truncate",children:P.title})]},P.id))}):s.jsx("div",{className:"flex-1 min-h-0",children:_}),e[38]=l,e[39]=_,e[40]=i,e[41]=c,e[42]=d,e[43]=S,e[44]=A):A=e[44];let M;return e[45]!==o||e[46]!==A?(M=s.jsxs("div",{className:"flex flex-col h-full",children:[o,A]}),e[45]=o,e[46]=A,e[47]=M):M=e[47],M}function Fs(t){return t.stopPropagation()}function zs(t){const e=Y.c(75),{open:l,onOpenChange:i,selectedMemberIds:r,onAddMembers:n}=t,a=ee(),[f,_]=F.useState(""),d=F.useDeferredValue(f);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];const[m,T]=F.useState(u),{data:E}=ct();let c,g,S,C,I,N,x,b,R,O,j;if(e[1]!==E?.data?.members||e[2]!==d||e[3]!==n||e[4]!==i||e[5]!==l||e[6]!==m||e[7]!==f||e[8]!==r||e[9]!==a){const G=E?.data?.members??[];let K;e[21]!==d?(K=V=>{const Z=d.toLowerCase();return V.user?.name?.toLowerCase().includes(Z)||V.user?.email?.toLowerCase().includes(Z)},e[21]=d,e[22]=K):K=e[22];const z=G.filter(K);let k;e[23]!==n||e[24]!==i||e[25]!==m?(k=()=>{n(m),T([]),i(!1)},e[23]=n,e[24]=i,e[25]=m,e[26]=k):k=e[26],S=k,g=mt,O=l,j=i,c=ut,b="sm:max-w-md p-0";let B;e[27]!==a?(B=a("settings.orgRoleDetail.addMembersToRole"),e[27]=a,e[28]=B):B=e[28];let H;e[29]!==B?(H=s.jsx(ft,{children:B}),e[29]=B,e[30]=H):H=e[30];let Q;e[31]!==a?(Q=a("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=a,e[32]=Q):Q=e[32];let X;e[33]!==Q?(X=s.jsx(gt,{children:Q}),e[33]=Q,e[34]=X):X=e[34],e[35]!==H||e[36]!==X?(R=s.jsxs(_t,{className:"px-6 pt-6",children:[H,X]}),e[35]=H,e[36]=X,e[37]=R):R=e[37],N="flex flex-col h-80";let te;e[38]!==a?(te=a("settings.orgRoleDetail.searchMembers"),e[38]=a,e[39]=te):te=e[39],e[40]!==f||e[41]!==te?(x=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(Qe,{value:f,onChange:_,placeholder:te,className:"w-full"})}),e[40]=f,e[41]=te,e[42]=x):x=e[42],C="flex-1 overflow-auto",I=z.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a(f?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:z.map(V=>{const Z=V.role!=="owner",J=r.includes(V.id),le=m.includes(V.id);return s.jsxs("label",{className:q("flex items-center gap-3 p-2 rounded-lg",!Z||J?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-accent"),children:[s.jsx(Ze,{checked:le||J,onCheckedChange:()=>{!Z||J||T(oe=>oe.includes(V.id)?oe.filter(ne=>ne!==V.id):[...oe,V.id])},disabled:!Z||J}),s.jsx(dt,{url:V.user?.image??void 0,fallback:V.user?.name??"?",shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:V.user?.name||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:V.user?.email})]}),!Z&&s.jsx(Me,{variant:"secondary",className:"shrink-0",children:a("settings.orgRoleDetail.owner")}),J&&Z&&s.jsx(Me,{variant:"outline",className:"shrink-0",children:a("settings.orgRoleDetail.added")})]},V.id)})}),e[1]=E?.data?.members,e[2]=d,e[3]=n,e[4]=i,e[5]=l,e[6]=m,e[7]=f,e[8]=r,e[9]=a,e[10]=c,e[11]=g,e[12]=S,e[13]=C,e[14]=I,e[15]=N,e[16]=x,e[17]=b,e[18]=R,e[19]=O,e[20]=j}else c=e[10],g=e[11],S=e[12],C=e[13],I=e[14],N=e[15],x=e[16],b=e[17],R=e[18],O=e[19],j=e[20];let h;e[43]!==C||e[44]!==I?(h=s.jsx("div",{className:C,children:I}),e[43]=C,e[44]=I,e[45]=h):h=e[45];let p;e[46]!==h||e[47]!==N||e[48]!==x?(p=s.jsxs("div",{className:N,children:[x,h]}),e[46]=h,e[47]=N,e[48]=x,e[49]=p):p=e[49];let D;e[50]!==a?(D=a("settings.orgRoleDetail.cancel"),e[50]=a,e[51]=D):D=e[51];let o;e[52]!==D?(o=s.jsx(Et,{children:D}),e[52]=D,e[53]=o):o=e[53];const A=m.length===0;let M;e[54]!==m.length||e[55]!==a?(M=a("settings.orgRoleDetail.addWithCount",{count:m.length}),e[54]=m.length,e[55]=a,e[56]=M):M=e[56];let P;e[57]!==S||e[58]!==A||e[59]!==M?(P=s.jsx(Tt,{onClick:S,disabled:A,children:M}),e[57]=S,e[58]=A,e[59]=M,e[60]=P):P=e[60];let L;e[61]!==o||e[62]!==P?(L=s.jsxs(ht,{className:"px-6 pb-6",children:[o,P]}),e[61]=o,e[62]=P,e[63]=L):L=e[63];let y;e[64]!==c||e[65]!==p||e[66]!==L||e[67]!==b||e[68]!==R?(y=s.jsxs(c,{className:b,children:[R,p,L]}),e[64]=c,e[65]=p,e[66]=L,e[67]=b,e[68]=R,e[69]=y):y=e[69];let U;return e[70]!==g||e[71]!==y||e[72]!==O||e[73]!==j?(U=s.jsx(g,{open:O,onOpenChange:j,children:y}),e[70]=g,e[71]=y,e[72]=O,e[73]=j,e[74]=U):U=e[74],U}function Ys(t){const e=Y.c(33),{memberIds:l,onMemberIdsChange:i,readOnly:r,readOnlyMessage:n,searchQuery:a,addMemberDialogOpen:f,onAddMemberDialogOpenChange:_}=t,d=r===void 0?!1:r,u=n===void 0?void 0:n,m=ee(),T=F.useDeferredValue(a),{data:E}=ct();let c,g,S;if(e[0]!==E?.data?.members||e[1]!==T||e[2]!==l||e[3]!==i||e[4]!==d||e[5]!==u||e[6]!==a||e[7]!==m){const b=E?.data?.members??[];let R;e[11]!==l?(R=o=>l.includes(o.id),e[11]=l,e[12]=R):R=e[12];const O=b.filter(R);let j;e[13]!==T?(j=o=>{const A=T.toLowerCase();return o.user?.name?.toLowerCase().includes(A)||o.user?.email?.toLowerCase().includes(A)},e[13]=T,e[14]=j):j=e[14];const h=O.filter(j);let p;e[15]!==u||e[16]!==m?(p=u??m("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=u,e[16]=m,e[17]=p):p=e[17];const D=p;S="flex flex-col h-full",c="flex-1 overflow-auto",g=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:m("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:m("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):h.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noMembersMatch",{searchQuery:a})})}):s.jsx("div",{className:"p-4 space-y-2",children:h.map(o=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(dt,{url:o.user?.image??void 0,fallback:o.user?.name??"?",shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:o.user?.name||m("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o.user?.email})]}),d?s.jsx(be,{children:s.jsxs(je,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(re,{variant:"ghost",size:"sm",disabled:!0,"aria-label":m("settings.orgRoleDetail.removeMember",{name:o.user?.name||m("settings.orgRoleDetail.unknown")}),children:s.jsx(lt,{size:16})})})}),s.jsx(De,{children:s.jsx("p",{children:D})})]})}):s.jsx(re,{variant:"ghost",size:"sm","aria-label":m("settings.orgRoleDetail.removeMember",{name:o.user?.name||m("settings.orgRoleDetail.unknown")}),onClick:()=>i(l.filter(A=>A!==o.id)),children:s.jsx(lt,{size:16})})]},o.id))}),e[0]=E?.data?.members,e[1]=T,e[2]=l,e[3]=i,e[4]=d,e[5]=u,e[6]=a,e[7]=m,e[8]=c,e[9]=g,e[10]=S}else c=e[8],g=e[9],S=e[10];let C;e[18]!==c||e[19]!==g?(C=s.jsx("div",{className:c,children:g}),e[18]=c,e[19]=g,e[20]=C):C=e[20];let I;e[21]!==l||e[22]!==i?(I=b=>i([...l,...b]),e[21]=l,e[22]=i,e[23]=I):I=e[23];let N;e[24]!==f||e[25]!==l||e[26]!==_||e[27]!==I?(N=s.jsx(zs,{open:f,onOpenChange:_,selectedMemberIds:l,onAddMembers:I}),e[24]=f,e[25]=l,e[26]=_,e[27]=I,e[28]=N):N=e[28];let x;return e[29]!==S||e[30]!==C||e[31]!==N?(x=s.jsxs("div",{className:S,children:[C,N]}),e[29]=S,e[30]=C,e[31]=N,e[32]=x):x=e[32],x}function Hs(t){const e=Y.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(we,{className:"size-6 text-muted-foreground"})}),e[0]=l):l=e[0];let i;return e[1]!==t?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx(Ys,{...t})}),e[1]=t,e[2]=i):i=e[2],i}const $s={owner:[],admin:[],user:[]};function Qs(t,e,l,i){const r=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:r,staticPermissions:$s[t],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],projectExceptions:[],allowAllConnections:r,connectionExceptions:[],memberIds:e.filter(n=>n.role===t).map(n=>n.id)}}function Zs(t,e,l){const i=t.permission||{},r=i.self||[],n=r.includes("*"),a=n?[]:r.filter(E=>E!=="*"),f={};for(const[E,c]of Object.entries(i))if(!(E==="self"||E==="models"||E===Ke||E===Ve))if(E==="*")for(const g of l)f[g.id]=c.includes("*")?g.tools?.map(S=>S.name)??[]:c;else{const g=l.find(S=>S.id===E);g&&(f[E]=c.includes("*")?g.tools?.map(S=>S.name)??[]:c)}const _=i.models||[],d=_.length===0||_.includes("*:*"),u={};if(!d)for(const E of _){const c=E.indexOf(":");if(c===-1)continue;const g=E.slice(0,c),S=E.slice(c+1);u[g]||(u[g]=[]),u[g].push(S)}const m=Zt(Jt(i)),T=Wt(i[Ve]??[]);return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:n,staticPermissions:a,toolSet:f,allowAllModels:d,modelSet:u,allowAllProjects:m.kind!=="only",projectSet:m.kind==="only"?m.names:[],projectExceptions:m.kind==="except"?m.names:[],allowAllConnections:T.kind!=="only",connectionExceptions:T.kind==="except"?T.names:[],memberIds:e.filter(E=>E.role===t.role).map(E=>E.id)}}function Js(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[i,r]of Object.entries(t.toolSet))if(r.length>0){const a=e.find(f=>f.id===i)?.tools?.map(f=>f.name)??[];l[i]=a.length>0&&a.every(f=>r.includes(f))?["*"]:r}if(t.allowAllModels)l.models=["*:*"];else{const i=[];for(const[r,n]of Object.entries(t.modelSet))for(const a of n)i.push(`${r}:${a}`);i.length>0&&(l.models=i)}return t.allowAllProjects?t.projectExceptions.length>0&&(l[Ke]=Ht({names:t.projectExceptions})):l[Ke]=t.projectSet,t.allowAllConnections&&(l[Ve]=[$t,...t.connectionExceptions.map(Qt)]),l}function Ws(t,e,l){return t.kind==="builtin"?Qs(t.role,e,void 0):t.kind==="custom"?Zs(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],projectExceptions:[],allowAllConnections:!1,connectionExceptions:[],memberIds:[]}}function qs(t){const e=Y.c(19),{readOnly:l,readOnlyMessage:i,onOpen:r}=t,n=i===void 0?void 0:i,a=ee();let f;e[0]!==n||e[1]!==a?(f=n??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=n,e[1]=a,e[2]=f):f=e[2];const _=f;if(l){let T;e[3]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Fe,{size:16}),e[3]=T):T=e[3];let E;e[4]!==a?(E=a("settings.orgRoleDetail.addMember"),e[4]=a,e[5]=E):E=e[5];let c;e[6]!==E?(c=s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsxs(re,{variant:"outline",size:"sm",disabled:!0,children:[T,E]})})}),e[6]=E,e[7]=c):c=e[7];let g;e[8]!==_?(g=s.jsx(De,{children:s.jsx("p",{children:_})}),e[8]=_,e[9]=g):g=e[9];let S;return e[10]!==c||e[11]!==g?(S=s.jsx(be,{children:s.jsxs(je,{children:[c,g]})}),e[10]=c,e[11]=g,e[12]=S):S=e[12],S}let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Fe,{size:16}),e[13]=d):d=e[13];let u;e[14]!==a?(u=a("settings.orgRoleDetail.addMember"),e[14]=a,e[15]=u):u=e[15];let m;return e[16]!==r||e[17]!==u?(m=s.jsxs(re,{variant:"outline",size:"sm",onClick:r,children:[d,u]}),e[16]=r,e[17]=u,e[18]=m):m=e[18],m}function Xs(t){const e=Y.c(14),{locator:l}=Ye(),i=He(),r=St();let n;e[0]!==l?(n=Ne.members(l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==i?(a=()=>i.organization.listMembers(),e[2]=i,e[3]=a):a=e[3];let f;e[4]!==n||e[5]!==a?(f={queryKey:n,queryFn:a},e[4]=n,e[5]=a,e[6]=f):f=e[6];const{data:_,isPending:d}=nt(f);if(d||!r){let E;return e[7]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(se,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(we,{className:"size-8 text-muted-foreground"})})}),e[7]=E):E=e[7],E}let u;e[8]!==_?.data?.members?(u=_?.data?.members??[],e[8]=_?.data?.members,e[9]=u):u=e[9];const m=u;let T;return e[10]!==r||e[11]!==m||e[12]!==t?(T=s.jsx(el,{...t,members:m,connections:r}),e[10]=r,e[11]=m,e[12]=t,e[13]=T):T=e[13],T}function el({target:t,onBack:e,onSaved:l,members:i,connections:r}){const n=ee(),{locator:a}=Ye(),f=He(),_=it(),d=t.kind==="builtin",u=t.kind==="builtin"&&t.role==="owner",m=t.kind==="new",[T,E]=F.useState(d?"org":"mcp"),c=Pt({resolver:Dt(Ts),defaultValues:Ws(t,i,r)}),g=c.formState.isValid,S=c.formState.isDirty,C=rt({mutationFn:async o=>{const A=Js(o,r),M=o.role.slug||o.role.label.toLowerCase().replace(/\s+/g,"-"),P=(o.role.slug==="owner"||o.role.slug==="admin"||o.role.slug==="user")&&!o.role.id,L=async(y,U)=>{const G=i.filter(k=>k.role===(U??y)).map(k=>k.id),K=o.memberIds.filter(k=>!G.includes(k)),z=G.filter(k=>!o.memberIds.includes(k));for(const k of K){const B=await f.organization.updateMemberRole({memberId:k,role:[y]});if(B?.error)throw new Error(B.error.message??n("settings.orgRoleDetail.somethingWentWrong"))}for(const k of z){const B=await f.organization.updateMemberRole({memberId:k,role:["user"]});if(B?.error)throw new Error(B.error.message??n("settings.orgRoleDetail.somethingWentWrong"))}};if(P)return await L(o.role.slug),o;if(o.role.id){const y=o.role.label.toLowerCase().replace(/\s+/g,"-"),U=o.role.slug,G=y!==U,K=await f.organization.updateRole({roleId:o.role.id,data:{permission:A,...G?{roleName:y}:{}}});if(K?.error)throw new Error(K.error.message??n("settings.orgRoleDetail.somethingWentWrong"));return await L(G?y:U,G?U:void 0),G?{...o,role:{...o.role,slug:y}}:o}else{const y=await f.organization.createRole({role:M,permission:A});if(y?.error)throw new Error(y.error.message??n("settings.orgRoleDetail.somethingWentWrong"));for(const U of o.memberIds){const G=await f.organization.updateMemberRole({memberId:U,role:[M]});if(G?.error)throw new Error(G.error.message)}return{...o,role:{...o.role,id:y.data?.roleData?.id,slug:M}}}},onSuccess:(o,A)=>{_.invalidateQueries({queryKey:Ne.members(a)}),_.invalidateQueries({queryKey:Ne.organizationRoles(a)});const M=!A.role.id&&!A.role.slug,P=A.role.slug==="owner"&&!A.role.id;$e(P?"role_members_updated":M?"role_created":"role_updated",{role_slug:A.role.slug??null}),Le.success(n(P?"settings.orgRoleDetail.membersUpdatedSuccessfully":M?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),c.reset(o),l(o.role.id)},onError:o=>{Le.error(o instanceof Error?o.message:n("settings.orgRoleDetail.failedToSaveRole"))}}),I=c.handleSubmit(o=>{if(!o.role.label.trim()){Le.error(n("settings.orgRoleDetail.roleNameIsRequired")),c.setFocus("role.label");return}C.mutate(o)}),N=!u,x=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",b=[...u?[]:[{id:"mcp",label:n("settings.orgRoleDetail.mcpPermissions"),icon:ds}],{id:"org",label:n("settings.orgRoleDetail.organizationPermissions"),icon:as},{id:"models",label:n("settings.orgRoleDetail.models"),icon:Lt},{id:"projects",label:n("settings.orgRoleDetail.projects"),icon:ms},{id:"members",label:n("settings.orgRoleDetail.members"),icon:Mt}],[R,O]=F.useState(""),[j,h]=F.useState(!1),p=o=>{E(o),O("")},D={mcp:n("settings.orgRoleDetail.searchMcpServers"),org:n("settings.orgRoleDetail.searchPermissions"),models:n("settings.orgRoleDetail.searchModels"),projects:n("settings.orgRoleDetail.searchProjects"),members:n("settings.orgRoleDetail.searchMembers")};return s.jsx(se,{children:s.jsxs(se.Content,{className:q("flex flex-col",T!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(se.Title,{actions:N&&s.jsxs(s.Fragment,{children:[s.jsx(re,{variant:"outline",size:"sm",onClick:e,disabled:C.isPending,children:n("settings.orgRoleDetail.cancel")}),s.jsx(re,{size:"sm",onClick:I,disabled:C.isPending||!g||!S,children:C.isPending?n("settings.orgRoleDetail.saving"):n(m?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Rt(t.role,!0):Yt(c.watch("role.label")))}),u&&s.jsx(at,{size:16,className:"text-muted-foreground shrink-0"}),m||t.kind==="custom"?s.jsx("input",{...c.register("role.label"),placeholder:n("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:m}):s.jsx("span",{className:"truncate",children:x})]})}),s.jsx(s.Fragment,{children:s.jsx(wt.Toolbar.Left.Portal,{children:s.jsx(se.Tabs,{children:b.map(o=>s.jsx(se.Tab,{active:T===o.id,onClick:()=>p(o.id),children:o.label},o.id))})})}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(Qe,{value:R,onChange:O,placeholder:D[T]??"Search...",className:"w-full md:w-[375px]"}),T==="members"&&s.jsx(qs,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>h(!0)})]})]})}),s.jsx("div",{className:q("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",T!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:q(T!=="org"&&"h-full overflow-hidden",T!=="models"&&T!=="projects"&&T!=="org"&&"border border-border rounded-xl bg-card"),children:[T==="mcp"&&!u&&s.jsx(F.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(we,{className:"size-6 text-muted-foreground"})}),children:s.jsx(Vs,{allowAllConnections:c.watch("allowAllConnections"),connectionExceptions:c.watch("connectionExceptions"),onAllowAllChange:o=>{c.setValue("allowAllConnections",o,{shouldDirty:!0}),c.setValue("connectionExceptions",[],{shouldDirty:!0})},onConnectionExceptionsChange:o=>c.setValue("connectionExceptions",o,{shouldDirty:!0}),readOnly:t.kind==="builtin",searchQuery:R,children:s.jsx(ss,{toolSet:c.watch("toolSet"),onToolSetChange:o=>c.setValue("toolSet",o,{shouldDirty:!0}),searchQuery:R})})}),T==="org"&&s.jsx(hs,{allowAllStaticPermissions:c.watch("allowAllStaticPermissions"),staticPermissions:c.watch("staticPermissions"),onAllowAllChange:o=>c.setValue("allowAllStaticPermissions",o,{shouldDirty:!0}),onPermissionsChange:o=>c.setValue("staticPermissions",o,{shouldDirty:!0}),readOnly:u,searchQuery:R}),T==="models"&&s.jsx(vs,{allowAllModels:c.watch("allowAllModels"),modelSet:c.watch("modelSet"),onAllowAllChange:o=>c.setValue("allowAllModels",o,{shouldDirty:!0}),onModelSetChange:o=>c.setValue("modelSet",o,{shouldDirty:!0}),readOnly:u,searchQuery:R}),T==="projects"&&s.jsx(Bs,{allowAllProjects:c.watch("allowAllProjects"),projectSet:c.watch("projectSet"),projectExceptions:c.watch("projectExceptions"),onAllowAllChange:o=>c.setValue("allowAllProjects",o,{shouldDirty:!0}),onProjectSetChange:o=>c.setValue("projectSet",o,{shouldDirty:!0}),onProjectExceptionsChange:o=>c.setValue("projectExceptions",o,{shouldDirty:!0}),readOnly:u,searchQuery:R}),T==="members"&&s.jsx(Hs,{memberIds:c.watch("memberIds"),onMemberIdsChange:o=>c.setValue("memberIds",o,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?n("settings.orgRoleDetail.userIsDefaultRoleMessage"):n("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:R,addMemberDialogOpen:j,onAddMemberDialogOpenChange:h})]})})]})})}function tl(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function sl(t){const e=Y.c(6),{area:l,children:i}=t,{isPrivileged:r,loading:n,error:a}=Gt();let f;return e[0]!==l||e[1]!==i||e[2]!==a||e[3]!==r||e[4]!==n?(f=s.jsx(us,{granted:r,loading:n,error:a,area:l,children:i}),e[0]=l,e[1]=i,e[2]=a,e[3]=r,e[4]=n,e[5]=f):f=e[5],f}const ll=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function ol(){const t=Y.c(128),e=ee(),[l,i]=F.useState(""),[r,n]=F.useState(null),a=Ut();let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={strict:!1},t[0]=f):f=t[0];const{role:_}=At(f),{locator:d}=Ye(),u=He(),m=it(),{customRoles:T,refetch:E}=qt();let c;t[1]!==a?(c=w=>a({to:".",search:v=>({...v,role:w})}),t[1]=a,t[2]=c):c=t[2];const g=c;let S;e:{if(!_){S=null;break e}if(_==="new"){S={kind:"new"};break e}if(_.startsWith("builtin-")){S={kind:"builtin",role:_.slice(8)};break e}let w;t[3]!==_?(w=$=>$.id===_,t[3]=_,t[4]=w):w=t[4];const v=T.find(w);S=v?{kind:"custom",role:v}:null}const C=S;let I;t[5]!==d?(I=Ne.members(d),t[5]=d,t[6]=I):I=t[6];let N;t[7]!==u?(N=()=>u.organization.listMembers(),t[7]=u,t[8]=N):N=t[8];let x;t[9]!==I||t[10]!==N?(x={queryKey:I,queryFn:N},t[9]=I,t[10]=N,t[11]=x):x=t[11];const{data:b}=nt(x);let R;t[12]!==b?.data?.members?(R=b?.data?.members??[],t[12]=b?.data?.members,t[13]=R):R=t[13];const O=R;let j;t[14]!==O?(j=w=>O.filter(v=>v.role===w).length,t[14]=O,t[15]=j):j=t[15];const h=j;let p;if(t[16]!==T||t[17]!==h||t[18]!==l||t[19]!==e){let w;t[21]!==h||t[22]!==e?(w=ie=>({kind:"builtin",role:{...ie,memberCount:h(ie.role),label:e(ie.labelKey)}}),t[21]=h,t[22]=e,t[23]=w):w=t[23];const v=ll.map(w);let $;t[24]!==h?($=ie=>({kind:"custom",role:{...ie,memberCount:h(ie.role)}}),t[24]=h,t[25]=$):$=t[25];const bt=T.map($);if(p=[...v,...bt],l){const ie=l.toLowerCase();p=p.filter(jt=>jt.role.label.toLowerCase().includes(ie))}t[16]=T,t[17]=h,t[18]=l,t[19]=e,t[20]=p}else p=t[20];let D;t[26]!==u?(D=async w=>{const v=await u.organization.deleteRole({roleId:w});if(v?.error)throw new Error(v.error.message);return v?.data},t[26]=u,t[27]=D):D=t[27];const o=rt({mutationFn:D,onSuccess:(w,v)=>{$e("role_deleted",{role_id:v}),m.invalidateQueries({queryKey:Ne.members(d)}),m.invalidateQueries({queryKey:Ne.organizationRoles(d)}),Le.success(e("settings.roles.deletedSuccessfully")),E(),C?.kind==="custom"&&C.role.id===v&&g(void 0)},onError:cl});let A;t[28]!==e?(A=e("settings.roles.columnRole"),t[28]=e,t[29]=A):A=t[29];let M;t[30]!==A?(M={id:"role",header:A,render:al,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=A,t[31]=M):M=t[31];let P;t[32]!==e?(P=e("settings.roles.columnType"),t[32]=e,t[33]=P):P=t[33];let L;t[34]!==e?(L=w=>w.kind==="builtin"?s.jsx(Me,{variant:"secondary",children:e("settings.roles.builtIn")}):s.jsx(Me,{variant:"outline",children:e("settings.roles.custom")}),t[34]=e,t[35]=L):L=t[35];let y;t[36]!==P||t[37]!==L?(y={id:"type",header:P,render:L,cellClassName:"w-28 shrink-0"},t[36]=P,t[37]=L,t[38]=y):y=t[38];let U;t[39]!==e?(U=e("settings.roles.columnPermissions"),t[39]=e,t[40]=U):U=t[40];let G;t[41]!==e?(G=w=>{if(w.kind==="builtin")return w.role.role==="owner"||w.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const v=w.role,$=[];return v.allowsAllStaticPermissions?$.push(e("settings.roles.fullOrgAccess")):v.staticPermissionCount&&v.staticPermissionCount>0&&$.push(e("settings.roles.orgPermsCount",{count:v.staticPermissionCount})),v.allowsAllConnections?$.push(e("settings.roles.allConnections")):v.connectionCount&&v.connectionCount>0&&$.push(e("settings.roles.connectionCount",{count:v.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:$.length>0?$.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=G):G=t[42];let K;t[43]!==U||t[44]!==G?(K={id:"permissions",header:U,render:G,cellClassName:"flex-1 min-w-0"},t[43]=U,t[44]=G,t[45]=K):K=t[45];let z;t[46]!==e?(z=e("settings.roles.columnMembers"),t[46]=e,t[47]=z):z=t[47];let k;t[48]!==z?(k={id:"members",header:z,render:rl,cellClassName:"w-24 shrink-0"},t[48]=z,t[49]=k):k=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:w=>w.kind==="builtin"?null:s.jsxs(Kt,{children:[s.jsx(Vt,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",onClick:il,children:s.jsx(Xt,{size:16})})}),s.jsx(Ft,{align:"end",onClick:nl,children:s.jsxs(zt,{variant:"destructive",onClick:()=>{const v=w.role;v.id&&n({id:v.id,label:v.label})},children:[s.jsx(es,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let H;t[52]!==M||t[53]!==y||t[54]!==K||t[55]!==k||t[56]!==B?(H=[M,y,K,k,B],t[52]=M,t[53]=y,t[54]=K,t[55]=k,t[56]=B,t[57]=H):H=t[57];const Q=H;let X;t[58]!==g?(X=w=>{if(w.kind==="builtin")g(`builtin-${w.role.role}`);else{const v=w.role;g(v.id)}},t[58]=g,t[59]=X):X=t[59];const te=X;if(C){let w;t[60]!==g?(w=()=>g(void 0),t[60]=g,t[61]=w):w=t[61];let v;return t[62]!==E||t[63]!==g?(v=()=>{E(),g(void 0)},t[62]=E,t[63]=g,t[64]=v):v=t[64],s.jsx(Xs,{target:C,onBack:w,onSaved:v},tl(C))}let V;t[65]!==e?(V=e("settings.roles.searchPlaceholder"),t[65]=e,t[66]=V):V=t[66];let Z;t[67]===Symbol.for("react.memo_cache_sentinel")?(Z=w=>{w.key==="Escape"&&(i(""),w.target.blur())},t[67]=Z):Z=t[67];let J;t[68]!==l||t[69]!==V?(J=s.jsx(Qe,{value:l,onChange:i,placeholder:V,className:"w-full md:w-[375px]",onKeyDown:Z}),t[68]=l,t[69]=V,t[70]=J):J=t[70];let le;t[71]!==g?(le=()=>g("new"),t[71]=g,t[72]=le):le=t[72];let oe;t[73]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Fe,{size:16}),t[73]=oe):oe=t[73];let ne;t[74]!==e?(ne=e("settings.roles.createRole"),t[74]=e,t[75]=ne):ne=t[75];let de;t[76]!==le||t[77]!==ne?(de=s.jsx(se.Actions,{children:s.jsxs(re,{size:"sm",onClick:le,children:[oe,ne]})}),t[76]=le,t[77]=ne,t[78]=de):de=t[78];let me;t[79]!==J||t[80]!==de?(me=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[J,de]}),t[79]=J,t[80]=de,t[81]=me):me=t[81];let ue;t[82]!==l||t[83]!==e?(ue=l?s.jsx(ot,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(ot,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[82]=l,t[83]=e,t[84]=ue):ue=t[84];let fe;t[85]!==p||t[86]!==Q||t[87]!==te||t[88]!==ue?(fe=s.jsx(ts,{columns:Q,data:p,isLoading:!1,onRowClick:te,emptyState:ue}),t[85]=p,t[86]=Q,t[87]=te,t[88]=ue,t[89]=fe):fe=t[89];const Be=r!==null;let ye;t[90]===Symbol.for("react.memo_cache_sentinel")?(ye=w=>!w&&n(null),t[90]=ye):ye=t[90];let ge;t[91]!==e?(ge=e("settings.roles.deleteRoleTitle"),t[91]=e,t[92]=ge):ge=t[92];let _e;t[93]!==ge?(_e=s.jsx(ft,{children:ge}),t[93]=ge,t[94]=_e):_e=t[94];const Ue=r?.label??"";let Ee;t[95]!==e||t[96]!==Ue?(Ee=e("settings.roles.deleteRoleConfirm",{role:Ue}),t[95]=e,t[96]=Ue,t[97]=Ee):Ee=t[97];let Te;t[98]!==Ee?(Te=s.jsx(gt,{children:Ee}),t[98]=Ee,t[99]=Te):Te=t[99];let he;t[100]!==_e||t[101]!==Te?(he=s.jsxs(_t,{children:[_e,Te]}),t[100]=_e,t[101]=Te,t[102]=he):he=t[102];let Ae;t[103]!==e?(Ae=e("settings.roles.cancel"),t[103]=e,t[104]=Ae):Ae=t[104];let Ie;t[105]!==Ae?(Ie=s.jsx(Et,{children:Ae}),t[105]=Ae,t[106]=Ie):Ie=t[106];let Re;t[107]!==o||t[108]!==r?(Re=()=>{r?.id&&o.mutate(r.id),n(null)},t[107]=o,t[108]=r,t[109]=Re):Re=t[109];let pe;t[110]!==e?(pe=e("settings.roles.delete"),t[110]=e,t[111]=pe):pe=t[111];let xe;t[112]!==Re||t[113]!==pe?(xe=s.jsx(Tt,{onClick:Re,variant:"destructive",children:pe}),t[112]=Re,t[113]=pe,t[114]=xe):xe=t[114];let Se;t[115]!==Ie||t[116]!==xe?(Se=s.jsxs(ht,{children:[Ie,xe]}),t[115]=Ie,t[116]=xe,t[117]=Se):Se=t[117];let Oe;t[118]!==he||t[119]!==Se?(Oe=s.jsxs(ut,{children:[he,Se]}),t[118]=he,t[119]=Se,t[120]=Oe):Oe=t[120];let Ce;t[121]!==Be||t[122]!==Oe?(Ce=s.jsx(mt,{open:Be,onOpenChange:ye,children:Oe}),t[121]=Be,t[122]=Oe,t[123]=Ce):Ce=t[123];let ve;return t[124]!==me||t[125]!==fe||t[126]!==Ce?(ve=s.jsxs(It,{group:"members",className:"gap-6",children:[me,fe,Ce]}),t[124]=me,t[125]=fe,t[126]=Ce,t[127]=ve):ve=t[127],ve}function nl(t){return t.stopPropagation()}function il(t){return t.stopPropagation()}function rl(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function al(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",Rt(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(at,{size:12,className:"text-muted-foreground shrink-0"})]})}function cl(t,e){$e("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),Le.error(t instanceof Error?t.message:"Failed to delete role")}function dl(){const t=Y.c(13),e=ee();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{role:i}=At(l);let r;t[1]!==e?(r=e("settings.roles.failedToLoad"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=s.jsx(se,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:r})})}),t[3]=r,t[4]=n):n=t[4];let a;t[5]!==i?(a=i?s.jsx(se,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(we,{className:"size-8 text-muted-foreground"})})}):s.jsx(It,{group:"members",className:"gap-6",children:s.jsx(kt,{})}),t[5]=i,t[6]=a):a=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ol,{}),t[7]=f):f=t[7];let _;t[8]!==a?(_=s.jsx(F.Suspense,{fallback:a,children:f}),t[8]=a,t[9]=_):_=t[9];let d;return t[10]!==n||t[11]!==_?(d=s.jsx(Bt,{fallback:n,children:_}),t[10]=n,t[11]=_,t[12]=d):d=t[12],d}function go(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(sl,{area:"roles",children:s.jsx(dl,{})}),t[0]=e):e=t[0],e}export{go as default};
@@ -1 +0,0 @@
1
- import{c as $,a4 as re,a as pe,ak as Pe,K as fe,i as me,b as W,r as D,m as ee,j as n,h as Ie,B as We,aS as je,aR as Me,R as vt,E as he,x as Jt,aT as es,w as ts,v as ss,D as ns,ab as as,aU as rs,ar as yt,t as is,as as ls,d as Ae,n as at,aV as os,f as Se,U as rt,l as jt,e as cs,u as Le,aW as ds,aX as us,O as St,aY as fs,aZ as ms,N as hs,a_ as ps,P as ze}from"./index-D9wygnbU.js";import{i as Ye}from"./AlertCircle-D-4TK36c.js";import{E as xs,F as it,A as ye,G as gs,H as bs,k as vs,I as ys,J as js,K as Ss,L as kt,M as ks,n as Ts,m as Ns,o as _s}from"./agent-icon-DHk7TnW1.js";import{c as ws,u as Cs}from"./use-sidebar-collapsed-BWtKakyD.js";import{T as _e}from"./toolbar-icon-button-VHIAKSnc.js";import{C as Z,w as Ps}from"./index-D4fWOfQV.js";import{s as Tt,u as Nt}from"./use-voice-input-seZQKt1s.js";import{u as $e,b as Ze,c as Ee,d as _t,e as Is,s as Ms}from"./chat-context-B9rZ1ojJ.js";import{u as As,s as wt}from"./use-ai-providers-DTX4zdTq.js";import{b as Ct,a as Ls,u as $s}from"./use-organization-settings-CRwm0586.js";import{i as Es}from"./CheckCircle-D-W30b_A.js";import{s as lt}from"./XClose-l5OHkJlr.js";import{u as Fe,a as Fs,b as Pt,g as It}from"./repository-binding-C2KfYomQ.js";import{I as Mt}from"./integration-icon-BPaLmZuD.js";import{b as Rs}from"./use-entitlements-DpylFAUx.js";import{t as Xe}from"./ChevronUp-s7k4XU_p.js";import{O as Bs}from"./pair-Cd8NH003.js";import{u as Os,a as Ds}from"./use-thread-outputs-CN7E968n.js";import{u as zs}from"./use-deco-credits-DHv1UkQ9.js";import{C as Ks,u as Gs,V as Us,a as Hs}from"./input-8RS_xi7t.js";import{a as Vs}from"./agent-capabilities-DWTuevMP.js";import{u as qs,d as At,a as Qe,b as Je,c as Lt,e as Ws,g as $t,f as Et,h as ot}from"./thread-intent-CaGJ1BhS.js";import{f as Ys,b as Ft,c as Zs}from"./use-navigate-to-agent-DtRhmnlg.js";import{o as Xs,s as Qs,u as Js,S as en}from"./sandbox-lifecycle-context-oW4CAFSP.js";import{E as Rt}from"./empty-state-GIO1CyUk.js";import{t as tn,m as sn,u as nn}from"./use-chat-layout-state-DM5US5qS.js";import{u as an,a as rn,i as ln,n as on,b as cn}from"./cms-store-drafts-Cp0f_S-1.js";import{b as ct}from"./use-blocks-v8-project-Ol6SuT-M.js";import{C as dt}from"./index-D-5KT7YJ.js";import{a as Bt,b as Ot,P as Dt}from"./popover-DbdL41A-.js";import{T as Re,a as Be,c as Oe}from"./tooltip-CVxFMGcO.js";import{T as dn,a as un}from"./toggle-group-Cu1mfNzX.js";import{g as et,j as fn,k as mn,L as hn,s as pn}from"./shell-layout-DElHwXzP.js";import{u as zt,a as tt,r as xn,b as Kt,c as gn,d as bn}from"./thread-route-B-GLI-gf.js";import{a as st,b as Gt,v as vn,i as yn,d as jn,u as Sn,c as kn}from"./use-view-draft-kind-BsykP2yK.js";import{c as Tn,C as Nn,e as _n,b as wn,a as Cn,f as Pn}from"./command-DCUf4RGf.js";import{i as Ut}from"./Zap-DN6rNQ1C.js";import{g as In,S as Mn}from"./task-status-B4zkOwKe.js";import{u as Ht}from"./use-main-panel-tabs-DUVnwi3u.js";import{T as we}from"./tab-icon-glyph-BgVegBho.js";import{a as An}from"./UserSquare-DE5Uc7_R.js";import{b as Ln,c as Vt,S as $n,d as En}from"./select-C2TZ6w0T.js";import{S as Fn}from"./use-sandbox-events-BZs_wcMW.js";import{L as Rn}from"./project-apps-Oyn1Gnz0.js";import{L as nt,a as Bn}from"./legacy-main-redirect-DS2vLtmG.js";import{u as On}from"./use-mobile-C5u1Qie9.js";import{L as Dn}from"./preview-dialog-CAVf21hW.js";import{O as zn}from"./markdown-Ck8Lzm4U.js";import{B as ut}from"./blocks-preview-workspace-context-MbfgZRXf.js";import{p as Kn}from"./virtual-mcp-BJ1dRL5Y.js";import"./Tool01-s83oNDoy.js";import"./ArrowUp-Cf_Jm-4W.js";import"./ArrowLeft-B34wRVvp.js";import"./LinkBroken01-D4Fzd5qu.js";import"./BookOpen01-Cu2i97yZ.js";import"./Globe04-dU-sELuJ.js";import"./ChevronSelectorVertical-BORaKUYt.js";import"./CreditCard01-C2QL2326.js";import"./SwitchHorizontal01-2Pb5aRtq.js";import"./Key01-zay6mYZz.js";import"./Minus-BikCplhC.js";import"./Monitor01-DLndo6aP.js";import"./Sun-BFXO9tQN.js";import"./Play-D_FIXuay.js";import"./Plus-D2V2-fTF.js";import"./SearchMd-DUXCcvZJ.js";import"./ShoppingBag01-Dak2svm7.js";import"./Trash01-Bu2u0WVA.js";import"./Upload01-mgXAmijc.js";import"./Users01-C3CmvyvK.js";import"./sheet-mGT77pmX.js";import"./tool-namespace-DBtCIV7f.js";import"./drawer-DRyRdlMw.js";import"./collection-search-j-a5PWZI.js";import"./use-mcp-client-BZnIK-Y4.js";import"./auth-Dh-2aYdX.js";import"./use-mcp-prompts-Dtbvjt4h.js";import"./usage-stats-Dr1e2NVB.js";import"./form-B_7ux469.js";import"./label-CzgbmbQw.js";import"./utils-CVEq3hMx.js";import"./use-copy-B2pKd0TM.js";import"./index-CFoO-AVG.js";import"./checkbox-JFndFNuZ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./feature-paywall-DrXSdvNQ.js";import"./plan-ladder-ClYEg_1y.js";import"./use-decopilot-events-DGoOKMj0.js";import"./watch-sse-pool-HKLsGoUY.js";import"./task-board-DvkfyL0D.js";import"./schema-DqcJORUD.js";import"./backoff-CrEUbyZT.js";import"./collapsible-B4lmmxiu.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bo8RWBFo.js";import"./types-Bz47I97G.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-Lv1GX4XO.js";import"./file-type-icon-CLz3IVP9.js";import"./icon-button-DoWTRkdN.js";import"./chat-draft-BsgbOfj3.js";import"./tabs-DgvT8Pj5.js";import"./active-indicator-CCMhAsc_.js";import"./input-BKW9wk8M.js";import"./suggestion-CV5YiylC.js";import"./use-org-fs-Cd0Vep23.js";import"./useInfiniteQuery-Bz8irSN1.js";import"./infiniteQueryObserver-oJohchTM.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-ZYFX175e.js";import"./extract-connection-data-BKW6jN3t.js";import"./metadata-D72DunRR.js";import"./connection-CG7u8AbM.js";import"./url-slug-BR0vmMxN.js";import"./connection-card-C5XxA3Cv.js";import"./connection-slug-C9_jBSFl.js";import"./textarea-DM0e8Qi7.js";import"./schema-gnANfn26.js";import"./connection-form-helpers-B2Vjms_B.js";import"./authenticate-and-persist-oauth-DOEkiQ_u.js";import"./mcp-oauth-D2OwpRg0.js";import"./mcp-oauth-3agwb6e9.js";import"./collection-tabs-DHj6Urx3.js";import"./badge-BGmWPELn.js";import"./use-infinite-scroll-uPmbLXy7.js";import"./useSuspenseInfiniteQuery-DKXKbUjm.js";import"./use-task-board-events-n_cm8Gyp.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./serial-task-queue-CGOeQgpr.js";import"./resizable-B34lmUXk.js";import"./use-project-scope-lI2ukIh1.js";import"./index-3FmhyOXc.js";import"./use-deployment-admin-BTOwWmd_.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-D3VravgB.js";import"./use-debounced-value-BAQPYGcf.js";import"./new-project-dialog-MxeroDTr.js";import"./repository-picker-BQc3OAcG.js";import"./github-icon-1x8ZI6aO.js";import"./legacy-admin-welcome-dialog-D_Hj5ND0.js";import"./required-auth-layout-BszE36jh.js";import"./use-org-sso-COBiertF.js";import"./index-mxlRzmxc.js";import"./use-mcp-tools-ubXBMl6b.js";import"./resolve-tab-icon-DGM8yJyS.js";import"./use-task-metadata-xW_FzRqh.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-BnSN9oER.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-CG-6B_hv.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-CAIaH_bT.js";import"./file-share-button-BmXIU90b.js";import"./file-preview-mmsBTOqH.js";import"./utils-BoDmGD4u.js";import"./editor-FceeQfS7.js";function Gn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Un(){const t=$.c(26),e=As(),s=$e(),r=Ct(),i=Ls("chat_harness_codex"),{org:a}=re(),{data:l}=pe.useSession(),c=l?.user.id??"",u=Pe(),o=e.some(Vn);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!o;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const y=me(h);let b;t[9]!==a.id?(b=fe.githubCopilot(a.id),t[9]=a.id,t[10]=b):b=t[10];let j;t[11]!==u?(j=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=j):j=t[12];const x=r&&!i&&!o;let v;t[13]!==b||t[14]!==j||t[15]!==x?(v={queryKey:b,queryFn:j,enabled:x},t[13]=b,t[14]=j,t[15]=x,t[16]=v):v=t[16];const S=me(v);let g;t[17]!==a.id||t[18]!==c?(g=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=g):g=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const T=r&&i;let k;t[22]!==T||t[23]!==g||t[24]!==p?(k={queryKey:g,queryFn:p,enabled:T},t[22]=T,t[23]=g,t[24]=p,t[25]=k):k=t[25];const N=me(k);return r&&i&&!s?.isThreadLocked?e.some(Hn)||N.data?.connected!==!1?null:"codex-provider":Gn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:o||y.data?.connected!==!1||S.data?.connected!==!1||!!S.data?.orgShare})}function Hn(t){return Tt(t.providerId)}function Vn(t){return wt(t.providerId)}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Ke(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function qn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Wn(t){const e=$.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Yn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Yn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Zn(t){const e=$.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=W(),l=s+r+i,c=l>0?s/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==o?(f=o>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=y):y=e[10];let b;e[11]!==a||e[12]!==c?(b=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=b):b=e[13];let j;e[14]!==b?(j=n.jsxs("div",{className:"flex items-center gap-1.5",children:[y,n.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[14]=b,e[15]=j):j=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let v;e[17]!==u||e[18]!==a?(v=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=v):v=e[19];let S;e[20]!==v?(S=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:v})]}),e[20]=v,e[21]=S):S=e[21];let g;e[22]!==o||e[23]!==i||e[24]!==a?(g=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=g):g=e[25];let p;e[26]!==S||e[27]!==g||e[28]!==j?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[j,S,g]}),e[26]=S,e[27]=g,e[28]=j,e[29]=p):p=e[29];let T;return e[30]!==p||e[31]!==h?(T=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=T):T=e[32],T}function Xn(t){const e=$.c(14),{agentId:s,isError:r}=t,i=Fe(s),a=W();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const c=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==c?(o=n.jsx(Mt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=o):o=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=ee("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==o||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[o,f]}),e[11]=o,e[12]=f,e[13]=h):h=e[13],h}function Qn(t){const e=$.c(12),{isError:s}=t,r=W();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=n.jsx(Mt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=ee("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let d;return e[9]!==l||e[10]!==o?(d=n.jsxs(n.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=d):d=e[11],d}function Jn(t){const e=$.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",l=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Qn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Xn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==c||e[6]!==u?(o=n.jsx(D.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=o):o=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==l||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Ie,{className:"size-3 text-muted-foreground"}):a?n.jsx(xs,{size:12,className:"text-destructive"}):l?n.jsx(Ye,{size:12,className:"text-warning"}):n.jsx(Es,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==o||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,d,m]}),e[14]=o,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function ea(t){const e=$.c(51),{onClose:s,back:r,className:i}=t,a=W(),[l,c]=D.useState(null),{messages:u}=Ze(),{activeTask:o}=Ee(),{selectedModel:d,selectedVirtualMcp:m}=_t(),f=Is(u),h=[...u].reverse().find(fa),y=h?.metadata?.usage,b=[...u].reverse().find(ua)?.metadata?.models?.thinking,j=h?.metadata?.modelLimits?.contextWindow??(!b||b.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=y?.contextTokens??0,v=j&&j>0?(x/j*100).toFixed(1):null,S=u;let g;e[0]!==S?(g=S.filter(da).reduce(ca,0),e[0]=S,e[1]=g):g=e[1];const p=g,T=u;let k;e[2]!==T?(k=T.filter(oa).reduce(la,0),e[2]=T,e[3]=k):k=e[3];const N=k,_=Math.max(0,f.totalTokens-p-N),C=u[0],w=u.at(-1),I=C?.metadata?.created_at??o?.created_at,P=w?.metadata?.created_at??o?.updated_at,A=u.filter(ia),L=u.flatMap(aa),F=qn(b?.id??d?.modelId),B=m?.title??"Super Agent",R=Rs(),M=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:A.length},{label:a("chat.contextPanel.agentLabel"),value:B},...R?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:j?ve(j):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?ve(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:v!==null?`${v}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?ve(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?ve(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?ve(f.reasoningTokens):"0"},...R?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Ke(I)},{label:a("chat.contextPanel.lastActivityLabel"),value:Ke(P)}];if(!o&&A.length===0){let U;e[4]!==i?(U=ee("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=U):U=e[5];let se;e[6]!==a?(se=a("chat.contextPanel.title"),e[6]=a,e[7]=se):se=e[7];let ie;e[8]!==se?(ie=n.jsx("span",{className:"text-sm font-medium text-foreground",children:se}),e[8]=se,e[9]=ie):ie=e[9];let X;e[10]!==r?(X=r?n.jsx(it,{size:14,className:"text-muted-foreground"}):n.jsx(lt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=X):X=e[11];let J;e[12]!==s||e[13]!==X?(J=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:X}),e[12]=s,e[13]=X,e[14]=J):J=e[14];let le;e[15]!==ie||e[16]!==J?(le=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ie,J]}),e[15]=ie,e[16]=J,e[17]=le):le=e[17];let ae;e[18]!==a?(ae=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ae):ae=e[19];let ne;e[20]!==ae?(ne=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ae})}),e[20]=ae,e[21]=ne):ne=e[21];let oe;return e[22]!==le||e[23]!==ne||e[24]!==U?(oe=n.jsxs("div",{className:U,children:[le,ne]}),e[22]=le,e[23]=ne,e[24]=U,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=ee("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let E;e[28]!==a?(E=a("chat.contextPanel.title"),e[28]=a,e[29]=E):E=e[29];let V;e[30]!==E?(V=n.jsx("span",{className:"text-sm font-medium text-foreground",children:E}),e[30]=E,e[31]=V):V=e[31];let O;e[32]!==r?(O=r?n.jsx(it,{className:"size-3.5"}):n.jsx(lt,{className:"size-3.5"}),e[32]=r,e[33]=O):O=e[33];let z;e[34]!==s||e[35]!==O?(z=n.jsx(We,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:O}),e[34]=s,e[35]=O,e[36]=z):z=e[36];let K;e[37]!==V||e[38]!==z?(K=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[V,z]}),e[37]=V,e[38]=z,e[39]=K):K=e[39];let H;e[40]!==a?(H=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=H):H=e[41];let Y;e[42]!==H?(Y=n.jsx("span",{className:"text-xs text-muted-foreground",children:H}),e[42]=H,e[43]=Y):Y=e[43];let Q;e[44]!==N||e[45]!==_||e[46]!==p?(Q=n.jsx(Zn,{userTokens:p,assistantTokens:N,otherTokens:_}),e[44]=N,e[45]=_,e[46]=p,e[47]=Q):Q=e[47];let te;return e[48]!==Y||e[49]!==Q?(te=n.jsxs("div",{className:"flex flex-col gap-3",children:[Y,Q]}),e[48]=Y,e[49]=Q,e[50]=te):te=e[50],n.jsxs("div",{className:G,children:[K,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[L.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:L.map(na)})]}),n.jsx(Wn,{items:M}),te,A.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:A.map(U=>{const se=U.metadata?.created_at,ie=l?.id===U.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(ie?null:U),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("shrink-0 font-medium",U.role==="user"?"text-chart-1":"text-chart-2"),children:U.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:U.id})]}),se&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Ke(se)})]}),ie&&n.jsxs(n.Fragment,{children:[U.role==="assistant"&&(()=>{const X=U.metadata?._request;if(!X)return null;const J=X.systemSections??[],le=Math.max(1,...J.map(sa)),ae=J.reduce(ta,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[X.activeTools??0," / ",X.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ae/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((ne,oe)=>{const xe=ne.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,ce=ne.chars/le*100,ge=Math.round(ne.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:xe}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ge.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ce}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(U,null,2)})]})]},U.id)})})]})]})]})}function ta(t,e){return t+e.chars}function sa(t){return t.chars}function na(t,e){return n.jsx(Jn,{part:t},e)}function aa(t){return(t.parts??[]).filter(ra)}function ra(t){return t.type==="tool-subtask"}function ia(t){return t.role!=="system"}function la(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function oa(t){return t.role==="assistant"}function ca(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function da(t){return t.role==="user"}function ua(t){return t.role==="assistant"&&t.metadata?.models}function fa(t){return t.role==="assistant"&&t.metadata?.usage}function ma(t){const e=$.c(21),{onOpenContextPanel:s}=t,{org:r}=re(),{selectedVirtualMcp:i}=_t();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,o=Fe(c.id)??c,d=o.title??"Super Agent",m=o.icon??null,f=o.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let y;e[5]!==d?(y=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=y):y=e[6];let b;e[7]!==f?(b=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=b):b=e[8];let j;e[9]!==y||e[10]!==b?(j=n.jsxs("div",{className:"space-y-1.5",children:[y,b]}),e[9]=y,e[10]=b,e[11]=j):j=e[11];let x;e[12]!==h||e[13]!==j?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,j]}),e[12]=h,e[13]=j,e[14]=x):x=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Z.IceBreakers,{className:"pb-3"}),e[15]=v):v=e[15];let S;e[16]!==s?(S=n.jsxs(Z.Footer,{children:[v,n.jsx(Z.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=S):S=e[17];let g;return e[18]!==x||e[19]!==S?(g=n.jsxs(n.Fragment,{children:[x,S]}),e[18]=x,e[19]=S,e[20]=g):g=e[20],g}function ft(t){const e=$.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==l?(c=ee(l),e[0]=l,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let d;e[3]!==o?(d=ee("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Xe,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(ha)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let y;return e[13]!==c||e[14]!==f||e[15]!==h?(y=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=y):y=e[16],y}function ha(t){return n.jsx(Bs,{file:t},t.key)}function pa(){const t=$.c(13),e=$e()?.taskId??null,s=Os();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Ds(e,r),[a,l]=D.useState(!1),[c,u]=D.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ga),t[2]=o):o=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ft,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(xa),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ft,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function xa(t){return!t}function ga(t){return!t}function ba(){const t=$.c(1);D.use(Ze().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ks,{children:n.jsx(va,{})}),t[0]=e):e=t[0],e}function va(){const t=$.c(29),{active:e}=Gs(),{org:s}=re(),r=$e(),{isChatEmpty:i}=Ze(),[a,l]=D.useState("chat"),c=zs(),u=W(),o=Un(),{runtime:d}=Nt(r?.virtualMcpId);if(o!==null&&d!=="cms"){let N;return t[0]!==o||t[1]!==u?(N=n.jsx(Z,{className:"animate-in fade-in-0 duration-200",children:n.jsx(Z.Main,{className:"flex flex-col items-center",children:n.jsx(Z.EmptyState,{children:o==="codex-provider"?n.jsx(Z.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:Tt}):o==="claude-code-provider"?n.jsx(Z.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:wt}):n.jsx(Z.NoAiProviderEmptyState,{})})})}),t[0]=o,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ps(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let y;t[10]!==h?(y=h&&n.jsx(Z.CreditsEmptyState,{}),t[10]=h,t[11]=y):y=t[11];let b;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(b=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ma,{onOpenContextPanel:()=>l("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(Z.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(pa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(Z.Messages,{})})]}),n.jsx(Z.Footer,{children:n.jsx(Z.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=b):b=t[16];let j;t[17]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Us,{}),t[17]=j):j=t[17];const x=a!=="context"?!0:void 0,v=a!=="context",S=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let g;t[18]!==S?(g=ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",S),t[18]=S,t[19]=g):g=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(ea,{back:!0,onClose:()=>l("chat")}),t[20]=p):p=t[20];let T;t[21]!==x||t[22]!==v||t[23]!==g?(T=n.jsx("div",{inert:x,"aria-hidden":v,className:g,children:p}),t[21]=x,t[22]=v,t[23]=g,t[24]=T):T=t[24];let k;return t[25]!==y||t[26]!==b||t[27]!==T?(k=n.jsxs(Z,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[y,b,j,T]}),t[25]=y,t[26]=b,t[27]=T,t[28]=k):k=t[28],k}function ya(){const t=$.c(7),e=W();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Me,{children:n.jsx(ba,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(vt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ja(t){const e=$.c(10),{org:s}=re(),r=qs(),{data:i}=pe.useSession(),a=i?.user?.id,l=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==l?(u=fe.viewedThreadMetadataRefresh(s.id,l??""),e[0]=s.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&c;let d;e[3]!==r||e[4]!==l?(d=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==o||e[8]!==d?(m={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=o,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=$.c(14),{label:s,value:r,onChange:i,options:a}=t;let l;e[0]!==s?(l=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(Sa),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(o=n.jsx(un,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=o):o=e[10];let d;return e[11]!==l||e[12]!==o?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=d):d=e[13],d}function Sa(t){return n.jsxs(dn,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function ka(t){const e=$.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=W();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(gs,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==s.filtersActive||e[7]!==l||e[8]!==u?(o=n.jsx(Re,{asChild:!0,children:n.jsx(Bt,{asChild:!0,children:n.jsxs(_e,{"aria-label":l,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Be,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==o||e[15]!==m?(f=n.jsxs(Oe,{children:[o,m]}),e[14]=o,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const y=s.groupBy;let b;e[19]!==s?(b=U=>{he("tasks_panel_group_by_changed",{to_value:U}),s.setGroupBy(U)},e[19]=s,e[20]=b):b=e[20];let j;e[21]!==a?(j=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=j):j=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(bs,{size:13}),e[23]=x):x=e[23];let v;e[24]!==j?(v={value:"flat",label:j,icon:x},e[24]=j,e[25]=v):v=e[25];let S;e[26]!==a?(S=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=S):S=e[27];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(vs,{size:13}),e[28]=g):g=e[28];let p;e[29]!==S?(p={value:"status",label:S,icon:g},e[29]=S,e[30]=p):p=e[30];let T;e[31]!==v||e[32]!==p?(T=[v,p],e[31]=v,e[32]=p,e[33]=T):T=e[33];let k;e[34]!==s.groupBy||e[35]!==b||e[36]!==T||e[37]!==h?(k=n.jsx(Ge,{label:h,value:y,onChange:b,options:T}),e[34]=s.groupBy,e[35]=b,e[36]=T,e[37]=h,e[38]=k):k=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=s.typeFilter;let C;e[41]!==s?(C=U=>{he("tasks_panel_filter_changed",{to_value:U}),s.setTypeFilter(U)},e[41]=s,e[42]=C):C=e[42];let w;e[43]!==a?(w=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=w):w=e[44];let I;e[45]!==w?(I={value:"all",label:w},e[45]=w,e[46]=I):I=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let A;e[49]!==P?(A={value:"manual",label:P},e[49]=P,e[50]=A):A=e[50];let L;e[51]!==a?(L=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=L):L=e[52];let F;e[53]!==L?(F={value:"automation",label:L},e[53]=L,e[54]=F):F=e[54];let B;e[55]!==I||e[56]!==A||e[57]!==F?(B=[I,A,F],e[55]=I,e[56]=A,e[57]=F,e[58]=B):B=e[58];let R;e[59]!==s.typeFilter||e[60]!==N||e[61]!==C||e[62]!==B?(R=n.jsx(Ge,{label:N,value:_,onChange:C,options:B}),e[59]=s.typeFilter,e[60]=N,e[61]=C,e[62]=B,e[63]=R):R=e[63];let M;e[64]!==a?(M=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=M):M=e[65];const G=s.showAll?"team":"mine";let E;e[66]!==s?(E=U=>s.setShowAll(U==="team"),e[66]=s,e[67]=E):E=e[67];let V;e[68]!==a?(V=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=V):V=e[69];let O;e[70]!==V?(O={value:"mine",label:V},e[70]=V,e[71]=O):O=e[71];let z;e[72]!==a?(z=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=z):z=e[73];let K;e[74]!==z?(K={value:"team",label:z},e[74]=z,e[75]=K):K=e[75];let H;e[76]!==O||e[77]!==K?(H=[O,K],e[76]=O,e[77]=K,e[78]=H):H=e[78];let Y;e[79]!==M||e[80]!==G||e[81]!==E||e[82]!==H?(Y=n.jsx(Ge,{label:M,value:G,onChange:E,options:H}),e[79]=M,e[80]=G,e[81]=E,e[82]=H,e[83]=Y):Y=e[83];let Q;e[84]!==k||e[85]!==R||e[86]!==Y?(Q=n.jsxs(Ot,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[k,R,Y]}),e[84]=k,e[85]=R,e[86]=Y,e[87]=Q):Q=e[87];let te;return e[88]!==Q||e[89]!==f?(te=n.jsxs(Dt,{children:[f,Q]}),e[88]=Q,e[89]=f,e[90]=te):te=e[90],te}function Ta(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||tn(s))}function Na(){const t=$.c(2),e=Fs()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?At(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function _a(t){const e=$.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=W();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(wa,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&n.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ut,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==c||e[7]!==u?(o=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=o):o=e[8],o}function wa(t){const e=$.c(6),{virtualMcpId:s,size:r}=t,i=Pt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const mt=["thread"];function Ca(t){const e=$.c(53),{open:s,onOpenChange:r}=t,[i,a]=D.useState(""),{org:l}=re(),{setTaskId:c}=et(),u=Pe(),o=W();let d,m,f,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(l.id,h,d,mt),e[0]=l.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let y;e[6]!==d||e[7]!==u||e[8]!==h?(y=async()=>{const M=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...mt]});return{...M,items:M.items.filter(Pa)}},e[6]=d,e[7]=u,e[8]=h,e[9]=y):y=e[9];let b;e[10]!==s||e[11]!==m||e[12]!==y?(b={queryKey:m,enabled:s,queryFn:y,staleTime:1e4},e[10]=s,e[11]=m,e[12]=y,e[13]=b):b=e[13];const{data:j,isFetching:x}=f(b);let v;e[14]!==j?.items?(v=j?.items??[],e[14]=j?.items,e[15]=v):v=e[15];const S=v;let g;e[16]!==r?(g=M=>{M||a(""),r(M)},e[16]=r,e[17]=g):g=e[17];const p=g;let T;e[18]!==p||e[19]!==c?(T=M=>{p(!1),c(M.id,M.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=T):T=e[20];const k=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let _;e[23]!==N?(_=n.jsx(Jt,{children:N}),e[23]=N,e[24]=_):_=e[24];let C;e[25]!==o?(C=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==C?(w=n.jsx(es,{children:C}),e[27]=C,e[28]=w):w=e[28];let I;e[29]!==w||e[30]!==_?(I=n.jsxs(ts,{className:"sr-only",children:[_,w]}),e[29]=w,e[30]=_,e[31]=I):I=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let A;e[34]!==i||e[35]!==P?(A=n.jsx(Cn,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=A):A=e[36];let L;e[37]!==k||e[38]!==x||e[39]!==S||e[40]!==o||e[41]!==h?(L=n.jsx(Tn,{children:x&&S.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):S.length===0?n.jsx(Nn,{children:o("tasksPanel.globalSearchDialog.noResults")}):n.jsx(_n,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:S.map(M=>M.type==="thread"?n.jsxs(wn,{value:`thread:${M.id}:${M.title}`,onSelect:()=>k(M),className:"gap-2.5",children:[n.jsx(_a,{virtualMcpId:M.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:M.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(M.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${M.id}`):null)})}),e[37]=k,e[38]=x,e[39]=S,e[40]=o,e[41]=h,e[42]=L):L=e[42];let F;e[43]!==A||e[44]!==L?(F=n.jsxs(Pn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,L]}),e[43]=A,e[44]=L,e[45]=F):F=e[45];let B;e[46]!==I||e[47]!==F?(B=n.jsxs(ss,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,F]}),e[46]=I,e[47]=F,e[48]=B):B=e[48];let R;return e[49]!==p||e[50]!==s||e[51]!==B?(R=n.jsx(ns,{open:s,onOpenChange:p,children:B}),e[49]=p,e[50]=s,e[51]=B,e[52]=R):R=e[52],R}function Pa(t){return t.type==="thread"}function Ia(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function Ma(t){return t==="ephemeral"||t.startsWith("thread:")}function qt(t){const e=$.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:c,hideStatusIdle:u,indented:o}=t,d=W(),m=In(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",y=Pt(h?void 0:s.virtual_mcp_id);let b;e[0]!==y?(b=It(y),e[0]=y,e[1]=b):b=e[1];const j=b;fn(6e4);const x=l||!!s.trigger_id,v=s.id,S="button",g=0;let p;e[2]!==i?(p=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const T=o?"-ml-4 pl-6":"pl-[9px]",k=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==T||e[5]!==k?(N=ee("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",k),e[4]=T,e[5]=k,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==y?.icon||e[10]!==y?.title?(_=c&&!h&&n.jsx(ye,{icon:y?.icon??null,name:y?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=y?.icon,e[10]=y?.title,e[11]=_):_=e[11];let C;e[12]!==x||e[13]!==d?(C=x&&n.jsx(Ut,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=C):C=e[14];let w;e[15]!==d||e[16]!==s.title?(w=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=w):w=e[17];let I;e[18]!==w?(I=n.jsx("div",{className:"text-sm text-foreground truncate",children:w}),e[18]=w,e[19]=I):I=e[19];let P;e[20]!==C||e[21]!==I?(P=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[C,I]}),e[20]=C,e[21]=I,e[22]=P):P=e[22];let A;e[23]!==r||e[24]!==j||e[25]!==s.branch||e[26]!==s.updated_at?(A=s.updated_at&&n.jsxs("div",{className:ee("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Ma(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):j?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[j.owner,"/",j.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:as(new Date(s.updated_at))})]}),e[23]=r,e[24]=j,e[25]=s.branch,e[26]=s.updated_at,e[27]=A):A=e[27];let L;e[28]!==P||e[29]!==A?(L=n.jsxs("div",{className:"flex-1 min-w-0",children:[P,A]}),e[28]=P,e[29]=A,e[30]=L):L=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",B=!u&&n.jsx("span",{className:ee("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(Ie,{className:ee("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let R;e[31]!==a||e[32]!==d?(R=a&&n.jsxs(Oe,{children:[n.jsx(Re,{asChild:!0,children:n.jsx(We,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:E=>{E.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(rs,{className:"size-3.5"})})}),n.jsx(Be,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=R):R=e[33];let M;e[34]!==B||e[35]!==R?(M=n.jsxs("div",{className:F,children:[B,R]}),e[34]=B,e[35]=R,e[36]=M):M=e[36];let G;return e[37]!==i||e[38]!==L||e[39]!==M||e[40]!==p||e[41]!==N||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":v,role:S,tabIndex:g,onClick:i,onKeyDown:p,className:N,children:[_,L,M]}),e[37]=i,e[38]=L,e[39]=M,e[40]=p,e[41]=N,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const ht=["requires_action","in_progress","failed","expired","completed"];function Aa(t){const e=new Map(ht.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return ht.map(s=>({status:s,threads:e.get(s)}))}const La="sidebar.group.expanded.";function $a(t,e){const s=$.c(3),[r,i]=yt(`${La}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Wt(t){const e=$.c(18),{onClick:s,isFetching:r,indented:i}=t,a=W();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=ee("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&n.jsx(Ie,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":l,onClick:s,disabled:r,className:u,children:[o,m]}),e[11]=r,e[12]=s,e[13]=l,e[14]=u,e[15]=o,e[16]=m,e[17]=f):f=e[17],f}function Ea(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Fa(t){return t.member==="mine"&&!t.currentUserId}const Yt=4;let Ne=0;const Ve=[];function Ra(){for(;Ne<Yt&&Ve.length>0;){const t=Ve.shift();t&&t()}}function Zt(t){return new Promise((e,s)=>{const r=()=>{Ne++,t().then(e,s).finally(()=>{Ne--,Ra()})};Ne<Yt?r():Ve.push(r)})}const De=10;function pt(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ba(t,e,s,r){let i=0;for(const a of t)Xt(a,e,s,r)&&i++;return i}function Ue(t,e,s,r){return Ba(t,e,s,r)}function Oa(t,e){return!!(t>=De||t===0&&e)}function xt(t,e){return t<e}function Da(t,e){return e===!1?!1:e===!0?!0:t}function Xt(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ce=new Map,Te=new Map;function za(t,e){return e?t>=De?!0:null:!1}function gt(t){return Ce.get(t)}function Ka(t,e){Ce.set(t,e)}function Ga(t,e,s){const r=Ce.get(t);if(r!==void 0){s(r);return}let i=Te.get(t);i||(i=Zt(e).then(a=>(Ce.set(t,a),Te.delete(t),a)).catch(()=>(Te.delete(t),Promise.reject(new Error("group probe failed")))),Te.set(t,i)),i.then(s,()=>s(!1))}function bt(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===De,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ua(t,e,s,r,i){let a=0;for(const l of t)e.has(l.id)||Xt(l,s,r,i)&&a++;return a}function Ha(t,e,s,r){const i=$.c(8),{org:a}=re(),l=Ea(a.id,t,e,s);let c;i[0]!==s?(c=Fa(s),i[0]=s,i[1]=c):c=i[1];const u=c,[o,d]=D.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=Qe(),{threads:f,hasMore:h}=Je(),y=Ue(f,t,e,s),b=Oa(y,h),j=za(y,h),x=Pe();if(o.identity===l&&o.serverHasMore===null){const k=j??gt(l);k!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:k})}!u&&o.identity===l&&o.serverHasMore===null&&j===null&&gt(l)===void 0&&o.probeSubscribedIdentity!==l&&(d(k=>k.identity===l?{...k,isProbing:!0,probeSubscribedIdentity:l}:k),Ga(l,async()=>{const k=pt(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",k),{totalCount:_}=bt(N),C=Ue(m.threads.get(),t,e,s);return _===void 0?!1:xt(C,_)},k=>{d(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:k})}));const S=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;d(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Ue(f,t,e,s),C=pt(t,e,_,s,De),w=await Zt(()=>x.call("COLLECTION_THREADS_LIST",C)),{items:I,hasMore:P,totalCount:A}=bt(w),L=new Set(f.map(Va)),F=Ua(I,L,t,e,s),B=_;m.mergeThreads(I),d(R=>{if(R.identity!==N)return R;let M;return A!==void 0?M=xt(B+F,A):M=I.length===0||F===0?!1:P,Ka(N,M),{...R,isFetching:!1,serverHasMore:M}})}catch(_){const C=_,w=C instanceof Error?C.message:String(C);is.error(`Could not load more tasks: ${w}`),d(I=>I.identity===N?{...I,isFetching:!1}:I)}},g=o.isFetching||o.isProbing,p=!u&&!g&&Da(b,o.serverHasMore);let T;return i[2]!==g||i[3]!==S||i[4]!==p||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:p,isFetching:g,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:S},i[2]=g,i[3]=S,i[4]=p,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function Va(t){return t.id}function qa(t){const e=$.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,{isFetching:o,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=Ha("status",s,u),[y,b]=D.useState(!1);!y&&r.length===0&&h===!0&&!o&&!d&&(b(!0),queueMicrotask(()=>{m()}));let j;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let S;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==l||e[11]!==a?(S=g=>n.jsx(qt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:c&&g.created_by===u.currentUserId?()=>l(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},g.id),e[7]=i,e[8]=c,e[9]=u,e[10]=l,e[11]=a,e[12]=S):S=e[12],j=r.map(S),e[0]=i,e[1]=c,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=j}else j=e[6];let x;e[13]!==f||e[14]!==o||e[15]!==m?(x=(f||o)&&n.jsx(Wt,{onClick:()=>{m()},isFetching:o,indented:!0}),e[13]=f,e[14]=o,e[15]=m,e[16]=x):x=e[16];let v;return e[17]!==j||e[18]!==x?(v=n.jsxs(n.Fragment,{children:[j,x]}),e[17]=j,e[18]=x,e[19]=v):v=e[19],v}function Wa(t){const e=$.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,o=W(),d=Mn[s],m=d.icon,[f,h]=$a(`status-${s}`,!1);let y;e[0]!==f||e[1]!==h?(y=function(){h(!f)},e[0]=f,e[1]=h,e[2]=y):y=e[2];const b=y;let j;e[3]!==d.labelKey||e[4]!==o?(j=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(d.labelKey)}),e[3]=d.labelKey,e[4]=o,e[5]=j):j=e[5];let x;e[6]!==b?(x=w=>{w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),b())},e[6]=b,e[7]=x):x=e[7];let v;e[8]!==m||e[9]!==d.iconClassName?(v=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=v):v=e[10];let S;e[11]!==f?(S=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Xe,{size:14}):n.jsx(ls,{size:14})}),e[11]=f,e[12]=S):S=e[12];let g;e[13]!==v||e[14]!==S?(g=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[v,S]}),e[13]=v,e[14]=S,e[15]=g):g=e[15];let p;e[16]!==d.labelKey||e[17]!==o?(p=o(d.labelKey),e[16]=d.labelKey,e[17]=o,e[18]=p):p=e[18];let T;e[19]!==p?(T=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=T):T=e[20];let k;e[21]!==r.length?(k=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=k):k=e[22];let N;e[23]!==f||e[24]!==b||e[25]!==j||e[26]!==x||e[27]!==g||e[28]!==T||e[29]!==k?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":j,onClick:b,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[g,T,k]}),e[23]=f,e[24]=b,e[25]=j,e[26]=x,e[27]=g,e[28]=T,e[29]=k,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(qa,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=l,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let C;return e[40]!==N||e[41]!==_?(C=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=C):C=e[42],C}function Ya(t){const e=$.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:c,hasMore:u,isFetchingMore:o,onLoadMore:d,filtersActive:m}=t,f=W();if(s.length===0&&!u&&!o){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ys,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let v;e[1]!==m||e[2]!==f?(v=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=v):v=e[3];let S;return e[4]!==v?(S=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:v})]}),e[4]=v,e[5]=S):S=e[5],S}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==l||e[10]!==a||e[11]!==s){let S;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==l||e[17]!==a?(S=g=>n.jsx(Wa,{status:g.status,threads:g.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:c},g.status),e[13]=i,e[14]=h,e[15]=c,e[16]=l,e[17]=a,e[18]=S):S=e[18],x=Aa(s).map(S),e[6]=i,e[7]=h,e[8]=c,e[9]=l,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let v;return e[19]!==x?(v=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=v):v=e[20],v}let y;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==l||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==l||e[32]!==a?(x=v=>n.jsx(qt,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:h&&v.created_by===c.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0},v.id),e[28]=i,e[29]=h,e[30]=c,e[31]=l,e[32]=a,e[33]=x):x=e[33],y=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=l,e[25]=a,e[26]=s,e[27]=y}else y=e[27];let b;e[34]!==u||e[35]!==o||e[36]!==d?(b=(u||o)&&n.jsx(Wt,{onClick:d,isFetching:o}),e[34]=u,e[35]=o,e[36]=d,e[37]=b):b=e[37];let j;return e[38]!==y||e[39]!==b?(j=n.jsxs(n.Fragment,{children:[y,b]}),e[38]=y,e[39]=b,e[40]=j):j=e[40],j}function Za(t){const e=$.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ya,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Xa(t){const e=$.c(68);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:l}=re();let c;e[2]!==l.id?(c=je(l.id),e[2]=l.id,e[3]=c):c=e[3];const u=c.id,o=Na(),d=Ct(),m=st(),{threads:f,hasMore:h,isFetchingMore:y,fetchNextPage:b}=Je(),j=f.filter(tr),{hide:x,setScope:v}=Lt(),S=Ae(),{setTaskId:g,createNewTask:p}=et(),T=zt(),k=tt();let N;e[4]!==k||e[5]!==f||e[6]!==T?(N=xn({routeAgentId:T,threadVirtualMcpId:f.find(q=>q.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=f,e[6]=T,e[7]=N):N=e[7];const _=N;let C;e[8]!==r?(C=()=>{r?.()},e[8]=r,e[9]=C):C=e[9];const w=C,I=[...j].sort(er),[P,A]=D.useState("all"),[L,F]=D.useState("flat"),[B,R]=yt("sidebar-threads-scope-all",!1),[M,G]=D.useState(!1),[E,V]=D.useState(!1);let O;e[10]!==G?(O=()=>{he("tasks_panel_search_opened"),V(!0),G(!0)},e[10]=G,e[11]=O):O=e[11];const z=O,K=a??null;let H;e[12]!==K||e[13]!==P?(H={type:P,member:"mine",currentUserId:K},e[12]=K,e[13]=P,e[14]=H):H=e[14];const Y=H,Q={};B||(Q.created_by="me"),v(Q);let te;e[15]!==a?(te=q=>a?q.filter(de=>de.created_by===a):[],e[15]=a,e[16]=te):te=e[16];const U=te;let se;e[17]!==P?(se=q=>P==="automation"?q.filter(Ja):P==="manual"?q.filter(Qa):q,e[17]=P,e[18]=se):se=e[18];const ie=se,X=Ta(ie(B?I:U(I)),k);let J;e[19]!==k||e[20]!==w||e[21]!==a||e[22]!==x||e[23]!==S||e[24]!==l.slug||e[25]!==g||e[26]!==X?(J=q=>{if(a&&q.created_by&&q.created_by!==a)return;const de=q.id===k;if(x(q.id),mn(q.id),!de)return;const be=Ia(X,q.id,a);w(),be?g(be.id,be.virtual_mcp_id):S({to:"/$org",params:{org:l.slug}})},e[19]=k,e[20]=w,e[21]=a,e[22]=x,e[23]=S,e[24]=l.slug,e[25]=g,e[26]=X,e[27]=J):J=e[27];const le=J;let ae;e[28]!==w||e[29]!==g?(ae=q=>{w(),g(q.id,q.virtual_mcp_id)},e[28]=w,e[29]=g,e[30]=ae):ae=e[30];const ne=ae;let oe;e[31]!==_||e[32]!==k||e[33]!==f||e[34]!==w||e[35]!==p||e[36]!==a||e[37]!==u||e[38]!==m||e[39]!==o||e[40]!==d||e[41]!==g?(oe=()=>{const q=_??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:q}),w();const de=Ys(f,q,a,o(q),{blogDrafts:m==="blog"});if(de){g(de.id,de.virtual_mcp_id,{newThread:!0});return}const be=d?null:f.find(Qt=>Qt.id===k)?.branch??null;p(q,be)},e[31]=_,e[32]=k,e[33]=f,e[34]=w,e[35]=p,e[36]=a,e[37]=u,e[38]=m,e[39]=o,e[40]=d,e[41]=g,e[42]=oe):oe=e[42];const xe=oe;let ce;e[43]!==b?(ce=()=>{b()},e[43]=b,e[44]=ce):ce=e[44];const ge=L!=="flat"||P!=="all"||B;let ue;e[45]!==E||e[46]!==M||e[47]!==G?(ue=E?n.jsx(Ca,{open:M,onOpenChange:G}):null,e[45]=E,e[46]=M,e[47]=G,e[48]=ue):ue=e[48];let ke;return e[49]!==k||e[50]!==le||e[51]!==Y||e[52]!==L||e[53]!==h||e[54]!==y||e[55]!==xe||e[56]!==z||e[57]!==ne||e[58]!==F||e[59]!==R||e[60]!==A||e[61]!==B||e[62]!==ce||e[63]!==ge||e[64]!==ue||e[65]!==P||e[66]!==X?(ke={threads:X,activeTaskId:k,filters:Y,hasMore:h,isFetchingMore:y,loadMore:ce,groupBy:L,setGroupBy:F,typeFilter:P,setTypeFilter:A,showAll:B,setShowAll:R,filtersActive:ge,selectTask:ne,archiveTask:le,newThread:xe,openSearch:z,searchDialog:ue},e[49]=k,e[50]=le,e[51]=Y,e[52]=L,e[53]=h,e[54]=y,e[55]=xe,e[56]=z,e[57]=ne,e[58]=F,e[59]=R,e[60]=A,e[61]=B,e[62]=ce,e[63]=ge,e[64]=ue,e[65]=P,e[66]=X,e[67]=ke):ke=e[67],ke}function Qa(t){return!t.trigger_id}function Ja(t){return!!t.trigger_id}function er(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function tr(t){return!t.hidden}function sr(){const t=$.c(59),e=W(),[s,r]=D.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Xa(i),l=$e()?.activeTask;let c;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=l?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const d=o;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=ee("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let y;t[12]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(js,{size:16,className:"shrink-0"}),t[12]=y):y=t[12];let b;t[13]!==u?(b=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=b):b=t[14];let j;t[15]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Xe,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=j):j=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==b?(x=n.jsx(Re,{asChild:!0,children:n.jsx(Bt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[y,b,j]})})}),t[16]=m,t[17]=h,t[18]=b,t[19]=x):x=t[19];let v;t[20]!==e?(v=e("chat.threadsMenu.chats"),t[20]=e,t[21]=v):v=t[21];let S;t[22]!==v?(S=n.jsx(Be,{side:"bottom",children:v}),t[22]=v,t[23]=S):S=t[23];let g;t[24]!==S||t[25]!==x?(g=n.jsxs(Oe,{children:[x,S]}),t[24]=S,t[25]=x,t[26]=g):g=t[26];let p;t[27]!==a?(p=n.jsx(ka,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let k;t[31]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ss,{size:16}),t[31]=k):k=t[31];let N;t[32]!==d||t[33]!==T?(N=n.jsx(_e,{"aria-label":T,onClick:d,className:"size-8",children:k}),t[32]=d,t[33]=T,t[34]=N):N=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let C;t[37]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(kt,{size:16}),t[37]=C):C=t[37];let w;t[38]!==a.newThread||t[39]!==_?(w=n.jsx(_e,{"aria-label":_,onClick:a.newThread,className:"size-8",children:C}),t[38]=a.newThread,t[39]=_,t[40]=w):w=t[40];let I;t[41]!==N||t[42]!==w?(I=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,w]}),t[41]=N,t[42]=w,t[43]=I):I=t[43];let P;t[44]!==p||t[45]!==I?(P=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,I]}),t[44]=p,t[45]=I,t[46]=P):P=t[46];let A;t[47]!==a?(A=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Za,{panel:a})}),t[47]=a,t[48]=A):A=t[48];let L;t[49]!==P||t[50]!==A?(L=n.jsxs(Ot,{align:"start",side:"bottom",onOpenAutoFocus:nr,className:"flex w-80 flex-col gap-2 p-2",children:[P,A]}),t[49]=P,t[50]=A,t[51]=L):L=t[51];let F;t[52]!==s||t[53]!==g||t[54]!==L?(F=n.jsxs(Dt,{open:s,onOpenChange:r,children:[g,L]}),t[52]=s,t[53]=g,t[54]=L,t[55]=F):F=t[55];let B;return t[56]!==a.searchDialog||t[57]!==F?(B=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=B):B=t[58],B}function nr(t){return t.preventDefault()}function ar(){const t=$.c(20),e=W(),{threads:s}=Je(),{createNewTask:r}=et(),i=Kt(),a=tt();let l;t[0]!==a||t[1]!==s?(l=s.find(j=>j.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=l):l=t[2];const c=l;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const o=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(kt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==o||t[11]!==d?(f=n.jsx(Re,{asChild:!0,children:n.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=o,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let y;t[15]!==h?(y=n.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=y):y=t[16];let b;return t[17]!==f||t[18]!==y?(b=n.jsxs(Oe,{children:[f,y]}),t[17]=f,t[18]=y,t[19]=b):b=t[19],b}function rr(t){const e=$.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Gt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:l,activeTab:c,mainOpen:u}=Ht(a);if(l.length===0)return null;let o;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?os({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(at.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(we,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],o=l.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=s,e[8]=o}else o=e[8];let d;return e[14]!==o?(d=n.jsx(at.Tabs,{"data-tour":hn.surfaceTabs,children:o}),e[14]=o,e[15]=d):d=e[15],d}function ir(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const He="__mobile-main-panel-tab-select__",qe="main";function lr({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const or={kind:"component",Component:ks},cr={kind:"component",Component:Ts},dr={kind:"component",Component:Ns},ur={kind:"component",Component:An};function fr({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:or},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:qe,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:ur}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:cr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:dr}]:[]]}function mr(t){const e=$.c(53),{virtualMcpId:s,taskId:r}=t,i=W(),a=Ae(),{openPanel:l}=Gt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let o;e[1]!==r||e[2]!==s?(o={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=o):o=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Ht(o),{org:h}=re(),y=$s();let b;e[4]!==h.id?(b=rt(h.id),e[4]=h.id,e[5]=b):b=e[5];const j=s===b;let x,v,S,g,p,T,k,N,_,C;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==j||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==y||e[15]!==i||e[16]!==d||e[17]!==s){g=Symbol.for("react.early_return_sentinel");e:{const P=fr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),A=f?P.find(O=>O.value===m)?.value??qe:"chat",L=P.find(O=>O.value===A),F=L?.title??lr({tabs:d,activeTab:m,mainOpen:f,t:i});let B;e[28]!==a?(B=O=>{a({to:".",search:z=>({...z,...sn(O)}),replace:!0})},e[28]=a,e[29]=B):B=e[29];const R=B;let M;e[30]!==j||e[31]!==l||e[32]!==h.id||e[33]!==y||e[34]!==R||e[35]!==s?(M=O=>{if(O!==He){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),pn({reportsOnly:y,onReportAgent:j,tabId:O})){l(O,{virtualmcpid:rt(h.id),search:xr});return}if(O==="chat"||O===qe){R(O==="chat"?"chat":"main");return}l(O,{search:pr})}},e[30]=j,e[31]=l,e[32]=h.id,e[33]=y,e[34]=R,e[35]=s,e[36]=M):M=e[36];const G=M,E=P.find(O=>O.value!==A);if(P.length===2&&E){g=n.jsxs("button",{type:"button",onClick:()=>G(E.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:E.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:E.title})]});break e}v=$n,_=He,C=G;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],S=n.jsx(Ln,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[L&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:L.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=En,p="end",T="w-56",e[39]!==F?(k=n.jsx(Vt,{value:He,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=k):k=e[40],N=P.map(hr)}e[6]=m,e[7]=f,e[8]=a,e[9]=j,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=y,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=v,e[20]=S,e[21]=g,e[22]=p,e[23]=T,e[24]=k,e[25]=N,e[26]=_,e[27]=C}else x=e[18],v=e[19],S=e[20],g=e[21],p=e[22],T=e[23],k=e[24],N=e[25],_=e[26],C=e[27];if(g!==Symbol.for("react.early_return_sentinel"))return g;let w;e[41]!==x||e[42]!==p||e[43]!==T||e[44]!==k||e[45]!==N?(w=n.jsxs(x,{align:p,className:T,children:[k,N]}),e[41]=x,e[42]=p,e[43]=T,e[44]=k,e[45]=N,e[46]=w):w=e[46];let I;return e[47]!==v||e[48]!==S||e[49]!==w||e[50]!==_||e[51]!==C?(I=n.jsxs(v,{value:_,onValueChange:C,children:[S,w]}),e[47]=v,e[48]=S,e[49]=w,e[50]=_,e[51]=C,e[52]=I):I=e[52],I}function hr(t){return n.jsx(Vt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function pr(t){return{...t,sidepanel:!1}}function xr(t){return{...t,thread:void 0,sidepanel:!1}}function gr(){const t=$.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:br},t[0]=e):e=t[0];const s=jt(e);if(!s)return!1;let r;return t[1]!==s?(r=s==="app"||Rn.includes(s),t[1]=s,t[2]=r):r=t[2],r}function br(t){const{staticData:e}=t.matches.findLast(vr)??{};return e?.siteEditorView?"site-editor":e?.mainView==="blog-post"?"blog":e?.mainView}function vr(t){return t.staticData.mainView}function yr(t,e,s){const r=$.c(33),i=Qe(),{locator:a}=re(),l=D.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=D.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[d,m]=D.useState(void 0),[f,h]=D.useState(t);f!==t&&(h(t),m(void 0));let y,b;r[3]!==d||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==c.kind?(y=()=>{t!==null&&(o||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},b=[t,o,c.kind,d,i],r[3]=d,r[4]=t,r[5]=o,r[6]=i,r[7]=c.kind,r[8]=y,r[9]=b):(y=r[8],b=r[9]),D.useEffect(y,b);let j;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(j={mutationFn:async p=>{const T=s?.(p);return i.create({id:p,virtual_mcp_id:e,...T?{branch:T}:{},...Ws(sessionStorage,a,p)})}},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=j):j=r[14];const x=cs(j);let v,S;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==o||r[19]!==c.kind?(v=()=>{t!==null&&(o||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},S=[t,o,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=o,r[19]=c.kind,r[20]=v,r[21]=S):(v=r[20],S=r[21]),D.useEffect(v,S),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(o){let p;return r[23]!==o?(p={status:"ready",task:o},r[23]=o,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let g;return r[32]===Symbol.for("react.memo_cache_sentinel")?(g={status:"loading"},r[32]=g):g=r[32],g}const jr=50;function Sr(t,e){const s=$.c(15),{org:r}=re(),i=Pe(),{data:a}=pe.useSession(),l=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==l||s[2]!==t?(c=fe.agentEntryThreads(r.id,l,t),s[0]=r.id,s[1]=l,s[2]=t,s[3]=c):c=s[3];const u=e&&!!l;let o;s[4]!==i||s[5]!==t?(o=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:jr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=o):o=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==o?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:o},s[7]=c,s[8]=u,s[9]=o,s[10]=d):d=s[10];const m=me(d);if(!e||!l){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function kr(t){const e=$.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Le(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:Tr},e[2]=c):c=e[2];const u=jt(c),{org:o}=re();let d;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(d=i.org?ds({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(nt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function Tr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Nr(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Le(r),{org:a}=re(),{org:l,taskId:c}=s;if(!l||c===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=us({org:l,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function _r(){const t=$.c(2),e=Nr();let s;return t[0]!==e?(s=e?n.jsx(nt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function wr(){const t=$.c(6),e=On(),s=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Le(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:Cr}),t[1]=s,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=n.jsx(Dn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Cr(t){const{preview:e,...s}=t;return s}function Pr(t){const e=$.c(11),{children:s}=t,r=W();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==s?(l=s??n.jsx(ya,{}),e[4]=s,e[5]=l):l=e[5];let c;e[6]!==l?(c=n.jsx(Me,{children:l}),e[6]=l,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(vt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function Ir(t){const e=$.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(Z.ThreadlessStreamSource,{},r):n.jsx(Z.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let l;return e[3]!==i||e[4]!==a?(l=n.jsx(Z.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=l):l=e[5],l}function Mr(t){const e=$.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],D.useLayoutEffect(i),null}function Ar({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=W(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:c,isThreadLocked:u}=Ee(),o=st(),{data:d}=pe.useSession(),m=d?.user?.id,f=!Ms(l?.harness_id),h=Xs({agentSandboxMap:s,threadSandboxMap:l?.metadata?.sandboxMap,userId:m,ownerId:l?.created_by,branch:a}),y=e||Vs(l?.metadata),b=D.useRef(null),j=f&&Qs({threadLoaded:!!l,isOwner:!!m&&l?.created_by===m,hasActiveRepository:y,branch:a??null,attempted:b.current===(l?.id??null)});D.useEffect(()=>{if(!j||!l)return;b.current=l.id;const E=d?.user?.name||d?.user?.email?.split("@")[0];c(o==="blog"?Et(E):$t(E))},[j,l,d,c,o]);const x=Nt(t),v=x.resolved?x.runtime:null,S=Fe(t),g=Ft(S,a),{releases:p,createRelease:T,markSandbox:k}=an(t),N=rn(t,ct(S)),_=ct(S)&&a?ln(a,N.data):!1,C=!!m&&l?.created_by===m,w=!!v&&C&&!!a&&a!==g&&!p.some(E=>E.branch===a)&&!N.isLoading&&_!==!0,I=D.useRef(null);D.useEffect(()=>{!w||!a||!v||I.current!==a&&(I.current=a,T({branch:a,name:cn(p,i(jn(a))),color:on(p.length),createdBy:m,createdAt:new Date().toISOString(),runtime:v}).catch(()=>{}))},[w,a,v,p,T,m,i]);const P=v==="sandbox"&&u&&C&&p.some(E=>E.branch===a&&E.runtime!=="sandbox"),[A,L]=D.useState(null);if(P&&a&&A!==a){L(a);const E=a;queueMicrotask(()=>{k(E).catch(()=>{})})}const F=Js(t,a??void 0),R=(m&&a?Kn(h?.[m]?.[a]):{})["agent-sandbox"]??null,M=R?.previewUrl??null,G=f&&v!=="cms"&&(!!R||F);return f?v==="cms"?n.jsx(ut,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r}):n.jsx(Fn,{resetKey:l?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:M,enabled:G,children:n.jsx(en,{resetKey:l?.id??"no-thread",executionEnabled:f,virtualMcpId:t,branch:a??null,userId:m??null,hasActiveRepository:y,vmEntry:R,threadId:l?.id??null,children:n.jsx(ut,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(Rt,{image:n.jsx(Ye,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Lr(){const t=$.c(19),e=W(),{toggleSidebar:s}=ws(),r=Cs(),{virtualMcpId:i,taskId:a}=Ee(),l=!r&&"md:hidden";let c;t[0]!==l?(c=ee(l),t[0]=l,t[1]=c):c=t[1];let u;t[2]!==e?(u=e("layouts.shellControls.toggleSidebar"),t[2]=e,t[3]=u):u=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(_s,{size:16}),t[4]=o):o=t[4];let d;t[5]!==c||t[6]!==u||t[7]!==s?(d=n.jsx(_e,{className:c,onClick:s,"aria-label":u,children:o}),t[5]=c,t[6]=u,t[7]=s,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(sr,{}),t[9]=m):m=t[9];let f;t[10]!==d?(f=n.jsxs(ze.Topbar.Left,{children:[d,m]}),t[10]=d,t[11]=f):f=t[11];let h;t[12]!==a||t[13]!==i?(h=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(mr,{virtualMcpId:i,taskId:a})}),t[12]=a,t[13]=i,t[14]=h):h=t[14];let y;t[15]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ze.Topbar.Right,{className:"shrink-0",children:n.jsx(ar,{})}),t[15]=y):y=t[15];let b;return t[16]!==f||t[17]!==h?(b=n.jsxs(ze.Topbar,{className:"border-b border-border/60 px-3",children:[f,h,y]}),t[16]=f,t[17]=h,t[18]=b):b=t[18],b}function $r(t){const e=$.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),c=Sn()??"overview",u=gr(),[o,d]=D.useState(null),m=o===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const y=h;let b;e[5]!==i||e[6]!==r?(b=n.jsx(Mr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=b):b=e[7];let j;e[8]!==l||e[9]!==a?(j=n.jsx(rr,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=j):j=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Lr,{}),e[11]=x):x=e[11];const v=l??"threadless";let S;e[12]!==v?(S=n.jsx(dt.Thread,{topbar:x,children:n.jsx(Pr,{},v)}),e[12]=v,e[13]=S):S=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(St,{}),e[14]=g):g=e[14];let p;e[15]!==c||e[16]!==s||e[17]!==j||e[18]!==S||e[19]!==f||e[20]!==y?(p=n.jsxs(dt,{...s,threadOpen:f,toggleThread:y,contentKey:c,contentNavigation:j,children:[S,g]}),e[15]=c,e[16]=s,e[17]=j,e[18]=S,e[19]=f,e[20]=y,e[21]=p):p=e[21];let T;return e[22]!==b||e[23]!==p?(T=n.jsxs(n.Fragment,{children:[b,p]}),e[22]=b,e[23]=p,e[24]=T):T=e[24],T}function Er(){const t=W(),e=Ae(),s=gn(),{create:r}=Lt(),{org:i}=re(),l=Se({strict:!1}).org??"",c=Le({strict:!1}),u=tt(),o=Kt(),d=zt(),[m]=D.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=D.useState(()=>$t(f?.user?.name||f?.user?.email?.split("@")[0])),[y]=D.useState(()=>crypto.randomUUID()),[b]=D.useState(()=>Et(ot(f?.user))),j=st(),x=Qe(),v=D.useSyncExternalStore(x.threads.subscribe,x.threads.get),S=D.useSyncExternalStore(x.threadsStatus.subscribe,x.threadsStatus.get),g=Fe(o),p=!!(g&&It(g)),T=Ft(g,null),[k,N]=D.useState(null);u!==null&&k!==null&&N(null);const _=yr(u,o,z=>z===y?b:h),C=_.status==="ready"?_.task:null,w=!!C&&!!d&&C.virtual_mcp_id===o&&!vn(j,C,g?.metadata),I=(u===null||w)&&!!d&&!!g&&(w||k!==o),P=z=>Zs(z.filter(K=>yn(j,K,g?.metadata)),o,f?.user?.id,At(g?.metadata),p,{baseBranch:T,releases:g?.metadata?.releases??void 0}),A=I&&S.kind!=="loading"?P(v):void 0,L=Sr(o,I&&S.kind!=="loading"&&!A);ja(_.status==="ready"?_.task:null);const F=g?.metadata?.ui?.layout??null,B=F?{defaultMainView:F.defaultMainView??null,chatDefaultOpen:F.chatDefaultOpen??null}:null,R=nn(B),{threadId:M,providerKey:G}=ir({routeThreadId:u,fallbackKey:m}),E=async()=>{const z=crypto.randomUUID(),K=v.find(H=>H.id===M)?.branch??null;try{await r({id:z,virtual_mcp_id:o,...j==="blog"?kn(K,ot(f?.user)):K?{branch:K}:{}})}catch{}s(z,()=>({}))},V=D.useRef(null);D.useEffect(()=>{const z=K=>{ps(K)&&K.shiftKey&&K.code==="KeyS"&&!K.repeat&&(K.preventDefault(),V.current?.())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const O=C?.virtual_mcp_id;if(C&&O&&!bn({routeAgentId:o,threadAgentId:O})){const z=fs({org:l,agentId:O,superAgentId:je(i.id).id});return n.jsx(nt,{target:{route:z,search:{thread:C.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(I){if(S.kind==="loading"||L.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full bg-background shadow-edge rounded-[0.75rem]",children:n.jsx(ms,{})})});const z=A??(L.status==="ready"?P(L.threads):void 0),K=p?j==="blog"?y:m:null,H=z?.id??K;if(H&&H===u)return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{role:"alert",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] p-8 text-sm text-muted-foreground",children:t("agentShellLayout.agentShellLayout.viewDraftUnavailable")})});if(H||w)return n.jsx(hs,{to:".",replace:!0,search:Y=>({...Y,thread:H??void 0})});N(o)}return _.status==="creating"||_.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(Ie,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):_.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:_.error.message})]})}):g?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(Z.Provider,{virtualMcpId:o,task:_.status==="ready"?_.task:null,children:n.jsx(Hs,{layout:R,children:n.jsx(Ar,{virtualMcpId:o,hasActiveRepository:p,sandboxMap:g.metadata?.sandboxMap,children:n.jsx(Ir,{threadId:M,providerKey:G,children:n.jsx(Me,{children:n.jsx($r,{layout:R,onNewTaskRef:V,createNewTask:E})})})})})},o)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(Rt,{image:n.jsx(Ye,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:n.jsx(We,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function $o(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(_r,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(St,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Me,{children:n.jsx(kr,{children:n.jsx(Bn,{children:n.jsxs(zn,{children:[n.jsx(Er,{}),n.jsx(wr,{})]})})})}),t[3]=r):r=t[3],r}export{$o as default};