decocms 4.76.45 → 4.76.47

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 (244) hide show
  1. package/dist/client/assets/{AlertCircle-B947WyJr.js → AlertCircle-Ct_trIMg.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BfsmrOXE.js → AreaChart-CRrsPyiX.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Bs_6P4Iu.js → ArrowUp-B82j0m1n.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BxZoQJWz.js → ArrowUpRight-Bs0BPetC.js} +1 -1
  5. package/dist/client/assets/{Check-CcnPQW8L.js → Check-DXck-8sV.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BU0_-3Q5.js → CheckCircle-S9jWn5Mh.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-HIcxNu9L.js → ChevronDown-CLM1j2jp.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C5hCj-BJ.js → ChevronRight-C2E5Dp54.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-zg_HGLWR.js → ChevronUp-BeHashnH.js} +1 -1
  10. package/dist/client/assets/{Circle-Bsy8_p9X.js → Circle-BsSfrq3e.js} +1 -1
  11. package/dist/client/assets/{Copy01-CEOVwp8a.js → Copy01-DpaC4fYW.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BlOzCsHI.js → DotsVertical-CF_wSve9.js} +1 -1
  13. package/dist/client/assets/{Eye-CDNr9lij.js → Eye-C-SV3lvP.js} +1 -1
  14. package/dist/client/assets/{FilterLines-CY9-eI6Z.js → FilterLines-CwURjVGJ.js} +1 -1
  15. package/dist/client/assets/{Flag01-C5CmZtnc.js → Flag01-Dvft4iTD.js} +1 -1
  16. package/dist/client/assets/{Globe01-C0_GSmts.js → Globe01-BIR5236w.js} +1 -1
  17. package/dist/client/assets/{Globe04-blrjzALH.js → Globe04-iZSw58kd.js} +1 -1
  18. package/dist/client/assets/{HardDrive-DDCNtQf8.js → HardDrive-5OBzO_Ky.js} +1 -1
  19. package/dist/client/assets/{Key01-DhaQwTr9.js → Key01-7lp-E5Gc.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-CDGSUvFB.js → LayoutLeft-HNJhsqgp.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-wH6B14C5.js → LinkExternal01-CUjeXN47.js} +1 -1
  22. package/dist/client/assets/{List-CT_BXxlG.js → List-BEh5bEKM.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CGFN5sGg.js → Monitor01-B7wjMyMa.js} +1 -1
  24. package/dist/client/assets/{Package-Dl0Lfmce.js → Package-B0UrtPIN.js} +1 -1
  25. package/dist/client/assets/{Palette-B0Atethk.js → Palette-zbGC5Dmm.js} +1 -1
  26. package/dist/client/assets/{Play-Dz4heBw1.js → Play-Bz0A3Y5e.js} +1 -1
  27. package/dist/client/assets/{Plus-DkxBw62L.js → Plus--M9dcPMO.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BxBwkXRA.js → SearchLg-Ds17lwee.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Ck8RI60i.js → SearchMd-gGSITpAR.js} +1 -1
  30. package/dist/client/assets/{Settings02-OSetn6ea.js → Settings02-C0J3RccK.js} +1 -1
  31. package/dist/client/assets/{Shield01-Dq-HMUMk.js → Shield01-Ce0QsQf7.js} +1 -1
  32. package/dist/client/assets/{Star01-BlQBW3oI.js → Star01-DRz1zPRR.js} +1 -1
  33. package/dist/client/assets/{Stars01-COr-0k43.js → Stars01-D9poRNZc.js} +1 -1
  34. package/dist/client/assets/{Stars02-Uz2mjN30.js → Stars02-XI_d0UtF.js} +1 -1
  35. package/dist/client/assets/{Sun-NMZSBMue.js → Sun-DgguBwdj.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-aHLJ4VFM.js → SwitchHorizontal01-Bb2rm5VX.js} +1 -1
  37. package/dist/client/assets/{Tool01-DPdDFdYA.js → Tool01-Cob0Vw_0.js} +1 -1
  38. package/dist/client/assets/{Tool02-CIj3JzdV.js → Tool02-DXqnzmcu.js} +1 -1
  39. package/dist/client/assets/{Trash01-ZIY4ACli.js → Trash01-LoLcmAxw.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-DqQByDKq.js → TrendUp01-B3bGMiCS.js} +1 -1
  41. package/dist/client/assets/{Upload01-D1HGy3QV.js → Upload01-By7jF-FG.js} +1 -1
  42. package/dist/client/assets/{User01-B2aITRRg.js → User01-DN2LKLDR.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-CoO5zvRr.js → UserPlus01-D3Z-h9xL.js} +1 -1
  44. package/dist/client/assets/{Users01-HqZawgTe.js → Users01-CYM1Paj5.js} +1 -1
  45. package/dist/client/assets/{Users03-C7WKxyUR.js → Users03-DXSIuYIP.js} +1 -1
  46. package/dist/client/assets/{X-Dmet8wMD.js → X-CQq_1twc.js} +1 -1
  47. package/dist/client/assets/{XCircle-BKwKlF9U.js → XCircle-ASq_08UK.js} +1 -1
  48. package/dist/client/assets/{XClose-iezakeMo.js → XClose-D892yOuU.js} +1 -1
  49. package/dist/client/assets/{Zap-CfXP7HDl.js → Zap-Dj5WEZOq.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-ChZlLfh_.js → ZapSquare-CJb5VJO8.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-9DZqfrOE.js → ZoomOut-D6w1kwx5.js} +1 -1
  52. package/dist/client/assets/{access-gate-w5g_NZJz.js → access-gate-Cte8vird.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-EZt3P0Xz.js → add-section-modal-5v7pD4SQ.js} +1 -1
  54. package/dist/client/assets/{agent-icon-3oSe4h7A.js → agent-icon-CUA9P-jc.js} +1 -1
  55. package/dist/client/assets/{agents-list--g3RXbon.js → agents-list-B93b7IVZ.js} +1 -1
  56. package/dist/client/assets/{ai-providers-xzs6ey-5.js → ai-providers-BRXXB4cN.js} +1 -1
  57. package/dist/client/assets/{alert-BYCTaSqx.js → alert-Da3QWuKN.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-DFA_nrL8.js → alert-dialog-CJ86orwZ.js} +1 -1
  59. package/dist/client/assets/{app-editor-C2t8oVQ9.js → app-editor-DmGtlWPK.js} +1 -1
  60. package/dist/client/assets/{auth-CYtv0_rL.js → auth-CT66LXeD.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-DYzFRFT-.js → auth-catchall-DDpoyxbX.js} +1 -1
  62. package/dist/client/assets/auth-entry-CJ1pSE1Z.js +1 -0
  63. package/dist/client/assets/{auth-split-layout-hlCmxHcd.js → auth-split-layout-ZTn9O9-g.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-CRs0CnsY.js → authenticate-and-persist-oauth-Dye31GIc.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-DjYgTsuk.js → automation-list-row-DQcu9s-J.js} +1 -1
  66. package/dist/client/assets/automation-runs-_Se0pK9p.js +188 -0
  67. package/dist/client/assets/automations-CSrJ7eYr.js +1 -0
  68. package/dist/client/assets/{autosend-DpuAJlz4.js → autosend-C-Afy-mX.js} +1 -1
  69. package/dist/client/assets/{avatar-DGZ13TB0.js → avatar-b0UOFm48.js} +1 -1
  70. package/dist/client/assets/{badge-BmdcYP2l.js → badge-xfs1ynpW.js} +1 -1
  71. package/dist/client/assets/{block-document-gXgzA-JT.js → block-document-DFPlSnch.js} +1 -1
  72. package/dist/client/assets/{brand-context-D5LAfjNE.js → brand-context-JAXn00lw.js} +1 -1
  73. package/dist/client/assets/{buckets-BaIxp0Ei.js → buckets-DiBOr7SS.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-Dku6xKUm.js → bulk-category-panel-DZuxbcSe.js} +1 -1
  75. package/dist/client/assets/{calendar-CpBuBa24.js → calendar-QS-mHt0z.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-CKORpXPj.js → capability-load-error-ChIN_BDy.js} +1 -1
  77. package/dist/client/assets/{card-COkVnQnP.js → card-Co4NmtE1.js} +1 -1
  78. package/dist/client/assets/{category-editor-CkzYWT7p.js → category-editor-uB6Fkscc.js} +1 -1
  79. package/dist/client/assets/{chat-context-DVVCYt3e.js → chat-context-CyccsWfT.js} +1 -1
  80. package/dist/client/assets/{checkbox-BCHArcau.js → checkbox-Cp4HiBAg.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-CgPoi_vX.js → cli-auth-success-QaLl6QS3.js} +1 -1
  82. package/dist/client/assets/{collection-detail-DonuJ1ea.js → collection-detail-BIW8kaVI.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-DX-E5s8i.js → collection-display-button-BDBK9_HJ.js} +1 -1
  84. package/dist/client/assets/{collection-search-BwRybpDA.js → collection-search-CuJVF_4n.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-Cm_vq1an.js → collection-table-wrapper-CUk03yJh.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-CGlZLNZG.js → collection-tabs-D2dxWVhJ.js} +1 -1
  87. package/dist/client/assets/{command-DYuWdmIc.js → command-CMAhy6e5.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-oXX0RjMQ.js → commerce-onboarding-D-7dNjEu.js} +1 -1
  89. package/dist/client/assets/{companions-core-BN8wLX0q.js → companions-core-BPrxC_5K.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-nlx1v20u.js → connect-desktop-dialog-H-XQO8xQ.js} +1 -1
  91. package/dist/client/assets/{connection-card-B2p6WHp7.js → connection-card-CSc4h430.js} +1 -1
  92. package/dist/client/assets/{connection-detail-DNd225oV.js → connection-detail-CMeFrX8_.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-CTe9zYBl.js → connection-form-helpers-C4JWE9qO.js} +1 -1
  94. package/dist/client/assets/{connections-B2k7UMz9.js → connections-C8LbGkrU.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-yvpwgZWV.js → decopilot-sse-pool-ZSJ8gdM5.js} +1 -1
  96. package/dist/client/assets/{dialog-CvMUMR16.js → dialog-Zrgg9dlk.js} +1 -1
  97. package/dist/client/assets/{domain-settings-rz9NZ9fx.js → domain-settings-BECeOIgB.js} +1 -1
  98. package/dist/client/assets/{drawer-CQuJuOwU.js → drawer-BwuvaJKk.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-C_qDMDJc.js → dropdown-menu-BCoimvOX.js} +1 -1
  100. package/dist/client/assets/{empty-state-DFI2pRsv.js → empty-state-CWZTKjMO.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-BFt9JrM6.js → extract-connection-data-DKUEpjtm.js} +1 -1
  102. package/dist/client/assets/file-explorer-CaYXdPte.js +2 -0
  103. package/dist/client/assets/{file-type-icon-DSufmAQ5.js → file-type-icon-9V1QXJ8L.js} +1 -1
  104. package/dist/client/assets/{files-C_2xnvjf.js → files-CViIR-kp.js} +1 -1
  105. package/dist/client/assets/{form-Bo-8Ln1U.js → form-DxNXQDnh.js} +1 -1
  106. package/dist/client/assets/{general-YPYBXJRf.js → general-nldp1532.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-DfirfuAT.js → github-repo-picker-CAzdUaIn.js} +1 -1
  108. package/dist/client/assets/{hooks-DOkARyS2.js → hooks-BAhswesL.js} +1 -1
  109. package/dist/client/assets/{index-CS4EwFaR.js → index-19zxQHGF.js} +1 -1
  110. package/dist/client/assets/{index-CFF-0dHO.js → index-B41Bwftt.js} +1 -1
  111. package/dist/client/assets/{index-B5cMFR-y.js → index-B5v4NEW3.js} +4 -4
  112. package/dist/client/assets/{index-BPVYWTbD.js → index-BXilFfeF.js} +1 -1
  113. package/dist/client/assets/{index-Oe3PDrxX.js → index-BqP8n8ZB.js} +1 -1
  114. package/dist/client/assets/{index-YA1G0WAf.js → index-CAS46UgV.js} +1 -1
  115. package/dist/client/assets/{index-r5DmdNN7.js → index-CraRnyl2.js} +1 -1
  116. package/dist/client/assets/index-CttRGCsZ.js +8 -0
  117. package/dist/client/assets/index-DBNT2eWA.js +173 -0
  118. package/dist/client/assets/{index-Ci3NpEBH.js → index-DOtxc4qw.js} +2 -2
  119. package/dist/client/assets/{index-CwVaTFWi.js → index-DWemiin_.js} +1 -1
  120. package/dist/client/assets/{index-BALkJ2dx.js → index-DhupVI1X.js} +1 -1
  121. package/dist/client/assets/index-XvNgqTsm.js +1 -0
  122. package/dist/client/assets/{index-redirect-CIUk-Gax.js → index-redirect-B2Q2or9L.js} +1 -1
  123. package/dist/client/assets/{index-DwqZiRTX.js → index-zMGhLGpG.js} +28 -28
  124. package/dist/client/assets/{input-BsEx9qgh.js → input-Ch5gyTpF.js} +1 -1
  125. package/dist/client/assets/{integration-icon-BjKZxHyL.js → integration-icon-CgQElrXW.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-DfAJpHso.js → invite-member-dialog-ahQAh7y0.js} +1 -1
  127. package/dist/client/assets/{label-itDnpE7k.js → label-wXoTBNOj.js} +1 -1
  128. package/dist/client/assets/{layout-BeTn9gVm.js → layout-BbxH1dqm.js} +1 -1
  129. package/dist/client/assets/{login-BrNTuDDo.js → login-BQPbZgK0.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-DTAyDU2Q.js → mcp-oauth-CCKUAqNW.js} +1 -1
  131. package/dist/client/assets/{members-DyvIH1z_.js → members-DC-wFfsX.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-D_6PkZ4D.js → monaco-editor-D01rdtwj.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-qpSnjSHX.js → monitoring-stats-row-ili_SMbB.js} +1 -1
  134. package/dist/client/assets/multi-select-BiBr3WcW.js +1 -0
  135. package/dist/client/assets/{oauth-callback-Bx2hE0re.js → oauth-callback-D3CA1b_1.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-CxI3pM83.js → oauth-callback-ai-provider-CmS7j-H6.js} +1 -1
  137. package/dist/client/assets/onboarding-oIerFpQ4.js +1 -0
  138. package/dist/client/assets/{org-install-B8UtLZNk.js → org-install-ng2zG1Ih.js} +1 -1
  139. package/dist/client/assets/{org-layout-DLChqlHX.js → org-layout-C7_jwviQ.js} +1 -1
  140. package/dist/client/assets/{organization-choice-BJmZA_ql.js → organization-choice-BRIDBGd-.js} +1 -1
  141. package/dist/client/assets/{orgs-B_8qYm3m.js → orgs-CzW9S1so.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-ZcfqdJ3r.js → page-seo-form-DVV9UVOY.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-DWS2178v.js +1 -0
  144. package/dist/client/assets/{popover-DktOaoCj.js → popover-stw0Mg4Y.js} +1 -1
  145. package/dist/client/assets/post-editor-Gkb7rBYy.js +1 -0
  146. package/dist/client/assets/{primitives-B3tg18Ev.js → primitives-BSi-lJi-.js} +1 -1
  147. package/dist/client/assets/{profile-Cm9T7Soa.js → profile-CkEYRh85.js} +1 -1
  148. package/dist/client/assets/project-app-view-DLfzXGeu.js +1 -0
  149. package/dist/client/assets/record-editor-ClWpfK5T.js +1 -0
  150. package/dist/client/assets/redirect-editor-C0n0g6ju.js +1 -0
  151. package/dist/client/assets/registry-CG26WHvr.js +2 -0
  152. package/dist/client/assets/{registry-layout-IoatJ7vG.js → registry-layout-DX8G3iig.js} +1 -1
  153. package/dist/client/assets/{reports-_wvCcLC_.js → reports-Cx3F6VW7.js} +1 -1
  154. package/dist/client/assets/{require-capability-DQnQYS51.js → require-capability-vo1ql1oP.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-PXLv9yf-.js → required-auth-layout-D_MW2r6y.js} +1 -1
  156. package/dist/client/assets/{reset-password-DalzN_iF.js → reset-password-BUadKv_m.js} +1 -1
  157. package/dist/client/assets/{roles-D6U_2d-V.js → roles-DOzhGuZ6.js} +1 -1
  158. package/dist/client/assets/{search-input-DwylCsr-.js → search-input-BZmNJ1mS.js} +1 -1
  159. package/dist/client/assets/{secrets-YNk1kWRi.js → secrets-55RFWUFR.js} +1 -1
  160. package/dist/client/assets/{sections-editor-DYDZI5jr.js → sections-editor-DHZBmDLB.js} +1 -1
  161. package/dist/client/assets/{select-CkNw5vmE.js → select-Bm_prz4e.js} +1 -1
  162. package/dist/client/assets/{select-model-DJy9oKx6.js → select-model-BdX9lqWe.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-1X-Z7ZyX.js → self-tool-result-BInSjvMt.js} +1 -1
  164. package/dist/client/assets/{seo-editor-Cn3g21qw.js → seo-editor-ldJCsafP.js} +1 -1
  165. package/dist/client/assets/settings-layout-CT8w7wPQ.js +1 -0
  166. package/dist/client/assets/{settings-section-M1O3ge8Z.js → settings-section-DJLAq8qW.js} +1 -1
  167. package/dist/client/assets/{shell-controls-CVfU7qci.js → shell-controls-DzMyDjjE.js} +1 -1
  168. package/dist/client/assets/{shell-layout-DoAVrerK.js → shell-layout-DLAZV0gK.js} +1 -1
  169. package/dist/client/assets/{sidebar-BQFslZSt.js → sidebar-DS0o2bkP.js} +1 -1
  170. package/dist/client/assets/{skeleton-CKbIkp-i.js → skeleton-DDLwtl4q.js} +1 -1
  171. package/dist/client/assets/{sso-Cw5YEeWo.js → sso-BwLwvWpb.js} +1 -1
  172. package/dist/client/assets/{store-BtFkKlkI.js → store-Beka71Bx.js} +1 -1
  173. package/dist/client/assets/store-registry-DEtkey9N.js +2 -0
  174. package/dist/client/assets/{studio-tools-C0FSNSO6.js → studio-tools-CMGrpbwo.js} +1 -1
  175. package/dist/client/assets/{switch-BOKpfG2a.js → switch-Dc6TbZCo.js} +1 -1
  176. package/dist/client/assets/{table-B88p_wsC.js → table-B7260dBr.js} +1 -1
  177. package/dist/client/assets/{tabs-DDA7IPHD.js → tabs-_bz-Pk3v.js} +1 -1
  178. package/dist/client/assets/{textarea-D9ia054b.js → textarea-DDDctY6q.js} +1 -1
  179. package/dist/client/assets/{toggle-group-CisLBmfi.js → toggle-group-BuIed1_M.js} +1 -1
  180. package/dist/client/assets/{toolbar-lHwKVbcz.js → toolbar-D4hdPbh0.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-BdhEbL8g.js → toolbar-icon-button-DL5-P742.js} +1 -1
  182. package/dist/client/assets/{tooltip-Cm1Uo3tj.js → tooltip-Cfe7K1Wf.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-BSTSxr9f.js → use-ai-providers-DGlVmIGh.js} +1 -1
  184. package/dist/client/assets/{use-automations-z-3-_HVg.js → use-automations-DoGOQL-D.js} +1 -1
  185. package/dist/client/assets/{use-autosave-DOzBKdWx.js → use-autosave-DjDtv4ur.js} +1 -1
  186. package/dist/client/assets/{use-capability-H0m9y9gf.js → use-capability-CFL9CoDX.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-DVjyQSN6.js → use-clock-tick-Brtfp44X.js} +1 -1
  188. package/dist/client/assets/{use-collections-IkbkyTPy.js → use-collections-BTyUL9Wy.js} +1 -1
  189. package/dist/client/assets/{use-connection-BjfpYHE7.js → use-connection-_0QRydbo.js} +1 -1
  190. package/dist/client/assets/{use-copy-BhCEUwuV.js → use-copy-WkBdr4yo.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-N2ZbWygG.js → use-create-virtual-mcp-DiLQlb2w.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-DRL2Q2vw.js → use-debounced-autosave-DjRMW0Ri.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-DYEvOfgl.js → use-debounced-value-D9mS5nMY.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-CAb1KNIs.js → use-deco-credits-DdaT8kKr.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-CssQ7XMz.js → use-decopilot-events-DJgHT7u7.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-CJ6X4D3N.js → use-delete-connection-Ux0pzJs8.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-DxlBCcMw.js → use-deployment-admin-DNnM204n.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-DniTn_7W.js → use-file-configs-DsNhSUJA.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-BzjM30U0.js → use-infinite-scroll-CubS4jP5.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-DH0ZVoBc.js → use-join-requests-Bnm07fSv.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-B-vnUxNV.js → use-mcp-auth-status-unQW9A6B.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-lixd0gAV.js → use-mcp-client-BhwsvIVS.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-Cv_rmBI5.js → use-mcp-tools-BQDntLa2.js} +1 -1
  204. package/dist/client/assets/{use-members-XsfnxDj6.js → use-members-Bo1ap_nJ.js} +1 -1
  205. package/dist/client/assets/{use-mobile-BYgIZfXj.js → use-mobile-BWkiff8G.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-BAQepcY9.js → use-navigate-to-agent-DcKHP-Dx.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-DNG8tLX7.js → use-org-auth-client-Dht_Ty6R.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-CymoIsv4.js → use-org-sso-CxIr0uRn.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-pkqdjnMJ.js → use-organization-roles-CiHlLWAh.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-DxC5BT5e.js → use-organization-settings-D22Exu1R.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-DzCHf8MS.js → use-registry-connections-7qDPmY1B.js} +1 -1
  212. package/dist/client/assets/{use-secrets-j9NqCesQ.js → use-secrets-B2_i6JKu.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-C-YKbG5N.js → use-status-sounds-Ba0cRZoN.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-C6YHDmgm.js → use-view-mode-BorVmgeT.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-DUjw2r9s.js → use-virtual-mcp-JuKjy5YI.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-CRypCc_i.js +1 -0
  217. package/dist/client/assets/{useRouterState-Cqq6ONsl.js → useRouterState-QQ_hhude.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-yV-mPSY_.js +1 -0
  219. package/dist/client/assets/{users-BlkgmN4u.js → users-DTnFxXyC.js} +1 -1
  220. package/dist/client/assets/variant-calendar-BVLJE_D6.js +1 -0
  221. package/dist/client/assets/{view-mode-toggle-CKsyyD3I.js → view-mode-toggle-19-MtwbX.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/dist/server/server.js +1 -1
  225. package/package.json +1 -1
  226. package/dist/client/assets/auth-entry-DA-DPJTf.js +0 -1
  227. package/dist/client/assets/automation-runs-Db6yr9QX.js +0 -188
  228. package/dist/client/assets/automations-DTXTPNDC.js +0 -1
  229. package/dist/client/assets/file-explorer-CSMp40V7.js +0 -2
  230. package/dist/client/assets/index-BBdtoWBk.js +0 -173
  231. package/dist/client/assets/index-C-wKLEZ2.js +0 -8
  232. package/dist/client/assets/index-CpDqKOXJ.js +0 -1
  233. package/dist/client/assets/onboarding-BX2PevDl.js +0 -1
  234. package/dist/client/assets/page-seo-sheet-DmyH2nwh.js +0 -1
  235. package/dist/client/assets/post-editor-Dy_-iCsZ.js +0 -1
  236. package/dist/client/assets/project-app-view-DHGMtUxb.js +0 -1
  237. package/dist/client/assets/record-editor-225seTN8.js +0 -1
  238. package/dist/client/assets/redirect-editor-BWUzCv5f.js +0 -1
  239. package/dist/client/assets/registry-3lo6s_j5.js +0 -2
  240. package/dist/client/assets/settings-layout-B2pZI8PO.js +0 -1
  241. package/dist/client/assets/store-registry-CRAi8gqB.js +0 -2
  242. package/dist/client/assets/useInfiniteQuery-Bx9w5_18.js +0 -1
  243. package/dist/client/assets/useSuspenseInfiniteQuery-DDY3jNH9.js +0 -1
  244. package/dist/client/assets/variant-calendar-DQDzXWUH.js +0 -1
@@ -1 +1 @@
1
- import{c as d,j as s,cr as i,l as c}from"./index-B5cMFR-y.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cr as i,l as c}from"./index-B5v4NEW3.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-B5cMFR-y.js";import{i as $}from"./Check-CcnPQW8L.js";import{i as D}from"./ChevronRight-C5hCj-BJ.js";import{i as M}from"./Circle-Bsy8_p9X.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
1
+ import{c,j as i,dN as f,dO as m,l as u,dP as g,dQ as x,dR as v,dS as b,dT as h,dU as w,dV as j,dW as N,dX as z,dY as _,dZ as y,d_ as p}from"./index-B5v4NEW3.js";import{i as $}from"./Check-DXck-8sV.js";import{i as D}from"./ChevronRight-C2E5Dp54.js";import{i as M}from"./Circle-BsSfrq3e.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function E(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function G(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function L(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,Q as b,O as c,E as d,V as e,W as f,X as g,L as h,P as i,U as j,G as k};
@@ -1 +1 @@
1
- import{c as v,l as N,j as t}from"./index-B5cMFR-y.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,l as N,j as t}from"./index-B5v4NEW3.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import"./index-B5cMFR-y.js";import{c as O}from"./use-mcp-client-lixd0gAV.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
1
+ import"./index-B5v4NEW3.js";import{c as O}from"./use-mcp-client-BhwsvIVS.js";import{W as T}from"./constants-D_FQAPnt.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=G[n[t]&63];return e};function j(t){return`${t}_${$()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:j("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
@@ -0,0 +1,2 @@
1
+ import{c as Z,r as u,j as r,i as se,B as he,d$ as St,aO as Mt,aU as ie,e0 as Dt,e1 as Rt,e2 as Pt,e3 as Et,bO as kt,e4 as Tt,e5 as Ve,aQ as Ot,e6 as At,e7 as Lt,e8 as It,e9 as Ft,ea as $t,eb as _t,ec as zt,ed as Wt,ee as Gt,l as ae,n as Kt,t as W,K as Fe}from"./index-B5v4NEW3.js";import{F as Bt,l as Ut}from"./index-BqP8n8ZB.js";import{d as Vt,ay as qt,az as Qt,aA as ue,aB as Ht,a7 as $e}from"./agent-icon-CUA9P-jc.js";import{a as Xt}from"./Tool01-Cob0Vw_0.js";import{s as Yt}from"./XClose-D892yOuU.js";import{A as Jt}from"./automation-runs-_Se0pK9p.js";import{b as _e,T as ze,a as We}from"./tooltip-Cfe7K1Wf.js";import{f as Zt,a as en,b as tn,c as nn,d as rn,e as on,A as sn,g as an}from"./alert-dialog-CJ86orwZ.js";import{b as ln}from"./chat-context-CyccsWfT.js";import{u as cn}from"./shell-layout-DLAZV0gK.js";import{s as fe,a as Ge,f as dn}from"./index-zMGhLGpG.js";import{a as un,h as fn,D as mn,c as pn,d as xn,e as hn}from"./dialog-Zrgg9dlk.js";import{I as Ke}from"./input-Ch5gyTpF.js";import{t as gn}from"./ChevronDown-CLM1j2jp.js";import{i as vn}from"./ChevronRight-C2E5Dp54.js";import{a as yn}from"./ZoomOut-D6w1kwx5.js";import{E as Cn,v as Be,w as Ce,x as wn,y as bn,z as jn,A as U,C as me,g as we,D as be,G as Nn,I as Sn,J as je,K as pe,M as Ne,N as Mn,O as Dn}from"./index-DBNT2eWA.js";import"./AlertCircle-Ct_trIMg.js";import"./UserPlus01-D3Z-h9xL.js";import"./ArrowUp-B82j0m1n.js";import"./Settings02-C0J3RccK.js";import"./Tool02-DXqnzmcu.js";import"./XCircle-ASq_08UK.js";import"./ArrowUpRight-Bs0BPetC.js";import"./TrendUp01-B3bGMiCS.js";import"./ZapSquare-CJb5VJO8.js";import"./Users03-DXSIuYIP.js";import"./CheckCircle-S9jWn5Mh.js";import"./Check-DXck-8sV.js";import"./ChevronUp-BeHashnH.js";import"./Circle-BsSfrq3e.js";import"./Stars02-XI_d0UtF.js";import"./Copy01-DpaC4fYW.js";import"./DotsVertical-CF_wSve9.js";import"./Globe01-BIR5236w.js";import"./Eye-C-SV3lvP.js";import"./FilterLines-CwURjVGJ.js";import"./Flag01-Dvft4iTD.js";import"./Star01-DRz1zPRR.js";import"./Globe04-iZSw58kd.js";import"./SwitchHorizontal01-Bb2rm5VX.js";import"./HardDrive-5OBzO_Ky.js";import"./Key01-7lp-E5Gc.js";import"./LayoutLeft-HNJhsqgp.js";import"./LinkExternal01-CUjeXN47.js";import"./List-BEh5bEKM.js";import"./Monitor01-B7wjMyMa.js";import"./Sun-DgguBwdj.js";import"./Package-B0UrtPIN.js";import"./Palette-zbGC5Dmm.js";import"./Play-Bz0A3Y5e.js";import"./Plus--M9dcPMO.js";import"./SearchLg-Ds17lwee.js";import"./SearchMd-gGSITpAR.js";import"./Shield01-Ce0QsQf7.js";import"./Stars01-D9poRNZc.js";import"./Trash01-LoLcmAxw.js";import"./Upload01-By7jF-FG.js";import"./User01-DN2LKLDR.js";import"./Users01-CYM1Paj5.js";import"./X-CQq_1twc.js";import"./Zap-Dj5WEZOq.js";import"./select-Bm_prz4e.js";import"./useInfiniteQuery-CRypCc_i.js";import"./use-infinite-scroll-CubS4jP5.js";import"./use-connection-_0QRydbo.js";import"./use-collections-BTyUL9Wy.js";import"./use-mcp-client-BhwsvIVS.js";import"./constants-D_FQAPnt.js";import"./auth-CT66LXeD.js";import"./use-virtual-mcp-JuKjy5YI.js";import"./card-Co4NmtE1.js";import"./sidebar-DS0o2bkP.js";import"./use-mobile-BWkiff8G.js";import"./table-B7260dBr.js";import"./empty-state-CWZTKjMO.js";import"./use-members-Bo1ap_nJ.js";import"./use-org-auth-client-Dht_Ty6R.js";import"./use-clock-tick-Brtfp44X.js";import"./use-automations-DoGOQL-D.js";import"./studio-tools-CMGrpbwo.js";import"./useSuspenseInfiniteQuery-yV-mPSY_.js";import"./avatar-b0UOFm48.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-WkBdr4yo.js";import"./file-type-icon-9V1QXJ8L.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-D01rdtwj.js";import"./delay-CnY5UFtP.js";import"./index-19zxQHGF.js";import"./hooks-BAhswesL.js";import"./decopilot-sse-pool-ZSJ8gdM5.js";import"./backoff-CrEUbyZT.js";import"./integration-icon-CgQElrXW.js";import"./use-navigate-to-agent-DcKHP-Dx.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CRrsPyiX.js";import"./form-DxNXQDnh.js";import"./label-wXoTBNOj.js";import"./autosend-C-Afy-mX.js";import"./use-ai-providers-DGlVmIGh.js";import"./use-decopilot-events-DJgHT7u7.js";import"./use-organization-settings-D22Exu1R.js";import"./required-auth-layout-D_MW2r6y.js";import"./use-org-sso-CxIr0uRn.js";import"./drawer-BwuvaJKk.js";import"./collection-search-CuJVF_4n.js";import"./tabs-_bz-Pk3v.js";import"./toggle-group-BuIed1_M.js";import"./use-deco-credits-DdaT8kKr.js";import"./extract-connection-data-DKUEpjtm.js";import"./connection-card-CSc4h430.js";import"./use-registry-connections-7qDPmY1B.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DDDctY6q.js";import"./connection-form-helpers-C4JWE9qO.js";import"./authenticate-and-persist-oauth-Dye31GIc.js";import"./mcp-oauth-CCKUAqNW.js";import"./collection-tabs-D2dxWVhJ.js";import"./badge-xfs1ynpW.js";import"./connect-desktop-dialog-H-XQO8xQ.js";import"./select-model-BdX9lqWe.js";import"./checkbox-Cp4HiBAg.js";import"./skeleton-DDLwtl4q.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DJLAq8qW.js";import"./command-CMAhy6e5.js";import"./index-B41Bwftt.js";import"./popover-stw0Mg4Y.js";import"./dropdown-menu-BCoimvOX.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Ba0cRZoN.js";import"./toolbar-D4hdPbh0.js";import"./use-mcp-tools-BQDntLa2.js";import"./use-capability-CFL9CoDX.js";import"./switch-Dc6TbZCo.js";import"./use-debounced-autosave-DjRMW0Ri.js";import"./index-DhupVI1X.js";import"./search-input-BZmNJ1mS.js";import"./use-mcp-auth-status-unQW9A6B.js";import"./github-repo-picker-CAzdUaIn.js";import"./use-debounced-value-D9mS5nMY.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B2_i6JKu.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-BPrxC_5K.js";import"./index-DOtxc4qw.js";import"./get-initials-D-f_fDFw.js";import"./calendar-QS-mHt0z.js";import"./toolbar-icon-button-DL5-P742.js";import"./use-file-configs-DsNhSUJA.js";import"./automation-list-row-DQcu9s-J.js";const Rn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Pn(s){const e=Z.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=s,M=c===void 0?"":c,d=x===void 0?!1:x,[h,v]=u.useState(M),[B,V]=u.useState(i),y=Rn[a];i!==B&&(V(i),i&&v(M));let F;e[0]!==d||e[1]!==g?(F=_=>{!_&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=F):F=e[2];const H=F;let q;e[3]!==d||e[4]!==h||e[5]!==p?(q=async _=>{_.preventDefault();const K=h.trim();!K||d||await p(K)},e[3]=d,e[4]=h,e[5]=p,e[6]=q):q=e[6];const Q=q;let $;e[7]!==y.title?($=r.jsx(un,{children:y.title}),e[7]=y.title,e[8]=$):$=e[8];let T;e[9]!==y.description?(T=r.jsx(fn,{children:y.description}),e[9]=y.description,e[10]=T):T=e[10];let G;e[11]!==$||e[12]!==T?(G=r.jsxs(mn,{children:[$,T]}),e[11]=$,e[12]=T,e[13]=G):G=e[13];let O;e[14]!==m?(O=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(Ke,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=O):O=e[15];let A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=A):A=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=_=>v(_.target.value),e[17]=R):R=e[17];let P;e[18]!==y.placeholder||e[19]!==d||e[20]!==h?(P=r.jsxs("div",{className:"space-y-1.5",children:[A,r.jsx(Ke,{id:"file-explorer-name",value:h,onChange:R,placeholder:y.placeholder,autoFocus:!0,disabled:d})]}),e[18]=y.placeholder,e[19]=d,e[20]=h,e[21]=P):P=e[21];let j;e[22]!==P||e[23]!==O?(j=r.jsxs("div",{className:"space-y-4 py-4",children:[O,P]}),e[22]=P,e[23]=O,e[24]=j):j=e[24];let N;e[25]!==g?(N=()=>g(!1),e[25]=g,e[26]=N):N=e[26];let E;e[27]!==d||e[28]!==N?(E=r.jsx(he,{type:"button",variant:"outline",onClick:N,disabled:d,children:"Cancel"}),e[27]=d,e[28]=N,e[29]=E):E=e[29];let k;e[30]!==d||e[31]!==h?(k=!h.trim()||d,e[30]=d,e[31]=h,e[32]=k):k=e[32];let C;e[33]!==y.submit||e[34]!==d?(C=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):y.submit,e[33]=y.submit,e[34]=d,e[35]=C):C=e[35];let L;e[36]!==k||e[37]!==C?(L=r.jsx(he,{type:"submit",disabled:k,children:C}),e[36]=k,e[37]=C,e[38]=L):L=e[38];let w;e[39]!==E||e[40]!==L?(w=r.jsxs(pn,{children:[E,L]}),e[39]=E,e[40]=L,e[41]=w):w=e[41];let S;e[42]!==Q||e[43]!==j||e[44]!==w||e[45]!==G?(S=r.jsx(xn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:Q,children:[G,j,w]})}),e[42]=Q,e[43]=j,e[44]=w,e[45]=G,e[46]=S):S=e[46];let z;return e[47]!==H||e[48]!==i||e[49]!==S?(z=r.jsx(hn,{open:i,onOpenChange:H,children:S}),e[47]=H,e[48]=i,e[49]=S,e[50]=z):z=e[50],z}var Se="ContextMenu",[En]=Ot(Se,[Ve]),I=Ve(),[kn,qe]=En(Se),Qe=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[x,p]=u.useState(!1),g=I(e),M=kt(a),d=u.useCallback(h=>{p(h),M(h)},[M]);return r.jsx(kn,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(Tt,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:i})})};Qe.displayName=Se;var He="ContextMenuTrigger",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=qe(He,i),x=I(i),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),M=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(M.current),[]),h=v=>{p.current={x:v.clientX,y:v.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(St,{...x,virtualRef:g}),r.jsx(Mt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:ie(s.onContextMenu,v=>{d(),h(v),v.preventDefault()}),onPointerDown:a?s.onPointerDown:ie(s.onPointerDown,xe(v=>{d(),M.current=window.setTimeout(()=>h(v),700)})),onPointerMove:a?s.onPointerMove:ie(s.onPointerMove,xe(d)),onPointerCancel:a?s.onPointerCancel:ie(s.onPointerCancel,xe(d)),onPointerUp:a?s.onPointerUp:ie(s.onPointerUp,xe(d))})]})});Xe.displayName=He;var Tn="ContextMenuPortal",Ye=s=>{const{__scopeContextMenu:e,...i}=s,a=I(e);return r.jsx(Pt,{...a,...i})};Ye.displayName=Tn;var Je="ContextMenuContent",Ze=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=qe(Je,i),m=I(i),x=u.useRef(!1);return r.jsx(Et,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ze.displayName=Je;var On="ContextMenuGroup",An=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(At,{...c,...a,ref:e})});An.displayName=On;var Ln="ContextMenuLabel",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Lt,{...c,...a,ref:e})});In.displayName=Ln;var Fn="ContextMenuItem",et=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Dt,{...c,...a,ref:e})});et.displayName=Fn;var $n="ContextMenuCheckboxItem",_n=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(It,{...c,...a,ref:e})});_n.displayName=$n;var zn="ContextMenuRadioGroup",Wn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Ft,{...c,...a,ref:e})});Wn.displayName=zn;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx($t,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Un=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(_t,{...c,...a,ref:e})});Un.displayName=Bn;var Vn="ContextMenuSeparator",tt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Rt,{...c,...a,ref:e})});tt.displayName=Vn;var qn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(zt,{...c,...a,ref:e})});Qn.displayName=qn;var Hn="ContextMenuSubTrigger",Xn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Wt,{...c,...a,ref:e})});Xn.displayName=Hn;var Yn="ContextMenuSubContent",Jn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Gt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jn.displayName=Yn;function xe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Zn=Qe,er=Xe,tr=Ye,nr=Ze,rr=et,or=tt;function ir(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function sr(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(er,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(tr,{children:r.jsx(nr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function te(s){const e=Z.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==i?(p=ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(rr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function Ue(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(or,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const lr="#d9a441";function cr(s){const e=Z.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:M,onNewFile:d,onNewFolder:h,onCopyPath:v,onCopyRelativePath:B,onRename:V,onDelete:y}=s,F=x===void 0?!1:x,H=i.kind==="directory",{Icon:q,color:Q}=p,$=m&&"bg-accent";let T;e[0]!==$?(T=ae("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",$),e[0]=$,e[1]=T):T=e[1];const G=`${a*14+8}px`;let O;e[2]!==G?(O={paddingLeft:G},e[2]=G,e[3]=O):O=e[3];let A;e[4]!==g||e[5]!==M?(A=()=>{M(),g()},e[4]=g,e[5]=M,e[6]=A):A=e[6];let R;e[7]!==q||e[8]!==Q||e[9]!==H||e[10]!==c||e[11]!==F?(R=H?r.jsxs(r.Fragment,{children:[F?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(gn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(vn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(yn,{size:16,className:"shrink-0",style:{color:lr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(q,{size:16,className:"shrink-0",style:{color:Q}})]}),e[7]=q,e[8]=Q,e[9]=H,e[10]=c,e[11]=F,e[12]=R):R=e[12];let P;e[13]!==i.name?(P=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=P):P=e[14];let j;e[15]!==T||e[16]!==O||e[17]!==A||e[18]!==R||e[19]!==P?(j=r.jsx(sr,{asChild:!0,children:r.jsxs("button",{type:"button",className:T,style:O,onClick:A,children:[R,P]})}),e[15]=T,e[16]=O,e[17]=A,e[18]=R,e[19]=P,e[20]=j):j=e[20];let N;e[21]!==d?(N=r.jsx(te,{onSelect:d,children:"New File"}),e[21]=d,e[22]=N):N=e[22];let E;e[23]!==h?(E=r.jsx(te,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=E):E=e[24];let k;e[25]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ue,{}),e[25]=k):k=e[25];let C;e[26]!==v?(C=r.jsx(te,{onSelect:v,children:"Copy Path"}),e[26]=v,e[27]=C):C=e[27];let L;e[28]!==B?(L=r.jsx(te,{onSelect:B,children:"Copy Relative Path"}),e[28]=B,e[29]=L):L=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(Ue,{}),e[30]=w):w=e[30];let S;e[31]!==V?(S=r.jsx(te,{onSelect:V,children:"Rename"}),e[31]=V,e[32]=S):S=e[32];let z;e[33]!==y?(z=r.jsx(te,{variant:"destructive",onSelect:y,children:"Delete"}),e[33]=y,e[34]=z):z=e[34];let _;e[35]!==N||e[36]!==E||e[37]!==C||e[38]!==L||e[39]!==S||e[40]!==z?(_=r.jsxs(ar,{className:"w-52",children:[N,E,k,C,L,w,S,z]}),e[35]=N,e[36]=E,e[37]=C,e[38]=L,e[39]=S,e[40]=z,e[41]=_):_=e[41];let K;return e[42]!==_||e[43]!==j?(K=r.jsxs(ir,{children:[j,_]}),e[42]=_,e[43]=j,e[44]=K):K=e[44],K}Ut.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function dr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function ur(s){const e=U(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const fr="#94a3b8";function mr(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ue,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ue,color:"#d9a441"}:e.endsWith(".json")?{Icon:Ht,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ue,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ue,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:Xt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:fr}}function as({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,M]=u.useState(new Set),[d,h]=u.useState(null),[v,B]=u.useState(null),[V,y]=u.useState([]),[F,H]=u.useState(""),[q,Q]=u.useState(!1),[$,T]=u.useState(!1),[,G]=u.useState(new Set),[O,A]=u.useState(new Set),R=u.useRef(0),P=u.useRef(null),j=u.useRef(new Set),N=u.useRef(new Map);function E(t){G(n=>{const o=typeof t=="function"?t(n):t;return j.current=o,o})}const[k,C]=u.useState(new Map),L=u.useRef(null),[w,S]=u.useState(null),{sendMessage:z}=ln(),{openSidePanel:_}=cn(),K=Kt(),[D,X]=u.useState(null),[Y,ge]=u.useState(null),[ne,le]=u.useState(!1);async function J(t,n){const o=await fetch(dr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function ce(){K.invalidateQueries({queryKey:Ge(s,e,i)})}function Me(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function nt(t){const n=Mn(t);if(!n)return;const o=`${s}/${e}/${i}`;K.setQueryData(Fe.decofile(o),l=>{if(!l)return l;const{[n]:f,...b}=l;return b}),K.invalidateQueries({queryKey:Fe.liveMeta(s,e,i)})}function rt(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>me(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)nt(o)}function ot(t){const n=me(t);return V.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=k.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function De(t){y(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),C(n=>{const o=new Map;for(const[l,f]of n){const b=t(l);b&&o.set(b,f)}return o}),B(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function it(t){const n=me(t);B(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),De(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function st(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);await J("write",{path:U(n),content:""}),await re(),await ce(),X(null),ve(n)}async function at(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);const o=U(n);await J("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await re(),await ce(),X(null),M(l=>{const f=new Set(l);for(const b of Ce(n))f.add(b);return f.add(n),f}),B({name:t,path:n,kind:"directory",children:[]})}async function lt(t){if(!D)return;const n=D.node.path,o=je(n),l=pe(o,t);if(l===n){X(null);return}if(Ne(l,x,p))throw new Error(`"${t}" already exists`);await J("rename",{from:U(n),to:U(l)}),De(f=>f===n?l:f.startsWith(`${n}/`)?pe(l,f.slice(n.length+1)):f),await re(),await ce(),X(null)}async function ct(t){le(!0);try{await J("unlink",{path:U(t.path),recursive:t.kind==="directory"}),rt(t),it(t.path),await re(),await ce(),ge(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{le(!1)}}async function dt(t){const n=Sn(t);if(n){W.error(n);return}le(!0);try{D?.mode==="new-file"?(await st(t),W.success(`Created "${t}"`)):D?.mode==="new-folder"?(await at(t),W.success(`Created folder "${t}"`)):D?.mode==="rename"&&(await lt(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{le(!1)}}const Re=u.useRef(!1);Re.current||(Re.current=!0,P.current=re());const[ut,ft]=u.useState(null);if(a&&a!==ut){ft(a);const t=a;queueMicrotask(()=>{ur(t)&&ve(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Pe(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ee(t,n,o){if(o!==R.current)return!1;let l=!1;return m(f=>{const b=n?Dn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!b.truncated,{files:b.files,directories:b.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function mt(t){const n=N.current.get(t);if(n)return n;const o=R.current,l=(async()=>{const f=await Pe({pattern:"**/*",path:U(t),limit:Be}),b=Ee(f,!0,o);return!b&&o===R.current&&E(oe=>{const de=new Set(oe);return de.add(t),de}),b})();N.current.set(t,l);try{return await l}finally{N.current.delete(t)}}async function ke(t){if(!be(t,j.current))return!1;A(n=>new Set(n).add(t));try{return await mt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function pt(t){const n=new Set(j.current);for(const o of Ce(t)){if(!be(o,n))continue;if(await ke(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function re(){const t=++R.current;N.current.clear(),Q(!0),E(new Set),M(new Set),A(new Set);try{const n=await Pe({pattern:"**/*",limit:Be,maxDepth:Cn});Ee(n,!1,t),T(!0)}catch{$&&W.error("Failed to refresh file tree")}finally{Q(!1)}}async function Te(t){if(!k.get(t)?.loaded){C(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:U(t),full:!0}),l=Nn(o.content??"");C(f=>{const b=new Map(f);return b.set(t,{savedContent:l,editorValue:l,loaded:!0}),b})}catch{}}}async function xt(t,n){try{await J("write",{path:U(t),content:n}),fe("file saved via sandbox /write",{path:t}),K.invalidateQueries({queryKey:Ge(s,e,i)});try{const o=await dn(s,e,i);fe("git status after save",o)}catch(o){fe("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}C(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){fe("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function ht(t){h(t),B({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),S(null),V.includes(t)||y(n=>[...n,t]),Te(t)}function gt(t){y(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),C(n=>{const o=new Map(n);return o.delete(t),o})}function Oe(t){M(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function vt(t){if(be(t,j.current))try{if(await ke(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}Oe(t)}async function yt(t,n){if(n){Oe(t);return}await vt(t)}async function ve(t){await P.current,await pt(t);const n=Ce(t);M(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),ht(t)}function Ct(){return v?.kind==="directory"?v.path:v?.kind==="file"?je(v.path):d?je(d):"/"}function Ae(t){const n=Ct();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const wt=wn(x,p),Le=bn(wt,g),Ie=F?Le.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Le,ee=d?k.get(d):null,bt=ee?.loaded&&ee.editorValue!==ee.savedContent,ye=Y?ot(Y.path):[],jt=(t,n)=>{L.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await xt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);S({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function Nt(t){if(!w)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${w.filePath}\``,`**Lines:** ${w.lineStart}–${w.lineEnd}`];if(w.selectedCode){const o=we(w.filePath),l=w.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),_("chat"),z({parts:[{type:"text",text:n.join(`
2
+ `)}]}),S(null)}return q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Vt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:F,onChange:t=>H(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(_e,{children:[r.jsx(ze,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Ae("new-file"),children:r.jsx(qt,{size:14})})}),r.jsx(We,{side:"bottom",children:"New file"})]}),r.jsxs(_e,{children:[r.jsx(ze,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Ae("new-folder"),children:r.jsx(Qt,{size:14})})}),r.jsx(We,{side:"bottom",children:"New folder"})]})]}),r.jsx(Jt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ie.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),b=v?.path===n.path,oe=jn(n.path,n.kind),de=l&&O.has(n.path);return r.jsx(cr,{node:n,depth:o,isExpanded:f,isSelected:b,isLoading:de,fileVisual:mr(n.name),onSelect:()=>B(n),onOpen:()=>{l?yt(n.path,f):ve(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:oe}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:oe}),onCopyPath:()=>Me("Path",me(n.path)),onCopyRelativePath:()=>Me("Relative path",U(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:oe}),onDelete:()=>ge(n)},n.path)}),$&&Ie.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[V.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:V.map(t=>{const n=k.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ae("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Te(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:b=>{b.stopPropagation(),gt(t)},children:r.jsx(Yt,{size:12})})]},t)})}),w&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Nt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&S(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&ee?.loaded?r.jsx(Bt,{language:we(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ee.editorValue,path:d,onChange:t=>{const n=d;n&&C(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!ee?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[bt?"Modified":"Saved"," ·"," ",we(d)]})]})]}),r.jsx(Pn,{open:D!==null,mode:D?.mode??"new-file",initialName:D?.mode==="rename"?D.node.name:"",parentLabel:D&&D.mode!=="rename"?D.parentDir==="/"?"/":U(D.parentDir):void 0,isPending:ne,onSubmit:dt,onOpenChange:t=>{!t&&!ne&&X(null)}}),r.jsx(Zt,{open:Y!==null,onOpenChange:t=>{!t&&!ne&&ge(null)},children:r.jsxs(en,{children:[r.jsxs(tn,{children:[r.jsxs(nn,{children:["Delete ",Y?.kind==="directory"?"folder":"file","?"]}),r.jsxs(rn,{children:["This will permanently delete"," ",r.jsx("span",{className:"font-mono",children:Y?.name}),Y?.kind==="directory"?" and everything inside it.":".",ye.length>0&&r.jsxs(r.Fragment,{children:[" ",ye.length===1?"One open file has unsaved changes that will be lost.":`${ye.length} open files have unsaved changes that will be lost.`]})]})]}),r.jsxs(on,{children:[r.jsx(sn,{disabled:ne,children:"Cancel"}),r.jsx(an,{disabled:ne||!Y,onClick:t=>{t.preventDefault(),Y&&ct(Y)},children:"Delete"})]})]})})]})}export{as as FileExplorer};
@@ -1,4 +1,4 @@
1
- import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-B5cMFR-y.js";import{i as zb}from"./Check-CcnPQW8L.js";import{a as jb}from"./Copy01-CEOVwp8a.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-CvMUMR16.js";import{n as I0}from"./Globe01-C0_GSmts.js";import{h as k0,n as R0}from"./ZoomOut-9DZqfrOE.js";import{u as N0}from"./use-mobile-BYgIZfXj.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
1
+ import{bx as zl,j as q,aM as lt,bP as zn,r as Ve,F as b0,l as Gb,c as Ke,b as E0,e as T0,B as $b}from"./index-B5v4NEW3.js";import{i as zb}from"./Check-DXck-8sV.js";import{a as jb}from"./Copy01-DpaC4fYW.js";import{e as S0,g as y0,f as A0,a as _0}from"./dialog-Zrgg9dlk.js";import{n as I0}from"./Globe01-BIR5236w.js";import{h as k0,n as R0}from"./ZoomOut-D6w1kwx5.js";import{u as N0}from"./use-mobile-BWkiff8G.js";import{h as C0}from"./tab-id-BijBBRwE.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function Vb(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},v0=/^(?:[ \t]*(?:\n|$))+/,w0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,O0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,Yb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wb=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),L0=le(Yb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),B0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kb).getRegex(),Xl={blockquote:B0,code:w0,def:M0,fences:x0,heading:O0,hr:_n,html:F0,lheading:Wb,list:P0,newline:v0,paragraph:Kb,table:ln,text:D0},Mc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),U0={...Xl,lheading:L0,table:Mc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},H0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xb=/^( {2,}|\\)\n(?!\s*$)/,$0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Zb=/[^\s\p{P}\p{S}]/u,z0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Qb=/(?!~)[\p{P}\p{S}]/u,j0=/(?!~)[\s\p{P}\p{S}]/u,V0=/(?:[^\s\p{P}\p{S}]|~)/u,Y0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Jb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,W0=le(Jb,"u").replace(/punct/g,tr).getRegex(),K0=le(Jb,"u").replace(/punct/g,Qb).getRegex(),eE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X0=le(eE,"gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),Z0=le(eE,"gu").replace(/notPunctSpace/g,V0).replace(/punctSpace/g,j0).replace(/punct/g,Qb).getRegex(),Q0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Zb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),J0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),eS=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tS=le(Kl).replace("(?:-->|$)","-->").getRegex(),nS=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rS=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tE=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),nE=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),aS=le("reflink|nolink(?!\\()","g").replace("reflink",tE).replace("nolink",nE).getRegex(),Ql={_backpedal:ln,anyPunctuation:J0,autolink:eS,blockSkip:Y0,br:Xb,code:G0,del:ln,emStrongLDelim:W0,emStrongRDelimAst:X0,emStrongRDelimUnd:Q0,escape:q0,link:rS,nolink:nE,punctuation:z0,reflink:tE,reflinkSearch:aS,tag:nS,text:$0,url:ln},iS={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:Z0,emStrongLDelim:K0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oS={..._l,br:le(Xb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:U0,pedantic:H0},Jt={normal:Ql,gfm:_l,breaks:oS,pedantic:iS},sS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pc=e=>sS[e];function Je(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Pc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Pc);return e}function Fc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Bc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function uS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Uc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function lS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
@@ -1 +1 @@
1
- import{c as a,e as o,j as i,N as l}from"./index-B5cMFR-y.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
1
+ import{c as a,e as o,j as i,N as l}from"./index-B5v4NEW3.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
@@ -1 +1 @@
1
- import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-B5cMFR-y.js";import{L as N}from"./label-itDnpE7k.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{dE as C,c as d,j as c,ah as j,r as f,l as p,bd as b,dF as h,dG as v}from"./index-B5v4NEW3.js";import{L as N}from"./label-wXoTBNOj.js";const D=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=h();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=v(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,D as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-B5cMFR-y.js";import{P as k}from"./index-BALkJ2dx.js";import{u as W}from"./use-org-auth-client-DNG8tLX7.js";import{u as X}from"./use-debounced-autosave-DRL2Q2vw.js";import{A as ee}from"./avatar-DGZ13TB0.js";import{I as G}from"./input-BsEx9qgh.js";import{S as P,a as I,b as _,c as te}from"./settings-section-M1O3ge8Z.js";import{D as ne}from"./domain-settings-rz9NZ9fx.js";import{S as ae}from"./switch-BOKpfG2a.js";import{c as se,f as oe}from"./use-organization-settings-DxC5BT5e.js";import{u as ie}from"./studio-tools-C0FSNSO6.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-DFA_nrL8.js";import{R as pe}from"./require-capability-DQnQYS51.js";import"./sidebar-BQFslZSt.js";import"./LayoutLeft-CDGSUvFB.js";import"./use-mobile-BYgIZfXj.js";import"./X-Dmet8wMD.js";import"./tooltip-Cm1Uo3tj.js";import"./User01-B2aITRRg.js";import"./card-COkVnQnP.js";import"./ArrowUpRight-BxZoQJWz.js";import"./badge-BmdcYP2l.js";import"./select-CkNw5vmE.js";import"./Check-CcnPQW8L.js";import"./ChevronDown-HIcxNu9L.js";import"./ChevronUp-zg_HGLWR.js";import"./constants-D_FQAPnt.js";import"./use-capability-H0m9y9gf.js";import"./access-gate-w5g_NZJz.js";import"./capability-load-error-CKORpXPj.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
1
+ import{b as K,C as V,n as M,M as Q,J as Z,d as U,p as F,t as w,K as L,j as n,ah as $,H,I as T,c as D,r as B,B as Y,D as q,s as J}from"./index-B5v4NEW3.js";import{P as k}from"./index-DhupVI1X.js";import{u as W}from"./use-org-auth-client-Dht_Ty6R.js";import{u as X}from"./use-debounced-autosave-DjRMW0Ri.js";import{A as ee}from"./avatar-b0UOFm48.js";import{I as G}from"./input-Ch5gyTpF.js";import{S as P,a as I,b as _,c as te}from"./settings-section-DJLAq8qW.js";import{D as ne}from"./domain-settings-BECeOIgB.js";import{S as ae}from"./switch-Dc6TbZCo.js";import{c as se,f as oe}from"./use-organization-settings-D22Exu1R.js";import{u as ie}from"./studio-tools-CMGrpbwo.js";import{c as re,b as le,d as ce,A as de,e as ue,g as me,a as ge,f as fe}from"./alert-dialog-CJ86orwZ.js";import{R as pe}from"./require-capability-vo1ql1oP.js";import"./sidebar-DS0o2bkP.js";import"./LayoutLeft-HNJhsqgp.js";import"./use-mobile-BWkiff8G.js";import"./X-CQq_1twc.js";import"./tooltip-Cfe7K1Wf.js";import"./User01-DN2LKLDR.js";import"./card-Co4NmtE1.js";import"./ArrowUpRight-Bs0BPetC.js";import"./badge-xfs1ynpW.js";import"./select-Bm_prz4e.js";import"./Check-DXck-8sV.js";import"./ChevronDown-CLM1j2jp.js";import"./ChevronUp-BeHashnH.js";import"./constants-D_FQAPnt.js";import"./use-capability-CFL9CoDX.js";import"./access-gate-Cte8vird.js";import"./capability-load-error-ChIN_BDy.js";const he=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function xe(e){return typeof e=="string"&&he.has(e.trim().toLowerCase())}const je=H({name:T().min(1,"Name is required").max(255,"Name is too long"),slug:T().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!xe(e),"This organization URL is reserved by Studio"),logo:T().optional()});function be(e){const t=D.c(13),{value:f,onChange:d,name:s,disabled:l}=e,u=B.useRef(null);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>u.current?.click(),t[0]=c):c=t[0];const r=c;let m;t[1]!==d?(m=j=>{const b=j.target.files?.[0];if(!b)return;if(b.size>2097152){w.error("Image must be smaller than 2MB");return}const g=new FileReader;g.onerror=ye,g.onloadend=()=>{g.result&&d(g.result),u.current&&(u.current.value="")},g.readAsDataURL(b)},t[1]=d,t[2]=m):m=t[2];const a=m;let o;t[3]!==l||t[4]!==a?(o=n.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:l}),t[3]=l,t[4]=a,t[5]=o):o=t[5];const i=f||void 0,x=s??"?";let p;t[6]!==i||t[7]!==x?(p=n.jsx(ee,{url:i,fallback:x,shape:"square",size:"base"}),t[6]=i,t[7]=x,t[8]=p):p=t[8];let h;return t[9]!==l||t[10]!==o||t[11]!==p?(h=n.jsxs("button",{type:"button",onClick:r,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[o,p]}),t[9]=l,t[10]=o,t[11]=p,t[12]=h):h=t[12],h}function ye(){return w.error("Failed to read image")}function ve(){const e=K(),{org:t}=V(),f=W(),d=M(),s=Q({resolver:Z(je),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),l=U({mutationFn:async a=>{const o={name:a.name,slug:a.slug};a.logo&&(o.logo=a.logo);const i=await f.organization.update({data:o});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,o)=>{F("organization_settings_updated",{organization_id:t.id,fields:Object.keys(o)}),d.invalidateQueries({queryKey:L.organizations()}),d.invalidateQueries({queryKey:L.activeOrganization(t.slug)}),w.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,o)=>{F("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(o),error:a instanceof Error?a.message:String(a)}),w.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:u,flush:c}=X({save:async()=>{const a=s.control._formState.dirtyFields;if(Object.keys(a).length===0||!await s.trigger())return;const i=s.getValues(),x=s.control._defaultValues;s.reset(i,{keepValues:!0});try{await l.mutateAsync(i)}catch{s.reset(x,{keepValues:!0})}}}),r=s.formState.errors,m=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(P,{children:n.jsxs(I,{children:[n.jsx(_,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(be,{value:s.watch("logo"),onChange:a=>{s.setValue("logo",a??"",{shouldDirty:!0}),c()},name:s.watch("name")})}),n.jsx(_,{title:"Name",action:n.jsx($,{control:s.control,name:"name",render:({field:a})=>n.jsx(G,{id:"org-name",...a,onChange:o=>{a.onChange(o),u()},onBlur:()=>{a.onBlur(),c()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(_,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[m&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:m}),n.jsx($,{control:s.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const i=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");s.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),u()},onBlur:()=>{a.onBlur(),c()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function Se(){const e=D.c(6),t=se(),{mutate:f,isPending:d}=oe();let s;e[0]!==f?(s=u=>f(u),e[0]=f,e[1]=s):s=e[1];let l;return e[2]!==t||e[3]!==d||e[4]!==s?(l=n.jsx(P,{title:"Task board",description:"A board for tracking org tasks by status, priority, and assignee.",children:n.jsx(I,{children:n.jsx(_,{title:"Enable task board",description:"Adds a Board entry to the sidebar for this organization.",action:n.jsx(ae,{checked:t,disabled:d,onCheckedChange:s})})})}),e[2]=t,e[3]=d,e[4]=s,e[5]=l):l=e[5],l}function ze(){const e=D.c(42),{org:t}=V(),[f,d]=B.useState(!1),[s,l]=B.useState(""),u=ie();let c;e[0]!==t.id||e[1]!==u?(c=async()=>{await u.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=u,e[2]=c):c=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{F("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),J(),w.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let m;e[6]!==c||e[7]!==r?(m={mutationFn:c,onSuccess:r,onError:Ce},e[6]=c,e[7]=r,e[8]=m):m=e[8];const a=U(m);let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=()=>d(!0),e[9]=o):o=e[9];let i;e[10]!==a.isPending?(i=n.jsx(P,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(I,{className:"border-destructive/40",children:n.jsx(_,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Y,{variant:"destructive",size:"sm",onClick:o,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=N=>{d(N),N||l("")},e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(re,{children:"Delete Organization?"}),e[13]=p):p=e[13];let h;e[14]!==t.name?(h=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=h):h=e[15];let j;e[16]!==t.name?(j=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=j):j=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=N=>l(N.target.value),e[18]=b):b=e[18];let g;e[19]!==s||e[20]!==t.name?(g=n.jsx(G,{value:s,onChange:b,placeholder:t.name,autoFocus:!0}),e[19]=s,e[20]=t.name,e[21]=g):g=e[21];let y;e[22]!==g||e[23]!==h||e[24]!==j?(y=n.jsxs(le,{children:[p,n.jsx(ce,{asChild:!0,children:n.jsxs("div",{children:[h,j,g]})})]}),e[22]=g,e[23]=h,e[24]=j,e[25]=y):y=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(de,{children:"Cancel"}),e[26]=O):O=e[26];let v;e[27]!==a?(v=()=>a.mutate(),e[27]=a,e[28]=v):v=e[28];const E=s!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==v||e[30]!==E||e[31]!==R?(S=n.jsxs(ue,{children:[O,n.jsx(me,{onClick:v,disabled:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=v,e[30]=E,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ge,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==f||e[37]!==z?(C=n.jsx(fe,{open:f,onOpenChange:x,children:z}),e[36]=f,e[37]=z,e[38]=C):C=e[38];let A;return e[39]!==C||e[40]!==i?(A=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=A):A=e[41],A}function Ce(e){w.error(e instanceof Error?e.message:"Failed to delete organization")}function we(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(k,{children:n.jsx(k.Content,{children:n.jsx(k.Body,{children:n.jsxs(te,{children:[n.jsx(k.Title,{children:"Organization"}),n.jsx(ve,{}),n.jsx(ne,{}),n.jsx(Se,{}),n.jsx(ze,{})]})})})}),e[0]=t):t=e[0],t}function nt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(pe,{capability:"org:manage",area:"general settings",children:n.jsx(we,{})}),e[0]=t):t=e[0],t}export{nt as default};
@@ -1 +1 @@
1
- import{c as A,j as t,C as F,a as Y,n as M,r as T,ac as H,i as z,d as B,t as U,dH as W,K as R,m as X,B as Z,l as D,v as ee,w as te}from"./index-B5cMFR-y.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-CvMUMR16.js";import{C as le}from"./collection-search-BwRybpDA.js";import{u as re}from"./use-debounced-value-DYEvOfgl.js";import{b as Q,u as ae}from"./use-connection-BjfpYHE7.js";import{u as L}from"./use-mcp-client-lixd0gAV.js";import{W as ce,S as V}from"./constants-D_FQAPnt.js";import{a as K}from"./authenticate-and-persist-oauth-CRs0CnsY.js";import{b as J}from"./Settings02-OSetn6ea.js";import{I as ue}from"./agent-icon-3oSe4h7A.js";import{u as de}from"./use-mcp-tools-Cv_rmBI5.js";import{e as me}from"./extract-connection-data-BFt9JrM6.js";import{c as fe}from"./use-navigate-to-agent-BAQepcY9.js";import{g as xe,p as q,f as ge}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";function G(y){const e=A.c(4),{size:n,className:i}=y;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let r;return e[1]!==i||e[2]!==n?(r=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:i,children:h}),e[1]=i,e[2]=n,e[3]=r):r=e[3],r}function he(y,e){const n=A.c(12),{org:i}=F();let h;n[0]!==i.id?(h=ce.REGISTRY(i.id),n[0]=i.id,n[1]=h):h=n[1];const r=h;let o;n[2]!==i.id||n[3]!==i.slug||n[4]!==r?(o={connectionId:r,orgId:i.id,orgSlug:i.slug},n[2]=i.id,n[3]=i.slug,n[4]=r,n[5]=o):o=n[5];const p=L(o);let c;n[6]!==y?(c={name:y},n[6]=y,n[7]=c):c=n[7];const b=e?.enabled??!0;let C;return n[8]!==p||n[9]!==c||n[10]!==b?(C={client:p,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:c,enabled:b,staleTime:3e5,select:pe},n[8]=p,n[9]=c,n[10]=b,n[11]=C):C=n[11],de(C)}function pe(y){return y.structuredContent?.item??null}const be="deco/mcp-github";function ye(y){const{org:e}=F(),{data:n}=Y.useSession(),i=Q(),h=M(),[r,o]=T.useState("idle"),[p,c]=T.useState(null),[b,C]=T.useState(null),{data:j,isLoading:u}=he(be,{enabled:y.enabled}),l=T.useRef(!1);y.enabled&&j&&!u&&!l.current&&n?.user?.id&&r==="idle"&&(l.current=!0,d());async function d(){if(!(!j||!n?.user?.id||!e))try{o("installing"),c(null);const a=me(j,e.id,n.user.id,{remoteIndex:0});if(!a.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:N}=await i.create.mutateAsync(a);o("authenticating");const x=await K({connectionId:N,orgId:e.id,orgSlug:e.slug,persistFallback:s=>i.update.mutateAsync({id:N,data:{connection_token:s}}).then(()=>{})});if(x.ran&&!x.ok){try{await i.delete.mutateAsync(N)}catch{}throw new Error(x.error&&x.error!=="no token received"?x.error:"No token received from GitHub")}H(h,e.id),C(a),o("ready")}catch(a){c(a instanceof Error?a.message:String(a)),o("error")}}function m(){o("idle"),c(null),C(null),l.current=!1}return y.enabled&&u&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:p,connection:b,retry:m}}function De(y){const e=A.c(22),{open:n,onOpenChange:i,title:h,onImportComplete:r,mode:o}=y,p=o===void 0?"agent":o,c=h??(p==="connection"?"Add repo":"Import from GitHub"),[b,C]=T.useState(null);let j;e[0]!==c?(j=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:c})}),e[0]=c,e[1]=j):j=e[1];let u;e[2]!==c||e[3]!==b?(u=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c})]})}),e[2]=c,e[3]=b,e[4]=u):u=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=l):l=e[5];let d;e[6]!==i?(d=()=>i(!1),e[6]=i,e[7]=d):d=e[7];let m;e[8]!==p||e[9]!==r||e[10]!==n||e[11]!==b||e[12]!==d?(m=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:l,children:t.jsx(je,{open:n,onComplete:d,selectedInstallation:b,onSelectInstallation:C,onImportComplete:r,mode:p})})}),e[8]=p,e[9]=r,e[10]=n,e[11]=b,e[12]=d,e[13]=m):m=e[13];let a;e[14]!==j||e[15]!==u||e[16]!==m?(a=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[j,u,m]}),e[14]=j,e[15]=u,e[16]=m,e[17]=a):a=e[17];let f;return e[18]!==i||e[19]!==n||e[20]!==a?(f=t.jsx(ie,{open:n,onOpenChange:i,children:a}),e[18]=i,e[19]=n,e[20]=a,e[21]=f):f=e[21],f}function je({open:y,onComplete:e,selectedInstallation:n,onSelectInstallation:i,onImportComplete:h,mode:r="agent"}){const{org:o}=F(),p=M(),c=fe(),[b,C]=T.useState(null),j=ae({slug:"mcp-github"}),u=xe(j),l=ye({enabled:y&&u.length===0}),d=u.length===1?u[0]??null:b,m=L({connectionId:d?.id??"",orgId:o.id,orgSlug:o.slug}),a=L({connectionId:V,orgId:o.id,orgSlug:o.slug}),f=async(s,v)=>{try{const _=await m.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:v}});if(_.isError)return null;const I=_.content?.find(g=>g.type==="resource")?.resource?.text;if(!I)return null;try{const g=JSON.parse(I);return typeof g=="string"?g:JSON.stringify(g)}catch{return I}}catch{return null}},N=(s,v)=>{Promise.all([f(v,"AGENTS.md"),f(v,"CLAUDE.md")]).then(async([S,_])=>{const w=S??_??null;w&&(await a.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:w}}}}),H(p,o.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},x=B({mutationFn:async s=>{if(!d||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(r==="connection"){const{childConnectionId:w}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:I=>m.callTool(I),selfCallTool:I=>a.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:w=>m.callTool(w),selfCallTool:w=>a.callTool(w)});let _=null;try{const w=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:v,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,g=I.item?.id;if(!I.item||!g)throw new Error("Failed to create the imported agent");return _=g,{virtualMcpId:g,repo:s,connectionId:S,item:I.item}}catch(w){throw _&&await a.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),await a.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:s,repo:v,connectionId:S,item:_})=>{if(r==="connection"||!s||!_){H(p,o.id),W(p,o.id),U.success(`Added ${v.name}`),e();return}if(p.setQueryData(R.collectionItem(a,o.id,"","VIRTUAL_MCP",s),{item:_}),H(p,o.id),N(s,v),h){h({virtualMcpId:s,repo:v,connectionId:S});return}U.success(`Imported ${v.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(s)},onError:s=>{U.error("Failed to import repo: "+(s instanceof Error?s.message:"Unknown error"))}});return l.status==="installing"||l.status==="authenticating"?t.jsx($,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx($,{status:"error",error:l.error,retry:l.retry}):u.length===0&&l.status==="idle"?t.jsx($,{status:"installing",error:null,retry:l.retry}):u.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(s=>t.jsxs("button",{type:"button",onClick:()=>C(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(G,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):d?n?t.jsx(we,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,installation:n,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Ne,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,onSelect:i,showBackButton:u.length>1,onBack:()=>C(null)}):null}function Ne(y){const e=A.c(47),{connectionId:n,orgId:i,orgSlug:h,onSelect:r,showBackButton:o,onBack:p}=y;let c;e[0]!==i||e[1]!==h?(c={connectionId:V,orgId:i,orgSlug:h},e[0]=i,e[1]=h,e[2]=c):c=e[2];const b=L(c),C=M(),j=Q();let u;e[3]!==n||e[4]!==i?(u=R.githubUserOrgs(i,n),e[3]=n,e[4]=i,e[5]=u):u=e[5];let l;e[6]!==n||e[7]!==b?(l=()=>ge(g=>b.callTool(g),n),e[6]=n,e[7]=b,e[8]=l):l=e[8];let d;e[9]!==u||e[10]!==l?(d={queryKey:u,queryFn:l},e[9]=u,e[10]=l,e[11]=d):d=e[11];const m=X(d);let a;e[12]!==j||e[13]!==n||e[14]!==m||e[15]!==i||e[16]!==h||e[17]!==C?(a={mutationFn:async()=>{const g=await K({connectionId:n,orgId:i,orgSlug:h,persistFallback:E=>j.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ce)});if(g.ran&&!g.ok)throw new Error(g.error??"no token received");const k=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await C.invalidateQueries({queryKey:R.isMCPAuthenticated(k.href,null)}),await C.invalidateQueries({queryKey:R.mcpClientPrefix()}),await m.refetch()},onError:ve},e[12]=j,e[13]=n,e[14]=m,e[15]=i,e[16]=h,e[17]=C,e[18]=a):a=e[18];const f=B(a);if(m.isLoading){let g;return e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=g):g=e[19],g}if(m.isError){let g,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),k=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=g,e[21]=k):(g=e[20],k=e[21]);let E;e[22]!==f?(E=()=>f.mutate(),e[22]=f,e[23]=E):E=e[23];let P;e[24]!==f.isPending?(P=f.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(G,{className:"size-3.5"}),e[24]=f.isPending,e[25]=P):P=e[25];let O;return e[26]!==f.isPending||e[27]!==E||e[28]!==P?(O=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[g,k,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:f.isPending,children:[P,"Reconnect GitHub"]})]}),e[26]=f.isPending,e[27]=E,e[28]=P,e[29]=O):O=e[29],O}const N=m.data;if(!N)return null;let x;e[30]!==p||e[31]!==o?(x=o&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=p,e[31]=o,e[32]=x):x=e[32];let s;if(e[33]!==N.installations||e[34]!==r){let g;e[36]!==r?(g=k=>t.jsxs("button",{type:"button",onClick:()=>r(k),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:k.login}),k.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},k.installationId),e[36]=r,e[37]=g):g=e[37],s=N.installations.map(g),e[33]=N.installations,e[34]=r,e[35]=s}else s=e[35];let v;e[38]!==s?(v=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:s}),e[38]=s,e[39]=v):v=e[39];const S=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[40]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=_):_=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==x||e[45]!==v?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,v,w]}),e[43]=w,e[44]=x,e[45]=v,e[46]=I):I=e[46],I}function ve(y){U.error("Failed to reconnect GitHub: "+(y instanceof Error?y.message:"Unknown error"))}function Ce(){}function we(y){const e=A.c(20),{connectionId:n,orgId:i,orgSlug:h,installation:r,onSelectRepo:o,isSaving:p}=y,[c,b]=T.useState(""),C=re(c,300),j=T.useDeferredValue(C),u=c!==j;let l;e[0]!==u||e[1]!==c?(l=t.jsx(le,{placeholder:"Search repositories...",value:c,onChange:b,isSearching:u}),e[0]=u,e[1]=c,e[2]=l):l=e[2];const d=u?"opacity-40":"opacity-100";let m;e[3]!==d?(m=D("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",d),e[3]=d,e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=a):a=e[5];let f;e[6]!==n||e[7]!==j||e[8]!==r||e[9]!==p||e[10]!==o||e[11]!==i||e[12]!==h?(f=t.jsx(T.Suspense,{fallback:a,children:t.jsx(Se,{connectionId:n,orgId:i,orgSlug:h,installation:r,query:j,onSelectRepo:o,isSaving:p})}),e[6]=n,e[7]=j,e[8]=r,e[9]=p,e[10]=o,e[11]=i,e[12]=h,e[13]=f):f=e[13];let N;e[14]!==m||e[15]!==f?(N=t.jsx("div",{className:m,children:f}),e[14]=m,e[15]=f,e[16]=N):N=e[16];let x;return e[17]!==l||e[18]!==N?(x=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l,N]}),e[17]=l,e[18]=N,e[19]=x):x=e[19],x}function Se(y){const e=A.c(29),{connectionId:n,orgId:i,orgSlug:h,installation:r,query:o,onSelectRepo:p,isSaving:c}=y;let b;e[0]!==n||e[1]!==i||e[2]!==h?(b={connectionId:n,orgId:i,orgSlug:h},e[0]=n,e[1]=i,e[2]=h,e[3]=b):b=e[3];const C=L(b),j=r.type==="User"?"user":"org",u=o?`${j}:${r.login} ${o} in:name`:`${j}:${r.login}`;let l;e[4]!==n||e[5]!==r.login||e[6]!==i||e[7]!==o?(l=R.githubOrgRepos(i,n,r.login,o),e[4]=n,e[5]=r.login,e[6]=i,e[7]=o,e[8]=l):l=e[8];let d;e[9]!==C||e[10]!==u?(d=async x=>{const{signal:s}=x,S=(await C.callTool({name:"search_repositories",arguments:{query:u,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(Ie)},e[9]=C,e[10]=u,e[11]=d):d=e[11];let m;e[12]!==l||e[13]!==d?(m={queryKey:l,queryFn:d},e[12]=l,e[13]=d,e[14]=m):m=e[14];const{data:a}=ee(m);if(a.length===0){let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=x):x=e[15];let s;e[16]!==o?(s=o&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=o,e[17]=s):s=e[17];let v;return e[18]!==s?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[x,s]}),e[18]=s,e[19]=v):v=e[19],v}let f;if(e[20]!==c||e[21]!==p||e[22]!==a){let x;e[24]!==c||e[25]!==p?(x=s=>t.jsxs("button",{type:"button",onClick:()=>p(s),disabled:c,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(G,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(te,{size:10}):t.jsx(ue,{size:10}),s.private?"Private":"Public"]})]},s.fullName),e[24]=c,e[25]=p,e[26]=x):x=e[26],f=a.map(x),e[20]=c,e[21]=p,e[22]=a,e[23]=f}else f=e[23];let N;return e[27]!==f?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:f}),e[27]=f,e[28]=N):N=e[28],N}function Ie(y){return{name:y.name,fullName:y.full_name,owner:y.full_name.split("/")[0]??"",url:y.html_url,private:y.private,description:y.description,updatedAt:y.updated_at}}function $(y){const e=A.c(33),{status:n,error:i,retry:h}=y;if(n==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=_):_=e[1];const w=i??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let g;e[4]!==h?(g=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=h,e[5]=g):g=e[5];let k;return e[6]!==I||e[7]!==g?(k=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,g]}),e[6]=I,e[7]=g,e[8]=k):k=e[8],k}const r=n==="authenticating";let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-foreground"})}),e[9]=o):o=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=p):p=e[10];const c=r?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==c?(b=t.jsx("p",{className:"text-sm font-medium",children:c}),e[11]=c,e[12]=b):b=e[12];const C=r?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let j;e[13]!==C?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=j):j=e[14];let u;e[15]!==b||e[16]!==j?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,j]}),e[15]=b,e[16]=j,e[17]=u):u=e[17];const l=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let d;e[18]!==l?(d=D("size-1.5 rounded-full",l),e[18]=l,e[19]=d):d=e[19];let m;e[20]!==d?(m=t.jsx("span",{className:d}),e[20]=d,e[21]=m):m=e[21];const a=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let f;e[22]!==a?(f=D("size-1.5 rounded-full",a),e[22]=a,e[23]=f):f=e[23];let N;e[24]!==f?(N=t.jsx("span",{className:f}),e[24]=f,e[25]=N):N=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let s;e[27]!==m||e[28]!==N?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,N,x]}),e[27]=m,e[28]=N,e[29]=s):s=e[29];let v;return e[30]!==s||e[31]!==u?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[p,u,s]}),e[30]=s,e[31]=u,e[32]=v):v=e[32],v}export{De as G,G as a,ye as b,he as u};
1
+ import{c as A,j as t,C as F,a as Y,n as M,r as T,ac as H,i as z,d as B,t as U,dH as W,K as R,m as X,B as Z,l as D,v as ee,w as te}from"./index-B5v4NEW3.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-Zrgg9dlk.js";import{C as le}from"./collection-search-CuJVF_4n.js";import{u as re}from"./use-debounced-value-D9mS5nMY.js";import{b as Q,u as ae}from"./use-connection-_0QRydbo.js";import{u as L}from"./use-mcp-client-BhwsvIVS.js";import{W as ce,S as V}from"./constants-D_FQAPnt.js";import{a as K}from"./authenticate-and-persist-oauth-Dye31GIc.js";import{b as J}from"./Settings02-C0J3RccK.js";import{I as ue}from"./agent-icon-CUA9P-jc.js";import{u as de}from"./use-mcp-tools-BQDntLa2.js";import{e as me}from"./extract-connection-data-DKUEpjtm.js";import{c as fe}from"./use-navigate-to-agent-DcKHP-Dx.js";import{g as xe,p as q,f as ge}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";function G(y){const e=A.c(4),{size:n,className:i}=y;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let r;return e[1]!==i||e[2]!==n?(r=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:i,children:h}),e[1]=i,e[2]=n,e[3]=r):r=e[3],r}function he(y,e){const n=A.c(12),{org:i}=F();let h;n[0]!==i.id?(h=ce.REGISTRY(i.id),n[0]=i.id,n[1]=h):h=n[1];const r=h;let o;n[2]!==i.id||n[3]!==i.slug||n[4]!==r?(o={connectionId:r,orgId:i.id,orgSlug:i.slug},n[2]=i.id,n[3]=i.slug,n[4]=r,n[5]=o):o=n[5];const p=L(o);let c;n[6]!==y?(c={name:y},n[6]=y,n[7]=c):c=n[7];const b=e?.enabled??!0;let C;return n[8]!==p||n[9]!==c||n[10]!==b?(C={client:p,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:c,enabled:b,staleTime:3e5,select:pe},n[8]=p,n[9]=c,n[10]=b,n[11]=C):C=n[11],de(C)}function pe(y){return y.structuredContent?.item??null}const be="deco/mcp-github";function ye(y){const{org:e}=F(),{data:n}=Y.useSession(),i=Q(),h=M(),[r,o]=T.useState("idle"),[p,c]=T.useState(null),[b,C]=T.useState(null),{data:j,isLoading:u}=he(be,{enabled:y.enabled}),l=T.useRef(!1);y.enabled&&j&&!u&&!l.current&&n?.user?.id&&r==="idle"&&(l.current=!0,d());async function d(){if(!(!j||!n?.user?.id||!e))try{o("installing"),c(null);const a=me(j,e.id,n.user.id,{remoteIndex:0});if(!a.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:N}=await i.create.mutateAsync(a);o("authenticating");const x=await K({connectionId:N,orgId:e.id,orgSlug:e.slug,persistFallback:s=>i.update.mutateAsync({id:N,data:{connection_token:s}}).then(()=>{})});if(x.ran&&!x.ok){try{await i.delete.mutateAsync(N)}catch{}throw new Error(x.error&&x.error!=="no token received"?x.error:"No token received from GitHub")}H(h,e.id),C(a),o("ready")}catch(a){c(a instanceof Error?a.message:String(a)),o("error")}}function m(){o("idle"),c(null),C(null),l.current=!1}return y.enabled&&u&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:p,connection:b,retry:m}}function De(y){const e=A.c(22),{open:n,onOpenChange:i,title:h,onImportComplete:r,mode:o}=y,p=o===void 0?"agent":o,c=h??(p==="connection"?"Add repo":"Import from GitHub"),[b,C]=T.useState(null);let j;e[0]!==c?(j=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:c})}),e[0]=c,e[1]=j):j=e[1];let u;e[2]!==c||e[3]!==b?(u=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c})]})}),e[2]=c,e[3]=b,e[4]=u):u=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=l):l=e[5];let d;e[6]!==i?(d=()=>i(!1),e[6]=i,e[7]=d):d=e[7];let m;e[8]!==p||e[9]!==r||e[10]!==n||e[11]!==b||e[12]!==d?(m=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:l,children:t.jsx(je,{open:n,onComplete:d,selectedInstallation:b,onSelectInstallation:C,onImportComplete:r,mode:p})})}),e[8]=p,e[9]=r,e[10]=n,e[11]=b,e[12]=d,e[13]=m):m=e[13];let a;e[14]!==j||e[15]!==u||e[16]!==m?(a=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[j,u,m]}),e[14]=j,e[15]=u,e[16]=m,e[17]=a):a=e[17];let f;return e[18]!==i||e[19]!==n||e[20]!==a?(f=t.jsx(ie,{open:n,onOpenChange:i,children:a}),e[18]=i,e[19]=n,e[20]=a,e[21]=f):f=e[21],f}function je({open:y,onComplete:e,selectedInstallation:n,onSelectInstallation:i,onImportComplete:h,mode:r="agent"}){const{org:o}=F(),p=M(),c=fe(),[b,C]=T.useState(null),j=ae({slug:"mcp-github"}),u=xe(j),l=ye({enabled:y&&u.length===0}),d=u.length===1?u[0]??null:b,m=L({connectionId:d?.id??"",orgId:o.id,orgSlug:o.slug}),a=L({connectionId:V,orgId:o.id,orgSlug:o.slug}),f=async(s,v)=>{try{const _=await m.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:v}});if(_.isError)return null;const I=_.content?.find(g=>g.type==="resource")?.resource?.text;if(!I)return null;try{const g=JSON.parse(I);return typeof g=="string"?g:JSON.stringify(g)}catch{return I}}catch{return null}},N=(s,v)=>{Promise.all([f(v,"AGENTS.md"),f(v,"CLAUDE.md")]).then(async([S,_])=>{const w=S??_??null;w&&(await a.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:w}}}}),H(p,o.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},x=B({mutationFn:async s=>{if(!d||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(r==="connection"){const{childConnectionId:w}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:I=>m.callTool(I),selfCallTool:I=>a.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:o.slug,sourceConnection:d,installationId:v,owner:s.owner,repo:s.name,githubCallTool:w=>m.callTool(w),selfCallTool:w=>a.callTool(w)});let _=null;try{const w=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:v,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,g=I.item?.id;if(!I.item||!g)throw new Error("Failed to create the imported agent");return _=g,{virtualMcpId:g,repo:s,connectionId:S,item:I.item}}catch(w){throw _&&await a.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),await a.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:s,repo:v,connectionId:S,item:_})=>{if(r==="connection"||!s||!_){H(p,o.id),W(p,o.id),U.success(`Added ${v.name}`),e();return}if(p.setQueryData(R.collectionItem(a,o.id,"","VIRTUAL_MCP",s),{item:_}),H(p,o.id),N(s,v),h){h({virtualMcpId:s,repo:v,connectionId:S});return}U.success(`Imported ${v.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(s)},onError:s=>{U.error("Failed to import repo: "+(s instanceof Error?s.message:"Unknown error"))}});return l.status==="installing"||l.status==="authenticating"?t.jsx($,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx($,{status:"error",error:l.error,retry:l.retry}):u.length===0&&l.status==="idle"?t.jsx($,{status:"installing",error:null,retry:l.retry}):u.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(s=>t.jsxs("button",{type:"button",onClick:()=>C(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(G,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):d?n?t.jsx(we,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,installation:n,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Ne,{connectionId:d.id,orgId:o.id,orgSlug:o.slug,onSelect:i,showBackButton:u.length>1,onBack:()=>C(null)}):null}function Ne(y){const e=A.c(47),{connectionId:n,orgId:i,orgSlug:h,onSelect:r,showBackButton:o,onBack:p}=y;let c;e[0]!==i||e[1]!==h?(c={connectionId:V,orgId:i,orgSlug:h},e[0]=i,e[1]=h,e[2]=c):c=e[2];const b=L(c),C=M(),j=Q();let u;e[3]!==n||e[4]!==i?(u=R.githubUserOrgs(i,n),e[3]=n,e[4]=i,e[5]=u):u=e[5];let l;e[6]!==n||e[7]!==b?(l=()=>ge(g=>b.callTool(g),n),e[6]=n,e[7]=b,e[8]=l):l=e[8];let d;e[9]!==u||e[10]!==l?(d={queryKey:u,queryFn:l},e[9]=u,e[10]=l,e[11]=d):d=e[11];const m=X(d);let a;e[12]!==j||e[13]!==n||e[14]!==m||e[15]!==i||e[16]!==h||e[17]!==C?(a={mutationFn:async()=>{const g=await K({connectionId:n,orgId:i,orgSlug:h,persistFallback:E=>j.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ce)});if(g.ran&&!g.ok)throw new Error(g.error??"no token received");const k=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await C.invalidateQueries({queryKey:R.isMCPAuthenticated(k.href,null)}),await C.invalidateQueries({queryKey:R.mcpClientPrefix()}),await m.refetch()},onError:ve},e[12]=j,e[13]=n,e[14]=m,e[15]=i,e[16]=h,e[17]=C,e[18]=a):a=e[18];const f=B(a);if(m.isLoading){let g;return e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=g):g=e[19],g}if(m.isError){let g,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),k=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=g,e[21]=k):(g=e[20],k=e[21]);let E;e[22]!==f?(E=()=>f.mutate(),e[22]=f,e[23]=E):E=e[23];let P;e[24]!==f.isPending?(P=f.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(G,{className:"size-3.5"}),e[24]=f.isPending,e[25]=P):P=e[25];let O;return e[26]!==f.isPending||e[27]!==E||e[28]!==P?(O=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[g,k,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:f.isPending,children:[P,"Reconnect GitHub"]})]}),e[26]=f.isPending,e[27]=E,e[28]=P,e[29]=O):O=e[29],O}const N=m.data;if(!N)return null;let x;e[30]!==p||e[31]!==o?(x=o&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=p,e[31]=o,e[32]=x):x=e[32];let s;if(e[33]!==N.installations||e[34]!==r){let g;e[36]!==r?(g=k=>t.jsxs("button",{type:"button",onClick:()=>r(k),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:k.login}),k.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},k.installationId),e[36]=r,e[37]=g):g=e[37],s=N.installations.map(g),e[33]=N.installations,e[34]=r,e[35]=s}else s=e[35];let v;e[38]!==s?(v=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:s}),e[38]=s,e[39]=v):v=e[39];const S=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[40]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=_):_=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==x||e[45]!==v?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,v,w]}),e[43]=w,e[44]=x,e[45]=v,e[46]=I):I=e[46],I}function ve(y){U.error("Failed to reconnect GitHub: "+(y instanceof Error?y.message:"Unknown error"))}function Ce(){}function we(y){const e=A.c(20),{connectionId:n,orgId:i,orgSlug:h,installation:r,onSelectRepo:o,isSaving:p}=y,[c,b]=T.useState(""),C=re(c,300),j=T.useDeferredValue(C),u=c!==j;let l;e[0]!==u||e[1]!==c?(l=t.jsx(le,{placeholder:"Search repositories...",value:c,onChange:b,isSearching:u}),e[0]=u,e[1]=c,e[2]=l):l=e[2];const d=u?"opacity-40":"opacity-100";let m;e[3]!==d?(m=D("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",d),e[3]=d,e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=a):a=e[5];let f;e[6]!==n||e[7]!==j||e[8]!==r||e[9]!==p||e[10]!==o||e[11]!==i||e[12]!==h?(f=t.jsx(T.Suspense,{fallback:a,children:t.jsx(Se,{connectionId:n,orgId:i,orgSlug:h,installation:r,query:j,onSelectRepo:o,isSaving:p})}),e[6]=n,e[7]=j,e[8]=r,e[9]=p,e[10]=o,e[11]=i,e[12]=h,e[13]=f):f=e[13];let N;e[14]!==m||e[15]!==f?(N=t.jsx("div",{className:m,children:f}),e[14]=m,e[15]=f,e[16]=N):N=e[16];let x;return e[17]!==l||e[18]!==N?(x=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l,N]}),e[17]=l,e[18]=N,e[19]=x):x=e[19],x}function Se(y){const e=A.c(29),{connectionId:n,orgId:i,orgSlug:h,installation:r,query:o,onSelectRepo:p,isSaving:c}=y;let b;e[0]!==n||e[1]!==i||e[2]!==h?(b={connectionId:n,orgId:i,orgSlug:h},e[0]=n,e[1]=i,e[2]=h,e[3]=b):b=e[3];const C=L(b),j=r.type==="User"?"user":"org",u=o?`${j}:${r.login} ${o} in:name`:`${j}:${r.login}`;let l;e[4]!==n||e[5]!==r.login||e[6]!==i||e[7]!==o?(l=R.githubOrgRepos(i,n,r.login,o),e[4]=n,e[5]=r.login,e[6]=i,e[7]=o,e[8]=l):l=e[8];let d;e[9]!==C||e[10]!==u?(d=async x=>{const{signal:s}=x,S=(await C.callTool({name:"search_repositories",arguments:{query:u,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(Ie)},e[9]=C,e[10]=u,e[11]=d):d=e[11];let m;e[12]!==l||e[13]!==d?(m={queryKey:l,queryFn:d},e[12]=l,e[13]=d,e[14]=m):m=e[14];const{data:a}=ee(m);if(a.length===0){let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=x):x=e[15];let s;e[16]!==o?(s=o&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=o,e[17]=s):s=e[17];let v;return e[18]!==s?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[x,s]}),e[18]=s,e[19]=v):v=e[19],v}let f;if(e[20]!==c||e[21]!==p||e[22]!==a){let x;e[24]!==c||e[25]!==p?(x=s=>t.jsxs("button",{type:"button",onClick:()=>p(s),disabled:c,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(G,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[s.private?t.jsx(te,{size:10}):t.jsx(ue,{size:10}),s.private?"Private":"Public"]})]},s.fullName),e[24]=c,e[25]=p,e[26]=x):x=e[26],f=a.map(x),e[20]=c,e[21]=p,e[22]=a,e[23]=f}else f=e[23];let N;return e[27]!==f?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:f}),e[27]=f,e[28]=N):N=e[28],N}function Ie(y){return{name:y.name,fullName:y.full_name,owner:y.full_name.split("/")[0]??"",url:y.html_url,private:y.private,description:y.description,updatedAt:y.updated_at}}function $(y){const e=A.c(33),{status:n,error:i,retry:h}=y;if(n==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=_):_=e[1];const w=i??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let g;e[4]!==h?(g=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=h,e[5]=g):g=e[5];let k;return e[6]!==I||e[7]!==g?(k=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,g]}),e[6]=I,e[7]=g,e[8]=k):k=e[8],k}const r=n==="authenticating";let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(G,{className:"size-5 text-foreground"})}),e[9]=o):o=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=p):p=e[10];const c=r?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==c?(b=t.jsx("p",{className:"text-sm font-medium",children:c}),e[11]=c,e[12]=b):b=e[12];const C=r?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let j;e[13]!==C?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=j):j=e[14];let u;e[15]!==b||e[16]!==j?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,j]}),e[15]=b,e[16]=j,e[17]=u):u=e[17];const l=r?"bg-muted-foreground/30":"bg-foreground animate-pulse";let d;e[18]!==l?(d=D("size-1.5 rounded-full",l),e[18]=l,e[19]=d):d=e[19];let m;e[20]!==d?(m=t.jsx("span",{className:d}),e[20]=d,e[21]=m):m=e[21];const a=r?"bg-foreground animate-pulse":"bg-muted-foreground/30";let f;e[22]!==a?(f=D("size-1.5 rounded-full",a),e[22]=a,e[23]=f):f=e[23];let N;e[24]!==f?(N=t.jsx("span",{className:f}),e[24]=f,e[25]=N):N=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let s;e[27]!==m||e[28]!==N?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,N,x]}),e[27]=m,e[28]=N,e[29]=s):s=e[29];let v;return e[30]!==s||e[31]!==u?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[p,u,s]}),e[30]=s,e[31]=u,e[32]=v):v=e[32],v}export{De as G,G as a,ye as b,he as u};
@@ -1,4 +1,4 @@
1
- import{dx as _t,dy as St,bi as R,I as c,dz as de,bo as Ve,bv as It,bh as Et,aW as Tt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as wt,dB as I,ae as Mt,t as ge,c as Ie,r as W,C as At,j as Ot}from"./index-B5cMFR-y.js";import{u as Ct}from"./use-mcp-client-lixd0gAV.js";import{S as Rt}from"./constants-D_FQAPnt.js";import{d as Nt,D as xt}from"./decopilot-sse-pool-yvpwgZWV.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.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 ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ae;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ae||(Ae={}));var h;(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"})(h||(h={}));var ze="vercel.ai.error",Lt=Symbol.for(ze),Oe,Ce,Z=class Je extends(Ce=Error,Oe=Lt,Ce){constructor({name:e,message:a,cause:r}){super(a),this[Oe]=!0,this.name=e,this.cause=r}static isInstance(e){return Je.hasMarker(e,ze)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function We(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Ye=`vercel.ai.error.${Ge}`,kt=Symbol.for(Ye),Re,Ne,jt=class extends(Ne=Z,Re=kt,Ne){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,Ye)}},qe="AI_JSONParseError",He=`vercel.ai.error.${qe}`,Zt=Symbol.for(He),xe,Pe,De=class extends(Pe=Z,xe=Zt,Pe){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
1
+ import{dx as _t,dy as St,bi as R,I as c,dz as de,bo as Ve,bv as It,bh as Et,aW as Tt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as wt,dB as I,ae as Mt,t as ge,c as Ie,r as W,C as At,j as Ot}from"./index-B5v4NEW3.js";import{u as Ct}from"./use-mcp-client-BhwsvIVS.js";import{S as Rt}from"./constants-D_FQAPnt.js";import{d as Nt,D as xt}from"./decopilot-sse-pool-ZSJ8gdM5.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.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 ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ae;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ae||(Ae={}));var h;(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"})(h||(h={}));var ze="vercel.ai.error",Lt=Symbol.for(ze),Oe,Ce,Z=class Je extends(Ce=Error,Oe=Lt,Ce){constructor({name:e,message:a,cause:r}){super(a),this[Oe]=!0,this.name=e,this.cause=r}static isInstance(e){return Je.hasMarker(e,ze)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function We(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Ye=`vercel.ai.error.${Ge}`,kt=Symbol.for(Ye),Re,Ne,jt=class extends(Ne=Z,Re=kt,Ne){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,Ye)}},qe="AI_JSONParseError",He=`vercel.ai.error.${qe}`,Zt=Symbol.for(He),xe,Pe,De=class extends(Pe=Z,xe=Zt,Pe){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${We(e)}`,cause:e}),this[xe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,He)}},Xe="AI_TypeValidationError",Qe=`vercel.ai.error.${Xe}`,$t=Symbol.for(Qe),Le,ke,X=class ve extends(ke=Z,Le=$t,ke){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Xe,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${We(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Qe)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new jt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ut=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Ft=/"(?: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 je(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ut.test(t)===!1&&Ft.test(t)===!1?e:Bt(e)}function Bt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function Vt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return je(t)}try{return je(t)}finally{Error.stackTraceLimit=e}}function Ee(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Ee(t)}var zt=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={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"},Jt=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function N(){return{}}function Wt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Gt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Yt(){return{type:"boolean"}}function Ke(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function et(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>et(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Ht(t)}}var Ht=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Xt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Qt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function Kt(t){return{type:"string",enum:Array.from(t.values)}}var ea=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ta(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ea(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function aa(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 me=void 0,P={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:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),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 tt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?sa(t):t}var ra=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sa(t){let e="";for(let a=0;a<t.length;a++)ra.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:$e(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=$e(e,r)}function $e(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
@@ -1,4 +1,4 @@
1
- import{bi as f,bj as t,af as R,I as l,c2 as z,H as s,ag as y,ad as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-B5cMFR-y.js";import{P as Je}from"./use-mcp-client-lixd0gAV.js";const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ye(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ge(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=r.match(n);if(c){const m=(c.index??0)+c[0].length;return r.slice(0,m)+`
1
+ import{bi as f,bj as t,af as R,I as l,c2 as z,H as s,ag as y,ad as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-B5v4NEW3.js";import{P as Je}from"./use-mcp-client-BhwsvIVS.js";const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ye(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ge(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=r.match(n);if(c){const m=(c.index??0)+c[0].length;return r.slice(0,m)+`
2
2
  `+i+r.slice(m)}const d=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,u=r.match(d);if(u){const m=(u.index??0)+u[0].length;return r.slice(0,m)+`
3
3
  <head>
4
4
  `+i+`