@decocms/mesh 2.139.0 → 2.139.2

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 (202) hide show
  1. package/dist/client/assets/{AlertCircle-Du6fB3-T.js → AlertCircle-BDyT9vNZ.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-BB2PryWK.js → AlignLeft-BixvP29Y.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-MBF4qfeq.js → ArrowDown-BYesfwXe.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-MHWNQw1u.js → ArrowLeft-BAkHebXa.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-nwGLUGoR.js → ArrowUp-BCyv-ojK.js} +1 -1
  6. package/dist/client/assets/{Check-rkFTDUnB.js → Check-Camn3oQw.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BMnBlweF.js → CheckCircle-B7XGhEcJ.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-B6UNHl2N.js → CheckDone01-CldSAlfc.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-nkuDDvAL.js → CheckVerified02-K0TWAV06.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-D0kStRqm.js → ChevronDown-DkqBWU_h.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-KolET6Zv.js → ChevronLeft-BPmkNFNc.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-D1sI_Ijw.js → ChevronRight-BI34N28O.js} +1 -1
  13. package/dist/client/assets/{Clock-DR3iqeaG.js → Clock-BqFZuRNT.js} +1 -1
  14. package/dist/client/assets/{Code01-CFqfQe4V.js → Code01-DcYAohyI.js} +1 -1
  15. package/dist/client/assets/{Container-BSSb3CBt.js → Container-B8pG1v5Y.js} +1 -1
  16. package/dist/client/assets/{Copy01-tYgWW7Z7.js → Copy01-GXSpNbxP.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-BjW1O4g6.js → Dataflow03-Cz5aNZkd.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-CZetTyjY.js → DotsHorizontal-DseOTG6x.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-CmV9wwH7.js → DotsVertical-DgG2OQVv.js} +1 -1
  20. package/dist/client/assets/{Download01-DP_85E1L.js → Download01-DV6jzPqo.js} +1 -1
  21. package/dist/client/assets/{Edit01-DLt4viGj.js → Edit01-nsEjgwmh.js} +1 -1
  22. package/dist/client/assets/{Edit05-CRwglEOR.js → Edit05-BLS2FJfm.js} +1 -1
  23. package/dist/client/assets/{Eye-B2hby3r0.js → Eye-DQF_Qzuy.js} +1 -1
  24. package/dist/client/assets/{File02-DcmHoWfe.js → File02-QDXoffKV.js} +1 -1
  25. package/dist/client/assets/{File06-P-yLdUH3.js → File06-DNhGyMHz.js} +1 -1
  26. package/dist/client/assets/{FilterLines-CLAaqewT.js → FilterLines-lwBT4U5d.js} +1 -1
  27. package/dist/client/assets/{Globe01-lhdAzS1a.js → Globe01-lQfF_p8O.js} +1 -1
  28. package/dist/client/assets/{Globe02-kTB2nNF6.js → Globe02-sIfslzHX.js} +1 -1
  29. package/dist/client/assets/{Grid01-uA-KjK4P.js → Grid01-CTYtPHN4.js} +1 -1
  30. package/dist/client/assets/{Hash02-DIk3AwE8.js → Hash02-DU1c1Jak.js} +1 -1
  31. package/dist/client/assets/{Home02-DxJI0U9t.js → Home02-D8QOVzlb.js} +1 -1
  32. package/dist/client/assets/{Image01-CwLEkhKm.js → Image01-BNs8seI1.js} +1 -1
  33. package/dist/client/assets/{Inbox01-DtkSOVs2.js → Inbox01-DTh-ZtU7.js} +1 -1
  34. package/dist/client/assets/{InfoCircle-Bk5RAOq4.js → InfoCircle-s0dGNMks.js} +1 -1
  35. package/dist/client/assets/{Key01-DwZUxnT6.js → Key01-CHf-4NZR.js} +1 -1
  36. package/dist/client/assets/{LayersTwo01-BOewAoxC.js → LayersTwo01-zg7ssS5q.js} +1 -1
  37. package/dist/client/assets/{LayoutLeft-BCns0XHC.js → LayoutLeft-vITOgZDF.js} +1 -1
  38. package/dist/client/assets/{Link01-D55ffrtA.js → Link01-B46W_qyR.js} +1 -1
  39. package/dist/client/assets/{LinkExternal01-B6ZbHgbX.js → LinkExternal01-CWUdHxEb.js} +1 -1
  40. package/dist/client/assets/{List-CTxbvNpA.js → List-DXD0Q-rz.js} +1 -1
  41. package/dist/client/assets/{Loading01-ZX06xZy4.js → Loading01-HszUOya-.js} +1 -1
  42. package/dist/client/assets/{Lock01-BdehYb6x.js → Lock01-sWjWjRt6.js} +1 -1
  43. package/dist/client/assets/{Play-BZUCyc1M.js → Play-DYN0MmVY.js} +1 -1
  44. package/dist/client/assets/{Plus-DfSe6meC.js → Plus-BaoKmylk.js} +1 -1
  45. package/dist/client/assets/{RefreshCcw01-lQZhHyQW.js → RefreshCcw01-yUiODtTq.js} +1 -1
  46. package/dist/client/assets/{Save01-B0MC8MAr.js → Save01-Co3EpgQC.js} +1 -1
  47. package/dist/client/assets/{SearchMd-BJW1WwdD.js → SearchMd-3WCi1VDc.js} +1 -1
  48. package/dist/client/assets/{Settings01-Cq86UQ_U.js → Settings01-84eR-C3B.js} +1 -1
  49. package/dist/client/assets/{Shield01-DL_Ij6Ye.js → Shield01-WvymnQYW.js} +1 -1
  50. package/dist/client/assets/{Terminal-BoTiYZzB.js → Terminal-CM1LxJaq.js} +1 -1
  51. package/dist/client/assets/{Trash01-BF5joJVw.js → Trash01-CAKaaYMp.js} +1 -1
  52. package/dist/client/assets/{Upload01-CevHuUsD.js → Upload01-BDarTYGT.js} +1 -1
  53. package/dist/client/assets/{Users03-BChgBZvs.js → Users03-D0y7vtGV.js} +1 -1
  54. package/dist/client/assets/{X-Br_8Pcje.js → X-BS-0d43p.js} +1 -1
  55. package/dist/client/assets/{XCircle-CHV2soON.js → XCircle-BJZFrCgV.js} +1 -1
  56. package/dist/client/assets/{XClose-CngVUjAw.js → XClose-6pBqg-B-.js} +1 -1
  57. package/dist/client/assets/{Zap-BB2-7sch.js → Zap-MB79YnxU.js} +1 -1
  58. package/dist/client/assets/{agent-connections-preview-DjHTWMtp.js → agent-connections-preview-D0T58SYV.js} +1 -1
  59. package/dist/client/assets/{agent-detail-lU3sHCth.js → agent-detail-BRsW7IYa.js} +1 -1
  60. package/dist/client/assets/{agents-7Bxgq-1z.js → agents-juAVT19y.js} +1 -1
  61. package/dist/client/assets/{alert-dialog-DKBAIL5X.js → alert-dialog-CtNI8LvE.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-BQcv9slA.js → auth-catchall-BNohJky1.js} +1 -1
  63. package/dist/client/assets/{avatar-BeKMLeOK.js → avatar-7hY_H5zt.js} +1 -1
  64. package/dist/client/assets/{badge-lNsdvrPX.js → badge-DfhuIA_7.js} +1 -1
  65. package/dist/client/assets/{binder-M03ehuyS.js → binder-C6fAESck.js} +1 -1
  66. package/dist/client/assets/{breadcrumb-CbuQGV2e.js → breadcrumb-DZJzQEPd.js} +1 -1
  67. package/dist/client/assets/{card-CT6tLP8V.js → card-DXg2GX79.js} +1 -1
  68. package/dist/client/assets/{chart-DQcJSXSh.js → chart-BWnEsG4R.js} +1 -1
  69. package/dist/client/assets/{checkbox-CcR9shtW.js → checkbox-CA1NpLng.js} +1 -1
  70. package/dist/client/assets/{circle-alert-ClRs8xPF.js → circle-alert-DpFL31gA.js} +1 -1
  71. package/dist/client/assets/{collapsible-DzPnEQQK.js → collapsible-CZMy3y5l.js} +1 -1
  72. package/dist/client/assets/{collection-detail-xSPIsewR.js → collection-detail-C59CwIQH.js} +1 -1
  73. package/dist/client/assets/{collection-display-button-DmhgFxWQ.js → collection-display-button-CVVCR82C.js} +1 -1
  74. package/dist/client/assets/{collection-search-CJODK4wM.js → collection-search-BVMX34xh.js} +1 -1
  75. package/dist/client/assets/{collection-tab-JdGvu78y.js → collection-tab-Dq2y4UTN.js} +1 -1
  76. package/dist/client/assets/{collection-table-wrapper-DcuTtOH8.js → collection-table-wrapper-C0TGGJ6J.js} +1 -1
  77. package/dist/client/assets/{collection-tabs-Nnu_1f99.js → collection-tabs-fHRefLVF.js} +1 -1
  78. package/dist/client/assets/{command-BLLQ4m1J.js → command-DQZMRksB.js} +1 -1
  79. package/dist/client/assets/{connect-ct0t4q_d.js → connect-BPIjHna-.js} +1 -1
  80. package/dist/client/assets/{connection-card-DPP04y2O.js → connection-card-CVWbDwe1.js} +1 -1
  81. package/dist/client/assets/{connection-detail-efOk6PaG.js → connection-detail-BE8aQ9Vr.js} +1 -1
  82. package/dist/client/assets/{connection-status-D-HN2zGB.js → connection-status-CIfK1aaf.js} +1 -1
  83. package/dist/client/assets/{connections-BTpfo1XT.js → connections-DE-LDmih.js} +1 -1
  84. package/dist/client/assets/{constants-n-gIPEUY.js → constants-9aDFHfpv.js} +1 -1
  85. package/dist/client/assets/constants-C6iMC3JV.js +1 -0
  86. package/dist/client/assets/{create-organization-dialog-D9UCiEFU.js → create-organization-dialog-rPVbE78O.js} +1 -1
  87. package/dist/client/assets/{create-project-dialog-B3k-tP2b.js → create-project-dialog-eGd8v6in.js} +1 -1
  88. package/dist/client/assets/{danger-5Jol91M3.js → danger-CN2jIiYh.js} +1 -1
  89. package/dist/client/assets/{danger-zone-BiPia_pz.js → danger-zone-DFB5uHUA.js} +1 -1
  90. package/dist/client/assets/{decopilot-events-C3HhCqtz.js → decopilot-events-BNDSGGPU.js} +1 -1
  91. package/dist/client/assets/{dependencies-wOmZW20z.js → dependencies-B2LWAesw.js} +1 -1
  92. package/dist/client/assets/{dialog-BqMxGyd1.js → dialog-C82flYm2.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-hTX487a_.js → dropdown-menu-CxuRGQYq.js} +1 -1
  94. package/dist/client/assets/{dynamic-plugin-layout-CHC4VJ91.js → dynamic-plugin-layout-CQiNNzkD.js} +1 -1
  95. package/dist/client/assets/{editable-task-title-DKcT54Le.js → editable-task-title-0i5466nX.js} +1 -1
  96. package/dist/client/assets/{empty-state-gxm2ae19.js → empty-state-BRx85n5e.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-yjQPUZEB.js → env-vars-editor-7rdGUbIW.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-BNaNV9nd.js → extract-connection-data-C3TnWHFq.js} +1 -1
  99. package/dist/client/assets/{file-browser-B_w2Fo8g.js → file-browser-B6_JSvky.js} +2 -2
  100. package/dist/client/assets/{form-BZ8a73CT.js → form-yfGhYWGK.js} +1 -1
  101. package/dist/client/assets/{general-Cc0MmTIr.js → general-BO87mKaj.js} +1 -1
  102. package/dist/client/assets/{grid-view-v7BeOJyM.js → grid-view-CafNEeZS.js} +1 -1
  103. package/dist/client/assets/{home-BzMyuOsP.js → home-DODydEdy.js} +1 -1
  104. package/dist/client/assets/{icon-picker-BE1LYrai.js → icon-picker-BxryrKdj.js} +1 -1
  105. package/dist/client/assets/{index-DAa3pAko.js → index-B9MYwIUx.js} +1 -1
  106. package/dist/client/assets/{index-k2FJks3Z.js → index-BE5cW0kh.js} +1 -1
  107. package/dist/client/assets/{index-DYvAXdYi.js → index-BxIsqm8s.js} +1 -1
  108. package/dist/client/assets/{index-C7H080jj.js → index-CPVHF3xw.js} +1 -1
  109. package/dist/client/assets/{index-Ci5ff0fv.js → index-Cay1thV-.js} +1 -1
  110. package/dist/client/assets/{index-CraS_LAN.js → index-Dk8Q7M5D.js} +1 -1
  111. package/dist/client/assets/{index-BbuvbhcC.js → index-PEK2-Gur.js} +3 -3
  112. package/dist/client/assets/{index-BZFrXICm.js → index-cyFdlvvQ.js} +1 -1
  113. package/dist/client/assets/{index-ZHLggT8x.js → index-xpVnmlVH.js} +1 -1
  114. package/dist/client/assets/{infiniteQueryObserver-H81V3tWZ.js → infiniteQueryObserver-C6bi1NMJ.js} +1 -1
  115. package/dist/client/assets/{input-3waZIRG0.js → input-sgdy4h-T.js} +1 -1
  116. package/dist/client/assets/{integration-icon-Cso-M9or.js → integration-icon-CF_VTof8.js} +1 -1
  117. package/dist/client/assets/{label-DHJ1lML9.js → label-BrZsvi2a.js} +1 -1
  118. package/dist/client/assets/{layout-DyxVovYn.js → layout-BIum7cxT.js} +1 -1
  119. package/dist/client/assets/{layout-BHXH71-a.js → layout-CV1aMVHy.js} +1 -1
  120. package/dist/client/assets/{localstorage-keys-D_Pd-WOH.js → localstorage-keys-F1lq-lvV.js} +1 -1
  121. package/dist/client/assets/{login-DloCSWP8.js → login-DW4fba0v.js} +1 -1
  122. package/dist/client/assets/{markdown-CtTTB3CC.js → markdown-CbEbvbZf.js} +1 -1
  123. package/dist/client/assets/{mcp-app-renderer-Co9vbSF6.js → mcp-app-renderer-C_3fiOtj.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-B58ki0is.js → mcp-oauth-6xg1H94l.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-eRzuABKg.js → mcp-server-card-CWDv948O.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-BozIkCLL.js → mcp-server-detail-tO42oFY4.js} +2 -2
  127. package/dist/client/assets/{members-CADVAEuM.js → members-DKDzvaot.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-Sh_ObU6G.js → monaco-editor-B-R8mcTi.js} +1 -1
  129. package/dist/client/assets/{monitoring-B0LVSOhy.js → monitoring-X0-0osFY.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-CDUoT798.js → monitoring-dashboard-edit-rOc8ctLL.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-BL3JEgeZ.js → monitoring-dashboard-view-BOcU-Ptb.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-BhfjTfmd.js → oauth-callback-Dt0Z_xAu.js} +1 -1
  133. package/dist/client/assets/{page-BdA5uaoQ.js → page-Bg_wbn7m.js} +1 -1
  134. package/dist/client/assets/{page-9bMuozxf.js → page-C2NqyE1l.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-BXHHXNws.js → plugin-empty-state-BA7ocyXk.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-DBZCiMWm.js → plugin-empty-state-yRJgz3Tr.js} +1 -1
  137. package/dist/client/assets/{plugin-header-Cbca13kt.js → plugin-header-BDXHoMCR.js} +1 -1
  138. package/dist/client/assets/{plugin-header-BzUhEBbJ.js → plugin-header-BjlvBkY0.js} +1 -1
  139. package/dist/client/assets/plugins-C2IeqTZD.js +1 -0
  140. package/dist/client/assets/{popover-CWJLt_uV.js → popover-W_pvoCtS.js} +1 -1
  141. package/dist/client/assets/{project-app-view-CJfYPzV-.js → project-app-view-0TT6VGtD.js} +1 -1
  142. package/dist/client/assets/{project-layout-P4eKM-Ti.js → project-layout-EE8sGSdV.js} +1 -1
  143. package/dist/client/assets/{project-plugins-CMEcmqQp.js → project-plugins-CUoGWXtV.js} +1 -1
  144. package/dist/client/assets/{projects-list-D66u7j5e.js → projects-list-bUHr7Hxj.js} +1 -1
  145. package/dist/client/assets/{readme-viewer-CVTlRXwe.js → readme-viewer-udR9CDuh.js} +1 -1
  146. package/dist/client/assets/{registry-layout-DzvCTbrR.js → registry-layout-DDBt9uFS.js} +1 -1
  147. package/dist/client/assets/{registry-utils-C5IK-CtX.js → registry-utils-BUxN-Xyw.js} +1 -1
  148. package/dist/client/assets/{reports-layout-DnkfeNb1.js → reports-layout-CCWEuXOO.js} +1 -1
  149. package/dist/client/assets/{reset-password-CFsJBYwB.js → reset-password-Cm4-0xVl.js} +1 -1
  150. package/dist/client/assets/{resizable-Cep1sUzM.js → resizable-B67Be6M0.js} +1 -1
  151. package/dist/client/assets/{save-actions-D4UE0JTc.js → save-actions-FUGEGF6q.js} +1 -1
  152. package/dist/client/assets/{scroll-area-D6XeyTsR.js → scroll-area-CK7vwAfQ.js} +1 -1
  153. package/dist/client/assets/{select-DPbkZ4ar.js → select-C05ByfCe.js} +1 -1
  154. package/dist/client/assets/{shell-layout-oqyow6pO.js → shell-layout-DTEZojRn.js} +2 -2
  155. package/dist/client/assets/{sidebar-settings-D-TgpFWp.js → sidebar-settings-Dcd14gbU.js} +1 -1
  156. package/dist/client/assets/{skeleton-B38orBov.js → skeleton-UoFZ21oo.js} +1 -1
  157. package/dist/client/assets/{spinner-BNG3N_t6.js → spinner-BGQowtes.js} +1 -1
  158. package/dist/client/assets/{store-invite-CFW94lsm.js → store-invite-Cq-AwKEe.js} +1 -1
  159. package/dist/client/assets/{switch-D6sm-Y-R.js → switch-Q4KewAfm.js} +1 -1
  160. package/dist/client/assets/{table-BvLxXDfn.js → table-X8r3lDFL.js} +1 -1
  161. package/dist/client/assets/{tabs-nWDaFSMc.js → tabs-B8_PkbMO.js} +1 -1
  162. package/dist/client/assets/tasks-BvxRdrj9.js +1 -0
  163. package/dist/client/assets/{tasks-panel-BdQX0uim.js → tasks-panel-CC3yneqS.js} +1 -1
  164. package/dist/client/assets/{textarea-p_mS6xX2.js → textarea-pi2cWSId.js} +1 -1
  165. package/dist/client/assets/{time-range-picker-j0144Jvi.js → time-range-picker-BrfuDGgP.js} +1 -1
  166. package/dist/client/assets/{toggle-group-DVsMubxS.js → toggle-group-BhefXfHG.js} +1 -1
  167. package/dist/client/assets/{tools-list-rtd0HPYN.js → tools-list-MmMBTqrs.js} +1 -1
  168. package/dist/client/assets/{tooltip-CsJI985k.js → tooltip-CWYwrzX7.js} +1 -1
  169. package/dist/client/assets/{topbar-portal-C-eYDvnC.js → topbar-portal-RlfRVDuU.js} +1 -1
  170. package/dist/client/assets/{types-BS1D50tN.js → types-DfAuQBsH.js} +1 -1
  171. package/dist/client/assets/{use-binding-BxaStPuI.js → use-binding-bR1unh0d.js} +1 -1
  172. package/dist/client/assets/{use-collections-C3ir-ysk.js → use-collections-CdWUwl8U.js} +1 -1
  173. package/dist/client/assets/{use-connection-CMXOVbJV.js → use-connection-Cknhz6to.js} +1 -1
  174. package/dist/client/assets/{use-copy-B9IZm0yW.js → use-copy-2ZhzXjqK.js} +1 -1
  175. package/dist/client/assets/{use-create-virtual-mcp-D-mfuBxt.js → use-create-virtual-mcp-DtdhklAc.js} +1 -1
  176. package/dist/client/assets/{use-install-from-registry-BZO6gquV.js → use-install-from-registry-BzL8TqTO.js} +1 -1
  177. package/dist/client/assets/{use-list-state-BIMMDA8z.js → use-list-state-BFxcsMHC.js} +1 -1
  178. package/dist/client/assets/{use-llm-BYjz4dgp.js → use-llm-D6vMdIHx.js} +1 -1
  179. package/dist/client/assets/{use-mcp-resources-C28CMUKd.js → use-mcp-resources-V7_1ln1p.js} +1 -1
  180. package/dist/client/assets/{use-mcp-tools-DGxTCxiy.js → use-mcp-tools-BMktygYP.js} +1 -1
  181. package/dist/client/assets/{use-members-dt37d3hU.js → use-members-CZzrsjqR.js} +1 -1
  182. package/dist/client/assets/{use-mobile-sCOjBNgX.js → use-mobile-DqFS2tGv.js} +1 -1
  183. package/dist/client/assets/{use-project-BdYSYYtQ.js → use-project-mIp9moJF.js} +1 -1
  184. package/dist/client/assets/{use-settings-modal-BfZ6-wC3.js → use-settings-modal-CK97wy3L.js} +1 -1
  185. package/dist/client/assets/{use-view-mode-oKsffCkq.js → use-view-mode-CkSeKCK_.js} +1 -1
  186. package/dist/client/assets/{use-virtual-mcp-BfsjEQwH.js → use-virtual-mcp-DncJVsC2.js} +1 -1
  187. package/dist/client/assets/useInfiniteQuery-l2zBIMez.js +1 -0
  188. package/dist/client/assets/{useMutation-DlDipIME.js → useMutation-Bwc-v8Ow.js} +1 -1
  189. package/dist/client/assets/useQuery-C84LCuAf.js +1 -0
  190. package/dist/client/assets/useSuspenseInfiniteQuery-B9Fj3djj.js +1 -0
  191. package/dist/client/assets/{user-LUr-tC3q.js → user-CLAm4Myt.js} +1 -1
  192. package/dist/client/assets/{workflow-rge1swVl.js → workflow-BuPqeBHK.js} +1 -1
  193. package/dist/client/index.html +1 -1
  194. package/dist/server/cli.js +1 -1
  195. package/dist/server/server.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/client/assets/constants-uhhGmW7q.js +0 -1
  198. package/dist/client/assets/plugins-BErYCDQ8.js +0 -1
  199. package/dist/client/assets/tasks-CjpbWRoG.js +0 -1
  200. package/dist/client/assets/useInfiniteQuery-WbErrTJi.js +0 -1
  201. package/dist/client/assets/useQuery-DSSFwRKz.js +0 -1
  202. package/dist/client/assets/useSuspenseInfiniteQuery-BPe_aSZI.js +0 -1
@@ -1 +1 @@
1
- import{c as d,v as n,j as c,aw as l,ax as m}from"./index-BbuvbhcC.js";import{i as b}from"./Check-rkFTDUnB.js";function u(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=n("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(l,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{u as C};
1
+ import{c as d,v as n,j as c,aw as l,ax as m}from"./index-PEK2-Gur.js";import{i as b}from"./Check-Camn3oQw.js";function u(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=n("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(l,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{u as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-BbuvbhcC.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-PEK2-Gur.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1,4 +1,4 @@
1
- import{r as I,c7 as oa,c8 as ia,a3 as la,bN as G,s as S,c9 as Qe,ca as fs,bR as ca,bS as ua,bM as da,bO as J,bI as Fe,w as qe,o as D,bP as T,bQ as me,cb as pa,cc as $,_ as ma,bG as fa,c as Z,u as Se,K as _e,e as hs,n as tt,t as ke,v as Ue,j as u,E as _t,B as Ke,b as ha,O as ga,a1 as va,d as ya,I as xa,J as Et,aH as ba,T as Sa,X as _a,W as Ea,M as Ia,aL as wa}from"./index-BbuvbhcC.js";import{u as It,a as wt,d as Na}from"./constants-n-gIPEUY.js";import{b as Ca}from"./use-virtual-mcp-BfsjEQwH.js";import{A as Zt,D as lt}from"./decopilot-events-C3HhCqtz.js";import{u as Nt,a as Ta}from"./use-llm-BYjz4dgp.js";import{u as Aa}from"./useQuery-DSSFwRKz.js";import{u as Xe,L as Ct}from"./localstorage-keys-D_Pd-WOH.js";import{u as Ma}from"./tabs-nWDaFSMc.js";import{C as ja}from"./checkbox-CcR9shtW.js";import{I as ka}from"./input-3waZIRG0.js";import{f as Ra,c as Oa,a as Pa,D as Da}from"./dialog-BqMxGyd1.js";import{S as $a,a as La,b as Za,c as Fa,d as Ua}from"./select-DPbkZ4ar.js";import{S as V}from"./skeleton-B38orBov.js";import{i as za}from"./AlignLeft-BB2PryWK.js";import{i as Ba}from"./ArrowLeft-MHWNQw1u.js";import{t as ft}from"./ChevronDown-D0kStRqm.js";import{a as Va}from"./Image01-CwLEkhKm.js";import{s as qa}from"./RefreshCcw01-lQZhHyQW.js";import{i as gs}from"./SearchMd-BJW1WwdD.js";import{t as Tt}from"./Settings01-Cq86UQ_U.js";import{b as At,c as Wa,a as Ja,e as Ha}from"./use-collections-C3ir-ysk.js";import{u as Ga}from"./useSuspenseInfiniteQuery-BPe_aSZI.js";const Ya=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ya.displayName="ArrowsRight";const vs=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));vs.displayName="ChevronSelectorVertical";const Qa=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Qa.displayName="Lightbulb02";const ys=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));ys.displayName="Stars01";const xs=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));xs.displayName="Tool01";var ze;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function s(r){throw new Error}t.assertNever=s,t.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},t.find=(r,n)=>{for(const i of r)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=a,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(ze||(ze={}));var Ft;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(Ft||(Ft={}));ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class et extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(n){return n.message},a={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)a._errors.push(s(i));else{let o=a,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(s(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return r(this),a}static assert(e){if(!(e instanceof et))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s=Object.create(null),a=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];s[n]=s[n]||[],s[n].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:s}}get formErrors(){return this.flatten()}}et.create=t=>new et(t);var Ut;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ut||(Ut={}));var M;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(M||(M={}));var bs="vercel.ai.error",Ka=Symbol.for(bs),zt,Bt,re=class Ss extends(Bt=Error,zt=Ka,Bt){constructor({name:e,message:s,cause:a}){super(s),this[zt]=!0,this.name=e,this.cause=a}static isInstance(e){return Ss.hasMarker(e,bs)}static hasMarker(e,s){const a=Symbol.for(s);return e!=null&&typeof e=="object"&&a in e&&typeof e[a]=="boolean"&&e[a]===!0}};function _s(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Es="AI_InvalidArgumentError",Is=`vercel.ai.error.${Es}`,Xa=Symbol.for(Is),Vt,qt,er=class extends(qt=re,Vt=Xa,qt){constructor({message:t,cause:e,argument:s}){super({name:Es,message:t,cause:e}),this[Vt]=!0,this.argument=s}static isInstance(t){return re.hasMarker(t,Is)}},ws="AI_JSONParseError",Ns=`vercel.ai.error.${ws}`,tr=Symbol.for(Ns),Wt,Jt,Ht=class extends(Jt=re,Wt=tr,Jt){constructor({text:t,cause:e}){super({name:ws,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as I,c7 as oa,c8 as ia,a3 as la,bN as G,s as S,c9 as Qe,ca as fs,bR as ca,bS as ua,bM as da,bO as J,bI as Fe,w as qe,o as D,bP as T,bQ as me,cb as pa,cc as $,_ as ma,bG as fa,c as Z,u as Se,K as _e,e as hs,n as tt,t as ke,v as Ue,j as u,E as _t,B as Ke,b as ha,O as ga,a1 as va,d as ya,I as xa,J as Et,aH as ba,T as Sa,X as _a,W as Ea,M as Ia,aL as wa}from"./index-PEK2-Gur.js";import{u as It,a as wt,d as Na}from"./constants-9aDFHfpv.js";import{b as Ca}from"./use-virtual-mcp-DncJVsC2.js";import{A as Zt,D as lt}from"./decopilot-events-BNDSGGPU.js";import{u as Nt,a as Ta}from"./use-llm-D6vMdIHx.js";import{u as Aa}from"./useQuery-C84LCuAf.js";import{u as Xe,L as Ct}from"./localstorage-keys-F1lq-lvV.js";import{u as Ma}from"./tabs-B8_PkbMO.js";import{C as ja}from"./checkbox-CA1NpLng.js";import{I as ka}from"./input-sgdy4h-T.js";import{f as Ra,c as Oa,a as Pa,D as Da}from"./dialog-C82flYm2.js";import{S as $a,a as La,b as Za,c as Fa,d as Ua}from"./select-C05ByfCe.js";import{S as V}from"./skeleton-UoFZ21oo.js";import{i as za}from"./AlignLeft-BixvP29Y.js";import{i as Ba}from"./ArrowLeft-BAkHebXa.js";import{t as ft}from"./ChevronDown-DkqBWU_h.js";import{a as Va}from"./Image01-BNs8seI1.js";import{s as qa}from"./RefreshCcw01-yUiODtTq.js";import{i as gs}from"./SearchMd-3WCi1VDc.js";import{t as Tt}from"./Settings01-84eR-C3B.js";import{b as At,c as Wa,a as Ja,e as Ha}from"./use-collections-CdWUwl8U.js";import{u as Ga}from"./useSuspenseInfiniteQuery-B9Fj3djj.js";const Ya=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ya.displayName="ArrowsRight";const vs=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));vs.displayName="ChevronSelectorVertical";const Qa=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Qa.displayName="Lightbulb02";const ys=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));ys.displayName="Stars01";const xs=({size:t=24,color:e="currentColor",...s})=>I.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},I.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));xs.displayName="Tool01";var ze;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function s(r){throw new Error}t.assertNever=s,t.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},t.find=(r,n)=>{for(const i of r)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=a,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(ze||(ze={}));var Ft;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(Ft||(Ft={}));ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class et extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(n){return n.message},a={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)a._errors.push(s(i));else{let o=a,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(s(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return r(this),a}static assert(e){if(!(e instanceof et))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s=Object.create(null),a=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];s[n]=s[n]||[],s[n].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:s}}get formErrors(){return this.flatten()}}et.create=t=>new et(t);var Ut;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ut||(Ut={}));var M;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(M||(M={}));var bs="vercel.ai.error",Ka=Symbol.for(bs),zt,Bt,re=class Ss extends(Bt=Error,zt=Ka,Bt){constructor({name:e,message:s,cause:a}){super(s),this[zt]=!0,this.name=e,this.cause=a}static isInstance(e){return Ss.hasMarker(e,bs)}static hasMarker(e,s){const a=Symbol.for(s);return e!=null&&typeof e=="object"&&a in e&&typeof e[a]=="boolean"&&e[a]===!0}};function _s(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Es="AI_InvalidArgumentError",Is=`vercel.ai.error.${Es}`,Xa=Symbol.for(Is),Vt,qt,er=class extends(qt=re,Vt=Xa,qt){constructor({message:t,cause:e,argument:s}){super({name:Es,message:t,cause:e}),this[Vt]=!0,this.argument=s}static isInstance(t){return re.hasMarker(t,Is)}},ws="AI_JSONParseError",Ns=`vercel.ai.error.${ws}`,tr=Symbol.for(Ns),Wt,Jt,Ht=class extends(Jt=re,Wt=tr,Jt){constructor({text:t,cause:e}){super({name:ws,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${_s(e)}`,cause:e}),this[Wt]=!0,this.text=t}static isInstance(t){return re.hasMarker(t,Ns)}},Cs="AI_TypeValidationError",Ts=`vercel.ai.error.${Cs}`,sr=Symbol.for(Ts),Gt,Yt,Re=class ht extends(Yt=re,Gt=sr,Yt){constructor({value:e,cause:s,context:a}){let r="Type validation failed";if(a?.field&&(r+=` for ${a.field}`),a?.entityName||a?.entityId){r+=" (";const n=[];a.entityName&&n.push(a.entityName),a.entityId&&n.push(`id: "${a.entityId}"`),r+=n.join(", "),r+=")"}super({name:Cs,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${_s(s)}`,cause:s}),this[Gt]=!0,this.value=e,this.context=a}static isInstance(e){return re.hasMarker(e,Ts)}static wrap({value:e,cause:s,context:a}){var r,n,i;return ht.isInstance(s)&&s.value===e&&((r=s.context)==null?void 0:r.field)===a?.field&&((n=s.context)==null?void 0:n.entityName)===a?.entityName&&((i=s.context)==null?void 0:i.entityId)===a?.entityId?s:new ht({value:e,cause:s,context:a})}},We=({prefix:t,size:e=16,alphabet:s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{const r=()=>{const n=s.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=s[Math.random()*n|0];return i.join("")};if(t==null)return r;if(s.includes(a))throw new er({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${s}".`});return()=>`${t}${a}${r()}`},ar=We();function Qt(t=globalThis){var e,s,a;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(a=(s=t.process)==null?void 0:s.versions)!=null&&a.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function xe(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((s,a)=>{e[a.toLowerCase()]=s});else{Array.isArray(t)||(t=Object.entries(t));for(const[s,a]of t)a!=null&&(e[s.toLowerCase()]=a)}return e}function Kt(t,...e){const s=new Headers(xe(t)),a=s.get("user-agent")||"";return s.set("user-agent",[a,...e].filter(Boolean).join(" ")),Object.fromEntries(s.entries())}var rr=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,nr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Xt(t){const e=JSON.parse(t);return e===null||typeof e!="object"||rr.test(t)===!1&&nr.test(t)===!1?e:or(e)}function or(t){let e=[t];for(;e.length;){const s=e;e=[];for(const a of s){if(Object.prototype.hasOwnProperty.call(a,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(a,"constructor")&&a.constructor!==null&&typeof a.constructor=="object"&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in a){const n=a[r];n&&typeof n=="object"&&e.push(n)}}}return t}function ir(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Xt(t)}try{return Xt(t)}finally{Error.stackTraceLimit=e}}function Mt(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:s}=t;if(s!=null)for(const a of Object.keys(s))s[a]=ye(s[a])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(ye):ye(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(ye)),t.allOf!=null&&(t.allOf=t.allOf.map(ye)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(ye));const{definitions:e}=t;if(e!=null)for(const s of Object.keys(e))e[s]=ye(e[s]);return t}function ye(t){return typeof t=="boolean"?t:Mt(t)}var lr=Symbol("Let zodToJsonSchema decide on which parser to use"),es={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},cr=t=>typeof t=="string"?{...es,name:t}:{...es,...t};function Y(){return{}}function ur(t,e){var s,a,r;const n={type:"array"};return(s=t.type)!=null&&s._def&&((r=(a=t.type)==null?void 0:a._def)==null?void 0:r.typeName)!==M.ZodAny&&(n.items=P(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function dr(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const s of t.checks)switch(s.kind){case"min":s.inclusive?e.minimum=s.value:e.exclusiveMinimum=s.value;break;case"max":s.inclusive?e.maximum=s.value:e.exclusiveMaximum=s.value;break;case"multipleOf":e.multipleOf=s.value;break}return e}function pr(){return{type:"boolean"}}function As(t,e){return P(t.type._def,e)}var mr=(t,e)=>P(t.innerType._def,e);function Ms(t,e,s){const a=s??e.dateStrategy;if(Array.isArray(a))return{anyOf:a.map((r,n)=>Ms(t,e,r))};switch(a){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return fr(t)}}var fr=t=>{const e={type:"integer",format:"unix-time"};for(const s of t.checks)switch(s.kind){case"min":e.minimum=s.value;break;case"max":e.maximum=s.value;break}return e};function hr(t,e){return{...P(t.innerType._def,e),default:t.defaultValue()}}function gr(t,e){return e.effectStrategy==="input"?P(t.schema._def,e):Y()}function vr(t){return{type:"string",enum:Array.from(t.values)}}var yr=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function xr(t,e){const s=[P(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),P(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),a=[];return s.forEach(r=>{if(yr(r))a.push(...r.allOf);else{let n=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:i,...o}=r;n=o}a.push(n)}}),a.length?{allOf:a}:void 0}function br(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var ct=void 0,X={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ct===void 0&&(ct=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ct),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function js(t,e){const s={type:"string"};if(t.checks)for(const a of t.checks)switch(a.kind){case"min":s.minLength=typeof s.minLength=="number"?Math.max(s.minLength,a.value):a.value;break;case"max":s.maxLength=typeof s.maxLength=="number"?Math.min(s.maxLength,a.value):a.value;break;case"email":switch(e.emailStrategy){case"format:email":ee(s,"email",a.message,e);break;case"format:idn-email":ee(s,"idn-email",a.message,e);break;case"pattern:zod":W(s,X.email,a.message,e);break}break;case"url":ee(s,"uri",a.message,e);break;case"uuid":ee(s,"uuid",a.message,e);break;case"regex":W(s,a.regex,a.message,e);break;case"cuid":W(s,X.cuid,a.message,e);break;case"cuid2":W(s,X.cuid2,a.message,e);break;case"startsWith":W(s,RegExp(`^${ut(a.value,e)}`),a.message,e);break;case"endsWith":W(s,RegExp(`${ut(a.value,e)}$`),a.message,e);break;case"datetime":ee(s,"date-time",a.message,e);break;case"date":ee(s,"date",a.message,e);break;case"time":ee(s,"time",a.message,e);break;case"duration":ee(s,"duration",a.message,e);break;case"length":s.minLength=typeof s.minLength=="number"?Math.max(s.minLength,a.value):a.value,s.maxLength=typeof s.maxLength=="number"?Math.min(s.maxLength,a.value):a.value;break;case"includes":{W(s,RegExp(ut(a.value,e)),a.message,e);break}case"ip":{a.version!=="v6"&&ee(s,"ipv4",a.message,e),a.version!=="v4"&&ee(s,"ipv6",a.message,e);break}case"base64url":W(s,X.base64url,a.message,e);break;case"jwt":W(s,X.jwt,a.message,e);break;case"cidr":{a.version!=="v6"&&W(s,X.ipv4Cidr,a.message,e),a.version!=="v4"&&W(s,X.ipv6Cidr,a.message,e);break}case"emoji":W(s,X.emoji(),a.message,e);break;case"ulid":{W(s,X.ulid,a.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{ee(s,"binary",a.message,e);break}case"contentEncoding:base64":{s.contentEncoding="base64";break}case"pattern:zod":{W(s,X.base64,a.message,e);break}}break}case"nanoid":W(s,X.nanoid,a.message,e)}return s}function ut(t,e){return e.patternStrategy==="escape"?_r(t):t}var Sr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function _r(t){let e="";for(let s=0;s<t.length;s++)Sr.has(t[s])||(e+="\\"),e+=t[s];return e}function ee(t,e,s,a){var r;t.format||(r=t.anyOf)!=null&&r.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...s&&a.errorMessages&&{errorMessage:{format:s}}})):t.format=e}function W(t,e,s,a){var r;t.pattern||(r=t.allOf)!=null&&r.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:ts(e,a),...s&&a.errorMessages&&{errorMessage:{pattern:s}}})):t.pattern=ts(e,a)}function ts(t,e){var s;if(!e.applyRegexFlags||!t.flags)return t.source;const a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=a.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,c=!1;for(let l=0;l<r.length;l++){if(i){n+=r[l],i=!1;continue}if(a.i){if(o){if(r[l].match(/[a-z]/)){c?(n+=r[l],n+=`${r[l-2]}-${r[l]}`.toUpperCase(),c=!1):r[l+1]==="-"&&((s=r[l+2])!=null&&s.match(/[a-z]/))?(n+=r[l],c=!0):n+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){n+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(a.m){if(r[l]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){n+=`($|(?=[\r
@@ -1,4 +1,4 @@
1
- import{bb as re,r as k,o as Qs,s as Et,c as N,j as o,E as $n,u as Z,l as Ys,v as R,G as eo,e as pe,a as to,aF as Ye,O as et,B as X,t as On,bF as K,cf as no,cg as so,aW as oo,J as Ht,T as de,W as Rn,aX as ro,I as Vt,aY as io,aZ as An,M as Mn,a_ as lo,a$ as co,X as Pn,b1 as ao,ch as Ut,ci as uo,aH as fo,bE as mo,H as po,n as xo,cj as ho,ck as go,cl as Ln}from"./index-BbuvbhcC.js";import{E as Dn}from"./collection-search-CJODK4wM.js";import{d as Bt,u as qt}from"./use-collections-C3ir-ysk.js";import{u as ie,g as Ue,i as bo}from"./constants-n-gIPEUY.js";import{F as Tt,a as jo,b as Kt,d as Jt}from"./form-BZ8a73CT.js";import{I as Gt}from"./input-3waZIRG0.js";import{T as Lt}from"./textarea-p_mS6xX2.js";import{V as zn,b as Wn,a as he}from"./layout-DyxVovYn.js";import{S as Fn}from"./save-actions-D4UE0JTc.js";import{M as vo}from"./mcp-app-renderer-Co9vbSF6.js";import{g as So,M as gn}from"./types-BS1D50tN.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as tt}from"./select-DPbkZ4ar.js";import{c as Xt,T as nt,a as st,b as ot}from"./tooltip-CsJI985k.js";import{i as yo}from"./AlertCircle-Du6fB3-T.js";import{s as wo}from"./Clock-DR3iqeaG.js";import{i as bn}from"./Code01-CFqfQe4V.js";import{a as No}from"./Copy01-tYgWW7Z7.js";import{s as Co}from"./LayersTwo01-BOewAoxC.js";import{i as dt}from"./Loading01-ZX06xZy4.js";import{i as Zt}from"./Play-BZUCyc1M.js";import{B as qn,a as Kn,b as Pe,d as rt,e as it,c as Jn}from"./breadcrumb-CbuQGV2e.js";import{u as ko,O as Io,M as _o,F as Eo,v as To}from"./index-BZFrXICm.js";import{u as ut,b as $o}from"./use-connection-CMXOVbJV.js";import{d as Qt,b as Yt,a as en}from"./use-mcp-tools-DGxTCxiy.js";import{I as ft}from"./integration-icon-Cso-M9or.js";import{a as Oo}from"./tools-list-rtd0HPYN.js";import{M as Le,n as Ro}from"./monaco-editor-Sh_ObU6G.js";import{E as tn}from"./empty-state-gxm2ae19.js";import{n as Ao}from"./Container-BSSb3CBt.js";import{b as Gn}from"./use-virtual-mcp-BfsjEQwH.js";import{b as Mo,R as jn,a as Po}from"./resizable-Cep1sUzM.js";import{B as me}from"./badge-lNsdvrPX.js";import{S as mt}from"./spinner-BNG3N_t6.js";import{V as Lo}from"./collection-display-button-DmhgFxWQ.js";import{N as Do,S as zo,a as Wo,c as Fo,m as Xe,P as Ho,i as Vo,R as Uo,u as Bo,b as qo,d as vn,E as Ko,e as Jo}from"./index-DYvAXdYi.js";import{a as Go}from"./use-binding-BxaStPuI.js";import{b as Xo,c as Zo,d as Qo,e as Yo,a as er,D as tr}from"./dialog-BqMxGyd1.js";import"./index-k2FJks3Z.js";import{s as Xn}from"./Plus-DfSe6meC.js";import{i as pt}from"./Check-rkFTDUnB.js";import{i as nr}from"./DotsHorizontal-CZetTyjY.js";import{b as sr,T as or,R as rr,g as ir,h as Zn,j as lr}from"./collapsible-DzPnEQQK.js";import{s as nn}from"./XClose-CngVUjAw.js";import{D as cr,a as ar,b as dr,c as Sn}from"./dropdown-menu-hTX487a_.js";import{i as ur}from"./ChevronRight-D1sI_Ijw.js";import{a as fr,S as mr}from"./scroll-area-D6XeyTsR.js";import{i as Qn}from"./X-Br_8Pcje.js";import"./SearchMd-BJW1WwdD.js";import"./useMutation-DlDipIME.js";import"./label-DHJ1lML9.js";import"./index-C7H080jj.js";import"./localstorage-keys-D_Pd-WOH.js";import"./useQuery-DSSFwRKz.js";import"./Save01-B0MC8MAr.js";import"./use-mcp-resources-C28CMUKd.js";import"./index-ZHLggT8x.js";import"./ChevronDown-D0kStRqm.js";import"./mcp-oauth-B58ki0is.js";import"./File06-P-yLdUH3.js";import"./Key01-DwZUxnT6.js";import"./constants-uhhGmW7q.js";import"./registry-utils-C5IK-CtX.js";import"./extract-connection-data-BNaNV9nd.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-BZO6gquV.js";import"./circle-alert-ClRs8xPF.js";import"./index-Ci5ff0fv.js";import"./index-DAa3pAko.js";import"./collection-table-wrapper-DcuTtOH8.js";import"./table-BvLxXDfn.js";import"./ArrowDown-MBF4qfeq.js";import"./ArrowUp-nwGLUGoR.js";import"./card-CT6tLP8V.js";import"./Eye-B2hby3r0.js";import"./Globe02-kTB2nNF6.js";import"./Grid01-uA-KjK4P.js";import"./List-CTxbvNpA.js";import"./popover-CWJLt_uV.js";import"./skeleton-B38orBov.js";import"./decopilot-events-C3HhCqtz.js";import"./usage-B8eRkRZY.js";import"./Edit01-DLt4viGj.js";import"./Users03-BChgBZvs.js";import"./XCircle-CHV2soON.js";import"./tabs-nWDaFSMc.js";import"./ArrowLeft-MHWNQw1u.js";import"./use-copy-B9IZm0yW.js";import"./use-create-virtual-mcp-D-mfuBxt.js";import"./marked.esm-BaswSlok.js";import"./markdown-CtTTB3CC.js";import"./Trash01-BF5joJVw.js";import"./binder-M03ehuyS.js";import"./use-llm-BYjz4dgp.js";import"./checkbox-CcR9shtW.js";import"./AlignLeft-BB2PryWK.js";import"./Image01-CwLEkhKm.js";import"./RefreshCcw01-lQZhHyQW.js";import"./Settings01-Cq86UQ_U.js";import"./useSuspenseInfiniteQuery-BPe_aSZI.js";import"./infiniteQueryObserver-H81V3tWZ.js";const Yn=re("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const es=re("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const sn=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const on=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const pr=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const xr=re("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const hr=re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ts=re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ns=re("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const ss=re("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const gr=re("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const os=re("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const rs=re("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),rn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));rn.displayName="AlertOctagon";const is=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));is.displayName="Box";const ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));ls.displayName="ClockFastForward";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));cs.displayName="Code02";const Ze=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ze.displayName="Columns01";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));as.displayName="CornerDownRight";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));ds.displayName="Database01";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));us.displayName="GitBranch01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));fs.displayName="Repeat03";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}),k.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));ms.displayName="StopCircle";Qs({title:Et().min(1),description:Et().nullable(),body:Et()});function $t(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function br(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function jr(t){const e=N.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Tt,{control:n.control,name:"title",render:yr}),o.jsx(Tt,{control:n.control,name:"description",render:Sr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(Tt,{control:n.control,name:"body",render:vr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(jo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function vr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(Lt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Sr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function yr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function wr(t){const e=N.c(35),{providerId:n,promptId:s}=t,{org:i}=Z(),r=n||null;let l;e[0]!==i.id||e[1]!==r?(l={connectionId:r,orgId:i.id},e[0]=i.id,e[1]=r,e[2]=l):l=e[2];const c=ie(l),a=Bt(n,"PROMPT",s,c),d=qt(n,"PROMPT",c),u=d.update.isPending;let f;e[3]!==a?(f=a?{title:a.title,description:a.description??null,body:$t(a)}:void 0,e[3]=a,e[4]=f):f=e[4];let m;e[5]!==f?(m={values:f},e[5]=f,e[6]=m):m=e[6];const x=Ys(m);let p;e[7]!==x||e[8]!==a?(p=()=>{a&&x.reset({title:a.title,description:a.description??null,body:$t(a)})},e[7]=x,e[8]=a,e[9]=p):p=e[9];const h=p;let g;e[10]!==d.update||e[11]!==x||e[12]!==s?(g=x.handleSubmit(async I=>{const $=await d.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:$.title,description:$.description??null,body:$t($)})}),e[10]=d.update,e[11]=x,e[12]=s,e[13]=g):g=e[13];const b=g;if(!a){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let j;e[15]!==a.title?(j=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[15]=a.title,e[16]=j):j=e[16];let S;e[17]!==a.description?(S=a.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[17]=a.description,e[18]=S):S=e[18];let y;e[19]!==j||e[20]!==S?(y=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[j,S]})}),e[19]=j,e[20]=S,e[21]=y):y=e[21];let v;e[22]!==b?(v=()=>{b()},e[22]=b,e[23]=v):v=e[23];let w;e[24]!==x.formState.isDirty||e[25]!==u||e[26]!==h||e[27]!==v?(w=o.jsx(zn,{children:o.jsx(Fn,{onSave:v,onUndo:h,isDirty:x.formState.isDirty,isSaving:u})}),e[24]=x.formState.isDirty,e[25]=u,e[26]=h,e[27]=v,e[28]=w):w=e[28];let C;e[29]!==x?(C=o.jsx("div",{className:"h-full",children:o.jsx(jr,{form:x})}),e[29]=x,e[30]=C):C=e[30];let _;return e[31]!==w||e[32]!==C||e[33]!==y?(_=o.jsxs(he,{children:[y,w,C]}),e[31]=w,e[32]=C,e[33]=y,e[34]=_):_=e[34],_}function Nr(t){const e=N.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=br(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(wr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const Cr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function kr(t){const e=N.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=R(Cr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Ir(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=R("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function _r(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=R("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const Er=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Tr(t){const e=N.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=ko(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(Io,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(_o,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx($r,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function $r({toolName:t,connectionId:e}){const{replayId:n}=to({strict:!1}),s=(()=>{if(!n)return null;const E=`replay-${n}`,O=sessionStorage.getItem(E);if(!O)return null;sessionStorage.removeItem(E);try{return JSON.parse(O)}catch{return null}})(),i=(()=>{if(!s)return null;const E={};for(const[O,P]of Object.entries(s))P!==null&&typeof P=="object"?E[O]=JSON.stringify(P,null,2):E[O]=P;return E})(),[r,l]=k.useState(i??{}),[c,a]=k.useState(s?JSON.stringify(s,null,2):"{}"),[d,u]=k.useState(null),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(null),[b,j]=k.useState(!1),[S,y]=k.useState(null),{org:v}=Z(),w=ut(e),C=ie({connectionId:e,orgId:v.id}),_=Qt({client:C}),I=_.data?.tools?.find(E=>E.name===t),$=So(I?._meta),[A,W]=k.useState("json"),[T,M]=k.useState(!1);$&&!T&&(W("ui"),M(!0));const H=I?.inputSchema?.properties,F=H?Object.keys(H):[],B=F.length>0,V={};if(B&&I?.inputSchema?.properties)for(const E of F)V[E]=I.inputSchema.required?.includes(E)?"":void 0;const z=E=>Object.prototype.hasOwnProperty.call(r,E),Q=async()=>{j(!0),g(null),u(null),m(null),p(null),y(null);const E=performance.now();try{if(!C)throw new Error("MCP client is not available");const O=B?{...V,...r}:(()=>{const G=c.trim();if(!G)return{};const D=JSON.parse(G);if(D&&typeof D=="object")return D;throw new Error("Raw JSON input must be an object.")})();B&&I?.inputSchema?.properties&&Object.entries(I.inputSchema.properties).forEach(([G,D])=>{if((D.type==="object"||D.type==="array")&&typeof O[G]=="string")try{O[G]=JSON.parse(O[G])}catch{}});const P=await C.callTool({name:t,arguments:O}),Y=P.structuredContent??P,le=performance.now(),oe=Math.round(le-E);u(Y),m(P),p(O);const ce=JSON.stringify(Y),te=new TextEncoder().encode(ce).length;y({duration:`${oe}ms`,bytes:`${te} bytes`,tokens:`~${Math.ceil(te/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);g(P||"Unknown error occurred");const Y=performance.now();y({duration:`${Math.round(Y-E)}ms`})}finally{j(!1)}},se=(E,O)=>{l(P=>({...P,[E]:O}))},ee=()=>{u(null),m(null),p(null),g(null),y(null)},U=I?.name??Er(t),J=o.jsx(qn,{children:o.jsxs(Kn,{children:[o.jsx(Pe,{children:o.jsx(rt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:v.slug,project:et},children:"Connections"})})}),o.jsx(it,{}),w&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(rt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:v.slug,project:et,connectionId:e},search:{tab:"tools"},children:w.title})})}),o.jsx(it,{})]}),o.jsx(Pe,{children:o.jsx(Jn,{children:U})})]})});return o.jsx(he,{breadcrumb:J,children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ft,{icon:w?.icon||null,name:w?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[_.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):_.isLoading?o.jsx(dt,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:I?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),I?.inputSchema?.required&&I.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:B&&I?.inputSchema?.properties?Object.entries(I.inputSchema.properties).map(([E,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[E,I.inputSchema?.required?.includes(E)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(Lt,{className:"font-mono text-xs",value:z(E)?r[E]??"":V[E]??"",onChange:P=>se(E,P.target.value),placeholder:`Enter ${E} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:z(E)?String(r[E]??""):"",onValueChange:P=>se(E,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(tt,{value:"true",children:"true"}),o.jsx(tt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:z(E)?r[E]??"":V[E]??"",onChange:P=>se(E,P.target.value),placeholder:`Enter ${E}...`})]},E)):I?.inputSchema&&!B?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(Lt,{className:"font-mono text-xs min-h-[120px]",value:c,onChange:E=>a(E.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),o.jsx(Oo,{annotations:I?.annotations,_meta:I?._meta})]}),S&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(wo,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.duration})]}),S.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(is,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.tokens})]}),S.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ds,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.bytes})]}),S.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:S.cost})})]})]}),o.jsxs("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:[o.jsx("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:b?o.jsxs(X,{size:"sm",variant:"destructive",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:ee,children:[o.jsx(ms,{className:"h-3.5 w-3.5"}),"Cancel"]}):o.jsxs(X,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:Q,children:[o.jsx(Zt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),$&&o.jsx(Xt,{children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs(nt,{children:[o.jsx(st,{asChild:!0,children:o.jsx(X,{size:"icon",variant:A==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>W("ui"),children:o.jsx(Co,{size:14})})}),o.jsx(ot,{children:"Interactive view"})]}),o.jsxs(nt,{children:[o.jsx(st,{asChild:!0,children:o.jsx(X,{size:"icon",variant:A==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>W("json"),children:o.jsx(bn,{size:14})})}),o.jsx(ot,{children:"JSON view"})]})]})})]}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(kr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(yo,{className:"h-4 w-4"}),o.jsx(Ir,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(_r,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:$&&A==="ui"&&C?o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex items-center justify-center h-48",children:o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[o.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:o.jsx(vo,{resourceURI:$,toolInfo:I?{tool:I}:void 0,toolInput:x??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:gn.view.minHeight,maxHeight:gn.view.maxHeight,client:C,className:"h-full"})}):d?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(d,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(X,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(d,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(bn,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})})}function Or(t){const e=N.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!ut(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(dt,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(Tr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const yn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},ln=(t=>t?yn(t):yn),Rr=t=>t;function Dt(t,e=Rr){const n=K.useSyncExternalStore(t.subscribe,K.useCallback(()=>e(t.getState()),[t,e]),K.useCallback(()=>e(t.getInitialState()),[t,e]));return K.useDebugValue(n),n}const Ar=t=>{const e=ln(t),n=s=>Dt(e,s);return Object.assign(n,e),n},Mr=(t=>Ar);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const zt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return zt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return zt(s)(n)}}}},Pr=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(y=>{var v;return y((v=s())!=null?v:x)});const S=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return zt(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const v=r.migrate(y.state,y.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var v;if(j!==c)return;const[w,C]=y;if(p=r.merge(C,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(S?.(p,void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{j===c&&S?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),p||x},xs=Pr,{useSyncExternalStoreWithSelector:Lr}=no,Dr=t=>t;function zr(t,e=Dr,n){const s=Lr(t.subscribe,t.getState,t.getInitialState,e,n);return K.useDebugValue(s),s}const wn=t=>Symbol.iterator in t,Nn=t=>"entries"in t,Cn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Wr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Fr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:wn(t)&&wn(e)?Nn(t)&&Nn(e)?Cn(t,e):Wr(t,e):Cn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Hr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{bb as re,r as k,o as Qs,s as Et,c as N,j as o,E as $n,u as Z,l as Ys,v as R,G as eo,e as pe,a as to,aF as Ye,O as et,B as X,t as On,bF as K,cf as no,cg as so,aW as oo,J as Ht,T as de,W as Rn,aX as ro,I as Vt,aY as io,aZ as An,M as Mn,a_ as lo,a$ as co,X as Pn,b1 as ao,ch as Ut,ci as uo,aH as fo,bE as mo,H as po,n as xo,cj as ho,ck as go,cl as Ln}from"./index-PEK2-Gur.js";import{E as Dn}from"./collection-search-BVMX34xh.js";import{d as Bt,u as qt}from"./use-collections-CdWUwl8U.js";import{u as ie,g as Ue,i as bo}from"./constants-9aDFHfpv.js";import{F as Tt,a as jo,b as Kt,d as Jt}from"./form-yfGhYWGK.js";import{I as Gt}from"./input-sgdy4h-T.js";import{T as Lt}from"./textarea-pi2cWSId.js";import{V as zn,b as Wn,a as he}from"./layout-BIum7cxT.js";import{S as Fn}from"./save-actions-FUGEGF6q.js";import{M as vo}from"./mcp-app-renderer-C_3fiOtj.js";import{g as So,M as gn}from"./types-DfAuQBsH.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as tt}from"./select-C05ByfCe.js";import{c as Xt,T as nt,a as st,b as ot}from"./tooltip-CWYwrzX7.js";import{i as yo}from"./AlertCircle-BDyT9vNZ.js";import{s as wo}from"./Clock-BqFZuRNT.js";import{i as bn}from"./Code01-DcYAohyI.js";import{a as No}from"./Copy01-GXSpNbxP.js";import{s as Co}from"./LayersTwo01-zg7ssS5q.js";import{i as dt}from"./Loading01-HszUOya-.js";import{i as Zt}from"./Play-DYN0MmVY.js";import{B as qn,a as Kn,b as Pe,d as rt,e as it,c as Jn}from"./breadcrumb-DZJzQEPd.js";import{u as ko,O as Io,M as _o,F as Eo,v as To}from"./index-cyFdlvvQ.js";import{u as ut,b as $o}from"./use-connection-Cknhz6to.js";import{d as Qt,b as Yt,a as en}from"./use-mcp-tools-BMktygYP.js";import{I as ft}from"./integration-icon-CF_VTof8.js";import{a as Oo}from"./tools-list-MmMBTqrs.js";import{M as Le,n as Ro}from"./monaco-editor-B-R8mcTi.js";import{E as tn}from"./empty-state-BRx85n5e.js";import{n as Ao}from"./Container-B8pG1v5Y.js";import{b as Gn}from"./use-virtual-mcp-DncJVsC2.js";import{b as Mo,R as jn,a as Po}from"./resizable-B67Be6M0.js";import{B as me}from"./badge-DfhuIA_7.js";import{S as mt}from"./spinner-BGQowtes.js";import{V as Lo}from"./collection-display-button-CVVCR82C.js";import{N as Do,S as zo,a as Wo,c as Fo,m as Xe,P as Ho,i as Vo,R as Uo,u as Bo,b as qo,d as vn,E as Ko,e as Jo}from"./index-BxIsqm8s.js";import{a as Go}from"./use-binding-bR1unh0d.js";import{b as Xo,c as Zo,d as Qo,e as Yo,a as er,D as tr}from"./dialog-C82flYm2.js";import"./index-BE5cW0kh.js";import{s as Xn}from"./Plus-BaoKmylk.js";import{i as pt}from"./Check-Camn3oQw.js";import{i as nr}from"./DotsHorizontal-DseOTG6x.js";import{b as sr,T as or,R as rr,g as ir,h as Zn,j as lr}from"./collapsible-CZMy3y5l.js";import{s as nn}from"./XClose-6pBqg-B-.js";import{D as cr,a as ar,b as dr,c as Sn}from"./dropdown-menu-CxuRGQYq.js";import{i as ur}from"./ChevronRight-BI34N28O.js";import{a as fr,S as mr}from"./scroll-area-CK7vwAfQ.js";import{i as Qn}from"./X-BS-0d43p.js";import"./SearchMd-3WCi1VDc.js";import"./useMutation-Bwc-v8Ow.js";import"./label-BrZsvi2a.js";import"./index-CPVHF3xw.js";import"./localstorage-keys-F1lq-lvV.js";import"./useQuery-C84LCuAf.js";import"./Save01-Co3EpgQC.js";import"./use-mcp-resources-V7_1ln1p.js";import"./index-xpVnmlVH.js";import"./ChevronDown-DkqBWU_h.js";import"./mcp-oauth-6xg1H94l.js";import"./File06-DNhGyMHz.js";import"./Key01-CHf-4NZR.js";import"./constants-C6iMC3JV.js";import"./registry-utils-BUxN-Xyw.js";import"./extract-connection-data-C3TnWHFq.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-BzL8TqTO.js";import"./circle-alert-DpFL31gA.js";import"./index-Cay1thV-.js";import"./index-B9MYwIUx.js";import"./collection-table-wrapper-C0TGGJ6J.js";import"./table-X8r3lDFL.js";import"./ArrowDown-BYesfwXe.js";import"./ArrowUp-BCyv-ojK.js";import"./card-DXg2GX79.js";import"./Eye-DQF_Qzuy.js";import"./Globe02-sIfslzHX.js";import"./Grid01-CTYtPHN4.js";import"./List-DXD0Q-rz.js";import"./popover-W_pvoCtS.js";import"./skeleton-UoFZ21oo.js";import"./decopilot-events-BNDSGGPU.js";import"./usage-B8eRkRZY.js";import"./Edit01-nsEjgwmh.js";import"./Users03-D0y7vtGV.js";import"./XCircle-BJZFrCgV.js";import"./tabs-B8_PkbMO.js";import"./ArrowLeft-BAkHebXa.js";import"./use-copy-2ZhzXjqK.js";import"./use-create-virtual-mcp-DtdhklAc.js";import"./marked.esm-BaswSlok.js";import"./markdown-CbEbvbZf.js";import"./Trash01-CAKaaYMp.js";import"./binder-C6fAESck.js";import"./use-llm-D6vMdIHx.js";import"./checkbox-CA1NpLng.js";import"./AlignLeft-BixvP29Y.js";import"./Image01-BNs8seI1.js";import"./RefreshCcw01-yUiODtTq.js";import"./Settings01-84eR-C3B.js";import"./useSuspenseInfiniteQuery-B9Fj3djj.js";import"./infiniteQueryObserver-C6bi1NMJ.js";const Yn=re("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const es=re("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const sn=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const on=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const pr=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const xr=re("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const hr=re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ts=re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ns=re("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const ss=re("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const gr=re("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const os=re("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const rs=re("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),rn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));rn.displayName="AlertOctagon";const is=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));is.displayName="Box";const ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));ls.displayName="ClockFastForward";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));cs.displayName="Code02";const Ze=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ze.displayName="Columns01";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));as.displayName="CornerDownRight";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));ds.displayName="Database01";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));us.displayName="GitBranch01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));fs.displayName="Repeat03";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}),k.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));ms.displayName="StopCircle";Qs({title:Et().min(1),description:Et().nullable(),body:Et()});function $t(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function br(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function jr(t){const e=N.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Tt,{control:n.control,name:"title",render:yr}),o.jsx(Tt,{control:n.control,name:"description",render:Sr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(Tt,{control:n.control,name:"body",render:vr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(jo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function vr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(Lt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Sr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function yr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function wr(t){const e=N.c(35),{providerId:n,promptId:s}=t,{org:i}=Z(),r=n||null;let l;e[0]!==i.id||e[1]!==r?(l={connectionId:r,orgId:i.id},e[0]=i.id,e[1]=r,e[2]=l):l=e[2];const c=ie(l),a=Bt(n,"PROMPT",s,c),d=qt(n,"PROMPT",c),u=d.update.isPending;let f;e[3]!==a?(f=a?{title:a.title,description:a.description??null,body:$t(a)}:void 0,e[3]=a,e[4]=f):f=e[4];let m;e[5]!==f?(m={values:f},e[5]=f,e[6]=m):m=e[6];const x=Ys(m);let p;e[7]!==x||e[8]!==a?(p=()=>{a&&x.reset({title:a.title,description:a.description??null,body:$t(a)})},e[7]=x,e[8]=a,e[9]=p):p=e[9];const h=p;let g;e[10]!==d.update||e[11]!==x||e[12]!==s?(g=x.handleSubmit(async I=>{const $=await d.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:$.title,description:$.description??null,body:$t($)})}),e[10]=d.update,e[11]=x,e[12]=s,e[13]=g):g=e[13];const b=g;if(!a){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let j;e[15]!==a.title?(j=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[15]=a.title,e[16]=j):j=e[16];let S;e[17]!==a.description?(S=a.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[17]=a.description,e[18]=S):S=e[18];let y;e[19]!==j||e[20]!==S?(y=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[j,S]})}),e[19]=j,e[20]=S,e[21]=y):y=e[21];let v;e[22]!==b?(v=()=>{b()},e[22]=b,e[23]=v):v=e[23];let w;e[24]!==x.formState.isDirty||e[25]!==u||e[26]!==h||e[27]!==v?(w=o.jsx(zn,{children:o.jsx(Fn,{onSave:v,onUndo:h,isDirty:x.formState.isDirty,isSaving:u})}),e[24]=x.formState.isDirty,e[25]=u,e[26]=h,e[27]=v,e[28]=w):w=e[28];let C;e[29]!==x?(C=o.jsx("div",{className:"h-full",children:o.jsx(jr,{form:x})}),e[29]=x,e[30]=C):C=e[30];let _;return e[31]!==w||e[32]!==C||e[33]!==y?(_=o.jsxs(he,{children:[y,w,C]}),e[31]=w,e[32]=C,e[33]=y,e[34]=_):_=e[34],_}function Nr(t){const e=N.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=br(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(wr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const Cr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function kr(t){const e=N.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=R(Cr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Ir(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=R("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function _r(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=R("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const Er=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Tr(t){const e=N.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=ko(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(Io,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(_o,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx($r,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function $r({toolName:t,connectionId:e}){const{replayId:n}=to({strict:!1}),s=(()=>{if(!n)return null;const E=`replay-${n}`,O=sessionStorage.getItem(E);if(!O)return null;sessionStorage.removeItem(E);try{return JSON.parse(O)}catch{return null}})(),i=(()=>{if(!s)return null;const E={};for(const[O,P]of Object.entries(s))P!==null&&typeof P=="object"?E[O]=JSON.stringify(P,null,2):E[O]=P;return E})(),[r,l]=k.useState(i??{}),[c,a]=k.useState(s?JSON.stringify(s,null,2):"{}"),[d,u]=k.useState(null),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(null),[b,j]=k.useState(!1),[S,y]=k.useState(null),{org:v}=Z(),w=ut(e),C=ie({connectionId:e,orgId:v.id}),_=Qt({client:C}),I=_.data?.tools?.find(E=>E.name===t),$=So(I?._meta),[A,W]=k.useState("json"),[T,M]=k.useState(!1);$&&!T&&(W("ui"),M(!0));const H=I?.inputSchema?.properties,F=H?Object.keys(H):[],B=F.length>0,V={};if(B&&I?.inputSchema?.properties)for(const E of F)V[E]=I.inputSchema.required?.includes(E)?"":void 0;const z=E=>Object.prototype.hasOwnProperty.call(r,E),Q=async()=>{j(!0),g(null),u(null),m(null),p(null),y(null);const E=performance.now();try{if(!C)throw new Error("MCP client is not available");const O=B?{...V,...r}:(()=>{const G=c.trim();if(!G)return{};const D=JSON.parse(G);if(D&&typeof D=="object")return D;throw new Error("Raw JSON input must be an object.")})();B&&I?.inputSchema?.properties&&Object.entries(I.inputSchema.properties).forEach(([G,D])=>{if((D.type==="object"||D.type==="array")&&typeof O[G]=="string")try{O[G]=JSON.parse(O[G])}catch{}});const P=await C.callTool({name:t,arguments:O}),Y=P.structuredContent??P,le=performance.now(),oe=Math.round(le-E);u(Y),m(P),p(O);const ce=JSON.stringify(Y),te=new TextEncoder().encode(ce).length;y({duration:`${oe}ms`,bytes:`${te} bytes`,tokens:`~${Math.ceil(te/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);g(P||"Unknown error occurred");const Y=performance.now();y({duration:`${Math.round(Y-E)}ms`})}finally{j(!1)}},se=(E,O)=>{l(P=>({...P,[E]:O}))},ee=()=>{u(null),m(null),p(null),g(null),y(null)},U=I?.name??Er(t),J=o.jsx(qn,{children:o.jsxs(Kn,{children:[o.jsx(Pe,{children:o.jsx(rt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:v.slug,project:et},children:"Connections"})})}),o.jsx(it,{}),w&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(rt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:v.slug,project:et,connectionId:e},search:{tab:"tools"},children:w.title})})}),o.jsx(it,{})]}),o.jsx(Pe,{children:o.jsx(Jn,{children:U})})]})});return o.jsx(he,{breadcrumb:J,children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ft,{icon:w?.icon||null,name:w?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[_.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):_.isLoading?o.jsx(dt,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:I?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),I?.inputSchema?.required&&I.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:B&&I?.inputSchema?.properties?Object.entries(I.inputSchema.properties).map(([E,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[E,I.inputSchema?.required?.includes(E)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(Lt,{className:"font-mono text-xs",value:z(E)?r[E]??"":V[E]??"",onChange:P=>se(E,P.target.value),placeholder:`Enter ${E} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:z(E)?String(r[E]??""):"",onValueChange:P=>se(E,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(tt,{value:"true",children:"true"}),o.jsx(tt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:z(E)?r[E]??"":V[E]??"",onChange:P=>se(E,P.target.value),placeholder:`Enter ${E}...`})]},E)):I?.inputSchema&&!B?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(Lt,{className:"font-mono text-xs min-h-[120px]",value:c,onChange:E=>a(E.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),o.jsx(Oo,{annotations:I?.annotations,_meta:I?._meta})]}),S&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(wo,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.duration})]}),S.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(is,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.tokens})]}),S.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ds,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:S.bytes})]}),S.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:S.cost})})]})]}),o.jsxs("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:[o.jsx("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:b?o.jsxs(X,{size:"sm",variant:"destructive",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:ee,children:[o.jsx(ms,{className:"h-3.5 w-3.5"}),"Cancel"]}):o.jsxs(X,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:Q,children:[o.jsx(Zt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),$&&o.jsx(Xt,{children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs(nt,{children:[o.jsx(st,{asChild:!0,children:o.jsx(X,{size:"icon",variant:A==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>W("ui"),children:o.jsx(Co,{size:14})})}),o.jsx(ot,{children:"Interactive view"})]}),o.jsxs(nt,{children:[o.jsx(st,{asChild:!0,children:o.jsx(X,{size:"icon",variant:A==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>W("json"),children:o.jsx(bn,{size:14})})}),o.jsx(ot,{children:"JSON view"})]})]})})]}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(kr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(yo,{className:"h-4 w-4"}),o.jsx(Ir,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(_r,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:$&&A==="ui"&&C?o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex items-center justify-center h-48",children:o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[o.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),o.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:o.jsx(vo,{resourceURI:$,toolInfo:I?{tool:I}:void 0,toolInput:x??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:gn.view.minHeight,maxHeight:gn.view.maxHeight,client:C,className:"h-full"})}):d?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(d,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(X,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(d,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(bn,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})})}function Or(t){const e=N.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!ut(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(dt,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(Tr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const yn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},ln=(t=>t?yn(t):yn),Rr=t=>t;function Dt(t,e=Rr){const n=K.useSyncExternalStore(t.subscribe,K.useCallback(()=>e(t.getState()),[t,e]),K.useCallback(()=>e(t.getInitialState()),[t,e]));return K.useDebugValue(n),n}const Ar=t=>{const e=ln(t),n=s=>Dt(e,s);return Object.assign(n,e),n},Mr=(t=>Ar);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const zt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return zt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return zt(s)(n)}}}},Pr=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(y=>{var v;return y((v=s())!=null?v:x)});const S=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return zt(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const v=r.migrate(y.state,y.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var v;if(j!==c)return;const[w,C]=y;if(p=r.merge(C,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(S?.(p,void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{j===c&&S?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),p||x},xs=Pr,{useSyncExternalStoreWithSelector:Lr}=no,Dr=t=>t;function zr(t,e=Dr,n){const s=Lr(t.subscribe,t.getState,t.getInitialState,e,n);return K.useDebugValue(s),s}const wn=t=>Symbol.iterator in t,Nn=t=>"entries"in t,Cn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Wr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Fr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:wn(t)&&wn(e)?Nn(t)&&Nn(e)?Cn(t,e):Wr(t,e):Cn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Hr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
3
3
  `:""} ${d}${f}: ${n(u)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{r as O,c as U,v as j,j as s,B as se}from"./index-BbuvbhcC.js";import{c as X,a as oe,b as ie,D as le}from"./dropdown-menu-hTX487a_.js";import{n as ne}from"./ArrowDown-MBF4qfeq.js";import{i as re}from"./ArrowUp-nwGLUGoR.js";import{i as Y}from"./Check-rkFTDUnB.js";import{c as ae}from"./Grid01-uA-KjK4P.js";import{i as ce}from"./List-CTxbvNpA.js";import{a as de,b as ue,c as fe,T as me}from"./tooltip-CsJI985k.js";import{B as xe}from"./badge-lNsdvrPX.js";const Z=({size:l=24,color:e="currentColor",...o})=>O.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},O.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));Z.displayName="Sliders01";const pe={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function he(l){const e=U.c(66),{value:o,onValueChange:x,options:t,size:k,fullWidth:C,className:w}=l,M=k===void 0?"sm":k,p=C===void 0?!1:C,_=O.useRef(null),S=O.useRef(null);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={left:0,width:0,opacity:0},e[0]=r):r=e[0];const[h,D]=O.useState(r);let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=F=>{if(!F.current)return;const{offsetLeft:ee,offsetWidth:te}=F.current;D({left:ee,width:te,opacity:1})},e[1]=N):N=e[1];const z=N;let a;e[2]!==t[0].value||e[3]!==o?(a=()=>{const F=o===t[0].value?_:S;z(F)},e[2]=t[0].value,e[3]=o,e[4]=a):a=e[4];let y;e[5]!==t||e[6]!==o?(y=[o,t],e[5]=t,e[6]=o,e[7]=y):y=e[7],O.useEffect(a,y);const i=pe[M];let c;e[8]!==w?(c=j("relative flex gap-0 bg-muted rounded-lg",w),e[8]=w,e[9]=c):c=e[9];let d;e[10]!==x||e[11]!==t[0].value?(d=()=>x(t[0].value),e[10]=x,e[11]=t[0].value,e[12]=d):d=e[12];const b=p?"flex-1 h-12 px-4":i.button,g=!p&&t[0].label?"px-3":"";let n;e[13]!==g||e[14]!==b?(n=j("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b,g),e[13]=g,e[14]=b,e[15]=n):n=e[15];const v=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==i.icon||e[17]!==v?(u=j("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",i.icon,v),e[16]=i.icon,e[17]=v,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=s.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let m;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(m=t[0].label&&s.jsx("span",{className:j("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=m):m=e[25];let T;e[26]!==n||e[27]!==f||e[28]!==m||e[29]!==d?(T=s.jsxs("button",{ref:_,type:"button",onClick:d,className:n,children:[f,m]}),e[26]=n,e[27]=f,e[28]=m,e[29]=d,e[30]=T):T=e[30];let V;e[31]!==x||e[32]!==t[1].value?(V=()=>x(t[1].value),e[31]=x,e[32]=t[1].value,e[33]=V):V=e[33];const K=p?"flex-1 h-12 px-4":i.button,q=!p&&t[1].label?"px-3":"";let $;e[34]!==K||e[35]!==q?($=j("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",K,q),e[34]=K,e[35]=q,e[36]=$):$=e[36];const G=o===t[1].value?"text-foreground":"text-muted-foreground";let B;e[37]!==i.icon||e[38]!==G?(B=j("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",i.icon,G),e[37]=i.icon,e[38]=G,e[39]=B):B=e[39];let E;e[40]!==t[1].icon||e[41]!==B?(E=s.jsx("span",{className:B,children:t[1].icon}),e[40]=t[1].icon,e[41]=B,e[42]=E):E=e[42];let R;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(R=t[1].label&&s.jsx("span",{className:j("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=R):R=e[46];let L;e[47]!==V||e[48]!==$||e[49]!==E||e[50]!==R?(L=s.jsxs("button",{ref:S,type:"button",onClick:V,className:$,children:[E,R]}),e[47]=V,e[48]=$,e[49]=E,e[50]=R,e[51]=L):L=e[51];const H=p?"h-12":i.button;let W;e[52]!==H?(W=j("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",H),e[52]=H,e[53]=W):W=e[53];const J=`${h.left}px`,Q=`${h.width}px`;let I;e[54]!==h.opacity||e[55]!==J||e[56]!==Q?(I={left:J,width:Q,opacity:h.opacity},e[54]=h.opacity,e[55]=J,e[56]=Q,e[57]=I):I=e[57];let P;e[58]!==W||e[59]!==I?(P=s.jsx("div",{className:W,style:I}),e[58]=W,e[59]=I,e[60]=P):P=e[60];let A;return e[61]!==T||e[62]!==L||e[63]!==P||e[64]!==c?(A=s.jsxs("div",{className:c,children:[T,L,P]}),e[61]=T,e[62]=L,e[63]=P,e[64]=c,e[65]=A):A=e[65],A}function Se(l){const e=U.c(33),{viewMode:o,onViewModeChange:x,sortKey:t,sortDirection:k,onSort:C,sortOptions:w,filters:M}=l;let p;e[0]!==w?(p=w===void 0?[]:w,e[0]=w,e[1]=p):p=e[1];const _=p;let S;e[2]!==M?(S=M===void 0?[]:M,e[2]=M,e[3]=S):S=e[3];const r=S;let h;e[4]!==r?(h=r.filter(ge),e[4]=r,e[5]=h):h=e[5];const D=h.length;let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{size:16}),e[6]=N):N=e[6];let z;e[7]!==D?(z=D>0&&s.jsx(xe,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:D}),e[7]=D,e[8]=z):z=e[8];let a;e[9]!==z?(a=s.jsx(de,{asChild:!0,children:s.jsx(oe,{asChild:!0,children:s.jsxs(se,{variant:"outline",size:"icon",className:"size-7 border border-input relative",children:[N,z]})})}),e[9]=z,e[10]=a):a=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ue,{children:"Display & filters"}),e[11]=y):y=e[11];let i;e[12]!==a?(i=s.jsx(fe,{children:s.jsxs(me,{children:[a,y]})}),e[12]=a,e[13]=i):i=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c={value:"table",icon:s.jsx(ce,{})},e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=[c,{value:"cards",icon:s.jsx(ae,{})}],e[15]=d):d=e[15];let b;e[16]!==x||e[17]!==o?(b=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(he,{value:o,onValueChange:x,fullWidth:!0,options:d})}),e[16]=x,e[17]=o,e[18]=b):b=e[18];let g;e[19]!==C||e[20]!==k||e[21]!==t||e[22]!==_?(g=_.length>0&&C&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),_.map(f=>{const m=t===f.id;return s.jsx(X,{onClick:()=>C(f.id),className:j("h-8 px-2 py-0 cursor-pointer",m&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[m&&s.jsx(Y,{size:16,className:"text-foreground shrink-0"}),!m&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:f.label}),m&&k&&(k==="asc"?s.jsx(re,{size:16,className:"text-foreground shrink-0"}):s.jsx(ne,{size:16,className:"text-foreground shrink-0"}))]})},f.id)})]}),e[19]=C,e[20]=k,e[21]=t,e[22]=_,e[23]=g):g=e[23];let n;e[24]!==r?(n=r.map(be),e[24]=r,e[25]=n):n=e[25];let v;e[26]!==b||e[27]!==g||e[28]!==n?(v=s.jsxs(ie,{align:"end",className:"w-[200px] p-0 gap-0",children:[b,g,n]}),e[26]=b,e[27]=g,e[28]=n,e[29]=v):v=e[29];let u;return e[30]!==i||e[31]!==v?(u=s.jsxs(le,{children:[i,v]}),e[30]=i,e[31]=v,e[32]=u):u=e[32],u}function be(l){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l.label}),l.options.map(e=>{const o=l.value===e.id;return s.jsx(X,{onClick:()=>l.onChange(e.id),className:j("h-8 px-2 py-0 cursor-pointer",o&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&s.jsx(Y,{size:16,className:"text-foreground shrink-0"}),!o&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},l.label)}function ge(l){return l.value!=="ALL"}export{Se as C,he as V};
1
+ import{r as O,c as U,v as j,j as s,B as se}from"./index-PEK2-Gur.js";import{c as X,a as oe,b as ie,D as le}from"./dropdown-menu-CxuRGQYq.js";import{n as ne}from"./ArrowDown-BYesfwXe.js";import{i as re}from"./ArrowUp-BCyv-ojK.js";import{i as Y}from"./Check-Camn3oQw.js";import{c as ae}from"./Grid01-CTYtPHN4.js";import{i as ce}from"./List-DXD0Q-rz.js";import{a as de,b as ue,c as fe,T as me}from"./tooltip-CWYwrzX7.js";import{B as xe}from"./badge-DfhuIA_7.js";const Z=({size:l=24,color:e="currentColor",...o})=>O.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},O.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));Z.displayName="Sliders01";const pe={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function he(l){const e=U.c(66),{value:o,onValueChange:x,options:t,size:k,fullWidth:C,className:w}=l,M=k===void 0?"sm":k,p=C===void 0?!1:C,_=O.useRef(null),S=O.useRef(null);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={left:0,width:0,opacity:0},e[0]=r):r=e[0];const[h,D]=O.useState(r);let N;e[1]===Symbol.for("react.memo_cache_sentinel")?(N=F=>{if(!F.current)return;const{offsetLeft:ee,offsetWidth:te}=F.current;D({left:ee,width:te,opacity:1})},e[1]=N):N=e[1];const z=N;let a;e[2]!==t[0].value||e[3]!==o?(a=()=>{const F=o===t[0].value?_:S;z(F)},e[2]=t[0].value,e[3]=o,e[4]=a):a=e[4];let y;e[5]!==t||e[6]!==o?(y=[o,t],e[5]=t,e[6]=o,e[7]=y):y=e[7],O.useEffect(a,y);const i=pe[M];let c;e[8]!==w?(c=j("relative flex gap-0 bg-muted rounded-lg",w),e[8]=w,e[9]=c):c=e[9];let d;e[10]!==x||e[11]!==t[0].value?(d=()=>x(t[0].value),e[10]=x,e[11]=t[0].value,e[12]=d):d=e[12];const b=p?"flex-1 h-12 px-4":i.button,g=!p&&t[0].label?"px-3":"";let n;e[13]!==g||e[14]!==b?(n=j("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b,g),e[13]=g,e[14]=b,e[15]=n):n=e[15];const v=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==i.icon||e[17]!==v?(u=j("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",i.icon,v),e[16]=i.icon,e[17]=v,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=s.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let m;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(m=t[0].label&&s.jsx("span",{className:j("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=m):m=e[25];let T;e[26]!==n||e[27]!==f||e[28]!==m||e[29]!==d?(T=s.jsxs("button",{ref:_,type:"button",onClick:d,className:n,children:[f,m]}),e[26]=n,e[27]=f,e[28]=m,e[29]=d,e[30]=T):T=e[30];let V;e[31]!==x||e[32]!==t[1].value?(V=()=>x(t[1].value),e[31]=x,e[32]=t[1].value,e[33]=V):V=e[33];const K=p?"flex-1 h-12 px-4":i.button,q=!p&&t[1].label?"px-3":"";let $;e[34]!==K||e[35]!==q?($=j("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",K,q),e[34]=K,e[35]=q,e[36]=$):$=e[36];const G=o===t[1].value?"text-foreground":"text-muted-foreground";let B;e[37]!==i.icon||e[38]!==G?(B=j("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",i.icon,G),e[37]=i.icon,e[38]=G,e[39]=B):B=e[39];let E;e[40]!==t[1].icon||e[41]!==B?(E=s.jsx("span",{className:B,children:t[1].icon}),e[40]=t[1].icon,e[41]=B,e[42]=E):E=e[42];let R;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(R=t[1].label&&s.jsx("span",{className:j("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=R):R=e[46];let L;e[47]!==V||e[48]!==$||e[49]!==E||e[50]!==R?(L=s.jsxs("button",{ref:S,type:"button",onClick:V,className:$,children:[E,R]}),e[47]=V,e[48]=$,e[49]=E,e[50]=R,e[51]=L):L=e[51];const H=p?"h-12":i.button;let W;e[52]!==H?(W=j("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",H),e[52]=H,e[53]=W):W=e[53];const J=`${h.left}px`,Q=`${h.width}px`;let I;e[54]!==h.opacity||e[55]!==J||e[56]!==Q?(I={left:J,width:Q,opacity:h.opacity},e[54]=h.opacity,e[55]=J,e[56]=Q,e[57]=I):I=e[57];let P;e[58]!==W||e[59]!==I?(P=s.jsx("div",{className:W,style:I}),e[58]=W,e[59]=I,e[60]=P):P=e[60];let A;return e[61]!==T||e[62]!==L||e[63]!==P||e[64]!==c?(A=s.jsxs("div",{className:c,children:[T,L,P]}),e[61]=T,e[62]=L,e[63]=P,e[64]=c,e[65]=A):A=e[65],A}function Se(l){const e=U.c(33),{viewMode:o,onViewModeChange:x,sortKey:t,sortDirection:k,onSort:C,sortOptions:w,filters:M}=l;let p;e[0]!==w?(p=w===void 0?[]:w,e[0]=w,e[1]=p):p=e[1];const _=p;let S;e[2]!==M?(S=M===void 0?[]:M,e[2]=M,e[3]=S):S=e[3];const r=S;let h;e[4]!==r?(h=r.filter(ge),e[4]=r,e[5]=h):h=e[5];const D=h.length;let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{size:16}),e[6]=N):N=e[6];let z;e[7]!==D?(z=D>0&&s.jsx(xe,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:D}),e[7]=D,e[8]=z):z=e[8];let a;e[9]!==z?(a=s.jsx(de,{asChild:!0,children:s.jsx(oe,{asChild:!0,children:s.jsxs(se,{variant:"outline",size:"icon",className:"size-7 border border-input relative",children:[N,z]})})}),e[9]=z,e[10]=a):a=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ue,{children:"Display & filters"}),e[11]=y):y=e[11];let i;e[12]!==a?(i=s.jsx(fe,{children:s.jsxs(me,{children:[a,y]})}),e[12]=a,e[13]=i):i=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c={value:"table",icon:s.jsx(ce,{})},e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=[c,{value:"cards",icon:s.jsx(ae,{})}],e[15]=d):d=e[15];let b;e[16]!==x||e[17]!==o?(b=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(he,{value:o,onValueChange:x,fullWidth:!0,options:d})}),e[16]=x,e[17]=o,e[18]=b):b=e[18];let g;e[19]!==C||e[20]!==k||e[21]!==t||e[22]!==_?(g=_.length>0&&C&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),_.map(f=>{const m=t===f.id;return s.jsx(X,{onClick:()=>C(f.id),className:j("h-8 px-2 py-0 cursor-pointer",m&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[m&&s.jsx(Y,{size:16,className:"text-foreground shrink-0"}),!m&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:f.label}),m&&k&&(k==="asc"?s.jsx(re,{size:16,className:"text-foreground shrink-0"}):s.jsx(ne,{size:16,className:"text-foreground shrink-0"}))]})},f.id)})]}),e[19]=C,e[20]=k,e[21]=t,e[22]=_,e[23]=g):g=e[23];let n;e[24]!==r?(n=r.map(be),e[24]=r,e[25]=n):n=e[25];let v;e[26]!==b||e[27]!==g||e[28]!==n?(v=s.jsxs(ie,{align:"end",className:"w-[200px] p-0 gap-0",children:[b,g,n]}),e[26]=b,e[27]=g,e[28]=n,e[29]=v):v=e[29];let u;return e[30]!==i||e[31]!==v?(u=s.jsxs(le,{children:[i,v]}),e[30]=i,e[31]=v,e[32]=u):u=e[32],u}function be(l){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l.label}),l.options.map(e=>{const o=l.value===e.id;return s.jsx(X,{onClick:()=>l.onChange(e.id),className:j("h-8 px-2 py-0 cursor-pointer",o&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&s.jsx(Y,{size:16,className:"text-foreground shrink-0"}),!o&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},l.label)}function ge(l){return l.value!=="ALL"}export{Se as C,he as V};
@@ -1 +1 @@
1
- import{c as v,v as N,j as t}from"./index-BbuvbhcC.js";import{i as y}from"./Loading01-ZX06xZy4.js";import{i as C}from"./SearchMd-BJW1WwdD.js";import{I as w}from"./input-3waZIRG0.js";function S(){const u=v.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),u[0]=e):e=u[0],e}function z(u){const e=v.c(24),{image:f,title:h,description:j,actions:d,className:p,descriptionClassName:g,actionsClassName:x}=u;let c;e[0]!==p?(c=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",p),e[0]=p,e[1]=c):c=e[1];let s;e[2]!==f?(s=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(S,{})}),e[2]=f,e[3]=s):s=e[3];let o;e[4]!==h?(o=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:h}),e[4]=h,e[5]=o):o=e[5];let l;e[6]!==g?(l=N("text-sm text-muted-foreground text-center max-w-[300px]",g),e[6]=g,e[7]=l):l=e[7];let i;e[8]!==j||e[9]!==l?(i=t.jsx("div",{className:l,children:j}),e[8]=j,e[9]=l,e[10]=i):i=e[10];let r;e[11]!==o||e[12]!==i?(r=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o,i]}),e[11]=o,e[12]=i,e[13]=r):r=e[13];let a;e[14]!==d||e[15]!==x?(a=d&&t.jsx("div",{className:N("flex items-center gap-2",x),children:d}),e[14]=d,e[15]=x,e[16]=a):a=e[16];let n;e[17]!==r||e[18]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[r,a]}),e[17]=r,e[18]=a,e[19]=n):n=e[19];let m;return e[20]!==c||e[21]!==s||e[22]!==n?(m=t.jsxs("div",{className:c,children:[s,n]}),e[20]=c,e[21]=s,e[22]=n,e[23]=m):m=e[23],m}function R(u){const e=v.c(21),{value:f,onChange:h,placeholder:j,onKeyDown:d,className:p,isSearching:g,disabled:x}=u,c=j===void 0?"Search...":j;let s;e[0]!==p?(s=N("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=s):s=e[1];const o=x?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==o?(l=N("flex items-center gap-2.5 h-12 px-4",o),e[2]=o,e[3]=l):l=e[3];let i;e[4]!==g?(i=g?t.jsx(y,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=g,e[5]=i):i=e[5];let r;e[6]!==h?(r=b=>h(b.target.value),e[6]=h,e[7]=r):r=e[7];let a;e[8]!==x||e[9]!==d||e[10]!==c||e[11]!==r||e[12]!==f?(a=t.jsx(w,{value:f,onChange:r,onKeyDown:d,placeholder:c,disabled:x,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[8]=x,e[9]=d,e[10]=c,e[11]=r,e[12]=f,e[13]=a):a=e[13];let n;e[14]!==l||e[15]!==i||e[16]!==a?(n=t.jsxs("label",{className:l,children:[i,a]}),e[14]=l,e[15]=i,e[16]=a,e[17]=n):n=e[17];let m;return e[18]!==s||e[19]!==n?(m=t.jsx("div",{className:s,children:n}),e[18]=s,e[19]=n,e[20]=m):m=e[20],m}export{R as C,z as E};
1
+ import{c as v,v as N,j as t}from"./index-PEK2-Gur.js";import{i as y}from"./Loading01-HszUOya-.js";import{i as C}from"./SearchMd-3WCi1VDc.js";import{I as w}from"./input-sgdy4h-T.js";function S(){const u=v.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),u[0]=e):e=u[0],e}function z(u){const e=v.c(24),{image:f,title:h,description:j,actions:d,className:p,descriptionClassName:g,actionsClassName:x}=u;let c;e[0]!==p?(c=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",p),e[0]=p,e[1]=c):c=e[1];let s;e[2]!==f?(s=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(S,{})}),e[2]=f,e[3]=s):s=e[3];let o;e[4]!==h?(o=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:h}),e[4]=h,e[5]=o):o=e[5];let l;e[6]!==g?(l=N("text-sm text-muted-foreground text-center max-w-[300px]",g),e[6]=g,e[7]=l):l=e[7];let i;e[8]!==j||e[9]!==l?(i=t.jsx("div",{className:l,children:j}),e[8]=j,e[9]=l,e[10]=i):i=e[10];let r;e[11]!==o||e[12]!==i?(r=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o,i]}),e[11]=o,e[12]=i,e[13]=r):r=e[13];let a;e[14]!==d||e[15]!==x?(a=d&&t.jsx("div",{className:N("flex items-center gap-2",x),children:d}),e[14]=d,e[15]=x,e[16]=a):a=e[16];let n;e[17]!==r||e[18]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[r,a]}),e[17]=r,e[18]=a,e[19]=n):n=e[19];let m;return e[20]!==c||e[21]!==s||e[22]!==n?(m=t.jsxs("div",{className:c,children:[s,n]}),e[20]=c,e[21]=s,e[22]=n,e[23]=m):m=e[23],m}function R(u){const e=v.c(21),{value:f,onChange:h,placeholder:j,onKeyDown:d,className:p,isSearching:g,disabled:x}=u,c=j===void 0?"Search...":j;let s;e[0]!==p?(s=N("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=s):s=e[1];const o=x?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==o?(l=N("flex items-center gap-2.5 h-12 px-4",o),e[2]=o,e[3]=l):l=e[3];let i;e[4]!==g?(i=g?t.jsx(y,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=g,e[5]=i):i=e[5];let r;e[6]!==h?(r=b=>h(b.target.value),e[6]=h,e[7]=r):r=e[7];let a;e[8]!==x||e[9]!==d||e[10]!==c||e[11]!==r||e[12]!==f?(a=t.jsx(w,{value:f,onChange:r,onKeyDown:d,placeholder:c,disabled:x,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[8]=x,e[9]=d,e[10]=c,e[11]=r,e[12]=f,e[13]=a):a=e[13];let n;e[14]!==l||e[15]!==i||e[16]!==a?(n=t.jsxs("label",{className:l,children:[i,a]}),e[14]=l,e[15]=i,e[16]=a,e[17]=n):n=e[17];let m;return e[18]!==s||e[19]!==n?(m=t.jsx("div",{className:s,children:n}),e[18]=s,e[19]=n,e[20]=m):m=e[20],m}export{R as C,z as E};
@@ -1 +1 @@
1
- import{c as Ae,j as t,B as Ie,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-BbuvbhcC.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{C as Fe}from"./collection-display-button-DmhgFxWQ.js";import{C as ot,E as it}from"./collection-search-CJODK4wM.js";import{C as nt}from"./card-CT6tLP8V.js";import{I as ke}from"./integration-icon-Cso-M9or.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-hTX487a_.js";import{a as Be}from"./Copy01-tYgWW7Z7.js";import{i as Re}from"./DotsVertical-CmV9wwH7.js";import{i as Ve}from"./Edit01-DLt4viGj.js";import{s as Ge}from"./Eye-B2hby3r0.js";import{s as Je}from"./Trash01-BF5joJVw.js";import{C as rt}from"./collection-table-wrapper-DcuTtOH8.js";import{E as ze}from"./empty-state-gxm2ae19.js";import{n as Ee}from"./Inbox01-DtkSOVs2.js";import{U as lt}from"./user-LUr-tC3q.js";import{u as at}from"./use-list-state-BIMMDA8z.js";import{B as ct}from"./constants-uhhGmW7q.js";import{A as dt,h as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-DKBAIL5X.js";import{u as jt,e as Ct}from"./use-collections-C3ir-ysk.js";import{u as vt}from"./constants-n-gIPEUY.js";import{s as bt}from"./Plus-DfSe6meC.js";import{V as yt}from"./layout-DyxVovYn.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(nt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(rt,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(lt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function ds(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=at(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(ot,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(it,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ds as C};
1
+ import{c as Ae,j as t,B as Ie,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-PEK2-Gur.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{C as Fe}from"./collection-display-button-CVVCR82C.js";import{C as ot,E as it}from"./collection-search-BVMX34xh.js";import{C as nt}from"./card-DXg2GX79.js";import{I as ke}from"./integration-icon-CF_VTof8.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-CxuRGQYq.js";import{a as Be}from"./Copy01-GXSpNbxP.js";import{i as Re}from"./DotsVertical-DgG2OQVv.js";import{i as Ve}from"./Edit01-nsEjgwmh.js";import{s as Ge}from"./Eye-DQF_Qzuy.js";import{s as Je}from"./Trash01-CAKaaYMp.js";import{C as rt}from"./collection-table-wrapper-C0TGGJ6J.js";import{E as ze}from"./empty-state-BRx85n5e.js";import{n as Ee}from"./Inbox01-DTh-ZtU7.js";import{U as lt}from"./user-CLAm4Myt.js";import{u as at}from"./use-list-state-BFxcsMHC.js";import{B as ct}from"./constants-C6iMC3JV.js";import{A as dt,h as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-CtNI8LvE.js";import{u as jt,e as Ct}from"./use-collections-CdWUwl8U.js";import{u as vt}from"./constants-9aDFHfpv.js";import{s as bt}from"./Plus-BaoKmylk.js";import{V as yt}from"./layout-BIum7cxT.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(nt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(rt,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(lt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function ds(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=at(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(ot,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(it,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ds as C};
@@ -1 +1 @@
1
- import{c as k,j as r,v as C}from"./index-BbuvbhcC.js";import{T as S,a as R,b as T,c as H,d as L,e as z}from"./table-BvLxXDfn.js";import{n as D}from"./ArrowDown-MBF4qfeq.js";import{i as E}from"./ArrowUp-nwGLUGoR.js";function I(y){const e=k.c(29),{columns:s,data:f,sortKey:u,sortDirection:x,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==x?(p=function(t,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let o;if(e[3]!==s||e[4]!==i||e[5]!==b||e[6]!==u){let l;e[8]!==s.length||e[9]!==i||e[10]!==b||e[11]!==u?(l=(t,h)=>{const N=u===t.id;return r.jsx(S,{className:C(a(h,s.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=s.length,e[9]=i,e[10]=b,e[11]=u,e[12]=l):l=e[12],o=s.map(l),e[3]=s,e[4]=i,e[5]=b,e[6]=u,e[7]=o}else o=e[7];let g;e[13]!==o?(g=r.jsx(R,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:o})}),e[13]=o,e[14]=g):g=e[14];let j;if(e[15]!==s||e[16]!==f||e[17]!==n||e[18]!==c){let l;e[20]!==s||e[21]!==n||e[22]!==c?(l=(t,h)=>{const N=c?.(t);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:s.map(m=>r.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=s,e[21]=n,e[22]=c,e[23]=l):l=e[23],j=f.map(l),e[15]=s,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function W(y){const e=k.c(12),{columns:s,data:f,isLoading:u,sortKey:x,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(u===void 0?!1:u){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let o;return e[3]!==a?(o=r.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=o):o=e[4],o}let d;return e[5]!==s||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==x?(d=r.jsx("div",{className:"flex-1 overflow-auto",children:r.jsx(I,{columns:s,data:f,sortKey:x,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=s,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=x,e[11]=d):d=e[11],d}export{W as C};
1
+ import{c as k,j as r,v as C}from"./index-PEK2-Gur.js";import{T as S,a as R,b as T,c as H,d as L,e as z}from"./table-X8r3lDFL.js";import{n as D}from"./ArrowDown-BYesfwXe.js";import{i as E}from"./ArrowUp-BCyv-ojK.js";function I(y){const e=k.c(29),{columns:s,data:f,sortKey:u,sortDirection:x,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==x?(p=function(t,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let o;if(e[3]!==s||e[4]!==i||e[5]!==b||e[6]!==u){let l;e[8]!==s.length||e[9]!==i||e[10]!==b||e[11]!==u?(l=(t,h)=>{const N=u===t.id;return r.jsx(S,{className:C(a(h,s.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=s.length,e[9]=i,e[10]=b,e[11]=u,e[12]=l):l=e[12],o=s.map(l),e[3]=s,e[4]=i,e[5]=b,e[6]=u,e[7]=o}else o=e[7];let g;e[13]!==o?(g=r.jsx(R,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:o})}),e[13]=o,e[14]=g):g=e[14];let j;if(e[15]!==s||e[16]!==f||e[17]!==n||e[18]!==c){let l;e[20]!==s||e[21]!==n||e[22]!==c?(l=(t,h)=>{const N=c?.(t);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:s.map(m=>r.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=s,e[21]=n,e[22]=c,e[23]=l):l=e[23],j=f.map(l),e[15]=s,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function W(y){const e=k.c(12),{columns:s,data:f,isLoading:u,sortKey:x,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(u===void 0?!1:u){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let o;return e[3]!==a?(o=r.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=o):o=e[4],o}let d;return e[5]!==s||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==x?(d=r.jsx("div",{className:"flex-1 overflow-auto",children:r.jsx(I,{columns:s,data:f,sortKey:x,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=s,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=x,e[11]=d):d=e[11],d}export{W as C};
@@ -1 +1 @@
1
- import{c as f,v as u,j as m}from"./index-BbuvbhcC.js";import{B as g}from"./badge-lNsdvrPX.js";function v(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{v as C};
1
+ import{c as f,v as u,j as m}from"./index-PEK2-Gur.js";import{B as g}from"./badge-DfhuIA_7.js";function v(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{v as C};
@@ -1 +1 @@
1
- import{c as r,v as m,j as n}from"./index-BbuvbhcC.js";import{_ as d}from"./index-DAa3pAko.js";import{i}from"./SearchMd-BJW1WwdD.js";function x(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function g(l){const e=r.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(i,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let a;e[4]!==t?(a=m("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=a):a=e[5];let c;return e[6]!==s||e[7]!==a?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(d.Input,{"data-slot":"command-input",className:a,...s})]}),e[6]=s,e[7]=a,e[8]=c):c=e[8],c}function h(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function v(l){const e=r.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(d.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function N(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function b(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function _(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}export{N as C,h as a,x as b,g as c,v as d,_ as e,b as f};
1
+ import{c as r,v as m,j as n}from"./index-PEK2-Gur.js";import{_ as d}from"./index-B9MYwIUx.js";import{i}from"./SearchMd-3WCi1VDc.js";function x(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function g(l){const e=r.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(i,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let a;e[4]!==t?(a=m("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=a):a=e[5];let c;return e[6]!==s||e[7]!==a?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(d.Input,{"data-slot":"command-input",className:a,...s})]}),e[6]=s,e[7]=a,e[8]=c):c=e[8],c}function h(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function v(l){const e=r.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(d.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function N(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function b(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function _(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}export{N as C,h as a,x as b,g as c,v as d,_ as e,b as f};
@@ -1 +1 @@
1
- import{c as T,bY as M,j as e,bZ as P,n as q,r as R,t as f,B as y,e as O}from"./index-BbuvbhcC.js";import{u as A}from"./useQuery-DSSFwRKz.js";import{u as _}from"./useMutation-DlDipIME.js";import{C as N,a as v}from"./card-CT6tLP8V.js";import{i as L,a as U}from"./mcp-oauth-B58ki0is.js";import{c as C,C as K,a as k}from"./circle-alert-ClRs8xPF.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Y=C("refresh-cw",J),B=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(f.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");f.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){f.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),f.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");f.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),h=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(w,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(B,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),h&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(k,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!h&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!h&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(Y,{className:"size-4 mr-2"}),"Reconnect"]}),h&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!h&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function ne(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{ne as default};
1
+ import{c as T,bY as M,j as e,bZ as P,n as q,r as R,t as f,B as y,e as O}from"./index-PEK2-Gur.js";import{u as A}from"./useQuery-C84LCuAf.js";import{u as _}from"./useMutation-Bwc-v8Ow.js";import{C as N,a as v}from"./card-DXg2GX79.js";import{i as L,a as U}from"./mcp-oauth-6xg1H94l.js";import{c as C,C as K,a as k}from"./circle-alert-DpFL31gA.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Y=C("refresh-cw",J),B=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(f.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");f.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){f.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),f.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");f.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),h=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(w,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(B,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),h&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(k,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!h&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!h&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(Y,{className:"size-4 mr-2"}),"Reconnect"]}),h&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!h&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function ne(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{ne as default};