decocms 4.592.2 → 4.594.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 (433) hide show
  1. package/dist/client/assets/{AlertCircle-D5KUH9aP.js → AlertCircle-kHXzu73r.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DAGS5k5t.js → AreaChart-CJxx8aiG.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BqxEWJRJ.js → ArrowLeft-DcKid1bz.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DjWuVnw_.js → ArrowRight-ajc9j6D-.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BVV7udcb.js → ArrowUp-CjAvmMLL.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-CoK1OERh.js → BookOpen01-CdH9hkvz.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-CPqTQdcQ.js → CartesianChart-BRKqG5iH.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-FaY7Tr84.js → CategoricalChart-DW_7VziR.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-SEWTiMAU.js → CheckCircle-DG9pUM8a.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-LxeNvpXL.js → ChevronDown-CWnE_Wmz.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-ZD3Xf8FS.js → ChevronSelectorVertical-ByCpNum0.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CILhidIn.js → ChevronUp-C_rAiuf1.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DLH3nD2I.js → CreditCard01-C6eDo3p0.js} +1 -1
  14. package/dist/client/assets/{Eye-Cwc2L5bD.js → Eye-DFeDq2Hx.js} +1 -1
  15. package/dist/client/assets/{File02-Dhl2OuYi.js → File02-R0RW2VCN.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-CcJxtehj.js → Fingerprint04-D-EFj_6a.js} +1 -1
  17. package/dist/client/assets/{Globe04-cwFPCyAd.js → Globe04-DudUQgTy.js} +1 -1
  18. package/dist/client/assets/{Image01-CJ09Qnh4.js → Image01-Dfaw0Ysf.js} +1 -1
  19. package/dist/client/assets/{Key01-DZQnbai-.js → Key01-9JQCF719.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-Cr0-AZjy.js → LayoutLeft-B-cVGLzN.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-cdrBDwfG.js → LinkBroken01-CpDM6pG5.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-Kkl25Jfx.js → MessageCircle01-44De_8cO.js} +1 -1
  23. package/dist/client/assets/{Minus-3rD0shdq.js → Minus-09UkIbMe.js} +1 -1
  24. package/dist/client/assets/{Monitor01-_Bu4OJZN.js → Monitor01-BPQw3JGv.js} +1 -1
  25. package/dist/client/assets/{Play-_Pdc3kM3.js → Play-BRDYCYl7.js} +1 -1
  26. package/dist/client/assets/{Plus-BBQdiVJ5.js → Plus-BJfG2DpW.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-C0NjVUhC.js → ReferenceLine-KUFosDOj.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BedQ2o1n.js → SearchMd-DioGBYbO.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-CPxgeD0F.js → ShoppingBag01-CdQhBv_H.js} +1 -1
  30. package/dist/client/assets/{Sun-znGwN2L9.js → Sun-U7FHkItb.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DPWXsWlS.js → SwitchHorizontal01-sPBj-OL8.js} +1 -1
  32. package/dist/client/assets/{Tool01-fK7BhgkG.js → Tool01-BEo5XKkS.js} +1 -1
  33. package/dist/client/assets/{Tooltip-CTchlMRL.js → Tooltip-2A3BALIx.js} +1 -1
  34. package/dist/client/assets/{Trash01-BeuUHphn.js → Trash01-l4iOtEBN.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-cpRZOv8f.js → TrendUp01-aviiZW6M.js} +1 -1
  36. package/dist/client/assets/{Upload01-D4ZiwOqG.js → Upload01-BhvyPM8u.js} +1 -1
  37. package/dist/client/assets/{UserCheck01-9S8_72tt.js → UserCheck01-B1rJ65So.js} +1 -1
  38. package/dist/client/assets/{UserSquare-BMWZSzB5.js → UserSquare-D44lppb_.js} +1 -1
  39. package/dist/client/assets/{Users01-DdW-kz9j.js → Users01-CxQycal6.js} +1 -1
  40. package/dist/client/assets/{XClose-CAGAFiZF.js → XClose-BwokcWjs.js} +1 -1
  41. package/dist/client/assets/{Zap-Cdlyv0L3.js → Zap-DoXbwvKP.js} +1 -1
  42. package/dist/client/assets/{access-gate-DS2C6Xm9.js → access-gate-Cb6wrWbo.js} +1 -1
  43. package/dist/client/assets/{add-connection-dialog-BBtIrteq.js → add-connection-dialog-AJ93ohYz.js} +1 -1
  44. package/dist/client/assets/agent-app-BwabK-EN.js +1 -0
  45. package/dist/client/assets/{agent-assets-CalTJh9N.js → agent-assets-BjERacII.js} +1 -1
  46. package/dist/client/assets/{agent-automation-C2qWl_FD.js → agent-automation-lPIiQ1-S.js} +1 -1
  47. package/dist/client/assets/{agent-automations-potq4gky.js → agent-automations-DChAwthU.js} +1 -1
  48. package/dist/client/assets/{agent-blog-DKClcbTx.js → agent-blog-BAFEHC3F.js} +2 -2
  49. package/dist/client/assets/{agent-blog-post-CuruDt5o.js → agent-blog-post-BfZLJHCc.js} +2 -2
  50. package/dist/client/assets/{agent-calendar-u7ayVNwH.js → agent-calendar-DVTbFVx4.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-B4Lld0oU.js → agent-capabilities-CJLhsDjp.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-CJy6lRiJ.js → agent-connect-sources-BUkRDeee.js} +1 -1
  53. package/dist/client/assets/agent-deck-FkIcljPu.js +1 -0
  54. package/dist/client/assets/{agent-e2e-DVLgpwM3.js → agent-e2e-DBAmX-ay.js} +1 -1
  55. package/dist/client/assets/agent-experiments-DDePdz1s.js +1 -0
  56. package/dist/client/assets/agent-file-Dq7RwOoN.js +1 -0
  57. package/dist/client/assets/{agent-hosting-CgFCTT3F.js → agent-hosting-KJs4AVma.js} +1 -1
  58. package/dist/client/assets/{agent-icon-CbqZaGjI.js → agent-icon-BS6RPQ_A.js} +1 -1
  59. package/dist/client/assets/agent-library-C06De_Om.js +1 -0
  60. package/dist/client/assets/agent-library-file-DZtwB2bP.js +1 -0
  61. package/dist/client/assets/agent-overview-3kq8I1YX.js +1 -0
  62. package/dist/client/assets/agent-releases-BwIrRp2G.js +3 -0
  63. package/dist/client/assets/agent-settings-CQxH-SU4.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-D0YJwaQg.js → agent-site-editor-CyUzqfPD.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-lMnnKFV4.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-BQ-pFVV_.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-Dipnwf9A.js +1 -0
  68. package/dist/client/assets/agent-view-D74Nsx4n.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-pWe6uesQ.js → agent-view-guard-dXJW4cSq.js} +1 -1
  70. package/dist/client/assets/{ai-providers-B-M5hh76.js → ai-providers-CoJXv_AA.js} +1 -1
  71. package/dist/client/assets/{alert-5bEEtsfN.js → alert-hKxZXEZZ.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-D0x_r2oW.js → analytics-sections-D8qsQ7bM.js} +1 -1
  73. package/dist/client/assets/api-keys-B9w3P2co.js +1 -0
  74. package/dist/client/assets/{api-keys-CAhgp9vb.js → api-keys-BpcBSUmB.js} +1 -1
  75. package/dist/client/assets/{app-editor-DuZCVVnI.js → app-editor-DLwnlaqE.js} +1 -1
  76. package/dist/client/assets/{asset-utils-Dv5ttPvc.js → asset-utils-CdU3Ttfs.js} +1 -1
  77. package/dist/client/assets/{auth-D2yumac2.js → auth-C3yWOKhG.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-BV9XtGhp.js → auth-catchall-DheSxLuf.js} +1 -1
  79. package/dist/client/assets/{auth-entry-DMLnrHNU.js → auth-entry-C5exDM0H.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-DalaOB1a.js → auth-split-layout-Hg6hlPX8.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-8dpJUMSW.js → authenticate-and-persist-oauth-CIyQIb0N.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-C8Iqltui.js → automation-list-row-BYtaYJm7.js} +1 -1
  83. package/dist/client/assets/{automation-runs-Ck0ZzqBQ.js → automation-runs-DvuKFaor.js} +1 -1
  84. package/dist/client/assets/{automations-CBbPPFJx.js → automations-D70iF6cO.js} +1 -1
  85. package/dist/client/assets/{badge-AJbQpgjT.js → badge-wWozseh3.js} +1 -1
  86. package/dist/client/assets/{block-document-GQbbXcII.js → block-document-CQOXOWIP.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-DKVfDYSC.js → blocks-preview-workspace-context-BmhSK0mg.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-C_4eq-6V.js → blocks-tab-states-CDYT4Ypi.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-CQOZ13uY.js → blog-preview-url-D1Gi50Jy.js} +1 -1
  90. package/dist/client/assets/{blog-schema-CfZz70TF.js → blog-schema-G_pvuSAo.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-ut-SC3ut.js → blog-source-gate-Z08IMogx.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-I0paVCHY.js → blog-view-gate-WETs9z4-.js} +1 -1
  93. package/dist/client/assets/{buckets-DKJFdCz-.js → buckets-BcxYNwzK.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-Do8PESol.js → build-improve-prompt-doc-BpGLSKmi.js} +1 -1
  95. package/dist/client/assets/{calendar-R2KUvbfB.js → calendar-Sr3cNZGh.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-DiEnCl11.js → capability-load-error-Cwe4uK-x.js} +1 -1
  97. package/dist/client/assets/{category-editor-BWDMEDOg.js → category-editor-DZLdQENU.js} +1 -1
  98. package/dist/client/assets/{category-tree-CGnWD8bR.js → category-tree-oBVfCVRR.js} +1 -1
  99. package/dist/client/assets/{chart-Dwn3tCNg.js → chart-D0It11Pz.js} +1 -1
  100. package/dist/client/assets/{chat-context-Br0_Nahk.js → chat-context-B6UvvRRf.js} +1 -1
  101. package/dist/client/assets/{chat-draft-iO3_6Jx0.js → chat-draft-D0WJnhz_.js} +1 -1
  102. package/dist/client/assets/{checkbox-DvJCCHFO.js → checkbox-Cs2Li62P.js} +1 -1
  103. package/dist/client/assets/{choose-editor-CwBWy6BQ.js → choose-editor-Cwvr5cPX.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DCqbc6LY.js → cli-auth-success-DjQMGZUD.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-DQjC5wc_.js → cms-settings-editor-h4wDmiSv.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-DyXiX6He.js → cms-store-drafts-DDk2L1_s.js} +1 -1
  107. package/dist/client/assets/{collapsible-Bx9_Qs2D.js → collapsible-D4n-ssmc.js} +1 -1
  108. package/dist/client/assets/{collection-detail-BtRChlul.js → collection-detail-CWZme-FJ.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-BGYKpwje.js → collection-display-button--oxelZ8R.js} +1 -1
  110. package/dist/client/assets/{collection-search-EjJQzLhT.js → collection-search-CDDauqCr.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-Bi0vtXds.js → collection-table-wrapper-B8osPBIm.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-BpC7onx1.js → collection-tabs-B1EmRyNS.js} +1 -1
  113. package/dist/client/assets/{combobox-ChQuD_kP.js → combobox-LL4GsRoi.js} +1 -1
  114. package/dist/client/assets/{command-Drs7AH9E.js → command-DQwD4jPt.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-DCBNp3xu.js → companion-mcps-section-aZ0yAV9m.js} +1 -1
  116. package/dist/client/assets/{config-DiNwrg2p.js → config-zmlExYow.js} +1 -1
  117. package/dist/client/assets/{connect-CWVEU9mW.js → connect-C2FkNxOj.js} +1 -1
  118. package/dist/client/assets/{connect-key-yfxIO9H6.js → connect-key-MUQgzDUZ.js} +1 -1
  119. package/dist/client/assets/{connect-layout-By3PVtw3.js → connect-layout-C10vBM31.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-BhZgbctF.js → connect-source-dialog-DZFw66w3.js} +1 -1
  121. package/dist/client/assets/{connection-HKlWUwCA.js → connection-B7vXPxEB.js} +1 -1
  122. package/dist/client/assets/{connection-card-C2xvu4hL.js → connection-card-DqrVYaVF.js} +1 -1
  123. package/dist/client/assets/{connection-detail-C9tCIvVb.js → connection-detail-BhmikSW0.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-BNURlrF-.js → connection-form-helpers-CipIPASt.js} +1 -1
  125. package/dist/client/assets/{connection-slug-DJeRgCeN.js → connection-slug-DgGnB6qk.js} +1 -1
  126. package/dist/client/assets/{connections-Bcc0rRUz.js → connections-BH6dclGQ.js} +1 -1
  127. package/dist/client/assets/{content-tab-BBTecs8G.js → content-tab-CMouaD3S.js} +3 -3
  128. package/dist/client/assets/{context-CLjo3rK5.js → context-BXIwVeKt.js} +1 -1
  129. package/dist/client/assets/{context-menu-BX1yiQCC.js → context-menu-BTcjoIYF.js} +1 -1
  130. package/dist/client/assets/{context-shell-CgvwVHRz.js → context-shell-Bh2U1zxs.js} +3 -3
  131. package/dist/client/assets/{create-organization-dialog-DyV2VOWM.js → create-organization-dialog-Dbp2Y7NH.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-CpFr4HQv.js → daily-pulse-BiRUE30R.js} +1 -1
  133. package/dist/client/assets/{delete-copy-BD-re7ed.js → delete-copy-BH5xrx9H.js} +1 -1
  134. package/dist/client/assets/{device-hint-YFnfB9d5.js → device-hint-CMC1mr9e.js} +1 -1
  135. package/dist/client/assets/{discover-Snv3L9z9.js → discover-DN_s50Be.js} +1 -1
  136. package/dist/client/assets/{domain-settings-0TFRceL6.js → domain-settings-DBexbsXu.js} +1 -1
  137. package/dist/client/assets/{drawer-CZIwKDEe.js → drawer-BMY0wk6r.js} +1 -1
  138. package/dist/client/assets/{editor-R-mfj3HC.js → editor-C6mSxTrt.js} +1 -1
  139. package/dist/client/assets/{editor-classes-BR1dEuJg.js → editor-classes-BygI_Lvg.js} +1 -1
  140. package/dist/client/assets/{empty-message-AFlBvFjm.js → empty-message-B3ykEghT.js} +1 -1
  141. package/dist/client/assets/{empty-state-Cvmj0nvN.js → empty-state-C4vGG4yC.js} +1 -1
  142. package/dist/client/assets/{empty-state-D1sFvo-t.js → empty-state-hp9a4BQn.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-BVBOAbKE.js → experiments-tab-choice-a808JseX.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-Ci57d_Cg.js → extract-connection-data-B_eUCQ7e.js} +1 -1
  145. package/dist/client/assets/{feature-gate-CnMCUaqr.js → feature-gate-DtqeHOu4.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-tOP99fEf.js → feature-paywall-BGOy9Z00.js} +1 -1
  147. package/dist/client/assets/{file-explorer-CjZv4WOb.js → file-explorer-q1C_0Dfl.js} +1 -1
  148. package/dist/client/assets/{file-preview-BKDOcv5u.js → file-preview-Cid_-Y34.js} +1 -1
  149. package/dist/client/assets/{file-share-button-6AyWQ3fL.js → file-share-button-eK3lxbyf.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-CUAIqb0z.js → file-type-icon-DOJ02s9h.js} +1 -1
  151. package/dist/client/assets/{folder-icon-Ct0_Hjyy.js → folder-icon-4Pb3O8qn.js} +1 -1
  152. package/dist/client/assets/{form-BCjNPu_G.js → form-BZ2nSi_9.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-CCxIxzQx.js → frame-navigation-C3j5rPCM.js} +1 -1
  154. package/dist/client/assets/{gateway-client-T4tRI1DZ.js → gateway-client-8UpI_Rdq.js} +1 -1
  155. package/dist/client/assets/{general-B4QcysMt.js → general-bkCbo1TA.js} +1 -1
  156. package/dist/client/assets/{github-icon-Bj6aB_74.js → github-icon-C-V2EETw.js} +1 -1
  157. package/dist/client/assets/{held-block-view-CVoaYcbW.js → held-block-view-xCVzC3Lr.js} +1 -1
  158. package/dist/client/assets/{home-BotwssFa.js → home-Dgh1Wb3u.js} +1 -1
  159. package/dist/client/assets/{home-overview-BCItKCzm.js → home-overview-CzbNLHJq.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-Bt7kG5pY.js → hosted-reconcile-DS6ZmO5s.js} +1 -1
  161. package/dist/client/assets/{icon-button-Bh_KxqdI.js → icon-button-CFamiizZ.js} +1 -1
  162. package/dist/client/assets/{index-ITNJaG_b.js → index--r4E_gW7.js} +1 -1
  163. package/dist/client/assets/{index-D3dVYZav.js → index-6V91lP75.js} +1 -1
  164. package/dist/client/assets/{index-vFqlr0Vd.js → index-B-PIhH8l.js} +1 -1
  165. package/dist/client/assets/{index-DbDnBcLD.js → index-B4YS6GMo.js} +1 -1
  166. package/dist/client/assets/{index-BnBpDCQP.js → index-B9tCllzH.js} +1 -1
  167. package/dist/client/assets/{index-DiXT9WgV.js → index-BFjuxezw.js} +1 -1
  168. package/dist/client/assets/{index-MO7rMyL2.js → index-BVZH8mqe.js} +5 -5
  169. package/dist/client/assets/{index-CidJHkwh.js → index-BYQu9U5P.js} +1 -1
  170. package/dist/client/assets/{index-Dw1YtAkf.js → index-BeSn1lKu.js} +1 -1
  171. package/dist/client/assets/{index-BH6HGbCE.js → index-BesTmknq.js} +1 -1
  172. package/dist/client/assets/index-CFbcObvG.css +1 -0
  173. package/dist/client/assets/{index-D92f4v43.js → index-CJQHYkKb.js} +1 -1
  174. package/dist/client/assets/{index-BhxvEgY7.js → index-CqlRRF6p.js} +1 -1
  175. package/dist/client/assets/{index-BDVBi3tK.js → index-D9WtqDmJ.js} +1 -1
  176. package/dist/client/assets/{index-CGg95L06.js → index-D_u7RJfU.js} +1 -1
  177. package/dist/client/assets/{index-BVWw-y7S.js → index-DwIomefI.js} +1 -1
  178. package/dist/client/assets/{index-C8GbHpGQ.js → index-GMDFirHC.js} +1 -1
  179. package/dist/client/assets/{index-BF35jF2Y.js → index-cjnTxfp5.js} +1 -1
  180. package/dist/client/assets/{index-redirect-DG7-rRdr.js → index-redirect-BMGe_utm.js} +1 -1
  181. package/dist/client/assets/{infiniteQueryObserver-BxwhD4H0.js → infiniteQueryObserver-f5kG4cIT.js} +1 -1
  182. package/dist/client/assets/{infra-billing-DZecAEYq.js → infra-billing-DaAfhBWg.js} +1 -1
  183. package/dist/client/assets/{input-D4iUcgN8.js → input-A20A_mwu.js} +1 -1
  184. package/dist/client/assets/{input-BIybT1jg.js → input-o0eNZBV4.js} +3 -3
  185. package/dist/client/assets/{integration-icon-ldo7fQV8.js → integration-icon-CcV5frEs.js} +1 -1
  186. package/dist/client/assets/{item-actions-BNp43MXE.js → item-actions-CZD9JeRy.js} +1 -1
  187. package/dist/client/assets/{jira-icon-D6ku9u_m.js → jira-icon-DlgPbK3F.js} +1 -1
  188. package/dist/client/assets/{label-DW08pOC1.js → label-Dc_tSb6f.js} +1 -1
  189. package/dist/client/assets/{layout-BjEs-Cxz.js → layout-514nGx9I.js} +1 -1
  190. package/dist/client/assets/{legacy-admin-welcome-dialog-DRhpjAg-.js → legacy-admin-welcome-dialog-DtYrilLw.js} +1 -1
  191. package/dist/client/assets/{legacy-agents-deep-BF0nmLmC.js → legacy-agents-deep-DS7wnjib.js} +1 -1
  192. package/dist/client/assets/{legacy-main-redirect-DJ8wT7wl.js → legacy-main-redirect-BQ-dfJNU.js} +1 -1
  193. package/dist/client/assets/library-Cy3CmAZa.js +1 -0
  194. package/dist/client/assets/{library-tab-BDzhyi40.js → library-tab-CZB0EHNl.js} +1 -1
  195. package/dist/client/assets/{login-1wF7gB3H.js → login-BVGV6SaO.js} +1 -1
  196. package/dist/client/assets/{markdown-B18jmWme.js → markdown-DvUyMKlV.js} +1 -1
  197. package/dist/client/assets/{mcp-app-renderer-CBA75Abd.js → mcp-app-renderer-CRu4PbUr.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DezDML-a.js → mcp-oauth-CIY9YLWi.js} +1 -1
  199. package/dist/client/assets/{mcp-oauth-ClVkIX7P.js → mcp-oauth-NdGb5Zj9.js} +1 -1
  200. package/dist/client/assets/{members-CiuKfwLy.js → members-CgoGmOSR.js} +1 -1
  201. package/dist/client/assets/{memory-Bc7Mb2-z.js → memory-BfzundeZ.js} +1 -1
  202. package/dist/client/assets/{mock-board-C1WLn6nl.js → mock-board-D8DOoo_p.js} +3 -3
  203. package/dist/client/assets/{monaco-editor-PpyawAp-.js → monaco-editor-C3D0iT4a.js} +1 -1
  204. package/dist/client/assets/{monitoring-L0i3EmVI.js → monitoring-BvN0RJq0.js} +1 -1
  205. package/dist/client/assets/{monitoring-stats-row-D8Uq6b4K.js → monitoring-stats-row-By2SXcyl.js} +1 -1
  206. package/dist/client/assets/{multi-select-BD20VJsB.js → multi-select-Dak9eW6K.js} +1 -1
  207. package/dist/client/assets/{mustache-bLafuh-c.js → mustache-CMgVEDUc.js} +1 -1
  208. package/dist/client/assets/{named-rule-step-DO2fBBkb.js → named-rule-step-BnN-hlGb.js} +1 -1
  209. package/dist/client/assets/{named-rule-view-DIU9gKAr.js → named-rule-view-hUwolemN.js} +1 -1
  210. package/dist/client/assets/{new-project-dialog-CkizuZx2.js → new-project-dialog-BeD2i_Hm.js} +1 -1
  211. package/dist/client/assets/{new-project-store-CC3LFRfZ.js → new-project-store-BfrY24D-.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-DRhPPvAM.js → oauth-callback-CNqxDLu3.js} +1 -1
  213. package/dist/client/assets/{oauth-callback-ai-provider-DyOTyj1-.js → oauth-callback-ai-provider-0KF_xg3k.js} +1 -1
  214. package/dist/client/assets/{oauth-consent-Dw8JNL1P.js → oauth-consent-li4JOhlZ.js} +1 -1
  215. package/dist/client/assets/{onboarding-IpDXA5ym.js → onboarding-CzP4oXTn.js} +1 -1
  216. package/dist/client/assets/{openai-conversation-BrWjBBxt.js → openai-conversation-BMsTp1zg.js} +1 -1
  217. package/dist/client/assets/{optimistic-project-sidebar-views-BI3C8vFz.js → optimistic-project-sidebar-views-C29BxST1.js} +1 -1
  218. package/dist/client/assets/{order-monitor-day-wAiTeHpY.js → order-monitor-day-D910WxJ3.js} +1 -1
  219. package/dist/client/assets/{organization-choice-BaDb7Qrw.js → organization-choice-BhMXPFKX.js} +1 -1
  220. package/dist/client/assets/{orgs-QAu31jAb.js → orgs-ZZqk-o74.js} +1 -1
  221. package/dist/client/assets/{own-accounts-section-BKlM4B9o.js → own-accounts-section-4_Hp7fJv.js} +1 -1
  222. package/dist/client/assets/{pair-Bb7qWgd-.js → pair-C4tumP78.js} +1 -1
  223. package/dist/client/assets/{parse-sections-BV83Vbwc.js → parse-sections-B5REiM5j.js} +2 -2
  224. package/dist/client/assets/{plan-ladder-Chs7pQTg.js → plan-ladder-BlcJL4hV.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-C3hLgJUo.js → plan-usage-card-DW3wLLQF.js} +1 -1
  226. package/dist/client/assets/{plan-CvGF0eDu.js → plan-vUNQzJtH.js} +1 -1
  227. package/dist/client/assets/{popover-4TIGONM7.js → popover-9q-VKuQx.js} +1 -1
  228. package/dist/client/assets/{post-calendar-Du2Rttxs.js → post-calendar-Cw6GB31X.js} +1 -1
  229. package/dist/client/assets/{post-editor-BQwZfa_7.js → post-editor-BUxXB6Uz.js} +1 -1
  230. package/dist/client/assets/{preview-content-DdbjwBwE.js → preview-content-aN9ghsH_.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-NKP5ZUCh.js → preview-dialog-DqNYRBay.js} +1 -1
  232. package/dist/client/assets/{preview-panel-BjXSmIdw.js → preview-panel-DV1FaRUZ.js} +1 -1
  233. package/dist/client/assets/{preview-tab-C0mJhOzI.js → preview-tab-CNYeoSqY.js} +3 -3
  234. package/dist/client/assets/{product-picker-dialog-Clw0P8Yx.js → product-picker-dialog-DVs_Kuee.js} +1 -1
  235. package/dist/client/assets/{profile-hj49kZVw.js → profile-DbdvfkDI.js} +1 -1
  236. package/dist/client/assets/{project-app-view-Bo8mUYDh.js → project-app-view-Cfrp6muY.js} +1 -1
  237. package/dist/client/assets/{project-apps-C7dyZBXn.js → project-apps-z0dBtbP_.js} +1 -1
  238. package/dist/client/assets/{project-icon-b7CePoH1.js → project-icon-C8Sq9Uyo.js} +1 -1
  239. package/dist/client/assets/{project-index-CLIoU-OZ.js → project-index-BOyydKXT.js} +1 -1
  240. package/dist/client/assets/project-reports-CN1JvK97.js +1 -0
  241. package/dist/client/assets/project-tasks-Cimkg6Js.js +1 -0
  242. package/dist/client/assets/{projects-OUiTUq8Q.js → projects-B5BvS56N.js} +1 -1
  243. package/dist/client/assets/{projects-empty-state-Bzoq2Mv2.js → projects-empty-state-CDTj5tcd.js} +1 -1
  244. package/dist/client/assets/{prompts-D7lkwEUX.js → prompts-DfS9pOYH.js} +1 -1
  245. package/dist/client/assets/record-editor-BC_pgxjj.js +1 -0
  246. package/dist/client/assets/{redirect-editor-BRPOap1O.js → redirect-editor-CJJivlqw.js} +1 -1
  247. package/dist/client/assets/reports-BU9i6BvT.js +1 -0
  248. package/dist/client/assets/{reports-DL0ZkHBi.js → reports-C624VFLj.js} +1 -1
  249. package/dist/client/assets/{reports-onboarding-MjksICLx.js → reports-onboarding-_pxt1WkF.js} +1 -1
  250. package/dist/client/assets/{reports-tab-Dd5PTmQ9.js → reports-tab-BBmHq9vJ.js} +2 -2
  251. package/dist/client/assets/{repositories-Dx7vF_BM.js → repositories-B7d9yCxo.js} +1 -1
  252. package/dist/client/assets/repositories-D-ngJeYU.js +1 -0
  253. package/dist/client/assets/{repository-binding-Do7vBuPV.js → repository-binding-BIfwJXBl.js} +1 -1
  254. package/dist/client/assets/{repository-picker-Dcd9aiW_.js → repository-picker-vN0XhyKR.js} +1 -1
  255. package/dist/client/assets/{require-capability-ce-nWmch.js → require-capability-B6_v4BKo.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout--ZtxYuuh.js → required-auth-layout-BXbkUsYd.js} +1 -1
  257. package/dist/client/assets/{reset-password-uqeb2CFP.js → reset-password-DPvgQ5Qd.js} +1 -1
  258. package/dist/client/assets/{resizable-6fE_yPv-.js → resizable-AytQ6SyX.js} +1 -1
  259. package/dist/client/assets/{resolve-tab-icon-Dixq_4VG.js → resolve-tab-icon-BzV0wsYq.js} +1 -1
  260. package/dist/client/assets/{review-settings-DWdakUtn.js → review-settings-BTg5QElS.js} +1 -1
  261. package/dist/client/assets/{role-color-B47ji0o4.js → role-color-CNGxunw8.js} +1 -1
  262. package/dist/client/assets/roles-DrWSfOhb.js +1 -0
  263. package/dist/client/assets/{route-VSkXLjkl.js → route-BX1VK4D8.js} +1 -1
  264. package/dist/client/assets/route-DxNP7FKc.js +1 -0
  265. package/dist/client/assets/{route-DyhPu8FN.js → route-IYkPM4iL.js} +1 -1
  266. package/dist/client/assets/{route-page-header-BSRlBC43.js → route-page-header-DnxbH76I.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-CHSdnBz0.js → sandbox-git-api-CvJPOlyv.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-CjFtqtNp.js → sandbox-lifecycle-context-CO9pd80k.js} +1 -1
  269. package/dist/client/assets/{save-status-CGNNeIuG.js → save-status-eUv6TQpr.js} +1 -1
  270. package/dist/client/assets/{schema-BCxhVOYA.js → schema-C2ft4i4u.js} +1 -1
  271. package/dist/client/assets/{schema-DBMHcQDz.js → schema-CATZG76m.js} +1 -1
  272. package/dist/client/assets/{scroll-area-B7ZZjDkc.js → scroll-area-w9_Bvwmf.js} +1 -1
  273. package/dist/client/assets/{search-input-C9wyGnCr.js → search-input-D3b0Dc5Y.js} +1 -1
  274. package/dist/client/assets/{search-toggle-BvbWTdJj.js → search-toggle-DBEAkZhz.js} +1 -1
  275. package/dist/client/assets/{secret-picker-CAwnMokm.js → secret-picker-CVfi84wZ.js} +1 -1
  276. package/dist/client/assets/{secrets-C5FAVhBs.js → secrets-Bxh8ZQN1.js} +1 -1
  277. package/dist/client/assets/{section-array-field-CfZgMt03.js → section-array-field-CkDPdYBe.js} +1 -1
  278. package/dist/client/assets/{sections-B-LBjmeO.js → sections-BS4WKjIk.js} +1 -1
  279. package/dist/client/assets/{sections-editor-BZjoWIti.js → sections-editor-CLaZ0j6X.js} +1 -1
  280. package/dist/client/assets/{select-C4o1sG3W.js → select-BJ7g3jt1.js} +1 -1
  281. package/dist/client/assets/{select-model-xM3aJpLx.js → select-model-CIoiyBbQ.js} +1 -1
  282. package/dist/client/assets/{seo-editor-BLdyA31m.js → seo-editor-C5CvtZIp.js} +1 -1
  283. package/dist/client/assets/{separator-DeMz2sFE.js → separator-DUnD5wBI.js} +1 -1
  284. package/dist/client/assets/{session-runtime-Q41itFhJ.js → session-runtime-CRv5j4jh.js} +1 -1
  285. package/dist/client/assets/settings-tab-k_yzR7TC.js +1 -0
  286. package/dist/client/assets/{sheet-B2Xi2TGp.js → sheet-B1zTFenO.js} +1 -1
  287. package/dist/client/assets/{shell-layout-DshbXzec.js → shell-layout-BT6RZJ9X.js} +1 -1
  288. package/dist/client/assets/{site-draft-actions-Cf-NDME5.js → site-draft-actions-BhvNLFOt.js} +1 -1
  289. package/dist/client/assets/{site-draft-view-DBgDu-9P.js → site-draft-view-D89p35uK.js} +1 -1
  290. package/dist/client/assets/site-editor-DO2-FIjd.js +1 -0
  291. package/dist/client/assets/{site-editor-toast-BgT6nY-u.js → site-editor-toast-vvVLBG6s.js} +1 -1
  292. package/dist/client/assets/{skills-m5y5TgO3.js → skills-C22XOkU8.js} +1 -1
  293. package/dist/client/assets/{slider-sWzF4lrQ.js → slider-46E0vJw8.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-Bx0ENsgK.js → sortable.esm-BzU9NXcP.js} +1 -1
  295. package/dist/client/assets/{sso-Dl6996xP.js → sso-zNrVMXEh.js} +1 -1
  296. package/dist/client/assets/{suggestion-ClAIVT6i.js → suggestion-B9N6oqkG.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-n6HwyJOZ.js → super-agent-icon-AyK0wzxQ.js} +1 -1
  298. package/dist/client/assets/{switch-CG01olp-.js → switch-BX8b8tB6.js} +1 -1
  299. package/dist/client/assets/{synced-repos-BH_hufzQ.js → synced-repos-DS_Rsdst.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-BwPNaoGm.js → tab-icon-glyph-DpR7ri7q.js} +1 -1
  301. package/dist/client/assets/{table-lwVk270r.js → table-DNvSx4nT.js} +1 -1
  302. package/dist/client/assets/{tabs-D9KXSh61.js → tabs-ClkuSww4.js} +1 -1
  303. package/dist/client/assets/{task-board-DQJM0wWR.js → task-board-DLNmAHmR.js} +1 -1
  304. package/dist/client/assets/{task-key-CR5-_7lO.js → task-key-BjUMQvHV.js} +1 -1
  305. package/dist/client/assets/{task-route-D-EgXwEt.js → task-route-B6gZ9LxC.js} +1 -1
  306. package/dist/client/assets/{task-status-nm2Pjyoo.js → task-status-CvKutQFi.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics-ilfurRWj.js → taskboard-analytics-BgegxTfw.js} +1 -1
  308. package/dist/client/assets/tasks-BZlAEaTY.js +1 -0
  309. package/dist/client/assets/{tasks-_zK3rmyO.js → tasks-VtqJyf5J.js} +1 -1
  310. package/dist/client/assets/{textarea-zmClYlgL.js → textarea-BnYcD_gb.js} +1 -1
  311. package/dist/client/assets/{thread-analytics-B53v30Ds.js → thread-analytics-CHgBpfHv.js} +1 -1
  312. package/dist/client/assets/{thread-button-Cphg_Vss.js → thread-button-Cra7mRSW.js} +1 -1
  313. package/dist/client/assets/{thread-intent-DMRL6sDz.js → thread-intent-CYNXEfHP.js} +1 -1
  314. package/dist/client/assets/{thread-route-D3VYHnhZ.js → thread-route-D00Shirq.js} +1 -1
  315. package/dist/client/assets/{thread-route-CNQzB90t.js → thread-route-muzc431X.js} +1 -1
  316. package/dist/client/assets/{thread-sheet-body-DqzcXsgN.js → thread-sheet-body-B4d3KSH7.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-D3MJNAHC.js → time-range-picker-BzLGuV9Q.js} +1 -1
  318. package/dist/client/assets/{toggle-group-DrvndZVz.js → toggle-group-Cu3LE1oL.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-BGOHH-GT.js → tool-set-selector-DpIP2fev.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-DvBHbQbV.js → toolbar-icon-button-Bo8OSaqx.js} +1 -1
  321. package/dist/client/assets/{tooltip-DIwuDukB.js → tooltip-CfeBMv8z.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-BxWueym6.js → tooltipContext-BMU8k-Rs.js} +1 -1
  323. package/dist/client/assets/{track-ZlOhRNyi.js → track-DWmwuKVj.js} +1 -1
  324. package/dist/client/assets/{types-C4hQwBRx.js → types-D_vNw-3-.js} +1 -1
  325. package/dist/client/assets/{url-slug-rSp3Rda9.js → url-slug-BOPVIawN.js} +1 -1
  326. package/dist/client/assets/{usage-stats-D2u99sYi.js → usage-stats-Dzci2XGy.js} +1 -1
  327. package/dist/client/assets/{use-ai-providers-Dcr5Indu.js → use-ai-providers-C30oeluP.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-CBCDgkKV.js → use-api-keys-CK1ZH-th.js} +1 -1
  329. package/dist/client/assets/{use-apply-named-rule-B1FW5m4W.js → use-apply-named-rule-DGYGOn-1.js} +1 -1
  330. package/dist/client/assets/use-ask-in-chat-Cp6wJI2T.js +1 -0
  331. package/dist/client/assets/{use-automations-DTmAVrPC.js → use-automations-CtbjaE6m.js} +1 -1
  332. package/dist/client/assets/{use-autosave-l_3xEFKv.js → use-autosave-Bpr4B2YO.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-DUe21BCo.js +1 -0
  334. package/dist/client/assets/use-blog-view-D_--u8j_.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-D7adBsgR.js → use-chat-layout-state-DBVzfsNg.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-DS9kHtE_.js → use-cms-publish-actions-CWkUAckV.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-l_KgsSoJ.js → use-connect-companion-iGJRty2G.js} +1 -1
  338. package/dist/client/assets/{use-connection-Bw7j7Uwd.js → use-connection-C-m8b2Fk.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-ClXRYRNb.js → use-content-sync-BJ7PE3PC.js} +1 -1
  340. package/dist/client/assets/{use-copy-DecCkxBe.js → use-copy-BHPkBnZF.js} +1 -1
  341. package/dist/client/assets/{use-current-view-DeCDJ81c.js → use-current-view-CHhVzMwk.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-Co0jsQuK.js → use-date-fns-locale-Cn791fqZ.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-iYhBcTY7.js → use-debounced-autosave-C6OCZte6.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-xGNEv6Rk.js → use-debounced-value-By7KggQt.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-BdqVGt-j.js → use-deco-credits-19cW8oHb.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-DVtCMdHA.js → use-decopilot-events-BxfGa0_j.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-eo7flyi6.js → use-delete-block-3AD9rKWc.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-DLz_7_n6.js → use-delete-connection-Cma0d5Z7.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-0d1N4eUD.js → use-deployment-admin-COmgwPUq.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-BP3notV9.js → use-entitlements-B8D7pawV.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-CHhkdxMk.js → use-fast-preview-draft-url-BQhDGlp9.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-CnK8u3WE.js → use-file-configs-CCo70YSN.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-Dz64XHXo.js → use-id-selection-BOT74h8X.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-D3fSUwr2.js → use-in-settings-qQ2sbeu5.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-DSNCooi-.js → use-inbox-feed-CIBoyRh8.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-BxVWwF1L.js → use-infinite-scroll-Ct_PbHT3.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-LDOpP8IH.js → use-join-requests-CbaI0xCz.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-DrUKY01x.js → use-main-panel-tabs-CPcNwsEn.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-B3JqhPwz.js → use-mcp-auth-status-BfHI4tpd.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-BxwZtaCq.js → use-mcp-client-7NPwItGN.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-DVXJBMOH.js → use-mcp-prompts-C7QHdaI_.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-CyWP89hJ.js → use-mcp-tools-DqnFukoV.js} +1 -1
  363. package/dist/client/assets/{use-mobile-YIF3Wusc.js → use-mobile-5e0sSd3X.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-DHGQIgCD.js → use-move-blocks-Cqt9Q8CZ.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-C0eDqGuW.js → use-navigate-to-agent-CtsEyeFb.js} +1 -1
  366. package/dist/client/assets/{use-never-published-9pO2qpHO.js → use-never-published-BK3TeRer.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-WMr7hZgB.js → use-org-fs-Cq9dcDh3.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-DkCurK_B.js → use-org-notice-Dvph2j3S.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-Hix-DZXq.js → use-org-repo-syncs-CCuZhNZU.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-C39RdLGk.js → use-org-sso-BKXSOEb_.js} +1 -1
  371. package/dist/client/assets/{use-organization-settings-Ldg561lS.js → use-organization-settings-BoOQOwrg.js} +1 -1
  372. package/dist/client/assets/{use-panel-navigate-DPe8y1uz.js → use-panel-navigate-DPGDB1T1.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-6XiSd44o.js → use-project-native-view-presence-SSp2DD_u.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-CKUt7-UZ.js → use-project-scope-BIucgFKc.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-DZ42CAmX.js → use-recent-apps-4zSmjU-Q.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-BSetGIYZ.js → use-reports-diagnostic-DWL8tyP6.js} +1 -1
  377. package/dist/client/assets/{use-sandbox-events-CdG3bEqD.js → use-sandbox-events-TxpzU2Iw.js} +1 -1
  378. package/dist/client/assets/{use-secrets-T3rIHPQl.js → use-secrets-CsCKmxLc.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-BLgw64oy.js → use-section-preview-base-BxFRvYUl.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-CL0AbvKK.js → use-sidebar-collapsed-DHFFs76T.js} +1 -1
  381. package/dist/client/assets/{use-tags-BmZS3xsX.js → use-tags-aDaEeB96.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-DThcUdyP.js → use-task-board-analytics-XXuDuH8s.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-DelfLxTq.js → use-task-board-item-prs-CLDgREI3.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-B_wcv2Id.js → use-task-board-items-D4fdH47R.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-B-XI61PC.js → use-task-board-prompts-DRYQb2DR.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-D9gPWnv4.js → use-task-metadata-CSvrbSt0.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-Cjc56_eq.js → use-thread-outputs-CrNLjxTt.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-DBwGQmUk.js → use-view-draft-kind-BG3Ihm6n.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-CeHYUQqN.js → use-voice-input-BspgCDOI.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-BJoJv4VQ.js +1 -0
  391. package/dist/client/assets/{useQueries-BixFwFDx.js → useQueries-DGhxO9Ry.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-BFQG7J82.js +1 -0
  393. package/dist/client/assets/{users-BgaIxOqD.js → users-CC1uXfIH.js} +1 -1
  394. package/dist/client/assets/{utils-CKGqSxtG.js → utils-JVZxV40b.js} +1 -1
  395. package/dist/client/assets/{variant-calendar-CXzE5veG.js → variant-calendar-COAsXla8.js} +1 -1
  396. package/dist/client/assets/{variant-matcher-override-BNlpJ0aZ.js → variant-matcher-override-Dm9kjKRy.js} +1 -1
  397. package/dist/client/assets/{view-header-Kc9IDiyA.js → view-header-d4Obd__T.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-DY3Y2rTl.js → virtual-mcp-TQWeP4ry.js} +1 -1
  399. package/dist/client/assets/{watch-sse-pool-BYl9msHw.js → watch-sse-pool-CWcYbOm5.js} +1 -1
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/server.js +785 -785
  402. package/package.json +1 -1
  403. package/dist/client/assets/agent-app-sC7aUU2F.js +0 -1
  404. package/dist/client/assets/agent-deck-CNXeZ5xE.js +0 -1
  405. package/dist/client/assets/agent-experiments-Yp-hZhwD.js +0 -1
  406. package/dist/client/assets/agent-file-BgaMMtPk.js +0 -1
  407. package/dist/client/assets/agent-library-DeuL6cH9.js +0 -1
  408. package/dist/client/assets/agent-library-file-BDKjvutG.js +0 -1
  409. package/dist/client/assets/agent-overview-D-xkdTrX.js +0 -1
  410. package/dist/client/assets/agent-releases-D6j70hAT.js +0 -2
  411. package/dist/client/assets/agent-settings-ufwlUCGm.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-ZxxASUZt.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-DTJB0TOB.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-RGx3NYHj.js +0 -1
  415. package/dist/client/assets/agent-view-CwxSJIuS.js +0 -1
  416. package/dist/client/assets/api-keys-DVWa8Scs.js +0 -1
  417. package/dist/client/assets/index-w9K6scL8.css +0 -1
  418. package/dist/client/assets/library-CUYJEilu.js +0 -1
  419. package/dist/client/assets/project-reports-lk3p006i.js +0 -1
  420. package/dist/client/assets/project-tasks-CDbHy_xE.js +0 -1
  421. package/dist/client/assets/record-editor-6X7DPBcJ.js +0 -1
  422. package/dist/client/assets/reports-BlFykJew.js +0 -1
  423. package/dist/client/assets/repositories-CzAV4OYB.js +0 -1
  424. package/dist/client/assets/roles-DPhEU4gx.js +0 -1
  425. package/dist/client/assets/route-Cp8tx-e9.js +0 -1
  426. package/dist/client/assets/settings-tab-DU2igppN.js +0 -1
  427. package/dist/client/assets/site-editor-B8NrksrD.js +0 -1
  428. package/dist/client/assets/tasks-7XjKLCiZ.js +0 -1
  429. package/dist/client/assets/use-ask-in-chat-BFnj7bhm.js +0 -1
  430. package/dist/client/assets/use-blocks-v8-project-C7KCNatE.js +0 -1
  431. package/dist/client/assets/use-blog-view-BLEcKYhI.js +0 -1
  432. package/dist/client/assets/useInfiniteQuery-CC5aas3W.js +0 -1
  433. package/dist/client/assets/useSuspenseInfiniteQuery-J27pEun4.js +0 -1
@@ -1 +1 @@
1
- import{r as L,j as A,c as ve,m as He}from"./index-MO7rMyL2.js";import{b as ft}from"./MessageCircle01-Kkl25Jfx.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
+ import{r as L,j as A,c as ve,m as He}from"./index-BVZH8mqe.js";import{b as ft}from"./MessageCircle01-44De_8cO.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 +1 @@
1
- import{k as s,a5 as c,a2 as f,o as l,D as m,a6 as u,b as p,g as d,a7 as k,h as b,a8 as I,a9 as $}from"./agent-icon-CbqZaGjI.js";import{n as y}from"./BookOpen01-CoK1OERh.js";import{n as C}from"./TrendUp01-cpRZOv8f.js";import{i as S}from"./File02-Dhl2OuYi.js";import{aj as T}from"./index-MO7rMyL2.js";const r={overview:b,settings:k,automations:d,"site-editor":p,code:u,content:S,blog:y,assets:m,releases:l,hosting:T,e2e:C,analytics:f,cdn:c,files:s};function v(n){return n in r}function a(n){const o=I(n);if(o.type==="icon"){const t=$(o.name);return t?{kind:"component",Component:t}:null}return o.type==="url"?{kind:"url",src:o.url}:null}function w(n){if(n.kind==="system")return v(n.tabId)?{kind:"component",Component:r[n.tabId]}:{kind:"fallback"};const o=a(n.iconUrl);if(o)return o;if(!n.appId)return{kind:"fallback"};const t=n.connections.find(e=>e.id===n.appId);if(!t)return{kind:"fallback"};const i=a(t.icon);return i||{kind:"fallback"}}export{w as r};
1
+ import{k as s,a5 as c,a2 as f,o as l,D as m,a6 as u,b as p,g as d,a7 as k,h as b,a8 as I,a9 as $}from"./agent-icon-BS6RPQ_A.js";import{n as y}from"./BookOpen01-CdH9hkvz.js";import{n as C}from"./TrendUp01-aviiZW6M.js";import{i as S}from"./File02-R0RW2VCN.js";import{aj as T}from"./index-BVZH8mqe.js";const r={overview:b,settings:k,automations:d,"site-editor":p,code:u,content:S,blog:y,assets:m,releases:l,hosting:T,e2e:C,analytics:f,cdn:c,files:s};function v(n){return n in r}function a(n){const o=I(n);if(o.type==="icon"){const t=$(o.name);return t?{kind:"component",Component:t}:null}return o.type==="url"?{kind:"url",src:o.url}:null}function w(n){if(n.kind==="system")return v(n.tabId)?{kind:"component",Component:r[n.tabId]}:{kind:"fallback"};const o=a(n.iconUrl);if(o)return o;if(!n.appId)return{kind:"fallback"};const t=n.connections.find(e=>e.id===n.appId);if(!t)return{kind:"fallback"};const i=a(t.icon);return i||{kind:"fallback"}}export{w as r};
@@ -1 +1 @@
1
- import{c as y,b as k,j as s,gh as Y,gV as G,E as fe,t as le,gi as U,dO as me,Q as pe,R as ue,r as Q,B as ie,a6 as xe,e0 as he,I as je,W}from"./index-MO7rMyL2.js";import{S as ae}from"./switch-CG01olp-.js";import{n as be}from"./BookOpen01-CoK1OERh.js";import{f as _e,h as ye,l as ve,e as Se,c as re,j as Te,s as ke,d as we,a as Ee,k as Ke,n as Ce,g as Me,b as Pe,i as Ne}from"./UserSquare-BMWZSzB5.js";import{a as ge,g as $e,f as ze,h as Ae,i as Re,j as De,k as Oe}from"./use-organization-settings-Ldg561lS.js";import{b as Be}from"./use-connection-Bw7j7Uwd.js";function et(){const e=y.c(12),t=k();let l;e[0]!==t?(l=t("settings.review.title"),e[0]=t,e[1]=l):l=e[1];let n;e[2]!==t?(n=t("settings.review.description"),e[2]=t,e[3]=n):n=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qe,{}),e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"cheap_reviewer_model",icon:s.jsx(_e,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[5]=c):c=e[5];let o,r;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(h,{flag:"auto_merge",icon:s.jsx(ye,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),r=s.jsx(Ye,{}),e[6]=o,e[7]=r):(o=e[6],r=e[7]);let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs(Y,{children:[i,c,o,r,s.jsx(h,{flag:"auto_assign_report_tasks_to_super_agent",icon:s.jsx(ve,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=g):g=e[8];let u;return e[9]!==l||e[10]!==n?(u=s.jsx(G,{title:l,description:n,children:g}),e[9]=l,e[10]=n,e[11]=u):u=e[11],u}function tt(){const e=y.c(13),t=k(),l=ge("coding_agent_org_mcps");let n;e[0]!==t?(n=t("settings.agentTools.title"),e[0]=t,e[1]=n):n=e[1];let i;e[2]!==t?(i=t("settings.agentTools.description"),e[2]=t,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"coding_agent_org_mcps",icon:s.jsx(Se,{size:16}),titleKey:"settings.agentTools.orgMcpsTitle",descriptionKey:"settings.agentTools.orgMcpsDescription"}),e[4]=c):c=e[4];let o;e[5]!==l?(o=l?s.jsx(Fe,{}):null,e[5]=l,e[6]=o):o=e[6];let r;e[7]!==o?(r=s.jsxs(Y,{children:[c,o]}),e[7]=o,e[8]=r):r=e[8];let g;return e[9]!==n||e[10]!==i||e[11]!==r?(g=s.jsx(G,{title:n,description:i,children:r}),e[9]=n,e[10]=i,e[11]=r,e[12]=g):g=e[12],g}function Fe(){const e=y.c(2),t=k();let l;return e[0]!==t?(l=s.jsx(pe,{children:n=>{const{reset:i}=n;return s.jsx(ue,{fallback:c=>{const{resetError:o}=c;return s.jsx(U,{title:t("settings.agentTools.orgMcpsPickTitle"),children:s.jsxs("div",{role:"alert",className:"mt-3 flex items-center gap-2",children:[s.jsx("p",{className:"text-sm text-destructive",children:t("settings.agentTools.orgMcpsPickLoadFailed")}),s.jsx(ie,{variant:"outline",size:"sm",onClick:()=>{i(),o()},children:t("common.errorBoundary.tryAgain")})]})})},children:s.jsx(Q.Suspense,{fallback:s.jsx(Ie,{}),children:s.jsx(Ve,{})})})}}),e[0]=t,e[1]=l):l=e[1],l}function Ie(){const e=y.c(5),t=k();let l;e[0]!==t?(l=t("settings.agentTools.orgMcpsPickTitle"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(he,{className:"mt-3 h-24 w-full"}),e[2]=n):n=e[2];let i;return e[3]!==l?(i=s.jsx(U,{title:l,children:n}),e[3]=l,e[4]=i):i=e[4],i}function se(e){return[...e].sort().join("\0")}function Le(e,t){return[W.SELF,W.REGISTRY,W.COMMUNITY_REGISTRY,W.DEV_ASSETS,W.REPORTS].some(l=>l(e)===t)}function Ve(){const e=y.c(82),t=k(),{org:l}=xe(),n=Be(),i=De(),c=Oe(),[o,r]=Q.useState(i);let g;e[0]!==i?(g=se(i),e[0]=i,e[1]=g):g=e[1];const[u,j]=Q.useState(g),[b,_]=Q.useState(""),v=se(i);u!==v&&(j(v),r(i));let d,f,a,x,m;if(e[2]!==n||e[3]!==o||e[4]!==l||e[5]!==b||e[6]!==i){let p;e[12]!==l?(p=E=>!Le(l.id,E.id),e[12]=l,e[13]=p):p=e[13],a=n.filter(p);const S=b.trim().toLowerCase();m=S?a.filter(E=>`${E.title} ${E.slug??""}`.toLowerCase().includes(S)):a;let w;e[14]!==o?(w=new Set(o),e[14]=o,e[15]=w):w=e[15],f=w;const te=E=>a.some(de=>de.id===E);d=se(o.filter(te))!==se(i.filter(te)),x=m.length>0&&m.every(E=>!f.has(E.id)),e[2]=n,e[3]=o,e[4]=l,e[5]=b,e[6]=i,e[7]=d,e[8]=f,e[9]=a,e[10]=x,e[11]=m}else d=e[7],f=e[8],a=e[9],x=e[10],m=e[11];const T=x;let q;e[16]!==o?(q=(p,S)=>{const w=new Set(p);r(S?o.filter(te=>!w.has(te)):[...new Set([...o,...p])])},e[16]=o,e[17]=q):q=e[17];const K=q;let J;e[18]!==o||e[19]!==a||e[20]!==c||e[21]!==t?(J=()=>c.mutate(o.filter(p=>a.some(S=>S.id===p)),{onSuccess:()=>le.success(t("settings.agentTools.orgMcpsPickSaved")),onError:()=>le.error(t("settings.agentTools.orgMcpsPickFailed"))}),e[18]=o,e[19]=a,e[20]=c,e[21]=t,e[22]=J):J=e[22];const ne=J;let C;e[23]!==t?(C=t("settings.agentTools.orgMcpsPickTitle"),e[23]=t,e[24]=C):C=e[24];let M;e[25]!==t?(M=t("settings.agentTools.orgMcpsPickDescription"),e[25]=t,e[26]=M):M=e[26];let X;e[27]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ne,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[27]=X):X=e[27];let Z;e[28]===Symbol.for("react.memo_cache_sentinel")?(Z=p=>_(p.target.value),e[28]=Z):Z=e[28];let P;e[29]!==t?(P=t("settings.agentTools.orgMcpsPickSearch"),e[29]=t,e[30]=P):P=e[30];let N;e[31]!==t?(N=t("settings.agentTools.orgMcpsPickSearch"),e[31]=t,e[32]=N):N=e[32];let $;e[33]!==b||e[34]!==P||e[35]!==N?($=s.jsxs("div",{className:"relative flex-1",children:[X,s.jsx(je,{value:b,onChange:Z,placeholder:P,"aria-label":N,className:"h-8 pl-8 text-xs"})]}),e[33]=b,e[34]=P,e[35]=N,e[36]=$):$=e[36];const oe=m.length===0;let z;e[37]!==T||e[38]!==K||e[39]!==m?(z=()=>K(m.map(He),!T),e[37]=T,e[38]=K,e[39]=m,e[40]=z):z=e[40];let A;e[41]!==T||e[42]!==t?(A=t(T?"settings.agentTools.orgMcpsPickDisableAll":"settings.agentTools.orgMcpsPickEnableAll"),e[41]=T,e[42]=t,e[43]=A):A=e[43];let R;e[44]!==oe||e[45]!==z||e[46]!==A?(R=s.jsx(ie,{variant:"outline",size:"sm",className:"shrink-0",disabled:oe,onClick:z,children:A}),e[44]=oe,e[45]=z,e[46]=A,e[47]=R):R=e[47];let D;e[48]!==$||e[49]!==R?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[$,R]}),e[48]=$,e[49]=R,e[50]=D):D=e[50];let O;e[51]!==f||e[52]!==a.length||e[53]!==K||e[54]!==t||e[55]!==m?(O=a.length===0?s.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickEmpty")}):m.length===0?s.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickNoMatch")}):m.map(p=>{const S=p.title||p.id;return s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx(We,{icon:p.icon,title:S}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm leading-tight",children:S}),p.slug&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:p.slug})]})]}),s.jsx(ae,{checked:!f.has(p.id),"aria-label":t("settings.agentTools.orgMcpsPickAriaLabel",{name:S}),onCheckedChange:w=>K([p.id],w)})]},p.id)}),e[51]=f,e[52]=a.length,e[53]=K,e[54]=t,e[55]=m,e[56]=O):O=e[56];let B;e[57]!==O?(B=s.jsx("div",{className:"max-h-64 overflow-y-auto surface divide-y divide-border",children:O}),e[57]=O,e[58]=B):B=e[58];const ce=!d||c.isPending;let F;e[59]!==c.isPending||e[60]!==t?(F=c.isPending?t("settings.agentTools.orgMcpsPickSaving"):t("settings.agentTools.orgMcpsPickSave"),e[59]=c.isPending,e[60]=t,e[61]=F):F=e[61];let I;e[62]!==ne||e[63]!==ce||e[64]!==F?(I=s.jsx(ie,{size:"sm",disabled:ce,onClick:ne,children:F}),e[62]=ne,e[63]=ce,e[64]=F,e[65]=I):I=e[65];let L;e[66]!==d||e[67]!==i||e[68]!==c.isPending||e[69]!==t?(L=d&&s.jsx(ie,{variant:"ghost",size:"sm",disabled:c.isPending,onClick:()=>r(i),children:t("settings.agentTools.orgMcpsPickDiscard")}),e[66]=d,e[67]=i,e[68]=c.isPending,e[69]=t,e[70]=L):L=e[70];let V;e[71]!==I||e[72]!==L?(V=s.jsxs("div",{className:"flex items-center gap-2",children:[I,L]}),e[71]=I,e[72]=L,e[73]=V):V=e[73];let H;e[74]!==D||e[75]!==B||e[76]!==V?(H=s.jsxs("div",{className:"mt-3 flex w-full flex-col gap-2",children:[D,B,V]}),e[74]=D,e[75]=B,e[76]=V,e[77]=H):H=e[77];let ee;return e[78]!==H||e[79]!==C||e[80]!==M?(ee=s.jsx(U,{title:C,description:M,children:H}),e[78]=H,e[79]=C,e[80]=M,e[81]=ee):ee=e[81],ee}function He(e){return e.id}function We(e){const t=y.c(4),{icon:l,title:n}=e,[i,c]=Q.useState(!1);let o;return t[0]!==i||t[1]!==l||t[2]!==n?(o=s.jsx("div",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/20",children:l&&!i?s.jsx("img",{src:l,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:()=>c(!0)}):s.jsx("span",{className:"text-2xs font-semibold text-muted-foreground",children:n.charAt(0).toUpperCase()})}),t[0]=i,t[1]=l,t[2]=n,t[3]=o):o=t[3],o}function st(){const e=y.c(8),t=k();let l;e[0]!==t?(l=t("settings.agentTools.chatRuntimeSection"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(h,{flag:"chat_harness_sandbox_only",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessSandboxOnlyTitle",descriptionKey:"settings.agentTools.chatHarnessSandboxOnlyDescription"}),e[2]=n):n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(h,{flag:"coding_agents_claude_code",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.codingAgentsClaudeCodeTitle",descriptionKey:"settings.agentTools.codingAgentsClaudeCodeDescription"}),e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"chat_harness_codex",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessCodexTitle",descriptionKey:"settings.agentTools.chatHarnessCodexDescription"}),e[4]=c):c=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(Y,{children:[n,i,c,s.jsx(h,{flag:"voice_mode",icon:s.jsx(Te,{size:16}),titleKey:"settings.voice.title",descriptionKey:"settings.voice.description"})]}),e[5]=o):o=e[5];let r;return e[6]!==l?(r=s.jsx(G,{title:l,children:o}),e[6]=l,e[7]=r):r=e[7],r}function it(){const e=y.c(7),t=k();let l;e[0]!==t?(l=t("settings.blog.sectionTitle"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(h,{flag:"blog_view_enabled",icon:s.jsx(be,{size:16}),titleKey:"settings.blogView.title",descriptionKey:"settings.blogView.description"}),e[2]=n):n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(h,{flag:"blog_ai_enabled",icon:s.jsx(ke,{size:16}),titleKey:"settings.blog.aiTitle",descriptionKey:"settings.blog.aiDescription"}),e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Y,{children:[n,i,s.jsx(h,{flag:"hide_default_blog_blocks",icon:s.jsx(we,{size:16}),titleKey:"settings.blogBlocks.title",descriptionKey:"settings.blogBlocks.description"})]}),e[4]=c):c=e[4];let o;return e[5]!==l?(o=s.jsx(G,{title:l,children:c}),e[5]=l,e[6]=o):o=e[6],o}function lt(e){const t=y.c(29),{manageable:l}=e,n=l===void 0?!1:l,i=k(),c=ge("new_blocks_editor"),o=$e();let r;t[0]!==i?(r=i("sidebar.projectNav.siteEditor"),t[0]=i,t[1]=r):r=t[1];let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ee,{size:16}),t[2]=g):g=t[2];let u;t[3]!==i?(u=i("settings.blocksEditor.title"),t[3]=i,t[4]=u):u=t[4];let j;t[5]!==i?(j=i("settings.blocksEditor.description"),t[5]=i,t[6]=j):j=t[6];const b=o.isPending;let _;t[7]!==i?(_=i("settings.blocksEditor.title"),t[7]=i,t[8]=_):_=t[8];let v;t[9]!==o||t[10]!==i?(v=T=>{fe("preferences_blocks_editor_toggled",{enabled:T}),o.mutate(T,{onError:()=>le.error(i("settings.review.updateError"))})},t[9]=o,t[10]=i,t[11]=v):v=t[11];let d;t[12]!==c||t[13]!==o.isPending||t[14]!==_||t[15]!==v?(d=s.jsx(ae,{checked:c,disabled:b,"aria-label":_,onCheckedChange:v}),t[12]=c,t[13]=o.isPending,t[14]=_,t[15]=v,t[16]=d):d=t[16];let f;t[17]!==u||t[18]!==j||t[19]!==d?(f=s.jsx(U,{icon:g,title:u,description:j,action:d}),t[17]=u,t[18]=j,t[19]=d,t[20]=f):f=t[20];let a;t[21]!==n?(a=n&&s.jsxs(s.Fragment,{children:[s.jsx(h,{flag:"site_apps_install_enabled",icon:s.jsx(Ke,{size:16}),titleKey:"settings.siteAppsInstall.title",descriptionKey:"settings.siteAppsInstall.description"}),s.jsx(h,{flag:"multi_app_preview",icon:s.jsx(Ce,{size:16}),titleKey:"settings.multiAppPreview.title",descriptionKey:"settings.multiAppPreview.description"}),s.jsx(h,{flag:"cms_auto_commit",icon:s.jsx(Me,{size:16}),titleKey:"settings.cmsAutoCommit.title",descriptionKey:"settings.cmsAutoCommit.description"})]}),t[21]=n,t[22]=a):a=t[22];let x;t[23]!==f||t[24]!==a?(x=s.jsxs(Y,{children:[f,a]}),t[23]=f,t[24]=a,t[25]=x):x=t[25];let m;return t[26]!==x||t[27]!==r?(m=s.jsx(G,{title:r,children:x}),t[26]=x,t[27]=r,t[28]=m):m=t[28],m}function Qe(){const e=y.c(3),t=ze();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Pe,{size:16}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(h,{flag:"reviewer_enabled",icon:l,titleKey:"settings.review.reviewerTitle",descriptionKey:"settings.review.reviewerDescription",enabled:t}),e[1]=t,e[2]=n):n=e[2],n}function Ye(){const e=y.c(3),t=Ae();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(me,{size:16}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(h,{flag:"auto_resolve_conflicts",icon:l,titleKey:"settings.review.autoResolveConflictsTitle",descriptionKey:"settings.review.autoResolveConflictsDescription",enabled:t}),e[1]=t,e[2]=n):n=e[2],n}function h(e){const t=y.c(23),{flag:l,icon:n,titleKey:i,descriptionKey:c,enabled:o}=e,r=k(),g=ge(l),u=o??g,j=Re();let b;t[0]!==r||t[1]!==i?(b=r(i),t[0]=r,t[1]=i,t[2]=b):b=t[2];let _;t[3]!==c||t[4]!==r?(_=r(c),t[3]=c,t[4]=r,t[5]=_):_=t[5];const v=j.isPending;let d;t[6]!==r||t[7]!==i?(d=r(i),t[6]=r,t[7]=i,t[8]=d):d=t[8];let f;t[9]!==l||t[10]!==j||t[11]!==r?(f=m=>j.mutate(l,m,{onError:()=>le.error(r("settings.review.updateError"))}),t[9]=l,t[10]=j,t[11]=r,t[12]=f):f=t[12];let a;t[13]!==u||t[14]!==j.isPending||t[15]!==d||t[16]!==f?(a=s.jsx(ae,{checked:u,disabled:v,"aria-label":d,onCheckedChange:f}),t[13]=u,t[14]=j.isPending,t[15]=d,t[16]=f,t[17]=a):a=t[17];let x;return t[18]!==n||t[19]!==b||t[20]!==_||t[21]!==a?(x=s.jsx(U,{icon:n,title:b,description:_,action:a}),t[18]=n,t[19]=b,t[20]=_,t[21]=a,t[22]=x):x=t[22],x}export{tt as A,it as B,st as C,et as R,lt as a};
1
+ import{c as y,b as k,j as s,gh as Y,gV as G,E as fe,t as le,gi as U,dO as me,Q as pe,R as ue,r as Q,B as ie,a6 as xe,e0 as he,I as je,W}from"./index-BVZH8mqe.js";import{S as ae}from"./switch-BX8b8tB6.js";import{n as be}from"./BookOpen01-CdH9hkvz.js";import{f as _e,h as ye,l as ve,e as Se,c as re,j as Te,s as ke,d as we,a as Ee,k as Ke,n as Ce,g as Me,b as Pe,i as Ne}from"./UserSquare-D44lppb_.js";import{a as ge,g as $e,f as ze,h as Ae,i as Re,j as De,k as Oe}from"./use-organization-settings-BoOQOwrg.js";import{b as Be}from"./use-connection-C-m8b2Fk.js";function et(){const e=y.c(12),t=k();let l;e[0]!==t?(l=t("settings.review.title"),e[0]=t,e[1]=l):l=e[1];let n;e[2]!==t?(n=t("settings.review.description"),e[2]=t,e[3]=n):n=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qe,{}),e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"cheap_reviewer_model",icon:s.jsx(_e,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[5]=c):c=e[5];let o,r;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(h,{flag:"auto_merge",icon:s.jsx(ye,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),r=s.jsx(Ye,{}),e[6]=o,e[7]=r):(o=e[6],r=e[7]);let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs(Y,{children:[i,c,o,r,s.jsx(h,{flag:"auto_assign_report_tasks_to_super_agent",icon:s.jsx(ve,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=g):g=e[8];let u;return e[9]!==l||e[10]!==n?(u=s.jsx(G,{title:l,description:n,children:g}),e[9]=l,e[10]=n,e[11]=u):u=e[11],u}function tt(){const e=y.c(13),t=k(),l=ge("coding_agent_org_mcps");let n;e[0]!==t?(n=t("settings.agentTools.title"),e[0]=t,e[1]=n):n=e[1];let i;e[2]!==t?(i=t("settings.agentTools.description"),e[2]=t,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"coding_agent_org_mcps",icon:s.jsx(Se,{size:16}),titleKey:"settings.agentTools.orgMcpsTitle",descriptionKey:"settings.agentTools.orgMcpsDescription"}),e[4]=c):c=e[4];let o;e[5]!==l?(o=l?s.jsx(Fe,{}):null,e[5]=l,e[6]=o):o=e[6];let r;e[7]!==o?(r=s.jsxs(Y,{children:[c,o]}),e[7]=o,e[8]=r):r=e[8];let g;return e[9]!==n||e[10]!==i||e[11]!==r?(g=s.jsx(G,{title:n,description:i,children:r}),e[9]=n,e[10]=i,e[11]=r,e[12]=g):g=e[12],g}function Fe(){const e=y.c(2),t=k();let l;return e[0]!==t?(l=s.jsx(pe,{children:n=>{const{reset:i}=n;return s.jsx(ue,{fallback:c=>{const{resetError:o}=c;return s.jsx(U,{title:t("settings.agentTools.orgMcpsPickTitle"),children:s.jsxs("div",{role:"alert",className:"mt-3 flex items-center gap-2",children:[s.jsx("p",{className:"text-sm text-destructive",children:t("settings.agentTools.orgMcpsPickLoadFailed")}),s.jsx(ie,{variant:"outline",size:"sm",onClick:()=>{i(),o()},children:t("common.errorBoundary.tryAgain")})]})})},children:s.jsx(Q.Suspense,{fallback:s.jsx(Ie,{}),children:s.jsx(Ve,{})})})}}),e[0]=t,e[1]=l):l=e[1],l}function Ie(){const e=y.c(5),t=k();let l;e[0]!==t?(l=t("settings.agentTools.orgMcpsPickTitle"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(he,{className:"mt-3 h-24 w-full"}),e[2]=n):n=e[2];let i;return e[3]!==l?(i=s.jsx(U,{title:l,children:n}),e[3]=l,e[4]=i):i=e[4],i}function se(e){return[...e].sort().join("\0")}function Le(e,t){return[W.SELF,W.REGISTRY,W.COMMUNITY_REGISTRY,W.DEV_ASSETS,W.REPORTS].some(l=>l(e)===t)}function Ve(){const e=y.c(82),t=k(),{org:l}=xe(),n=Be(),i=De(),c=Oe(),[o,r]=Q.useState(i);let g;e[0]!==i?(g=se(i),e[0]=i,e[1]=g):g=e[1];const[u,j]=Q.useState(g),[b,_]=Q.useState(""),v=se(i);u!==v&&(j(v),r(i));let d,f,a,x,m;if(e[2]!==n||e[3]!==o||e[4]!==l||e[5]!==b||e[6]!==i){let p;e[12]!==l?(p=E=>!Le(l.id,E.id),e[12]=l,e[13]=p):p=e[13],a=n.filter(p);const S=b.trim().toLowerCase();m=S?a.filter(E=>`${E.title} ${E.slug??""}`.toLowerCase().includes(S)):a;let w;e[14]!==o?(w=new Set(o),e[14]=o,e[15]=w):w=e[15],f=w;const te=E=>a.some(de=>de.id===E);d=se(o.filter(te))!==se(i.filter(te)),x=m.length>0&&m.every(E=>!f.has(E.id)),e[2]=n,e[3]=o,e[4]=l,e[5]=b,e[6]=i,e[7]=d,e[8]=f,e[9]=a,e[10]=x,e[11]=m}else d=e[7],f=e[8],a=e[9],x=e[10],m=e[11];const T=x;let q;e[16]!==o?(q=(p,S)=>{const w=new Set(p);r(S?o.filter(te=>!w.has(te)):[...new Set([...o,...p])])},e[16]=o,e[17]=q):q=e[17];const K=q;let J;e[18]!==o||e[19]!==a||e[20]!==c||e[21]!==t?(J=()=>c.mutate(o.filter(p=>a.some(S=>S.id===p)),{onSuccess:()=>le.success(t("settings.agentTools.orgMcpsPickSaved")),onError:()=>le.error(t("settings.agentTools.orgMcpsPickFailed"))}),e[18]=o,e[19]=a,e[20]=c,e[21]=t,e[22]=J):J=e[22];const ne=J;let C;e[23]!==t?(C=t("settings.agentTools.orgMcpsPickTitle"),e[23]=t,e[24]=C):C=e[24];let M;e[25]!==t?(M=t("settings.agentTools.orgMcpsPickDescription"),e[25]=t,e[26]=M):M=e[26];let X;e[27]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ne,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[27]=X):X=e[27];let Z;e[28]===Symbol.for("react.memo_cache_sentinel")?(Z=p=>_(p.target.value),e[28]=Z):Z=e[28];let P;e[29]!==t?(P=t("settings.agentTools.orgMcpsPickSearch"),e[29]=t,e[30]=P):P=e[30];let N;e[31]!==t?(N=t("settings.agentTools.orgMcpsPickSearch"),e[31]=t,e[32]=N):N=e[32];let $;e[33]!==b||e[34]!==P||e[35]!==N?($=s.jsxs("div",{className:"relative flex-1",children:[X,s.jsx(je,{value:b,onChange:Z,placeholder:P,"aria-label":N,className:"h-8 pl-8 text-xs"})]}),e[33]=b,e[34]=P,e[35]=N,e[36]=$):$=e[36];const oe=m.length===0;let z;e[37]!==T||e[38]!==K||e[39]!==m?(z=()=>K(m.map(He),!T),e[37]=T,e[38]=K,e[39]=m,e[40]=z):z=e[40];let A;e[41]!==T||e[42]!==t?(A=t(T?"settings.agentTools.orgMcpsPickDisableAll":"settings.agentTools.orgMcpsPickEnableAll"),e[41]=T,e[42]=t,e[43]=A):A=e[43];let R;e[44]!==oe||e[45]!==z||e[46]!==A?(R=s.jsx(ie,{variant:"outline",size:"sm",className:"shrink-0",disabled:oe,onClick:z,children:A}),e[44]=oe,e[45]=z,e[46]=A,e[47]=R):R=e[47];let D;e[48]!==$||e[49]!==R?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[$,R]}),e[48]=$,e[49]=R,e[50]=D):D=e[50];let O;e[51]!==f||e[52]!==a.length||e[53]!==K||e[54]!==t||e[55]!==m?(O=a.length===0?s.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickEmpty")}):m.length===0?s.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickNoMatch")}):m.map(p=>{const S=p.title||p.id;return s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx(We,{icon:p.icon,title:S}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm leading-tight",children:S}),p.slug&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:p.slug})]})]}),s.jsx(ae,{checked:!f.has(p.id),"aria-label":t("settings.agentTools.orgMcpsPickAriaLabel",{name:S}),onCheckedChange:w=>K([p.id],w)})]},p.id)}),e[51]=f,e[52]=a.length,e[53]=K,e[54]=t,e[55]=m,e[56]=O):O=e[56];let B;e[57]!==O?(B=s.jsx("div",{className:"max-h-64 overflow-y-auto surface divide-y divide-border",children:O}),e[57]=O,e[58]=B):B=e[58];const ce=!d||c.isPending;let F;e[59]!==c.isPending||e[60]!==t?(F=c.isPending?t("settings.agentTools.orgMcpsPickSaving"):t("settings.agentTools.orgMcpsPickSave"),e[59]=c.isPending,e[60]=t,e[61]=F):F=e[61];let I;e[62]!==ne||e[63]!==ce||e[64]!==F?(I=s.jsx(ie,{size:"sm",disabled:ce,onClick:ne,children:F}),e[62]=ne,e[63]=ce,e[64]=F,e[65]=I):I=e[65];let L;e[66]!==d||e[67]!==i||e[68]!==c.isPending||e[69]!==t?(L=d&&s.jsx(ie,{variant:"ghost",size:"sm",disabled:c.isPending,onClick:()=>r(i),children:t("settings.agentTools.orgMcpsPickDiscard")}),e[66]=d,e[67]=i,e[68]=c.isPending,e[69]=t,e[70]=L):L=e[70];let V;e[71]!==I||e[72]!==L?(V=s.jsxs("div",{className:"flex items-center gap-2",children:[I,L]}),e[71]=I,e[72]=L,e[73]=V):V=e[73];let H;e[74]!==D||e[75]!==B||e[76]!==V?(H=s.jsxs("div",{className:"mt-3 flex w-full flex-col gap-2",children:[D,B,V]}),e[74]=D,e[75]=B,e[76]=V,e[77]=H):H=e[77];let ee;return e[78]!==H||e[79]!==C||e[80]!==M?(ee=s.jsx(U,{title:C,description:M,children:H}),e[78]=H,e[79]=C,e[80]=M,e[81]=ee):ee=e[81],ee}function He(e){return e.id}function We(e){const t=y.c(4),{icon:l,title:n}=e,[i,c]=Q.useState(!1);let o;return t[0]!==i||t[1]!==l||t[2]!==n?(o=s.jsx("div",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/20",children:l&&!i?s.jsx("img",{src:l,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:()=>c(!0)}):s.jsx("span",{className:"text-2xs font-semibold text-muted-foreground",children:n.charAt(0).toUpperCase()})}),t[0]=i,t[1]=l,t[2]=n,t[3]=o):o=t[3],o}function st(){const e=y.c(8),t=k();let l;e[0]!==t?(l=t("settings.agentTools.chatRuntimeSection"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(h,{flag:"chat_harness_sandbox_only",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessSandboxOnlyTitle",descriptionKey:"settings.agentTools.chatHarnessSandboxOnlyDescription"}),e[2]=n):n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(h,{flag:"coding_agents_claude_code",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.codingAgentsClaudeCodeTitle",descriptionKey:"settings.agentTools.codingAgentsClaudeCodeDescription"}),e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(h,{flag:"chat_harness_codex",icon:s.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessCodexTitle",descriptionKey:"settings.agentTools.chatHarnessCodexDescription"}),e[4]=c):c=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(Y,{children:[n,i,c,s.jsx(h,{flag:"voice_mode",icon:s.jsx(Te,{size:16}),titleKey:"settings.voice.title",descriptionKey:"settings.voice.description"})]}),e[5]=o):o=e[5];let r;return e[6]!==l?(r=s.jsx(G,{title:l,children:o}),e[6]=l,e[7]=r):r=e[7],r}function it(){const e=y.c(7),t=k();let l;e[0]!==t?(l=t("settings.blog.sectionTitle"),e[0]=t,e[1]=l):l=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(h,{flag:"blog_view_enabled",icon:s.jsx(be,{size:16}),titleKey:"settings.blogView.title",descriptionKey:"settings.blogView.description"}),e[2]=n):n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(h,{flag:"blog_ai_enabled",icon:s.jsx(ke,{size:16}),titleKey:"settings.blog.aiTitle",descriptionKey:"settings.blog.aiDescription"}),e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Y,{children:[n,i,s.jsx(h,{flag:"hide_default_blog_blocks",icon:s.jsx(we,{size:16}),titleKey:"settings.blogBlocks.title",descriptionKey:"settings.blogBlocks.description"})]}),e[4]=c):c=e[4];let o;return e[5]!==l?(o=s.jsx(G,{title:l,children:c}),e[5]=l,e[6]=o):o=e[6],o}function lt(e){const t=y.c(29),{manageable:l}=e,n=l===void 0?!1:l,i=k(),c=ge("new_blocks_editor"),o=$e();let r;t[0]!==i?(r=i("sidebar.projectNav.siteEditor"),t[0]=i,t[1]=r):r=t[1];let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ee,{size:16}),t[2]=g):g=t[2];let u;t[3]!==i?(u=i("settings.blocksEditor.title"),t[3]=i,t[4]=u):u=t[4];let j;t[5]!==i?(j=i("settings.blocksEditor.description"),t[5]=i,t[6]=j):j=t[6];const b=o.isPending;let _;t[7]!==i?(_=i("settings.blocksEditor.title"),t[7]=i,t[8]=_):_=t[8];let v;t[9]!==o||t[10]!==i?(v=T=>{fe("preferences_blocks_editor_toggled",{enabled:T}),o.mutate(T,{onError:()=>le.error(i("settings.review.updateError"))})},t[9]=o,t[10]=i,t[11]=v):v=t[11];let d;t[12]!==c||t[13]!==o.isPending||t[14]!==_||t[15]!==v?(d=s.jsx(ae,{checked:c,disabled:b,"aria-label":_,onCheckedChange:v}),t[12]=c,t[13]=o.isPending,t[14]=_,t[15]=v,t[16]=d):d=t[16];let f;t[17]!==u||t[18]!==j||t[19]!==d?(f=s.jsx(U,{icon:g,title:u,description:j,action:d}),t[17]=u,t[18]=j,t[19]=d,t[20]=f):f=t[20];let a;t[21]!==n?(a=n&&s.jsxs(s.Fragment,{children:[s.jsx(h,{flag:"site_apps_install_enabled",icon:s.jsx(Ke,{size:16}),titleKey:"settings.siteAppsInstall.title",descriptionKey:"settings.siteAppsInstall.description"}),s.jsx(h,{flag:"multi_app_preview",icon:s.jsx(Ce,{size:16}),titleKey:"settings.multiAppPreview.title",descriptionKey:"settings.multiAppPreview.description"}),s.jsx(h,{flag:"cms_auto_commit",icon:s.jsx(Me,{size:16}),titleKey:"settings.cmsAutoCommit.title",descriptionKey:"settings.cmsAutoCommit.description"})]}),t[21]=n,t[22]=a):a=t[22];let x;t[23]!==f||t[24]!==a?(x=s.jsxs(Y,{children:[f,a]}),t[23]=f,t[24]=a,t[25]=x):x=t[25];let m;return t[26]!==x||t[27]!==r?(m=s.jsx(G,{title:r,children:x}),t[26]=x,t[27]=r,t[28]=m):m=t[28],m}function Qe(){const e=y.c(3),t=ze();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Pe,{size:16}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(h,{flag:"reviewer_enabled",icon:l,titleKey:"settings.review.reviewerTitle",descriptionKey:"settings.review.reviewerDescription",enabled:t}),e[1]=t,e[2]=n):n=e[2],n}function Ye(){const e=y.c(3),t=Ae();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(me,{size:16}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(h,{flag:"auto_resolve_conflicts",icon:l,titleKey:"settings.review.autoResolveConflictsTitle",descriptionKey:"settings.review.autoResolveConflictsDescription",enabled:t}),e[1]=t,e[2]=n):n=e[2],n}function h(e){const t=y.c(23),{flag:l,icon:n,titleKey:i,descriptionKey:c,enabled:o}=e,r=k(),g=ge(l),u=o??g,j=Re();let b;t[0]!==r||t[1]!==i?(b=r(i),t[0]=r,t[1]=i,t[2]=b):b=t[2];let _;t[3]!==c||t[4]!==r?(_=r(c),t[3]=c,t[4]=r,t[5]=_):_=t[5];const v=j.isPending;let d;t[6]!==r||t[7]!==i?(d=r(i),t[6]=r,t[7]=i,t[8]=d):d=t[8];let f;t[9]!==l||t[10]!==j||t[11]!==r?(f=m=>j.mutate(l,m,{onError:()=>le.error(r("settings.review.updateError"))}),t[9]=l,t[10]=j,t[11]=r,t[12]=f):f=t[12];let a;t[13]!==u||t[14]!==j.isPending||t[15]!==d||t[16]!==f?(a=s.jsx(ae,{checked:u,disabled:v,"aria-label":d,onCheckedChange:f}),t[13]=u,t[14]=j.isPending,t[15]=d,t[16]=f,t[17]=a):a=t[17];let x;return t[18]!==n||t[19]!==b||t[20]!==_||t[21]!==a?(x=s.jsx(U,{icon:n,title:b,description:_,action:a}),t[18]=n,t[19]=b,t[20]=_,t[21]=a,t[22]=x):x=t[22],x}export{tt as A,it as B,st as C,et as R,lt as a};
@@ -1 +1 @@
1
- import{a6 as I,hj as N,ax as L,i as _,K as B}from"./index-MO7rMyL2.js";const v="connections",d="*",m="!";function p(e){return`${m}${e}`}function T(e){return e.startsWith(m)?e.slice(m.length):null}function w(e){if(e.includes(p(d)))return{kind:"only",names:[]};const t=new Set,r=new Set;for(const n of e){const l=T(n);l!==null?t.add(l):n!==d&&r.add(n)}return e.includes(d)?t.size===0?{kind:"all"}:{kind:"except",names:[...t]}:{kind:"only",names:[...r].filter(n=>!t.has(n))}}function x(e){return[d,...e.names.map(p)]}const O="projects";function D(e){if(!e)return null;const t=e[O];return Array.isArray(t)?t:null}function K(e){return e===null?{kind:"all"}:w(e)}const A=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function F(e){return e.replace(/-/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function j(e){if(!e)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const t=[];let r=!1;const n=[];let l=!1;const c=new Set;let a=!1,i=0,f=!1;for(const[o,s]of Object.entries(e)){if(o==="self"){s.includes("*")?r=!0:t.push(...s);continue}if(o==="models"){s.includes("*:*")?f=!0:i=s.length;continue}if(o!==O){if(o===v){w(s).kind!=="only"&&(l=!0,a=!0);continue}if(o==="*"){if(l=!0,s.includes("*"))a=!0;else for(const u of s)c.add(u);continue}if(n.push(o),s.includes("*"))a=!0;else for(const u of s)c.add(u)}}return{staticPermissions:t,allowsAllStaticPermissions:r,connectionIds:n,allowsAllConnections:l,toolNames:Array.from(c),allowsAllTools:a,modelCount:i,allowsAllModels:f}}function U(){const{locator:e}=I(),t=N(),{isPrivileged:r}=L(),{data:n,isLoading:l,error:c,refetch:a}=_({queryKey:B.organizationRoles(e),queryFn:async()=>{try{const o=await t.organization.listRoles();return o?.error?(console.error("[useOrganizationRoles] API error:",o.error),[]):o?.data??[]}catch(o){return console.error("[useOrganizationRoles] Fetch error:",o),[]}},enabled:r,staleTime:3e4}),i=A.map(o=>({role:o.value,label:o.label,isBuiltin:o.isBuiltin}));if(n&&Array.isArray(n))for(const o of n){const s=o.role;if(!s||A.some(E=>E.value===s))continue;const{staticPermissions:u,allowsAllStaticPermissions:g,connectionIds:P,allowsAllConnections:h,toolNames:S,allowsAllTools:C,modelCount:y,allowsAllModels:b}=j(o.permission);i.push({id:o.id,role:s,label:F(s),isBuiltin:!1,permission:o.permission??void 0,staticPermissionCount:g?-1:u.length,allowsAllStaticPermissions:g,connectionCount:h?-1:P.length,allowsAllConnections:h,toolCount:C?-1:S.length,allowsAllTools:C,modelCount:b?-1:y,allowsAllModels:b})}const f=i.filter(o=>!o.isBuiltin);return{roles:i,customRoles:f,builtinRoles:i.filter(o=>o.isBuiltin),isLoading:l,error:c,refetch:a}}const R=["bg-chart-1","bg-chart-2","bg-chart-3","bg-chart-4","bg-chart-5"],k={owner:"bg-destructive",admin:"bg-chart-1",user:"bg-success"};function z(e){if(!e)return"bg-muted-foreground";let t=0;for(let n=0;n<e.length;n++){const l=e.charCodeAt(n);t=(t<<5)-t+l,t=t&t}const r=Math.abs(t)%R.length;return R[r]}function Y(e,t){return t?k[e]??"bg-muted-foreground":z(e)}export{v as C,O as P,z as a,d as b,D as c,p as d,w as e,Y as g,x as l,K as p,U as u};
1
+ import{a6 as I,hj as N,ax as L,i as _,K as B}from"./index-BVZH8mqe.js";const v="connections",d="*",m="!";function p(e){return`${m}${e}`}function T(e){return e.startsWith(m)?e.slice(m.length):null}function w(e){if(e.includes(p(d)))return{kind:"only",names:[]};const t=new Set,r=new Set;for(const n of e){const l=T(n);l!==null?t.add(l):n!==d&&r.add(n)}return e.includes(d)?t.size===0?{kind:"all"}:{kind:"except",names:[...t]}:{kind:"only",names:[...r].filter(n=>!t.has(n))}}function x(e){return[d,...e.names.map(p)]}const O="projects";function D(e){if(!e)return null;const t=e[O];return Array.isArray(t)?t:null}function K(e){return e===null?{kind:"all"}:w(e)}const A=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function F(e){return e.replace(/-/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function j(e){if(!e)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const t=[];let r=!1;const n=[];let l=!1;const c=new Set;let a=!1,i=0,f=!1;for(const[o,s]of Object.entries(e)){if(o==="self"){s.includes("*")?r=!0:t.push(...s);continue}if(o==="models"){s.includes("*:*")?f=!0:i=s.length;continue}if(o!==O){if(o===v){w(s).kind!=="only"&&(l=!0,a=!0);continue}if(o==="*"){if(l=!0,s.includes("*"))a=!0;else for(const u of s)c.add(u);continue}if(n.push(o),s.includes("*"))a=!0;else for(const u of s)c.add(u)}}return{staticPermissions:t,allowsAllStaticPermissions:r,connectionIds:n,allowsAllConnections:l,toolNames:Array.from(c),allowsAllTools:a,modelCount:i,allowsAllModels:f}}function U(){const{locator:e}=I(),t=N(),{isPrivileged:r}=L(),{data:n,isLoading:l,error:c,refetch:a}=_({queryKey:B.organizationRoles(e),queryFn:async()=>{try{const o=await t.organization.listRoles();return o?.error?(console.error("[useOrganizationRoles] API error:",o.error),[]):o?.data??[]}catch(o){return console.error("[useOrganizationRoles] Fetch error:",o),[]}},enabled:r,staleTime:3e4}),i=A.map(o=>({role:o.value,label:o.label,isBuiltin:o.isBuiltin}));if(n&&Array.isArray(n))for(const o of n){const s=o.role;if(!s||A.some(E=>E.value===s))continue;const{staticPermissions:u,allowsAllStaticPermissions:g,connectionIds:P,allowsAllConnections:h,toolNames:S,allowsAllTools:C,modelCount:y,allowsAllModels:b}=j(o.permission);i.push({id:o.id,role:s,label:F(s),isBuiltin:!1,permission:o.permission??void 0,staticPermissionCount:g?-1:u.length,allowsAllStaticPermissions:g,connectionCount:h?-1:P.length,allowsAllConnections:h,toolCount:C?-1:S.length,allowsAllTools:C,modelCount:b?-1:y,allowsAllModels:b})}const f=i.filter(o=>!o.isBuiltin);return{roles:i,customRoles:f,builtinRoles:i.filter(o=>o.isBuiltin),isLoading:l,error:c,refetch:a}}const R=["bg-chart-1","bg-chart-2","bg-chart-3","bg-chart-4","bg-chart-5"],k={owner:"bg-destructive",admin:"bg-chart-1",user:"bg-success"};function z(e){if(!e)return"bg-muted-foreground";let t=0;for(let n=0;n<e.length;n++){const l=e.charCodeAt(n);t=(t<<5)-t+l,t=t&t}const r=Math.abs(t)%R.length;return R[r]}function Y(e,t){return t?k[e]??"bg-muted-foreground":z(e)}export{v as C,O as P,z as a,d as b,D as c,p as d,w as e,Y as g,x as l,K as p,U as u};
@@ -0,0 +1 @@
1
+ import{aH as qe,bx as ae,aI as W,cp as Ge,dA as Xe,c as Y,a6 as Ye,hj as He,i as nt,j as s,b as ee,q as it,r as F,aG as Pt,aF as Dt,e as rt,t as Le,K as Ne,E as $e,dN as Lt,C as Mt,n as se,m as q,ah as at,B as re,P as wt,h as we,gV as et,gh as tt,gi as st,a7 as yt,hf as ct,o as dt,b5 as lt,au as vt,aP as mt,aO as ut,aJ as ft,aK as gt,aL as _t,aM as Et,b9 as Tt,aN as ht,ax as Gt,u as At,i4 as It,i8 as kt,R as Bt,d as Ut,_ as Kt,X as Vt,Z as Ft,Y as zt}from"./index-BVZH8mqe.js";import{g as pt,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-CNGxunw8.js";import{B as Me}from"./badge-wWozseh3.js";import{a as Xt}from"./SwitchHorizontal01-sPBj-OL8.js";import{s as Fe}from"./Plus-BJfG2DpW.js";import{s as es}from"./Trash01-l4iOtEBN.js";import{C as ts}from"./collection-table-wrapper-B8osPBIm.js";import{E as ot}from"./empty-state-hp9a4BQn.js";import{S as Qe}from"./search-input-D3b0Dc5Y.js";import{P as Rt,D as xt}from"./ai-providers-logos-DD3qZ33J.js";import{a as ss}from"./tool-set-selector-DpIP2fev.js";import{b as St}from"./use-connection-C-m8b2Fk.js";import{d as ls}from"./repository-binding-BIfwJXBl.js";import{u as os,h as ns}from"./use-ai-providers-C30oeluP.js";import{C as Ze}from"./checkbox-Cs2Li62P.js";import{S as ce}from"./switch-BX8b8tB6.js";import{b as be,c as je,T as Pe,a as De}from"./tooltip-CfeBMv8z.js";import{I as Ot}from"./integration-icon-CcV5frEs.js";import{P as is}from"./project-icon-C8Sq9Uyo.js";import{s as rs}from"./use-project-scope-BIucgFKc.js";import{t as as}from"./Globe04-DudUQgTy.js";import{t as cs}from"./ChevronDown-CWnE_Wmz.js";import{b2 as ds,k as ms}from"./agent-icon-BS6RPQ_A.js";import{A as us}from"./access-gate-Cb6wrWbo.js";import"./table-DNvSx4nT.js";import"./ArrowUp-CjAvmMLL.js";import"./SearchMd-DioGBYbO.js";import"./use-infinite-scroll-Ct_PbHT3.js";import"./ArrowLeft-DcKid1bz.js";import"./useSuspenseInfiniteQuery-BFQG7J82.js";import"./infiniteQueryObserver-f5kG4cIT.js";import"./use-mcp-client-7NPwItGN.js";import"./auth-C3yWOKhG.js";import"./collection-search-CDDauqCr.js";import"./connection-B7vXPxEB.js";import"./url-slug-BOPVIawN.js";import"./Minus-09UkIbMe.js";import"./index-BFjuxezw.js";import"./LinkBroken01-CpDM6pG5.js";import"./AlertCircle-kHXzu73r.js";import"./UserCheck01-B1rJ65So.js";import"./Tool01-BEo5XKkS.js";import"./ArrowRight-ajc9j6D-.js";import"./BookOpen01-CdH9hkvz.js";import"./CheckCircle-DG9pUM8a.js";import"./TrendUp01-aviiZW6M.js";import"./ChevronSelectorVertical-ByCpNum0.js";import"./ChevronUp-C_rAiuf1.js";import"./UserSquare-D44lppb_.js";import"./CreditCard01-C6eDo3p0.js";import"./File02-R0RW2VCN.js";import"./MessageCircle01-44De_8cO.js";import"./Eye-DFeDq2Hx.js";import"./Fingerprint04-D-EFj_6a.js";import"./Image01-Dfaw0Ysf.js";import"./Key01-9JQCF719.js";import"./LayoutLeft-B-cVGLzN.js";import"./Monitor01-BPQw3JGv.js";import"./Sun-U7FHkItb.js";import"./Play-BRDYCYl7.js";import"./ShoppingBag01-CdQhBv_H.js";import"./Upload01-BhvyPM8u.js";import"./Users01-CxQycal6.js";import"./XClose-BwokcWjs.js";import"./Zap-DoXbwvKP.js";import"./capability-load-error-Cwe4uK-x.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_CONFIG_LIST","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","generate_text","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:"assets:manage",label:"Manage assets",description:"Upload and delete files in configured buckets",section:"Organization",tools:["FILE_OBJECT_UPLOAD","FILE_OBJECT_DELETE"]},{id:"repositories:connect",label:"Connect repositories",description:"Connect git provider accounts and link existing repositories",section:"Organization",tools:["GIT_ACCOUNT_CONNECT_TOKEN","REPOSITORY_LINK"]},{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","assets:manage","repositories:connect"];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,R)=>{if(!_){if(l&&R){const D=E.flatMap(ps).flatMap(Is);r(!1),n(D.filter(o=>!h.tools.includes(o)));return}l||n(Es(h,i,!R))}};let g;e[11]!==m?(g=h=>{const{section:R,capabilities:D}=h;return{section:R,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 p;e[28]!==l||e[29]!==r||e[30]!==n||e[31]!==_?(p=_?void 0:()=>{r(!l),n([])},e[28]=l,e[29]=r,e[30]=n,e[31]=_,e[32]=p):p=e[32];let O;e[33]!==p||e[34]!==I||e[35]!==N||e[36]!==b?(O=s.jsx(tt,{children:s.jsx(st,{title:I,description:N,action:b,onClick:p})}),e[33]=p,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:R,capabilities:D}=h;return s.jsx(et,{title:R,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)})})},R)})]})}),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 ps(t){return t.capabilities}const Ct={anthropic:"Anthropic",openrouter:"OpenRouter"},Rs={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 Rs[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 p;e[0]!==u||e[1]!==d||e[2]!==_?(p=h=>d||u||_.includes("*")||_.includes(h),e[0]=u,e[1]=d,e[2]=_,e[3]=p):p=e[3];const O=p;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 R=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??Rt[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:R,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 p=new Map;for(const A of b){const M=xs(A.id,l.providerId),P=p.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),p.set(M,P)}const O=Array.from(p.entries()).map(ws).sort(Ms),j=O.length===1||x.length>0;E="flex flex-col gap-3";const h=Rt[l.providerId]??xt;let R;e[18]!==l.providerId||e[19]!==h?(R=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]=R):R=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]!==R?(c=s.jsxs("div",{className:"flex items-center gap-2",children:[R,o]}),e[23]=o,e[24]=R,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,R)=>{const D=i[h]??[],o={...i};if(D.includes(R)){const A=D.filter(M=>M!==R);A.length===0?delete o[h]:o[h]=A}else o[h]=[...D,R];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,R,D)=>{r(!1),n({...i,[h]:R.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 p;e[24]!==C||e[25]!==I||e[26]!==x||e[27]!==b?(p=s.jsxs("div",{className:C,onClick:I,children:[x,b]}),e[24]=C,e[25]=I,e[26]=x,e[27]=b,e[28]=p):p=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]!==p||e[39]!==O?(j=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[p,O]}),e[38]=p,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,p=!u&&"hover:bg-accent cursor-pointer";let O;e[22]!==p?(O=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",p),e[22]=p,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 R;e[30]!==h?(R=s.jsx("span",{className:"text-sm font-medium",children:h}),e[30]=h,e[31]=R):R=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]!==R?(A=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[R,o]}),e[36]=o,e[37]=R,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 p;e[16]!==u?(p=u("settings.orgRoleDetail.allConnectionsDescription"),e[16]=u,e[17]=p):p=e[17];let O;e[18]!==p?(O=s.jsx("span",{className:"text-xs text-muted-foreground",children:p}),e[18]=p,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 R;e[26]!==l||e[27]!==d||e[28]!==u||e[29]!==h?(R=ze(u,l,d,h),e[26]=l,e[27]=d,e[28]=u,e[29]=h,e[30]=R):R=e[30];let D;e[31]!==R?(D=s.jsx("div",{onClick:Fs,children:R}),e[31]=R,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,p,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?(p=s.jsxs(_t,{className:"px-6 pt-6",children:[H,X]}),e[35]=H,e[36]=X,e[37]=p):p=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]=p,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],p=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 R;e[46]!==h||e[47]!==N||e[48]!==x?(R=s.jsxs("div",{className:N,children:[x,h]}),e[46]=h,e[47]=N,e[48]=x,e[49]=R):R=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]!==R||e[66]!==L||e[67]!==b||e[68]!==p?(y=s.jsxs(c,{className:b,children:[p,R,L]}),e[64]=c,e[65]=R,e[66]=L,e[67]=b,e[68]=p,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 p;e[11]!==l?(p=o=>l.includes(o.id),e[11]=l,e[12]=p):p=e[12];const O=b.filter(p);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 R;e[15]!==u||e[16]!==m?(R=u??m("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=u,e[16]=m,e[17]=R):R=e[17];const D=R;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}],[p,O]=F.useState(""),[j,h]=F.useState(!1),R=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"?pt(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:()=>R(o.id),children:o.label},o.id))})})}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(Qe,{value:p,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:p,children:s.jsx(ss,{toolSet:c.watch("toolSet"),onToolSetChange:o=>c.setValue("toolSet",o,{shouldDirty:!0}),searchQuery:p})})}),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:p}),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:p}),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:p}),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:p,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 p;t[12]!==b?.data?.members?(p=b?.data?.members??[],t[12]=b?.data?.members,t[13]=p):p=t[13];const O=p;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 R;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(R=[...v,...bt],l){const ie=l.toLowerCase();R=R.filter(jt=>jt.role.label.toLowerCase().includes(ie))}t[16]=T,t[17]=h,t[18]=l,t[19]=e,t[20]=R}else R=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]!==R||t[86]!==Q||t[87]!==te||t[88]!==ue?(fe=s.jsx(ts,{columns:Q,data:R,isLoading:!1,onRowClick:te,emptyState:ue}),t[85]=R,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 pe;t[107]!==o||t[108]!==r?(pe=()=>{r?.id&&o.mutate(r.id),n(null)},t[107]=o,t[108]=r,t[109]=pe):pe=t[109];let Re;t[110]!==e?(Re=e("settings.roles.delete"),t[110]=e,t[111]=Re):Re=t[111];let xe;t[112]!==pe||t[113]!==Re?(xe=s.jsx(Tt,{onClick:pe,variant:"destructive",children:Re}),t[112]=pe,t[113]=Re,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",pt(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 So(){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{So as default};