decocms 3.79.2 → 3.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/client/assets/{AlertCircle-Diz6uT7Y.js → AlertCircle-CzPpSV3W.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-Bo4YThIl.js → ArrowUpRight-BefNTATY.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-BSFt0_RZ.js → CheckCircle-BRNW9lmT.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-C_njLrOU.js → ChevronDown-Di-ZHzN-.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-ByQFERqp.js → ChevronLeft-ByolOLbh.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-D1duQehP.js → ChevronRight-CmB8MBzZ.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-_gM_dQkt.js → ChevronUp-BurUkCqE.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-BJnhQ8u0.js → DotsVertical-Dsznav3Y.js} +1 -1
  9. package/dist/client/assets/{Eye-SUXNGsVY.js → Eye-B8NUm9Br.js} +1 -1
  10. package/dist/client/assets/{FilterLines-CxIQYlMz.js → FilterLines-DMbodALc.js} +1 -1
  11. package/dist/client/assets/{Globe01-CNw0uMhK.js → Globe01-BG9Wm5DJ.js} +1 -1
  12. package/dist/client/assets/{Globe04-B24hCYmg.js → Globe04-Fg_TSPLj.js} +1 -1
  13. package/dist/client/assets/{HardDrive-IPJJMMij.js → HardDrive-BLr46_IN.js} +1 -1
  14. package/dist/client/assets/{Key01-CES8n-fG.js → Key01-Dc0MTS9j.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-D3mZzNi0.js → LayoutLeft-nNhAa0Dy.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-B8zRpPza.js → LinkExternal01-D0OVTAOa.js} +1 -1
  17. package/dist/client/assets/{Monitor01-Uh-3HvZI.js → Monitor01-D_VMj6ZB.js} +1 -1
  18. package/dist/client/assets/{Palette-Du66341h.js → Palette-BmXFbt3l.js} +1 -1
  19. package/dist/client/assets/{Play-CVoFjR5I.js → Play-CAiQqhjZ.js} +1 -1
  20. package/dist/client/assets/{Plus-DoMNANl8.js → Plus-DHDiWYHk.js} +1 -1
  21. package/dist/client/assets/{SearchMd-B-bL1wjq.js → SearchMd-DaWHy1GV.js} +1 -1
  22. package/dist/client/assets/{Settings02-BvivcyYL.js → Settings02-B7jENSJZ.js} +1 -1
  23. package/dist/client/assets/{Shield01-BewRt7sw.js → Shield01-YoAzrA51.js} +1 -1
  24. package/dist/client/assets/{Star01-Ds91SJzA.js → Star01-CaB7lNB9.js} +1 -1
  25. package/dist/client/assets/{Stars01-PS518Jif.js → Stars01-a6WqibZn.js} +1 -1
  26. package/dist/client/assets/{Stars02-CVb_b-OZ.js → Stars02-D2Vky1vN.js} +1 -1
  27. package/dist/client/assets/{Sun-tLN4vA6M.js → Sun-vyxrPcie.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-vo5MpXEz.js → SwitchHorizontal01-C3K-vKiU.js} +1 -1
  29. package/dist/client/assets/{Tool01-BgzvuPeY.js → Tool01-CTw8qR4v.js} +1 -1
  30. package/dist/client/assets/{Trash01-D84eyfFz.js → Trash01-BzTEx-hS.js} +1 -1
  31. package/dist/client/assets/{Upload01-BA5iKtAl.js → Upload01-DwgHgRix.js} +1 -1
  32. package/dist/client/assets/{User01-CeCQHgwg.js → User01-BtO-AoKy.js} +1 -1
  33. package/dist/client/assets/{Users01-DtmLcsFN.js → Users01-BRTza8nY.js} +1 -1
  34. package/dist/client/assets/{Users03-ClWrctLP.js → Users03-9LUo_raC.js} +1 -1
  35. package/dist/client/assets/{X-2HGWB7Oo.js → X-1BuEzBGR.js} +1 -1
  36. package/dist/client/assets/{XCircle-B88UxHjD.js → XCircle-DtHr5hnB.js} +1 -1
  37. package/dist/client/assets/{XClose-DcfEQwVh.js → XClose-qpXD94Yo.js} +1 -1
  38. package/dist/client/assets/{Zap-BeB31T8Y.js → Zap-DluXKGP1.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-BfSTQonf.js → ZapSquare-C2q_71C5.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-Csc4IU4b.js → ZoomOut-DHX-bR9F.js} +1 -1
  41. package/dist/client/assets/{access-gate-BI-B2IAv.js → access-gate-CGKEhEok.js} +1 -1
  42. package/dist/client/assets/add-section-modal-SzJO4niJ.js +1 -0
  43. package/dist/client/assets/{agent-icon-BMQHBhP6.js → agent-icon-B8qJNw4_.js} +1 -1
  44. package/dist/client/assets/{agents-list-XJ_b0Boo.js → agents-list-BCVql_rD.js} +1 -1
  45. package/dist/client/assets/{ai-providers-BT9tXzcJ.js → ai-providers-DfbrzvnV.js} +1 -1
  46. package/dist/client/assets/{alert-BFF74cGy.js → alert-BdFRtqYC.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-0uOi3HqZ.js → alert-dialog-CSRFWtbt.js} +3 -3
  48. package/dist/client/assets/app-editor-CSxGjHmN.js +1 -0
  49. package/dist/client/assets/{auth-CCI_mhgC.js → auth-DOooeHhC.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-DFuEeSui.js → auth-catchall-esDJNOF7.js} +1 -1
  51. package/dist/client/assets/{auth-entry-BE0f6I0U.js → auth-entry-CJkDGWB9.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-DTKSSrMT.js → auth-split-layout-BHOeLJSB.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-eSHjAd3t.js → authenticate-and-persist-oauth-CAo_oHNJ.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-Ct9jaHYX.js → automation-list-row-CBS-1Qac.js} +1 -1
  55. package/dist/client/assets/automation-runs-BhCrA9zN.js +1 -0
  56. package/dist/client/assets/{automations-DAlCMK2H.js → automations-DgOam79q.js} +1 -1
  57. package/dist/client/assets/{avatar-CtVVLapD.js → avatar-BnBqk-2k.js} +1 -1
  58. package/dist/client/assets/{badge-BFvLiE20.js → badge-CpxlbcB7.js} +1 -1
  59. package/dist/client/assets/{block-document-CZwjF0EN.js → block-document-DJ0g8qfo.js} +2 -2
  60. package/dist/client/assets/{brand-context-Dc4UEvfb.js → brand-context-COIa0n8O.js} +1 -1
  61. package/dist/client/assets/{buckets-CY1G8BoT.js → buckets-BINQS-Su.js} +1 -1
  62. package/dist/client/assets/{capability-load-error-CNUOCvDx.js → capability-load-error-HdFgr5IE.js} +1 -1
  63. package/dist/client/assets/{card-DZtTT5Es.js → card-DQnbTJFb.js} +1 -1
  64. package/dist/client/assets/category-editor-vCwJctBK.js +1 -0
  65. package/dist/client/assets/{chat-context-Dqu5Dj_J.js → chat-context-CmZjYRTw.js} +1 -1
  66. package/dist/client/assets/{checkbox-CHXOcnVE.js → checkbox-DokO2DXd.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-BSe4zAji.js → cli-auth-success-NPtl5xjH.js} +1 -1
  68. package/dist/client/assets/collection-detail-DgzIzvmX.js +1 -0
  69. package/dist/client/assets/{collection-display-button-Dn_LJLmj.js → collection-display-button-hKaFuGbc.js} +1 -1
  70. package/dist/client/assets/{collection-search-D6nD206z.js → collection-search-9oxtR-cY.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-cs02GObx.js → collection-tabs-CvHGsfW_.js} +1 -1
  72. package/dist/client/assets/{command-DhLgZpjn.js → command-Bw5g6PzP.js} +1 -1
  73. package/dist/client/assets/{commerce-onboarding-CTTgJmu9.js → commerce-onboarding-QQ9bqrwx.js} +1 -1
  74. package/dist/client/assets/{connect-desktop-dialog-DNAK4U2K.js → connect-desktop-dialog-BktLGd3J.js} +1 -1
  75. package/dist/client/assets/{connection-card-BwnCXxRf.js → connection-card-BZz5WDR5.js} +1 -1
  76. package/dist/client/assets/connection-detail-DNAdeiIH.js +1 -0
  77. package/dist/client/assets/{connection-form-helpers-Csy5hutj.js → connection-form-helpers-CltinQul.js} +1 -1
  78. package/dist/client/assets/connections-BSiahnsQ.js +1 -0
  79. package/dist/client/assets/context-menu-ByPsUX7u.js +1 -0
  80. package/dist/client/assets/{decopilot-CLVJpS6M.js → decopilot-DjAEZRNX.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-_mJQvJZ7.js → decopilot-sse-pool-R-AtQW2s.js} +1 -1
  82. package/dist/client/assets/{dialog-AE8ChAe3.js → dialog-L9SFsS1U.js} +1 -1
  83. package/dist/client/assets/{domain-settings-Dika0U17.js → domain-settings-BDbjH98X.js} +1 -1
  84. package/dist/client/assets/{drawer-Di9WrlRG.js → drawer-D-LP9Hh8.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-ecBYljKf.js → dropdown-menu-ByaGrYAQ.js} +1 -1
  86. package/dist/client/assets/{empty-state-CegPWPc0.js → empty-state-BoeIt5Fh.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-BumzxLvt.js → extract-connection-data-Rczvmr_Y.js} +1 -1
  88. package/dist/client/assets/file-explorer-QNJW4EAt.js +2 -0
  89. package/dist/client/assets/{file-type-icon-BOraV8Gq.js → file-type-icon-C96ES1WD.js} +1 -1
  90. package/dist/client/assets/{files-7E0LjJ-5.js → files-CK2ZpMSb.js} +1 -1
  91. package/dist/client/assets/{form-teSq_9QK.js → form-Ci3Mfx5E.js} +1 -1
  92. package/dist/client/assets/{general-DCnSVDK9.js → general-Dt135lsN.js} +1 -1
  93. package/dist/client/assets/{github-repo-picker-LA1Jld2f.js → github-repo-picker-CLrsrBV_.js} +1 -1
  94. package/dist/client/assets/{hooks-DwlYXenh.js → hooks-BBwQx9Hj.js} +1 -1
  95. package/dist/client/assets/{import-from-deco-dialog-D3BPX6JW.js → import-from-deco-dialog-D3nDDNau.js} +1 -1
  96. package/dist/client/assets/{index-CKtGWWKI.js → index-28ylgXoe.js} +2 -2
  97. package/dist/client/assets/{index-DnokqHCE.js → index-B-wtw2cV.js} +3 -3
  98. package/dist/client/assets/{index-3BvM9m2F.js → index-BRqNUInJ.js} +1 -1
  99. package/dist/client/assets/{index-DJiEBchG.js → index-BYWWr4r7.js} +1 -1
  100. package/dist/client/assets/index-Bh2oT8fz.css +1 -0
  101. package/dist/client/assets/index-CuZWA4Jo.js +1 -0
  102. package/dist/client/assets/index-D4eNxtKO.js +503 -0
  103. package/dist/client/assets/{index-DR6YHYZo.js → index-DF_aAsrE.js} +1 -1
  104. package/dist/client/assets/{index-dCmm-GRp.js → index-DM3CipuA.js} +1 -1
  105. package/dist/client/assets/{index-C4YdUUl9.js → index-DUXTdmoE.js} +1 -1
  106. package/dist/client/assets/{index-UyzF2Wxm.js → index-DrM3Gy-E.js} +3 -3
  107. package/dist/client/assets/{index-DnjeTCJ0.js → index-Dtsr5F6p.js} +1 -1
  108. package/dist/client/assets/{index-BonkSf20.js → index-JnEot5Hj.js} +1 -1
  109. package/dist/client/assets/index-Y9nbouYw.js +1 -0
  110. package/dist/client/assets/{index-DnCrG3F_.js → index-_BBnqQdQ.js} +1 -1
  111. package/dist/client/assets/{index-redirect-CiKtg2BH.js → index-redirect-DmPoZnz_.js} +1 -1
  112. package/dist/client/assets/{input-CTZybS4f.js → input-BiM4A7Ep.js} +1 -1
  113. package/dist/client/assets/{integration-icon-CslqVkci.js → integration-icon-g_GK3RAr.js} +1 -1
  114. package/dist/client/assets/{label-Djcog1jo.js → label-CjJncELr.js} +1 -1
  115. package/dist/client/assets/{login-E5h2Z5UF.js → login-BOHERlR0.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-BcPuGj2k.js → mcp-oauth-CEKI9gHX.js} +1 -1
  117. package/dist/client/assets/{members-w9nno9lo.js → members-BRt8WHan.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-DnGtg8Ra.js → monaco-editor-BiUexVQ3.js} +1 -1
  119. package/dist/client/assets/{monitoring-stats-row-BqgDsRP3.js → monitoring-stats-row-CwoDwl1p.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-azsKM8N9.js → oauth-callback-BuVPnEYV.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-DUI7fLPI.js → oauth-callback-ai-provider-YJv6IQM9.js} +1 -1
  122. package/dist/client/assets/{onboarding-DQTGvP19.js → onboarding-CYpSkBDm.js} +1 -1
  123. package/dist/client/assets/{org-install-BIHuRdOB.js → org-install-DCy7wocy.js} +1 -1
  124. package/dist/client/assets/{org-layout-enkFWMsq.js → org-layout-RT_U7zH8.js} +1 -1
  125. package/dist/client/assets/{organization-choice-CqCgStKm.js → organization-choice-bTsrQb1b.js} +1 -1
  126. package/dist/client/assets/page-seo-form-oftq8ir_.js +1 -0
  127. package/dist/client/assets/page-seo-sheet-CAgRh54V.js +1 -0
  128. package/dist/client/assets/{popover-DG0h5msu.js → popover-CdhOYhn4.js} +1 -1
  129. package/dist/client/assets/post-editor-B3gQokNp.js +1 -0
  130. package/dist/client/assets/{preview-dialog-Bnu3vr0P.js → preview-dialog-vDgojfWg.js} +2 -2
  131. package/dist/client/assets/{primitives-BVa9_bXR.js → primitives-CPVg2JCk.js} +1 -1
  132. package/dist/client/assets/{profile-Dp5DSYPN.js → profile-C8hjNf5c.js} +1 -1
  133. package/dist/client/assets/project-app-view-CVZVC5T9.js +1 -0
  134. package/dist/client/assets/record-editor-BZDypwa5.js +1 -0
  135. package/dist/client/assets/registry-BSMljcPA.js +2 -0
  136. package/dist/client/assets/{registry-layout-DSIR5CP1.js → registry-layout-BuJ69l8z.js} +1 -1
  137. package/dist/client/assets/{require-capability-Cj0iYy81.js → require-capability-7xlqOMAl.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-clm6boiC.js → required-auth-layout-DMkbzFqw.js} +1 -1
  139. package/dist/client/assets/{reset-password-B-IQNmbh.js → reset-password-CANGclZQ.js} +1 -1
  140. package/dist/client/assets/{roles-Cba1TfDM.js → roles-BsbFpQdA.js} +1 -1
  141. package/dist/client/assets/{save-status-CDIs_R_V.js → save-status-BZrjQZNL.js} +1 -1
  142. package/dist/client/assets/{scroll-area-BBReqUns.js → scroll-area-DaDHqFsI.js} +2 -2
  143. package/dist/client/assets/{search-input-D9asghaf.js → search-input-CA0juGKQ.js} +1 -1
  144. package/dist/client/assets/{secrets-CN8bUJoZ.js → secrets-2KI9BQIB.js} +1 -1
  145. package/dist/client/assets/sections-editor-DAz_riff.js +2 -0
  146. package/dist/client/assets/{select-CYFnhI-Q.js → select-lfhjFS6i.js} +1 -1
  147. package/dist/client/assets/{select-model-35S1fWTq.js → select-model-DhPTkTLZ.js} +1 -1
  148. package/dist/client/assets/seo-editor-qYixYUVP.js +1 -0
  149. package/dist/client/assets/{settings-layout-BBO5MmT3.js → settings-layout-D8_yU3Dv.js} +1 -1
  150. package/dist/client/assets/{settings-section-DOlV_atx.js → settings-section-uGwPOE8T.js} +1 -1
  151. package/dist/client/assets/{sheet-DALs-qBg.js → sheet-nKeubIDJ.js} +1 -1
  152. package/dist/client/assets/{shell-controls-B6QkcDFu.js → shell-controls-Nhg6txWq.js} +1 -1
  153. package/dist/client/assets/{shell-layout-Ch8BfEKU.js → shell-layout-DJP1UAvL.js} +1 -1
  154. package/dist/client/assets/{shell-route-loading-RsrwOcS1.js → shell-route-loading-BQkX9uZV.js} +1 -1
  155. package/dist/client/assets/{sidebar-hZIrovG4.js → sidebar-BDxhgXc-.js} +1 -1
  156. package/dist/client/assets/{skeleton-BqZgigOh.js → skeleton-CQjs3VsL.js} +1 -1
  157. package/dist/client/assets/sortable.esm-DaR8hxU_.js +5 -0
  158. package/dist/client/assets/{sso-BXwKoXqN.js → sso-hQT21VNe.js} +1 -1
  159. package/dist/client/assets/{store-CRZGNrMb.js → store-BEmqzV80.js} +1 -1
  160. package/dist/client/assets/store-registry-BoeF7jFP.js +2 -0
  161. package/dist/client/assets/{studio-tools-C1AZbzwg.js → studio-tools-CAUx-JUt.js} +1 -1
  162. package/dist/client/assets/{switch-DRDIUTD7.js → switch-Vf_P6Fjw.js} +1 -1
  163. package/dist/client/assets/{table-tYYVDDAQ.js → table-Df43OI16.js} +1 -1
  164. package/dist/client/assets/{tabs-D__sk4iN.js → tabs-B7LOh75O.js} +1 -1
  165. package/dist/client/assets/{task-status-CftQiZKN.js → task-status-CNl7XTqg.js} +1 -1
  166. package/dist/client/assets/{textarea-DmmCVjU6.js → textarea-CoSni5ST.js} +1 -1
  167. package/dist/client/assets/{toggle-group-5CInie8P.js → toggle-group-Dpya1ElG.js} +1 -1
  168. package/dist/client/assets/{toolbar-Bm-rdLjh.js → toolbar-C-FtiPvy.js} +1 -1
  169. package/dist/client/assets/{tooltip-C7L4o0rn.js → tooltip-Cs_BNuMF.js} +1 -1
  170. package/dist/client/assets/{types-CppGS_VJ.js → types-GBPItn3L.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-Deso-Vyj.js → use-ai-providers-Cyy4e6Er.js} +1 -1
  172. package/dist/client/assets/{use-automations-DdPVJNl5.js → use-automations-jx__re2k.js} +1 -1
  173. package/dist/client/assets/{use-capability-CGVlaZtI.js → use-capability-_e3uVe_7.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-Bp0qVbdD.js → use-clock-tick-g2v6P087.js} +1 -1
  175. package/dist/client/assets/{use-collections-CXeEMOwb.js → use-collections-B_GMLsdD.js} +1 -1
  176. package/dist/client/assets/{use-connection-DqvYiUe3.js → use-connection-DKt0DY8s.js} +1 -1
  177. package/dist/client/assets/{use-copy-H4KuRxx2.js → use-copy-CgtuLhVL.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp--tV5feR-.js → use-create-virtual-mcp-3Gcq1gem.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-Ct9kek4B.js → use-debounced-autosave-EPMbx34N.js} +1 -1
  180. package/dist/client/assets/{use-delete-connection-B2XplI5F.js → use-delete-connection-CWY-Tuh_.js} +1 -1
  181. package/dist/client/assets/{use-file-configs-CJ5VKJt7.js → use-file-configs-Ci1h3IZS.js} +1 -1
  182. package/dist/client/assets/{use-infinite-scroll-BpnVw1p2.js → use-infinite-scroll-Dt6SxdrG.js} +1 -1
  183. package/dist/client/assets/{use-join-requests-rgaNUN9B.js → use-join-requests-Dtt8rzJS.js} +1 -1
  184. package/dist/client/assets/{use-mcp-client-Cv0jyhEU.js → use-mcp-client-lyJJArps.js} +1 -1
  185. package/dist/client/assets/{use-mcp-prompts-CPZOOi8c.js → use-mcp-prompts-82Xtua4M.js} +1 -1
  186. package/dist/client/assets/{use-mcp-tools-z50pjVux.js → use-mcp-tools-CdHM3tvY.js} +1 -1
  187. package/dist/client/assets/{use-members-jM6HOjam.js → use-members-CR5Y6qBg.js} +1 -1
  188. package/dist/client/assets/{use-navigate-to-agent-CytgRfBH.js → use-navigate-to-agent-DKc1WVEH.js} +1 -1
  189. package/dist/client/assets/{use-org-auth-client-DjPrRX3t.js → use-org-auth-client-DyCA15LL.js} +1 -1
  190. package/dist/client/assets/{use-org-sso-QBVELOwd.js → use-org-sso-DzO_wPSE.js} +1 -1
  191. package/dist/client/assets/{use-organization-roles-DHxcYiQL.js → use-organization-roles-CfNQzskd.js} +1 -1
  192. package/dist/client/assets/{use-organization-settings-DPqJ7ETy.js → use-organization-settings-DmFrFel5.js} +1 -1
  193. package/dist/client/assets/{use-registry-connections-DQ1fpeHW.js → use-registry-connections-grv_p5nm.js} +1 -1
  194. package/dist/client/assets/{use-secrets-C3RMGjE2.js → use-secrets-DzWb-lJi.js} +1 -1
  195. package/dist/client/assets/{use-status-sounds-BaJ0EN3G.js → use-status-sounds-CeAiKW9f.js} +1 -1
  196. package/dist/client/assets/{use-view-mode-DMk0VP0I.js → use-view-mode-PWJQxDpL.js} +1 -1
  197. package/dist/client/assets/{use-virtual-mcp-iRRxKkRN.js → use-virtual-mcp-Bglvu7_H.js} +1 -1
  198. package/dist/client/assets/useInfiniteQuery-v9qNAGwf.js +1 -0
  199. package/dist/client/assets/useSuspenseInfiniteQuery-Bu3QWDEr.js +1 -0
  200. package/dist/client/assets/{variant-calendar-Cn9DL04u.js → variant-calendar-BwPeBwqf.js} +1 -1
  201. package/dist/client/assets/{view-mode-toggle-DnLJJSFI.js → view-mode-toggle-B_Gx2-J_.js} +1 -1
  202. package/dist/client/index.html +2 -2
  203. package/dist/server/cli.js +1 -1
  204. package/package.json +1 -1
  205. package/dist/client/assets/add-section-modal-BBef0kzW.js +0 -1
  206. package/dist/client/assets/app-editor-DB3LZKk9.js +0 -1
  207. package/dist/client/assets/automation-runs-CNqGFhXQ.js +0 -1
  208. package/dist/client/assets/calendar-Cof0eQRR.js +0 -1
  209. package/dist/client/assets/category-editor-CqVdn-A-.js +0 -1
  210. package/dist/client/assets/collection-detail-CGFO7Nxa.js +0 -1
  211. package/dist/client/assets/connection-detail-jhV3T5Vf.js +0 -1
  212. package/dist/client/assets/connections-RSAnGIGn.js +0 -1
  213. package/dist/client/assets/context-menu-CwmbYH1X.js +0 -1
  214. package/dist/client/assets/file-explorer-pkuer-wd.js +0 -2
  215. package/dist/client/assets/image-field-ycul5miD.js +0 -1
  216. package/dist/client/assets/index-BB0hMJf7.js +0 -1
  217. package/dist/client/assets/index-Bcj3iVpr.js +0 -1
  218. package/dist/client/assets/index-CqVkj8du.js +0 -502
  219. package/dist/client/assets/index-wICsQ-2V.css +0 -1
  220. package/dist/client/assets/page-seo-form-CLI6M5cV.js +0 -1
  221. package/dist/client/assets/page-seo-sheet-ClPikk0g.js +0 -1
  222. package/dist/client/assets/post-editor-BVwj0umw.js +0 -1
  223. package/dist/client/assets/project-app-view-r7Nmocf7.js +0 -1
  224. package/dist/client/assets/record-editor-DoT_RQtf.js +0 -1
  225. package/dist/client/assets/registry-Do0X3IQW.js +0 -2
  226. package/dist/client/assets/save-referenced-block-BJospazn.js +0 -1
  227. package/dist/client/assets/schema-form-B6Wg-hy1.js +0 -2
  228. package/dist/client/assets/sections-editor-BojFR4GO.js +0 -2
  229. package/dist/client/assets/seo-editor-DBNUZ0fG.js +0 -1
  230. package/dist/client/assets/sortable.esm-BtnRUgUU.js +0 -5
  231. package/dist/client/assets/store-registry-C5xb_cZe.js +0 -2
  232. package/dist/client/assets/use-deco-credits-rzfxapgg.js +0 -1
  233. package/dist/client/assets/useInfiniteQuery-DVN2QYOz.js +0 -1
  234. package/dist/client/assets/useSuspenseInfiniteQuery-BKCXXvPp.js +0 -1
@@ -1 +0,0 @@
1
- import{c as ne,r as ce,l as be,j as t,B as fe,K as xe,k as Ve,a2 as tt,v as st}from"./index-UyzF2Wxm.js";import{u as ze}from"./useInfiniteQuery-DVN2QYOz.js";import{u as lt}from"./use-connection-DqvYiUe3.js";import{i as nt,a as at,S as rt,u as it}from"./use-mcp-client-Cv0jyhEU.js";import{u as ot}from"./use-virtual-mcp-iRRxKkRN.js";import{C as ct}from"./card-DZtTT5Es.js";import{c as Ke,d as qe,S as dt,b as mt}from"./sheet-DALs-qBg.js";import{c as Ge,d as He,a as Ne,e as se,b as Be,T as le}from"./table-tYYVDDAQ.js";import{E as Se}from"./empty-state-CegPWPc0.js";import{u as ke}from"./use-infinite-scroll-BpnVw1p2.js";import{u as ut}from"./use-members-jM6HOjam.js";import{S as ue}from"./task-status-CftQiZKN.js";import{e as ft}from"./use-automations-DdPVJNl5.js";import{u as xt}from"./studio-tools-C1AZbzwg.js";import{u as ht}from"./useSuspenseInfiniteQuery-BKCXXvPp.js";import{B as je}from"./badge-BFvLiE20.js";import{b as gt,c as pt,S as jt,a as ge,d as bt}from"./select-CYFnhI-Q.js";import{C as Le}from"./checkbox-CHXOcnVE.js";import{t as he}from"./ChevronDown-C_njLrOU.js";import{b as Nt,C as vt,a as Fe,c as St,e as yt,d as wt}from"./command-DhLgZpjn.js";import{a as Je,b as Qe,P as Ze}from"./popover-DG0h5msu.js";import{A as We}from"./avatar-CtVVLapD.js";import{n as ye}from"./ChevronUp-_gM_dQkt.js";import{n as Ie}from"./XCircle-B88UxHjD.js";import{i as _t}from"./FilterLines-CxIQYlMz.js";import{B as Ct,H as Tt}from"./scroll-area-BBReqUns.js";import{I as Pe}from"./integration-icon-CslqVkci.js";function Ue(l){const e=ne.c(74),{options:s,onValueChange:n,defaultValue:r,placeholder:i,variant:a,animation:d,maxCount:c,modalPopover:o,asChild:j,className:N,disabled:v,onSearchChange:m}=l;let b;e[0]!==r?(b=r===void 0?[]:r,e[0]=r,e[1]=b):b=e[1];const x=b,p=i===void 0?"Select items":i,h=a===void 0?"default":a,u=d===void 0?0:d,S=c===void 0?3:c,f=o===void 0?!1:o,C=j===void 0?!1:j,w=v===void 0?!1:v,[g,y]=ce.useState(x),[T,_]=ce.useState(!1);let k,P;e[2]!==x||e[3]!==g?(k=()=>{JSON.stringify(g)!==JSON.stringify(x)&&y(x)},P=[x,g],e[2]=x,e[3]=g,e[4]=k,e[5]=P):(k=e[4],P=e[5]),ce.useEffect(k,P);let I;e[6]!==n||e[7]!==g?(I=$=>{if($.key==="Enter")_(!0);else if($.key==="Backspace"&&!$.currentTarget.value){const B=[...g];B.pop(),y(B),n(B)}},e[6]=n,e[7]=g,e[8]=I):I=e[8];const D=I;let M;e[9]!==n||e[10]!==g?(M=$=>{const B=g.includes($.value)?g.filter(me=>me!==$.value):[...g,$.value];y(B),n(B)},e[9]=n,e[10]=g,e[11]=M):M=e[11];const A=M;let L;e[12]!==n?(L=()=>{y([]),n([])},e[12]=n,e[13]=L):L=e[13];const K=L;let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{_(Mt)},e[14]=q):q=e[14];const Q=q;let J;e[15]!==K||e[16]!==n||e[17]!==s||e[18]!==g.length?(J=()=>{if(g.length===s.length)K();else{const $=s.map(Pt);y($),n($)}},e[15]=K,e[16]=n,e[17]=s,e[18]=g.length,e[19]=J):J=e[19];const E=J;let U;e[20]!==C?(U=C?{}:{variant:"outline"},e[20]=C,e[21]=U):U=e[21];let O;e[22]!==N?(O=be("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",N),e[22]=N,e[23]=O):O=e[23];let V;e[24]!==u||e[25]!==S||e[26]!==s||e[27]!==p||e[28]!==g||e[29]!==h?(V=g.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[g.slice(0,S).map($=>{const B=s.find(ve=>ve.value===$),me=B?.icon;return t.jsxs(je,{variant:h==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${u}s`},children:[me&&t.jsx(me,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:B?.label})]},$)}),g.length>S&&t.jsxs(je,{variant:h==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${u}s`},children:["+",g.length-S]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(he,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:p}),t.jsx(he,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=u,e[25]=S,e[26]=s,e[27]=p,e[28]=g,e[29]=h,e[30]=V):V=e[30];let F;e[31]!==w||e[32]!==U||e[33]!==O||e[34]!==V?(F=t.jsx(Je,{asChild:!0,children:t.jsx(fe,{ref:null,...U,onClick:Q,className:O,disabled:w,children:V})}),e[31]=w,e[32]=U,e[33]=O,e[34]=V,e[35]=F):F=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=()=>_(!1),e[36]=G):G=e[36];const X=!m;let z;e[37]!==D||e[38]!==m?(z=t.jsx(Nt,{placeholder:"Search...",onKeyDown:D,onValueChange:m,className:"rounded-t-xl"}),e[37]=D,e[38]=m,e[39]=z):z=e[39];let ee;e[40]===Symbol.for("react.memo_cache_sentinel")?(ee=t.jsx(vt,{children:"No results found."}),e[40]=ee):ee=e[40];let te;e[41]!==E?(te=()=>{E()},e[41]=E,e[42]=te):te=e[42];let Z;e[43]!==E?(Z=$=>{$.stopPropagation(),E()},e[43]=E,e[44]=Z):Z=e[44];const de=g.length===s.length&&s.length>0;let ae;e[45]!==de||e[46]!==E?(ae=t.jsx(Le,{checked:de,onCheckedChange:E,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:It}),e[45]=de,e[46]=E,e[47]=ae):ae=e[47];let re;e[48]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx("span",{children:"(Select All)"}),e[48]=re):re=e[48];let W;e[49]!==Z||e[50]!==ae?(W=t.jsxs("div",{className:"flex items-center w-full",onClick:Z,children:[ae,re]}),e[49]=Z,e[50]=ae,e[51]=W):W=e[51];let Y;e[52]!==te||e[53]!==W?(Y=t.jsx(Fe,{onSelect:te,className:"cursor-pointer",children:W},"all"),e[52]=te,e[53]=W,e[54]=Y):Y=e[54];let ie;if(e[55]!==s||e[56]!==g||e[57]!==A){let $;e[59]!==g||e[60]!==A?($=B=>{const me=g.includes(B.value);return t.jsx(Fe,{onSelect:()=>{A(B)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ve=>{ve.stopPropagation(),A(B)},children:[t.jsx(Le,{checked:me,onCheckedChange:()=>{A(B)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:kt}),B.icon&&t.jsx(B.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:B.label})]})},B.value)},e[59]=g,e[60]=A,e[61]=$):$=e[61],ie=s.map($),e[55]=s,e[56]=g,e[57]=A,e[58]=ie}else ie=e[58];let R;e[62]!==Y||e[63]!==ie?(R=t.jsxs(St,{className:"rounded-b-xl",children:[ee,t.jsxs(yt,{children:[Y,ie]})]}),e[62]=Y,e[63]=ie,e[64]=R):R=e[64];let H;e[65]!==X||e[66]!==z||e[67]!==R?(H=t.jsx(Qe,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:G,children:t.jsxs(wt,{shouldFilter:X,className:"rounded-xl",children:[z,R]})}),e[65]=X,e[66]=z,e[67]=R,e[68]=H):H=e[68];let oe;return e[69]!==T||e[70]!==f||e[71]!==F||e[72]!==H?(oe=t.jsxs(Ze,{open:T,onOpenChange:_,modal:f,children:[F,H]}),e[69]=T,e[70]=f,e[71]=F,e[72]=H,e[73]=oe):oe=e[73],oe}function kt(l){return l.stopPropagation()}function It(l){return l.stopPropagation()}function Pt(l){return l.value}function Mt(l){return!l}const Ye=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],Dt=40;function Ts(l){const s=(l.endDate.getTime()-l.startDate.getTime())/Dt;return Ye.find(r=>r.ms>=s)?.label??"1d"}function Me(l){const e=Ye.find(i=>i.label===l);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(l);if(!s)return 6e4;const n=parseInt(s[1],10),r=s[2];return r==="h"?n*36e5:r==="d"?n*864e5:n*6e4}function Rt(l,e){const s=new Date(l);return Me(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Oe(l,e){const s=Me(e);return new Date(Math.floor(l.getTime()/s)*s)}function At(l){return l>=1e4?`${(l/1e3).toFixed(1)}s`:`${Math.round(l)}ms`}function De(l){return Number.isFinite(l)?l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:Math.round(l).toLocaleString():"0"}function Re(l){return Number.isFinite(l)?`$${l.toFixed(l<1?4:2)}`:"$0.00"}function ks(l,e,s){const n=Me(s),r=Oe(e.startDate,s).getTime(),i=e.endDate.getTime(),a=new Map(l.map(c=>[Oe(new Date(c.timestamp),s).getTime(),c])),d=[];for(let c=r;c<=i;c+=n){const o=a.get(c),j=new Date(c).toISOString();d.push({t:j,ts:c,label:Rt(j,s),calls:o?.calls??0,errors:o?.errors??0,errorRate:o?.errorRate??0,avg:o?.avg??0,p50:o?.p50??0,p95:o?.p95??0,inputTokens:o?.inputTokens??0,outputTokens:o?.outputTokens??0,totalTokens:o?.totalTokens??0,costUsd:o?.costUsd??0})}return d}function Is(l,e){return e==="requests"?l.calls:e==="errors"?l.errorRate:l.avgDurationMs}function Ps(l,e){return e==="requests"?l.calls.toLocaleString():e==="errors"?`${l.errorRate.toFixed(1)}%`:At(l.avgDurationMs)}function Ae(l){return(l.run_config??{}).agent?.id??(l.virtual_mcp_id||null)}function Ee(l,e,s,n){if(!l)return n;const r=e.find(a=>a.id===l)??s?.find(a=>a.id===l);if(r?.title)return r.title;const i=nt(l);return i?at(i).title??n:l}function $e(l,e,s){return l?(e.find(r=>r.id===l)??s?.find(r=>r.id===l))?.icon??null:null}function Xe(l){return l?.data?.members??[]}function we(l){const e=ne.c(33),{thread:s,connections:n,virtualMcps:r,selectedIndex:i,total:a,onPrev:d,onNext:c}=l;let o,j;if(e[0]!==n||e[1]!==s||e[2]!==r){const k=Ae(s);o=Ee(k,r,n,""),j=$e(k,r,n),e[0]=n,e[1]=s,e[2]=r,e[3]=o,e[4]=j}else o=e[3],j=e[4];const N=j,v=o||s.title;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Ie,{}),e[5]=m):m=e[5];let b;e[6]!==N||e[7]!==v?(b=t.jsx(Pe,{icon:N,name:v,size:"sm",fallbackIcon:m,className:"shadow-sm shrink-0 rounded-md"}),e[6]=N,e[7]=v,e[8]=b):b=e[8];let x;e[9]!==s.title?(x=t.jsx(dt,{className:"text-sm leading-snug truncate",children:s.title}),e[9]=s.title,e[10]=x):x=e[10];let p;e[11]!==o?(p=o&&t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:o}),e[11]=o,e[12]=p):p=e[12];let h;e[13]!==x||e[14]!==p?(h=t.jsxs("div",{className:"min-w-0",children:[x,p]}),e[13]=x,e[14]=p,e[15]=h):h=e[15];let u;e[16]!==b||e[17]!==h?(u=t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b,h]}),e[16]=b,e[17]=h,e[18]=u):u=e[18];const S=i===0;let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ye,{size:14}),e[19]=f):f=e[19];let C;e[20]!==d||e[21]!==S?(C=t.jsx(fe,{size:"icon",variant:"ghost",onClick:d,disabled:S,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous thread",children:f}),e[20]=d,e[21]=S,e[22]=C):C=e[22];const w=i===a-1;let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(he,{size:14}),e[23]=g):g=e[23];let y;e[24]!==c||e[25]!==w?(y=t.jsx(fe,{size:"icon",variant:"ghost",onClick:c,disabled:w,className:"h-7 w-7 text-muted-foreground","aria-label":"Next thread",children:g}),e[24]=c,e[25]=w,e[26]=y):y=e[26];let T;e[27]!==C||e[28]!==y?(T=t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[C,y]}),e[27]=C,e[28]=y,e[29]=T):T=e[29];let _;return e[30]!==T||e[31]!==u?(_=t.jsx(mt,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[u,T]})}),e[30]=T,e[31]=u,e[32]=_):_=e[32],_}function Et(l){const e=ne.c(48),{thread:s,connections:n,virtualMcps:r,members:i}=l;let a,d;if(e[0]!==n||e[1]!==s||e[2]!==r){const M=Ae(s);a=Ee(M,r,n,""),d=$e(M,r,n),e[0]=n,e[1]=s,e[2]=r,e[3]=a,e[4]=d}else a=e[3],d=e[4];const c=d;let o;if(e[5]!==i||e[6]!==s.created_by){const M=Xe(i);let A;e[8]!==s.created_by?(A=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=A):A=e[9],o=M.find(A),e[5]=i,e[6]=s.created_by,e[7]=o}else o=e[7];const j=o;let N;e[10]!==j?.user.email||e[11]!==j?.user.name||e[12]!==s.created_by?(N=j?.user.name??j?.user.email??s.created_by?.substring(0,8)??"—",e[10]=j?.user.email,e[11]=j?.user.name,e[12]=s.created_by,e[13]=N):N=e[13];const v=N,m=j?.user.image??void 0;let b;e[14]!==s.created_at?(b=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=b):b=e[15];const x=b,p=ue[s.status]??ue.completed,h=p.icon;let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Status"}),e[16]=u):u=e[16];let S;e[17]!==h||e[18]!==p.iconClassName?(S=t.jsx(h,{size:13,className:p.iconClassName}),e[17]=h,e[18]=p.iconClassName,e[19]=S):S=e[19];let f;e[20]!==p.labelColor?(f=be("text-sm",p.labelColor),e[20]=p.labelColor,e[21]=f):f=e[21];let C;e[22]!==p.label||e[23]!==f?(C=t.jsx("span",{className:f,children:p.label}),e[22]=p.label,e[23]=f,e[24]=C):C=e[24];let w;e[25]!==S||e[26]!==C?(w=t.jsxs("div",{children:[u,t.jsxs("div",{className:"flex items-center gap-1.5",children:[S,C]})]}),e[25]=S,e[26]=C,e[27]=w):w=e[27];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Date"}),e[28]=g):g=e[28];let y;e[29]!==x?(y=t.jsxs("div",{children:[g,t.jsx("div",{className:"text-sm text-foreground",children:x})]}),e[29]=x,e[30]=y):y=e[30];let T;e[31]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[31]=T):T=e[31];let _;e[32]!==m||e[33]!==v?(_=t.jsx(We,{url:m,fallback:v,shape:"circle",size:"2xs",className:"shrink-0"}),e[32]=m,e[33]=v,e[34]=_):_=e[34];let k;e[35]!==v?(k=t.jsx("span",{className:"text-sm text-foreground",children:v}),e[35]=v,e[36]=k):k=e[36];let P;e[37]!==_||e[38]!==k?(P=t.jsxs("div",{children:[T,t.jsxs("div",{className:"flex items-center gap-2",children:[_,k]})]}),e[37]=_,e[38]=k,e[39]=P):P=e[39];let I;e[40]!==c||e[41]!==a?(I=a&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Pe,{icon:c,name:a,size:"xs",fallbackIcon:t.jsx(Ie,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"text-sm text-foreground",children:a})]})]}),e[40]=c,e[41]=a,e[42]=I):I=e[42];let D;return e[43]!==y||e[44]!==P||e[45]!==I||e[46]!==w?(D=t.jsxs("div",{className:"px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm",children:[w,y,P,I]}),e[43]=y,e[44]=P,e[45]=I,e[46]=w,e[47]=D):D=e[47],D}function $t(l){const e=ne.c(72),{thread:s,usage:n,members:r,connections:i,virtualMcps:a,onClick:d,lastRowRef:c}=l;let o,j;if(e[0]!==i||e[1]!==s||e[2]!==a){const F=Ae(s);o=Ee(F,a,i,"—"),j=$e(F,a,i),e[0]=i,e[1]=s,e[2]=a,e[3]=o,e[4]=j}else o=e[3],j=e[4];const N=j;let v;if(e[5]!==r||e[6]!==s.created_by){const F=Xe(r);let G;e[8]!==s.created_by?(G=X=>X.userId===s.created_by,e[8]=s.created_by,e[9]=G):G=e[9],v=F.find(G),e[5]=r,e[6]=s.created_by,e[7]=v}else v=e[7];const m=v;let b;e[10]!==m?.user.email||e[11]!==m?.user.name||e[12]!==s.created_by?(b=m?.user.name??m?.user.email??s.created_by?.substring(0,8)??"—",e[10]=m?.user.email,e[11]=m?.user.name,e[12]=s.created_by,e[13]=b):b=e[13];const x=b,p=m?.user.image??void 0;let h,u;if(e[14]!==s.created_at){const F=new Date(s.created_at);h=F.toLocaleDateString("en-US",{month:"short",day:"numeric"}),u=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[14]=s.created_at,e[15]=h,e[16]=u}else h=e[15],u=e[16];const S=u,f=ue[s.status]??ue.completed,C=f.icon;let w;e[17]!==s.title?(w=t.jsx(le,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:t.jsx("div",{className:"font-medium text-foreground truncate",children:s.title})}),e[17]=s.title,e[18]=w):w=e[18];let g;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{}),e[19]=g):g=e[19];let y;e[20]!==N||e[21]!==o?(y=t.jsx(Pe,{icon:N,name:o,size:"xs",fallbackIcon:g,className:"shrink-0 size-5! min-w-5! rounded-md"}),e[20]=N,e[21]=o,e[22]=y):y=e[22];let T;e[23]!==o?(T=t.jsx("span",{className:"truncate",children:o}),e[23]=o,e[24]=T):T=e[24];let _;e[25]!==y||e[26]!==T?(_=t.jsx(le,{className:"w-36 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,T]})}),e[25]=y,e[26]=T,e[27]=_):_=e[27];let k;e[28]!==p||e[29]!==x?(k=t.jsx(We,{url:p,fallback:x,shape:"circle",size:"2xs",className:"shrink-0"}),e[28]=p,e[29]=x,e[30]=k):k=e[30];let P;e[31]!==x?(P=t.jsx("span",{className:"truncate",children:x}),e[31]=x,e[32]=P):P=e[32];let I;e[33]!==k||e[34]!==P?(I=t.jsx(le,{className:"w-28 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[k,P]})}),e[33]=k,e[34]=P,e[35]=I):I=e[35];let D;e[36]!==C||e[37]!==f.iconClassName?(D=t.jsx(C,{size:14,className:f.iconClassName}),e[36]=C,e[37]=f.iconClassName,e[38]=D):D=e[38];let M;e[39]!==f.labelColor?(M=be("text-sm",f.labelColor),e[39]=f.labelColor,e[40]=M):M=e[40];let A;e[41]!==f.label||e[42]!==M?(A=t.jsx("span",{className:M,children:f.label}),e[41]=f.label,e[42]=M,e[43]=A):A=e[43];let L;e[44]!==D||e[45]!==A?(L=t.jsx(le,{className:"w-24 px-3",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[D,A]})}),e[44]=D,e[45]=A,e[46]=L):L=e[46];let K;e[47]!==n?(K=n?De(n.totalTokens):"—",e[47]=n,e[48]=K):K=e[48];let q;e[49]!==K?(q=t.jsx(le,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:K}),e[49]=K,e[50]=q):q=e[50];let Q;e[51]!==n?(Q=n&&n.costUsd>0?Re(n.costUsd):"—",e[51]=n,e[52]=Q):Q=e[52];let J;e[53]!==Q?(J=t.jsx(le,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:Q}),e[53]=Q,e[54]=J):J=e[54];let E;e[55]!==h?(E=t.jsx("div",{children:h}),e[55]=h,e[56]=E):E=e[56];let U;e[57]!==S?(U=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:S}),e[57]=S,e[58]=U):U=e[58];let O;e[59]!==E||e[60]!==U?(O=t.jsxs(le,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[E,U]}),e[59]=E,e[60]=U,e[61]=O):O=e[61];let V;return e[62]!==c||e[63]!==d||e[64]!==I||e[65]!==L||e[66]!==q||e[67]!==J||e[68]!==O||e[69]!==w||e[70]!==_?(V=t.jsxs(Ne,{ref:c,className:"h-14 md:h-16 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",onClick:d,children:[w,_,I,L,q,J,O]}),e[62]=c,e[63]=d,e[64]=I,e[65]=L,e[66]=q,e[67]=J,e[68]=O,e[69]=w,e[70]=_,e[71]=V):V=e[71],V}const _e=100;function Lt(l){const e=ne.c(37),{client:s,locator:n,thread:r,connections:i,virtualMcps:a,members:d,selectedIndex:c,total:o,onPrev:j,onNext:N}=l;let v;e[0]!==n||e[1]!==r.id?(v=xe.threadMessages(n,r.id),e[0]=n,e[1]=r.id,e[2]=v):v=e[2];let m;e[3]!==s||e[4]!==r.id?(m=async P=>{const{pageParam:I}=P,D=I===void 0?0:I;if(!s)throw new Error("MCP client is not available");const M=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:r.id,limit:_e,offset:D}});return M.structuredContent??M},e[3]=s,e[4]=r.id,e[5]=m):m=e[5];let b;e[6]!==v||e[7]!==m?(b={queryKey:v,queryFn:m,initialPageParam:0,getNextPageParam:Ot,staleTime:6e4},e[6]=v,e[7]=m,e[8]=b):b=e[8];const{data:x,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:u}=ht(b);let S;e[9]!==x.pages?(S=x.pages.flatMap(Ut).filter(Ft),e[9]=x.pages,e[10]=S):S=e[10];const f=S,C=Ct(f);let w;e[11]!==p||e[12]!==h||e[13]!==u?(w=()=>{h&&!u&&p()},e[11]=p,e[12]=h,e[13]=u,e[14]=w):w=e[14];const g=ke(w,h??!1,u);let y;e[15]!==i||e[16]!==N||e[17]!==j||e[18]!==c||e[19]!==r||e[20]!==o||e[21]!==a?(y=t.jsx(we,{thread:r,connections:i,virtualMcps:a,selectedIndex:c,total:o,onPrev:j,onNext:N}),e[15]=i,e[16]=N,e[17]=j,e[18]=c,e[19]=r,e[20]=o,e[21]=a,e[22]=y):y=e[22];let T;e[23]!==i||e[24]!==d||e[25]!==r||e[26]!==a?(T=t.jsx(Et,{thread:r,connections:i,virtualMcps:a,members:d}),e[23]=i,e[24]=d,e[25]=r,e[26]=a,e[27]=T):T=e[27];let _;e[28]!==u||e[29]!==g||e[30]!==C||e[31]!==f.length?(_=f.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No messages in this thread"}):t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:t.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[C.map((P,I)=>t.jsx("div",{ref:I===C.length-1?g:void 0,children:t.jsx(Tt,{pair:P,isLastPair:I===C.length-1,status:"ready"})},`pair-${P.user?.id??P.assistant?.id}`)),u&&t.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:"Loading more\\u2026"})]})}),e[28]=u,e[29]=g,e[30]=C,e[31]=f.length,e[32]=_):_=e[32];let k;return e[33]!==y||e[34]!==T||e[35]!==_?(k=t.jsxs(t.Fragment,{children:[y,T,_]}),e[33]=y,e[34]=T,e[35]=_,e[36]=k):k=e[36],k}function Ft(l){return l.role==="user"||l.role==="assistant"}function Ut(l){return l.items??[]}function Ot(l,e){const s=l,n=e;if(!((s?.items?.length??0)<_e))return n.length*_e}function et(l){const e=ne.c(39),{thread:s,client:n,locator:r,connections:i,virtualMcps:a,members:d,selectedIndex:c,total:o,onPrev:j,onNext:N}=l;let v;e[0]!==i||e[1]!==N||e[2]!==j||e[3]!==c||e[4]!==s||e[5]!==o||e[6]!==a?(v=t.jsx(we,{thread:s,connections:i,virtualMcps:a,selectedIndex:c,total:o,onPrev:j,onNext:N}),e[0]=i,e[1]=N,e[2]=j,e[3]=c,e[4]=s,e[5]=o,e[6]=a,e[7]=v):v=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Failed to load messages"}),e[8]=m):m=e[8];let b;e[9]!==v?(b=t.jsxs(t.Fragment,{children:[v,m]}),e[9]=v,e[10]=b):b=e[10];let x;e[11]!==i||e[12]!==N||e[13]!==j||e[14]!==c||e[15]!==s||e[16]!==o||e[17]!==a?(x=t.jsx(we,{thread:s,connections:i,virtualMcps:a,selectedIndex:c,total:o,onPrev:j,onNext:N}),e[11]=i,e[12]=N,e[13]=j,e[14]=c,e[15]=s,e[16]=o,e[17]=a,e[18]=x):x=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Loading conversation\\u2026"}),e[19]=p):p=e[19];let h;e[20]!==x?(h=t.jsxs(t.Fragment,{children:[x,p]}),e[20]=x,e[21]=h):h=e[21];let u;e[22]!==n||e[23]!==i||e[24]!==r||e[25]!==d||e[26]!==N||e[27]!==j||e[28]!==c||e[29]!==s||e[30]!==o||e[31]!==a?(u=t.jsx(Lt,{client:n,locator:r,thread:s,connections:i,virtualMcps:a,members:d,selectedIndex:c,total:o,onPrev:j,onNext:N}),e[22]=n,e[23]=i,e[24]=r,e[25]=d,e[26]=N,e[27]=j,e[28]=c,e[29]=s,e[30]=o,e[31]=a,e[32]=u):u=e[32];let S;e[33]!==h||e[34]!==u?(S=t.jsx(ce.Suspense,{fallback:h,children:u}),e[33]=h,e[34]=u,e[35]=S):S=e[35];let f;return e[36]!==b||e[37]!==S?(f=t.jsx(tt,{fallback:b,children:S}),e[36]=b,e[37]=S,e[38]=f):f=e[38],f}function Ms(l){const e=ne.c(43),{filterAgentIds:s,filterUserIds:n,filterStatus:r,virtualMcpOptions:i,memberOptions:a,activeFiltersCount:d,onUpdateFilters:c}=l,[o,j]=ce.useState(!1);let N,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(_t,{size:16}),v=t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),e[0]=N,e[1]=v):(N=e[0],v=e[1]);let m;e[2]!==d?(m=d>0&&t.jsxs(t.Fragment,{children:[t.jsx(je,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:d}),t.jsx(je,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:d})]}),e[2]=d,e[3]=m):m=e[3];let b;e[4]!==m?(b=t.jsx(Je,{asChild:!0,children:t.jsxs(fe,{variant:"outline",className:"relative",children:[N,v,m]})}),e[4]=m,e[5]=b):b=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("h4",{className:"font-medium text-sm",children:"Filter Threads"}),e[6]=x):x=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agent"}),e[7]=p):p=e[7];let h;e[8]!==c?(h=M=>c({filterAgentIds:M.slice(0,1)}),e[8]=c,e[9]=h):h=e[9];let u;e[10]!==s||e[11]!==h||e[12]!==i?(u=t.jsxs("div",{children:[p,t.jsx(Ue,{options:i,defaultValue:s,onValueChange:h,placeholder:"All agents",variant:"secondary",className:"w-full",maxCount:1})]}),e[10]=s,e[11]=h,e[12]=i,e[13]=u):u=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"User"}),e[14]=S):S=e[14];let f;e[15]!==c?(f=M=>c({filterUserIds:M.slice(0,1)}),e[15]=c,e[16]=f):f=e[16];let C;e[17]!==n||e[18]!==a||e[19]!==f?(C=t.jsxs("div",{children:[S,t.jsx(Ue,{options:a,defaultValue:n,onValueChange:f,placeholder:"All users",variant:"secondary",className:"w-full",maxCount:1})]}),e[17]=n,e[18]=a,e[19]=f,e[20]=C):C=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),e[21]=w):w=e[21];let g;e[22]!==c?(g=M=>c({filterStatus:M}),e[22]=c,e[23]=g):g=e[23];let y;e[24]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(gt,{className:"w-full",children:t.jsx(pt,{})}),e[24]=y):y=e[24];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsxs(jt,{children:[t.jsx(ge,{value:"all",children:"All statuses"}),t.jsx(ge,{value:"completed",children:"Completed"}),t.jsx(ge,{value:"active",children:"Active"}),t.jsx(ge,{value:"failed",children:"Failed"})]}),e[25]=T):T=e[25];let _;e[26]!==r||e[27]!==g?(_=t.jsxs("div",{children:[w,t.jsxs(bt,{value:r,onValueChange:g,children:[y,T]})]}),e[26]=r,e[27]=g,e[28]=_):_=e[28];let k;e[29]!==C||e[30]!==_||e[31]!==u?(k=t.jsxs("div",{className:"space-y-3",children:[u,C,_]}),e[29]=C,e[30]=_,e[31]=u,e[32]=k):k=e[32];let P;e[33]!==d||e[34]!==c?(P=d>0&&t.jsx(fe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{c({filterAgentIds:[],filterUserIds:[],filterStatus:"all"}),j(!1)},children:"Clear all filters"}),e[33]=d,e[34]=c,e[35]=P):P=e[35];let I;e[36]!==k||e[37]!==P?(I=t.jsx(Qe,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[x,k,P]})}),e[36]=k,e[37]=P,e[38]=I):I=e[38];let D;return e[39]!==o||e[40]!==I||e[41]!==b?(D=t.jsxs(Ze,{open:o,onOpenChange:j,children:[b,I]}),e[39]=o,e[40]=I,e[41]=b,e[42]=D):D=e[42],D}const Ce=50;function Ds(l){const e=ne.c(29),{client:s,locator:n,membersData:r,allConnections:i,allVirtualMcps:a,dateRange:d,searchQuery:c,filterAgentIds:o,filterUserIds:j,filterStatus:N}=l,[v,m]=ce.useState(null),b=d.startDate.toISOString(),x=d.endDate.toISOString(),p=JSON.stringify({startDate:b,endDate:x,search:c,agentIds:o,userIds:j,status:N}),{data:h,fetchNextPage:u,hasNextPage:S,isFetchingNextPage:f,isLoading:C}=ze({queryKey:xe.threadsInfinite(n,p),queryFn:async R=>{const{pageParam:H}=R,oe=H===void 0?0:H;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:Ce,offset:oe,startDate:b,endDate:x,...c?{search:c}:{},...o&&o.length>0?{agentId:o[0]}:{},...j&&j.length>0?{userId:j[0]}:{},...N&&N!=="all"?{status:N}:{}}});return $.structuredContent??$},initialPageParam:0,getNextPageParam:Ht,staleTime:3e4}),w=(h?.pages??[]).flatMap(Gt),g=w.map(qt),{data:y}=Ve({queryKey:xe.monitoringThreadUsage(n,JSON.stringify({ids:g,startDate:b,endDate:x})),queryFn:async()=>{if(!s)throw new Error("MCP client is not available");const R=await s.callTool({name:"MONITORING_THREAD_USAGE",arguments:{threadIds:g,startDate:b,endDate:x}});return R.structuredContent??R},enabled:!!s&&g.length>0,staleTime:3e4}),T=new Map((y?.items??[]).map(Kt)),[_,k]=ce.useState(null),[P,I]=ce.useState("desc");let D;e[0]!==_?(D=R=>{_===R?I(zt):(k(R),I("desc"))},e[0]=_,e[1]=D):D=e[1];const M=D,A=R=>{const H=T.get(R);return H?_==="cost"?H.costUsd:H.totalTokens:0},L=_?[...w].sort((R,H)=>{const oe=A(R.id),$=A(H.id);return P==="desc"?$-oe:oe-$}):w,K=v!==null?L[v]??null:null;let q;e[2]!==u||e[3]!==S||e[4]!==f?(q=()=>{S&&!f&&u()},e[2]=u,e[3]=S,e[4]=f,e[5]=q):q=e[5];const J=ke(q,S??!1,f),E=!!c||(o?.length??0)>0||(j?.length??0)>0||N&&N!=="all";let U;e[6]===Symbol.for("react.memo_cache_sentinel")?(U=()=>m(Vt),e[6]=U):U=e[6];const O=U,V=()=>m(R=>R!==null&&R<L.length-1?R+1:R),F="flex-1 flex flex-col overflow-auto min-w-0",G="mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",X="flex-1 flex flex-col min-w-0",z="flex-1 min-w-0 pt-1",ee="min-w-0",te=C?t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading\\u2026"})}):w.length===0?t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx(Se,{title:E?"No matching threads":"No threads in this time range",description:E?"Try adjusting your filters or search query.":"Try expanding the time range to see older threads."})}):t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{className:"w-full border-collapse",children:[t.jsx(He,{className:"border-b-0 z-20",children:t.jsxs(Ne,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(se,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Title"}),t.jsx(se,{className:"w-36 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(se,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(se,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Status"}),t.jsx(se,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>M("tokens"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:["Tokens",_==="tokens"&&(P==="desc"?t.jsx(he,{size:12}):t.jsx(ye,{size:12}))]})}),t.jsx(se,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>M("cost"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:["Cost",_==="cost"&&(P==="desc"?t.jsx(he,{size:12}):t.jsx(ye,{size:12}))]})}),t.jsx(se,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"})]})}),t.jsx(Be,{children:L.map((R,H)=>t.jsx($t,{thread:R,usage:T.get(R.id),members:r,connections:i,virtualMcps:a,onClick:()=>m(H),lastRowRef:H===L.length-1?J:void 0},R.id))})]}),f&&t.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"Loading more..."})]});let Z;e[7]!==te?(Z=t.jsx("div",{className:G,children:t.jsx("div",{className:X,children:t.jsx("div",{className:z,children:t.jsx("div",{className:ee,children:te})})})}),e[7]=te,e[8]=Z):Z=e[8];const de=v!==null;let ae;e[9]===Symbol.for("react.memo_cache_sentinel")?(ae=R=>{R||m(null)},e[9]=ae):ae=e[9];let re;e[10]!==i||e[11]!==a||e[12]!==s||e[13]!==L||e[14]!==V||e[15]!==O||e[16]!==n||e[17]!==r||e[18]!==K||e[19]!==v?(re=K&&v!==null&&t.jsx(et,{thread:K,client:s,locator:n,connections:i,virtualMcps:a,members:r,selectedIndex:v,total:L.length,onPrev:O,onNext:V}),e[10]=i,e[11]=a,e[12]=s,e[13]=L,e[14]=V,e[15]=O,e[16]=n,e[17]=r,e[18]=K,e[19]=v,e[20]=re):re=e[20];let W;e[21]!==re?(W=t.jsx(Ke,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:re}),e[21]=re,e[22]=W):W=e[22];let Y;e[23]!==de||e[24]!==W?(Y=t.jsx(qe,{open:de,onOpenChange:ae,children:W}),e[23]=de,e[24]=W,e[25]=Y):Y=e[25];let ie;return e[26]!==Z||e[27]!==Y?(ie=t.jsxs("div",{className:F,children:[Z,Y]}),e[26]=Z,e[27]=Y,e[28]=ie):ie=e[28],ie}function Vt(l){return l!==null&&l>0?l-1:l}function zt(l){return l==="desc"?"asc":"desc"}function Kt(l){return[l.threadId,{calls:l.calls,inputTokens:l.inputTokens,outputTokens:l.outputTokens,totalTokens:l.totalTokens,costUsd:l.costUsd}]}function qt(l){return l.id}function Gt(l){return l.items??[]}function Ht(l,e){const s=l,n=e;if(!((s?.items?.length??0)<Ce))return n.length*Ce}const Te=50;function pe(l){const e=ne.c(10),{title:s,value:n,subtitle:r}=l;let i;e[0]!==s?(i=t.jsx("span",{className:"text-sm text-foreground/70",children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==n?(a=t.jsx("span",{className:"text-3xl font-normal tabular-nums",children:n}),e[2]=n,e[3]=a):a=e[3];let d;e[4]!==r?(d=r&&t.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=d):d=e[5];let c;return e[6]!==i||e[7]!==a||e[8]!==d?(c=t.jsxs(ct,{className:"pt-4 px-4 pb-5 gap-1",children:[i,a,d]}),e[6]=i,e[7]=a,e[8]=d,e[9]=c):c=e[9],c}function Bt(l){const e=ne.c(27),{automationId:s,range:n}=l,{data:r,isLoading:i}=ft(s,n),a=r?.runs,d=r?.usage;let c;e[0]!==a?(c=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",e[0]=a,e[1]=c):c=e[1];const o=c,j=d&&d.truncated?`last ${d.sampledRuns} runs`:void 0;let N;e[2]!==i||e[3]!==a?.total?(N=i?"…":a?.total.toLocaleString()??"0",e[2]=i,e[3]=a?.total,e[4]=N):N=e[4];const v=a?`${a.completed} ok · ${a.failed} failed${a.inProgress>0?` · ${a.inProgress} running`:""}`:void 0;let m;e[5]!==N||e[6]!==v?(m=t.jsx(pe,{title:"Runs",value:N,subtitle:v}),e[5]=N,e[6]=v,e[7]=m):m=e[7];const b=i?"…":o;let x;e[8]!==b?(x=t.jsx(pe,{title:"Success rate",value:b}),e[8]=b,e[9]=x):x=e[9];let p;e[10]!==i||e[11]!==d?.totalTokens?(p=i?"…":De(d?.totalTokens??0),e[10]=i,e[11]=d?.totalTokens,e[12]=p):p=e[12];let h;e[13]!==p||e[14]!==j?(h=t.jsx(pe,{title:"Tokens",value:p,subtitle:j}),e[13]=p,e[14]=j,e[15]=h):h=e[15];let u;e[16]!==i||e[17]!==d?(u=i?"…":d&&d.costUsd>0?Re(d.costUsd):"—",e[16]=i,e[17]=d,e[18]=u):u=e[18];let S;e[19]!==u||e[20]!==j?(S=t.jsx(pe,{title:"Cost",value:u,subtitle:j}),e[19]=u,e[20]=j,e[21]=S):S=e[21];let f;return e[22]!==S||e[23]!==m||e[24]!==x||e[25]!==h?(f=t.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[m,x,h,S]}),e[22]=S,e[23]=m,e[24]=x,e[25]=h,e[26]=f):f=e[26],f}function Jt(l){const e=ne.c(39),{run:s,usage:n,onClick:r,lastRowRef:i}=l;let a,d;if(e[0]!==s.created_at){const y=new Date(s.created_at);a=y.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=y.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[0]=s.created_at,e[1]=a,e[2]=d}else a=e[1],d=e[2];const c=d,o=ue[s.status]??ue.completed,j=o.icon;let N;e[3]!==s.title?(N=t.jsx(le,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:t.jsx("div",{className:"font-medium text-foreground truncate",children:s.title})}),e[3]=s.title,e[4]=N):N=e[4];let v;e[5]!==j||e[6]!==o.iconClassName?(v=t.jsx(j,{size:14,className:o.iconClassName}),e[5]=j,e[6]=o.iconClassName,e[7]=v):v=e[7];let m;e[8]!==o.labelColor?(m=be("text-sm",o.labelColor),e[8]=o.labelColor,e[9]=m):m=e[9];let b;e[10]!==o.label||e[11]!==m?(b=t.jsx("span",{className:m,children:o.label}),e[10]=o.label,e[11]=m,e[12]=b):b=e[12];let x;e[13]!==v||e[14]!==b?(x=t.jsx(le,{className:"w-28 px-3",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[v,b]})}),e[13]=v,e[14]=b,e[15]=x):x=e[15];let p;e[16]!==n?(p=n?De(n.totalTokens):"—",e[16]=n,e[17]=p):p=e[17];let h;e[18]!==p?(h=t.jsx(le,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),e[18]=p,e[19]=h):h=e[19];let u;e[20]!==n?(u=n&&n.costUsd>0?Re(n.costUsd):"—",e[20]=n,e[21]=u):u=e[21];let S;e[22]!==u?(S=t.jsx(le,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:u}),e[22]=u,e[23]=S):S=e[23];let f;e[24]!==a?(f=t.jsx("div",{children:a}),e[24]=a,e[25]=f):f=e[25];let C;e[26]!==c?(C=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:c}),e[26]=c,e[27]=C):C=e[27];let w;e[28]!==f||e[29]!==C?(w=t.jsxs(le,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[f,C]}),e[28]=f,e[29]=C,e[30]=w):w=e[30];let g;return e[31]!==i||e[32]!==r||e[33]!==S||e[34]!==w||e[35]!==N||e[36]!==x||e[37]!==h?(g=t.jsxs(Ne,{ref:i,className:"h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",onClick:r,children:[N,x,h,S,w]}),e[31]=i,e[32]=r,e[33]=S,e[34]=w,e[35]=N,e[36]=x,e[37]=h,e[38]=g):g=e[38],g}function Rs(l){const e=ne.c(48),{automationId:s,triggerIds:n,range:r}=l,{org:i,locator:a}=st();let d;e[0]!==i.id||e[1]!==i.slug?(d={connectionId:rt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=d):d=e[2];const c=it(d),o=xt(),j=lt(),N=ot(),{data:v}=ut(),[m,b]=ce.useState(null),x=n.length>0;let p;e[3]!==s||e[4]!==i.id||e[5]!==n?(p=xe.automationRuns(i.id,s,n),e[3]=s,e[4]=i.id,e[5]=n,e[6]=p):p=e[6];let h;e[7]!==o||e[8]!==n?(h=async z=>{const{pageParam:ee}=z,te=ee===void 0?0:ee;return await o.call("COLLECTION_THREADS_LIST",{limit:Te,offset:te,where:{trigger_ids:n}})},e[7]=o,e[8]=n,e[9]=h):h=e[9];let u;e[10]!==x||e[11]!==p||e[12]!==h?(u={queryKey:p,queryFn:h,initialPageParam:0,getNextPageParam:Xt,enabled:x,staleTime:3e4},e[10]=x,e[11]=p,e[12]=h,e[13]=u):u=e[13];const{data:S,fetchNextPage:f,hasNextPage:C,isFetchingNextPage:w,isLoading:g}=ze(u),y=(S?.pages??[]).flatMap(Yt),T=y.map(Wt),{data:_}=Ve({queryKey:xe.monitoringThreadUsage(a,JSON.stringify({ids:T,...r})),queryFn:async()=>await o.call("MONITORING_THREAD_USAGE",{threadIds:T,...r.startDate?{startDate:r.startDate}:{},...r.endDate?{endDate:r.endDate}:{}}),enabled:T.length>0,staleTime:3e4});let k;e[14]!==_?.items?(k=new Map((_?.items??[]).map(Zt)),e[14]=_?.items,e[15]=k):k=e[15];const P=k;let I;e[16]!==f||e[17]!==C||e[18]!==w?(I=()=>{C&&!w&&f()},e[16]=f,e[17]=C,e[18]=w,e[19]=I):I=e[19];const D=ke(I,C??!1,w),M=m!==null?y[m]??null:null;let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=()=>b(Qt),e[20]=A):A=e[20];const L=A,K=()=>b(z=>z!==null&&z<y.length-1?z+1:z),q="flex flex-col gap-5";let Q;e[21]!==s||e[22]!==r?(Q=t.jsx(Bt,{automationId:s,range:r}),e[21]=s,e[22]=r,e[23]=Q):Q=e[23];const J=x?g?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading runs…"}):y.length===0?t.jsx("div",{className:"py-16",children:t.jsx(Se,{title:"No runs yet",description:"This automation hasn't run yet. Trigger it or wait for a starter to fire."})}):t.jsxs(Ge,{className:"w-full border-collapse",children:[t.jsx(He,{className:"border-b-0",children:t.jsxs(Ne,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(se,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Run"}),t.jsx(se,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Status"}),t.jsx(se,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Tokens"}),t.jsx(se,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Cost"}),t.jsx(se,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Started"})]})}),t.jsx(Be,{children:y.map((z,ee)=>t.jsx(Jt,{run:z,usage:P.get(z.id),onClick:()=>b(ee),lastRowRef:ee===y.length-1?D:void 0},z.id))})]}):t.jsx("div",{className:"py-16",children:t.jsx(Se,{title:"No starters yet",description:"Add a starter (cron, event, or webhook) to start collecting runs."})});let E;e[24]!==w?(E=w&&t.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"Loading more…"}),e[24]=w,e[25]=E):E=e[25];const U=m!==null;let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=z=>{z||b(null)},e[26]=O):O=e[26];let V;e[27]!==j||e[28]!==N||e[29]!==c||e[30]!==K||e[31]!==L||e[32]!==a||e[33]!==v||e[34]!==y||e[35]!==M||e[36]!==m?(V=M&&m!==null&&t.jsx(et,{thread:M,client:c,locator:a,connections:j,virtualMcps:N,members:v,selectedIndex:m,total:y.length,onPrev:L,onNext:K}),e[27]=j,e[28]=N,e[29]=c,e[30]=K,e[31]=L,e[32]=a,e[33]=v,e[34]=y,e[35]=M,e[36]=m,e[37]=V):V=e[37];let F;e[38]!==V?(F=t.jsx(Ke,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:V}),e[38]=V,e[39]=F):F=e[39];let G;e[40]!==U||e[41]!==F?(G=t.jsx(qe,{open:U,onOpenChange:O,children:F}),e[40]=U,e[41]=F,e[42]=G):G=e[42];let X;return e[43]!==J||e[44]!==E||e[45]!==G||e[46]!==Q?(X=t.jsxs("div",{className:q,children:[Q,J,E,G]}),e[43]=J,e[44]=E,e[45]=G,e[46]=Q,e[47]=X):X=e[47],X}function Qt(l){return l!==null&&l>0?l-1:l}function Zt(l){return[l.threadId,{calls:l.calls,inputTokens:l.inputTokens,outputTokens:l.outputTokens,totalTokens:l.totalTokens,costUsd:l.costUsd}]}function Wt(l){return l.id}function Yt(l){return l.items??[]}function Xt(l,e){const s=l,n=e;if(!((s?.items?.length??0)<Te))return n.length*Te}export{Rs as A,Ue as M,Ms as T,Re as a,ks as b,At as c,Ps as d,Is as e,De as f,Ts as g,Xe as h,Ds as i};
@@ -1 +0,0 @@
1
- import{r as D,j as u,c as ht,l as H,dW as Pe}from"./index-UyzF2Wxm.js";import{n as mt}from"./ChevronLeft-ByQFERqp.js";import{i as vt}from"./ChevronRight-D1duQehP.js";function w(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function S(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function C(e,t){const n=w(e);return isNaN(t)?S(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function W(e,t){const n=w(e);if(isNaN(t))return S(e,NaN);if(!t)return n;const a=n.getDate(),r=S(e,n.getTime());r.setMonth(n.getMonth()+t+1,0);const o=r.getDate();return a>=o?r:(n.setFullYear(r.getFullYear(),r.getMonth(),a),n)}const ye=6048e5,yt=864e5;let gt={};function z(){return gt}function Y(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?7:0)+o-a;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function I(e){return Y(e,{weekStartsOn:1})}function Ie(e){const t=w(e),n=t.getFullYear(),a=S(e,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const r=I(a),o=S(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=I(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function A(e){const t=w(e);return t.setHours(0,0,0,0),t}function Z(e){const t=w(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function T(e,t){const n=A(e),a=A(t),r=+n-Z(n),o=+a-Z(a);return Math.round((r-o)/yt)}function bt(e){const t=Ie(e),n=S(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),I(n)}function me(e,t){const n=t*7;return C(e,n)}function pt(e,t){return W(e,t*12)}function wt(e){let t;return e.forEach(function(n){const a=w(n);(t===void 0||t<a||isNaN(Number(a)))&&(t=a)}),t||new Date(NaN)}function xt(e){let t;return e.forEach(n=>{const a=w(n);(!t||t>a||isNaN(+a))&&(t=a)}),t||new Date(NaN)}function P(e,t){const n=A(e),a=A(t);return+n==+a}function ge(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _t(e){if(!ge(e)&&typeof e!="number")return!1;const t=w(e);return!isNaN(Number(t))}function G(e,t){const n=w(e),a=w(t),r=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return r*12+o}function Dt(e,t,n){const a=Y(e,n),r=Y(t,n),o=+a-Z(a),i=+r-Z(r);return Math.round((o-i)/ye)}function be(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function O(e){const t=w(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Re(e){const t=w(e),n=S(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function pe(e,t){const n=z(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=w(e),o=r.getDay(),i=(o<a?-7:0)+6-(o-a);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}function Be(e){return pe(e,{weekStartsOn:1})}const Mt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kt=(e,t,n)=>{let a;const r=Mt[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function se(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Nt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ct={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ot={date:se({formats:Nt,defaultWidth:"full"}),time:se({formats:Ct,defaultWidth:"full"}),dateTime:se({formats:Pt,defaultWidth:"full"})},St={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Wt=(e,t,n,a)=>St[e];function X(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const jt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},It=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rt={ordinalNumber:It,era:X({values:jt,defaultWidth:"wide"}),quarter:X({values:Tt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:X({values:Yt,defaultWidth:"wide"}),day:X({values:Ft,defaultWidth:"wide"}),dayPeriod:X({values:Et,defaultWidth:"wide",formattingValues:Lt,defaultFormattingWidth:"wide"})};function V(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const i=o[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ht(s,f=>f.test(i)):Bt(s,f=>f.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function Bt(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ht(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function At(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(r.length);return{value:i,rest:s}}}const qt=/^(\d+)(th|st|nd|rd)?/i,Qt=/\d+/i,Xt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vt={any:[/^b/i,/^(a|c)/i]},Gt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zt={any:[/1/i,/2/i,/3/i,/4/i]},Ut={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Kt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$t={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Zt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},en={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tn={ordinalNumber:At({matchPattern:qt,parsePattern:Qt,valueCallback:e=>parseInt(e,10)}),era:V({matchPatterns:Xt,defaultMatchWidth:"wide",parsePatterns:Vt,defaultParseWidth:"any"}),quarter:V({matchPatterns:Gt,defaultMatchWidth:"wide",parsePatterns:zt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:V({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Jt,defaultParseWidth:"any"}),day:V({matchPatterns:Kt,defaultMatchWidth:"wide",parsePatterns:$t,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Zt,defaultMatchWidth:"any",parsePatterns:en,defaultParseWidth:"any"})},He={code:"en-US",formatDistance:kt,formatLong:Ot,formatRelative:Wt,localize:Rt,match:tn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nn(e){const t=w(e);return T(t,Re(t))+1}function Ae(e){const t=w(e),n=+I(t)-+bt(t);return Math.round(n/ye)+1}function qe(e,t){const n=w(e),a=n.getFullYear(),r=z(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=S(e,0);i.setFullYear(a+1,0,o),i.setHours(0,0,0,0);const s=Y(i,t),c=S(e,0);c.setFullYear(a,0,o),c.setHours(0,0,0,0);const d=Y(c,t);return n.getTime()>=s.getTime()?a+1:n.getTime()>=d.getTime()?a:a-1}function an(e,t){const n=z(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=qe(e,t),o=S(e,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),Y(o,t)}function Qe(e,t){const n=w(e),a=+Y(n,t)-+an(n,t);return Math.round(a/ye)+1}function _(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const E={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return _(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_(n+1,2)},d(e,t){return _(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _(e.getHours()%12||12,t.length)},H(e,t){return _(e.getHours(),t.length)},m(e,t){return _(e.getMinutes(),t.length)},s(e,t){return _(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return _(r,t.length)}},B={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oe={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,a){const r=qe(e,a),o=r>0?r:1-r;if(t==="YY"){const i=o%100;return _(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):_(o,t.length)},R:function(e,t){const n=Ie(e);return _(n,t.length)},u:function(e,t){const n=e.getFullYear();return _(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return _(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return _(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return _(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const r=Qe(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):_(r,t.length)},I:function(e,t,n){const a=Ae(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):_(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){const a=nn(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const r=e.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),r=a===0?7:a;switch(t){case"i":return String(r);case"ii":return _(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let r;switch(a===12?r=B.noon:a===0?r=B.midnight:r=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let r;switch(a>=17?r=B.evening:a>=12?r=B.afternoon:a>=4?r=B.morning:r=B.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):_(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return We(a);case"XXXX":case"XX":return L(a);default:return L(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return We(a);case"xxxx":case"xx":return L(a);default:return L(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Se(a,":");default:return"GMT"+L(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return _(a,t.length)},T:function(e,t,n){const a=e.getTime();return _(a,t.length)}};function Se(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+t+_(o,2)}function We(e,t){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):L(e,t)}function L(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=_(Math.trunc(a/60),2),o=_(a%60,2);return n+r+t+o}const je=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Xe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},rn=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return je(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",je(a,t)).replace("{{time}}",Xe(r,t))},on={p:Xe,P:rn},sn=/^D+$/,un=/^Y+$/,ln=["D","DD","YY","YYYY"];function cn(e){return sn.test(e)}function dn(e){return un.test(e)}function fn(e,t,n){const a=hn(e,t,n);if(console.warn(a),ln.includes(e))throw new RangeError(a)}function hn(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yn=/^'([^]*?)'?$/,gn=/''/g,bn=/[a-zA-Z]/;function R(e,t,n){const a=z(),r=n?.locale??a.locale??He,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=w(e);if(!_t(s))throw new RangeError("Invalid time value");let c=t.match(vn).map(l=>{const f=l[0];if(f==="p"||f==="P"){const h=on[f];return h(l,r.formatLong)}return l}).join("").match(mn).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:pn(l)};if(Oe[f])return{isToken:!0,value:l};if(f.match(bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});r.localize.preprocessor&&(c=r.localize.preprocessor(s,c));const d={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!n?.useAdditionalWeekYearTokens&&dn(f)||!n?.useAdditionalDayOfYearTokens&&cn(f))&&fn(f,t,String(e));const h=Oe[f[0]];return h(s,f,r.localize,d)}).join("")}function pn(e){const t=e.match(yn);return t?t[1].replace(gn,"'"):e}function wn(e){const t=w(e),n=t.getFullYear(),a=t.getMonth(),r=S(e,0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function xn(e){return Math.trunc(+w(e)/1e3)}function _n(e){const t=w(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function Dn(e,t){return Dt(_n(e),O(e),t)+1}function ve(e,t){const n=w(e),a=w(t);return n.getTime()>a.getTime()}function Ve(e,t){const n=w(e),a=w(t);return+n<+a}function we(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function Mn(e,t){const n=w(e),a=w(t);return n.getFullYear()===a.getFullYear()}function ue(e,t){return C(e,-t)}function le(e,t){const n=w(e),a=n.getFullYear(),r=n.getDate(),o=S(e,0);o.setFullYear(a,t,15),o.setHours(0,0,0,0);const i=wn(o);return n.setMonth(t,Math.min(r,i)),n}function Te(e,t){const n=w(e);return isNaN(+n)?S(e,NaN):(n.setFullYear(t),n)}var g=function(){return g=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},g.apply(this,arguments)};function kn(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n}function Ge(e,t,n){for(var a=0,r=t.length,o;a<r;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}function U(e){return e.mode==="multiple"}function J(e){return e.mode==="range"}function te(e){return e.mode==="single"}var Nn={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Cn(e,t){return R(e,"LLLL y",t)}function Pn(e,t){return R(e,"d",t)}function On(e,t){return R(e,"LLLL",t)}function Sn(e){return"".concat(e)}function Wn(e,t){return R(e,"cccccc",t)}function jn(e,t){return R(e,"yyyy",t)}var Tn=Object.freeze({__proto__:null,formatCaption:Cn,formatDay:Pn,formatMonthCaption:On,formatWeekNumber:Sn,formatWeekdayName:Wn,formatYearCaption:jn}),Yn=function(e,t,n){return R(e,"do MMMM (EEEE)",n)},Fn=function(){return"Month: "},En=function(){return"Go to next month"},Ln=function(){return"Go to previous month"},In=function(e,t){return R(e,"cccc",t)},Rn=function(e){return"Week n. ".concat(e)},Bn=function(){return"Year: "},Hn=Object.freeze({__proto__:null,labelDay:Yn,labelMonthDropdown:Fn,labelNext:En,labelPrevious:Ln,labelWeekNumber:Rn,labelWeekday:In,labelYearDropdown:Bn});function An(){var e="buttons",t=Nn,n=He,a={},r={},o=1,i={},s=new Date;return{captionLayout:e,classNames:t,formatters:Tn,labels:Hn,locale:n,modifiersClassNames:a,modifiers:r,numberOfMonths:o,styles:i,today:s,mode:"default"}}function qn(e){var t=e.fromYear,n=e.toYear,a=e.fromMonth,r=e.toMonth,o=e.fromDate,i=e.toDate;return a?o=O(a):t&&(o=new Date(t,0,1)),r?i=be(r):n&&(i=new Date(n,11,31)),{fromDate:o?A(o):void 0,toDate:i?A(i):void 0}}var ze=D.createContext(void 0);function Qn(e){var t,n=e.initialProps,a=An(),r=qn(n),o=r.fromDate,i=r.toDate,s=(t=n.captionLayout)!==null&&t!==void 0?t:a.captionLayout;s!=="buttons"&&(!o||!i)&&(s="buttons");var c;(te(n)||U(n)||J(n))&&(c=n.onSelect);var d=g(g(g({},a),n),{captionLayout:s,classNames:g(g({},a.classNames),n.classNames),components:g({},n.components),formatters:g(g({},a.formatters),n.formatters),fromDate:o,labels:g(g({},a.labels),n.labels),mode:n.mode||a.mode,modifiers:g(g({},a.modifiers),n.modifiers),modifiersClassNames:g(g({},a.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:g(g({},a.styles),n.styles),toDate:i});return u.jsx(ze.Provider,{value:d,children:e.children})}function M(){var e=D.useContext(ze);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Ue(e){var t=M(),n=t.locale,a=t.classNames,r=t.styles,o=t.formatters.formatCaption;return u.jsx("div",{className:a.caption_label,style:r.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:o(e.displayMonth,{locale:n})})}function Xn(e){return u.jsx("svg",g({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:u.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Je(e){var t,n,a=e.onChange,r=e.value,o=e.children,i=e.caption,s=e.className,c=e.style,d=M(),l=(n=(t=d.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:Xn;return u.jsxs("div",{className:s,style:c,children:[u.jsx("span",{className:d.classNames.vhidden,children:e["aria-label"]}),u.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:d.classNames.dropdown,style:d.styles.dropdown,value:r,onChange:a,children:o}),u.jsxs("div",{className:d.classNames.caption_label,style:d.styles.caption_label,"aria-hidden":"true",children:[i,u.jsx(l,{className:d.classNames.dropdown_icon,style:d.styles.dropdown_icon})]})]})}function Vn(e){var t,n=M(),a=n.fromDate,r=n.toDate,o=n.styles,i=n.locale,s=n.formatters.formatMonthCaption,c=n.classNames,d=n.components,l=n.labels.labelMonthDropdown;if(!a)return u.jsx(u.Fragment,{});if(!r)return u.jsx(u.Fragment,{});var f=[];if(Mn(a,r))for(var h=O(a),m=a.getMonth();m<=r.getMonth();m++)f.push(le(h,m));else for(var h=O(new Date),m=0;m<=11;m++)f.push(le(h,m));var y=function(p){var N=Number(p.target.value),k=le(O(e.displayMonth),N);e.onChange(k)},x=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(x,{name:"months","aria-label":l(),className:c.dropdown_month,style:o.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:i}),children:f.map(function(p){return u.jsx("option",{value:p.getMonth(),children:s(p,{locale:i})},p.getMonth())})})}function Gn(e){var t,n=e.displayMonth,a=M(),r=a.fromDate,o=a.toDate,i=a.locale,s=a.styles,c=a.classNames,d=a.components,l=a.formatters.formatYearCaption,f=a.labels.labelYearDropdown,h=[];if(!r)return u.jsx(u.Fragment,{});if(!o)return u.jsx(u.Fragment,{});for(var m=r.getFullYear(),y=o.getFullYear(),x=m;x<=y;x++)h.push(Te(Re(new Date),x));var p=function(k){var q=Te(O(n),Number(k.target.value));e.onChange(q)},N=(t=d?.Dropdown)!==null&&t!==void 0?t:Je;return u.jsx(N,{name:"years","aria-label":f(),className:c.dropdown_year,style:s.dropdown_year,onChange:p,value:n.getFullYear(),caption:l(n,{locale:i}),children:h.map(function(k){return u.jsx("option",{value:k.getFullYear(),children:l(k,{locale:i})},k.getFullYear())})})}function zn(e,t){var n=D.useState(e),a=n[0],r=n[1],o=t===void 0?a:t;return[o,r]}function Un(e){var t=e.month,n=e.defaultMonth,a=e.today,r=t||n||a||new Date,o=e.toDate,i=e.fromDate,s=e.numberOfMonths,c=s===void 0?1:s;if(o&&G(o,r)<0){var d=-1*(c-1);r=W(o,d)}return i&&G(r,i)<0&&(r=i),O(r)}function Jn(){var e=M(),t=Un(e),n=zn(t,e.month),a=n[0],r=n[1],o=function(i){var s;if(!e.disableNavigation){var c=O(i);r(c),(s=e.onMonthChange)===null||s===void 0||s.call(e,c)}};return[a,o]}function Kn(e,t){for(var n=t.reverseMonths,a=t.numberOfMonths,r=O(e),o=O(W(r,a)),i=G(o,r),s=[],c=0;c<i;c++){var d=W(r,c);s.push(d)}return n&&(s=s.reverse()),s}function $n(e,t){if(!t.disableNavigation){var n=t.toDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return W(s,i);var c=G(n,e);if(!(c<o))return W(s,i)}}function Zn(e,t){if(!t.disableNavigation){var n=t.fromDate,a=t.pagedNavigation,r=t.numberOfMonths,o=r===void 0?1:r,i=a?o:1,s=O(e);if(!n)return W(s,-i);var c=G(s,n);if(!(c<=0))return W(s,-i)}}var Ke=D.createContext(void 0);function ea(e){var t=M(),n=Jn(),a=n[0],r=n[1],o=Kn(a,t),i=$n(a,t),s=Zn(a,t),c=function(f){return o.some(function(h){return we(f,h)})},d=function(f,h){c(f)||(h&&Ve(f,h)?r(W(f,1+t.numberOfMonths*-1)):r(f))},l={currentMonth:a,displayMonths:o,goToMonth:r,goToDate:d,previousMonth:s,nextMonth:i,isDateDisplayed:c};return u.jsx(Ke.Provider,{value:l,children:e.children})}function K(){var e=D.useContext(Ke);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Ye(e){var t,n=M(),a=n.classNames,r=n.styles,o=n.components,i=K().goToMonth,s=function(l){i(W(l,e.displayIndex?-e.displayIndex:0))},c=(t=o?.CaptionLabel)!==null&&t!==void 0?t:Ue,d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth});return u.jsxs("div",{className:a.caption_dropdowns,style:r.caption_dropdowns,children:[u.jsx("div",{className:a.vhidden,children:d}),u.jsx(Vn,{onChange:s,displayMonth:e.displayMonth}),u.jsx(Gn,{onChange:s,displayMonth:e.displayMonth})]})}function ta(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function na(e){return u.jsx("svg",g({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:u.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var ee=D.forwardRef(function(e,t){var n=M(),a=n.classNames,r=n.styles,o=[a.button_reset,a.button];e.className&&o.push(e.className);var i=o.join(" "),s=g(g({},r.button_reset),r.button);return e.style&&Object.assign(s,e.style),u.jsx("button",g({},e,{ref:t,type:"button",className:i,style:s}))});function aa(e){var t,n,a=M(),r=a.dir,o=a.locale,i=a.classNames,s=a.styles,c=a.labels,d=c.labelPrevious,l=c.labelNext,f=a.components;if(!e.nextMonth&&!e.previousMonth)return u.jsx(u.Fragment,{});var h=d(e.previousMonth,{locale:o}),m=[i.nav_button,i.nav_button_previous].join(" "),y=l(e.nextMonth,{locale:o}),x=[i.nav_button,i.nav_button_next].join(" "),p=(t=f?.IconRight)!==null&&t!==void 0?t:na,N=(n=f?.IconLeft)!==null&&n!==void 0?n:ta;return u.jsxs("div",{className:i.nav,style:s.nav,children:[!e.hidePrevious&&u.jsx(ee,{name:"previous-month","aria-label":h,className:m,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:r==="rtl"?u.jsx(p,{className:i.nav_icon,style:s.nav_icon}):u.jsx(N,{className:i.nav_icon,style:s.nav_icon})}),!e.hideNext&&u.jsx(ee,{name:"next-month","aria-label":y,className:x,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:r==="rtl"?u.jsx(N,{className:i.nav_icon,style:s.nav_icon}):u.jsx(p,{className:i.nav_icon,style:s.nav_icon})})]})}function Fe(e){var t=M().numberOfMonths,n=K(),a=n.previousMonth,r=n.nextMonth,o=n.goToMonth,i=n.displayMonths,s=i.findIndex(function(y){return we(e.displayMonth,y)}),c=s===0,d=s===i.length-1,l=t>1&&(c||!d),f=t>1&&(d||!c),h=function(){a&&o(a)},m=function(){r&&o(r)};return u.jsx(aa,{displayMonth:e.displayMonth,hideNext:l,hidePrevious:f,nextMonth:r,previousMonth:a,onPreviousClick:h,onNextClick:m})}function ra(e){var t,n=M(),a=n.classNames,r=n.disableNavigation,o=n.styles,i=n.captionLayout,s=n.components,c=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Ue,d;return r?d=u.jsx(c,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?d=u.jsx(Ye,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?d=u.jsxs(u.Fragment,{children:[u.jsx(Ye,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),u.jsx(Fe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):d=u.jsxs(u.Fragment,{children:[u.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Fe,{displayMonth:e.displayMonth,id:e.id})]}),u.jsx("div",{className:a.caption,style:o.caption,children:d})}function oa(e){var t=M(),n=t.footer,a=t.styles,r=t.classNames.tfoot;return n?u.jsx("tfoot",{className:r,style:a.tfoot,children:u.jsx("tr",{children:u.jsx("td",{colSpan:8,children:n})})}):u.jsx(u.Fragment,{})}function ia(e,t,n){for(var a=n?I(new Date):Y(new Date,{locale:e,weekStartsOn:t}),r=[],o=0;o<7;o++){var i=C(a,o);r.push(i)}return r}function sa(){var e=M(),t=e.classNames,n=e.styles,a=e.showWeekNumber,r=e.locale,o=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,d=ia(r,o,i);return u.jsxs("tr",{style:n.head_row,className:t.head_row,children:[a&&u.jsx("td",{style:n.head_cell,className:t.head_cell}),d.map(function(l,f){return u.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(l,{locale:r}),children:s(l,{locale:r})},f)})]})}function ua(){var e,t=M(),n=t.classNames,a=t.styles,r=t.components,o=(e=r?.HeadRow)!==null&&e!==void 0?e:sa;return u.jsx("thead",{style:a.head,className:n.head,children:u.jsx(o,{})})}function la(e){var t=M(),n=t.locale,a=t.formatters.formatDay;return u.jsx(u.Fragment,{children:a(e.date,{locale:n})})}var xe=D.createContext(void 0);function ca(e){if(!U(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return u.jsx(xe.Provider,{value:t,children:e.children})}return u.jsx(da,{initialProps:e.initialProps,children:e.children})}function da(e){var t=e.initialProps,n=e.children,a=t.selected,r=t.min,o=t.max,i=function(d,l,f){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,d,l,f);var y=!!(l.selected&&r&&a?.length===r);if(!y){var x=!!(!l.selected&&o&&a?.length===o);if(!x){var p=a?Ge([],a):[];if(l.selected){var N=p.findIndex(function(k){return P(d,k)});p.splice(N,1)}else p.push(d);(m=t.onSelect)===null||m===void 0||m.call(t,p,d,l,f)}}},s={disabled:[]};a&&s.disabled.push(function(d){var l=o&&a.length>o-1,f=a.some(function(h){return P(h,d)});return!!(l&&!f)});var c={selected:a,onDayClick:i,modifiers:s};return u.jsx(xe.Provider,{value:c,children:n})}function _e(){var e=D.useContext(xe);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fa(e,t){var n=t||{},a=n.from,r=n.to;return a&&r?P(r,e)&&P(a,e)?void 0:P(r,e)?{from:r,to:void 0}:P(a,e)?void 0:ve(a,e)?{from:e,to:r}:{from:a,to:e}:r?ve(e,r)?{from:r,to:e}:{from:e,to:r}:a?Ve(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0}}var De=D.createContext(void 0);function ha(e){if(!J(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return u.jsx(De.Provider,{value:t,children:e.children})}return u.jsx(ma,{initialProps:e.initialProps,children:e.children})}function ma(e){var t=e.initialProps,n=e.children,a=t.selected,r=a||{},o=r.from,i=r.to,s=t.min,c=t.max,d=function(m,y,x){var p,N;(p=t.onDayClick)===null||p===void 0||p.call(t,m,y,x);var k=fa(m,a);(N=t.onSelect)===null||N===void 0||N.call(t,k,m,y,x)},l={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(l.range_start=[o],i?(l.range_end=[i],P(o,i)||(l.range_middle=[{after:o,before:i}])):l.range_end=[o]):i&&(l.range_start=[i],l.range_end=[i]),s&&(o&&!i&&l.disabled.push({after:ue(o,s-1),before:C(o,s-1)}),o&&i&&l.disabled.push({after:o,before:C(o,s-1)}),!o&&i&&l.disabled.push({after:ue(i,s-1),before:C(i,s-1)})),c){if(o&&!i&&(l.disabled.push({before:C(o,-c+1)}),l.disabled.push({after:C(o,c-1)})),o&&i){var f=T(i,o)+1,h=c-f;l.disabled.push({before:ue(o,h)}),l.disabled.push({after:C(i,h)})}!o&&i&&(l.disabled.push({before:C(i,-c+1)}),l.disabled.push({after:C(i,c-1)}))}return u.jsx(De.Provider,{value:{selected:a,onDayClick:d,modifiers:l},children:n})}function Me(){var e=D.useContext(De);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function $(e){return Array.isArray(e)?Ge([],e):e!==void 0?[e]:[]}function va(e){var t={};return Object.entries(e).forEach(function(n){var a=n[0],r=n[1];t[a]=$(r)}),t}var j;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(j||(j={}));var ya=j.Selected,F=j.Disabled,ga=j.Hidden,ba=j.Today,ce=j.RangeEnd,de=j.RangeMiddle,fe=j.RangeStart,pa=j.Outside;function wa(e,t,n){var a,r=(a={},a[ya]=$(e.selected),a[F]=$(e.disabled),a[ga]=$(e.hidden),a[ba]=[e.today],a[ce]=[],a[de]=[],a[fe]=[],a[pa]=[],a);return e.fromDate&&r[F].push({before:e.fromDate}),e.toDate&&r[F].push({after:e.toDate}),U(e)?r[F]=r[F].concat(t.modifiers[F]):J(e)&&(r[F]=r[F].concat(n.modifiers[F]),r[fe]=n.modifiers[fe],r[de]=n.modifiers[de],r[ce]=n.modifiers[ce]),r}var $e=D.createContext(void 0);function xa(e){var t=M(),n=_e(),a=Me(),r=wa(t,n,a),o=va(t.modifiers),i=g(g({},r),o);return u.jsx($e.Provider,{value:i,children:e.children})}function Ze(){var e=D.useContext($e);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function _a(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Da(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ma(e){return!!(e&&typeof e=="object"&&"after"in e)}function ka(e){return!!(e&&typeof e=="object"&&"before"in e)}function Na(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ca(e,t){var n,a=t.from,r=t.to;if(a&&r){var o=T(r,a)<0;o&&(n=[r,a],a=n[0],r=n[1]);var i=T(e,a)>=0&&T(r,e)>=0;return i}return r?P(r,e):a?P(a,e):!1}function Pa(e){return ge(e)}function Oa(e){return Array.isArray(e)&&e.every(ge)}function Sa(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(Pa(n))return P(e,n);if(Oa(n))return n.includes(e);if(Da(n))return Ca(e,n);if(Na(n))return n.dayOfWeek.includes(e.getDay());if(_a(n)){var a=T(n.before,e),r=T(n.after,e),o=a>0,i=r<0,s=ve(n.before,n.after);return s?i&&o:o||i}return Ma(n)?T(e,n.after)>0:ka(n)?T(n.before,e)>0:typeof n=="function"?n(e):!1})}function ke(e,t,n){var a=Object.keys(t).reduce(function(o,i){var s=t[i];return Sa(e,s)&&o.push(i),o},[]),r={};return a.forEach(function(o){return r[o]=!0}),n&&!we(e,n)&&(r.outside=!0),r}function Wa(e,t){for(var n=O(e[0]),a=be(e[e.length-1]),r,o,i=n;i<=a;){var s=ke(i,t),c=!s.disabled&&!s.hidden;if(!c){i=C(i,1);continue}if(s.selected)return i;s.today&&!o&&(o=i),r||(r=i),i=C(i,1)}return o||r}var ja=365;function et(e,t){var n=t.moveBy,a=t.direction,r=t.context,o=t.modifiers,i=t.retry,s=i===void 0?{count:0,lastFocused:e}:i,c=r.weekStartsOn,d=r.fromDate,l=r.toDate,f=r.locale,h={day:C,week:me,month:W,year:pt,startOfWeek:function(p){return r.ISOWeek?I(p):Y(p,{locale:f,weekStartsOn:c})},endOfWeek:function(p){return r.ISOWeek?Be(p):pe(p,{locale:f,weekStartsOn:c})}},m=h[n](e,a==="after"?1:-1);a==="before"&&d?m=wt([d,m]):a==="after"&&l&&(m=xt([l,m]));var y=!0;if(o){var x=ke(m,o);y=!x.disabled&&!x.hidden}return y?m:s.count>ja?s.lastFocused:et(m,{moveBy:n,direction:a,context:r,modifiers:o,retry:g(g({},s),{count:s.count+1})})}var tt=D.createContext(void 0);function Ta(e){var t=K(),n=Ze(),a=D.useState(),r=a[0],o=a[1],i=D.useState(),s=i[0],c=i[1],d=Wa(t.displayMonths,n),l=r??(s&&t.isDateDisplayed(s))?s:d,f=function(){c(r),o(void 0)},h=function(p){o(p)},m=M(),y=function(p,N){if(r){var k=et(r,{moveBy:p,direction:N,context:m,modifiers:n});P(r,k)||(t.goToDate(k,r),h(k))}},x={focusedDay:r,focusTarget:l,blur:f,focus:h,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return u.jsx(tt.Provider,{value:x,children:e.children})}function Ne(){var e=D.useContext(tt);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Ya(e,t){var n=Ze(),a=ke(e,n,t);return a}var Ce=D.createContext(void 0);function Fa(e){if(!te(e.initialProps)){var t={selected:void 0};return u.jsx(Ce.Provider,{value:t,children:e.children})}return u.jsx(Ea,{initialProps:e.initialProps,children:e.children})}function Ea(e){var t=e.initialProps,n=e.children,a=function(o,i,s){var c,d,l;if((c=t.onDayClick)===null||c===void 0||c.call(t,o,i,s),i.selected&&!t.required){(d=t.onSelect)===null||d===void 0||d.call(t,void 0,o,i,s);return}(l=t.onSelect)===null||l===void 0||l.call(t,o,o,i,s)},r={selected:t.selected,onDayClick:a};return u.jsx(Ce.Provider,{value:r,children:n})}function nt(){var e=D.useContext(Ce);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function La(e,t){var n=M(),a=nt(),r=_e(),o=Me(),i=Ne(),s=i.focusDayAfter,c=i.focusDayBefore,d=i.focusWeekAfter,l=i.focusWeekBefore,f=i.blur,h=i.focus,m=i.focusMonthBefore,y=i.focusMonthAfter,x=i.focusYearBefore,p=i.focusYearAfter,N=i.focusStartOfWeek,k=i.focusEndOfWeek,q=function(b){var v,re,oe,ie;te(n)?(v=a.onDayClick)===null||v===void 0||v.call(a,e,t,b):U(n)?(re=r.onDayClick)===null||re===void 0||re.call(r,e,t,b):J(n)?(oe=o.onDayClick)===null||oe===void 0||oe.call(o,e,t,b):(ie=n.onDayClick)===null||ie===void 0||ie.call(n,e,t,b)},ne=function(b){var v;h(e),(v=n.onDayFocus)===null||v===void 0||v.call(n,e,t,b)},ae=function(b){var v;f(),(v=n.onDayBlur)===null||v===void 0||v.call(n,e,t,b)},Q=function(b){var v;(v=n.onDayMouseEnter)===null||v===void 0||v.call(n,e,t,b)},at=function(b){var v;(v=n.onDayMouseLeave)===null||v===void 0||v.call(n,e,t,b)},rt=function(b){var v;(v=n.onDayPointerEnter)===null||v===void 0||v.call(n,e,t,b)},ot=function(b){var v;(v=n.onDayPointerLeave)===null||v===void 0||v.call(n,e,t,b)},it=function(b){var v;(v=n.onDayTouchCancel)===null||v===void 0||v.call(n,e,t,b)},st=function(b){var v;(v=n.onDayTouchEnd)===null||v===void 0||v.call(n,e,t,b)},ut=function(b){var v;(v=n.onDayTouchMove)===null||v===void 0||v.call(n,e,t,b)},lt=function(b){var v;(v=n.onDayTouchStart)===null||v===void 0||v.call(n,e,t,b)},ct=function(b){var v;(v=n.onDayKeyUp)===null||v===void 0||v.call(n,e,t,b)},dt=function(b){var v;switch(b.key){case"ArrowLeft":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?s():c();break;case"ArrowRight":b.preventDefault(),b.stopPropagation(),n.dir==="rtl"?c():s();break;case"ArrowDown":b.preventDefault(),b.stopPropagation(),d();break;case"ArrowUp":b.preventDefault(),b.stopPropagation(),l();break;case"PageUp":b.preventDefault(),b.stopPropagation(),b.shiftKey?x():m();break;case"PageDown":b.preventDefault(),b.stopPropagation(),b.shiftKey?p():y();break;case"Home":b.preventDefault(),b.stopPropagation(),N();break;case"End":b.preventDefault(),b.stopPropagation(),k();break}(v=n.onDayKeyDown)===null||v===void 0||v.call(n,e,t,b)},ft={onClick:q,onFocus:ne,onBlur:ae,onKeyDown:dt,onKeyUp:ct,onMouseEnter:Q,onMouseLeave:at,onPointerEnter:rt,onPointerLeave:ot,onTouchCancel:it,onTouchEnd:st,onTouchMove:ut,onTouchStart:lt};return ft}function Ia(){var e=M(),t=nt(),n=_e(),a=Me(),r=te(e)?t.selected:U(e)?n.selected:J(e)?a.selected:void 0;return r}function Ra(e){return Object.values(j).includes(e)}function Ba(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(a){var r=e.modifiersClassNames[a];if(r)n.push(r);else if(Ra(a)){var o=e.classNames["day_".concat(a)];o&&n.push(o)}}),n}function Ha(e,t){var n=g({},e.styles.day);return Object.keys(t).forEach(function(a){var r;n=g(g({},n),(r=e.modifiersStyles)===null||r===void 0?void 0:r[a])}),n}function Aa(e,t,n){var a,r,o,i=M(),s=Ne(),c=Ya(e,t),d=La(e,c),l=Ia(),f=!!(i.onDayClick||i.mode!=="default");D.useEffect(function(){var Q;c.outside||s.focusedDay&&f&&P(s.focusedDay,e)&&((Q=n.current)===null||Q===void 0||Q.focus())},[s.focusedDay,e,n,f,c.outside]);var h=Ba(i,c).join(" "),m=Ha(i,c),y=!!(c.outside&&!i.showOutsideDays||c.hidden),x=(o=(r=i.components)===null||r===void 0?void 0:r.DayContent)!==null&&o!==void 0?o:la,p=u.jsx(x,{date:e,displayMonth:t,activeModifiers:c}),N={style:m,className:h,children:p,role:"gridcell"},k=s.focusTarget&&P(s.focusTarget,e)&&!c.outside,q=s.focusedDay&&P(s.focusedDay,e),ne=g(g(g({},N),(a={disabled:c.disabled,role:"gridcell"},a["aria-selected"]=c.selected,a.tabIndex=q||k?0:-1,a)),d),ae={isButton:f,isHidden:y,activeModifiers:c,selectedDays:l,buttonProps:ne,divProps:N};return ae}function qa(e){var t=D.useRef(null),n=Aa(e.date,e.displayMonth,t);return n.isHidden?u.jsx("div",{role:"gridcell"}):n.isButton?u.jsx(ee,g({name:"day",ref:t},n.buttonProps)):u.jsx("div",g({},n.divProps))}function Qa(e){var t=e.number,n=e.dates,a=M(),r=a.onWeekNumberClick,o=a.styles,i=a.classNames,s=a.locale,c=a.labels.labelWeekNumber,d=a.formatters.formatWeekNumber,l=d(Number(t),{locale:s});if(!r)return u.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:l});var f=c(Number(t),{locale:s}),h=function(m){r(t,n,m)};return u.jsx(ee,{name:"week-number","aria-label":f,className:i.weeknumber,style:o.weeknumber,onClick:h,children:l})}function Xa(e){var t,n,a=M(),r=a.styles,o=a.classNames,i=a.showWeekNumber,s=a.components,c=(t=s?.Day)!==null&&t!==void 0?t:qa,d=(n=s?.WeekNumber)!==null&&n!==void 0?n:Qa,l;return i&&(l=u.jsx("td",{className:o.cell,style:r.cell,children:u.jsx(d,{number:e.weekNumber,dates:e.dates})})),u.jsxs("tr",{className:o.row,style:r.row,children:[l,e.dates.map(function(f){return u.jsx("td",{className:o.cell,style:r.cell,role:"presentation",children:u.jsx(c,{displayMonth:e.displayMonth,date:f})},xn(f))})]})}function Ee(e,t,n){for(var a=n?.ISOWeek?Be(t):pe(t,n),r=n?.ISOWeek?I(e):Y(e,n),o=T(a,r),i=[],s=0;s<=o;s++)i.push(C(r,s));var c=i.reduce(function(d,l){var f=n?.ISOWeek?Ae(l):Qe(l,n),h=d.find(function(m){return m.weekNumber===f});return h?(h.dates.push(l),d):(d.push({weekNumber:f,dates:[l]}),d)},[]);return c}function Va(e,t){var n=Ee(O(e),be(e),t);if(t?.useFixedWeeks){var a=Dn(e,t);if(a<6){var r=n[n.length-1],o=r.dates[r.dates.length-1],i=me(o,6-a),s=Ee(me(o,1),i,t);n.push.apply(n,s)}}return n}function Ga(e){var t,n,a,r=M(),o=r.locale,i=r.classNames,s=r.styles,c=r.hideHead,d=r.fixedWeeks,l=r.components,f=r.weekStartsOn,h=r.firstWeekContainsDate,m=r.ISOWeek,y=Va(e.displayMonth,{useFixedWeeks:!!d,ISOWeek:m,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),x=(t=l?.Head)!==null&&t!==void 0?t:ua,p=(n=l?.Row)!==null&&n!==void 0?n:Xa,N=(a=l?.Footer)!==null&&a!==void 0?a:oa;return u.jsxs("table",{id:e.id,className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&u.jsx(x,{}),u.jsx("tbody",{className:i.tbody,style:s.tbody,children:y.map(function(k){return u.jsx(p,{displayMonth:e.displayMonth,dates:k.dates,weekNumber:k.weekNumber},k.weekNumber)})}),u.jsx(N,{displayMonth:e.displayMonth})]})}function za(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Ua=za()?D.useLayoutEffect:D.useEffect,he=!1,Ja=0;function Le(){return"react-day-picker-".concat(++Ja)}function Ka(e){var t,n=e??(he?Le():null),a=D.useState(n),r=a[0],o=a[1];return Ua(function(){r===null&&o(Le())},[]),D.useEffect(function(){he===!1&&(he=!0)},[]),(t=e??r)!==null&&t!==void 0?t:void 0}function $a(e){var t,n,a=M(),r=a.dir,o=a.classNames,i=a.styles,s=a.components,c=K().displayMonths,d=Ka(a.id?"".concat(a.id,"-").concat(e.displayIndex):void 0),l=a.id?"".concat(a.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=i.month,m=e.displayIndex===0,y=e.displayIndex===c.length-1,x=!m&&!y;r==="rtl"&&(t=[m,y],y=t[0],m=t[1]),m&&(f.push(o.caption_start),h=g(g({},h),i.caption_start)),y&&(f.push(o.caption_end),h=g(g({},h),i.caption_end)),x&&(f.push(o.caption_between),h=g(g({},h),i.caption_between));var p=(n=s?.Caption)!==null&&n!==void 0?n:ra;return u.jsxs("div",{className:f.join(" "),style:h,children:[u.jsx(p,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),u.jsx(Ga,{id:l,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function Za(e){var t=M(),n=t.classNames,a=t.styles;return u.jsx("div",{className:n.months,style:a.months,children:e.children})}function er(e){var t,n,a=e.initialProps,r=M(),o=Ne(),i=K(),s=D.useState(!1),c=s[0],d=s[1];D.useEffect(function(){r.initialFocus&&o.focusTarget&&(c||(o.focus(o.focusTarget),d(!0)))},[r.initialFocus,c,o.focus,o.focusTarget,o]);var l=[r.classNames.root,r.className];r.numberOfMonths>1&&l.push(r.classNames.multiple_months),r.showWeekNumber&&l.push(r.classNames.with_weeknumber);var f=g(g({},r.styles.root),r.style),h=Object.keys(a).filter(function(y){return y.startsWith("data-")}).reduce(function(y,x){var p;return g(g({},y),(p={},p[x]=a[x],p))},{}),m=(n=(t=a.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:Za;return u.jsx("div",g({className:l.join(" "),style:f,dir:r.dir,id:r.id,nonce:a.nonce,title:a.title,lang:a.lang},h,{children:u.jsx(m,{children:i.displayMonths.map(function(y,x){return u.jsx($a,{displayIndex:x,displayMonth:y},x)})})}))}function tr(e){var t=e.children,n=kn(e,["children"]);return u.jsx(Qn,{initialProps:n,children:u.jsx(ea,{children:u.jsx(Fa,{initialProps:n,children:u.jsx(ca,{initialProps:n,children:u.jsx(ha,{initialProps:n,children:u.jsx(xa,{children:u.jsx(Ta,{children:t})})})})})})})}function nr(e){return u.jsx(tr,g({},e,{children:u.jsx(er,{initialProps:e})}))}function ur(e){const t=ht.c(20);let n,a,r,o;t[0]!==e?({className:n,classNames:a,showOutsideDays:o,...r}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=r,t[4]=o):(n=t[1],a=t[2],r=t[3],o=t[4]);const i=o===void 0?!0:o;let s;t[5]!==n?(s=H("p-3",n),t[5]=n,t[6]=s):s=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=H(Pe({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),t[7]=c):c=t[7];const d=r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md";let l;t[8]!==d?(l=H("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",d),t[8]=d,t[9]=l):l=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=H(Pe({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),t[10]=f):f=t[10];let h;t[11]!==a||t[12]!==l?(h={months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:c,nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:l,day:f,day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...a},t[11]=a,t[12]=l,t[13]=h):h=t[13];let m;t[14]===Symbol.for("react.memo_cache_sentinel")?(m={IconLeft:rr,IconRight:ar},t[14]=m):m=t[14];let y;return t[15]!==r||t[16]!==i||t[17]!==s||t[18]!==h?(y=u.jsx(nr,{showOutsideDays:i,className:s,classNames:h,components:m,...r}),t[15]=r,t[16]=i,t[17]=s,t[18]=h,t[19]=y):y=t[19],y}function ar(e){const{className:t,...n}=e;return u.jsx(vt,{className:H("size-4",t),...n})}function rr(e){const{className:t,...n}=e;return u.jsx(mt,{className:H("size-4",t),...n})}export{ur as C};
@@ -1 +0,0 @@
1
- import{c as st,j as e,B as mt}from"./index-UyzF2Wxm.js";import{i as pt}from"./XCircle-B88UxHjD.js";import{N as lt}from"./agent-icon-BMQHBhP6.js";import{I as tt}from"./input-CTZybS4f.js";import{L as et}from"./label-Djcog1jo.js";import{ak as at,al as nt,ar as ct,am as ft}from"./index-CqVkj8du.js";import{u as dt,s as M,I as gt}from"./primitives-BVa9_bXR.js";import{S as ut}from"./save-status-CDIs_R_V.js";import{a as xt,B as ht,b as yt}from"./block-document-CZwjF0EN.js";import"./AlertCircle-Diz6uT7Y.js";import"./Tool01-BgzvuPeY.js";import"./SwitchHorizontal01-vo5MpXEz.js";import"./Settings02-BvivcyYL.js";import"./ArrowUpRight-Bo4YThIl.js";import"./ZapSquare-BfSTQonf.js";import"./Users03-ClWrctLP.js";import"./CheckCircle-BSFt0_RZ.js";import"./ChevronUp-_gM_dQkt.js";import"./ChevronDown-C_njLrOU.js";import"./ChevronLeft-ByQFERqp.js";import"./ChevronRight-D1duQehP.js";import"./DotsVertical-BJnhQ8u0.js";import"./Stars02-CVb_b-OZ.js";import"./Eye-SUXNGsVY.js";import"./ZoomOut-Csc4IU4b.js";import"./Globe01-CNw0uMhK.js";import"./FilterLines-CxIQYlMz.js";import"./Star01-Ds91SJzA.js";import"./Globe04-B24hCYmg.js";import"./HardDrive-IPJJMMij.js";import"./Key01-CES8n-fG.js";import"./LayoutLeft-D3mZzNi0.js";import"./LinkExternal01-B8zRpPza.js";import"./Monitor01-Uh-3HvZI.js";import"./Sun-tLN4vA6M.js";import"./Palette-Du66341h.js";import"./Play-CVoFjR5I.js";import"./Plus-DoMNANl8.js";import"./SearchMd-B-bL1wjq.js";import"./Shield01-BewRt7sw.js";import"./Stars01-PS518Jif.js";import"./Trash01-D84eyfFz.js";import"./Upload01-BA5iKtAl.js";import"./User01-CeCQHgwg.js";import"./Users01-DtmLcsFN.js";import"./XClose-DcfEQwVh.js";import"./X-2HGWB7Oo.js";import"./Zap-BeB31T8Y.js";import"./index-CKtGWWKI.js";import"./chat-context-Dqu5Dj_J.js";import"./hooks-DwlYXenh.js";import"./use-mcp-client-Cv0jyhEU.js";import"./auth-CCI_mhgC.js";import"./decopilot-sse-pool-_mJQvJZ7.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-iRRxKkRN.js";import"./use-collections-CXeEMOwb.js";import"./use-ai-providers-Deso-Vyj.js";import"./studio-tools-C1AZbzwg.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DPqJ7ETy.js";import"./scroll-area-BBReqUns.js";import"./use-clock-tick-Bp0qVbdD.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-H4KuRxx2.js";import"./tooltip-C7L4o0rn.js";import"./file-type-icon-BOraV8Gq.js";import"./dialog-AE8ChAe3.js";import"./content-blocks-o63cs2vh.js";import"./types-CppGS_VJ.js";import"./shell-layout-Ch8BfEKU.js";import"./avatar-CtVVLapD.js";import"./required-auth-layout-clm6boiC.js";import"./use-org-sso-QBVELOwd.js";import"./sheet-DALs-qBg.js";import"./integration-icon-CslqVkci.js";import"./use-navigate-to-agent-CytgRfBH.js";import"./use-connection-DqvYiUe3.js";import"./use-mcp-prompts-CPZOOi8c.js";import"./form-teSq_9QK.js";import"./select-CYFnhI-Q.js";import"./drawer-Di9WrlRG.js";import"./collection-search-D6nD206z.js";import"./tabs-D__sk4iN.js";import"./toggle-group-5CInie8P.js";import"./use-deco-credits-rzfxapgg.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BwnCXxRf.js";import"./use-registry-connections-DQ1fpeHW.js";import"./useInfiniteQuery-DVN2QYOz.js";import"./use-infinite-scroll-BpnVw1p2.js";import"./extract-connection-data-BumzxLvt.js";import"./card-DZtTT5Es.js";import"./collection-tabs-cs02GObx.js";import"./badge-BFvLiE20.js";import"./textarea-DmmCVjU6.js";import"./connection-form-helpers-Csy5hutj.js";import"./authenticate-and-persist-oauth-eSHjAd3t.js";import"./mcp-oauth-BcPuGj2k.js";import"./useSuspenseInfiniteQuery-BKCXXvPp.js";import"./connect-desktop-dialog-DNAK4U2K.js";import"./decopilot-CLVJpS6M.js";import"./checkbox-CHXOcnVE.js";import"./skeleton-BqZgigOh.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DOlV_atx.js";import"./popover-DG0h5msu.js";import"./command-DhLgZpjn.js";import"./index-DnCrG3F_.js";import"./dropdown-menu-ecBYljKf.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BaJ0EN3G.js";import"./empty-state-CegPWPc0.js";import"./toolbar-Bm-rdLjh.js";import"./preview-dialog-Bnu3vr0P.js";import"./index-DR6YHYZo.js";import"./use-mcp-tools-z50pjVux.js";import"./use-capability-CGVlaZtI.js";import"./shell-route-loading-RsrwOcS1.js";import"./index-C4YdUUl9.js";import"./alert-dialog-0uOi3HqZ.js";import"./switch-DRDIUTD7.js";import"./use-debounced-autosave-Ct9kek4B.js";import"./index-DJiEBchG.js";import"./sidebar-hZIrovG4.js";import"./search-input-D9asghaf.js";import"./github-repo-picker-LA1Jld2f.js";import"./use-secrets-C3RMGjE2.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-DnLJJSFI.js";import"./select-model-35S1fWTq.js";import"./use-automations-DdPVJNl5.js";import"./monaco-editor-DnGtg8Ra.js";import"./automation-runs-CNqGFhXQ.js";import"./table-tYYVDDAQ.js";import"./use-members-jM6HOjam.js";import"./use-org-auth-client-DjPrRX3t.js";import"./task-status-CftQiZKN.js";import"./automation-list-row-Ct9jaHYX.js";import"./sortable.esm-BtnRUgUU.js";import"./schema-form-B6Wg-hy1.js";import"./calendar-Cof0eQRR.js";import"./image-field-ycul5miD.js";import"./use-file-configs-CJ5VKJt7.js";function io(it){const t=st.c(87),{orgSlug:p,virtualMcpId:l,branch:a,blockKey:z,block:G,decofile:H,meta:O,onManagePosts:Q}=it;let F;t[0]!==a||t[1]!==p||t[2]!==l?(F={orgSlug:p,virtualMcpId:l,branch:a},t[0]=a,t[1]=p,t[2]=l,t[3]=F):F=t[3];const m=at(F);let D;t[4]!==G?(D=nt(G,"categories"),t[4]=G,t[5]=D):D=t[5];const ot=D;let L;t[6]!==z||t[7]!==m?(L=o=>{m.mutate({blockKey:z,data:ft(z,"categories",o)})},t[6]=z,t[7]=m,t[8]=L):L=t[8];const[i,V]=dt(ot,L);let R;t[9]!==i||t[10]!==V?(R=(o,rt)=>V({...i,[o]:rt}),t[9]=i,t[10]=V,t[11]=R):R=t[11];const r=R;let s,T;t[12]!==i.slug||t[13]!==H?(s=M(i.slug),T=s?ct(H).filter(o=>o.categorySlugs.includes(s)).length:0,t[12]=i.slug,t[13]=H,t[14]=s,t[15]=T):(s=t[14],T=t[15]);const U=T;let n;t[16]!==i.name?(n=M(i.name)||"Untitled category",t[16]=i.name,t[17]=n):n=t[17];let c;t[18]!==n?(c=e.jsx("span",{className:"truncate text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let f;t[20]!==m.isError||t[21]!==m.isPending?(f=e.jsx(ut,{isPending:m.isPending,isError:m.isError}),t[20]=m.isError,t[21]=m.isPending,t[22]=f):f=t[22];let d;t[23]!==c||t[24]!==f?(d=e.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,f]}),t[23]=c,t[24]=f,t[25]=d):d=t[25];let g;t[26]!==i.name?(g=M(i.name),t[26]=i.name,t[27]=g):g=t[27];let u;t[28]!==r?(u=o=>r("name",o),t[28]=r,t[29]=u):u=t[29];let x;t[30]!==g||t[31]!==u?(x=e.jsx(gt,{value:g,onChange:u,placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t[30]=g,t[31]=u,t[32]=x):x=t[32];let $;t[33]===Symbol.for("react.memo_cache_sentinel")?($=e.jsx(et,{htmlFor:"category-slug",children:"Slug"}),t[33]=$):$=t[33];let h;t[34]!==i.slug?(h=M(i.slug),t[34]=i.slug,t[35]=h):h=t[35];let y;t[36]!==r?(y=o=>r("slug",o.target.value),t[36]=r,t[37]=y):y=t[37];let j;t[38]!==h||t[39]!==y?(j=e.jsxs("div",{className:"mt-4 space-y-2",children:[$,e.jsx(tt,{id:"category-slug",value:h,onChange:y,placeholder:"my-category",className:"h-10"})]}),t[38]=h,t[39]=y,t[40]=j):j=t[40];let A;t[41]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(et,{htmlFor:"category-description",children:"Description"}),t[41]=A):A=t[41];let b;t[42]!==i.description?(b=M(i.description),t[42]=i.description,t[43]=b):b=t[43];let v;t[44]!==r?(v=o=>r("description",o.target.value),t[44]=r,t[45]=v):v=t[45];let N;t[46]!==b||t[47]!==v?(N=e.jsxs("div",{className:"mt-4 space-y-2",children:[A,e.jsx(tt,{id:"category-description",value:b,onChange:v,placeholder:"Short description for this category",className:"h-10"})]}),t[46]=b,t[47]=v,t[48]=N):N=t[48];let J;t[49]===Symbol.for("react.memo_cache_sentinel")?(J=e.jsx(lt,{size:16,className:"shrink-0 text-muted-foreground"}),t[49]=J):J=t[49];const X=U===1?"post":"posts";let S;t[50]!==U||t[51]!==X?(S=e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[J,e.jsxs("span",{className:"text-sm",children:[U," ",X," in this category"]})]}),t[50]=U,t[51]=X,t[52]=S):S=t[52];const Y=!s,Z=s?"Jump to the posts list filtered by this category":"Set a slug to manage this category's posts";let k;t[53]!==Q||t[54]!==s?(k=()=>Q(s),t[53]=Q,t[54]=s,t[55]=k):k=t[55];let K;t[56]===Symbol.for("react.memo_cache_sentinel")?(K=e.jsx(pt,{size:14}),t[56]=K):K=t[56];let B;t[57]!==Y||t[58]!==Z||t[59]!==k?(B=e.jsxs(mt,{type:"button",variant:"outline",size:"sm",disabled:Y,title:Z,onClick:k,children:["Manage posts",K]}),t[57]=Y,t[58]=Z,t[59]=k,t[60]=B):B=t[60];let _;t[61]!==S||t[62]!==B?(_=e.jsxs("div",{className:"mt-6 flex items-center justify-between gap-3 rounded-lg border bg-muted/30 px-4 py-3",children:[S,B]}),t[61]=S,t[62]=B,t[63]=_):_=t[63];let W;t[64]===Symbol.for("react.memo_cache_sentinel")?(W=e.jsx("div",{className:"mt-6 border-t"}),t[64]=W):W=t[64];let C;t[65]!==i.sections?(C=xt(i.sections),t[65]=i.sections,t[66]=C):C=t[66];let P;t[67]!==r?(P=o=>r("sections",o),t[67]=r,t[68]=P):P=t[68];let E;t[69]!==O||t[70]!==C||t[71]!==P?(E=e.jsx(ht,{value:C,onChange:P,meta:O,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."}),t[69]=O,t[70]=C,t[71]=P,t[72]=E):E=t[72];let w;t[73]!==x||t[74]!==j||t[75]!==N||t[76]!==_||t[77]!==E?(w=e.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-3xl px-8 py-8",children:[x,j,N,_,W,E]})}),t[73]=x,t[74]=j,t[75]=N,t[76]=_,t[77]=E,t[78]=w):w=t[78];let I;t[79]!==w||t[80]!==d?(I=e.jsxs("div",{className:"flex h-full flex-col",children:[d,w]}),t[79]=w,t[80]=d,t[81]=I):I=t[81];let q;return t[82]!==a||t[83]!==p||t[84]!==I||t[85]!==l?(q=e.jsx(yt,{orgSlug:p,virtualMcpId:l,branch:a,children:I}),t[82]=a,t[83]=p,t[84]=I,t[85]=l,t[86]=q):q=t[86],q}export{io as CategoryEditor};
@@ -1 +0,0 @@
1
- import{c as y,j as t,B as F,i as X,y as Ge,z as se,a2 as Pe,r as T,v as ie,E as Qe,l as V,be as Ye,u as Xe,x as G,t as Ze,e as ae,b0 as ke}from"./index-UyzF2Wxm.js";import{E as Ee}from"./empty-state-CegPWPc0.js";import{u as et,a as Ae}from"./use-collections-CXeEMOwb.js";import{u as ce}from"./use-mcp-client-Cv0jyhEU.js";import{F as ne,a as tt,b as de,d as me}from"./form-teSq_9QK.js";import{I as ue}from"./input-CTZybS4f.js";import{T as re}from"./textarea-DmmCVjU6.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-BonkSf20.js";import{a9 as rt,x as it,_ as at,aa as ct,W as dt,ab as mt,M as be}from"./agent-icon-BMQHBhP6.js";import{g as ut,M as xt,a as Ne}from"./types-CppGS_VJ.js";import{A as pt,a as ft,b as ht}from"./alert-BFF74cGy.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-CYFnhI-Q.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-C7L4o0rn.js";import{i as jt}from"./AlertCircle-Diz6uT7Y.js";import{s as bt}from"./Stars02-CVb_b-OZ.js";import{a as Nt}from"./Eye-SUXNGsVY.js";import{i as vt}from"./Play-CVoFjR5I.js";import{i as St}from"./ChevronRight-D1duQehP.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-C4YdUUl9.js";import{a as Oe,u as Re}from"./use-connection-DqvYiUe3.js";import{a as It}from"./use-mcp-tools-z50pjVux.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-CslqVkci.js";import{f as Tt,h as Pt}from"./chat-context-Dqu5Dj_J.js";import{b as kt}from"./shell-layout-Ch8BfEKU.js";import{M as Et}from"./monaco-editor-DnGtg8Ra.js";import{n as At}from"./XCircle-B88UxHjD.js";import"./auth-CCI_mhgC.js";import"./label-Djcog1jo.js";import"./index-DJiEBchG.js";import"./sidebar-hZIrovG4.js";import"./LayoutLeft-D3mZzNi0.js";import"./sheet-DALs-qBg.js";import"./X-2HGWB7Oo.js";import"./ZoomOut-Csc4IU4b.js";import"./Key01-CES8n-fG.js";import"./extract-connection-data-BumzxLvt.js";import"./use-registry-connections-DQ1fpeHW.js";import"./use-organization-settings-DPqJ7ETy.js";import"./studio-tools-C1AZbzwg.js";import"./Plus-DoMNANl8.js";import"./index-3BvM9m2F.js";import"./index-DnCrG3F_.js";import"./popover-DG0h5msu.js";import"./use-virtual-mcp-iRRxKkRN.js";import"./ChevronUp-_gM_dQkt.js";import"./SearchMd-B-bL1wjq.js";import"./Users03-ClWrctLP.js";import"./use-create-virtual-mcp--tV5feR-.js";import"./use-navigate-to-agent-CytgRfBH.js";import"./Tool01-BgzvuPeY.js";import"./SwitchHorizontal01-vo5MpXEz.js";import"./Settings02-BvivcyYL.js";import"./ArrowUpRight-Bo4YThIl.js";import"./ZapSquare-BfSTQonf.js";import"./CheckCircle-BSFt0_RZ.js";import"./ChevronDown-C_njLrOU.js";import"./ChevronLeft-ByQFERqp.js";import"./DotsVertical-BJnhQ8u0.js";import"./Globe01-CNw0uMhK.js";import"./FilterLines-CxIQYlMz.js";import"./Star01-Ds91SJzA.js";import"./Globe04-B24hCYmg.js";import"./HardDrive-IPJJMMij.js";import"./LinkExternal01-B8zRpPza.js";import"./Monitor01-Uh-3HvZI.js";import"./Sun-tLN4vA6M.js";import"./Palette-Du66341h.js";import"./Shield01-BewRt7sw.js";import"./Stars01-PS518Jif.js";import"./Trash01-D84eyfFz.js";import"./Upload01-BA5iKtAl.js";import"./User01-CeCQHgwg.js";import"./Users01-DtmLcsFN.js";import"./XClose-DcfEQwVh.js";import"./Zap-BeB31T8Y.js";import"./mcp-oauth-BcPuGj2k.js";import"./badge-BFvLiE20.js";import"./hooks-DwlYXenh.js";import"./decopilot-sse-pool-_mJQvJZ7.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-Deso-Vyj.js";import"./tab-id-BptcWVWa.js";import"./avatar-CtVVLapD.js";import"./dialog-AE8ChAe3.js";import"./required-auth-layout-clm6boiC.js";import"./use-org-sso-QBVELOwd.js";import"./index-DR6YHYZo.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,W={};if(H&&j?.inputSchema?.properties)for(const d of fe)W[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...W,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),K=v.structuredContent??v,He=performance.now(),We=Math.round(He-d);p(K),g(v),I(h);const Ke=JSON.stringify(K),ge=new TextEncoder().encode(Ke).length;w({duration:`${We}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const K=performance.now();w({duration:`${Math.round(K-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Wt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Kt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Wt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function _n(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{_n as default};
@@ -1 +0,0 @@
1
- import{y as fe,aD as Ie,b5 as Ae,z as le,aB as De,c as P,j as t,i as ge,B as E,r as q,l as je,v as J,a5 as $e,K as ne,b as Y,a9 as ce,p as Pe,b6 as Oe,a2 as ze,e as Me,b7 as Ve,m as Ee,E as Ue,C as Fe,t as G,b8 as Re}from"./index-UyzF2Wxm.js";import{a as Le}from"./extract-connection-data-BumzxLvt.js";import{E as ve}from"./empty-state-CegPWPc0.js";import{E as Be,c as He,r as We,b as Xe,d as Ge}from"./connection-form-helpers-Csy5hutj.js";import{c as qe,S as Ke,V as Qe}from"./index-BonkSf20.js";import{u as be,T as Je}from"./index-C4YdUUl9.js";import{u as Ye}from"./use-members-jM6HOjam.js";import{A as Ze}from"./avatar-CtVVLapD.js";import{a as Ne,b as ye,u as et}from"./use-connection-DqvYiUe3.js";import{u as _e}from"./use-mcp-client-Cv0jyhEU.js";import{a as tt}from"./use-mcp-tools-z50pjVux.js";import{a as st}from"./use-mcp-prompts-CPZOOi8c.js";import{i as nt,a as ot}from"./mcp-oauth-BcPuGj2k.js";import{I as oe}from"./integration-icon-CslqVkci.js";import{s as it}from"./Plus-DoMNANl8.js";import{z as at,C as rt,a8 as lt,Z as ct}from"./agent-icon-BMQHBhP6.js";import{a as Ce,s as dt}from"./Settings02-BvivcyYL.js";import{s as ae}from"./Trash01-D84eyfFz.js";import{d as mt,c as ut,b as xt,S as pt,a as ht}from"./sheet-DALs-qBg.js";import{F as L,b as B,c as H,d as V,f as W,e as ft,a as gt}from"./form-teSq_9QK.js";import{I as X}from"./input-CTZybS4f.js";import{u as jt,D as vt}from"./use-delete-connection-B2XplI5F.js";import{c as bt,C as Nt,B as yt,a as _t,b as Ct,d as St,e as wt}from"./monitoring-stats-row-BqgDsRP3.js";import{u as kt}from"./studio-tools-C1AZbzwg.js";import{u as Tt}from"./use-virtual-mcp-iRRxKkRN.js";import{i as Se}from"./ChevronRight-D1duQehP.js";import{a as we}from"./Users03-ClWrctLP.js";import{T as ee,a as It,b as te,c as At}from"./tabs-D__sk4iN.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as Dt}from"./ZapSquare-BfSTQonf.js";import{b as $t}from"./Tool01-BgzvuPeY.js";import{g as re,M as Pt}from"./types-CppGS_VJ.js";import{C as Ot}from"./collection-search-D6nD206z.js";import{C as zt}from"./card-DZtTT5Es.js";import{B as Mt}from"./badge-BFvLiE20.js";import{D as Vt,a as Et,b as Ut,c as de}from"./dropdown-menu-ecBYljKf.js";import{d as me,b as ue,c as xe,S as pe,a as R}from"./select-CYFnhI-Q.js";import{i as Ft}from"./CheckCircle-BSFt0_RZ.js";import{t as Rt}from"./ChevronDown-C_njLrOU.js";import{n as Lt}from"./XCircle-B88UxHjD.js";import{s as se}from"./Star01-Ds91SJzA.js";import{s as Bt}from"./XClose-DcfEQwVh.js";import"./index-DJiEBchG.js";import"./sidebar-hZIrovG4.js";import"./LayoutLeft-D3mZzNi0.js";import"./tooltip-C7L4o0rn.js";import"./ZoomOut-Csc4IU4b.js";import"./Key01-CES8n-fG.js";import"./auth-CCI_mhgC.js";import"./use-registry-connections-DQ1fpeHW.js";import"./use-organization-settings-DPqJ7ETy.js";import"./index-3BvM9m2F.js";import"./index-DnCrG3F_.js";import"./popover-DG0h5msu.js";import"./ChevronUp-_gM_dQkt.js";import"./SearchMd-B-bL1wjq.js";import"./use-create-virtual-mcp--tV5feR-.js";import"./use-navigate-to-agent-CytgRfBH.js";import"./Eye-SUXNGsVY.js";import"./use-org-auth-client-DjPrRX3t.js";import"./User01-CeCQHgwg.js";import"./use-collections-CXeEMOwb.js";import"./AlertCircle-Diz6uT7Y.js";import"./SwitchHorizontal01-vo5MpXEz.js";import"./ArrowUpRight-Bo4YThIl.js";import"./ChevronLeft-ByQFERqp.js";import"./DotsVertical-BJnhQ8u0.js";import"./Stars02-CVb_b-OZ.js";import"./Globe01-CNw0uMhK.js";import"./FilterLines-CxIQYlMz.js";import"./Globe04-B24hCYmg.js";import"./HardDrive-IPJJMMij.js";import"./LinkExternal01-B8zRpPza.js";import"./Monitor01-Uh-3HvZI.js";import"./Sun-tLN4vA6M.js";import"./Palette-Du66341h.js";import"./Play-CVoFjR5I.js";import"./Shield01-BewRt7sw.js";import"./Stars01-PS518Jif.js";import"./Upload01-BA5iKtAl.js";import"./Users01-DtmLcsFN.js";import"./X-2HGWB7Oo.js";import"./Zap-BeB31T8Y.js";import"./label-Djcog1jo.js";import"./alert-dialog-0uOi3HqZ.js";const Ht=fe({scopes:De(le()).describe("List of scopes available"),stateSchema:Ie(le(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:fe({}),outputSchema:Ht}];function Xt(s){const e=P.c(46),{instance:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i}=s;let c;e[0]!==n.id?(c={connectionId:n.id},e[0]=n.id,e[1]=c):c=e[1];const l=be(c),x=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",d=x||p?"border-destructive/50 bg-destructive/5":"border-transparent";let f;e[2]!==d?(f=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",d),e[2]=d,e[3]=f):f=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let v;e[7]!==n.title?(v=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=v):v=e[8];let b;e[9]!==n.status||e[10]!==p||e[11]!==x?(b=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?"Disabled (error)":"Disabled"}):null,e[9]=n.status,e[10]=p,e[11]=x,e[12]=b):b=e[12];let j;e[13]!==v||e[14]!==b?(j=t.jsxs("div",{className:"flex-1 min-w-0",children:[v,b]}),e[13]=v,e[14]=b,e[15]=j):j=e[15];let N;e[16]!==n||e[17]!==x||e[18]!==r?(N=x&&t.jsx(E,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[16]=n,e[17]=x,e[18]=r,e[19]=N):N=e[19];let T;e[20]!==n||e[21]!==p||e[22]!==i?(T=p?t.jsxs(E,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>i(n,"active"),children:[t.jsx(at,{size:13}),"Enable"]}):t.jsx(E,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>i(n,"inactive"),title:"Disable",children:t.jsx(rt,{size:13})}),e[20]=n,e[21]=p,e[22]=i,e[23]=T):T=e[23];let S;e[24]!==n||e[25]!==a?(S=()=>a(n),e[24]=n,e[25]=a,e[26]=S):S=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Ce,{size:13}),e[27]=y):y=e[27];let I;e[28]!==S?(I=t.jsx(E,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:S,title:"Configure",children:y}),e[28]=S,e[29]=I):I=e[29];let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ae,{size:13}),e[33]=k):k=e[33];let C;e[34]!==_?(C=t.jsx(E,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:_,title:"Delete",children:k}),e[34]=_,e[35]=C):C=e[35];let h;e[36]!==I||e[37]!==C||e[38]!==N||e[39]!==T?(h=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[N,T,I,C]}),e[36]=I,e[37]=C,e[38]=N,e[39]=T,e[40]=h):h=e[40];let w;return e[41]!==h||e[42]!==f||e[43]!==g||e[44]!==j?(w=t.jsxs("div",{className:f,children:[g,j,h]}),e[41]=h,e[42]=f,e[43]=g,e[44]=j,e[45]=w):w=e[45],w}function Gt(s){const e=P.c(15),{instance:n,onConfigure:a}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let i;e[5]!==n||e[6]!==a?(i=()=>a(n),e[5]=n,e[6]=a,e[7]=i):i=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Ce,{size:13}),e[8]=c):c=e[8];let l;e[9]!==i?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(E,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i,title:"Configure",children:c})}),e[9]=i,e[10]=l):l=e[10];let u;return e[11]!==r||e[12]!==o||e[13]!==l?(u=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,l]}),e[11]=r,e[12]=o,e[13]=l,e[14]=u):u=e[14],u}function qt(s){const e=P.c(27),{instances:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i,onAdd:c,isAdding:l}=s;if(n.length===0)return null;const u=n.length===1?"Instance":"Instances";let x;e[0]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[0]=u,e[1]=x):x=e[1];let p;e[2]!==l?(p=l?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(it,{size:13}),e[2]=l,e[3]=p):p=e[3];let d;e[4]!==l||e[5]!==c||e[6]!==p?(d=t.jsxs(E,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:c,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=c,e[6]=p,e[7]=d):d=e[7];let f;e[8]!==x||e[9]!==d?(f=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,d]}),e[8]=x,e[9]=d,e[10]=f):f=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==i){let j;e[17]!==r||e[18]!==a||e[19]!==o||e[20]!==i?(j=N=>t.jsx(q.Suspense,{fallback:t.jsx(Gt,{instance:N,onConfigure:a}),children:t.jsx(Xt,{instance:N,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i})},N.id),e[17]=r,e[18]=a,e[19]=o,e[20]=i,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=a,e[14]=o,e[15]=i,e[16]=g}else g=e[16];let v;e[22]!==g?(v=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:g}),e[22]=g,e[23]=v):v=e[23];let b;return e[24]!==f||e[25]!==v?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,v]}),e[24]=f,e[25]=v,e[26]=b):b=e[26],b}const Kt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Qt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Jt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Yt(s){const e=P.c(1),{connectionId:n,orgId:a,timeframe:r}=s,o=kt(),i=Qt(r),{data:c}=$e({queryKey:ne.connectionActivity(n,r,a),queryFn:async()=>await o.call("MONITORING_LOGS_LIST",{startDate:i.startDate.toISOString(),endDate:i.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),l=bt(c?.logs??[],i),u=l.data,x=l.totalCalls>0;let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[0]=p):p=e[0],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),p]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),x?t.jsxs("div",{children:[t.jsx(Nt,{config:Jt,className:"h-16 w-full",children:t.jsxs(yt,{data:u,barCategoryGap:"4%",children:[t.jsx(_t,{content:t.jsx(Ct,{labelFormatter:es}),cursor:{fill:"var(--muted)"}}),t.jsx(St,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(Zt)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})})]})}function Zt(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function es(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function ts(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ss(s){const e=P.c(13),{connectionId:n}=s,[a,r]=q.useState("14d"),{org:o}=J();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=i):i=e[0];let c;e[1]!==a?(c=Kt.map(d=>t.jsx("button",{type:"button",onClick:()=>r(d.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",a===d.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:d.label},d.value)),e[1]=a,e[2]=c):c=e[2];let l;e[3]!==c?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[i,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:c})]}),e[3]=c,e[4]=l):l=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ts,{}),e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==o.id||e[8]!==a?(x=t.jsx(q.Suspense,{fallback:u,children:t.jsx(Yt,{connectionId:n,orgId:o.id,timeframe:a})}),e[6]=n,e[7]=o.id,e[8]=a,e[9]=x):x=e[9];let p;return e[10]!==l||e[11]!==x?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,x]}),e[10]=l,e[11]=x,e[12]=p):p=e[12],p}function ns(s){const e=P.c(15),{virtualMcp:n,org:a}=s,r=Y();let o;e[0]!==r||e[1]!==a||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:a,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=a,e[2]=n.id,e[3]=o):o=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(we,{size:16}),e[4]=i):i=e[4];let c;e[5]!==n.icon||e[6]!==n.title?(c=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:i}),e[5]=n.icon,e[6]=n.title,e[7]=c):c=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let x;return e[11]!==o||e[12]!==c||e[13]!==l?(x=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[c,l,u]}),e[11]=o,e[12]=c,e[13]=l,e[14]=x):x=e[14],x}function os(s){const e=P.c(7),{virtualMcps:n,org:a}=s;let r;if(e[0]!==a||e[1]!==n){let i;e[3]!==a?(i=c=>t.jsx(ns,{virtualMcp:c,org:a},c.id),e[3]=a,e[4]=i):i=e[4],r=n.map(i),e[0]=a,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function is(s){const e=P.c(7),{connection:n}=s,{org:a}=J();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=Tt(r);if(!(o.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=c):c=e[3];let l;return e[4]!==a.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[c,t.jsx("div",{className:"px-5 py-4",children:t.jsx(os,{virtualMcps:o,org:a.slug})})]}),e[4]=a.slug,e[5]=o,e[6]=l):l=e[6],l}function as(s){const e=P.c(31),{tools:n,connectionId:a,org:r}=s,o=Y(),{org:i}=J();let c;e[0]!==a||e[1]!==i.id||e[2]!==i.slug?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=a,e[1]=i.id,e[2]=i.slug,e[3]=c):c=e[3];const l=_e(c),u=Ne(a);let x;e[4]!==u||e[5]!==a?(x=u?ke(u):a,e[4]=u,e[5]=a,e[6]=x):x=e[6];const p=x,[d,f]=q.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==d||e[12]!==n){const S=(n??[]).filter(rs),y=d.toLowerCase().trim(),I=y?S.filter(h=>h.name.toLowerCase().includes(y)||h.description&&h.description.toLowerCase().includes(y)):S;let _;e[17]!==p||e[18]!==o||e[19]!==r?(_=h=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(h.name)}})},e[17]=p,e[18]=o,e[19]=r,e[20]=_):_=e[20];const k=_;b="flex flex-col h-full overflow-hidden";let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=h=>{h.key==="Escape"&&(f(""),h.target.blur())},e[21]=C):C=e[21],e[22]!==d?(j=t.jsx(Ot,{value:d,onChange:f,placeholder:"Search apps...",onKeyDown:C}),e[22]=d,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(ve,{image:null,title:d?"No apps found":"No apps available",description:d?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:I.map(h=>{const w=re(h._meta);return t.jsxs(zt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>k(h),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Pt,{resourceURI:w,toolInfo:{tool:h},displayMode:"inline",minHeight:200,maxHeight:200,client:l})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.name}),t.jsx(Je,{annotations:h.annotations,_meta:h._meta})]}),h.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:h.description})]})]},h.name)})}),e[7]=p,e[8]=l,e[9]=o,e[10]=r,e[11]=d,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let N;e[24]!==g||e[25]!==v?(N=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=N):N=e[26];let T;return e[27]!==b||e[28]!==j||e[29]!==N?(T=t.jsxs("div",{className:b,children:[j,N]}),e[27]=b,e[28]=j,e[29]=N,e[30]=T):T=e[30],T}function rs(s){return!!re(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=i=>i.charAt(0).toUpperCase()+i.slice(1),a=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&a.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let a;return e[0]!==n?(a=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=a):a=e[1],a}function ls(s){const e=P.c(50),{tools:n,prompts:a,resources:r,connectionId:o,org:i}=s;let c;e[0]!==a?(c=a===void 0?[]:a,e[0]=a,e[1]=c):c=e[1];const l=c;let u;e[2]!==r?(u=r===void 0?[]:r,e[2]=r,e[3]=u):u=e[3];const x=u,p=Y(),d=Ne(o??"");let f;e[4]!==d||e[5]!==o?(f=d?ke(d):o,e[4]=d,e[5]=o,e[6]=f):f=e[6];const g=f;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==i?(v=function(D){!o||!i||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(D)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=i,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==i||e[14]!==n?(j=o&&i&&n.some(ms),e[12]=o,e[13]=i,e[14]=n,e[15]=j):j=e[15];const N=j;if(n.length+l.length+x.length===0){let m;return e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=m):m=e[16],m}let S;e[17]!==n.length?(S=t.jsxs(ee,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=S):S=e[18];let y;e[19]!==N?(y=N&&t.jsx(ee,{value:"apps",variant:"underline",children:"UI"}),e[19]=N,e[20]=y):y=e[20];let I,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ee,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(ee,{value:"resources",variant:"underline",children:"Resources"}),e[21]=I,e[22]=_):(I=e[21],_=e[22]);let k;e[23]!==S||e[24]!==y?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(It,{variant:"underline",className:"gap-1",children:[S,y,I,_]})}),e[23]=S,e[24]=y,e[25]=k):k=e[25];let C;e[26]!==b||e[27]!==n?(C=n.length>0?n.map(m=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(m.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(m.name)}),m.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:m.description})]}),t.jsx(Se,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},m.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=C):C=e[28];let h;e[29]!==C?(h=t.jsx(te,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:C})}),e[29]=C,e[30]=h):h=e[30];let w;e[31]!==o||e[32]!==N||e[33]!==i||e[34]!==n?(w=N&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(as,{tools:n,connectionId:o,org:i})}),e[31]=o,e[32]=N,e[33]=i,e[34]=n,e[35]=w):w=e[35];let z;e[36]!==l?(z=l.length>0?l.map(ds):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=z):z=e[37];let O;e[38]!==z?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[38]=z,e[39]=O):O=e[39];let A;e[40]!==x?(A=x.length>0?x.map(cs):t.jsx(ie,{label:"resources"}),e[40]=x,e[41]=A):A=e[41];let M;e[42]!==A?(M=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=M):M=e[43];let U;return e[44]!==k||e[45]!==h||e[46]!==w||e[47]!==O||e[48]!==M?(U=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(At,{defaultValue:"tools",variant:"underline",children:[k,h,w,O,M]})}),e[44]=k,e[45]=h,e[46]=w,e[47]=O,e[48]=M,e[49]=U):U=e[49],U}function cs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(lt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function ds(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function ms(s){return re(s._meta)}function us(s){const e=P.c(13),{connection:n,displayTitle:a}=s,r=a??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(oe,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let i;e[3]!==r?(i=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=i):i=e[4];let c;e[5]!==n.description?(c=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,l]}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function xs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:a,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),i=ce({control:s.control,name:"connection_url"}),{stdioEnabled:c}=Pe(),l=(()=>{if(typeof i!="string"||!i)return!1;try{const d=new URL(i);return d.hostname==="api.githubcopilot.com"&&d.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=c||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Oe(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(L,{control:s.control,name:"ui_type",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:d.value,onValueChange:d.onChange,children:[t.jsx(V,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(R,{value:"HTTP",children:"HTTP"}),t.jsx(R,{value:"SSE",children:"SSE"}),t.jsx(R,{value:"Websocket",children:"Websocket"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:"NPX Package"}),t.jsx(R,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(L,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(B,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:d.value,onValueChange:d.onChange,children:[t.jsx(V,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(R,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(R,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(R,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(R,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(W,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(V,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(L,{control:s.control,name:"stdio_command",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(V,{children:t.jsx(X,{placeholder:"node, bun, python...",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(V,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(W,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(V,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(V,{children:t.jsx(Be,{value:d.value??[],onChange:d.onChange})}),t.jsx(W,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:l?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Et,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Mt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),"Authenticated via OAuth",t.jsx(Rt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(de,{onClick:a,children:[t.jsx(dt,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(ae,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&d.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>d.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Bt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(X,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...d,value:d.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(ft,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function ps(s){return s.command==="npx"}function hs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function fs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function he(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Re(s.connection_headers)){const a=s.connection_headers,r=We(a.envVars);if(ps(a)){const i=hs(a);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:i,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=fs(a);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function gs(s){let e,n=null,a=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Ge(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",a=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...a&&{connection_token:a},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function js({connection:s,connectionId:e,org:n,isUpdating:a,tools:r,prompts:o,resources:i,siblings:c}){const l=Y({from:"/$org/settings/connections/$appSlug"}),u=Ee(),x=ye(),{org:p}=J(),d=jt({onSuccess:()=>{c.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[f,g]=q.useState(null),[v,b]=q.useState(!1),j=be({connectionId:e}),{data:N}=Ye(),T=N?.data?.members??[],S=f??s,y=T.find(m=>m.userId===S.created_by),_=s?.connection_type==="VIRTUAL"||j.isAuthenticated,k={...s,tools:r},C=qe(k,Wt),h=Ue({resolver:Fe(He),values:he(f??s)}),w=h.formState.isDirty,z=async()=>{if(!await h.trigger())return;const D=h.getValues(),$=gs(D),F=f?.id??e;await x.update.mutateAsync({id:F,data:$}),h.reset(D)},O=()=>{h.reset(he(f??s))},A=async m=>{const{token:D,tokenInfo:$,error:F}=await ot({connectionId:m,orgSlug:p.slug,scope:"offline_access"});if(F||!D){G.error(`Authentication failed: ${F}`);return}if($)try{const K=await fetch(`/api/${p.slug}/connections/${m}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:$.accessToken,refreshToken:$.refreshToken,expiresIn:$.expiresIn,scope:$.scope,clientId:$.clientId,clientSecret:$.clientSecret,tokenEndpoint:$.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await x.update.mutateAsync({id:m,data:{connection_token:D}});else try{await x.update.mutateAsync({id:m,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(K){console.error("Error saving OAuth token:",K),await x.update.mutateAsync({id:m,data:{connection_token:D}})}else await x.update.mutateAsync({id:m,data:{connection_token:D}});const Q=new URL(`/api/${p.slug}/mcp/${m}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ne.mcpClientPrefix()}),G.success("Authentication successful")},M=()=>A(s.id),U=async()=>{try{const m=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!m.ok){const $=await m.text();G.error(`Failed to remove OAuth: ${$}`);return}const D=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(D.href,null)}),G.success("OAuth removed. You can now re-authenticate with a different account.")}catch(m){console.error("Error removing OAuth token:",m),G.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(vt,{...d}),t.jsx(mt,{open:f!==null,onOpenChange:m=>{m||g(null)},children:t.jsxs(ut,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(xt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(pt,{className:"text-base",children:f?.title??s.title}),t.jsx(ht,{className:"text-xs",children:"Update URL, authentication, and other settings"}),y&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ze,{url:y.user?.image??void 0,fallback:y.user?.name??y.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:y.user?.name||y.user?.email})]})]}),t.jsxs(gt,{...h,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(L,{control:h.control,name:"title",render:({field:m})=>t.jsxs(B,{children:[t.jsx(H,{children:"Name"}),t.jsx(V,{children:t.jsx(X,{...m})}),t.jsx(W,{})]})}),t.jsx(L,{control:h.control,name:"description",render:({field:m})=>t.jsxs(B,{children:[t.jsx(H,{children:"Description"}),t.jsx(V,{children:t.jsx(X,{...m,value:m.value||""})}),t.jsx(W,{})]})})]}),t.jsx(xs,{form:h,connection:f??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:M,onRemoveOAuth:U}),t.jsx(Ke,{connection:f??s,form:h,hasMcpBinding:C,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:M,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(E,{onClick:z,disabled:!w||a,className:"flex-1",children:a?"Saving…":"Save changes"}),w&&t.jsx(E,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(E,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const m=f??s;g(null),d.requestDelete(m)},children:[t.jsx(ae,{size:15}),"Delete"]})]})]},f?.id??s.id)]})}),t.jsx(Qe,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(us,{connection:s,displayTitle:(()=>{const m=c[0]??s;return m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ss,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(qt,{instances:c,onConfigure:m=>g(m),onAuthenticate:m=>A(m.id),onDelete:m=>d.requestDelete(m),onToggleStatus:async(m,D)=>{try{await x.update.mutateAsync({id:m.id,data:{status:D}}),G.success(D==="active"?"Connection enabled":"Connection disabled")}catch{G.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const m=c[0]??s,D=m.title.replace(/\s*\(\d+\)\s*$/,""),$=c.length+1,F=`${D} (${$})`,Q=Le("conn");await x.create.mutateAsync({id:Q,title:F,description:m.description??null,connection_type:m.connection_type,connection_url:m.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:m.created_by,organization_id:m.organization_id,icon:m.icon??null,app_name:m.app_name??null,app_id:m.app_id??null,connection_headers:m.connection_headers??null,oauth_config:null,configuration_state:m.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await nt({url:K.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(is,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ls,{tools:r,prompts:o,resources:i,connectionId:e,org:n})})]})})]})})]})}function vs(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:r,org:o}=Me(a),{org:i}=J(),c=ye();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const u=et(l),x=u[0]??null,p=x?.id??"",d=p||null;let f;s[4]!==i.id||s[5]!==i.slug||s[6]!==d?(f={connectionId:d,orgId:i.id,orgSlug:i.slug},s[4]=i.id,s[5]=i.slug,s[6]=d,s[7]=f):f=s[7];const g=_e(f);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=tt(v);let j;if(s[10]!==x?.tools||s[11]!==p||s[12]!==u||s[13]!==b){const A=b?b.tools.map(Ss):(x?.tools??[]).map(Cs);e:{if(u.length<=1){j=A;break e}const M=new Set,U=[],m=ys;for(const D of u){const $=D.id===p?A:m(D.tools);for(const F of $)M.has(F.name)||(M.add(F.name),U.push(F))}j=U.length>0?U:A}s[10]=x?.tools,s[11]=p,s[12]=u,s[13]=b,s[14]=j}else j=s[14];const N=j;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:S}=st(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=Ve(y);let _;s[19]!==S?.prompts?(_=S?.prompts??[],s[19]=S?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(Ns),s[21]=_,s[22]=k):k=s[22];const C=k;let h;s[23]!==I?.resources?(h=I?.resources??[],s[23]=I?.resources,s[24]=h):h=s[24];let w;s[25]!==h?(w=h.map(bs),s[25]=h,s[26]=w):w=s[26];const z=w;if(!x){let A;return s[27]!==n||s[28]!==o?(A=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(E,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=A):A=s[29],A}let O;return s[30]!==c.update.isPending||s[31]!==N||s[32]!==x||s[33]!==p||s[34]!==o||s[35]!==C||s[36]!==z||s[37]!==u?(O=t.jsx(js,{org:o,connection:x,connectionId:p,isUpdating:c.update.isPending,tools:N,prompts:C,resources:z,siblings:u}),s[30]=c.update.isPending,s[31]=N,s[32]=x,s[33]=p,s[34]=o,s[35]=C,s[36]=z,s[37]=u,s[38]=O):O=s[38],O}function bs(s){return{name:s.name,description:s.description,uri:s.uri}}function Ns(s){return{name:s.name,description:s.description}}function ys(s){return(s??[]).map(_s)}function _s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Cs(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ss(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ws(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(q.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(vs,{})})}),s[0]=e):e=s[0],e}function io(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ws,{}),s[0]=e):e=s[0],e}export{io as default};