@decocms/mesh 2.123.5 → 2.125.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 (205) hide show
  1. package/dist/client/assets/{AlertCircle-e9vRKWVt.js → AlertCircle-BzYW4X7z.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-CNHeyyqI.js → AlertOctagon-CUysWl_m.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-cnBbzVPi.js → AlertTriangle-DniGvpwb.js} +1 -1
  4. package/dist/client/assets/ArrowDown-B35oswmj.js +1 -0
  5. package/dist/client/assets/{ArrowLeft-TcoC4WAS.js → ArrowLeft-dS1h2Fqu.js} +1 -1
  6. package/dist/client/assets/ArrowUp-G8RCE5_O.js +1 -0
  7. package/dist/client/assets/{Check-EA1ayL22.js → Check-Bv0pZ3gl.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-xWFK4Wk3.js → CheckCircle-lzDHXhkH.js} +1 -1
  9. package/dist/client/assets/{CheckDone01-BOMbg_rH.js → CheckDone01-BrxNvWbF.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-4QT-kdyE.js → CheckVerified02-6wwLRSRQ.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-xG1flmUs.js → ChevronDown-CggIFEVQ.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-C9tH4CkK.js → ChevronRight-DgAfR8pA.js} +1 -1
  13. package/dist/client/assets/{Clock-BcphCi5B.js → Clock-IA7N95Qq.js} +1 -1
  14. package/dist/client/assets/{Code01-ADQg-6t7.js → Code01-DP2jwP0n.js} +1 -1
  15. package/dist/client/assets/{Container-CxXUVDpa.js → Container-jfv9L6Hc.js} +1 -1
  16. package/dist/client/assets/{Copy01-Dv-qbf9Z.js → Copy01-Dq7Edhtu.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-B87skZTy.js → Dataflow03-C6KAN8vb.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-DHYMLP_1.js → DotsHorizontal-CQ-MbYsC.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-CWcpvKQb.js → DotsVertical-PhooMqUv.js} +1 -1
  20. package/dist/client/assets/{Download01-BjOSY-hg.js → Download01-CA9RmYjX.js} +1 -1
  21. package/dist/client/assets/{Edit01-Bc5S6NRh.js → Edit01-DRruZKzG.js} +1 -1
  22. package/dist/client/assets/{Eye-C8kM8O8_.js → Eye-B9ZDOUkE.js} +1 -1
  23. package/dist/client/assets/{File02-BUAk_Mxv.js → File02-B2t2I1sM.js} +1 -1
  24. package/dist/client/assets/{File06-DiS1m4o9.js → File06-2US99J_V.js} +1 -1
  25. package/dist/client/assets/{FilterLines-BwKo1iZw.js → FilterLines-BFeSNY4D.js} +1 -1
  26. package/dist/client/assets/{Globe01-4jB_rpuY.js → Globe01-Dxe6Kj1c.js} +1 -1
  27. package/dist/client/assets/{Globe02-CT2c-Sr-.js → Globe02-BPmEw10H.js} +1 -1
  28. package/dist/client/assets/{Grid01-D2I-nDSy.js → Grid01-CJW4ZLO5.js} +1 -1
  29. package/dist/client/assets/{Hash02-CzXz7icr.js → Hash02-CIZbsu7P.js} +1 -1
  30. package/dist/client/assets/{Home02-BA7Zg0e7.js → Home02-Doo3wLuN.js} +1 -1
  31. package/dist/client/assets/{Image01-DNFNbFFa.js → Image01-C9h8llDV.js} +1 -1
  32. package/dist/client/assets/{Inbox01-B0U3vj2i.js → Inbox01-BweXezQd.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-BGj0zA50.js → InfoCircle-DBbArWGV.js} +1 -1
  34. package/dist/client/assets/{Key01-CXgWd4vy.js → Key01-CfL5jY3W.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-DYnfy1wV.js → LinkExternal01-DAvzaXYE.js} +1 -1
  36. package/dist/client/assets/{List-DGxlSM0E.js → List-sG42OZ_v.js} +1 -1
  37. package/dist/client/assets/{Loading01-KCITfr7g.js → Loading01-BHMOj-H5.js} +1 -1
  38. package/dist/client/assets/{Lock01-CdxVQsk2.js → Lock01-CQ3bhGvR.js} +1 -1
  39. package/dist/client/assets/{Pin01-u382yYSC.js → Pin01-8MTlfWD2.js} +1 -1
  40. package/dist/client/assets/{Play-D_UDCjeV.js → Play-APj1Lxit.js} +1 -1
  41. package/dist/client/assets/{Plus-BNEEXEVt.js → Plus-DNqvDLOK.js} +1 -1
  42. package/dist/client/assets/{RefreshCcw01-BpGtyqTA.js → RefreshCcw01-4dzpBOob.js} +1 -1
  43. package/dist/client/assets/{RefreshCw01-k0GFakzy.js → RefreshCw01-DHXbMDcX.js} +1 -1
  44. package/dist/client/assets/{Rows03-nEjgsj7h.js → Rows03-Cdgrgsit.js} +1 -1
  45. package/dist/client/assets/{Save01-BbS0C0s1.js → Save01-D-T2SbCx.js} +1 -1
  46. package/dist/client/assets/{SearchMd-DqymgKbi.js → SearchMd-BLcaRHQs.js} +1 -1
  47. package/dist/client/assets/{Settings01-DB_FXn41.js → Settings01-DKXbh8uh.js} +1 -1
  48. package/dist/client/assets/{Shield01-83aA2EpW.js → Shield01-B89AcbSX.js} +1 -1
  49. package/dist/client/assets/{Terminal-D70UGODi.js → Terminal-BblMM2fp.js} +1 -1
  50. package/dist/client/assets/{Trash01-Ve8IhEa-.js → Trash01-CkTOgej8.js} +1 -1
  51. package/dist/client/assets/{Upload01-BM2mkCav.js → Upload01-gcuuVZ2S.js} +1 -1
  52. package/dist/client/assets/{Users03-CgNWgARv.js → Users03-C1B58zTV.js} +1 -1
  53. package/dist/client/assets/{XCircle-I5P8gQFi.js → XCircle-DneNZUk0.js} +1 -1
  54. package/dist/client/assets/{XClose-Ds_Z25Px.js → XClose-Dgr_gyyv.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-DjlpVnu5.js → agent-connections-preview-Dq0jl9Fh.js} +1 -1
  56. package/dist/client/assets/agent-detail-BNn3Uyo0.js +2 -0
  57. package/dist/client/assets/agents-BAZxaM_m.js +1 -0
  58. package/dist/client/assets/{alert-dialog-97XFXZ7z.js → alert-dialog-BvNipqK_.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-QQUziPMo.js → auth-catchall-BoSUXTLZ.js} +1 -1
  60. package/dist/client/assets/{avatar-CSAt9Xy0.js → avatar-BNKSN34R.js} +1 -1
  61. package/dist/client/assets/{badge-CmYXzetd.js → badge-Do8iK9u9.js} +1 -1
  62. package/dist/client/assets/{binder-DYyCY7OY.js → binder-BBB8LQyx.js} +1 -1
  63. package/dist/client/assets/{breadcrumb-C8XV9Tx6.js → breadcrumb-DeYbtjMk.js} +1 -1
  64. package/dist/client/assets/{button-BCe1bdkY.js → button-D6YZfFzy.js} +1 -1
  65. package/dist/client/assets/{card-CPMQS2Ob.js → card-BNyCnFpQ.js} +1 -1
  66. package/dist/client/assets/{chart-BkpAbHOw.js → chart--8-symKO.js} +1 -1
  67. package/dist/client/assets/{checkbox-CwkaBsQF.js → checkbox-BZwARXIv.js} +1 -1
  68. package/dist/client/assets/{circle-alert-Bm720OZV.js → circle-alert-YjViK8VE.js} +1 -1
  69. package/dist/client/assets/{collection-detail-BFUjMKO2.js → collection-detail-LkGK1rw-.js} +3 -3
  70. package/dist/client/assets/collection-search-CBYSITVU.js +1 -0
  71. package/dist/client/assets/collection-tab-BrrYAQmN.js +1 -0
  72. package/dist/client/assets/collection-table-wrapper-fNhnYl-G.js +1 -0
  73. package/dist/client/assets/{collection-tabs-BHN2S0hU.js → collection-tabs-D0bfkNrY.js} +1 -1
  74. package/dist/client/assets/{command-Pq6xcJWI.js → command-Dt3t7o57.js} +1 -1
  75. package/dist/client/assets/{connect-DQK3gKkY.js → connect-DPEGql6L.js} +1 -1
  76. package/dist/client/assets/{connection-card-BpGIljul.js → connection-card-Cwh5xUmA.js} +1 -1
  77. package/dist/client/assets/connection-detail-DgHwxZSJ.js +1 -0
  78. package/dist/client/assets/connections-D2AuzZXu.js +1 -0
  79. package/dist/client/assets/{constants-BHgsXonC.js → constants-8URKDp4Y.js} +1 -1
  80. package/dist/client/assets/constants-oXq_cTdm.js +1 -0
  81. package/dist/client/assets/context-DHicyHl4.js +23 -0
  82. package/dist/client/assets/{create-organization-dialog-CBFtj5S8.js → create-organization-dialog-Cb3EQpzl.js} +1 -1
  83. package/dist/client/assets/{create-project-dialog-D6D5900x.js → create-project-dialog-BjqZAjhY.js} +1 -1
  84. package/dist/client/assets/{deco-constants-0EY--BSu.js → deco-constants-CyaJG-D1.js} +1 -1
  85. package/dist/client/assets/{dialog-CtlwZ0jC.js → dialog-DSPMVHyJ.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-DrduhkS0.js → dropdown-menu-CRT7qGQ9.js} +1 -1
  87. package/dist/client/assets/{dynamic-plugin-layout-B2-8YMnE.js → dynamic-plugin-layout-Dj3hkiA6.js} +1 -1
  88. package/dist/client/assets/{empty-state-Ar7E8UGz.js → empty-state-BA6UkF4p.js} +1 -1
  89. package/dist/client/assets/empty-state-sMx3NP6e.js +1 -0
  90. package/dist/client/assets/{env-vars-editor-CULzWCmD.js → env-vars-editor-DuW-Il-b.js} +1 -1
  91. package/dist/client/assets/{error-boundary-CEwcdDux.js → error-boundary-lFjWy2-n.js} +1 -1
  92. package/dist/client/assets/{extract-connection-data-D0wplOp-.js → extract-connection-data-B39uuFqG.js} +1 -1
  93. package/dist/client/assets/{file-browser-BgdKdkl_.js → file-browser-BIF8ssgw.js} +2 -2
  94. package/dist/client/assets/{form-CKVYRQ0T.js → form-BMtUcs2k.js} +1 -1
  95. package/dist/client/assets/{grid-view-Co3RRJOJ.js → grid-view-e1dnT7b5.js} +1 -1
  96. package/dist/client/assets/{home-DznUdggS.js → home-1A3rDo1n.js} +1 -1
  97. package/dist/client/assets/index-BMDGI420.css +1 -0
  98. package/dist/client/assets/{index-DT392Y-e.js → index-B_nMIrSY.js} +1 -1
  99. package/dist/client/assets/{index-CcDRz5PD.js → index-CCjxSJ1y.js} +1 -1
  100. package/dist/client/assets/{index-Dn7aggDn.js → index-CjGa0AXv.js} +1 -1
  101. package/dist/client/assets/{index-k8Oe2hAn.js → index-DJ_LDW-E.js} +1 -1
  102. package/dist/client/assets/{index-2W7jwMtr.js → index-DmoBx0VC.js} +1 -1
  103. package/dist/client/assets/{index-Cn654U6b.js → index-DnrfuViL.js} +1 -1
  104. package/dist/client/assets/{index-D9HmjKFM.js → index-DwBgLSti.js} +3 -3
  105. package/dist/client/assets/{index-DX0MTN78.js → index-QQ-XmLlG.js} +66 -68
  106. package/dist/client/assets/{infiniteQueryObserver-D6Tb66x3.js → infiniteQueryObserver-Yvt0ZTml.js} +1 -1
  107. package/dist/client/assets/{input-Dh6_kcmG.js → input-B7id4I1j.js} +1 -1
  108. package/dist/client/assets/{integration-icon-cQ6g2UTs.js → integration-icon-qV_BsBQR.js} +1 -1
  109. package/dist/client/assets/{label-BMznY53d.js → label-29qY4FPs.js} +1 -1
  110. package/dist/client/assets/{layout-Czw_4tYq.js → layout-Ck3H2-cu.js} +1 -1
  111. package/dist/client/assets/{localstorage-keys-CiUgmUPA.js → localstorage-keys-Ct4C992S.js} +1 -1
  112. package/dist/client/assets/{login-Btb0l3uq.js → login-DO8QasPa.js} +1 -1
  113. package/dist/client/assets/{markdown-U-heFZhR.js → markdown-jp5pFlBz.js} +2 -2
  114. package/dist/client/assets/{mcp-oauth-B9YTiwC5.js → mcp-oauth-Bb9gvF4o.js} +1 -1
  115. package/dist/client/assets/{mcp-server-card-BG1M4TxF.js → mcp-server-card-D_Epc4aH.js} +1 -1
  116. package/dist/client/assets/mcp-server-detail-Dut9IDFd.js +2 -0
  117. package/dist/client/assets/members-4s3A4PQH.js +3 -0
  118. package/dist/client/assets/{monitoring-dashboard-edit-D1JRXMr3.js → monitoring-dashboard-edit-DyFCcJjq.js} +1 -1
  119. package/dist/client/assets/{monitoring-dashboard-view-BIzOH-Jz.js → monitoring-dashboard-view-Bc4tCiDF.js} +1 -1
  120. package/dist/client/assets/{monitoring-BE-L8s7T.js → monitoring-gEkChCwS.js} +2 -2
  121. package/dist/client/assets/{oauth-callback-BXtPanrp.js → oauth-callback-tz7MTdrq.js} +1 -1
  122. package/dist/client/assets/{page-EpeWbq1x.js → page-YrzfNFn-.js} +1 -1
  123. package/dist/client/assets/page-pkTyp5rB.js +1 -0
  124. package/dist/client/assets/{plugin-empty-state-BofxsUhg.js → plugin-empty-state-YsTdKC2B.js} +1 -1
  125. package/dist/client/assets/{plugin-empty-state-ChEPKOiF.js → plugin-empty-state-dEbxXjO6.js} +1 -1
  126. package/dist/client/assets/{plugin-header-Lsd9YZZT.js → plugin-header-Di-tZc0h.js} +1 -1
  127. package/dist/client/assets/{plugin-header-DOkBj305.js → plugin-header-Djvd0-eL.js} +1 -1
  128. package/dist/client/assets/{popover-eropQyy1.js → popover-pjzQQlLd.js} +1 -1
  129. package/dist/client/assets/project-layout-Bp5s1iI1.js +1 -0
  130. package/dist/client/assets/projects-list-DcozT0tR.js +1 -0
  131. package/dist/client/assets/ranking-layout-D3PvNfv7.js +1 -0
  132. package/dist/client/assets/{readme-viewer-DZxyjAz3.js → readme-viewer-BmO5RwRH.js} +1 -1
  133. package/dist/client/assets/{registry-layout-O1Li2ya2.js → registry-layout-DEN2jHtD.js} +1 -1
  134. package/dist/client/assets/{registry-utils-CyMutbQd.js → registry-utils-DMdc5PTp.js} +1 -1
  135. package/dist/client/assets/{reports-layout-BFKmzSSH.js → reports-layout-DziFQRp_.js} +2 -2
  136. package/dist/client/assets/{reset-password-DShMbyV1.js → reset-password-CrHLBBwi.js} +1 -1
  137. package/dist/client/assets/{resizable-BG9z6Y7B.js → resizable-jXkpfiVS.js} +1 -1
  138. package/dist/client/assets/{save-actions-B-kfZtU1.js → save-actions-BPg_8VMI.js} +1 -1
  139. package/dist/client/assets/{scroll-area-CtvEyO8q.js → scroll-area-CcejXaMp.js} +1 -1
  140. package/dist/client/assets/{select-CTboIb4n.js → select-CkeKfTEx.js} +1 -1
  141. package/dist/client/assets/shell-layout-C4PQ301W.js +3 -0
  142. package/dist/client/assets/{skeleton-DvxloPhR.js → skeleton-DNLZ4Kho.js} +1 -1
  143. package/dist/client/assets/{spinner-BXzzaGxp.js → spinner-DZtD-MX0.js} +1 -1
  144. package/dist/client/assets/{store-invite-DIMsDV12.js → store-invite-B_jz8YSY.js} +1 -1
  145. package/dist/client/assets/{switch-Bqvl2ZUo.js → switch-DFKxfcc5.js} +1 -1
  146. package/dist/client/assets/{table-8mfsydT_.js → table-Csfk_VXo.js} +1 -1
  147. package/dist/client/assets/tasks-Dv2Dq-cV.js +1 -0
  148. package/dist/client/assets/{textarea-D7l_vCcE.js → textarea-GWXLFYfv.js} +1 -1
  149. package/dist/client/assets/{time-range-picker-jSuF4CZc.js → time-range-picker-DnUGZRLa.js} +1 -1
  150. package/dist/client/assets/{toggle-group-Dn_Mv5A3.js → toggle-group-CojJ3wZ4.js} +1 -1
  151. package/dist/client/assets/tools-list-BPGP3JUO.js +1 -0
  152. package/dist/client/assets/{tooltip-D4-guuax.js → tooltip-D71dCz4E.js} +1 -1
  153. package/dist/client/assets/{topbar-portal-BYH3tZsX.js → topbar-portal-BKT0Es8i.js} +1 -1
  154. package/dist/client/assets/typewriter-title-DqLjhGgL.js +16 -0
  155. package/dist/client/assets/{use-binding-Df-bJ2So.js → use-binding-DbH4Xe03.js} +1 -1
  156. package/dist/client/assets/{use-connection-DdTk8NLZ.js → use-connection-BEGrPCmR.js} +1 -1
  157. package/dist/client/assets/{use-copy-8HhO39al.js → use-copy-DsHlaDHD.js} +1 -1
  158. package/dist/client/assets/{use-create-virtual-mcp-DwsRmfVV.js → use-create-virtual-mcp-BzTARjrD.js} +1 -1
  159. package/dist/client/assets/use-deco-chat-open-CxG3qwlT.js +1 -0
  160. package/dist/client/assets/{use-install-from-registry-Ce99gIbp.js → use-install-from-registry-CSDJ0ZgD.js} +1 -1
  161. package/dist/client/assets/{use-list-state-jCvBKLOI.js → use-list-state-DvpdPuz-.js} +1 -1
  162. package/dist/client/assets/{use-llm-DUUdSPtc.js → use-llm-BbYG_RIr.js} +1 -1
  163. package/dist/client/assets/{use-mcp-prompts-BFC1Reld.js → use-mcp-prompts-qD8uHlkj.js} +1 -1
  164. package/dist/client/assets/{use-mcp-tools-CLGl37yf.js → use-mcp-tools-BAsmCzEJ.js} +1 -1
  165. package/dist/client/assets/{use-mobile-DjLsite2.js → use-mobile-Bs0AkxK7.js} +1 -1
  166. package/dist/client/assets/{use-organization-settings-DcyH2By3.js → use-organization-settings-BJ9tNAL9.js} +1 -1
  167. package/dist/client/assets/{use-project-dNP8uTKN.js → use-project-CXHCn5kp.js} +1 -1
  168. package/dist/client/assets/{use-settings-modal-DA_WPJ_R.js → use-settings-modal-Dx8IF1Gs.js} +1 -1
  169. package/dist/client/assets/{use-view-mode-BGqPs4Aj.js → use-view-mode-DMPiUC22.js} +1 -1
  170. package/dist/client/assets/{use-virtual-mcp-CtYFVzEt.js → use-virtual-mcp-DBzFAk7J.js} +1 -1
  171. package/dist/client/assets/useInfiniteQuery-DXQ7BtjQ.js +1 -0
  172. package/dist/client/assets/{useMutation-4bsh-QBF.js → useMutation-DgG1LVg-.js} +1 -1
  173. package/dist/client/assets/useQuery-CPsXfVfR.js +1 -0
  174. package/dist/client/assets/useSuspenseInfiniteQuery-CuH1Eku2.js +1 -0
  175. package/dist/client/assets/view-mode-toggle-2-qyK3LU.js +1 -0
  176. package/dist/client/assets/workflow-YppA7Sxi.js +1 -0
  177. package/dist/client/index.html +2 -2
  178. package/package.json +1 -1
  179. package/dist/client/assets/ArrowUp-C9QbeSMz.js +0 -1
  180. package/dist/client/assets/Tool01-Gadnesxv.js +0 -1
  181. package/dist/client/assets/agent-detail-D2ISZyix.js +0 -2
  182. package/dist/client/assets/agents-DOdcUWzi.js +0 -1
  183. package/dist/client/assets/collection-tab-CrrbTDng.js +0 -1
  184. package/dist/client/assets/collection-table-wrapper-CXjGnlMm.js +0 -1
  185. package/dist/client/assets/connection-detail-BqvjF6X1.js +0 -1
  186. package/dist/client/assets/connections-BY5LbGWi.js +0 -1
  187. package/dist/client/assets/constants-CsU2_t5q.js +0 -1
  188. package/dist/client/assets/context-L0w3Lka_.js +0 -23
  189. package/dist/client/assets/empty-state-Cme5CLy_.js +0 -1
  190. package/dist/client/assets/index-BHAz67cr.css +0 -1
  191. package/dist/client/assets/mcp-server-detail-B9DpOKRj.js +0 -2
  192. package/dist/client/assets/members-BgBfar63.js +0 -3
  193. package/dist/client/assets/page-Ce7Y9dmM.js +0 -1
  194. package/dist/client/assets/project-layout-xiFU-30r.js +0 -1
  195. package/dist/client/assets/projects-list-CRX29G8Z.js +0 -1
  196. package/dist/client/assets/ranking-layout-CBbuyeVt.js +0 -1
  197. package/dist/client/assets/shell-layout-BUmIacnr.js +0 -3
  198. package/dist/client/assets/tasks-CkROBPPq.js +0 -1
  199. package/dist/client/assets/tools-list-4-0RjQZk.js +0 -1
  200. package/dist/client/assets/typewriter-title-4u2iTKVw.js +0 -16
  201. package/dist/client/assets/use-deco-chat-open-hbEpr7iz.js +0 -1
  202. package/dist/client/assets/useInfiniteQuery-JCmjqA8d.js +0 -1
  203. package/dist/client/assets/useQuery-DGMDf2So.js +0 -1
  204. package/dist/client/assets/useSuspenseInfiniteQuery-DX7McnGC.js +0 -1
  205. package/dist/client/assets/workflow-Yiu69H_T.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as f,b1 as Ke,bq as nn,bP as sn,c as U,j as n,u as Me,m as on,b as Ze,n as ln,K as at,t as Ot,O as Re,a as cn}from"./index-D9HmjKFM.js";import{E as Kt,C as un}from"./empty-state-Cme5CLy_.js";import{P as ge}from"./index-DT392Y-e.js";import{B as dn,a as mn,b as fn,c as pn}from"./breadcrumb-C8XV9Tx6.js";import{E as qe}from"./error-boundary-CEwcdDux.js";import{E as hn,i as vn,d as gn,e as Qt,b as xn,M as yn,T as bn,p as Qe,s as Le,a as Jt}from"./time-range-picker-jSuF4CZc.js";import{I as He}from"./integration-icon-cQ6g2UTs.js";import{B as it}from"./badge-CmYXzetd.js";import{c as Se,B as be}from"./button-BCe1bdkY.js";import{t as Et}from"./ChevronDown-xG1flmUs.js";import{i as jn}from"./ChevronRight-C9tH4CkK.js";import{c as he,b as Mt,d as wn,e as Nn,a as Pn,T as ye}from"./table-8mfsydT_.js";import{aC as On,aD as Je,a9 as Ee,i as Ve,aE as aa,r as Fe,a1 as gt,aF as na,a3 as xt,aG as V,a4 as H,aH as $e,aI as ot,m as lt,aJ as Ce,aK as er,L as Be,aa as Sn,ae as Ft,aL as In,aM as kn,aN as Cn,aO as An,a5 as ze,ac as Tt,A as En,p as me,q as Ie,aP as Mn,w as Pe,z as Oe,F as Wt,B as Tn,E as ct,I as sa,D as yt,h as bt,R as ia,S as oa,J as la,M as jt,N as ca,O as ua,U as da,V as Dn,P as ma,j as Ge,W as _n,X as Ln,Z as wt,Y as fa,_ as $n,$ as Nt,a0 as tr,a7 as pa,a8 as ha,s as va,ab as Rn,aQ as Bn,ai as zn,t as Kn,x as Te,y as De,aR as ga,aS as Fn,aT as Wn,H as rr,aU as qn,aV as ar,K as Vn,aW as Hn,aX as xa,c as Gn,d as ya,aY as Un,aZ as Zn,a_ as nr,a$ as Yn,a6 as Xn,ax as ba,ay as ja,az as wa,aA as Qn,aB as Na}from"./chart-BkpAbHOw.js";import{u as qt,a as Vt,W as Jn}from"./constants-BHgsXonC.js";import{i as es}from"./DotsVertical-CWcpvKQb.js";import{s as Pa}from"./Plus-BNEEXEVt.js";import{s as Oa}from"./Trash01-Ve8IhEa-.js";import{C as ts}from"./connection-card-BpGIljul.js";import{D as rs,a as as,b as ns,c as sr}from"./dropdown-menu-DrduhkS0.js";import{f as ss,a as is,b as os,c as ls,d as cs,e as us,A as ds,g as ms}from"./alert-dialog-97XFXZ7z.js";import{f as fs,c as ps,a as ir,d as hs,C as vs,e as gs,u as xs}from"./command-Pq6xcJWI.js";import{u as ys}from"./useSuspenseInfiniteQuery-DX7McnGC.js";import{h as Ht}from"./use-connection-DdTk8NLZ.js";import{b as Sa}from"./use-virtual-mcp-CtYFVzEt.js";import{i as bs}from"./Code01-ADQg-6t7.js";import{i as js}from"./FilterLines-BwKo1iZw.js";import{c as ws}from"./Grid01-D2I-nDSy.js";import{I as St}from"./input-Dh6_kcmG.js";import{C as or}from"./checkbox-CwkaBsQF.js";import{P as Ia,a as ka,b as Ca}from"./popover-eropQyy1.js";import{S as lr,a as cr,b as ur,c as dr,d as et}from"./select-CTboIb4n.js";import{T as Ns}from"./textarea-D7l_vCcE.js";import{T as Ps,a as Os,b as Ss}from"./tooltip-D4-guuax.js";import{C as Is}from"./collection-tabs-BHN2S0hU.js";import{S as ks}from"./switch-Bqvl2ZUo.js";import{L as Cs}from"./label-BMznY53d.js";import{n as Dt}from"./Container-CxXUVDpa.js";import{u as As}from"./use-mcp-tools-CLGl37yf.js";import{T as Es,a as It}from"./toggle-group-Dn_Mv5A3.js";import{t as Ms}from"./Users03-CgNWgARv.js";import"./Loading01-KCITfr7g.js";import"./SearchMd-DqymgKbi.js";import"./use-mobile-DjLsite2.js";import"./AlertTriangle-cnBbzVPi.js";import"./Check-EA1ayL22.js";import"./Copy01-Dv-qbf9Z.js";import"./Download01-BjOSY-hg.js";import"./Key01-CXgWd4vy.js";import"./Play-D_UDCjeV.js";import"./scroll-area-CtvEyO8q.js";import"./spinner-BXzzaGxp.js";import"./Clock-BcphCi5B.js";import"./index-k8Oe2hAn.js";import"./card-CPMQS2Ob.js";import"./index-2W7jwMtr.js";import"./infiniteQueryObserver-D6Tb66x3.js";import"./useMutation-4bsh-QBF.js";import"./useQuery-DGMDf2So.js";const _t=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));_t.displayName="BarChart07";const Aa=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Aa.displayName="PauseCircle";const Ea=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),f.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ea.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,fe=Math.sqrt,dt=Math.PI,Pt=2*dt,Gt={draw(t,e){const r=fe(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Pt)}},Ts={draw(t,e){const r=fe(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Ta=fe(1/3),Ds=Ta*2,_s={draw(t,e){const r=fe(e/Ds),a=r*Ta;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ls={draw(t,e){const r=fe(e),a=-r/2;t.rect(a,a,r,r)}},$s=.8908130915292852,Da=ut(dt/10)/ut(7*dt/10),Rs=ut(Pt/10)*Da,Bs=-Ma(Pt/10)*Da,zs={draw(t,e){const r=fe(e*$s),a=Rs*r,s=Bs*r;t.moveTo(0,-r),t.lineTo(a,s);for(let i=1;i<5;++i){const o=Pt*i/5,c=Ma(o),l=ut(o);t.lineTo(l*r,-c*r),t.lineTo(c*a-l*s,l*a+c*s)}t.closePath()}},kt=fe(3),Ks={draw(t,e){const r=-fe(e/(kt*3));t.moveTo(0,r*2),t.lineTo(-kt*r,-r),t.lineTo(kt*r,-r),t.closePath()}},ae=-.5,ne=fe(3)/2,Lt=1/fe(12),Fs=(Lt/2+1)*3,Ws={draw(t,e){const r=fe(e/Fs),a=r/2,s=r*Lt,i=a,o=r*Lt+r,c=-i,l=o;t.moveTo(a,s),t.lineTo(i,o),t.lineTo(c,l),t.lineTo(ae*a-ne*s,ne*a+ae*s),t.lineTo(ae*i-ne*o,ne*i+ae*o),t.lineTo(ae*c-ne*l,ne*c+ae*l),t.lineTo(ae*a+ne*s,ae*s-ne*a),t.lineTo(ae*i+ne*o,ae*o-ne*i),t.lineTo(ae*c+ne*l,ae*l-ne*c),t.closePath()}};function qs(t,e){let r=null,a=On(s);t=typeof t=="function"?t:Je(t||Gt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function s(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return s.type=function(i){return arguments.length?(t=typeof i=="function"?i:Je(i),s):t},s.size=function(i){return arguments.length?(e=typeof i=="function"?i:Je(+i),s):e},s.context=function(i){return arguments.length?(r=i??null,s):r},s}var Vs=["type","size","sizeType"];function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},$t.apply(null,arguments)}function mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function fr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mr(Object(r),!0).forEach(function(a){Hs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Hs(t,e,r){return(e=Gs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gs(t){var e=Us(t,"string");return typeof e=="symbol"?e:e+""}function Us(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zs(t,e){if(t==null)return{};var r,a,s=Ys(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Ys(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var _a={symbolCircle:Gt,symbolCross:Ts,symbolDiamond:_s,symbolSquare:Ls,symbolStar:zs,symbolTriangle:Ks,symbolWye:Ws},Xs=Math.PI/180,Qs=t=>{var e="symbol".concat(aa(t));return _a[e]||Gt},Js=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Xs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ei=(t,e)=>{_a["symbol".concat(aa(t))]=e},La=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,s=Zs(t,Vs),i=fr(fr({},s),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var c=()=>{var m=Qs(o),y=qs().type(m).size(Js(r,a,o)),g=y();if(g!==null)return g},{className:l,cx:u,cy:d}=i,p=Ee(i);return Ve(u)&&Ve(d)&&Ve(r)?f.createElement("path",$t({},p,{className:Ke("recharts-symbols",l),transform:"translate(".concat(u,", ").concat(d,")"),d:c()})):null};La.registerSymbol=ei;var ti=["radius"],ri=["radius"],pr,hr,vr,gr,xr,yr,br,jr,wr,Nr;function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function Or(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pr(Object(r),!0).forEach(function(a){ai(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ai(t,e,r){return(e=ni(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ni(t){var e=si(t,"string");return typeof e=="symbol"?e:e+""}function si(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Sr(t,e){if(t==null)return{};var r,a,s=ii(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function ii(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function ve(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ir=(t,e,r,a,s)=>{var i=$e(r),o=$e(a),c=Math.min(Math.abs(i)/2,Math.abs(o)/2),l=o>=0?1:-1,u=i>=0?1:-1,d=o>=0&&i>=0||o<0&&i<0?1:0,p;if(c>0&&Array.isArray(s)){for(var m=[0,0,0,0],y=0,g=4;y<g;y++){var x,b=(x=s[y])!==null&&x!==void 0?x:0;m[y]=b>c?c:b}p=V(pr||(pr=ve(["M",",",""])),t,e+l*m[0]),m[0]>0&&(p+=V(hr||(hr=ve(["A ",",",",0,0,",",",",",""])),m[0],m[0],d,t+u*m[0],e)),p+=V(vr||(vr=ve(["L ",",",""])),t+r-u*m[1],e),m[1]>0&&(p+=V(gr||(gr=ve(["A ",",",",0,0,",`,
1
+ import{r as f,b1 as Ke,bq as nn,bP as sn,c as U,j as n,u as Me,m as on,b as Ze,n as ln,K as at,t as Ot,O as Re,a as cn}from"./index-DwBgLSti.js";import{C as un}from"./collection-search-CBYSITVU.js";import{P as ge}from"./index-B_nMIrSY.js";import{B as dn,a as mn,b as fn,c as pn}from"./breadcrumb-DeYbtjMk.js";import{E as Kt}from"./empty-state-sMx3NP6e.js";import{E as qe}from"./error-boundary-lFjWy2-n.js";import{E as hn,i as vn,d as gn,e as Qt,b as xn,M as yn,T as bn,p as Qe,s as Le,a as Jt}from"./time-range-picker-DnUGZRLa.js";import{I as He}from"./integration-icon-qV_BsBQR.js";import{B as it}from"./badge-Do8iK9u9.js";import{c as Se,B as be}from"./button-D6YZfFzy.js";import{t as Et}from"./ChevronDown-CggIFEVQ.js";import{i as jn}from"./ChevronRight-DgAfR8pA.js";import{c as he,b as Mt,d as wn,e as Nn,a as Pn,T as ye}from"./table-Csfk_VXo.js";import{aC as On,aD as Je,a9 as Ee,i as Ve,aE as aa,r as Fe,a1 as gt,aF as na,a3 as xt,aG as V,a4 as H,aH as $e,aI as ot,m as lt,aJ as Ce,aK as er,L as Be,aa as Sn,ae as Ft,aL as In,aM as kn,aN as Cn,aO as An,a5 as ze,ac as Tt,A as En,p as me,q as Ie,aP as Mn,w as Pe,z as Oe,F as Wt,B as Tn,E as ct,I as sa,D as yt,h as bt,R as ia,S as oa,J as la,M as jt,N as ca,O as ua,U as da,V as Dn,P as ma,j as Ge,W as _n,X as Ln,Z as wt,Y as fa,_ as $n,$ as Nt,a0 as tr,a7 as pa,a8 as ha,s as va,ab as Rn,aQ as Bn,ai as zn,t as Kn,x as Te,y as De,aR as ga,aS as Fn,aT as Wn,H as rr,aU as qn,aV as ar,K as Vn,aW as Hn,aX as xa,c as Gn,d as ya,aY as Un,aZ as Zn,a_ as nr,a$ as Yn,a6 as Xn,ax as ba,ay as ja,az as wa,aA as Qn,aB as Na}from"./chart--8-symKO.js";import{u as qt,a as Vt,W as Jn}from"./constants-8URKDp4Y.js";import{i as es}from"./DotsVertical-PhooMqUv.js";import{s as Pa}from"./Plus-DNqvDLOK.js";import{s as Oa}from"./Trash01-CkTOgej8.js";import{C as ts}from"./connection-card-Cwh5xUmA.js";import{D as rs,a as as,b as ns,c as sr}from"./dropdown-menu-CRT7qGQ9.js";import{f as ss,a as is,b as os,c as ls,d as cs,e as us,A as ds,g as ms}from"./alert-dialog-BvNipqK_.js";import{f as fs,c as ps,a as ir,d as hs,C as vs,e as gs,u as xs}from"./command-Dt3t7o57.js";import{u as ys}from"./useSuspenseInfiniteQuery-CuH1Eku2.js";import{h as Ht}from"./use-connection-BEGrPCmR.js";import{b as Sa}from"./use-virtual-mcp-DBzFAk7J.js";import{i as bs}from"./Code01-DP2jwP0n.js";import{i as js}from"./FilterLines-BFeSNY4D.js";import{c as ws}from"./Grid01-CJW4ZLO5.js";import{I as St}from"./input-B7id4I1j.js";import{C as or}from"./checkbox-BZwARXIv.js";import{P as Ia,a as ka,b as Ca}from"./popover-pjzQQlLd.js";import{S as lr,a as cr,b as ur,c as dr,d as et}from"./select-CkeKfTEx.js";import{T as Ns}from"./textarea-GWXLFYfv.js";import{T as Ps,a as Os,b as Ss}from"./tooltip-D71dCz4E.js";import{C as Is}from"./collection-tabs-D0bfkNrY.js";import{S as ks}from"./switch-DFKxfcc5.js";import{L as Cs}from"./label-29qY4FPs.js";import{n as Dt}from"./Container-jfv9L6Hc.js";import{u as As}from"./use-mcp-tools-BAsmCzEJ.js";import{T as Es,a as It}from"./toggle-group-CojJ3wZ4.js";import{t as Ms}from"./Users03-C1B58zTV.js";import"./Loading01-BHMOj-H5.js";import"./SearchMd-BLcaRHQs.js";import"./use-mobile-Bs0AkxK7.js";import"./AlertTriangle-DniGvpwb.js";import"./Check-Bv0pZ3gl.js";import"./Copy01-Dq7Edhtu.js";import"./Download01-CA9RmYjX.js";import"./Key01-CfL5jY3W.js";import"./Play-APj1Lxit.js";import"./scroll-area-CcejXaMp.js";import"./spinner-DZtD-MX0.js";import"./Clock-IA7N95Qq.js";import"./index-DJ_LDW-E.js";import"./card-BNyCnFpQ.js";import"./index-DmoBx0VC.js";import"./infiniteQueryObserver-Yvt0ZTml.js";import"./useMutation-DgG1LVg-.js";import"./useQuery-CPsXfVfR.js";const _t=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));_t.displayName="BarChart07";const Aa=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Aa.displayName="PauseCircle";const Ea=({size:t=24,color:e="currentColor",...r})=>f.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},f.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),f.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ea.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,fe=Math.sqrt,dt=Math.PI,Pt=2*dt,Gt={draw(t,e){const r=fe(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Pt)}},Ts={draw(t,e){const r=fe(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Ta=fe(1/3),Ds=Ta*2,_s={draw(t,e){const r=fe(e/Ds),a=r*Ta;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ls={draw(t,e){const r=fe(e),a=-r/2;t.rect(a,a,r,r)}},$s=.8908130915292852,Da=ut(dt/10)/ut(7*dt/10),Rs=ut(Pt/10)*Da,Bs=-Ma(Pt/10)*Da,zs={draw(t,e){const r=fe(e*$s),a=Rs*r,s=Bs*r;t.moveTo(0,-r),t.lineTo(a,s);for(let i=1;i<5;++i){const o=Pt*i/5,c=Ma(o),l=ut(o);t.lineTo(l*r,-c*r),t.lineTo(c*a-l*s,l*a+c*s)}t.closePath()}},kt=fe(3),Ks={draw(t,e){const r=-fe(e/(kt*3));t.moveTo(0,r*2),t.lineTo(-kt*r,-r),t.lineTo(kt*r,-r),t.closePath()}},ae=-.5,ne=fe(3)/2,Lt=1/fe(12),Fs=(Lt/2+1)*3,Ws={draw(t,e){const r=fe(e/Fs),a=r/2,s=r*Lt,i=a,o=r*Lt+r,c=-i,l=o;t.moveTo(a,s),t.lineTo(i,o),t.lineTo(c,l),t.lineTo(ae*a-ne*s,ne*a+ae*s),t.lineTo(ae*i-ne*o,ne*i+ae*o),t.lineTo(ae*c-ne*l,ne*c+ae*l),t.lineTo(ae*a+ne*s,ae*s-ne*a),t.lineTo(ae*i+ne*o,ae*o-ne*i),t.lineTo(ae*c+ne*l,ae*l-ne*c),t.closePath()}};function qs(t,e){let r=null,a=On(s);t=typeof t=="function"?t:Je(t||Gt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function s(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return s.type=function(i){return arguments.length?(t=typeof i=="function"?i:Je(i),s):t},s.size=function(i){return arguments.length?(e=typeof i=="function"?i:Je(+i),s):e},s.context=function(i){return arguments.length?(r=i??null,s):r},s}var Vs=["type","size","sizeType"];function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},$t.apply(null,arguments)}function mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function fr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mr(Object(r),!0).forEach(function(a){Hs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Hs(t,e,r){return(e=Gs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gs(t){var e=Us(t,"string");return typeof e=="symbol"?e:e+""}function Us(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zs(t,e){if(t==null)return{};var r,a,s=Ys(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Ys(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var _a={symbolCircle:Gt,symbolCross:Ts,symbolDiamond:_s,symbolSquare:Ls,symbolStar:zs,symbolTriangle:Ks,symbolWye:Ws},Xs=Math.PI/180,Qs=t=>{var e="symbol".concat(aa(t));return _a[e]||Gt},Js=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Xs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ei=(t,e)=>{_a["symbol".concat(aa(t))]=e},La=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,s=Zs(t,Vs),i=fr(fr({},s),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var c=()=>{var m=Qs(o),y=qs().type(m).size(Js(r,a,o)),g=y();if(g!==null)return g},{className:l,cx:u,cy:d}=i,p=Ee(i);return Ve(u)&&Ve(d)&&Ve(r)?f.createElement("path",$t({},p,{className:Ke("recharts-symbols",l),transform:"translate(".concat(u,", ").concat(d,")"),d:c()})):null};La.registerSymbol=ei;var ti=["radius"],ri=["radius"],pr,hr,vr,gr,xr,yr,br,jr,wr,Nr;function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function Or(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pr(Object(r),!0).forEach(function(a){ai(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ai(t,e,r){return(e=ni(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ni(t){var e=si(t,"string");return typeof e=="symbol"?e:e+""}function si(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Sr(t,e){if(t==null)return{};var r,a,s=ii(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function ii(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function ve(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ir=(t,e,r,a,s)=>{var i=$e(r),o=$e(a),c=Math.min(Math.abs(i)/2,Math.abs(o)/2),l=o>=0?1:-1,u=i>=0?1:-1,d=o>=0&&i>=0||o<0&&i<0?1:0,p;if(c>0&&Array.isArray(s)){for(var m=[0,0,0,0],y=0,g=4;y<g;y++){var x,b=(x=s[y])!==null&&x!==void 0?x:0;m[y]=b>c?c:b}p=V(pr||(pr=ve(["M",",",""])),t,e+l*m[0]),m[0]>0&&(p+=V(hr||(hr=ve(["A ",",",",0,0,",",",",",""])),m[0],m[0],d,t+u*m[0],e)),p+=V(vr||(vr=ve(["L ",",",""])),t+r-u*m[1],e),m[1]>0&&(p+=V(gr||(gr=ve(["A ",",",",0,0,",`,
2
2
  `,",",""])),m[1],m[1],d,t+r,e+l*m[1])),p+=V(xr||(xr=ve(["L ",",",""])),t+r,e+a-l*m[2]),m[2]>0&&(p+=V(yr||(yr=ve(["A ",",",",0,0,",`,
3
3
  `,",",""])),m[2],m[2],d,t+r-u*m[2],e+a)),p+=V(br||(br=ve(["L ",",",""])),t+u*m[3],e+a),m[3]>0&&(p+=V(jr||(jr=ve(["A ",",",",0,0,",`,
4
4
  `,",",""])),m[3],m[3],d,t,e+a-l*m[3])),p+="Z"}else if(c>0&&s===+s&&s>0){var v=Math.min(c,s);p=V(wr||(wr=ve(["M ",",",`
@@ -28,4 +28,4 @@ import{r as f,b1 as Ke,bq as nn,bP as sn,c as U,j as n,u as Me,m as on,b as Ze,n
28
28
  A`,",",",0,0,",",",",","Z"])),S.x,S.y,i,i,+(d<0),w.x,w.y,a,a,+(I>180),+(d>0),j.x,j.y,i,i,+(d<0),N.x,N.y)}else h+=V(_r||(_r=Ae(["L",",","Z"])),e,r);return h},ui={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},di=t=>{var e=Fe(t,ui),{cx:r,cy:a,innerRadius:s,outerRadius:i,cornerRadius:o,forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d,className:p}=e;if(i<s||u===d)return null;var m=Ke("recharts-sector",p),y=i-s,g=ot(o,y,0,!0),x;return g>0&&Math.abs(u-d)<360?x=ci({cx:r,cy:a,innerRadius:s,outerRadius:i,cornerRadius:Math.min(g,y/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d}):x=$a({cx:r,cy:a,innerRadius:s,outerRadius:i,startAngle:u,endAngle:d}),f.createElement("path",Rt({},Ee(e),{className:m,d:x}))},Ut=t=>null;Ut.displayName="Cell";var Ct={},Lr;function mi(){return Lr||(Lr=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const s=r[Symbol.toStringTag];return s==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${s}]`}let a=r;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(r)===a}t.isPlainObject=e})(Ct)),Ct}var At,$r;function fi(){return $r||($r=1,At=mi().isPlainObject),At}var pi=fi();const hi=nn(pi);var Rr,Br,zr,Kr,Fr;function Wr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function qr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(r),!0).forEach(function(a){vi(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function vi(t,e,r){return(e=gi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gi(t){var e=xi(t,"string");return typeof e=="symbol"?e:e+""}function xi(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ft(){return ft=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ft.apply(null,arguments)}function We(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Vr=(t,e,r,a,s)=>{var i=r-a,o;return o=V(Rr||(Rr=We(["M ",",",""])),t,e),o+=V(Br||(Br=We(["L ",",",""])),t+r,e),o+=V(zr||(zr=We(["L ",",",""])),t+r-i/2,e+s),o+=V(Kr||(Kr=We(["L ",",",""])),t+r-i/2-a,e+s),o+=V(Fr||(Fr=We(["L ",","," Z"])),t,e),o},yi={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},bi=t=>{var e=Fe(t,yi),{x:r,y:a,upperWidth:s,lowerWidth:i,height:o,className:c}=e,{animationEasing:l,animationDuration:u,animationBegin:d,isUpdateAnimationActive:p}=e,m=f.useRef(null),[y,g]=f.useState(-1),x=f.useRef(s),b=f.useRef(i),v=f.useRef(o),h=f.useRef(r),j=f.useRef(a),N=gt(t,"trapezoid-");if(f.useEffect(()=>{if(m.current&&m.current.getTotalLength)try{var k=m.current.getTotalLength();k&&g(k)}catch{}},[]),r!==+r||a!==+a||s!==+s||i!==+i||o!==+o||s===0&&i===0||o===0)return null;var P=Ke("recharts-trapezoid",c);if(!p)return f.createElement("g",null,f.createElement("path",ft({},Ee(e),{className:P,d:Vr(r,a,s,i,o)})));var w=x.current,S=b.current,O=v.current,I=h.current,E=j.current,D="0px ".concat(y===-1?1:y,"px"),T="".concat(y,"px 0px"),C=na(["strokeDasharray"],u,l);return f.createElement(xt,{animationId:N,key:N,canBegin:y>0,duration:u,easing:l,isActive:p,begin:d},k=>{var M=H(w,s,k),_=H(S,i,k),L=H(O,o,k),z=H(I,r,k),$=H(E,a,k);m.current&&(x.current=M,b.current=_,v.current=L,h.current=z,j.current=$);var K=k>0?{transition:C,strokeDasharray:T}:{strokeDasharray:D};return f.createElement("path",ft({},Ee(e),{className:P,d:Vr(z,$,M,_,L),ref:m,style:qr(qr({},K),e.style)}))})},ji=["option","shapeType","activeClassName"];function wi(t,e){if(t==null)return{};var r,a,s=Ni(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Ni(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hr(Object(r),!0).forEach(function(a){Pi(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Pi(t,e,r){return(e=Oi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oi(t){var e=Si(t,"string");return typeof e=="symbol"?e:e+""}function Si(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ii(t,e){return pt(pt({},e),t)}function ki(t,e){return t==="symbols"}function Gr(t){var{shapeType:e,elementProps:r}=t;switch(e){case"rectangle":return f.createElement(oi,r);case"trapezoid":return f.createElement(bi,r);case"sector":return f.createElement(di,r);case"symbols":if(ki(e))return f.createElement(La,r);break;case"curve":return f.createElement(Sn,r);default:return null}}function Ci(t){return f.isValidElement(t)?t.props:t}function Ra(t){var{option:e,shapeType:r,activeClassName:a="recharts-active-shape"}=t,s=wi(t,ji),i;if(f.isValidElement(e))i=f.cloneElement(e,pt(pt({},s),Ci(e)));else if(typeof e=="function")i=e(s,s.index);else if(hi(e)&&typeof e!="boolean"){var o=Ii(e,s);i=f.createElement(Gr,{shapeType:r,elementProps:o})}else{var c=s;i=f.createElement(Gr,{shapeType:r,elementProps:c})}return s.isActive?f.createElement(Be,{className:a},i):i}var Ba=(t,e,r)=>{var a=Ft();return(s,i)=>o=>{t?.(s,i,o),a(In({activeIndex:String(i),activeDataKey:e,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:r}))}},za=t=>{var e=Ft();return(r,a)=>s=>{t?.(r,a,s),e(kn())}},Ka=(t,e,r)=>{var a=Ft();return(s,i)=>o=>{t?.(s,i,o),a(Cn({activeIndex:String(i),activeDataKey:e,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:r}))}},Ur=(t,e,r)=>{var a=r??t;if(!ze(a))return ot(a,e,0)},Ai=(t,e,r)=>{var a={},s=t.filter(An),i=t.filter(u=>u.stackId==null),o=s.reduce((u,d)=>{var p=u[d.stackId];return p==null&&(p=[]),p.push(d),u[d.stackId]=p,u},a),c=Object.entries(o).map(u=>{var d,[p,m]=u,y=m.map(x=>x.dataKey),g=Ur(e,r,(d=m[0])===null||d===void 0?void 0:d.barSize);return{stackId:p,dataKeys:y,barSize:g}}),l=i.map(u=>{var d=[u.dataKey].filter(m=>m!=null),p=Ur(e,r,u.barSize);return{stackId:void 0,dataKeys:d,barSize:p}});return[...c,...l]};function Zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function rt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(r),!0).forEach(function(a){Ei(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Ei(t,e,r){return(e=Mi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mi(t){var e=Ti(t,"string");return typeof e=="symbol"?e:e+""}function Ti(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Di(t,e,r,a,s){var i,o=a.length;if(!(o<1)){var c=ot(t,r,0,!0),l,u=[];if(Tt((i=a[0])===null||i===void 0?void 0:i.barSize)){var d=!1,p=r/o,m=a.reduce((h,j)=>h+(j.barSize||0),0);m+=(o-1)*c,m>=r&&(m-=(o-1)*c,c=0),m>=r&&p>0&&(d=!0,p*=.9,m=o*p);var y=(r-m)/2>>0,g={offset:y-c,size:0};l=a.reduce((h,j)=>{var N,P={stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:g.offset+g.size+c,size:d?p:(N=j.barSize)!==null&&N!==void 0?N:0}},w=[...h,P];return g=P.position,w},u)}else{var x=ot(e,r,0,!0);r-2*x-(o-1)*c<=0&&(c=0);var b=(r-2*x-(o-1)*c)/o;b>1&&(b>>=0);var v=Tt(s)?Math.min(b,s):b;l=a.reduce((h,j,N)=>[...h,{stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:x+(b+c)*N+(b-v)/2,size:v}}],u)}return l}}var _i=(t,e,r,a,s,i,o)=>{var c=ze(o)?e:o,l=Di(r,a,s!==i?s:i,t,c);return s!==i&&l!=null&&(l=l.map(u=>rt(rt({},u),{},{position:rt(rt({},u.position),{},{offset:u.position.offset-s/2})}))),l},Li=(t,e)=>{var r=En(e);if(!(!t||r==null||e==null)){var{stackId:a}=e;if(a!=null){var s=t[a];if(s){var{stackedData:i}=s;if(i)return i.find(o=>o.key===r)}}}},$i=(t,e)=>{if(!(t==null||e==null)){var r=t.find(a=>a.stackId===e.stackId&&e.dataKey!=null&&a.dataKeys.includes(e.dataKey));if(r!=null)return r.position}};function Ri(t,e){return t&&typeof t=="object"&&"zIndex"in t&&typeof t.zIndex=="number"&&Tt(t.zIndex)?t.zIndex:e}var Bi=["children"];function zi(t,e){if(t==null)return{};var r,a,s=Ki(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Ki(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Fi={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Wi=f.createContext(Fi);function Fa(t){var{children:e}=t,r=zi(t,Bi);return f.createElement(Wi.Provider,{value:r},e)}var Wa=(t,e,r,a)=>Pe(t,"xAxis",e,a),qa=(t,e,r,a)=>Oe(t,"xAxis",e,a),Va=(t,e,r,a)=>Pe(t,"yAxis",r,a),Ha=(t,e,r,a)=>Oe(t,"yAxis",r,a),qi=me([Ie,Wa,Va,qa,Ha],(t,e,r,a,s)=>Tn(t,"xAxis")?ct(e,a,!1):ct(r,s,!1)),Vi=(t,e,r,a,s)=>s;function Hi(t){return t.type==="line"}var Gi=me([Wt,Vi],(t,e)=>t.filter(Hi).find(r=>r.id===e)),Ui=me([Ie,Wa,Va,qa,Ha,Gi,qi,Mn],(t,e,r,a,s,i,o,c)=>{var{chartData:l,dataStartIndex:u,dataEndIndex:d}=c;if(!(i==null||e==null||r==null||a==null||s==null||a.length===0||s.length===0||o==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:p,data:m}=i,y;if(m!=null&&m.length>0?y=m:y=l?.slice(u,d+1),y!=null)return ho({layout:t,xAxis:e,yAxis:r,xAxisTicks:a,yAxisTicks:s,dataKey:p,bandSize:o,displayedData:y})}}),Zi=["id"],Yi=["type","layout","connectNulls","needClip","shape"],Xi=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Ue(){return Ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ue.apply(null,arguments)}function Yr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function xe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yr(Object(r),!0).forEach(function(a){Qi(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Qi(t,e,r){return(e=Ji(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ji(t){var e=eo(t,"string");return typeof e=="symbol"?e:e+""}function eo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zt(t,e){if(t==null)return{};var r,a,s=to(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function to(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var ro=t=>{var{dataKey:e,name:r,stroke:a,legendType:s,hide:i}=t;return[{inactive:i,dataKey:e,type:s,color:a,value:jt(r,e),payload:t}]},ao=f.memo(t=>{var{dataKey:e,data:r,stroke:a,strokeWidth:s,fill:i,name:o,hide:c,unit:l,tooltipType:u,id:d}=t,p={dataDefinedOnItem:r,getPosition:ua,settings:{stroke:a,strokeWidth:s,fill:i,dataKey:e,nameKey:void 0,name:jt(o,e),hide:c,type:u,color:a,unit:l,graphicalItemId:d}};return f.createElement(ca,{tooltipEntrySettings:p})}),Ga=(t,e)=>"".concat(e,"px ").concat(t-e,"px");function no(t,e){for(var r=t.length%2!==0?[...t,0]:t,a=[],s=0;s<e;++s)a=[...a,...r];return a}var so=(t,e,r)=>{var a=r.reduce((y,g)=>y+g);if(!a)return Ga(e,t);for(var s=Math.floor(t/a),i=t%a,o=e-t,c=[],l=0,u=0;l<r.length;u+=(d=r[l])!==null&&d!==void 0?d:0,++l){var d,p=r[l];if(p!=null&&u+p>i){c=[...r.slice(0,l),i-u];break}}var m=c.length%2===0?[0,o]:[o];return[...no(r,s),...c,...m].map(y=>"".concat(y,"px")).join(", ")};function io(t){var{clipPathId:e,points:r,props:a}=t,{dot:s,dataKey:i,needClip:o}=a,{id:c}=a,l=Zt(a,Zi),u=va(l);return f.createElement(Rn,{points:r,dot:s,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:u,needClip:o,clipPathId:e})}function oo(t){var{showLabels:e,children:r,points:a}=t,s=f.useMemo(()=>a?.map(i=>{var o,c,l={x:(o=i.x)!==null&&o!==void 0?o:0,y:(c=i.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xe(xe({},l),{},{value:i.value,payload:i.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[a]);return f.createElement(ha,{value:e?s:void 0},r)}function Xr(t){var{clipPathId:e,pathRef:r,points:a,strokeDasharray:s,props:i}=t,{type:o,layout:c,connectNulls:l,needClip:u,shape:d}=i,p=Zt(i,Yi),m=xe(xe({},Ee(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):void 0,points:a,type:o,layout:c,connectNulls:l,strokeDasharray:s??i.strokeDasharray});return f.createElement(f.Fragment,null,a?.length>1&&f.createElement(Ra,Ue({shapeType:"curve",option:d},m,{pathRef:r})),f.createElement(io,{points:a,clipPathId:e,props:i}))}function lo(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function co(t){var{clipPathId:e,props:r,pathRef:a,previousPointsRef:s,longestAnimatedLengthRef:i}=t,{points:o,strokeDasharray:c,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:p,animateNewValues:m,width:y,height:g,onAnimationEnd:x,onAnimationStart:b}=r,v=s.current,h=gt(o,"recharts-line-"),j=f.useRef(h),[N,P]=f.useState(!1),w=!N,S=f.useCallback(()=>{typeof x=="function"&&x(),P(!1)},[x]),O=f.useCallback(()=>{typeof b=="function"&&b(),P(!0)},[b]),I=lo(a.current),E=f.useRef(0);j.current!==h&&(E.current=i.current,j.current=h);var D=E.current;return f.createElement(oo,{points:o,showLabels:w},r.children,f.createElement(xt,{animationId:h,begin:u,duration:d,isActive:l,easing:p,onAnimationEnd:S,onAnimationStart:O,key:h},T=>{var C=H(D,I+D,T),k=Math.min(C,I),M;if(l)if(c){var _="".concat(c).split(/[,\s]+/gim).map($=>parseFloat($));M=so(k,I,_)}else M=Ga(I,k);else M=c==null?void 0:String(c);if(T>0&&I>0&&(s.current=o,i.current=Math.max(i.current,k)),v){var L=v.length/o.length,z=T===1?o:o.map(($,K)=>{var B=Math.floor(K*L);if(v[B]){var A=v[B];return xe(xe({},$),{},{x:H(A.x,$.x,T),y:H(A.y,$.y,T)})}return m?xe(xe({},$),{},{x:H(y*2,$.x,T),y:H(g/2,$.y,T)}):xe(xe({},$),{},{x:$.x,y:$.y})});return s.current=z,f.createElement(Xr,{props:r,points:z,clipPathId:e,pathRef:a,strokeDasharray:M})}return f.createElement(Xr,{props:r,points:o,clipPathId:e,pathRef:a,strokeDasharray:M})}),f.createElement(pa,{label:r.label}))}function uo(t){var{clipPathId:e,props:r}=t,a=f.useRef(null),s=f.useRef(0),i=f.useRef(null);return f.createElement(co,{props:r,clipPathId:e,previousPointsRef:a,longestAnimatedLengthRef:s,pathRef:i})}var mo=(t,e)=>{var r,a;return{x:(r=t.x)!==null&&r!==void 0?r:void 0,y:(a=t.y)!==null&&a!==void 0?a:void 0,value:t.value,errorVal:Nt(t.payload,e)}};class fo extends f.Component{render(){var{hide:e,dot:r,points:a,className:s,xAxisId:i,yAxisId:o,top:c,left:l,width:u,height:d,id:p,needClip:m,zIndex:y}=this.props;if(e)return null;var g=Ke("recharts-line",s),x=p,{r:b,strokeWidth:v}=_n(r),h=Ln(r),j=b*2+v,N=m?"url(#clipPath-".concat(h?"":"dots-").concat(x,")"):void 0;return f.createElement(wt,{zIndex:y},f.createElement(Be,{className:g},m&&f.createElement("defs",null,f.createElement(fa,{clipPathId:x,xAxisId:i,yAxisId:o}),!h&&f.createElement("clipPath",{id:"clipPath-dots-".concat(x)},f.createElement("rect",{x:l-j/2,y:c-j/2,width:u+j,height:d+j}))),f.createElement(Fa,{xAxisId:i,yAxisId:o,data:a,dataPointFormatter:mo,errorBarOffset:0},f.createElement(uo,{props:this.props,clipPathId:x}))),f.createElement($n,{activeDot:this.props.activeDot,points:a,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:N}))}}var Ua={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:yt.line,type:"linear"};function po(t){var e=Fe(t,Ua),{activeDot:r,animateNewValues:a,animationBegin:s,animationDuration:i,animationEasing:o,connectNulls:c,dot:l,hide:u,isAnimationActive:d,label:p,legendType:m,xAxisId:y,yAxisId:g,id:x}=e,b=Zt(e,Xi),{needClip:v}=da(y,g),h=Dn(),j=ma(),N=bt(),P=Ge(E=>Ui(E,y,g,N,x));if(j!=="horizontal"&&j!=="vertical"||P==null||h==null)return null;var{height:w,width:S,x:O,y:I}=h;return f.createElement(fo,Ue({},b,{id:x,connectNulls:c,dot:l,activeDot:r,animateNewValues:a,animationBegin:s,animationDuration:i,animationEasing:o,isAnimationActive:d,hide:u,label:p,legendType:m,xAxisId:y,yAxisId:g,points:P,layout:j,height:w,width:S,left:O,top:I,needClip:v}))}function ho(t){var{layout:e,xAxis:r,yAxis:a,xAxisTicks:s,yAxisTicks:i,dataKey:o,bandSize:c,displayedData:l}=t;return l.map((u,d)=>{var p=Nt(u,o);if(e==="horizontal"){var m=tr({axis:r,ticks:s,bandSize:c,entry:u,index:d}),y=ze(p)?null:a.scale.map(p);return{x:m,y:y??null,value:p,payload:u}}var g=ze(p)?null:r.scale.map(p),x=tr({axis:a,ticks:i,bandSize:c,entry:u,index:d});return g==null||x==null?null:{x:g,y:x,value:p,payload:u}}).filter(Boolean)}function vo(t){var e=Fe(t,Ua),r=bt();return f.createElement(ia,{id:e.id,type:"line"},a=>f.createElement(f.Fragment,null,f.createElement(oa,{legendPayload:ro(e)}),f.createElement(ao,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:a}),f.createElement(la,{type:"line",id:a,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:r}),f.createElement(po,Ue({},e,{id:a}))))}var Za=f.memo(vo,sa);Za.displayName="Line";function Bt(){return Bt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Bt.apply(null,arguments)}function ht(t){return f.createElement(Ra,Bt({shapeType:"rectangle",activeClassName:"recharts-active-bar"},t))}var go=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(a,s)=>{if(Ve(e))return e;var i=Ve(a)||ze(a);return i?e(a,s):(i||sn(!1),r)}},xo=(t,e,r)=>r,yo=(t,e)=>e,Ye=me([Wt,yo],(t,e)=>t.filter(r=>r.type==="bar").find(r=>r.id===e)),bo=me([Ye],t=>t?.maxBarSize),jo=(t,e,r,a)=>a,wo=me([Ie,Wt,Te,De,xo],(t,e,r,a,s)=>e.filter(i=>t==="horizontal"?i.xAxisId===r:i.yAxisId===a).filter(i=>i.isPanorama===s).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),No=(t,e,r)=>{var a=Ie(t),s=Te(t,e),i=De(t,e);if(!(s==null||i==null))return a==="horizontal"?rr(t,"yAxis",i,r):rr(t,"xAxis",s,r)},Po=(t,e)=>{var r=Ie(t),a=Te(t,e),s=De(t,e);if(!(a==null||s==null))return r==="horizontal"?ar(t,"xAxis",a):ar(t,"yAxis",s)},Oo=me([wo,qn,Po],Ai),So=(t,e,r)=>{var a,s,i=Ye(t,e);if(i==null)return 0;var o=Te(t,e),c=De(t,e);if(o==null||c==null)return 0;var l=Ie(t),u=ga(t),{maxBarSize:d}=i,p=ze(d)?u:d,m,y;return l==="horizontal"?(m=Pe(t,"xAxis",o,r),y=Oe(t,"xAxis",o,r)):(m=Pe(t,"yAxis",c,r),y=Oe(t,"yAxis",c,r)),(a=(s=ct(m,y,!0))!==null&&s!==void 0?s:p)!==null&&a!==void 0?a:0},Ya=(t,e,r)=>{var a=Ie(t),s=Te(t,e),i=De(t,e);if(!(s==null||i==null)){var o,c;return a==="horizontal"?(o=Pe(t,"xAxis",s,r),c=Oe(t,"xAxis",s,r)):(o=Pe(t,"yAxis",i,r),c=Oe(t,"yAxis",i,r)),ct(o,c)}},Io=me([Oo,ga,Fn,Wn,So,Ya,bo],_i),ko=(t,e,r)=>{var a=Te(t,e);if(a!=null)return Pe(t,"xAxis",a,r)},Co=(t,e,r)=>{var a=De(t,e);if(a!=null)return Pe(t,"yAxis",a,r)},Ao=(t,e,r)=>{var a=Te(t,e);if(a!=null)return Oe(t,"xAxis",a,r)},Eo=(t,e,r)=>{var a=De(t,e);if(a!=null)return Oe(t,"yAxis",a,r)},Mo=me([Io,Ye],$i),To=me([No,Ye],Li),Do=me([Bn,zn,ko,Co,Ao,Eo,Mo,Ie,Kn,Ya,To,Ye,jo],(t,e,r,a,s,i,o,c,l,u,d,p,m)=>{var{chartData:y,dataStartIndex:g,dataEndIndex:x}=l;if(!(p==null||o==null||e==null||c!=="horizontal"&&c!=="vertical"||r==null||a==null||s==null||i==null||u==null)){var{data:b}=p,v;if(b!=null&&b.length>0?v=b:v=y?.slice(g,x+1),v!=null)return ll({layout:c,barSettings:p,pos:o,parentViewBox:e,bandSize:u,xAxis:r,yAxis:a,xAxisTicks:s,yAxisTicks:i,stackedData:d,displayedData:v,offset:t,cells:m,dataStartIndex:g})}}),_o=["index"];function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},zt.apply(null,arguments)}function Lo(t,e){if(t==null)return{};var r,a,s=$o(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function $o(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Xa=f.createContext(void 0),Ro=t=>{var e=f.useContext(Xa);if(e!=null)return e.stackId;if(t!=null)return Vn(t)},Bo=(t,e)=>"recharts-bar-stack-clip-path-".concat(t,"-").concat(e),zo=t=>{var e=f.useContext(Xa);if(e!=null){var{stackId:r}=e;return"url(#".concat(Bo(r,t),")")}},Qa=t=>{var{index:e}=t,r=Lo(t,_o),a=zo(e);return f.createElement(Be,zt({className:"recharts-bar-stack-layer",clipPath:a},r))},Ko=["onMouseEnter","onMouseLeave","onClick"],Fo=["value","background","tooltipPosition"],Wo=["id"],qo=["onMouseEnter","onClick","onMouseLeave"];function je(){return je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},je.apply(null,arguments)}function Qr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,a)}return r}function J(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qr(Object(r),!0).forEach(function(a){Vo(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Vo(t,e,r){return(e=Ho(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ho(t){var e=Go(t,"string");return typeof e=="symbol"?e:e+""}function Go(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vt(t,e){if(t==null)return{};var r,a,s=Uo(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}function Uo(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Zo=t=>{var{dataKey:e,name:r,fill:a,legendType:s,hide:i}=t;return[{inactive:i,dataKey:e,type:s,color:a,value:jt(r,e),payload:t}]},Yo=f.memo(t=>{var{dataKey:e,stroke:r,strokeWidth:a,fill:s,name:i,hide:o,unit:c,tooltipType:l,id:u}=t,d={dataDefinedOnItem:void 0,getPosition:ua,settings:{stroke:r,strokeWidth:a,fill:s,dataKey:e,nameKey:void 0,name:jt(i,e),hide:o,type:l,color:s,unit:c,graphicalItemId:u}};return f.createElement(ca,{tooltipEntrySettings:d})});function Xo(t){var e=Ge(xa),{data:r,dataKey:a,background:s,allOtherBarProps:i}=t,{onMouseEnter:o,onMouseLeave:c,onClick:l}=i,u=vt(i,Ko),d=Ba(o,a,i.id),p=za(c),m=Ka(l,a,i.id);if(!s||r==null)return null;var y=Gn(s);return f.createElement(wt,{zIndex:Ri(s,yt.barBackground)},r.map((g,x)=>{var{value:b,background:v,tooltipPosition:h}=g,j=vt(g,Fo);if(!v)return null;var N=d(g,x),P=p(g,x),w=m(g,x),S=J(J(J(J(J({option:s,isActive:String(x)===e},j),{},{fill:"#eee"},v),y),ya(u,g,x)),{},{onMouseEnter:N,onMouseLeave:P,onClick:w,dataKey:a,index:x,className:"recharts-bar-background-rectangle"});return f.createElement(ht,je({key:"background-bar-".concat(x)},S))}))}function Qo(t){var{showLabels:e,children:r,rects:a}=t,s=a?.map(i=>{var o={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return J(J({},o),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:o,fill:i.fill})});return f.createElement(ha,{value:e?s:void 0},r)}function Jo(t){var{shape:e,activeBar:r,baseProps:a,entry:s,index:i,dataKey:o}=t,c=Ge(xa),l=Ge(Yn),u=r&&String(i)===c&&(l==null||o===l),d=u?r:e;return u?f.createElement(wt,{zIndex:yt.activeBar},f.createElement(Qa,{index:i},f.createElement(ht,je({},a,{name:String(a.name)},s,{isActive:u,option:d,index:i,dataKey:o})))):f.createElement(ht,je({},a,{name:String(a.name)},s,{isActive:u,option:d,index:i,dataKey:o}))}function el(t){var{shape:e,baseProps:r,entry:a,index:s,dataKey:i}=t;return f.createElement(ht,je({},r,{name:String(r.name)},a,{isActive:!1,option:e,index:s,dataKey:i}))}function tl(t){var e,{data:r,props:a}=t,s=(e=va(a))!==null&&e!==void 0?e:{},{id:i}=s,o=vt(s,Wo),{shape:c,dataKey:l,activeBar:u}=a,{onMouseEnter:d,onClick:p,onMouseLeave:m}=a,y=vt(a,qo),g=Ba(d,l,i),x=za(m),b=Ka(p,l,i);return r?f.createElement(f.Fragment,null,r.map((v,h)=>f.createElement(Qa,je({index:h,key:"rectangle-".concat(v?.x,"-").concat(v?.y,"-").concat(v?.value,"-").concat(h),className:"recharts-bar-rectangle"},ya(y,v,h),{onMouseEnter:g(v,h),onMouseLeave:x(v,h),onClick:b(v,h)}),u?f.createElement(Jo,{shape:c,activeBar:u,baseProps:o,entry:v,index:h,dataKey:l}):f.createElement(el,{shape:c,baseProps:o,entry:v,index:h,dataKey:l})))):null}function rl(t){var{props:e,previousRectanglesRef:r}=t,{data:a,layout:s,isAnimationActive:i,animationBegin:o,animationDuration:c,animationEasing:l,onAnimationEnd:u,onAnimationStart:d}=e,p=r.current,m=gt(e,"recharts-bar-"),[y,g]=f.useState(!1),x=!y,b=f.useCallback(()=>{typeof u=="function"&&u(),g(!1)},[u]),v=f.useCallback(()=>{typeof d=="function"&&d(),g(!0)},[d]);return f.createElement(Qo,{showLabels:x,rects:a},f.createElement(xt,{animationId:m,begin:o,duration:c,isActive:i,easing:l,onAnimationEnd:b,onAnimationStart:v,key:m},h=>{var j=h===1?a:a?.map((N,P)=>{var w=p&&p[P];if(w)return J(J({},N),{},{x:H(w.x,N.x,h),y:H(w.y,N.y,h),width:H(w.width,N.width,h),height:H(w.height,N.height,h)});if(s==="horizontal"){var S=H(0,N.height,h),O=H(N.stackedBarStart,N.y,h);return J(J({},N),{},{y:O,height:S})}var I=H(0,N.width,h),E=H(N.stackedBarStart,N.x,h);return J(J({},N),{},{width:I,x:E})});return h>0&&(r.current=j??null),j==null?null:f.createElement(Be,null,f.createElement(tl,{props:e,data:j}))}),f.createElement(pa,{label:e.label}),e.children)}function al(t){var e=f.useRef(null);return f.createElement(rl,{previousRectanglesRef:e,props:t})}var Ja=0,nl=(t,e)=>{var r=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:r,errorVal:Nt(t,e)}};class sl extends f.PureComponent{render(){var{hide:e,data:r,dataKey:a,className:s,xAxisId:i,yAxisId:o,needClip:c,background:l,id:u}=this.props;if(e||r==null)return null;var d=Ke("recharts-bar",s),p=u;return f.createElement(Be,{className:d,id:u},c&&f.createElement("defs",null,f.createElement(fa,{clipPathId:p,xAxisId:i,yAxisId:o})),f.createElement(Be,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(p,")"):void 0},f.createElement(Xo,{data:r,dataKey:a,background:l,allOtherBarProps:this.props}),f.createElement(al,this.props)))}}var il={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Ja,xAxisId:0,yAxisId:0,zIndex:yt.bar};function ol(t){var{xAxisId:e,yAxisId:r,hide:a,legendType:s,minPointSize:i,activeBar:o,animationBegin:c,animationDuration:l,animationEasing:u,isAnimationActive:d}=t,{needClip:p}=da(e,r),m=ma(),y=bt(),g=Hn(t.children,Ut),x=Ge(h=>Do(h,t.id,y,g));if(m!=="vertical"&&m!=="horizontal")return null;var b,v=x?.[0];return v==null||v.height==null||v.width==null?b=0:b=m==="vertical"?v.height/2:v.width/2,f.createElement(Fa,{xAxisId:e,yAxisId:r,data:x,dataPointFormatter:nl,errorBarOffset:b},f.createElement(sl,je({},t,{layout:m,needClip:p,data:x,xAxisId:e,yAxisId:r,hide:a,legendType:s,minPointSize:i,activeBar:o,animationBegin:c,animationDuration:l,animationEasing:u,isAnimationActive:d})))}function ll(t){var{layout:e,barSettings:{dataKey:r,minPointSize:a},pos:s,bandSize:i,xAxis:o,yAxis:c,xAxisTicks:l,yAxisTicks:u,stackedData:d,displayedData:p,offset:m,cells:y,parentViewBox:g,dataStartIndex:x}=t,b=e==="horizontal"?c:o,v=d?b.scale.domain():null,h=Un({numericAxis:b}),j=b.scale.map(h);return p.map((N,P)=>{var w,S,O,I,E,D;if(d){var T=d[P+x];if(T==null)return null;w=Zn(T,v)}else w=Nt(N,r),Array.isArray(w)||(w=[h,w]);var C=go(a,Ja)(w[1],P);if(e==="horizontal"){var k,M=c.scale.map(w[0]),_=c.scale.map(w[1]);if(M==null||_==null)return null;S=nr({axis:o,ticks:l,bandSize:i,offset:s.offset,entry:N,index:P}),O=(k=_??M)!==null&&k!==void 0?k:void 0,I=s.size;var L=M-_;if(E=Xn(L)?0:L,D={x:S,y:m.top,width:I,height:m.height},Math.abs(C)>0&&Math.abs(E)<Math.abs(C)){var z=lt(E||C)*(Math.abs(C)-Math.abs(E));O-=z,E+=z}}else{var $=o.scale.map(w[0]),K=o.scale.map(w[1]);if($==null||K==null)return null;if(S=$,O=nr({axis:c,ticks:u,bandSize:i,offset:s.offset,entry:N,index:P}),I=K-$,E=s.size,D={x:m.left,y:O,width:m.width,height:E},Math.abs(C)>0&&Math.abs(I)<Math.abs(C)){var B=lt(I||C)*(Math.abs(C)-Math.abs(I));I+=B}}if(S==null||O==null||I==null||E==null)return null;var A=J(J({},N),{},{stackedBarStart:j,x:S,y:O,width:I,height:E,value:d?w:w[1],payload:N,background:D,tooltipPosition:{x:S+I/2,y:O+E/2},parentViewBox:g},y&&y[P]&&y[P].props);return A}).filter(Boolean)}function cl(t){var e=Fe(t,il),r=Ro(e.stackId),a=bt();return f.createElement(ia,{id:e.id,type:"bar"},s=>f.createElement(f.Fragment,null,f.createElement(oa,{legendPayload:Zo(e)}),f.createElement(Yo,{dataKey:e.dataKey,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:s}),f.createElement(la,{type:"bar",id:s,data:void 0,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,stackId:r,hide:e.hide,barSize:e.barSize,minPointSize:e.minPointSize,maxBarSize:e.maxBarSize,isPanorama:a}),f.createElement(wt,{zIndex:e.zIndex},f.createElement(ol,je({},e,{id:s})))))}var en=f.memo(cl,sa);en.displayName="Bar";var ul=["axis"],dl=f.forwardRef((t,e)=>f.createElement(ba,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ul,tooltipPayloadSearcher:ja,categoricalChartProps:t,ref:e})),ml=["axis","item"],fl=f.forwardRef((t,e)=>f.createElement(ba,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ml,tooltipPayloadSearcher:ja,categoricalChartProps:t,ref:e}));function pl(t){const e=U.c(49),{log:r,isExpanded:a,connection:s,virtualMcpName:i,onToggle:o,lastLogRef:c}=t;let l,u;if(e[0]!==r.timestamp){const k=new Date(r.timestamp);l=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),u=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=l,e[2]=u}else l=e[1],u=e[2];const d=u,p=a?"bg-muted/30 hover:bg-accent/80":"hover:bg-muted/40";let m;e[3]!==p?(m=Se("h-14 md:h-16 transition-colors cursor-pointer",p),e[3]=p,e[4]=m):m=e[4];let y;e[5]!==a?(y=n.jsx(he,{className:"w-10 md:w-12 px-2 md:px-4",children:n.jsx("div",{className:"flex items-center justify-center",children:a?n.jsx(Et,{size:16,className:"text-muted-foreground"}):n.jsx(jn,{size:16,className:"text-muted-foreground"})})}),e[5]=a,e[6]=y):y=e[6];const g=s?.icon||null;let x;e[7]!==r.connectionTitle||e[8]!==g?(x=n.jsx(he,{className:"w-12 md:w-16 px-2 md:px-4",children:n.jsx("div",{className:"flex items-center justify-center",children:n.jsx(He,{icon:g,name:r.connectionTitle,size:"xs",className:"shadow-sm"})})}),e[7]=r.connectionTitle,e[8]=g,e[9]=x):x=e[9];let b;e[10]!==r.toolName?(b=n.jsx("div",{className:"text-xs font-medium text-foreground truncate block",children:r.toolName}),e[10]=r.toolName,e[11]=b):b=e[11];let v;e[12]!==r.connectionTitle?(v=n.jsx("div",{className:"text-xs text-muted-foreground truncate block",children:r.connectionTitle}),e[12]=r.connectionTitle,e[13]=v):v=e[13];let h;e[14]!==b||e[15]!==v?(h=n.jsxs(he,{className:"min-w-0 pr-2 md:pr-4",children:[b,v]}),e[14]=b,e[15]=v,e[16]=h):h=e[16];let j;e[17]!==i?(j=n.jsx(he,{className:"w-24 md:w-32 px-2 md:px-3 text-xs text-muted-foreground",children:n.jsx("div",{className:"truncate",children:i})}),e[17]=i,e[18]=j):j=e[18];let N;e[19]!==r.userName?(N=n.jsx(he,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:r.userName}),e[19]=r.userName,e[20]=N):N=e[20];let P;e[21]!==l?(P=n.jsx(he,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:l}),e[21]=l,e[22]=P):P=e[22];let w;e[23]!==d?(w=n.jsx(he,{className:"w-20 md:w-28 px-2 md:px-3 text-xs text-muted-foreground",children:d}),e[23]=d,e[24]=w):w=e[24];let S;e[25]!==r.durationMs?(S=n.jsxs(he,{className:"w-16 md:w-20 px-2 md:px-3 text-xs text-muted-foreground font-mono text-right",children:[r.durationMs,"ms"]}),e[25]=r.durationMs,e[26]=S):S=e[26];const O=r.isError?"destructive":"success",I=r.isError?"Error":"OK";let E;e[27]!==O||e[28]!==I?(E=n.jsx(he,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:n.jsx("div",{className:"flex items-center justify-end",children:n.jsx(it,{variant:O,className:"text-xs px-1.5 md:px-2 py-0.5 md:py-1",children:I})})}),e[27]=O,e[28]=I,e[29]=E):E=e[29];let D;e[30]!==c||e[31]!==o||e[32]!==j||e[33]!==N||e[34]!==P||e[35]!==w||e[36]!==S||e[37]!==E||e[38]!==m||e[39]!==y||e[40]!==x||e[41]!==h?(D=n.jsxs(Mt,{ref:c,className:m,onClick:o,children:[y,x,h,j,N,P,w,S,E]}),e[30]=c,e[31]=o,e[32]=j,e[33]=N,e[34]=P,e[35]=w,e[36]=S,e[37]=E,e[38]=m,e[39]=y,e[40]=x,e[41]=h,e[42]=D):D=e[42];let T;e[43]!==a||e[44]!==r?(T=a&&n.jsx(Mt,{children:n.jsx(he,{colSpan:9,className:"p-0",children:n.jsx(hn,{log:r})})}),e[43]=a,e[44]=r,e[45]=T):T=e[45];let C;return e[46]!==D||e[47]!==T?(C=n.jsxs(f.Fragment,{children:[D,T]}),e[46]=D,e[47]=T,e[48]=C):C=e[48],C}function ke(t){const e=U.c(24),{title:r,description:a,action:s,children:i,className:o,noPadding:c,onTitleClick:l}=t,u=c===void 0?!1:c;let d;e[0]!==r?(d=typeof r=="string"?n.jsx("div",{className:"text-sm font-medium text-foreground",children:r}):r,e[0]=r,e[1]=d):d=e[1];const p=d;let m;e[2]!==o?(m=Se("bg-background flex flex-col",o),e[2]=o,e[3]=m):m=e[3];let y;e[4]!==l||e[5]!==p?(y=l?n.jsx("button",{onClick:l,className:"text-left hover:text-foreground transition-colors cursor-pointer",children:p}):p,e[4]=l,e[5]=p,e[6]=y):y=e[6];let g;e[7]!==a?(g=a?n.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:a}):null,e[7]=a,e[8]=g):g=e[8];let x;e[9]!==y||e[10]!==g?(x=n.jsxs("div",{className:"min-w-0",children:[y,g]}),e[9]=y,e[10]=g,e[11]=x):x=e[11];let b;e[12]!==s?(b=s?n.jsx("div",{className:"shrink-0",children:s}):null,e[12]=s,e[13]=b):b=e[13];let v;e[14]!==x||e[15]!==b?(v=n.jsxs("header",{className:"flex items-center justify-between gap-4 p-5",children:[x,b]}),e[14]=x,e[15]=b,e[16]=v):v=e[16];let h;e[17]!==i||e[18]!==u?(h=u?n.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-h-0",children:i}):n.jsx("div",{className:"px-5 pb-5 pt-2",children:i}),e[17]=i,e[18]=u,e[19]=h):h=e[19];let j;return e[20]!==m||e[21]!==v||e[22]!==h?(j=n.jsxs("div",{className:m,children:[v,h]}),e[20]=m,e[21]=v,e[22]=h,e[23]=j):j=e[23],j}function hl(t,e){if(t.length===0)return 0;const r=[...t].sort((s,i)=>s-i),a=Math.max(0,Math.min(r.length-1,Math.ceil(e*r.length)-1));return r[a]??0}function vl(t,e){return e<=9e7?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})}function gl(t,e){const o=e-t;return o<=36e5?Math.max(1,Math.min(60,Math.ceil(o/6e4))):o<=9e7?Math.max(1,Math.min(25,Math.ceil(o/36e5))):Math.max(1,Math.min(31,Math.ceil(o/864e5)))}function xl(t,e,r,a){const s=e.getTime(),i=r.getTime(),o=Math.max(1,i-s),c=gl(s,i),l=Math.max(1,Math.floor(o/c)),u=[];for(let d=0;d<c;d++){const p=new Date(s+d*l),m=p.toISOString();u.push({t:m,ts:p.getTime(),label:vl(p,o),calls:0,errors:0,durations:[]})}for(const d of t){const p=new Date(d.timestamp).getTime(),m=Math.floor((p-s)/l),y=Math.max(0,Math.min(c-1,m)),g=u[y];g&&(g.calls+=1,d.isError&&(g.errors+=1),Number.isFinite(d.durationMs)&&g.durations.push(d.durationMs))}return u.map(d=>({t:d.t,ts:d.ts,label:d.label,calls:d.calls,errors:d.errors,errorRate:d.calls>0?d.errors/d.calls*100:0,p95:Math.round(hl(d.durations,.95))}))}function yl(t,e,r,a){const s=a??t.length,i=t.filter(l=>l.isError).length,o=t.length>0?t.reduce((l,u)=>l+u.durationMs,0)/t.length:0,c=xl(t,e.startDate,e.endDate);return{totalCalls:s,totalErrors:i,avgDurationMs:o,data:c}}function bl(t){const e=U.c(29),{data:r,dataKey:a,colorNum:s,chartHeight:i}=t,o=`var(--chart-${s})`;let c;e[0]!==i?(c=Se(i,"w-full"),e[0]=i,e[1]=c):c=e[1];let l;e[2]!==o||e[3]!==a?(l={label:a,color:o},e[2]=o,e[3]=a,e[4]=l):l=e[4];let u;e[5]!==a||e[6]!==l?(u={[a]:l},e[5]=a,e[6]=l,e[7]=u):u=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d={left:0,right:0,top:0,bottom:0},e[8]=d):d=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(wa,{content:n.jsx(Qn,{indicator:"line",labelFormatter:jl})}),e[9]=p):p=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=[0,0,0,0],e[10]=m):m=e[10];let y;if(e[11]!==o||e[12]!==r||e[13]!==a){let v;e[15]!==o||e[16]!==a?(v=(h,j)=>n.jsx(Ut,{fill:h[a]===0?"var(--muted-foreground)":o,fillOpacity:h[a]===0?.25:1},`cell-${j}`),e[15]=o,e[16]=a,e[17]=v):v=e[17],y=r.map(v),e[11]=o,e[12]=r,e[13]=a,e[14]=y}else y=e[14];let g;e[18]!==o||e[19]!==a||e[20]!==y?(g=n.jsx(en,{dataKey:a,fill:o,radius:m,minPointSize:1,children:y}),e[18]=o,e[19]=a,e[20]=y,e[21]=g):g=e[21];let x;e[22]!==r||e[23]!==g?(x=n.jsxs(fl,{data:r,margin:d,children:[p,g]}),e[22]=r,e[23]=g,e[24]=x):x=e[24];let b;return e[25]!==c||e[26]!==u||e[27]!==x?(b=n.jsx(Na,{className:c,config:u,children:x}),e[25]=c,e[26]=u,e[27]=x,e[28]=b):b=e[28],b}function jl(t,e){const r=Array.isArray(e)?e[0]:void 0;return r&&typeof r=="object"&&"payload"in r?r.payload?.label??"":""}const wl=[{label:"Tool Calls",dataKey:"calls",colorNum:1,getValue:t=>t.totalCalls.toLocaleString()},{label:"Errors",dataKey:"errors",colorNum:3,getValue:t=>t.totalErrors.toLocaleString()},{label:"Latency",dataKey:"p95",colorNum:4,getValue:t=>`${Math.round(t.avgDurationMs)}ms`}];function Nl(t){const e=U.c(14),{stats:r,chartHeight:a,showDateLabels:s,dateRange:i,compact:o,onKPIClick:c}=t,l=a===void 0?"h-[40px]":a,u=s===void 0?!1:s,d=o===void 0?!1:o,p=Pl,m=d?"flex flex-col gap-0.5 md:gap-1":"flex flex-col gap-1",y=d?"text-xs md:text-sm text-muted-foreground":"text-sm text-muted-foreground",g=d?"text-sm md:text-lg font-medium":"text-lg font-medium";let x;e[0]!==i||e[1]!==u?(x=u&&i&&n.jsxs("div",{className:"flex items-start justify-between text-xs text-muted-foreground w-full",children:[n.jsx("p",{children:p(i.startDate)}),n.jsx("p",{children:p(i.endDate)})]}),e[0]=i,e[1]=u,e[2]=x):x=e[2];const b=x,v=!!c;let h;e[3]!==l||e[4]!==b||e[5]!==v||e[6]!==y||e[7]!==c||e[8]!==r||e[9]!==m||e[10]!==g?(h=wl.map(N=>{const{label:P,dataKey:w,colorNum:S,getValue:O}=N;return n.jsx(ke,{title:n.jsxs("div",{className:m,children:[n.jsx("p",{className:y,children:P}),n.jsx("p",{className:g,children:O(r)})]}),children:n.jsxs("div",{className:Se("flex flex-col gap-2 w-full",v&&"cursor-pointer hover:opacity-80 transition-opacity"),onClick:c?()=>c(w):void 0,children:[n.jsx(bl,{data:r.data,dataKey:w,colorNum:S,chartHeight:l}),b]})},w)}),e[3]=l,e[4]=b,e[5]=v,e[6]=y,e[7]=c,e[8]=r,e[9]=m,e[10]=g,e[11]=h):h=e[11];let j;return e[12]!==h?(j=n.jsx("div",{className:"grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",children:h}),e[12]=h,e[13]=j):j=e[13],j}function Pl(t){return t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Ol(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",children:[...Array(3)].map(Sl)}),t[0]=e):e=t[0],e}function Sl(t,e){return n.jsx(ke,{title:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),n.jsx("div",{className:"h-6 w-16 rounded bg-muted animate-pulse"})]}),children:n.jsx("div",{className:"flex flex-col gap-2 w-full",children:n.jsx("div",{className:"h-[40px] w-full rounded bg-muted animate-pulse"})})},e)}function Il(){const{org:t,project:e,locator:r}=Me(),a=on(),s=Ze(),i=qt({connectionId:Vt,orgId:t.id}),[o,c]=f.useState(null),[l,u]=f.useState(!1),[d,p]=f.useState(!1),{data:m}=ln({queryKey:at.monitoringDashboards(r),queryFn:async()=>{if(!i)throw new Error("MCP client is not available");const h=await i.callTool({name:"MONITORING_DASHBOARD_LIST",arguments:{}});return h.structuredContent??h}}),y=m?.dashboards??[],g=async()=>{if(i){p(!0);try{const h=await i.callTool({name:"MONITORING_DASHBOARD_CREATE",arguments:{name:"Untitled Dashboard",widgets:[{id:crypto.randomUUID(),name:"New Widget",type:"metric",source:{path:"$.usage.total_tokens",from:"output"},aggregation:{fn:"sum"}}]}}),j=(h.structuredContent??h).id;a.invalidateQueries({queryKey:at.monitoringDashboards(r)}),s({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:j}})}catch(h){Ot.error("Failed to create dashboard"),console.error(h)}finally{p(!1)}}},x=h=>{s({to:"/$org/$project/monitoring/dashboards/$dashboardId",params:{org:t.slug,project:e.slug,dashboardId:h}})},b=h=>{s({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:h}})},v=async h=>{if(i){u(!0);try{await i.callTool({name:"MONITORING_DASHBOARD_DELETE",arguments:{id:h}}),Ot.success("Dashboard deleted"),a.invalidateQueries({queryKey:at.monitoringDashboards(r)})}catch(j){Ot.error("Failed to delete dashboard"),console.error(j)}finally{u(!1),c(null)}}};return n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[y.length===0?n.jsx(Kt,{title:"No dashboards yet",description:"Create a dashboard to aggregate and visualize your monitoring data",image:n.jsx(_t,{size:48,className:"text-muted-foreground/50"}),actions:n.jsxs(be,{onClick:g,size:"sm",disabled:d,children:[n.jsx(Pa,{size:16,className:"mr-1.5"}),"Create Dashboard"]})}):n.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:y.map(h=>n.jsx(ts,{connection:{id:h.id,title:h.name,description:h.description},fallbackIcon:n.jsx(_t,{}),onClick:()=>x(h.id),headerActions:n.jsxs(rs,{children:[n.jsx(as,{asChild:!0,children:n.jsx(be,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:j=>j.stopPropagation(),children:n.jsx(es,{size:20})})}),n.jsxs(ns,{align:"end",onClick:j=>j.stopPropagation(),children:[n.jsxs(sr,{onClick:()=>b(h.id),children:[n.jsx(vn,{size:16}),"Edit"]}),n.jsxs(sr,{onClick:()=>c(h.id),className:"text-destructive",children:[n.jsx(Oa,{size:16}),"Delete"]})]})]}),footer:n.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[n.jsxs("span",{children:[h.widgets.length," widget",h.widgets.length!==1?"s":""]}),n.jsx("span",{children:"·"}),n.jsx("span",{children:new Date(h.createdAt).toLocaleDateString()})]})},h.id))}),n.jsx(ss,{open:!!o,onOpenChange:()=>c(null),children:n.jsxs(is,{children:[n.jsxs(os,{children:[n.jsx(ls,{children:"Delete Dashboard"}),n.jsx(cs,{children:"Are you sure you want to delete this dashboard? This action cannot be undone."})]}),n.jsxs(us,{children:[n.jsx(ds,{disabled:l,children:"Cancel"}),n.jsx(ms,{disabled:l,onClick:()=>o&&v(o),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:l?"Deleting...":"Delete"})]})]})})]})}function kl(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsxs("div",{children:[n.jsx("div",{className:"h-6 w-40 bg-muted rounded animate-pulse"}),n.jsx("div",{className:"h-4 w-64 bg-muted rounded animate-pulse mt-2"})]}),n.jsx("div",{className:"h-8 w-32 bg-muted rounded animate-pulse"})]}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[e,n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(Cl)})]}),t[1]=r):r=t[1],r}function Cl(t){return n.jsxs("div",{className:"border rounded-lg p-4",children:[n.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-2"}),n.jsx("div",{className:"h-4 w-full bg-muted rounded animate-pulse mb-3"}),n.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]},t)}function Al(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboards"}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(qe,{fallback:e,children:n.jsx(f.Suspense,{fallback:n.jsx(kl,{}),children:n.jsx(Il,{})})}),t[1]=r):r=t[1],r}function El(t,e,r=!1){const a=f.useRef(null),s=f.useRef(t),i=f.useRef(e),o=f.useRef(r);return s.current=t,i.current=e,o.current=r,l=>{a.current&&a.current.disconnect(),a.current=new IntersectionObserver(u=>{u[0]?.isIntersecting&&i.current&&!o.current&&s.current()}),l&&a.current.observe(l)}}function Jr(t){const e=U.c(72),{options:r,onValueChange:a,defaultValue:s,placeholder:i,variant:o,animation:c,maxCount:l,modalPopover:u,asChild:d,className:p,disabled:m}=t;let y;e[0]!==s?(y=s===void 0?[]:s,e[0]=s,e[1]=y):y=e[1];const g=y,x=i===void 0?"Select items":i,b=o===void 0?"default":o,v=c===void 0?0:c,h=l===void 0?3:l,j=u===void 0?!1:u,N=d===void 0?!1:d,P=m===void 0?!1:m,[w,S]=f.useState(g),[O,I]=f.useState(!1);let E,D;e[2]!==g||e[3]!==w?(E=()=>{JSON.stringify(w)!==JSON.stringify(g)&&S(g)},D=[g,w],e[2]=g,e[3]=w,e[4]=E,e[5]=D):(E=e[4],D=e[5]),f.useEffect(E,D);let T;e[6]!==a||e[7]!==w?(T=W=>{if(W.key==="Enter")I(!0);else if(W.key==="Backspace"&&!W.currentTarget.value){const q=[...w];q.pop(),S(q),a(q)}},e[6]=a,e[7]=w,e[8]=T):T=e[8];const C=T;let k;e[9]!==a||e[10]!==w?(k=W=>{const q=w.includes(W.value)?w.filter(te=>te!==W.value):[...w,W.value];S(q),a(q)},e[9]=a,e[10]=w,e[11]=k):k=e[11];const M=k;let _;e[12]!==a?(_=()=>{S([]),a([])},e[12]=a,e[13]=_):_=e[13];const L=_;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{I(_l)},e[14]=z):z=e[14];const $=z;let K;e[15]!==L||e[16]!==a||e[17]!==r||e[18]!==w.length?(K=()=>{if(w.length===r.length)L();else{const W=r.map(Dl);S(W),a(W)}},e[15]=L,e[16]=a,e[17]=r,e[18]=w.length,e[19]=K):K=e[19];const B=K;let A;e[20]!==N?(A=N?{}:{variant:"outline"},e[20]=N,e[21]=A):A=e[21];let R;e[22]!==p?(R=Se("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",p),e[22]=p,e[23]=R):R=e[23];let F;e[24]!==v||e[25]!==h||e[26]!==r||e[27]!==x||e[28]!==w||e[29]!==b?(F=w.length>0?n.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[w.slice(0,h).map(W=>{const q=r.find(pe=>pe.value===W),te=q?.icon;return n.jsxs(it,{variant:b==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${v}s`},children:[te&&n.jsx(te,{className:"h-3 w-3 shrink-0"}),n.jsx("span",{className:"truncate",children:q?.label})]},W)}),w.length>h&&n.jsxs(it,{variant:b==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${v}s`},children:["+",w.length-h]})]}),n.jsx("div",{className:"flex items-center shrink-0 ml-2",children:n.jsx(Et,{size:20,className:"shrink-0 opacity-50"})})]}):n.jsxs("div",{className:"flex items-center justify-between w-full",children:[n.jsx("span",{className:"text-sm text-muted-foreground",children:x}),n.jsx(Et,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=v,e[25]=h,e[26]=r,e[27]=x,e[28]=w,e[29]=b,e[30]=F):F=e[30];let Z;e[31]!==P||e[32]!==A||e[33]!==R||e[34]!==F?(Z=n.jsx(Ia,{asChild:!0,children:n.jsx(be,{ref:null,...A,onClick:$,className:R,disabled:P,children:F})}),e[31]=P,e[32]=A,e[33]=R,e[34]=F,e[35]=Z):Z=e[35];let Y;e[36]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>I(!1),e[36]=Y):Y=e[36];let G;e[37]!==C?(G=n.jsx(fs,{placeholder:"Search...",onKeyDown:C,className:"rounded-t-xl"}),e[37]=C,e[38]=G):G=e[38];let Q;e[39]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(ps,{children:"No results found."}),e[39]=Q):Q=e[39];let X;e[40]!==B?(X=()=>{B()},e[40]=B,e[41]=X):X=e[41];let ee;e[42]!==B?(ee=W=>{W.stopPropagation(),B()},e[42]=B,e[43]=ee):ee=e[43];const se=w.length===r.length&&r.length>0;let ie;e[44]!==se||e[45]!==B?(ie=n.jsx(or,{checked:se,onCheckedChange:B,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Tl}),e[44]=se,e[45]=B,e[46]=ie):ie=e[46];let we;e[47]===Symbol.for("react.memo_cache_sentinel")?(we=n.jsx("span",{children:"(Select All)"}),e[47]=we):we=e[47];let oe;e[48]!==ee||e[49]!==ie?(oe=n.jsxs("div",{className:"flex items-center w-full",onClick:ee,children:[ie,we]}),e[48]=ee,e[49]=ie,e[50]=oe):oe=e[50];let le;e[51]!==X||e[52]!==oe?(le=n.jsx(ir,{onSelect:X,className:"cursor-pointer",children:oe},"all"),e[51]=X,e[52]=oe,e[53]=le):le=e[53];let ce;if(e[54]!==r||e[55]!==w||e[56]!==M){let W;e[58]!==w||e[59]!==M?(W=q=>{const te=w.includes(q.value);return n.jsx(ir,{onSelect:()=>{M(q)},className:"cursor-pointer",children:n.jsxs("div",{className:"flex items-center w-full",onClick:pe=>{pe.stopPropagation(),M(q)},children:[n.jsx(or,{checked:te,onCheckedChange:()=>{M(q)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Ml}),q.icon&&n.jsx(q.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),n.jsx("span",{children:q.label})]})},q.value)},e[58]=w,e[59]=M,e[60]=W):W=e[60],ce=r.map(W),e[54]=r,e[55]=w,e[56]=M,e[57]=ce}else ce=e[57];let Ne;e[61]!==le||e[62]!==ce?(Ne=n.jsxs(hs,{className:"rounded-b-xl",children:[Q,n.jsxs(vs,{children:[le,ce]})]}),e[61]=le,e[62]=ce,e[63]=Ne):Ne=e[63];let ue;e[64]!==G||e[65]!==Ne?(ue=n.jsx(ka,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:Y,children:n.jsxs(gs,{className:"rounded-xl",children:[G,Ne]})}),e[64]=G,e[65]=Ne,e[66]=ue):ue=e[66];let de;return e[67]!==O||e[68]!==j||e[69]!==Z||e[70]!==ue?(de=n.jsxs(Ca,{open:O,onOpenChange:I,modal:j,children:[Z,ue]}),e[67]=O,e[68]=j,e[69]=Z,e[70]=ue,e[71]=de):de=e[71],de}function Ml(t){return t.stopPropagation()}function Tl(t){return t.stopPropagation()}function Dl(t){return t.value}function _l(t){return!t}function Ll(){const t=Date.now(),e=300*1e3,r=Math.floor(t/e)*e,a=new Date(r);return{startDate:new Date(r-1440*60*1e3).toISOString(),endDate:a.toISOString()}}function Yt(){const t=U.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Ll(),t[0]=e):e=t[0];const r=e,{org:a}=Me();let s;t[1]!==a.id?(s={connectionId:Vt,orgId:a.id},t[1]=a.id,t[2]=s):s=t[2];const i=qt(s);let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o={...r,limit:2e3,offset:0},t[3]=o):o=t[3];let c;t[4]!==i?(c={client:i,toolName:"MONITORING_LOGS_LIST",toolArguments:o,staleTime:3e4,select:$l},t[4]=i,t[5]=c):c=t[5];const l=As(c);let u;return t[6]!==l?(u={...l,dateRange:r},t[6]=l,t[7]=u):u=t[7],u}function $l(t){return t.structuredContent??t}function Rl(t,e,r,a=10){const i=e.getTime(),c=(r.getTime()-i)/24,l=new Map;for(const g of t){const x=g.toolName||"Unknown",b=l.get(x);l.set(x,{count:(b?.count??0)+1,connectionId:b?.connectionId||g.connectionId})}const u=[...l.entries()].sort((g,x)=>x[1].count-g[1].count).slice(0,a).map(([g,x])=>({name:g,connectionId:x.connectionId})),d=[],p=u.map(g=>g.name);for(let g=0;g<24;g++){const x=new Date(i+g*c),b={t:x.toISOString(),ts:x.getTime(),label:x.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};for(const v of p)b[v]=0;d.push(b)}for(const g of t){const x=new Date(g.timestamp).getTime(),b=Math.floor((x-i)/c),v=Math.max(0,Math.min(23,b)),h=d[v];if(!h)continue;const j=g.toolName||"Unknown";p.includes(j)&&(h[j]=h[j]+1)}const m={},y=new Map;return u.forEach((g,x)=>{const v=`var(--chart-${x%5+1})`;y.set(g.name,v),m[g.name]={label:g.name,color:v}}),{buckets:d,topTools:u,chartConfig:m,toolColors:y}}function Bl(t){const e=U.c(4),{org:r}=Me(),a=Ze(),s=Ht()??[],{data:i,dateRange:o}=Yt(),c=i?.logs??[],l=new Date(o.startDate),u=new Date(o.endDate),{buckets:d,topTools:p,chartConfig:m,toolColors:y}=Rl(c,l,u,10),g=new Map(s.map(Kl));let x;e[0]!==a||e[1]!==r.slug?(x=()=>{a({to:"/$org/$project/monitoring",params:{org:r.slug,project:Re}})},e[0]=a,e[1]=r.slug,e[2]=x):x=e[2];const b=x,v=zl;let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Top Tools"}),e[3]=h):h=e[3],n.jsx(ke,{title:n.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,n.jsx("div",{className:"flex items-center gap-3",children:p.slice(0,3).map(j=>{const N=g.get(j.connectionId||"");return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(He,{icon:N?.icon||null,name:j.name,size:"xs",fallbackIcon:n.jsx(Dt,{}),className:"shrink-0 size-4! min-w-4! aspect-square rounded-sm"}),n.jsx("span",{className:"text-[10px] text-foreground truncate max-w-32",children:j.name})]},j.name)})})]}),onTitleClick:b,children:p.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No tool activity in the last 24 hours"}):n.jsxs("div",{className:"flex flex-col gap-2 w-full h-full cursor-pointer hover:opacity-80 transition-opacity",children:[n.jsx(Na,{className:"flex-1 min-h-0 max-h-[120px] w-full",config:m,children:n.jsxs(dl,{data:d,margin:{left:0,right:0,top:5,bottom:5},children:[n.jsx(wa,{content:j=>{const{active:N,payload:P}=j;if(!N||!P||P.length===0)return null;const w=P[0]&&typeof P[0]=="object"&&"payload"in P[0]?P[0].payload?.label??"":"";return n.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[n.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:w}),n.jsx("div",{className:"flex flex-col gap-1",children:P.map(S=>{const O=String(S.dataKey??""),I=typeof S.value=="number"?S.value:0,E=typeof S.color=="string"?S.color:void 0;if(!I||I===0)return null;const D=p.find(C=>C.name===O),T=g.get(D?.connectionId||"");return n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:E}}),n.jsx(He,{icon:T?.icon||null,name:O,size:"xs",fallbackIcon:n.jsx(Dt,{}),className:"shrink-0"}),n.jsxs("span",{className:"text-xs font-medium",children:[O,":"]}),n.jsx("span",{className:"text-xs font-bold",children:I})]},O)})})]})}}),p.map(j=>n.jsx(Za,{type:"monotone",dataKey:j.name,stroke:y.get(j.name),strokeWidth:2,dot:!1,activeDot:{r:4}},j.name))]})}),n.jsxs("div",{className:"flex items-start justify-between text-xs text-muted-foreground w-full",children:[n.jsx("p",{children:v(l)}),n.jsx("p",{children:v(u)})]})]})})}function zl(t){return t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Kl(t){return[t.id,t]}function Fl(){const t=U.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t[0]=e):e=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[e,n.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:3}).map(Wl)})]}),t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex-1 min-h-0 max-h-[120px] w-full rounded bg-muted animate-pulse"}),t[2]=a):a=t[2];let s;return t[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ke,{title:r,children:n.jsxs("div",{className:"flex flex-col gap-2 w-full h-full",children:[a,n.jsxs("div",{className:"flex items-start justify-between w-full",children:[n.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"}),n.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"})]})]})}),t[3]=s):s=t[3],s}function Wl(t,e){return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"size-4 aspect-square rounded-md bg-muted animate-pulse"}),n.jsx("div",{className:"h-2.5 w-16 rounded bg-muted animate-pulse"})]},e)}const ea={Content:Bl,Skeleton:Fl};function ql(t){const e=new Map;for(const a of t){if(!a.connectionId)continue;const s=e.get(a.connectionId)??{requests:0,errors:0,totalLatency:0};e.set(a.connectionId,{requests:s.requests+1,errors:s.errors+(a.isError?1:0),totalLatency:s.totalLatency+a.durationMs})}const r=new Map;for(const[a,s]of e)r.set(a,{connectionId:a,requests:s.requests,errors:s.errors,errorRate:s.requests>0?s.errors/s.requests*100:0,avgLatencyMs:s.requests>0?s.totalLatency/s.requests:0});return r}function Vl(t,e){switch(e){case"requests":return t.requests.toLocaleString();case"errors":return`${t.errorRate.toFixed(1)}%`;case"latency":return`${Math.round(t.avgLatencyMs)}ms`}}function nt(t,e){switch(e){case"requests":return t.requests;case"errors":return t.errorRate;case"latency":return t.avgLatencyMs}}function Hl(t,e,r){if(e===0)return 0;const a=nt(t,r);return Math.min(a/e*100,100)}function Gl(t){const e=U.c(19),{metricsMode:r,onMetricsModeChange:a}=t,{org:s}=Me(),i=Ze(),o=Ht({pageSize:100})??[],{data:c}=Yt(),l=c?.logs??[],u=ql(l);let d;e[0]!==r?(d=(O,I)=>nt(I.metric,r)-nt(O.metric,r),e[0]=r,e[1]=d):d=e[1];const p=o.map(O=>({connection:O,metric:u.get(O.id)})).filter(Ul).sort(d).slice(0,15),m=p[0]?.metric,y=m?nt(m,r):1;let g;e[2]!==r||e[3]!==i||e[4]!==s.slug?(g=O=>{i({to:"/$org/$project/monitoring",params:{org:s.slug,project:Re},search:{from:"now-24h",to:"now",connectionId:[O],...r==="errors"&&{status:"errors"}}})},e[2]=r,e[3]=i,e[4]=s.slug,e[5]=g):g=e[5];const x=g;let b;e[6]!==i||e[7]!==s.slug?(b=()=>{i({to:"/$org/$project/mcps",params:{org:s.slug,project:Re}})},e[6]=i,e[7]=s.slug,e[8]=b):b=e[8];const v=b,h=r==="requests"?"bg-chart-1":r==="errors"?"bg-chart-3":"bg-chart-4",j=ke;let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Connections"}),e[9]=N):N=e[9];let P;e[10]!==r||e[11]!==a?(P=a?n.jsxs(Es,{type:"single",value:r,onValueChange:O=>O&&a(O),variant:"outline",size:"sm",children:[n.jsx(It,{value:"requests",className:"text-xs px-2 cursor-pointer",children:"Calls"}),n.jsx(It,{value:"errors",className:"text-xs px-2 cursor-pointer",children:"Errors"}),n.jsx(It,{value:"latency",className:"text-xs px-2 cursor-pointer",children:"Latency"})]}):null,e[10]=r,e[11]=a,e[12]=P):P=e[12];const w=p.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No server activity in the last 24 hours"}):n.jsx("div",{className:"space-y-3 w-full",children:p.map(O=>{const{connection:I,metric:E}=O,D=Hl(E,y,r);return n.jsxs("div",{className:"group cursor-pointer flex items-center gap-2",onClick:()=>x(I.id),children:[n.jsx(He,{icon:I.icon,name:I.title,size:"xs",fallbackIcon:n.jsx(Dt,{}),className:"shrink-0"}),n.jsx("span",{className:"text-xs font-medium text-foreground truncate min-w-0 w-32",children:I.title}),n.jsx("div",{className:"relative h-2 bg-muted/50 overflow-hidden flex-1",children:n.jsx("div",{className:Se("h-full transition-all duration-500 ease-out group-hover:opacity-80",h),style:{width:`${D}%`}})}),n.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-normal",children:Vl(E,r)})]},I.id)})});let S;return e[13]!==j||e[14]!==v||e[15]!==N||e[16]!==P||e[17]!==w?(S=n.jsx(j,{title:N,onTitleClick:v,action:P,children:w}),e[13]=j,e[14]=v,e[15]=N,e[16]=P,e[17]=w,e[18]=S):S=e[18],S}function Ul(t){return t.metric}function Zl(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Connections"}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ke,{title:e,children:n.jsx("div",{className:"space-y-3 w-full",children:Array.from({length:8}).map(Yl)})}),t[1]=r):r=t[1],r}function Yl(t,e){return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"h-6 w-6 bg-muted animate-pulse rounded-md shrink-0"}),n.jsx("div",{className:"h-3 w-32 bg-muted animate-pulse rounded shrink-0"}),n.jsx("div",{className:"h-2 bg-muted animate-pulse flex-1"}),n.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded shrink-0"})]},e)}const ta={Content:Gl,Skeleton:Zl};function Xl(t){const e=new Map;for(const a of t){if(!a.virtualMcpId)continue;const s=e.get(a.virtualMcpId)??{requests:0,errors:0,totalLatency:0};e.set(a.virtualMcpId,{requests:s.requests+1,errors:s.errors+(a.isError?1:0),totalLatency:s.totalLatency+a.durationMs})}const r=new Map;for(const[a,s]of e)r.set(a,{virtualMcpId:a,requests:s.requests,errors:s.errors,errorRate:s.requests>0?s.errors/s.requests*100:0,avgLatencyMs:s.requests>0?s.totalLatency/s.requests:0});return r}function Ql(t,e){switch(e){case"requests":return t.requests.toLocaleString();case"errors":return`${t.errorRate.toFixed(1)}%`;case"latency":return`${Math.round(t.avgLatencyMs)}ms`}}function st(t,e){switch(e){case"requests":return t.requests;case"errors":return t.errorRate;case"latency":return t.avgLatencyMs}}function Jl(t,e,r){if(e===0)return 0;const a=st(t,r);return Math.min(a/e*100,100)}function ec(t){const e=U.c(15),{metricsMode:r}=t,{org:a}=Me(),s=Ze(),i=Sa({pageSize:100})??[],{data:o}=Yt(),c=o?.logs??[],l=Xl(c);let u;e[0]!==r?(u=(w,S)=>st(S.metric,r)-st(w.metric,r),e[0]=r,e[1]=u):u=e[1];const d=i.map(w=>({virtualMcp:w,metric:l.get(w.id??"")})).filter(tc).sort(u).slice(0,15),p=d[0]?.metric,m=p?st(p,r):1;let y;e[2]!==r||e[3]!==s||e[4]!==a.slug?(y=w=>{s({to:"/$org/$project/monitoring",params:{org:a.slug,project:Re},search:{from:"now-24h",to:"now",virtualMcpId:[w],...r==="errors"&&{status:"errors"}}})},e[2]=r,e[3]=s,e[4]=a.slug,e[5]=y):y=e[5];const g=y;let x;e[6]!==s||e[7]!==a.slug?(x=()=>{s({to:"/$org/$project/agents",params:{org:a.slug,project:Re}})},e[6]=s,e[7]=a.slug,e[8]=x):x=e[8];const b=x,v=r==="requests"?"bg-chart-1":r==="errors"?"bg-chart-3":"bg-chart-4",h=ke;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Agents"}),e[9]=j):j=e[9];const N=d.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No agent activity in the last 24 hours"}):n.jsx("div",{className:"space-y-3 w-full",children:d.map(w=>{const{virtualMcp:S,metric:O}=w,I=Jl(O,m,r);return n.jsxs("div",{className:"group cursor-pointer flex items-center gap-2",onClick:()=>g(S.id??""),children:[n.jsx(He,{icon:S.icon,name:S.title,size:"xs",fallbackIcon:n.jsx(Ms,{}),className:"shrink-0"}),n.jsx("span",{className:"text-xs font-medium text-foreground truncate min-w-0 w-32",children:S.title}),n.jsx("div",{className:"relative h-2 bg-muted/50 overflow-hidden flex-1",children:n.jsx("div",{className:Se("h-full transition-all duration-500 ease-out group-hover:opacity-80",v),style:{width:`${I}%`}})}),n.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-normal",children:Ql(O,r)})]},S.id??"default")})});let P;return e[10]!==h||e[11]!==b||e[12]!==j||e[13]!==N?(P=n.jsx(h,{title:j,onTitleClick:b,children:N}),e[10]=h,e[11]=b,e[12]=j,e[13]=N,e[14]=P):P=e[14],P}function tc(t){return t.metric!==void 0}function rc(){const t=U.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Agents"}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ke,{title:e,children:n.jsx("div",{className:"space-y-3 w-full",children:Array.from({length:8}).map(ac)})}),t[1]=r):r=t[1],r}function ac(t,e){return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"h-6 w-6 bg-muted animate-pulse rounded-md shrink-0"}),n.jsx("div",{className:"h-3 w-32 bg-muted animate-pulse rounded shrink-0"}),n.jsx("div",{className:"h-2 bg-muted animate-pulse flex-1"}),n.jsx("div",{className:"h-3 w-12 bg-muted animate-pulse rounded shrink-0"})]},e)}const ra={Content:ec,Skeleton:rc};function nc(){const t=U.c(18),[e,r]=f.useState("requests");let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load top tools"}),t[0]=a):a=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ea.Skeleton,{}),t[1]=s):s=t[1];let i;t[2]!==e?(i=n.jsx("div",{className:"border-b bg-background shrink-0",children:n.jsx(qe,{fallback:a,children:n.jsx(f.Suspense,{fallback:s,children:n.jsx(ea.Content,{metricsMode:e})})})}),t[2]=e,t[3]=i):i=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load top servers"}),t[4]=o):o=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ta.Skeleton,{}),t[5]=c):c=t[5];let l;t[6]!==e?(l=n.jsx("div",{className:"bg-background overflow-auto",children:n.jsx(qe,{fallback:o,children:n.jsx(f.Suspense,{fallback:c,children:n.jsx(ta.Content,{metricsMode:e,onMetricsModeChange:r})})})}),t[6]=e,t[7]=l):l=t[7];let u;t[8]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load top agents"}),t[8]=u):u=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(ra.Skeleton,{}),t[9]=d):d=t[9];let p;t[10]!==e?(p=n.jsx("div",{className:"bg-background overflow-auto",children:n.jsx(qe,{fallback:u,children:n.jsx(f.Suspense,{fallback:d,children:n.jsx(ra.Content,{metricsMode:e})})})}),t[10]=e,t[11]=p):p=t[11];let m;t[12]!==l||t[13]!==p?(m=n.jsxs("div",{className:"flex-1 grid grid-cols-1 lg:grid-cols-2 gap-[0.5px] bg-border min-h-0",children:[l,p]}),t[12]=l,t[13]=p,t[14]=m):m=t[14];let y;return t[15]!==i||t[16]!==m?(y=n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto",children:[i,m]}),t[15]=i,t[16]=m,t[17]=y):y=t[17],y}function sc(t){const e=U.c(11),{displayDateRange:r,connectionIds:a,logs:s,total:i}=t;let o=s;if(a.length>1){let p;if(e[0]!==a||e[1]!==o){let m;e[3]!==a?(m=y=>a.includes(y.connectionId),e[3]=a,e[4]=m):m=e[4],p=o.filter(m),e[0]=a,e[1]=o,e[2]=p}else p=e[2];o=p}const c=a.length>1?void 0:i;let l;e[5]!==r||e[6]!==o||e[7]!==c?(l=yl(o,r,void 0,c),e[5]=r,e[6]=o,e[7]=c,e[8]=l):l=e[8];const u=l;let d;return e[9]!==u?(d=n.jsx(Nl,{stats:u,chartHeight:"h-[30px] md:h-[40px]",compact:!0}),e[9]=u,e[10]=d):d=e[10],d}const tn=Object.assign(sc,{Skeleton:Ol}),ic=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function oc({connectionIds:t,virtualMcpIds:e,tool:r,status:a,hideSystem:s,propertyFilters:i,connectionOptions:o,virtualMcpOptions:c,activeFiltersCount:l,onUpdateFilters:u}){const[d,p]=f.useState(!1),[m,y]=f.useState("raw"),[g,x]=f.useState(r),[b,v]=f.useState(i),[h,j]=f.useState(Qe(i)),N=f.useRef(r),P=f.useRef(Le(i));N.current!==r&&(N.current=r,g!==r&&x(r));const w=Le(i);P.current!==w&&(P.current=w,v(i),j(Qe(i)));const S=(C,k)=>{const M=[...b],_=M[C];_&&(M[C]={key:k.key??_.key,operator:k.operator??_.operator,value:k.value??_.value},v(M))},O=()=>{v([...b,{key:"",operator:"eq",value:""}])},I=C=>{const k=b.filter((M,_)=>_!==C);v(k),j(Qe(k)),u({propertyFilters:Le(k)})},E=()=>{u({propertyFilters:Le(b)})},D=()=>{const C=Jt(h);v(C),u({propertyFilters:Le(C)})},T=()=>{if(m==="raw"){const C=Jt(h);v(C),y("form")}else j(Qe(b)),y("raw")};return n.jsxs(Ca,{open:d,onOpenChange:p,children:[n.jsx(Ia,{asChild:!0,children:n.jsxs(be,{variant:"outline",size:"sm",children:[n.jsx(js,{size:16}),"Filters",l>0&&n.jsx(it,{variant:"default",className:"ml-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:l})]})}),n.jsx(ka,{align:"end",className:"w-[320px]",children:n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{children:n.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(Cs,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),n.jsx(ks,{id:"hide-system-calls",checked:s,onCheckedChange:C=>u({hideSystem:!!C})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),n.jsx(Jr,{options:o,defaultValue:t,onValueChange:C=>u({connectionId:C}),placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),n.jsx(Jr,{options:c,defaultValue:e,onValueChange:C=>u({virtualMcpId:C}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),n.jsx(St,{id:"filter-tool",placeholder:"Filter by tool...",value:g,onChange:C=>x(C.target.value),onBlur:()=>{g!==r&&u({tool:g})},onKeyDown:C=>{C.key==="Enter"&&g!==r&&u({tool:g})},className:"w-full"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),n.jsxs(lr,{value:a,onValueChange:C=>u({status:C}),children:[n.jsx(cr,{className:"w-full",children:n.jsx(ur,{})}),n.jsxs(dr,{children:[n.jsx(et,{value:"all",children:"All Status"}),n.jsx(et,{value:"success",children:"Success Only"}),n.jsx(et,{value:"errors",children:"Errors Only"})]})]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),n.jsxs(Ps,{children:[n.jsx(Os,{asChild:!0,children:n.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:T,children:m==="raw"?n.jsx(ws,{size:14}):n.jsx(bs,{size:14})})}),n.jsx(Ss,{children:m==="raw"?"Switch to form view":"Switch to raw text"})]})]}),m==="raw"?n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(Ns,{placeholder:`Paste property filters here:
29
29
  thread_id=abc123
30
30
  user~test
31
- debug?`,value:h,onChange:C=>j(C.target.value),onBlur:D,onKeyDown:C=>{C.key==="Enter"&&C.metaKey&&D()},className:"font-mono text-sm min-h-[80px] resize-none"}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):n.jsxs("div",{className:"space-y-3",children:[b.map((C,k)=>n.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",k+1]}),n.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>I(k),children:n.jsx(Oa,{size:12})})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(St,{placeholder:"Key (e.g., thread_id)",value:C.key,onChange:M=>S(k,{key:M.target.value}),onBlur:E,onKeyDown:M=>{M.key==="Enter"&&E()},className:"flex-1 font-mono text-sm"}),n.jsxs(lr,{value:C.operator,onValueChange:M=>{const _=[...b],L=_[k];L&&(_[k]={...L,operator:M,value:M==="exists"?"":L.value},v(_),u({propertyFilters:Le(_)}))},children:[n.jsx(cr,{className:"w-28",children:n.jsx(ur,{})}),n.jsx(dr,{children:ic.map(M=>n.jsx(et,{value:M.value,children:M.label},M.value))})]})]}),C.operator!=="exists"&&n.jsx(St,{placeholder:"Value",value:C.value,onChange:M=>S(k,{value:M.target.value}),onBlur:E,onKeyDown:M=>{M.key==="Enter"&&E()},className:"w-full font-mono text-sm"})]},k)),n.jsxs(be,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[n.jsx(Pa,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),l>0&&n.jsx(be,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{x(""),v([]),j(""),u({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function lc(t){const e=U.c(17),{connectionIds:r,virtualMcpIds:a,tool:s,status:i,search:o,logs:c,hasMore:l,onLoadMore:u,isLoadingMore:d,connections:p,virtualMcps:m,membersData:y}=t,g=p??[],x=m??[];let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[v,h]=f.useState(b),j=El(u,l,d),N=y?.data?.members??[],P=new Map(N.map(dc)),w=new Map(x.map(uc));let O=c.map(A=>{const R=P.get(A.userId??""),F=A.virtualMcpId?w.get(A.virtualMcpId):null;return{...A,userName:R?.name??A.userId??"Unknown",userImage:R?.image,virtualMcpName:F?.title??null}});if(r.length>1){let A;e[1]!==r?(A=R=>r.includes(R.connectionId),e[1]=r,e[2]=A):A=e[2],O=O.filter(A)}if(a.length>1){let A;e[3]!==a?(A=R=>R.virtualMcpId&&a.includes(R.virtualMcpId),e[3]=a,e[4]=A):A=e[4],O=O.filter(A)}if(o){const A=o.toLowerCase();O=O.filter(R=>R.toolName.toLowerCase().includes(A)||R.connectionTitle.toLowerCase().includes(A)||R.errorMessage?.toLowerCase().includes(A))}let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=A=>{h(R=>{const F=new Set(R);return F.has(A.id)?F.delete(A.id):F.add(A.id),F})},e[5]=I):I=e[5];const E=I,D=new Map(g.map(cc));if(O.length===0){let A;e[6]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[6]=A):A=e[6];const R=o||r.length>0||a.length>0||s||i!=="all"?"No logs match your filters":"No logs found in this time range";let F;return e[7]!==R?(F=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Kt,{image:A,title:"No logs found",description:R})}),e[7]=R,e[8]=F):F=e[8],F}const T="flex-1 flex flex-col overflow-hidden",C="flex-1 overflow-auto",k="min-w-[600px] md:min-w-0 bg-background",M=Nn,_="w-full border-collapse";let L;e[9]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Pn,{className:"border-b-0 z-20",children:n.jsxs(Mt,{className:"h-9 hover:bg-transparent border-b border-border",children:[n.jsx(ye,{className:"w-10 md:w-12 px-2 md:px-4"}),n.jsx(ye,{className:"w-5"}),n.jsx(ye,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),n.jsx(ye,{className:"w-24 md:w-32 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),n.jsx(ye,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User Name"}),n.jsx(ye,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),n.jsx(ye,{className:"w-20 md:w-28 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Time"}),n.jsx(ye,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Latency"}),n.jsx(ye,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[9]=L):L=e[9];const z=wn,$=O.map((A,R)=>n.jsx(pl,{log:A,isExpanded:v.has(A.id),connection:D.get(A.connectionId),virtualMcpName:A.virtualMcpName??"",onToggle:()=>E(A),lastLogRef:R===O.length-1?j:void 0},A.id));let K;e[10]!==z||e[11]!==$?(K=n.jsx(z,{children:$}),e[10]=z,e[11]=$,e[12]=K):K=e[12];let B;return e[13]!==M||e[14]!==L||e[15]!==K?(B=n.jsx("div",{className:T,children:n.jsx("div",{className:C,children:n.jsx("div",{className:k,children:n.jsxs(M,{className:_,children:[L,K]})})})}),e[13]=M,e[14]=L,e[15]=K,e[16]=B):B=e[16],B}function cc(t){return[t.id,t]}function uc(t){return[t.id,t]}function dc(t){return[t.userId,t.user]}function mc(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx("div",{className:"text-muted-foreground",children:"Loading logs..."})}),t[0]=e):e=t[0],e}const rn=Object.assign(lc,{Skeleton:mc});function fc(t){const e=U.c(86),{tab:r,dateRange:a,displayDateRange:s,connectionIds:i,virtualMcpIds:o,tool:c,status:l,search:u,streaming:d,hideSystem:p,activeFiltersCount:m,from:y,to:g,propertyFilters:x,onUpdateFilters:b,onTimeRangeChange:v,onStreamingToggle:h,onTabChange:j}=t,N=Ht(),P=Sa(),{data:w}=xs();let S;e[0]!==N?(S=N??[],e[0]=N,e[1]=S):S=e[1];let O;e[2]!==S?(O=S.map(vc),e[2]=S,e[3]=O):O=e[3];const I=O;let E;e[4]!==P?(E=P.map(hc),e[4]=P,e[5]=E):E=e[5];const D=E,{pageSize:T,streamingRefetchInterval:C}=yn,{org:k,locator:M}=Me();let _;e[6]!==k.id?(_={connectionId:Vt,orgId:k.id},e[6]=k.id,e[7]=_):_=e[7];const L=qt(_);let z,$,K;if(e[8]!==i[0]||e[9]!==i.length||e[10]!==a.endDate||e[11]!==a.startDate||e[12]!==p||e[13]!==M||e[14]!==k.id||e[15]!==x||e[16]!==l||e[17]!==c||e[18]!==o[0]||e[19]!==o.length){const re=xn(x),_e=p?[Jn.SELF(k.id)]:void 0;z={startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:i.length===1?i[0]:void 0,excludeConnectionIds:_e,virtualMcpId:o.length===1?o[0]:void 0,toolName:c||void 0,isError:l==="errors"?!0:l==="success"?!1:void 0,...re},K=ys,$=at.monitoringLogsInfinite(M,JSON.stringify(z)),e[8]=i[0],e[9]=i.length,e[10]=a.endDate,e[11]=a.startDate,e[12]=p,e[13]=M,e[14]=k.id,e[15]=x,e[16]=l,e[17]=c,e[18]=o[0],e[19]=o.length,e[20]=z,e[21]=$,e[22]=K}else z=e[20],$=e[21],K=e[22];let B;e[23]!==z||e[24]!==L?(B=async re=>{const{pageParam:_e}=re,an=_e===void 0?0:_e;if(!L)throw new Error("MCP client is not available");const Xt=await L.callTool({name:"MONITORING_LOGS_LIST",arguments:{...z,limit:T,offset:an}});return Xt.structuredContent??Xt},e[23]=z,e[24]=L,e[25]=B):B=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=(re,_e)=>{if(!((re?.logs?.length??0)<T))return _e.length*T},e[26]=A):A=e[26];const R=d?C:!1;let F;e[27]!==$||e[28]!==B||e[29]!==R?(F={queryKey:$,queryFn:B,initialPageParam:0,getNextPageParam:A,staleTime:0,refetchInterval:R},e[27]=$,e[28]=B,e[29]=R,e[30]=F):F=e[30];const{data:Z,fetchNextPage:Y,hasNextPage:G,isFetchingNextPage:Q}=K(F);let X;e[31]!==Z?.pages?(X=Z?.pages.flatMap(pc)??[],e[31]=Z?.pages,e[32]=X):X=e[32];const ee=X,se=Z?.pages[0]?.total;let ie;e[33]!==Y||e[34]!==G||e[35]!==Q?(ie=()=>{G&&!Q&&Y()},e[33]=Y,e[34]=G,e[35]=Q,e[36]=ie):ie=e[36];const we=ie;let oe;e[37]===Symbol.for("react.memo_cache_sentinel")?(oe={id:"logs",label:"Logs"},e[37]=oe):oe=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le={id:"analytics",label:"Analytics"},e[38]=le):le=e[38];let ce;e[39]===Symbol.for("react.memo_cache_sentinel")?(ce=[oe,le,{id:"dashboards",label:"Dashboards"}],e[39]=ce):ce=e[39];const Ne=ce;let ue;e[40]===Symbol.for("react.memo_cache_sentinel")?(ue=n.jsx(ge.Header.Left,{children:n.jsx(dn,{children:n.jsx(mn,{children:n.jsx(fn,{children:n.jsx(pn,{children:"Monitoring"})})})})}),e[40]=ue):ue=e[40];let de;e[41]!==m||e[42]!==i||e[43]!==I||e[44]!==y||e[45]!==p||e[46]!==d||e[47]!==h||e[48]!==v||e[49]!==b||e[50]!==x||e[51]!==l||e[52]!==r||e[53]!==g||e[54]!==c||e[55]!==o||e[56]!==D?(de=r==="logs"&&n.jsx(ge.Header.Right,{children:n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(oc,{connectionIds:i,virtualMcpIds:o,tool:c,status:l,hideSystem:p,propertyFilters:x,connectionOptions:I,virtualMcpOptions:D,activeFiltersCount:m,onUpdateFilters:b}),n.jsxs(be,{variant:d?"secondary":"outline",size:"sm",className:Se("h-7 px-2 sm:px-3 gap-1.5",d&&"bg-muted hover:bg-muted/80"),onClick:h,children:[d?n.jsx(Aa,{size:16,className:"animate-pulse"}):n.jsx(Ea,{size:16}),n.jsx("span",{className:"hidden sm:inline",children:d?"Streaming":"Stream"})]}),n.jsx(bn,{value:{from:y,to:g},onChange:v})]})}),e[41]=m,e[42]=i,e[43]=I,e[44]=y,e[45]=p,e[46]=d,e[47]=h,e[48]=v,e[49]=b,e[50]=x,e[51]=l,e[52]=r,e[53]=g,e[54]=c,e[55]=o,e[56]=D,e[57]=de):de=e[57];let W;e[58]!==de?(W=n.jsxs(ge.Header,{children:[ue,de]}),e[58]=de,e[59]=W):W=e[59];let q;e[60]!==j?(q=re=>j(re),e[60]=j,e[61]=q):q=e[61];let te;e[62]!==q||e[63]!==r?(te=n.jsx("div",{className:"px-5 py-3 border-b border-border",children:n.jsx(Is,{tabs:Ne,activeTab:r,onTabChange:q})}),e[62]=q,e[63]=r,e[64]=te):te=e[64];let pe;e[65]!==N||e[66]!==ee||e[67]!==P||e[68]!==i||e[69]!==s||e[70]!==we||e[71]!==G||e[72]!==Q||e[73]!==w||e[74]!==b||e[75]!==u||e[76]!==l||e[77]!==r||e[78]!==c||e[79]!==se||e[80]!==o?(pe=r==="dashboards"?n.jsx(Al,{}):r==="logs"?n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[n.jsx(tn,{displayDateRange:s,connectionIds:i,logs:ee,total:se}),n.jsx(un,{value:u,onChange:re=>b({search:re}),placeholder:"Search by tool name, connection, or error...",className:"border-t",onKeyDown:re=>{re.key==="Escape"&&(b({search:""}),re.target.blur())}}),n.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:n.jsx(rn,{connectionIds:i,virtualMcpIds:o,tool:c,status:l,search:u,logs:ee,hasMore:G??!1,onLoadMore:we,isLoadingMore:Q,connections:N,virtualMcps:P,membersData:w})})]}):n.jsx(nc,{}),e[65]=N,e[66]=ee,e[67]=P,e[68]=i,e[69]=s,e[70]=we,e[71]=G,e[72]=Q,e[73]=w,e[74]=b,e[75]=u,e[76]=l,e[77]=r,e[78]=c,e[79]=se,e[80]=o,e[81]=pe):pe=e[81];let Xe;return e[82]!==W||e[83]!==te||e[84]!==pe?(Xe=n.jsxs(n.Fragment,{children:[W,te,pe]}),e[82]=W,e[83]=te,e[84]=pe,e[85]=Xe):Xe=e[85],Xe}function pc(t){return t?.logs??[]}function hc(t){return{value:t.id??"",label:t.title??"Decopilot"}}function vc(t){return{value:t.id,label:t.title||t.id}}function wu(){const t=U.c(68),{org:e}=Me(),r=Ze();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/$project/monitoring"},t[0]=a):a=t[0];const s=cn(a),{tab:i,from:o,to:c,connectionId:l,virtualMcpId:u,tool:d,search:p,status:m,streaming:y,propertyFilters:g,hideSystem:x}=s,b=i===void 0?"logs":i;let v;t[1]!==l?(v=l===void 0?[]:l,t[1]=l,t[2]=v):v=t[2];const h=v;let j;t[3]!==u?(j=u===void 0?[]:u,t[3]=u,t[4]=j):j=t[4];const N=j,P=y===void 0?!0:y,w=g===void 0?"":g,S=x===void 0?!1:x;let O,I,E,D,T,C,k;if(t[5]!==h.length||t[6]!==o||t[7]!==S||t[8]!==r||t[9]!==e.slug||t[10]!==w||t[11]!==s||t[12]!==m||t[13]!==P||t[14]!==c||t[15]!==d||t[16]!==N.length){T=gn(w);let F;t[24]!==r||t[25]!==e.slug||t[26]!==s?(F=X=>{r({to:"/$org/$project/monitoring",params:{org:e.slug,project:Re},search:{...s,...X}})},t[24]=r,t[25]=e.slug,t[26]=s,t[27]=F):F=t[27],k=F;let Z;t[28]!==k?(Z=X=>{k({from:X.from,to:X.to})},t[28]=k,t[29]=Z):Z=t[29],D=Z;let Y,G;if(t[30]!==o||t[31]!==P||t[32]!==c){const X=Qt(o),ee=Qt(c);G=X.date||new Date(Date.now()-864e5);const se=ee.date||new Date;E={startDate:G,endDate:se},Y=se,P&&c==="now"&&(Y=new Date(se),Y.setHours(Y.getHours()+1)),t[30]=o,t[31]=P,t[32]=c,t[33]=E,t[34]=Y,t[35]=G}else E=t[33],Y=t[34],G=t[35];let Q;t[36]!==Y||t[37]!==G?(Q={startDate:G,endDate:Y},t[36]=Y,t[37]=G,t[38]=Q):Q=t[38],I=Q,O=0,h.length>0&&O++,N.length>0&&O++,d&&O++,m!=="all"&&O++,S&&O++,C=T.filter(gc),t[5]=h.length,t[6]=o,t[7]=S,t[8]=r,t[9]=e.slug,t[10]=w,t[11]=s,t[12]=m,t[13]=P,t[14]=c,t[15]=d,t[16]=N.length,t[17]=O,t[18]=I,t[19]=E,t[20]=D,t[21]=T,t[22]=C,t[23]=k}else O=t[17],I=t[18],E=t[19],D=t[20],T=t[21],C=t[22],k=t[23];const M=C;M.length>0&&(O=O+M.length);let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ge.Header,{children:n.jsx(ge.Header.Left,{children:n.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[39]=_):_=t[39];let L;t[40]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-[0.5px] bg-border shrink-0 border-b",children:n.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load monitoring data"})}),t[40]=L):L=t[40];let z;t[41]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(n.Fragment,{children:[_,n.jsx(ge.Content,{children:n.jsxs("div",{className:"flex flex-col overflow-auto md:overflow-hidden h-full",children:[L,n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Kt,{title:"Failed to load logs",description:"There was an error loading the monitoring data. Please try again."})})]})})]}),t[41]=z):z=t[41];let $;t[42]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ge.Header,{children:n.jsx(ge.Header.Left,{children:n.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[42]=$):$=t[42];let K;t[43]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsxs(n.Fragment,{children:[$,n.jsx(ge.Content,{children:n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[n.jsx(tn.Skeleton,{}),n.jsx(rn.Skeleton,{})]})})]}),t[43]=K):K=t[43];let B;t[44]!==P||t[45]!==k?(B=()=>k({streaming:!P}),t[44]=P,t[45]=k,t[46]=B):B=t[46];let A;t[47]!==k?(A=F=>k({tab:F}),t[47]=k,t[48]=A):A=t[48];let R;return t[49]!==O||t[50]!==h||t[51]!==I||t[52]!==E||t[53]!==o||t[54]!==D||t[55]!==S||t[56]!==T||t[57]!==p||t[58]!==m||t[59]!==P||t[60]!==B||t[61]!==A||t[62]!==b||t[63]!==c||t[64]!==d||t[65]!==k||t[66]!==N?(R=n.jsx(ge,{children:n.jsx(qe,{fallback:z,children:n.jsx(f.Suspense,{fallback:K,children:n.jsx(fc,{tab:b,dateRange:I,displayDateRange:E,connectionIds:h,virtualMcpIds:N,tool:d,status:m,search:p,streaming:P,hideSystem:S,activeFiltersCount:O,from:o,to:c,propertyFilters:T,onUpdateFilters:k,onTimeRangeChange:D,onStreamingToggle:B,onTabChange:A})})})}),t[49]=O,t[50]=h,t[51]=I,t[52]=E,t[53]=o,t[54]=D,t[55]=S,t[56]=T,t[57]=p,t[58]=m,t[59]=P,t[60]=B,t[61]=A,t[62]=b,t[63]=c,t[64]=d,t[65]=k,t[66]=N,t[67]=R):R=t[67],R}function gc(t){return t.key.trim()}export{wu as default};
31
+ debug?`,value:h,onChange:C=>j(C.target.value),onBlur:D,onKeyDown:C=>{C.key==="Enter"&&C.metaKey&&D()},className:"font-mono text-sm min-h-[80px] resize-none"}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",n.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):n.jsxs("div",{className:"space-y-3",children:[b.map((C,k)=>n.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",k+1]}),n.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>I(k),children:n.jsx(Oa,{size:12})})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(St,{placeholder:"Key (e.g., thread_id)",value:C.key,onChange:M=>S(k,{key:M.target.value}),onBlur:E,onKeyDown:M=>{M.key==="Enter"&&E()},className:"flex-1 font-mono text-sm"}),n.jsxs(lr,{value:C.operator,onValueChange:M=>{const _=[...b],L=_[k];L&&(_[k]={...L,operator:M,value:M==="exists"?"":L.value},v(_),u({propertyFilters:Le(_)}))},children:[n.jsx(cr,{className:"w-28",children:n.jsx(ur,{})}),n.jsx(dr,{children:ic.map(M=>n.jsx(et,{value:M.value,children:M.label},M.value))})]})]}),C.operator!=="exists"&&n.jsx(St,{placeholder:"Value",value:C.value,onChange:M=>S(k,{value:M.target.value}),onBlur:E,onKeyDown:M=>{M.key==="Enter"&&E()},className:"w-full font-mono text-sm"})]},k)),n.jsxs(be,{variant:"outline",size:"sm",className:"w-full",onClick:O,children:[n.jsx(Pa,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),l>0&&n.jsx(be,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{x(""),v([]),j(""),u({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function lc(t){const e=U.c(17),{connectionIds:r,virtualMcpIds:a,tool:s,status:i,search:o,logs:c,hasMore:l,onLoadMore:u,isLoadingMore:d,connections:p,virtualMcps:m,membersData:y}=t,g=p??[],x=m??[];let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[v,h]=f.useState(b),j=El(u,l,d),N=y?.data?.members??[],P=new Map(N.map(dc)),w=new Map(x.map(uc));let O=c.map(A=>{const R=P.get(A.userId??""),F=A.virtualMcpId?w.get(A.virtualMcpId):null;return{...A,userName:R?.name??A.userId??"Unknown",userImage:R?.image,virtualMcpName:F?.title??null}});if(r.length>1){let A;e[1]!==r?(A=R=>r.includes(R.connectionId),e[1]=r,e[2]=A):A=e[2],O=O.filter(A)}if(a.length>1){let A;e[3]!==a?(A=R=>R.virtualMcpId&&a.includes(R.virtualMcpId),e[3]=a,e[4]=A):A=e[4],O=O.filter(A)}if(o){const A=o.toLowerCase();O=O.filter(R=>R.toolName.toLowerCase().includes(A)||R.connectionTitle.toLowerCase().includes(A)||R.errorMessage?.toLowerCase().includes(A))}let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=A=>{h(R=>{const F=new Set(R);return F.has(A.id)?F.delete(A.id):F.add(A.id),F})},e[5]=I):I=e[5];const E=I,D=new Map(g.map(cc));if(O.length===0){let A;e[6]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[6]=A):A=e[6];const R=o||r.length>0||a.length>0||s||i!=="all"?"No logs match your filters":"No logs found in this time range";let F;return e[7]!==R?(F=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Kt,{image:A,title:"No logs found",description:R})}),e[7]=R,e[8]=F):F=e[8],F}const T="flex-1 flex flex-col overflow-hidden",C="flex-1 overflow-auto",k="min-w-[600px] md:min-w-0 bg-background",M=Nn,_="w-full border-collapse";let L;e[9]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Pn,{className:"border-b-0 z-20",children:n.jsxs(Mt,{className:"h-9 hover:bg-transparent border-b border-border",children:[n.jsx(ye,{className:"w-10 md:w-12 px-2 md:px-4"}),n.jsx(ye,{className:"w-5"}),n.jsx(ye,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),n.jsx(ye,{className:"w-24 md:w-32 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),n.jsx(ye,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User Name"}),n.jsx(ye,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),n.jsx(ye,{className:"w-20 md:w-28 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Time"}),n.jsx(ye,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Latency"}),n.jsx(ye,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[9]=L):L=e[9];const z=wn,$=O.map((A,R)=>n.jsx(pl,{log:A,isExpanded:v.has(A.id),connection:D.get(A.connectionId),virtualMcpName:A.virtualMcpName??"",onToggle:()=>E(A),lastLogRef:R===O.length-1?j:void 0},A.id));let K;e[10]!==z||e[11]!==$?(K=n.jsx(z,{children:$}),e[10]=z,e[11]=$,e[12]=K):K=e[12];let B;return e[13]!==M||e[14]!==L||e[15]!==K?(B=n.jsx("div",{className:T,children:n.jsx("div",{className:C,children:n.jsx("div",{className:k,children:n.jsxs(M,{className:_,children:[L,K]})})})}),e[13]=M,e[14]=L,e[15]=K,e[16]=B):B=e[16],B}function cc(t){return[t.id,t]}function uc(t){return[t.id,t]}function dc(t){return[t.userId,t.user]}function mc(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx("div",{className:"text-muted-foreground",children:"Loading logs..."})}),t[0]=e):e=t[0],e}const rn=Object.assign(lc,{Skeleton:mc});function fc(t){const e=U.c(86),{tab:r,dateRange:a,displayDateRange:s,connectionIds:i,virtualMcpIds:o,tool:c,status:l,search:u,streaming:d,hideSystem:p,activeFiltersCount:m,from:y,to:g,propertyFilters:x,onUpdateFilters:b,onTimeRangeChange:v,onStreamingToggle:h,onTabChange:j}=t,N=Ht(),P=Sa(),{data:w}=xs();let S;e[0]!==N?(S=N??[],e[0]=N,e[1]=S):S=e[1];let O;e[2]!==S?(O=S.map(vc),e[2]=S,e[3]=O):O=e[3];const I=O;let E;e[4]!==P?(E=P.map(hc),e[4]=P,e[5]=E):E=e[5];const D=E,{pageSize:T,streamingRefetchInterval:C}=yn,{org:k,locator:M}=Me();let _;e[6]!==k.id?(_={connectionId:Vt,orgId:k.id},e[6]=k.id,e[7]=_):_=e[7];const L=qt(_);let z,$,K;if(e[8]!==i[0]||e[9]!==i.length||e[10]!==a.endDate||e[11]!==a.startDate||e[12]!==p||e[13]!==M||e[14]!==k.id||e[15]!==x||e[16]!==l||e[17]!==c||e[18]!==o[0]||e[19]!==o.length){const re=xn(x),_e=p?[Jn.SELF(k.id)]:void 0;z={startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:i.length===1?i[0]:void 0,excludeConnectionIds:_e,virtualMcpId:o.length===1?o[0]:void 0,toolName:c||void 0,isError:l==="errors"?!0:l==="success"?!1:void 0,...re},K=ys,$=at.monitoringLogsInfinite(M,JSON.stringify(z)),e[8]=i[0],e[9]=i.length,e[10]=a.endDate,e[11]=a.startDate,e[12]=p,e[13]=M,e[14]=k.id,e[15]=x,e[16]=l,e[17]=c,e[18]=o[0],e[19]=o.length,e[20]=z,e[21]=$,e[22]=K}else z=e[20],$=e[21],K=e[22];let B;e[23]!==z||e[24]!==L?(B=async re=>{const{pageParam:_e}=re,an=_e===void 0?0:_e;if(!L)throw new Error("MCP client is not available");const Xt=await L.callTool({name:"MONITORING_LOGS_LIST",arguments:{...z,limit:T,offset:an}});return Xt.structuredContent??Xt},e[23]=z,e[24]=L,e[25]=B):B=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=(re,_e)=>{if(!((re?.logs?.length??0)<T))return _e.length*T},e[26]=A):A=e[26];const R=d?C:!1;let F;e[27]!==$||e[28]!==B||e[29]!==R?(F={queryKey:$,queryFn:B,initialPageParam:0,getNextPageParam:A,staleTime:0,refetchInterval:R},e[27]=$,e[28]=B,e[29]=R,e[30]=F):F=e[30];const{data:Z,fetchNextPage:Y,hasNextPage:G,isFetchingNextPage:Q}=K(F);let X;e[31]!==Z?.pages?(X=Z?.pages.flatMap(pc)??[],e[31]=Z?.pages,e[32]=X):X=e[32];const ee=X,se=Z?.pages[0]?.total;let ie;e[33]!==Y||e[34]!==G||e[35]!==Q?(ie=()=>{G&&!Q&&Y()},e[33]=Y,e[34]=G,e[35]=Q,e[36]=ie):ie=e[36];const we=ie;let oe;e[37]===Symbol.for("react.memo_cache_sentinel")?(oe={id:"logs",label:"Logs"},e[37]=oe):oe=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le={id:"analytics",label:"Analytics"},e[38]=le):le=e[38];let ce;e[39]===Symbol.for("react.memo_cache_sentinel")?(ce=[oe,le,{id:"dashboards",label:"Dashboards"}],e[39]=ce):ce=e[39];const Ne=ce;let ue;e[40]===Symbol.for("react.memo_cache_sentinel")?(ue=n.jsx(ge.Header.Left,{children:n.jsx(dn,{children:n.jsx(mn,{children:n.jsx(fn,{children:n.jsx(pn,{children:"Monitoring"})})})})}),e[40]=ue):ue=e[40];let de;e[41]!==m||e[42]!==i||e[43]!==I||e[44]!==y||e[45]!==p||e[46]!==d||e[47]!==h||e[48]!==v||e[49]!==b||e[50]!==x||e[51]!==l||e[52]!==r||e[53]!==g||e[54]!==c||e[55]!==o||e[56]!==D?(de=r==="logs"&&n.jsx(ge.Header.Right,{children:n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(oc,{connectionIds:i,virtualMcpIds:o,tool:c,status:l,hideSystem:p,propertyFilters:x,connectionOptions:I,virtualMcpOptions:D,activeFiltersCount:m,onUpdateFilters:b}),n.jsxs(be,{variant:d?"secondary":"outline",size:"sm",className:Se("h-7 px-2 sm:px-3 gap-1.5",d&&"bg-muted hover:bg-muted/80"),onClick:h,children:[d?n.jsx(Aa,{size:16,className:"animate-pulse"}):n.jsx(Ea,{size:16}),n.jsx("span",{className:"hidden sm:inline",children:d?"Streaming":"Stream"})]}),n.jsx(bn,{value:{from:y,to:g},onChange:v})]})}),e[41]=m,e[42]=i,e[43]=I,e[44]=y,e[45]=p,e[46]=d,e[47]=h,e[48]=v,e[49]=b,e[50]=x,e[51]=l,e[52]=r,e[53]=g,e[54]=c,e[55]=o,e[56]=D,e[57]=de):de=e[57];let W;e[58]!==de?(W=n.jsxs(ge.Header,{children:[ue,de]}),e[58]=de,e[59]=W):W=e[59];let q;e[60]!==j?(q=re=>j(re),e[60]=j,e[61]=q):q=e[61];let te;e[62]!==q||e[63]!==r?(te=n.jsx("div",{className:"px-5 py-3 border-b border-border",children:n.jsx(Is,{tabs:Ne,activeTab:r,onTabChange:q})}),e[62]=q,e[63]=r,e[64]=te):te=e[64];let pe;e[65]!==N||e[66]!==ee||e[67]!==P||e[68]!==i||e[69]!==s||e[70]!==we||e[71]!==G||e[72]!==Q||e[73]!==w||e[74]!==b||e[75]!==u||e[76]!==l||e[77]!==r||e[78]!==c||e[79]!==se||e[80]!==o?(pe=r==="dashboards"?n.jsx(Al,{}):r==="logs"?n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[n.jsx(tn,{displayDateRange:s,connectionIds:i,logs:ee,total:se}),n.jsx(un,{value:u,onChange:re=>b({search:re}),placeholder:"Search by tool name, connection, or error...",className:"border-t",onKeyDown:re=>{re.key==="Escape"&&(b({search:""}),re.target.blur())}}),n.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:n.jsx(rn,{connectionIds:i,virtualMcpIds:o,tool:c,status:l,search:u,logs:ee,hasMore:G??!1,onLoadMore:we,isLoadingMore:Q,connections:N,virtualMcps:P,membersData:w})})]}):n.jsx(nc,{}),e[65]=N,e[66]=ee,e[67]=P,e[68]=i,e[69]=s,e[70]=we,e[71]=G,e[72]=Q,e[73]=w,e[74]=b,e[75]=u,e[76]=l,e[77]=r,e[78]=c,e[79]=se,e[80]=o,e[81]=pe):pe=e[81];let Xe;return e[82]!==W||e[83]!==te||e[84]!==pe?(Xe=n.jsxs(n.Fragment,{children:[W,te,pe]}),e[82]=W,e[83]=te,e[84]=pe,e[85]=Xe):Xe=e[85],Xe}function pc(t){return t?.logs??[]}function hc(t){return{value:t.id??"",label:t.title??"Decopilot"}}function vc(t){return{value:t.id,label:t.title||t.id}}function Nu(){const t=U.c(68),{org:e}=Me(),r=Ze();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/$project/monitoring"},t[0]=a):a=t[0];const s=cn(a),{tab:i,from:o,to:c,connectionId:l,virtualMcpId:u,tool:d,search:p,status:m,streaming:y,propertyFilters:g,hideSystem:x}=s,b=i===void 0?"logs":i;let v;t[1]!==l?(v=l===void 0?[]:l,t[1]=l,t[2]=v):v=t[2];const h=v;let j;t[3]!==u?(j=u===void 0?[]:u,t[3]=u,t[4]=j):j=t[4];const N=j,P=y===void 0?!0:y,w=g===void 0?"":g,S=x===void 0?!1:x;let O,I,E,D,T,C,k;if(t[5]!==h.length||t[6]!==o||t[7]!==S||t[8]!==r||t[9]!==e.slug||t[10]!==w||t[11]!==s||t[12]!==m||t[13]!==P||t[14]!==c||t[15]!==d||t[16]!==N.length){T=gn(w);let F;t[24]!==r||t[25]!==e.slug||t[26]!==s?(F=X=>{r({to:"/$org/$project/monitoring",params:{org:e.slug,project:Re},search:{...s,...X}})},t[24]=r,t[25]=e.slug,t[26]=s,t[27]=F):F=t[27],k=F;let Z;t[28]!==k?(Z=X=>{k({from:X.from,to:X.to})},t[28]=k,t[29]=Z):Z=t[29],D=Z;let Y,G;if(t[30]!==o||t[31]!==P||t[32]!==c){const X=Qt(o),ee=Qt(c);G=X.date||new Date(Date.now()-864e5);const se=ee.date||new Date;E={startDate:G,endDate:se},Y=se,P&&c==="now"&&(Y=new Date(se),Y.setHours(Y.getHours()+1)),t[30]=o,t[31]=P,t[32]=c,t[33]=E,t[34]=Y,t[35]=G}else E=t[33],Y=t[34],G=t[35];let Q;t[36]!==Y||t[37]!==G?(Q={startDate:G,endDate:Y},t[36]=Y,t[37]=G,t[38]=Q):Q=t[38],I=Q,O=0,h.length>0&&O++,N.length>0&&O++,d&&O++,m!=="all"&&O++,S&&O++,C=T.filter(gc),t[5]=h.length,t[6]=o,t[7]=S,t[8]=r,t[9]=e.slug,t[10]=w,t[11]=s,t[12]=m,t[13]=P,t[14]=c,t[15]=d,t[16]=N.length,t[17]=O,t[18]=I,t[19]=E,t[20]=D,t[21]=T,t[22]=C,t[23]=k}else O=t[17],I=t[18],E=t[19],D=t[20],T=t[21],C=t[22],k=t[23];const M=C;M.length>0&&(O=O+M.length);let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ge.Header,{children:n.jsx(ge.Header.Left,{children:n.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[39]=_):_=t[39];let L;t[40]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-[0.5px] bg-border shrink-0 border-b",children:n.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load monitoring data"})}),t[40]=L):L=t[40];let z;t[41]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(n.Fragment,{children:[_,n.jsx(ge.Content,{children:n.jsxs("div",{className:"flex flex-col overflow-auto md:overflow-hidden h-full",children:[L,n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Kt,{title:"Failed to load logs",description:"There was an error loading the monitoring data. Please try again."})})]})})]}),t[41]=z):z=t[41];let $;t[42]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ge.Header,{children:n.jsx(ge.Header.Left,{children:n.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[42]=$):$=t[42];let K;t[43]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsxs(n.Fragment,{children:[$,n.jsx(ge.Content,{children:n.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[n.jsx(tn.Skeleton,{}),n.jsx(rn.Skeleton,{})]})})]}),t[43]=K):K=t[43];let B;t[44]!==P||t[45]!==k?(B=()=>k({streaming:!P}),t[44]=P,t[45]=k,t[46]=B):B=t[46];let A;t[47]!==k?(A=F=>k({tab:F}),t[47]=k,t[48]=A):A=t[48];let R;return t[49]!==O||t[50]!==h||t[51]!==I||t[52]!==E||t[53]!==o||t[54]!==D||t[55]!==S||t[56]!==T||t[57]!==p||t[58]!==m||t[59]!==P||t[60]!==B||t[61]!==A||t[62]!==b||t[63]!==c||t[64]!==d||t[65]!==k||t[66]!==N?(R=n.jsx(ge,{children:n.jsx(qe,{fallback:z,children:n.jsx(f.Suspense,{fallback:K,children:n.jsx(fc,{tab:b,dateRange:I,displayDateRange:E,connectionIds:h,virtualMcpIds:N,tool:d,status:m,search:p,streaming:P,hideSystem:S,activeFiltersCount:O,from:o,to:c,propertyFilters:T,onUpdateFilters:k,onTimeRangeChange:D,onStreamingToggle:B,onTabChange:A})})})}),t[49]=O,t[50]=h,t[51]=I,t[52]=E,t[53]=o,t[54]=D,t[55]=S,t[56]=T,t[57]=p,t[58]=m,t[59]=P,t[60]=B,t[61]=A,t[62]=b,t[63]=c,t[64]=d,t[65]=k,t[66]=N,t[67]=R):R=t[67],R}function gc(t){return t.key.trim()}export{Nu as default};
@@ -1 +1 @@
1
- import{r as i,j as e}from"./index-D9HmjKFM.js";import{i as n}from"./Loading01-KCITfr7g.js";import{h as l}from"./mcp-oauth-B9YTiwC5.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
1
+ import{r as i,j as e}from"./index-DwBgLSti.js";import{i as n}from"./Loading01-BHMOj-H5.js";import{h as l}from"./mcp-oauth-Bb9gvF4o.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r as b,c as y,j as s,u as ne,d as ae,t as Y}from"./index-D9HmjKFM.js";import{V as ce,C as j}from"./index-DX0MTN78.js";import{T as me,i as de,a as fe,t as pe}from"./typewriter-title-4u2iTKVw.js";import{E as ue}from"./error-boundary-CEwcdDux.js";import{u as ee,b as he}from"./context-L0w3Lka_.js";import{I as te}from"./integration-icon-cQ6g2UTs.js";import{P as xe,a as je,b as ge}from"./popover-eropQyy1.js";import{S as X}from"./skeleton-DvxloPhR.js";import{c as se,B as H}from"./button-BCe1bdkY.js";import{i as be,d as ye}from"./constants-BHgsXonC.js";import{b as Ne}from"./use-virtual-mcp-CtYFVzEt.js";import{i as _e}from"./ChevronRight-C9tH4CkK.js";import{t as ie}from"./Users03-CgNWgARv.js";import{P as A}from"./index-DT392Y-e.js";import{a as U,b as J,T as Q}from"./tooltip-D4-guuax.js";import{c as Se}from"./Pin01-u382yYSC.js";import{s as ve}from"./Plus-BNEEXEVt.js";import"./spinner-BXzzaGxp.js";import"./use-mcp-prompts-BFC1Reld.js";import"./useQuery-DGMDf2So.js";import"./dialog-CtlwZ0jC.js";import"./form-CKVYRQ0T.js";import"./label-BMznY53d.js";import"./input-Dh6_kcmG.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-C9QbeSMz.js";import"./ChevronDown-xG1flmUs.js";import"./Edit01-Bc5S6NRh.js";import"./XCircle-I5P8gQFi.js";import"./AlertCircle-e9vRKWVt.js";import"./AlertTriangle-cnBbzVPi.js";import"./use-deco-chat-open-hbEpr7iz.js";import"./localstorage-keys-CiUgmUPA.js";import"./useMutation-4bsh-QBF.js";import"./ArrowLeft-TcoC4WAS.js";import"./use-copy-8HhO39al.js";import"./badge-CmYXzetd.js";import"./Check-EA1ayL22.js";import"./Code01-ADQg-6t7.js";import"./SearchMd-DqymgKbi.js";import"./use-create-virtual-mcp-DwsRmfVV.js";import"./deco-constants-0EY--BSu.js";import"./marked.esm-BaswSlok.js";import"./markdown-U-heFZhR.js";import"./Copy01-Dv-qbf9Z.js";import"./tools-list-4-0RjQZk.js";import"./collection-table-wrapper-CXjGnlMm.js";import"./dropdown-menu-DrduhkS0.js";import"./Grid01-D2I-nDSy.js";import"./List-DGxlSM0E.js";import"./table-8mfsydT_.js";import"./empty-state-Cme5CLy_.js";import"./Loading01-KCITfr7g.js";import"./card-CPMQS2Ob.js";import"./Eye-C8kM8O8_.js";import"./Globe02-CT2c-Sr-.js";import"./RefreshCw01-k0GFakzy.js";import"./layout-Czw_4tYq.js";import"./use-connection-DdTk8NLZ.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BcphCi5B.js";import"./Trash01-Ve8IhEa-.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-DUUdSPtc.js";import"./use-binding-Df-bJ2So.js";import"./binder-DYyCY7OY.js";import"./select-CTboIb4n.js";import"./File06-DiS1m4o9.js";import"./Image01-DNFNbFFa.js";import"./RefreshCcw01-BpGtyqTA.js";import"./Settings01-DB_FXn41.js";import"./useSuspenseInfiniteQuery-DX7McnGC.js";import"./infiniteQueryObserver-D6Tb66x3.js";import"./Container-CxXUVDpa.js";import"./use-mobile-DjLsite2.js";const re=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));re.displayName="Share07";function Ce(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=ee();let l;t[0]!==i.id||t[1]!==u?(l=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=l):l=t[2];const r=l;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ie,{size:20}),t[4]=o):o=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let n;t[8]!==i.title?(n=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=n):n=t[9];let a;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==n?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,n]}),t[10]=r,t[11]=d,t[12]=c,t[13]=n,t[14]=a):a=t[14],a}function we(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:l}=e,[r,m]=b.useState(!1),d=b.useRef(null);let o,c;t[0]!==r?(o=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=o,t[2]=c):(o=t[1],c=t[2]),b.useEffect(o,c);let n;t[3]!==l?(n=N=>{l(N),m(!1)},t[3]=l,t[4]=n):n=t[4];const a=n;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(_e,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==a||t[8]!==u||t[9]!==i?(h=s.jsx(je,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ce,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=u,t[9]=i,t[10]=h):h=t[10];let g;return t[11]!==r||t[12]!==h?(g=s.jsxs(ge,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=g):g=t[13],g}function ke(){const e=y.c(20),t=Ne(),{selectedVirtualMcp:i,setVirtualMcpId:u}=ee();let l,r,m,d,o,c;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(Me).slice(0,6);if(h.length===0){o=null;break e}c=t.map(Te),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],l="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(ze)}e[0]=t,e[1]=l,e[2]=r,e[3]=m,e[4]=d,e[5]=o,e[6]=c}else l=e[1],r=e[2],m=e[3],d=e[4],o=e[5],c=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const n=i?.id??null;let a;e[8]!==u||e[9]!==n||e[10]!==c?(a=s.jsx(we,{virtualMcps:c,selectedVirtualMcpId:n,onVirtualMcpChange:u}),e[8]=u,e[9]=n,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==l||e[13]!==r||e[14]!==a?(f=s.jsxs("div",{className:l,children:[r,a]}),e[12]=l,e[13]=r,e[14]=a,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function ze(e){return s.jsx(Ce,{agent:e},e.id??"default")}function Te(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function Me(e){return e.id!==null&&!be(e.id)}function Ie(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(X,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Pe)})]}),e[1]=i):i=e[1],i}function Pe(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(X,{className:"size-6 rounded-md shrink-0"}),s.jsx(X,{className:"h-4 w-full"})]},t)}function $e(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(Ie,{}),children:s.jsx(ke,{})}),e[0]=t):t=e[0],t}function Ee(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Ve(){const e=y.c(61),{org:t}=ne(),{data:i}=ae.useSession(),{modelsConnections:u,isChatEmpty:l,activeThreadId:r,createThread:m,switchToThread:d,threads:o,selectedVirtualMcp:c}=he();let n;if(e[0]!==r||e[1]!==o){let x;e[3]!==r?(x=oe=>oe.id===r,e[3]=r,e[4]=x):x=e[4],n=o.find(x),e[0]=r,e[1]=o,e[2]=n}else n=e[2];const a=n,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const g=h;let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=Ee(),e[7]=N):N=e[7];const le=N;let L;e[8]!==t.id?(L=ye(t.id),e[8]=t.id,e[9]=L):L=e[9];const R=c??L;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(j.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let _;e[12]!==a?(_=a?.title&&s.jsx(me,{text:a.title,className:"text-sm font-medium text-foreground"}),e[12]=a,e[13]=_):_=e[13];let S;e[14]!==_?(S=s.jsx(A.Header.Left,{className:"gap-2",children:_}),e[14]=_,e[15]=S):S=e[15];let v;e[16]!==m?(v=()=>m(),e[16]=m,e[17]=v):v=e[17];let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:16}),e[18]=B):B=e[18];let C;e[19]!==l||e[20]!==v?(C=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:l,"aria-label":"New chat",children:B})}),e[19]=l,e[20]=v,e[21]=C):C=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(J,{children:"New chat"}),e[22]=O):O=e[22];let w;e[23]!==C?(w=s.jsxs(Q,{children:[C,O]}),e[23]=C,e[24]=w):w=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=()=>p(!0),e[25]=D):D=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs(Q,{children:[s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:D,"aria-label":"Chat history",children:s.jsx(de,{size:16})})}),s.jsx(J,{children:"Chat history"})]}),e[26]=F):F=e[26];let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Se,{size:16}),e[27]=W):W=e[27];let k;e[28]!==l?(k=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:He,disabled:l,"aria-label":"Pin chat",children:W})}),e[28]=l,e[29]=k):k=e[29];let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(J,{children:"Pin chat"}),e[30]=Z):Z=e[30];let z;e[31]!==k?(z=s.jsxs(Q,{children:[k,Z]}),e[31]=k,e[32]=z):z=e[32];let q;e[33]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(re,{size:16}),e[33]=q):q=e[33];let T;e[34]!==l?(T=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:l,"aria-label":"Share chat",children:q})}),e[34]=l,e[35]=T):T=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(J,{children:"Share chat"}),e[36]=G):G=e[36];let M;e[37]!==T?(M=s.jsxs(Q,{children:[T,G]}),e[37]=T,e[38]=M):M=e[38];let I;e[39]!==w||e[40]!==z||e[41]!==M?(I=s.jsxs(A.Header.Right,{className:"gap-1",children:[w,F,z,M]}),e[39]=w,e[40]=z,e[41]=M,e[42]=I):I=e[42];let P;e[43]!==I||e[44]!==S?(P=s.jsxs(A.Header,{className:"flex-none z-10 bg-background",children:[S,I]}),e[43]=I,e[44]=S,e[45]=P):P=e[45];let $;e[46]!==R||e[47]!==l||e[48]!==g?($=l?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(te,{icon:R.icon,name:R.title,size:"md",fallbackIcon:s.jsx(ie,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[le," ",g,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(j.Input,{})}),s.jsx(j.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx($e,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(j.Main,{children:s.jsx(j.Messages,{})}),s.jsx(j.Footer,{children:s.jsx(j.Input,{})})]}),e[46]=R,e[47]=l,e[48]=g,e[49]=$):$=e[49];let E;e[50]!==d?(E=async x=>{await d(x),p(!1)},e[50]=d,e[51]=E):E=e[51];let V;e[52]!==r||e[53]!==f||e[54]!==E||e[55]!==o?(V=s.jsx(fe,{open:f,onOpenChange:p,threads:o,activeThreadId:r,onThreadSelect:E}),e[52]=r,e[53]=f,e[54]=E,e[55]=o,e[56]=V):V=e[56];let K;return e[57]!==P||e[58]!==$||e[59]!==V?(K=s.jsxs(j,{children:[P,$,V]}),e[57]=P,e[58]=$,e[59]=V,e[60]=K):K=e[60],K}function Ae(){Y.info("Share feature coming soon")}function He(){Y.info("Pin feature coming soon")}function Le(e){const t=y.c(14),{error:i,onRetry:u}=e,l=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(A.Header,{className:"flex-none",children:[s.jsx(A.Header.Left,{className:"gap-2"}),s.jsx(A.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(pe,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=l?"Unable to load models":"Something went wrong";let o;t[2]!==d?(o=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=o):o=t[3];const c=l?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let n;t[4]!==c?(n=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=n):n=t[5];let a;t[6]!==o||t[7]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[o,n]}),t[6]=o,t[7]=n,t[8]=a):a=t[8];let f;t[9]!==u?(f=s.jsx(H,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==f?(p=s.jsxs(j,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,f]})})]}),t[11]=a,t[12]=f,t[13]=p):p=t[13],p}function as(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(b.Suspense,{fallback:s.jsx(j.Skeleton,{}),children:s.jsx(Ve,{})})}),e[0]=t):t=e[0],t}function Re(e){const{error:t,resetError:i}=e;return s.jsx(Le,{error:t,onRetry:i})}export{as as default};
1
+ import{r as b,c as y,j as s,u as oe,d as ae,t as Y}from"./index-DwBgLSti.js";import{V as ce,C as j}from"./index-QQ-XmLlG.js";import{T as me,i as de,a as fe,t as pe}from"./typewriter-title-DqLjhGgL.js";import{E as ue}from"./error-boundary-lFjWy2-n.js";import{u as ee,b as he}from"./context-DHicyHl4.js";import{I as te}from"./integration-icon-qV_BsBQR.js";import{P as xe,a as je,b as ge}from"./popover-pjzQQlLd.js";import{S as X}from"./skeleton-DNLZ4Kho.js";import{c as se,B as H}from"./button-D6YZfFzy.js";import{i as be,d as ye}from"./constants-8URKDp4Y.js";import{b as Ne}from"./use-virtual-mcp-DBzFAk7J.js";import{i as _e}from"./ChevronRight-DgAfR8pA.js";import{t as ie}from"./Users03-C1B58zTV.js";import{P as A}from"./index-B_nMIrSY.js";import{a as U,b as J,T as Q}from"./tooltip-D71dCz4E.js";import{c as Se}from"./Pin01-8MTlfWD2.js";import{s as ve}from"./Plus-DNqvDLOK.js";import"./spinner-DZtD-MX0.js";import"./use-mcp-prompts-qD8uHlkj.js";import"./useQuery-CPsXfVfR.js";import"./dialog-DSPMVHyJ.js";import"./form-BMtUcs2k.js";import"./label-29qY4FPs.js";import"./input-B7id4I1j.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-G8RCE5_O.js";import"./ChevronDown-CggIFEVQ.js";import"./Edit01-DRruZKzG.js";import"./XCircle-DneNZUk0.js";import"./AlertCircle-BzYW4X7z.js";import"./AlertTriangle-DniGvpwb.js";import"./use-deco-chat-open-CxG3qwlT.js";import"./localstorage-keys-Ct4C992S.js";import"./useMutation-DgG1LVg-.js";import"./ArrowLeft-dS1h2Fqu.js";import"./use-copy-DsHlaDHD.js";import"./badge-Do8iK9u9.js";import"./Check-Bv0pZ3gl.js";import"./Code01-DP2jwP0n.js";import"./SearchMd-BLcaRHQs.js";import"./use-create-virtual-mcp-BzTARjrD.js";import"./deco-constants-CyaJG-D1.js";import"./Copy01-Dq7Edhtu.js";import"./marked.esm-BaswSlok.js";import"./markdown-jp5pFlBz.js";import"./Eye-B9ZDOUkE.js";import"./Globe02-BPmEw10H.js";import"./XClose-Dgr_gyyv.js";import"./select-CkeKfTEx.js";import"./empty-state-sMx3NP6e.js";import"./use-connection-BEGrPCmR.js";import"./generate-id-Dyweu44Y.js";import"./Clock-IA7N95Qq.js";import"./Trash01-CkTOgej8.js";import"./collection-search-CBYSITVU.js";import"./Loading01-BHMOj-H5.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-BbYG_RIr.js";import"./use-binding-DbH4Xe03.js";import"./binder-BBB8LQyx.js";import"./File06-2US99J_V.js";import"./Grid01-CJW4ZLO5.js";import"./Image01-C9h8llDV.js";import"./RefreshCcw01-4dzpBOob.js";import"./Settings01-DKXbh8uh.js";import"./useSuspenseInfiniteQuery-CuH1Eku2.js";import"./infiniteQueryObserver-Yvt0ZTml.js";import"./Container-jfv9L6Hc.js";import"./use-mobile-Bs0AkxK7.js";const re=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));re.displayName="Share07";function Ce(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=ee();let l;t[0]!==i.id||t[1]!==u?(l=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=l):l=t[2];const r=l;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let n;t[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ie,{size:20}),t[4]=n):n=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:n}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let o;t[8]!==i.title?(o=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=o):o=t[9];let a;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==o?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,o]}),t[10]=r,t[11]=d,t[12]=c,t[13]=o,t[14]=a):a=t[14],a}function we(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:l}=e,[r,m]=b.useState(!1),d=b.useRef(null);let n,c;t[0]!==r?(n=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=n,t[2]=c):(n=t[1],c=t[2]),b.useEffect(n,c);let o;t[3]!==l?(o=N=>{l(N),m(!1)},t[3]=l,t[4]=o):o=t[4];const a=o;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(_e,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==a||t[8]!==u||t[9]!==i?(h=s.jsx(je,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ce,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=u,t[9]=i,t[10]=h):h=t[10];let g;return t[11]!==r||t[12]!==h?(g=s.jsxs(ge,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=g):g=t[13],g}function ke(){const e=y.c(20),t=Ne(),{selectedVirtualMcp:i,setVirtualMcpId:u}=ee();let l,r,m,d,n,c;if(e[0]!==t){n=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(Me).slice(0,6);if(h.length===0){n=null;break e}c=t.map(Te),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],l="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(ze)}e[0]=t,e[1]=l,e[2]=r,e[3]=m,e[4]=d,e[5]=n,e[6]=c}else l=e[1],r=e[2],m=e[3],d=e[4],n=e[5],c=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;const o=i?.id??null;let a;e[8]!==u||e[9]!==o||e[10]!==c?(a=s.jsx(we,{virtualMcps:c,selectedVirtualMcpId:o,onVirtualMcpChange:u}),e[8]=u,e[9]=o,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==l||e[13]!==r||e[14]!==a?(f=s.jsxs("div",{className:l,children:[r,a]}),e[12]=l,e[13]=r,e[14]=a,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function ze(e){return s.jsx(Ce,{agent:e},e.id??"default")}function Te(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function Me(e){return e.id!==null&&!be(e.id)}function Ie(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(X,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Pe)})]}),e[1]=i):i=e[1],i}function Pe(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(X,{className:"size-6 rounded-md shrink-0"}),s.jsx(X,{className:"h-4 w-full"})]},t)}function $e(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(Ie,{}),children:s.jsx(ke,{})}),e[0]=t):t=e[0],t}function Ee(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Ve(){const e=y.c(61),{org:t}=oe(),{data:i}=ae.useSession(),{modelsConnections:u,isChatEmpty:l,activeThreadId:r,createThread:m,switchToThread:d,threads:n,selectedVirtualMcp:c}=he();let o;if(e[0]!==r||e[1]!==n){let x;e[3]!==r?(x=ne=>ne.id===r,e[3]=r,e[4]=x):x=e[4],o=n.find(x),e[0]=r,e[1]=n,e[2]=o}else o=e[2];const a=o,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const g=h;let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=Ee(),e[7]=N):N=e[7];const le=N;let L;e[8]!==t.id?(L=ye(t.id),e[8]=t.id,e[9]=L):L=e[9];const R=c??L;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(j.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let _;e[12]!==a?(_=a?.title&&s.jsx(me,{text:a.title,className:"text-sm font-medium text-foreground"}),e[12]=a,e[13]=_):_=e[13];let S;e[14]!==_?(S=s.jsx(A.Header.Left,{className:"gap-2",children:_}),e[14]=_,e[15]=S):S=e[15];let v;e[16]!==m?(v=()=>m(),e[16]=m,e[17]=v):v=e[17];let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:16}),e[18]=B):B=e[18];let C;e[19]!==l||e[20]!==v?(C=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:l,"aria-label":"New chat",children:B})}),e[19]=l,e[20]=v,e[21]=C):C=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(J,{children:"New chat"}),e[22]=O):O=e[22];let w;e[23]!==C?(w=s.jsxs(Q,{children:[C,O]}),e[23]=C,e[24]=w):w=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=()=>p(!0),e[25]=D):D=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs(Q,{children:[s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:D,"aria-label":"Chat history",children:s.jsx(de,{size:16})})}),s.jsx(J,{children:"Chat history"})]}),e[26]=F):F=e[26];let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Se,{size:16}),e[27]=W):W=e[27];let k;e[28]!==l?(k=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:He,disabled:l,"aria-label":"Pin chat",children:W})}),e[28]=l,e[29]=k):k=e[29];let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(J,{children:"Pin chat"}),e[30]=Z):Z=e[30];let z;e[31]!==k?(z=s.jsxs(Q,{children:[k,Z]}),e[31]=k,e[32]=z):z=e[32];let q;e[33]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(re,{size:16}),e[33]=q):q=e[33];let T;e[34]!==l?(T=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:l,"aria-label":"Share chat",children:q})}),e[34]=l,e[35]=T):T=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(J,{children:"Share chat"}),e[36]=G):G=e[36];let M;e[37]!==T?(M=s.jsxs(Q,{children:[T,G]}),e[37]=T,e[38]=M):M=e[38];let I;e[39]!==w||e[40]!==z||e[41]!==M?(I=s.jsxs(A.Header.Right,{className:"gap-1",children:[w,F,z,M]}),e[39]=w,e[40]=z,e[41]=M,e[42]=I):I=e[42];let P;e[43]!==I||e[44]!==S?(P=s.jsxs(A.Header,{className:"flex-none z-10 bg-background",children:[S,I]}),e[43]=I,e[44]=S,e[45]=P):P=e[45];let $;e[46]!==R||e[47]!==l||e[48]!==g?($=l?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(te,{icon:R.icon,name:R.title,size:"md",fallbackIcon:s.jsx(ie,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[le," ",g,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(j.Input,{})}),s.jsx(j.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx($e,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(j.Main,{children:s.jsx(j.Messages,{})}),s.jsx(j.Footer,{children:s.jsx(j.Input,{})})]}),e[46]=R,e[47]=l,e[48]=g,e[49]=$):$=e[49];let E;e[50]!==d?(E=async x=>{await d(x),p(!1)},e[50]=d,e[51]=E):E=e[51];let V;e[52]!==r||e[53]!==f||e[54]!==E||e[55]!==n?(V=s.jsx(fe,{open:f,onOpenChange:p,threads:n,activeThreadId:r,onThreadSelect:E}),e[52]=r,e[53]=f,e[54]=E,e[55]=n,e[56]=V):V=e[56];let K;return e[57]!==P||e[58]!==$||e[59]!==V?(K=s.jsxs(j,{children:[P,$,V]}),e[57]=P,e[58]=$,e[59]=V,e[60]=K):K=e[60],K}function Ae(){Y.info("Share feature coming soon")}function He(){Y.info("Pin feature coming soon")}function Le(e){const t=y.c(14),{error:i,onRetry:u}=e,l=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(A.Header,{className:"flex-none",children:[s.jsx(A.Header.Left,{className:"gap-2"}),s.jsx(A.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(pe,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=l?"Unable to load models":"Something went wrong";let n;t[2]!==d?(n=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=n):n=t[3];const c=l?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let o;t[4]!==c?(o=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=o):o=t[5];let a;t[6]!==n||t[7]!==o?(a=s.jsxs("div",{className:"space-y-2",children:[n,o]}),t[6]=n,t[7]=o,t[8]=a):a=t[8];let f;t[9]!==u?(f=s.jsx(H,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==f?(p=s.jsxs(j,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,f]})})]}),t[11]=a,t[12]=f,t[13]=p):p=t[13],p}function ss(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(b.Suspense,{fallback:s.jsx(j.Skeleton,{}),children:s.jsx(Ve,{})})}),e[0]=t):t=e[0],t}function Re(e){const{error:t,resetError:i}=e;return s.jsx(Le,{error:t,onRetry:i})}export{ss as default};
@@ -0,0 +1 @@
1
+ import{c as Q,r as U,u as re,K as oe,bx as we,j as t,b as me,O as de,d as Ie,by as Te,bz as ne,aD as Re}from"./index-DwBgLSti.js";import{P as X}from"./index-B_nMIrSY.js";import{B as Pe,a as ze,b as $e,c as ke}from"./breadcrumb-DeYbtjMk.js";import{i as ue}from"./AlertTriangle-DniGvpwb.js";import{i as fe}from"./FilterLines-BFeSNY4D.js";import{n as xe}from"./Inbox01-BweXezQd.js";import{i as se}from"./Loading01-BHMOj-H5.js";import{s as ge}from"./RefreshCw01-DHXbMDcX.js";import{i as pe}from"./SearchMd-BLcaRHQs.js";import{u as he}from"./useQuery-CPsXfVfR.js";import{u as Le}from"./useInfiniteQuery-DXQ7BtjQ.js";import{a as Fe,f as Ee,b as Oe}from"./registry-utils-DMdc5PTp.js";import{u as je,W as Ke,a as _e,h as Ae,b as Me}from"./constants-8URKDp4Y.js";import{f as Be,g as ye,h as De}from"./use-connection-BEGrPCmR.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{C as We}from"./collection-search-CBYSITVU.js";import{M as ae}from"./mcp-server-card-D_Epc4aH.js";import{c as ie,B as Y}from"./button-D6YZfFzy.js";import{I as Ve}from"./input-B7id4I1j.js";import{b as ve,P as be,a as Ne}from"./popover-pjzQQlLd.js";import{i as Ce}from"./Check-Bv0pZ3gl.js";import{t as Se}from"./ChevronDown-CggIFEVQ.js";import{s as te}from"./XClose-Dgr_gyyv.js";import{s as qe}from"./Plus-DNqvDLOK.js";import{E as Ue}from"./empty-state-sMx3NP6e.js";import{u as He}from"./use-binding-DbH4Xe03.js";import{L as Je,u as Qe}from"./localstorage-keys-Ct4C992S.js";import{E as Ye}from"./error-boundary-lFjWy2-n.js";import"./use-mobile-Bs0AkxK7.js";import"./tooltip-D71dCz4E.js";import"./ChevronRight-DgAfR8pA.js";import"./infiniteQueryObserver-Yvt0ZTml.js";import"./useMutation-DgG1LVg-.js";import"./CheckVerified02-6wwLRSRQ.js";import"./Globe02-BPmEw10H.js";import"./Lock01-CQ3bhGvR.js";import"./Terminal-BblMM2fp.js";import"./card-BNyCnFpQ.js";import"./integration-icon-qV_BsBQR.js";import"./Container-jfv9L6Hc.js";import"./github-icon-Dp3wHhYE.js";import"./binder-BBB8LQyx.js";function Ze(s,e){const r=Q.c(4),[l,m]=U.useState(s),n=U.useRef(null),o=U.useRef(!0);let c,a;return r[0]!==e||r[1]!==s?(c=()=>{if(o.current){o.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(s)},e),()=>{n.current&&clearTimeout(n.current)}},a=[s,e],r[0]=e,r[1]=s,r[2]=c,r[3]=a):(c=r[2],a=r[3]),U.useEffect(c,a),l}function Xe(s){const e=Q.c(14),r=U.useRef(null),l=`scroll-position:${s}`,m=U.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const o=n;let c;e[2]!==l?(c=()=>{if(m.current===l)return;const j=sessionStorage.getItem(l);if(j&&r.current){const S=Number.parseInt(j,10);r.current.scrollTop=S}m.current=l},e[2]=l,e[3]=c):c=e[3];const a=c;let g;e[4]!==a||e[5]!==l?(g=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=g):g=e[6];const I=g;let i;e[7]!==a||e[8]!==l?(i=j=>{r.current=j,j&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=i):i=e[9];const p=i;let d;return e[10]!==I||e[11]!==o||e[12]!==p?(d={scrollRef:p,saveScrollPosition:o,handleScroll:I},e[10]=I,e[11]=o,e[12]=p,e[13]=d):d=e[13],d}const et=24;function tt(s){const e=Q.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=s,{org:o}=re();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[a,g]=U.useState(c);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[i,p]=U.useState(I),d=r||null;let j;e[2]!==o.id||e[3]!==d?(j={connectionId:d,orgId:o.id},e[2]=o.id,e[3]=d,e[4]=j):j=e[4];const S=je(j),R=!!m;let b;e[5]!==m||e[6]!==r?(b=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=b):b=e[7];let N;e[8]!==S||e[9]!==m?(N=async()=>{if(!m)return{tags:[],categories:[]};const f=await S.callTool({name:m,arguments:{}});return f.structuredContent??f},e[8]=S,e[9]=m,e[10]=N):N=e[10];let P;e[11]!==b||e[12]!==N?(P={queryKey:b,queryFn:N,staleTime:36e5,retry:2},e[11]=b,e[12]=N,e[13]=P):P=e[13];const{data:z}=he(P);let h,C,$;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==i||e[18]!==a){const f=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;h={limit:et,...a.length>0&&{tags:a},...i.length>0&&{categories:i},...f&&{where:f}},$=Le,C=oe.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=i,e[18]=a,e[19]=h,e[20]=C,e[21]=$}else h=e[19],C=e[20],$=e[21];let v;e[22]!==S||e[23]!==h||e[24]!==l?(v=async f=>{const{pageParam:Z}=f,le=Z?{...h,cursor:Z}:h,ee=await S.callTool({name:l,arguments:le});return ee.structuredContent??ee},e[22]=S,e[23]=h,e[24]=l,e[25]=v):v=e[25];let k;e[26]!==v||e[27]!==C?(k={queryKey:C,queryFn:v,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=v,e[27]=C,e[28]=k):k=e[28];const{data:w,fetchNextPage:x,hasNextPage:y,isFetchingNextPage:u,isFetching:T,isLoading:L,error:F}=$(k);let K;e:{if(!w?.pages||w.pages.length===0){K=null;break e}const f=w.pages[0];if(typeof f=="object"&&f!==null&&"totalCount"in f&&typeof f.totalCount=="number"){K=f.totalCount;break e}K=null}const _=K,E=w?.pages;let G;e[29]!==E?(G=Fe(E),e[29]=E,e[30]=G):G=e[30];const H=G;let W;e[31]!==n||e[32]!==i.length||e[33]!==a.length?(W=a.length>0||i.length>0||!!n?.trim(),e[31]=n,e[32]=i.length,e[33]=a.length,e[34]=W):W=e[34];const D=W,B=T&&!u&&!L&&D;let A;e[35]!==x||e[36]!==y||e[37]!==u?(A=()=>{y&&!u&&x()},e[35]=x,e[36]=y,e[37]=u,e[38]=A):A=e[38];const V=A,O=y??!1,M=R?z?.tags:void 0,q=R?z?.categories:void 0;let J;return e[39]!==D||e[40]!==T||e[41]!==u||e[42]!==B||e[43]!==L||e[44]!==H||e[45]!==F||e[46]!==V||e[47]!==i||e[48]!==a||e[49]!==O||e[50]!==M||e[51]!==q||e[52]!==_?(J={items:H,totalCount:_,hasMore:O,isLoadingMore:u,isFiltering:B,isInitialLoading:L,isFetching:T,error:F,loadMore:V,availableTags:M,availableCategories:q,selectedTags:a,selectedCategories:i,setSelectedTags:g,setSelectedCategories:p,hasActiveFilters:D},e[39]=D,e[40]=T,e[41]=u,e[42]=B,e[43]=L,e[44]=H,e[45]=F,e[46]=V,e[47]=i,e[48]=a,e[49]=O,e[50]=M,e[51]=q,e[52]=_,e[53]=J):J=e[53],J}function st(s){if(typeof s=="object"&&s!==null){const e=s.nextCursor||s.cursor;if(e)return e}}function rt(s,e){return[...s].sort((r,l)=>l.count-r.count).slice(0,e)}function ce(s){const e=Q.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:o}=s,[c,a]=U.useState(""),[g,I]=U.useState(!1);let i,p,d,j,S,R,b,N,P,z,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==g||e[4]!==c||e[5]!==m){const x=[...c?l.filter(E=>E.value.toLowerCase().includes(c.toLowerCase())):l].sort(lt);d=m.length,p=ve,P=g,z=I;let y;e[17]!==r?(y=t.jsx("span",{children:r}),e[17]=r,e[18]=y):y=e[18];let u;e[19]!==d?(u=d>0&&t.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=u):u=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=T):T=e[21],e[22]!==u||e[23]!==y?(h=t.jsx(be,{asChild:!0,children:t.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[y,u,T]})}),e[22]=u,e[23]=y,e[24]=h):h=e[24],i=Ne,R="w-64 p-0",b="start";let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=L):L=e[25];let F;e[26]!==r?(F=r.toLowerCase(),e[26]=r,e[27]=F):F=e[27];const K=`Search ${F}...`;let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=E=>a(E.target.value),e[28]=_):_=e[28],e[29]!==c||e[30]!==K?(N=t.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[L,t.jsx(Ve,{type:"text",placeholder:K,value:c,onChange:_,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=c,e[30]=K,e[31]=N):N=e[31],j="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",S=x.length===0?t.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):x.map(E=>{const G=m.includes(E.value);return t.jsxs("button",{onClick:()=>n(E.value),className:ie("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",G?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[G&&t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"}),E.value]}),t.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:E.count})]},E.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=g,e[4]=c,e[5]=m,e[6]=i,e[7]=p,e[8]=d,e[9]=j,e[10]=S,e[11]=R,e[12]=b,e[13]=N,e[14]=P,e[15]=z,e[16]=h}else i=e[6],p=e[7],d=e[8],j=e[9],S=e[10],R=e[11],b=e[12],N=e[13],P=e[14],z=e[15],h=e[16];let C;e[32]!==j||e[33]!==S?(C=t.jsx("div",{className:j,children:S}),e[32]=j,e[33]=S,e[34]=C):C=e[34];let $;e[35]!==r||e[36]!==o||e[37]!==d?($=d>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:o,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=o,e[37]=d,e[38]=$):$=e[38];let v;e[39]!==i||e[40]!==$||e[41]!==R||e[42]!==b||e[43]!==N||e[44]!==C?(v=t.jsxs(i,{className:R,align:b,children:[N,C,$]}),e[39]=i,e[40]=$,e[41]=R,e[42]=b,e[43]=N,e[44]=C,e[45]=v):v=e[45];let k;return e[46]!==p||e[47]!==v||e[48]!==P||e[49]!==z||e[50]!==h?(k=t.jsxs(p,{open:P,onOpenChange:z,children:[h,v]}),e[46]=p,e[47]=v,e[48]=P,e[49]=z,e[50]=h,e[51]=k):k=e[51],k}function lt(s,e){return e.count-s.count}function nt(s){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:o,onCategoryChange:c}=s,a=r&&r.length>0||l&&l.length>0,g=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==o||e[1]!==m?(I=y=>{m.includes(y)?o(m.filter(u=>u!==y)):o([...m,y])},e[0]=o,e[1]=m,e[2]=I):I=e[2];const i=I;let p;e[3]!==c||e[4]!==n?(p=y=>{n.includes(y)?c(n.filter(u=>u!==y)):c([...n,y])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const d=p;let j;e[6]!==c||e[7]!==o?(j=()=>{o([]),c([])},e[6]=c,e[7]=o,e[8]=j):j=e[8];const S=j;let R,b,N,P,z,h,C;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==m||e[15]!==d||e[16]!==i){const y=l?rt(l,6):[];R=n,b=m,C=new Set(y.map(ot)),z="flex items-center border-b border-border";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=u):u=e[24];let T;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==d?(T=l&&l.length>0&&t.jsx(ce,{label:"Categories",items:l,selectedItems:n,onToggle:d,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=d,e[29]=T):T=e[29];let L;e[30]!==r||e[31]!==o||e[32]!==m||e[33]!==i?(L=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:m,onToggle:i,onClear:()=>o([])}),e[30]=r,e[31]=o,e[32]=m,e[33]=i,e[34]=L):L=e[34],e[35]!==L||e[36]!==T?(h=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[u,T,L]}),e[35]=L,e[36]=T,e[37]=h):h=e[37],N="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==n||e[39]!==d?(F=K=>{const _=n.includes(K.value);return t.jsxs("div",{onClick:()=>d(K.value),className:ie("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",_?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:K.value}),_&&t.jsx("span",{onClick:E=>{E.stopPropagation(),d(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},K.value)},e[38]=n,e[39]=d,e[40]=F):F=e[40],P=y.map(F),e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=n,e[14]=m,e[15]=d,e[16]=i,e[17]=R,e[18]=b,e[19]=N,e[20]=P,e[21]=z,e[22]=h,e[23]=C}else R=e[17],b=e[18],N=e[19],P=e[20],z=e[21],h=e[22],C=e[23];let $;if(e[41]!==R||e[42]!==d||e[43]!==C){let y;e[45]!==C?(y=T=>!C.has(T),e[45]=C,e[46]=y):y=e[46];let u;e[47]!==d?(u=T=>t.jsxs("div",{onClick:()=>d(T),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:T}),t.jsx("span",{onClick:L=>{L.stopPropagation(),d(T)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`cat-${T}`),e[47]=d,e[48]=u):u=e[48],$=R.filter(y).map(u),e[41]=R,e[42]=d,e[43]=C,e[44]=$}else $=e[44];let v;if(e[49]!==b||e[50]!==i){let y;e[52]!==i?(y=u=>t.jsxs("div",{onClick:()=>i(u),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:u}),t.jsx("span",{onClick:T=>{T.stopPropagation(),i(u)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`tag-${u}`),e[52]=i,e[53]=y):y=e[53],v=b.map(y),e[49]=b,e[50]=i,e[51]=v}else v=e[51];let k;e[54]!==S||e[55]!==g?(k=g&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:S,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(te,{size:14}),"Clear all"]}),e[54]=S,e[55]=g,e[56]=k):k=e[56];let w;e[57]!==k||e[58]!==N||e[59]!==P||e[60]!==$||e[61]!==v?(w=t.jsxs("div",{className:N,children:[P,$,v,k]}),e[57]=k,e[58]=N,e[59]=P,e[60]=$,e[61]=v,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==z||e[65]!==h?(x=t.jsxs("div",{className:z,children:[h,w]}),e[63]=w,e[64]=z,e[65]=h,e[66]=x):x=e[66],x}function ot(s){return s.value}function it(s,e){if(!e)return s;const r=e.toLowerCase();return s.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=Q.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=s,[o,c]=U.useState(""),a=Ze(o,300),g=me(),{org:I}=re(),{scrollRef:i,saveScrollPosition:p,handleScroll:d}=Xe(`store-discovery:${r}`);let j;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(j={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=j):j=e[4];const{items:S,hasMore:R,isLoadingMore:b,isInitialLoading:N,isFetching:P,error:z,loadMore:h,availableTags:C,availableCategories:$,selectedTags:v,selectedCategories:k,setSelectedTags:w,setSelectedCategories:x,hasActiveFilters:y}=tt(j);let u,T,L,F;if(e[5]!==a||e[6]!==P||e[7]!==N||e[8]!==S||e[9]!==o||e[10]!==n){const O=o?it(S,o):S;F=n?O.filter(dt):O,u=(o!==a||P)&&!N&&!!o,L=F.filter(at),T=F.filter(M=>!L.find(q=>q.id===M.id)),e[5]=a,e[6]=P,e[7]=N,e[8]=S,e[9]=o,e[10]=n,e[11]=u,e[12]=T,e[13]=L,e[14]=F}else u=e[11],T=e[12],L=e[13],F=e[14];const K=T;let _;e[15]!==g||e[16]!==I.slug||e[17]!==r||e[18]!==p?(_=O=>{p();const M=Ge(O.name||O.title||O.server?.title||""),q=typeof O.id=="string"&&O.id.includes("/"),J=typeof O.server?.name=="string"&&O.server.name.includes("/"),f=q&&!J?O.id:O.server?.name||O.id||"";g({to:"/$org/$project/store/$appName",params:{org:I.slug,project:de,appName:M},search:{registryId:r,serverName:f}})},e[15]=g,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=_):_=e[19];const E=_;let G;e[20]!==d||e[21]!==R||e[22]!==b||e[23]!==h?(G=O=>{if(d(),!R||b)return;const M=O.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&h()},e[20]=d,e[21]=R,e[22]=b,e[23]=h,e[24]=G):G=e[24];const H=G;let W;e[25]!==u||e[26]!==o?(W=t.jsx(We,{value:o,onChange:c,placeholder:"Search for an MCP Server...",isSearching:u}),e[25]=u,e[26]=o,e[27]=W):W=e[27];let D;e[28]!==$||e[29]!==C||e[30]!==k||e[31]!==v||e[32]!==x||e[33]!==w?(D=t.jsx(nt,{availableTags:C,availableCategories:$,selectedTags:v,selectedCategories:k,onTagChange:w,onCategoryChange:x}),e[28]=$,e[29]=C,e[30]=k,e[31]=v,e[32]=x,e[33]=w,e[34]=D):D=e[34];let B;e[35]!==K||e[36]!==z||e[37]!==E||e[38]!==y||e[39]!==R||e[40]!==N||e[41]!==b||e[42]!==u||e[43]!==o||e[44]!==L||e[45]!==F?(B=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:z&&!N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"size-8 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),z.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:z.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):F.length===0&&!y?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),t.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):F.length===0&&y&&!o?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(fe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):o&&F.length===0&&!u?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):t.jsxs("div",{className:"flex flex-col gap-8",children:[u&&F.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),L.length>0&&t.jsx(ae,{items:L,title:"Verified",onItemClick:E}),K.length>0&&t.jsx(ae,{items:K,title:L.length>0?"All":"",onItemClick:E}),R&&b&&t.jsx("div",{className:"flex justify-center py-8",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(se,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=K,e[36]=z,e[37]=E,e[38]=y,e[39]=R,e[40]=N,e[41]=b,e[42]=u,e[43]=o,e[44]=L,e[45]=F,e[46]=B):B=e[46];let A;e[47]!==H||e[48]!==i||e[49]!==B?(A=t.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",onScroll:H,children:B}),e[47]=H,e[48]=i,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==W||e[52]!==D||e[53]!==A?(V=t.jsxs("div",{className:"flex flex-col h-full",children:[W,D,A]}),e[51]=W,e[52]=D,e[53]=A,e[54]=V):V=e[54],V}function mt(){return window.location.reload()}function dt(s){return s.is_public!==!0}function ut(s){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=s,m=Be(r),n=m?.tools;let o;e[0]!==n?(o=Ee(n),e[0]=n,e[1]=o):o=e[1];const c=o;if(!c){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=d):d=e[2];let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[d,t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=j):j=e[3],j}const a=m?.tools;let g;e[4]!==a?(g=Oe(a),e[4]=a,e[5]=g):g=e[5];const i=g||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==i?(p=t.jsx(ct,{registryId:r,listToolName:c,filtersToolName:i,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=i,e[10]=p):p=e[10],p}function ft(s){const e=Q.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:o,placeholder:c}=s,a=c===void 0?"Select a registry...":c,[g,I]=U.useState(!1);let i,p,d,j,S,R,b,N;if(e[0]!==g||e[1]!==a||e[2]!==r||e[3]!==l){let w;e[12]!==l?(w=y=>y.id===l,e[12]=l,e[13]=w):w=e[13];const x=r.find(w);p=ve,b=g,N=I,i=be,R=!0,d="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(j=ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=j):j=e[14],S=x?t.jsxs("span",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}):t.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=g,e[1]=a,e[2]=r,e[3]=l,e[4]=i,e[5]=p,e[6]=d,e[7]=j,e[8]=S,e[9]=R,e[10]=b,e[11]=N}else i=e[4],p=e[5],d=e[6],j=e[7],S=e[8],R=e[9],b=e[10],N=e[11];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=P):P=e[15];let z;e[16]!==d||e[17]!==j||e[18]!==S?(z=t.jsxs("button",{type:d,className:j,children:[S,P]}),e[16]=d,e[17]=j,e[18]=S,e[19]=z):z=e[19];let h;e[20]!==i||e[21]!==R||e[22]!==z?(h=t.jsx(i,{asChild:R,children:z}),e[20]=i,e[21]=R,e[22]=z,e[23]=h):h=e[23];let C;if(e[24]!==m||e[25]!==r||e[26]!==l){let w;e[28]!==m||e[29]!==l?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{m(x.id??x.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}),l===(x.id??x.name)&&t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(Ce,{className:"size-4"})})]},x.id??x.name),e[28]=m,e[29]=l,e[30]=w):w=e[30],C=r.map(w),e[24]=m,e[25]=r,e[26]=l,e[27]=C}else C=e[27];let $;e[31]!==n||e[32]!==o?($=o.length>0&&t.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[t.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),o.map(w=>t.jsxs("button",{type:"button",onClick:()=>{n(w),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?t.jsx("img",{src:w.icon,alt:w.title,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.title.slice(0,1).toUpperCase()}),t.jsx("span",{className:"flex-1",children:w.title})]}),t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:t.jsx(qe,{size:16})})]},w.id??w.title))]}),e[31]=n,e[32]=o,e[33]=$):$=e[33];let v;e[34]!==C||e[35]!==$?(v=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[C,$]}),e[34]=C,e[35]=$,e[36]=v):v=e[36];let k;return e[37]!==p||e[38]!==h||e[39]!==v||e[40]!==b||e[41]!==N?(k=t.jsxs(p,{open:b,onOpenChange:N,children:[h,v]}),e[37]=p,e[38]=h,e[39]=v,e[40]=b,e[41]=N,e[42]=k):k=e[42],k}function xt({registries:s,onConnected:e}){const r=ye(),{org:{slug:l}}=re(),{data:m}=Ie.useSession(),n=me(),[o,c]=U.useState(!1),a=s[0],g=async()=>{if(!(!a||!m?.user?.id)){c(!0);try{const i=await r.create.mutateAsync(a);e?.(i.id)}finally{c(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:de},search:{action:"create"}})};return t.jsx(Ue,{image:t.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:t.jsxs(t.Fragment,{children:[t.jsxs(Y,{variant:"outline",onClick:g,disabled:o||!a,children:[a?.icon&&t.jsx("img",{src:a.icon,alt:"",className:"size-4"}),o?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function gt(s){const e=Q.c(15),{error:r,onRetry:l,registryName:m}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=o):o=e[1];let c;e[2]!==m?(c=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=c):c=e[3];let a;e[4]!==r?(a=r?.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=t.jsxs("div",{className:"space-y-2",children:[o,c,a]}),e[6]=c,e[7]=a,e[8]=g):g=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ge,{className:"size-4"}),e[9]=I):I=e[9];let i;e[10]!==l?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=i):i=e[11];let p;return e[12]!==g||e[13]!==i?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,g,i]}),e[12]=g,e[13]=i,e[14]=p):p=e[14],p}function os(){const s=Q.c(49),{org:e,project:r}=re(),l=De(),m=ye(),n=Te(),o=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=He(l);let a;s[0]!==e.id?(a=Ke.SELF(e.id),s[0]=e.id,s[1]=a):a=s[1];const g=a,I=r.enabledPlugins,i=I==null||I.includes(ne),p=c.filter(f=>f.id!==g?!0:i);let d;s[2]!==g?(d=f=>f.id===g,s[2]=g,s[3]=d):d=s[3];const j=p.some(d);let S;s[4]!==e.id?(S={connectionId:_e,orgId:e.id},s[4]=e.id,s[5]=S):S=s[5];const R=je(S);let b;s[6]!==r.id||s[7]!==R?(b=async()=>{const f=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ne}});return f.structuredContent??f},s[6]=r.id,s[7]=R,s[8]=b):b=s[8];const{data:N}=he({queryKey:oe.projectPluginConfig(r.id??"",ne),queryFn:b,enabled:j&&!!r.id,staleTime:6e4}),P=N?.config?.settings;let z;s[9]!==P||s[10]!==g?(z=f=>f.id===g&&P?{id:f.id,name:P.registryName||f.title,icon:P.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},s[9]=P,s[10]=g,s[11]=z):z=s[11];const h=p.map(z);let C;s[12]!==e.slug?(C=Je.selectedRegistry(e.slug),s[12]=e.slug,s[13]=C):C=s[13];const[$,v]=Qe(C,ht);let k;s[14]!==$?(k=f=>f.id===$,s[14]=$,s[15]=k):k=s[15];const x=p.find(k)?.id||p[0]?.id||"",y=x===g&&P?.storePrivateOnly===!0;let u;s[16]!==e.id?(u=Ae(e.id),s[16]=e.id,s[17]=u):u=s[17];let T;s[18]!==u?(T=[u],s[18]=u,s[19]=T):T=s[19];const L=T;let F;s[20]===Symbol.for("react.memo_cache_sentinel")?(F=[Me()],s[20]=F):F=s[20];const K=F;let _;s[21]!==m.create||s[22]!==v?(_=async f=>{const Z=await m.create.mutateAsync(f);v(Z.id)},s[21]=m.create,s[22]=v,s[23]=_):_=s[23];const E=_,G=new Set(p.map(pt)),H=L.filter(f=>f.id&&!G.has(f.id)),W=K.filter(f=>f.id&&!G.has(f.id));if(o){let f;return s[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Re,{}),s[24]=f):f=s[24],f}let D;s[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(X.Header.Left,{children:t.jsx(Pe,{children:t.jsx(ze,{children:t.jsx($e,{children:t.jsx(ke,{children:"Store"})})})})}),s[25]=D):D=s[25];let B;s[26]!==E?(B=async f=>E(f),s[26]=E,s[27]=B):B=s[27];let A;s[28]!==H||s[29]!==x||s[30]!==h||s[31]!==v||s[32]!==B?(A=t.jsxs(X.Header,{children:[D,t.jsx(X.Header.Right,{children:t.jsx(ft,{wellKnownRegistries:H,registries:h,value:x,onValueChange:v,onAddWellKnown:B,placeholder:"Select store..."})})]}),s[28]=H,s[29]=x,s[30]=h,s[31]=v,s[32]=B,s[33]=A):A=s[33];let V;s[34]!==x||s[35]!==h?(V=f=>{const{error:Z,resetError:le}=f;return t.jsx(gt,{error:Z,onRetry:le,registryName:h.find(ee=>ee.id===x)?.name??"registry"})},s[34]=x,s[35]=h,s[36]=V):V=s[36];let O;s[37]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),s[37]=O):O=s[37];let M;s[38]!==W||s[39]!==x||s[40]!==v||s[41]!==y?(M=t.jsx(U.Suspense,{fallback:O,children:x?t.jsx(ut,{registryId:x,storePrivateOnly:y}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(xt,{registries:W,onConnected:f=>{v(f)}})})}),s[38]=W,s[39]=x,s[40]=v,s[41]=y,s[42]=M):M=s[42];let q;s[43]!==V||s[44]!==M?(q=t.jsx(X.Content,{children:t.jsx(Ye,{fallback:V,children:M})}),s[43]=V,s[44]=M,s[45]=q):q=s[45];let J;return s[46]!==A||s[47]!==q?(J=t.jsxs(X,{children:[A,q]}),s[46]=A,s[47]=q,s[48]=J):J=s[48],J}function pt(s){return s.id}function ht(s){return s??""}export{os as default};
@@ -1 +1 @@
1
- import{c as s,j as t}from"./index-D9HmjKFM.js";import{e as r}from"./Dataflow03-B87skZTy.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
1
+ import{c as s,j as t}from"./index-DwBgLSti.js";import{e as r}from"./Dataflow03-C6KAN8vb.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
@@ -1 +1 @@
1
- import{c as n,j as t,H as o}from"./index-D9HmjKFM.js";function c(){const s=n.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(o,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
1
+ import{c as n,j as t,H as o}from"./index-DwBgLSti.js";function c(){const s=n.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(o,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
@@ -1 +1 @@
1
- import{c as w,j as s,r as S,H as y}from"./index-D9HmjKFM.js";import{i as _}from"./Check-EA1ayL22.js";import{t as k}from"./ChevronDown-xG1flmUs.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function I(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{I as default};
1
+ import{c as w,j as s,r as S,H as y}from"./index-DwBgLSti.js";import{i as _}from"./Check-Bv0pZ3gl.js";import{t as k}from"./ChevronDown-CggIFEVQ.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function I(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{I as default};
@@ -1 +1 @@
1
- import{c as S,j as s,r as w}from"./index-D9HmjKFM.js";import{i as R}from"./Check-EA1ayL22.js";import{t as _}from"./ChevronDown-xG1flmUs.js";import{e as y}from"./Dataflow03-B87skZTy.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
1
+ import{c as S,j as s,r as w}from"./index-DwBgLSti.js";import{i as R}from"./Check-Bv0pZ3gl.js";import{t as _}from"./ChevronDown-CggIFEVQ.js";import{e as y}from"./Dataflow03-C6KAN8vb.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};